c-common.h (c_language_kind): New type.
[gcc.git] / gcc / cp / ChangeLog
1 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2
3 * decl2.c (c_language): Define.
4
5 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6
7 * lex.c (lang_init_options): Tweak.
8
9 * decl2.c: Remove #inclusion of diagnostic.h
10 (lang_decode_option): Move diagnostic formatting options to
11 toplevel.
12
13 * lang-options.h: Remove documentation for diagnostic options.
14
15 * Makefile.in (lex.o): Depends upon diagnostic.h
16
17 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18
19 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
20 the same DECL_RESULT, it's not a redefinition.
21 * pt.c (tsubst_decl): Remove code to handle illegal
22 specializations.
23
24 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
25
26 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
27
28 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
29
30 * search.c (maybe_suppress_debug_info): Don't check
31 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
32
33 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
34 here if extern_p.
35
36 Remember instantiation context in deferred instantiations.
37 * cp-tree.h (struct tinst_level): Remove.
38 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
39 * pt.c (current_tinst_level): Now a tree.
40 (print_template_context, push_tinst_level, pop_tinst_level,
41 tinst_for_decl): Adjust.
42 (reopen_tinst_level): New fn.
43 (init_pt): Register current_tinst_level as a root.
44 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
45 of the pending templates list.
46 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
47 * lex.c (extract_interface_info): Adjust.
48 * decl2.c (warn_if_unknown_interface): Adjust.
49
50 2000-06-05 Mark Mitchell <mark@codesourcery.com>
51
52 * class.c (indirect_primary_base_p): New function.
53 (determine_primary_base): Use it.
54
55 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
56
57 Update new-abi dynamic cast algorithm.
58 * tinfo.cc (__class_type_info::__dyncast_result): Add
59 whole_details. Adjust constructor.
60 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
61 Avoid unnecessary searching.
62 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
63
64 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
65
66 * decl.c (init_decl_processing): Don't call record_component_aliases.
67 * tree.c (build_cplus_array_type_1): Likewise.
68
69 2000-06-04 Mark Mitchell <mark@codesourcery.com>
70
71 * ir.texi: Correct typo.
72 * mangle.c (write_expression): Handle non-type template arguments
73 with reference type.
74 * method.c (build_overload_value): Likewise.
75 * pt.c (convert_nontype_argument): Explicitly represent conversion
76 to a reference with an ADDR_EXPR.
77 (unify): Always unify arguments in left-to-right order.
78
79 2000-06-03 Alex Samuel <samuel@codesourcery.com>
80 Mark Mitchell <mark@codesourcery.com>
81
82 * Make-lang.in (CXX_SRCS): Add mangle.c.
83 * Makefile.in (CXX_OBJS): Add mangle.o.
84 (mangle.o): New rule.
85
86 * class.c (local_classes): New variable.
87 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
88 (get_vtt_name): Use mangle_vtt_name for new ABI.
89 (init_class_processing): Initialize local_classes.
90 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
91 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
92 (std_identifier): New macro.
93 (DECL_VOLATILE_MEMFUNC_P): New macro.
94 (DECL_NAMESPACE_STD_P): Likewise.
95 (local_classes): Declare.
96 (get_mostly_instantiated_function_type): Declare.
97 (init_mangle): Declare.
98 (mangle_decl): Likewise.
99 (mangle_type_string): Likewise.
100 (mangle_type): Likewise.
101 (mangle_typeinfo_for_type): Likewise.
102 (mangle_typeinfo_string_for_type): Likewise.
103 (mangle_vtbl_for_type): Likewise.
104 (mangle_vtt_for_type): Likewise.
105 (mangle_ctor_vtbl_for_type): Likewise.
106 (mangle_thunk): Likewise.
107 (mangle_conv_op_name_for_type): Likewise.
108 (mangle_guard_variable): Likewise.
109 * decl.c (pushtag): Keep track of local classes.
110 (initialize_predefined_identifiers): Initialize std_identifier.
111 (init_decl_processing): Use std_identifier.
112 (start_decl): Don't treat instantiations as specializations.
113 (grokdeclarator): Likewise.
114 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
115 name for fully-instantiated templates.
116 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
117 destructors with the new ABI.
118 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
119 (grokfield): Use mangle_type for new ABI.
120 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
121 (get_sentry): Use mangle_guard_variable for new ABI.
122 (start_static_initialization_or_destruction): Likewise.
123 * expr.c (extract_aggr_init): Remove.
124 (extract_scalar_init): Likewise.
125 (extract_init): Remove #if 0'd code.
126 * mangle.c: New function.
127 * method.c (build_mangled_name): Assert not flag_new_abi.
128 (build_static_name): Likewise.
129 (build_decl_overload_real): Likewise.
130 (build_typename_overload): Likewise.
131 (build_overload_with_type): Likewise.
132 (build_overload_name): Likewise.
133 (get_ctor_vtbl_name): Likewise.
134 (start_squangling): Likewise.
135 (get_id_2): Likewise.
136 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
137 (init_method): Call init_mangle for new ABI.
138 (make_thunk): Call mangle_thunk for new ABI.
139 * operators.def: Correct new ABI manglings for the `%' operator.
140 Add `::' operator.
141 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
142 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
143 (lookup_template_class): Call mangle_decl for new ABI.
144 (get_mostly_instantiated_function_type): New function.
145 (set_mangled_name_for_template_decl): Use it.
146 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
147 the new ABI. Use mangle_conv_op_name_for_type for instantiated
148 conversion op names.
149 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
150 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
151 (tinfo_base_init): Likewise. Mangle typeinfo string name with
152 mangle_typeinfo_string_for_type.
153
154 2000-06-01 Richard Henderson <rth@cygnus.com>
155
156 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
157
158 2000-06-01 Richard Henderson <rth@cygnus.com>
159
160 * decl2.c (unsupported_options): Fix typo, make const.
161 (lang_decode_option): Fix bsearch argument order.
162
163 2000-06-01 Mark Mitchell <mark@codesourcery.com>
164
165 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
166 on FIELD_DECLs.
167
168 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
169
170 * cp-tree.h (c_get_alias_set): Deleted.
171 * Makefile.in (decl.o): Include ../expr.h.
172 * decl.c (expr.h): Include.
173 (init_decl_processing): Call record_component_aliases for arrays.
174 (grokdeclarator): Likewise.
175 Set TREE_ADDRESSABLE for fields that aren't bitfields.
176 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
177
178 2000-05-31 Mark Mitchell <mark@codesourcery.com>
179
180 Remove guiding declaration support.
181 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
182 (flag_guiding_decls): Remove.
183 * call.c (build_user_type_conversion_1): Remove support for
184 guiding decls.
185 (build_new_function_call): Likewise.
186 (build_new_op): Likewise.
187 (build_new_method_call): Likewise.
188 * decl.c (start_function): Likewise.
189 * friend.c (is_friend): Likewise.
190 (do_friend): Likewise.
191 * decl2.c ((flag_dump_translation_unit): Make it const.
192 (flag_guiding_decls): Remove.
193 (unsupported_options): New variable
194 (compare_options): New function.
195 (lang_decode_option): Use them.
196
197 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
198
199 * method.c (mangle_expression): Adjust test for legal expression
200 operators.
201
202 * pt.c (instantiate_decl): Save and restore the local
203 specializations list.
204
205 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
206
207 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
208
209 2000-05-30 Mark Mitchell <mark@codesourcery.com>
210
211 * call.c (add_template_candidate_real): Handle member template
212 constructors for classes with virtual bases.
213 (build_user_type_conversion_1): Use in_charge_arg_for_name.
214 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
215
216 * ir.texi: Update thunk documentation.
217
218 * call.c (joust): Fix handling of overloaded builtin operators.
219
220 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
221
222 * cp-tree.h (DECL_ANTICIPATED): New macro.
223 Document new use of DECL_LANG_FLAG_7.
224 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
225 in the user namespace.
226 * lex.c (do_identifier): If the identifier's declaration has
227 DECL_ANTICIPATED on, it has not yet been declared. But do not
228 replace it with an ordinary implicit declaration.
229
230 * tinfo2.cc: Include stdlib.h.
231
232 2000-05-29 Mark Mitchell <mark@codesourcery.com>
233
234 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
235 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
236 CLASSTYPE_ALIGN.
237
238 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
239
240 * decl2.c (lang_decode_option): Use skip_leading_substring instead
241 of plain strncmp.
242
243 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
244
245 * operators.def (<?): Duplicated, should have been...
246 (>?): this. Fixed.
247
248 2000-05-27 Alex Samuel <samuel@codesourcery.com>
249 Mark Mitchell <mark@codesourcery.com>
250
251 * cp-tree.h (ansi_opname): Make it a macro.
252 (ansi_assopname): Likewise.
253 (struct lang_decl_flags): Add assignment_operator_p.
254 (struct lang_decl): Add operator_code.
255 (DECL_VTT_PARM): Adjust.
256 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
257 overloaded operator.
258 (SET_OVERLOADED_OPERATOR_CODE): New macro.
259 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
260 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
261 (opname_tab): Remove.
262 (assignop_tab): Likewise.
263 (operator_name_info_t): New type.
264 (operator_name_info): New variable.
265 (assignment_operator_name_info): Likewise.
266 (build_cp_library_fn): Remove declaration.
267 (push_cp_library_fn): Likewise.
268 (operator_name_string): Likewise.
269 (build_decl_overload): Likewise.
270 * call.c (print_z_candidates): Simplify.
271 (build_object_call): Adjust usage of ansi_opname. Use
272 DECL_OVERLOADED_OPERATOR_P.
273 (op_error): Adjust operator name lookup.
274 (build_conditional_expr): Adjust usage of ansi_opname.
275 (build_new_op): Likewise.
276 (build_op_delete_call): Likewise.
277 (build_over_call): Likewise.
278 (joust): Use DECL_OVERLOADED_OPERATOR_P.
279 * decl.c (duplicate_decls): Copy operator_code.
280 (init_decl_processing): Adjust parameters to push_cp_library_fn.
281 (builtin_function): Adjust parameters to build_library_fn_1.
282 (build_library_fn_1): Accept an overloaded operator code.
283 (build_library_fn): Pass ERROR_MARK.
284 (build_cp_library_fn): Accept an overloaded operator code.
285 (push_cp_library_fn): Likewise.
286 (grokfndecl): Tweak.
287 (grokdeclarator): Simplify code to compute names of overloaded
288 operators. Adjust use of ansi_opname.
289 (ambi_op_p): Work on tree_codes, not identifiers.
290 (unary_op_p): Likewise.
291 (grok_op_properties): Likewise.
292 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
293 (lang_mark_tree): Don't try to mark the operator_code.
294 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
295 * error.c (dump_decl): Remove special handling for operator
296 names.
297 (dump_function_name): Likewise.
298 (dump_expr): Adjust name lookup of operators.
299 (op_to_string): Simplify.
300 (assop_to_string): Likewise.
301 * init.c (build_new_1): Adjust use of ansi_opname.
302 * lex.c (opname_tab): Remove.
303 (assignop_tab): Likewise.
304 (ansi_opname): Likewise.
305 (ansi_assopname): Likewise.
306 (operator_name_string): Likewise.
307 (reinit_lang_specific): Likewise.
308 (operator_name_info): New variable.
309 (assignment_operator_name_info): Likewise.
310 (init_operators): New function.
311 (init_parse): Use it.
312 (do_identifier): Adjust use of ansi_opname.
313 * method.c (mangle_expression): Don't use ansi_opname for
314 mangling.
315 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
316 (build_decl_overload): Remove.
317 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
318 (do_build_assign_ref): Adjust use of ansi_opname.
319 (synthesize_method): Likewise.
320 (implicitly_declare_fn): Likewise.
321 * operators.def: New file.
322 * parse.y (operator): Adjust use of ansi_opname.
323 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
324 (set_mangled_name_for_template_decl): Don't play games with
325 current_namespace.
326 (special_function_p): Adjust use of ansi_opname.
327 * typeck.c (check_return_expr): Likewise.
328 * Make-lang.in (cc1plus): Depend on operators.def.
329 * Makefile.in (lex.o): Likewise.
330 (decl.o): Likewise.
331
332 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
333
334 * Make-lang.in (cplib2.ready): Eradicate.
335
336 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
337
338 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
339 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
340 (built_min, cp_tree_equal): Likewise.
341
342 2000-05-26 Mark Mitchell <mark@codesourcery.com>
343
344 * class.c (layout_nonempty_base_or_field): Replace
345 `record_layout_info' with `record_layout_info_s'.
346
347 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
348
349 Fix goto checking.
350 * cp-tree.h (struct language_function): x_named_labels is now
351 a struct named_label_list*.
352 * decl.c (struct named_label_use_list): Renamed from...
353 (struct named_label_list): ...this. New struct.
354 (push_binding_level): Don't set eh_region.
355 (note_level_for_eh): New fn.
356 (pop_label): Take label and old value directly.
357 (pop_labels): Adjust for new named_labels format.
358 (lookup_label): Likewise.
359 (poplevel): Note characteristics of a binding level containing a
360 named label. Mess with named label lists earlier.
361 (mark_named_label_lists): New fn.
362 (mark_lang_function): Call it.
363 (use_label): New fn, split out from...
364 (make_label_decl): ...here. Don't call it.
365 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
366 check_previous_gotos): New fns, split out from...
367 (define_label): ...here.
368 (check_switch_goto): New fn.
369 (define_case_label): Call it.
370 (check_goto): New fn.
371 * semantics.c (finish_goto_stmt): Call it and use_label.
372 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
373 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
374
375 2000-05-26 Mark Mitchell <mark@codesourcery.com>
376
377 * class.c (build_vtable_entry_ref): Correct usage of
378 get_vtbl_decl_for_binfo.
379
380 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
381 * method.c (implicitly_declare_fn): Not here.
382
383 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
384
385 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
386 (CPTI_PTMD_DESC_TYPE): ... here.
387 (ptmd_desc_type_node): Rename to ...
388 (ptm_desc_type_node): ... here.
389 * decl.c: Likewise.
390 * rtti.c (ptmd_initializer): Rename to ...
391 (ptm_initializer): ... here.
392 (sythesize_tinfo_var): Adjust. Deal with pointer to member
393 function.
394 (create_tinfo_types): Adjust.
395
396 2000-05-25 Mark Mitchell <mark@codesourcery.com>
397
398 Finish implementation of VTTs.
399 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
400 CPTI_VTT_PARM_IDENTIFIER.
401 (vtt_parm_identifier): New macro.
402 (vtt_parm_type): Likewise.
403 (BINFO_SUBVTT_INDEX): Likewise.
404 (BINFO_VPTR_INDEX): Likewise.
405 (struct lang_decl): Add vtt_parm.
406 (DECL_VTT_PARM): New macro.
407 (DECL_USE_VTT_PARM): Likewise.
408 (DECL_NEEDS_VTT_PARM_P): Likewise.
409 (get_vtt_name): Declare.
410 (build_artifical_parm): Likewise.
411 (fixup_all_virtual_upcast_offsets): Likewise.
412 (expand_indirect_vtbls_init): Remove.
413 * call.c (build_new_method_call): Pass the vtt to subobject
414 constructors and destructors.
415 * class.c (get_vtt_name): Give it external linkage.
416 (build_clone): Handle the magic VTT parameters for clones.
417 (clone_function_decl): Fix typo in comment.
418 (build_vtt): Keep track of the indices in the VTTs where various
419 entities are stored.
420 (build_vtt_inits): Likewise.
421 (dfs_build_vtt_inits): Likewise.
422 (build_ctor_vtbl_group): Tweak type of construction vtables.
423 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
424 primary bases, when building construction vtables.
425 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
426 (initialize_predefined_identifiers): Add vtt_parm_identifier.
427 (init_decl_processing): Initialize vtt_parm_type.
428 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
429 (lang_mark_tree): Make vtt_parm.
430 * decl2.c (build_artificial_parm): New function.
431 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
432 (grokclassfn): Use build_artificial_parm.
433 * init.c (initialize_vtbl_ptrs): Call
434 fixup_all_virtual_upcast_offsets directly.
435 (perform_member_init): Use the complete subobject destructor for
436 member cleanups.
437 (build_vtbl_address): New function.
438 (expand_virtual_init): Handle VTTs.
439 * optimize (maybe_clone_body): Likewise.
440 * search.c (fixup_all_virtual_upcast_offsets): Give it external
441 linkage.
442 (expand_indirect_vtbls_init): Remove.
443 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
444 * tree.c (make_binfo): Make them bigger.
445
446 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
447
448 * inc/cxxabi.h (__pbase_type_info): Define, based on
449 __pointer_type_info.
450 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
451 (__pointer_to_member_type_info): Likewise.
452 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
453 (__pointer_to_member_type_info::__is_pointer_p): Remove.
454 (__pointer_type_info::__do_catch): Rename to ...
455 (__pbase_type_info::__do_catch): ... here. Adjust.
456 (__pbase_type_info::__pointer_catch): Implement.
457 (__pointer_type_info::__pointer_catch): Adjust.
458 (__pointer_to_member_type_info::__pointer_catch): Adjust.
459
460 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
461
462 * tinfo.h (__user_type_info::contained_virtual_p): New
463 predicate.
464 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
465 shaped heirarchy.
466 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
467 diamond shaped heirarchy. Add early out for mixed diamond and
468 duplicate shaped heirarchy.
469
470 2000-05-24 Mark Mitchell <mark@codesourcery.com>
471
472 * cp-tree.h (build_delete): Change prototype.
473 (build_vec_delete): Likewise.
474 * call.c (build_scoped_method_call): Use special_function_kind
475 values to indicate the kind of destruction to be done.
476 (build_method_call): Likewise.
477 * decl.c (finish_destructor_body): Likewise.
478 (maybe_build_cleanup_1): Likewise. Rename to ...
479 (maybe_build_cleanup): ... this.
480 * decl2.c (delete_sanity): Use special_function_kind
481 values to indicate the kind of destruction to be done.
482 (build_cleanup): Likewise.
483 * init.c (perform_member_init): Likewise.
484 (build_vec_delete_1): Likewise.
485 (build_dtor_call): Simplify.
486 (build_delete): Use special_function_kind
487 values to indicate the kind of destruction to be done.
488 (build_vbase_delete): Likewise.
489 (build_vec_delete): Likewise.
490
491 * init.c (sort_member_init): Fix typo in error message generation
492 code.
493
494 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
495
496 * semantics.c (begin_class_definition): make the packed
497 attribute be sensitive to the "-fpack-struct" command line flag
498
499 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
500
501 Update new-abi upcast algorithm.
502 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
503 prototype and meaning of return value.
504 (__si_class_type_info::__do_upcast): Likewise.
505 (__vmi_class_type_info::__do_upcast): Likewise.
506 * tinfo.cc (__class_type_info::__upcast_result): Replace
507 whole2dst with part2dst. Adjust ctor.
508 (__class_type_info::__do_upcast): Adjust call of worker function.
509 (__class_type_info::__do_upcast): Adjust.
510 (__si_class_type_info::__do_upcast): Adjust. Use parent's
511 __do_upcast.
512 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
513 virtual base in diamond heirarchy bug.
514
515 2000-05-23 Mark Mitchell <mark@codesourcery.com>
516
517 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
518 and bitfield to tinfo_fn_p.
519 (DECL_TINFO_FN_P): Adjust.
520 (SET_DECL_TINFO_FN_P): Likewise.
521 (DECL_MUTABLE_P): Likewise.
522 (DECL_C_BIT_FIELD): Likewise.
523 (SET_DECL_C_BIT_FIELD): Likewise.
524 (CLEAR_DECL_C_BIT_FIELD): Likewise.
525 (DECL_UNINLINABLE): Likewise.
526 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
527 (handle_using_decl): Remove assertion.
528 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
529 to build FIELD_DECLs.
530 (build_base_field): Likewise.
531 (layout_class_type): Likewise.
532 * decl.c (init_decl_processing): Likewise.
533 (build_ptrmemfunc_type): Likewise.
534 (grokdeclarator): Likewise.
535 * decl2.c (grok_x_components): Likewise.
536 * except.c (call_eh_info): Likewise.
537 * init.c (init_init_processing): Likewise.
538 * rtti.c (expand_class_desc): Likewise.
539 (create_pseudo_type_info): Likewise.
540 (get_vmi_pseudo_type_info): Likewise.
541 (create_tinfo_types): Likewise.
542 * ptree.c (print_lang_decl): Adjust.
543 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
544 before checking DECL_MUTABLE_P.
545
546 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
547 parameters for template functions.
548 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
549 destructors as well as constructors.
550
551 2000-05-22 Mark Mitchell <mark@codesourcery.com>
552
553 * class.c (build_ctor_vtbl_group): Set inits.
554 * optimize.c (maybe_clone_body): Set DECL_INLINE and
555 DECL_THIS_INLINE appropriately for clones.
556
557 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
558 (DECL_CONV_FN_P): Simplify.
559 (DECL_OPERATOR): Remove.
560 (language_to_string): Declare.
561 * decl.c (duplicate_decls): Fix typo in comment.
562 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
563 (grok_op_properties): Use DECL_CONV_FN_P instead of
564 IDENTIFIER_TYPENAME_P.
565 * dump.c (dequeue_and_dump): Dump the language linkage of
566 declarations.
567 * error.c (language_to_string): Give it external linkage.
568 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
569 (implicitly_declare_fn): Set DECL_LANGUAGE.
570 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
571 IDENTIFIER_TYPENAME_P.
572 (tsubst_decl): Likewise.
573 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
574 * semantics.c (finish_member_declaration): Don't mark members of
575 classes declared in an extern "C" region as extern "C".
576
577 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
578
579 * decl2.c (qualified_lookup_using_namespace): Look through
580 namespace aliases.
581
582 * decl.c (push_using_decl): Return the old decl on namespace level.
583
584 2000-05-21 Mark Mitchell <mark@codesourcery.com>
585
586 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
587 (VTT_NAME_PREFIX): New macro.
588 (CTOR_VTBL_NAME_PREFIX): Likewise.
589 (get_ctor_vtbl_name): New function.
590 * class.c (get_vtable_name): Simplify.
591 (get_vtt_name): New function.
592 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
593 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
594 when a virtual base becomes primary.
595 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
596 VTTs.
597 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
598 additional parameters.
599 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
600 (initialize_array): New function.
601 (build_vtt): Likewise.
602 (build_vtt_inits): Likewise.
603 (dfs_build_vtt_inits): Likewise.
604 (dfs_fixup_binfo_vtbls): Likewise.
605 (build_ctor_vtbl_group): Likewise.
606 (initialize_vtable): Use initialize_array.
607 (accumulate_vtbl_inits): Reimplement to handle construction
608 vtables.
609 (dfs_accumulate_vtbl_inits): Likewise.
610 (bulid_vtbl_initializer): Adjust parameter name.
611 * method.c (build_typename_overload): Remove #if 0'd code.
612 (get_ctor_vtbl_name): New function.
613 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
614 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
615
616 * cp-tree.h (struct lang_type): Remove search_slot.
617 (CLASSTYPE_SEARCH_SLOT): Remove.
618 (emit_base_init): Change prototype.
619 (initialize_vtbl_ptrs): Likewise.
620 (expand_indirect_vtbls_init): Likewise.
621 (clear_search_slots): Remove.
622 * decl.c (lang_mark_tree): Don't mark search_slot.
623 * init.c (initialize_vtbl_ptrs): Simplify.
624 (emit_base_init): Likewise.
625 * search.c (struct vbase_info): Document decl_ptr.
626 (convert_pointer_to_single_level): Remove.
627 (dfs_find_vbases): Remove.
628 (dfs_init_base_pointers): Simplify.
629 (dfs_clear_vbase_slots): Remove.
630 (dfs_vtable_path_unmark): New function.
631 (init_vbase_pointers): Simplify.
632 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
633 (expand_indirect_vtbls_init): Simplify. Don't call
634 mark_all_temps_used.
635 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
636 initialize_vtbl_ptrs.
637
638 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
639
640 * except.c: Add static prototypes.
641
642 2000-05-20 H.J. Lu <hjl@gnu.org>
643
644 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
645
646 2000-05-19 Mark Mitchell <mark@codesourcery.com>
647
648 Don't create a separate copy of virtual bases for the
649 CLASSTYPE_VBASECLASSES list.
650 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
651 (BINFO_FOR_VBASE): Remove.
652 (CANONICAL_BINFO): Adjust.
653 (binfo_for_vbase): New function.
654 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
655 instead of BINFO_FOR_VBASE.
656 (build_vbase_pointer): Likewise.
657 (build_secondary_vtable): Likewise.
658 (dfs_mark_primary_bases): Likewise.
659 (mark_primary_bases): Likewise.
660 (layout_nonempty_base_or_field): Likewise.
661 (dfs_set_offset_for_shared_vbases): Likewise.
662 (dfs_set_offset_for_unshared_vbases): Likewise.
663 (layout_virtual_bases): Likewise. Adjust for changes to the
664 CLASSTYPE_VBASECLASSES list.
665 (dump_class_hierarchy_r): Use binfo_for_vbase
666 instead of BINFO_FOR_VBASE.
667 (dump_class_hierarchy): Likewise.
668 (finish_vtbls): Likewise.
669 (build_vtbl_initializer): Adjust for changes to the
670 CLASSTYPE_VBASECLASSES list.
671 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
672 * decl.c (finish_destructor_body): Adjust for changes to the
673 CLASSTYPE_VBASECLASSES list.
674 * init.c (sort_base_init): Use binfo_for_vbase.
675 (construct_virtual_bases): Adjust for changes to the
676 CLASSTYPE_VBASECLASSES list.
677 (expand_member_init): Use binfo_for_vbase.
678 (build_vbase_delete): Adjust for changes to the
679 CLASSTYPE_VBASECLASSES list.
680 * method.c (do_build_copy_constructor): Likewise.
681 * rtti.c (get_base_offset): Use binfo_for_vbase.
682 (expand_class_desc): Remove #if 0'd code.
683 * search.c (struct vbase_info): Remove vbase_types.
684 (get_base_distance): Use binfo_for_vbase.
685 (lookup_field_queue_p): Use CANONICAL_BINFO.
686 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
687 (get_pure_virtuals): Adjust for changes to the
688 CLASSTYPE_VBASECLASSES list.
689 (dfs_find_vbases): Use binfo_for_vbase.
690 (dfs_init_vbase_pointers): Likewise.
691 (init_vbase_pointers): Don't initialize vi.vbase_types.
692 (virtual_context): Use binfo_for_vbase.
693 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
694 CLASSTYPE_VBASECLASSES list.
695 (expand_indirect_vtbls_init): Simplify.
696 (dfs_get_vbase_types): Don't replicate virtual bases.
697 (find_vbase_instance): Use binfo_for_vbase.
698 (binfo_for_vbase): New function.
699 * typeck.c (get_delta_difference): Use binfo_for_vbase.
700
701 2000-05-17 Mark Mitchell <mark@codesourcery.com>
702
703 * decl2.c (finish_anon_union): Generalize error messages to handle
704 anonymous structures.
705 * init.c (perform_member_init): Remove `name' parameter.
706 (build_field_list): New function.
707 (sort_member_init): Handle anonymous union initialization order
708 correctly. Check for multiple initializations of the same union.
709 (emit_base_init): Don't look up fields by name here.
710 (expand_member_init): Record the result of name lookup for future
711 reference.
712 * typeck.c (build_component_ref): Fix formatting.
713
714 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
715
716 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
717 * typeck.c (build_x_compound_expr): Replace warn_unused with
718 warn_unused_value.
719
720 * decl2.c (lang_decode_option): Update -Wall unused flags by
721 calling set_Wunused.
722
723 2000-05-16 Mark Mitchell <mark@codesourcery.com>
724
725 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
726 * init.c (dfs_vtable_path_unmark): Remove.
727 * search.c (marked_new_vtable_p): Likewise.
728 (unmarked_new_vtable_p): Likewise.
729 (dfs_search_slot_nonempty_p): Likewise.
730 (dfs_mark): Likewise.
731 (dfs_vtable_path_unmark): Likewise.
732 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
733 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
734 (dfs_init_vbase_pointers): Remove special-case new ABI code.
735 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
736 (init_vbase_pointers): Simplify.
737 (expand_indirect_vtbls_init): Likewise.
738
739 * class.c (copy_virtuals): New function.
740 (build_primary_table): Use it.
741 (build_secondary_vtable): Likewise.
742 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
743 indicate that no vcall offset is required.
744 (add_virtual_function): Likewise.
745 (modify_all_vtables): Likewise.
746 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
747 (dfs_accumulate_vtbl_inits): Likewise.
748 (build_vtbl_initializer): Make changes to handle construction
749 vtables.
750 (dfs_build_vcall_offset_vtbl_entries): Likewise.
751 (build_rtti_vtbl_entries): Likewise.
752 (build_vtable_entries): Handle a NULL vcall_index.
753
754 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
755
756 * decl2.c (lang_decode_option): Fix thinko.
757
758 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
759
760 * except.c (check_handlers): New fn.
761 * cp-tree.h: Declare it.
762 * semantics.c (finish_handler_sequence): Call it.
763 (finish_function_handler_sequence): Likewise.
764 (finish_handler_parms): Set TREE_TYPE on the handler.
765 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
766 * search.c (get_base_distance_recursive): If protect>1, ignore
767 special access.
768 (get_base_distance): Don't reduce watch_access.
769
770 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
771
772 * lex.c: #include diagnostic.h.
773 (lang_init_options): Set default prefixing rules.
774
775 * lang-options.h: Add -fdiagnostics-show-location=.
776
777 * decl2.c: #include diagnostic.h.
778 (lang_decode_option): Handle -fdiagnostics-show-location=.
779
780 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
781
782 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
783 * vec.cc: Revert my 2000-05-07 change.
784
785 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
786
787 * class.c (check_field_decls): Complain about non-static data
788 members with same name as class in class with constructor.
789
790 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
791
792 * decl.c (grokdeclarator): Allow non-static data members with
793 same name as class.
794
795 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
796
797 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
798 and pending_inline.filename. Update prototypes.
799 * decl.c (define_label): Constify filename parameter.
800 * decl2.c (warn_if_unknown_interface): Constify local char *.
801 * input.c Constify input_source.filename. Don't declare
802 input_filename or lineno. Constify filename parameter to feed_input.
803 * lex.c (init_parse): Constify parameter and return value.
804 (cp_pragma_interface, cp_pragma_implementation): Constify
805 filename argument.
806 (reinit_parse_for_method, reinit_parse_for_block,
807 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
808 Constify local char *.
809 * pt.c: Don't declare lineno or input_filename.
810 (print_template_context, tsubst_friend_function, tsubst_decl,
811 tsubst, instantiate_decl): Constify local char *.
812 * semantics.c (expand_body): Constify local char *.
813 * tree.c (build_srcloc): Constify filename parameter.
814 * typeck.c (c_expand_asm_operands): Constify filename
815 parameter.
816
817 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
818
819 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
820 offsetof expansion.
821
822 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
823
824 * inc/cxxabi.h: Fix typos in comment.
825 (__base_class_info::__offset): Use a static_cast.
826
827 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
828
829 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
830 of std::size_t and std::ptrdiff_t respectively.
831 * tinfo.cc: Likewise.
832 * vec.cc: Likewise.
833
834 2000-05-06 Richard Henderson <rth@cygnus.com>
835
836 * typeck.c (build_c_cast): Don't warn integer->pointer size
837 mismatch for constants.
838
839 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
840
841 * rtti.c (ptmd_initializer): Set non-public, if class is
842 incomplete.
843
844 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
845 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
846 __cxa_vec_delete): Likewise.
847 * tinfo.cc (__dynamic_cast): Likewise.
848 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
849 __cxa_vec_delete): Likewise.
850
851 2000-05-04 Mark Mitchell <mark@codesourcery.com>
852
853 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
854 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
855 (lang_decl_flags): Add vcall_offset.
856 (THUNK_VCALL_OFFSET): Use it.
857 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
858 * method.c (make_thunk): Create the lang_decl here, not in
859 emit_thunk.
860 (emit_thunk): Make generic thunks into ordinary functions once
861 they have been fed to expand_body.
862 * semantics.c (expand_body): Set current_function_is_thunk here.
863
864 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
865
866 * class.c (update_vtable_entry_for_fn): Prototype.
867
868 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
869 and `tmpl'.
870
871 * search.c (dfs_build_inheritance_graph_order): Prototype.
872
873 2000-05-04 Mark Mitchell <mark@codesourcery.com>
874
875 * cp-tree.h (special_function_kind): Add various kinds of
876 destructors.
877 (special_function_p): New function.
878 * class.c (overrides): Don't let one kind of destructor override
879 another.
880 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
881 whether or not to instantiate a template.
882 * tree.c (special_function_p): Define.
883
884 2000-05-03 Mark Mitchell <mark@codesourcery.com>
885
886 * cp-tree.def (THUNK_DECL): Remove.
887 * cp-tree.h (DECL_THUNK_P): New macro.
888 (DECL_NON_THUNK_FUNCTION_P): Likewise.
889 (DECL_EXTERN_C_FUNCTION_P): Likewise.
890 (SET_DECL_THUNK_P): Likewise.
891 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
892 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
893 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
894 * decl.c (decls_match): Use DECL_EXTERN_C_P.
895 (duplicate_decls): Likewise.
896 (pushdecl): Likewise. Adjust thunk handling.
897 (grokfndecl): Use DECL_EXTERN_C_P.
898 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
899 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
900 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
901 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
902 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
903 DECL_NO_STATIC_CHAIN.
904 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
905 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
906 * search.c (covariant_return_p): Remove THUNK_DECL handling.
907 * ir.texi: Update.
908
909 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
910
911 * tree.c (walk_tree): Set lineno.
912
913 2000-05-01 Mark Mitchell <mark@codesourcery.com>
914
915 * exception.cc: Update license notice.
916 * new.cc: Likewise.
917 * new1.cc: Likewise.
918 * new2.cc: Likewise.
919 * tinfo.cc: Likewise.
920 * tinfo2.cc: Likewise.
921 * vec.cc: Likewise.
922 * inc/cxxabi.h: Likewise.
923 * inc/exception: Likewise.
924 * inc/new: Likewise.
925 * inc/new.h: Likewise.
926 * inc/typeinfo: Likewise.
927
928 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
929
930 * tree.c (build_target_expr_with_type): If we already have a
931 TARGET_EXPR, just return it.
932
933 * optimize.c (initialize_inlined_parameters): Don't generate an
934 EXPR_STMT if we can just use DECL_INITIAL.
935 * decl.c (emit_local_var): Only make the initialization a
936 full-expression if stmts_are_full_exprs_p.
937
938 2000-05-01 Mark Mitchell <mark@codesourcery.com>
939
940 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
941 macro.
942 * call.c (standard_conversion): Use it.
943 (direct_reference_binding): Likewise.
944 (build_over_call): Likewise.
945 (is_properly_derived_from): Likewise.
946 (compare_ics): Likewise.
947 * class.c (resolves_to_fixed_type_p): Likewise.
948 * optimize.c (declare_return_variable): Likewise.
949 * pt.c (is_specialization_of): Likewise.
950 (unify): Likewise.
951 * typeck.c (comp_target_parms): Likeiwse.
952 (build_static_cast): Likewise.
953 (build_reinterpret_cast): Likewise.
954 (build_const_cast): Likewise.
955 (comp_ptr_ttypes_real): Likewise.
956 (comp_ptr_ttypes_const): Likewise.
957 * typeck2.c (process_init_constructor): Likewise.
958
959 2000-04-30 Scott Snyder <snyder@fnal.gov>
960
961 * decl.c (finish_destructor_body): Use the base destructor when
962 destroying virtual bases.
963
964 2000-04-30 Mark Mitchell <mark@codesourcery.com>
965
966 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
967 STMT_EXPRs.
968 * optimize.c (struct inline_data): Add target_exprs field.
969 (declare_return_variable): When a function returns an aggregate,
970 use the variable declared in the TARGET_EXPR as the remapped
971 DECL_RESULT.
972 (expand_call_inline): Update the pending target_exprs stack.
973 (optimize_function): Initialize the stack.
974
975 * decl2.c (finish_file): Fix typo in comment.
976
977 * method.c (emit_thunk): Don't try to return a `void' value.
978
979 * optimize.c (initialize_inlined_parameters): If the parameter is
980 addressable, we need to make a new VAR_DECL, even if the
981 initializer is constant.
982
983 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
984
985 * decl.c (grok_op_properties): Add an extra check of argtypes.
986
987 2000-04-27 Mark Mitchell <mark@codesourcery.com>
988
989 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
990 variables.
991 (initialize_inlined_parameters): Try to avoid creating new
992 VAR_DECLs.
993
994 2000-04-27 Alex Samuel <samuel@codesourcery.com>
995
996 * lex.c (my_get_run_time): Remove.
997 (init_filename_times): Use get_run_time instead of my_get_run_time.
998 (check_newline): Likewise.
999 (dump_time_statistics): Likewise.
1000 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
1001 of computing elapsed time explicitly.
1002
1003 2000-04-26 Mark Mitchell <mark@codesourcery.com>
1004
1005 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1006 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1007 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1008 before calling decl_constant_value.
1009 * class.c (check_bitfield_decl): Likewise.
1010 * cvt.c (ocp_convert): Likewise.
1011 (convert): Likewise.
1012 * decl.c (compute_array_index_type): Likewise.
1013 (build_enumerator): Likewise.
1014 * decl2.c (check_cp_case_value): Likewise.
1015 * pt.c (convert_nontype_argument): Likewise.
1016 (tsubst): Likewise.
1017 * typeck.c (decay_conversion): Likewise.
1018 (build_compound_expr): Likewise.
1019 (build_reinterpret_cast): Likewise.
1020 (build_c_cast): Likewise.
1021 (convert_for_assignment): Likewise.
1022
1023 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
1024
1025 * decl.c (finish_function): Don't play games with DECL_INLINE.
1026
1027 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
1028
1029 * ir.texi: Correct typo.
1030
1031 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1032
1033 * decl.c (grokdeclarator): Reject VLAs as members.
1034
1035 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
1036
1037 * call.c (standard_conversion): Accept conversion between
1038 COMPLEX_TYPEs.
1039
1040 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1041
1042 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
1043
1044 * decl2.c (finish_file): Remove double setup for accounting
1045 compile time.
1046
1047 2000-04-24 Robert Lipe <robertlipe@usa.net>
1048
1049 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1050
1051 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
1052
1053 * new.cc (set_new_handler): Needs to be in std::.
1054
1055 2000-04-23 Mark Mitchell <mark@codesourcery.com>
1056
1057 * cp-tree.h (lang_decl): Remove pretty_function_p.
1058 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1059 language-specific node.
1060 * decl.c (cp_make_fname_decl): Use build_decl, not
1061 build_lang_decl, to build the variables.
1062 (grokvardecl): Don't call build_lang_decl for local variables in
1063 templates.
1064 (grokdeclarator): Don't call build_lang_decl for local type
1065 declarations in templates.
1066 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1067 zero'd memory, rather than calling memset.
1068 * pt.c: Include hashtab.h.
1069 (local_specializations): New variable.
1070 (retrieve_local_specialization): Use it.
1071 (register_local_specialization): Likewise.
1072 (tsubst_decl): Don't assume local variables have
1073 DECL_LANG_SPECIFIC.
1074 (instantiate_decl): Set up local_specializations.
1075 * Makefile.in (HTAB_H): New variable.
1076
1077 2000-04-23 Richard Henderson <rth@cygnus.com>
1078
1079 * typeck.c (c_expand_asm_operands): Restore the original
1080 contents of the output list.
1081
1082 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
1083
1084 * ir.texi: Document complex number representation.
1085
1086 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
1087
1088 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1089 (target_incomplete_p): New function.
1090 (tinfo_base_init): Create comdat NTBS name variable.
1091 (ptr_initializer): Add non_public parameter. Calculate it.
1092 (ptmd_initializer): Likewise.
1093 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1094 (create_real_tinfo_var): Add non_public parameter. Use it.
1095 Push proxy into global namespace.
1096 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1097 New enumeration.
1098 * inc/typeinfo (type_info::before, type_info::operator==):
1099 Compare __name addresses.
1100
1101 * tinfo2.cc: Remove new-abi builtins comment.
1102
1103 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
1104
1105 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1106
1107 * call.c (joust): Exit early if we get the same function, too.
1108
1109 * decl2.c (key_method): Return NULL_TREE for template classes.
1110 (import_export_class): Don't need to check for template classes.
1111
1112 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
1113
1114 * lex.c: Remove references to cccp.c.
1115
1116 2000-04-18 Mark Mitchell <mark@codesourcery.com>
1117
1118 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1119 volatile_memfunc. Add destructor_attr. Adjust dummy.
1120 (DECL_DESTRUCTOR_P): Use destructor_attr.
1121 (DECL_CONST_MEMFUNC_P): Reimplement.
1122 (DECL_VOLATILE_MEMFUNC_P): Remove.
1123 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1124 (overrides): Use DECL_DESTRUCTOR_P.
1125 (check_for_override): Likewise.
1126 * decl.c (start_function): Likewise.
1127 * decl2.c (grokfclassfn): Likewise.
1128 (check_classfn): Likewise.
1129 (grok_function_init): Likewise.
1130
1131 2000-04-17 Mark Mitchell <mark@codesourcery.com>
1132
1133 * decl2.c (grokfield): Issue error on illegal data member
1134 declaration.
1135
1136 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
1137
1138 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1139
1140 2000-04-16 Mark Mitchell <mark@codesourcery.com>
1141
1142 * class.c (build_vtable_entry): Don't build thunks for type-info
1143 functions.
1144
1145 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
1146
1147 * decl.c (decls_match): Allow a redeclaration of a builtin to
1148 specify args while the builtin did not.
1149
1150 2000-04-15 Mark Mitchell <mark@codesourcery.com>
1151
1152 * cp-tree.def (THUNK_DECL): Add to documentation.
1153 * cp-tree.h (flag_huge_objects): Declare.
1154 * class.c (modify_vtable_entry): Tidy.
1155 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1156 Calculate delta appropriately for the new ABI.
1157 (dfs_modify_vtables): Use it.
1158 (modify_all_vtables): Fix thinko in code to add overriding copies
1159 of functions to primary vtables.
1160 (build_clone): Fix typo in comment.
1161 (clone_function_decl): Correct order of destructors in vtable.
1162 (build_vbase_offset_vtbl_entries): Adjust comment.
1163 (dfs_vcall_offset_queue_p): Remove.
1164 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1165 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1166 (build_vtable_entry): Correct check for pure virtual functions.
1167 Don't declare flag_huge_objects.
1168 * decl.c (flag_huge_objects): Remove declaration.
1169 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1170 Use int_size_in_bytes.
1171 (emit_thunk): Handle vcall offset thunks.
1172
1173 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1174
1175 * decl2.c (parse_time, varconst_time): Delete declarations.
1176 (finish_file): Delete LINENO declaration.
1177 START_TIME and THIS_TIME now long.
1178
1179 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
1180
1181 * class.c (build_base_field): Reformat comment.
1182
1183 * inc/cxxabi.h (stddef.h): Comment inclusion.
1184 (__base_class_info::__offset): Comment shift.
1185
1186 2000-04-12 Mark Mitchell <mark@codesourcery.com>
1187
1188 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1189 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1190 (cp_push_exception_identifier): New macro.
1191 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1192 (DECL_BASE_DESTRUCTOR_P): Likewise.
1193 (DECL_DELETING_DESTRUCTOR_P): Likewise.
1194 (get_vtbl_decl_for_binfo): Fix formatting.
1195 (in_charge_arg_for_name): New macro.
1196 (maybe_build_cleanup_and_delete): Remove declaration.
1197 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1198 (in_charge_arg_for_name): New function.
1199 (build_new_method_call): Use it. Handle cloned destructors.
1200 (build_clone): Don't make the base constructor virtual.
1201 Automatically defer generated functions.
1202 (clone_function_decl): Handle destructors, too.
1203 (clone_constructors_and_destructors): Likewise.
1204 (create_vtable_ptr): Don't create a vtable entry for a cloned
1205 function.
1206 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1207 (initialize_predefined_identifiers): Update appropriately.
1208 (finish_destructor_body): Simplify.
1209 (maybe_build_cleanup_and_delete): Remove.
1210 * except.c (expand_throw): Handle new-ABI destructors.
1211 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1212 (build_dtor_call): New function.
1213 (build_delete): Use it. Simplify.
1214 * optimize.c (maybe_clone_body): Handle destructors.
1215 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1216
1217 * exception.cc (cleanup_fn): New typedef.
1218 (CALL_CLEANUP): New macro.
1219 (cp_eh_info): Use them.
1220 (__cp_push_exception): Likewise.
1221 (__cp_pop_exception): Likewise.
1222
1223 2000-04-11 Mark Mitchell <mark@codesourcery.com>
1224
1225 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1226 (complete_dtor_identifier): New macro.
1227 (CLASSTYPE_FIRST_CONVERSION): Remove.
1228 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1229 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1230 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1231 (CLASSTYPE_CONSTRUCTORS): Likewise.
1232 (CLASSTYPE_DESTRUCTORS): Likewise.
1233 (lang_decl): Add cloned_function.
1234 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1235 (DECL_BASE_CONSTRUCTOR_P): Likewise.
1236 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1237 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1238 (DECL_CLONED_FUNCTION_P): Likewise.
1239 (DECL_CLONED_FUNCTION): Likewise.
1240 (clone_function_decl): Declare.
1241 (maybe_clone_body): Likewise.
1242 * call.c (build_user_type_conversion_1): Call complete object
1243 constructors in the new ABI.
1244 (build_new_method_call): Don't add in-charge parameters under the
1245 new ABI.
1246 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1247 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1248 CLASSTYPE_DESTRUCTOR_SLOT.
1249 (build_clone): New function.
1250 (clone_function_decl): Likewise.
1251 (clone_constructors_and_destructors): Likewise.
1252 (check_bases_and_members): Use it.
1253 * decl.c (iniitialize_predefined_identifiers): Initialize
1254 complete_dtor_identifier.
1255 (finish_function): Don't add extra code to a clone.
1256 (lang_mark_tree): Mark cloned_function.
1257 * decl2.c (mark_used): Don't bother trying to instantiate things
1258 we synthesized.
1259 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1260 * method.c (set_mangled_name_for_decl): Don't treat clones as
1261 constructors.
1262 (synthesize_method): Sythesize cloned functions, not the clones.
1263 * optimize.c (inline_data): Update comment on ret_label.
1264 (remap_block): Don't assume DECL_INITIAL exists.
1265 (copy_body_r): Allow ret_label to be NULL.
1266 (maybe_clone_body): Define.
1267 * pt.c (tsubst_decl): Handle clones.
1268 (instantiate_clone): New function.
1269 (instantiate_template): Use it.
1270 (set_mangled_name_for_template_decl): Don't treat clones as
1271 constructors.
1272 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1273 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1274 * semantics.c (expand_body): Clone function bodies as necessary.
1275
1276 * optimize.c (remap_decl): Avoid sharing structure for arrays
1277 whose size is only known at run-time.
1278 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1279
1280 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1281 to has_in_charge_parm_p.
1282 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1283 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1284 (DECL_COPY_CONSTRUCTOR_P): New macro.
1285 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1286 (build_user_type_conversion_1): Likewise.
1287 (convert_like_real): Likewise.
1288 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
1289 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1290 (copy_args_p): Likewise.
1291 (grok_ctor_properties): Likewise.
1292 (start_function): Likewise.
1293 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
1294 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1295 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1296 * method.c (do_build_copy_constructor): Use
1297 DECL_HAS_IN_CHARGE_PARM_P.
1298 (synthesize_method): Likewise.
1299 * pt.c (instantiate_template): Remove goto.
1300 * tree.c (build_cplus_method_type): Remove mention of obstacks in
1301 comment.
1302
1303 * cp-tre.h (finish_function): Change prototype.
1304 * decl.c (end_cleanup_fn): Adjust caller.
1305 (finish_function): Take only one parameter.
1306 * decl2.c (finish_objects): Adjust caller.
1307 (finish_static_storage_duration_function): Likewise.
1308 * method.c (emit_thunk): Likewise.
1309 * parse.y: Likewise.
1310 * parse.c: Regenerated.
1311 * pt.c (instantiate_decl): Likewise.
1312 * rtti.c (synthesize_tinfo_fn): Likewise.
1313 * semantics.c (expand_body): Likewise.
1314
1315 * cp-tree.h (copy_decl): New function.
1316 * class.c (finish_struct_1): Use it.
1317 * lex.c (copy_decl): Define it.
1318 * pt.c (tsubst_decl): Likewise.
1319 * tree.c (copy_template_template_parm): Likewise.
1320
1321 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1322 has_nonpublic_assign_ref.
1323 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1324 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1325 * class.c (finish_struct_methods): Don't set
1326 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1327 (interface_only): Don't declare.
1328 (interface_unknown): Likewise.
1329
1330 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1331
1332 * tree.h (HAVE_TEMPLATES): Remove definition.
1333 * lang-options.h (-fthis-is-variable): Remove documentation.
1334
1335 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
1336
1337 * class.c (instantiate_type): Handle object-relative template-id.
1338
1339 * semantics.c (finish_expr_stmt): Call convert_to_void here.
1340 * decl.c (cplus_expand_expr_stmt): Not here.
1341
1342 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1343 Initialize exprtype earlier.
1344
1345 * parse.y (fn.def1): Check for defining types in return types.
1346
1347 * decl.c (check_tag_decl): Notice extra fundamental types.
1348 Diagnose empty decls in classes, too.
1349
1350 * decl.c (grokdeclarator): Don't override an anonymous name if no
1351 declarator was given.
1352
1353 * cvt.c (convert_to_void): Call resolve_offset_ref.
1354
1355 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1356
1357 * decl2.c (decl_namespace): Handle getting a type.
1358
1359 * typeck.c (build_c_cast): Re-enable warning for cast between
1360 pointer and integer of different size.
1361
1362 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
1363
1364 * inc/cxxabi.h (__pointer_type_info): Add restrict and
1365 incomplete flags.
1366 (__pointer_type_info::__pointer_catch): New virtual function.
1367 (__pointer_to_member_type_info): Derive from
1368 __pointer_type_info. Adjust.
1369 (__pointer_to_member_type_info::__do_catch): Remove.
1370 (__pointer_to_member_type_info::__is_pointer_p): Declare.
1371 (__pointer_to_member_type_info::__pointer_catch): Declare.
1372 * rtti.c (qualifier_flags): Add restrict flag.
1373 (ptmd_initializer): Reorder members.
1374 (create_tinfo_types): Expand comments. Reorder
1375 ptmd_desc_type_node members.
1376 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1377 Implement.
1378 (__pointer_type_info::__do_catch): Move specific code into
1379 __pointer_catch. Call it.
1380 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1381 specific catch checking. Fix void conversion check.
1382 (__pointer_to_member_type_info::__do_catch): Remove.
1383 (__pointer_to_member_type_info::__pointer_catch): Implement.
1384
1385 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1386
1387 * lex.c (init_parse): Remove traces of classof and headof.
1388 * decl2.c (flag_operator_names): Default to 1.
1389 (lang_decode_option): Do not set it for -ansi.
1390
1391 2000-04-09 Mark Mitchell <mark@codesourcery.com>
1392
1393 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1394 (DECL_MAIN_VARIANT): Remove.
1395 * decl.c (duplicate_decls): Don't set it.
1396 (start_function): Likewise.
1397 (lang_mark_tree): Don't mark it.
1398 * decl2.c (defer_fn): Don't use it.
1399 * lex.c (retrofit_lang_decl): Don't set it.
1400 * pt.c (tsubst_decl): Likewise.
1401 * ptree.c (print_lang_decl): Don't print it.
1402 * typeck.c (mark_addressable): Don't use it.
1403
1404 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1405
1406 * vec.cc: Include <new> and <exception>.
1407 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1408 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1409 terminate.
1410 (__cxa_vec_delete): Catch dtor exceptions.
1411
1412 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1413
1414 Prepend __ to implementation defined names.
1415 * inc/typeinfo (type_info): Rename _name to __name.
1416 (type_info::type_info): Rename parameter.
1417 (type_info::operator==, type_info::operator!=,
1418 type_info::before): Likewise.
1419 (type_info::is_pointer_p, type_info::is_function_p,
1420 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1421 parameters.
1422 * inc/cxxabi.h
1423 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1424 (__pointer_type_info::__pointer_type_info): Likewise.
1425 (__pointer_type_info::is_pointer_p,
1426 __pointer_type_info::do_catch): Prepend __. Rename parameters.
1427 (__array_type_info::__array_type_info): Rename parameters.
1428 (__function_type_info::__function_type_info): Likewise.
1429 (__function_type_info::is_function_p): Prepend __.
1430 (__enum_type_info::__enum_type_info): Rename parameters.
1431 (__pointer_to_member_type_info::__pointer_to_member_type_info):
1432 Likewise.
1433 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1434 parameters.
1435 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1436 (__class_type_info::__class_type_info): Rename parameters.
1437 (__class_type_info::sub_kind): Prepend __. Adjust member names.
1438 (__class_type_info::upcast_result,
1439 __class_type_info::dyncast_result): Prepend __. Move definition
1440 into tinfo.cc.
1441 (__class_type_info::do_upcast, __class_type_info::do_catch,
1442 __class_type_info::find_public_src,
1443 __class_type_info::do_dyncast,
1444 __class_type_info::do_find_public_src): Prepend __. Rename
1445 parameters.
1446 (__si_class_type_info::__si_class_type_info): Rename parameters.
1447 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1448 __si_class_type_info::do_find_public_src): Prepent __. Rename
1449 parameters.
1450 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1451 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1452 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1453 parameters.
1454 (__dynamic_cast): Rename parameters.
1455 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1456 type_info::do_catch, type_info::do_upcast): Prepend __.
1457 (contained_p, public_p, virtual_p, contained_public_p,
1458 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1459 (__class_type_info::do_catch,
1460 __class_type_info::do_upcast): Prepend __. Adjust.
1461 (__class_type_info::__upcast_result,
1462 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1463 Adjust.
1464 (__class_type_info::find_public_src): Prepend __. Adjust.
1465 (__class_type_info::do_find_public_src,
1466 __si_class_type_info::do_find_public_src,
1467 __vmi_class_type_info::do_find_public_src): Likewise.
1468 (__class_type_info::do_dyncast,
1469 __si_class_type_info::do_dyncast,
1470 __vmi_class_type_info::do_dyncast): Likewise.
1471 (__class_type_info::do_upcast,
1472 __si_class_type_info::do_upcast,
1473 __vmi_class_type_info::do_upcast): Likewise.
1474 (__dynamic_cast): Adjust.
1475 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1476 (__function_type_info::is_function_p): Likewise.
1477 (__pointer_type_info::do_catch): Likewise. Adjust.
1478 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1479 (__throw_type_match_rtti_2): Adjust.
1480 (__is_pointer): Adjust.
1481
1482 2000-04-08 Mark Mitchell <mark@codesourcery.com>
1483
1484 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1485 (complete_ctor_identifier): New macro.
1486 (special_function_kind): Add sfk_copy_constructor and
1487 sfk_assignment_operator.
1488 (LOOKUP_HAS_IN_CHARGE): Remove.
1489 (cons_up_default_function): Rename to ...
1490 (implicitly_declare_fn): ... this.
1491 * call.c (build_new_method_call): Add in-charge parameters for
1492 constructors here.
1493 * class.c (add_implicitly_declared_members): Change parameter name
1494 from cant_have_assignment to cant_have_const_assignment.
1495 Replace calls to cons_up_default_function to implicitly_declare_fn.
1496 * cvt.c (ocp_convert): Use complete_ctor_identifier.
1497 * decl.c (initialize_predefined_identifiers): Initialize it.
1498 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1499 complex expression.
1500 * init.c (expand_default_init): Don't calculate the in-charge
1501 parameter here.
1502 (build_new_1): Likewise.
1503 * lex.c (cons_up_default_function): Move to method.c.
1504 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1505 (implicitly_declare_fn): New function.
1506 * typeck.c (build_static_cast): Use complete_ctor_identifier.
1507 (build_modify_expr): Likewise.
1508 * typeck2.c (build_functional_cast): Likewise.
1509
1510 Under the new ABI, constructors don't return `this'.
1511 * cp-tree.h (warn_reorder): Declare.
1512 (special_function_kind): New enum.
1513 (global_base_init_list): Remove declaration.
1514 (emit_base_init): Don't return a value.
1515 (check_base_init): Don't declare.
1516 (is_aggr_typedef): Likewise.
1517 * decl.c (check_special_function_return_type): New function.
1518 (return_types): Remove.
1519 (grokdeclarator): Use check_special_function_return_type.
1520 (start_function): Don't initialize ctor_label under the new ABI.
1521 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1522 * init.c (begin_init_stmts): Move to top of file.
1523 (finish_init_stmts): Likewise.
1524 (warn_reorder): Don't declare.
1525 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
1526 value.
1527 (check_base_init): Remove.
1528 (is_aggr_typedef): Likewise.
1529 (build_new_1): Don't use the return value of a constructor.
1530 * semantics.c (setup_vtbl_ptr): Don't use the return value
1531 of emit_base_init.
1532 * typeck.c (check_return_expr): Don't magically convert return
1533 statements into `return this' in constructors under the new ABI.
1534
1535 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1536 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1537 (base_ctor_identifier): New macro.
1538 (base_dtor_identifier): Likewise.
1539 (deleting_dtor_identifier): Likewise.
1540 * decl.c: Don't include obstack.h.
1541 (obstack_chunk_alloc): Don't define.
1542 (obstack_chunk_free): Likewise.
1543 (struct predefined_identifier): New type.
1544 (initialize_predefined_identifiers): New function.
1545 (init_decl_processing): Use it.
1546 (debug_temp_inits): Remove.
1547 (start_method): Don't call preserve_data.
1548 (hack_incomplete_structures): Update comment.
1549 * init.c (init_init_processing): Don't initialize
1550 nelts_identifier.
1551 (build_offset_rf): Remove dead code.
1552 (build_delete): Use CLASSTYPE_N_BASECLASSES.
1553 * search.c (init_search_processing): Don't initialize
1554 vptr_identifier.
1555
1556 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1557
1558 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1559 some sign_compare warnings.
1560
1561 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1562
1563 Rename abi::__vmi_class_type_info members.
1564 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
1565 base_list, detail_masks members to vmi_flags, vmi_base_count,
1566 vmi_bases and vmi_flags_masks respectively.
1567 (__vmi_class_type_info::vmi_flags_masks): Rename
1568 details_unknown_mask to flags_unknown_mask.
1569 * tinfo.cc (__class_type_info::do_upcast): Adjust.
1570 (__vmi_class_type_info::do_find_public_src): Adjust.
1571 (__vmi_class_type_info::do_dyncast): Adjust.
1572 (__vmi_class_type_info::do_upcast): Adjust.
1573
1574 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1575
1576 * tinfo.cc (convert_to_base): New function.
1577 (get_vbase_offset): Remove. Move into convert_to_base.
1578 (__vmi_class_type_info::do_find_public_src): Adjust.
1579 (__vmi_class_type_info::do_dyncast): Adjust.
1580 (__vmi_class_type_info::do_upcast): Adjust.
1581
1582 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
1583
1584 * tinfo.cc (operator=): Use __builtin_strcmp.
1585 * tinfo2.cc (before): Likewise.
1586
1587 2000-04-06 Mark Mitchell <mark@codesourcery.com>
1588
1589 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
1590 (DECL_SAVED_INLINE): Rename to ...
1591 (DECL_DEFERRED_FN): ... this.
1592 (in_function_p): Remove declaration.
1593 (mark_inline_for_output): Rename to ...
1594 (defer_fn): ... this.
1595 * decl.c (finish_function): Adjust call to mark_inline_for_output.
1596 (in_function_p): Remove definition.
1597 * decl2.c (saved_inlines): Rename to ...
1598 (deferred_fns): ... this.
1599 (saved_inlines_used): Rename to ...
1600 (deferred_fns_used): ... this.
1601 (mark_inline_for_output): Rename to ...
1602 (defer_fn): ... this.
1603 (finish_file): Adjust accordingly.
1604 (init_decl2): Likewise.
1605 * lex.c (cons_up_default_function): Likewise.
1606 * pt.c (mark_decl_instantiated): Likewise.
1607 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
1608 circumstances.
1609 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
1610 * semantics.c (expand_body): Defer more functions.
1611
1612 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1613
1614 * vec.cc: New file.
1615 * Make-lang.in (CXX_LIB2FUNCS): Add it.
1616 (vec.o): Build it.
1617 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1618 __cxa_vec_delete): Declare.
1619
1620 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1621
1622 * rtti.c (dfs_class_hint_mark): New static function.
1623 (dfs_class_hint_unmark): New static function.
1624 (class_hint_flags): Use them.
1625
1626 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
1627
1628 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
1629
1630 2000-04-05 Mark Mitchell <mark@codesourcery.com>
1631
1632 * cp-tree.h (instantiate_decl): Change prototype.
1633 * decl2.c (mark_used): Adjust call.
1634 * optimize.c (inlinable_function_p): Adjust handling of templates.
1635 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
1636 (do_type_instantiation): Likewise.
1637 (instantiate_decl): Defer more templates.
1638 (instantiate_pending_templates): Adjust logic to handle inline
1639 friend functions.
1640
1641 * Makefile.in (GGC_H): New variable. Use it throughout in place
1642 of ggc.h.
1643
1644 * call.c: Don't include obstack.h. Include ggc.h.
1645 (obstack_chunk_alloc): Don't define.
1646 (obstack_chunk_free): Likewise.
1647 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1648 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1649 (pop_switch): Free it.
1650
1651 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1652
1653 * dump.c (dequeue_and_dump): Don't try to print the bit_position
1654 if we don't have a DECL_FIELD_OFFSET.
1655
1656 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
1657
1658 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1659 special_function_p.
1660
1661 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1662
1663 * cfns.gperf (hash, libc_name_p): Prototype.
1664
1665 * rtti.c (build_dynamic_cast_1): Constification.
1666
1667 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1668
1669 * semantics.c (deferred_type_access_control): Prototype.
1670
1671 2000-04-04 Mark Mitchell <mark@codesourcery.com>
1672
1673 Correct many new ABI issues regarding vbase and vcall offset
1674 layout.
1675 * cp-tree.h (BINFO_VTABLE): Document.
1676 (struct lang_type): Tweak formatting.
1677 (BINFO_PRIMARY_BINFO): Add to documentation.
1678 (CLASSTYPE_VSIZE): Fix typo in comment.
1679 (CLASSTYPE_VBASECLASSES): Update documentation.
1680 (BINFO_VBASE_MARKED): Remove.
1681 (SET_BINFO_VBASE_MARKED): Likewise.
1682 (CLEAR_BINFO_VBASE_MARKED): Likewise.
1683 (BINFO_FIELDS_MARKED): Remove.
1684 (SET_BINFO_FIELDS_MARKED): Likewise.
1685 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1686 (enum access_kind): New enumeration.
1687 (num_extra_vtbl_entries): Remove declaration.
1688 (size_extra_vtbl_entries): Likewise.
1689 (get_vtbl_decl_for_binfo): New function.
1690 (dfs_vbase_unmark): Remove declaration.
1691 (mark_primary_bases): Likewise.
1692 * class.c (SAME_FN): Remove.
1693 (struct vcall_offset_data_s): Move definition.
1694 (build_vbase_pointer): Use `build', not `build_binary_op', to
1695 access the vbase pointer under the new ABI.
1696 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1697 (build_primary_vtable): Likewise.
1698 (dfs_mark_primary_bases): Move here from search.c.
1699 (mark_primary_bases): Likewise.
1700 (determine_primary_bases): Under the new ABI, don't make a base
1701 class a primary base just because we don't yet have any virtual
1702 functions.
1703 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1704 (num_vfun_entries): Remove.
1705 (dfs_count_virtuals): Likewise.
1706 (num_extra_vtbl_entries): Likewise.
1707 (size_extra_vtbl_entries): Likewise.
1708 (layout_virtual_bases): Iterate in inheritance graph order under
1709 the new ABI.
1710 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1711 indicate that a vfield is present.
1712 (init_class_processing): Initialize access_public_node, etc., from
1713 ak_public, etc.
1714 (get_vtbl_decl_for_binfo): New function.
1715 (dump_class_hierarchy_r): Likewise.
1716 (dump_class_hierarchy): Use it.
1717 (finish_vtbls): Build the vtbls in inheritance graph order.
1718 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1719 (initialize_vtable): Use get_vtbl_decl_for_binfo.
1720 (accumulate_vtbl_inits): Add comments explaining why a pre-order
1721 walk is required.
1722 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1723 where the vptr points, even for primary vtables.
1724 (build_vtbl_initializer): Adjust handling of vbase and vcall
1725 offsets.
1726 (build_vcall_and_vbase_vtable_entries): New function.
1727 (dfs_build_vbase_offset_vtbl_entries): Remove.
1728 (build_vbase_offset_vtbl_entries): Reimplement.
1729 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1730 were already handled in a primary base class vtable.
1731 (build_vcall_offset_vtbl_entries): Adjust.
1732 (build_rtti_vtbl_entries): Adjust.
1733 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1734 * init.c (expand_virtual_init): Simplify.
1735 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1736 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1737 * search.c (BINFO_ACCESS): New macro.
1738 (SET_BINFO_ACCESS): Likewise.
1739 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1740 (access_in_type): Likewise.
1741 (dfs_accessible_p): Likewise.
1742 (protected_accessible_p): Likewise.
1743 (lookup_fnfields_1): Adjust documentation.
1744 (dfs_mark_primary_bases): Move to class.c
1745 (mark_primary_bases): Likewise.
1746 (dfs_vbase_unmark): Remove.
1747 (virtual_context): Use BINFO_FOR_VBASE.
1748 (dfs_get_vbase_types): Simplify.
1749 (dfs_build_inheritance_graph_order): New function.
1750 (get_vbase_types): Use it.
1751 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1752
1753 * tinfo.cc (get_vbase_offset): New function.
1754 (__vmi_class_type_info::do_find_public_src): Use it.
1755 (__vmi_class_type_info::do_dyncast): Likewise.
1756 (__vmi_class_type_info::do_upcast): Likewise.
1757
1758 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
1759
1760 * lang-specs.h: Pass -fno-show-column to the preprocessor.
1761
1762 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
1763
1764 * rtti.c (class_hint_flags): Rename flags.
1765 (class_initializer): Remove flags.
1766 (synthesize_tinfo_var): Combine offset and flags. Add flags
1767 for __vmi_class_type_info.
1768 (create_tinfo_types): Remove flags from __class_type_info and
1769 __si_class_type_info. Merge flags and offset from
1770 base_class_type_info.
1771 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1772 (__base_class_info::is_virtual_p): Adjust.
1773 (__base_class_info::is_public_p): Adjust.
1774 (__base_class_info::offset): New accessor.
1775 (__class_type_info::details): Remove member.
1776 (__class_type_info::__class_type_info): Lose details.
1777 (__class_type_info::detail_masks): Remove.
1778 (__si_class_type_info::__si_class_type_info): Lose details.
1779 (__vmi_class_type_info::details): New member.
1780 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1781 (__vmi_class_type_info::detail_masks): New member.
1782 * tinfo.cc (__class_type_info::do_upcast): Initialize result
1783 with unknown_details_mask.
1784 (__vmi_class_type_info::do_find_public_src): Adjust
1785 (__vmi_class_type_info::do_dyncast): Adjust.
1786 (__vmi_class_type_info::do_upcast): Set result details, if
1787 needed. Adjust.
1788 (__dynamic_cast): Temporarily #if out optimization.
1789
1790 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
1791
1792 * rtti.c (get_tinfo_decl): Mark used.
1793 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1794 mark as dealt with, if we output it.
1795
1796 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1797
1798 * class.c: Reorganize to put virtual function table initialization
1799 machinery at the end of the file.
1800
1801 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
1802
1803 * class.c (finish_struct): Use bitsize_zero_node.
1804 * pt.c (instantiate_class_template): Likewise.
1805
1806 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1807
1808 Put RTTI entries at negative offsets in new ABI.
1809 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1810 vbase offset at index -3, not -1.
1811 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1812 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1813 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1814 (build_rtti_vtbl_entries): New function.
1815 (set_rtti_entry): Remove.
1816 (build_primary_vtable): Don't use it.
1817 (build_secondary_vtable): Likewise.
1818 (start_vtable): Remove.
1819 (first_vfun_index): New function.
1820 (set_vindex): Likewise.
1821 (add_virtual_function): Don't call start_vtable. Do call
1822 set_vindex.
1823 (set_primary_base): Rename parameter.
1824 (determine_primary_base): Likewise.
1825 (num_vfun_entries): Don't use skip_rtti_stuff.
1826 (num_extra_vtbl_entries): Include RTTI information.
1827 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1828 (skip_rtti_stuff): Remove.
1829 (dfs_modify_vtables): Don't use it.
1830 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
1831 (layout_nonempty_base_or_field): Update size handling.
1832 (create_vtable_ptr): Tweak.
1833 (layout_class_type): Adjust parameter names.
1834 (finish_struct_1): Simplify.
1835 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1836 (skip_rtti_stuff): Remove.
1837 (first_vfun_index): New function.
1838 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1839 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1840 (marked_vtable_pathp): Declare.
1841 (unmarked_vtable_pathp): Likewise.
1842 * error.c (dump_expr): Use first_vfun_index to calculate vtable
1843 offsets.
1844 * rtti.c (build_headof): Look for RTTI at negative offsets.
1845 (get_tinfo_decl_dynamic): Likewise.
1846 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1847 here.
1848 (create_pseudo_type_info): Do it here instead. Adjust so that
1849 vptr points at first virtual function.
1850 * search.c (marked_vtable_pathp): Make it global.
1851 (unmarked_vtable_pathp): Likewise.
1852 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1853 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1854 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1855 (get_pure_virtuals): Likewise.
1856 (expand_upcast_fixups): Likewise.
1857 * tree.c (debug_binfo): Likewise.
1858 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1859 negative offset.
1860
1861 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1862
1863 * class.c (check_field_decl): Fix typo.
1864 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1865 (check_methods): Likewise.
1866 (check_field_decls): Likewise.
1867 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1868 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1869 Use DECL_RESULT_FLD, not DECL_RESULT.
1870 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1871 * lex.c (identifier_type): Likewise.
1872 * pt.c (determine_specialization, lookup_template_class): Likewise.
1873 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1874 (resolve_overloaded_unification, more_specialized): Likewise.
1875 * semantics.c (finish_member_declaration): Likewise.
1876 * typeck.c (build_x_function_call): Likewise.
1877
1878 2000-03-26 Mark Mitchell <mark@codesourcery.com>
1879
1880 * class.c (layout_empty_base): Handle empty bases with non-byte
1881 alignment.
1882 (build_base_field): Likewise.
1883 (layout_virtual_bases): Likewise.
1884
1885 * class.c (finish_struct_1): Fix typo in this change:
1886
1887 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1888
1889 2000-03-25 Mark Mitchell <mark@codesourcery.com>
1890
1891 * decl.c (grokdeclarator): Count partial specializations when
1892 keeping track of how many template classes have been seen.
1893
1894 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1895
1896 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1897
1898 * class.c (build_vbase_pointer_fields): layout_field now place_field.
1899 (get_vfield_offset): Use byte_position.
1900 (set_rtti_entry): Set OFFSET to ssizetype zero.
1901 (get_binfo_offset_as_int): Deleted.
1902 (dfs_record_base_offsets): Use tree_low_cst.
1903 (dfs_search_base_offsets): Likewise.
1904 (layout_nonempty_base_or_field): Reflect changes in RLI format
1905 and call byte_position.
1906 (layout_empty_base): Convert offset to ssizetype.
1907 (build_base_field): use rli_size_unit_so_far.
1908 (dfs_propagate_binfo_offsets): Do computation in proper type.
1909 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1910 (layout_class_type): Reflect changes in RLI names and fields.
1911 (finish_struct_1): Set DECL_FIELD_OFFSET.
1912 * dump.c (dequeue_and_dump): Call bit_position.
1913 * expr.c (cplus_expand_constant): Use byte_position.
1914 * rtti.c (expand_class_desc): Use bitsize_one_node.
1915 * typeck.c (build_component_addr): Use byte_position and don't
1916 special case for zero offset.
1917
1918 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
1919
1920 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1921
1922 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1923 tinfo object.
1924 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1925 vtable.
1926
1927 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1928
1929 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1930 DECL_P macros.
1931 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1932 make_typename_type, check_initializer, cp_finish_decl,
1933 xref_tag): Likewise.
1934 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1935 decl_namespace, arg_assoc_template_arg, arg_assoc,
1936 validate_nonmember_using_decl, do_class_using_decl): Likewise.
1937 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1938 args_to_string): Likewise.
1939 * friend.c (is_friend): Likewise.
1940 * lex.c (note_got_semicolon, note_list_got_semicolon,
1941 is_global): Likewise.
1942 * method.c (build_overload_nested_name, build_overload_value,
1943 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1944 * parse.y (typename_sub, typename_sub1): Likewise.
1945 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1946 process_partial_specialization, convert_template_argument,
1947 template_args_equal, add_pending_template, lookup_template_class,
1948 for_each_template_parm_r, maybe_fold_nontype_arg,
1949 tsubst, instantiate_template, type_unification_real, unify,
1950 instantiate_pending_templates, set_mangled_name_for_template_decl):
1951 Likewise.
1952 * repo.c (repo_get_id, repo_template_used): Likewise.
1953 * search.c (lookup_field_1): Likewise.
1954 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1955 * xref.c (classname): Likewise.
1956
1957 2000-03-22 Mark Mitchell <mark@codesourcery.com>
1958
1959 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1960 (CANONICAL_BINFO): New macro.
1961 (BINFO_NEW_VTABLE_MARKED): Use it.
1962 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1963 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1964 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1965 not TREE_TYPE.
1966 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1967 (build_secondary_vtable): Likewise.
1968 (dfs_finish_vtbls): Likewise.
1969 (dfs_accumulate_vtbl_inits): Likewise.
1970 (accumulate_vtbl_inits): New function.
1971 (finish_vtbls): Make sure that virtual bases come after
1972 non-virtual bases in the vtable group.
1973 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1974 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1975 * search.c (struct vbase_info): Move definition.
1976 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1977 (unmarked_new_vtable_p): Likewise.
1978 (dfs_mark_vtable_path): Remove.
1979 (dfs_mark_new_vtable): Remove.
1980 (dfs_unmark_new_vtable): Likewise.
1981 (dfs_clear_search_slot): Likewise.
1982 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1983 (dfs_clear_vbase_slots): Likewise.
1984 (init_vbase_pointers): LIkewise.
1985
1986 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
1987
1988 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1989 SIZETYPE to a non-SIZETYPE.
1990
1991 2000-03-21 Mark Mitchell <mark@codesourcery.com>
1992
1993 * class.c (layout_virtual_bases): Adjust names in conditionally
1994 compiled code.
1995
1996 * class.c (record_base_offsets): New function.
1997 (layout_conflict_p): Likewise.
1998 (layout_nonempty_base_or_field): Use it.
1999 (layout_empty_base): New function.
2000 (build_base_field): Use it.
2001 (build_base_fields): Update comment.
2002 (layout_virtual_bases): Fold in a little code form
2003 layout_basetypes. Use layout_empty_base.
2004 (layout_basetypes): Remove.
2005 (end_of_class): New function.
2006 (layout_class_type): Use it. Adjust.
2007
2008 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2009 (fntype_p): Remove.
2010 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2011 comment.
2012 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2013 * typeck.c (fntype_p): Remove.
2014
2015 * cp-tree.h (TI_SPEC_INFO): Remove.
2016 (CLASSTYPE_TI_SPEC_INFO): Likewise.
2017 * pt.c (process_partial_specialization): Likewise.
2018
2019 * class.c (build_base_field): Fix thinko in computation of binfo
2020 offsets.
2021
2022 * tree.c (mark_local_for_remap_p): Mark variables declared in
2023 TARGET_EXPRs as well.
2024
2025 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2026
2027 * typeck.c (require_complete_type, complete_type,
2028 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2029 build_array_ref, convert_arguments, pointer_diff,
2030 build_x_unary_op, build_unary_op, build_c_cast,
2031 build_modify_expr): Use COMPLETE_TYPE_P etc.
2032 * call.c (is_complete, convert_like_real,
2033 build_new_method_call): Likewise.
2034 * class.c (build_vbase_pointer_fields, check_bases,
2035 build_base_field, finish_struct_1, pushclass): Likewise.
2036 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2037 * decl.c (maybe_process_template_type_declaration, pushtag,
2038 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2039 layout_var_decl, check_initializer, cp_finish_decl,
2040 grokdeclarator, require_complete_types_for_parms,
2041 grok_op_properties, xref_tag, xref_basetypes,
2042 check_function_type): Likewise.
2043 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2044 * friend.c (do_friend): Likewise.
2045 * init.c (build_offset_ref): Likewise.
2046 * parse.y (structsp): Likewise.
2047 * pt.c (maybe_process_partial_specialization,
2048 tsubst_friend_function, instantiate_class_template, tsubst,
2049 do_type_instantiation, instantiate_pending_templates): Likewise.
2050 * repo.c (repo_get_id): Likewise.
2051 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2052 synthesize_tinfo_var, emit_support_tinfos): Likewise.
2053 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2054 * semantics.c (begin_class_definition): Likewise.
2055 * tree.c (build_cplus_method_type): Likewise.
2056 * typeck2.c (digest_init, build_functional_cast,
2057 add_exception_specifier): Likewise.
2058 * parse.h, parse.c: Regenerated.
2059
2060 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2061
2062 * inc/cxxabi.h: New header file. Define new-abi entry points.
2063 (__pointer_type_info::target): Rename member to ...
2064 (__pointer_type_info::type): ... here.
2065 (__base_class_info::type): Rename member to ...
2066 (__base_class_info::base): ... here.
2067 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2068 * cp-tree.h (CPTI_ABI): New global tree enumeration.
2069 (abi_node): New global tree node.
2070 * decl.c (abi_node): Document.
2071 (init_decl_processing): Initialize abi_node.
2072 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2073 (get_vmi_pseudo_type_info): Likewise.
2074 (create_tinfo_types): Likewise.
2075 (emit_support_tinfos): Likewise.
2076 * tinfo.h (cxxabi.h): Include for new-abi.
2077 Move rtti class definitions to new header file.
2078 * tinfo.cc (abi): Use the namespace.
2079 (std): Move new abi rtti classes from here ...
2080 (__cxxabiv1): ... to here.
2081 * tinfo2.cc (cxxabi.h): Include for new-abi.
2082 Move rtti class definitions to new header file.
2083 (std): Move new abi rtti classes from here ...
2084 (__cxxabiv1): ... to here.
2085 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2086 namespace.
2087
2088 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2089 Jason Merrill <jason@casey.cygnus.com>
2090
2091 * method.c (build_overload_int): Use host_integerp.
2092
2093 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2094
2095 * init.c (build_offset_ref): Handle the case of a templated member
2096 function.
2097
2098 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2099
2100 * except.c (expand_exception_blocks): Clear catch_clauses_last.
2101
2102 2000-03-18 Mark Mitchell <mark@codesourcery.com>
2103
2104 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2105 * class.c (check_bitfield_decl): Turn illegal bitfields into
2106 non-bitfields.
2107 (dfs_propagate_binfo_offsets): Adjust for new size_binop
2108 semantics.
2109 (dfs_offset_for_unshared_vbases): Likewise.
2110 * cvt.c (cp_convert_to_pointer): Convert NULL to a
2111 pointer-to-member correctly under the new ABI.
2112 * expr.c (cplus_expand_constant): Don't use cp_convert when
2113 turning an offset into a pointer-to-member.
2114 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2115 when dereferencing them under the new ABI.
2116 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2117 of pointers-to-members under the new ABI.
2118
2119 * class.c (check_bitfield_decl): Remove restriction on really long
2120 bitfields.
2121 (layout_class_type): Implement new ABI handling of bitfields
2122 longer than their types.
2123
2124 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2125
2126 * parse.y (extdefs): Call ggc_collect.
2127 * parse.c: Regenerated.
2128
2129 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
2130
2131 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2132 (note_name_declared_in_class): Use OVL_CURRENT to get at a
2133 potential overload.
2134
2135 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2136
2137 * class.c (build_vbase_path): Use integer_zerop.
2138 (build_vtable_entry): Use tree_low_cst.
2139 (get_vfield_offset): Use bit_position.
2140 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2141 Use tree_low_cst.
2142 (check_bitfield_decl): Set DECL_SIZE using convert.
2143 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2144 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2145 Use tree_low_cst.
2146 (finish_struct_1): Use bit_position.
2147 (dump_class_hierarchy): Use tree_low_cst.
2148 * cp-tree.h (min_precision): Add declaration.
2149 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2150 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2151 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2152 * expr.c (cplus_expand_constant): Use bit_position.
2153 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2154 * rtti.c (get_base_offset): Use bit_position.
2155 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2156 host_integerp, and tree_low_cst.
2157 (pointer_int_sum): Use integer_zerop.
2158 (build_component_addr): Use bit_position.
2159
2160 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
2161
2162 * typeck.c (require_complete_type): Don't assume size_zero_node.
2163 (complete_type_or_else): Likewise.
2164
2165 2000-03-16 Steven Grady <grady@digitaldeck.com>
2166 Jason Merrill <jason@casey.cygnus.com>
2167
2168 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2169
2170 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
2171
2172 * decl2.c (grokfield): Bail out if type is error_mark_node.
2173
2174 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2175
2176 * tinfo2.cc (__ptr_to_member_data): Rename to ...
2177 (__pointer_to_member_data): ... here. Adjust.
2178 * rtti.c (create_tinfo_types): Adjust.
2179
2180 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2181
2182 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2183 * decl.c (ref_desc_type_node): Undocument.
2184 * rtti.c (ptr_ref_initializer): Rename to ...
2185 (ptr_initializer): ... here. Adjust comments.
2186 (ptmd_initializer): Fix comment thinko.
2187 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2188 (create_tinfo_types): Remove ref_desc_type_node init.
2189 * tinfo2.cc (__reference_type_info): Remove.
2190
2191 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2192
2193 * decl.c (cp_finish_decl): Remove obsolete comment.
2194
2195 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2196
2197 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2198
2199 * cp-tree.h: Tweak documentation.
2200 * class.c (build_vbase_pointer_fields): Layout the fields, too.
2201 (avoid_overlap): Remove.
2202 (get_binfo_offset_as_int): New function.
2203 (dfs_serach_base_offsets): Likewise.
2204 (layout_nonempty_base_or_field): Likewise.
2205 (build_base_field): Layout fields here. Avoid placing two objects
2206 of the same type at the same address, under the new ABI.
2207 (build_base_fields): Adjust accordingly.
2208 (create_vtable_ptr): Return the new field, but don't attach it to
2209 TYPE_FIELDS.
2210 (remove_base_field): Remove.
2211 (remove_base_fields): Remove.
2212 (layout_basetypes): Adjust accordingly.
2213 (layout_class_type): Call layout_field for each field, rather than
2214 just making a wholesale call to layout_type.
2215
2216 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
2217
2218 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2219
2220 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
2221
2222 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2223
2224 * except.c (dtor_nothrow): New fn.
2225 (do_pop_exception): Use it. Take type parm.
2226 (push_eh_cleanup): Take type parm.
2227 (expand_start_catch_block): Pass it.
2228 (build_eh_type_type_ref): Accept null type.
2229
2230 2000-03-12 Mark Mitchell <mark@codesourcery.com>
2231
2232 * cp-tree.h (revert_static_member_fn): Change prototype.
2233 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2234 (grok_op_properties): Likewise.
2235 (start_function): Likewise.
2236 (revert_static_member_fn): Simplify.
2237 * pt.c (check_explicit_specialization): Adjust call to
2238 revert_static_member_fn.
2239
2240 2000-03-11 Mark Mitchell <mark@codesourcery.com>
2241
2242 * cp-tree.h (scope_kind): New type.
2243 (tmpl_spec_kind): Likewise.
2244 (declare_pseudo_global_level): Remove.
2245 (pseudo_global_level_p): Rename to template_parm_scope_p.
2246 (pushlevel): Remove declaration.
2247 (begin_scope): New function.
2248 (finish_scope): Likewise.
2249 (current_tmpl_spec_kind): Likewise.
2250 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2251 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
2252 Add template_spec_p.
2253 (toplevel_bindings_p): Adjust.
2254 (declare_pseudo_global_level): Remove.
2255 (pseudo_global_level_p): Rename to template_parm_scope_p.
2256 (current_tmpl_spec_kind): New function.
2257 (begin_scope): Likewise.
2258 (finish_scope): Likewise.
2259 (maybe_push_to_top_level): Adjust.
2260 (maybe_process_template_type_declaration): Likewise.
2261 (pushtag): Likewise.
2262 (pushdecl_nonclass_level): Likewise.
2263 (lookup_tag): Likewise.
2264 (grokfndecl): Handle member template specializations. Share
2265 constructor and non-constructor code.
2266 * decl2.c (check_classfn): Handle member template specializations.
2267 * pt.c (begin_template_parm_list): Use begin_scope.
2268 (begin_specialization): Likewise.
2269 (end_specialization): Likewise.
2270 (check_explicit_specialization): Use current_tmpl_spec_kind.
2271 Handle member template specializations.
2272 (end_template_decl): Use finish_scope. Remove call to
2273 get_pending_sizes.
2274 (push_template_decl_real): Remove bogus error message.
2275 (tsubst_decl): Fix typo in code contained in comment.
2276 (instantiate_template): Handle member template specializations.
2277 (most_general_template): Likewise.
2278
2279 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
2280
2281 * lex.c (whitespace_cr): Compress consecutive calls to warning().
2282 (do_identifier): Ditto for error().
2283
2284 * pt.c (convert_nontype_argument): Ditto for cp_error().
2285 (convert_template_argument): Ditto for cp_pedwarn().
2286
2287 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
2288
2289 * exception.cc (__check_null_eh_spec): New fn.
2290 * except.c (expand_end_eh_spec): Call it if the spec is throw().
2291
2292 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2293
2294 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2295 * except.c (expand_end_eh_spec): Add the return type.
2296 * rtti.c (throw_bad_cast): Add the parmtypes.
2297 (throw_bad_typeid): Likewise.
2298
2299 * semantics.c (expand_stmt): Only leave out rtl for unused
2300 artificials, and set DECL_IGNORED_P on them as well.
2301 * decl.c (wrapup_globals_for_namespace): Likewise.
2302
2303 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
2304
2305 * decl.c (maybe_commonize_var): Skip all artificial decls.
2306 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2307
2308 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2309
2310 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2311 * cp-tree.h: Declare flag_enforce_eh_specs.
2312 * decl.c (store_parm_decls, finish_function): Check it.
2313
2314 C library functions don't throw.
2315 * Makefile.in (cfns.h): New target.
2316 (except.o): Depend on it.
2317 * Make-lang.in (cc1plus): Depend on cfns.gperf.
2318 * cfns.gperf: New file.
2319 * cfns.h: Generated.
2320 * except.c: Include it.
2321 (nothrow_libfn_p): New fn.
2322 * decl.c (grokfndecl): Use it.
2323 * cp-tree.h: Declare it.
2324
2325 * decl.c (push_overloaded_decl_1, auto_function,
2326 define_function): Lose.
2327 (build_library_fn_1): New static fn.
2328 (builtin_function): Use it.
2329 (get_atexit_node): Use build_library_fn_ptr.
2330 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2331 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2332 push_void_library_fn, push_throw_library_fn): New fns.
2333 * cp-tree.h: Declare them.
2334 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2335 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2336 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2337 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2338 * rtti.c (build_runtime_decl): Lose.
2339 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
2340 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2341 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2342
2343 * call.c (build_call): Remove result_type parm.
2344 Call mark_used on unused artificial fns.
2345 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2346
2347 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
2348
2349 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2350 appropriate.
2351 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2352 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2353 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2354 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2355 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2356 expand_generic_desc): Likewise.
2357
2358 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2359
2360 * exception.cc (__cp_pop_exception): Cleanup the original object.
2361
2362 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2363
2364 * decl.c (grok_op_properties): Merge conversion to void warning
2365 with other silly op warnings.
2366
2367 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
2368
2369 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2370 array CONSTRUCTOR elements. Don't use expr_tree_cons.
2371
2372 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2373
2374 * decl.c (cp_make_fname_decl): New function.
2375 (wrapup_globals_for_namespace): Don't emit unused static vars.
2376 (init_decl_processing): Remove comment about use of
2377 array_domain_type. Set make_fname_decl.
2378 (cp_finish_decl): Remove __FUNCTION__ nadgering.
2379 * semantics.c (begin_compound_stmt): Remove
2380 current_function_name_declared flagging.
2381 (expand_stmt): Don't emit unused local statics.
2382 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2383 specially.
2384
2385 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2386
2387 * typeck.c (convert_for_assignment): Don't look at array
2388 initializer.
2389 * call.c (convert_like_real): Likewise.
2390
2391 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
2392
2393 Add initial support for '\uNNNN' specifier.
2394 * lex.c (read_ucs): New fn.
2395 (readescape, skip_white_space): Call it.
2396 (is_extended_char, is_extended_char_1): New fns.
2397 (utf8_extend_token): New fn, #if 0'd out.
2398 (real_yylex): Treat extended chars like letters.
2399
2400 * search.c (note_debug_info_needed): Walk the bases even if we
2401 weren't deferring the type itself.
2402
2403 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2404
2405 * decl2.c (finish_objects): Constify a char*.
2406
2407 * method.c (emit_thunk): Likewise.
2408
2409 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
2410
2411 * typeck.c (dubious_conversion_warnings): Look through
2412 REFERENCE_TYPE.
2413
2414 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2415
2416 * class.c (dfs_modify_vtables): I is now unsigned.
2417 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2418 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2419 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2420 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2421 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2422 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2423 Call integer_all_onesp.
2424 * typeck2.c (process_init_constructor): Use compare_tree_int.
2425
2426 * lang-specs.h (as): Don't call if -syntax-only.
2427
2428 2000-03-06 Mark Mitchell <mark@codesourcery.com>
2429
2430 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2431 RTL_EXPR_HAS_NO_SCOPE after all.
2432
2433 2000-03-05 Mark Mitchell <mark@codesourcery.com>
2434
2435 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2436 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
2437 RTL_EXPR_HAS_NO_SCOPE.
2438
2439 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2440 later.
2441
2442 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2443
2444 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
2445
2446 * call.c (convert_like): Macrofy.
2447 (convert_like_with_context): New macro.
2448 (convert_like_real): Renamed from convert_like. Add calling
2449 context parameters, for diagnostics. Add recursive flag. Call
2450 dubious_conversion_warnings for outer conversion.
2451 (build_user_type_conversion): Use convert_like_with_context.
2452 (build_over_call): Likewise. Don't warn about dubious
2453 conversions here. Adjust convert_default_arg calls.
2454 (convert_default_arg): Add context parameters for diagnostics.
2455 Pass throught to convert_like_with_context.
2456 * cp-tree.h (convert_default_arg): Add context parameters.
2457 (dubious_conversion_warnings): Prototype new function.
2458 * typeck.c (convert_arguments): Adjust convert_default_arg call.
2459 (dubious_conversion_warnings): New function, broken
2460 out of convert_for_assignment.
2461 (convert_for_assignment): Adjust.
2462
2463 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
2464
2465 * decl2.c (key_method): Break out from...
2466 (import_export_vtable, import_export_class): ...here.
2467
2468 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2469 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2470
2471 * search.c (note_debug_info_needed, dfs_debug_mark,
2472 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
2473 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2474
2475 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
2476
2477 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2478 typos.
2479
2480 2000-03-02 Mark Mitchell <mark@codesourcery.com>
2481
2482 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2483 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2484 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2485 (lang_type): Split gets_new into has_new and has_array_new.
2486 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2487 (TYPE_GETS_NEW): Split into ...
2488 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2489 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2490 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2491 (build_op_new_call): Don't declare.
2492 (build_new_1): Likewise.
2493 * call.c (build_op_new_call): Remove.
2494 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2495 instead of TYPE_NEEDS_DESTRUCTOR.
2496 (finish_struct_bits): Likewise.
2497 (add_implicitly_declared_members): Likewise.
2498 (check_field_decl): Likewise.
2499 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2500 correctly under the new ABI.
2501 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2502 instead of TYPE_NEEDS_DESTRUCTOR.
2503 (initialize_local_var): Likewise.
2504 (destroy_local_var): Likewise.
2505 (cp_finish_decl): Likewise.
2506 (register_dtor_fn): Likewise.
2507 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2508 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
2509 TYPE_VEC_DELETE_TAKES_SIZE here.
2510 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2511 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2512 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2513 (finish_destructor_body): Likewise.
2514 (maybe_build_cleanup_1): Likewise.
2515 * decl2.c (do_static_destruction): Likewise.
2516 * init.c (build_new_1): Make it static.
2517 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2518 (expand_cleanup_for_base): Likewise.
2519 (get_cookie_size): New function.
2520 (build_new_1): Handle array-new cookies correctly under the new
2521 ABI.
2522 (build_vec_delete_1): Likewise.
2523 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2524 (build_delete): Likewise.
2525 (build_vec_delete): Handle array-new cookies correctly under the new
2526 ABI.
2527 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2528 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2529 TYPE_HAS_ARRAY_NEW_OPERATOR.
2530 * ptree.c (print_lang_type): Check them.
2531 * search.c (context_for_name_lookup): Fix typo in comment.
2532 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2533 * tree.c (break_out_cleanups): Likewise.
2534 (build_cplus_array_test_1): Likewise.
2535 (cp_build_qualified_type_real): Likewise.
2536 * typeck.c (complete_type): Likewise.
2537
2538 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2539 the command-line, not the end.
2540
2541 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
2542
2543 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2544
2545 2000-03-02 Tom Tromey <tromey@cygnus.com>
2546
2547 * cp-tree.h (build_java_class_ref): Declare.
2548 * init.c (build_java_class_ref): No longer static.
2549 * except.c (expand_throw): Generate a Java-style `throw' if the
2550 thrown object is a "Java" object.
2551 (initialize_handler_parm): Generate a Java-style lookup of
2552 exception info if the caught object is a "Java" object.
2553 (catch_language, catch_language_init): New globals.
2554 (decl_is_java_type): New function.
2555 (expand_start_catch_block): Don't call push_eh_info() or
2556 push_eh_cleanup() when handling a Java-style "catch". Pass Java
2557 class reference to build_catch_block.
2558
2559 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2560
2561 * typeck.c (comptypes): Treat sizetype like its language equivalent.
2562
2563 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
2564
2565 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
2566 to merge reference/pointer code and fix incorrect warnings.
2567
2568 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
2569
2570 * search.c (protected_accessible_p): Use context_for_name_lookup.
2571
2572 * init.c (construct_virtual_bases): Fix thinko.
2573 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2574
2575 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
2576
2577 * decl.c (current_function_decl): Move to toplev.c.
2578
2579 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
2580
2581 * pt.c (fn_type_unification): Unify return type, whenever
2582 provided.
2583 (get_bindings_real): Only pass return type when necessary.
2584 Remove explicit return type check.
2585 * class.c (resolve_address_of_overloaded_function): Pass desired
2586 return type to fn_type_unification.
2587
2588 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2589
2590 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
2591 DECL_FIELD_SIZE.
2592 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
2593 DECL_FIELD_SIZE.
2594 * rtti.c (expand_class_desc): Likewise.
2595 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
2596 (THUNK_VCALL_OFFSET): Likewise.
2597 (THUNK_DELTA): Reflect changes in ../tree.h.
2598
2599 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
2600
2601 * search.c (protected_accessible_p): Also allow the access if
2602 the member is public in DERIVED. Lose TYPE parm.
2603 (friend_accessible_p): Lose TYPE parm.
2604 (accessible_p): Adjust.
2605
2606 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2607
2608 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
2609 on things that are not sizes; ssize_binop deleted.
2610 Call size_diffop when appropriate.
2611 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2612 (build_primary_vtable, build_secondary_vtable): Likewise.
2613 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
2614 Variable I is HOST_WIDE_INT.
2615 (get_vfield_offset): Pass proper types to size_binop.
2616 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
2617 (finish_struct_1): Likewise.
2618 (skip_rtti_stuff): Arg N is now pointer to signed.
2619 (layout_class_type): Use size_zero_node.
2620 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
2621 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
2622 * decl.c (complete_arry_type): Pass proper types to size_binop.
2623 (xref_basetypes): BINFO_OFFSET is sizetype.
2624 * error.c (dump_expr): Don't use size_binop non-sizes.
2625 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
2626 * init.c (construct_virtual_bases): Fix type error.
2627 (build_vec_delete_1): Pass proper type to size_binop and don't
2628 fold result.
2629 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
2630 * rtti.c (get_base_offset): Pass proper type to size_binop.
2631 * search.c (dfs_find_vbases): Fix type error.
2632 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
2633 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
2634 * tree.c (debug_binfo): Variable N is signed.
2635 Use HOST_WIDE_INT_PRINT_DEC.
2636 * typeck.c (comptypes): sizetype is same as equivalent integer type.
2637 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2638 size_one_node and size_zero_node.
2639 (c_alignof): Use size_one_node.
2640 (build_component_addr): Pass proper types to size_binop.
2641 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2642
2643 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
2644
2645 Implement class scope using-declarations for functions.
2646 * class.c (handle_using_decl): Call add_method for used functions.
2647 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2648 (add_method): Used functions are hidden by local functions.
2649 (check_bases_and_members): Handle using-decls before finalizing
2650 CLASSTYPE_METHOD_VEC.
2651 * call.c (add_function_candidate): Add ctype parm; if non-zero,
2652 override the type of 'this' accordingly.
2653 (add_template_candidate, add_template_candidate_real): Add ctype parm.
2654 (convert_class_to_reference, build_user_type_conversion_1,
2655 build_new_function_call, build_object_call, build_new_op,
2656 build_new_method_call): Pass ctype parm.
2657
2658 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2659 the baselink.
2660 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2661 build_new_function_call, build_object_call, build_new_op,
2662 build_new_method_call, build_op_delete_call): Don't get basetype_path
2663 from a baselink.
2664 * typeck.c (build_component_ref): Likewise.
2665 * init.c (build_offset_ref): Likewise.
2666 (resolve_offset_ref): Don't call enforce_access.
2667 Call build_scoped_ref.
2668 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
2669 would cause an error or if -pedantic.
2670 * class.c (alter_access): Lose binfo parm.
2671
2672 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2673
2674 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2675 types.
2676
2677 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
2678
2679 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2680 pseudo_type_info creation into the std namespace
2681
2682 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2683
2684 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2685 (import_export_class): Remove declaration.
2686 * decl2.c (import_export_class): Make it static.
2687 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2688 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2689 EXPR_WITH_FILE_LOCATION.
2690 * lex.c (check_newline): Tweak filename/lineno setting.
2691 * semantics.c (begin_while_stmt): Fix typo in comment.
2692
2693 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2694
2695 * lang-options.h (-fmessage-length=): Add missing option.
2696
2697 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2698
2699 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
2700
2701 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2702
2703 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
2704
2705 * optimize.c (expand_call_inline): Emit the return label before
2706 evaluating the return value.
2707
2708 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2709
2710 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2711 than duplicating functionality here.
2712 * optimize.c: Include input.h.
2713 (expand_call_inline): Use push_srcloc and pop_srcloc.
2714 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2715 * parse.c: Regenerated.
2716 * Makefile.in (lex.o): Depend on input.h.
2717 (optimize.o): Likewise.
2718
2719 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
2720
2721 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2722 function type, rather than ICE.
2723
2724 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
2725
2726 * decl.c (grokdeclarator): Call decl_type_access_control.
2727 * parse.y (parse_end_decl): Don't call decl_type_access_control if
2728 decl is null.
2729
2730 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
2731
2732 * decl.c (decls_match): Remove obsolete static member nadgering.
2733
2734 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2735
2736 * decl.c (grokdeclarator): Change ANSI to ISO.
2737 * lex.c (consume_string, readescape, do_identifier): Likewise.
2738 (parse_float, real_yylex): Likewise.
2739 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2740 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2741 new_type_id, maybe_label_decls, simple_stmt,
2742 for.init.statement): Likewise.
2743 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2744 * semantics.c (finish_named_return_value): Likewise.
2745 * parse.c: Regenerate.
2746
2747 2000-02-21 Mark Mitchell <mark@codesourcery.com>
2748
2749 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2750 (CPTI_CLASS_STAR_TYPE): Remove.
2751 (vtable_index_type): Likewise.
2752 (class_star_type_node): Remove.
2753 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2754 (build_binary_op_nodefault): Remove.
2755 * call.c (build_new_op): Use build_binary_op instead of
2756 build_binary_op_nodefault.
2757 * decl.c (init_decl_processing): Remove class_star_type_node
2758 initialization. Make delta_type_node ptrdiff_type_node under the
2759 new ABI. Initialize vtable_index_type.
2760 (build_ptrmemfunc_type): Build different structures for the new
2761 ABI.
2762 (build_enumerator): Use build_binary_op instead of
2763 build_binary_op_nodefault.
2764 * method.c (build_overload_value): Mangle pointers-to-members
2765 appropriately under the new ABI.
2766 * typeck.c (build_array_ref): Use build_binary_op instead of
2767 build_binary_op_nodefault.
2768 (get_member_function_from_ptrfunc): Adjust for the new ABI.
2769 (build_binary_op_nodefault): Rename to ...
2770 (build_binary_op): ... this. Remove old version. Adjust for
2771 pointer-to-member comparisons under the new ABI.
2772 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
2773 (build_ptrmemfunc): Adjust for the new ABI.
2774 (expand_ptrmemfunc_cst): Likewise.
2775 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2776 (pfn_from_ptrmemfunc): Adjust for the new ABI.
2777
2778 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
2779
2780 * call.c (build_object_call): Compress consecutive calls to
2781 cp_error.
2782 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2783 (build_op_delete_call): Adjust message formatting.
2784
2785 * class.c (check_bases): Compress consecutive calls to
2786 cp_pedwarn.
2787 (finish_struct_anon): Say 'ISO C++'.
2788
2789 * decl.c (start_decl): Same here.
2790 (grok_reference_init): Likewise.
2791 (grokfndecl): Correct message formatting.
2792 (grokfndecl): Improve diagnostic.
2793 (check_static_variable_definition): Likewise. Say 'ISO C++'
2794 (compute_array_index_type): Say 'ISO C++'
2795 (create_array_type_for_decl): Compress consecutive calls to
2796 cp_error.
2797 (grokdeclarator): Say 'ISO C++'
2798 (grok_op_properties): Likewise.
2799
2800 * decl2.c (delete_sanity): Clairify diagnostic.
2801 (check_member_template): Same here.
2802 (grok_function_init): Use consistent terminology.
2803
2804 * expr.c (do_case): Say 'ISO C++'
2805
2806 * friend.c (do_friend): Compress consecutive calls to warning.
2807
2808 2000-02-20 Mark Mitchell <mark@codesourcery.com>
2809
2810 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2811 * class.c (build_secondary_vtable): Reorganize. Don't create a
2812 new vtable under the new ABI.
2813 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2814 computing the size.
2815 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2816 the initializing elements.
2817 (initialize_vtable): New function.
2818 (dfs_finish_vtbls): Use it.
2819 (dfs_accumulate_vtbl_inits): New function.
2820 (finish_vtbls): Merge primary and secondary vtables under the new
2821 ABI.
2822 (finish_struct_1): Remove redundant call to layout_vtable_decl.
2823 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2824 aren't VAR_DECLs.
2825
2826 * class.c (build_vtable): New function, split out from ...
2827 (get_vtable_decl): ... here, and ...
2828 (build_secondary_vtable): ... here.
2829
2830 * pt.c (tsubst_decl): Fix formatting.
2831
2832 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2833
2834 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2835 (avoid_overlap, build_base_field): Likewise.
2836 (build_base_field, build_base_fields, is_empty_class):
2837 Test DECL_SIZE with integer_zero.
2838 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2839 * cp-tree.h (struct lang_type): New field size_unit.
2840 (CLASSTYPE_SIZE_UNIT): New macro.
2841 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2842 (cp_finish_decl): Delete -Wlarger-than processing.
2843 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2844 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2845 * tree.c (make_binfo): binfo vector is one entry longer.
2846 (walk_tree): Walk DECL_SIZE_UNIT.
2847
2848 2000-02-19 Mark Mitchell <mark@codesourcery.com>
2849
2850 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2851 comment.
2852 (build_vtable_entry): Don't assume all vtable entries are
2853 functions.
2854 (build_vtbl_initializer): Adjust accordingly.
2855 (get_vtable_decl): Fix formatting.
2856
2857 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
2858
2859 * semantics.c (deferred_type_access_control): Walk the entire
2860 type_lookups list.
2861 (save_type_access_control): Rename from
2862 initial_deferred_type_access_control. Just remember the value.
2863 (decl_type_access_control): New fn.
2864 (begin_function_definition): Use deferred_type_access_control, after
2865 we've started the function. Set type_lookups to error_mark_node.
2866 * parse.y (frob_specs, fn.def1): Adjust.
2867 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2868 (parse_end_decl, parse_bitfield0, parse_method): New fns.
2869 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2870 (after_type_component_declarator0): Likewise.
2871 (after_type_component_declarator): Likewise.
2872 (notype_component_declarator): Likewise.
2873 * cp-tree.h: Adjust.
2874
2875 * decl.c (redeclaration_error_message): Allow redeclaration of
2876 namespace-scope decls.
2877
2878 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2879
2880 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2881
2882 2000-02-17 Mark Mitchell <mark@codesourcery.com>
2883
2884 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2885 * decl2.c (grokclassfn): Likewise.
2886
2887 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2888
2889 * decl2.c (lang_decode_option): Don't set default message length
2890 here.
2891 * lex.c (lang_init_options): Set it here.
2892
2893 2000-02-16 Mark Mitchell <mark@codesourcery.com>
2894
2895 Make DECL_CONTEXT mean the class in which a member function was
2896 declared, even for a virtual function.
2897 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2898 (DECL_FRIEND_CONTEXT): New macro.
2899 (DECL_REAL_CONTEXT): Remove.
2900 (SET_DECL_FRIEND_CONTEXT): Likewise.
2901 (DECL_VIRTUAL_CONTEXT): Adjust.
2902 (DECL_CLASS_SCOPE_P): Use TYPE_P.
2903 (add_friends): Remove.
2904 (hack_decl_function_context): Likewise.
2905 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2906 CP_DECL_CONTEXT.
2907 (build_over_call): Fix indentation. Use DECL_CONTEXT
2908 instead of DECL_CLASS_CONTEXT.
2909 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2910 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2911 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2912 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2913 (build_base_field): Likewise.
2914 (finish_struct_1): Likewise.
2915 (build_self_reference): Likewise.
2916 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2917 DECL_REAL_CONTEXT.
2918 (pushtag): Use decl_function_context, not
2919 hack_decl_function_context.
2920 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2921 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2922 (pushdecl): Remove bogus code.
2923 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2924 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2925 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2926 Use decl_function_context, nothack_decl_function_context.
2927 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2928 (grokdeclarator): Likewise. Use decl_function_context, not
2929 hack_decl_function_context.
2930 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
2931 (start_function): Use DECL_FRIEND_CONTEXT, not
2932 DECL_CLASS_CONTEXT. Use decl_function_context, not
2933 hack_decl_function_context.
2934 (finish_function): Use decl_function_context, not
2935 hack_decl_function_context.
2936 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2937 DECL_CLASS_CONTEXT.
2938 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2939 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2940 (grokfield): Likewise.
2941 (finish_builtin_type): Likewise.
2942 (finish_vtable_vardec): Use decl_function_context, not
2943 hack_decl_function_context.
2944 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2945 (start_static_initialization_or_destruction): Likewise.
2946 (finish_static_initialization_or_destruction): Likewise.
2947 (mark_used): Adjust logic for deciding when to synthesize methods.
2948 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2949 DECL_REAL_CONTEXT.
2950 * error.c (dump_function_decl): Use DECL_CONTEXT, not
2951 DECL_CLASS_CONTEXT.
2952 * friend.c (is_friend): Likewise.
2953 (add_friends): Remove.
2954 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2955 * lex.c (begin_definition_of_inclass_inline): Use
2956 decl_function_context, not hack_decl_function_context.
2957 (process_next_inline): Likewise.
2958 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2959 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2960 DECL_CLASSS_CONTEXT.
2961 (hack_identifier): Likewise.
2962 (synthesize_method): Use decl_function_context, not
2963 hack_decl_function_context.
2964 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2965 DECL_REAL_CONTEXT.
2966 (is_member_template): Use decl_function_context, not
2967 hack_decl_function_context. Use DECL_CONTEXT, not
2968 DECL_CLASS_CONTEXT.
2969 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
2970 DECL_CLASS_CONTEXT.
2971 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2972 DECL_REAL_CONTEXT.
2973 (push_template_decl_real): Likewise.
2974 (instantiate_class_template): Don't call add_friends.
2975 (tsubst_default_argument): Use DECL_CONTEXT, not
2976 DECL_REAL_CONTEXT.
2977 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2978 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2979 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2980 DECL_CLASS_CONTEXT.
2981 * repo.c (repo_inline_used): Likewise.
2982 * search.c (current_scope): Adjust for new _CONTEXT macros.
2983 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2984 DECL_REAL_CONTEXT.
2985 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2986 (lookup_fnfields_here):Likewise.
2987 (check_final_overrider): Likewise.
2988 (init_vbase_pointers): Likewise.
2989 (virtual_context): Likewise.
2990 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2991 (expand_body): Use decl_function_context, not
2992 hack_decl_function_context.
2993 * tree.c (hack_decl_function_context): Remove.
2994 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2995 DECL_CLASS_CONTEXT.
2996 * typeck2.c (error_not_base_type): Likewise.
2997
2998 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
2999
3000 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
3001
3002 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3003
3004 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3005
3006 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
3007
3008 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3009
3010 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
3011
3012 * decl2.c (lang_decode_option): Enable automatic line wrapping.
3013
3014 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
3015
3016 * parse.y (frob_specs): Split out...
3017 (parse_decl): From here.
3018 (fn.def2): Call initial_deferred_type_access_control.
3019 (after_type_component_declarator0): Call frob_specs.
3020 (notype_component_declarator0): Likewise.
3021 * search.c (friend_accessible_p): Nested classes are friends of their
3022 enclosing classes.
3023
3024 2000-02-10 Mark Mitchell <mark@codesourcery.com>
3025
3026 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3027 used to create an implicit temporary.
3028
3029 * class.c (dfs_modify_vtables): Tweak calculation of functions to
3030 override.
3031
3032 2000-02-08 Nathan Sidwell <nathan@acm.org>
3033
3034 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3035 strip array element qualifiers too.
3036
3037 2000-02-07 Mark Mitchell <mark@codesourcery.com>
3038
3039 * decl.c (store_parm_decls): Don't build cleanups for parameters
3040 while processing_template_decl.
3041
3042 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
3043
3044 * cp-tree.h (struct saved_scope): Add incomplete field.
3045 (namespace_scope_incomplete): New macro.
3046 * decl.c (pushdecl): Use it.
3047 (hack_incomplete_structures): Use it. See through artificial
3048 binding levels.
3049 (mark_saved_scope): Mark it.
3050
3051 Implement access control for nested types.
3052 * search.c (type_access_control): New fn.
3053 (accessible_p): Now we do perform access control for types.
3054 * semantics.c (deferred_type_access_control): New fn.
3055 (initial_deferred_type_access_control): New fn.
3056 (begin_function_definition): Call it. Add lookups parm.
3057 * decl.c (struct binding_level): Add this_class field.
3058 (pushlevel_class): Set it.
3059 (mark_binding_level): Mark it.
3060 (lookup_name_real): Use it. Call type_access_control.
3061 (mark_saved_scope): Mark lookups field.
3062 * cp-tree.h (flagged_type_tree): Add lookups field.
3063 (struct saved_scope): Add lookups field.
3064 (type_lookups): New macro.
3065 * parse.y (declmods): Now <ftype>.
3066 (parse_decl): Add lookups parm. Call
3067 initial_deferred_type_access_control.
3068 (lang_extdef): Clear type_lookups.
3069 (typed_declspecs, declmods, typespec): Set lookups field.
3070 (initdcl): Call deferred_type_access_control.
3071 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3072 component_decl_1, named_parm): Adjust.
3073 * friend.c (is_friend): Nested classes are friends of their
3074 enclosing classes.
3075
3076 * class.c (currently_open_derived_class): New fn.
3077 * method.c (hack_identifier): Use it.
3078
3079 * lex.c (do_identifier): Remove obsolete code.
3080
3081 * parse.y (typed_typespecs): Propagate new_type_flag properly.
3082
3083 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
3084
3085 * tinfo.h: Remove apostrophes from C++ comment (xgettext
3086 thinks this file is plain C).
3087
3088 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3089
3090 * Makefile.in (call.o): Depend on $(EXPR_H).
3091
3092 * call.c: Include "expr.h".
3093
3094 * class.c (dump_class_hierarchy): Add prototype.
3095
3096 * search.c (dfs_get_pure_virtuals): Likewise.
3097
3098 2000-02-1 Ulrich Drepper <drepper@redhat.com>
3099
3100 * parse.y (simple_stmt): Allow :: token in asm parameter list.
3101 * parse.c: Rebuilt.
3102
3103 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
3104
3105 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3106 Store it in DECL_FCONTEXT.
3107 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3108
3109 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
3110
3111 * tinfo.h (old abi): #include "tconfig.h".
3112 * tinfo.cc (convert_to_base): Move into old abi section.
3113
3114 2000-01-31 Mark Mitchell <mark@codesourcery.com>
3115
3116 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3117 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3118 (BINFO_PRIMARY_BINFO): New macro.
3119 (BF_DELTA): Rename to ...
3120 (BV_DELTA): ... this.
3121 (BF_VCALL_INDEX): Rename to ...
3122 (BV_VCALL_INDEX): ... this.
3123 (BF_FN): Rename to ...
3124 (BV_FN): ... this.
3125 * class.c (build_vbase_path): Adjust for changes to reverse_path.
3126 (set_rtti_entry): Rename BF_ macros to BV_ variants.
3127 (modify_vtable_entry): Simplify.
3128 (add_virtual_function): Rename BF_ macros to BV_ variants.
3129 (build_vtable_initializer): Likewise.
3130 (get_class_offset_1): Remove.
3131 (dfs_get_class_offset): Likewise.
3132 (get_class_offset): Likewise.
3133 (dfs_find_final_overrider): New function.
3134 (find_final_overrider): Likewise.
3135 (modify_one_vtable): Remove.
3136 (dfs_find_base): New function.
3137 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
3138 find_final_overrider.
3139 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
3140 virtuals.
3141 (dfs_fixup_vtable_deltas): Remove.
3142 (override_one_vtable): Remove.
3143 (merge_overrides): Likewise.
3144 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3145 unreal chilren of virtual bases.
3146 (finish_struct_1): Don't use merge_overrides. Don't use
3147 dfs_fixup_vtable_deltas.
3148 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
3149 BINFOs.
3150
3151 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3152 Jason Merrill <jason@yorick.cygnus.com>
3153
3154 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3155
3156 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
3157
3158 * exception.cc (__throw_bad_typeid): Add missing std::.
3159
3160 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3161
3162 * cp-tree.h (make_thunk): PROTO -> PARAMS.
3163
3164 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
3165
3166 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3167
3168 Runtime support for new-abi rtti.
3169 * inc/typeinfo (type_info::operator!=): Define in class.
3170 (type_info::before, type_info::name, type_info::operator==,
3171 type_info::operator!=): Define new ABI implementations.
3172 (type_info::is_pointer_p, type_info::is_function_p): Declare
3173 new virtual functions.
3174 (type_info::do_catch, type_info::do_upcast): Likewise.
3175
3176 * tinfo.h (__base_class_info): Define new class.
3177 (__class_type_info): Likewise.
3178 (__si_class_type_info): Likewise.
3179 (__vmi_class_type_info): Likewise.
3180 (__dynamic_cast): Prototype.
3181
3182 * tinfo.cc: Conditionalize old and new rtti mechanisms.
3183 (type_info::is_pointer_p): Define new function.
3184 (type_info::is_function_p): Likewise.
3185 (type_info::do_catch): Likewise.
3186 (type_info::do_upcast): Likewise.
3187 (vtable_prefix): New structure for vtable access.
3188 (adjust_pointer): Define new template function.
3189 (contained_p, public_p, virtual_p, contained_public_p,
3190 contained_nonpublic_p, contained_nonvirtual_p): Define new
3191 functions.
3192 (nonvirtual_base_type): New local variable.
3193 (__class_type_info::~__class_type_info): Define.
3194 (__si_class_type_info::~__si_class_type_info): Likewise.
3195 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3196 (__class_type_info::do_catch): Define new function.
3197 (__class_type_info::do_upcast): Likewise.
3198 (__class_type_info::find_public_src): Likewise.
3199 (__class_type_info::do_find_public_src): Likewise.
3200 (__si_class_type_info::do_find_public_src): Likewise.
3201 (__vmi_class_type_info::do_find_public_src): Likewise.
3202 (__class_type_info::do_dyncast): Likewise.
3203 (__si_class_type_info::do_dyncast): Likewise.
3204 (__vmi_class_type_info::do_dyncast): Likewise.
3205 (__class_type_info::do_upcast): Likewise.
3206 (__si_class_type_info::do_upcast): Likewise.
3207 (__vmi_class_type_info::do_upcast): Likewise.
3208 (__dynamic_cast): Likewise.
3209
3210 * tinfo2.cc (__fundamental_type_info): Define new class.
3211 (__pointer_type_info): Likewise.
3212 (__reference_type_info): Likewise.
3213 (__array_type_info): Likewise.
3214 (__function_type_info): Likewise.
3215 (__enum_type_info): Likewise.
3216 (__ptr_to_member_type_info): Likewise.
3217 (__fundamental_type_info::~__fundamental_type_info): Define.
3218 (__pointer_type_info::~__pointer_type_info): Likewise.
3219 (__reference_type_info::~__reference_type_info): Likewise.
3220 (__array_type_info::~__array_type_info): Likewise.
3221 (__function_type_info::~__function_type_info): Likewise.
3222 (__enum_type_info::~__enum_type_info): Likewise.
3223 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3224 (__pointer_type_info::do_catch): Define new function.
3225 (__ptr_to_member_type_info::do_catch): Define new function.
3226
3227 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3228 (__is_pointer): Likewise.
3229
3230 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3231
3232 2000-01-30 Mark Mitchell <mark@codesourcery.com>
3233
3234 * cp/class.c (build_vtable): Rename to build_primary_vtable.
3235 (prepare_fresh_vtable): Rename to build_secondary_vtable.
3236 (make_new_vtable): New function.
3237 (modify_vtable_entry): Handle generation of new vtables correctly.
3238 (modify_one_vtable): Remove unused parameter.
3239 (dfs_fixup_vtable_deltas): Likewise.
3240 (override_one_vtable): Use build_secondary_vtable.
3241 (finish_struct_1): Use build_primary_vtable and
3242 build_secondary_vtable.
3243
3244 2000-01-28 Ulrich Drepper <drepper@redhat.com>
3245
3246 * cp/decl.c: Adjust variable names, comments, help strings.
3247
3248 2000-01-29 Nathan Sidwell <nathan@acm.org>
3249
3250 * new2.cc (operator delete[]): Use operator delete, don't assume
3251 implementation.
3252
3253 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
3254
3255 * class.c (build_vtbl_initializer): Add argument to
3256 build_vtable_entry call.
3257
3258 2000-01-27 Mark Mitchell <mark@codesourcery.com>
3259
3260 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3261 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3262 (BF_DELTA): New macro.
3263 (BF_VCALL_INDEX): Likewise.
3264 (BF_FN): Likewise.
3265 (THUNK_VCALL_OFFSET): Likewise.
3266 (make_thunk): Change prototype.
3267 * class.c (build_vtable_entry): Integrate
3268 build_vtable_entry_for_fn. Handle vcall indices.
3269 (build_vtable_entry_for_fn): Remove.
3270 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
3271 BF_VCALL_INDEX, BF_FN.
3272 (modify_vtable_entry): Integrate common code from
3273 modify_one_vtable and dfs_fixup_vtable_deltas.
3274 (add_virtual_function): Set BF_VCALL_INDEX.
3275 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
3276 and BF_FN.
3277 (modify_one_vtable): Simplify.
3278 (dfs_fixup_vtable_deltas): Likewise.
3279 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
3280 * method.c (make_thunk): Handle vcall indices.
3281
3282 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
3283
3284 Compiler side new abi rtti (not enabled).
3285 * cp-tree.h (new_abi_rtti_p): New macro.
3286 (emit_support_tinfos): Prototype new function.
3287 (tinfo_decl_p): Likewise.
3288 (emit_tinfo_decl): Likwise.
3289 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3290 macros.
3291 (doing_runtime): New local static.
3292 (init_rtti_processing): Add new-abi initializer.
3293 (get_tinfo_decl): Add new-abi logic.
3294 (tinfo_from_decl): Likewise.
3295 (build_dynamic_cast_1): Likewise.
3296 (qualifier_flags): New static function.
3297 (tinfo_base_init): Likewise.
3298 (generic_initializer): Likewise.
3299 (ptr_ref_initializer): Likewise.
3300 (ptmd_initializer): Likewise.
3301 (class_hint_flags): Likewise.
3302 (class_initializer): Likewise.
3303 (synthesize_tinfo_var): Likewise.
3304 (create_real_tinfo_var): Likewise.
3305 (create_pseudo_type_info): Likewise.
3306 (get_vmi_pseudo_type_info): Likewise.
3307 (create_tinfo_types): Likewise.
3308 (emit_support_tinfos): New global function.
3309 (tinfo_decl_p): New global predicate.
3310 (emit_tinfo_decl): New global function.
3311 * class.c (set_rtti_entry): Generalize for old and new rtti.
3312 (build_vtbl_initializer): Likewise.
3313 * decl2.c (finish_file): Likewise.
3314
3315 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
3316
3317 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3318 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3319
3320 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
3321
3322 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3323 for scopes.
3324
3325 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
3326
3327 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3328
3329 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3330
3331 * optimize.c (calls_setjmp_r): Supply new argument
3332 to special_function_p.
3333
3334 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3335
3336 * call.c: PROTO -> PARAMS.
3337 * class.c: Likewise.
3338 * cp-tree.h: Likewise.
3339 * cvt.c: Likewise.
3340 * decl.c: Likewise.
3341 * decl.h: Likewise.
3342 * decl2.c: Likewise.
3343 * dump.c: Likewise.
3344 * errfn.c: Likewise.
3345 * error.c: Likewise.
3346 * except.c: Likewise.
3347 * expr.c: Likewise.
3348 * init.c: Likewise.
3349 * input.c: Likewise.
3350 * lex.c: Likewise.
3351 * lex.h: Likewise.
3352 * method.c: Likewise.
3353 * optimize.c: Likewise.
3354 * parse.y: Likewise.
3355 * pt.c: Likewise.
3356 * repo.c: Likewise.
3357 * rtti.c: Likewise.
3358 * search.c: Likewise.
3359 * semantics.c: Likewise.
3360 * spew.c: Likewise.
3361 * tree.c: Likewise.
3362 * typeck.c: Likewise.
3363 * typeck2.c: Likewise.
3364 * xref.c: Likewise.
3365
3366 2000-01-25 Richard Henderson <rth@cygnus.com>
3367
3368 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3369
3370 2000-01-25 Mark Mitchell <mark@codesourcery.com>
3371
3372 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3373 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3374 (struct vcall_offset_data_s): New type.
3375 (dfs_vcall_offset_queue_p): New function.
3376 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3377 (build_vcall_offset_vtbl_entries): Likewise.
3378 (layout_vtable_decl): Likewise.
3379 (num_vfun_entries): Likewise.
3380 (num_extra_vtbl_entries): Add the entries for vcall offsets.
3381 (build_vtbl_initializer): Likewise.
3382 (dfs_finish_vtabls): Use layout_vtable_decl.
3383 (modify_one_vtables): Always duplicate vtables under the new ABI.
3384 (finish_struct_1): Use layout_vtable_decl.
3385
3386 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3387
3388 * decl.c (member_function_or_else): Change third arg from a format
3389 specifier to an `enum overload_flags'. Callers changed.
3390
3391 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
3392
3393 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3394 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3395 build_const_cast, get_delta_difference, check_return_expr): Avoid
3396 ANSI string concatenation usage.
3397
3398 2000-01-24 Mark Mitchell <mark@codesourcery.com>
3399
3400 * class.c (layout_class_type): Put the fields required to make a
3401 class non-empty at the end, not the beginning, of the TYPE_FIELDs
3402 list.
3403
3404 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
3405
3406 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3407 template.
3408
3409 * decl2.c (mark_used): Do instantiate inlines that have been
3410 explicitly instantiated.
3411
3412 2000-01-24 Richard Henderson <rth@cygnus.com>
3413
3414 * call.c (build_over_call): Use expand_tree_builtin.
3415 * typeck.c (build_function_call_real): Likewise.
3416 (build_binary_op_nodefault): Handle unordered compares.
3417
3418 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3419
3420 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3421 cp_tree_index values.
3422 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3423 New global node #defines for them.
3424 * rtti.c (call_void_fn): Replace with ...
3425 (build_runtime_decl): ... new static function.
3426 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3427 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3428 (build_dynamic_cast_1): Always produce correctly typed result.
3429 Explicitly produce type_info addresses. Use dynamic_cast_node.
3430 * exception.cc (__throw_bad_cast): Return `void *'.
3431 (__throw_bad_typeid): Return `const type_info &'.
3432
3433 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3434
3435 * cp-tree.h (get_vtable_decl): Prototype new function.
3436 * class.c (get_vtable_decl): New function. Broken out from ...
3437 (build_vtable): ... here. Use it.
3438 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3439 by get_vtable_decl.
3440
3441 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3442
3443 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3444 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3445 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3446 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3447 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3448 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3449 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3450 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3451 (CPTI_TINFO_VAR_ID): New enumeration.
3452 (__tp_desc_type_node, __access_mode_type_node,
3453 __bltn_desc_type_node, __user_desc_type_node,
3454 __class_desc_type_node, __ptr_desc_type_node,
3455 __attr_desc_type_node, __func_desc_type_node,
3456 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3457 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3458 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3459 enum_desc_type_node, class_desc_type_node,
3460 si_class_desc_type_node, vmi_class_desc_type_node,
3461 ptmd_desc_type_node, base_desc_type_node): New #defines.
3462 (tinfo_fn_id, tinfo_fn_type): Rename to ...
3463 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3464 (tinfo_var_id): New enumeration.
3465 (DECL_TINFO_FN_P): Augment comment.
3466 * decl.c (cp_global_trees): Adjust documentation.
3467 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3468 tinfo_decl_type and tinfo_var_id.
3469 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3470 (build_typeid): Remove unused variable.
3471 (get_tinfo_var): Use tinfo_var_id.
3472 (tinfo_name): New static function.
3473 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3474 (tinfo_from_decl): Likewise.
3475 (get_base_offset): New static function, broken out of
3476 expand_class_desc.
3477 (expand_si_desc): Use tinfo_name.
3478 (expand_class_desc): Likewise. Lose local static variable.
3479 Use base_desc_type_node. Use get_base_offset.
3480 (expand_ptr_desc): Use tinfo_name.
3481 (expand_attr_desc): Likewise.
3482 (expand_generic_desc): Likewise.
3483
3484 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3485 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3486
3487 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3488
3489 * cp-tree.h (__eprintf): Remove declaration.
3490 * tree.c (__eprintf): Remove definition.
3491
3492 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
3493 Mark Mitchell <mark@codesourcery.com>
3494
3495 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3496 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3497
3498 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
3499
3500 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3501
3502 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3503
3504 * cp-tree.h (register_dtor_fn): New function.
3505 * decl.c (destroy_local_static): Rename to ...
3506 (register_dtor_fn): ... this. Give it external linkage.
3507 (expand_static_init): Use it.
3508 * decl2.c (do_static_initialization): Likewise, if using
3509 __cxa_atexit.
3510 (do_static_destruction): Check that __cxa_atexit is not in use.
3511 (finish_file): Don't call do_static_destruction if using
3512 __cxa_atexit.
3513
3514 * typeck.c (convert_arguments): Restore two-message error
3515 reporting.
3516
3517 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
3518
3519 Remap dynamic cast hint values to be consistent across ABIs.
3520 * search.c (dynamic_cast_base_recurse): Remap generated value.
3521 (get_dynamic_cast_base_type): Adjust documentation.
3522 * tinfo.h (__user_type_info::dyncast): Likewise.
3523 (__user_type_info::find_public_subobj): Remap BOFF meaning.
3524 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3525 (__class_type_info::do_dyncast): Likewise.
3526 (__class_type_info::do_find_public_subobj): Likewise.
3527 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
3528
3529 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3530
3531 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3532
3533 * typeck2.c (incomplete_type_error): Restore previous
3534 cp_error and cp_error_at call sequence.
3535
3536 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
3537
3538 * class.c (dump_class_hierarchy): Make format agree with argument;
3539 cast pointer to unsigned long and print with %lx.
3540
3541 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3542
3543 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3544
3545 * typeck.c (composite_pointer_type, common_type,
3546 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3547 build_function_call_real, convert_arguments,
3548 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3549 build_unary_op, mark_addressable, build_compound_expr,
3550 build_static_cast, build_reinterpret_cast, build_const_cast,
3551 build_c_cast, build_modify_expr, get_delta_difference,
3552 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
3553 'ISO C++'. Fusion consecutive calls to diagnotic message routines
3554 into a single one.
3555 * typeck2.c (readonly_error, abstract_virtuals_error,
3556 process_init_constructor, check_for_new_type): Likewise.
3557
3558 2000-01-19 Mark Mitchell <mark@codesourcery.com>
3559
3560 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3561 VAR_DECLs.
3562
3563 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
3564
3565 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
3566 (build_x_typeid): Likewise.
3567 (get_tinfo_fn): Likewise.
3568 (get_tinfo_fn_unused): Rename to ...
3569 (get_tinfo_decl): ... here.
3570 * rtti.c (build_headof): Replace logic error with assertion.
3571 (get_tinfo_fn_dynamic): Rename to ...
3572 (get_tinfo_decl_dynamic): ... here. Make static. Use
3573 complete_type_or_else.
3574 (build_x_typeid): Move into ...
3575 (build_typeid): ... here. Adjust call to
3576 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
3577 throw_bad_typeid expression.
3578 (get_tinfo_fn_unused): Rename to ...
3579 (get_tinfo_decl): ... here. Adjust comment.
3580 (get_tinfo_fn): Delete.
3581 (tinfo_from_decl): New static function.
3582 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
3583 (get_typeid): Use complete_type_or_else.
3584 (build_dynamic_cast_1): Adjust calls to
3585 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
3586 * parse.y (primary): Adjust call to build_typeid.
3587 * except.c (build_eh_type_type_ref): Adjust call to
3588 get_tinfo_decl. Mark as used.
3589 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
3590 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
3591 * parse.c: Regenerated.
3592
3593 2000-01-17 Mark Mitchell <mark@codesourcery.com>
3594
3595 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
3596 calling convention.
3597 (resolves_to_fixed_type_p): Document calling convention.
3598 * rtti.c (build_x_typeid): Initialize NONNULL.
3599
3600 * cp-tree.h (build_shared_int_cst): New function.
3601 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
3602 * class.c (modify_vtable_entry): Likewise.
3603 (add_virtual_function): Split out code to generated shared
3604 INTEGER_CSTs to build_share_int_cst.
3605 (modify_all_vtables): Handle all the overridden functions here.
3606 Add overridden functions from non-primary virtual bases to the
3607 primary vtable.
3608 (finish_struct_1): Adjust call to modify_all_vtables. Add
3609 overridden functions from non-primary bases to the vtable.
3610 * tree.c (build_shared_int_cst): New function.
3611
3612 * cp-tree.h (scratchalloc): Remove.
3613 (build_scratch_list): Likewise.
3614 * call.c (convert_class_to_reference): Replace build_scratch_list
3615 and build_expr_list with build_tree_list.
3616 (add_candidate): Replace scratchalloc with expralloc. Note memory
3617 leak.
3618 (build_user_type_conversion_1): Replace build_scratch_list
3619 and build_expr_list with build_tree_list.
3620 (build_new_op): Likewise.
3621 (build_op_delete_call): Likewise.
3622 (convert_like): Likewise.
3623 * cvt.c (ocp_convert): Likewise.
3624 * decl.c (start_decl): Likewise.
3625 (start_function): Likewise.
3626 (finish_destructor_body): Likewise.
3627 (maybe_build_cleanup_1): Likewise.
3628 * decl2.c (reparse_decl_as_expr): Likewise.
3629 * init.c (perform_member_init): Likewise.
3630 (expand_cleanup_for_base): Likewise.
3631 (build_builtin_delete_call): Likewise.
3632 (build_new_1): Likewise.
3633 (build_delete): Likewise.
3634 * method.c (do_build_assign_ref): Likewise.
3635 * parse.y (already_scoped_stmt): Likewise.
3636 (nontrivial_exprlist): Likewise.
3637 (net_initializer): Likewise.
3638 (initlist): Likewise.
3639 * parse.c: Regenerated.
3640 * rtti.c (build_x_typeid): Likewise.
3641 (build_dynamic_cast_1): Likewise.
3642 * typeck.c (build_x_compound_expr): Likewise.
3643 (build_static_cast): Likewise.
3644 (build_modify_expr): Likewise.
3645
3646 * cp-tree.h (DECL_VINDEX): Add documentation.
3647 * class.c (build_vtable_entry): Likewise.
3648 (start_vtable): Add comment.
3649 (add_virtual_function): Replace pending_hard_virtuals with
3650 overridden_virtuals and pending_virtuals with new_virtuals.
3651 Replace redundant assignments with assertions.
3652 (check_for_override): Add comment.
3653 (check_bases_and_members): Replace pending_hard_virtuals with
3654 overridden_virtuals and pending_virtuals with new_virtuals.
3655 (create_vtbl_ptr): Likewise.
3656 (layout_class_type): Likewise.
3657 (finish_struct_1): Likewise. Add comments.
3658
3659 2000-01-16 Mark Mitchell <mark@codesourcery.com>
3660
3661 * class.c (finish_struct_1): Replace redundant code with
3662 assertions.
3663
3664 * cp-tree.h (flag_new_abi): Move.
3665 (flag_use_cxa_atexit): Likewise.
3666 (flag_honor_std): Likewise.
3667 (flag_rtti): Likewise.
3668 (vbase_offsets_in_vtable_p): Define.
3669 (vptrs_present_everywhere_p): Likewise.
3670 (TYPE_CONTAINS_VPTR_P): Likewise.
3671 (dfs_walk_real): Declare.
3672 * class.c (build_vbase_pointer_fields): Check
3673 vbase_offsets_in_vtable_p.
3674 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3675 BINFO_VPTR_FIELD.
3676 (build_vbase_offset_vtbl_entries): Simplify.
3677 (build_vbase_offset_vtbl_entries): Adjust.
3678 (build_vbase_pointer): Add ability to look up vbase offsets in
3679 vtable.
3680 (start_vtable): New function.
3681 (add_virtual_function): Use it.
3682 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3683 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3684 (build_vtbl_initializer): Take the type of the complete object as
3685 input. Use it to correctly calculate vbase offsets.
3686 (dfs_finish_vtbls): Pass the complete type to
3687 build_vtbl_initializer.
3688 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3689 (create_vtable_ptr): Create a vtable even if there are no
3690 new virtual functions, under the new ABI.
3691 (finish_struct_1): Likewise.
3692 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3693 * decl.c (exapnd_static_init): Remove call to
3694 preserve_initializer.
3695 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3696 vtables.
3697 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3698 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3699 (construct_virtual_bases): Don't initialize virtual base pointers
3700 under the new ABI.
3701 (build_aggr_init): Clean up comment.
3702 (expand_aggr_init_1): Likewise.
3703 * rtti.c (expand_class_desc): Store the virtual function table
3704 index where the vbase offset lives in the offset field.
3705 * search.c (dfs_walk_real): Make it global.
3706 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3707 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3708
3709 * tinfo.h (USItype): Make it signed under the new ABI.
3710 * tinfo.cc (convert_to_base): New function. Encapsulate base
3711 conversion logic here.
3712 (__class_type_info::do_upcast): Use it.
3713 (__class_type_info::do_dyncast): Likewise.
3714 (__class_type_info::do_find_public_subobj): Likewise.
3715
3716 * init.c (construct_virtual_bases): Don't look up the addresses of
3717 virtual bases at run-time.
3718
3719 * class.c (build_vbase_pointer): Relocate.
3720 (build_vbase_pointer_fields): Likewise.
3721 (dfs_build_vbase_offset_vtbl_entries): Likewise.
3722 (build_vbase_offset_vtbl_entries): Likewise.
3723
3724 * decl.c (init_decl_processing): Complain if -fnew-abi
3725 -fno-vtable-thunks is used.
3726
3727 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3728 flag_new_abi.
3729
3730 2000-01-15 Mark Mitchell <mark@codesourcery.com>
3731
3732 * cp-tree.h (num_extra_vtbl_entries): New function.
3733 (size_extra_vtbl_entries): Likewise.
3734 (dfs_vtable_path_unmark): Likewise.
3735 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3736 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3737 * class.c (num_extra_vtbl_entries): New function.
3738 (size_extra_vtbl_entries): Likewise.
3739 (dfs_build_vbase_offset_vtbl_entries): New function.
3740 (build_vbase_offset_vtbl_entries): Likewise.
3741 (build_vtbl_initializer): Use it.
3742 (finish_struct_1): Adjust vtable sizes (using
3743 num_extra_vtbl_entries).
3744 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3745 THUNK_DECL is non-NULL before expanding it.
3746 * init.c (expand_virtual_init): Adjust the vtable pointer by
3747 size_extra_vtbl_entries before storing it.
3748 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3749 Handle TREE_LIST parameters here, not in the dfs_* functions.
3750 (dfs_unmarked_real_bases_queue_p): Adjust.
3751 (dfs_marked_real_bases_queue_p): Likewise.
3752 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3753 (dfs_vtable_path_marked_real_bases_queue_p): New function.
3754 (dfs_vtable_path_unmark): Likewise.
3755
3756 2000-01-14 Mark Mitchell <mark@codesourcery.com>
3757
3758 * optimize.c (copy_body_r): Clear the operand three of a
3759 TARGET_EXPR when copying it.
3760
3761 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3762
3763 * method.c (build_decl_overload_real): Check whether we are in ::
3764 before returning __builtin_new/delete.
3765
3766 2000-01-13 Mark Mitchell <mark@codesourcery.com>
3767
3768 * pt.c (tsubst_friend_function): Improve comment.
3769 (instantiate_decl): Avoid crashing when a "nested" function is
3770 instantiated from the top level.
3771
3772 * dump.c (dqeueue_and_dump): Dump
3773 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3774
3775 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3776
3777 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3778
3779 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
3780
3781 * g++spec.c (lang_specific_driver): Add -fnew-abi if
3782 ENABLE_NEW_GXX_ABI defined.
3783 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3784 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3785 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3786
3787 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3788
3789 * decl.c (start_cleanup_fn): Call pushdecl.
3790
3791 * call.c (convert_class_to_reference): Fix typos.
3792 (build_conditional_expr): Handle errors gracefully.
3793 * class.c (push_nested_class): Likewise.
3794 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3795 (DECL_THIS_EXTERN): Use it.
3796 (DECL_THIS_STATIC): Likewise.
3797 * cvt.c (convert_to_void): Handle errors gracefully.
3798 (build_expr_type_conversion): Likewise.
3799 * decl.c (maybe_push_decl): Likewise.
3800 (start_decl_1): Likewise.
3801 (require_complete_types_for_parms): Likewise.
3802 * parse.y (structsp): Likewise.
3803 (base_class): Likewise.
3804 * parse.c: Regenerated.
3805 * pt.c (finish_member_template_decl): Likewise.
3806 * typeck.c (decay_conversion): Likewise.
3807
3808 * cp-tree.h (dfs_skip_vbases): New function.
3809 (find_vbase_instance): Likewise.
3810 * class.c (determine_primary_base): Allow a nearly empty base to
3811 serve as a primary base class under the new ABI.
3812 (get_class_offset_1): Rename to ...
3813 (dfs_get_class_offset): ... this. Simplify. Don't issue error
3814 messages here.
3815 (get_class_offset): Use it. Issue error messages here.
3816 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3817 find the right copies of virtual bases.
3818 (fixup_vtable_deltas1): Rename to ...
3819 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
3820 bases as primary bases.
3821 (fixup_vtable_deltas): Remove.
3822 (override_one_vtable): Handle virtual bases as primary bases.
3823 (merge_overrides): Likewise.
3824 (finish_struct_1): Likewise.
3825 (dump_class_hierarchy): Dump primary-ness of bases as well.
3826 * search.c (mark_primary_bases): Use a pre-order traversal to
3827 handle primary virtual bases.
3828 (dfs_skip_vbases): New fiunction.
3829 (expand_upcast_fixups): Adjust to handle primary virtual bases.
3830 (fixup_virtual_upcast_offsets): Likewise.
3831 (fixup_all_virtual_upcast_offsets): Likewise.
3832 (dfs_find_vbase_instances): New function.
3833 (find_vbase_instance): Likewise.
3834
3835 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
3836
3837 * lex.c (DIR_SEPARATOR): Delete macro.
3838
3839 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
3840
3841 * decl2.c (lang_decode_option): Handle automatic line wrapping
3842 option.
3843
3844 2000-01-11 Mark Mitchell <mark@codesourcery.com>
3845
3846 * friend.c (do_friend): Don't resolve scopes when processing
3847 template declarations, even if the qualifying scope doesn't
3848 involve template parameters.
3849
3850 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3851
3852 * class.c (dfs_modify_vtables_queue_p): Remove.
3853 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3854 and dfs_marked_real_bases_queue_p instead of
3855 dfs_modify_vtables_queue_p.
3856
3857 * class.c (build_vbase_path): Simplify.
3858 (dfs_propagate_binfo_offsets): New function.
3859 (propagate_binfo_offsets): Use it.
3860 (remove_base_field): Simplify.
3861 (dfs_set_offset_for_vbases): Remove.
3862 (dfs_set_offset_for_shared_vbases): New function.
3863 (dfs_set_offset_for_unshared_vbases): Likewise.
3864 (layout_virtual_bases): Use them.
3865 (layout_basetypes): Don't call propagate_binfo_offsets.
3866 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3867 for the vbases.
3868
3869 * class.c (build_base_field): New function, split out from ...
3870 (build_base_fields): ... here. Use it. Allocate primary bases
3871 first, under the new ABI.
3872 (get_vtable_entry): Remove.
3873 (remove_base_field): New function, split out from ...
3874 (remove_base_fields): ... here. Adjust since primary bases come
3875 first under the new ABI.
3876
3877 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3878 (initialize_vtbl_ptrs): New function.
3879 (expand_indirect_vtbls_init): Change prototype.
3880 (convert_pointer_to_vbase): Declare.
3881 * init.c (expand_direct_vtbls_init): Remove.
3882 (dfs_initialize_vtbl_ptrs): New function.
3883 (initialize_vtbl_ptrs): Likewise.
3884 (emit_base_init): Use initialize_vtbl_ptrs.
3885 * search.c (convert_pointer_to_vbase): Make it global.
3886 (expand_indirect_vtbls_init): Remove vtable initialization code.
3887 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3888
3889 * class.c (dfs_finish_vtbls): New function.
3890 (finish_vtbls): Use it.
3891 (dump_class_hierarchy): New function.
3892
3893 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3894 (BINFO_VBASE_PRIMARY_P): New macro.
3895 (BINFO_VIRTUALS): Add to documentation.
3896 (SET_BINFO_PRIMARY_MARKED_P): Remove.
3897 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3898 (dfs_mark_primary_bases_queue_p): Likewise.
3899 (dfs_unmarked_real_bases_queue_p): New function.
3900 (dfs_marked_real_bases_queue_p): Likewise.
3901 * search.c (dfs_mark_primary_bases): Adjust.
3902 (mark_primary_bases): Likewise.
3903 (get_shared_vbase_if_not_primary): New function.
3904 (dfs_unmarked_real_bases_queue_p): Likewise.
3905 (dfs_marked_real_bases_queue_p): Likewise.
3906 (dfs_get_pure_virtuals): Simplify.
3907 (get_pure_virtuals): Likewise.
3908
3909 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3910
3911 * lex.c: Include tm_p.h.
3912
3913 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
3914
3915 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3916
3917 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
3918
3919 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3920 * pt.c (instantiate_decl): Defer comdat templates that might not be
3921 needed.
3922
3923 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3924 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3925 (finish_file): Likewise.
3926
3927 * decl2.c (import_export_class): Undo 12/14 change.
3928
3929 * error.c (dump_decl): operator new, not operatornew.
3930
3931 * class.c (field_decl_cmp): A nontype is "greater" than a type.
3932 * search.c (lookup_field_1): Look for the last field with the
3933 desired name.
3934
3935 2000-01-05 Nathan Sidwell <nathan@acm.org>
3936
3937 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3938 FUNCTION_DECL.
3939
3940 2000-01-05 Nathan Sidwell <nathan@acm.org>
3941
3942 * typeck.c (build_static_cast): Don't strip target qualifiers
3943 when casting from a class.
3944
3945 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3946
3947 * class.c (warn_hidden): Initialize variable `fndecl'.
3948
3949 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
3950
3951 * decl.c (flag_isoc9x): New variable to be able to use code in
3952 c-common.c. For now always zero.
3953
3954 2000-01-03 Mark Mitchell <mark@codesourcery.com>
3955
3956 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3957 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3958 or unshare_base_binfos for virtual bases here.
3959 * search.c (dfs_get_vbase_types): Do it here.
3960 (get_vbase_types): Adjust.
3961
3962 2000-01-02 Mark Mitchell <mark@codesourcery.com>
3963
3964 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3965 (BINFO_PRIMARY_MARKED_P): Use flag 5.
3966 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3967 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3968 (unmark_primary_bases): Remove declaration.
3969 (unmarkedp): Declare.
3970 (dfs_vbase_unmark): Likewise.
3971 * class.c (determine_primary_base): Return immediately if there
3972 are no base classes. Call mark_primary_bases here.
3973 (modify_all_direct_vtables): Remove.
3974 (modify_all_indirect_vtables): Remove.
3975 (dfs_modify_vtables_queue_p): New function.
3976 (dfs_modify_vtables): New function.
3977 (modify_all_vtables): Use them.
3978 (build_base_fields): Build FIELD_DECLs for primary virtual base
3979 classes.
3980 (create_vtable_ptr): Don't call determine_primary_base here.
3981 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3982 (dfs_set_offset_for_vbases): ... this.
3983 (layout_virtual_bases): Use it.
3984 (layout_class_type): Call determine_primary_base here.
3985 * search.c (unmarkedp): Make it global.
3986 (shared_marked_p): Simplify.
3987 (shared_unmarked_p): Likewise.
3988 (dfs_primary_bases_queue_p): Remove.
3989 (dfs_unmark_primary_bases): Likewise.
3990 (unmark_primary_bases): Likewise.
3991 (mark_primary_bases): Simplify.
3992 (get_pure_virtuals): Don't call mark_primary_bases here.
3993 (dfs_vbase_unmark): New function.
3994 (get_vbase_types): Simplify.
3995
3996 * class.c (struct base_info): Remove.
3997 (determine_primary_base): Take has_virtual_p rather than a
3998 base_info as input. Don't calculate max_has_virtual.
3999 (finish_struct_bits): Remove max_has_virtual argument.
4000 (create_vtable_ptr): Remove max_has_virtual_p argument.
4001 (layout_virtual_bases): Remove max argument.
4002 (layout_basetypes): Likewise.
4003 (layout_class_type): Remove max_has_virtual_p argument.
4004 (finish_struct_1): Remove max_has_virtual.
4005
4006 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4007 (layout_basetypes): Remove.
4008 * class.c (propagate_binfo_offsets): Moved here from tree.c.
4009 Update to handle primary virtual bases.
4010 (remove_base_fields): New function, split out from
4011 layout_basetypes.
4012 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4013 (layout_virtual_bases): New function, split out from
4014 layout_basetypes. Update to handle primary virtual bases.
4015 (layout_basetypes): Moved here from tree.c. Use
4016 remove_base_fields and layout_virtual_bases.
4017 * search.c (dfs_mark_primary_bases_queue_p): New function.
4018 (mark_primary_bases): Use it.
4019 * tree.c (CEIL): Remove.
4020 (propagate_binfo_offsets): Remove.
4021 (layout_basetypes): Remove.
4022
4023 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4024
4025 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4026 (BINFO_PRIMARY_MARKED_P): New macro.
4027 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4028 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4029 (mark_primary_bases): New function.
4030 (unmark_primary_bases): Likewise.
4031 * search.c (get_abstract_virtuals_1): Remove.
4032 (dfs_mark_primary_bases): New function.
4033 (mark_primary_bases): Likewise.
4034 (dfs_unmark_primary_bases): Likewise.
4035 (unmark_primary_bases): Likewise.
4036 (dfs_get_pure_virtuals): Likewise.
4037
4038 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4039
4040 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4041 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4042 (modify_one_vtable): Adjust.
4043 (fixup_vtable_deltas1): Likewise.
4044 (override_one_vtable): Likewise.
4045 * search.c (get_abstract_virtuals_1): Likewise.
4046 (get_pure_virtuals): Likewise.
4047 (expand_upcast_fixups): Likewise.
4048 * tree.c (debug_binfo): Likewise.
4049
4050 * class.c (build_vtable): Don't return a value. Don't rebuild
4051 vtables for bases that have already been handled.
4052 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4053 already been handled.
4054 (modify_one_vtable): Adjust accordingly.
4055 (fixup_vtable_deltas1): Likewise.
4056 (finish_struct_1): Likewise.
4057
4058 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4059
4060 * call.c (build_new_method_call): Also check destructors.
4061
4062 1999-12-31 Mark Mitchell <mark@codesourcery.com>
4063
4064 * cp-tree.h (VF_NORMAL_VALUE): Remove.
4065 * class.c (struct base_info): Remove vfield, vfields, and rtti.
4066 (set_primary_base): New function, split out from ...
4067 (finish_base_struct): ... here. Rename to ...
4068 (determine_primary_base): ... this. Simplify.
4069 (create_vtable_ptr): Tweak accordingly.
4070 (finish_struct_1): Simplify.
4071
4072 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4073 (CLASSTYPE_N_BASECLASSES): Likewise.
4074 (BINFO_FOR_VBASE): New macro.
4075 (get_vbase_types): Change prototype.
4076 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4077 (prepare_fresh_vtable): Likewise.
4078 (finish_vtbls): Likewise.
4079 (get_class_offset_1): Likewise.
4080 (modify_all_indirect_vtables): Likewise.
4081 (build_vbase_pointer_fields): Likewise.
4082 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4083 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4084 (expand_member_init): Likewise.
4085 * search.c (get_base_distance): Likewise.
4086 (lookup_field_queue_p): Likewise.
4087 (virtual_context): Likewise.
4088 (get_vbase_types): Don't return a value. Set
4089 CLASSTYPE_VBASECLASSES here.
4090 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4091
4092 1999-12-30 Mark Mitchell <mark@codesourcery.com>
4093
4094 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4095
4096 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4097
4098 * class.c (create_vtable_ptr): Put the vtable at the beginning of
4099 the class, not the end, in the new ABI.
4100 * tree.c (propagate_binfo_offsets): Do the right thing for the new
4101 ABI.
4102
4103 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4104
4105 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
4106 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4107 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4108 (check_field_decls): Likewise.
4109 (check_bases_and_members): Likewise.
4110
4111 1999-12-28 Mark Mitchell <mark@codesourcery.com>
4112
4113 * cp-tree.h (do_inline_function_hair): Remove.
4114 * class.c (layout_class_type): New function, split out from
4115 finish_struct_1.
4116 (fixup_pending_inline): Likewise.
4117 (fixup_inline_methods): New function.
4118 * method.c (fixup_pending_inline): Remove.
4119 (do_inline_function_hair): Likewise.
4120
4121 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4122 new ABI.
4123
4124 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4125 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4126 (CLASSTYPE_PURE_VIRTUALS): ... this.
4127 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4128 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4129 (DECL_PURE_VIRTUAL_P): ... this.
4130 (get_abstract_virtuals): Rename to ...
4131 (get_pure_virtuals): ... this.
4132 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4133 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4134 CLASSTYPE_PURE_VIRTUALS.
4135 * class.c (build_vtable_entry): Likewise.
4136 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
4137 get_abstract_virtuals.
4138 (build_vtbl_initializer): Likewise.
4139 (override_one_vtable): Likewise.
4140 (check_methods): Likewise.
4141 * decl.c (duplicate_decls): Likewise.
4142 (redeclaration_error_message): Likewise.
4143 (lang_mark_tree): Likewise.
4144 * decl2.c (grok_function_init): Likewise.
4145 (import_export_vtable): Likewise.
4146 (import_expor_class): Likewise.
4147 * typeck2.c (abstract_virtuals_error): Likewise.
4148 * xref.c (GNU_xref_member): Likewise.
4149 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4150
4151 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
4152
4153 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4154 throughout.
4155
4156 1999-12-26 Mark Mitchell <mark@codesourcery.com>
4157
4158 * decl.c (store_return_init): Use mode of old RTL generated for
4159 DECL_RESULT, not the mode of DECL_RESULT itself.
4160 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4161 for functions that used named return values.
4162
4163 1999-12-24 Mark Mitchell <mark@codesourcery.com>
4164
4165 * semantics.c (expand_body): Use
4166 note_deferral_of_defined_inline_function.
4167
4168 1999-12-22 Mark Mitchell <mark@codesourcery.com>
4169
4170 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4171
4172 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4173
4174 * error.c (dump_decl): Support named return values.
4175
4176 1999-12-20 Mark Mitchell <mark@codesourcery.com>
4177
4178 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4179 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4180 (CLASSTYPE_PRIMARY_BINFO): Likewise.
4181 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4182 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4183 (check_bases_and_members): Set them here instead.
4184 (create_vtable_ptr): New function, split out from ...
4185 (finish_struct_1): ... here. Use it. Tidy. Use
4186 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4187 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4188 the first field in the class.
4189 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
4190 seeing TYPE_VFIELD as the first field in the class.
4191
4192 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4193 (TYPE_POLYMORPHIC_P): ... this.
4194 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4195 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4196 (TREE_CALLS_NEW): Remove.
4197 (TREE_MANGLED): Likewise.
4198 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4199 and TYPE_POLYMORPHIC_P.
4200 * class.c (check_bases): Likewise.
4201 (finish_base_struct): Likewise.
4202 (finish_struct_bits): Likewise.
4203 (check_for_override): Likewise.
4204 (finish_struct_1): Likewise.
4205 (get_vfield_name): Likewise.
4206 * decl.c (xref_basetypes): Likewise.
4207 * decl2.c (import_export_class): Likewise.
4208 (import_export_decl): Likewise.
4209 * error.c (dump_function_decl): Likewise.
4210 * pt.c (instantiate_class_template): Likewise.
4211 * repo.c (repo_inline_used): Likewise.
4212 * rtti.c (build_headof): Likewise.
4213 (get_tinfo_fn_dynamic): Likewise.
4214 (build_x_typeid): Likewise.
4215 (get_tinfo_var): Likewise.
4216 (build_dynamic_cast_1): Likewise.
4217 (synthesize_tinfo_fn): Likewise.
4218 * search.c (lookup_field_1): Likewise.
4219 (dfs_debug_mark): Likewise.
4220 (maybe_suppress_debug_info): Likewise.
4221 * typeck.c (build_component_ref): Likewise.
4222 (build_component_addr): Likewise.
4223 * typeck2.c (process_init_constructor): Likewise.
4224
4225 1999-12-20 Nathan Sidwell <nathan@acm.org>
4226
4227 * typeck.c (strip_all_pointer_quals): New static function.
4228 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4229
4230 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4231
4232 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4233 (dso_handle_node): New macro.
4234 (flag_use_cxa_atexit): New variable.
4235 (declare_global_var): New function.
4236 (start_anon_func): Remove declaration.
4237 (end_anon_func): Likewise.
4238 * decl.c (get_atexit_node): New function, split out from
4239 destroy_local_static. Handle flag_use_cxa_atexit.
4240 (get_dso_handle_node): Likewise.
4241 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
4242 except.c. Handle flag_use_cxa_atexit.
4243 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
4244 except.c.
4245 (declare_global_var): New variable.
4246 (destroy_local_static): Handle flag_use_cxa_atexit.
4247 * decl2.c (flag_use_cxa_atexit): New variable.
4248 (lang_f_options): Likewise.
4249 * except.c (start_anon_func): Remove.
4250 (end_anon_func): Liekwise.
4251 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4252 * rtti.c (get_tinfo_var): Use declare_global_var.
4253
4254 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4255
4256 * class.c (check_field_decls): Don't return a value.
4257 (avoid_overlap): Moved here from tree.c.
4258 (build_base_fields): Likewise.
4259 (check_bases): New function, split out from finish_base_struct.
4260 (check_bases_and_members): New function, split out from
4261 finish_struct_1.
4262 (struct base_info): Remove cant_have_default_ctor,
4263 cant_have_const_ctor, cant_have_asn_ref.
4264 (finish_base_struct): Split semantic analysis into check_bases.
4265 (finish_struct_methods): Fix bogus assertion.
4266 (check_field_decls): Call finish_struct_anon here.
4267 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4268 (finish_struct_1): Use check_bases_and_members. Reorganize.
4269 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4270 (build_base_fields): Don't declare.
4271 * tree.c (avoid_overlap): Remove.
4272 (build_base_fields): Likewise.
4273
4274 * optimize.c (struct inline_data): Remove scope_stmt.
4275 (remap_block): Don't use insert_block_after_note. Don't update
4276 scope_stmt.
4277 (expand_call_inline): Don't update scope_stmt.
4278 (optimize_function): Don't initialize scope_stmt.
4279 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4280 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4281
4282 1999-12-15 Mark Mitchell <mark@codesourcery.com>
4283
4284 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4285 out of the class, rather than taking them as parameters.
4286 (build_vbase_pointer_fields): Move here from tree.c.
4287 (build_vtbl_or_vbase_field): New function.
4288 (check_methods): Likewise.
4289 (remove_zero_width_bitfields): Likewise.
4290 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4291 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
4292 USING_DECLs here.
4293 (finish_struct_methods): Handle the case where there are no
4294 methods here.
4295 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4296 (check_field_decls): Call delete_duplicate_fields here.
4297 (finish_struct_1): Tidy. Use check_methods and
4298 remove_zero_width_bitfields.
4299 * cp-tree.h (build_vbase_pointer_fields): Remove.
4300 * decl.c (grokdeclarator): Use tree_cons instead of
4301 temp_tree_cons.
4302 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4303 instead of temp_tree_cons.
4304 * lex.c (cons_up_default_function): Remove dead code.
4305 * method.c (fixup_pending_inline): New function, split out from ...
4306 (do_inline_function_hair): ... here.
4307 * tree.c (build_vbase_pointer_fields): Remove.
4308
4309 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
4310
4311 * tree.c (walk_tree): Walk operand subtrees in forward order.
4312 * optimize.c (expand_call_inline): Likewise.
4313 (optimize_function): Initialize id->scope_stmt to something useful.
4314 (remap_block): Assume id->scope_stmt has a useful value.
4315
4316 1999-12-15 Nathan Sidwell <nathan@acm.org>
4317
4318 * typeck.c (build_c_cast): Expand warning message. Move pointer
4319 alignment warning to after the cast. Don't warn about pointer
4320 alignment when given a pointer to incomplete.
4321
4322 1999-12-15 Richard Henderson <rth@cygnus.com>
4323
4324 * cp-tree.h (make_aggr_type): Declare.
4325 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4326 (make_aggr_type): New.
4327
4328 * decl.c (build_typename_type, init_decl_processing): Use it.
4329 (build_ptrmemfunc_type, xref_tag): Likewise.
4330 * except.c (call_eh_info): Likewise.
4331 * init.c (init_init_processing): Likewise.
4332 * pt.c (process_template_parm, lookup_template_class): Likewise.
4333 * rtti.c (expand_class_desc): Likewise.
4334 * semantics.c (begin_class_definition, finish_typeof): Likewise.
4335 * tree.c (copy_template_template_parm): Likewise.
4336
4337 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
4338
4339 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4340 sizeof (struct tree_common).
4341
4342 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
4343
4344 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4345 outermost block to point to the inlined function decl.
4346
4347 * error.c (dump_decl): operator==, not operator ==.
4348 (op_to_string): Likewise.
4349
4350 * decl.c (compute_array_index_type): Handle null name.
4351
4352 * decl2.c (ambiguous_decl): Fix to match comment.
4353 (lookup_using_namespace): Adjust.
4354
4355 * decl2.c (import_export_class): Don't ignore dllimport.
4356
4357 1999-12-14 Mark Mitchell <mark@codesourcery.com>
4358
4359 * class.c (check_field_decls): Split out from ...
4360 (finish_struct_1): ... here. Use it. Tidy.
4361
4362 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4363 * optimize.c (copy_body_r): Pass it.
4364 * tree.c (remap_save_expr): Clear walk_subtrees for an
4365 already-handled SAVE_EXPR.
4366 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4367
4368 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4369 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4370
4371 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4372
4373 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
4374
4375 * class.c (finish_base_struct): Allow multiple COM base classes
4376 as well as non-COM bases as long as it's not the leftmost.
4377
4378 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
4379
4380 * lex.c (saving_parse_to_obstack): New global.
4381 (reinit_parse_for_block): Use.
4382 (reinit_parse_for_expr): Use.
4383 (check_newline): Use.
4384
4385 1999-12-13 Mark Mitchell <mark@codesourcery.com>
4386
4387 * optimize.c (initialize_inlined_parameters): Take FN to which the
4388 parameters belong as an argument.
4389 (expand_call_inline): Expand calls into the parameter
4390 initializations before pushing the function onto the list of
4391 functions we are presently expanding.
4392
4393 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4394
4395 * class.c (get_vtable_name): Use a literal format string and
4396 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4397 (prepare_fresh_vtable): Likewise.
4398
4399 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4400 VTABLE_NAME_FORMAT.
4401
4402 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4403
4404 * init.c (build_vec_init): Initialize variable `try_body'.
4405
4406 * lex.c (yyerror): Don't call a variadic function with a
4407 non-literal format string.
4408
4409 * optimize.c (optimize_function): Call memset, not bzero.
4410
4411 * pt.c (for_each_template_parm_r): Add static prototype.
4412
4413 1999-12-09 Andreas Jaeger <aj@suse.de>
4414
4415 * except.c (expand_throw): Add static attribute to match
4416 prototype.
4417
4418 * Makefile.in (semantics.o): Add dependency on output.h.
4419 * semantics.c: Include output.h for declaration of
4420 make_function_rtl.
4421
4422 1999-12-09 Mark Mitchell <mark@codesourcery.com>
4423
4424 * decl.c (init_decl_processing): Reenable inlining on trees.
4425 (finish_function): Likewise.
4426 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4427 * semantics.c (simplify_aggr_init_exprs): New function.
4428 (expand_body): Use it.
4429 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4430 sometimes present the same sub-tree twice.
4431
4432 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4433 `csl'.
4434
4435 * semantics.c (finish_switch_cond): Do conversions here, not ...
4436 * typeck.c (c_expand_start_case): Here.
4437
4438 * semantics.c (do_poplevel): Remove unused variable.
4439
4440 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4441
4442 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4443 unless we're declaring the variable in question.
4444
4445 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4446
4447 * decl.c (init_decl_processing): #if 0 last patch.
4448 (finish_function): Likewise.
4449
4450 1999-12-05 Mark Mitchell <mark@codesourcery.com>
4451
4452 * decl.c (init_decl_processing): Set flag_inline_trees if
4453 !flag_no_inline.
4454
4455 * cp-tree.h (calls_setjmp_p): Declare.
4456 * decl.c (finish_function): Mark functions that call setjmp as
4457 uninlinable.
4458 * optimize.c (calls_setjmp_r): New function.
4459 (calls_setjmp_p): Likewise.
4460
4461 1999-12-04 Mark Mitchell <mark@codesourcery.com>
4462
4463 * optimize.c (expand_call_inline): Wrap the expanded call in an
4464 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4465 inlined functions.
4466
4467 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
4468 in_target_cleanup_p.
4469 (remap_decl): New function.
4470 (remap_block): Likewise.
4471 (copy_scope_stmt): Likewise.
4472 (copy_body_r): Use remap_decl and copy_scope_stmt.
4473 (copy_body): Use VARRAY_TOP_TREE.
4474 (initialize_inlined_parameters): Likewise.
4475 (declare_return_variable): Likewise.
4476 (inlinable_function_p): Check flag_inline_trees.
4477 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4478 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
4479 parameters of the inlined function.
4480 (optimize_function): Prevent recursion into partially complete
4481 functions.
4482
4483 * cp-tree.def (SCOPE_STMT): Take one operand.
4484 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4485 (SCOPE_NULLIFIED_P): Redefine.
4486 (SCOPE_NO_CLEANUPS_P): New macro.
4487 (add_scope_stmt): Change prototype.
4488 * decl.c (poplevel): Tidy. Warn about unused variables here.
4489 Record SCOPE_STMT_BLOCKs.
4490 (finish_function): Keep DECL_INITIAL for functions that might be
4491 inlined.
4492 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4493 * semantics.c: Include rtl.h.
4494 (add_scope_stmt): Return the new scope statement and, for an
4495 end-of-scope statement, its matching begin statement. Don't set
4496 SCOPE_NULLIFIED_P.
4497 (do_pushlevel): Simplify, now that we are always
4498 function-at-a-time.
4499 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
4500 (expand_stmt): Don't call expand_start_bindings or
4501 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4502 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4503 SCOPE_NULLIFIED_P.
4504 * Makefile.in (semantics.o): Depend on RTL_H.
4505
4506 * decl2.c (pending_statics_used): Make it a macro.
4507 (saved_inlines_used): Likewise.
4508 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4509 (mark_inline_for_output): Likewise.
4510 (ssdf_decls_used): Remove.
4511 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4512 (generate_ctor_or_dtor_function): Adjust accordingly.
4513
4514 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
4515 Greg McGary <gkm@gnu.org>
4516
4517 * decl.c (duplicate_decls): Merge
4518 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4519 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4520
4521 1999-12-02 Mike Stump <mrs@wrs.com>
4522
4523 * init.c (perform_member_init): Handle parse errors better.
4524
4525 1999-12-01 Mark Mitchell <mark@codesourcery.com>
4526
4527 * cp-tree.h (min_tree_cons): Remove.
4528 (scratch_ovl_cons): Likewise.
4529 * decl.c (saveable_obstack): Don't declare.
4530 (duplicate_decls): Tweak error-message.
4531 (initialize_local_var): Explicitly mark the definition as static.
4532 (finish_function): Call permanent_allocation, just so
4533 that the middle-end sees the obstacks it expects.
4534 (mark_cp_function_context): Likewise.
4535 * init.c (build_new): Don't use min_tree_cons.
4536 * lex.c (permanent_obstack): Don't declare.
4537 (current_obstack, saveable_obstack): Likewise.
4538 * spew.c (current_obstack, saveable_obstack): Likewise.
4539 * tree.c (current_obstack, saveable_obstack): Likewise.
4540 (scratch_ovl_cons): Remove.
4541 (build_min_nt): Don't mess with obstacks.
4542 (build_min): Likewise.
4543 (min_tree_cons): Remove
4544 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4545 (build_x_function_call): Likewise.
4546 (build_c_cast): Don't use min_tree_cons.
4547
4548 1999-11-29 Mark Mitchell <mark@codesourcery.com>
4549
4550 * pt.c (tsubst_decl): Robustify.
4551
4552 1999-11-27 Mark Mitchell <mark@codesourcery.com>
4553
4554 * decl2.c (finish_file): Call expand_body for inline functions
4555 that will be written out but that do not yet have RTL.
4556 * semantics.c (expand_body): Do not generate RTL For inline
4557 functions that do not yet need to be written out.
4558
4559 1999-11-25 Mark Mitchell <mark@codesourcery.com>
4560
4561 * Make-lang.in (CXX_SRCS): Add optimize.c.
4562 * Makefile.in (CXX_OBJS): Add optimize.o.
4563 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4564 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
4565 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
4566 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
4567 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
4568 (dump.o): Likewise.
4569 (optimize.o): New target.
4570 * class.c: Don't include splay-tree.h.
4571 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
4572 * cp-tree.h: Include splay-tree.h.
4573 (DECL_UNINLINABLE): New macro.
4574 (CTOR_BEGIN_P, CTOR_END_P): New macros.
4575 (flag_inline_trees): New variable.
4576 (local_variable_p): New function.
4577 (nonstatic_local_decl_p): Likewise.
4578 (optimize_function): Likewise.
4579 (cplus_unsave_expr_now): Remove.
4580 (copy_tree_r): Declare.
4581 (remap_save_expr): Likewise.
4582 * decl.c (local_variable_p): Don't
4583 make it static.
4584 (local_variable_p_walkfn): New function.
4585 (make_rtl_for_local_static): Remove code to try to avoid writing
4586 out static constants.
4587 (emit_local_var): Fix indentation.
4588 (nonstatic_local_decl_p): New function.
4589 (check_default_argument): Use local_variable_p_walkfn, not
4590 local_variable_p, when walking the tree.
4591 (start_function): Set the DECL_CONTEXT for automatically generated
4592 labels.
4593 (finish_constructor_body): Use CTOR_STMT to mark the end of a
4594 constructor.
4595 * decl2.c: Don't include splay-tree.h.
4596 (flag_inline_trees): Define.
4597 * dump.c: Don't include
4598 splay-tree.h.
4599 * except.c (expand_end_catch_block): Fix comment formatting.
4600 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
4601 (expand_throw): Tidy comment.
4602 * init.c (build_vec_delete_1): Use create_temporary_var.
4603 * lex.c (cplus_tree_code_type): Make it static.
4604 (cplus_tree_code_length): Likewise.
4605 (cplus_tree_code_name): Likewise.
4606 * optimize.c: New file.
4607 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
4608 with computed gotos.
4609 (setup_vtbl_ptr): Mark the beginnings of constructors with
4610 CTOR_STMT.
4611 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
4612 (expand_body): Call optimize_function. Save bodies if we're doing
4613 inlining on trees.
4614 * tree.c: Don't include splay-tree.h. Include insn-config.h and
4615 integrate.h.
4616 (copy_tree_r): Make it public.
4617 (statement_code_p): New function.
4618 (mark_local_for_remap_r): Likewise.
4619 (cp_usave_r): Likewise.
4620 (cp_unsave): Likewise.
4621 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
4622 (walk_tree): Walk into `s' class nodes. Walk statement chains.
4623 (copy_tree_r): Handle 's' class nodes. Restore chains for
4624 statements. Nullify scopes. Don't copy types.
4625 (init_tree): Set lang_unsave to cp_unsave.
4626 (remap_save_expr): Define.
4627 * ir.texi: Document CTOR_STMT.
4628
4629 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
4630
4631 * search.c (note_debug_info_needed): Do perform this optimization
4632 for dwarf2.
4633 (maybe_suppress_debug_info): Likewise. Start by clearing
4634 TYPE_DECL_SUPPRESS_DEBUG.
4635
4636 1999-11-24 Mark Mitchell <mark@codesourcery.com>
4637
4638 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4639
4640 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4641
4642 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4643
4644 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4645 function with a non-literal format string.
4646
4647 * lex.c (do_identifier): Likewise.
4648
4649 * typeck.c (build_unary_op): Likewise.
4650
4651 1999-11-23 Mark Mitchell <mark@codesourcery.com>
4652
4653 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4654
4655 1999-11-22 Mark Mitchell <mark@codesourcery.com>
4656
4657 * cp-tree.def (CTOR_COMPLETE): New tree node.
4658 * decl.c (finish_constructor_body): Add it, to mark the end of the
4659 constructor.
4660 (finish_function): Don't call end_protect_partials here.
4661 * ir.texi (CTOR_COMPLETE): Document it.
4662 * semantics.c (expand_stmt): Handle it.
4663
4664 * cp-tree.def (FUNCTION_NAME): New tree node.
4665 * cp-tree.h (current_function_name_declared): Tweak documentation.
4666 (lang_decl_flags): Add pretty_function_p, adjust dummy.
4667 (DECL_PRETTY_FUNCTION_P): New macro.
4668 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4669 etc., in a template function. Use at_function_scope_p instead of
4670 expanding it inline.
4671 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4672 specially.
4673 (tsubst): Handle FUNCTION_NAME.
4674 (tsubst_copy): Likewise.
4675 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4676 etc. in instantiation.
4677 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4678 even in template functions.
4679 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4680 conditional scope at the top of a destructor.
4681
4682 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4683 specializations too.
4684
4685 1999-11-22 Nathan Sidwell <nathan@acm.org>
4686
4687 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4688 when actually negative.
4689
4690 * typeck.c (convert_for_assignment): Expand comment about
4691 strange NULL check, moved from ...
4692 (convert_for_initialization): ... here. Remove unneeded
4693 code.
4694
4695 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4696
4697 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4698 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4699 Always destruct virtual bases of array components, but never
4700 delete them.
4701 (build_vec_init): Adjust invocations.
4702 (build_delete): Likewise.
4703 * decl2.c (delete_sanity): Likewise.
4704
4705 1999-11-19 Nathan Sidwell <nathan@acm.org>
4706
4707 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4708 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4709 * decl2.c (grok_method_quals): Accept `restrict' as applying to
4710 the object pointer. Return such qualifiers.
4711 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4712 variables.
4713
4714 1999-11-18 Mark Mitchell <mark@codesourcery.com>
4715
4716 * except.c (expand_end_catch_block): Fix typo.
4717 (expand_exception_blocks): Simplify. Don't call
4718 expand_leftover_cleanups.
4719
4720 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
4721
4722 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4723 * pt.c (tsubst, case INTEGER_TYPE): Call it.
4724 Check uses_template_parms.
4725
4726 * class.c (finish_struct): If we're a local class in a template
4727 function, add a TAG_DEFN.
4728 * pt.c (lookup_template_class): If this is a local class in a
4729 template function, call pushtag.
4730 (tsubst_expr, case TAG_DEFN): Handle classes, too.
4731
4732 Emit debug info with the vtable.
4733 * search.c (maybe_suppress_debug_info): New function...
4734 * class.c (finish_struct_1): ...split out from here.
4735 * cp-tree.h: Declare it.
4736 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4737 if we're writing out the vtable.
4738 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
4739 note_debug_info_needed): #if 0 out.
4740
4741 1999-11-14 Mark Mitchell <mark@codesourcery.com>
4742
4743 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4744 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4745 TREE_PERMANENT.
4746 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4747 * decl2.c (lookup_arg_dependent): Use it.
4748
4749 * cp-tree.h (cp_finish_decl): Change prototype.
4750 (finish_static_data_member_decl): Likewise.
4751 (push_permanent_obstack): Remove declaration.
4752 (push_expression_obstack): Likewise.
4753 (push_scratch_obstack): Likewise.
4754 (DECL_TEMPLATE_PARM_P): Robustify.
4755 (SET_DECL_TEMPLATE_PARM_P): New macro.
4756 * class.c (add_method): Don't manipulate obstacks.
4757 (finish_vtbls): Likewise.
4758 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4759 * decl.c (binding_for_name): Don't manipulate obstacks.
4760 (maybe_push_to_top_level): Likewise.
4761 (pop_from_top_level): Likewise.
4762 (duplicate_decls): Likewise.
4763 (pushdecl): Likewise.
4764 (implicitly_declare): Likewise.
4765 (build_typename_type): Likewise.
4766 (start_decl): Likewise.
4767 (cp_finish_decl): Likewise.
4768 (finish_decl): Likewise.
4769 (destroy_local_static): Likewise.
4770 (expand_static_init): Likewise.
4771 (complete_array_type): Likewise.
4772 (grokvardecl): Likewise.
4773 (build_ptrmemfnc_type): Likewise.
4774 (grokdeclarator): Likewise.
4775 (xref_tag): Likewise.
4776 (xref_basetypes): Likewise.
4777 (start_enum): Likewise.
4778 (finish_enum): Likewise.
4779 (start_function): Likewise.
4780 (finish_function): Likewise.
4781 (start_method): Adjust call to cp_finish_decl.
4782 * decl2.c (finish_static_data_member_decl): Don't manipulate
4783 obstacks.
4784 (grokfield): Likewise.
4785 (grokbitfield): Likewise.
4786 (get_temp_name): Likewise.
4787 (get_sentry): Likewise.
4788 (fnish_file): Likewise.
4789 (lookup_arg_dependent): Likewise.
4790 * except.c (call_eh_info): Likewise.
4791 (push_eh_info): Likewise.
4792 (do_pop_exception): Likewise.
4793 (initialize_handler_parm): Likewise.
4794 (expand_end_eh_spec): Likewise.
4795 (alloc_eh_object): Likewise.
4796 (expand_throw): Likewise.
4797 * expr.c (extract_scalar_init): Likewise.
4798 * init.c (build_java_class_ref): Likewise.
4799 * lex.c (get_time_identifier): Likewise.
4800 (snarf_defarg): Likewise.
4801 (add_defarg_fn): Likewise.
4802 (is_global): Simplify.
4803 (do_identifier): Don't check TREE_PERMANENT.
4804 * method.c (emit_thunk): Don't manipulate obstacks.
4805 * parse.y (condition): Adjust call to cp_finish_decl.
4806 (primary): Likewise.
4807 (initdcl): Likewise.
4808 (initdcl0_innards): Likewise.
4809 (nomods_initdcl0): Likewise.
4810 * pt.c (push_inline_template_parms_recursive): Use
4811 SET_DECL_TEMPLATE_PARM_P.
4812 (process_template_parm): Likewise.
4813 (lookup_template_class): Don't manipulate obstacks.
4814 (instantiate_class_template): Adjust call to
4815 finish_static_data_member_decl.
4816 (tsubst_decl): Don't manipulate obstacks.
4817 (tsubst_expr): Likewise.
4818 (instantiate_template): Likewise.
4819 (instantiate_decl): Adjust calls to cp_finish_decl.
4820 * rtti.c (call_void_fn): Don't manipulate obstacks.
4821 (get_tinfo_var): Likewise.
4822 (get_tinfo_fn_unused): Likewise.
4823 (build_dynamic_cast_1): Likewise.
4824 (expand_si_desc): Likewise.
4825 (expand_class_desc): Likewise.
4826 (expand_ptr_desc): Likewise.
4827 (expand_attr_desc): Likewise.
4828 (expand_generic_desc): Likewise.
4829 (synthesize_tinfo_fn): Likewise.
4830 * search.c (expand_upcast_fixups): Likewise.
4831 * semantics.c (finish_asm_stmt): Likewise.
4832 (finish_named_return_value): Likewise.
4833 (begin_class_definition): Likewise.
4834 (finish_class_definition): Likewise.
4835 (finish_typeof): Likewise.
4836 * tree.c (build_cplus_method_type): Likewise.
4837 (reverse_path): Likewise.
4838 (copy_template_template_parm): Likewise.
4839 (build_expr_ptr_wrapper): Likewise.
4840 (push_expression_obstack): Remove.
4841 (push_permanent_obstack): Likewise.
4842 * typeck.c (mark_addressable): Likewise.
4843
4844 1999-11-13 Mark Mitchell <mark@codesourcery.com>
4845
4846 * call.c (build_conditional_expr): Use build_target_expr_with_type.
4847 (convert_like): Likewise.
4848 (build_over_call): Likewise.
4849 * cp-tree.h (build_target_expr): Remove.
4850 (build_target_expr_with_type): New function.
4851 * cvt.c (build_up_reference): Use get_target_expr.
4852 * decl.c (build_target_expr): Move to ...
4853 * tree.c (build_target_expr): Here. Make it static.
4854 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
4855 the temporary VAR_DECLs.
4856 (get_target_expr): Use it.
4857
4858 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
4859
4860 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4861 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4862 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4863 * class.c (set_rtti_entry): Use it.
4864
4865 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4866
4867 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4868 here.
4869 * semantics.c (finish_expr_stmt): Call it here instead. Move
4870 default_conversion logic to semantic-analysis time.
4871
4872 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
4873
4874 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4875
4876 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4877
4878 * init.c (init_init_processing): Re-instated Nov 11 patch after
4879 approval.
4880
4881 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4882
4883 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4884 Patch had not been approved yet.
4885
4886 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4887
4888 * decl.c (compute_array_index_type): New function, split out from
4889 grokdeclarator.
4890 (create_array_type_for_decl): Likewise.
4891 (grokdeclarator): Use them.
4892
4893 * semantics.c (expand_stmt): Don't suspend_momentary or
4894 resume_momentary.
4895
4896 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4897
4898 * init.c (init_init_processing): Header information for
4899 arrays allocated via `new' should have the same alignment used by
4900 malloc.
4901
4902 1999-11-10 Mark Mitchell <mark@codesourcery.com>
4903
4904 * error.c (dump_function_name): Don't crash if given a friend
4905 pseudo-instantiation.
4906
4907 * cp-tree.h (build_enumerator): Change prototype.
4908 * decl.c (enum_next_value): Remove.
4909 (enum_overflow): Likewise.
4910 (init_decl_processing): Don't register enum_next_value as a root.
4911 (start_enum): Clear TYPE_VALUES for a redefined enum.
4912 (finish_enum): Reset the type of enumeration constants.
4913 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
4914 we don't need to. Maintain the TYPE_VALUES list and look there
4915 for the previously defined enumeration constant. Let enumeration
4916 constants have the type of their values until the enumeration type
4917 is complete.
4918 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4919 (structsp): Adjust.
4920 * parse.c: Regenerated.
4921 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4922
4923 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
4924 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4925
4926 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4927
4928 1999-11-09 Mark Mitchell <mark@codesourcery.com>
4929
4930 * cp-tree.h (language_function): Remove x_last_dtor_insn and
4931 x_last_parm_cleanup_insn.
4932 * decl.c (last_dtor_insn): Remove.
4933 (last_parm_cleanup_insn): Likewise.
4934 (expand_start_early_try_stmts): Don't set them.
4935 (store_parm_decls): Likewise.
4936 (save_function_data): Or save them.
4937 (mark_lang_function): Or mark them.
4938
4939 1999-11-08 Mark Mitchell <mark@codesourcery.com>
4940
4941 * decl.c (store_parm_decls): Generate cleanup code at
4942 semantic-analysis time. Destroy objects in the correct order.
4943
4944 1999-11-07 Mark Mitchell <mark@codesourcery.com>
4945
4946 * cp-tree.h (begin_new_placement): Remove.
4947 (finish_new_placement): Likewise.
4948 * class.c (finish_struct_1): Don't suspend_momentary or
4949 resume_momentary.
4950 * decl.c (grokdeclarator): Likewise.
4951 (maybe_build_cleanup_1): Likewise.
4952 * except.c (push_eh_cleanup): Likewise.
4953 (build_terminate_handler): Likewise.
4954 * init.c (build_new_1): Likewise.
4955 * parse.y (parse_decl): Change prototype.
4956 (initdecls, notype_initdecls, initdcl): Don't return int.
4957 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4958 (.begin_new_placement): Remove.
4959 (.finish_new_placement): Likewise.
4960 (nonmomentary_expr): Likewise.
4961 (suspend_mom): Likewise.
4962 (condition): Don't suspend_momentary, resume_momentary, or keep
4963 track of need to resume.
4964 (unary_expr): Likewise.
4965 (new_placement): Likewise.
4966 (decl): Likewise.
4967 (structsp): Likewise.
4968 (new_type_id): Likewise.
4969 (maybe_parmlist): Likewise.
4970 (direct_after_type_declaration): Likewise.
4971 (direct_new_declarator): Likewise.
4972 (direct_abstract_declaration): Likewise.
4973 * parse.c: Regenerated.
4974 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4975 * semantics.c (begin_new_placement): Remove.
4976 (finish_new_placement): Likewise.
4977
4978 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4979
4980 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4981 (DECL_TEMPLATE_INFO): Use it.
4982 * decl.c (warn_extern_redeclared_static): Do nothing for
4983 TEMPLATE_DECLs.
4984 * decl2.c (mark_used): Explicitly check for function or variable.
4985 * semantics.c (finish_unary_op_expr): Check whether result is also
4986 an INTEGER_CST.
4987
4988 1999-11-05 Mark Mitchell <mark@codesourcery.com>
4989
4990 * Makefile.in (typeck2.o): Depend on output.h.
4991 * typeck2.c: Include output.h.
4992
4993 * decl.c (flag_ansi): Remove declaration.
4994
4995 * pt.c (tinst_level_tick): Make it static.
4996 (last_template_error_tick): Likewise.
4997
4998 * cp-tree.h (mapcar): Remove declaration.
4999 (search_tree): Likewise.
5000 (walk_tree_fn): New typedef.
5001 (walk_tree): New function.
5002 * tree.c (bot_manip): Change prototype. Adjust to be called via
5003 walk_tree.
5004 (bot_replace): Likewise.
5005 (no_linkage_helper): Likewise.
5006 (copy_tree_r): New function.
5007 (search_tree): Rename, and adjust, to become ...
5008 (walk_tree): New function.
5009 (mapcar): Remove.
5010 (target_remap): Remove.
5011 (target_remap_count): Likewise.
5012 (break_out_target_exprs): Use walk_tree.
5013 * decl.c (local_variable_p): Change prototype.
5014 (check_default_argument): Use walk_tree.
5015 * pt.c (for_each_template_parm_r): New function, split out from ...
5016 (for_each_template_parm): Here. Use it, via walk_tree.
5017
5018 1999-11-03 Mark Mitchell <mark@codesourcery.com>
5019
5020 * class.c (check_bitfield_decl): New function, split out from
5021 finish_stuct_1.
5022 (check_field_decl): Likewise. Recursively examine members of
5023 anonymous structs.
5024 (finish_struct_1): Use them.
5025 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5026
5027 1999-11-02 Mark Mitchell <mark@codesourcery.com>
5028
5029 * decl.c (grokfndecl): Remove dead code.
5030
5031 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5032
5033 1999-11-02 Scott Snyder <snyder@fnal.gov>
5034
5035 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5036 IMAGPART_EXPR.
5037 * pt.c (tsubst_copy): Likewise.
5038
5039 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
5040
5041 * decl2.c (maybe_make_one_only): Always make things comdat on
5042 ELF targets, too.
5043
5044 1999-10-31 Mark Mitchell <mark@codesourcery.com>
5045
5046 * decl.c (finish_function): Call free_after_parsing for functions
5047 we are not immediately turning into RTL.
5048
5049 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
5050
5051 * cp-tree.h (flag_dump_translation_unit): Add decl.
5052
5053 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
5054
5055 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5056
5057 1999-10-30 Mark Mitchell <mark@codesourcery.com>
5058
5059 * decl.c (pop_cp_function_context): Don't call free on a NULL
5060 pointer.
5061 * semantics.c: Include ggc.h.
5062 (expand_body): Do garbage-collection after processing a template
5063 function. Clear DECL_SAVED_TREE after generating RTL for a
5064 function.
5065 * Makefile.in (semantics.o): Depend on ggc.h.
5066
5067 1999-10-29 Mark Mitchell <mark@codesourcery.com>
5068
5069 * cp-tree.h (make_typename_type): Change prototype.
5070 * decl.c (make_typename_type): Only complain if so requested.
5071 * parse.y (nested_name_specifier): Adjust calls.
5072 (typename_sub0): Likewise.
5073 (typename_sub1): Likewise.
5074 * parse.c: Regenerated.
5075 * pt.c (convert_template_argument): Pass complain to
5076 make_typename_type.
5077 (tsubst): Likewise.
5078
5079 1999-10-28 Mark Mitchell <mark@codesourcery.com>
5080
5081 * semantics.c (finish_handler): End the scope of the handler
5082 before attaching it to the statement-tree.
5083
5084 1999-10-28 Ian Lance Taylor <ian@zembu.com>
5085
5086 * rtti.c (build_dynamic_cast_1): Give a better error message for
5087 an attempt to dynamic_cast from a non-polymorphic type.
5088
5089 1999-10-27 Mark Mitchell <mark@codesourcery.com>
5090
5091 * cp-tree.h (make_temp_vec): Remove.
5092 (make_scratch_vec): Likewise.
5093 * call.c (add_function_candidate): Use make_tree_vec.
5094 (add_conv_candidate): Likewise.
5095 (build_builtin_candidate): Likewise.
5096 (add_template_candidate_real): Likewise.
5097 * class.c (resolve_address_of_overloaded_function): Likewise.
5098 * decl.c (start_function): Don't fool with the momentary obstack.
5099 (finish_function): Likewise.
5100 * init.c (expand_direct_vtbls_init): Likewise.
5101 (begin_init_stmts): Likewise.
5102 (finish_init_stmts): Likewise.
5103 * pt.c (add_to_template_args): Use make_tree_vec.
5104 (check_explicit_specialization): Likewise.
5105 (coerce_template_parms): Likewise.
5106 (lookup_template_class): Don't fool with the momentary obstack.
5107 (instantiate_class_template): Likewise.
5108 (tsubst_template_arg_vector): Use make_tree_vec.
5109 (tsubst_aggr_type): Don't fool with the momentary obstack.
5110 (tsubst_decl): Likewise. Use make_tree_vec.
5111 (try_one_overload): Likewise.
5112 (try_class_unification): Don't fool with the momentary obstack.
5113 (get_bindings_real): Use make_tree_vec.
5114 (set_mangled_name_for_template_decl): Likewise.
5115 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5116 * semantics.c (finish_expr_stmt): Likewise.
5117 (finish_do_stmt): Likewise.
5118 (finish_for_expr): Likewise.
5119 (finish_switch_cond): Likewise.
5120 (do_pushlevel): Likewise.
5121 (do_poplevel): Likewise.
5122 * tree.c (make_temp_vec): Remove.
5123
5124 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
5125 CLEANUP_P for a TRY_BLOCK.
5126 * ir.texi: Document SAVE_EXPR.
5127
5128 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
5129
5130 * call.c (build_over_call): Check that the built-in function is
5131 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5132 * typeck.c (build_function_call_real): Similarly.
5133
5134 1999-10-26 Mark Mitchell <mark@codesourcery.com>
5135
5136 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
5137 remember_end_note.
5138
5139 1999-10-24 Mark Mitchell <mark@codesourcery.com>
5140
5141 * decl.c (push_overloaded_decl_1): Use pushdecl.
5142
5143 * decl.c (auto_function): Replace #ifdef'd __inline with just
5144 plain inline.
5145 * lex.c (my_get_run_time): Likeise.
5146 (yyprint): Likewise.
5147 (identifier_type): Likewise.
5148 * method.c (start_squangling): Likewise.
5149 (end_squangling): Likewise.
5150 (icat): Likewise.
5151 (old_backref_index): Likewise.
5152 (flush_repeats): Likewise.
5153 (issue_ktype): Likewise.
5154 * parse.y (empty_parms): Likewise.
5155 * parse.c: Regenerated.
5156
5157 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5158
5159 * dump.c (dequeue_and_dump): Replace several uses of
5160 queue_and_dump_index with dump_child.
5161
5162 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5163
5164 * expr.c: Include tm_p.h.
5165
5166 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5167
5168 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5169 (pushlevel_temporary): Remove.
5170 (add_scope_stmt): New function.
5171 * decl.c (pushlevel_temporary): Remove.
5172 (poplevel): Use add_scope_stmt.
5173 (start_decl_1): Likewise.
5174 * semantics.c (add_scope_stmt): New function.
5175 (do_pushlevel): Use it.
5176 (do_poplevel): Use it.
5177 (expand_stmt): Check SCOPE_PARTIAL_P.
5178
5179 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5180 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5181 * expr.c (cplus_expand_expr): Expand it.
5182 * ir.texi: Document EMPTY_CLASS_EXPR.
5183
5184 1999-10-20 Mark Mitchell <mark@codesourcery.com>
5185
5186 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5187 parameters as having namespace scope.
5188
5189 1999-10-19 Mark Mitchell <mark@codesourcery.com>
5190
5191 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5192 (mangling_flags): New type.
5193 (build_overload_int): Change prototype.
5194 (build_overload_value): Likewise.
5195 (numeric_output_need_bar): Improve comment.
5196 (mangle_expression): New function, broken out from ...
5197 (build_overload_int): Here.
5198 (build_overload_value): Adjust for use of mangling flags. Don't
5199 warn about real-valued template parameters here. Do handle
5200 complex expressions involving real-valued template parameters.
5201 (build_template_parm_names): Encase non-type template parameters
5202 in underscores, if necessary.
5203 (process_overload_item): Remove conditional on
5204 PARM_CAN_BE_ARRAY_TYPE.
5205
5206 1999-10-17 Mark Mitchell <mark@codesourcery.com>
5207
5208 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5209
5210 * ir.texi: Clean up documentation of RETURN_INIT.
5211
5212 1999-10-15 Greg McGary <gkm@gnu.org>
5213
5214 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5215 (lang_init): Set default for flag_bounds_check if still "unspecified".
5216
5217 1999-10-13 Andrew Haley <aph@cygnus.com>
5218
5219 * class.c (finish_struct_1): Force alignment of non-bitfields to
5220 BITS_PER_UNIT.
5221
5222 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5223
5224 * typeck2.c (process_init_constructor): Handle empty constructors.
5225
5226 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
5227
5228 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5229
5230 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5231 array error.
5232
5233 1999-10-13 Mark Mitchell <mark@codesourcery.com>
5234
5235 * decl.c (make_rtl_for_local_static): Don't create register RTL
5236 for addressable constants.
5237
5238 1999-10-13 Nathan Sidwell <nathan@acm.org>
5239
5240 * cp-tree.h (build_x_va_arg): Prototype new function.
5241 * call.c (build_x_va_arg): Define it.
5242 * parse.y (unary_expr): Call build_x_va_arg.
5243
5244 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5245 * call.c (convert_type_from_ellipsis): Define it.
5246 * decl.c (init_decl_processing): Set lang_type_promotes_to.
5247
5248 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5249
5250 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
5251
5252 * class.c (fixed_type_or_null): Always set *nonnull.
5253
5254 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5255
5256 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5257 __GNUC__ and __GNUC_MINOR__.
5258
5259 1999-10-09 Mark Mitchell <mark@codesourcery.com>
5260
5261 * cp-tree.h (make_rtl_for_local_static): New function.
5262 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5263 local statics ...
5264 (make_rtl_for_local_static): Here.
5265 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5266
5267 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5268
5269 * method.c: Include tm_p.h.
5270
5271 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5272
5273 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5274 * lex.c (cp_make_lake_type): Likewise.
5275 * tree.c (init_tree): Init make_lang_type_fn.
5276
5277 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5278
5279 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5280 paramter.
5281
5282 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5283 local statics if we don't really have them.
5284
5285 * ir.texi: Improve documentation for STMT_EXPR. Describe
5286 CLEANUP_POINT_EXPR.
5287
5288 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
5289
5290 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5291
5292 1999-10-07 Greg McGary <gkm@gnu.org>
5293
5294 * class.c (finish_struct_1): Use simpler method of
5295 removing elements of a singly-linked list which doesn't
5296 lose for classes without data members.
5297
5298 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5299
5300 * friend.c (make_friend_class): Robustify.
5301
5302 * semantics.c (finish_object_call_expr): Reject calls to template
5303 types.
5304
5305 1999-10-06 Mark Mitchell <mark@codesourcery.com>
5306
5307 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5308
5309 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5310 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5311 CLASSTYPE_VFIELD.
5312 * class.c (get_vfield_offset): Likewise.
5313 (finish_base_struct): Likewise.
5314 (modify_one_vtable): Likewise.
5315 (fixup_vtable_deltas): Likewise.
5316 (finish_struct_1): Likewise.
5317 * init.c (expand_virtual_init): Likewise.
5318 * search.c (lookup_field_1): Likewise.
5319 (expand_upcast_fixups): Likewise.
5320 * typeck.c (build_component_ref): Likewise.
5321 (build_binary_op_nodefault): Likewise.
5322
5323 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5324 * ir.texi: Document TYPE_VFIELD.
5325
5326 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
5327
5328 * decl.c (grokdeclarator): Only warn about non-zero arrays if
5329 !in_system_header (linux socketbits.h can give this for
5330 __cmsg_data, which is using a GNU extension).
5331
5332 1999-10-05 Mark Mitchell <mark@codesourcery.com>
5333
5334 * decl2.c (start_static_storage_duration_function): Push the
5335 function declaration so it ends up in namespace scope.
5336
5337 * dump.c (DUMP_CHILDREN): Remove.
5338 (DUMP_BINFO): Adjust.
5339 (struct dump_node_info): Remove dump_children_p.
5340 (queue_and_dump_type): Remove dump_children_p parameter.
5341 (queue): Don't set dump_children_p.
5342 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5343 queue_and_dump_index.
5344 (dequeue_and_dump): Unconditionally print children. Adjust calls
5345 to functions mentioned above.
5346 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5347
5348 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5349 * dump.c (dequeue_and_dump): Dump them.
5350
5351 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5352
5353 * decl.c (start_function): Set current_in_charge_parm for
5354 constructors, too, where appropriate.
5355 * search.c (fixup_all_virtual_upcast_offsets): New function.
5356 (expand_indirect_vtbls_init): Use it.
5357
5358 1999-10-04 Nathan Sidwell <nathan@acm.org>
5359
5360 * decl2.c (grok_alignof): Don't decay lvalues.
5361
5362 * init.c (build_new): Remove unused variable.
5363
5364 1999-10-04 Mark Mitchell <mark@codesourcery.com>
5365
5366 * cp-tree.h (struct language_function): Remove static_labelno.
5367 (static_labelno): Remove macro.
5368 * method.c (build_overload_nested_name): Make static_labelno
5369 static here.
5370
5371 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5372 to decide whether or not a function is defined.
5373
5374 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5375 situations where make_node will do it automatically.
5376 * decl.c (grok_reference_init): Likewise.
5377 (expand_static_init): Likewise.
5378 (do_static_initialization): Likewise.
5379 * init.c (perform_member_init): Likewise.
5380 (expand_aggr_init_1): Likewise.
5381 (build_new_1): Likewise.
5382 * method.c (do_build_copy_constructor): Likewise.
5383 (do_build_assign_ref): Likewise.
5384 * search.c (expand_upcast_fixups): Likewise.
5385 * semantics.c (finish_stmt_expr): Likewise.
5386 * typeck.c (build_unary_op): Likewise.
5387 (check_return_expr): Likewise.
5388
5389 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
5390
5391 * init.c (build_vec_delete_1): Fold COND_EXPRs.
5392
5393 1999-10-03 Mark Mitchell <mark@codesourcery.com>
5394
5395 * cp-tree.def (VEC_INIT_EXPR): Remove.
5396 * cp-tree.h (struct stmt_tree): New type.
5397 (struct saved_scope): Remove firstobj. Add x_saved_tree,
5398 x_stmt_tree.
5399 (class_cache_firstobj): Remove.
5400 (struct language_function): Remove stmts_are_full_exprs_p,
5401 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
5402 (current_stmt_tree): New macro.
5403 (last_tree): Adjust.
5404 (last_expr_type): Likewise.
5405 (doing_semantic_analysis_p): Simplify.
5406 (stmts_are_full_exprs_p): Adjust.
5407 (begin_tree): Remove prototype.
5408 (end_tree): Likewise.
5409 (begin_stmt_tree): Change prototype.
5410 (finish_stmt_tree): Likewise.
5411 (building_stmt_tree): Simplify.
5412 * decl.c (mark_stmt_tree): New function.
5413 (mark_saved_scope): Use it.
5414 (start_function): Rearrange slightly to call begin_stmt_tree
5415 earlier.
5416 (save_function_data): Tweak.
5417 (finish_function): Adjust call to finish_stmt_tree.
5418 (mark_lang_function): Use mark_stmt_tree.
5419 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5420 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5421 (build_vec_init): Remove creation of stand-in intializer.
5422 * pt.c (begin_tree): Remove.
5423 (end_tree): Likewise.
5424 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
5425 (begin_compound_stmt): Handle a compound-statement outside of a
5426 function.
5427 (begin_stmt_expr): Handle a statement-expression outsidef of a
5428 function.
5429 (finish_stmt_expr): Likewise.
5430 (begin_class_definition): Don't call begin_tree.
5431 (finish_inline_definitions): Don't call end_tree.
5432 (begin_stmt_tree): Take a pointer to tree, not a function as input.
5433 (finish_stmt_tree): Likewise.
5434 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5435 (mapcar): Likewise.
5436
5437 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5438 * parse.c: Regenerated.
5439
5440 * dump.c (dqueue_and_dump): Dump bitfieldness.
5441
5442 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5443 bitfields, rather than DECL_BIT_FIELD.
5444 * ir.texi: Document how to tell whether or not a field is a
5445 bitfield.
5446
5447 * lex.c (make_lang_type): Fix typo in comment.
5448
5449 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
5450
5451 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5452
5453 1999-10-01 Mark Mitchell <mark@codesourcery.com>
5454
5455 * pt.c (tsubst_decl): If the type of a template instantiation is
5456 bogus, so is the whole instantiation.
5457
5458 1999-09-30 Mark Mitchell <mark@codesourcery.com>
5459
5460 * decl.c (initialize_local_var): Handle static variables here.
5461 (cp_finish_decl): Tweak handling of function-scope static
5462 variables.
5463 * semantics.c (expand_stmt): Handle DECL_STMTs for static
5464 variables.
5465
5466 * method.c (emit_thunk): Don't crash when -fsyntax-only.
5467
5468 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5469 global_dtor_p. Add init_priority.
5470 (DECL_ACCESS): Adjust accordingly.
5471 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5472 (GLOBAL_INIT_PRIORITY): Likewise.
5473 * decl.c (lang_mark_tree): Adjust accordingly.
5474 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
5475 and GLOBAL_INIT_PRIORITY.
5476 * dump.c (dequeue_and_dump): Print them.
5477 * ir.texi: Document them.
5478
5479 * decl2.c (struct priority_info_s): Remove initialization_sequence
5480 and destruction_sequence.
5481 (start_static_storage_duration_function): Return the body of the
5482 function. Convert for function-at-a-time mode.
5483 (generate_inits_for_priority): Remove.
5484 (finish_static_storage_duration_function): Change prototype.
5485 Adjust for function-at-a-time mode.
5486 (do_static_initialization): Likewise.
5487 (do_static_destruction): Likewise.
5488 (do_static_initialization_and_destruction): Remove.
5489 (start_static_initialization_or_destruction): New function.
5490 (finish_static_initialization_or_destruction): Likewise.
5491 (get_priority_info): Don't manipulation initialization_sequence or
5492 destruction_sequence.
5493 (prune_vars_needing_no_initialization): New function.
5494 (write_out_vars): Likewise.
5495 (finish_file): Use the various new functions instead of the old.
5496
5497 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
5498
5499 * cp-tree.h (warn_float_equal): Declare.
5500 * decl2.c (warn_float_equal): Define.
5501 (lang_decode_option): Recognize -W[no-]float-equal.
5502 * typeck.c (build_binary_op_nodefault): Conditionally warn
5503 about equality tests of floating point types.
5504
5505 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
5506
5507 Support normal type_info-based EH mechanisms with -fno-rtti.
5508 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5509 (build_eh_type_type_ref): Likewise.
5510 (build_eh_type): Remove.
5511 (expand_throw): Call build_eh_type_type, not build_eh_type.
5512 * decl2.c (import_export_decl): Don't associate the tinfo fn with
5513 the vtable if -fno-rtti.
5514 * decl.c (init_decl_processing): Always init_rtti_processing.
5515
5516 * rtti.c (get_typeid): Don't complain about -fno-rtti.
5517
5518 * class.c (class_cache_obstack, class_obstack): Remove.
5519 (init_class_processing): Don't initialize class_obstack.
5520 (push_cache_obstack): Remove.
5521 (pushclass): Don't call it.
5522 * cp-tree.h: Remove prototype for push_cache_obstack.
5523 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5524 (pushlevel_class): Don't push_decl_level.
5525 (poplevel_class): Don't pop_stack_level.
5526 (push_class_level_binding): Don't push_cache_obstack.
5527 (init_decl_processing): Don't intialize decl_obstack.
5528 * search.c (push_class_decls): Don't push_cache_obstack.
5529 * tree.c (list_hash_add): Put hash node on permanent_obstack.
5530 (hash_tree_cons): Don't mess with obstacks.
5531 (print_lang_statistics): Don't print stats for class_obstack and
5532 decl_obstack.
5533
5534 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5535
5536 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5537 * ir.texi: Document DECL_EXTERNAL.
5538
5539 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5540 * ir.texi: Document THUNK_DECLs.
5541
5542 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5543 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5544 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5545 * error.c (dump_template_bindings): Remove unused parameter.
5546 Handle multiple levels of template parameters.
5547 (dump_template_decl): Use `parms', not `args', for template
5548 parameters. Fix thinko.
5549 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
5550 flags to dump_template_bindings.
5551 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5552 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5553 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5554 (tsubst_copy): Clarify variable name.
5555 (most_general_template): Robustify.
5556
5557 1999-09-29 Nathan Sidwell <nathan@acm.org>
5558
5559 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5560 to change primary template rendering.
5561
5562 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5563
5564 * cp-tree.h (UPT_TEMPLATE): Remove.
5565 (UPT_PARMS): Likewise.
5566 (DECL_NEEDED_P): New macro.
5567 * decl2.c (finish_vtable_vardecl): Use it.
5568 (finish_objects): Don't crash with -fsyntax-only.
5569 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
5570 -fsyntax-only.
5571 * pt.c (tsubst_friend_function): Remove FIXME that talks about
5572 obstacks.
5573 (tsubst_expr): Correct handling of function try-blocks.
5574 * semantics.c: Include flags.h.
5575 (expand_body): Don't do RTL generation if -fsyntax-only.
5576 * Makefile.in (semantics.o): Depends on flags.h.
5577
5578 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
5579
5580 * pt.c (most_general_template): Adjust declaration.
5581
5582 * cp-tree.h: (most_general_template): Declare.
5583
5584 * error.c (dump_template_value): Rename to ...
5585 (dump_template_argument): This.
5586 (dump_template_argument_list): New function.
5587 (dump_type): Use it.
5588 (dump_template_parameter): New function.
5589 (dump_template_decl): Use it.
5590 (dump_template_bindings): New function.
5591 (dump_function_decl): Use it. Pretty print function template
5592 instantiations.
5593
5594 1999-09-28 Nathan Sidwell <nathan@acm.org>
5595
5596 * decl.c (grokdeclarator): Distinguish parameter context for
5597 diagnostics. Tidy up missing type diagnostic.
5598 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
5599
5600 1999-09-28 Mark Mitchell <mark@codesourcery.com>
5601
5602 * ir.texi: Improve documentation for TARGET_EXPR.
5603
5604 1999-09-27 Nathan Sidwell <nathan@acm.org>
5605
5606 Augment stringification of trees.
5607 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
5608 (fndecl_as_string, type_as_string_real, args_as_string,
5609 code_as_string, language_as_string, parm_as_string,
5610 op_as_string, assop_as_string, cv_as_string): Remove.
5611 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
5612 (context_as_string): Declare new function.
5613 * error.c (cp_printers): Move definition.
5614 (OB_UNPUT): Remove.
5615 (OB_END_TEMPLATE_ID): Adjust.
5616 (interesting_scope_p): Remove.
5617 (dump_scope): New static function.
5618 (dump_qualifiers): Adjust prototype, reimplement.
5619 (dump_template_value): Use tree_string_flags.
5620 (dump_type_real): Move back to dump_type.
5621 (dump_type): Adjust prototype. Use tree_string_flags.
5622 (dump_aggr_type): Likewise. Use dump_template_parms.
5623 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
5624 Return pad flag.
5625 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
5626 (dump_simple_decl): Likewise.
5627 (dump_decl): Likewise. Use dump_template_decl.
5628 (dump_template_decl): New static function broken out of dump_decl.
5629 (dump_function_decl): Adjust prototype. Use tree_string_flags.
5630 (dump_parameters): Likewise. Prefix space.
5631 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
5632 (dump_function_name): Likewise. Use dump_template_parms.
5633 (dump_template_parms): New static function broken out of
5634 dump_function_name.
5635 (dump_expr_list): Adjust prototype. Use tree_string_flags.
5636 (dump_expr): Likewise.
5637 (fndecl_as_string): Removed
5638 (type_as_string_real): Removed
5639 (dump_binary_op): Adjust prototype. Use tree_string_flags.
5640 (dump_unary_op): Likewise.
5641 (type_as_string): Likewise.
5642 (expr_as_string): Likewise.
5643 (decl_as_string): Likewise.
5644 (context_as_string): New function.
5645 (lang_decl_name): Adjust.
5646 (decl_to_string): New static print callback.
5647 (expr_to_string): Likewise.
5648 (fndecl_to_string): Likewise.
5649 (code_as_string): Renamed to ...
5650 (code_to_string): ... here. Adjust.
5651 (language_as_string): Renamed to ...
5652 (language_to_string): ... here. Adjust.
5653 (parm_as_string): Renamed to ...
5654 (parm_to_string): ... here.
5655 (op_as_string): Renamed to ...
5656 (op_to_string): ... here.
5657 (assop_as_string): Renamed to ...
5658 (assop_to_string): ... here.
5659 (type_to_string): New static print callback.
5660 (args_as_string): Renamed to ...
5661 (args_to_string): ... here. Adjust.
5662 (cv_as_string): Renamed to ...
5663 (cv_to_string): ... here. Adjust.
5664 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5665 (print_template_context): Likewise.
5666
5667 1999-09-26 Mark Mitchell <mark@codesourcery.com>
5668
5669 * cp-tree.h (expand_throw): Remove prototype.
5670 * except.c (expand_throw): Make it static. Use tree-generation
5671 functions, rather than RTL-generation functions.
5672 (build_throw): Use it.
5673 * expr.c: Include except.h.
5674 (cplus_expand_expr): Don't call expand_throw here.
5675 * Makefile.in (expr.o): Depend on except.h.
5676 * ir.texi: Update documentation for THROW_EXPR.
5677
5678 * decl.c (start_function): Set x_dont_save_pending_sizes rather
5679 than calling get_pending_sizes.
5680 * init.c (build_new): Don't save and restore
5681 immediate_size_expand; instead, assert that it has the expected
5682 value already.
5683
5684 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5685
5686 * lex.c (compiler_error): Add missing call to va_end().
5687
5688 1999-09-25 Mark Mitchell <mark@codesourcery.com>
5689
5690 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5691 * ir.texi: Document RESULT_DECL and DECL_RESULT.
5692
5693 * cp-tree.h (check_return_expr): New function.
5694 * decl.c (finish_constructor_body): New function.
5695 (pushdecl): Put global friend functions in namespace binding
5696 level, not the class binding level.
5697 (finish_destructor_body): Make sure the dtor_label is always
5698 defined. Fix typo in comment.
5699 (finish_function): Move generation of constructor-termination code
5700 to semantic-analysis time. Move generation of implicit `main'
5701 return value to semantic-analysis time.
5702 * semantics.c (finish_return_stmt): Generate goto's to
5703 ctor_label/dtor_label here. Use check_return_expr to do semantic
5704 analysis on the returned expression.
5705 * typeck.c (maybe_warn_about_returning_address_of_local): New
5706 function split out from c_expand_return.
5707 (check_return_expr): Likewise.
5708 (c_expand_return): Just generate the RTL for the return.
5709
5710 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5711
5712 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5713 (cleanup_type): Likewise.
5714 (search_tree): Change prototype.
5715 * decl.c (local_variable_p): Adjust for new interface to
5716 search_tree.
5717 (check_default_argument): Likewise.
5718 * error.c (dump_expr): Handle INIT_EXPR.
5719 * except.c (expand_throw): Don't make cleanup_type a local static.
5720 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5721 * init.c (build_new): Call build_new_1 directly, rather than
5722 building a NEW_EXPR.
5723 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
5724 processing file-scope initializers.
5725 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5726 * tree.c: Include splay-tree.h
5727 (no_linkage_helper): Adjust for new interface to search_tree.
5728 (search_tree): Pass around pointers to tree nodes, rather than the
5729 nodes themselves. Handle VEC_INIT_EXPR.
5730 (no_linkage_check): Adjust for new interface to search_tree.
5731 (mapcar): Handle VEC_INIT_EXPR.
5732 (target_remap): New variable.
5733 (bot_manip): Use it.
5734 (bot_replace): New function.
5735 (break_out_target_exprs): Use it to remap all variables used in a
5736 default argument expression.
5737 * typeck.c (build_modify_expr): Don't crash when outside a
5738 function and presented with an INIT_EXPR assignment
5739 * Makefile.in (tree.o): Depend on splay-tree.h.
5740
5741 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5742
5743 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5744 DECL_BUILT_IN.
5745 (builtin_function): New arg CLASS. Arg CODE now of type int. All
5746 callers changed.
5747 Set the builtin's DECL_BUILT_IN_CLASS.
5748
5749 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5750
5751 * decl.c (pushdecl): Don't make local declarations of extern
5752 variables give the variable a DECL_CONTEXT for the function.
5753 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
5754 Don't accidentally make RTL for local declarations.
5755 (emit_local_var): Handle declarations with asm-specifiers here.
5756
5757 1999-09-23 Mark Mitchell <mark@codesourcery.com>
5758
5759 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
5760 STMT_IS_FULL_EXPR_P.
5761
5762 * cp-tree.h (language_function): Add cannot_inline.
5763 * decl.c (start_function): Restore current_function_cannot_inline
5764 from the saved value.
5765 (save_function_data): Save current_function_cannot_inline.
5766 * decl2.c (start_objects): Change prototype. Build the function
5767 in function-at-a-time mode.
5768 (finish_objects): Likewise.
5769 (generate_ctor_or_dtor_function): Adjust accordingly.
5770
5771 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5772 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5773 Don't call expand_anon_union_decl here
5774 * semantics.c (exapnd_stmt): Call it here, instead.
5775 * typeck.c (mark_addressable): Addressed variables are implicitly
5776 used.
5777
5778 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5779
5780 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5781 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5782 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5783 * cp-tree.h: Add tree checking macros to various tree access
5784 macros.
5785 * ptree.c (print_lang_decl): Test for function or variable
5786 before accessing template info.
5787
5788 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
5789
5790 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5791 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5792 * decl2.c (lang_f_options): Add -fshort-wchar.
5793 * cp-tree.h: Declare flag_short_wchar.
5794 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
5795 int' for wchar_t.
5796
5797 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5798
5799 * ir.texi: Fix formatting errors and typos.
5800
5801 1999-09-22 Mark Mitchell <mark@codesourcery.com>
5802
5803 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5804
5805 * decl.c (pushdecl): Do create a binding for extern "C" functions,
5806 but not for their DECL_ASSEMBLER_NAMEs.
5807 (lookup_name_current_level): Fix formatting.
5808 (xref_tag): Likewise.
5809 * decl2.c (start_objects): Mark static constructors and
5810 destructors as used.
5811
5812 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
5813
5814 * decl.c (define_case_label): Don't crash if we're not in a switch.
5815
5816 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5817 * lang-options.h: Restore -fthis-is-variable. Remove help strings
5818 for unsupported flags.
5819
5820 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
5821
5822 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5823 Accept and warn about -fthis-is-variable.
5824
5825 1999-09-21 Mark Mitchell <mark@codesourcery.com>
5826
5827 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5828 CLEANUP_STMT, and SCOPE_STMT.
5829
5830 * decl2.c (lang_decode_option): Adjust, in the wake of recent
5831 changes to option processing.
5832
5833 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5834
5835 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5836 function pointer from pmfs with no object given.
5837 (convert_for_assignment): Do not return error when converting
5838 pmfs.
5839
5840 1999-09-21 Alex Samuel <samuel@codesourcery.com>
5841
5842 * lex.c (internal_filename): New variable.
5843 (INTERNAL_FILENAME): New macro.
5844 (init_parse): Allocate internal_filename and mark as root. Use it
5845 instead of a string constant.
5846
5847 1999-09-21 Nathan Sidwell <nathan@acm.org>
5848
5849 Reimplement dynamic cast and catch matching.
5850 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5851 * search.c (dynamic_cast_base_recurse): New function.
5852 (get_dynamic_cast_base_type): New function for dynamic cast.
5853 * rtti.c (build_dynamic_cast_1): Determine source and target
5854 class relationship. Call __dynamic_cast_2.
5855 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5856 (__user_type_info::dyncast): New dynamic cast dispatcher.
5857 (__user_type_info::sub_kind): New nested enumeration.
5858 (__user_type_info::contained_p): sub_kind predicate.
5859 (__user_type_info::contained_public_p): Likewise.
5860 (__user_type_info::contained_nonpublic_p): Likewise.
5861 (__user_type_info::contained_nonvirtual_p: Likewise.
5862 (__user_type_info::upcast_result): New nested struct.
5863 (__user_type_info::dyncast_result): New nested struct.
5864 (*::do_upcast): New catch function.
5865 (*::do_dyncast): New dynamic cast function.
5866 (__user_type_info::find_public_subobj): New dynamic cast
5867 helper dispatcher.
5868 (*::do_find_public_subobj): New dynamic cast helper function.
5869 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5870 (__user_type_info::dyncast): Define dynamic cast dispatcher.
5871 (*::do_upcast): Define catch function.
5872 (*::do_dyncast): Define dynamic cast function.
5873 (*::do_find_public_subobj): Define dynamic cast helper function.
5874 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5875 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5876 (__dynamic_cast_2): New dynamic cast runtime.
5877
5878 1999-09-20 Mark Mitchell <mark@codesourcery.com>
5879
5880 * cp-tree.h (finish_stmt_expr): Change prototype.
5881 * expr.c (cplus_expand_expr): Adjust call accordingly.
5882 * init.c (finish_init_stmts): Likewise.
5883 * parse.y (primary): Likewise.
5884 * pt.c (tsubst_copy): Likewise.
5885 * semantics.c (finish_stmt_expr): Don't take two parameters.
5886 Don't remove generated BLOCKs from the block-tree.
5887
5888 Remove support for assigning to `this'.
5889 * NEWS: Note that fact.
5890 * class.c (build_vbase_path): Don't check flag_this_is_variable.
5891 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5892 (language_function): Remove assigns_this, just_assigned_this, and
5893 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
5894 (base_init_expr): Remove.
5895 (current_vcalls_possible_p): New macro.
5896 (vtbls_set_up_p): Likewise.
5897 (emit_base_init): Change prototype.
5898 * decl.c (finish_destructor_body): New function, split out from
5899 finish_function.
5900 (current_function_assigns_this): Remove.
5901 (current_function_just_assigned_this): Likewise.
5902 (start_function): Don't set them.
5903 (finish_function): Don't check them. Don't emit
5904 base-initialization code here. Generate code for destructors when
5905 doing semantic analysis.
5906 (finish_stmt): Don't check current_function_just_assigned_this.
5907 * decl2.c (lang_f_options): Remove this-is-variable.
5908 (lang_decode_option): Likewise.
5909 (grokclassfn): Don't check flag_this_is_variable.
5910 * init.c (emit_base_init): Return the expression generated.
5911 (construct_virtual_bases): Don't push/pop obstacks. Fix
5912 typo.
5913 (build_new_1): Don't check flag_this_is_variable.
5914 (get_temp_regvar): Don't set DECL_REGISTER.
5915 (build_vec_init): Don't call use_variable.
5916 * lang-options.h: Remove "-fthis-is-variable" and
5917 "-fno-this-is-variable".
5918 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5919 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5920 expand_expr_stmt.
5921 * semantics.c (finish_expr_stmt_real): Rename to ...
5922 (finish_expr_stmt): This. Remove assigned_this parameter.
5923 (begin_if_stmt): Call do_pushlevel before starting the statement.
5924 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5925 blocks.
5926 (setup_vtbl_ptr): Emit initialization code for bases and members
5927 at semantic-analysis time. Emit code to initialize vtables in
5928 destructors here.
5929 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5930 Don't handle CTOR_INITIALIZER any more.
5931 * typeck.c (build_modify_expr): Don't check for assignments to
5932 this.
5933 (c_expand_return): Don't suggest assigning to `this'.
5934
5935 * Makefile.in (decl.o): Depend on RTL_H.
5936 (decl2.o): Likewise.
5937 (class.o): Likewise.
5938 (call.o): Likewise.
5939 (method.o): Likewise.
5940 (search.o): Likewise.
5941 (tree.o): Likewise.
5942 (pt.o): Likewise.
5943
5944 * decl.c (duplicate_decls): When a builtin function is redeclared
5945 as static, make sure it is mangled correctly.
5946
5947 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
5948 detail about the statement-tree.
5949
5950 1999-09-20 Nathan Sidwell <nathan@acm.org>
5951
5952 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5953
5954 1999-09-20 Nick Clifton <nickc@cygnus.com>
5955
5956 * decl2.c (lang_decode_option): Extend comment.
5957
5958 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5959
5960 * typeck.c: Include "tm_p.h".
5961
5962 1999-09-19 Mark Mitchell <mark@codesourcery.com>
5963
5964 * ir.texi: New file.
5965
5966 1999-09-19 Paul Burchard <burchard@pobox.com>
5967
5968 * semantics.c (expand_stmt): Initialize return value.
5969
5970 1999-09-18 Paul Burchard <burchard@pobox.com>
5971
5972 * gxxint.texi: G++ now implements namespaces.
5973
5974 1999-09-18 Mark Mitchell <mark@codesourcery.com>
5975
5976 * decl.c (pop_label): Don't warn about unused labels more than
5977 once.
5978 * semantics.c (finish_goto_stmt): Always marked used labels as
5979 used.
5980
5981 * decl.c (layout_var_decl): Change prototype. Call layout_decl
5982 even when the declaration is external.
5983 (cp_finish_decl): Adjust call to layout_var_decl.
5984 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5985
5986 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5987
5988 * typeck.c (get_member_function_from_ptrfunc): Always consider
5989 virtuality inside member pointer.
5990
5991 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5992
5993 Turn on function-at-a-time processing.
5994 * cp-tree.h (doing_semantic_analysis_p): New macro.
5995 (SF_DEFAULT): Define to zero, not SF_EXPAND.
5996 (start_handler_parms): Change prototype.
5997 (expand_start_catch_block): Likewise.
5998 (expand_end_catch_block): Likewise.
5999 (expand_start_eh_spec): Likewise.
6000 (expand_end_eh_spec): Declare.
6001 (finish_handler_parms): Change prototype.
6002 (begin_catch_block): Declare.
6003 (finish_handler): Change prototype.
6004 (do_pushlevel): Declare.
6005 (do_poplevel): Likewise.
6006 * decl.c (pushlevel): Don't create
6007 binding levels when not doing semantic analysis.
6008 (poplevel): Don't pop them.
6009 (pushdecl): Assert that we are never called when not doing
6010 semantic analysis.
6011 (pushdecl_top_level): Use push_to_top_level.
6012 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
6013 label when expanding.
6014 (cp_finish_decl): Only inject for-scope variables when doing
6015 semantic analysis. Add comments.
6016 (start_handler_parms): Return the handler parm.
6017 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
6018 already set. Reinitialize from saved function data if available.
6019 Don't pushlevel when not doing semantic analysis.
6020 (store_parm_decls): Only generate RTL when expanding. Only
6021 pushdecl when doing semantic analysis. Set
6022 current_eh_spec_try_block if appropriate.
6023 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
6024 Combine common code. Don't poplevel when not doing semantic
6025 analysis.
6026 (push_cp_function_context): Don't expand functions without an
6027 explicit call to expand_body.
6028 (mark_lang_function): Make eh_spec_try_block and
6029 x_scope_stmt_stack.
6030 * except.c (expand_end_eh_spec): Don't
6031 declare.
6032 (process_start_catch_block): Likewise.
6033 (push_eh_cleanup): Use finish_decl_cleanup.
6034 (initialize_handler_parm): New function.
6035 (expand_start_catch_block): Use it.
6036 (expand_end_catch_block): Use tree-generation functions, not
6037 RTL-generation functions.
6038 (expand_start_eh_spec): Likewise.
6039 (expand_end_eh_spec): Likewise.
6040 (expand_exception_blocks): Simplify.
6041 (start_anon_func): Use do_pushlevel.
6042 (end_anon_func): Use do_poplvel. Call expand_body for the
6043 function.
6044 * expr.c (do_case): Don't call define_case_label.
6045 * init.c (create_temporary_var): Set DECL_CONTEXT for local
6046 variables.
6047 * method.c (emit_thunk): Call expand_body for the
6048 thunk.
6049 (sythesize_method): Likewise.
6050 * parse.y (handler_args): Give it ttype.
6051 (eat_saved_input): Call expand_body.
6052 (base_init): Use do_pushlevel.
6053 (pending_inline): Call expand_body.
6054 (handler): Adjust calls to finish_handler_parms and
6055 finish_handler.
6056 (handler_args): Don't call expand_start_catch_block. Return the
6057 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
6058 * parse.c: Regenerated.
6059 * rtti.c (synthesize_tinfo_fn): Call finish_function.
6060 * semantics.c (do_pushlevel): Give it external linkage. Build
6061 SCOPE_STMTs.
6062 (do_poplevel): Likewise.
6063 (finish_case_label): Call define_case_label when doing semantic
6064 analysis.
6065 (finish_goto_stmt): Create RTL for labels.
6066 (finish_function_try_block): Set in_function_try_handler
6067 unconditionally.
6068 (finish_function_handler_sequence): Unset it.
6069 (finish_handler_parms): Use expand_start_catch_block even when
6070 building a statement-tree.
6071 (begin_catch_block): New function.
6072 (finish_handler): Move a little RTL-generation logic here.
6073 (finish_decl_cleanup): Allow cleanups for empty declarations.
6074 (finish_named_return_value): Don't pushdecl when not doing
6075 semantic analysis.
6076 (expand_stmt): Don't do semantic analysis for variable
6077 declarations. Handle START_CATCH_STMT. Call expand_label
6078 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
6079 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6080 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6081 RETURN_INIT and function try blocks.
6082
6083 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
6084 x_scope_stmt_stack. Add x_in_charge_parm.
6085 (current_eh_spec_try_block): New macro.
6086 (current_scope_stmt_stack): Likewise.
6087 (current_in_charge_parm): Likewise.
6088 * decl.c (start_function): Initialize current_in_charge_parm.
6089 (finish_function): Use current_in_charge_parm rather than looking
6090 up __in_chrg.
6091 * search.c (expand_indirect_vtbls_init): Likewise.
6092
6093 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6094 (TRY_BLOCK): Likewise.
6095 (HANDLER): Likewise.
6096 (START_CATCH_STMT): New tree node.
6097 (SCOPE_STMT): Likewise.
6098 * cp-tree.h (SCOPE_BEGIN_P): New macro.
6099 (SCOPE_NULLIFIED_P): Likewise.
6100 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
6101 (struct lang_decl): Add saved_language_function.
6102 (DECL_PENDING_INLINE_INFO): Adjust documentation.
6103 (DECL_PENDING_INLINE_P): New macro.
6104 (TYPE_TI_ARGS): Fix typo in comment.
6105 (DECL_SAVED_TREE): Add to documentation.
6106 (DECL_SAVED_FUNCTION_DATA): New macro.
6107 (START_CATCH_TYPE): Likewise.
6108 (SCOPE_END_P): New macro.
6109 (declare_parm_level): Don't declare.
6110 * decl.c (mark_lang_function): New function, split out from
6111 mark_cp_function_context.
6112 (save_function_data): New function.
6113 (declare_parm_level): Remove.
6114 (finish_function): Use save_function_data to squirrel away
6115 important stuff for later use.
6116 (mark_cp_function_context): Use mark_function_data.
6117 (lang_mark_tree): Likewise.
6118 * lex.c (begin_definition_of_inclass_inline): Set
6119 DECL_PENDING_INLINE_P.
6120 (store_pending_inline): Clear it.
6121 * pt.c (tsubst_decl): Likewise.
6122
6123 1999-09-17 Nathan Sidwell <nathan@acm.org>
6124
6125 * call.c (perform_implicit_conversion): Deal with error_mark_node.
6126
6127 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6128
6129 * decl.c (warn_extern_redeclared_static): Don't get confused by
6130 static member functions.
6131 (duplicate_decls): Merge DECL_THIS_STATIC.
6132
6133 * decl.c (expand_static_init): Make sure assignments to local
6134 statics actually occur.
6135
6136 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6137
6138 * cp-tree.h (poplevel_class): Declare.
6139 * class.c (popclass): Use poplevel_class, not poplevel.
6140 * decl.c (poplevel_class): Don't make it static. Don't return a
6141 value.
6142 (poplevel): Don't call poplevel_class; abort in a class
6143 binding level is seen.
6144 * semantics.c (finish_translation_unit): Use pop_everything.
6145 * parse.y (member_init): Allow errors.
6146 (pending_inline): Call finish_function.
6147 * parse.c: Regenerated.
6148 * Makefile.in (CONFLICTS): Adjust.
6149
6150 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
6151
6152 * error.c: Reduce code duplication.
6153 (dump_template_value): New function.
6154 (dump_type_real): Use it.
6155 (dump_decl): Likewise.
6156 (dump_function_name): Likewise.
6157 (dump_function_decl): Don't be too talkative about function return
6158 type variety.
6159
6160 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6161
6162 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6163
6164 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6165
6166 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
6167
6168 * decl2.c (finish_file): Also call check_global_declarations for
6169 the pending_statics list.
6170
6171 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
6172
6173 * lex.c (cp_pragma_implementation): Allow #pragma implementation
6174 in header files.
6175
6176 1999-09-15 Richard Henderson <rth@cygnus.com>
6177
6178 * lex.c (mark_impl_file_chain): Follow the next chain.
6179
6180 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6181
6182 * decl.c (warn_extern_redeclared_static): Simplify. Catch
6183 problems with extern "C" functions redeclared as static.
6184 (duplicate_decls): When a builtin is redeclared static, make the
6185 new function have internal linkage.
6186
6187 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6188
6189 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6190 * pt.c (tsubst_copy): Likewise.
6191 * tree.c (search_tree): Likewise.
6192 (mapcar): Likewise.
6193
6194 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6195
6196 * typeck2.c (ack): Don't declare progname.
6197
6198 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6199
6200 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6201 filenames with ggc_alloc_string.
6202
6203 1999-09-14 Mark Mitchell <mark@codesourcery.com>
6204
6205 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
6206 TARGET_EXPR.
6207 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6208 the TARGET_EXPR.
6209 * cvt.c (build_up_reference): Likewise.
6210 * tree.c (build_cplus_new): Likewise.
6211 (get_target_expr): Likewise.
6212
6213 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
6214
6215 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
6216
6217 1999-09-13 Mark Mitchell <mark@codesourcery.com>
6218
6219 * cp-tree.h (build_target_expr): New function.
6220 * call.c (build_conditional_expr): Use build_target_expr.
6221 (convert_like): Likewise.
6222 (build_over_call): Likewise.
6223 * cvt.c (build_up_reference): Likewise.
6224 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6225 (destroy_local_var): Here.
6226 (build_target_expr): New function.
6227 * tree.c (build_cplus_new): Use it.
6228 (get_target_expr): Likewise.
6229
6230 1999-09-13 Nathan Sidwell <nathan@acm.org>
6231
6232 * typeck.c (expr_sizeof): Don't decay arrays and functions.
6233 Remove misleading comment.
6234 (build_compound_expr): Don't decay arrays.
6235
6236 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
6237
6238 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6239 class rvalues again.
6240
6241 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6242
6243 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6244
6245 * g++spec.c: Include gcc.h.
6246 (lang_specific_driver): Constify a char*. Call xcalloc, not
6247 xmalloc/bzero. All calls to the function pointer parameter now
6248 explicitly call `fatal'.
6249
6250 1999-09-12 Mark Mitchell <mark@codesourcery.com>
6251
6252 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
6253 * cvt.c (ocp_convert): Complete the from and destination types.
6254 Adjust warning about functions always being `true' in conditionals.
6255 * decl.c (duplicate_decls): Don't play funny games with abort.
6256 * error.c (dump_expr): Handle OVERLOADs.
6257 * spew.c (probe_obstack): Remove.
6258 * typeck.c (condition_conversion): Use perform_implicit_conversion.
6259
6260 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
6261
6262 * cp-tree.h (auto_function, define_function): Adjust prototypes.
6263 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
6264 changed.
6265 (auto_function): Likewise, for CODE arg.
6266 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6267 (builtin_function): ... here.
6268
6269 1999-09-11 Mark Mitchell <mark@codesourcery.com>
6270
6271 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6272 (init_decl_processing): Don't set TREE_PERMANENT for the
6273 error_mark_node.
6274 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6275 (grokdeclarator): Likewise.
6276 (grokparms): Don't check TREE_PERMANENT when building up lists.
6277 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6278 (mark_inline_for_output): Likewise.
6279 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6280 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6281 * lex.c (check_newline): Don't check ggc_p; it is always one.
6282 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6283 * spew.c (yylex): Don't copy_node or probe_obstacks for
6284 non-permanent CONSTANTs and STRINGs.
6285 * tree.c (build_cplus_array_type_1): Don't fuss with
6286 TREE_PERMANENT on ARRAY_TYPEs.
6287
6288 * cp-tree.def (CLEANUP_STMT): New node.
6289 * cp-tree.h (language_function): Add name_declared.
6290 (current_function_name_declared): New macro.
6291 (CLEANUP_DECL): New macro.
6292 (CLEANUP_EXPR): Likewise.
6293 (emit_local_var): Likewise.
6294 (finish_decl_cleanup): New function.
6295 * cvt.c (build_up_reference): Simplify.
6296 (ocp_convert): Remove dead code.
6297 * decl.c (start_decl): Remove call to add_decl_stmt.
6298 (grok_reference_init): Adjust, to handle bindings temporaries to
6299 references. Remove dead code.
6300 (initialize_local_var): Don't generate RTL for
6301 declarations here, or build cleanups here. Don't fuss with
6302 obstacks. Replace expand_start_target_temps calls with explicit
6303 setting of stms_are_full_exprs_p.
6304 (destroy_local_var): New function.
6305 (emit_local_var): Likewise.
6306 (cp_finish_decl): Use them, as appropriate.
6307 (start_function): Announce template functions.
6308 (store_parm_decls): Don't call declare_function_name here.
6309 (finish_stmt): Don't start emit base-initialization code when just
6310 building the statement-tree.
6311 * init.c (create_temporary_var): Move add_decl_stmt call ...
6312 (get_temp_regvar): Here.
6313 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6314 cp_finish_decl would expect. Don't call add_decl_stmt.
6315 * semantics.c (begin_compound_stmt): Call declare_function_name,
6316 if appropriate.
6317 (finish_decl_cleanup): New function.
6318 (expand_stmt): Use emit_local_var to output variables.
6319 (expand_body): Set current_funtion_name_declared.
6320
6321 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6322
6323 * cp-tree.h (finish_cleanup_try_block): New function.
6324 * semantics.c (finish_cleanup_try_block): Add comment.
6325
6326 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6327
6328 * cp-tree.h: Delete declarations for all tree nodes now moved to
6329 global_trees.
6330 * decl.c: Delete their definitions.
6331 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6332 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6333 provide defaults.
6334 (init_decl_processing): Call build_common_tree_nodes and
6335 build_common_tree_nodes_2 instead of building their nodes here.
6336 Don't add gc roots for them.
6337
6338 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6339
6340 * cp-tree.h (language_function): Rename expanding_p to
6341 x_expanding_p. Rename named_label_uses to x_named_label_uses.
6342 (expanding_p): Adjust accordingly.
6343 (TREE_VIA_PRIVATE): Fix typo in comment.
6344 (DECL_REFERENCE_SLOT): Remove.
6345 (SET_DECL_REFERENCE_SLOT): Likewise.
6346 * decl.c (named_label_uses): Adjust. Remove chicken comment.
6347 (push_overloaded_decl): Don't truncate the chain of bindings when
6348 adding an overloaded function.
6349 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6350 (initialize_local_var): Fix typo in comment.
6351 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
6352 * decl2.c (start_objects): Make the fact that we are expanding
6353 the generated function right away explicit.
6354 (start_static_storage_duration_function): Likewise.
6355 (finish_file): Fix typo in comment.
6356 * init.c (build_vec_init): Correct bugs in handling cleanups.
6357 * semantics.c (maybe_convert_cond): New function.
6358 (FINISH_COND): Always store the condition, even if there's
6359 a declaration.
6360 (finish_if_stmt_cond): Use maybe_convert_cond.
6361 (finish_while_stmt_cond): Likewise.
6362 (finish_do_stmt): Likewise.
6363 (finish_for_cond): Likewise.
6364 (expand_cond): Adjust.
6365
6366 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6367 * init.c (perform_member_init): Remove obstack machinations.
6368 (expand_cleanup_for_base): Likewise.
6369 (finish_init_stmts): Mark the statement-expression as used.
6370 * method.c (emit_thunk): Use tree-generating functions, not
6371 RTL.
6372 (do_build_copy_constructor): Likewise.
6373 (do_build_assign_ref): Likewise.
6374 (synthesize_method): Likewise. Keep track of line numbers.
6375 * pt.c (tsubst_expr): Handle various kinds of try blocks.
6376 * semantics.c (expand_stmts): Remove.
6377 (begin_function_try_block): Set FN_TRY_BLOCK_P.
6378 (finish_function_try_block): Be careful rechaining
6379 function try blocks.
6380 (expand_stmt): Loop through all the statements at a given level.
6381 (exapnd_body): Be careful with line-numbers here too. Prepare for
6382 being called directly from the parser.
6383
6384 * cp-tree.h (finish_function): Adjust prototype.
6385 * decl.c (finish_function): Return the function compiled.
6386 * pt.c (instantiate_decl): Don't play games with obstacks.
6387 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6388 (search_tree): Likewise.
6389 * typeck.c: Fix typo in comment.
6390 * typeck2.c (store_init_value): Add comment.
6391
6392 * cp-tree.h (CPTI_ATEXIT): New macro.
6393 (atexit_node): Likewise.
6394 * decl.c (destroy_local_static): New function, broken out from ...
6395 (expand_static_init): Here.
6396
6397 * rtti.c (get_tinfo_var): These should always be global
6398 (expand_si_desc): Use tree, not RTL, functions to generate code.
6399 (expand_class_desc): Likewise.
6400 (expand_ptr_desc): Likewise.
6401 (expand_attr_desc): Likewise.
6402 (expand_generic_desc): Likewise.
6403 (synthesize_tinfo_fn): Likewise.
6404
6405 1999-09-09 Mark Mitchell <mark@codesourcery.com>
6406
6407 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6408 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
6409 RECHAIN_STMTS.
6410 (RECHAIN_STMST_FROM_CHAIN): Likewise.
6411
6412 * parse.y (simple_stmt): Fix typo in last change.
6413
6414 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6415 (STMT_IS_FULL_EXPR_P): Likewise.
6416 (STMT_LINENO_FOR_FN_P): Likewise.
6417 (prep_stmt): New function.
6418 (building_stmt_tree): Tweak for safety.
6419 * pt.c (tsubst_expr): Use prep_stmt throughout.
6420 (add_tree): Move it to semantics.c
6421 * semantics.c (add_tree): Move it here.
6422 (finish_expr_stmt_real): New function.
6423 (finish_expr_stmt): Use it.
6424 (finish_if_stmt_cond): Use FINISH_COND.
6425 (finish_while_stmt_cond): Likewise.
6426 (finish_for_cond): Likewise.
6427 (finish_stmt_tree): Tweak line-number handling.
6428 (prep_stmt): New function.
6429 (expand_stmt): Use it.
6430
6431 * cp-tree.h (begin_switch_stmt): Adjust prototype.
6432 (finish_switch_cond): Likewise.
6433 * parse.y (simple_stmt): Adjust accordingly.
6434 * parse.c: Regenerated.
6435 * pt.c (tsubst_expr): Adjust accordingly.
6436 * semantics.c (expand_cond): New function.
6437 (FINISH_COND): New macro.
6438 (begin_switch_stmt): Build the SWITCH_STMT here.
6439 (finish_switch_stmt_cond): Not here.
6440 (expand_stmt): Adjust calls to begin_switch_stmt and
6441 finish_switch_cond. Use expand_cond throughout.
6442
6443 * dump.c (dequeue_and_dump): Dump types for constants.
6444 Describe DECL_ARG_TYPE more intuitively.
6445 Handle ARRAY_REF.
6446
6447 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6448 (lang_cleanup_tree): Remove.
6449 * lex.c (make_lang_type): Use ggc_alloc to allocate
6450 TYPE_LANG_SPECIFIC.
6451
6452 Reorganize per-function data.
6453 * cp-tree.h (saved_scope): Add function_decl, bindings.
6454 (language_function): Rename binding_level to bindings.
6455 (cp_function_chain): Use the current_function, not the
6456 outer_function_chain.
6457 (current_class_ptr): Make it work, even when there's no
6458 current function.
6459 (current_class_ref): Likewise.
6460 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
6461 macros.
6462 (clear_temp_name): Remove.
6463 * decl.c (check_function_type): New function, broken out from
6464 start_function.
6465 (current_binding_level): Adjust definition.
6466 (pushlevel): Simplify.
6467 (poplevel): Don't use named_label_uses when we're outside
6468 a function scope.
6469 (mark_saved_scope): Mark function_decl and bindings.
6470 (maybe_push_to_top_level): Don't unconditionally push a new
6471 function context. Save bindings and the current_function_decl.
6472 Don't clear named_labels.
6473 (pop_from_top_level): Pop function context if appropriate.
6474 (init_decl_processing): Set init_lang_status and free_lang_status,
6475 rather than save_lang_status and restore_lang_status.
6476 (start_function): Take SF_* flags. Don't clear per-function data.
6477 Reorder and simplify to use new per-function data code. Add
6478 asserts.
6479 (store_parm_decls): Don't call init_function_start here.
6480 (finish_function): Adjust for new handling of per-function data.
6481 (push_cp_function_context): Simplify.
6482 (mark_cp_function_context): Change binding_level to bindings.
6483 * decl2.c (clear_temp_name): Remove.
6484 (start_objects): Use SF flags to start_function.
6485 (start_static_storage_duration_function): Likewise.
6486 * except.c (start_anon_func): Remove redundant calls to
6487 push_function_context_to. Use SF flags to start function.
6488 (end_anon_func): Remove redundant call to pop_function_context
6489 from.
6490 * lex.c (reinit_parse_for_function): Don't initialize per-function
6491 data.
6492 * method.c (emit_thunk): Clear current_function after calling
6493 assemble_end_function. Use SF flags for start_function.
6494 (synthesize_method): Use SF flags for start_function.
6495 * parse.c: Regenerated.
6496 * parse.y (fn.defpen): Likewise.
6497 (pending_inline): Clear current_function, even if something goes
6498 wrong.
6499 * pt.c (instantiate_decl): Use SF flags to start_function.
6500 Don't save and restore expanding_p.
6501 (add_tree): Handle the case where we are outside any function.
6502 (end_tree): Likewise.
6503 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6504 * semantics.c (begin_function_definition): Likewise.
6505 (expand_body): Likewise.
6506
6507 1999-09-09 Nathan Sidwell <nathan@acm.org>
6508
6509 * cp-tree.h (convert_to_void): Prototype new function.
6510 (require_complete_type_in_void): Remove prototype.
6511 * cvt.c (convert_to_void): New function.
6512 (ocp_convert): Use convert_to_void.
6513 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6514 expressions.
6515 * typeck.c (require_complete_type_in_void): Remove function.
6516 (build_compound_expr): Use convert_to_void.
6517 (build_static_cast): Likewise.
6518 (build_c_cast): Likewise.
6519 * semantics.c (finish_expr_stmt): Do not decay full expressions.
6520
6521 * typeck.c (build_x_compound_expr): Add FIXME.
6522
6523 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6524
6525 * cp-tree.h (scratch_tree_cons): Remove.
6526 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6527 and perm_tree_cons with plain tree_cons.
6528 * class.c: Likewise.
6529 * decl.c: Likewise.
6530 * decl2.c: Likewise.
6531 * except.c: Likewise.
6532 * expr.c: Likewise.
6533 * init.c: Likewise.
6534 * lex.c: Likewise.
6535 * method.c: Likewise.
6536 * parse.y: Likewise.
6537 * pt.c: Likewise.
6538 * repo.c: Likewise.
6539 * rtti.c: Likewise.
6540 * search.c: Likewise.
6541 * typeck.c: Likewise.
6542 * parse.c: Regenerated.
6543 * tree.c (build_srcloc): Simplify.
6544
6545 1999-09-08 Bruce Korb autogen@linuxbox.com
6546
6547 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6548
6549 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6550
6551 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6552 Remove next.
6553 (LANG_DECL_PERMANENT): Remove.
6554 * decl.c (duplicate_decls): Don't mess about with obstacks trying
6555 to free memory.
6556 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6557 * lex.c (free_lang_decl_chain): Remove.
6558 (build_lang_decl): Don't use obstacks.
6559 (retrofit_lang_decl): Likewise.
6560 (copy_lang_decl): Likewise.
6561
6562 * cp-tree.h (saved_scope): Remove old_binding_level and
6563 function_decl. Tidy up.
6564 * decl.c (mark_saved_scope): Don't set them.
6565 (maybe_push_to_top_level): Clear memory.
6566
6567 * decl.c (layout_var_decl): Change prototype. Don't complete
6568 types for external objects.
6569 (check_initializer): Likewise. Tidy.
6570 (initialize_local_var): Complete types here.
6571 (cp_finish_decl): Not here. Reorganize a little.
6572 (grokvardecl): Don't complete types here.
6573
6574 * decl.c (start_function): Clear last_dtor_insn and
6575 last_parm_cleanup_insn.
6576 (push_cp_function_context): Just copy over a little of
6577 the old context, not all of it.
6578
6579 * cp-tree.h (copy_to_permanent): Remove.
6580 (permanent_p): Likewise.
6581 * decl.c (building_typename_type): Don't use copy_to_permanent.
6582 (start_decl): Likewise.
6583 (grok_reference_init): Likewise.
6584 (cp_finish_decl): Likewise.
6585 * init.c (build_new_1): Don't use mapcar.
6586 (build_vec_delete_1): Don't use copy_to_permanent.
6587 (build_vec_init): Likewise.
6588 * parse.y (primary): Likewise.
6589 * parse.c: Regenerated.
6590 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
6591 (lookup_template_class): Likewise.
6592 (tsubst_friend_function): Likewise.
6593 (instantiate_class_template): Likewise.
6594 (tsubst_decl): Likewise.
6595 (tsubst): Likewise.
6596 (instantiate_template): Likewise.
6597 (unify): Likewise.
6598 * rtti.c (get_tinfo_fn): Likewise.
6599 (build_dynamic_cast): Likewise.
6600 * semantics.c (finish_if_stmt_cond): Likewise.
6601 (finish_while_stmt_cond): Likewise.
6602 (finish_do_stmt): Likewise.
6603 (finish_for_cond): Likewise.
6604 (finish_for_expr): Likewise.
6605 (finish_cleanup): Likewise.
6606 (add_decl_stmt): Likewise.
6607 (finish_named_return_value): Likewise.
6608 (finish_qualified_call_expr): Likewise.
6609 * tree.c (perm_manip): Remove.
6610 (build_exception_variant): Don't use copy_to_permanent.
6611 (permanent_p): Remove.
6612 (copy_to_permament): Remove.
6613 (build_min_nt): Don't use copy_to_permanent.
6614 (build_min): Likewise.
6615 (min_tree_cons): Likewise.
6616 * typeckc.c (build_static_cast): Likewise.
6617 (build_reinterpret_cast): Likewise.
6618 (build_const_cast): Likewise.
6619
6620 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6621
6622 * decl.c (ggc_p): Set it to 1.
6623 (mark_saved_scope): Add prototype.
6624
6625 1999-09-07 Richard Henderson <rth@cygnus.com>
6626
6627 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
6628 * typeck.c (self_promoting_args_p): Delete.
6629
6630 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
6631
6632 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
6633 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
6634
6635 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6636
6637 * Makefile.in (tree.o): Depend on ggc.h.
6638 * class.c (make_method_vec): Remove.
6639 (free_method_vec): Likewise.
6640 (free_method_vecs): Remove.
6641 (add_method): Don't use them.
6642 * cp-tree.def (PTRMEM_CST): Make it longer.
6643 (TEMPLATE_PARM_INDEX): Make it shorter.
6644 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6645 (template_parm_index): Remove RTL field.
6646 (ptrmem_cst): Add RTL field.
6647 (finish_function): Removed parameter.
6648 (process_next_inline): Change prototype.
6649 (init_cplus_unsave): Rename to init_tree.
6650 (binding_init): Remove.
6651 * decl.c (free_binding_nodes): Remove.
6652 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
6653 (pop_binding): Don't use free_binding_nodes.
6654 (free_binding_vecs): Remove.
6655 (store_bindings): Don't use them.
6656 (pop_from_top_level): Likewise.
6657 (lookup_namespace_name): Simplify.
6658 (build_typename_type): Don't use obstack_free.
6659 (unqualified_namespace_lookup): Simplify.
6660 (lookup_name_real): Simplify.
6661 (start_function): Remove comment about leaks.
6662 (finish_function): Removed nested parameter. Call
6663 expand_end_bindings even when building_stmt_tree.
6664 Call ggc_push_context and ggc_pop_context around
6665 rest_of_compilation, if necessary.
6666 (mark_cp_function_context): Handle a NULL language-context.
6667 (lang_mark_false_label_stack): Fix typo.
6668 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6669 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
6670 pointer to method types.
6671 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6672 * decl2.c (finish_objects): Adjust call to finish_function.
6673 (finish_static_store_duration_function): Likewise.
6674 (do_nonmember_using_decl): Remove call to binding_init.
6675 * except.c (end_anon_func): Adjust call to finish_function.
6676 * lex.c (mark_impl_file_chain): New function.
6677 (init_parse): Call init_tree, not init_cplus_unsave.
6678 Add GC roots.
6679 (cp_pramga_interface): Use xmalloc, not permalloc.
6680 (cp_pragma_implementation): Likewise.
6681 (begin_definition_of_inclass_inline): Simplify.
6682 (process_next_inline): Adjust prototype.
6683 (do_scoped_id): Don't call binding_init.
6684 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6685 * method.c (emit_thunk): Adjust call to finish_function.
6686 (synthesize_method): Likewise.
6687 * parse.y (%union): Add a new `pi' variant.
6688 (PRE_PARSED_FUNCTION_DECL): Use it.
6689 (fn.defpen): Likewise.
6690 (fndef): Adjust call to finish_function.
6691 * pt.c (instantiate_decl): Likewise.
6692 * rtti.c (syntheisze_tinfo_fn): Likewise.
6693 * semantics.c (expand_body): Likewise.
6694 * tree.c: Include ggc.h.
6695 (mark_list_hash): New function.
6696 (binding_init): Remove.
6697 (init_cplus_unsave): Rename to ...
6698 (init_tree): This. Add GC roots.
6699
6700 1999-09-05 Mark Mitchell <mark@codesourcery.com>
6701
6702 Get ready for garbage collection.
6703 * Makefile.in (CXX_TREE_H): Add varray.h
6704 (lex.o): Depend on ggc.h.
6705 (decl.o): Likewise.
6706 (decl2.o): Likewise.
6707 (method.o): Likewise.
6708 (search.o): Likewise.
6709 (pt.o): Likewise.
6710 (repo.o): Likewise.
6711 * class.c: Include ggc.h.
6712 (current_class_name): Remove.
6713 (current_class_type): Likewise.
6714 (current_access_specifier): Likewise.
6715 (previous_class_type): Likewise.
6716 (previous_class_values): Likewise.
6717 (class_cache_firstobj): Likewise.
6718 (current_lang_base): Likewise.
6719 (current_lang_stack): Likewise.
6720 (current_lang_stacksize): Likewise.
6721 (lang_name_c): Likewise.
6722 (lang_name_cplusplus): Likewise.
6723 (lang_name_java): Likewise.
6724 (current_lang_name): Likewise.
6725 (base_layout_decl): Likewise.
6726 (access_default_node): Likewise.
6727 (access_public_node): Likewise.
6728 (access_protected_node): Likewise.
6729 (access_private_node): Likewise.
6730 (access_default_virtual_node): Likewise.
6731 (access_public_virtual_node): Likewise.
6732 (access_protected_virtual_node): Likewise.
6733 (access_private_virtual_node): Likewise.
6734 (signed_zero_node): Likewise.
6735 (init_class_processing): Don't build base_layout_decl.
6736 (push_lang_context): Adjust now that current_lang_base is a varray.
6737 (pop_lang_context): Likewise.
6738 * cp-tree.h: Include varray.h.
6739 (cp_global_trees): Add access_default, access_public,
6740 access_protected, access_private, access_default_virtual,
6741 access_public_virtual, access_protected_virtual,
6742 access_private_virtual, ctor_identifier, delta2_identifier,
6743 delta_identifier, dtor_identifier, in_charge_identifier,
6744 index_identifier, nelts_identifier, this_identifier,
6745 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6746 lang_name_c, lang_name_cplusplus, lang_name_java,
6747 empty_except_spec, null, jclass, minus_one, terminate.
6748 (saved_scope): Move here from decl.c. Define globals in terms of
6749 saved_scope: current_namespace, current_class_name,
6750 current_class_type, current_access_specifier, current_lang_stack,
6751 current_lang_base, current_lang_name, current_function_parms,
6752 current_template_parms, processing_template_decl,
6753 processing_specialization, processing_explicit_instantiation,
6754 previous_class_type, previous_class_values, class_cache_firstobj.
6755 (scope_chain): New variable.
6756 (init_pt): New function.
6757 * decl.c (current_namespace): Remove.
6758 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6759 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6760 (delta_identifier, delta2_identifier): Likewise.
6761 (pfn_or_delta2_identifier, tag_identifier): Likewise
6762 (vt_off_identifier, empty_except_spec, null_node): Likewise.
6763 (current_function_parms, current_lang_base): Remove.
6764 (current_lang_stack, previous_class_values): Remove.
6765 (class_binding_level): Macroize.
6766 (saved_scope): Remove.
6767 (current_saved_scope): Rename to scope_chain.
6768 (mark_saved_scope): Adjust for new scope structure.
6769 (maybe_push_to_top_level): Likewise.
6770 (pop_from_top_level): Likewise.
6771 (duplicate_decls): Adjust now that current_lang_base is a varray.
6772 (build_typename_type): Call ggc_add_tree_hash_table_root.
6773 (init_decl_processing): Call init_pt. Call push_to_top_level to
6774 set up globals. Add GC roots.
6775 (xref_basetypes): Adjust now that current_lang_base is a varray.
6776 * decl.h (this_identifier): Remove.
6777 (in_charge_identifier): Likewise.
6778 * decl2.c: Don't include varray.h.
6779 (current_namespace): Remove.
6780 (init_decl2): Add GC roots.
6781 * except.c (Terminate): Remove.
6782 (init_exception_processing): Use terminate_node instead.
6783 (build_terminate_handler): Likewise.
6784 * init.c (nc_nelts_field_id): Remove.
6785 (minus_one): Likewise.
6786 (init_init_processing): Use minus_one_node and nelts_identifier
6787 instead. Add GC roots.
6788 (jclass_node): Remove.
6789 (build_new_1): Use nelts_identifier.
6790 (build_vec_init): Likewise.
6791 (build_vec_delete): Likewise.
6792 * lex.c: Include ggc.h.
6793 (defarg_fn): Move declaration early.
6794 (defarg_parms): Likewise.
6795 (init_parse): Add GC roots.
6796 (handle_cp_pragma): Remove redundant declaration of
6797 pending_vtables.
6798 * method.c: Include ggc.h.
6799 (btypelist): Make it a varray. All uses changed.
6800 (ktypelist): Likewise.
6801 (init_method): Add GC roots.
6802 * pt.c: Don't include varray.h. Include ggc.h.
6803 (current_template_parms): Remove.
6804 (processing_template_decl): Likewise.
6805 (processing_specialization): Likewise.
6806 (processing_explicit_instantiation): Likewise.
6807 (init_pt): New function.
6808 * repo.c: Include ggc.h.
6809 (init_repo): Add GC roots.
6810 * search.c: Don't include varray.h.
6811 (_vptr_name): Remove.
6812 (lookup_field_1): Use vtpr_identifier instead.
6813 (expand_indirect_vtbls_init): Remove redundant declaration of
6814 in_charge_identifier.
6815 (init_search_processing): Use vptr_identifier.
6816
6817 1999-09-05 Richard Henderson <rth@cygnus.com>
6818 Bernd Schmidt <bernds@cygnus.co.uk>
6819 Mark Mitchell <mark@codesourcery.com>
6820
6821 * Makefile.in (parse.o): Depend on ggc.h.
6822 (decl2.o): Depend on ggc.h.
6823 (init.o): Depend on ggc.h.
6824 * cp-tree.h (init_decl2): Declare.
6825 (cp_parse_init): Likewise.
6826 * decl.c (ggc_p): Define to zero.
6827 (mark_saved_scope): New function.
6828 (init_decl_processing): Call cp_parse_init, and cp_decl2.
6829 Register GC roots.
6830 (expand_static_init): Add GC roots.
6831 * decl2.c: Include ggc.h.
6832 (init_decl2): New function.
6833 * init.c: Include ggc.h.
6834 (init_init_processing): Add GC roots.
6835 * parse.y: Include ggc.h.
6836 (cp_parse_init): New function.
6837
6838 1999-09-04 Mark Mitchell <mark@codesourcery.com>
6839
6840 * decl.c (init_decl_processing): Set mark_lang_status.
6841 (lang_mark_false_label_stack): Adjust prototype.
6842 * decl2.c (grok_function_init): Remove extraneous declaration of
6843 abort_fndecl.
6844
6845 * Make-lang.in (cc1plus): Remove dependency on GGC.
6846 * Makefile.in (OBJS): Don't mention ggc-simple.o.
6847 (OBJDEPS): Don't mention ggc-simple.o.
6848
6849 * Make-lang.in (cc1plus): Depend on $(GGC).
6850 * Makefile.in (OBJS): Add ggc-simple.o.
6851 (OBJDEPS): Likewise.
6852 * cp-tree.h (language_function): Rename members to `x_' versions;
6853 we now have x_named_labels, x_ctor_label, x_dtor_label,
6854 x_base_init_list, x_member_init_list, x_base_init_expr,
6855 x_current_class_ptr, x_current_class_ref, x_last_tree,
6856 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6857 x_result_rtx.
6858 (dtor_label, ctor_label, current_base_init_list,
6859 current_member_init_list, base_init_expr, current_class_ptr,
6860 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6861 * decl.c: Include ggc.h.
6862 (last_dtor_insn): Adjust to use x_ names.
6863 (last_parm_cleanup_insn): Likewise.
6864 (original_result_rtx): Likewise.
6865 (named_labels): Likewise.
6866 (mark_binding_level): New function.
6867 (mark_cp_function_context): Likewise.
6868 (mark_false_label_stack): Likewise.
6869 (lang_mark_tree): Likewise.
6870 (lang_cleanup_tree): Likewise.
6871
6872 1999-09-03 Mark Mitchell <mark@codesourcery.com>
6873
6874 * Makefile.in (CXX_TREE_H): Include function.h.
6875 (decl.o): Don't depend on function.h.
6876 (decl2.o): Likewise.
6877 (typeck.o): Likewise.
6878 (init.o): Likewise.
6879 (method.o): Likewise.
6880 * cp-tree.h: Include function.h.
6881 (cp_function): Rename to language_function. Remove next.
6882 (cp_function_chain): Make it a macro, not a variable.
6883 (push_cp_function_context): Don't declare.
6884 (pop_cp_function_context): Likewise.
6885 * decl.c: Don't include function.h.
6886 (push_cp_function_context): Make it static. Make it suitable for
6887 a save_lang_status callback.
6888 (pop_cp_function_context): Likewise.
6889 (maybe_push_to_top_level): Call push_function_context_to, not
6890 push_cp_function_context.
6891 (pop_from_top_level): Call pop_function_context_from, not
6892 pop_cp_function_context.
6893 (init_decl_processing): Set save_lang_status and
6894 restore_lang_status. Call push_function_context_to, not
6895 push_cp_function_context.
6896 (cp_function_chain): Remove.
6897 * decl2.c: Don't include function.h.
6898 * except.c: Don't include function.h.
6899 (start_anon_func): Call push_function_context_to, not
6900 push_cp_function_context.
6901 (end_anon_func): Call pop_function_context_from, not
6902 pop_cp_function_context.
6903 * init.c: Don't include function.h.
6904 * lex.c (begin_definition_of_inclass_inline): Call
6905 push_function_context_to, not push_cp_function_context.
6906 (process_next_inline): Call pop_function_context_from, not
6907 pop_cp_function_context.
6908 * method.c: Don't include function.h.
6909 (synthesize_method): Call push_function_context_to, not
6910 push_cp_function_context. Call pop_function_context_from, not
6911 pop_cp_function_context.
6912 * typeck.c: Don't include function.h.
6913
6914 * decl.c (expand_static_init): Tweak handling of static
6915 initializations for objects without constructors.
6916
6917 1999-09-03 Nathan Sidwell <nathan@acm.org>
6918
6919 * typeck.c (build_indirect_ref): Reject dereference of pointer to
6920 void.
6921
6922 1999-09-02 Mark Mitchell <mark@codesourcery.com>
6923
6924 * cp-tree.h (cp_function): Move here, from decl.c.
6925 (cp_function_chain): Declare.
6926 (dtor_label): New macro, instead of variable.
6927 (ctor_label): Likewise.
6928 (current_base_init_list): Likewise.
6929 (current_member_init_list): Likewise.
6930 (base_init_expr): Likewise.
6931 (current_class_ptr): Likewise.
6932 (current_class_ref): Likewise.
6933 (last_tree): Likewise.
6934 (last_expr_type): Likewise.
6935 (current_function_returns_value): Likewise.
6936 (current_function_returns_null): Likewise.
6937 (current_function_just_assigned_this): Likewise.
6938 (current_function_parms_stored): Likewise.
6939 (temp_name_counter): Likewise.
6940 (static_labelno): Likewise.
6941 (expanding_p): Likewise.
6942 (stmts_are_full_exprs_p): Likewise.
6943 (in_function_try_handler): Likewise.
6944 (lang_type): Remove nested type_flags. All uses changed.
6945 * call.c (ctor_label): Remove.
6946 (dtor_label): Likewise.
6947 * class.c (current_class_ptr): Remove.
6948 (current_class_ref): Likewise.
6949 * decl.c (static_labelno): Remove.
6950 (dtor_label): Likewise.
6951 (last_dtor_insn): New macro, instead of variable.
6952 (last_parm_cleanup_insn): Likewise.
6953 (original_result_rtx): Likewise.
6954 (in_function_try_handler): Remove.
6955 (named_label_uses): New macro, instead of variable.
6956 (named_labels): Likewise.
6957 (current_function_returns_value): Remove.
6958 (current_function_returns_null): Likewise.
6959 (current_function_assigns_this): New macro, instead of variable.
6960 (current_function_just_assigned_this): Likewise.
6961 (current_binding_level): Likewise.
6962 (init_decl_processing): Call push_cp_function_context.
6963 (cp_function): Move to cp-tree.h
6964 (cp_function_chain): Make it global.
6965 (temp_name_counter): Remove.
6966 (push_cp_function_context): Simplify.
6967 (pop_cp_function_context): Likewise.
6968 * decl2.c (temp_name_counter): Remove.
6969 * init_c (current_base_init_list): Likewise.
6970 (current_member_init_list): Likewise.
6971 (base_init_expr): Likewise.
6972 * method.c (static_labelno): Likewise.
6973 * pt.c (last_tree): Likewise.
6974 * semantics.c (expanding_p): Likewise.
6975 (stmts_are_full_exprs_p): Likewise.
6976 (last_expr_type): Likewise.
6977 * typeck.c (dtor_label): Likewise.
6978 (ctor_label): Likewise.
6979
6980 1999-09-01 Alex Samuel <samuel@codesourcery.com>
6981
6982 * decl2.c (arg_assoc_template_arg): New prototype. New function.
6983 (arg_assoc_class): Use arg_assoc_template_arg for template
6984 arguments.
6985 (arg_assoc): Likewise.
6986 * pt.c (mangle_class_name_for_template): Allow member template
6987 template arguments.
6988
6989 1999-09-02 Nathan Sidwell <nathan@acm.org>
6990
6991 * call.c (build_conditional_expr): Warn on enum mismatches.
6992 (convert_arg_to_ellipsis): Move non-pod check to after
6993 conversion.
6994
6995 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6996
6997 * gxx.gperf (hash, is_reserved_word): Add prototypes.
6998
6999 * init.c (build_vec_init): Initialize variable `try_block'.
7000
7001 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
7002 Likewise for bzero/memset.
7003 (token_getch, token_put_back): Add static prototypes. Remove
7004 `inline' from the definitions.
7005 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7006
7007 1999-09-01 Mark Mitchell <mark@codesourcery.com>
7008
7009 * cp-tree.h (lang_type): Move align into type_flags.
7010 (CLASSTYPE_ALIGN): Adjust accordingly.
7011 * call.c (direct_reference_binding): Remove misleading comment.
7012
7013 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7014
7015 * parse.y (language_string): Constify.
7016
7017 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7018
7019 * repo.c (getpwd): Don't prototype.
7020 * xref.c (getpwd): Likewise
7021
7022 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7023
7024 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7025 Remove hacks for stuff which now comes from libiberty.
7026
7027 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
7028
7029 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7030
7031 1999-08-30 Mark Mitchell <mark@codesourcery.com>
7032
7033 * cp-tree.h (begin_init_stmts): Declare.
7034 (finish_init_stmts): Likewise.
7035 * cvt.c (build_up_reference): Wrap the declaration of a temporary
7036 in a statement-expression so that we will see it when expanding
7037 tree structure later.
7038 * init.c (begin_init_stmts): Don't make it static.
7039 (finish_init_stmts): Likewise.
7040
7041 * cp-tree.h (start_handler_parms): New function.
7042 (expand_start_catch_block): Take only one parameter.
7043 (start_handler_parms): New function.
7044 * decl.c (start_handler_parms): Define it.
7045 * except.c (process_start_catch_block): Take only one parameter.
7046 Don't call grokdeclarator here.
7047 (expand_start_catch_block): Don't call grokdeclarator here,
7048 either.
7049 * parse.y (handler_args): Adjust call to
7050 expand_start_catch_block. Use start_handler_parms.
7051 * pt.c (push_template_decl_real): Make permanent lists have
7052 permanent elements.
7053 (tsubst_expr): Adjust calls to expand_start_catch_block
7054 appropriately.
7055 * semantics.c (expand_stmt): Likewise.
7056
7057 1999-08-29 Alex Samuel <samuel@codesourcery.com>
7058
7059 * pt.c (push_template_decl_real): Use template declaration from
7060 class type if it exists.
7061
7062 1999-08-29 Mark Mitchell <mark@codesourcery.com>
7063
7064 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7065 (maybe_inject_for_scope_var): Declare it.
7066 (initialize_local_var): Likewise.
7067 * decl.c (maybe_inject_for_scope_var): Make it global.
7068 (initialize_local_var): Likewise. Move cleanup handling here,
7069 from cp_finish_decl.
7070 (make_rtl_for_nonlocal_decl): Use
7071 push_obstacks_nochange/pop_obstacks, rather than
7072 end_temporary_allocation/resume_temporary_allocation.
7073 (cp_finish_decl): Try to complete the type of a variable when it
7074 is declared. Move cleanup-handling to initialize_local_var.
7075 (expand_static_init): Use tree-building code, rather than
7076 RTL-building code.
7077 * decl2.c (get_temp_name): Assert non-initializedness of
7078 temporaries.
7079 * init.c (create_temporary_var): Move RTL-assigning code to ...
7080 (get_temp_regvar): Here.
7081 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
7082 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
7083 call initialize_local_var to generate initialization code.
7084
7085 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7086
7087 * cp-tree.h (fndecl_as_string, type_as_string,
7088 type_as_string_real, args_as_string, decl_as_string,
7089 expr_as_string, code_as_string, language_as_string,
7090 parm_as_string, op_as_string, assop_as_string, cv_as_string,
7091 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7092
7093 * errfn.c (cp_printer): Likewise.
7094
7095 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7096 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7097 cp_file_of, code_as_string, language_as_string, parm_as_string,
7098 op_as_string, assop_as_string, args_as_string, cv_as_string):
7099 Likewise.
7100
7101 * tree.c (lang_printable_name): Likewise.
7102
7103 1999-08-28 Richard Henderson <rth@cygnus.com>
7104
7105 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7106
7107 1999-08-28 Mark Mitchell <mark@codesourcery.com>
7108
7109 * cp-tree.h (strip_array_types): New function.
7110 * decl.c (maybe_deduce_size_from_array_init): New function, split
7111 out from cp_finish_decl.
7112 (layout_var_decl): Likewise.
7113 (maybe_commonize_var): Likewise.
7114 (maybe_inject_for_scope_var): Likewise.
7115 (initialize_local_var): Likewise.
7116 (build_cleanup_on_safe_obstack): Likewise.
7117 (check_initializer): Likewise.
7118 (make_rtl_for_nonlocal_decl): Likewise.
7119 (cp_finish_decl): Use them.
7120 * typeck.c (strip_array_types): New function.
7121
7122 * cp-tree.def (LABEL_STMT): New tree node.
7123 * cp-tree.h (LABEL_STMT_LABEL): New macro.
7124 (shadow_label): Remove.
7125 (declare_local_label): New function.
7126 (finish_label_decl): Likewise.
7127 * decl.c (make_label_decl): New function, split out from
7128 lookup_label.
7129 (shadowed_labels): Remove.
7130 (binding_level): Add shadowed_labels.
7131 (clear_binding_level): Remove.
7132 (push_binding_level): Just bzero the new binding level.
7133 (pushlevel): Fix indentation.
7134 (pop_label): New function.
7135 (pop_labels): Likewise, split out from poplevel.
7136 (poplevel): Pop local labels. Use pop_labels.
7137 (maybe_push_to_top_level): Don't clear shadowed_labels.
7138 (lookup_label): Use make_label_decl.
7139 (shadow_label): Remove.
7140 (declare_local_label): New function.
7141 (define_label): Simplify.
7142 (start_function): Don't clear shadowed_labels.
7143 (cp_function): Remove shadowed_labels.
7144 (push_cp_function_context): Don't save shadowed_labels.
7145 (pop_cp_function_context): Don't restore it.
7146 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7147 * parse.y (label_decl): Use finish_label_decl.
7148 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7149 declarations.
7150 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7151 building_stmt_tree.
7152 (finish_label_decl): New function.
7153 (expand_stmt): Handle LABEL_STMTs and local label declarations.
7154
7155 1999-08-26 Mark Mitchell <mark@codesourcery.com>
7156
7157 * decl.c (lookup_label): Build labels on the permanent obstack
7158 when building statement trees. Don't build RTL for labels when
7159 building statement trees.
7160 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7161 building statement trees.
7162 (finish_label_stmt): Likewise.
7163 (expand_stmt): Adjust accordingly.
7164 * pt.c (tsubst_expr); Likewise.
7165 (do_decl_instantiation): Robustify.
7166
7167 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7168 * tree.c (build_cplus_new): Set it.
7169 * expr.c (cplus_expand_expr): Use it.
7170 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7171
7172 * decl.c (store_parm_decls): Reset immediate_size_expand.
7173 (finish_function): Likewise.
7174
7175 * tree.c (cplus_unsave_expr_now): Don't return a value.
7176
7177 * semantics.c (do_poplevel): Always initialize the return value.
7178
7179 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
7180
7181 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7182 * tree.h (cplus_unsave_expr_now) : Same.
7183
7184 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7185
7186 * decl.c (grokdeclarator): Amend comment.
7187 * except.c (expand_start_catch_block): Call push_template_decl for
7188 catch-block parameters.
7189 * method.c (synthesize_method): Build an empty compound statement
7190 for the body of a constructor.
7191
7192 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
7193
7194 * tree.c (cp_build_qualified_type_real): If we're asking for the
7195 same quals we already have, just return.
7196
7197 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7198
7199 * cp-tree.def (SUBOBJECT): New tree node.
7200 * cp-tree.h (CLEANUP_P): New macro.
7201 (SUBOBJECT_CLEANUP): Likewise.
7202 (keep_next_level): Add parameter.
7203 (get_temp_regvar): Don't declare.
7204 (emit_base_init): Remove parameter.
7205 (expand_aggr_init): Rename to build_aggr_init.
7206 (expand_vec_init): Rename to build_vec_init.
7207 (do_pushlevel): Remove.
7208 (do_poplevel): Likewise.
7209 (finish_cleanup): New function.
7210 (finish_subobject): Likewise.
7211 (stmts_are_full_exprs_p): New variable.
7212 * decl.c (keep_next_level): Add parameter.
7213 (cp_finish_decl): Use build_aggr_init, not
7214 expand_aggr_init. Use finish_expr_stmt to expand the code.
7215 (expand_static_init): Use tree-generating, not RTL-generating,
7216 functions to handle the initialization.
7217 (start_function): Remove dead code. Always have a momentary
7218 obstack inside the function, even before hitting the first curly
7219 brace.
7220 (cplus_expand_expr_stmt): Move calls to
7221 expand_{start,end}_target_temps into semantics.c.
7222 (cp_function): Add stmts_are_full_exprs_p.
7223 (push_cp_function_context): Save it.
7224 (pop_cp_function_context): Restore it.
7225 * decl2.c (get_temp_regvar): Move to init.c.
7226 (do_static_initialization): Use build_{aggr,vec}_init.
7227 (do_static_destruction): Fix typo in comment.
7228 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7229 * except.c (expand_throw): Use create_temporary_var.
7230 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7231 * init.c (expand_vec_init_try_block): Remove.
7232 (expand_vec_init_catch_clause): Likewise.
7233 (get_temp_regvar): New function.
7234 (begin_init_stmts): Likewise.
7235 (finish_init_stmts): Likewise.
7236 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
7237 structure here.
7238 (emit_base_init): Likewise. Remove unused parameter.
7239 (expand_virtual_init): Likewise.
7240 (expand_cleanup_for_base): Use finish_subobject.
7241 (expand_aggr_vbase_init_1): Simplify.
7242 (construct_virtual_bases): Use tree-generating functions to build
7243 up initialization.
7244 (expand_aggr_init): Likewise. Rename to build_aggr_init.
7245 (expand_default_init): Likewise.
7246 (expand_aggr_init_1): Likewise.
7247 (expand_vec_init): Rename to build_vec_init.
7248 * method.c (do_build_copy_constructor): Use tree-generating
7249 functions. Don't call clear_last_expr.
7250 (do_build_assign_ref): Likewise.
7251 (synthesize_method): Call clear_last_expr here.
7252 * parse.y (base_init): Don't call clear_last_expr here.
7253 (nodecls): Likewise.
7254 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7255 * semantics.c (do_pushlevel): Move to here.
7256 (do_poplevel): Likewise.
7257 (stmts_are_full_exprs_p): New variable.
7258 (finish_expr_stmt): Handle logic for temoprary cleanup here.
7259 (finish_for_stmt): Use finish_expr_stmt.
7260 (finish_cleanup): New function.
7261 (finish_function_try_block): Fix indentation.
7262 (finish_subobject): New function.
7263 (setup_vtbl_ptr): Call keep_next_level here.
7264 (finish_stmt_expr): Handle a block with no scope inside the
7265 statement-expression.
7266 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
7267 SUBOBJECT.
7268 * tree.c (search_tree): Handle INIT_EXPR.
7269 (mapcar): Likewise.
7270 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7271 * typeck2.c (store_init_value): Change expand_aggr_init to
7272 build_aggr_init in comment.
7273
7274 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7275
7276 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7277
7278 1999-08-25 Nathan Sidwell <nathan@acm.org>
7279
7280 * decl2.c (handle_class_head): Be graceful about additional
7281 scope qualifiers. Adjust comments to reflect reality.
7282
7283 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
7284
7285 * call.c (build_conditional_expr): Fix typo.
7286 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7287 lvalue before trying to mess with the sides.
7288
7289 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7290
7291 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
7292
7293 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7294
7295 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
7296
7297 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7298 Return arbitrary pointer or NULL.
7299 (check_eh_spec): Call __throw_type_match_rtti_2.
7300 * tinfo.h (*::dcast): Return int. Add valp parm.
7301 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
7302 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7303 (__throw_type_match_rtti): Now just a wrapper.
7304
7305 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7306 (init_exception_processing): Don't initialize them.
7307
7308 1999-08-23 Paul Burchard <burchard@pobox.com>
7309
7310 * decl.c (check_default_argument): Fix typo.
7311
7312 1999-08-22 Mark Mitchell <mark@codesourcery.com>
7313
7314 * cp-tree.def (STMT_EXPR): Fix typo in node name.
7315
7316 * dump.c (dump_next_stmt): New function.
7317 (dequeue_and_dump): Use it.
7318
7319 * pt.c (tsubst_copy): Make sure to initialize return value for a
7320 STMT_EXPR, even when processing_template_decl.
7321 * semantics.c (finish_stmt_expr): A statement-expression whose
7322 last statement is not an expression-statement has type `void'.
7323
7324 1999-08-20 Mark Mitchell <mark@codesourcery.com>
7325
7326 * semantics.c (finish_stmt_expr): Fix typo in comment.
7327 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7328 (mapcar): Likewise.
7329 * init.c (build_vec_delete_1): Make the children of a permanent
7330 BIND_EXPR permanent.
7331 * pt.c (register_specialization): Don't register a specialization
7332 more than once.
7333
7334 1999-08-18 Andrew Haley <aph@cygnus.com>
7335
7336 * method.c (process_overload_item): Call build_mangled_C9x_name ()
7337 for all integer parameter types larger than long long.
7338
7339 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7340
7341 * pt.c (redeclare_class_template): Merge default template
7342 arguments in both directions.
7343
7344 * typeck.c (common_type): Undo 1999-08-18 change. Remove
7345 compiler_error message.
7346
7347 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
7348
7349 * cp-tree.h: Declare flag_use_repository.
7350 * pt.c (do_decl_instantiation): Don't complain about duplicate
7351 instantiation with -frepo.
7352 (do_type_instantiation): Likewise.
7353
7354 * pt.c (push_template_decl_real): Complain about everything
7355 that isn't a valid template.
7356
7357 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7358 affect inlines.
7359
7360 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7361
7362 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7363 * decl2.c (build_expr_from_tree): Handle it.
7364 * error.c (dump_expr): Likewise.
7365 * pt.c (for_each_template_parm): Likewise.
7366 (tsubst_copy): Likewise.
7367 * tree.c (search_tree): Likewise.
7368 * semantics.c (finish_pseudo_destructor_call): Create it.
7369
7370 1999-08-18 Mark Mitchell <mark@codesourcery.com>
7371
7372 * search.c (setup_class_bindings): Robustify.
7373 * typeck.c (common_type): Use same_type_p, not pointer equality,
7374 to compare types.
7375
7376 * cp-tree.h (build_lang_field_decl): Remove.
7377 * class.c (build_vtable): Replace calls to build_lang_field_decl
7378 with build_lang_decl.
7379 (prepare_fresh_vtable): Likewise.
7380 (finish_struct_1): Likewise.
7381 (init_class_processing): Likewise.
7382 * decl.c (push_using_decl): Likewise.
7383 (init_decl_processsing): Likewise.
7384 (grokvardecl): Likewise.
7385 (build_ptrmemfunc_type): Likewise.
7386 (grokdeclarator): Likewise.
7387 (build_enumerator): Likewise.
7388 * decl2.c (grok_x_components): Likewise.
7389 (do_class_using_decl): Likewise.
7390 * except.c (call_eh_info): Likewise.
7391 * init.c (init_init_processing): Likewise.
7392 * rtti.c (expand_class_decl): Likewise.
7393 * tree.c (build_base_fields): Likewise.
7394 (build_vbase_pointer_fields): Likewise.
7395 * lex.c (build_lang_decl): Build declarations on the permanent
7396 obstack if we're building statmeent trees.
7397 (retrofit_lang_decl): Handle both the full lang_decl and also the
7398 smaller lang_decl_flags here.
7399 (build_lang_field_decl): Remove.
7400 * pt.c (push_template_decl_real): Issue errors for variable
7401 declarations that are not static members.
7402
7403 1999-08-18 Richard Henderson <rth@cygnus.com>
7404
7405 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7406 (mapcar): Likewise.
7407
7408 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7409
7410 * cp-tree.h (back_end_hook): New variable.
7411 * decl2.c (back_end_hook): Define it.
7412 (finish_file): If it's non-NULL, call it.
7413
7414 * decl.c (add_decl_to_level): New function.
7415 (push_local_binding): Use it.
7416 (find_binding): Fix typo in comment.
7417 (pushdecl): Use add_decl_to_level. Put templates on the
7418 corresponding namespace-scope binding levels.
7419 * dump.c (dequeue_and_dump): Print the specializations of a
7420 template.
7421 * pt.c (push_template_decl_real): Don't push a template multiple
7422 times.
7423
7424 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7425
7426 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7427 (CALL_DECLARATOR_QUALS): Likewise.
7428 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7429 * decl.c (grokdeclarator): Adjust to use them.
7430 * decl2.c (grokfield): Likewise.
7431 (reparse_absdcl_as_casts): Likewise.
7432 * lex.c (make_call_declarator): Likewise.
7433 (set_quals_and_spec): Likewise.
7434 * pt.c (tsubst): Likewise.
7435 * tree.c (mapcar): Remove special hack to handle third operand of
7436 a CALL_EXPR.
7437
7438 1999-08-16 Mark Mitchell <mark@codesourcery.com>
7439
7440 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7441 * class.c (build_vtable): Use build_lang_field_decl to build the
7442 VAR_DECLs for vtables.
7443 (prepare_fresh_vtable): Likewise.
7444 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7445 CAN_HAVE_FULL_LANG_DECL_P.
7446 (push_using_decl): Use build_lang_decl to build USING_DECLs.
7447 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7448 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7449 (build_lang_field_decl): Likewise.
7450 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7451 to copy.
7452
7453 * cp-tree.def (STMT_EXPR): New tree node.
7454 * cp-tree.h (STMT_EXPR_STMT): New macro.
7455 (store_return_init): Change prototype.
7456 (finish_named_return_value): New function.
7457 (expand_stmt): Likewise.
7458 (expand_body): Likewise.
7459 (begin_stmt_tree): Likewise.
7460 (finish_stmt_tree): Likewise.
7461 (expanding_p): New variable.
7462 (last_expr_type): Likewise.
7463 (building_stmt_tree): New macro.
7464 * decl.c (start_function): Use building_stmt_tree, not
7465 processing_template_decl, where appropriate.
7466 (store_parm_decls): Likewise.
7467 (store_return_init): Move most of the body to semantics.c.
7468 (finish_function): Use building_stmt_tree.
7469 (finish_stmt): Clear last_expr_type here.
7470 (cp_function): Add expanding_p, last_tree, last_expr_type.
7471 (push_cp_function_context): Save them.
7472 (pop_cp_function_context): Restore them.
7473 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7474 * error.c (dump_expr): Handle STMT_EXPR.
7475 * except.c (expand_start_catch_block): Use building_stmt_tree.
7476 Use add_decl_stmt.
7477 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7478 (do_case): Move add_tree call to semantics.c.
7479 * parse.y (return_init): Use finish_named_return_value.
7480 (for.init.statement): Use finish_expr_stmt.
7481 * parse.c: Regenerated.
7482 * pt.c (do_pushlevel): Move to semantics.c.
7483 (do_poplevel): Likewise.
7484 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7485 (tsubst_expr): Don't expand all the way to RTL here. Handle
7486 RETURN_INIT and CTOR_INITIALIZER.
7487 (instantiate_decl): Call expand_body after tsubst'ing into
7488 DECL_SAVED_TREE.
7489 * semantics.c (expand_stmts): New function.
7490 (expanding_p): New variable.
7491 (last_expr_type): Likewise.
7492 (finish_expr_stmt): Use building_stmt_tree.
7493 (begin_if_stmt): Likewise.
7494 (finish_if_stmt_cond): Likewise.
7495 (finish_then_clause): Likewise.
7496 (begin_else_clause): Likewise.
7497 (finish_else_clause): Likewise.
7498 (begin_while_stmt): Likewise.
7499 (finish_while_stmt_cond): Likewise.
7500 (finish_while_stmt): Likewise.
7501 (finish_do_body): Likewise.
7502 (finish_do_stmt): Likewise.
7503 (finish_return_stmt): Likewise.
7504 (begin_for_stmt): Likewise.
7505 (fnish_for_init_stmt): Likewise.
7506 (finish_for_cond): Likewise.
7507 (finish_for_expr): Likewise.
7508 (finish_for_stmt): Likewise.
7509 (finish_break_stmt): Likewise.
7510 (finish_continue_stmt): Likewise.
7511 (finish_switch_cond): Likewise.
7512 (finish_switch_stmt): Likewise.
7513 (finish_case_label): Call add_tree here if necessary.
7514 (finish_goto_statement): Use building_stmt_tree.
7515 (begin_try_block): Likewise.
7516 (begin_function_try_block): Likewise.
7517 (finish_try_block): Likewise.
7518 (finish_function_try_block): Likewise.
7519 (finish_handler_sequence): Likewise.
7520 (finish_function_handler_sequence): Likewise.
7521 (begin_handler): Likewise.
7522 (finish_handler_parms): Likewise.
7523 (finish_handler): Likewise.
7524 (begin_compound_stmt): Likewise.
7525 (finish_compound_stmt): Likewise.
7526 (finish_asm_stmt): Likewise.
7527 (finish_label_stmt): Likewise.
7528 (finish_named_return_value): New function.
7529 (setup_vtbl_ptr): Moved here from decl2.c.
7530 (do_pushlevel): Moved here from pt.c.
7531 (do_poplevel): Likewise.
7532 (begin_stmt_expr): Use building_stmt_tree.
7533 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
7534 when building_stmt_tree.
7535 (begin_stmt_tree): New function.
7536 (finish_stmt_tree): Likewise.
7537 (expand_stmt): Likewise.
7538 (expand_body): Likewise.
7539 * tree.c (build_cplus_method_type): Make sure the argument types
7540 end up on the same obstack as the METHOD_TYPE.
7541 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7542 THROW_EXPR, STMT_EXPR.
7543 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
7544 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
7545 sorry, if an unsupported node is encountered.
7546 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7547 (c_expand_return): Don't call add_tree here.
7548
7549 1999-08-15 Mark Mitchell <mark@codesourcery.com>
7550
7551 * pt.c (check_default_tmpl_args): Don't check in local scopes.
7552 (tsubst_decl): Make sure the declaration is on a saveable
7553 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7554 variable.
7555 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7556
7557 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
7558
7559 Speed up Koenig lookup.
7560 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
7561 to return namespaces we've looked at.
7562 * decl2.c (lookup_using_namespace): Likewise.
7563 (add_function): Don't call ovl_member.
7564 (lookup_arg_dependent): Initialize k.namespaces to the list of
7565 namespaces seen in unqualified lookup.
7566 * call.c (equal_functions): Move here from tree.c.
7567 (joust): Use it to handle duplicate candidates.
7568 * tree.c (ovl_member): Use ==.
7569
7570 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7571
7572 * cp-tree.def (DECL_STMT): Make it smaller.
7573 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
7574 (lang_decl): ... here. Add next.
7575 (DECL_SAVED_TREE): Adjust accordingly.
7576 (DECL_IMPLICIT_TYPEDEF_P): New macro.
7577 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7578 (DECL_STMT_DECL): Likewise.
7579 (create_implicit_typedef): New function.
7580 (maybe_push_decl): Likewise.
7581 (tsubst_default_argument): New function.
7582 (at_function_scope_p): Likewise.
7583 (add_decl_stmt): Likewise.
7584 (push_permanent_obstack): Likewise.
7585 * call.c (convert_default_arg): Use tsubst_default_argument.
7586 * class.c (add_method): Use push_permanent_obstack.
7587 (build_self_reference): Create a TEMPLATE_DECL for the
7588 self-reference, if necessary.
7589 * decl.c (pseudo_global_level_p): Only look at the current binding
7590 level.
7591 (push_binding): Use push_permanent_obstack.
7592 (create_implicit_typedef): New function.
7593 (pushtag): Use it.
7594 (duplicate_decls): Use push_permanent_obstack.
7595 (maybe_push_decl): New function.
7596 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
7597 (start_decl_1): Remove dead code.
7598 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
7599 pseudo_global_level_p.
7600 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
7601 template.
7602 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
7603 pseudo_global_level_p.
7604 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
7605 a template.
7606 (get_sentry): Use push_permanent_obstack.
7607 * dump.c (dequeue_and_dump): Enable DECL_STMT.
7608 * except.c (call_eh_info): Use push_permanent_obstack.
7609 (build_eh_type_ref): Likewise.
7610 (do_pop_exception): Likewise.
7611 (expand_eh_spec): Likewise.
7612 (alloc_eh_object): Likewise.
7613 (expand_throw): Likewise.
7614 * init.c (build_java_class_ref): Likewise.
7615 * lex.c (get_time_identifier): Likewise.
7616 (free_lang_decl_chain): Correct type.
7617 (retrofit_lang_decl): Adjust accordingly.
7618 (build_lang_field_decl): Likewise.
7619 * lex.h (free_lang_decl_chain): Likewise.
7620 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
7621 * parse.c: Regenerated.
7622 * pt.c (tsubst_default_arguments): New function.
7623 (retrieve_local_specialization): Likewise.
7624 (register_local_specialization): Likewise.
7625 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
7626 pseudo_global_level_p to determine whether or not a template is
7627 primary.
7628 (lookup_template_class): Likewise. Use create_implicit_typedef.
7629 (instantiate_class_template): Call tsubst_default_arguments for
7630 member functions, if appropriate.
7631 (tsubst_default_argument): New function.
7632 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
7633 * search.c (at_function_scope_p): New function.
7634 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
7635 (finish_label_stmt): Likewise.
7636 (add_decl_stmt): New function.
7637 (begin_class_definition): Likewise.
7638 (finish_typeof): Likewise.
7639 * tree.c (copy_template_template_parm): Likewise.
7640 (copy_to_permanent): Likewise.
7641 (push_permanent_obstack): Define.
7642 (mark_addressable): Use it.
7643 * typeck.c (mark_addressable): Likewise.
7644
7645 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
7646
7647 * cp-tree.h (init_cplus_unsave): New.
7648 (cplus_unsave_expr_now): New.
7649 * lex.c (init_parse): Call init_cplus_unsave.
7650 * tree.c (init_cplus_unsave): New.
7651 (cplus_unsave_expr_now): New.
7652
7653 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7654
7655 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
7656 decl_constant_value to simplify array bounds.
7657
7658 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
7659
7660 * lang-options.h: Add -fms-extensions.
7661 * cp-tree.h: Declare flag_ms_extensions.
7662 * decl2.c: Define it.
7663 * class.c (instantiate_type): Don't complain about taking the address
7664 of a bound member function if -fms-extensions.
7665 * typeck.c (build_unary_op): Likewise.
7666 * decl.c (grokdeclarator): Or about implicit int.
7667 * init.c (resolve_offset_ref): Or about implicit '&'.
7668
7669 1999-08-11 Mark Mitchell <mark@codesourcery.com>
7670
7671 * cp-tree.h (minimal_parse_mode): Remove.
7672 (finish_label_stmt): New function.
7673 * decl.c (saved_scope): Remove minimal parse mode.
7674 (maybe_push_to_top_level): Don't save it.
7675 (pop_from_top_level): Don't restore it.
7676 (define_label): Split out template-handling code to semantics.c.
7677 (start_decl): Don't use minimal_parse_mode.
7678 (cp_finish_decl): Likewise.
7679 (start_function): Don't increment it.
7680 (store_return_init): Don't use it.
7681 (finish_function): Don't decrement it.
7682 * parse.y (label_colon): Use finish_label_stmt throughout.
7683 * parse.c: Regenerated.
7684 * pt.c (minimal_parse_mode): Don't define it.
7685 (tsubst_expr): Use finish_label_stmt.
7686 * semantics.c (finish_label_stmt): New function.
7687
7688 * dump.c (queue): Be careful when computing bitmasks.
7689 (dequeue_and_dump): Describe binfos as binfos, not as
7690 vectors.
7691
7692 * parse.y (pedantic): Give it itype. Adjust usage accordingly
7693 throughout.
7694 * parse.c: Regenerated.
7695
7696 * Make-lang.in (CXX_SRCS): Remove sig.c.
7697 * Makefile.in (CXX_OBJS): Remove sig.o.
7698 (sig.o): Remove.
7699 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7700 (CPTI_SIGNATURE_TYPE): Likewise.
7701 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7702 (opaque_type_node): Likewise.
7703 (signature_type_node): Likewise.
7704 (sigtable_entry_type): Likewise.
7705 (flag_handle_signatures): Likewise.
7706 (lang_type): Remove is_signature, is_signature_pointer,
7707 is_signature_reference, has_opaque_typedecls,
7708 sigtables_has_been_generated. Adjust dummy. Remove signature,
7709 signature_pointer_to, signature_reference_to.
7710 (IS_SIGNATURE): Remove.
7711 (SET_SIGNATURE): Remove.
7712 (CLEAR_SIGNATURE): Remove.
7713 (IS_SIGNATURE_POINTER): Remove.
7714 (IS_SIGNATURE_REFERENCE): Remove.
7715 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7716 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7717 (CLASSTYPE_SIGNATURE): Remove.
7718 (SIGNATURE_TYPE): Remove.
7719 (SIGNATURE_METHOD_VEC): Remove.
7720 (SIGNATURE_POINTER_TO): Remove.
7721 (SIGNATURE_REFERENCE_TO): Remove.
7722 (lang_decl_flags): Remove is_default_implementation. Rename
7723 memfunc_pointer_to to saved_tree.
7724 (IS_DEFAULT_IMPLEMENTATION): Remove.
7725 (DECL_MEMFUNC_POINTER_TO): Remove.
7726 (DECL_MEMFUNC_POINTING_TO): Remove.
7727 (DECL_SAVED_TREE): Adjust definition.
7728 (tag_types): Remove signature_type_node.
7729 (SIGNATURE_FIELD_NAME): Remove.
7730 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7731 (SIGNATURE_OPTR_NAME): Likewise.
7732 (SIGNATURE_SPTR_NAME): Likewise.
7733 (SIGNATURE_POINTER_NAME): Likewise.
7734 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7735 (SIGNATURE_REFERENCE_NAME): Likewise.
7736 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7737 (SIGTABLE_PTR_TYPE): Likewise.
7738 (SIGTABLE_NAME_FORMAT): Likewise.
7739 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7740 (SIGTABLE_TAG_NAME): Likewise.
7741 (SIGTABLE_VB_OFF_NAME): Likewise.
7742 (SIGTABLE_VT_OFF_NAME): Likewise.
7743 (finish_base_specifiers): Change prototype.
7744 (build_signature_pointer_type): Remove.
7745 (build_signature_reference_type): Remove.
7746 (build_signature_pointer_constructor): Remove.
7747 (build_signature_method_call): Remove.
7748 (build_optr_ref): Likewise.
7749 (append_signature_fields): Likewise.
7750 (signature_error): Likewise.
7751 * call.c (build_this): Remove signature support.
7752 (build_over_call): Likewise.
7753 (build_new_method_call): Likewise.
7754 * class.c (add_implicitly_declared_members): Likewise.
7755 (finish_struct_1): Likewise.
7756 (finish_struct): Likewise.
7757 * cvt.c (cp_convert_to_pointer): Likewise.
7758 (convert_to_pointer_force): Likewise.
7759 (ocp_convert): Likewise.
7760 * decl.c (sigtable_decl_p): Remove.
7761 (init_decl_processing): Remove support for signatures.
7762 (cp_finish_decl): Likewise.
7763 (grokdeclarator): Likewise.
7764 (grokparms): Likewise.
7765 (xref_tag): Likewise.
7766 (start_function): Likewise.
7767 (start_method): Likewise.
7768 * decl2.c (finish_sigtable_vardecl): Remove.
7769 (flag_handle_signatures): Remove.
7770 (lang_f_options): Remove handle-signatures.
7771 (grokfield): Remove support for signatures.
7772 (grokbitfield): Likewise.
7773 (finish_file): Likewise.
7774 (reparse_absdcl_as_casts): Likewise.
7775 * error.c (dump_type_real): Likewise.
7776 (dump_function_decl): Likewise.
7777 * friend.c (make_friend_class): Likewise.
7778 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7779 * hash.h: Regenerated.
7780 * init.c (build_new_1): Remove support for signatures.
7781 * lang-options.h: Remove -fhandle-signatures,
7782 -fno-handle-signatures.
7783 * lex.c (init_parse): Remove support for signatures.
7784 (yyprint): Likewise.
7785 * lex.h (rid): Remove RID_SIGNATURE.
7786 * method.c (build_decl_overload_real): Remove support for
7787 signatures.
7788 (hack_identifier): Likewise.
7789 * parse.y (base_class): Likewise.
7790 (base_class.1): Likewise.
7791 (access_specifier): Likewise.
7792 * search.c (lookup_member): Likewise.
7793 * semantics.c (finish_qualified_object_call_expr): Likewise.
7794 (finish_template_type_parm): Likewise.
7795 (begin_class_definition): Likewise.
7796 (finish_base_specifier): Likewise.
7797 * sig.c: Remove.
7798 * tree.c (build_cplus_method_type): Remove support for signatures.
7799 * typeck.c (require_complete_type): Likewise.
7800 (c_sizeof): Likewise.
7801 (c_alignof): Likewise.
7802 (build_object_ref): Likewise.
7803 (build_component_ref): Likewise.
7804 (build_indirect_ref): Likewise.
7805 (build_c_cast): Likewise.
7806 (build_modify_expr): Likewise.
7807 (convert_for_initialization): Likewise.
7808 * typeck2.c (signature_error): Remove.
7809 (store_init_value): Remove support for signatures.
7810 (digest_init): Likewise.
7811 (build_x_arrow): Likewise.
7812 (build_functional_cast): Likewise.
7813 * xref.c (GNU_xref_decl): Likewise.
7814
7815 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7816
7817 * lex.c (do_identifier): Remove unnecessary lookup of class field.
7818
7819 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7820
7821 * decl2.c (set_decl_namespace): Do not complain about non-matching
7822 decls if processing a template.
7823
7824 1999-08-09 Mark Mitchell <mark@codesourcery.com>
7825
7826 * decl.c (build_ptrmemfunc_type): Handle qualified
7827 pointer-to-member types here.
7828 * tree.c (cp_build_qualified_type_real): Simplify handling here.
7829
7830 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7831
7832 * lex.c (lang_identify): Likewise.
7833
7834 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
7835
7836 * Makefile.in: Update dependencies.
7837 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7838 NULL_RTX.
7839 * decl.c: Include "function.h"
7840 (cleanup_label, return_label): Delete declarations.
7841 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7842 (finish_function): Rename last_parm_insn variable to
7843 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
7844 * decl2.c: Include "function.h".
7845 (rtl_expr_chain): Delete declaration.
7846 * method.c: Include "function.h"
7847 * tree.c (build_vbase_pointer_fields): Don't initialize
7848 DECL_SAVED_INSNS with NULL_RTX.
7849 * typeck.c: Include "function.h"
7850
7851 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
7852
7853 * semantics.c (begin_function_try_block, finish_function_try_block,
7854 finish_function_handler_sequence): New fns.
7855 * parse.y (function_try_block): Use them.
7856 * pt.c (instantiate_decl): Likewise.
7857
7858 * cp-tree.h: Declare in_function_try_handler.
7859 * decl.c: Define it.
7860 (start_function): Clear it.
7861 (struct cp_function, push_cp_function_context): Save it.
7862 (pop_cp_function_context): Restore it.
7863 * parse.y (function_try_block): Set and clear it.
7864 * except.c (expand_end_catch_block): Rethrow if we reach the end
7865 of a function-try-block handler in a ctor or dtor.
7866 * typeck.c (c_expand_return): Complain about returning from a
7867 function-try-block handler of a ctor.
7868
7869 * parse.y (function_try_block): Call end_protect_partials
7870 before expand_start_all_catch.
7871
7872 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
7873
7874 * decl.c (struct binding_level): Add eh_region field.
7875 (push_binding_level): Set it.
7876 (define_label): Complain about jumping into an EH block.
7877
7878 * ptree.c (print_lang_type): Print the real type of a PMF.
7879 Print what exceptions a fn type throws.
7880
7881 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7882
7883 * class.c (count_fields, add_fields_to_vec): Add static prototype.
7884
7885 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7886 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7887 char*.
7888
7889 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7890 Constify a char*.
7891
7892 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7893 char*.
7894
7895 * dump.c (queue_and_dump_index, dump_int, dump_string,
7896 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7897 a char*.
7898 (dump_stmt): Add static prototype.
7899
7900 * errfn.c (cp_thing): Constify a char*.
7901
7902 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7903 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7904 dump_expr): Constify a char*.
7905
7906 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7907 read_line_number): Add static prototype.
7908 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7909 (real_yylex): Move label `letter' into the scope where it is used.
7910
7911 * method.c (build_mangled_template_parm_index, build_overload_int,
7912 build_decl_overload_real, get_id_2): Constify a char*.
7913
7914 * search.c (check_final_overrider): Make static.
7915
7916 * typeck.c (composite_pointer_type): Constify a char*.
7917
7918 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7919
7920 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7921 we're looking at a class.
7922
7923 * decl.c (lookup_name_real): Set the complain flag if we're
7924 looking for a namespace member.
7925
7926 * lex.c (real_yylex): We can have a number with no digits.
7927
7928 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7929
7930 * search.c (binfo_from_vbase): New fn.
7931 * cp-tree.h: Declare it.
7932 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7933 from pointer to member of virtual base.
7934 * typeck.c (get_delta_difference): Likewise.
7935
7936 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
7937
7938 * pt.c (tsubst): Use build_index_type to build in-template array
7939 index type. Fixes g++.oliva/dwarf1.C.
7940 * decl.c (grokdeclarator): Likewise, just for consistency, as it
7941 doesn't seem to trigger the bug without it.
7942
7943 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7944
7945 * typeck2.c (add_exception_specifier): Use complete_type.
7946
7947 1999-08-06 Mark Mitchell <mark@codesourcery.com>
7948
7949 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7950 (dump_binary_op): Bulletproof.
7951 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7952 * tree.c (search_tree): Don't enumerate all the nodes of classes
7953 `1', `2', and `<'; handle them generically. Don't be sorry about
7954 "unrecognized tree codes"; just abort.
7955 (no_linkage_check): Don't do linkage checks for templates.
7956
7957 * tree.c (cp_build_qualified_type_real): Handle
7958 pointer-to-member-function types correctly.
7959
7960 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
7961
7962 * decl.c (pushdecl): Only give an error for shadowing a parm
7963 from *this* function.
7964
7965 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
7966
7967 * typeck2.c: Update URLs and mail addresses.
7968
7969 1999-08-04 Nathan Sidwell <nathan@acm.org>
7970
7971 * cp-tree.h (empty_except_spec): New global var.
7972 (compexcepttypes): Remove prototype.
7973 (comp_except_specs): Prototype new global function.
7974 (add_exception_specifier): Prototype new global function.
7975 * decl.c (empty_except_spec): Define new global var.
7976 (duplicate_decls): Use comp_except_specs, reword error message.
7977 (init_decl_processing): Initialize empty_except_spec.
7978 Adjust build_exception_variant calls.
7979 * parse.y (exception_specification_opt): Use empty_except_spec.
7980 (ansi_raise_identifier): Call check_for_new_type.
7981 (ansi_raise_identifiers): Use add_exception_specifier.
7982 * pt.c (tsubst): Use add_exception_specifier to build exception
7983 specifier.
7984 * search.c (check_final_overrider): New static function, broken
7985 out of get_matching_virtual. Check throw specifiers, reword
7986 diagnostics.
7987 (get_matching_virtual): Use check_final_overrider.
7988 * tree.c (build_exception_variant): Use comp_except_specs.
7989 * typeck.c (compexcepttypes): Remove.
7990 (comp_except_types): New static function, helper for
7991 comp_except_specs. Compare two types as exception specifiers.
7992 (comp_except_specs): New global function, compare two exception
7993 specifiers.
7994 (comptypes): Adjust for comp_except_specs.
7995 * typeck2.c (add_exception_specifier): New global function.
7996
7997 * class.c (check_for_override): Reword error message.
7998
7999 1999-08-03 Nathan Sidwell <nathan@acm.org>
8000
8001 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
8002 * cp-tree.h (struct lang_type): Added non_pod_class flag.
8003 (CLASSTYPE_NON_POD_P): New macro to access it.
8004 * class.c (finish_struct_1): Determine non-PODness.
8005 Check for arrays of pointers (-Weffc++).
8006 Remove array inspection duplicated code.
8007 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8008 Use CLASSTYPE_NON_POD_P.
8009
8010 1999-08-03 Nathan Sidwell <nathan@acm.org>
8011
8012 * class.c (duplicate_tag_error): Preserve template information.
8013
8014 1999-08-03 Nathan Sidwell <nathan@acm.org>
8015
8016 * decl.c (start_enum): Show location of previous definition.
8017 * parse.y (enumlist_opt): New reduction.
8018 (structsp): Simplify enum rules to use enumlist_opt.
8019
8020 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
8021
8022 * lex.c (yyprint): Handle PFUNCNAME.
8023
8024 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8025 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8026
8027 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
8028
8029 * decl.c (start_decl): Set attributes before duplicate_decls call.
8030
8031 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8032
8033 * Make-lang.in (CXX_SRCS): Add dump.c.
8034 * Makefile.in (CXX_OBJS): Add dump.o.
8035 (dump.o): New target.
8036 * cp-tree.h (DECL_CONV_FN_P): Document.
8037 (DECL_OVERLOADED_OPERATOR_P): New function.
8038 (TYPE_PTRMEM_CLASS_TYPE): New macro.
8039 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8040 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8041 (ASM_VOLATILE_P): New macro.
8042 (STMT_LINENO): Likewise.
8043 (cp_namespace_decls): New function.
8044 (dump_node_to_file): New function.
8045 * decl.c (cp_namespace_decls): New function.
8046 (walk_namespaces_r): Use it.
8047 (wrapup_globals_for_namespace): Likewise.
8048 * decl2.c (flag_dump_translation_unit): New variable.
8049 (lang_decode_option): Handle -fdump-translation-unit.
8050 (finish_file): If flag_dump_translation_unit is set, dump the
8051 translation unit.
8052 * dump.c: New file.
8053 * lang-options.h: Add -fdump-translation-unit.
8054 * pt.c (tsubst_template_parms): Robustify.
8055 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8056 (tsubst_expr): Use STMT_LINENO.
8057 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
8058 for invalid cv-qualifiers even while building templates.
8059
8060 1999-08-02 Richard Henderson <rth@cygnus.com>
8061
8062 * call.c: Include defaults.h instead of expr.h.
8063 * decl.c: Likewise.
8064 * pt.c: Likewise.
8065 * typeck.c: Include defaults.h.
8066
8067 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8068
8069 * lex.c (errorcount, sorrycount): Don't declare.
8070 * repo.c (errorcount, sorrycount): Likewise.
8071 * typeck2.c (errorcount, sorrycount): Likewise.
8072
8073 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
8074
8075 * call.c (convert_default_arg, build_over_call): Change all uses of
8076 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8077 Ensure expr.h is included.
8078 * decl.c (grokparams): Ditto.
8079 * pt.c (tsubst_decl): Ditto.
8080 * typeck.c (convert_arguments): Ditto.
8081
8082 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
8083
8084 * class.c (mark_overriders): Fix order of args to overrides.
8085 (warn_hidden): Likewise. Fix for having virtual and non-virtual
8086 functions with the same name.
8087
8088 1999-08-02 Richard Henderson <rth@cygnus.com>
8089
8090 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8091
8092 1999-08-01 Mark Mitchell <mark@codesourcery.com>
8093
8094 * call.c (build_conditional_expr): Fix typo in comment.
8095
8096 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
8097
8098 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8099 case_stack; use in_control_zone_p.
8100 * typeck.c (c_expand_return): Likewise.
8101
8102 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
8103
8104 * except.c (catch_clauses): Delete declaration.
8105
8106 1999-07-30 Mark Mitchell <mark@codesourcery.com>
8107
8108 * call.c (build_conditional_expr): Call convert_from_reference to
8109 avoid reference/non-reference type confusion. Fix typo.
8110
8111 1999-07-30 Richard Henderson <rth@cygnus.com>
8112
8113 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8114 * cp-tree.h (initializer_constant_valid_p): Remove.
8115
8116 1999-07-28 Mark Mitchell <mark@codesourcery.com>
8117
8118 * call.c (conditional_conversion): Don't build BASE_CONVs for
8119 conversions between things that have the same type.
8120 (build_conditional_expr): Tweak.
8121 (convert_like): Some BASE_CONVs really do require the generation
8122 of code.
8123
8124 * init.c (perform_member_init): Don't go through build_modify_expr
8125 for simple initializations.
8126
8127 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
8128
8129 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8130 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8131 virtual functions and MI. Simplify.
8132
8133 * method.c: Remove prototype for largest_union_member.
8134 * pt.c (determine_specialization): Fix uninitialized warning.
8135 * lex.c (real_yylex): Likewise.
8136
8137 1999-07-27 Mark Mitchell <mark@codesourcery.com>
8138
8139 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8140 here too.
8141
8142 * cp-tree.h (BINFO_VIRTUALS): Document new format.
8143 * class.c (modify_one_vtable): Change prototype accordingly.
8144 (modify_all_vtables): Likewise.
8145 (modify_all_direct_vtables): Likewise.
8146 (modify_all_indirect_vtables): Likewise.
8147 (build_vtable_entry_for_fn): New function.
8148 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8149 (modify_vtable_entry): Likewise.
8150 (add_virtual_function): Likewise.
8151 (build_vtbl_initializer): New function.
8152 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8153 (fixup_vtable_deltas1): Likewise.
8154 (fixup_vtable_deltas): Likewise.
8155 (override_one_vtable): Likewise.
8156 (finish_struct_1): Likewise.
8157
8158 * error.c (dump_expr): Likewise.
8159 * search.c (get_abstract_virtuals_1): Likewise.
8160 (get_abstract_virtuals): Likewise.
8161 (expand_upcast_fixups): Likewise.
8162 * tree.c (debug_binfo): Likewise.
8163 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8164 __pure_virtual here.
8165
8166 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8167
8168 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8169 as per 1999-07-26 change.
8170
8171 * typeck.c (c_sizeof): Don't allow non-static data members.
8172 (expr_sizeof): Likewise.
8173
8174 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
8175
8176 * input.c (feed_input): Only touch lineno and input_filename
8177 if !USE_CPPLIB. Save the old values before setting the new ones.
8178
8179 * input.c (feed_input): Add file, line parms.
8180 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8181 (real_yylex): Check linemode before input_redirected().
8182
8183 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8184 from op new to warning.
8185
8186 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8187
8188 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8189 * call.c: All uses changed.
8190 * typeck.c: Likewise.
8191
8192 1999-07-26 Nathan Sidwell <nathan@acm.org>
8193
8194 * exception.cc (__cplus_type_matcher): Match __eh_matcher
8195 prototype.
8196
8197 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8198
8199 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8200 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8201 (strip_top_quals): Declare.
8202 (ncp_convert): Likewise.
8203 (type_after_usual_arithmetic_converions): Likewise.
8204 (composite_pointer_type): Likewise.
8205 * call.c (strip_top_quals): Don't make it static.
8206 (promoted_arithmetic_type_p): New function.
8207 (conditional_conversion): Likewise.
8208 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8209 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
8210 for converting a type to itself.
8211 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8212 (implicit_conversion): Make sure the from and to types are
8213 complete.
8214 (add_builtin_candidate): Correct handling of ?: operator.
8215 (add_builtin_candidates): Improve documentation.
8216 (build_conditional_expr): New function.
8217 (can_convert): Implement in terms of can_convert_arg.
8218 (ncp_convert): New function.
8219 * typeck.c (type_after_usual_arithmetic_conversions): New
8220 function, split out from common_type.
8221 (composite_pointer_type): New function, split out from
8222 build_conditional_expr.
8223 (common_type): Use type_after_usual_arithmetic_conversions.
8224 Remove redundant attribute merging.
8225 (comptypes): Tidy. Handle COMPLEX_TYPE.
8226 (build_binary_op_nodefault): Use null_ptr_cst_p.
8227 (build_conditional_expr): Remove.
8228 (convert_for_assignment): Use new conversion functions.
8229
8230 * cp-tree.h (abstract_virtuals_error): Change declaration.
8231 * typeck2.c (abstract_virtuals_error): Check to see if an error
8232 ocurred, and return a boolean value accordingly.
8233 (build_functional_cast): Adjust accordingly.
8234 * class.c (finish_struct_1): Likewise.
8235 * cvt.c (ocp_convert): Likewise.
8236 * decl.c (cp_finish_decl): Likewise.
8237 (grokparams): Likewise.
8238 (grok_op_properties): Likewise.
8239 (start_function): Likewise.
8240 * init.c (build_new_1): Likewise.
8241
8242 * pt.c (unify): Don't get confused by pointers-to-member functions.
8243
8244 * search.c (build_cplus_new): Robustify.
8245
8246 1999-07-24 Richard Henderson <rth@cygnus.com>
8247
8248 * gxx.gperf (__builtin_va_arg): New.
8249 * parse.y (VA_ARG): New token.
8250 (unary_expr): Recognize it.
8251
8252 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
8253
8254 * g++FAQ.texi: Deleted per Joe Buck's request.
8255 * Makefile.in: Corresponding changes.
8256
8257 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
8258
8259 * lex.c: Sync with C frontend.
8260 (whitespace_cr): New fn.
8261 (skip_white_space): Use it.
8262 (init_parse): Reorder.
8263 (yyprint): Support CONSTANT.
8264 (pragma_getc, pragma_ungetc): Bring back.
8265 (read_line_number): Change in_system_header directly.
8266 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8267 (parse_float): Update to C version.
8268 (yylex): Handle '$' under the letter case.
8269 Remove looking_for_typename handling.
8270 Support hex floating point constants.
8271 Follow C's lead for choosing type of integer constants.
8272 Rearrange stuff to match C frontend.
8273 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8274 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8275
8276 1999-07-23 Mark Mitchell <mark@codesourcery.com>
8277
8278 * call.c (reference_binding): Tweak.
8279 (mayble_handle_implicit_object): Use direct_reference_binding to
8280 create the right implicit conversion sequence.
8281
8282 1999-07-22 Mark Mitchell <mark@codesourcery.com>
8283
8284 * pt.c (convert_nontype_argument): Don't call decl_constant_value
8285 if we're converting to a reference type.
8286
8287 * call.c (NEED_TEMPORARY_P): New macro.
8288 (standard_conversion): Set it, for derived-to-base conversions.
8289 (reference_related_p): New function.
8290 (reference_compatible_p): Likewise.
8291 (convert_class_to_reference): Likewise.
8292 (direct_reference_binding): Likewise.
8293 (reference_binding): Rework for standards-compliance.
8294 (convert_like): Adjust accordingly.
8295 (maybe_handle_ref_bind): Simplify; the right conversion sequences
8296 are now built up in reference_binding.
8297 (initialize_reference): New function.
8298 * cp-tree.h (ICS_USER_FLAG): Document.
8299 (ICS_THIS_FLAG): Likewise.
8300 (ICS_BAD_FLAG): Likewise.
8301 (NEED_TEMPORARY_P): Likewise.
8302 (cp_lvalue_kind): New type.
8303 (real_lvalue_p): Return it.
8304 * error.c (dump_expr): Provide more accurate representation for
8305 AGGR_INIT_EXPRs.
8306 * init.c (expand_default_init): Do not try to perform implicit
8307 conversions for a brace-enclosed initializer.
8308 * search.c (lookup_conversions): Document.
8309 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
8310 appropriately.
8311 (real_lvalue_p): Adjust accordingly.
8312 (lvalue_p): Likewise.
8313 (build_cplus_new): Don't allow the creation of an abstract class.
8314 * typeck.c (convert_for_initialization): Use initialize_reference.
8315
8316 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
8317
8318 * lex.c (real_yylex) : Correct the test for overflow when lexing
8319 integer literals.
8320
8321 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
8322
8323 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8324 not DECL_BUILT_IN, to determine if a function is internally declared.
8325 (duplicate_decls): Likewise. Improve handling of builtins.
8326 (push_overloaded_decl): Remove special handling of builtins.
8327
8328 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8329
8330 * decl.c (grokdeclarator): Pull out decl_constant_value in
8331 templates, too.
8332
8333 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8334 * cp-tree.h, pt.c, semantics.c: Adjust.
8335 * method.c (largest_union_member): Remove.
8336
8337 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8338
8339 * lex.c (token_getch, token_put_back): New fns.
8340 (real_yylex): Use them.
8341
8342 * lex.c (lang_init): Generalize.
8343 (lang_init_options): Tell cpplib this is C++.
8344 (nextchar): Remove. Replace uses with put_back.
8345 (skip_white_space): Handle linemode here. Optimize for cpplib.
8346 (extend_token_buffer_to): New fn.
8347 (extend_token_buffer): Use it.
8348 (read_line_number, check_newline): Just deal with tokens.
8349 (real_yylex): More cpplib optimizations. Simplify. Don't produce
8350 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8351 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8352 * parse.y (PAREN_STAR_PAREN): Remove.
8353 * input.c: Don't use the putback machinery with cpplib.
8354 (sub_getch): Fold back into getch.
8355 (getch): Don't handle linemode here.
8356 (feed_input): Unget any text in the token buffer.
8357
8358 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8359 nextyychar, nextyylval): Remove.
8360
8361 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
8362 Jason Merrill <jason@yorick.cygnus.com>
8363
8364 * lex.c (indent_level): New variable.
8365 (init_parse): Set cpp_token to CPP_DIRECTIVE.
8366 (consume_string): Make this smart about USE_CPPLIB.
8367 (yyungetc): Use put_back function.
8368 (pragma_getc, pragma_ungetc): Functions deleted.
8369 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8370 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8371 pragma_ungetc.
8372 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8373 Also, clean up cases where we redundantly set token_buffer[0].
8374 (read_line_number): New fn.
8375 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8376 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8377 (sub_getch): Conditionalize out code that's not appropriate if
8378 USE_CPPLIB.
8379 (put_back): Rewrite in case USE_CPPLIB is defined.
8380 (input_redirected): Ditto.
8381
8382 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
8383
8384 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8385 c_global_trees and accessor macros defined in c-common.h.
8386 (cp_tree_index): New enumeration.
8387 (cp_global_trees): Declare new array. Add accessor macros for it, and
8388 delete declarations of tree nodes replaced by it.
8389 (builtin_function): Delete macro, add declaration for new function.
8390 Include c-common.h.
8391 * decl.c: Delete definitions for tree nodes that were replaced by
8392 cp_global_trees and c_global_trees.
8393 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8394 to generate the common builtins here.
8395 (builtin_function): New function.
8396 * decl2.c (abort_fndecl): Delete declaration.
8397 * except.c (expand_builtin_return_address): Delete declaration.
8398 (builtin_return_address_fndecl): Delete variable.
8399 (const_ptr_type_node): Delete declaration.
8400 * lex.c (cons_up_default_function): Delete declaration of
8401 void_list_node.
8402 * parse.y (void_list_node): Delete declaration.
8403 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8404 Delete variables.
8405 (const_string_type_node): Delete declaration.
8406 * search.c (abort_fndecl): Delete declaration.
8407 * Makefile.in: Update dependencies.
8408
8409 1999-07-19 Mark Mitchell <mark@codesourcery.com>
8410
8411 * pt.c (check_default_tmpl_args): Move test for missing default
8412 arguments here, from ...
8413 (end_template_parm_list): Here.
8414
8415 1999-07-18 Mark Mitchell <mark@codesourcery.com>
8416
8417 * decl.c (lookup_nested_type): Remove.
8418 (pushtag): Don't call it.
8419
8420 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
8421
8422 * Makefile.in (INTERFACE): Bump to 2.
8423
8424 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
8425
8426 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8427 instructions to gcc.gnu.org. Removed e-mail address.
8428
8429 1999-07-17 Mark Mitchell <mark@codesourcery.com>
8430
8431 * pt.c (determine_specialization): Tighten error-checking.
8432 (end_template_parm_list): Likewise.
8433
8434 1999-07-14 Mark Mitchell <mark@codesourcery.com>
8435
8436 * pt.c (check_default_tmpl_args): Handle friends defined in the
8437 class just like member functions defined in the class.
8438
8439 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8440 Jason Merrill <jason@yorick.cygnus.com>
8441
8442 * cp-tree.h (struct lang_decl): Added field for storing sorted
8443 FIELD_DECLs (used in TYPE_DECLs).
8444 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8445 (DECL_SORTED_FIELDS): New macro.
8446 * class.c (method_name_cmp): New function.
8447 (finish_struct_methods): Modified to support sorting and searching
8448 methods.
8449 (finish_struct_anon): Changed code in inner loop to use ELT rather
8450 than UELT (which required an extra indirection for every reference).
8451 (field_decl_cmp): New function to support sorting FIELD_DECLs.
8452 (finish_struct_1): Sort fields.
8453 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8454 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8455 Also, switch to using array indexing rather than a changing pointer.
8456 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8457 DECL_SORTED_FIELDS.
8458
8459 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
8460
8461 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8462 casts in system headers or extern "C" blocks.
8463
8464 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8465 errors to pedwarn.
8466
8467 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8468
8469 * decl2.c (write_virtuals): Deleted declaration.
8470 * cp-tree.h (write_virtuals): Deleted extern declaration.
8471 * class.c (finish_struct_1): Removed #if 0'd code that mentions
8472 write_virtuals.
8473 * semantics.c (begin_class_definition): Rewrite code to not depend
8474 on write_virtuals.
8475
8476 * lex.c (cp_pragma_interface): New function.
8477 (cp_pragma_implementation): Likewise.
8478 (handle_cp_pragma): Call them.
8479
8480 * typeck.c (comptypes): Simplify C code in look_hard.
8481
8482 * xref.c (PALLOC): Use xcalloc, not calloc.
8483 (SALLOC): Use xmalloc, not malloc.
8484
8485 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8486
8487 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8488 is NO_DEBUG.
8489
8490 * decl.c (duplicate_decls): If a redeclaration doesn't match the
8491 initial declaration, then don't save the inline info and by all
8492 means don't mark the function as a builtin function.
8493
8494 * decl.c (lookup_name_real): Set NONCLASS to 1 if
8495 CURRENT_CLASS_TYPE is 0.
8496
8497 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8498 NULL_TREE.
8499
8500 * ptree.c (print_lang_type): Added vtable-needs-writing.
8501
8502 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
8503
8504 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8505
8506 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
8507
8508 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8509 Merged into c-common.
8510
8511 1999-07-05 Dave Brolley <brolley@cygnus.com>
8512
8513 * lex.c (errorcount): Declare it.
8514 (finish_parse): Update errorcount for when using CPPLIB.
8515
8516 1999-07-05 Mark Mitchell <mark@codesourcery.com>
8517
8518 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8519 parameters.
8520 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8521 * decl.c (push_class_binding): Use it.
8522 (lookup_name_real): Likewise.
8523
8524 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
8525
8526 * cp-tree.h (widest_integer_literal_type_node,
8527 widest_unsigned_literal_type) : New.
8528 * decl.c (widest_integer_literal_type_node,
8529 widest_unsigned_literal_type) : New.
8530 (init_decl_processing): Handle/use the two new types.
8531 * lex.c (real_yylex): Same.
8532 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8533 Same.
8534
8535 1999-07-01 Mark Mitchell <mark@codesourcery.com>
8536
8537 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8538 to anonymous cv-qualified types.
8539
8540 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
8541
8542 * lex.c (real_yylex) : Change integer literal overflow handling to
8543 be like c-lex.c.
8544
8545 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8546
8547 1999-06-28 Richard Henderson <rth@cygnus.com>
8548
8549 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8550
8551 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
8552
8553 * error.c (dump_type_real): Handle TREE_LIST again.
8554
8555 * typeck.c (comp_target_parms): Don't complain about
8556 converting from () to (...) if !flag_strict_prototype.
8557
8558 * decl.c (grokdeclarator): Update the names of all variants when
8559 de-anonymizing.
8560
8561 1999-06-21 Mark Mitchell <mark@codesourcery.com>
8562
8563 * init.c (expand_aggr_vbase_init): Rename to
8564 construct_virtual_bases. Conditionalize construction here,
8565 rather than ...
8566 (emit_base_init): Here.
8567
8568 1999-06-19 Mark Mitchell <mark@codesourcery.com>
8569
8570 * semantics.c (finish_asm_stmt): Apply decay conversions to
8571 input operands.
8572
8573 * decl.c (expand_static_init): When building an anonymous function
8574 for use with atexit, compute its body before and after entering
8575 the function.
8576
8577 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
8578 EXIT_EXPR.
8579
8580 1999-06-18 Mark Mitchell <mark@codesourcery.com>
8581
8582 * init.c (expand_aggr_vbase_init): Add flag parameter.
8583 (build_partial_cleanup_for): Remove, inlining into ..
8584 (expand_cleanup_for_base): ... here. Take flag parameter.
8585 (emit_base_init): Pass the in_chrg parameter to
8586 emit_aggr_vbase_init.
8587 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
8588
8589 1999-06-16 Mark Mitchell <mark@codesourcery.com>
8590
8591 * decl2.c (import_export_decl): Use same_type_p, rather than
8592 relying on pointer-equality for types.
8593
8594 * method.c (do_build_copy_constructor): Simplify.
8595
8596 * call.c (build_method_call): Remove bogus code for two-argument
8597 delete.
8598 * init.c (build_new_1): Expand on comment, and remove dead code.
8599
8600 * init.c (expand_cleanup_for_base): New function, split out
8601 from ...
8602 (emit_base_init): Here.
8603 (expand_aggr_vbase_init): Use it.
8604
8605 1999-06-15 Mark Mitchell <mark@codesourcery.com>
8606
8607 * cp-tree.h (class_cache_firstobj): Declare.
8608 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8609 * class.c (permanent_obstack): Remove declaration.
8610 (class_cache_firstobj): Make it global.
8611 (add_method): Don't use permanent_obstack directly.
8612 (pushclass): Only free the class_cache_obstack if we know how far
8613 back to free it.
8614 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8615 * decl.c: Remove dead comment.
8616 (saved_scope): Add class_cache_firstobj.
8617 (push_to_top_level): Save it.
8618 (pop_from_top_level): Restore it.
8619 (push_class_level_binding): Use push_cache_obstack, not
8620 maybe_push_cache_obstack.
8621 * search.c (push_class_decls): Likewise.
8622
8623 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8624
8625 * pt.c (tsubst_friend_function): Push into namespace of friend
8626 function before pushdecl'ing it.
8627
8628 1999-06-14 Nathan Sidwell <nathan@acm.org>
8629
8630 * call.c (build_new_op): Remove REF_BIND from all operands.
8631
8632 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
8633
8634 * init.c (build_new_1): Look up operator delete even if there was
8635 no explicit new placement.
8636
8637 1999-06-08 Nathan Sidwell <nathan@acm.org>
8638
8639 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8640 of ...
8641 (build_throw): ... here. Call it.
8642 (process_start_catch_block): Call it.
8643
8644 1999-06-07 Mark Mitchell <mark@codesourcery.com>
8645
8646 * search.c (convert_pointer_to_single_level): Reimplement without
8647 using get_binfo.
8648
8649 1999-06-06 Mark Mitchell <mark@codesourcery.com>
8650
8651 * method.c (is_back_referenceable_type): Back-reference bools when
8652 not squangling.
8653
8654 1999-06-07 Dave Brolley <brolley@cygnus.com>
8655
8656 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8657 * input.c (putback_buffer): New structure type.
8658 (putback): Replaces putback_char member.
8659 (putback): Replaces putback_char static variable.
8660 (feed_input): Use putback.
8661 (end_input): Use putback.
8662 (sub_getch): Use putback.
8663 (put_back): Use putback.
8664
8665 1999-06-05 Mark Mitchell <mark@codesourcery.com>
8666
8667 * decl.c (grokdeclarator): Fix typo in last change.
8668
8669 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
8670
8671 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8672 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8673
8674 1999-06-04 Nathan Sidwell <nathan@acm.org>
8675
8676 * except.c (build_throw): Check throw expression validity.
8677
8678 1999-06-03 Mark Mitchell <mark@codesourcery.com>
8679
8680 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8681 just because flag_signed_bitfields is false.
8682
8683 1999-06-03 Nathan Sidwell <nathan@acm.org>
8684
8685 * semantics.c (begin_class_definition): Update the struct's
8686 location here ...
8687 * class.c (finish_struct): ... rather than here.
8688
8689 * decl.c (make_typename_type): Don't rely on uninitialized
8690 variable.
8691
8692 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8693
8694 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8695
8696 1999-05-31 Mark Mitchell <mark@codesourcery.com>
8697
8698 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8699 and friends rather than messing with current_obstack directly.
8700 (cp_build_qualified_type_real): Rework ARRAY_TYPE
8701 allocation to match practice throughout the rest of the
8702 compiler.
8703
8704 1999-05-30 Mark Mitchell <mark@codesourcery.com>
8705
8706 * lex.c (make_lang_type): Create TYPE_BINFO for
8707 TEMPLATE_TYPE_PARMs just like for non-template types.
8708
8709 * decl.c (start_decl): Move checks on initialization to ...
8710 (cp_finish_decl): Here. Tidy formatting slightly.
8711
8712 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8713
8714 * decl.c (add_binding): Don't complain about a redeclaration of a
8715 semantically identical typedef in a local scope.
8716
8717 1999-05-28 Nathan Sidwell <nathan@acm.org>
8718
8719 * decl.c (complete_array_type): Allocate off same obstack. Fix
8720 DO_DEFAULT comment to match reality.
8721
8722 * friend.c (make_friend_class): Fix diagnostic typo.
8723
8724 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8725
8726 * decl.c (lookup_namespace_name): Handle getting a
8727 TEMPLATE_ID_EXPR.
8728 (expand_static_init): Don't call pushdecl for implicitly declared
8729 `atexit' used to register destructors.
8730
8731 1999-05-25 Mark Mitchell <mark@codesourcery.com>
8732
8733 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8734 intialize a vtable.
8735
8736 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8737 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
8738 by combining TEMPLATE_INFO and LEVEL into a single union.
8739 (DECL_TEMPLATE_INFO): Reformat.
8740 (DECL_SAVED_TREE): Document.
8741 (DECL_TEMPLATE_INJECT): Remove.
8742 * class.c (finish_struct): Remove code to deal with
8743 DECL_TEMPLATE_INJECT.
8744
8745 * decl.c (maybe_process_template_type_declaration): Handle all new
8746 types in templates uniformly.
8747 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8748 DECL_CONTEXT.
8749 * pt.c (lookup_template_class): Inject template instantiations of
8750 forward-declarations.
8751 (instantiate_class_template): Remove code processing
8752 DECL_TEMPLATE_INJECT.
8753
8754 * pt.c (lookup_template_class): Tweak lookup to find member
8755 templates.
8756
8757 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8758 ASM_CV_QUAL.
8759 * semantics.c (finish_asm_stmt): Make strings permanent if they're
8760 used in a template.
8761
8762 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
8763
8764 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8765 parts of pointer to data member types.
8766
8767 1999-05-24 Mark Mitchell <mark@codesourcery.com>
8768
8769 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8770 and then make it look like `abort'. Just use `abort' instead.
8771
8772 * typeck.c (build_static_cast): Don't allow static_casts that cast
8773 away constness.
8774 (casts_away_constness_r): New function.
8775 (casts_away_constness): Likewise.
8776
8777 * decl.c (lookup_tag): Remove code no longer needed after
8778 name-lookup improvements.
8779 * decl2.c (handle_class_head): Make error-recovery more robust.
8780 * friend.c (make_friend_class): Reject templated typename types.
8781 * lex.c (is_global): A template parameter isn't global.
8782 * parse.y (class_head): Robustify.
8783 * parse.c: Regenerated.
8784
8785 1999-05-22 Mark Mitchell <mark@codesourcery.com>
8786
8787 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8788 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
8789
8790 * cp-tree.h (push_nested_namespace): Declare.
8791 (pop_nested_namespace): Likewise.
8792 * decl.c (push_nested_namespace): New function.
8793 (pop_nested_namespace): Likewise.
8794 * pt.c (instantiate_class_template): Use them.
8795
8796 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8797
8798 * cp-tree.h (cplus_expand_constant): Declare.
8799 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8800 converted from one pointer-to-object type to another.
8801 * expr.c (cplus_expand_constant): Don't make it static.
8802 * typeck.c (build_component_ref): Don't crash when presented with
8803 a component which is a TEMPLATE_DECL.
8804 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
8805 cast from a pointer-to-member constant to its own type does not
8806 result in a valid non-type template argument.
8807
8808 1999-05-21 Mark Mitchell <mark@codesourcery.com>
8809 Nathan Sidwell <nathan@acm.org>
8810
8811 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8812 * cp-tree.h: Fix typo in documentation on pointers-to-members.
8813 (cp_build_qualified_type): Make it a macro.
8814 (cp_build_qualified_type_real): Declare.
8815 * decl.c (grokdeclarator): Remove misleading comment. Avoid
8816 problem with template parameters and restrict-qualification.
8817 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8818 * hash.h: Regenerated.
8819 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8820 the enumeration.
8821 (NORID): Remove definition.
8822 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8823 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
8824 (fn_type_unification): Check that the function type resulting from
8825 the deduction is legal.
8826 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8827 (unify): Use cp_build_qualified_type_real.
8828 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8829 (cp_build_qualified_type): Rename to ...
8830 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8831 and modify appropriately.
8832
8833 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8834 reveal optimization opportunities.
8835
8836 * pt.c (tsubst): Don't issue error messages when we're not
8837 complaining, even if we see a qualified function type.
8838 (check_cv_quals_for_unify): Don't allow a qualified function
8839 type.
8840
8841 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8842
8843 * class.c (instantiate_type): Downgrade errors for object-dependent
8844 memfn refs to pedwarn.
8845
8846 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8847
8848 * decl.c (grokdeclarator): Don't treat [] as indicating a
8849 zero-sized array in a typedef.
8850
8851 * call.c (build_object_call): Don't look at DECL_NAME for a type.
8852 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8853 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8854
8855 * pt.c (for_each_template_parm): Rework to match documentation.
8856 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8857
8858 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8859
8860 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8861
8862 * class.c (finish_base_struct): Allow non-COM bases for COM classes
8863 except at the leftmost position.
8864 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8865 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8866 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8867
8868 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8869 (build_cplus_new): Make sure that what we return is of the right type.
8870
8871 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8872
8873 * cp-tree.h (make_ptrmem_cst): New function.
8874 * expr.c (cplus_expand_constant): Split out from ...
8875 (cplus_expand_expr): Here. Use cplus_expand_constant.
8876 (init_cplus_expand): Set lang_expand_constant.
8877 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8878
8879 * tree.c (make_ptrmem_cst): Define.
8880 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8881 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8882
8883 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8884
8885 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8886
8887 * decl2.c (start_static_storage_duration_function): Fix comment.
8888 (finish_file): Create static storage duration functions lazily.
8889
8890 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8891
8892 Implement anonymous structs.
8893 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8894 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8895 * class.c (finish_struct_1): Remove redundant check for anon struct.
8896 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8897 (check_tag_decl): Check for anonymous struct here.
8898 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8899 * init.c (sort_member_init, emit_base_init): Handle getting fields
8900 as well as names in current_member_init_list.
8901 (perform_member_init): Handle getting an anon aggr.
8902 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8903 (do_build_copy_constructor): Likewise.
8904
8905 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8906
8907 * tree.c (cp_build_qualified_type): Don't allow qualified function
8908 types.
8909
8910 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
8911
8912 * gxxint.texi: Fix typo.
8913
8914 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8915
8916 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8917 * class.c (finish_struct_1): Use CLASS_TYPE_P.
8918 * ptree.c (print_lang_type): Likewise.
8919 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8920 IS_AGGR_TYPE_CODE.
8921 * typeck2.c (digest_init): Likewise.
8922
8923 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
8924
8925 * call.c (joust): Compare the types of the conv ops, not the
8926 target types of the conversions.
8927
8928 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
8929
8930 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8931 was not given.
8932
8933 1999-05-17 Mark Mitchell <mark@codesourcery.com>
8934
8935 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8936 * decl.c (grokfndecl): Don't allow inline declarations of friend
8937 template specializations, or friend template specializations with
8938 default arguments.
8939 * pt.c (tsubst): Handle substitution into array types that does
8940 not yield a fixed upper bound, even when not processing a
8941 template.
8942 (tsubst_copy): Deal with the fact that the second operand to a
8943 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8944 * search.c (marked_pushdecls_p): Don't descend into
8945 TEMPLATE_TYPE_PARMs and the like.
8946 (unmarked_pushdecls_p): Likewise.
8947
8948 * call.c (build_over_call): Don't throw away
8949 initializations/copies of empty classes; use MODIFY_EXPR and
8950 INIT_EXPR as for non-empty classes.
8951 * class.c (finish_struct_1): Put the padding byte for an empty
8952 class on the TYPE_NONCOPIED_PARTS list for the class.
8953
8954 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8955
8956 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8957 indicate a reference to a field that is a qualified name.
8958
8959 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
8960
8961 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8962 ASM_OUTPUT_CONSTRUCTOR.
8963
8964 * friend.c (do_friend): Add attrlist arg. Remove support for
8965 getting a non-decl as 'decl'.
8966 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
8967 rtl.
8968 (grokdeclarator): Adjust.
8969 * cp-tree.h: Adjust.
8970
8971 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8972
8973 * cp-tree.h (permanent_p): New function.
8974 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8975 possibly complex tree node.
8976 * tree.c (mapcar): Adjust comments, and follow coding standards in
8977 conditional.
8978 (permanent_p): New function.
8979
8980 1999-05-13 Per Bothner <bothner@cygnus.com>
8981
8982 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
8983 primitive Java types, if we actually see `extern "Java"'.
8984
8985 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
8986
8987 * lang-specs.h: Pass -$ to the preprocessor.
8988
8989 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
8990
8991 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8992 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8993 (resolve_offset_ref): Don't handle a raw baselink.
8994 * cvt.c (build_expr_type_conversion): Likewise.
8995 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8996 convert_for_initialization): Likewise.
8997 * class.c (instantiate_type): Handle seeing a baselink under an
8998 OFFSET_REF.
8999 * error.c (dump_expr): Likewise.
9000 * pt.c (for_each_template_parm): Likewise.
9001 (resolve_overloaded_unification): Likewise.
9002 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
9003 * typeck.c (expr_sizeof): Also complain about other permutations
9004 of overloaded functions.
9005
9006 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
9007
9008 * init.c (resolve_offset_ref): Don't return a raw method.
9009 Use BASELINK_P.
9010 * typeck.c (decay_conversion): Don't handle a raw method.
9011 Resolve all OFFSET_REFs.
9012 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9013 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
9014 same_type_p for pmf bits. Don't use build_binary_op to compare
9015 raw pointers to methods.
9016 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9017 to decide when to call resolve_offset_ref.
9018 (build_c_cast, convert_for_initialization): Likewise.
9019 * cvt.c (build_expr_type_conversion): Likewise.
9020
9021 1999-05-06 Nathan Sidwell <nathan@acm.org>
9022
9023 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9024
9025 1999-05-05 Mark Mitchell <mark@codesourcery.com>
9026
9027 * decl2.c (start_objects): Don't let static constructors and
9028 destructors get inlined.
9029
9030 * parse.y (nested_name_specifier): Make sure ordinary types are
9031 complete, just like template types.
9032 * parse.c: Regenerated.
9033
9034 * pt.c (check_explicit_specialization): Improve error messages.
9035
9036 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
9037
9038 * typeck.c (string_conv_p): Use same_type_p to check whether we
9039 try to convert between char and wchar_t.
9040
9041 1999-05-03 Mark Mitchell <mark@codesourcery.com>
9042
9043 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9044 lookup to error_mark_node here.
9045 (lookup_member): Revise documentation. Add comments. Don't set
9046 the TREE_TYPE to error_mark_node here, and don't build up an extra
9047 TREE_LIST for ambiguous lookups.
9048 (setup_class_bindings): Adjust accordingly.
9049 (push_class_decls): Revise out-of-date comments.
9050
9051 * typeck.c (build_const_cast): Tighten checks for legality.
9052
9053 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9054
9055 * init.c (build_member_call): Lookup names coming from
9056 namespace-scoped LOOKUP_EXPR.
9057
9058 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
9059
9060 * gxxint.texi: Add documentation for 'I'.
9061
9062 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9063
9064 * tinfo.cc (operator==): Qualify type_info with std::.
9065
9066 1999-05-02 Mark Mitchell <mark@codesourcery.com>
9067
9068 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
9069 (DECL_COMDAT): Remove definition.
9070
9071 1999-05-01 Mark Mitchell <mark@codesourcery.com>
9072
9073 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9074 change.
9075
9076 1999-04-30 Mark Mitchell <mark@codesourcery.com>
9077
9078 * class.c (build_vtable): Use build_lang_decl when building
9079 vtables, not just build_decl.
9080 (prepare_fresh_vtable): Likewise.
9081 * decl.c (wrapup_globals_for_namespace): Mark vtables as
9082 DECL_EXTERNAL when calling wrapup_global_declarations.
9083 * decl2.c (priority_info_s): Add initializations_p and
9084 destructions_p members.
9085 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9086 when deciding what vtables to write out.
9087 (ssdf_decls): New variable.
9088 (ssdf_decls_used): Likewise.
9089 (start_static_storage_duration_function): Deal with being called
9090 multiple times. Avoid inlining this function.
9091 (generate_inits_for_priority): Deal with reuse of priority map.
9092 (get_priority_info): Clear initializations_p and destructions_p.
9093 (do_static_initialization): Tweak comment.
9094 (do_static_destruction): Likewise. Fix condition on sentries for
9095 destruction.
9096 (generate_ctor_or_dtor_function): Call all of the static storage
9097 duration functions.
9098 (generate_ctor_or_dtor_function_for_priority): Check
9099 initializations_p and destructions_p to see what priorities need
9100 initialization functions.
9101 (finish_file): Rework to generate multiple static storage duration
9102 functions, rather than just one.
9103
9104 * typeck.c (build_const_cast): Tweak last change to handle
9105 templates correctly.
9106
9107 * typeck.c (build_const_cast): Disallow use of const_cast to
9108 anything but a pointer or reference type.
9109
9110 1999-04-30 Nathan Sidwell <nathan@acm.org>
9111
9112 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9113 signature type.
9114
9115 1999-04-29 Mark Mitchell <mark@codesourcery.com>
9116
9117 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9118 (finish_file): Indent comments properly.
9119
9120 1999-04-29 Richard Henderson <rth@cygnus.com>
9121
9122 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9123 (do_static_destruction): Likewise.
9124
9125 1999-04-29 Nathan Sidwell <nathan@acm.org>
9126
9127 * cp-tree.h (TYPE_NOTHROW_P): New macro.
9128 * decl2.c (delete_sanity): Warn on deleting void *.
9129 * init.c (build_new_1): Use TYPE_NOTHROW_P.
9130 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9131 throwing operator new.
9132
9133 1999-04-28 Nathan Sidwell <nathan@acm.org>
9134
9135 * cp-tree.h (build_component_addr): Remove prototype.
9136 * typeck.c (build_component_addr): Make static. Remove MSG
9137 argument.
9138 (build_component_addr): Remove MSG parameter, clean up
9139 comment.
9140 (build_x_function_call): Use cp_error.
9141 (build_unary_op): Adjust call of build_component_addr.
9142
9143 1999-04-28 Mark Mitchell <mark@codesourcery.com>
9144
9145 * pt.c (tsubst_friend_class): Check for NULL.
9146
9147 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9148
9149 * search.c (binfo_for_vtable): Initialize bfvi.var.
9150
9151 1999-04-27 Nathan Sidwell <nathan@acm.org>
9152
9153 * rtti.c (build_x_typeid): Check rtti is enabled.
9154
9155 1999-04-26 Mark Mitchell <mark@codesourcery.com>
9156
9157 * search.c (is_subobject_of_p): Make sure we're looking at the
9158 right baseclasses.
9159
9160 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
9161
9162 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9163
9164 1999-04-23 Mark Mitchell <mark@codesourcery.com>
9165
9166 * decl2.c (finish_file): Tweak handling of extern inlines so that
9167 they are not unnecessarily put out.
9168
9169 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9170 such as base classes.
9171
9172 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
9173
9174 * tree.c (build_exception_variant): Fix typo: use the chain of U,
9175 not trying V, while cycling through U.
9176
9177 1999-04-22 Mark Mitchell <mark@codesourcery.com>
9178
9179 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9180 preserves_first_arg. Enlarge dummy accordingly.
9181 (DECL_TINFO_FN_P): New macro.
9182 (SET_DECL_TINFO_FN_P): Likeiwse.
9183 (DECL_RETURNS_FIRST_ARG): Remove.
9184 (DECL_PRESERVES_THIS): Likewise.
9185 (DECL_INIT_PRIORITY): New macro.
9186 (finish_struct_1): Change prototype.
9187 (cat_namespace_levels): Remove prototype.
9188 (vtable_decl_p): New prototype.
9189 (vtype_decl_p): Likewise.
9190 (sigtable_decl_p): Likewise.
9191 (walk_globals_pred): New typedef.
9192 (walk_globals_fn): Likewise.
9193 (walk_globals): New prototype.
9194 (walk_namespaces_fn): New typedef.
9195 (walk_namespaces): New prototype.
9196 (wrapup_globals_for_namespace): Likewise.
9197 (walk_vtables): Remove prototype.
9198 (walk_sigtables): Likewise.
9199 (instantiate_pending_templates): New prototype.
9200 * class.c (finish_struct_1): Don't return a value.
9201 * decl.h (pending_statics): Remove declaration.
9202 * decl.c (walk_namespaces_r): New function.
9203 (walk_globals_r): Likewise.
9204 (vtable_decl_p): Likewise.
9205 (vtype_decl_p): Likewise.
9206 (sigtable_decl_p): Likewise.
9207 (walk_namespaces): Likewise.
9208 (walk_globals_data): New type.
9209 (walk_globals): New function.
9210 (wrapup_globals_for_namespace): Likewise.
9211 (expand_static_init): Remove assertion. Remove redundancy in
9212 conditional. Don't put static data members in static_aggregates
9213 Tidy.
9214 (finish_function): Remove redundancy in conditional. Don't set
9215 DECL_RETURNS_FIRST_ARG.
9216 (cat_namespace_levels): Remove.
9217 * decl2.c: Include splay-tree.h and varray.h.
9218 (priority_info_s): New structure.
9219 (finish_vtable_vardecl): Change prototype. Adjust for new calling
9220 conventions.
9221 (prune_vtable_vardecl): Likewise.
9222 (finish_sigtable_vardecl): Likewise.
9223 (setup_initp): Remove.
9224 (do_dtors): Remove.
9225 (do_ctors): Remove.
9226 (start_static_storage_duration_function): New function.
9227 (generate_inits_for_priority): Likewise.
9228 (finish_static_storage_duration_function): Likewise.
9229 (get_priority_info): Likewise.
9230 (do_static_initialization): Likewise.
9231 (do_static_destruction): Likewise.
9232 (do_static_initialization_and_destruction): Likewise.
9233 (generate_ctor_or_dtor_function): Likewise.
9234 (generate_ctor_and_dtor_functions_for_priority): Likewise.
9235 (pending_statics): Make it a varray.
9236 (pending_statics_used): New variable.
9237 (saved_inlines): Make it a varray.
9238 (saved_inlines_used): New variable.
9239 (finish_static_data_member): Change method of updating
9240 pending_statics.
9241 (mark_inline_for_output): Remove #if 0'd code. Change method of
9242 updating saved_inlines.
9243 (walk_vtables): Remove.
9244 (walk_sigtables): Likewise.
9245 (import_export_decl): Use DECL_TINFO_FN_P.
9246 (pending_templates): Remove declaration.
9247 (maybe_templates): Likewise.
9248 (static_aggregates_initp): Likewise.
9249 (setup_initp): Likewise.
9250 (finish_objects): Simplify.
9251 (INITIALIZE_P_IDENTIFIER): New macro.
9252 (PRIORITY_IDENTIFIER): New macro.
9253 (SSDF_IDENTIFIER): New macro.
9254 (initialize_p_decl): New variable.
9255 (priority_decl): Likewise.
9256 (ssdf_decl): Likewise.
9257 (priority_info_map): Likewise.
9258 (finish_file): Recode output of static intializers and other
9259 file-scope finalization tasks.
9260 * error.c (OB_END_TEMPLATE_ID): New macro.
9261 (dump_type_real): Use it.
9262 (dump_decl): Likewise.
9263 (dump_function_name): Likewise.
9264 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9265 interface.
9266 (check_newline): Use walk_globals, not walk_vtables.
9267 * pt.c (pending_tempalte_expansions): Remove.
9268 (set_vardecl_interface_info): Likewise.
9269 (pending_templates): Make static.
9270 (maybe_templates): Likewise.
9271 (instantiate_class_template): Adjust call to finish_struct_1.
9272 (instantiate_pending_templates): New function.
9273 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9274 * tree.c (static_aggregates_initp): Remove.
9275 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9276 instead.
9277 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9278
9279 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9280 with the RTL code RETURN.
9281 * hash.h: Regenerated.
9282 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9283 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9284 * parse.c: Regenerated.
9285 * pt.c: Include varray.h. Include rtl.h since varray.h requires
9286 it.
9287 (inline_parm_levels): New variable.
9288 (inline_parm_levels_used): Likewise.
9289 (maybe_begin_member_template_processing): Update them.
9290 (maybe_end_member_template_processing): Use them, rather than
9291 guessing how many levels to pop.
9292
9293 * decl.c (make_typename_type): Tighten error-checking.
9294
9295 1999-04-20 Mark Mitchell <mark@codesourcery.com>
9296
9297 * cp-tree.h (build_binary_op): Remove unneeded parameter.
9298 * class.c (build_vrable_entry_ref): Adjust call to
9299 build_binary_op.
9300 * decl.c (expand_static_init): Likewise.
9301 (grokdeclarator): Likewise.
9302 (finish_function): Likewise.
9303 * decl2.c (delete_sanity): Likewise.
9304 (do_dtors): Likewise.
9305 (do_ctors): Likewise.
9306 * error.c (dump_type_suffix): Likewise.
9307 * expr.c (cplus_expand_expr): Likewise.
9308 * init.c (resolve_offset_ref): Likewise.
9309 (build_new): Likewise.
9310 (build_new_1): Likewise.
9311 (build_vec_delete_1): Likewise.
9312 (expand_vec_init_catch_clause): Likewise.
9313 (build_delete): Likewise.
9314 * pt.c (tsubst): Likewise.
9315 * rtti.c (synthesize_tinfo_fn): Likewise.
9316 * search.c (expand_upcast_fixups): Likewise.
9317 (expand_direct_vtbls_init): Likewise.
9318 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9319 (build_binary_op_nodefault): Likewise.
9320 (point_int_sum): Likewise.
9321 (pointer_diff): Likewise.
9322 (build_unary_op): Likewise.
9323 (build_modify_expr): Likewise.
9324 (get_delta_difference): Likewise.
9325 (build_ptrmemfunc): Likewise.
9326 (expand_ptrmemfunc_cst): Likewise.
9327
9328 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
9329
9330 * decl.c (grokfndecl): Always call cplus_decl_attributes.
9331 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9332
9333 1999-04-19 Mark Mitchell <mark@codesourcery.com>
9334
9335 * cp-tree.h (finish_static_data_member_decl): New function.
9336 * decl2.c (finish_static_data_member_decl): Split out from ...
9337 (grokfield): Here.
9338 * pt.c (instantiate_class_template): Use it here instead of
9339 trying to fake it.
9340 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9341 finish_static_data_member_decl will do that. Explicit set
9342 DECL_EXTERNAL to match non-template processing.
9343
9344 1999-04-18 Mark Mitchell <mark@codesourcery.com>
9345
9346 * cp-tree.h (finish_class_definition): Add parameter.
9347 * parse.y (structsp): Use it. Don't call pop_scope here.
9348 * parse.c: Regenerated.
9349 * semantics.c (finish_class_definition): Pop it here.
9350
9351 1999-04-17 Mark Mitchell <mark@codesourcery.com>
9352
9353 * decl.c (xref_tag): Revise handling of nested template
9354 declarations.
9355 * pt.c (check_explicit_specialization): Tweak handling of friend
9356 templates in template classes.
9357 (tsubst_friend_class): Handle friend declarations for nested
9358 member template classes.
9359
9360 1999-04-16 Mark Mitchell <mark@codesourcery.com>
9361
9362 * class.c (finish_struct): Remove unused variable.
9363 (pushclass): Likewise.
9364 (invalidate_class_lookup_cache): Likewise.
9365 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9366 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9367 doesn't get obliterated.
9368 (make_typename_type): Handle template classes correctly.
9369
9370 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9371 (storetags): Declare.
9372 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9373 (pushclass): Likewise. Use storetags to install tag declarations,
9374 not pushtag.
9375 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9376 * decl.c (storetags): Make it global.
9377 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9378 implicit typename declaration.
9379 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
9380 * method.c (hack_identifier): Likewise.
9381 * search.c (lookup_member): Likewise.
9382
9383 * decl.c (warn_about_implicit_typename_lookup): New function.
9384 (lookup_name_real): Use it. Rework handling of implicit typename
9385 extension.
9386
9387 1999-04-15 Mark Mitchell <mark@codesourcery.com>
9388
9389 * cp-tree.h (lookup_nested_field): Remove.
9390 * class.c (push_nested_class): Handle UNION_TYPEs.
9391 (pop_nested_class): Likewise.
9392 * decl.c (lookup_name_real): Don't call lookup_nested_field.
9393 (start_decl): Use push_nested_class, not just pushclass.
9394 (cp_finish_decl): Use pop_nested_class, not just popclass.
9395 * search.c (lookup_nested_field): Remove.
9396
9397 * cp-tree.h (lang_type): Add documentation.
9398 * decl2.c (handle_class_head): Create template declarations here,
9399 as appropriate.
9400 * parse.y (class_head): Return whether or not we entered a new
9401 scope, as well as the type named.
9402 (named_class_head): Likewise.
9403 (named_complex_class_head_sans_basetype): Likewise.
9404 (structsp): Adjust accordingly. Pop scope when required.
9405 * parse.c: Regenerated.
9406 * pt.c (check_default_tmpl_args): Robustify.
9407 (redeclare_class_template): Likewise.
9408 (instantiate_class_template): An instantiation of an
9409 anonymous union is itself an anonymous union.
9410 * semantics.c (begin_class_definition): Don't create template
9411 declarations here.
9412
9413 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
9414
9415 * parse.y (after_type_declarator_intern): New nonterminal.
9416 (after_type_declarator): Use it.
9417 (direct_after_type_declarator): Likewise. Move above
9418 nonnested_type to fix reduce/reduce conflict resolution.
9419 (declmods): Reducing from just 'attributes' has EMPTY precedence.
9420 * Makefile.in (CONFLICTS): Update.
9421
9422 * decl.c (define_label): Downgrade error for jumping over a
9423 non-POD decl to pedwarn.
9424
9425 1999-04-14 Mark Mitchell <mark@codesourcery.com>
9426
9427 * cp-tree.h (popclass): Change declaration.
9428 (pop_nested_class): Likewise.
9429 (poplevel_class): Remove declaration.
9430 * call.c (convert_default_argument): Pass no arguments to
9431 popclass.
9432 * class.c (finish_struct_1): Likewise.
9433 (finish_struct): Likewise.
9434 (popclass): Remove argument. Simplify code accordingly.
9435 (pop_nested_class): Likewise.
9436 * decl.c (poplevel_class): Declare it here, and make it static.
9437 (poplevel): Handle class scopes.
9438 (poplevel_class): Don't take an rgument. Simplify.
9439 (pop_everything): Pass no arguments to pop_nested_class.
9440 (cp_finish_decl): Pass no arguments to popclass.
9441 (grokdeclarator): Pass no arguments to pop_nested_class.
9442 (finish_function): Likewise.
9443 * decl2.c (grokfield): Likewise.
9444 (pop_scope): Pass no arguments to popclass.
9445 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9446 * pt.c (instantiate_class_template): Move call to pushclass, and
9447 document. Pass no arguments to popclass.
9448 (regenerate_decl_from_template): Likewise.
9449
9450 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
9451
9452 * typeck.c (build_unary_op): Handle taking the address of a unique
9453 bound non-static member function.
9454
9455 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
9456
9457 * lang-options.h (-Wdeprecated): New flag.
9458 * decl2.c (warn_deprecated): New flag.
9459 (lang_decode_option): Deprecated this-is-variable,
9460 external-templates, alt-external-templates.
9461 Support -Wdeprecated.
9462 * errfn.c (cp_deprecated): New function.
9463
9464 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
9465
9466 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9467 of the decls themselves.
9468
9469 * pt.c (tsubst_function_type): Copy attributes over.
9470
9471 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
9472 and com_interface.
9473 * cp-tree.h: Add prototype.
9474 * decl.c (init_decl_processing): Set valid_lang_attribute.
9475
9476 1999-04-13 Mark Mitchell <mark@codesourcery.com>
9477
9478 * class.c (finish_struct_1): Look at the const-ness of the field's
9479 type, not the TREE_READONLY-ness of the declaration.
9480 * method.c (synthesize_method): Likewise.
9481 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9482 creating new declarations.
9483
9484 1999-04-13 Mike Stump <mrs@wrs.com>
9485
9486 * decl2.c (import_export_decl): Because vtables always reference
9487 virtual functions, even if they are inlined, don't allow
9488 -fno-implement-inlines to not emit them, instead, emit them with
9489 the vtable.
9490 * decl.c (start_function): Likewise.
9491
9492 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
9493
9494 * cp-tree.h (struct lang_type): Add com_interface.
9495 (CLASSTYPE_COM_INTERFACE): New macro.
9496 * class.c (set_rtti_entry): COM interface classes have no RTTI
9497 entries in their vtables; adjust.
9498 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9499 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9500 finish_struct_1): Likewise.
9501 * decl2.c (mark_vtable_entries): Likewise.
9502 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9503 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9504 expand_upcast_fixups): Likewise.
9505 * tree.c (debug_binfo): Likewise.
9506
9507 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9508 * typeck.c (comptypes): If we get it, ignore attributes.
9509 * class.c (instantiate_type): Use BASELINK_P. Change complain
9510 parameter to flags; 2 means ignore attributes.
9511 * call.c (build_op_delete_call): Pass it.
9512
9513 * decl.c (xref_tag): Only complain once about using a typedef-name
9514 with 'struct'. Downgrade to pedwarn.
9515
9516 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9517
9518 * parse.y (absdcl_intern): New nonterminal.
9519 (absdcl, direct_abstract_declarator): Use it.
9520
9521 * pt.c (lookup_template_class): Look through implict typename.
9522
9523 1999-04-11 Mark Mitchell <mark@codesourcery.com>
9524
9525 * friend.c (add_friend): Deal gracefully with error_mark_node.
9526 * method.c (build_overload_value): Handle pointers-to-members as
9527 template parameters.
9528
9529 * decl.c (push_binding): Fix typo in comment.
9530
9531 1999-04-10 Mark Mitchell <mark@codesourcery.com>
9532
9533 * error.c (dump_type_real): If a typename is a template-id, put
9534 out the template arguments.
9535 (dump_expr): Handle TEMPLATE_ID_EXPR.
9536 * pt.c (lookup_template_class): Now that full arguments are
9537 available everywhere, remove code that tried to guess them.
9538
9539 1999-04-09 Mark Mitchell <mark@codesourcery.com>
9540
9541 * decl.c (make_typename_type): Complain if we don't find a type
9542 when trying to make a typename type for a non-template type.
9543
9544 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
9545
9546 * decl.c (start_decl): Pass attributes to grokdeclarator.
9547 (grokdeclarator): Handle attributes on constructor-syntax
9548 initializers.
9549
9550 1999-04-08 Mark Mitchell <mark@codesourcery.com>
9551
9552 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9553 don't have types.
9554
9555 * search.c (template_self_reference_p): Tweak.
9556
9557 1999-04-07 Mark Mitchell <mark@codesourcery.com>
9558
9559 * init.c (build_offset_ref): Don't build yet another weird data
9560 structure to describe overloaded functions.
9561
9562 1999-04-06 Mark Mitchell <mark@codesourcery.com>
9563
9564 * cp-tree.h (BASELINK_P): New macro.
9565 (SET_BASELINK_P): Likewise.
9566 * init.c (build_member_call): Remove needless assignment in if
9567 statement.
9568 * search.c (lookup_field_r): Fix handling when we are looking
9569 specifically for a type; these are not hidden by functions and
9570 variables.
9571 (lookup_member): Use SET_BASELINK_P.
9572 * tree.c (is_overloaded_fn): Use BASELINK_P.
9573 (really_overloaed_fn): Likewise.
9574 (get_first_fn): Likewise.
9575
9576 1999-04-05 Mark Mitchell <mark@codesourcery.com>
9577
9578 * decl.c (lookup_name_current_level): Tweak, and improve
9579 documentation.
9580
9581 * class.c (maybe_fixup_vptrs): Remove declaration.
9582 (build_class_init_list): Likewise.
9583 * decl.c (pushdecl_class_level): Call check_template_shadow here
9584 ...
9585 (push_class_level_binding): ... not here.
9586 * search.c (dfs_push_type_decls): Only avoid
9587 template-self-reference TYPE_DECLs if they are from base classes.
9588
9589 1999-04-04 Mark Mitchell <mark@codesourcery.com>
9590
9591 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
9592 nodes. Tidy.
9593
9594 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
9595
9596 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
9597 (finish_struct_1): Don't call build_class_init_list.
9598
9599 1999-04-02 Mark Mitchell <mark@codesourcery.com>
9600
9601 * tinfo.h (__class_type_info): Fix illegal declaration.
9602
9603 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
9604 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
9605 (IDENTIFIER_CLASS_VALUE): Improve documentation.
9606 (is_properly_derived_from): Declare.
9607 (invalidate_class_lookup_cache): Likewise.
9608 (maybe_maybe_note_name_used_in_class): Likewise.
9609 (note_name_declared_in_class): Likewise.
9610 (push_using_decl): Remove duplicate declaration.
9611 (id_in_current_class): Remove declaration.
9612 (push_class_binding): Change prototype.
9613 (clear_identitifer_class_values): Declare.
9614 * call.c (is_properly_derived_from): Make it global.
9615 (build_new_function_call): Be careful about updating candidates.
9616 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
9617 asked to make illegal calls.
9618 * class.c: Include splay-tree.h.
9619 (class_stack_node): Add names_used slot.
9620 (check_member_decl_is_same_in_complete_scope): Remove.
9621 (add_method): Fix comment. Push the declaration into class
9622 scope.
9623 (finish_struct_1): When popping the class, pop the bindings too.
9624 Remove check for data member/function member conflict.
9625 (finish_struct): Remove calls to
9626 check_member_decl_is_same_in_complete_scope. Change calls to
9627 popclass.
9628 (pushclass): Clear names_used in the class stack entry.
9629 Use invalidate_class_lookup_cache to remove cached entries, rather
9630 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
9631 before entering a new class. Remove dead code. Don't mess with
9632 current_function_decl when pushing declarations.
9633 (invalidate_class_lookup_cache): New function, split out from ...
9634 (popclass): Here. Clean up names_used on our way out.
9635 (instantiate_type): Adjust.
9636 (build_self_reference): Don't push the declaration here.
9637 (maybe_note_name_used_in_class): New function.
9638 (note_name_declared_in_class): Likewise.
9639 * decl.c (add_binding): Change prototype.
9640 (find_class_binding_level): New function.
9641 (innermost_nonclass_level): Likewise.
9642 (current_binding_level): Update documentation.
9643 (inner_binding_level): Remove. Replace with current_binding_level
9644 throughout.
9645 (push_binding_level): Remove special handling of
9646 class_binding_level.
9647 (pop_binding_level): Likewise. Use find_class_binding_level.
9648 (suspend_binding_level): Likewise.
9649 (global_bindings_p): Use innermost_nonclass_level.
9650 (toplevel_bindings_p): Likewise.
9651 (namespace_bindings_p): Likewise.
9652 (pseudo_global_level_p): Likewise.
9653 (push_binding): Clear INHERITED_VALUE_BINDING_P.
9654 (add_binding): Check for illegal multiple declarations. Return a
9655 value indicating whether or not the new binding was legal.
9656 (push_local_binding): Skip over class binding levels. Check
9657 return value from add_binding.
9658 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
9659 note_name_declared_in_class.
9660 (pushlevel_class): Remove "fake out the rest of the compiler"
9661 code.
9662 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9663 (clear_identifier_class_values): New function.
9664 (pop_from_top_level): Use it.
9665 (pop_everything): Tweak.
9666 (maybe_process_template_type_declaration): Don't push the
9667 declaration for the template here.
9668 (pushtag): Don't push tag declarations into class scope here.
9669 (pushdecl): Apply DeMorgan's law for readability.
9670 (pushdecl_class_level): Remove special-case code for
9671 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
9672 (push_class_level_bindng): Deal with inherited bindings.
9673 (lookup_name_real): Remove special-case code for
9674 TYPE_BEING_DEFINED, and some implicit typename magic.
9675 (grokdeclarator): Handle COMPONENT_REF for a template function.
9676 (build_enumerator): Don't call pushdecl_class_level here.
9677 (id_in_current_class): Remove.
9678 * decl2.c (grokfield): Don't call pushdecl_class_level or
9679 check_template_shadow.
9680 * errfn.c (cp_file_of): Don't declare.
9681 (cp_line_of): Likewise.
9682 * error.c (dump_decl): Handle an OVERLOAD.
9683 (cp_file_of): Likewise.
9684 (cp_line_of): Likewise.
9685 * init.c (build_member_call): Handle a COMPONENT_REF.
9686 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9687 pushdecl_class_level.
9688 * method.c (hack_identifier): Build COMPONENT_REFs for references
9689 to member templates as well as member functions. Remove dead
9690 code.
9691 * parse.y (left_curly): Remove.
9692 (nonnested_type): Call maybe_note_name_used_in_class, not
9693 pushdecl_class_level.
9694 * parse.c: Regenerated.
9695 (nested_name_specifier_1): Likewise.
9696 * pt.c (check_explicit_specialization): Adjust, for robustness.
9697 (check_template_shadow): Handle OVERLOADs.
9698 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9699 TEMPLATE_DECL, if appropriate.
9700 * search.c (envelope_add_decl): Remove.
9701 (dfs_pushdecls): Likewise.
9702 (dfs_compress_decls): Likewise.
9703 (dfs_push_decls): New function.
9704 (dfs_push_type_decls): Likewise.
9705 (setup_class_bindings): Likewise.
9706 (template_self_reference_p): Likewise.
9707 (lookup_field_r): Use it.
9708 (looup_member): Remove old comment. Deal with ambiguity.
9709 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9710 and remove envelope processing.
9711 * semantics.c (begin_class_definition): Let pushclass push
9712 declarations for base classes.
9713 (finish_member_declaration): Push declarations into class scope.
9714 * typeck.c (build_component_ref): Just put an OVERLOAD into the
9715 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9716 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
9717 * Makefile.in (class.o): Depend on splay-tree.h.
9718
9719 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
9720
9721 * cvt.c (convert_pointer_to_real): Use same_type_p.
9722 * typeck.c (comp_target_types): Use same_type_p.
9723
9724 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
9725
9726 * semantics.c (begin_inline_definitions,
9727 finish_inline_definitions): Rename from finish_default_args and
9728 begin_inline_definitions, respectively, to something that isn't a
9729 total lie. :)
9730 * parse.y (structsp): Adjust.
9731
9732 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9733 (list_hash_lookup): Likewise.
9734 (hash_tree_chain): Adjust.
9735 * pt.c (tsubst): Adjust.
9736 (tsubst_arg_types): Use plain hash_tree_cons.
9737 * cp-tree.h (hash_tree_cons_simple): Lose.
9738 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9739
9740 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9741
9742 * Makefile.in (hash.h): Generate using gperf language 'C', not
9743 'KR-C', so gperf uses the `const' keyword on strings.
9744
9745 * gxx.gperf (resword): Const-ify a char*.
9746
9747 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
9748
9749 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9750 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9751 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9752 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9753 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9754 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9755 tree.c: Adjust.
9756
9757 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
9758
9759 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9760
9761 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
9762
9763 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9764
9765 1999-03-27 Mark Mitchell <mark@codesourcery.com>
9766
9767 * cp-tree.h (add_friend): Declare.
9768 (add_friends): Likewise.
9769 * friend.c (add_friend): Make it global. Don't add to
9770 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9771 (add_friends): Make it global.
9772 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9773 befriending class is a template.
9774 * parse.y (component_decl_1): Fix typo in comment.
9775 * parse.c: Regenerated.
9776 * pt.c (instantiate_class_template): Use add_friend and
9777 add_friends rather that duplicating some of their functionality
9778 here.
9779
9780 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
9781
9782 * call.c (build_field_call): Unify 'this' and non-'this' cases.
9783
9784 * typeck.c (build_indirect_ref): Check for 'this' sooner.
9785
9786 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9787
9788 * call.c (op_error): Const-ify a char*.
9789 (add_candidate, source_type, add_warning): Add static prototype.
9790 (print_z_candidates): Const-ify a char*.
9791
9792 * class.c (resolve_address_of_overloaded_function,
9793 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9794 (get_vtable_name, finish_struct_1): Const-ify a char*.
9795
9796 * cvt.c (convert_to_reference): Likewise.
9797
9798 * decl.c (redeclaration_error_message, record_builtin_type,
9799 record_unknown_type, member_function_or_else, bad_specifiers):
9800 Likewise.
9801 (find_binding, select_decl, unqualified_namespace_lookup,
9802 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9803 Add static prototype.
9804 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9805 implicitly_declare, record_builtin_java_type, define_function,
9806 grok_op_properties, tag_name): Const-ify a char*.
9807
9808 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9809 (define_function, finish_builtin_type): Const-ify a char*.
9810 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9811 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9812 (file_name_nondirectory): Const-ify a char*.
9813 (init_filename_times): Don't prototype.
9814 (compiler_error): Prototype.
9815 (yyerror, init_repo): Const-ify a char*.
9816 (build_srcloc): Don't prototype.
9817 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9818 Const-ify a char*.
9819 (warn_for_assignment): Don't prototype.
9820 (convert_for_initialization, readonly_error, check_for_new_type,
9821 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9822 Const-ify a char*.
9823
9824 * decl2.c (acceptable_java_type, output_vtable_inherit,
9825 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9826 merge_functions, decl_namespace, validate_nonmember_using_decl,
9827 do_nonmember_using_decl): Add static prototype.
9828 (lang_f_options): Const-ify a char*.
9829 (finish_builtin_type): Likewise.
9830 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9831 prototype.
9832
9833 * errfn.c: Include cp-tree.h.
9834 (cp_thing): Add static prototype.
9835 (compiler_error): Don't protoptype.
9836 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9837 passing it to `cp_thing'.
9838
9839 * error.c (interesting_scope_p): Add static prototype.
9840
9841 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9842 a char*.
9843
9844 * init.c (compiler_error): Don't prototype.
9845 (member_init_ok_or_else): Const-ify a char*.
9846 (build_java_class_ref): Add static prototype.
9847
9848 * lex.c (compiler_error): Don't prototype.
9849 (get_time_identifier, interface_strcmp, extend_token_buffer,
9850 handle_cp_pragma): Const-ify a char*.
9851 (is_global, init_filename_times): Add static prototype.
9852 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9853 (compiler_error): Change from fixed args to variable args.
9854 (yyerror): Const-ify a char*.
9855
9856 * parse.y (cond_stmt_keyword): Const-ify a char*.
9857 (parse_decl): Add static prototype.
9858
9859 * pt.c (template_args_equal, print_template_context): Likewise.
9860 (print_candidates, check_default_tmpl_args): Const-ify a char*.
9861 (instantiate_class_template): Likewise.
9862
9863 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9864
9865 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9866 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9867
9868 * search.c (lookup_field_info, lookup_member): Likewise.
9869 (lookup_member): Cast the first argument of `bzero' to a PTR.
9870
9871 * sig.c (compiler_error): Don't prototype.
9872 (build_signature_pointer_or_reference_nam): Const-ify a char*.
9873 (get_sigtable_name, build_member_function_pointer): Likewise.
9874
9875 * tree.c (compiler_error): Don't prototype.
9876 (no_linkage_helper, build_srcloc): Add static prototype.
9877 (build_vbase_pointer_fields): Const-ify a char*.
9878 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9879
9880 * typeck.c (compiler_error): Don't prototype.
9881 (convert_for_assignment): Const-ify a char*.
9882 (comp_cv_target_types): Add static prototype.
9883 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9884 build_component_addr, build_unary_op, convert_for_initialization):
9885 Const-ify a char*.
9886
9887 * typeck2.c (ack): Add static prototype and change from fixed args
9888 to variable args.
9889 (readonly_error, check_for_new_type): Const-ify a char*.
9890
9891 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9892 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9893 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
9894 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9895 gen_assign, GNU_xref_member): Const-ify a char*.
9896
9897 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9898
9899 * gxxint.texi: Remove old discussion on copying virtual bases.
9900
9901 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
9902
9903 * Make-lang.in: Remove all references to g++.o/g++.c.
9904 Link g++ from gcc.o.
9905
9906 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9907
9908 * decl2.c (comdat_linkage): Treat vtables like functions.
9909
9910 1999-03-25 Mark Mitchell <mark@codesourcery.com>
9911
9912 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9913
9914 1999-03-25 Nathan Sidwell <nathan@acm.org>
9915
9916 * decl.c (init_decl_processing): Add `signed' type as a synonym
9917 for `int'.
9918
9919 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9920
9921 * typeck.c (common_type): Handle cv-qual unification for pointers
9922 to members.
9923
9924 * decl.c (unqualified_namespace_lookup): Return error_mark_node
9925 on error.
9926 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9927 * lex.c (do_identifier): If we got error_mark_node, call
9928 lookup_name again.
9929
9930 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9931
9932 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9933 classes.
9934
9935 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
9936
9937 * decl.c (lookup_name_real): Do nested field lookup regardless of
9938 TYPE_BEING_DEFINED.
9939
9940 1999-03-24 Mark Mitchell <mark@codesourcery.com>
9941
9942 * cp-tree.h (lang_type): Remove has_assignment and
9943 has_real_assignment. Add befriending_classes.
9944 (TYPE_HAS_ASSIGNMENT): Remove.
9945 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9946 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9947 (lang_decl): Document.
9948 (DECL_BEFRIENDING_CLASSES): New macro.
9949 (FRIEND_NAME): Move declaration to more obvious location.
9950 (FRIEND_DECLS): Likewise.
9951 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9952 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9953 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9954 (grok_op_properties): Likewise.
9955 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9956 (add_friend): Likewise. Don't do weird things with assignment
9957 operators. Update DECL_BEFRIENDING_CLASSES.
9958 (add_friends): Don't do weird things with assignment operators.
9959 (make_friend_class): Likewise. Update
9960 CLASSTYPE_BEFRIENDING_CLASSES.
9961 * pt.c (instantiate_class_template): Don't set
9962 TYPE_HAS_ASSIGNMENT.
9963 (tsubst_copy): Substitute the TREE_TYPE for more unary
9964 expressions.
9965 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9966 * search.c (protected_accessible_p): New function.
9967 (friend_accessible_p): Likewise.
9968 (accessible_p): Use them.
9969
9970 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9971
9972 * pt.c (convert_nontype_argument): Don't create things that aren't
9973 PTRMEM_CSTs when applying a qualification conversion to a
9974 PTRMEM_CST.
9975
9976 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9977
9978 * Makefile.in (OBJS): Don't mention hash.o.
9979 (OBJDEPS): Likewise.
9980
9981 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
9982
9983 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9984 * decl.c (expand_static_init): Make sure we don't add any after
9985 then.
9986
9987 * decl.c (cp_finish_decl): Move intelligence about handling
9988 DECL_COMDAT for variables from here...
9989 * decl2.c (comdat_linkage): ...to here.
9990 (maybe_make_one_only): Tweak.
9991 (import_export_decl): Call comdat_linkage for variables, too.
9992 (finish_file): Handle template statics properly.
9993
9994 1999-03-22 Mark Mitchell <mark@codesourcery.com>
9995
9996 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9997 Document internals of pointer-to-member-functions.
9998 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9999 (PFN_FROM_PTRMEMFUNC): Likewise.
10000 (build_type_conversion): Remove unused parameter.
10001 (build_ptrmemfunc1): Declare.
10002 (expand_ptrmemfunc_cst): New function.
10003 (delta2_from_ptrmemfunc): Likewise.
10004 (pfn_from_ptrmemfunc): Likewise.
10005 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10006 build_type_conversion. Use TYPE_PTRMEM_P for readability.
10007 (convert_to_reference): Remove unused parameter to
10008 build_type_conversion.
10009 (ocp_convert): Likewise.
10010 (build_user_type_conversion): Likewise.
10011 * error.c (dump_expr): Handle NULL pointer-to-member functions.
10012 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10013 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10014 open when handling pointer-to-member functions.
10015 * pt.c (convert_nontype_argument): Clean up error messages. Be
10016 more stringent with pointers-to-members.
10017 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
10018 (build_unary_op): Tidy ever-so-slightly.
10019 (build_conditional_expr): Remove extra parameter to
10020 build_type_conversion.
10021 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10022 we're using.
10023 (expand_ptrmemfunc_cst): Define.
10024 (delta2_from_ptrmemfunc): Likewise.
10025 (pfn_from_ptrmemfunc): Likewise.
10026
10027 1999-03-19 Mark Mitchell <mark@codesourcery.com>
10028
10029 * init.c (build_member_call): Handle template-id expressions
10030 correctly.
10031 * typeck.c (build_x_function_call): Likewise.
10032
10033 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
10034
10035 * friend.c (make_friend_class): Avoid core dump when
10036 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10037
10038 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
10039
10040 * decl.c (start_function): Suppress normal linkage heuristics
10041 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10042
10043 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
10044
10045 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10046 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10047
10048 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
10049
10050 * parse.y (named_complex_class_head_sans_basetype):
10051 Do not push a scope for error_mark_node.
10052 (maybe_base_class_list): Likewise.
10053
10054 * decl.c (start_decl): Check for error_mark_node as a type.
10055 Detected by g++.brendan/array-refs.C.
10056 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
10057 (maybe_build_cleanup_1): Likewise. Detected by
10058 g++.jason/incomplete1.C.
10059
10060 * tree.c (build_dummy_object): Use void_zero_node instead of the
10061 error_mark_node.
10062 (is_dummy_object): Check for such a node.
10063 Detected by g++.bob/inherit1.C
10064
10065 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
10066
10067 * method.c (old_backref_index): Split out...
10068 (flush_repeats): From here. Rename back from try_old_backref.
10069 (build_mangled_name): Put back some old-style repeat handling.
10070
10071 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10072
10073 * lex.c: Don't include setjmp.h.
10074 (parse_float): New static function.
10075 (pf_args): New struct.
10076 (real_yylex): Use them in call to `do_float_handler'.
10077
10078 1999-03-15 Mark Mitchell <mark@markmitchell.com>
10079
10080 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10081 * tree.c (layout_basetypes): Not here.
10082 * search.c (dfs_search): Remove; no longer used.
10083
10084 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10085
10086 * decl2.c (validate_nonmember_using_decl): Issue sensible
10087 error-messages on bogus qualifiers.
10088
10089 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
10090
10091 * call.c (add_function_candidate): Fix uninitialized variable.
10092
10093 * Makefile.in (search.o): Add dependency on varray.h.
10094
10095 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
10096
10097 * decl.c (duplicate_decls): Use same_type_p.
10098 * method.c (try_old_backref): Renamed from flush_repeats. Use
10099 same_type_p. Don't try to handle repeats. Return success.
10100 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
10101 calls from old-style code, too.
10102 (check_ktype): Use same_type_p.
10103 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
10104 (build_qualified_name): Simplify logic.
10105 (process_overload_item): Strip typedefs and quals at the top.
10106 (build_mangled_name_for_type_with_Gcode): Remove call to
10107 type_canonical_variant.
10108 (build_mangled_name): Likewise. Remove support for old-style
10109 repeats, which have been disabled since 2.7.2. Don't mess with
10110 TREE_USED.
10111 (build_decl_overload_real): Don't mess with TREE_USED.
10112
10113 1999-03-13 Nathan Sidwell <nathan@acm.org>
10114
10115 * error.c (cp_printers): Add 'F' escape character.
10116 (dump_type_real): Remove TREE_LIST (fnargs) printing.
10117 Functionality moved to dump_parameters.
10118 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10119 (dump_function_decl): Extend meaning of V parameter. Use
10120 dump_parameters and dump_exception_spec.
10121 (dump_parameters): New static function.
10122 (dump_exception_spec): New static function.
10123 (fndecl_as_string): Change argument semantics. Use
10124 dump_function_decl directly.
10125
10126 * sig.c (build_signature_table_constructor): Use cp_error.
10127
10128 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
10129
10130 * semantics.c (finish_switch_cond): Handle error cases gracefully.
10131 Detected by g++.law/enum5.C.
10132
10133 * typeck.c (build_modify_expr): Check for errors after resolving
10134 offsets. Detected by g++.brendan/static1.C.
10135
10136 * decl.c (complete_array_type): Ignore initial_value if it is an
10137 error. Detected by g++.benjamin/17930.C.
10138
10139 * typeck2.c (process_init_constructor): Return error if one argument
10140 is in error. Detected by g++.benjamin/13478.C.
10141
10142 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10143
10144 * decl.c (select_decl): Allow class templates when we need types.
10145 * decl2.c (ambiguous_decl): Likewise.
10146
10147 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10148
10149 * lex.c (do_identifier): Correct call to enforce_access.
10150 * search.c (accessible_p): Tweak comment.
10151
10152 1999-03-10 Mark Mitchell <mark@markmitchell.com>
10153
10154 * semantics.c (begin_class_definition): Call build_self_reference.
10155 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10156
10157 * search.c (assert_canonical_unmarked): Fix typo in prototype.
10158
10159 * search.c (dfs_canonical_queue): New function.
10160 (dfs_assert_unmarked_p): Likewise.
10161 (assert_canonical_unmarked): Likewise.
10162 (access_in_type): Use it.
10163 (accessible_p): Likewise. Walk the whole tree when umarking.
10164
10165 * sig.c (build_signature_table_constructor): Use accessible_p
10166 instead of compute_access.
10167
10168 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10169
10170 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10171
10172 1999-03-09 Mark Mitchell <mark@markmitchell.com>
10173
10174 * cp-tree.h (flag_access_control): Declare.
10175 (TREE_VIA_PPUBLIC): Document.
10176 (DECL_NONSTATIC_MEMBER_P): New macro.
10177 (enforce_access): Return an indication of whether or not access
10178 was permitted.
10179 (build_self_reference): Change prototype.
10180 (compute_access): Replace with ...
10181 (accessible_p): New function.
10182 (dfs_walk): Change prototype.
10183 (dfs_unmark): Likewise.
10184 (markedp): Likewise.
10185 * call.c (enforce_access): Use accessible_p.
10186 * class.c (build_self_reference): Insert the declaration into the
10187 list of members for this type, and make it public.
10188 * decl.c (xref_basetypes): Avoid ill-timed recursion.
10189 * init.c (build_offset_ref): Use lookup_member, not three separate
10190 name-lookups. Call enforce_access rather than checking for
10191 illegal accesses here.
10192 (resolve_offset_ref): Likewise.
10193 * lex.c (do_identifier): Likewise.
10194 * method.c (hack_identifier): Likewise.
10195 * parse.y (self_reference): Remove.
10196 (opt_component_decl_list): Don't use it.
10197 * parse.c: Regenerated.
10198 * pt.c (print_candidates): Generalize to handle lists of
10199 overloaded functions.
10200 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10201 not set.
10202 (get_template_base): Use new calling convention for dfs_walk.
10203 * search.c: Include varray.h. Add prototypes.
10204 (dfs_walk): Accept a data pointer to pass to the work functions.
10205 All callers changed. All work functions changed.
10206 (breadth_first_search): Rename to bfs_walk, and make consistent
10207 with dfs_walk.
10208 (dfs_walk_real): New function.
10209 (canonical_binfo): New function.
10210 (context_for_name_lookup): Likewise.
10211 (shared_marked_p): Likewise.
10212 (shared_unmarked_p): Likewise.
10213 (lokup_field_queue_p): Likewise.
10214 (lookup_field_r): Generalize to handle both functions and fields.
10215 (lookup_field): Just call lookup_member.
10216 (lookup_fnfields): Likewise.
10217 (lookup_member): Move body of lookup_field here and generalize.
10218 (dfs_accessible_queue_p): Likewise.
10219 (dfs_accessible_p): Likewise.
10220 (dfs_access_in_type): Likewise.
10221 (access_in_type): Likewise.
10222 (compute_access): Remove, and replace with ...
10223 (accessible_p): New function.
10224 (vbase_types): Remove.
10225 (vbase_decl_ptr_intermediate): Likewise.
10226 (vbase_decl_ptr): Likewise.
10227 (vbase_init_result): Likewise.
10228 (closed_envelopes): Likewise.
10229 (bvtable): Likewise.
10230
10231 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10232
10233 * call.c (add_function_candidate): Check for proper number of args
10234 before checking the validity of those args.
10235
10236 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
10237
10238 * cp-tree.h (struct lang_type): Add anon_union field.
10239 (ANON_UNION_TYPE_P): Use it instead of examining type.
10240 (SET_ANON_UNION_TYPE_P): New macro.
10241 * decl.c (check_tag_decl): Use it.
10242
10243 * search.c (compute_access): Handle non-type contexts earlier, and
10244 handle NULL_TREE.
10245
10246 * tree.c (build_exception_variant): Use copy_to_permanent.
10247
10248 * decl2.c (setup_initp): Give statics with no priority the default
10249 priority here.
10250 (do_dtors, do_ctors, finish_file): Remove special handling of
10251 non-prioritized statics.
10252
10253 1999-03-05 Mark Mitchell <mark@markmitchell.com>
10254
10255 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10256 * decl.c (make_typename_type): Don't issue an error if an
10257 immediate lookup fails; it migt be resolved later.
10258 * friend.c (is_friend): Add comment.
10259 * search.c (breadth_first_search): Add POSTFN and DATA
10260 parameters. Tidy. All callers changed.
10261 (lookup_field_queue_p): New function.
10262 (lookup_field_r): Likewise.
10263 (lookup_field_post): Likewise.
10264 (lookup_field): Use them, via breadth_first_search, instead of
10265 duplicating logic.
10266 (compute_access): Robustify.
10267 (lookup_fnfield_info): New structure.
10268
10269 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
10270
10271 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10272
10273 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
10274
10275 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10276 cc happy.
10277
10278 * decl2.c (import_export_class): Also return if
10279 CLASSTYPE_INTERFACE_ONLY is set.
10280
10281 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
10282
10283 * decl.c (push_overloaded_decl): Only overwrite the old binding if
10284 there was one.
10285 * decl2.c (do_local_using_decl): Fix loop termination.
10286
10287 1999-03-02 Mark Mitchell <mark@markmitchell.com>
10288
10289 * cp-tree.h (determine_specialization): Don't declare.
10290 * pt.c (determine_specialization): Make it static. Eliminate
10291 complain parameter. Note that decl is always non-NULL now, and
10292 simplify accordingly.
10293
10294 * decl.c (maybe_push_to_top_level): Always call
10295 push_cp_function_context.
10296 (pop_from_top_level): Always call pop_cp_function_context.
10297
10298 1999-02-26 Nathan Sidwell <nathan@acm.org>
10299
10300 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10301 diagnostics.
10302 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10303 * init.c (build_new_1): Extra arg to complete_type_or_else.
10304 (build_delete): Likewise.
10305 * typeck.c (require_complete_type): Likewise.
10306 (pointer_int_sum): Likewise.
10307 (pointer_diff): Likewise.
10308 (build_component_ref): Likewise.
10309
10310 * typeck2.c (incomplete_type_error): Always use cp_error.
10311 Show declaration of undefined type, if appropriate.
10312 Deal with UNKNOWN_TYPE nodes.
10313
10314 * typeck.c (require_complete_type): Use TYPE_SIZE as
10315 size_zero_node to mean incomplete type.
10316 (require_complete_type_in_void): New function.
10317 (build_compound_expr): Call complete_type_in_void for LHS.
10318 (build_c_cast): Call complete_type_in_void for void cast.
10319 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10320 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10321 require_complete_type_in_void. Call it.
10322 * cp-tree.h (require_complete_type_in_void): Prototype new function.
10323
10324 * typeck.c (convert_arguments): Use alternative format for
10325 function decls. Don't require_complete_type here. Simplify
10326 diagnostic printing.
10327 (convert_for_initialization): Don't require_complete_type on RHS yet.
10328 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10329
10330 * call.c (build_over_call): Cope with qualified void return type.
10331 * semantics.c (finish_call_expr): Likewise.
10332 * typeck.c (build_function_call_real): Likewise.
10333 (c_expand_return): Likewise.
10334 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10335
10336 * call.c (print_z_candidates): Use alternate print format, to be
10337 consistent with (pt.c) print_candidates.
10338 * method.c (hack_identifier): List candidate members.
10339 * search.c (lookup_field): Build ambiguous list, and show it, if
10340 ambiguous.
10341
10342 1999-02-26 Mark Mitchell <mark@markmitchell.com>
10343
10344 * typeck.c (decay_conversion): Don't confuse constant array
10345 variables with their initializers.
10346
10347 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10348 merging decls.
10349 * pt.c (regenerate_decl_from_template): Tweak for clarity.
10350 (instantiate_decl): Mark a decl instantiated before regenerating
10351 it to avoid recursion.
10352 * tree.c (mapcar): Don't call decl_constant_value unless we know
10353 something is TREE_READONLY_DECL_P.
10354
10355 * class.c (check_for_override): Don't stop checking when we find
10356 the first overridden function. Delete #if 0'd code.
10357 * search.c (get_matching_virtual): Likewise.
10358
10359 1999-02-25 Richard Henderson <rth@cygnus.com>
10360
10361 * lang-specs.h: Define __FAST_MATH__ when appropriate.
10362
10363 1999-02-24 Mike Stump <mrs@wrs.com>
10364
10365 * typeck.c (convert_for_assignment): Allow boolean integral constant
10366 expressions to convert to null pointer.
10367
10368 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
10369
10370 * decl.c (lookup_namespace_name): Resolve namespace aliases.
10371
10372 * class.c (push_nested_class): Allow namespaces.
10373
10374 * decl2.c (set_decl_namespace): Add friendp parameter.
10375 * decl.c (grokfndecl): Pass it.
10376 (grokvardecl): Likewise.
10377 * cp-tree.h: Change declaration.
10378
10379 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
10380
10381 * pt.c (tsubst): Allow an array of explicit size zero.
10382
10383 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
10384
10385 * errfn.c: Change varargs code to look like toplev.c.
10386
10387 * method.c (process_modifiers): Don't prepend 'U' for char or
10388 wchar_t.
10389
10390 1999-02-20 Craig Burley <craig@jcb-sc.com>
10391
10392 * Make-lang.in (cplib2.ready): Don't consider updating
10393 cplib2 stuff if the current directory isn't writable, as
10394 it won't work (such as during a `make install').
10395
10396 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
10397
10398 * decl2.c (start_objects): Make file scope constructors and
10399 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10400 ASM_OUTPUT_DESTRUCTOR are defined.
10401
10402 1999-02-19 Mark Mitchell <mark@markmitchell.com>
10403
10404 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10405 (fn_type_unification): Adjust prototype.
10406 (lookup_fnfields_1): Declare.
10407 * call.c (add_template_candidate_real): Adjust call to
10408 fn_type_unification.
10409 * class.c (add_method): Don't allow duplicate declarations of
10410 constructors or destructors.
10411 (resolve_address_of_overloaded_function): Remove unused variable.
10412 Adjust call to fn_type_unification.
10413 * decl.c (grokfndecl): Be more robust in the face of illegal
10414 specializations.
10415 * decl2.c (check_classfn): Remove hokey handling of member
10416 templates.
10417 * pt.c (determine_specialization): Improve comments. Adjust to
10418 handle template argument deduction as per the standard.
10419 (check_explicit_specialization): Fix comment spacing. Handle
10420 type-conversion operators correctly. Improve error-recovery.
10421 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10422 (get_bindings_real): Simplify handling of static members.
10423 * search.c (lookup_fnfields_1): Make it have external linkage.
10424 * typeck.c (compparms): Fix comment.
10425 (build_unary_op): Don't try to figure out which template
10426 specialization is being referred to when when the address-of
10427 operator is used with a template function.
10428
10429 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10430
10431 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10432 keyword to match an analogous change at the top level.
10433
10434 * tree.c (lvalue_or_else): Likewise.
10435
10436 1999-02-17 Mark Mitchell <mark@markmitchell.com>
10437
10438 * decl.c (xref_basetypes): Comment.
10439 * pt.c (instantiate_class_template): Use xref_basetypes.
10440
10441 1999-02-16 Mark Mitchell <mark@markmitchell.com>
10442
10443 * cp-tree.h (tsubst): Change prototype.
10444 (tsubst_expr): Likewise.
10445 (tsubst_copy): Likewise.
10446 (type_unification): Remove prototype.
10447 * call.c (convert_default_arg): Adjust call to tsubst_expr.
10448 * class.c (resolve_address_of_overloaded_function): Just use
10449 fn_type_unification.
10450 * decl.c (grokdeclarator): Adjust call to tsubst.
10451 * method.c (build_template_parm_names): Likewise.
10452 * pt.c (GTB_VIA_VIRTUAL): New macro.
10453 (GTB_IGNORE_TYPE): Likewise.
10454 (resolve_overloaded_unification): Add `complain' parameter.
10455 (try_one_overload): Likewise.
10456 (tsubst_template_arg_vector): Likewise.
10457 (tsubst_template_parms): Likewise.
10458 (tsubst_aggr_type): Likewise.
10459 (tsubst_arg_types): Likewise.
10460 (tsubst_call_declarator_parms): Likewise.
10461 (unify): Remove explicit_mask.
10462 (type_unification_real): Likewise.
10463 (get_template_base_recursive): Likewise.
10464 (coerce_template_template_parms): Provide prototype.
10465 (tsubst_function_type): Likewise.
10466 (try_class_unification): New function.
10467 All callers changed to use new complain parameter.
10468 (get_template_base): Use try_class_unification.
10469 (unify): Adjust handling of classes derived from template types.
10470 (fn_type_unification): Substitute explicit arguments before
10471 unification.
10472
10473 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10474
10475 * decl.c (pushdecl): Remove dead code.
10476
10477 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
10478
10479 * decl2.c (finish_objects): Fix code I missed in previous change.
10480
10481 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
10482
10483 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10484 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10485
10486 * pt.c (maybe_process_partial_specialization): Complain about
10487 'template <>' on non-specialization.
10488
10489 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
10490
10491 * decl.c (grokdeclarator): Catch wierd declarators.
10492 * decl2.c (finish_file): Don't abort because of namespace parsing
10493 failure.
10494 (check_decl_namespace): Remove.
10495
10496 1999-02-09 Mark Mitchell <mark@markmitchell.com>
10497
10498 * cp-tree.h (get_template_base): Don't declare.
10499 (dfs_walk): Declare.
10500 (dfs_unmark): Likewise.
10501 (markedp): Likewise.
10502 * pt.c (unify): Remove duplicate declaration. Pass tparms and
10503 targs to get_template_base.
10504 (get_template_base_recursive): Move here from search.c. Check to
10505 see that the base found can be instantiated to form the desired
10506 type.
10507 (get_template_base): Likewise.
10508 (get_class_bindings): Simplify.
10509 * search.c (get_template_base_recursive): Move to pt.c.
10510 (get_template_base): Likewise.
10511 (markedp): Make it global.
10512 (dfs_walk): Likewise.
10513 (dfs_unmark): Likewise.
10514
10515 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
10516
10517 * pt.c (maybe_process_partial_specialization): Complain about
10518 specialization in wrong namespace.
10519 * tree.c (decl_namespace_context): New fn.
10520
10521 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10522
10523 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10524 * pt.c (coerce_template_template_parms): Handle nested
10525 template template parameters.
10526
10527 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
10528
10529 * typeck2.c: Update email addresses.
10530
10531 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10532
10533 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10534 turned off.
10535
10536 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
10537
10538 * lex.c (retrofit_lang_decl): Split out...
10539 (build_lang_decl): From here.
10540 * decl.c (pushdecl): Call it for functions generated by the middle
10541 end that don't have DECL_LANG_SPECIFIC.
10542 * cp-tree.h: Declare it.
10543
10544 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
10545 (start_objects, finish_objects): Only use special
10546 init_priority code if the user specified a priority.
10547 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10548 objects.
10549
10550 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
10551
10552 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10553 mkstemp.o. Get them from libiberty now.
10554 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10555
10556 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10557
10558 * decl2.c (lang_decode_option): Use read_integral_parameter.
10559
10560 1999-02-01 Mark Mitchell <mark@markmitchell.com>
10561
10562 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10563 before calling complete_type_or_else.
10564
10565 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10566
10567 * input.c (inline): Don't define, its handled by system.h.
10568
10569 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
10570
10571 * decl2.c: Don't define flag_no_ident here. Don't process
10572 -f(no-)ident here.
10573 * cp-tree.h: Don't declare flag_no_ident here.
10574 * lang-specs.h: Map -Qn to -fno-ident.
10575
10576 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
10577
10578 * cp-tree.h (struct tree_binding): Replace scope field with a union.
10579 (BINDING_SCOPE): Adjust.
10580 * decl.c (BINDING_LEVEL): Adjust.
10581
10582 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
10583
10584 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
10585 member constants.
10586
10587 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
10588 a ctor initializer.
10589
10590 * tree.c (equal_functions): Fix name in prototype.
10591
10592 * decl.c (push_local_binding): Add FLAGS argument.
10593 (pushdecl, push_overloaded_decl): Pass it.
10594 * decl2.c (do_local_using_decl): Likewise.
10595 * cp-tree.h: Adjust prototype.
10596 * decl.c (poplevel): Fix logic.
10597
10598 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
10599 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
10600 (cat_namespace_levels): Don't loop forever.
10601
10602 1999-01-25 Richard Henderson <rth@cygnus.com>
10603
10604 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
10605
10606 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
10607
10608 * class.c (resolve_address_of_overloaded_function): Mark the
10609 chosen function used.
10610
10611 * call.c (build_call): Make sure that a function coming in has
10612 been marked used already.
10613 * decl.c (expand_static_init): Call mark_used instead of
10614 assemble_external.
10615 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
10616 alloc_eh_object, expand_throw): Likewise.
10617 * init.c (build_builtin_delete_call): Likewise.
10618 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
10619 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10620 expand_generic_desc): Likewise.
10621
10622 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10623
10624 * tree.c (equal_functions): New function.
10625 (ovl_member): Call it.
10626
10627 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10628
10629 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
10630
10631 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
10632
10633 * decl.c (decls_match): Return 1 if old and new are identical.
10634 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
10635
10636 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10637
10638 * decl.c (start_function): Make member functions one_only on windows.
10639 * decl2.c (import_export_decl): Likewise.
10640
10641 * decl.c (grokdeclarator): Don't complain about implicit int in
10642 a system header. Change same-name field check to not complain in
10643 a system header instead of within extern "C".
10644
10645 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10646
10647 * cp-tree.h (PUSH_GLOBAL): New macro.
10648 (PUSH_LOCAL): Likewise.
10649 (PUSH_USING): Likewise.
10650 (namespace_bindings_p): Declare.
10651 (push_overloaded_decl): Likewise.
10652 * decl.c (push_overloaded_decl): Don't make it static. Check for
10653 illegal declarations after using declarations here.
10654 (namespace_bindings_p): Likewise.
10655 (duplicate_decls): Don't consider declarations from different
10656 namespaces to be the same.
10657 (pushdecl): Use symbolic PUSH_ constants in calls to
10658 push_overloaded_decl.
10659 (push_overloaded_decl_1): Likewise.
10660 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10661 (do_nonmember_using_decl): Check for illegal using declarations
10662 after ordinary declarations here.
10663 (do_local_using_decl): Call pushdecl to insert declarations.
10664
10665 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
10666
10667 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10668
10669 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10670
10671 * tree.c (build_cplus_array_type_1): Don't call build_array_type
10672 for types involving template parameters.
10673
10674 * cp-tree.h (PARM_DECL_EXPR): Delete.
10675 (convert_default_arg): Change prototype.
10676 (check_default_argument): Declare.
10677 (search_tree): Likewise.
10678 * call.c (convert_default_arg): Take the function to which the
10679 default argument belongs as a parameter, and do any necessary
10680 instantiation here, instead of ...
10681 (build_over_call): Here.
10682 * decl.c (local_variable_p): New function.
10683 (check_default_argument): Likewise, split out and tidied from ...
10684 (grokparms): Here.
10685 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10686 * pt.c (tsubst_call_declarator_parms): New function.
10687 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
10688 with CALL_EXPRs, rather than trying to be clever.
10689 (tsubst): Use tsubst_call_declarator_parms.
10690 * tree.c (search_tree): Don't make it static.
10691 * typeck.c (convert_arguments): Use new interface to
10692 convert_default_arg.
10693
10694 1999-01-20 Mark Mitchell <mark@markmitchell.com>
10695
10696 * error.c (dump_function_decl): Don't print the argument types for
10697 a function when the verbosity level is negative.
10698
10699 * call.c (build_over_call): Check format attributes at call-time.
10700
10701 * pt.c (tsubst_copy): Fix comment.
10702 (unify): Don't allow unification with variable-sized arrays.
10703
10704 * semantics.c (finish_stmt_expr): When processing a template make
10705 the BIND_EXPR long-lived.
10706
10707 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
10708
10709 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10710 (import_export_vtable): Not here.
10711
10712 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10713
10714 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10715 non-static member function.
10716
10717 1999-01-18 Nathan Sidwell <nathan@acm.org>
10718
10719 * class.c (instantiate_type): Only diagnose illegal address of member
10720 function if complaining.
10721
10722 * decl.c (lookup_name_real): Remove duplicate code.
10723
10724 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10725
10726 * tree.c (copy_template_template_parm): Use permanent_obstack.
10727
10728 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10729
10730 * pt.c (unify): Remove restrictions on deduction of argument
10731 of template template parameters.
10732
10733 1999-01-18 Nathan Sidwell <nathan@acm.org>
10734
10735 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10736
10737 * class.c (resolve_address_of_overloaded_function): Show list of
10738 all candidates, when none of them match.
10739
10740 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
10741
10742 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10743 definition of 'casting away const' in reinterpret_cast<>.
10744
10745 1999-01-18 Graham <grahams@rcp.co.uk>
10746
10747 * cvt.c: Add include for decl.h, remove extern for
10748 static_aggregates which is now provided by decl.h.
10749
10750 * Makefile.in (cvt.o): Add dependency for decl.h and missing
10751 dependencies for convert.h and flags.h.
10752
10753 1999-01-18 Nathan Sidwell <nathan@acm.org>
10754
10755 * decl2.c (do_dtors): Set current location to that of the
10756 decl, for sensible diagnostics and debugging.
10757 (check_classfn): Issue `incomplete type' error, if
10758 class is not defined.
10759
10760 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10761
10762 * cp-tree.h: Add prototype for bound_pmf_p.
10763
10764 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10765 Manfred Hollstein <manfred@s-direktnet.de>
10766
10767 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10768 -Wreturn-type.
10769
10770 1999-01-16 Nathan Sidwell <nathan@acm.org>
10771
10772 * cp-tree.h (struct lang_type): Added has_mutable flag.
10773 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10774 (TYPE_HAS_MUTABLE_P): New macro to read it.
10775 (cp_has_mutable_p): Prototype for new function.
10776 * class.c (finish_struct_1): Set has_mutable from members.
10777 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10778 it contains a mutable.
10779 * typeck.c (cp_has_mutable_p): New function.
10780
10781 1999-01-15 Mark Mitchell <mark@markmitchell.com>
10782
10783 * pt.c (process_template_parm): Ignore top-level qualifiers on
10784 non-type parameters.
10785
10786 * decl.c (start_function): Use current_function_parms in the call
10787 to require_complete_type_for_parms, not the probably empty
10788 DECL_ARGUMENTS.
10789
10790 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
10791
10792 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10793
10794 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10795 that we don't suppress the other copies.
10796 * lex.c (handle_cp_pragma): Likewise.
10797
10798 1999-01-13 Mark Mitchell <mark@markmitchell.com>
10799
10800 * decl.c (grokdeclarator): Undo 1998-12-14 change.
10801 * tree.c (build_cplus_array_type_1): Likewise.
10802 * pt.c (instantiate_class_template): Remove misleading comment.
10803 (tsubst_aggr_type): Substitute if there are template parameters,
10804 regardless of whether or not they use template arguments.
10805 (unify): Likewise, but for unification.
10806
10807 1999-01-12 Richard Henderson <rth@cygnus.com>
10808
10809 * cp-tree.h (flag_permissive): Declare extern.
10810
10811 1999-01-06 Mark Mitchell <mark@markmitchell.com>
10812
10813 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10814 here.
10815 (lang_type): Add is_partial_instantiation. Decrease width of
10816 dummy.
10817 (PARTIAL_INSTANTIATION_P): New macro.
10818 (OPERATOR_TYPENAME_P): Remove.
10819 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10820 OPERATOR_TYPENAME_P.
10821 (grok_op_properties): Likewise.
10822 * friend.c (do_friend): Handle friends that are member functions
10823 correctly.
10824 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10825 * pt.c (instantiate_class_template): Rework for clarity. Avoid
10826 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
10827 any more partial instantiation than is absolutely necessary for
10828 implicit typename. Set PARTIAL_INSTANTIATION_P.
10829 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10830 * semantics.c (begin_class_definition): Handle partial
10831 specializations of a type that was previously partially
10832 instantiated.
10833
10834 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
10835
10836 * g++spec.c (LIBSTDCXX): Provide default definition.
10837 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10838
10839 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10840
10841 * Make-lang.in (g++.o): Depend on prefix.h.
10842
10843 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
10844
10845 * tree.c (bound_pmf_p): New fn.
10846 * typeck.c (build_c_cast): Use it.
10847
10848 * decl.c (grok_op_properties): Use same_type_p.
10849
10850 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10851
10852 * Makefile.in (cvt.o): Depend on toplev.h.
10853
10854 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10855
10856 * cvt.c: Include toplev.h.
10857
10858 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10859 definitions.
10860
10861 * init.c (expand_vec_init): Initialize variable `itype'.
10862
10863 * lex.c (yyerror): Cast the argument passed to a ctype function to
10864 an unsigned char.
10865
10866 * method.c (build_mangled_C9x_name): Wrap prototype and definition
10867 in "HOST_BITS_PER_WIDE_INT >= 64".
10868
10869 * typeck.c (build_binary_op): Mark parameter `convert_p' with
10870 ATTRIBUTE_UNUSED.
10871
10872 1998-12-22 Mark Mitchell <mark@markmitchell.com>
10873
10874 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10875 * tree.c (build_exception_variant): Don't crash on empty throw
10876 specs.
10877
10878 1998-12-18 DJ Delorie <dj@cygnus.com>
10879
10880 * cvt.c (convert_to_reference): Check for both error_mark_node
10881 and NULL_NODE after call to convert_for_initialization.
10882
10883 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
10884
10885 * error.c (interesting_scope_p): New fn.
10886 (dump_simple_decl): Use it.
10887 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10888 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10889
10890 1998-12-16 Mark Mitchell <mark@markmitchell.com>
10891
10892 * class.c (resolve_address_of_overloaded_function): Do conversion
10893 to correct type here, rather than ...
10894 (instantiate_type): Here.
10895
10896 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10897 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10898 (decl_template_parm_p): Remove.
10899 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10900 parameter.
10901 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10902 * pt.c (push_inline_template_parms_recursive): Set it.
10903 (decl_template_parm_p): Remove.
10904 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10905 (process_template_parm): Set it.
10906
10907 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
10908
10909 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10910 if configured with cpplib.
10911
10912 1998-12-15 Mark Mitchell <mark@markmitchell.com>
10913
10914 * decl.c (poplevel): Make sure ns_binding is initialized.
10915
10916 * decl.c (finish_function): Undo inadvertent change in previous
10917 patch.
10918
10919 1998-12-14 Mark Mitchell <mark@markmitchell.com>
10920
10921 * class.c (pushclass): Tweak handling of class-level bindings.
10922 (resolve_address_of_overloaded_function): Update pointer-to-member
10923 handling.
10924 (instantiate_type): Likewise.
10925 * cvt.c (cp_convert_to_pointer): Likewise.
10926 * decl.c (pop_binding): Take the DECL to pop, not just the name.
10927 Deal with `struct stat' hack.
10928 (binding_level): Add to documentation.
10929 (push_binding): Clear BINDING_TYPE.
10930 (add_binding): New function.
10931 (push_local_binding): Use it.
10932 (push_class_binding): Likewise.
10933 (poplevel): Adjust calls to pop_binding.
10934 (poplevel_class): Likewise.
10935 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10936 declarations to current binding level.
10937 (push_class_level_binding): Likewise.
10938 (push_overloaded_decl): Adjust handling of OVERLOADs in local
10939 bindings.
10940 (lookup_namespace_name): Don't crash when confronted with a
10941 TEMPLATE_DECL.
10942 (lookup_name_real): Do `struct stat' hack in local binding
10943 contexts.
10944 (build_ptrmemfunc_type): Adjust documentation.
10945 (grokdeclarator): Don't avoid building real array types when
10946 processing templates unless really necessary.
10947 (finish_method): Adjust calls to pop_binding.
10948 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10949 not reparse_decl_as_expr.
10950 (build_expr_from_tree): Deal with a template-id as the function to
10951 call in a METHOD_CALL_EXPR.
10952 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10953 (maybe_adjust_types_For_deduction): Don't do peculiar things with
10954 METHOD_TYPEs here.
10955 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
10956 pointer-to-member types where necessary.
10957 * tree.c (build_cplus_array_type_1): Don't avoid building real
10958 array types when processing templates unless really necessary.
10959 (build_exception_variant): Compare the exception lists correctly.
10960
10961 1998-12-13 Mark Mitchell <mark@markmitchell.com>
10962
10963 * cp-tree.def (CPLUS_BINDING): Update documentation.
10964 * cp-tree.h (LOCAL_BINDING_P): New macro.
10965 (lang_identifier): Rename local_value to bindings.
10966 (tree_binding): Make `scope' of type `void*', not `tree'.
10967 (BINDING_SCOPE): Update documentation.
10968 (IDENTIFIER_LOCAL_VALUE): Remove.
10969 (IDENTIFIER_CLASS_VALUE): Document.
10970 (IDENTIFIER_BINDING): New macro.
10971 (IDENTIFIER_VALUE): Likewise.
10972 (TIME_IDENTIFIER_TIME): Likewise.
10973 (TIME_IDENTIFIER_FILEINFO): Likewise.
10974 (IMPLICIT_TYPENAME_P): Likewise.
10975 (set_identifier_local_value): Remove.
10976 (push_local_binding): New function.
10977 (push_class_binding): Likewise.
10978 * class.c (pushclass): Update comments; use push_class_binding.
10979 * decl.c (set_identifier_local_value_with_scope): Remove.
10980 (set_identifier_local_value): Likewise.
10981 (push_binding): New function.
10982 (pop_binding): Likewise.
10983 (binding_level): Update documentation. Remove shadowed.
10984 (BINDING_LEVEL): New macro.
10985 (free_binding_nodes): New variable.
10986 (poplevel): Adjust for new name-lookup scheme. Don't mess up
10987 BLOCK_VARs when doing for-scope extension. Remove effectively
10988 dead code.
10989 (pushlevel_class): Tweak formatting.
10990 (poplevel_class): Adjust for new name-lookup scheme.
10991 (print_binding_level): Likewise.
10992 (store_bindings): Likewise.
10993 (pushdecl): Likewise.
10994 (pushdecl_class_level): Likewise.
10995 (push_class_level_binding): Likewise.
10996 (push_overloaded_decl): Update comments. Adjust for new
10997 name-lookup scheme.
10998 (lookup_name_real): Likewise.
10999 (lookup_name_current_level): Likewise.
11000 (cp_finish_decl): Likewise.
11001 (require_complete_types_for_parms): Likewise. Remove misleading
11002 #if 0'd code.
11003 (grok_parms): Likewise. Don't call
11004 require_complete_types_for_parms here.
11005 (grok_ctor_properties): Don't treat templates as copy
11006 constructors.
11007 (grop_op_properties): Or as assignment operators.
11008 (start_function): Document. Adjust for new name-lookup scheme.
11009 (finish_function): Likewise.
11010 * decl2.c (do_local_using_decl): Use push_local_binding.
11011 * lex.c (begin_definition_of_inclass_inline): New function, split
11012 out from ...
11013 (do_pending_inlines): Here, and ...
11014 (process_next_inline): Here.
11015 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11016 (init_filename_times): Likewise.
11017 (extract_interface_info): Likewise.
11018 (ste_typedecl_interface_info): Likewise.
11019 (check_newline): Likewise.
11020 (dump_time_statistics): Likewise.
11021 (handle_cp_pragma): Likewise.
11022 (do_identifier): Adjust for new name-lookup scheme.
11023 * parse.y (function_try_block): Return ctor_initializer_opt value.
11024 (fndef): Use it.
11025 (fn.defpen): Pass appropriate values to start_function.
11026 (pending_inline): Use functor_try_block value, and pass
11027 appropriate values to finish_function.
11028 * pt.c (is_member_template): Update documentation; remove handling
11029 of FUNCTION_DECLs. As per name, this function should deal only in
11030 TEMPLATE_DECLs.
11031 (decl_template_parm_p): Change name of olddecl parameter to decl.
11032 (check_template_shadow): Adjust for new name-lookup scheme.
11033 (lookup_template_class): Likewise.
11034 (tsubst_decl): Tweak so as not to confuse member templates with
11035 copy constructors and assignment operators.
11036 (unify): Handle UNION_TYPEs.
11037 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11038 (lang_print_xnode): Adjust for new name-lookup scheme.
11039 * typeck.c (mark_addressable): Likewise.
11040 (c_expand_return): Likewise.
11041
11042 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
11043
11044 * decl.c (grokdeclarator): Allow field with same name as class
11045 in extern "C".
11046
11047 * decl.c (lookup_name_real): Don't limit field lookup to types.
11048 * class.c (check_member_decl_is_same_in_complete_scope): No error
11049 if icv and x are the same.
11050 * lex.c (do_identifier): Tweak error message.
11051
11052 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11053
11054 * decl.c (start_enum): Use push_obstacks, not
11055 end_temporary_allocation.
11056 (finish_enum): Call pop_obstacks.
11057
11058 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11059
11060 * class.c (instantiate_type): Return error_mark_node rather than
11061 junk.
11062
11063 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11064
11065 * cp-tree.h (most_specialized_instantiation): New function.
11066 (print_candidates): Likewise.
11067 * class.c (validate_lhs): Remove.
11068 (resolve_address_of_overloaded_function): New function, split out
11069 and then substantially reworked, from ...
11070 (instantiate_type): Use it. Simplify.
11071 * cvt.c (convert_to_reference): Complain when caller has indicated
11072 that's the right thing to do. Don't crash if instantiate_type
11073 fails.
11074 * pt.c: Substitute `parameters' for `paramters' throughout.
11075 (print_candidates): Don't make it static.
11076 (most_specialized_instantiation): Split out from ...
11077 (most_specialized): Here.
11078
11079 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
11080
11081 * lex.c (lang_init_options): Initialize cpplib.
11082 * decl2.c (parse_options,cpp_initialized): Removed.
11083 (lang_decode_option): Move initialization of cpplib to
11084 lang_init_options.
11085
11086 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11087
11088 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11089 well as the TYPE_DECL, when a typedef name is assigned to a
11090 previously anonymous type.
11091
11092 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
11093
11094 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11095 __cp_eh_info for getting the eh info pointer. Add table_index to
11096 field list.
11097 (push_eh_cleanup): Don't increment 'handlers' data field.
11098 (process_start_catch_block): Don't set the 'caught' field.
11099
11100 * cp/exception.cc (CP_EH_INFO): New macro for getting the
11101 exception info pointer within library routines.
11102 (__cp_eh_info): Use CP_EH_INFO.
11103 (__start_cp_handler): Get exception info pointer, set caught field,
11104 and increment the handlers field. Avoids this being done by handlers.
11105 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11106 (uncaught_exception): Use CP_EH_INFO macro.
11107
11108 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
11109
11110 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11111
11112 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
11113
11114 * lex.c (check_newline): Add support for \ as `natural'
11115 characters in file names in #line to be consistent with #include
11116 handling. We support escape processing in the # 1 "..." version of
11117 the command. See also support in cp/lex.c.
11118
11119 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
11120
11121 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11122 structure.
11123
11124 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
11125
11126 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11127
11128 * error.c (dump_simple_decl): Also print namespace context.
11129 (dump_function_decl): Likewise.
11130
11131 * decl2.c (ambiguous_decl): Don't print old value if it's
11132 error_mark_node.
11133
11134 * decl.c (lookup_name_real): Fix handling of local types shadowed
11135 by a non-type decl. Remove obsolete code.
11136 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11137
11138 * lang-options.h: Add -fpermissive.
11139 * decl2.c: Likewise.
11140 * cp-tree.h: Add flag_permissive.
11141 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11142 were specified, set flag_pedantic_errors.
11143 * call.c (build_over_call): Turn dropped qualifier messages
11144 back into pedwarns.
11145 * cvt.c (convert_to_reference): Likewise.
11146 * typeck.c (convert_for_assignment): Likewise.
11147
11148 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
11149
11150 * decl2.c (coerce_new_type): Use same_type_p.
11151 (coerce_delete_type): Likewise.
11152
11153 * call.c (check_dtor_name): Return 1, not error_mark_node.
11154
11155 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
11156
11157 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11158 if MULTIPLE_SYMBOL_SPACES.
11159
11160 * pt.c (check_template_shadow): New fn.
11161 * decl2.c (grokfield): Use it.
11162 * decl.c (pushdecl): Likewise.
11163 (pushdecl_class_level): Likewise.
11164 (start_method): Likewise.
11165 (xref_tag): Don't try to use 't' if we're defining.
11166
11167 * call.c (check_dtor_name): Just return an error_mark_node.
11168 * pt.c (lookup_template_class): Complain about using non-template here.
11169 * parse.y (apparent_template_type): Not here.
11170
11171 * pt.c (check_explicit_specialization): Complain about specialization
11172 with C linkage.
11173
11174 * lang-options.h: Add -f{no-,}implicit-inline-templates.
11175
11176 * pt.c (convert_nontype_argument): Don't assume that any integer
11177 argument is intended to be a constant-expression.
11178
11179 1998-12-03 Mark Mitchell <mark@markmitchell.com>
11180
11181 * class.c (handle_using_decl): Fix comment. Don't lookup
11182 constructors in base classes.
11183 (validate_lhs): Fix typo in comment.
11184 * search.c (lookup_field_1): Don't return a USING_DECL.
11185
11186 * cp-tree.h (DECL_ACCESS): Improve documentation.
11187
11188 * decl.c (expand_static_init): Don't set the initialization-done
11189 flag until the initialization is done.
11190
11191 1998-12-02 Mark Mitchell <mark@markmitchell.com>
11192
11193 * decl2.c (validate_nonmember_using_decl): Complain about using
11194 declarations for class members.
11195
11196 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
11197
11198 * typeck2.c (process_init_constructor): Use same_type_p.
11199
11200 * decl.c (check_tag_decl): Don't warn about null decl inside a
11201 class.
11202
11203 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11204 UNIFY_ALLOW_NONE.
11205 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11206 (resolve_overloaded_unification): Strip baselinks.
11207
11208 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11209
11210 * g++spec.c: Don't prototype xmalloc.
11211
11212 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
11213
11214 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11215
11216 * decl.c (check_tag_decl): Do complain about null friend decl at
11217 file scope.
11218
11219 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
11220
11221 * lex.c (make_lang_type): Clear the whole struct lang_type, not
11222 only the first multiple of sizeof (int).
11223
11224 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11225
11226 * decl.c (start_decl): An explicit specialization of a static data
11227 member is only a definition if it has an initializer.
11228
11229 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11230 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11231 cp_finish_decl.
11232 * init.c (expand_default_init): Check for DIRECT_BIND instead of
11233 DECL_ARTIFICIAL.
11234
11235 * call.c (build_over_call): Use build_decl.
11236
11237 * except.c (expand_throw): Just use convert, not
11238 build_reinterpret_cast.
11239
11240 * lex.c (handle_generic_pragma): Use token_buffer.
11241
11242 * decl.c (check_tag_decl): Don't complain about null friend decl.
11243
11244 1998-11-24 Dave Pitts <dpitts@cozx.com>
11245
11246 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11247 first position.
11248 * lex.c (check_newline): Use ISALPHA.
11249 (readescape): Use ISGRAPH.
11250 (yyerror): Use ISGRAPH.
11251
11252 1998-11-24 Nathan Sidwell <nathan@acm.org>
11253
11254 * search.c (get_abstract_virtuals): Do not use initial
11255 CLASSTYPE_ABSTRACT_VIRTUALS.
11256 * typeck2.c (abstract_virtuals_error): Show location of abstract
11257 declaration.
11258 * call.c (build_new_method_call): Use
11259 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11260 * class.c (finish_struct_bits): Don't bother working out whether
11261 get_abstract_virtuals will do anything, just do it.
11262
11263 1998-11-24 Graham <grahams@rcp.co.uk>
11264
11265 * typeck.c (build_component_ref): Remove unused statement.
11266
11267 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11268
11269 * class.c (add_method): Catch invalid overloads.
11270
11271 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11272 * search.c (lookup_conversions): Handle getting real OVERLOADs.
11273 (add_conversions): Likewise. Revert last change.
11274 * call.c (add_conv_candidate): Pass totype to add_candidate instead
11275 of fn. Don't add a new candidate if the last one was for the same
11276 type.
11277 (print_z_candidates): Handle getting a type as a function.
11278 (joust): If we got two conversion candidates to the same type,
11279 just pick one.
11280 (build_object_call): Lose 'templates'.
11281 (build_user_type_conversion_1): Handle getting real OVERLOADs.
11282
11283 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11284
11285 * typeck2.c (process_init_constructor): If there are elements
11286 that don't have initializers and they need to have constructors
11287 run, supply them with initializers.
11288
11289 * class.c (finish_struct_1): A class with a 0-width bitfield is
11290 still empty.
11291
11292 1998-11-23 Mark Mitchell <mark@markmitchell.com>
11293
11294 * pt.c (instantiate_class_template): Don't try to figure out what
11295 specialization to use for a partial instantiation. Correct
11296 typos in a couple of comments. Avoid calling uses_template_parms
11297 multiple times.
11298
11299 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
11300
11301 * method.c (process_overload_item): Add call to
11302 build_mangled_C9x_name for intTI_type_nodes.
11303 (build_mangled_C9x_name): Add prototype, define.
11304 * decl.c (init_decl_processing): Add names for
11305 TImode_type_node.
11306
11307 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11308
11309 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11310
11311 * class.c (finish_struct_1): Set things up for 0-width bitfields
11312 like we do for others.
11313
11314 * decl.c (check_tag_decl): New fn.
11315 (shadow_tag): Split out from here.
11316 * decl2.c (grok_x_components): Call it.
11317
11318 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
11319
11320 * decl.c: Lose warn_about_return_type.
11321 (grokdeclarator): Always complain about implicit int, except for
11322 `main () { ... }'.
11323
11324 * decl.c (tag_name): New fn.
11325 (xref_tag): Complain about using typedef-name after class-key.
11326
11327 * init.c (expand_vec_init): Also keep going if from_array.
11328
11329 * tree.c (is_overloaded_fn): Also handle the output of
11330 build_offset_ref.
11331
11332 * decl.c (grokdeclarator): Use constructor_name when comparing
11333 field name against enclosing class.
11334 * class.c (finish_struct_anon): Likewise.
11335
11336 1998-11-22 Mark Mitchell <mark@markmitchell.com>
11337
11338 * decl.c (poplevel): Remove code to handle KEEP == 2.
11339 (finish_function): Don't confuse BLOCK-order when
11340 processing a destructor.
11341
11342 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11343
11344 * decl.c (require_complete_types_for_parms): Call layout_decl
11345 after we've completed the type.
11346
11347 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
11348
11349 * decl2.c (validate_nonmember_using_decl): Allow using templates
11350 from the global namespace.
11351
11352 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11353
11354 Handle specifying template args to member function templates.
11355 * tree.c (build_overload): Always create an OVERLOAD for a template.
11356 * search.c (add_conversions): Handle finding an OVERLOAD.
11357 * decl2.c (check_classfn): Likewise.
11358 * lex.c (identifier_type): See through a baselink.
11359 * parse.y (do_id): Don't call do_identifier if we got a baselink.
11360 * class.c (instantiate_type, case TREE_LIST): Recurse.
11361
11362 * decl.c (grokdeclarator): Allow a boolean constant for array
11363 bounds, odd as that sounds.
11364
11365 * pt.c (unify): Be more strict about non-type parms, except for
11366 array bounds.
11367 (UNIFY_ALLOW_INTEGER): New macro.
11368
11369 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
11370
11371 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11372
11373 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
11374
11375 * semantics.c (begin_class_definition): Call
11376 maybe_process_partial_specialization before push_template_decl.
11377 Don't call push_template_decl for a specialization.
11378 * search.c (lookup_field): Do return a member template class.
11379 * decl2.c (handle_class_head): Handle member template classes.
11380
11381 * decl.c (grokdeclarator): A parm type need not be complete.
11382
11383 * pt.c (convert_nontype_argument): Fix thinko.
11384
11385 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11386
11387 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11388 (global_delete_fndecl): New variable.
11389 * decl.c (global_delete_fndecl): Define it.
11390 (init_decl_processing): Set it.
11391 * init.c (build_builtin_delete_call): Use it.
11392 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11393 nodes.
11394
11395 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11396
11397 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11398 type.
11399
11400 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11401 * call.c (build_object_call): Also support references to functions.
11402 * typeck.c (convert_for_initialization): Don't decay a function
11403 if the target is a reference to function.
11404
11405 * search.c (add_conversions): Get all the overloads from a class.
11406
11407 * decl.c (grok_ctor_properties): Complain about any constructor
11408 that will take a single arg of the class type by value.
11409
11410 * typeck2.c (build_functional_cast): Can't create objects of
11411 abstract classes this way.
11412 * cvt.c (ocp_convert): Likewise.
11413
11414 * decl.c (grokfndecl): Member functions of local classes are not
11415 public.
11416
11417 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11418
11419 * Make-lang.in (cc1plus): Add dependency on hash.o.
11420
11421 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11422
11423 * search.c (get_abstract_virtuals): Complain about virtuals with
11424 no final overrider.
11425 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11426 with no final overrider.
11427 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11428 on virtuals with no final overrider.
11429
11430 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11431
11432 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11433 after layout_type.
11434
11435 * friend.c (do_friend): Don't set_mangled_name_for_decl.
11436
11437 * class.c (finish_struct_anon): Complain about non-fields.
11438 * decl2.c (build_anon_union_vars): Likewise.
11439
11440 * decl.c (grokdeclarator): Normal data members can't have the same
11441 name as the class, either.
11442 * class.c (finish_struct_anon): Neither can members of an
11443 anonymous union.
11444
11445 1998-11-17 Mark Mitchell <mark@markmitchell.com>
11446
11447 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11448 (TYPE_BINFO): Likewise.
11449 (IS_AGGR_TYPE): Tweak.
11450 (SET_IS_AGGR_TYPE): New macro.
11451 (CLASS_TYPE_P): Tweak.
11452 (lang_type): Group mark bitfields together. Remove linenum.
11453 (CLASSTYPE_SOURCE_LINE): Remove macro.
11454 (CLASSTYPE_MARKED_N): New macro.
11455 (SET_CLASSTYPE_MARKED_N): Likewise.
11456 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11457 (CLASS_TYPE_MARKED_*): Use them.
11458 (SET_CLASSTYPE_MARKED_*): Likewise.
11459 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11460 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11461 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11462 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11463 * class.c (class_cache_obstack): New variable.
11464 (class_cache_firstobj): Likewise.
11465 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11466 (pushclass): Free the cache, when appropriate.
11467 (popclass): Tidy.
11468 (maybe_push_cache_obstack): Use class_cache_obstack.
11469 * decl.c (include hash.h).
11470 (typename_hash): New function.
11471 (typename_compare): Likewise.
11472 (build_typename_type): Check the hash table to avoid creating
11473 duplicates.
11474 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11475 (grokdeclarator): Use CLASS_TYPE_P.
11476 (xref_basetypes): Likewise.
11477 (start_function): Likewise. Don't put current_class_ref on the
11478 permanent obstack.
11479 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11480 and TYPE_TI_ARGS.
11481 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11482 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11483 fields for types other than class types. Do clear TYPE_ALIAS_SET
11484 for types other than class types, though.
11485 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11486 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11487 * pt.c (process_template_parm): Don't set
11488 CLASSTYPE_GOT_SEMICOLON.
11489 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11490 Coerce arguments on the momentary obstack.
11491 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11492 (instantiate_class_template): Calculate template arguments on the
11493 momentary obstack. Tidy.
11494 (tsubst_template_arg_vector): Use make_temp_vec.
11495 (tsubst_aggr_type): Put template arguments on the momentary
11496 obstack.
11497 (tsubst_decl): Likewise.
11498 (tsubst): Copy the array bounds index to the permanent obstack
11499 before building index types. Use new macros.
11500 (unify): Use new macros.
11501 (do_type_instantiation): Likewise.
11502 * search.c (lookup_fnfields_1): Use new macros.
11503 (dfs_pushdecls): Build envelopes on the cache obstack.
11504 (dfs_compress_decls): Use new macros.
11505 (push_class_decls): Build on the cache obstack.
11506 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11507 * sign.c (build_signature_pointer_or_reference_type): Use
11508 SET_IS_AGGR_TYPE.
11509 * tree.c (make_binfo): Check CLASS_TYPE_P.
11510 (copy_template_template_parm): Adjust.
11511 (make_temp_vec): Use push_expression_obstack.
11512 * typeck.c (complete_type): Use new macros.
11513 (comptypes): Likewise.
11514
11515 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
11516
11517 * pt.c (tsubst): Add diagnostics for invalid array, reference
11518 and pointer to member types.
11519
11520 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11521
11522 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11523
11524 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11525 Simplify.
11526
11527 * parse.y (structsp): Fix cut-and-paste error.
11528
11529 * init.c (build_new): Complain about non-integral size.
11530
11531 * parse.y (unary_expr): Complain about defining types in sizeof.
11532
11533 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11534
11535 * rtti.c (build_x_typeid): Complain about typeid without
11536 including <typeinfo>.
11537 (get_typeid): Likewise. Complain about typeid of incomplete type.
11538 (get_tinfo_fn_dynamic): Likewise.
11539 (get_typeid_1): Not static anymore.
11540 * except.c (build_eh_type_type): Use get_typeid_1.
11541
11542 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11543 ambiguous or private bases. Fix warning for reference cast.
11544
11545 1998-11-16 Mark Mitchell <mark@markmitchell.com>
11546
11547 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11548 * decl.c (duplicate_decls): Remove special-case code to deal with
11549 template friends, and just do the obvious thing.
11550 * pt.c (register_specialization): Tweak for clarity, and also to
11551 clear DECL_INITIAL for an instantiation before it is merged with a
11552 specialization.
11553 (check_explicit_specialization): Fix indentation.
11554 (tsubst_friend_function): Handle both definitions in friend
11555 declaration and outside friend declarations.
11556 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11557 (regenerate_decl_from_template): Tweak accordingly.
11558 (instantiate_decl): Likewise.
11559
11560 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11561
11562 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11563 member function reference to error.
11564 * cvt.c (ocp_convert): Complain about converting an overloaded
11565 function to void.
11566
11567 * init.c (build_offset_ref): Just return a lone static member
11568 function.
11569
11570 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
11571 not internal ones.
11572
11573 * typeck.c (build_binary_op_nodefault): Improve error handling.
11574
11575 * decl.c (grokfndecl): Complain about making 'main' a template.
11576
11577 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
11578
11579 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
11580 TYPE_DECL in a template.
11581
11582 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
11583
11584 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
11585
11586 * decl.c (struct cp_function): Add named_label_uses.
11587 (push_cp_function_context): Save it.
11588 (pop_cp_function_context): Restore it.
11589 (define_label): Also complain about jumping into the scope of
11590 non-POD objects that don't have constructors.
11591 * tree.c (pod_type_p): New fn.
11592
11593 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
11594 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
11595 (get_tinfo_fn): Not here.
11596 * repo.c (repo_get_id): Abort if we get called for an incomplete
11597 type.
11598
11599 1998-11-13 Mark Mitchell <mark@markmitchell.com>
11600
11601 * except.c (expand_throw): Make sure first argument to
11602 __cp_push_exception is of type `void*' to avoid spurious error
11603 messages.
11604
11605 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
11606
11607 * pt.c (try_one_overload): Take orig_targs again. Only check for
11608 mismatches against them; we don't care what a previous call found.
11609 (resolve_overloaded_unification): Adjust.
11610
11611 * search.c (lookup_field): Don't return anything for a non-type
11612 field from a dependent type.
11613 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
11614 in an array declarator.
11615 (start_decl): Push into the class before looking for the field.
11616
11617 1998-11-08 Mark Mitchell <mark@markmitchell.com>
11618
11619 * method.c (build_overload_value): Handle REFERENCE_TYPE.
11620
11621 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
11622
11623 * decl.c (grokdeclarator): Allow namespace-scoped members if they
11624 are friends.
11625
11626 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
11627
11628 * pt.c (tsubst_decl): Don't mess with the global value of an
11629 un-mangled DECL_ASSEMBLER_NAME.
11630
11631 1998-11-03 Christopher Faylor <cgf@cygnus.com>
11632
11633 * decl.c (init_decl_processing): Remove CYGWIN conditional
11634 since CYGWIN is now able to deal with trapping signals.
11635
11636 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11637
11638 * cp-tree.h: Don't include gansidecl.h.
11639 * exception.cc: Include gansidecl.h (since we don't include config.h)
11640 * g++spec.c: Don't include gansidecl.h.
11641
11642 1998-11-06 Mark Mitchell <mark@markmitchell.com>
11643
11644 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
11645 size of dummy.
11646 (DECL_DEFINED_IN_CLASS_P): New macro.
11647 (TEMPLATE_PARMS_FOR_INLINE): Document.
11648 (check_static_variable_definition): New function.
11649 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11650 appropriate.
11651 (check_static_variable_definition): Split out from ...
11652 (grokdeclarator): Here.
11653 * pt.c (check_default_tmpl_args): New function, split out from ...
11654 (push_template_decl_real): Here.
11655 (instantiate_template): Fix comment.
11656
11657 1998-11-04 Mark Mitchell <mark@markmitchell.com>
11658
11659 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11660 (CP_TYPE_VOLATILE_P): Likewise.
11661 (CP_TYPE_RESTRICT_P): Likewise.
11662
11663 1998-11-03 Mark Mitchell <mark@markmitchell.com>
11664
11665 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11666
11667 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
11668
11669 * class.c (instantiate_type): Be more helpful.
11670
11671 * decl2.c (import_export_decl): Call import_export_class.
11672
11673 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11674 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11675 * pt.c (tsubst_copy): Likewise.
11676
11677 1998-11-02 Mark Mitchell <mark@markmitchell.com>
11678
11679 * init.c (expand_vec_init): Fix off-by-one error.
11680
11681 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
11682
11683 * parse.y (apparent_template_type): New type.
11684 (named_complex_class_head_sans_basetype): Use it.
11685 * Makefile.in (CONFLICTS): One new conflict.
11686 * parse.c: Regenerated.
11687
11688 1998-11-01 Mark Mitchell <mark@markmitchell.com>
11689
11690 * cp-tree.h (COMPARE_STRICT): New macro.
11691 (COMPARE_BASE): Likewise.
11692 (COMPARE_RELAXED): Likewise.
11693 (COMPARE_REDECLARATION): Likewise.
11694 (same_type_p): Likewise.
11695 (same_or_base_type_p): Likewise.
11696 * call.c (standard_conversion): Use them, in place of comptypes
11697 with numeric arguments.
11698 (reference_binding): Likewise.
11699 (convert_like): Likewise.
11700 (build_over_call): Likewise.
11701 (is_subseq): Likewise.
11702 (is_properly_derived_from): Likewise.
11703 (compare_ics): Likewise.
11704 (joust): Likewise.
11705 * class.c (delete_duplicate_fields_1): Likewise.
11706 (resolves_to_fixed_type_p): Likewise.
11707 (instantiate_type): Likewise. Remove #if 0'd code.
11708 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
11709 (pushdecl): Likewise.
11710 (lookup_name_real): Likewise.
11711 (grokdeclarator): Likewise. Check for illegal array declarations.
11712 (grokparms): Likewise.
11713 (grok_op_properties): Likewise.
11714 * decl2.c (check_classfn): Likewise.
11715 * friend.c (is_friend): Likewise.
11716 (make_friend_class): Likewise.
11717 * init.c (expand_aggr_init): Likewise.
11718 (expand_vec_init): Likewise.
11719 * pt.c (is_member_template_class): Remove declaration.
11720 (is_specialization_of): Use COMPARE_* and new macros.
11721 (comp_template_parms): Likewise.
11722 (convert_nontype_argument): Likewise.
11723 (coerce_template_template_parms): Likewise.
11724 (template_args_equal): Likewise.
11725 (lookup_template_class): Likewise.
11726 (type_unification_real): Likewise.
11727 (unify): Likewise.
11728 (get_bindings_real): Likewise.
11729 * search.c (covariant_return_p): Likewise.
11730 (get_matching_virtual): Likewise.
11731 * sig.c (match_method_types): Likewise.
11732 * tree.c (vec_binfo_member): Likewise.
11733 (cp_tree_equal): Likewise.
11734 * typeck.c (common_type): Likewise.
11735 (comp_array_types): Likewise. Get issues involving unknown array
11736 bounds right.
11737 (comptypes): Update comments. Use new flags.
11738 (comp_target_types): Use new macros.
11739 (compparms): Likewise.
11740 (comp_target_parms): Likewise.
11741 (string_conv_p): Likewise.
11742 (build_component_ref): Likewise.
11743 (build_indirect_ref): Likewise.
11744 (build_conditional_expr): Likewise.
11745 (build_static_cast): Likewise.
11746 (build_reinterpret_cast): Likewise.
11747 (build_const_cast): Likewise.
11748 (build_modify_expr): Likewise.
11749 (convert_for_assignment): Likewise.
11750 (comp_ptr_ttypes_real): Likewise.
11751 (ptr_reasonably_similar): Likewise.
11752 (comp_ptr_ttypes_const): Likewise.
11753
11754 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
11755
11756 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11757
11758 1998-10-30 Mark Mitchell <mark@markmitchell.com>
11759
11760 * decl2.c (delete_sanity): Pass integer_zero_node, not
11761 integer_two_node, to build_vec_delete.
11762 * init.c (build_array_eh_cleanup): Remove.
11763 (expand_vec_init_try_block): New function.
11764 (expand_vec_init_catch_clause): Likewise.
11765 (build_vec_delete_1): Don't deal with case that auto_delete_vec
11766 might be integer_two_node anymore.
11767 (expand_vec_init): Rework for initialization-correctness and
11768 exception-correctness.
11769 * typeck2.c (process_init_constructor): Make mutual exclusivity
11770 of cases more obvious.
11771
11772 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
11773
11774 * decl.c (lookup_name_real): OK, only warn if not lexing.
11775 Simplify suggested fix.
11776
11777 * cp-tree.h (IDENTIFIER_MARKED): New macro.
11778 * search.c (lookup_conversions): Use breadth_first_search.
11779 (add_conversions): Avoid adding two conversions to the same type.
11780 (breadth_first_search): Work with base binfos, rather
11781 than binfos and base indices.
11782 (get_virtual_destructor): Adjust.
11783 (tree_has_any_destructor_p): Adjust.
11784 (get_matching_virtual): Adjust.
11785
11786 * pt.c (push_template_decl_real): Generalize check for incorrect
11787 number of template parms.
11788 (is_member_template_class): #if 0.
11789
11790 1998-10-29 Richard Henderson <rth@cygnus.com>
11791
11792 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11793 last.
11794
11795 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
11796
11797 * lex.c: Call check_newline from lang_init always. After
11798 calling cpp_start_read, set yy_cur and yy_lim to read from the
11799 cpplib token buffer.
11800
11801 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
11802
11803 * class.c (instantiate_type): Don't consider templates for a normal
11804 match.
11805
11806 * class.c (finish_struct_1): Don't complain about non-copy
11807 assignment ops in union members.
11808
11809 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11810 (prepare_fresh_vtable): Likewise.
11811 (finish_struct_1): Don't call import_export_class.
11812 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11813 (finish_prevtable_vardecl): Lose.
11814 (finish_file): Don't call it.
11815 * pt.c (instantiate_class_template): Likewise.
11816 * cp-tree.h: Remove it.
11817
11818 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11819 * decl.c (finish_function): Not here.
11820 (start_function): Do set DECL_INITIAL.
11821
11822 * pt.c (push_template_decl_real): Complain about default template
11823 args for enclosing classes.
11824
11825 * call.c (add_function_candidate): Treat conversion functions
11826 as coming from the argument's class.
11827 * cp-tree.h (DECL_CONV_FN_P): New fn.
11828 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11829 * class.c (add_method): Use DECL_CONV_FN_P.
11830 * decl2.c (check_classfn): Likewise.
11831 * error.c (dump_function_name): Likewise.
11832 (dump_function_decl): Likewise.
11833 * pt.c (fn_type_unification): Likewise.
11834 * search.c (add_conversions): Likewise.
11835
11836 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11837
11838 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11839 * method.c (hack_identifier): Also check for using RESULT_DECL
11840 from outer context.
11841
11842 1998-10-27 Mark Mitchell <mark@markmitchell.com>
11843
11844 * decl.c (grokdeclarator): Use type_quals, rather than constp,
11845 consistently.
11846
11847 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11848
11849 * call.c (standard_conversion): instantiate_type here.
11850 (reference_binding): And here.
11851 (implicit_conversion): Not here.
11852 (build_op_delete_call): No need to cons up an OVERLOAD.
11853 * cvt.c (cp_convert_to_pointer): instantiate_type here.
11854 (convert_to_reference): And here.
11855 * decl.c (grok_reference_init): Not here.
11856 (grokparms): Or here.
11857 * typeck2.c (digest_init): Or here.
11858 * typeck.c (decay_conversion): Take the address of overloaded
11859 functions, too.
11860 (require_instantiated_type): Lose.
11861 (convert_arguments): Don't handle unknown types here.
11862 (build_c_cast): Likewise.
11863 (build_binary_op): Gut.
11864 (build_conditional_expr): Don't require_instantiated_type.
11865 (build_modify_expr): Likewise.
11866 (build_static_cast): Don't instantiate_type.
11867 (build_reinterpret_cast): Likewise.
11868 (build_const_cast): Likewise.
11869 (convert_for_initialization): Likewise.
11870 (build_ptrmemfunc): Use type_unknown_p.
11871 (convert_for_assignment): Also do default_conversion on overloaded
11872 functions. Hand them off to ocp_convert.
11873
11874 1998-10-26 Mark Mitchell <mark@markmitchell.com>
11875
11876 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11877 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
11878
11879 * class.c (finish_struct_1): Use build_cplus_array_type to build
11880 array types.
11881 * decl.c (init_decl_processing): Likewise.
11882 * except.c (expand_end_eh_spec): Likewise.
11883 * search.c (expand_upcast_fixups): Simplify very slightly.
11884
11885 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11886
11887 * decl.c (grokdeclarator): Complain about a variable using
11888 constructor syntax coming back null from start_decl.
11889
11890 * friend.c (make_friend_class): Complain about trying to make
11891 a non-class type a friend.
11892
11893 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11894 (start_function): Not here.
11895
11896 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
11897
11898 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11899
11900 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11901
11902 * typeck2.c (process_init_constructor): Only skip anonymous fields
11903 if they are bitfields.
11904
11905 * cp-tree.def (TYPEOF_TYPE): New code.
11906 * error.c (dump_type_real): Handle it.
11907 * pt.c (tsubst): Likewise.
11908 * tree.c (search_tree): Likewise.
11909 * semantics.c (finish_typeof): New fn.
11910 * parse.y (typespec): Use it.
11911 * cp-tree.h: Declare it.
11912
11913 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
11914
11915 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11916
11917 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11918
11919 * typeck.c (convert_arguments): Don't handle pmf references
11920 specially.
11921
11922 * init.c (build_member_call): Don't try to convert to the base type
11923 if it's ambiguous or pedantic.
11924
11925 * typeck2.c (check_for_new_type): Only depend on pedantic for
11926 C-style casts.
11927
11928 1998-10-25 Mark Mitchell <mark@markmitchell.com>
11929
11930 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11931 non-converting constructors.
11932
11933 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11934
11935 * gxxint.texi: Correct documentation for n, N, Q, and B.
11936
11937 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
11938
11939 * parse.y (condition): Convert VAR_DECL from reference to indirect
11940 reference.
11941
11942 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
11943
11944 * exception.cc (__cp_pop_exception): Free the original exception
11945 value, not the potentially coerced one.
11946
11947 1998-10-23 Mark Mitchell <mark@markmitchell.com>
11948
11949 * Makefile.in (hash.h): Run gperf when necessary.
11950
11951 * cp-tree.h (CP_TYPE_READONLY): Remove.
11952 (CP_TYPE_VOLATILE): Likewise.
11953 (CP_TYPE_QUALS): New macro.
11954 (CP_TYPE_CONST_P): Likewise.
11955 (CP_TYPE_VOLATILE_P): Likewise.
11956 (CP_TYPE_RESTRICT_P): Likewise.
11957 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11958 (cp_build_type_variant): Rename to ...
11959 (cp_build_qualified_type): New function.
11960 (c_apply_type_quals_to_decl): Declare.
11961 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11962 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11963 (cp_type_qual_from_rid): New function.
11964 (compparms): Remove unused parameter. All callers changed.
11965 (cp_type_quals): New function.
11966 (at_least_as_qualified_p): Likewise.
11967 (more_qualified_p): Likewise.
11968
11969 * call.c (standard_conversion): Replace calls to
11970 cp_build_type_variant with cp_build_qualified_type. Use
11971 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11972 compare them. Use CP_TYPE_* macros to check qualifiers.
11973 (reference_binding): Likewise.
11974 (implicit_conversion): Likewise.
11975 (add_builtin_candidates): Likewise.
11976 (build_over_call): Likewise.
11977 * class.c (overrides): Compare all qualifiers, not just `const',
11978 on method declarations.
11979 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11980 (convert_pointer_to_real): Likewise.
11981 (type_promotes_to): Likewise.
11982 * decl.c (check_for_uninitialized_const_var): New function.
11983 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11984 (cp_finish_decl): Use check_for_uninitialized_const_var.
11985 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
11986 handle `restrict'.
11987 (grok_ctor_properties): Likewise.
11988 (grok_op_properties): Likewise.
11989 (start_function): Likewise.
11990 (rever_static_member_fn): Likewise.
11991 * decl2.c (grok_method_quals): Likewise.
11992 (grokfield): Likewise.
11993 * error.c (dump_readonly_or_volatile): Rename to ...
11994 (dump_qualifiers): New function. Handle `restrict'.
11995 (dump_type_real): Use it.
11996 (dump_aggr_type): Likewise.
11997 (dump_type_prefix): Likewise.
11998 (dump_type_suffix): Likewise.
11999 (dump_function_decl): Likewise.
12000 (cv_as_string): Likewise.
12001 * gxx.gperf: Add __restrict and __restrict__.
12002 * gxxint.texi: Document `u' as used for `__restrict', and a few
12003 other previously undocumented codes.
12004 * hash.h: Regenerated.
12005 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12006 (build_member_call): Likewise.
12007 (build_new_1): Likewise.
12008 * lex.c (init_parse): Add entry for RID_RESTRICT.
12009 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12010 (cp_type_qual_from_rid): Define.
12011 * lex.h (enum rid): Add RID_RESTRICT.
12012 * method.c (process_modifiers): Deal with `restrict'.
12013 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12014 * parse.c: Regenerated.
12015 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12016 (tsubst_aggr_type): Likewise.
12017 (tsubst): Likewise.
12018 (check_cv_quals_for_unify): Likewise.
12019 (unify): Likewise.
12020 * rtti.c (init_rtti_processing): Likewise.
12021 (build_headof): Likewise.
12022 (get_tinfo_var): Likewise.
12023 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
12024 (expand_class_desc): Likewise.
12025 (expand_attr_desc): Likewise.
12026 (synthesize_tinfo_fn): Likewise.
12027 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
12028 (get_matching_virtual): Likewise.
12029 (expand_upcast_fixups): Likewise.
12030 * sig.c (build_signature_pointer_or_reference_name): Take
12031 type_quals, not constp and volatilep.
12032 (build_signature_pointer_or_reference_type): Likewise.
12033 (match_method_types): More CP_TYPE_QUALS conversion, etc.
12034 (build_signature_pointer_constructor): Likewise.
12035 (build_signature_method_call): Likewise.
12036 * tree.c (build_cplus_array_type): Likewise.
12037 (cp_build_type_variant): Rename to ...
12038 (cp_build_qualified_type): New function. Deal with `__restrict'.
12039 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12040 (build_exception_variant): Likewise.
12041 (mapcar): Likewise.
12042 * typeck.c (qualif_type): Likewise.
12043 (common_type): Likewise.
12044 (comptypes): Likewise.
12045 (comp_cv_target_types): Likewise.
12046 (at_least_as_qualified_p): Define.
12047 (more_qualified_p): Likewise.
12048 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12049 (compparms): Likewise.
12050 (inline_conversion): Likewise.
12051 (string_conv_p): Likewise.
12052 (build_component_ref): Likewise.
12053 (build_indirect_ref): Likewise.
12054 (build_array_ref): Likewise.
12055 (build_unary_op): Likewise.
12056 (build_conditional_expr): Likewise.
12057 (build_static_cast): Likewise.
12058 (build_c_cast): Likewise.
12059 (build_modify_expr): Likewise.
12060 (convert_For_assignment): Likewise.
12061 (comp_ptr_ttypes_real): Likewise.
12062 (cp_type_quals): New function.
12063
12064 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
12065
12066 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12067 (CP_TYPE_VOLATILE): Likewise.
12068 * decl.c (grokdeclarator): Use them.
12069 * tree.c (canonical_type_variant): Likewise.
12070
12071 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
12072
12073 * parse.y (named_class_head): Push into class while parsing the
12074 base class list.
12075 * decl2.c (push_scope, pop_scope): New functions.
12076 * cp-tree.h: Declare them.
12077 * init.c (build_new_1): Delay cleanup until end of full expression.
12078
12079 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
12080
12081 * typeck.c (build_component_ref): Use of a type here is an error.
12082
12083 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
12084
12085 Revamp references to member functions.
12086 * method.c (hack_identifier): Call build_component_ref for a
12087 reference to a member function.
12088 * typeck.c (build_component_ref): Only return a single function
12089 if it's static. Otherwise, return a COMPONENT_REF.
12090 (build_x_function_call): Handle a COMPONENT_REF.
12091 (build_unary_op): Handle all unknown-type things.
12092 * decl2.c (arg_assoc): Handle COMPONENT_REF.
12093 * class.c (instantiate_type): Complain if the function we get is a
12094 nonstatic member function. Remove code for finding "compatible"
12095 functions.
12096 * pt.c (tsubst_copy): Handle NOP_EXPR.
12097 * tree.c (build_dummy_object): New fn.
12098 (maybe_dummy_object): New fn.
12099 (is_dummy_object): New fn.
12100 * cp-tree.h: Declare them.
12101 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12102 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12103 * init.c (build_member_call): Use maybe_dummy_object and
12104 is_dummy_object.
12105 (build_offset_ref): Use maybe_dummy_object.
12106 (resolve_offset_ref): Use is_dummy_object.
12107 * typeck.c (build_x_function_call): Call build_dummy_object.
12108 (unary_complex_lvalue): Call is_dummy_object.
12109
12110 * typeck.c (build_component_addr): Make sure field is a field.
12111
12112 * call.c (build_new_op): Delete obsolete code.
12113
12114 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12115
12116 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
12117
12118 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12119 std if std is ignored.
12120
12121 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12122
12123 * decl.c (grokvardecl): Fix thinko.
12124
12125 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12126 not the left.
12127
12128 * parse.y (fn.def2): Fix 'attrs' format.
12129
12130 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12131
12132 * Makefile.in (CONFLICTS): Update.
12133 * parse.y (expr_or_declarator_intern): New rule.
12134 (expr_or_declarator, direct_notype_declarator, primary,
12135 functional_cast): Use it.
12136 (notype_declarator_intern): New rule.
12137 (notype_declarator, complex_notype_declarator): Use it.
12138
12139 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
12140
12141 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12142 (grokvardecl): Likewise.
12143
12144 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12145
12146 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12147 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12148
12149 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12150
12151 * pt.c (process_partial_specialization): Cast 1st argument of
12152 `bzero' to (PTR).
12153
12154 * tree.c (build_base_fields): Cast `base_align' to (int) when
12155 comparing against one.
12156
12157 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12158
12159 * decl.c (lookup_name_real): Handle template parameters for member
12160 templates where said parameters have the same name as the
12161 surrounding class.
12162
12163 * decl.c (expand_static_init): Build cleanups before entering the
12164 anonymous function used to do them to avoid access-checking
12165 confusion.
12166
12167 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12168 accidentally removed by previous change, and make DECL_RTL here.
12169 * class.c (add_method): Don't make DECL_RTL here.
12170
12171 * pt.c (for_each_template_parm): Don't examine uninstantiated
12172 default arguments.
12173
12174 1998-10-16 Dave Brolley <brolley@cygnus.com>
12175
12176 * lex.c (real_yylex): Fix unaligned access of wchar_t.
12177
12178 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12179
12180 * class.c (add_method): Fix documentation to reflect previous
12181 changes. Check for duplicate method declarations here.
12182 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12183 correctly; such things never match.
12184 (grokfndecl): Don't look for duplicate methods here.
12185 * decl2.c (check_classfn): Don't assume names are mangled.
12186 Don't add bogus member function declarations to a class before the
12187 class type is complete.
12188 (grokfield): Reformat error message.
12189 * method.c (set_mangled_name_for_decl): Don't mangle names while
12190 processing_template_decl.
12191
12192 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
12193
12194 * typeck.c (build_indirect_ref): Complain about a pointer to data
12195 member, too.
12196 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12197 data member.
12198 * init.c (resolve_offset_ref): Don't undo the above.
12199
12200 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12201 (struct lang_decl_flags): Add `bitfield'.
12202 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12203 DECL_BIT_FIELD.
12204 * decl2.c (grokbitfield, grok_alignof): Likewise.
12205 * init.c (build_offset_ref): Likewise.
12206 * typeck.c (build_component_addr, expr_sizeof): Likewise.
12207 * cvt.c (build_up_reference): Don't crash if taking the address
12208 returns error_mark_node.
12209
12210 * decl.c (grokfndecl): Also check ctype when checking for ::main().
12211
12212 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
12213
12214 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12215 Do mangling here.
12216 (grokdeclarator): Instead of here.
12217 * friend.c (do_friend): Lose special handling of ::main and
12218 __builtin_*.
12219 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12220
12221 * spew.c (yylex): Clear looking_for_typename if we got
12222 'enum { ... };'.
12223
12224 1998-10-15 Mark Mitchell <mark@markmitchell.com>
12225
12226 * class.c (maybe_warn_about_overly_private_class): Improve error
12227 messages for class with only private constructors.
12228
12229 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12230 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12231 (build_typename_type): New function.
12232 * decl.c (build_typename_type): Broken out from ...
12233 (make_typename_type): Use it.
12234 * search.c (lookup_field): Likewise.
12235
12236 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12237
12238 * pt.c (convert_nontype_argument): Check against type_referred_to.
12239 * decl.c (grokvardecl): Check for declarator name before building
12240 DECL_ASSEMBLER_NAME.
12241
12242 1998-10-14 Mark Mitchell <mark@markmitchell.com>
12243
12244 * pt.c (lookup_template_class): Add comment.
12245 (instantiate_class_template): Don't mark the _TYPE node for
12246 member class templates as an instantiation.
12247
12248 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
12249
12250 * decl.c (grokfndecl): Fix my thinko.
12251
12252 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
12253
12254 * tinfo2.cc (fast_compare): Remove.
12255 (before): Just use strcmp.
12256 * tinfo.cc (operator==): Just use strcmp.
12257
12258 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12259
12260 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12261 declarations.
12262
12263 1998-10-13 Mark Mitchell <mark@markmitchell.com>
12264
12265 * cp-tree.h (specializations_of_same_template_p): Remove.
12266 * search.c (get_template_base): Don't use it.
12267 (get_template_base_recursive): Likewise.
12268 * pt.c (specializations_of_same_template_p): Remove.
12269 (unify): Don't use it.
12270 (lookup_template_class): Find the correct parent when setting
12271 CLASSTYPE_TI_TEMPLATE.
12272
12273 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12274
12275 * tinfo.cc (operator==): Always compare names.
12276
12277 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12278
12279 * decl.c (start_function): Fix cut-and-paste error.
12280
12281 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12282
12283 * inc/typeinfo: Add #pragma interface.
12284 (operator!=): Just call operator==.
12285 * tinfo.cc: Add #pragma implementation.
12286 (operator==): Move from inc/typeinfo and tinfo2.cc.
12287 Check __COMMON_UNRELIABLE instead of _WIN32.
12288
12289 * typeck2.c (my_friendly_abort): Add URL.
12290
12291 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12292
12293 * decl.c (start_method): Added extra parameter for attributes.
12294 * cp-tree.h (start_method): Update prototype.
12295 * parse.y (fn.def2): Update start_method parameter list.
12296
12297 1998-10-11 Mark Mitchell <mark@markmitchell.com>
12298
12299 * cp-tree.h (specializations_of_same_template_p): Declare.
12300 * pt.c (specializations_of_same_template_p): New function.
12301 (unify): Use it.
12302 * search.c (get_template_base): Use it.
12303 (get_template_base_recursive): Likewise.
12304
12305 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
12306
12307 * decl2.c (start_objects): Add new variable `joiner' and
12308 initialize it properly.
12309
12310 1998-10-09 Mark Mitchell <mark@markmitchell.com>
12311
12312 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12313 change to vtable types.
12314
12315 * cvt.c (ocp_convert): Avoid infinite recursion caused by
12316 1998-10-03 change.
12317
12318 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
12319
12320 * pt.c (resolve_overloaded_unification): New fn.
12321 (try_one_overload): Likewise.
12322 (unify): Don't fail on unknown type.
12323 (type_unification_real): Likewise. Use resolve_overloaded_unification
12324 to handle an overloaded argument.
12325 (template_args_equal): Split out...
12326 (comp_template_args): From here.
12327 (determine_specialization): Also allow a template with more
12328 parms than were explicitly specified.
12329 * cp-tree.h: Add template_args_equal.
12330 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12331
12332 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
12333
12334 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12335 change.
12336
12337 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
12338
12339 * typeck.c (unsigned_type): Only return TItype nodes when
12340 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12341 (signed_type): Likewise.
12342 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12343 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12344 (init_decl_processing): Only create TItype nodes when
12345 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12346 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12347 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12348
12349 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12350
12351 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12352 (gxx.gperf): Update comments describing invocation flags.
12353 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12354
12355 1998-10-07 Mark Mitchell <mark@markmitchell.com>
12356
12357 * class.c (finish_struct_1): Add commentary on previous change.
12358
12359 * cp-tree.h (vtbl_ptr_type_node): New variable.
12360 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12361 already of the right type.
12362 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12363 Simplify code to grow vtable.
12364 * decl.c (vtbl_ptr_type_node): Define.
12365 (init_decl_processing): Initialize it.
12366
12367 1998-10-06 Mark Mitchell <mark@markmitchell.com>
12368
12369 * cp-tree.def (PTRMEM_CST): New tree node.
12370 * cp-tree.h (ptrmem_cst): New type.
12371 (lang_type): Remove local_typedecls.
12372 (dummy): Increase to 12 bits from 11.
12373 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12374 (PTRMEM_CST_CLASS): New macro.
12375 (PTRMEM_CST_MEMBER): Likewise.
12376 (current_access_specifier): New variable.
12377 (current_class_type): Remove duplicate declaration.
12378 (finish_struct): Change prototype.
12379 (unreverse_member_declarations): New function.
12380 (pushdecl_class_level): Change prototype.
12381 (grok_enum_decls): Remove.
12382 (fixup_anonymous_union): New function.
12383 (grok_x_components): Change prototype.
12384 (tsubst_chain): Remove.
12385 (finish_member_template_decl): Likewise.
12386 (check_explicit_specialization): Fix indentation.
12387 (finish_class_definition): Change prototype.
12388 (finish_member_class_template): Likewise.
12389 (finish_member_declaration): New function.
12390 (check_multiple_declarators): Likewise.
12391 * class.c (class_stack_node_t): New type.
12392 (current_class_base): Remove.
12393 (current_class_stack): Change type.
12394 (current_access_specifier): New variable.
12395 (grow_method): Remove.
12396 (check_member_decl_is_same_in_complete_scope): Break out from
12397 finish_struct.
12398 (make_method_vec): New function.
12399 (free_method_vec): Likewise.
12400 (add_implicitly_declared_members): Break out from finish_struct_1.
12401 (free_method_vecs): New variable.
12402 (add_method): Rework for direct use from parser.
12403 (handle_using_decl): Watch for NULL_TREE while iterating through
12404 CLASSTYPE_METHOD_VEC.
12405 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12406 just do some error-checking.
12407 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12408 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
12409 (finish_struct): Change prototype. Simplify; fields and methods
12410 are already set up at this point.
12411 (init_class_processing): Set up current_class_stack.
12412 (pushclass): Save current_access_specifier.
12413 (popclass): Restore it.
12414 (currently_open_class): Simplify.
12415 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12416 * decl.c (saved_scope): Add access_specifier.
12417 (maybe_push_to_top_level): Save it.
12418 (pop_from_top_level): Restore it.
12419 (maybe_process_template_type_declaration): Use
12420 finish_member_declaration.
12421 (pushtag): Likewise.
12422 (pushdecl_class_level): Don't return a value.
12423 (fixup_anonymous_union): Break out from grok_x_components.
12424 (shadow_tag): Use it.
12425 (xref_tag): Complain about using an elaborated type specifier to
12426 reference a template type parameter or typedef name.
12427 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12428 (current_local_enum): Remove.
12429 (build_enumerator): Call finish_member_declaration.
12430 (grok_enum_decls): Remove.
12431 * decl2.c (grok_x_components): Simplify.
12432 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12433 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12434 (merge_functions): Add to comment.
12435 (arg_assoc_type): Prototype.
12436 (arg_assoc): Pass as many arguments as there are parameters.
12437 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
12438 OFFSET_REF.
12439 * expr.c (cpls_expand_expr): Remove dead code. Handle
12440 PTRMEM_CST.
12441 * friend.c (do_friend): Lookup friends when in nested classes.
12442 Change comments.
12443 * init.c (build_offset_ref): Do lookup even for classes that are
12444 only partially defined.
12445 (decl_constant_value): Remove dead code.
12446 * method.c (build_overload_value): Remove hack where by TYPE was
12447 not a TYPE. Handle PTRMEM_CST.
12448 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12449 should go.
12450 * parse.y (components, notype_components, component_decl,
12451 component_decl_1, component_declarator, component_declarator0):
12452 Now all are itype rather than ttype. Rework to add members to
12453 classes on the fly.
12454 (typesqpecqual_reserved): Use check_multiple_declarators.
12455 (structsp): Update class to finish_class_definition.
12456 (do_xref_defn): Unsplit into named_class_head.
12457 (access_specifier): Set current_access_specifier.
12458 * pt.c (set_current_access_from_decl): New function.
12459 (finish_member_template_decl): Don't take the parameters.
12460 (comp_template_args): Make more robust.
12461 (lookup_template_class): Don't use current_local_enum.
12462 (for_each_template_parm): Handle PTRMEM_CST.
12463 (instantiate_class_template): Use set_current_access_from_decl,
12464 finish_member_declaration and unreverse_member_declarations. Set
12465 lineno/input_filename before generating implicit member functions.
12466 (type_unification_real): Don't assume back-unification happens
12467 only for the last argument.
12468 (regenerate_decl_from_template): Call pushclass a bit earlier.
12469 (tsubst_chain): Remove.
12470 (tsubst_enum): Use set_current_access_from_decl.
12471 (set_mangled_name_for_template_decl): Fix indentation.
12472 * search.c (lookup_fnfields_1): Change iteration through
12473 CLASSTYPE_METHOD_VEC.
12474 (dfs_pushdecls): Likewise.
12475 (dfs_compress_decls): Likewise.
12476 (add_conversions): Likewise.
12477 * semantics.c (finish_class_definition): Don't take components.
12478 Change call to finish_struct.
12479 (finish_member_declaration): New function.
12480 (finish_member_class_template): Don't take template parameters.
12481 Change call to grok_x_components. Call finish_member_template_decl.
12482 (check_multiple_declarators): New function.
12483 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12484 a passed in fieldlist.
12485 * tree.c (search_tree): Handle PTRMEM_CST.
12486 (mapcar): Likewise.
12487 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12488 INTEGER_CSTs, for pointer-to-data members.
12489
12490 * call.c (resolve_args): Resolve template specializations, if
12491 possible.
12492
12493 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12494
12495 * Makefile.in (spew.o): Depend on toplev.h.
12496
12497 * call.c (compare_ics): Initialize variables `deref_from_type2',
12498 `deref_to_type1' and `deref_to_type2'.
12499
12500 * except.c (get_eh_type): Hide prototype and definition.
12501 (process_start_catch_block_old): Remove unused static prototype.
12502
12503 * pt.c (tsubst_decl): Initialize variable `argvec'.
12504
12505 * spew.c: Include toplev.h.
12506
12507 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
12508
12509 * pt.c (instantiate_decl): Do save and restore file position.
12510
12511 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
12512
12513 * method.c (build_decl_overload_real): Clear
12514 numeric_output_need_bar after __.
12515
12516 1998-10-05 Nathan Sidwell <nathan@acm.org>
12517
12518 * call.c (build_new_method_call): Issue 'incomplete type' error,
12519 if class is not defined.
12520
12521 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12522
12523 * call.c (build_object_call): Move declaration of variable
12524 `fn' into the scope where it is used. Don't access variable
12525 `fn' when it is uninitialized, instead use `fns'.
12526
12527 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12528
12529 * errfn.c (cp_thing): Print buf as a string not as a printf format
12530 to avoid problems with the operator%. Consequently, `%%' sequences
12531 in format are copied as `%' in buf.
12532
12533 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
12534
12535 * pt.c (pop_tinst_level): Call extract_interface_info.
12536 (instantiate_decl): Don't save and restore file position.
12537
12538 * decl.c (cp_finish_decl): Make statics in extern inlines and
12539 templates common, if possible and the target doesn't support weak
12540 symbols.
12541
12542 * decl.c (grokdeclarator): Remove redundant calls to
12543 build_type_variant and some duplicated code.
12544 * sig.c (build_signature_reference_type): Only take the type parm.
12545 (build_signature_pointer_type): Likewise.
12546 * tree.c (build_cplus_method_type): Adjust.
12547 * cp-tree.h: Update.
12548
12549 1998-10-04 Mark Mitchell <mark@markmitchell.com>
12550
12551 * call.c (build_over_call): Make pedwarns about dropped qualifiers
12552 into full-fledged errors.
12553 * cvt.c (convert_to_reference): Likewise.
12554 * typeck.c (convert_for_assignment): Likewise.
12555
12556 * search.c (expand_upcast_vtables): In addition to unsetting
12557 TREE_READONLY, remove top-level const type qualifier.
12558
12559 1998-10-03 Mark Mitchell <mark@markmitchell.com>
12560
12561 * class.c (current_class_ptr, current_class_ref): Clarify
12562 documentation.
12563 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12564 NOP type conversions.
12565 * decl.c (decls_match): Use comptypes directly; ignore
12566 qualifiers on the DECL.
12567 (duplicate_decls): Remove qualifier checks on DECL.
12568 (grokdeclarator): Make the type built up include top-level
12569 qualifiers.
12570 * decl2.c (do_dtors): Fix spelling error.
12571 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
12572 when printing type information.
12573 * init.c (build_new_1): Add documentation. Deal with the fact
12574 that type of allocated memory now contains qualifiers.
12575 * lex.c (is_global): Improve error-recovery.
12576 * sig.c (build_member_function_pointer): Don't cast away const
12577 on fields of sigtable_entry_type.
12578 * tree.c (lvalue_type): Don't look at top-level qualifiers on
12579 expressions.
12580 * typeck.c (decay_conversion): Likewise.
12581 (build_component_ref): Make sure the type of the COMPONENT_REF
12582 contains top-level qualifiers, as appropriate. Improve
12583 error-handling.
12584 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
12585 (build_array_ref): Likewise.
12586 (build_unary_op): Improve error-recovery.
12587 (unary_complex_lvalue): Make taking the address a bound member
12588 function an error, not a sorry.
12589 (build_conditional_expr): Look at the type qualifiers, not the
12590 qualifiers on the expression itself.
12591
12592 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
12593
12594 * decl2.c (merge_functions): Remove duplicates.
12595
12596 * decl2.c: Add -f{no-,}implicit-inline-templates.
12597 (import_export_decl): Check it.
12598
12599 * decl.c (lookup_name_real): Template parms also take precedence
12600 over implicit typename. Only warn if yylex.
12601
12602 * typeck.c (build_conditional_expr): Only fold if ifexp is an
12603 INTEGER_CST.
12604
12605 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
12606 instead of linkage.
12607
12608 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
12609
12610 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
12611 * class.c (build_vbase_pointer): Use it.
12612 * rtti.c (expand_class_desc): Likewise.
12613 * tree.c (build_vbase_pointer_fields): Likewise.
12614
12615 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
12616
12617 * decl.c (start_decl): Add invocation of
12618 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12619 (start_function): Add invocation of
12620 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12621
12622 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
12623 HANDLE_GENERIC_PRAGMAS.
12624
12625 1998-09-28 Anthony Green <green@cygnus.com>
12626
12627 * semantics.c (finish_asm_stmt): Always permit volatile asms.
12628
12629 1998-09-28 Mark Mitchell <mark@markmitchell.com>
12630
12631 * decl.c (grokdeclarator): Tighten checks for invalid
12632 destructors. Improve error-messages and error-recovery.
12633 * decl2.c (check_classfn): Don't assume that mangled destructor
12634 names contain type information.
12635
12636 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
12637
12638 * search.c (get_base_distance): Remove assert.
12639
12640 * decl2.c (build_anon_union_vars): Don't process a field with no
12641 name.
12642 (finish_anon_union): Also complain about local anon unions with no
12643 members.
12644
12645 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
12646
12647 * decl.c (lookup_namespace_name): If the name is a namespace,
12648 return it immediately.
12649
12650 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12651
12652 * cp-tree.h (define_case_label): Remove unused parameter.
12653 (check_java_method): Likewise.
12654 (grokclassfn): Likewise.
12655 (expand_aggr_init): Likewise.
12656 (build_x_delete): Likewise.
12657 (maybe_end_member_template_processing): Likewise.
12658 (unshare_base_binfos): Add prototype.
12659 (string_conv_p): Likewise.
12660 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12661
12662 * cvt.c (build_up_reference): Remove unused parameter
12663 `checkconst', all callers changed.
12664 (build_type_conversion): Mark parameter `code' with
12665 ATTRIBUTE_UNUSED.
12666 (build_expr_type_conversion): Initialize variable `conv'.
12667
12668 * decl.c (push_namespace): Initialize variable `d'.
12669 (define_case_label): Remove unused parameter `decl', all callers
12670 changed.
12671
12672 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12673 `argc' with ATTRIBUTE_UNUSED.
12674 (grokclassfn): Remove unused parameter `cname', all callers
12675 changed.
12676 (check_java_method): Likewise for parameter `ctype'.
12677 (copy_assignment_arg_p): Mark parameter `virtualp' with
12678 ATTRIBUTE_UNUSED.
12679 (finish_prevtable_vardecl): Likewise for parameter `prev'.
12680
12681 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12682
12683 * init.c (expand_aggr_init_1): Remove unused parameter
12684 `alias_this', all callers changed.
12685 (expand_aggr_init): Likewise.
12686 (expand_default_init): Likewise.
12687 (build_new_1): Initialize variable `susp'.
12688 (build_x_delete): Remove unused parameter `type', all callers
12689 changed.
12690
12691 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12692 ATTRIBUTE_UNUSED.
12693 (readescape): Use (unsigned) value in shift.
12694 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
12695 comparing to a signed quantity.
12696
12697 * pt.c (maybe_end_member_template_processing): Remove unused
12698 parameter `decl', all callers changed.
12699 (check_explicit_specialization): Add braces around empty body in
12700 an else-statement.
12701 (current_template_args): Initialize variable `args'.
12702 (lookup_template_class): Likewise for variable `prev_local_enum'.
12703 (tsubst_decl): Likewise for variable `r'.
12704 (set_mangled_name_for_template_decl): Initialize variable
12705 `context'.
12706
12707 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12708 Likewise for variable `i'.
12709 (yylex): Initialize variable `trrr'.
12710
12711 * typeck.c (compparms): Mark variable `strict' with
12712 ATTRIBUTE_UNUSED.
12713
12714 * xref.c (simplify_type): Cast argument of ctype function to
12715 `unsigned char'.
12716
12717 1998-09-24 Mark Mitchell <mark@markmitchell.com>
12718
12719 * cp-tree.h (language_lvalue_valid): Remove.
12720 * decl.c (grokdeclarator): Don't disallow references to functions.
12721 * tree.c (lvalue_p_1): New function, combining duplicated
12722 code from ...
12723 (lvalue_p): Use it.
12724 (real_lvalue_p): Likewise.
12725 * typeck.c (language_lvalue_valid): Remove.
12726 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12727 they don't have TREE_READONLY set.
12728 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12729
12730 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
12731
12732 * spew.c (yylex): Give diagnostic.
12733 * hash.h (is_reserved_word): Add export.
12734 * gxx.gperf: Likewise.
12735 * lex.h (rid): Add RID_EXPORT.
12736 * lex.c (init_parse): Likewise.
12737
12738 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12739
12740 * friend.c (do_friend): Make warning a full sentence.
12741
12742 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12743
12744 * parse.y (component_decl_list): Improve error-recovery.
12745
12746 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
12747
12748 * decl.c (make_typename_type): Move error to point where name
12749 variable can be used by dump_type.
12750
12751 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12752
12753 * decl.c (grokfndecl): Improve error-recovery.
12754 * decl2.c (grokfield): Likewise.
12755 * pt.c (finish_member_template_decl): Likewise.
12756
12757 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
12758
12759 * method.c (hack_identifier): Finding multiple members is always
12760 an error.
12761
12762 1998-09-21 Per Bothner <bothner@cygnus.com>
12763
12764 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
12765
12766 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
12767
12768 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12769
12770 1998-09-20 Mark Mitchell <mark@markmitchell.com>
12771
12772 * class.c (maybe_warn_about_overly_private_class): Reformat.
12773
12774 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
12775
12776 * exception.cc (__cplus_type_matcher): Realign some code.
12777
12778 1998-09-16 Mark Mitchell <mark@markmitchell.com>
12779
12780 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12781 (tinfo2.o): Likewise.
12782 (exception.o): Likewise.
12783 (new.o): Likewise.
12784 (opnew.o): Likewise.
12785 (opnewnt.o): Likewise.
12786 (opvnew.o): Likewise.
12787 (opvnewnt.o): Likewise.
12788 (opdel.o): Likewise.
12789 (opdelnt.o): Likewise.
12790 (opvdel.o): Likewise.
12791 (opvdelnt.o): Likewise.
12792
12793 1998-09-16 Richard Henderson <rth@cygnus.com>
12794
12795 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12796
12797 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
12798
12799 * call.c (build_field_call): Handle static data members too.
12800
12801 * typeck.c (comptypes): When comparing pointer types, check
12802 whether referred types match even in strictest modes.
12803
12804 1998-09-15 Mark Mitchell <mark@markmitchell.com>
12805
12806 * cp-tree.h: Revert previous change.
12807 (finish_struct_methods): Remove declaration.
12808 * class.c: Revert previous change.
12809 (maybe_warn_about_overly_private_class): New function.
12810 (finish_struct_methods): Declare here, and make static. Remove
12811 unnecessary parameters. Tidy slightly. Use
12812 maybe_warn_about_overly_private_class.
12813 (finish_struct_1): Adjust. Remove check for private constructors,
12814 now done elsewhere.
12815 (finish_struct): Adjust.
12816
12817 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12818
12819 * except.c (expand_start_catch_block): No need to check for new
12820 exception model.
12821 (process_start_catch_block_old): Deleted.
12822 (process_start_catch_block): Add call to start_decl_1().
12823 (expand_end_catch_block): Add call to end_catch_handler().
12824 * exception.cc (__cplus_type_matcher): Only check the exception
12825 language if there is an exception table.
12826
12827 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12828
12829 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12830 as used to prevent conflicts with virtual function tables.
12831
12832 1998-09-14 Mark Mitchell <mark@markmitchell.com>
12833
12834 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12835 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12836 * class.c (maybe_class_too_private_p): New function.
12837 (finish_struct_methods): Use it.
12838 (finish_struct_1): Likewise.
12839 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12840 appropriate.
12841
12842 * pt.c (check_specialization_scope): Fix spelling error.
12843 (check_explicit_specialization): Remove code to handle explicit
12844 specializations in class scope; they are now correctly diagnosed
12845 as errors.
12846
12847 1998-09-10 Mark Mitchell <mark@markmitchell.com>
12848
12849 * decl.c (pushdecl): Don't copy types if the
12850 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12851 type.
12852
12853 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12854
12855 * class.c (get_enclosing_class): New function.
12856 (is_base_of_enclosing_class): Likewise.
12857 * cp-tree.h (get_enclosing_class): Declare.
12858 (is_base_of_enclosing_class): Likewise.
12859 * pt.c (coerce_template_parms): Use them.
12860
12861 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
12862
12863 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12864 null to decide whether to use it.
12865
12866 * error.c (dump_type_real): Handle NAMESPACE_DECL.
12867 * parse.y (base_class.1): Avoid crash on error.
12868
12869 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12870
12871 * decl.c (make_typename_type): If context is a namespace, the code
12872 is in error.
12873
12874 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
12875
12876 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12877
12878 1998-09-08 Mark Mitchell <mark@markmitchell.com>
12879
12880 * cp-tree.h (anonymous_namespace_name): Declare.
12881 * decl.c: Define it.
12882 (push_namespace): Use anonymous_namespace_name, rather than local
12883 static anon_name.
12884 * error.c (dump_decl): If a namespace is named
12885 anonymous_namespace_name, call it {anonymous}.
12886
12887 * decl.c (grokparms): Distinguish between references and pointers
12888 in error message.
12889
12890 1998-09-08 Richard Henderson <rth@cygnus.com>
12891 Mark Mitchell <mark@markmitchell.com>
12892
12893 * pt.c (process_partial_specialization): Consistently allocate
12894 and zero tpd.parms based on ntparms. Use tpd2.parms, not
12895 tpd.parms, where appropriate.
12896
12897 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
12898
12899 * Makefile.in (INCLUDES): Update after recent toplevel gcc
12900 reorganizations.
12901
12902 1998-09-05 Mark Mitchell <mark@markmitchell.com>
12903
12904 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12905 * class.c (finish_struct): Remove hackery to deal with explicit
12906 specializations in class scope.
12907 * decl.c (grokfndecl): Improve error-recovery.
12908 * decl2.c (grokfield): Likewise.
12909 * pt.c (check_specialization_scope): New function.
12910 (begin_specialization): Call it.
12911 (process_partial_specialization): New function, split out from
12912 push_template_decl. Check partial specializations more
12913 stringently.
12914 (push_template_decl): Call it.
12915 (check_explicit_specialization): Don't attempt to handle explicit
12916 specializations in class scope.
12917 (template_parm_data): Document. Add current_arg and
12918 arg_uses_template_parms.
12919 (mark_template_parm): Set it.
12920 (tsubst_arg_types): Remove unused variable.
12921 * semantics.c (begin_class_definition): Tweak.
12922
12923 1998-09-04 Mark Mitchell <mark@markmitchell.com>
12924
12925 * inc/typeinfo (type_info::type_info(const char*)): Make
12926 `explicit'.
12927
12928 * cp-tree.h (hash_tree_cons_simple): New macro.
12929 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
12930 (coerce_template_parms): Use make_temp_vec, instead of
12931 make_tree_vec. Document this behavior.
12932 (lookup_template_class): Likewise.
12933 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12934 Remove dead code (and add assertion to check its deadness). Fix
12935 bug w.r.t. exception specifications.
12936
12937 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
12938
12939 * decl2.c (import_export_vtable): Always make artificials comdat.
12940 (import_export_decl): Likewise.
12941 * pt.c (mark_decl_instantiated): Likewise.
12942
12943 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12944
12945 * cp-tree.h (finish_globally_qualified_member_call_expr):
12946 Rename to ...
12947 (finish_qualified_call_expr).
12948 * semantics.c: Likewise.
12949 * parse.y (primary): Use it.
12950 * method.c (hack_identifier): Remove redundant code.
12951
12952 * init.c (resolve_offset_ref): Call convert_from_reference to
12953 handle members of reference type. Improve error recovery.
12954
12955 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
12956
12957 * cp-tree.h: Declare warn_nontemplate_friend.
12958 * decl2.c (lang_decode_option): Set.
12959 * lang-options.h: Add -Wnon-template-friend.
12960 * friend.c (do_friend): Use to toggle non-template function warning.
12961
12962 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12963
12964 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12965 corresponding INTEGER_CSTs when processing_template_decl.
12966 * pt.c (tsubst_enum): Tweak accordingly.
12967
12968 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12969
12970 * decl.c (pushdecl_class_level): Add warning here.
12971 (pushdecl): Tweak.
12972
12973 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
12974
12975 * cvt.c (convert_pointer_to_real): Tidy.
12976 * search.c (get_base_distance_recursive): Simplify.
12977 (get_base_distance): Likewise.
12978
12979 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12980 parms.
12981
12982 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
12983
12984 * lex.c (check_newline): Call HANDLE_PRAGMA before
12985 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
12986 if unknown pragmas are encountered.
12987 (handle_sysv_pragma): Interpret return code from
12988 handle_pragma_token (). Return success/failure indication rather
12989 than next unprocessed character.
12990 (pragma_getc): New function: retrieves characters from the
12991 input stream. Defined when HANDLE_PRAGMA is defined.
12992 (pragma_ungetc): New function: replaces characters back into the
12993 input stream. Defined when HANDLE_PRAGMA is defined.
12994
12995 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12996
12997 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12998 * class.c (build_vtable_entry_ref): Likewise.
12999
13000 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13001
13002 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
13003 * decl2.c (import_export_decl): Likewise.
13004 * pt.c (instantiate_decl): Use it.
13005
13006 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13007
13008 * decl.c (lookup_name_real): Also do implicit typename thing for
13009 artificial TYPE_DECLs.
13010 * search.c (lookup_field): Likewise.
13011 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13012 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13013 (enter_scope_of): Extract type from implicit typename.
13014 (begin_class_definition): Likewise.
13015 * lex.c (identifier_type): Handle implicit typename when checking
13016 for SELFNAME.
13017
13018 * cp-tree.h: Declare flag_strict_prototype.
13019 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13020 -fstrict-prototype.
13021 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13022 specified, set it to the value of pedantic.
13023
13024 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13025
13026 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13027
13028 1998-08-31 Mark Mitchell <mark@markmitchell.com>
13029
13030 * decl.c (finish_enum): Handle member enums of classes declared in
13031 template functions.
13032
13033 * decl2.c (grok_x_components): Strip attributes before calling
13034 groktypename.
13035
13036 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
13037
13038 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13039 -fenum-int-equivalence and -fno-nonnull-objects.
13040 * class.c (check_for_override): Remove support for -fall-virtual.
13041 (finish_struct_1): Likewise.
13042 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13043 * typeck.c (build_binary_op_nodefault): Likewise.
13044 * cvt.c (ocp_convert): Likewise.
13045 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13046 * class.c (build_vbase_path): Likewise.
13047
13048 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
13049
13050 * Makefile.in (INTERFACE): New, set to 1.
13051
13052 1998-08-30 Mark Mitchell <mark@markmitchell.com>
13053
13054 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13055 comparing with global_namespace.
13056 (dump_aggr_type): Likewise.
13057
13058 * decl.c (grokfndecl): Issue error on declaration of friend
13059 templates with explicit template arguments.
13060
13061 * pt.c (convert_template_argument): New function, split out
13062 from...
13063 (coerce_template_parms): Here.
13064 (tsubst): Attempt better error-recovery.
13065
13066 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
13067
13068 * pt.c (decl_template_parm_p): Add checks for
13069 TEMPLATE_TEMPLATE_PARM.
13070
13071 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13072
13073 * lex.c (do_identifier): Fix thinko in previous change.
13074
13075 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
13076
13077 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13078 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13079
13080 1998-08-28 Richard Henderson <rth@cygnus.com>
13081
13082 Add support for discarding unused virtual functions.
13083 * lang-options.h: Add -fvtable-gc.
13084 * cp-tree.h: Add flag_vtable_gc.
13085 * decl2.c (output_vtable_inherit): New fn.
13086 (finish_vtable_vardecl): Call it.
13087 * class.c (build_vtable_entry_ref): New fn.
13088 (build_vtbl_ref): Call it.
13089
13090 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13091
13092 * cp-tree.h (build_enumerator): Take the enumeration type as a
13093 parameter.
13094 * decl.c (finish_enum): Don't set the TREE_TYPE for the
13095 enumeration constant values if we're processing_template_decls.
13096 Don't set the type for the CONST_DECLs either; that's done in
13097 build_enumerator.
13098 (build_enumerator): Take the enumeration type as a
13099 parameter.
13100 * lex.c (do_identifier): Don't resolve enumeration constants while
13101 processing template declarations, even if they happen to be
13102 TEMPLATE_PARM_INDEXs.
13103
13104 * parse.y (current_enum_type): New variable.
13105 (primary): Don't allow statement-expression in local classes just
13106 as we don't in global classes.
13107 (structsp): Use current_enum_type.
13108 (enum_list): Likewise.
13109 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13110 finish_enum; they no longer occur.
13111
13112 * cp-tree.h (finish_base_specifier): New function.
13113 * parse.y (base_class): Use it.
13114 * semantics.c (finish_base_specifier): Define it.
13115
13116 * parse.y (structsp): Warn on use of typename outside of template
13117 declarations.
13118
13119 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13120
13121 * lex.c (handle_cp_pragma): Remove #pragma vtable.
13122 * lang-options.h: Remove +e options.
13123 * decl2.c (lang_decode_option): Likewise.
13124 (import_export_vtable): Don't check write_virtuals.
13125 (finish_vtable_vardecl, finish_file): Likewise.
13126 * search.c (dfs_debug_mark): Likewise.
13127 * semantics.c (begin_class_definition): Likewise.
13128 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13129
13130 * call.c (build_over_call): Check flag_elide_constructors.
13131 * decl2.c: flag_elide_constructors defaults to 1.
13132 * typeck.c (convert_arguments): Remove return_loc parm.
13133 (build_function_call_real): Adjust.
13134
13135 * search.c: Tear out all mi_matrix and memoize code.
13136 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13137 * lang-options.h: Remove documentation for -fhandle-exceptions,
13138 -fmemoize-lookups and -fsave-memoized.
13139 * cp-tree.h: Lose mi_matrix and memoize support.
13140 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13141 * class.c: Lose struct class_level.
13142 (pushclass, popclass): Lose memoize support.
13143 * init.c (build_offset_ref): Likewise.
13144
13145 Never change BINFO_INHERITANCE_CHAIN.
13146 * init.c (emit_base_init): Change modification of
13147 BINFO_INHERITANCE_CHAIN to an assert.
13148 * search.c (get_base_distance_recursive): Likewise.
13149 (get_base_distance): Likewise.
13150 (lookup_member): Likewise.
13151 (convert_pointer_to_single_level): Likewise.
13152 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
13153 (lookup_fnfields): Likewise.
13154 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13155 (unshare_base_binfos): Don't call propagate_binfo_offsets.
13156 (layout_basetypes): Call propagate_binfo_offsets instead of
13157 unshare_base_binfos.
13158 * decl.c (xref_basetypes): Call unshare_base_binfos.
13159 * pt.c (instantiate_class_template): Likewise.
13160 * tree.c (reverse_path): Remove 'copy' parm; always make a
13161 temporary copy.
13162 * class.c (build_vbase_path): Just call it.
13163 * search.c (compute_access): Likewise. Don't re-reverse.
13164
13165 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13166
13167 * class.c (build_vbase_path): Use reverse_path.
13168 (finish_base_struct): Move warnings for inaccessible bases to
13169 layout_basetypes.
13170 (modify_one_vtable): Remove check of TREE_USED (binfo).
13171 (fixup_vtable_deltas1): Likewise.
13172 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13173 (xref_tag): Remove binfos parameter.
13174 (make_binfo): Remove chain parameter.
13175 (reverse_path): Add copy parameter.
13176 * decl.c (init_decl_processing): Change calls to xref_tag.
13177 (xref_tag): Remove binfos parameter.
13178 (xref_basetypes): Change calls to make_binfo.
13179 * decl2.c (grok_x_components): Change calls to xref_tag.
13180 (handle_class_head): Likewise.
13181 * friend.c (do_friend): Likewise.
13182 * lex.c (make_lang_type): Change calls to make_binfo.
13183 * parse.y (structsp): Change calls to xref_tag.
13184 (named_complex_class_head_sans_basetype): Likewise.
13185 (named_class_head): Likewise.
13186 * rtti.c (init_rtti_processing): Likewise.
13187 * search.c (compute_access): Change calls to reverse_path.
13188 (dfs_get_vbase_types): Change calls to make_binfo.
13189 (get_vbase_types): Remove dead code.
13190 * tree.c (unshare_base_binfos): Change calls to make_binfo.
13191 (layout_basetypes): Warn here about inaccessible bases.
13192 (make_binfo): Remove chain parameter.
13193 (reverse_path): Add copy parameter.
13194
13195 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13196
13197 * class.c: #if 0 complete_type_p.
13198 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13199 * method.c (process_overload_item): Likewise.
13200 * typeck.c (comp_target_types): Likewise.
13201
13202 Stop sharing binfos for indirect virtual bases.
13203 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13204 (layout_basetypes): Likewise.
13205 (unshare_base_binfos): Copy vbases, too.
13206 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13207 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13208 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13209 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13210 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13211 reference to BINFO_VIA_PUBLIC.
13212 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13213 (push_class_decls): Use them.
13214 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13215 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13216
13217 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13218
13219 * decl.c (build_enumerator): Set DECL_CONTEXT for the
13220 CONST_DECLs.
13221
13222 1998-08-26 Mark Mitchell <mark@markmitchell.com>
13223
13224 * cp-tree.h (finish_enum): Change prototype.
13225 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13226 VALUES parameter. Don't try to compute mins/maxs if
13227 processing_template_decl.
13228 * parse.y (structsp): Use new calling sequence for finish_enum.
13229 * pt.c (tsubst_enum): Likewise. Take the new type as input.
13230 (lookup_template_class): Remove unused variables. Tweak.
13231 Register enums on instantiation list before substituting
13232 enumeration constants.
13233 (tsubst_decl): Remove unused variables.
13234 (regenerate_decl_from_template): Likewise.
13235
13236 * decl.c (duplicate_decls): Don't obliterate the
13237 DECL_TEMPLATE_INFO for a template if we're not replacing it with
13238 anything.
13239
13240 * lex.c (do_identifier): Fix typo in comment.
13241
13242 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13243
13244 * errfn.c: Remove stdarg.h/varargs.h.
13245 * tree.c: Likewise.
13246
13247 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
13248
13249 * pt.c (tsubst_copy): Only do typename overloading on an
13250 IDENTIFIER_NODE that happens to look like a typename if it actually
13251 has a type for us to use.
13252
13253 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13254
13255 * typeck.c (comp_cv_target_types): Split out...
13256 (comp_target_types): From here. Don't allow cv-qual changes under
13257 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
13258 (build_ptrmemfunc): Pass 1 to nptrs.
13259 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13260
13261 1998-08-25 Mark Mitchell <mark@markmitchell.com>
13262
13263 * search.c (dependent_base_p): Don't compare a binfo to
13264 current_class_type; use the TREE_TYPE of the binfo instead.
13265
13266 * cp-tree.h (CLASS_TYPE_P): Revise definition.
13267
13268 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13269
13270 * decl.c (duplicate_decls): Don't complain about different
13271 exceptions from an internal decl even if pedantic.
13272
13273 * typeck.c (convert_for_assignment): Converting from pm of vbase
13274 to derived is an error, not a sorry.
13275
13276 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13277 * class.c (fixed_type_or_null): Rename from
13278 resolves_to_fixed_type_p. Return the dynamic type of the
13279 expression, if fixed, or null.
13280 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
13281 does not match the static type.
13282 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
13283 resolves_to_fixed_type_p again.
13284
13285 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13286
13287 * pt.c (tsubst_decl): Move special case code for dealing with
13288 tricky friend templates here from ...
13289 (regenerate_decl_from_template): Here.
13290
13291 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13292
13293 * decl.c (start_decl): Remove redundant linkage check.
13294
13295 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
13296
13297 * typeck.c (c_expand_return): Handle the case that valtype
13298 is wider than the functions return type.
13299
13300 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13301
13302 * cp-tree.h (CLASS_TYPE_P): New macro.
13303 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13304 * pt.c (process_template_parm): Undo previous change.
13305
13306 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
13307
13308 * cp-tree.h: Declare.
13309 * pt.c (decl_template_parm_p): New function.
13310 * decl.c (pushdecl): Check decls for redeclaring template parms.
13311 (xref_tag): Make redeclaration an error, print decl.
13312 * decl2.c (grokfield): Check field_decls for redeclaration as well.
13313
13314 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13315
13316 * parse.y (primary): Fix up the type of string constants.
13317
13318 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13319
13320 * typeck.c (convert_for_initialization): Move check for odd uses
13321 of NULL to avoid duplicate warnings.
13322
13323 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13324
13325 * tree.c (lvalue_type): Fix for arrays.
13326 * typeck.c (string_conv_p): New fn.
13327 (convert_for_assignment): Use it.
13328 (build_unary_op): Use lvalue_type.
13329 * call.c (standard_conversion, convert_like): Use string_conv_p.
13330 (add_function_candidate): Use lvalue_type.
13331 * cvt.c (convert_to_reference): Likewise.
13332 * decl2.c (lang_decode_option): Ignore -traditional.
13333 * decl.c (init_decl_processing): flag_writable_strings inhibits
13334 flag_const_strings.
13335
13336 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
13337
13338 * lang-options.h (lang_options): Add fconst-strings to the list
13339 of valid options.
13340 * decl2.c (lang_f_options, lang_decode_option): Likewise.
13341
13342 1998-08-24 Nathan Sidwell <nathan@acm.org>
13343
13344 * lex.c (real_yylex): Don't warn about long long constants if
13345 we're allowing long long.
13346
13347 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
13348
13349 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13350 accessing bindings directly.
13351
13352 * search.c (my_tree_cons): Reimplement.
13353
13354 * lang-specs.h: Remove __HONOR_STD.
13355 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13356
13357 1998-08-23 Mark Mitchell <mark@markmitchell.com>
13358
13359 * decl.c (grokdeclarator): Complain about in-class initialization
13360 of aggregates and/or references.
13361 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13362 TEMPLATE_TYPE_PARMs.
13363
13364 * decl2.c (grok_array_decl): Add comment.
13365 (mark_used): Don't instantiate an explicit instantiation.
13366 * friend.c (make_friend_class): Remove bogus comment. Fix check
13367 for partial specializations.
13368 * pt.c (check_explicit_specialization): Don't
13369 SET_DECL_EXPLICIT_INSTANTIATION here.
13370 (mark_decl_instantiated): Or here.
13371 (do_decl_instantiation): Do it here, instead. Add checks for
13372 duplicate explicit instantiations, etc. Tidy.
13373 (do_type_instantiation): Likewise.
13374 (instantiate_decl): Improve comments. Complain about explicit
13375 instantiations where no definition is available.
13376
13377 * cp-tree.h (ansi_null_node): Remove.
13378 * call.c (build_over_call): Warn about converting NULL to an
13379 arithmetic type.
13380 * cvt.c (build_expr_type_conversion): Likewise. Use
13381 null_ptr_cst_p instead of expanding it inline.
13382 * decl.c (ansi_null_node): Remove.
13383 (init_decl_processing): Make null_node always have integral type.
13384 * except.c (build_throw): Warn about converting NULL to an
13385 arithmetic type.
13386 * lex.c (init_parse): Remove handling of ansi_null_node.
13387 * pt.c (type_unification_real): Don't convert NULL to void* type.
13388 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13389 (convert_for_assignment): Warn about converting NULL to an
13390 arithmetic type.
13391 (convert_for_initialization): Likewise.
13392
13393 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13394
13395 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13396 * pt.c (coerce_template_parms): Use no_linkage_check.
13397 * decl.c (grokvardecl): Likewise.
13398 (grokfndecl): Likewise. Members of anonymous types have no linkage.
13399
13400 * method.c (process_overload_item): Remove useless code.
13401
13402 1998-08-20 Per Bothner <bothner@cygnus.com>
13403
13404 Handle new'ing of Java classes.
13405 * init.c (build_class_classref): New function.
13406 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
13407 constructor does not return this; don't need to exception-protect.
13408
13409 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
13410 * decl2.c (acceptable_java_type): Handle template-derived types.
13411
13412 1998-08-20 Per Bothner <bothner@cygnus.com>
13413
13414 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
13415
13416 1998-08-20 Mark Mitchell <mark@markmitchell.com>
13417
13418 * decl.c (duplicate_decls): Always merge the old and new patterns
13419 for templates, regardless of whether or not the new one has
13420 DECL_INITIAL. Don't throw away specializations. Merge
13421 DECL_SAVED_TREE.
13422 * pt.c (tsubst_decl): Use the right pattern when calculating the
13423 complete args for a new template instance.
13424 (do_decl_instantiation): Fix typo in comment.
13425 (regenerate_decl_from_template): Deal with tricky friend template
13426 case.
13427 (instantiate_decl): Likewise.
13428
13429 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
13430
13431 * init.c (build_builtin_delete_call): Add missing assemble_external
13432 call.
13433
13434 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13435
13436 * parse.y (notype_unqualified_id): Also accept ~A<int>.
13437
13438 1998-08-19 Mark Mitchell <mark@markmitchell.com>
13439
13440 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13441 arithmetic.
13442 * except.c (build_throw): Warn when NULL is thrown, even with
13443 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
13444 thrown expression.
13445
13446 * cp-tree.h (ansi_null_node): New variable.
13447 * decl.c (ansi_null_node): New variable.
13448 (init_decl_processing): Initialize its type.
13449 * lex.c (init_parse): Initialize its value. Use ansi_null_node
13450 for null_node in non-ANSI mode.
13451 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13452 place of null_node to avoid spurious errors.
13453
13454 1998-08-17 Mark Mitchell <mark@markmitchell.com>
13455
13456 * cp-tree.h (enter_scope_of): New function.
13457 * parse.y (complex_direct_notype_declarator): Use it.
13458 * semantics.c (enter_scope_of): New function.
13459
13460 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
13461
13462 * decl.c (grokparms): No, here.
13463
13464 * decl.c (grokdeclarator): Catch parm with pointer to array of
13465 unknown bound here...
13466 * method.c (process_overload_item): ...not here.
13467
13468 * gxxint.texi: Remove obsolete documentation of overloading code.
13469
13470 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13471 * class.c (finish_struct_bits): Likewise.
13472
13473 * tree.c (lvalue_type): Fix for arrays.
13474 * typeck.c (build_unary_op): Use lvalue_type.
13475 * call.c (add_function_candidate): Likewise.
13476 * cvt.c (convert_to_reference): Likewise.
13477
13478 * decl2.c (lang_decode_option): Ignore -traditional.
13479
13480 * init.c (build_offset_ref): Don't mess with error_mark_node.
13481 * lex.c (do_scoped_id): Use cp_error.
13482
13483 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13484
13485 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
13486
13487 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13488
13489 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
13490
13491 * cp-tree.h (set_identifier_local_value): Provide prototype.
13492
13493 * decl2.c (do_namespace_alias): Remove unused variables `binding'
13494 and `old'.
13495
13496 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
13497
13498 * Makefile.in: Rename BBISON to BISON so that it can be properly
13499 inherited from the parent makefile.
13500
13501 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13502
13503 * lang-options.h: Add -finit-priority.
13504 * decl2.c: Likewise. Check flag_init_priority instead of
13505 USE_INIT_PRIORITY.
13506
13507 * decl2.c (setup_initp): New fn.
13508 (start_objects, finish_objects, do_ctors): Handle init_priority.
13509 (do_dtors, finish_file): Likewise.
13510
13511 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13512
13513 * pt.c (tsubst_copy): Hush warning.
13514
13515 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13516
13517 1998-08-12 Mark Mitchell <mark@markmitchell.com>
13518
13519 * pt.c (print_template_context): Don't abort when instantiating a
13520 synthesized method.
13521
13522 * decl.c (grokdeclarator): Issue errors on namespace qualified
13523 declarators in parameter lists or in class scope.
13524
13525 1998-08-09 Mark Mitchell <mark@markmitchell.com>
13526
13527 * pt.c (check_explicit_specialization): Don't abort on bogus
13528 explicit instantiations.
13529
13530 1998-08-07 Mark Mitchell <mark@markmitchell.com>
13531
13532 * typeck.c (require_complete_type): Use complete_type_or_else.
13533 (complete_type_or_else): Always return NULL_TREE on failure, as
13534 documented.
13535
13536 * pt.c (tsubst_aggr_type): Prototype.
13537 (tsubst_decl): New function, split out from tsubst. Set
13538 input_filename and lineno as appropriate.
13539 (pop_tinst_level): Restore the file and line number saved in
13540 push_tinst_level.
13541 (instantiate_class_template): Set input_filename and lineno as
13542 appropriate.
13543 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
13544 context for a TYPENAME_TYPE is complete.
13545
13546 * decl2.c (grokbitfield): Issue errors on bitfields declared with
13547 function type.
13548 (do_dtors): As in do_ctors, pretend to be a member of the same
13549 class as a static data member while generating a call to its
13550 destructor.
13551
13552 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13553 conversions, even in complex virtual base class hierarchies.
13554
13555 1998-08-06 Mark Mitchell <mark@markmitchell.com>
13556
13557 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13558 (TYPE_TEMPLATE_INFO): Likewise.
13559 (SET_TYPE_TEMPLATE_INFO): Likewise.
13560 (ENUM_TI_TEMPLATE): Likewise.
13561 (ENUM_TI_ARGS): Likewise.
13562 (lookup_nested_type_by_name): Remove.
13563 * decl.c (maybe_process_template_type_declaration): Handle enums.
13564 (start_enum): Don't check for primary-template enum declarations
13565 here.
13566 (finish_enum): Clean up, document. Make sure template enum
13567 constants get the correct type.
13568 (build_enumerator): Copy initializers for template enumerations,
13569 too.
13570 (grok_enum_decls): Document.
13571 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
13572 better. Build LOOKUP_EXPRs for local variables, even if they are
13573 TREE_PERMANENT.
13574 * pt.c (tsubst_enum): Remove field_chain parameter.
13575 (template_class_depth): Include the depth of surrounding function
13576 contexts.
13577 (push_template_decl): Check for primary-template enum declarations
13578 here. Deal with enumeration templates.
13579 (lookup_template_class): Likewise.
13580 (for_each_template_parm): Likewise.
13581 (instantiate_class_template): Don't call tsubst_enum directly,
13582 call tsubst instead, to instantiate enums. Deal with all
13583 field_chain issues here, not in tsubst_enum.
13584 (lookup_nested_type_by_name): Remove.
13585 (tsubst_aggr_type): Revise handling of enumeration types.
13586 (tsubst): Likewise.
13587 (tsubst_copy): Likewise.
13588 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
13589
13590 1998-08-04 Mark Mitchell <mark@markmitchell.com>
13591
13592 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
13593 uses template parameters.
13594 * method.c (build_template_parm_names): Use the full set of
13595 template arguments for tsubst'ing.
13596 (build_overload_identifier): Pass the full set of template
13597 arguments to build_template_parm_names, not just the
13598 innermost_args.
13599 * pt.c (TMPL_ARGS_DEPTH): Define using
13600 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
13601 (NUM_TMPL_ARGS): New macro.
13602 (add_outermost_template_args): Deal with the case where the outer
13603 args will be completely discarded.
13604 (coerce_template_parms): Use the full set of template arguments
13605 for tsubst'ing. Simplify. Add some asserts. Improve
13606 error messages.
13607 (lookup_template_class): Pass the full set of template arguments
13608 to coerce_template_parms.
13609 (tsubst): Add assertion.
13610 (do_type_instantiation): Don't instantiate member template
13611 classes.
13612
13613 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
13614 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
13615
13616 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
13617
13618 * method.c (set_mangled_name_for_decl): Change return type to void.
13619
13620 * decl.c (lookup_name_real): A namespace-level decl takes priority
13621 over implicit typename. Avoid doing the same lookup twice.
13622
13623 * search.c (dependent_base_p): New fn.
13624 (dfs_pushdecls, dfs_compress_decls): Use it.
13625
13626 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
13627 virtual functions if the type doesn't have any.
13628
13629 1998-08-03 Mark Mitchell <mark@markmitchell.com>
13630
13631 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
13632 uses template parameters.
13633
13634 1998-08-02 Mark Mitchell <mark@markmitchell.com>
13635
13636 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
13637 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13638 * lex.c (do_identifier): Don't use a second argument, or a type,
13639 when building LOOKUP_EXPRs.
13640 (do_identifier): Likewise.
13641 (do_scoped_id): Likewise.
13642 * method.c (hack_identifier): Improve error message.
13643 * pt.c (lookup_template_function): Don't needlessly call
13644 copy_to_permanent or build_min.
13645 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
13646 necessary.
13647 (do_decl_instantiation): Improve error message.
13648 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13649 (build_min): Copy the type to the permanent obstack, too.
13650
13651 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
13652
13653 * init.c (init_init_processing): Remove BI* handling.
13654 (build_builtin_call): Remove.
13655 (build_builtin_delete_call): New fn.
13656 (build_delete): Use it.
13657
13658 1998-07-31 Mark Mitchell <mark@markmitchell.com>
13659
13660 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13661 (maybe_check_template_type): New function.
13662 * decl.c (maybe_process_template_type_declaration): New function,
13663 split out from pushtag Call maybe_check_template_type.
13664 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
13665 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13666 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13667 * pt.c (template_class_depth_real): Generalization of ...
13668 (template_class_depth): Use it.
13669 (register_specialization): Use duplicate_decls for duplicate
13670 declarations of specializations.
13671 (maybe_check_template_type): New function.
13672 (push_template_decl_real): Fix comment.
13673 (convert_nontype_argument): Likewise.
13674 (lookup_template_class): Likewise. Avoid an infinite loop on
13675 erroneous code.
13676 (tsubst_friend_function): Fix comment.
13677 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13678 an IDENTIFIER_NODE.
13679 * semantics.c (begin_function_definition): Use
13680 reset_specialization to note that template headers don't apply
13681 directly to declarations after the opening curly for a function.
13682
13683 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
13684
13685 * decl.c (push_overloaded_decl): Use current_namespace instead of
13686 DECL_CONTEXT (decl) to determine where we go.
13687
13688 * decl.c (lookup_name_real): Fix typo.
13689
13690 1998-07-28 Mark Mitchell <mark@markmitchell.com>
13691
13692 * friend.c (is_friend): Be lenient with member functions to deal
13693 with nested friends.
13694
13695 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
13696
13697 * class.c (finish_struct_1): Convert integer_zero_node to
13698 ssizetype before passing it to set_rtti_entry.
13699 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13700 of any size to a pointer.
13701
13702 1998-07-27 Mark Mitchell <mark@markmitchell.com>
13703
13704 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13705 (build_template_decl_overload): Remove.
13706 (set_mangled_name_for_decl): New function.
13707 (innermost_args): Remove is_spec parameter.
13708 (most_specialized, most_specialized_class): Remove declarations.
13709 (lookup_template_class): Add entering_scope parameter.
13710 (maybe_process_partial_specialization): New function.
13711 (finish_template_decl): Likewise.
13712 (finish_template_type): Likewise.
13713 * class.c (finish_struct): Clean up processing of member template
13714 specializations.
13715 * decl.c (pushtag): Fix formatting.
13716 (lookup_tag): Improve handling of pseudo-global levels.
13717 (make_typename_type): Adjust call to lookup_template_class.
13718 (shadow_tag): Use maybe_process_partial_specialization.
13719 (xref_tag): Improve handling of member friends.
13720 (start_function): Call push_nested_class before
13721 push_template_decl. Don't call push_template_decl for
13722 specializations.
13723 * decl2.c (grok_x_components): Don't call xref_tag for
13724 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
13725 (grokclassfn): Use set_mangled_name_for_decl.
13726 (arg_assoc_class): Adjust call to innermost_args.
13727 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13728 * error.c (dump_function_name): Improve printing of template
13729 function names.
13730 * friend.c (is_friend): Don't compare types of decls to determine
13731 friendship, unless flag_guiding_decls.
13732 (make_friend_class): Partial specializations cannot be friends.
13733 (do_friend): Use set_mangled_name_for_decl. Call
13734 push_template_decl_real instead of push_template_decl.
13735 * method.c (build_decl_overload_real): Remove prototype. Give it
13736 external linkage.
13737 (build_overload_identififer): Adjust call to innermost_args.
13738 (build_template_decl_overload): Remove.
13739 (set_mangled_name_for_decl): New function.
13740 * parse.y (.finish_template_type): New non-terminal.
13741 (template_def): Use finish_template_decl. Use template_extdef
13742 instead of extdef.
13743 (template_extdef, template_datadef): New non-terminals, containing
13744 only those rules for things which can be templates.
13745 (datadef): Tidy.
13746 (template_type, self_template_type): Use .finish_template_type.
13747 (named_class_head): Use maybe_process_partial_specialization.
13748 * pt.c (mangle_class_name_for_template): Remove context parameter.
13749 (get_class_bindings): Remove outer_args parameter.
13750 (complete_template_args): Remove.
13751 (add_outermost_template_args): New function.
13752 (register_specialization): Return the specialization.
13753 (unregister_specialization): New function.
13754 (tsubst_template_parms): Likewise.
13755 (most_specialized, most_specialized_class): Prototype here as
13756 static.
13757 (original_template): Rename to most_general_template.
13758 (tsubst_template_parms): New function.
13759 (set_mangled_name_for_template_decl): Likewise.
13760 (TMPL_ARGS_DEPTH): New macro.
13761 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13762 (TMPL_ARGS_LEVEL): New macro.
13763 (SET_TMPL_ARGS_LEVEL): Likewise.
13764 (TMPL_ARG): Likewise.
13765 (SET_TMPL_ARG): Likewise.
13766 (TMPL_ARGS_DEPTH): Likewise.
13767 (finish_member_template_decl): Use finish_template_decl.
13768 (maybe_process_partial_specialization): New function, split out
13769 from tsubst.
13770 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13771 (maybe_begin_member_template_processing): Use new macros.
13772 (is_member_template): Likewise.
13773 (is_member_template_class): Likewise.
13774 (add_to_template_args): Likewise. Deal with multiple levels of
13775 args.
13776 (maybe_process_partial_specialization): New function.
13777 (retrieve_specialization): Add consistency check.
13778 (determine_specialization): Return full argument list.
13779 (check_explicit_specialization): Tweak friend handling. Use full
13780 argument lists. Simplify.
13781 (current_template_args): Use new macros.
13782 (push_template_decl_real): Change ill-named mainargs to specargs.
13783 Check that a partial specialization actually specializes at least
13784 one parameter. Improve friend handling. Modify for full
13785 template arguments.
13786 (classtype_mangled_name): Don't mangle the names of
13787 specializations.
13788 (lookup_template_class): Add entering_scope parameter. Use it to
13789 avoid finding a template type when an instantiation is required.
13790 Simplify. Use full template arguments.
13791 (tsubst_friend_function): Use unregister_specialization. Use new
13792 macros. Use full template arguments.
13793 (tsubst_friend_class): Substitute, using tsubst_template_parms,
13794 into the template parameters before passing them to
13795 redeclare_class_template.
13796 (instantiate_class_template): Simplify. Use full template
13797 arguments. Adjust calls to get_class_bindings. Use
13798 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
13799 (innermost_args): Use new macros.
13800 (tsubst_aggr_type): New function, split out from tsubst.
13801 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13802 conventions for lookup_template_class. Refine handling of partial
13803 instantiations. Remove calls to complete_template_args.
13804 Simplify. Add consistency checks. Use set_mangled_name_for_decl
13805 and set_mangled_name_for_template_decl.
13806 (tsubst_copy): Use tsubst_aggr_type.
13807 (instantiate_template): Use full template arguments.
13808 (more_specialized): Improve formatting.
13809 (more_specialized_class): Adjust calls to get_class_bindings.
13810 (get_bindings_real): Don't call complete_template_args.
13811 (most_specialized): Don't overwrite input; create a new list.
13812 (most_specialized_class): Use most_general_template.
13813 (regenerate_decl_from_template): Use unregister_specialization.
13814 Use full template arguments.
13815 (instantiate_decl): Use full template arguments.
13816 (set_mangled_name_for_template_decl): New function.
13817 * semantics.c (begin_class_definition): Use
13818 maybe_process_partial_specialization.
13819 (finish_member_class_template): New function.
13820 (finish_template_decl): Likewise.
13821 (finish_template_type): Likewise.
13822 (typeck.c): Don't crash after issuing a compiler_error.
13823 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13824
13825 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
13826
13827 * typeck2.c (build_functional_cast): Handle default-initialization.
13828
13829 * call.c (build_over_call): Pass 1 to popclass.
13830
13831 * parse.y (direct_notype_declarator): Add precedence declaration
13832 to notype_unqualified_id case.
13833 * Makefile.in (EXPECT): Adjust.
13834
13835 * tree.c (ovl_member): Fix for single function in OVL.
13836
13837 1998-07-27 Dave Brolley <brolley@cygnus.com>
13838
13839 * c-lex.c (yylex): Fix boundary conditions in character literal and
13840 string literal loops.
13841
13842 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
13843
13844 * decl.c (lookup_name_real): OK, do return the from_obj value
13845 unless got_object depends on template parms.
13846
13847 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13848
13849 * pt.c (coerce_template_parms): Also complain about local enums.
13850
13851 * cp-tree.h: Add prototype for set_identifier_local_value.
13852 * decl.c (set_identifier_local_value_with_scope): Make static,
13853 prototype.
13854 * search.c (covariant_return_p): Likewise.
13855 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13856
13857 * call.c (build_method_call): Only pull out the type of a destructor
13858 if it's a template type parm.
13859 * decl.c (lookup_name_real): Never return the from_obj value.
13860
13861 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13862
13863 * except.c (process_start_catch_block_old): Call start_decl_1 for
13864 catch parm.
13865 * decl.c (start_decl_1): Avoid duplicate error.
13866
13867 * init.c (expand_default_init): Only perform the initialization if
13868 it will do something.
13869
13870 1998-07-23 H.J. Lu (hjl@gnu.org)
13871
13872 * parse.y (base_class): Check for invalid base class.
13873
13874 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13875
13876 * decl2.c (import_export_template): Fold in...
13877 (import_export_class): ...to here. Handle dllimport/export.
13878
13879 * class.c (build_vtable): Pass at_eof to import_export_vtable.
13880 (prepare_fresh_vtable): Likewise.
13881 * decl2.c (import_export_class): Split out...
13882 (finish_prevtable_vardecl): From here.
13883 * class.c (finish_struct_1): Call import_export_class if at_eof.
13884
13885 * decl.c (start_function): #if 0 mysterious code I wrote and have
13886 forgotten why.
13887 * rtti.c (get_tinfo_fn): If this is for a class type, set
13888 DECL_CONTEXT.
13889
13890 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
13891
13892 * inc/exception: Change terminate and unexpected to ().
13893
13894 * parse.y (named_class_head_sans_basetype_defn): A
13895 named_class_head_sans_basetype followed by '{' or ':' is a defn.
13896
13897 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
13898
13899 * tree.c (canonical_type_variant): New fn to handle arrays.
13900 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13901 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
13902 * method.c (process_overload_item): Use build_overload_value for
13903 arrays.
13904
13905 1998-07-20 Dave Brolley <brolley@cygnus.com>
13906
13907 * lex.c (mbchar.h): #include it.
13908 (GET_ENVIRONMENT): New macro.
13909 (init_parse): Set character set based on LANG environment variable.
13910 (real_yylex): Handle multibyte characters in character literals.
13911 (real_yylex): Handle multibyte characters in string literals.
13912
13913 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
13914
13915 * lex.c (do_identifier): Look for class value even if we don't
13916 have a global value. Do implicit declaration if parsing is 2.
13917 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13918 lookup.
13919
13920 1998-07-19 Mark Mitchell <mark@markmitchell.com>
13921
13922 * decl.c (pushtag): Revert previous change.
13923 * pt.c (lookup_template_class): Don't put out debugging
13924 information for types that use template parameters.
13925
13926 * decl.c (pushtag): Don't put out debugging information for
13927 compiler-generated typedefs.
13928
13929 * error.c (dump_type_real): Don't crash when presented with
13930 intQI_type_node or the like.
13931
13932 * semantics.c (finish_translation_unit): Fix spelling error in
13933 comment.
13934
13935 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
13936
13937 * decl.c (lookup_name_real): Pull out single function here.
13938 (select_decl): Not here.
13939 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13940
13941 * decl.c (qualify_lookup): Tweak again.
13942
13943 * pt.c (lookup_template_class): Don't mess with the context of the
13944 instantiation.
13945 * decl2.c (current_decl_namespace): Remove special handling for
13946 templates.
13947
13948 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13949 a member template specialization.
13950
13951 * tree.c (ovl_member): Use decls_match to compare functions.
13952 * decl.c (decls_match): Check the context of a function.
13953
13954 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13955 in Koenig lookup support rules.
13956 * semantics.c (finish_call_expr): Handle the new cases.
13957
13958 * typeck.c (build_x_function_call): Handle overloaded methods.
13959
13960 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13961
13962 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13963
13964 * semantics.c (finish_object_call_expr): Revert previous change.
13965 * call.c (build_new_method_call): Likewise. Instead, convert
13966 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13967
13968 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13969
13970 * decl.c (qualify_lookup): Handle templates.
13971
13972 * decl2.c (do_using_directive): Don't pass ancestor.
13973 * decl.c (push_using_directive): Calculate ancestor.
13974
13975 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13976 * decl.c (pushdecl): Move type shadowing handling from here...
13977 (duplicate_decls): ...to here.
13978 * decl.c (set_identifier_local_value_with_scope): New fn.
13979 (pushdecl): Use it.
13980 (set_identifier_local_value, lookup_type_current_level): New fns.
13981 * decl2.c (do_local_using_decl): Handle types and binding level
13982 stuff properly.
13983
13984 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13985 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13986 (lookup_namespace_name): Likewise.
13987 * typeck.c (build_unary_op): Not here anymore.
13988
13989 * decl2.c (do_class_using_decl): Make sure we get an identifier.
13990 * class.c (handle_using_decl): Ignore TYPE_DECLs.
13991
13992 * decl.c (qualify_lookup): New fn.
13993 (lookup_name_real): Use it.
13994
13995 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13996
13997 * decl2.c (add_using_namespace): When directly using a namespace
13998 that was indirect before, promote it.
13999
14000 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
14001 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
14002 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
14003 * decl.c (select_decl): Replace two flag parameters by one.
14004 (unqualified_namespace_lookup): Likewise, pass flag.
14005 (lookup_flags): New function.
14006 (lookup_name_real): Compute flags, pass them.
14007 (lookup_namespace_name): Call with zero-flag.
14008 * decl2.c (ambiguous_decl): Add flag parameter, complain only
14009 according to flags.
14010 (lookup_using_namespace, qualified_lookup_using_namespace):
14011 Add flag parameter, pass them through.
14012 * lex.c (do_scoped_id): Call with zero-flag.
14013
14014 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14015
14016 * typeck.c (convert_for_assignment): Use comptypes.
14017
14018 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14019
14020 * semantics.c (finish_object_call_expr): Move test for the
14021 function called being a TYPE_DECL to ...
14022 * call.c (build_new_method_call): Here.
14023
14024 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14025
14026 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14027 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14028
14029 * lex.c (looking_for_typename): Don't initialize.
14030
14031 * decl2.c (ambiguous_decl): Clarify error message.
14032
14033 * decl.c (push_using_directive): Iterate over namespaces used
14034 indirectly.
14035
14036 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14037
14038 * decl2.c (add_using_namespace): Iterate over namespaces used
14039 indirectly.
14040
14041 * decl.c (lookup_name_real): Accept namespace aliases as locals.
14042 (cat_namespace_levels): Ignore aliases.
14043 (duplicate_decls): Ignore duplicate aliases.
14044 * decl2.c (do_namespace_alias): Process block level namespace
14045 aliases. Store alias with pushdecl. Remove odr errors.
14046 * parse.y (namespace_alias): New non-terminal.
14047 (extdef): Use it.
14048
14049 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14050
14051 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14052 Handle TEMPLATE_TYPE_PARM.
14053 (arg_assoc): Rewrite.
14054
14055 * pt.c (complete_template_args): Don't look at the context unless
14056 we have to.
14057
14058 * method.c (build_decl_overload_real): Fix namespace handling.
14059
14060 * typeck.c (build_unary_op): Extract a lone function from an
14061 OVERLOAD.
14062
14063 * call.c (build_scoped_method_call): Handle getting a namespace
14064 for basetype in a destructor call.
14065 (check_dtor_name): Handle enums.
14066
14067 * parse.y (using_directive): New nonterminal.
14068 (extdef, simple_stmt): Use it.
14069
14070 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14071
14072 * decl2.c (add_function): Move error message ...
14073 (arg_assoc_namespace): ... from here.
14074
14075 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14076
14077 * parse.y (namespace_qualifier): Fix multiple level handling.
14078 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14079 (arg_assoc): Don't skip the first argument of a function.
14080
14081 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
14082
14083 * search.c (my_tree_cons): Clean up.
14084
14085 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14086
14087 * call.c (joust): Don't warn about "confusing" conversions to the
14088 same type.
14089
14090 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14091
14092 * class.c (push_nested_class): Complain about namespaces.
14093 * decl.c (start_decl): Enter the object's namespace.
14094 (cp_finish_decl): Leave it.
14095 (grokdeclarator): Likewise.
14096 * decl2.c (check_decl_namespace): New function.
14097 (finish_file): Call it.
14098 * parse.y (complex_direct_notype_declarator): Set complexity
14099 of namespace-qualified ids to -1, enter the namespace.
14100
14101 * method.c (build_template_decl_overload): Expect _DECL as first
14102 parameter. Put context temporarily into current_namespace.
14103 * pt.c (check_explicit_specialization): Change caller.
14104 (tsubst): Likewise.
14105
14106 * init.c (build_offset_ref): Call mark_used and
14107 convert_from_reference for namespace members.
14108
14109 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
14110
14111 * search.c (my_tree_cons): The bitfield is at index 2.
14112
14113 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
14114
14115 * lang-options.h: Format changed to work with new --help support
14116 in gcc/toplev.c
14117
14118 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
14119
14120 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14121 Do Koenig lookup in CALL_EXPR.
14122 (arg_assoc): Handle error_mark.
14123 * lex.c (is_global): New function.
14124 (do_identifier): Expect arguments for Koenig lookup.
14125 * parse.y (primary): Add rules for calls of unqualified function calls.
14126 (do_id): Change call of do_identifier.
14127 * pt.c (finish_stmt_expr): Likewise.
14128 * semantics.c (finish_id_expr): Likewise.
14129 (finish_call_expr): Add integer parameter to indicate
14130 argument-dependent lookup.
14131
14132 * decl.c (struct binding_level): New field using_directives.
14133 (push_using_decl): Not sorry anymore.
14134 (push_using_directive): New function.
14135 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14136 (unqualified_namespace_lookup): New function, code from ...
14137 (lookup_name_real): ... here.
14138 * decl2.c (lookup_using_namespace): Pass using list instead of
14139 initial scope.
14140 (validate_nonmember_using_decl): New function.
14141 (do_nonmember_using_decl): New function.
14142 (do_toplevel_using_decl): Use them.
14143 (do_local_using_decl): New function.
14144 (do_using_directive): Support block-level directives.
14145 * parse.y (simple_stmt): Support using declarations and
14146 directives.
14147 (namespace_qualifier, namespace_using_decl): New non-terminals.
14148
14149 * xref.c (classname): New function.
14150 (GNU_xref_hier): Change class and base parameters to tree.
14151 * decl.c (xref_baseypes): Change caller.
14152 * friend.c (make_friend_class): Likewise.
14153
14154 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14155
14156 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14157 comparison.
14158
14159 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14160 template template parameter, record its use.
14161 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14162 its template arguments if exists.
14163
14164 * pt.c (coerce_template_template_parms): New function equivalent
14165 to coerce_template_parms when IS_TMPL_PARM is true.
14166 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
14167 all callers changed.
14168
14169 (coerce_template_parms): Access ARGLIST properly when creating a
14170 new vector. Only accept implicit TYPE_DECL as valid argument for
14171 a template template parameter when it is a base class of
14172 current_class_type. Don't display error message when COMPLAIN is
14173 false.
14174
14175 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
14176
14177 * repo.c (get_base_filename): Use file_name_nondirectory.
14178 (open_repo_file): Likewise.
14179 * cp-tree.h (file_name_nondirectory): Add prototype.
14180
14181 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
14182
14183 * friend.c (do_friend): Pull the identifier out of declarator.
14184 Use cp_error and friends.
14185 * decl2.c (qualified_lookup_using_namespace): Fix call to
14186 purpose_member.
14187 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14188 (grokvardecl): Use DECL_CLASS_SCOPE_P.
14189 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14190 * class.c (warn_hidden): Fix for OVERLOAD.
14191 From grahams@rcp.co.uk:
14192 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14193 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14194
14195 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
14196
14197 * g++.1 (-traditional): Remove duplicated documentation.
14198
14199 1998-07-11 Mark Mitchell <mark@markmitchell.com>
14200
14201 * method.c (flush_repeats): Add nrepeats parameter.
14202 (issue_nrepeats): Likewise.
14203 (is_back_referenceable_type): New function. Don't back-reference
14204 TEMPLATE_TYPE_PARMs as well as simple types like integers.
14205 (build_mangled_name_for_type): Likewise.
14206 (build_mangled_name_for_type_with_Gcode): Likewise.
14207 (lasttype): Remove.
14208 (nrepeats): Likewise.
14209 (Nrepeats): Likewise.
14210 (start_squangling): Don't clear the variables removed above.
14211 (end_squangling): Likewise.
14212 (flush_repeats): Tidy. Use nrepeats parameter rather than
14213 Nrepeats global.
14214 (issue_nrepeats): Likewise, but with nrepeats global. Use
14215 is_backreferenceable_type.
14216 (build_overload_nested_name): Tidy. Add comment. Use
14217 build_mangled_name_for_type.
14218 (build_underscore_int): Comment.
14219 (build_overload_scope_ref): Use build_mangled_name_for_type.
14220 (build_overload_int): Likewise.
14221 (build_template_template_parm_names): Tidy.
14222 (build_template_parm_names): Use build_mangled_name_for_type.
14223 (build_overload_identifier): Add comments.
14224 (build_mangled_name_for_type_with_Gcode): Split out from
14225 build_mangled_name.
14226 (build_mangled_name_for_type): Use it.
14227 (build_mangled_name): Rework to use build_mangled_name_for_type
14228 and to not use global nrepeats/Nrepeats. Tidy.
14229 (process_modifiers): Tidy.
14230 (check_btype): Use is_backreferenceable_type. Add comment.
14231 Rename `node' to `type'.
14232 (process_overload_item): Set numeric_output_need_bar here.
14233 Use build_mangled_name_for_type. Tidy.
14234 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
14235 build_mangled_name_for_type.
14236
14237 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14238 for TYPE_DECLs.
14239
14240 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
14241
14242 * cp-tree.h (warn_long_long): Define.
14243 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14244 warning "ANSI C++ does not support `long long'".
14245 * decl2.c (warn_long_long): Define.
14246 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14247
14248 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
14249
14250 * decl.c (xref_tag): Handle attributes between 'class' and name.
14251 * parse.y (aggr): Likewise.
14252 * semantics.c (finish_class_definition): Likewise.
14253 * Makefile.in (EXPECTED): Adjust.
14254
14255 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14256 * decl2.c: Define them.
14257 (lang_decode_option): Handle them.
14258 * lang-options.h: Add -foptional-diags.
14259 * class.c (finish_struct): Don't complain about multiple meanings of
14260 name if -fno-optional-diags.
14261 * decl.c (pushdecl_class_level): Likewise.
14262 * lex.c (real_yylex): Check warn_multichar.
14263
14264 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
14265
14266 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14267
14268 * tree.c (make_binfo): Fix length.
14269
14270 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
14271
14272 * decl2.c (lang_decode_option): Remove warn_template_debugging.
14273 * lang-options.h: Likewise.
14274
14275 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14276
14277 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14278 (process_start_catch_block): Likewise for variables
14279 `false_label_rtx', `call_rtx' and `return_value_rtx'.
14280
14281 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
14282
14283 * tree.c (build_srcloc): Make sure we allocate this node on the
14284 permanent obstack.
14285
14286 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
14287
14288 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14289 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14290 (lang_specific_driver): Only add -lm automatically if need_math is
14291 nonzero.
14292
14293 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
14294
14295 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
14296
14297 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14298
14299 * Makefile.in (EXPR_H): New dependency variable.
14300 (decl2.o): Depend on $(EXPR_H).
14301 (typeck.o): Likewise.
14302 (init.o): Likewise.
14303 (expr.o): Likewise.
14304
14305 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14306
14307 * decl.c (start_enum): Put local enums on permanent_obstack.
14308
14309 1998-06-25 Mark Mitchell <mark@markmitchell.com>
14310
14311 * cp-tree.h (c_get_alias_set): Declare.
14312 * decl.c (init_decl_processing): Set lang_get_alias_set.
14313
14314 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
14315
14316 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14317 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14318 flag for all function decls which are in the exception table.
14319 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14320 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14321 code is emitted for any referenced rtti function.
14322
14323 1998-06-25 Dave Brolley <brolley@cygnus.com>
14324
14325 * lang-specs.h: Use new | syntax to eliminate
14326 string concatenation.
14327
14328 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
14329
14330 * cp-tree.h (CP_DECL_CONTEXT): New macro.
14331 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14332 * method.c (build_overload_nested_name): Likewise.
14333 * sig.c (build_signature_pointer_or_reference_type): Don't set
14334 DECL_CONTEXT.
14335
14336 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14337
14338 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14339 * cp-tree.h (FROB_CONTEXT): New macro.
14340 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14341 * decl.c (namespace_binding): Replace NULL_TREE with
14342 global_namespace.
14343 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14344 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14345 Likewise.
14346 * decl.c (pushtag): Use FROB_CONTEXT.
14347 (pushdecl, make_typename_type, define_function, grokdeclarator):
14348 Likewise.
14349 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14350 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14351 Likewise.
14352 * decl2.c (decl_namespace): Return global_namespace if no context.
14353 * method.c (build_overload_nested_name): Expect null as context.
14354 * pt.c (mangle_class_name_for_template): Do nothing for null
14355 contexts.
14356 (lookup_template_class): Allow for null id_context.
14357
14358 1998-06-25 Richard Henderson <rth@cygnus.com>
14359
14360 * method.c (emit_thunk): Set current_function_is_thunk for the
14361 ASM_OUTPUT_MI_THUNK case as well.
14362
14363 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14364
14365 * exception.cc (__cplus_type_matcher): Get a match_info pointer
14366 instead of an exception table entry as a parameter.
14367
14368 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14369
14370 * parse.y (function_try_block): Don't call start_catch_handler.
14371 * except.c (call_eh_info): Remove coerced field from declaration.
14372 (build_eh_type_type_ref): New function to create an address of a
14373 rtti function for the new style exception tables.
14374 (expand_start_catch_block): Split function, this contains the
14375 common part.
14376 (process_start_catch_block_old): New function to perform the rest
14377 of expand_start_catch_block under old style exceptions.
14378 (process_start_catch_block_old): New function to perform the rest
14379 of expand_start_catch_block under new style exceptions.
14380 (expand_end_catch_block): Only pop the false label off the stack under
14381 the old style of exceptions.
14382 * semantics.c (finish_try_block): Don't call start_catch_handler.
14383 * exception.cc (struct cp_eh_info): Add original_value field.
14384 (__cplus_type_matcher): Perform type matching on the original exception
14385 value, and if we have a match, set the current value.
14386 (__cp_push_exception): Set the original exception value.
14387
14388 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
14389
14390 * call.c (joust): Fix confusing conversion warning.
14391
14392 * call.c (build_op_delete_call): Add placement parm. Check
14393 LOOKUP_SPECULATIVELY.
14394 * cp-tree.h, decl2.c, init.c: Adjust.
14395 * decl.c (finish_function): Use it.
14396
14397 * pt.c (tsubst): Diagnose creating void fields or variables.
14398
14399 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14400
14401 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14402
14403 * cp-tree.h (check_dtor_name): Add prototype.
14404
14405 * init.c (expand_member_init): Remove unused variables
14406 `ptr_type_node', `parm' and `rval'.
14407
14408 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14409 in call to fprintf.
14410 (lang_print_xnode): Likewise.
14411
14412 * typeck2.c (enum_name_string): Cast argument to sprintf to long
14413 and use %ld specifier.
14414
14415 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14416 specifier in call to fprintf.
14417 (GNU_xref_member): Cast argument to sprintf to int.
14418
14419 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14420
14421 * typeck2.c (pop_init_level): Warn about implicit zero initialization
14422 of struct members.
14423
14424 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14425
14426 * cp-tree.h: Prototype function `check_java_method'.
14427
14428 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14429
14430 * class.c (finish_struct): Make conflicting use of id a pedwarn.
14431 * decl.c (pushdecl_class_level): Likewise.
14432
14433 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14434
14435 * pt.c (convert_nontype_argument): Issue an error when presented
14436 with an integer (real) constant that cannot be simplified to an
14437 INT_CST (REAL_CST).
14438
14439 * cp-tree.h (c_get_alias_set): Remove declaration added in
14440 1998-06-13 change that should never have been checked in.
14441
14442 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14443
14444 * typeck.c (build_binary_op_nodefault): Change % in format strings
14445 to %%.
14446
14447 * decl.c (grokvardecl): Don't build_static_name for decls that
14448 aren't at namespace scope.
14449
14450 * init.c (perform_member_init): Catch default-initialization of
14451 references.
14452
14453 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14454
14455 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14456
14457 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14458
14459 * method.c (hack_identifier): Complain about getting a namespace
14460 or class template.
14461 * typeck.c (decay_conversion): Remove check for namespaces.
14462 * typeck2.c (incomplete_type_error): Likewise.
14463 * parse.y (template_arg): Add PTYPENAME expansion.
14464
14465 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
14466
14467 * decl.c (grokvardecl): Don't build external assembler names for
14468 TYPENAMEs in other namespaces as there is no declarator.
14469 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14470 info from DECL_CONTEXT if it is NULL.
14471
14472 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
14473
14474 * call.c (check_dtor_name): Split out.
14475 (build_scoped_method_call): Use it.
14476 (build_method_call): Use it.
14477 * init.c (build_offset_ref): Use it.
14478
14479 * typeck.c (build_static_cast): Fix handling of pointers to members.
14480
14481 * decl.c (finish_function): Just return nothing from a constructor.
14482 * typeck.c (c_expand_return): Complain about returning a void
14483 expression from a destructor.
14484
14485 1998-06-13 Mark Mitchell <mark@markmitchell.com>
14486
14487 * class.c (alter_access): Accept a BINFO explaining how to get
14488 from the entity whose accessed is being altered to the type doing
14489 the altering.
14490 (handle_using_decl): New function containing code split out from ...
14491 (finish_struct_1): Here.
14492
14493 * cp-tree.h (complete_type_or_else): Declare.
14494 * init.c (build_new_1, build_delete): Use it.
14495 * typeck.c (require_complete_type): Use complete_type, rather than
14496 expanding it inline.
14497 (complete_type_or_else): New function.
14498 (build_component_ref): Use it.
14499 (pointer_int_sum): Make sure the type pointed to is complete.
14500 (pointer_diff): Likewise.
14501
14502 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14503 types.
14504
14505 * search.c (get_matching_virtual): Note that member templates
14506 cannot override virtual functions.
14507
14508 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
14509
14510 * pt.c (check_explicit_specialization): If DECLARATOR turned into
14511 an error_mark_node from lookup_template_function, return the same.
14512 (determine_specialization): Also make sure TEMPLATE_ID isn't an
14513 error_mark_node, before we try to read its operands.
14514 * decl.c (grokdeclarator): If we got an error_mark_node from
14515 check_explicit_specialization, just return it right back.
14516
14517 1998-06-12 Mark Mitchell <mark@markmitchell.com>
14518
14519 * class.c (instantiate_type): Don't treat template-ids that don't
14520 specify any template arguments as equivalent to ordinary
14521 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
14522 pointer-to-members for member templates. Tidy slightly.
14523 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14524 * init.c (build_offset_ref): Handle template-ids like ordinary
14525 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14526 offset part of the OFFSET_REF.
14527 * typeck.c (build_unary_op): Change check for unknown types to
14528 look for OFFSET_REFs, not SCOPE_REFs.
14529
14530 1998-06-11 Mark Mitchell <mark@markmitchell.com>
14531
14532 * pt.c (is_member_template_class): New function.
14533 (push_template_decl_real): Use it.
14534
14535 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
14536
14537 * friend.c (do_friend): Add support for nested classes using
14538 member functions of the enclosing class as friends.
14539
14540 1998-06-10 Mark Mitchell <mark@markmitchell.com>
14541
14542 * call.c (convert_default_arg): Make global, not static.
14543 (convert_arg_for_ellipsis): Split out from ...
14544 (build_over_call): Here.
14545 * cp-tree.h (convert_default_arg); Declare.
14546 (convert_arg_to_ellipsis): Likewise.
14547 (do_member_init): Remove.
14548 * init.c (do_member_init): Remove; this code is dead.
14549 (expand_member_init): Remove much of this code; it is dead.
14550 * typeck.c (convert_arguments): Use convert_default_arg and
14551 convert_arg_for_ellipsis, rather than duplicating here.
14552
14553 * call.c (convert_like): Don't fail silently if
14554 build_user_type_conversion fails. Always return error_mark_node
14555 for failure.
14556
14557 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14558
14559 * search.c (covariant_return_p): Complain about ambiguous base.
14560
14561 * typeck.c (build_component_ref): Diagnose ref to nested type.
14562
14563 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14564
14565 * decl.c (grokparms): Check that INIT isn't an error_mark_node
14566 before giving error about invalid type for default arg.
14567
14568 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14569
14570 * call.c (build_method_call): Fix thinko.
14571
14572 1998-06-10 Dave Brolley <brolley@cygnus.com>
14573
14574 * decl2.c (lang_decode_option): New argc/argv interface.
14575 * cp-tree.h (lang_decode_option): New argc/argv interface.
14576 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
14577 specified for cpplib-enabled compilers.
14578 * lex.c (lang_init): Don't check_newline for cpplib.
14579 (init_parse): Don't initialize cpplib here.
14580
14581 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14582
14583 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
14584 piece before checking DECL_MUTABLE_P.
14585
14586 1998-06-10 John Carr <jfc@mit.edu>
14587
14588 * tree.c (debug_binfo): Make printf format match arguments.
14589
14590 * error.c (OB_PUTI): Make printf format match arguments.
14591
14592 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14593
14594 * init.c (perform_member_init): Handle default-initialization.
14595
14596 * except.c (build_throw): Handle throwing NULL.
14597
14598 * typeck.c (build_x_function_call): Use resolve_offset_ref.
14599
14600 * search.c (compute_access): Only strip an anonymous union
14601 for a FIELD_DECL.
14602
14603 * call.c (add_builtin_candidates): Tweak.
14604
14605 * cvt.c (build_expr_type_conversion): Restore code for conversion
14606 from class types.
14607 * decl2.c (delete_sanity): Use it. Clean up.
14608
14609 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
14610
14611 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
14612
14613 * typeck.c (c_expand_return): Don't warn about void expressions on
14614 return statements in functions returning void.
14615
14616 1998-06-09 Mark Mitchell <mark@markmitchell.com>
14617
14618 * pt.c (fn_type_unification): Revise documentation. Tidy.
14619 (type_unification): Likewise.
14620
14621 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
14622
14623 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
14624 expand_end_catch.
14625 * parse.y (function_try_block): Rename expand_start_catch, and delete
14626 expand_end_catch.
14627 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
14628 expand_end_catch.
14629
14630 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
14631
14632 * search.c (lookup_member): New fn.
14633 * class.c (finish_struct_1): Use it.
14634 * decl.c (lookup_name_real): Use it.
14635
14636 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14637
14638 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14639
14640 * cp-tree.h: Add prototype for `maybe_print_template_context' and
14641 `maybe_make_one_only'.
14642
14643 * decl.c (auto_function): Remove unused variable `decl'.
14644
14645 * decl2.c: Include dwarf2out.h and dwarfout.h.
14646
14647 * lex.c: Remove redundant declarations of `set_float_handler' and
14648 `asm_out_file'.
14649
14650 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
14651
14652 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14653 time flag. Call __cp_eh_info instead of __cp_exception_info.
14654 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14655 (__cp_exception_info): Return offset into cp_eh_info structure to
14656 match what use to be the start of this structure.
14657 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14658 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14659 compile time flag.
14660 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14661 __cp_eh_info instead of __cp_exception_info.
14662
14663 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
14664
14665 * decl.c (cp_finish_decl): Disable inlining of extern inlines
14666 with static variables.
14667
14668 1998-06-08 Mark Mitchell <mark@markmitchell.com>
14669
14670 * init.c (build_offset_ref): Correct previous change to use build,
14671 not build_min.
14672
14673 1998-06-07 Mark Mitchell <mark@markmitchell.com>
14674
14675 * class.c (instantiate_type): Handle pointer-to-members where the
14676 member is a template.
14677 * init.c (build_offset_ref): Likewise.
14678 * typeck.c (build_unary_op): Likewise.
14679
14680 1998-06-07 Richard Henderson <rth@cygnus.com>
14681
14682 * lex.c (lang_init_options): New function.
14683 (lang_init): Remove flag_exceptions == 2 hack.
14684
14685 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14686
14687 * search.c (envelope_add_decl): Tweak for implicit typename.
14688
14689 * call.c (joust): Also warn about confusing conversion op/constructor
14690 overload resolution.
14691
14692 * spew.c (yylex): Also return the TYPE_DECL if got_object.
14693 Don't clear got_object after '~'.
14694 * call.c (build_scoped_method_call): Tweak destructor handling.
14695 (build_method_call): Likewise.
14696 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14697 TYPE_MAIN_VARIANT for destructors.
14698 * semantics.c (finish_object_call_expr): Complain about calling a
14699 TYPE_DECL.
14700
14701 1998-06-05 Per Bothner <bothner@cygnus.com>
14702
14703 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14704 Define - update needed by gcc.c change.
14705
14706 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14707
14708 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14709
14710 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14711
14712 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14713 * decl.c (lookup_name_real): Add namespaces_only parameter.
14714 If set, return only NAMESPACE_DECLs.
14715 (select_decl): Likewise.
14716 (identifier_type_value): Give additional parameter.
14717 (lookup_name_nonclass): Likewise.
14718 (lookup_name): Likewise.
14719 (find_binding): Skip namespace aliases.
14720 (binding_for_name): Likewise.
14721 (push_namespace): Check for namespace aliases.
14722 (lookup_name_namespace_only): New function.
14723 (begin_only_namespace_names, end_only_namespace_names): New functions.
14724 * decl2.c (set_decl_namespace): Skip namespace aliases.
14725 (do_using_directive): Likewise.
14726 (do_namespace_alias): Produce namespace aliases, fix alias
14727 redeclaration.
14728 * error.c (dump_decl): Support SCOPE_REF.
14729 * parse.y (extdef): Wrap lookup with namespace_only for namespace
14730 aliases and using declarations.
14731
14732 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
14733
14734 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14735
14736 * error.c (dump_expr): Clean up NEW_EXPR case.
14737
14738 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
14739
14740 Suggested by Brendan Kehoe
14741 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14742 treat it as using ::decl.
14743
14744 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14745
14746 * tree.c (mapcar): Support NEW_EXPR.
14747
14748 * error.c (dump_expr): Support NEW_EXPR.
14749
14750 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
14751
14752 * method.c (make_thunk): Use overload machinery to make name.
14753 * search.c (covariant_return_p): New fn.
14754 (get_matching_virtual): Use it.
14755
14756 * init.c (build_new_1): Fix check for void.
14757
14758 1998-06-01 Per Bothner <bothner@cygnus.com>
14759
14760 * cp-tree.h (TYPE_FOR_JAVA): New macro.
14761 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14762 java_int_type_node, java_long_type_node, java_float_type_node,
14763 java_double_type_node, java_char_type_node, java_boolean_type_node):
14764 New "primitive" types, with predefined names __java_byte etc.
14765 (record_builtin_java_type): New function.
14766 (init_decl_processing): Make Java types with record_builtin_java_type.
14767 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
14768 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
14769 (grokfndecl): Call check_java_method for Java classes.
14770 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
14771 (process_overload_item): Match types against specific
14772 java_XX_type_node types, rather than using is_java_type.
14773 * class.c (finish_struct_1): Don't add default copy constructor
14774 or operator= if TYPE_FOR_JAVA.
14775 (pop_lang_conext): Restore strict_prototyp proper if Java.
14776 * decl2.c (acceptable_java_type, check_java_method): New functions.
14777 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
14778 (tsubst): Move common statement after if statement.
14779 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
14780
14781 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
14782
14783 * pt.c (for_each_template_parm): Use first_rtl_op.
14784
14785 * tree.c (build_cplus_array_type_1): Also check index_type for
14786 template parms.
14787
14788 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
14789
14790 * pt.c (tsubst): Always copy BINFO_BASETYPES.
14791
14792 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
14793
14794 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14795 TYPE_SIZE_UNIT too.
14796
14797 1998-05-29 Mark Mitchell <mark@markmitchell.com>
14798
14799 * decl.c (grokdeclarator): Don't complain about in-class
14800 initialization of static consts if we don't really know the type
14801 of the variable.
14802
14803 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
14804
14805 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14806 * method.c (build_destructor_name): New fn.
14807 * decl2.c (maybe_retrofit_in_chrg): Split out...
14808 (grokclassfn): From here. Reorganize.
14809 * decl.c (grok_ctor_properties): Make sure ctors for types with
14810 vbases have the in_chrg parm.
14811 * pt.c (instantiate_class_template): Update
14812 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
14813 grok_*_properties.
14814 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14815
14816 1998-05-28 Mark Mitchell <mark@markmitchell.com>
14817
14818 * pt.c (instantiate_decl): Make test for whether or not static
14819 variables should be instantiated early match its comment.
14820
14821 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
14822
14823 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14824 a member.
14825 (start_function): Call check_default_args.
14826 * decl2.c (grokfield): Don't call check_default_args.
14827 (check_default_args): Use cp_error_at.
14828 * lex.c (do_pending_defargs): Call check_default_args.
14829
14830 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
14831
14832 * call.c (build_method_call): Make sure get_type_value returns
14833 something before we try to use its TYPE_MAIN_VARIANT.
14834 (build_scoped_method_call): Likewise.
14835
14836 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
14837
14838 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14839 initialize an array.
14840
14841 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14842 DECL_VIRTUAL_P.
14843
14844 * friend.c (do_friend): Clarify template warning.
14845
14846 1998-05-27 Mark Mitchell <mark@markmitchell.com>
14847
14848 * decl.c (shadow_label): Don't treat decls as identifiers.
14849 (maybe_push_to_top_level): Clear shadowed_labels.
14850
14851 * pt.c (instantiate_decl): Reset lineno and filename after calling
14852 regenerate_decl_from_template.
14853
14854 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14855 error_mark_node.
14856
14857 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
14858
14859 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14860
14861 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14862
14863 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14864 (convert_nontype_argument): Handle cases when nontype template
14865 parameters become classes after substitution.
14866
14867 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14868
14869 * friend.c (is_friend): Use comptypes, rather than == to compare
14870 types. Modify for new representation of template friends.
14871 (make_friend_class): Likewise.
14872 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
14873 (instantiate_class_template): Deal with template friends.
14874
14875 * decl.c (store_parm_decls): Remove redundant call to
14876 expand_main_function.
14877
14878 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
14879
14880 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14881 DECL_USE_TEMPLATE.
14882
14883 1998-05-26 Per Bothner <bothner@cygnus.com>
14884
14885 * language_as_string: Handle lang_java.
14886
14887 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
14888
14889 * decl.c (pushdecl): Don't copy the type_decl.
14890
14891 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14892
14893 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14894 current_class_type.
14895 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14896
14897 * parse.y (complex_direct_notype_declarator): Use $1 to access
14898 scope of notype_qualified_id.
14899
14900 1998-05-26 Dave Brolley <brolley@cygnus.com>
14901
14902 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14903 (init_parse): Initialize cpplib interface.
14904
14905 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14906 empty continuation.
14907
14908 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14909
14910 * decl.c (pushtag): Avoid crashing on erroneous input.
14911
14912 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14913
14914 * decl.c (push_namespace): Only produce one unique name for
14915 anonymous namespaces.
14916 (get_unique_name): Remove.
14917
14918 1998-05-25 Mark Mitchell <mark@markmitchell.com>
14919
14920 * call.c (tourney): Don't do any extra comparisons.
14921
14922 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14923
14924 * cp-tree.h (processing_template_parmlist): Declare.
14925 * decl.c (pushtag): Don't call push_template_decl when we
14926 shouldn't.
14927 * pt.c (processing_template_parmlist): New variable.
14928 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14929 (complete_template_args): Use it.
14930 (add_to_template_args): Likewise.
14931 (innermost_args): Likewise.
14932 (tsubst): Likewise.
14933 (begin_template_parm_list): Use processing_template_parmlist.
14934 (end_template_parm_list): Likewise.
14935
14936 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14937 * decl.c (grokdeclarator): Use it.
14938 * decl2.c (grok_x_components): Likewise.
14939 * init.c (initializing_context): Likewise.
14940 * method.c (do_build_copy_constructor): Likewise.
14941 (do_build_assign_ref): Likewise.
14942 * search.c (compute_access): Likewise.
14943 * typeck.c (build_component_ref): Likewise.
14944
14945 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14946 unnamed type a typedef name "for linkage purposes".
14947
14948 * pt.c (lookup_template_class): Don't look at
14949 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14950
14951 * method.c (build_overload_int): Handle error cases gracefully.
14952
14953 * pt.c (instantiate_decl): Handle static member variables
14954 correctly.
14955
14956 * pt.c (tsubst): Use the tsubst'd type when producing new
14957 TEMPLATE_PARM_INDEX nodes.
14958
14959 1998-05-24 Mark Mitchell <mark@markmitchell.com>
14960
14961 * tree.c (cp_tree_equal): Handle pointers to member functions.
14962
14963 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
14964 sure the type of the REF_BIND is a reference type.
14965 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14966 target_type for clarity.
14967
14968 * parse.y (xcond): Move call to condition_conversion ...
14969 * semantics.c (finish_for_cond): Here.
14970 * parse.c: Regenerated.
14971
14972 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
14973
14974 * decl.c (push_namespace): Namespaces have type void.
14975 * typeck2.c (incomplete_type_error): Complain about namespace
14976 used as expression.
14977 * typeck.c (decay_conversion): Likewise.
14978
14979 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
14980
14981 * error.c (dump_expr): Support namespaces.
14982
14983 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
14984
14985 * cp-tree.def: Add SRCLOC.
14986 * cp-tree.h: Add struct tree_srcloc and accessor macros.
14987 * tree.c (build_srcloc, build_srcloc_here): New fns.
14988 * pt.c (add_pending_template): Use build_srcloc_here.
14989 (push_tinst_level): Update last_template_error_tick before erroring.
14990 (instantiate_decl): Restore lineno and input_filename before
14991 calling add_pending_template.
14992 * decl2.c (finish_file): Set up lineno and input_filename for
14993 pending templates.
14994
14995 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14996
14997 * decl.c (lang_print_error_function): New fn.
14998 (init_decl_processing): Set print_error_function to use it.
14999 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
15000
15001 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15002 ICS_BAD_FLAG.
15003
15004 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15005 copy-initialization.
15006
15007 * class.c (build_vtable_entry): Use int_fits_type_p.
15008 (build_vtable): Pass a signed offset to build_vtable_entry.
15009 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15010 set_rtti_entry): Likewise.
15011
15012 1998-05-22 Per Bothner <bothner@cygnus.com>
15013
15014 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
15015 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
15016
15017 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15018
15019 * pt.c (print_template_context): Use fprintf instead of cp_error.
15020
15021 * pt.c (determine_specialization): Just return an error_mark_node.
15022 Also print the decl we want in error messages. If we complain,
15023 return error_mark_node.
15024 (tsubst_friend_function): Set lineno and input_filename so
15025 error messages will be useful.
15026 (instantiate_template): Just return an error_mark_node.
15027 (check_explicit_specialization): Don't mess with a returned
15028 error_mark_node.
15029
15030 * pt.c (print_template_context): Add new argument.
15031 (maybe_print_template_context): New fn.
15032 (push_tinst_level): Increment tinst_level_tick.
15033 (pop_tinst_level): Likewise.
15034 * errfn.c (cp_thing): Call maybe_print_template_context. Use
15035 xrealloc instead of xmalloc.
15036
15037 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15038
15039 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15040
15041 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15042 if the template we looked up is the same as the one we already
15043 have.
15044
15045 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
15046
15047 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15048 (cpp_reader,parse_in): Add for cpplib.
15049 (check_newline): Call handle_sysv_pragma with new interface.
15050 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15051
15052 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15053 (sub_getch): Call GETC for cpplib.
15054
15055 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15056 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15057
15058 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15059
15060 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15061
15062 * decl2.c (maybe_make_one_only): New fn.
15063 (import_export_vtable): Use it.
15064 (import_export_decl): Likewise.
15065 * pt.c (mark_decl_instantiated): Likewise.
15066
15067 1998-05-21 Mark Mitchell <mmitchell@usa.net>
15068
15069 * decl2.c (find_representative_member): Rename to ...
15070 (build_anon_union_vars): New function.
15071 (finish_anon_union): Fix stupidity of previous change.
15072
15073 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
15074
15075 * decl.c (grokfndecl): Handle definition of specialization in
15076 friend declaration.
15077
15078 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15079
15080 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15081
15082 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15083 to look for type declarations.
15084 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15085 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15086 (finish_member_class_template): Declare.
15087 * decl.c (pushtag): Put member class templates on the
15088 CLASSTYPE_TAGS list, just as for ordinary member classes.
15089 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15090 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15091 IDENTIFIER_NAMESPACE_VALUEs.
15092 * parse.y (component_decl): Move code to ...
15093 * semantics.c (finish_member_class_template): New function.
15094 Don't put member class templates on the list of components for a
15095 class.
15096 * parse.c: Regenerated.
15097 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15098 In fact, don't use DECL_CONTEXT at all here.
15099
15100 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
15101
15102 * decl.c (record_unknown_type): New function.
15103 (init_decl_processing): Call it for the unknown and global type
15104 nodes.
15105
15106 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15107
15108 * decl2.c (find_representative_member): New function.
15109 (finish_anon_union): Use it.
15110
15111 * cp-tree.h (MAIN_NAME_P): New macro.
15112 (DECL_MAIN_P): Likwise.
15113 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15114 (grokfndecl): Use the new macros.
15115 (grokdeclarator): Likewise.
15116 (start_function): Likewise.
15117 (store_parm_decls): Likewise.
15118 (finsh_function): Likewise.
15119 * friend.c (do_friend): Likewise.
15120 * typeck.c (build_function_call_real): Likewise.
15121 (build_unary_op): Likewise.
15122
15123 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
15124
15125 * decl2.c (start_objects, finish_objects, do_dtors,
15126 do_ctors): Split out from...
15127 (finish_file): ...here.
15128
15129 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
15130
15131 * tree.c (is_overloaded_fn): Don't abort on placeholders from
15132 push_class_decls.
15133
15134 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
15135
15136 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15137
15138 * error.c (dump_expr): Handle an ARROW_EXPR.
15139
15140 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
15141
15142 * decl.c (saveable_obstack): Declare.
15143 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15144 declare, if necessary.
15145
15146 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
15147
15148 * call.c (compare_qual): Remove.
15149 (is_subseq): Tweak.
15150 (is_properly_derived_from): New function.
15151 (maybe_handle_ref_bind): Likewise.
15152 (maybe_handle_implicit_object): Likewise.
15153 (compare_ics): Modify substantially to bring into conformance with
15154 the standard.
15155 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15156 (comp_cv_qualification): Declare.
15157 (comp_cv_qual_signature): Likewise.
15158 * typeck.c (comp_cv_qualification): Likewise.
15159 (comp_cv_qual_signature): Likewise.
15160
15161 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15162
15163 * Makefile.in (parse.o): Depend on toplev.h.
15164
15165 * class.c (typecode_p): Remove prototype and definition.
15166
15167 * cp-tree.h (currently_open_class, is_empty_class, member_p):
15168 Add prototype.
15169
15170 * decl.c (push_overloaded_decl_top_level): Remove prototype and
15171 definition.
15172
15173 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15174 in call to `cp_thing'.
15175 (cp_warning): Likewise for function pointer `warning'.
15176
15177 * except.c (do_function_call): Remove prototype and definition.
15178 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15179
15180 * method.c (is_java_type): Add prototype and make it static.
15181
15182 * parse.y: Include toplev.h.
15183
15184 * pt.c (type_unification): Remove unused variable `arg'.
15185 (instantiate_decl): Likewise for `save_ti'.
15186
15187 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15188
15189 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
15190
15191 * init.c (build_member_call): Handle template_ids.
15192 * parse.y (primary): Add global_scope template_id.
15193
15194 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
15195
15196 * decl2.c (get_sentry): Use end_temporary_allocation.
15197 Don't declare permanent_obstack.
15198
15199 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
15200
15201 * parse.y (.finish_new_placement): New non-terminal.
15202 (unary_expr, new_type_id): Use it.
15203 * parse.c: Regenerated.
15204
15205 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
15206
15207 * pt.c (redeclare_class_template): Say where the original definition
15208 of the template-parameter's default argument appeared.
15209
15210 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
15211
15212 * call.c (build_over_call): Tweak empty class handling.
15213
15214 * decl.c (make_typename_type): Use currently_open_class.
15215
15216 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15217
15218 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15219
15220 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15221 for a type unless it is one.
15222
15223 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15224
15225 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
15226
15227 * Makefile.in (program_transform_name, objdir): Define.
15228
15229 * Makefile.in (BISON): Use bison from the build tree if it exists.
15230 (FLEX): Likewise.
15231
15232 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15233
15234 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15235
15236 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15237
15238 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
15239
15240 * call.c (build_scoped_method_call): Likewise.
15241
15242 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
15243
15244 * init.c (build_new_1): Call suspend_momentary around the creation
15245 of values that must be saved for exception handling.
15246 * parse.y (.build_new_placement): New non-terminal.
15247 (unary_expr, new_placement): Use it.
15248 * parse.c: Regenerated.
15249
15250 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
15251
15252 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15253 old and new types.
15254
15255 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15256 canonical type.
15257
15258 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15259
15260 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15261
15262 * decl.c (start_decl): Revert problem change.
15263
15264 * Makefile.in (CONFLICTS): Fix.
15265
15266 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15267
15268 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15269
15270 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15271
15272 * class.c (finish_struct_1): Use BINFO_SIZE.
15273
15274 * decl.c (start_decl): Use 'tem'.
15275
15276 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
15277
15278 * exception.cc: Include eh-common.h.
15279 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15280 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15281 (__cp_push_exception): Initialize eh_info struct as well.
15282 * except.c: Remove local structs and include eh-common.h.
15283 (init_exception_processing): Set language and version codes.
15284 (call_eh_info): Add presence of eh_info to runtime description of
15285 struct cp_eh_info.
15286 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15287 * semantics.c (finish_try_block): Call start_catch_block() and
15288 end_catch_block().
15289 * parse.y (function_try_block): Call start_catch_block() and
15290 end_catch_block().
15291
15292 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
15293
15294 * typeck.c (original_type): New function.
15295 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15296 to see if they're actually the same.
15297 * cp-tree.h (original_type): Declare.
15298
15299 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15300
15301 * Makefile.in (lex.o): Depend on output.h.
15302
15303 * call.c (add_function_candidate): Remove unused variable `cand'.
15304 (add_conv_candidate): Likewise.
15305 (build_builtin_candidate): Likewise.
15306
15307 * cp-tree.h: Add prototype for `types_overlap_p'.
15308
15309 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15310
15311 * decl2.c (merge_functions): Remove unused variables `tmp' and
15312 `tempn'.
15313
15314 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15315 (code_as_string): Likewise.
15316 (language_as_string): Likewise.
15317 (parm_as_string): Likewise.
15318 (op_as_string): Likewise.
15319 (assop_as_string): Likewise.
15320 (cv_as_string): Likewise.
15321
15322 * lex.c: Include output.h.
15323
15324 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15325
15326 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15327 ATTRIBUTE_UNUSED.
15328
15329 * tinfo.cc (__class_type_info::dcast): Change the type of variable
15330 `i' from int to size_t.
15331
15332 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15333 ATTRIBUTE_UNUSED.
15334
15335 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
15336
15337 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15338 DECL_NAMESPACE_SCOPE_P.
15339 (lang_decl_name): Likewise.
15340 * pt.c (tsubst_friend_function, tsubst): Likewise.
15341 * decl.c (pushdecl, redeclaration_error_message, start_decl,
15342 cp_finish_decl, start_function): Likewise.
15343 * class.c (finish_struct_1): Likewise.
15344 * call.c (build_over_call): Likewise.
15345 (compare_ics): Use DERIVED_FROM_P.
15346
15347 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
15348
15349 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15350 * method.c (build_mangled_name): Use it.
15351 (build_decl_overload_real): Likewise.
15352
15353 * error.c (dump_simple_decl): New function, broken out from ...
15354 (dump_decl): Use it.
15355
15356 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
15357
15358 * ptree.c (lang_print_xnode): Add missing `break'.
15359
15360 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15361
15362 * call.c (add_template_candidate): Adjust for changes to
15363 fn_type_unification.
15364 (add_template_candidate_real): Likewise.
15365 (add_template_conv_candidate): Likewise.
15366 (build_user_type_conversion_1): Likewise.
15367 (build_new_function_call): Likewise.
15368 (build_object_call): Likewise.
15369 (build_new_op): Likewise.
15370 (build_new_method_call): Likewise.
15371 * class.c (instantiate_type): Likewise.
15372 * cp-tree.h (unification_kind_t): New type.
15373 (fn_type_unification): Adjust prototype.
15374 (type_unificaiton): Likewise.
15375 * pt.c (UNIFY_ALLOW_NONE): New macro.
15376 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15377 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15378 (UNIFY_ALLOW_DERIVED): Likewise.
15379 (unify): Change prototype.
15380 (maybe_adjust_types_for_deduction): New function.
15381 (check_cv_quals_for_unify): Likewise.
15382 (determine_specialization): Adjust.
15383 (fn_type_unification): Likewise.
15384 (type_unification): Likewise.
15385 (type_unification_real): Likewise. Use
15386 maybe_adjust_types_for_deduction. Fix mishandling of
15387 back-unification of template functions passed as arguments. Pass
15388 appropriate combination of UNIFY_ALLOW_* to unify.
15389 (unify): Remove unused NTPARMS parameter. Use
15390 check_cv_quals_for_unify. Remove bogus code that allowed
15391 too-generous unification in order to adhere more closely to standard.
15392 (get_bindings_real): Adjust.
15393 (get_class_bindings): Likewise.
15394
15395 * method.c (build_overload_identifier): Only use the innermost
15396 template arguments when mangling.
15397 * pt.c (tsubst_template_argument_vector): New function.
15398 (complete_template_args): Deal with the situation where the
15399 extra_args contain more than one level of arguments.
15400 (lookup_template_class): Deal with member template classes, which
15401 may have more than one level of arguments.
15402 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15403 Improve handling of member template classes. Use
15404 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
15405 tsubst_template_argument_vector where appropriate.
15406 (regenerate_decl_from_template): Break out from ...
15407 (instantiate_decl): Here.
15408
15409 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15410 * parse.h: Regenerated.
15411 * parse.c: Really regenerated.
15412
15413 * cp-tree.h (finish_unary_op_expr): New function.
15414 (finish_id_expr): Likewise.
15415 (begin_new_placement): Likewise.
15416 (finish_new_placement): Likewise.
15417 (finish_declarator): Likewise.
15418 (finish_translation_unit): Likewise.
15419 (finish_parmlist): Likewise.
15420 (begin_class_definition): Likewise.
15421 (finish_class_definition): Likewise.
15422 (finish_default_args): Likewise.
15423 (finish_inline_definitions): Likewise.
15424 * parse.y (GCC_ASM_KEYWORD): Remove.
15425 (TYPENAME_ELLIPSIS): Likewise.
15426 * parse.c: Regenerated.
15427 Use new functions in semantics.c in the actions for many rules.
15428 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15429 * hash.h: Regenerated.
15430 * semantics.c (finish_expr_stmt): Allow NULL expr.
15431 (finish_unary_op_expr): New function, containing
15432 code previously in parse.y.
15433 (finish_id_expr): Likewise.
15434 (begin_new_placement): Likewise.
15435 (finish_new_placement): Likewise.
15436 (finish_declarator): Likewise.
15437 (finish_translation_unit): Likewise.
15438 (finish_parmlist): Likewise.
15439 (begin_class_definition): Likewise.
15440 (finish_class_definition): Likewise.
15441 (finish_default_args): Likewise.
15442 (finish_inline_definitions): Likewise.
15443
15444 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
15445
15446 * typeck.c (build_c_cast): Don't decay arrays and functions to
15447 pointer type when converting to a class type.
15448
15449 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
15450
15451 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15452 (DECL_CLASS_SCOPE_P): Likewise.
15453
15454 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
15455
15456 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15457 * decl2.c (constructor_name_full): Likewise.
15458
15459 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
15460
15461 * tree.c (mapcar): Add OVERLOAD support.
15462
15463 * init.c (resolve_offset_ref): We must use basetype_path before we
15464 destroy it with a call to convert_pointer_to.
15465
15466 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
15467
15468 * class.c (currently_open_class): New fn.
15469 * decl.c (lookup_name_real): Use it.
15470 * search.c (lookup_field): Likewise.
15471
15472 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
15473
15474 * cp-tree.def (OVERLOAD): New node.
15475 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15476 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15477 (NAMESPACE_BINDING): Remove.
15478 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15479 namespace_binding.
15480 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15481 Define.
15482 (tree_overload): New struct.
15483 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15484 (REAL_IDENTIFIER_TYPE_VALUE): Define.
15485 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15486 (lang_decl_flags): Remove in_namespace.
15487 (lang_decl): Remove chain.
15488 (DECL_CHAIN, DECL_NAMESPACE): Remove.
15489 (flag_honor_std): Declare extern.
15490 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15491 namespace_binding, set_namespace_binding,
15492 lookup_function_nonclass, cat_namespace_levels,
15493 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15494 scratch_ovl_cons, ovl_member, build_overload): Declare.
15495 (decl_list_length, get_namespace_id, current_namespace_id,
15496 overloaded_globals_p): Remove.
15497 (lookup_using_namespace, qualified_lookup_using_namespace): Change
15498 return type.
15499 (push_scratch_obstack): New macro.
15500 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15501 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15502 convs, fns.
15503 (build_new_function_call): Iterate using OVL_CHAIN.
15504 Print DECL_NAME in when reporting ambiguities.
15505 (build_object_call): Iterate using OVL_NEXT for fns, convs.
15506 (build_new_op): Call lookup_function_nonclass.
15507 Iterate using OVL_NEXT.
15508 (build_op_delete_call): Change detection of members.
15509 Do not wrap TREE_LIST around fields and single global functions.
15510 (build_over_call): Don't push a class level if the context is a
15511 namespace.
15512 (build_new_method_call): Iterate using OVL_NEXT.
15513 * class.c (add_method): Chain overloaded members using
15514 build_overload. Remove copying of method.
15515 (grow_method): When iterating through the obstack, expect OVERLOAD
15516 nodes. Chain overload members.
15517 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
15518 nodes in call to get_baselinks.
15519 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15520 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
15521 fdecls that are OVERLOAD nodes.
15522 (validate_lhs): New function.
15523 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
15524 code. Use DECL_NAME in error messages. Split code between global
15525 and member function processing.
15526 * decl.c (global_type_node): New static variable.
15527 (in_std): New global.
15528 (struct binding_level): New field usings.
15529 (resume_binding_level): Assert that we are not in a class.
15530 (toplevel_bindings_p): Just check for namespace_p or
15531 pseudo_global.
15532 (resume_level): Remove.
15533 (find_binding): New function.
15534 (binding_for_name): Call it.
15535 (namespace_binding, set_namespace_binding): New functions.
15536 (push_namespace): Associate binding level with new namespace,
15537 resume_binding_level for existing namespace. Remove old code.
15538 Fake std by counting.
15539 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15540 (maybe_push_to_top_level): Save current namespace.
15541 (pop_from_top_level): Restore saved namespace.
15542 (pop_namespace): Call suspend_binding_level. Remove old code.
15543 (cat_namespace_levels): New function.
15544 (set_identifier_type_value_with_scope): For namespace bindings,
15545 set BINDING_TYPE, and use global_type_node.
15546 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15547 (identifier_type_value): New function.
15548 (pushtag): If no context, use current_namespace.
15549 (duplicate_decls): Don't process DECL_CHAIN.
15550 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15551 already set. Never reset it to NULL_TREE. Lookup global variables
15552 in their namespace. Push overloaded templates if they are on
15553 namespace level.
15554 (pushdecl_namespace_level): New function.
15555 (pushdecl_top_level): Implement using pushdecl_namespace_level.
15556 (pushdecl_using_decl): New function.
15557 (overloaded_globals_p): Remove.
15558 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15559 them. Use namespace_binding and set_namespace_value.
15560 (redeclaration_error_message): Complain if the declarations come
15561 from different namespaces.
15562 (lookup_tag): On namespace level, look in the BINDING_TYPE.
15563 (lookup_namespace_name): Pass tree_bindings from stack. Remove
15564 old code.
15565 (select_decl): New function.
15566 (lookup_name_real): Call it for qualified and unqualified lookup.
15567 Pass tree_bindings from the stack.
15568 If prefer_type is 1, also accept namespaces.
15569 (lookup_function_nonclass): New function.
15570 (init_decl_processing): Set the binding level of the global
15571 namespace to global_binding_level.
15572 Build a proper type list for __builtin_apply.
15573 Initialize std_node to "fake std" if flag_honor_std is set.
15574 Initialize global_type_node.
15575 Allocated bad_alloc in namespace std if flag_honor_std.
15576 (define_function): Set the DECL_CONTEXT to the current_namespace.
15577 (start_decl): A namespace is not considered as a context here. If
15578 the DECL_CONTEXT is a namespace, push the decl.
15579 (cp_finish_decl): Check for namespaces used as initializers.
15580 (grokfndecl): Add namespace parameter. Remove processing of
15581 DECL_CHAIN.
15582 (grokvardecl): Add namespace parameter.
15583 (grokdeclarator): Process SCOPEs that are namespaces. For
15584 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
15585 (start_function): Check for contexts that are namespaces.
15586 Set context for declarations that have not been pushed.
15587 (store_parm_decls): Check for ::main only.
15588 (finish_function): Likewise.
15589 (start_method): Check for contexts that are namespaces.
15590 (start_method): Remove DECL_CHAIN processing.
15591 * decl2.c (flag_honor_std): Declare.
15592 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
15593 (decl_namespace_list): New static global.
15594 (grok_x_components): Ignore namespaces as type contexts.
15595 (check_classfn): Expect OVERLOAD nodes.
15596 (grokfield): Remove DECL_CHAIN processing.
15597 (finish_file): Call cat_namespace_levels.
15598 (merge_functions): New function.
15599 (ambiguous_decl): Rewrite.
15600 (lookup_using_namespace): Produce tree_bindings.
15601 (qualified_lookup_using_namespace): Likewise.
15602 (set_decl_namespace, decl_namespace, current_decl_namespace,
15603 push_decl_namespace, pop_decl_namespace): New functions.
15604 (arg_lookup): New struct.
15605 (add_function, arg_assoc_namespace, arg_assoc_class,
15606 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
15607 New functions.
15608 (get_namespace_id, current_namespace_id): Remove.
15609 (do_toplevel_using_decl): Rewrite.
15610 (do_class_using_decl): Complain about namespace qualifiers.
15611 (do_using_directive): Sorry if not on namespace level. Complain
15612 about unknown namespaces.
15613 * error.c (dump_aggr_type): Check for namespace contexts.
15614 * except.c (init_exception_processing): Push terminate into std.
15615 * friend.c (is_friend): A namespace is not a context, here.
15616 * init.c (expand_member_init): Remove DECL_CHAIN processing.
15617 (build_offset_ref): Process OVERLOAD nodes.
15618 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
15619 * lex.c (identifier_type): Loop using OVL_CHAIN.
15620 (see_typename): Set looking_for_typename to 2.
15621 (real_yylex): Likewise.
15622 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
15623 (do_scoped_id): Expect OVERLOAD nodes.
15624 Change calling convention for qualified_lookup_using_namespace.
15625 (build_lang_decl): Don't set in_namespace anymore.
15626 * method.c (typevec_size): New global.
15627 (build_overload_nested_name): Return if global_namespace.
15628 Otherwise, always expect a declaration context.
15629 (build_qualified_name): Likewise.
15630 Make sure we don't write beyond typevec_size.
15631 (build_decl_overload_real): Likewise.
15632 Allocate one extra slot for the namespace.
15633 (hack_identifier): Mark code dead.
15634 Process OVERLOAD and NAMESPACE_DECL nodes.
15635 * parse.y (program): Pop namespaces until in global namespace.
15636 (extdef): In a using-declaration, don't discard the identifier if
15637 there is no declaration.
15638 (left_curly): Ignore type contexts which are namespaces.
15639 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15640 used as scope.
15641 * pt.c (template_class_depth): Expect types to be namespaces.
15642 (determine_specialization): Simplify by expecting OVERLOAD nodes.
15643 (push_template_decl): Push into namespace level.
15644 Reset ctx if it is a namespace.
15645 Set DECL_CONTEXT to current_namespace if not set already.
15646 Ignore real contexts that are namespaces.
15647 (mangle_class_name_for_template): Skip global_namespace.
15648 Mangle other namespaces as declarations.
15649 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15650 (lookup_template_class): Push into namespace of context.
15651 If the context is a namespace, set it to global_namespace.
15652 Use id_context for mangling.
15653 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15654 (tsubst_friend_function): Ignore namespace contexts.
15655 Push into namespace level.
15656 (tsubst): Handle NAMESPACE_DECL nodes.
15657 Remove DECL_CHAIN processing.
15658 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15659 * ptree.c (print_lang_identifier): Print bindings.
15660 (lang_print_xnode): Print OVERLOAD nodes.
15661 * rtti.c (init_rtti_processing): Push type_info into std.
15662 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15663 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15664 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15665 lookup_fnfields_here): Likewise.
15666 Process all nodes, instead of going through TREE_CHAIN.
15667 * sig.c (build_signature_pointer_or_reference_type): Set context
15668 to global_namespace.
15669 (build_signature_table_constructor): Expect OVERLOAD nodes.
15670 * spew.c (yylex): Save old setting of looking_for_typename.
15671 * tree.c (decl_list_length): Remove.
15672 (binding_init): New function.
15673 (count_functions): Rewrite.
15674 (is_overloaded_fn): Expect OVERLOAD nodes.
15675 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15676 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15677 ovl_member): New functions.
15678 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15679 (type_unknown_p): Likewise.
15680 (require_instantiated_type): Likewise.
15681 (build_component_ref): Declare code dead.
15682 (build_x_function_call): Create and expect OVERLOAD nodes.
15683 (build_function_call_real): Check for ::main only.
15684 (build_unary_op): Likewise. Expect OVERLOAD nodes.
15685 (convert_for_assignment): Check for TREE_LIST before accessing
15686 TREE_VALUE.
15687 * decl.c (duplicate_decls): Check for namespace bindings instead
15688 of global bindings.
15689 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15690 lookup_name_current_level, start_decl, xref_tag,
15691 finish_enum): Likewise.
15692 * init.c (build_offset_ref): Likewise.
15693 * search.c (lookup_field): Likewise.
15694 (lookup_fnfields): Likewise.
15695 (dfs_debug_mark): Likewise.
15696 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15697 (poplevel_class, pop_from_top_level): Likewise.
15698 * decl2.c (finish_method): Likewise.
15699 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15700 * decl.c (record_builtin_type): Likewise.
15701 (init_decl_processing, grokfndecl): Likewise.
15702 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15703 (make_lang_type): Likewise.
15704 * parse.y (make_thunk): Likewise.
15705 * pt.c (tsubst): Likewise.
15706 * tree.c (debug_binfo): Likewise.
15707 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15708 tinfo2.cc, inc/new.h: Add std qualifications.
15709 * inc/new: Wrap with namespace std if __HONOR_STD.
15710 * inc/typeinfo: Likewise.
15711
15712 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
15713
15714 * call.c (build_user_type_conversion_1): Handle second_conv
15715 properly for templates.
15716
15717 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
15718
15719 * method.c (build_decl_overload_real): Set TREE_USED flag to
15720 zero for build_type_variants nodes as well.
15721
15722 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
15723
15724 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15725
15726 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
15727
15728 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15729 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15730 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15731 xref.o): Add toplev.h dependencies.
15732
15733 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
15734
15735 * errfn.c (cp_error, cp_warning): Remove declarations for
15736 error and warning respectively.
15737
15738 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15739
15740 * error.c: Convert to using ctype macros defined in system.h.
15741 * method.c: Likewise.
15742 * xref.c: Likewise.
15743 * lex.c: Likewise. Also remove redundant system header stuff.
15744
15745 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
15746
15747 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15748 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15749 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15750 xref.c: Add include of toplev.h.
15751
15752 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15753
15754 * tree.c (perm_manip): Also regenerate the RTL of an extern.
15755 (copy_to_permanent): Use end_temporary_allocation.
15756
15757 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
15758
15759 * init.c (expand_vec_init): The initialization of each array
15760 element is a full-expression.
15761
15762 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
15763
15764 * method.c (build_mangled_name): Add a call to build_type_variant
15765 to get the right type.
15766
15767 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
15768
15769 * Makefile.in: Add .SUFFIXES.
15770
15771 * cp-tree.def: Remove NAMESPACE_DECL.
15772
15773 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
15774
15775 * call.c (build_over_call): Do evaluate arg even if it has empty
15776 class type.
15777 * decl.c (start_function): Don't push a member function.
15778
15779 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
15780
15781 * Makefile.in (g++FAQ.info): Put -o option before input file.
15782
15783 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
15784
15785 * gxxint.texi: Add info for squangling codes K and B.
15786
15787 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
15788
15789 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15790 the expression in templates.
15791 (finish_stmt_expr): Likewise.
15792
15793 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
15794
15795 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15796
15797 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
15798
15799 * decl.c (maybe_push_to_top_level): Always clear
15800 current_template_parms and processing_template_decl.
15801 (pushtag): Remove check of current_class_type and some comments,
15802 since maybe_push_to_top_level no longer creates confusion.
15803
15804 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
15805
15806 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15807 (DECL_CLASS_TEMPLATE_P): Likewise.
15808 (DECL_PRIMARY_TEMPLATE): Likewise.
15809 (PRIMARY_TEMPLATE_P): Use it.
15810 (push_template_decl_real): New function.
15811 (redeclare_class_template): Take new template parameters as
15812 input.
15813 (is_specialization_of): New function.
15814 (comp_template_args): Declare.
15815 * decl.c (pushtag): Handle friend template classes.
15816 (xref_tag): Likewise. Use new calling convention for
15817 redeclare_class_template.
15818 * decl2.c (grok_x_components): Handle friend templates.
15819 * friend.c (is_friend): Use is_specialization_of where
15820 appropriate. Deal with friend class templates.
15821 (make_friend_class): Let a class template be friends with itself.
15822 * pt.c (comp_template_args): Remove declaration.
15823 (tsubst_friend_class): New function.
15824 (push_template_decl_real): New function.
15825 (push_template_decl): Use it.
15826 (redeclare_class_template): Adjust for new calling convention.
15827 (comp_template_args): Give it external linkage.
15828 (instantiate_class_type): Use tsubst_friend_class to deal
15829 with friend templates.
15830 * typeck.c (comptypes): Use comp_template_args, rather than
15831 expanding it inline.
15832 * parse.y (component_decl): Handle a nested template type
15833 like other component type declarations.
15834
15835 * pt.c (check_explicit_specialization): Handle overloaded
15836 constructors correctly.
15837
15838 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15839 (lookup_template_class): Use it.
15840
15841 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
15842
15843 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
15844 * cp-tree.h: Add WRAPPER support.
15845 * call.c (add_candidate): Split out from add_*_candidate fns.
15846 (build_over_call): Take the candidate instead of function and args.
15847 Enforce access control here. Emit overload warnings here.
15848 (add_warning): New fn.
15849 (joust): Add WARN parm. If not set, call add_warning instead of
15850 printing a warning. Re-enable some warnings.
15851 (tourney): Pass it.
15852 (convert_like): Adjust.
15853 (build_new_op): Adjust.
15854 (build_new_function_call): Adjust.
15855 (build_user_type_conversion_1): Adjust.
15856 (USER_CONV_FN): Adjust.
15857 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15858 build_int_wrapper): New fns.
15859
15860 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
15861
15862 * pt.c (unify): Fix typo in previous change.
15863
15864 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15865
15866 * error.c (dump_type_real): Declare canonical_name.
15867
15868 * typeck.c (comp_target_types): Fix PMFs.
15869
15870 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
15871
15872 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15873 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15874 TEMPLATE_DECL.
15875
15876 * pt.c (tsubst): Decrease the template-level of
15877 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
15878 TEMPLATE_PARM_INDEX.
15879 (template_decl_level): New function.
15880 (unify): Make sure to record unifications for template
15881 parameters, even when the parameters exactly match the arguments.
15882 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15883 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
15884 aren't from the level we're currently working on.
15885
15886 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
15887
15888 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15889
15890 * decl2.c (check_member_template): Set DECL_IGNORED for member
15891 class templates, too.
15892
15893 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15894
15895 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15896
15897 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15898
15899 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
15900
15901 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15902 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15903 (init_decl_processing): Handle TI types.
15904 * typeck.c (unsigned_type, signed_type): Handle TI types.
15905
15906 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
15907
15908 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15909 New local added_libraries. Increment count when add library to
15910 arglist.
15911
15912 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
15913
15914 * cp-tree.h (type_as_string_real): New function.
15915 * pt.c (mangle_class_name_for_template): Use it.
15916 * error.c (dump_aggr_type): Change prototype.
15917 (dump_type_prefix): Likewise.
15918 (dump_type_suffix): Likewise.
15919 (dump_type_real): Convert from dump_type. If desired, the
15920 "canonica" name of a typedef, i.e., the name of the underlying
15921 type, can be printed.
15922 (dump_type): Call dump_type_real.
15923
15924 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
15925
15926 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15927
15928 * typeck.c (comp_target_types): Tweak pedantic case.
15929 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
15930 Return -1 or 1 instead of 1 or 2.
15931 (compparms): Remove STRICT handling.
15932 (convert_for_assignment): Fix handling of pmfs.
15933
15934 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
15935
15936 * typeck.c (comp_target_types): Handle references like pointers.
15937 (comp_target_parms): Note that return code from comp_target_types
15938 can be negative to indicate failure.
15939
15940 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15941
15942 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15943 which requires a working target compiler to build.
15944
15945 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
15946
15947 * tree.c (avoid_overlap): Add prototype.
15948
15949 * spew.c (num_tokens): Add prototype.
15950 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15951
15952 * search.c (dfs_check_overlap): Add prototype.
15953 (dfs_no_overlap_yet): Likewise.
15954
15955 * pt.c (original_template): Add prototype.
15956 (inline_needs_template_parms): Likewise.
15957 (push_inline_template_parms_recursive): Likewise.
15958 (retrieve_specialization, register_specialization): Likewise.
15959 (print_candidates, reduce_template_parm_level): Likewise.
15960 (build_template_decl, mark_template_parm): Likewise.
15961 (tsubst_friend_function, get_bindings_real): Likewise.
15962
15963 * method.c (start_squangling): Add prototype.
15964 (end_squangling, check_ktype, issue_ktype): Likewise.
15965 (build_overloaded_scope_ref, check_btype): Likewise.
15966 (build_mangled_template_parm_index): Likewise.
15967
15968 * lex.c (init_cpp_parse): Add prototype.
15969 (handle_cp_pragma, handle_sysv_pragma): Likewise.
15970 (reduce_cmp, token_cmp): Likewise.
15971
15972 * except.c (call_eh_info): Add prototype.
15973 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15974 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15975
15976 * decl2.c (is_namespace_ancestor): Add prototype.
15977 (namespace_ancestor, add_using_namespace): Likewise.
15978 (ambiguous_decl): Likewise.
15979
15980 * decl.c (indent): Add prototype.
15981
15982 * call.c (add_template_candidate_real): Add prototype.
15983
15984 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
15985
15986 * decl2.c (build_expr_from_tree): Just return a PMF.
15987
15988 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
15989
15990 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15991 when doing initializations.
15992
15993 * pt.c (unify): Use comptypes to compare type args.
15994
15995 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
15996
15997 * decl.c (duplicate_decls): Fix check for when it's safe to free
15998 the new decl.
15999
16000 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
16001 to type_as_string.
16002
16003 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
16004
16005 * pt.c (build_template_parm_index): Add prototype.
16006
16007 * search.c (my_tree_cons): Don't clear words outside the
16008 newly allocated node.
16009
16010 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
16011
16012 * lex.c (init_parse): Now returns char* containing the filename.
16013
16014 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
16015 Jeff Law <law@cygnus.com>
16016
16017 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16018 than a pointer.
16019
16020 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16021
16022 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16023
16024 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16025
16026 * decl.c (duplicate_decls): Don't warn for redundant decls if
16027 friend: let add_friend take care of it.
16028
16029 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16030
16031 * sig.c (build_signature_pointer_constructor): Don't set
16032 TREE_HAS_CONSTRUCTOR for a signature pointer.
16033 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16034 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16035 here, too.
16036 * typeck.c (build_unary_op): Only allow taking the address of a
16037 real constructor.
16038 * typeck2.c (digest_init): Simplify.
16039 (store_init_value): Don't pedwarn about using { } for pmfs.
16040
16041 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
16042
16043 * cp-tree.h (start_decl): Update prototype.
16044 * decl.c (start_decl): Like the C version, new parameters
16045 for the attributes. Call cplus_decl_attributes here,
16046 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
16047 (grokdeclarator): Pass NULL for new start_decl arguments.
16048 * pt.c (tsubst_expr): Likewise.
16049 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
16050 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16051 * lex.c (build_lang_decl): Add lang_name_java.
16052 * class.c (push_lang_context): Add lang_name_java.
16053 * method.c (build_mangled_name): Check for is_java_type.
16054
16055 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16056
16057 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16058 * call.c (build_scoped_method_call): Check for TREE_CODE for
16059 VOID_TYPE instead of type == void_type_node.
16060 (build_method_call): Likewise.
16061 * decl.c (lookup_name_real): Likewise.
16062 (grokdeclarator): Likewise.
16063 (start_decl): Likewise.
16064 (grokparms): Likewise.
16065 (start_function): Likewise.
16066 (finish_function): Likewise.
16067 (start_method): Likewise.
16068
16069 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
16070
16071 * lex.c (finput): New variable.
16072 (init_cpp_parse): Renamed from init_parse.
16073 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
16074 (finish_parse): New function.
16075 * cp-tree.h (init_lex, init_parse): Remove declarations.
16076
16077 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
16078
16079 * call.c (build_call): Still evaluate the actual argument.
16080 * class.c (is_empty_class): Update for -fnew-abi.
16081
16082 * decl2.c: -fnew-abi implies -fsquangle.
16083
16084 * method.c (do_build_assign_ref): Don't do anything to copy
16085 an empty class.
16086 (do_build_copy_constructor): Likewise.
16087 * call.c (build_over_call): Likewise.
16088
16089 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16090
16091 * tree.c (avoid_overlap): Return a value.
16092
16093 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
16094
16095 * method.c (check_btype): Add missing argument to xrealloc.
16096 (check_ktype): Likewise.
16097
16098 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16099
16100 Implement empty base optimization.
16101 * class.c (finish_struct_1): Add vbase fields earlier. Set
16102 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
16103 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16104 (types_overlap_p): New fn.
16105 * tree.c (avoid_overlap): New fn.
16106 (build_base_fields): Use it to avoid overlapping empty bases.
16107 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16108
16109 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16110
16111 Re-implement allocation of base class subobjects.
16112 * tree.c (unshare_base_binfos): New fn.
16113 (layout_basetypes): Use it. Now handles offsets of both virtual and
16114 non-virtual bases, after layout_type.
16115 (layout_vbasetypes): Remove.
16116 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16117 (build_vbase_pointer_fields): Split out from old layout_basetypes.
16118 * class.c (finish_base_struct): Lose offset handling code.
16119 Move nonvdtor warning here. Don't mess with t_binfo anymore.
16120 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
16121 * cp-tree.h: Adjust.
16122
16123 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
16124
16125 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16126 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16127 * class.c (duplicate_tag_error): Likewise.
16128 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16129 * tree.c (layout_vbasetypes): Update from layout_record, remove
16130 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16131 (layout_basetypes): Likewise.
16132
16133 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
16134
16135 * class.c, Make sure system.h is included just after config.h.
16136 Delete lingering stdio and errno references too.
16137 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16138
16139 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
16140
16141 * friend.c (is_friend): Fix access control for local classes.
16142
16143 * class.c (is_empty_class): New fn.
16144 * call.c (build_call): Don't pass empty class objects to a function.
16145
16146 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
16147
16148 * call.c (build_over_call): Do name resolution for default
16149 arguments of function templates in the scope of the templates.
16150
16151 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
16152
16153 * call.c: Include system.h. Remove includes, declarations and
16154 defines provided by system.h.
16155 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16156 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16157 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16158 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16159 * typeck2.c, xref.c: Likewise.
16160 * Makefile.in: Dependencies updated as appropriate.
16161 * Make-lang.in: Likewise.
16162
16163 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
16164
16165 * pt.c (fn_type_unification): Allow incomplete unification without
16166 an immediate error message.
16167
16168 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16169
16170 * tree.c (member_p): New fn.
16171 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16172 initializing class members.
16173
16174 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16175 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16176
16177 * call.c (build_method_call): Handle non-scoped destructors, too.
16178 * pt.c (tsubst_copy): Likewise.
16179
16180 * pt.c (print_template_context): Split out...
16181 (push_tinst_level): ...from here.
16182
16183 * friend.c (is_friend): Don't pass a type to decl_function_context.
16184
16185 * typeck.c (convert_for_initialization): Always hand off
16186 conversions to class type.
16187
16188 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16189
16190 * friend.c (is_friend): Local classes have the same access as the
16191 enclosing function.
16192
16193 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
16194
16195 * typeck.c (expand_target_expr): Delete dead function.
16196
16197 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16198
16199 * repo.c (save_string): Delete dead function.
16200
16201 * method.c (thunk_printable_name): Delete dead function.
16202
16203 * lex.c (yynextch): Delete dead function.
16204
16205 * expr.c (tree_extract_aggr_init): #if 0 out.
16206
16207 * except.c (do_unwind): Delete dead function.
16208 (easy_expand_asm): Likewise.
16209
16210 * cvt.c (build_conversion_type_1): Delete dead function.
16211
16212 * cp-tree.h (push_expression_obstack): Declare.
16213
16214 * call.c (source_type): #if 0 out.
16215
16216 * class.c (alter_access): Remove unused label. Add braces
16217 around empty else clause.
16218
16219 * lex.c (yyprint): Fix argument to printf.
16220
16221 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
16222
16223 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16224
16225 * pt.c (instantiate_class_template): Make sure template
16226 arguments are permanent.
16227 * init.c (resolve_offset_ref): Don't go looking around in
16228 template types.
16229
16230 * semantics.c: Add routines to handle expressions, and some
16231 declaration processing.
16232 * parse.y: Use them.
16233 (current_class_depth): Move declaration to cp-tree.h.
16234 * parse.c: Regenerated.
16235 * cp-tree.h: Use them.
16236 (current_class_depth): Declare.
16237 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16238
16239 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
16240
16241 * error.c (dump_decl): Be a bit more explicit with template
16242 type arguments, when verbose.
16243
16244 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16245
16246 * inc/exception: Reorder closing braces.
16247
16248 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
16249
16250 * pt.c (redeclare_class_template): New function.
16251 * cp_tree.h (redeclare_class_template): Declare it.
16252 * decl.c (xref_tag): Use it.
16253
16254 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
16255
16256 * call.c (build_over_call): Check IS_AGGR_TYPE, not
16257 TYPE_LANG_SPECIFIC.
16258 * typeck.c (convert_arguments): Likewise.
16259
16260 * decl.c (grokdeclarator): Remove const and volatile from type after
16261 setting constp and volatilep.
16262
16263 * class.c (finish_struct_1): Don't warn about bool bitfield larger
16264 than one bit.
16265
16266 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
16267
16268 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16269
16270 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
16271
16272 * call.c (build_object_call): Complain about ambiguous operator(),
16273 rather that crashing.
16274 (build_new_op): Likewise.
16275 (build_op_delete_call): Likewise.
16276
16277 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
16278
16279 * cvt.c (perform_qualification_conversions): Use comp_target_types
16280 instead of comp_ptr_ttypes.
16281
16282 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
16283
16284 * cp-tree.h (enforce_access): Declare.
16285 * call.c (enforce_access): Make it extern, not static.
16286 * class.c (alter_access): Use enforce_access; modify code for ISO
16287 compliance, rather than ARM rules.
16288
16289 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16290
16291 * cp-tree.h: Fix typo.
16292
16293 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16294
16295 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16296 if (aggregate_value_p (type)).
16297
16298 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16299
16300 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
16301
16302 * tree.c (mapcar): When dealing with a DECL, use it's constant
16303 value, if any.
16304 * pt.c (lookup_template_class): Don't mangle the names of template
16305 classes whose arguments are unknown.
16306
16307 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16308
16309 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16310
16311 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16312
16313 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
16314
16315 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16316 boolean_type_node to 1.
16317
16318 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
16319
16320 * error.c (dump_expr): Remove unused variable `l'.
16321
16322 * pt.c (for_each_template_parm): New function, created by
16323 converting uses_template_parms.
16324 (tree_fn_t): New typedef.
16325 (uses_template_parms): Use it.
16326 (mark_template_parm): New function.
16327 (push_template_decl): Check that the argument list of a partial
16328 specialization uses all the template parameters.
16329
16330 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16331 with it; we might want it for debugging.
16332 * cp-tree.h (type_unification): Change interface.
16333 * class.c (finish_struct_1): Skip nested template types, just like
16334 ordinary nested types.
16335 (instantiate_type): Use new interface to type_unification.
16336 * lex.c (init_lex): Add __sz as opname for sizeof.
16337 * method.c (build_overload_scope_ref): New function.
16338 (build_overload_int): Handle complex expressions. Set
16339 numeric_output_need_bar if necessary.
16340 (build_overload_value): Handle non-PARM_DECL nodes; this
16341 routine is now used by build_overload_int. Remove some
16342 assignments to numeric_output_need_bar. Use
16343 build_overload_scope_ref.
16344 (build_qualified_name): Note that some template mangled names end
16345 with digits, and set numeric_output_need_bar appropriately. Use
16346 build_underscore_int.
16347 * pt.c (unify): Change interface.
16348 (type_unification_real): Likewise.
16349 (determine_specialization): Use new interfaces.
16350 (tsubst): Deal gracefully with situations in which the argument
16351 vector is not fully filled.
16352 (fn_type_unification): Use new interfaces.
16353 (type_unification): Likewise. Remove NOP_EXPR hack.
16354 (type_unification_real): Likewise.
16355 (unify): Likewise. Deal with unification of complex expressions.
16356
16357 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16358
16359 * pt.c (complete_template_args): Initialize skip properly.
16360
16361 * decl.c (make_typename_type): Revert.
16362 (make_implicit_typename): Remove.
16363 (lookup_name_real): Don't call it. Call lookup_field if we see a
16364 TYPE_DECL from a template base.
16365 * search.c (lookup_field): Do implicit typename stuff.
16366
16367 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
16368 Geoff Noer <noer@cygnus.com>
16369
16370 * Makefile.in: Various fixes for building cygwin32 native toolchains.
16371 * Make-lang.in: Likewise.
16372
16373 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16374
16375 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16376
16377 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
16378
16379 * decl.c (make_implicit_typename): Rewrite removed code.
16380 (make_typename_type): Call it if the type we look up comes from
16381 a base that uses template parms.
16382
16383 * pt.c (complete_template_args): Rewrite.
16384 (tsubst, FUNCTION_DECL): Use it.
16385
16386 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
16387
16388 * semantics.c (finish_asm_stmt): Fix combine strings. Call
16389 c_expand_asm_operands () if output_operands, input_operands or
16390 clobbers is not NULL_TREE.
16391
16392 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16393
16394 * pt.c (complete_template_args): New function.
16395 (get_bindings): Deal with specializations of function templates
16396 with return type containing parameters from outer class
16397 templates.
16398 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16399 substitute arguments and compose a new type.
16400
16401 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
16402
16403 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16404 FUNCTION_DECLs.
16405
16406 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16407
16408 * decl.c (make_implicit_typename): Lose useless code.
16409
16410 * call.c (standard_conversion): Handle A* -> const A* properly.
16411
16412 * pt.c (get_bindings_real): Rename from get_bindings. Add
16413 check_rettype parm.
16414 (get_bindings): Pass 1.
16415 (get_bindings_overload): Pass 0.
16416
16417 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
16418
16419 * pt.c (check_explicit_specialization): When reverting a static
16420 member function, also remove the `this' parameter from
16421 last_function_parms.
16422
16423 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16424
16425 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16426 a function context.
16427
16428 * decl.c (store_bindings): Use free_binding_vecs.
16429 (pop_from_top_level): Likewise.
16430
16431 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16432
16433 * decl.c (make_implicit_typename): Only change the type of a
16434 TYPENAME_TYPE.
16435
16436 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
16437
16438 * semantics.c: New file, containing routines to perform the
16439 semantic phase of parsing.
16440 * parse.y: Use it.
16441 * pt.c (tsubst_expr): Likewise.
16442 * cp-tree.h: Declare the various functions in semantics.c.
16443 Provide macros to access _STMT tree nodes.
16444 * cp-tree.def: Add ASM_STMT tree node.
16445 * Makefile.in, Make-lang.in: Add dependencies on and for
16446 semantics.c.
16447
16448 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
16449
16450 * pt.c (push_template_decl): Only check primary templates.
16451
16452 * pt.c (check_explicit_specialization): Complain about default args
16453 in explicit specialization.
16454
16455 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16456 constructor_declarator.
16457
16458 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
16459
16460 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16461 has no overloaded operator ->.
16462
16463 * call.c (build_field_call): Don't crash when presented with a
16464 field that is actually a nested type.
16465
16466 * decl.c (pushtag): Deal with friend class injection in local
16467 classes.
16468
16469 * call.c (build_object_call): Don't crash if OBJ is a
16470 pointer-to-member-function.
16471
16472 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16473
16474 * pt.c (push_template_decl): Complain about template with C linkage,
16475 anonymous template class.
16476
16477 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
16478
16479 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16480 * search.c: Likewise.
16481
16482 * lex.c (do_pending_defargs): Only call
16483 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16484
16485 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16486
16487 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
16488
16489 * parse.y: Deal with CONSTRUCTORS in new_initializers.
16490
16491 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
16492
16493 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16494 closely mimics the behavior in parse.y.
16495 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16496 into a compound statement.
16497
16498 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16499
16500 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16501 * pt.c (inline_needs_template_parms): New fn.
16502 (original_template): New fn.
16503 (push_inline_template_parms_recursive): New fn.
16504 (maybe_begin_member_template_processing): Use them.
16505 (maybe_end_member_template_processing): Likewise.
16506 (is_member_or_friend_template): Rename to is_member_template.
16507 Member functions of local classes are never member templates.
16508
16509 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16510
16511 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16512 added in the class scope to catch redefinition error.
16513
16514 * pt.c (reduce_template_parm_level): Also copy
16515 the DECL_TEMPLATE_PARMS field.
16516
16517 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
16518
16519 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16520 reduced-level template type parameter.
16521
16522 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
16523
16524 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16525 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16526 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16527 * decl.c (duplicate_decls): Propagate it.
16528 * typeck2.c (abstract_virtuals_error): Use two loops to emit
16529 abstract virtual functions and virtual functions which need a
16530 final overrider separately.
16531
16532 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
16533
16534 * lang-specs.h: Properly put brackets around array elements in
16535 initializer.
16536
16537 * typeck.c (build_binary_op_nodefault): Correctly place parens around
16538 && and || in expression.
16539
16540 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
16541
16542 * call.c (default_parm_conversions): Remove prototype definition.
16543 (build_method_call): Remove unused variable result.
16544
16545 * cvt.c (ocp_convert): Remove unused variable conversion.
16546
16547 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16548
16549 * except.c (do_unwind): #if 0 definition of unused variables fcall
16550 and next_pc.
16551
16552 * expr.c (extract_scalar_init): #if 0 prototype and function
16553 definition.
16554
16555 * init.c (expand_aggr_init_1): Remove unused variable init_type.
16556 (build_new_1): Remove unused variable t.
16557
16558 * pt.c (instantiate_class_template): Remove unused variable newtag;
16559 cast called function return value to void.
16560 (do_decl_instantiation): Remove unused variables name and fn.
16561
16562 * tree.c (get_type_decl): Add default return to shut up compiler from
16563 complaining control reaches end of non-void function.
16564
16565 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
16566
16567 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
16568
16569 * call.c (default_parm_conversions): Remove prototype definition.
16570 (build_method_call): Remove unused variable result.
16571 (build_over_call): Add default case in enumeration switch.
16572
16573 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
16574
16575 * decl2.c (lang_decode_option): Change j's type to size_t.
16576
16577 * tree.c (layout_vbasetypes): record_align and desired_align are of
16578 type unsigned int; const_size and nonvirtual_const_size likewise.
16579
16580 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
16581
16582 * parse.y (new_initializer): Make sure all initializers are
16583 lists.
16584
16585 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
16586
16587 * decl2.c (import_export_decl): Mark tinfo functions for
16588 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
16589
16590 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
16591
16592 * method.c: Fix typo.
16593
16594 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16595
16596 * method.c: Include "system.h" to get stdlib.h, stdio.h,
16597 ctype.h, string.h, etc.
16598 (issue_nrepeats): Add default case in enumeration switch.
16599 (check_btype): Likewise.
16600 (process_overload_item): Likewise.
16601
16602 * Makefile.in (method.o): Depend on system.h.
16603
16604 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16605
16606 * lex.c (do_scoped_id): Fix parenthesizing.
16607
16608 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
16609
16610 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
16611 FLAG_RTTI is unset, initialize type info machinery and continue
16612 with FLAG_RTTI enabled.
16613 (get_typeid): Likewise.
16614
16615 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16616
16617 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
16618 from B.
16619
16620 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
16621
16622 * pt.c (finish_member_template_decl): Deal more gracefully with
16623 invalid declarations.
16624
16625 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
16626
16627 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
16628 cp-tree.h: Clean up more old overloading code, old RTTI code, and
16629 some formatting quirks.
16630
16631 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
16632 method.c, pt.c, ptree.c, typeck.c: Remove support for
16633 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
16634 * class.h: Remove.
16635 * Makefile.in: Adjust.
16636
16637 * pt.c (unify): Don't allow reduced cv-quals when strict.
16638
16639 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16640 *type_unification* and unify.
16641
16642 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16643
16644 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16645 (nested_name_specifier): And add it before this use.
16646 (typename_sub0): And this use. Also add use without the keyword.
16647 (typename_sub1): Likewise.
16648 * pt.c (instantiate_class_template): Don't actually instantiate
16649 anything if our type uses template parms.
16650
16651 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
16652
16653 * decl.c (start_function): Don't call temporary_allocation for a
16654 nested function.
16655
16656 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16657
16658 * pt.c (instantiate_class_template): Don't mess with friends if
16659 our type uses template parms.
16660
16661 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16662
16663 * parse.y (nested_name_specifier): Use explicit_template_type.
16664 (typename_sub): Allow a template_type, an explicit_template_type,
16665 or an implicit template type at the end.
16666 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16667 * decl.c (make_typename_type): Handle template-id where the name
16668 is a TEMPLATE_DECL.
16669 * call.c (build_scoped_method_call): Handle member template
16670 destructor call.
16671 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16672 destructor is represented by the type.
16673
16674 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16675 * parse.y (nested_name_specifier): Add 'template' case.
16676 (explicit_template_type): New rule.
16677 (typename_sub): Use it.
16678 * decl.c (make_typename_type): Handle getting a template-id for NAME.
16679 * pt.c (tsubst): Likewise.
16680
16681 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16682
16683 * pt.c (add_to_template_args): Fix thinko.
16684 (instantiate_class_template): Call it later.
16685
16686 * pt.c (get_class_bindings): Add outer_args parm.
16687 (most_specialized_class): Likewise.
16688 (instantiate_class_template): Pass it.
16689 (more_specialized_class): Likewise.
16690 (lookup_template_class): Get context from template if none
16691 was specified.
16692 (finish_member_template_decl): Don't do anything with a
16693 partial specialization.
16694 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16695 AGGREGATE_TYPE_P.
16696 * class.c (finish_struct): Member class templates have already been
16697 checked for name clashes.
16698 * decl.c (pushdecl_with_scope): Handle pushing at class level.
16699
16700 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16701
16702 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16703 (tsubst, *_PARM): Support multiple levels of template classes.
16704 (instantiate_class_template): Look up the pattern from the
16705 original template.
16706 (lookup_template_class): Handle getting a template for d1.
16707 (push_template_decl): Correct setting of 'primary'.
16708 (reduce_template_parm_level): Add 'levels' parm.
16709 (finish_member_template_decl): Support member class templates.
16710 (template_class_depth): Handle multiple levels.
16711 * parse.y (component_decl_1, fn.def2): Remove member template case.
16712 (component_decl): Add member template cases.
16713 * decl2.c (check_member_template): We now handle member template
16714 classes.
16715 * decl.c (pushtag): Handle member templates.
16716 * method.c (do_inline_function_hair): Don't touch
16717 IDENTIFIER_GLOBAL_VALUE.
16718 * init.c (build_offset_ref): If name isn't an identifier, just
16719 return it.
16720 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16721
16722 * typeck.c (get_delta_difference): Do adjust for conversions to
16723 and from virtual base.
16724
16725 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
16726
16727 * typeck.c (get_delta_difference): Give hard error for conversion
16728 from virtual base.
16729
16730 * cp-tree.h: Tweak formatting.
16731
16732 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
16733
16734 * decl.c (push_namespace): Handle redeclaration error.
16735
16736 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16737 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16738 (NAMESPACE_BINDING): New macro.
16739 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16740 * *.c: Use them.
16741
16742 * pt.c (push_template_decl): Use innermost_args.
16743
16744 * decl.c (get_unique_name): Tweak from earlier in the name.
16745
16746 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16747
16748 * cp-tree.def: Add CPLUS_BINDING node.
16749 * cp-tree.h (tree_binding): New struct.
16750 (BINDING_SCOPE, BINDING_VALUE): New macros.
16751 (current_namespace, global_namespace): Declare extern.
16752 (struct lang_decl_flags): New field in_namespace.
16753 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16754 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16755 (TREE_INDIRECT_USING): New macro.
16756 * decl2.c (current_namespace, global_namespace): Declare. The
16757 value is a NAMESPACE_DECL now, not a TREE_LIST.
16758 (is_namespace_ancestor, namespace_ancestor): New static functions.
16759 (add_using_namespace, ambiguous_decl): Likewise.
16760 (lookup_using_namespace): New support function for lookup_name.
16761 (qualified_lookup_using_namespace): New support function for
16762 do_scoped_id and lookup_namespace_name.
16763 (get_namespace_id): Mark as obsolete.
16764 (current_namespace_id): Likewise.
16765 (do_namespace_alias): Implement.
16766 (do_using_directive): Implement as call to add_using_namespace.
16767 * decl.c (binding_for_name): New function.
16768 (push_namespace, pop_namespace): Implement.
16769 (push_decl): Don't install a FUNCTION_DECL in the global branch.
16770 (lookup_namespace_name): Implement using qualified lookup.
16771 (lookup_name_real): For global scoping, lookup in
16772 global_namespace. For namespace scoping, lookup in given
16773 namespace. For unscoped lookup, iterate over namespace,
16774 considering using directives.
16775 (init_decl_processing): Initialize global_namespace.
16776 (grokvardecl): Build assembler name as static name for globals.
16777 (grokdeclarator): Remove old namespace mangling.
16778 (xref_tag): When installing a global binding for the
16779 tag, make sure we have an identifier.
16780 * method.c (build_overload_nested_name): Mangle namespaces.
16781 (build_qualified_name): Likewise.
16782 (build_decl_overload_real): Likewise.
16783 * lex.c (build_lang_decl): Set namespace for new declaration to
16784 current_namespace.
16785 (do_scoped_id): Find global names in global or current
16786 namespace, or using qualified namespace lookup, depending on
16787 context.
16788 * init.c (build_member_call): When scope is namespace, use
16789 build_x_function_call instead.
16790 (build_offset_ref): When scope is namespace, collapse processing
16791 to lookup_namespace_name instead.
16792 * error.c (dump_decl): Support NAMESPACE_DECL.
16793 * decl.c (pushdecl): Bind globals to current namespace.
16794 (push_overloaded_decl): Likewise.
16795 (lookup_tag): Likewise.
16796 (lookup_name_current_level): Likewise.
16797 (xref_tag): Likewise.
16798 (start_function): Likewise.
16799 * lex.c (do_identifier): Likewise.
16800 (identifier_typedecl_value): Likewise.
16801 (real_yylex): Likewise.
16802 * method.c (do_inline_function_hair): Likewise.
16803 * parse.y (unscoped): Likewise.
16804 * pt.c (check_explicit_specialization): Likewise.
16805 (lookup_template_class): Likewise.
16806 * rtti.c (call_void_fn): Likewise.
16807 * sig.c (build_sigtable): Likewise.
16808 * ptree.c (lang_print_xnode): New function.
16809
16810 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
16811
16812 * pt.c (instantiate_class_template): Don't instantiate if pedantic
16813 and the args use template parms.
16814
16815 * pt.c (push_tinst_level): If the instantiation uses template parms,
16816 fail silently.
16817 * decl.c (xref_basetypes): Do call complete_type for basetypes
16818 that involve template parameters.
16819
16820 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16821
16822 * typeck2.c (process_init_constructor): Fix labeled init check.
16823
16824 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16825
16826 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16827 argument to tsubst and friends.
16828
16829 * pt.c (tsubst, FUNCTION_DECL): Tidy.
16830
16831 * typeck.c (build_x_function_call): Handle static member function
16832 templates like non-templates. Handle friend templates like normal
16833 function templates.
16834 * pt.c (tsubst, *_PARM): Don't use orig_level.
16835 (get_bindings): Don't call add_to_template_args.
16836 (instantiate_template): Likewise.
16837 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16838 * ptree.c (print_lang_type): Print index/level for template parms.
16839
16840 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
16841
16842 * Make-lang.in (cc1plus): Note that cc1plus depends on
16843 cp/cp-tree.h and cp/cp-tree.def.
16844
16845 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16846 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16847 position in a template parameter list.
16848 * cp-tree.h (template_parm_index): New structure, used as the tree
16849 structure for a TEMPLATE_PARM_INDEX.
16850 (TEMPLATE_PARM_IDX): New macro.
16851 (TEMPLATE_PARM_LEVEL): Likewise.
16852 (TEMPLATE_PARM_DESCENDANTS): Likewise.
16853 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16854 (TEMPLATE_PARM_DECL): Likewise.
16855 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16856 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16857 (TEMPLATE_TYPE_DECL): Likewise.
16858 (TEMPLATE_CONST_IDX): Remove.
16859 (TEMPLATE_CONST_LEVEL): Likewise.
16860 (TEMPLATE_CONST_SET_INFO): Likewise.
16861 (TEMPLATE_TYPE_SET_INFO): Likewise.
16862 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16863 node.
16864 (TEMPLATE_TYPE_LEVEL): Likewise.
16865 * decl.c (decls_match): Call comp_template_parms, rather than
16866 expanding it inline.
16867 (duplicate_decls): If two template declarations are being merged,
16868 then their TEMPLATE_INFOs should be merged as well.
16869 (grokfndecl): Save template-id information when declaring a friend
16870 with explicit template arguments. Pass arguments to
16871 check_explicit_specialization via correct convention; at some
16872 point check_explicit_specialization changed, but these call-sites
16873 did not.
16874 (grokdeclarator): Tidy up slightly.
16875 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
16876 two template functions with the same DECL_ASSEMBLER_NAME the same,
16877 since the names are not yet mangled.
16878 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16879 TEMPLATE_CONST_PARM.
16880 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
16881 decl for a non-type parameter, rather than printing `<tparm ...>'.
16882 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16883 (do_friend): Deal with template friends.
16884 * lex.c (do_pending_inlines): Call
16885 maybe_begin_member_template_processing, rather than
16886 conditionally calling begin_member_template_processing.
16887 (process_next_inline): Likewise. Call
16888 maybe_end_member_template_processing, rather than
16889 conditionally calling end_member_template_processing.
16890 (do_pending_defargs): Likewise.
16891 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16892 TEMPLATE_CONST_PARM.
16893 * method.c (build_mangled_template_parm_index): New function.
16894 (build_overload_value): Use it.
16895 (build_overload_name): Likewise.
16896 * pt.c (finish_member_template_decl): Allow friend declarations.
16897 (template_class_depth): New function.
16898 (is_member_template): Rename, and modify, to become...
16899 (is_member_or_friend_template): New function.
16900 (end_member_template_processing): Rename, and modify, to become...
16901 (maybe_end_member_template_processing).
16902 (build_template_parm_index): New function.
16903 (reduce_template_parm_level): New function.
16904 (process_template_parm): Modify to use build_template_parm_index.
16905 (push_template_decl): Deal with friend templates.
16906 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16907 TEMPLATE_CONST_PARM.
16908 (tsubst_friend_function): New function.
16909 (instantiate_class_template): Generate the DECL_FRIENDLIST
16910 for a new instantiation by using tsubst_friend_function rather
16911 than just tsubst.
16912 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16913 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16914 appropriate new macros. Use reduce_template_parm_level to
16915 generate lower-level template parameters. Handle tsubst'ing into
16916 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
16917 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16918 templates. Similarly for the template parameters for a new
16919 template.
16920 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
16921 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
16922 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16923 (get_bindings): Call add_to_template_args if necessary.
16924 (instantiate_decl): Handle instantiations of friend templates.
16925 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16926 TEMPLATE_TYPE_PARM as a list of fields; it's not!
16927 * spew.c (yylex): Do a little manual constant propagation to
16928 clarify the code.
16929
16930 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
16931
16932 * error.c: Include sys/types.h.
16933
16934 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
16935
16936 * method.c (build_mangled_name): Start CPP directives in column zero.
16937
16938 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16939
16940 * typeck2.c (process_init_constructor): Sorry about non-trivial
16941 labeled initializers.
16942 * parse.y (initlist): Re-enable labeled initializers.
16943
16944 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16945
16946 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16947 all callers changed. Rely on the new parameter instead of arg
16948 being a TREE_LIST when determine whether we are working inside
16949 template template parameter. Clean up is_type test.
16950
16951 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16952
16953 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16954 * typeck2.c (initializer_constant_valid_p): Allow conversions
16955 between pointers and references.
16956
16957 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
16958
16959 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16960 if pedantic || warn_pointer_arith.
16961
16962 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16963
16964 * pt.c (unify): Handle TEMPLATE_DECL.
16965
16966 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
16967
16968 * cp-tree.h (strip_attrs): Remove decl.
16969
16970 1998-02-18 Doug Evans <devans@cygnus.com>
16971
16972 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16973 Update olddecl's attributes too.
16974 (strip_attrs): Remove function.
16975 * typeck.c (common_type): Call merge_machine_type_attributes.
16976
16977 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
16978
16979 * parse.y (initdcl0_innards): New grammar symbol.
16980 (nomods_initdecls, nomods_initdcl0): Change type from itype to
16981 none, since the resulting value is never used.
16982 (parse_decl): New function.
16983 (datadef): Remove redundant actions.
16984 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16985 * parse.c: Regenerated.
16986
16987 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16988
16989 * parse.y (simple_stmt): Use getdecls() to check for decl.
16990
16991 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
16992
16993 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16994 macros.
16995 (c++.install-common): Install c++filt properly as native or as cross
16996 variant.
16997 (c++.uninstall): Add c++filt.
16998
16999 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
17000
17001 * call.c (standard_conversion): Fix multi-level ptr conversions.
17002
17003 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
17004
17005 * init.c (build_new): Propagate error_mark_node up.
17006
17007 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
17008
17009 * parse.y (simple_stmt): If the condition isn't a declaration,
17010 start the controlled block after the test.
17011
17012 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17013
17014 * call.c (build_over_call): Convert builtin abs, labs and fabs to
17015 tree-codes.
17016 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17017 builtins.
17018
17019 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17020
17021 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17022
17023 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
17024
17025 * cp-tree.h: Add access_protected_virtual_node.
17026 * class.c (init_class_processing): Initialize it.
17027 * decl.c (xref_basetypes): Use it.
17028 * parse.y (base_class_access_list): Likewise.
17029
17030 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17031 (c++.install-common): Install c++filt.
17032
17033 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17034
17035 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17036
17037 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
17038
17039 * call.c (reference_binding): Use comptypes when comparing
17040 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17041
17042 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
17043
17044 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17045 (really_overloaded_fn): Move check here from is_overloaded_fn.
17046 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17047
17048 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
17049
17050 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17051 conversions.
17052
17053 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
17054
17055 * cp-tree.h (push_template_decl): Return the decl passed in, or an
17056 equivalent duplicate.
17057 * decl.c (pushtag): Use the return value from push_template_decl.
17058 (duplicate_decls): When duplicating a template declaration, merge
17059 the DECL_TEMPLATE_RESULTs as well.
17060 (make_implicit_typename): Don't try to dive into typename types to
17061 find a context for making a new implicit typename.
17062 (start_decl): Use the return value from push_template_decl.
17063 (grokdeclarator): Complain about declarations list `const operator
17064 int'. Since we don't correctly handle in-class initializations of
17065 non-static data members, complain about this (now illegal)
17066 practice. Issue an error for initializations of non-const statics
17067 since that is illegal as well, and since we don't handle that case
17068 correctly either.
17069 (start_function): Use the return value from push_template_decl.
17070 (start_method): Likewise.
17071 * decl2.c (grokfield): Likewise. Since the change to
17072 grokdeclarator ensures that all initialized fields are in fact
17073 static, remove a redundant test for TREE_PUBLIC.
17074 * parse.y (initlist): Disable labeled initializers since they do
17075 not work as per the documentation, and since they do not use the
17076 same syntax as the C front end.
17077 * pt.c (push_template_decl): Return the decl passed in, or an
17078 equivalent duplicate.
17079 (lookup_template_class): When searching in a nested context,
17080 use the right arguments.
17081 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17082 * typeck.c (build_component_ref): Assign the correct type to the
17083 result of build_vfn_ref.
17084
17085 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
17086
17087 * pt.c (convert_nontype_argument): Fix typo.
17088 (check_explicit_specialization): Allow old-style specialization
17089 of class template members.
17090
17091 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
17092 Manfred Hollstein <manfred@s-direktnet.de>
17093
17094 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17095 when deciding to override DECL_ASSEMBLER_NAME.
17096
17097 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
17098
17099 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17100 * cp-tree.h (flag_do_squangling): Add declaration.
17101 * lang-options.h: Add -fsquangle and -fno-squangle.
17102 * method.c: Add macros and static variables for squangling.
17103 (build_overload_name): Rename to build_mangled_name, add logic for B
17104 compression, and split into process_modifiers and
17105 process_overload_item.
17106 (process_modifiers): New function, to handle constant, reference,
17107 and pointer types.
17108 (process_overload_item): New function, handles issue of type codes.
17109 (build_overload_name): New function, start squangling and call
17110 build_mangled_name.
17111 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17112 (start_squangling): New function to initialize squangling structs.
17113 (end_squangling): New function to destroy squangling structs.
17114 (nrepeats): Rename variable to Nrepeats.
17115 (issue_nrepeats): New function for issuing 'n' type repeats.
17116 (check_ktype): New function to check for type K name compression.
17117 (build_overload_nested_name): Add a check for K name compression.
17118 (build_qualified_name): Add a check for K name compression and don't
17119 use DECL_ASSEMBLER_NAME when squangling is on.
17120 (check_btype): New function, checks for B type compression.
17121 (build_static_name, build_decl_overload_real): Initiate squangling.
17122 (build_typename_overload, build_overload_with_type): Initiate
17123 squangling
17124
17125 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
17126
17127 * method.c (make_thunk): Avoid name buffer overflow.
17128
17129 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17130
17131 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17132 don't define them yet.
17133
17134 * parse.y (nomods_initdcl0): Add constructor_declarator case.
17135
17136 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17137
17138 * config-lang.in (diff_excludes): Use basename only.
17139
17140 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
17141
17142 * tinfo2.cc: Add tinfo for signed char.
17143
17144 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
17145
17146 * search.c (compute_access): Handle protected constructors in derived
17147 classes as accessible.
17148
17149 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
17150
17151 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17152 Call convert_from_reference sooner.
17153
17154 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
17155
17156 * cvt.c (ocp_convert): Obtain the constant values from constant
17157 decls even if the destination type is the same as the type of the
17158 decl.
17159
17160 * decl2.c (finish_file): Make sure that static inlines with
17161 definitions are not marked DECL_EXTERNAL before returning.
17162
17163 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17164
17165 * decl.c: Lose arg_looking_for_template.
17166 (lookup_name_real): Likewise.
17167 * parse.y: Lose processing_template_arg, template_arg1.
17168 (primary): Likewise.
17169 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17170
17171 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17172
17173 * error.c (dump_decl): Fix type of default arguments for template
17174 template parameters and nontype template parameters.
17175 * parse.y (template_parm): Handle invalid default template
17176 template arguments here.
17177
17178 * parse.y (template_parm): Use template_arg instead of PTYPENAME
17179 for default template template argument.
17180 * pt.c (coerce_template_parms): Merge default template argument
17181 codes. Can treat RECORD_TYPE as template name if it is implicitly
17182 created. Fix argument index in error message.
17183 * typeck.c (comptypes): Merge template argument comparison codes in
17184 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17185
17186 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
17187
17188 * lex.c (file_name_nondirectory): Also check for '/'.
17189
17190 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
17191
17192 * parse.y (primary): Deal with statement-expressions in
17193 templates.
17194 * pt.c (tsubst_copy): Handle BIND_EXPR.
17195 * tree.c (mapcar): Likewise.
17196
17197 * call.c (add_template_candidate_real): Pass extra parameter to
17198 fn_type_unification.
17199 * cp-tree.h (fn_type_unification): Add parameter.
17200 * pt.c (fn_type_unification): Add additional parameter to deal with
17201 static member functions.
17202 (get_bindings): Deal with static member functions.
17203
17204 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17205 (revert_static_member_fn): Declare.
17206 * decl.c (revert_static_member_fn): Remove declaration. Change
17207 linkage from internal to external.
17208 (cp_finish_decl): Deal with virtual functions in classes local to
17209 template functions.
17210 * decl2.c (finish_file): Don't forget to emit increment/decrement
17211 expressions in initializers for file-scope variables.
17212 * parse.y (typename_sub2): If the typename doesn't names a
17213 template, rather than a type, issue an error message.
17214 * pt.c (check_explicit_specialization): Handle specializations of
17215 static member functions.
17216 (coerce_template_parms): Handle offset references to lists of
17217 member functions.
17218 * search.c (note_debug_info_needed): Don't crash when handed a
17219 type which is being defined.
17220 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17221 that can happen with some illegal code.
17222
17223 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17224
17225 * call.c (user_harshness): Initialize `code' to 0.
17226 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17227 (null_ptr_cst_p): Add parentheses around && within ||.
17228 (standard_conversion): Likewise.
17229 (z_candidate): Likewise.
17230 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17231 (build_object_call): Likewise for `mem_args'.
17232 (build_new_op): Likewise for `mem_arglist'. Add `return' from
17233 default case in enumeration switch.
17234
17235 * class.c (build_vtable_entry): Add explicit braces to avoid
17236 ambiguous `else'.
17237 (build_class_init_list): Likewise.
17238 (finish_struct_1): Initialize `width' to 0.
17239 (instantiate_type): Initialize `name' to NULL_TREE. Add
17240 explicit braces to avoid ambiguous `else'.
17241
17242 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17243 `else'.
17244
17245 * decl.c (grok_reference_init): Eliminate unused parameter, all
17246 callers changed.
17247 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17248 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17249 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17250 (grokdeclarator): Add parentheses around && within ||. Add
17251 explicit braces to avoid ambiguous `else'.
17252 (grokparms): Initialize `type' to NULL_TREE.
17253 (xref_tag): Remove unused label `just_return'.
17254 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17255 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17256 (hack_incomplete_structures): Add parentheses around assignment
17257 used as truth value.
17258
17259 * decl2.c (coerce_delete_type): Hide definition of `e3'.
17260
17261 * error.c: Include <stdlib.h>.
17262 (dump_expr): Change the type of `i' to size_t. Remove unused
17263 label `error'.
17264
17265 * except.c (init_exception_processing): Remove unused variable `d'.
17266 (expand_throw): Likewise for `label'.
17267
17268 * friend.c (add_friends): Add explicit braces to avoid ambiguous
17269 `else'.
17270
17271 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17272 (sort_base_init): Likewise for `binfo'.
17273 (expand_member_init): Likewise for `rval'.
17274 (build_member_call): Add parentheses around assignment used as
17275 truth value.
17276 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17277 (build_new): Initialize `nelts' to NULL_TREE. Initialize
17278 `old_immediate_size_expand' to 0.
17279 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17280 (build_vec_delete_1): Remove unused variable `block'.
17281 (expand_vec_init): Initialize `itype' to NULL_TREE.
17282
17283 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
17284 declaration of `index' and `rindex' with autoconf macros.
17285 (reinit_parse_for_expr): Remove unused variables
17286 `look_for_semicolon' and `look_for_lbrac'.
17287 (cons_up_default_function): Initialize `args' to NULL_TREE.
17288 (readescape): Initialize `firstdig' to 0.
17289 (real_yylex): Add parentheses around assignment used as truth value.
17290
17291 * method.c: Include <strings.h> if we don't have <string.h>.
17292 Protect declaration of `index' with autoconf macro.
17293
17294 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17295 Initialize `type' to NULL_TREE.
17296 (structsp): Remove unused variable `id'.
17297
17298 * pt.c (coerce_template_parms): Add explicit braces to avoid
17299 ambiguous `else'.
17300 (lookup_template_class): Initialize `template' to NULL_TREE.
17301 (instantiate_class_template): Remove unused variable `name' and `e'.
17302 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
17303 (do_poplevel): Initialize `saved_warn_unused' to 0.
17304 (type_unification): Remove unused varable `parm'.
17305 (unify): Likewise for `j'.
17306
17307 * repo.c (init_repo): Add parentheses around assignment used as
17308 truth value.
17309 (finish_repo): Remove unused varable `p'.
17310
17311 * search.c (get_binfo): Initialize `type' to NULL_TREE.
17312 (get_base_distance): Likewise.
17313 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17314 and `new_v' to NULL_TREE.
17315 (lookup_fnfields): Likewise for `rval_binfo_h'.
17316 (breadth_first_search): Add parentheses around assignment used as
17317 truth value.
17318 (get_template_base): Initialize `type' to NULL_TREE.
17319
17320 * sig.c (append_signature_fields): Initialize `last_mfptr' to
17321 NULL_TREE.
17322 (build_signature_table_constructor): Likewise for
17323 `last_rhs_field', `pfn' and `vt_off'.
17324 (build_sigtable): Likewise for `init'.
17325
17326 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17327 (propagate_binfo_offsets): Likewise for `delta'.
17328 (hash_tree_cons): Initialize hashcode to 0.
17329 (can_free): Likewise for `size'.
17330 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17331
17332 * typeck.c (convert_sequence): Hide prototype.
17333 (common_type): Add explicit braces to avoid ambiguous `else'.
17334 (comp_target_types): Likewise.
17335 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17336 (build_function_call_real): Add explicit braces to avoid ambiguous
17337 `else'.
17338 (convert_arguments): Initialize `called_thing' to 0.
17339 (convert_for_initialization): Initialize `savew' and `savee' to 0.
17340
17341 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17342 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17343 (build_x_arrow): Likewise for `last_rval'.
17344
17345 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17346
17347 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
17348
17349 * decl.c (init_decl_processing): Use set_sizetype.
17350 * decl2.c (sizetype): Don't declare.
17351 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17352 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17353 (build_component_addr, unary_complex_lvalue): Likewise.
17354 * rtti.c (expand_class_desc): Likewise.
17355 * class.c (get_vfield_offset): Likewise.
17356
17357 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
17358
17359 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17360 early to avoid bogus error. Handle overloaded function
17361 names provided as template arguments correctly.
17362 (coerce_template_parms): Don't mishandle overloaded functions when
17363 dealing with template template parameters.
17364 (lookup_template_class): Issue an error message, rather than
17365 crashing, when the TYPE_DECL provided is not a template type.
17366
17367 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17368
17369 * class.c (instantiate_type): Don't just return a known type if
17370 it's wrong.
17371
17372 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
17373
17374 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17375 since that code could never be reached.
17376
17377 * error.c (dump_decl): Avoid aborting in the midst of printing an
17378 error message about an illegal template declaration.
17379
17380 * parse.y (structsp): Print an error message, rather than crashing,
17381 when a class-head does not name a class.
17382
17383 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
17384 template arguments as a g++ extension.
17385
17386 * cp-tree.def (ALIGNOF_EXPR): New tree code.
17387 * decl2.c (grok_alignof): If processing_template_decl, just store
17388 the expression.
17389 * typeck.c (c_alignof): Likewise.
17390 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17391 * error.c (dump_expr): Likewise.
17392 * pt.c (tsubst_copy): Likewise.
17393 * tree.c (cp_tree_equal): Likewise.
17394 * pt.c (uses_template_parms): Correctly determine whether or not a
17395 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17396 folding can be done.
17397
17398 * cp-tree.h (grok_enum_decls): Remove type parameter.
17399 * decl.c (grok_enum_decls): Likewise.
17400 * decl2.c (grok_x_components): Call grok_enum_decls
17401 unconditionally, since it will do nothing if there is no
17402 current_local_enum. Use the new calling sequence.
17403 * pt.c (tsubst_enum): Use the new calling sequence for
17404 grok_enum_decls.
17405
17406 * decl.c (start_function): Make member functions of local classes
17407 in extern inline functions have comdat linkage here...
17408 (grokdeclarator): Rather than here.
17409
17410 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
17411
17412 * pt.c (convert_nontype_argument): Use decl_constant_value.
17413
17414 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
17415
17416 * call.c (add_template_candidate_real): New function.
17417 (add_template_candidate): Use it.
17418 (add_template_conv_candidate): Likewise.
17419 (joust): Pass extra argument to more_specialized.
17420 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17421 (is_local_class): Remove.
17422 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17423 * cp-tree.h (is_local_class): Remove.
17424 (perform_array_to_pointer_conversion): Likewise.
17425 (finish_member_template_decl): Add.
17426 (check_explicit_specialization): Return a tree, not an int.
17427 (more_specialized): Take additional argument.
17428 (get_bindings): Likewise.
17429 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17430 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17431 (perform_array_to_pointer_conversion): Remove.
17432 * decl.c (saved_scope): Add processing_specialization,
17433 processing_explicit_instantiation fields.
17434 (maybe_push_to_top_level): Save them.
17435 (pop_from_top_level): Restore them.
17436 (grokfndecl): Use new return value from
17437 check_explicit_specialization.
17438 (start_decl): Don't check flag_guiding_decls before pushing
17439 decls.
17440 (cp_finish_decl): Remove previous (bogus) change.
17441 (grok_declarator): Use decl_function_context rather than
17442 is_local_class.
17443 * decl2.c (finish_file): Pass extra argument to get_bindings.
17444 (build_expr_from_tree): Let build_x_component_ref check
17445 validity of arguments rather than doing it here.
17446 * lex.c (cons_up_default_function): Remove code fooling with
17447 processing_specialization, processing_explicit_instantiation
17448 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17449 * method.c (build_overload_identifier): Mangle local classes in
17450 template functions correctly.
17451 * parse.y (finish_member_template_decl): Move to pt.c.
17452 * pt.c (finish_member_template_decl): Moved here from parse.y.
17453 (print_candidates): New function.
17454 (determine_specialization): Change interface. Properly look for
17455 most specialized versions of template candidates.
17456 (check_explicit_specialization): Fully process explicit
17457 instantiations.
17458 (push_template_decl): Avoid looking at CLASSTYPE fields in
17459 FUNCTION_DECLS.
17460 (determine_overloaded_function): Remove.
17461 (convert_nontype_argument): Change name from
17462 convert_nontype_parameter. Use determine_overloaded_function
17463 instead of instantiate_type.
17464 (mangle_class_name_for_template): Handle type contexts as well as
17465 function contexts.
17466 (classtype_mangled_name): Likewise.
17467 (lookup_template_class): Likewise.
17468 (tsubst): Likewise.
17469 (more_specialized): Take explict template arguments as a
17470 parameter.
17471 (most_specialized): Likewise.
17472 (get_bindings): Likewise. Check that return types match before
17473 proclaiming a function a match.
17474 (do_decl_instantiation): Remove code searching for function to
17475 instantiate; that is now done in check_explicit_specialization.
17476 (add_maybe_template): Pass extra argument to get_bindings.
17477 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17478 implementation.
17479 * typeck.c (build_component_ref): Check for invalid arguments.
17480
17481 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
17482
17483 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17484 return_target and call_target are equivalent.
17485
17486 * pt.c (type_unification_real): Just accept function parms that
17487 don't use any template parms.
17488
17489 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
17490
17491 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17492 unset DECL_NOT_REALLY_EXTERN.
17493
17494 * parse.y (typename_sub*): Fix std::.
17495
17496 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17497
17498 * error.c (dump_decl): Fix type default template args.
17499 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17500
17501 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
17502
17503 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17504 (file_name_nondirectory): Use.
17505
17506 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17507
17508 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17509 that are not really present. Substitute default arguments in
17510 template template arguments. Correctly convert TEMPLATE_DECL to
17511 TEMPLATE_TEMPLATE_PARM.
17512 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17513 are no longer treated specially here.
17514 * parse.y (template_template_parm): Fix copy error.
17515 * decl.c (grokdeclarator): Warn about missing `typename' for nested
17516 type created from template template parameters.
17517 * parse.y (bad_parm): Likewise
17518
17519 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17520 (push_nested_class): Likewise.
17521 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17522 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17523 (copy_template_template_parm): Declare.
17524 * decl.c (arg_looking_for_template): New variable.
17525 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17526 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17527 node if arg_looking_for_template is nonzero.
17528 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17529 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17530 (grokdeclarator): Handle TEMPLATE_DECL.
17531 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17532 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17533 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17534 (dump_decl): Handle unnamed template type parameters.
17535 Handle template template parameters.
17536 (dump_function_name): Handle template template parameters.
17537 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17538 Handle TEMPLATE_TEMPLATE_PARM.
17539 * method.c (build_template_template_parm_names): New function.
17540 (build_template_parm_names): Handle TEMPLATE_DECL.
17541 (build_overload_nested_name, build_overload_name):
17542 Handle TEMPLATE_TEMPLATE_PARM.
17543 * parse.y (maybe_identifier): New nonterminal.
17544 (template_type_parm): Use it.
17545 (template_template_parm, template_arg1): New nonterminal.
17546 (template_parm): Add template_template_parm rules.
17547 (template_arg): Set processing_template_arg.
17548 (template_arg1): Rules moved from template_arg.
17549 (primary, nonnested_type): Set arg_looking_for_template if we are
17550 processing template arguments.
17551 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17552 (process_template_parm): Handle template template parameters.
17553 (coerce_template_parms, comp_template_args): Likewise.
17554 (mangle_class_name_for_template, lookup_template_class): Likewise.
17555 (uses_template_parms): Handle TEMPLATE_DECL and
17556 TEMPLATE_TEMPLATE_PARM.
17557 (current_template_args): Handle TEMPLATE_DECL.
17558 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17559 * search.c (dfs_walk, dfs_record_inheritance):
17560 Handle TEMPLATE_TEMPLATE_PARM.
17561 * tree.c (copy_template_template_parm): New function.
17562 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17563 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17564
17565 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
17566
17567 * decl.c (start_decl): Don't allow duplicate definitions of static
17568 data members.
17569
17570 * call.c (build_user_type_conversion_1): Handle user-defined
17571 template conversion operators correctly.
17572
17573 * decl2.c (build_expr_from_tree): Issue an error message if the
17574 object in a COMPONENT_REF is a TEMPLATE_DECL.
17575
17576 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
17577
17578 * class.c (is_local_class): New function.
17579 * cp-tree.h (is_local_class): Declare it.
17580 (last_tree): Likewise.
17581 (begin_tree): Likewise.
17582 (end_tree): Likewise.
17583 (lookup_template_class): Change prototype.
17584 * decl.c (cp_finish_decl): Check for NULL where necessary.
17585 Consider FUNCTION_DECLS to declare objects with top-level binding,
17586 when calling make_decl_rtl.
17587 (grokdeclarator): Give members of local classes internal linkage.
17588 (start_function): Remove declaration of last_tree.
17589 (finish_function): Set flag_keep_inline_functions around call to
17590 rest_of_compilation if we are processing a member function in a
17591 local class.
17592 (start_method): Call push_template_decl for member functions of
17593 local classes in template functions.
17594 * decl2.c (import_export_decl): Don't give external linkage to
17595 instantiations of templates with internal linkage.
17596 * parse.y (last_tree): Remove declaration.
17597 (template_type): Pass extra parameter to lookup_template_class.
17598 (self_template_type): Likewise.
17599 (structsp): Move call to reset_specialization into left_curly.
17600 (left_curly): Call reset_specialization, and begin_tree.
17601 * pt.c (saved_trees): New variable.
17602 (mangle_class_name_for_template): Change prototype. Use
17603 additional function context to name local classes in templates
17604 correctly.
17605 (classtype_mangled_name): Pass the context.
17606 (push_template_decl): Handle local classes and templates, and
17607 member functions for such classes.
17608 (convert_nontype_parameter): Fix handling of pointer-to-member
17609 constants.
17610 (lookup_template_class): Handle local classes in templates.
17611 (tsubst): Likewise. Don't assume that template instantiations
17612 have external linkage; pay attention to the template declaration.
17613 (mark_decl_instantiated): Likewise.
17614 (begin_tree): New function.
17615 (end_tree): Likewise.
17616
17617 * decl.c (xref_basetypes): Don't call complete_type for basetypes
17618 that involve template parameters; that can lead to infinite
17619 recursion unnecessarily.
17620
17621 * pt.c (register_specialization): Do not register specializations
17622 that aren't ready to be registered yet.
17623 (check_explicit_specialization): Handle explicit specialization of
17624 constructors and destructors.
17625 (build_template_decl): New function.
17626 (push_template_delc): Handle out-of-class specializations of
17627 member templates.
17628
17629 * pt.c (check_explicit_specialization): Set up the template
17630 information before registering the specialization.
17631 (coerce_template_parms): Fix thinko.
17632 (tsubst): Handle specializations of member templates correctly.
17633
17634 * class.c (finish_struct_methods): Remove calls to
17635 check_explicit_specialization from here.
17636 (finish_struct): And insert them here.
17637 * cp-tree.h (perform_qualification_conversions): New function.
17638 (perform_array_to_pointer_conversion): Likewise.
17639 (begin_explicit_instantiation): Likewise.
17640 (end_explicit_instantiation): Likewise.
17641 (determine_specialization): Renamed from
17642 determine_explicit_specialization.
17643 (comp_template_parms): New function.
17644 (processing_explicit_instantiation): New variable.
17645 * cvt.c (perform_qualification_conversions): New function.
17646 (perform_array_to_pointer_conversion): Likewise.
17647 * decl.c (duplicate_decls): Don't consider template functions
17648 alike unless they have the same parameters. Refine handling of
17649 instantiation/specialization mismatches.
17650 (start_decl): Don't call pushdecl for template specializations,
17651 since they don't affect overloading.
17652 (start_function): Likewise.
17653 (grokfndecl): Call check_explicit_specialization a little later.
17654 Don't call duplicate_decls for memberm template specializations.
17655 (grokdeclarator): Don't update template_count for classes that are
17656 themselves specializations. Remove use of `2' as parameter to
17657 grokfndecl since that value isn't used.
17658 * lex.c (cons_up_default_function): Save and restore
17659 processing_explicit_instantiation around calls to grokfield.
17660 * parse.y (finish_member_template_decl): New function.
17661 (component_decl_1): Use it.
17662 (fn.def2): Likewise.
17663 (template_arg_list_opt): New nonterminal.
17664 (template_type): Use it.
17665 (self_template_type): Likewise.
17666 (template_id): Likewise.
17667 (object_template_id): Likewise.
17668 (notype_template_declarator): Likwise.
17669 (begin_explicit_instantiation): Likewise.
17670 (end_explicit_instantiation): Likewise.
17671 (explicit_instantiation): Use them.
17672 * pt.c (coerce_template_parms): Add parameters.
17673 (processing_explicit_instantiation): New variable.
17674 (convert_nontype_parameter): New function.
17675 (determine_overloaded_function): Likewise.
17676 (begin_explicit_instantiation): Likewise.
17677 (end_explicit_instantiation): Likewise.
17678 (retrieve_specialization): Likewise.
17679 (register_specialization): Likewise.
17680 (processing_explicit_specialization): Removed.
17681 (determine_specialization): Handle specializations of member
17682 functions of template class instantiations.
17683 (check_explicit_specialization): Refine to conform to standard.
17684 (comp_template_parms): New function.
17685 (coerce_template_parms): Call convert_nontype_parameter.
17686 (tsubst): Refine handling of member templates. Use
17687 register_specialization.
17688 (instantiate_template): Use retrieve_specialization.
17689 (do_decl_instantiation): Likewise.
17690 (instantiate_decl): Likewise.
17691 (type_unification): Improve handling of explict template
17692 arguments.
17693 * tree.c (mapcar): Return error_mark_node, rather than aborting,
17694 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17695 * typeck.c (build_unary_op): Call determine_specialization, rather
17696 than determine_explicit_specialization.
17697
17698 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
17699
17700 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17701
17702 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17703
17704 * error.c (dump_decl): For enum tags, output the tag, not its value.
17705
17706 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
17707
17708 * decl.c (init_decl_processing): Only call init_rtti_processing
17709 FLAG_RTTI is set.
17710
17711 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
17712
17713 * init.c (build_new_1): Split out from build_new.
17714 (build_new): Just return a NEW_EXPR.
17715 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17716
17717 * decl2.c (get_temp_regvar): Tweak.
17718
17719 * cp-tree.h (TREE_CALLS_NEW): Comment out.
17720 * class.c (resolves_to_fixed_type_p): Remove use.
17721 * method.c (build_opfncall): Likewise.
17722 * call.c (build_new_op): Likewise.
17723
17724 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
17725
17726 * exception.cc (__eh_alloc, __eh_free): New fns.
17727 (__cp_push_exception, __cp_pop_exception): Use them.
17728 (__uncatch_exception): Call terminate here if no exception.
17729 * except.c (build_terminate_handler): New fn.
17730 (expand_start_catch_block): Use it.
17731 (expand_exception_blocks): Likewise.
17732 (alloc_eh_object): New fn.
17733 (expand_throw): Use it. Protect exception init with terminate.
17734 * typeck.c (build_modify_expr): Remove code that ignores trivial
17735 methods.
17736
17737 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17738
17739 * call.c (add_builtin_candidate): Add default case in enumeration
17740 switch.
17741 (build_new_op): Likewise.
17742 (convert_like): Likewise.
17743 * cvt.c (build_expr_type_conversion): Likewise.
17744 * tree.c (real_lvalue_p): Likewise.
17745 (lvalue_p): Likewise.
17746 (cp_tree_equal): Likewise.
17747 * typeck.c (comptypes): Likewise.
17748 (build_component_ref): Likewise.
17749 (build_function_call_real): Likewise.
17750 (build_binary_op_nodefault): Likewise.
17751 (build_unary_op): Likewise.
17752 (build_modify_expr): Likewise.
17753 * typeck2.c (initializer_constant_valid_p): Likewise.
17754
17755 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
17756
17757 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17758
17759 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
17760
17761 * pt.c (coerce_template_parms): Make sure to digest_init if
17762 possible.
17763
17764 * decl.c (duplicate_decls): Make the newdecl virtual if the
17765 olddecl was, just as is done with other attributes of olddecl.
17766
17767 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17768
17769 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17770 address of an OFFSET_REF.
17771
17772 * cp-tree.def: Add AGGR_INIT_EXPR.
17773 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17774 AGGR_INIT_EXPR where appropriate.
17775 * expr.c (cplus_expand_expr): Likewise. Simplify.
17776
17777 * decl2.c (finish_file): Remove call to register_exception_table.
17778
17779 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17780
17781 * pt.c (instantiate_class_template): Don't do injection when
17782 processing_template_decl is true, as pollutes current_binding_level
17783 for base classes.
17784
17785 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
17786
17787 * pt.c (maybe_fold_nontype_arg): Add prototype.
17788
17789 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17790
17791 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17792 * error.c (dump_expr): Likewise.
17793
17794 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17795
17796 * typeck.c (build_function_call_real): Remove "inline called before
17797 definition" pedwarn.
17798
17799 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17800
17801 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17802
17803 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17804
17805 * pt.c (type_unification_real): Change __null to type void* with
17806 a warning.
17807
17808 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
17809
17810 * call.c (implicit_conversion): Don't call
17811 build_user_type_conversion_1 with a NULL expr, since it will
17812 crash.
17813
17814 * pt.c (unify): Don't try to unify array bounds if either array is
17815 unbounded.
17816
17817 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17818
17819 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17820 Replace extern decls with casts.
17821
17822 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17823 Update last_parm_cleanup_insn.
17824 (store_after_parms): Remove.
17825 * cp-tree.h: Adjust.
17826
17827 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17828
17829 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17830 (finish_file): Check DECL_COMDAT instead of weak|one_only.
17831 (import_export_vtable): Use make_decl_one_only instead of
17832 comdat_linkage for win32 tweak.
17833 (import_export_decl): Likewise.
17834 * pt.c (mark_decl_instantiated): Likewise.
17835
17836 * decl2.c (finish_file): Lose handling of templates in pending_statics.
17837
17838 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17839
17840 * decl2.c (finish_file): Lose call to expand_builtin_throw.
17841 * except.c (expand_builtin_throw): Remove.
17842 * cp-tree.h: Remove ptr_ptr_type_node.
17843 * decl.c: Likewise.
17844
17845 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
17846
17847 * decl.c (ptr_ptr_type_node): Define.
17848 (init_decl_processing): Initialize it.
17849 * cp-tree.h: Declare it.
17850 * exception.cc (__cp_exception_info): Use __get_eh_info.
17851 (__cp_push_exception): Likewise.
17852 (__cp_pop_exception): Likewise.
17853
17854 From Scott Snyder <snyder@d0sgif.fnal.gov>:
17855 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17856 saved_pc.
17857 (init_exception_processing): Removed saved_pc initialization.
17858
17859 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
17860
17861 * pt.c (instantiate_decl): Defer all templates but inline functions.
17862
17863 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
17864
17865 * init.c (expand_vec_init): Don't fold a list of parameters.
17866
17867 * decl.c (copy_args_p): Handle copy elision for types with virtual
17868 bases.
17869 * call.c (build_over_call): Likewise.
17870
17871 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
17872
17873 * pt.c (lookup_template_function): Copy the template arguments,
17874 not just the list containing them, to the permanent obstack.
17875
17876 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17877
17878 * except.c (expand_start_catch_block): suspend_momentary for the
17879 terminate handler.
17880
17881 * error.c (dump_decl): Handle LOOKUP_EXPR.
17882
17883 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
17884
17885 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17886 permanent obstack if we are processing a template decl.
17887 * typeck.c (build_static_cast): Likewise.
17888 (build_const_cast): Likewise.
17889 (build_reinterpret_cast): Likewise.
17890
17891 * pt.c (coerce_template_parms): Coerce some expressions, even
17892 when processing_template_decl.
17893
17894 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17895
17896 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17897 handling of pointer difference expressions.
17898
17899 * typeck.c (comp_target_types): Comparison of function/method types
17900 is independent of nptrs.
17901
17902 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
17903
17904 * pt.c (tsubst): Avoid creating pointer to reference and
17905 reference to reference types.
17906
17907 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17908
17909 * parse.y (do_id): New nonterminal.
17910 (template_id): Use it.
17911
17912 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17913
17914 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17915 * spew.c (yylex): Don't do_identifier here.
17916 * decl2.c (build_expr_from_tree): Revert last change.
17917
17918 * decl2.c (build_expr_from_tree): Expand the name for a method call.
17919 * parse.y (object_template_id): Don't try to take the DECL_NAME.
17920
17921 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17922
17923 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17924 alloc_expr.
17925 * call.c (build_op_delete_call): Adjust.
17926
17927 * except.c (expand_end_catch_block): Lose rethrow region.
17928 (expand_start_catch_block): Likewise.
17929 (expand_end_catch_block): Don't expand_leftover_cleanups.
17930
17931 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17932
17933 * pt.c (tsubst): Remove tree_cons call (places redundant info into
17934 DECL_TEMPLATE_INSTANTIATION).
17935
17936 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17937
17938 * tree.c (is_overloaded_fn): Handle getting a fn template.
17939 (really_overloaded_fn): Likewise.
17940 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17941 * pt.c (check_explicit_specialization): Tweak.
17942 (determine_explicit_specialization): Tweak.
17943
17944 * tree.c, cp-tree.h (get_target_expr): New fn.
17945
17946 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
17947
17948 * pt.c (check_explicit_specialization): Fix misspelling in
17949 diagnostic: `preceeded'.
17950 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17951 `conversiona'.
17952
17953 1997-12-02 Mark Mitchell <mmitchell@usa.net>
17954
17955 * pt.c (determine_explicit_specialization): Avoid an internal
17956 error for bad specializations.
17957
17958 * method.c (build_overload_value): Handle SCOPE_REF.
17959
17960 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
17961
17962 * class.c (prepare_fresh_vtable): Enable even more complex MI
17963 vtable names.
17964
17965 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17966
17967 * exception.cc (__check_eh_spec): Optimize a bit.
17968
17969 * exception.cc (__cp_pop_exception): Lose handler arg.
17970 * except.c (do_pop_exception): Likewise.
17971 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17972 (expand_end_catch_block): Likewise.
17973
17974 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17975
17976 * pt.c (check_explicit_specialization): Complain about using a
17977 template-id for a non-specialization.
17978
17979 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
17980
17981 * repo.c: Prototype rindex only if needed.
17982 * xref.c: Likewise.
17983
17984 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17985
17986 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17987
17988 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17989
17990 * typeck.c (build_const_cast): Handle references here instead of
17991 handing off to convert_to_reference.
17992
17993 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17994 TerminateFunctionCall.
17995 (init_exception_processing): Likewise. Terminate et al are now
17996 the fns, not ADDR_EXPRs.
17997 (various): Lose redundant assemble_external calls.
17998 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17999
18000 * cp-tree.h (struct lang_decl_flags): Add comdat.
18001 (DECL_COMDAT): New macro.
18002 * decl.c (duplicate_decls): Propagate it.
18003 (cp_finish_decl): Handle it.
18004 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18005
18006 * class.c: Remove static pending_hard_virtuals.
18007 (add_virtual_function): Take pointers to pending_virtuals
18008 and pending_hard_virtuals.
18009 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
18010
18011 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18012
18013 * decl2.c (import_export_vtable): If we support one_only but not
18014 weak symbols, mark instantiated template vtables one_only.
18015 (import_export_decl): Likewise for tinfo functions.
18016 (finish_vtable_vardecl): Also write out vtables from explicitly
18017 instantiated template classes.
18018 * pt.c (mark_class_instantiated): Revert last change.
18019
18020 * except.c (expand_throw): Call mark_used on the destructor.
18021
18022 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
18023
18024 * lex.c (lang_init): Enable flag_exceptions by default if no
18025 command line switch was specified.
18026
18027 1997-11-26 Mark Mitchell <mmitchell@usa.net>
18028
18029 * pt.c (unify): Handle `void' template parameters in
18030 specializations.
18031
18032 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
18033
18034 * rtti.c (build_dynamic_cast): Handle template case here.
18035 (build_dynamic_cast_1): Not here.
18036
18037 * typeck2.c (digest_init): Make copies where appropriate.
18038
18039 * decl2.c (delete_sanity): resolve_offset_ref.
18040
18041 * except.c: Call terminate without caching so many bits.
18042
18043 * except.c (expand_start_catch_block): Fix catching a reference
18044 to pointer.
18045
18046 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18047
18048 * init.c (build_new): Copy size to the saveable obstack.
18049
18050 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18051 TRY_CATCH_EXPR for now.
18052
18053 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18054
18055 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18056 has DECL_LANG_SPECIFIC.
18057
18058 * exception.cc (struct cp_eh_info): Add handlers field.
18059 (__cp_push_exception): Initialize it.
18060 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
18061 (__throw_bad_exception): Remove.
18062 * except.c (call_eh_info): Add handlers field.
18063 (get_eh_handlers): New fn.
18064 (push_eh_cleanup): Increment handlers.
18065
18066 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18067
18068 * except.c (expand_start_eh_spec): Use the try/catch code.
18069 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
18070 doing everything inline.
18071 (init_exception_processing): throw_type_match now takes
18072 const void pointers.
18073 * exception.cc (__check_eh_spec): New fn.
18074 * inc/exception: Neither terminate nor unexpected return.
18075 * decl.c: Make const_ptr_type_node public.
18076 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18077
18078 * except.c (expand_start_catch_block): We only need the rethrow
18079 region for non-sjlj exceptions.
18080 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
18081
18082 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
18083
18084 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18085 (various.o): Likewise.
18086 * inc/new: Add placement deletes. Add throw specs for default new.
18087 * new.cc (set_new_handler): Move here from libgcc2.
18088 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18089 (new): Move from libgcc2. Throw bad_alloc.
18090 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18091 * decl.c (init_decl_processing): Update exception specs on new and
18092 delete.
18093
18094 * method.c (build_decl_overload_real): Don't mess with global
18095 placement delete.
18096
18097 * init.c (build_new): Check for null throw spec, not nothrow_t.
18098
18099 * decl.c (duplicate_decls): Don't complain about different exceptions
18100 from an internal declaration.
18101
18102 * call.c (build_op_delete_call): Fix check for member fns again.
18103
18104 * decl2.c (import_export_decl): Interface hackery affects
18105 virtual synthesized methods.
18106
18107 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18108
18109 * decl.c (start_decl): Don't just complain about a mismatched
18110 scope, fix it.
18111
18112 * decl.c (make_implicit_typename): Handle case where t is not
18113 actually from context.
18114 * tree.c (get_type_decl): Lose identifier case.
18115 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18116 * parse.y (nonnested_type): Just use lookup_name.
18117 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18118
18119 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
18120
18121 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18122 T was built in C language context (for example, by
18123 output_func_start_profiler).
18124
18125 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
18126
18127 * decl.c (make_implicit_typename): New fn.
18128 (lookup_name_real): Use it. Use current_class_type as the context.
18129
18130 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
18131
18132 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18133
18134 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18135
18136 * friend.c (do_friend): Warn about non-template friends in templates.
18137
18138 * call.c (build_op_delete_call): Fix handling of inherited delete.
18139
18140 * search.c (dfs_record_inheritance): Ignore template type parms.
18141
18142 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18143
18144 * call.c (build_new_op): Fix copy error.
18145 (build_op_new_call): New fn.
18146 (build_op_delete_call): New fn.
18147 * cp-tree.h: Declare them.
18148 * init.c (build_new): Use them. Support placement delete.
18149 (build_x_delete): Use build_op_delete_call.
18150 (build_delete): Likewise.
18151 * decl2.c (delete_sanity): Likewise.
18152 (coerce_delete_type): Don't complain about placement delete.
18153
18154 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18155
18156 * call.c (build_new_function_call): Remove unused 'obj' parm.
18157 * cp-tree.h, typeck.c: Adjust.
18158
18159 * init.c (build_new): Make the cleanup last longer.
18160 (expand_vec_init): Call do_pending_stack_adjust.
18161
18162 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
18163
18164 * pt.c (do_type_instantiation): Fix typo.
18165 (mark_class_instantiated): If we support one_only but not weak
18166 symbols, don't mark this as known.
18167
18168 * init.c (build_new): Handle vec delete in EH cleanup.
18169
18170 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18171
18172 * call.c (build_method_call): Call complete_type before checking
18173 for destructor.
18174
18175 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
18176
18177 * decl.c (add_block_current_level): Delete.
18178 * init.c (build_vec_delete_1): Delete build_block and
18179 add_block_current_level calls.
18180
18181 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
18182
18183 * init.c (build_new): Handle freeing allocated memory when the
18184 constructor throws.
18185
18186 * call.c (build_new_method_call): Fix flags arg.
18187
18188 * pt.c (do_type_instantiation): Don't try to instantiate
18189 member templates.
18190 (mark_decl_instantiated): If we support one_only but not
18191 weak symbols, mark this one_only.
18192 * decl2.c (import_export_vtable): Don't defer handling of vtables
18193 if MULTIPLE_SYMBOL_SPACES.
18194
18195 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18196
18197 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18198
18199 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
18200
18201 * except.c (do_pop_exception): Return a value.
18202
18203 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18204
18205 * call.c (build_new_method_call): Handle getting a
18206 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
18207 if we got template parms.
18208 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18209 not just the args.
18210 * decl2.c (build_expr_from_tree): Tweak last change.
18211 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18212 (maybe_fold_nontype_arg): Split out from tsubst_copy.
18213 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18214
18215 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
18216
18217 * pt.c (tsubst_copy): Handle explicit template arguments in
18218 function calls.
18219 * typeck.c (build_x_function_call): Likewise.
18220 * decl2.c (build_expr_from_tree): Lookup function name if it
18221 hasn't been done.
18222
18223 * pt.c (tsubst): Instantiate template functions properly when
18224 template parameter does not appear in function arguments and return
18225 type.
18226 (comp_template_args): Handle member templates required by tsubst.
18227
18228 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18229
18230 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18231 previous change.
18232
18233 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18234
18235 * pt.c (coerce_template_parms): Tweak error message.
18236
18237 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18238 return type defaults to `int', even if there are storage-class
18239 specifiers.
18240
18241 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18242
18243 Complete nested exception support.
18244 * except.c (do_pop_exception): Split out...
18245 (push_eh_cleanup): From here. Handle the EH region by hand.
18246 (expand_start_catch_block): Add a new level for the catch parm.
18247 Move the rethrow region outside the two cleanup regions.
18248 Protect the initializer for the catch parm with terminate.
18249 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
18250 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
18251 popping off the middle of the stack.
18252 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18253 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18254 (build_cplus_new): Only wrap CALL_EXPRs.
18255 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18256 the constructor call.
18257
18258 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18259
18260 * Make-lang.in (c++.distdir): Make inc subdirectory.
18261
18262 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18263
18264 * decl2.c (finish_file): Put back some code.
18265
18266 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18267
18268 * decl2.c (finish_file): Remove redundant code.
18269 * method.c (emit_thunk): Don't let the backend defer generic thunks.
18270
18271 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18272
18273 * except.c (call_eh_info): Split out...
18274 (push_eh_info): From here.
18275 (expand_builtin_throw): Use it.
18276 (expand_start_catch_block): Move region start back.
18277
18278 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
18279
18280 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18281 (real_yylex): Record wide strings using target endianness, not host.
18282
18283 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
18284
18285 * repo.c (rindex): Add decl unconditionally.
18286 (get_base_filename, open_repo_file): Don't cast rindex.
18287 * xref.c (rindex): Add decl unconditionally.
18288 (index): Remove unused decl.
18289 (open_xref_file): Don't cast rindex.
18290
18291 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18292
18293 * class.c (build_vbase_path): Propagate the result type properly.
18294
18295 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
18296
18297 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18298 remaining use of saved_throw_type with a call to get_eh_type.
18299
18300 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
18301
18302 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18303 (file_name_nondirectory): New function, doing the same as the macro.
18304 (set_typedecl_interface_info): Use it instead of the macro.
18305 (check_newline): Likewise.
18306 (handle_cp_pragma): Likewise.
18307
18308 * repo.c (get_base_filename): Cast result of rindex to char*.
18309 (open_repo_file): Likewise.
18310 * xref.c (open_xref_file): Likewise.
18311 * error.c (dump_char): Make its arg int, not char.
18312
18313 * except.c (push_eh_info): Pass the number of fields - 1 down, not
18314 the exact number of fields.
18315
18316 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18317
18318 Support for nested exceptions.
18319 * tinfo2.cc (__is_pointer): New fn.
18320 * exception.cc (struct cp_eh_info): Define.
18321 (__cp_exception_info, __uncatch_exception): New fns.
18322 (__cp_push_exception, __cp_pop_exception): New fns.
18323 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18324 Lose empty_fndecl.
18325 (init_exception_processing): Likewise. __eh_pc is now external.
18326 (push_eh_info): New fn.
18327 (get_eh_{info,value,type,caught}): New fns.
18328 (push_eh_cleanup): Just call __cp_pop_exception.
18329 (expand_start_catch_block): Use push_eh_info. Start the eh region
18330 sooner.
18331 (expand_end_eh_spec): Use push_eh_info.
18332 (expand_throw): Call __cp_push_exception to set up the exception info.
18333 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
18334 when we rethrow.
18335 (expand_builtin_throw): Don't refer to empty_fndecl.
18336
18337 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18338
18339 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18340
18341 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
18342
18343 * method.c (build_template_parm_names, build_decl_overload_real):
18344 Add static to definitions.
18345 * pt.c (add_to_template_args, note_template_header,
18346 processing_explicit_specialization, type_unification_real): Likewise.
18347 ({determine,check}_explicit_specialization): Use a single string for
18348 error messages.
18349
18350 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18351
18352 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18353 (expand_end_catch_block): Likewise.
18354 (expand_end_eh_spec): Likewise.
18355
18356 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
18357
18358 * decl.c (duplicate_decls): Handle template specializations
18359 correctly.
18360 * error.c (dump_function_name): Fix printing of specializations of
18361 member functions that are not member templates.
18362 * cp-tree.h (processing_specialization): Make global.
18363 * pt.c (processing_specialization): Likewise.
18364 * lex.c (cons_up_default_function): Save and restore
18365 processing_specialization to avoid confusion.
18366
18367 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18368
18369 * decl.c (init_decl_processing): Give null_node unknown* type.
18370 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18371 (common_type): Likewise.
18372 * error.c (args_as_string): Recognize null_node.
18373
18374 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18375
18376 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18377 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18378
18379 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18380
18381 * Make-lang.in (g++): Include prefix.o.
18382
18383 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
18384
18385 * pt.c (determine_explicit_specialization): Initialize "dummy"
18386 to keep Purify quiet.
18387
18388 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18389
18390 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18391 (build_overload_int): Not here.
18392
18393 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
18394
18395 * class.c (build_type_pathname): Remove.
18396 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18397
18398 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
18399
18400 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18401 &&label GNU extension.
18402
18403 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
18404
18405 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18406 so as to avoid incorrect manglings.
18407 * method.c (build_decl_overload_real): Don't mangle return types
18408 for constructors.
18409
18410 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18411
18412 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18413 scratch_tree_cons): Define as macros for now.
18414 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18415 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18416 typeck2.c: Use them and the expression_obstack variants.
18417
18418 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18419
18420 * decl.c (store_return_init): Allow classes with explicit ctors to
18421 be used with the named return values extension.
18422
18423 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
18424
18425 * pt.c (instantiate_decl): Fix previous change.
18426
18427 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18428
18429 * pt.c (tsubst): Fix thinko.
18430 (instantiate_decl): Really use the original template.
18431
18432 * call.c (build_new_method_call): Use simple constructor_name for
18433 error messages.
18434
18435 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
18436
18437 * method.c (build_underscore_int): Don't use ANSI specific
18438 features.
18439
18440 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18441
18442 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18443 for our key method; it might have been inlined by -O3.
18444
18445 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
18446
18447 * decl.c (make_typename_type): Do not try to call lookup_field for
18448 non-aggregate types.
18449
18450 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
18451
18452 * typeck.c (build_reinterpret_cast): Tweak.
18453
18454 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18455
18456 * typeck.c (build_reinterpret_cast): Converting a void pointer
18457 to function pointer with a reinterpret_cast produces a warning
18458 if -pedantic is issued.
18459
18460 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18461
18462 * typeck.c (c_expand_return): Don't warn about returning a
18463 reference-type variable as a reference.
18464
18465 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18466
18467 * method.c (build_static_name): Fix typo.
18468
18469 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
18470
18471 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18472 OLDDECL before we try to do DECL_USE_TEMPLATE.
18473
18474 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18475
18476 * decl.c (duplicate_decls): Don't warn about template instances.
18477
18478 * typeck.c (mark_addressable): Lose ancient code that unsets
18479 DECL_EXTERNAL.
18480
18481 * pt.c (do_decl_instantiation): Lose support for instantiating
18482 non-templates.
18483
18484 * call.c (build_new_function_call): Fix handling of null explicit
18485 template args.
18486 (build_new_method_call): Likewise.
18487
18488 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
18489
18490 * method.c (build_underscore_int): Fix typo.
18491
18492 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
18493
18494 * tree.c (print_lang_statistics): #if 0 call to
18495 print_inline_obstack_statistics until its definition is checked in.
18496
18497 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18498
18499 * decl2.c (finish_file): Move dump_tree_statistics to end.
18500
18501 * pt.c (instantiate_decl): Look for the original template.
18502 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18503 of member templates.
18504
18505 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18506
18507 * Makefile.in (g++FAQ.*): New rules.
18508 (CONFLICTS): Update.
18509 * g++FAQ.texi: Moved from libg++.
18510
18511 * parse.y (PFUNCNAME): Only specify the type once.
18512
18513 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
18514
18515 * lex.c (real_yylex): Clean up the code to fully behave the way
18516 the c-lex.c parser does for complex and real numbers.
18517
18518 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18519
18520 * method.c (build_decl_overload_real): Reformat.
18521
18522 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
18523
18524 * method.c (synthesize_method): If at_eof, determine our linkage.
18525
18526 1997-09-29 Paul Eggert <eggert@twinsun.com>
18527
18528 * lex.c (real_yylex): Treat `$' just like `_', except issue a
18529 diagnostic if !dollars_in_ident or if pedantic.
18530
18531 * lang-specs.h (@c++): -ansi no longer implies -$.
18532
18533 * decl2.c (lang_decode_option):
18534 -traditional and -ansi now do not mess with
18535 dollars_in_ident.
18536
18537 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
18538
18539 * Makefile.in (parse.o, decl.o): Also depend on
18540 $(srcdir)/../except.h $(srcdir)/../output.h.
18541 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18542 $(srcdir)/../except.h $(srcdir)/../output.h.
18543 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18544 ../insn-codes.h.
18545
18546 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18547
18548 * expr.c (cplus_expand_expr): Make it static.
18549
18550 * decl2.c, init.c, typeck.c: Include "expr.h".
18551 (expand_expr): Use proper values when calling the function.
18552
18553 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18554
18555 * lang-options.h: New -Wold-style-cast flag.
18556 * cp-tree.h (warn_old_style_cast): New variable.
18557 * decl2.c (warn_old_style_cast): Likewise.
18558 (lang_decode_option): Support -Wold-style-cast.
18559 (reparse_absdcl_as_casts): Produce old-style-cast warning.
18560
18561 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18562
18563 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18564 TREE_USED, reset value based on already_used.
18565
18566 * init.c (expand_member_init): Revert change.
18567
18568 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18569
18570 * cp-tree.h, decl.c, decl2.c, pt.c:
18571 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
18572
18573 * decl2.c (lang_decode_option): Add missing ;.
18574
18575 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18576
18577 * friend.c (do_friend): Disable injection for all template-derived
18578 decls.
18579 * decl2.c (lang_decode_option): Handle -fguiding-decls.
18580 * parse.y (notype_template_declarator): New nonterminal.
18581 (direct_notype_declarator): Use it.
18582 (complex_direct_notype_declarator): Likewise.
18583 (object_template_id): Accept any kind of identifier after TEMPLATE.
18584 (notype_qualified_id): Don't add template declarators here.
18585
18586 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
18587
18588 * call.c (add_template_candidate): Add explicit_targs parameter.
18589 (build_scoped_method_call): Use it.
18590 (build_overload_call_real): Likewise.
18591 (build_user_type_conversion_1): Likewise.
18592 (build_new_function_call): Likewise.
18593 (build_object_call): Likewise.
18594 (build_new_op): Likewise.
18595 (build_new_method_call): Likewise.
18596 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
18597 (build_new_method_call): Likewise.
18598
18599 * class.c (finish_struct_methods): Add specialization pass to
18600 determine which methods were specializing which other methods.
18601 (instantiate_type): Handle TEMPLATE_ID_EXPR.
18602
18603 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
18604
18605 * cp-tree.h (name_mangling_version): New variable.
18606 (flag_guiding_decls): Likewise.
18607 (build_template_decl_overload): New function.
18608 (begin_specialization): Likewise.
18609 (reset_specialization): Likewise.
18610 (end_specialization): Likewise.
18611 (determine_explicit_specialization): Likewise.
18612 (check_explicit_specialization): Likewise.
18613 (lookup_template_function): Likewise.
18614 (fn_type_unification): Add explicit_targs parameter.
18615 (type_unification): Likewise.
18616
18617 * decl.c (duplicate_decls): Add smarts for explicit
18618 specializations.
18619 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
18620 specializations.
18621 (grokfndecl): Call check_explicit_specialization.
18622
18623 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
18624 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
18625 (check_classfn): Handle specializations.
18626
18627 * error.c (dump_function_name): Print specialization arguments.
18628
18629 * friend.c (do_friend): Don't call pushdecl for template
18630 instantiations.
18631
18632 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
18633
18634 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
18635 and -fno-guiding-decls.
18636
18637 * lex.c (identifier_type): Return PFUNCNAME for template function
18638 names.
18639
18640 * method.c (build_decl_overload_real): New function.
18641 (build_template_parm_names): New function.
18642 (build_overload_identifier): Use it.
18643 (build_underscore_int): New function.
18644 (build_overload_int): Use it. Add levels for template
18645 parameters.
18646 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
18647 (build_overload_nested_names): Handle template type parameters.
18648 (build_template_decl_overload): New function.
18649
18650 * parse.y (YYSTYPE): New ntype member.
18651 (nested_name_specifier): Use it.
18652 (nested_name_specifier_1): Likewise.
18653 (PFUNCNAME): New token.
18654 (template_id, object_template_id): New non-terminals.
18655 (template_parm_list): Note specializations.
18656 (template_def): Likewise.
18657 (structsp): Likewise.
18658 (fn.def2): Handle member template specializations.
18659 (component_decl_1): Likewise.
18660 (direct_notype_declarator): Handle template-ids.
18661 (component_decl_1): Likewise.
18662 (direct_notype_declarator): Handle template-ids.
18663 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18664
18665 * pt.c (processing_specializations): New variable.
18666 (template_header_count): Likewise.
18667 (type_unification_real): New function.
18668 (processing_explicit_specialization): Likewise.
18669 (note_template_header): Likewise.
18670 (is_member_template): Handle specializations.
18671 (end_template_decl): Call reset_specialization.
18672 (push_template_decl): Handle member template specializations.
18673 (tsubst): Likewise.
18674 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18675 (instantiate_template): Handle specializations.
18676 (instantiate_decl): Likewise.
18677 (fn_type_unification): Handle explicit_targs.
18678 (type_unification): Likewise. Allow incomplete unification
18679 without an error message, if allow_incomplete.
18680 (get_bindings): Use new calling sequence for fn_type_unification.
18681
18682 * spew.c (yylex): Handle PFUNCNAME.
18683
18684 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18685 (really_overloaded_fn): Likewise.
18686 (get_first_fn): Handle function templates.
18687
18688 * typeck.c (build_x_function_call): Use really_overloaded_fn.
18689 Handle TEMPLATE_ID_EXPR.
18690 (build_x_unary_op): Likewise.
18691 (build_unary_op): Likewise.
18692 (mark_addressable): Templates whose address is taken are marked
18693 as used.
18694
18695 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18696
18697 * decl.c (init_decl_processing): Declare __builtin_constant_p as
18698 accepting any kind of type, not only int.
18699
18700 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18701
18702 * search.c (get_matching_virtual): Notice virtual bases when sorrying
18703 about covariant returns.
18704
18705 * parse.y (member_init): Also imply typename here. Remove ancient
18706 extension for initializing base members.
18707
18708 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18709
18710 Handle multi-level typenames and implicit typename in base list.
18711 * parse.y (typename_sub{,[0-2]}): New rules.
18712 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18713 (nonnested_type): New rule.
18714 (complete_type_name): Use it.
18715 (base_class.1): Use typename_sub and nonnested_type.
18716 (nested_name_specifier): Don't elide std:: here.
18717 * decl.c (make_typename_type): Handle getting a type for NAME.
18718 (lookup_name_real): Turn std:: into :: here.
18719
18720 Rvalue conversions were removed in London.
18721 * call.c (is_subseq): Don't consider lvalue transformations.
18722 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18723 (joust): Re-enable ?: kludge.
18724
18725 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
18726
18727 * decl.c (start_function): Up warning of no return type to be a
18728 pedwarn.
18729
18730 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18731
18732 * init.c (expand_member_init): Don't set TREE_USED.
18733 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18734 set,don't clear TREE_USED wholesale.
18735
18736 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
18737
18738 * call.c (build_over_call): Do require_complete_type before
18739 build_cplus_new.
18740
18741 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18742
18743 * search.c (lookup_field): Call complete_type in all cases.
18744
18745 * decl.c (finish_function): Just warn about flowing off the end.
18746
18747 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18748
18749 * decl.c (grokparms): Don't bash a permanent list node if we're
18750 in a function.
18751
18752 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
18753
18754 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18755
18756 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18757
18758 * call.c (build_new_op): Give better error for syntactically
18759 correct, but semantically invalid, use of undeclared template.
18760
18761 * call.c (compare_qual): Handle pmfs.
18762
18763 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18764 after the exception spec.
18765
18766 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18767
18768 * call.c (null_ptr_cst_p): Integer type, not integral type.
18769
18770 * call.c (joust): Disable warnings until they can be moved to the
18771 right place.
18772
18773 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
18774
18775 * Makefile.in, config-lang.in: Convert to autoconf.
18776
18777 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18778
18779 * decl.c (lookup_name_real): Add implicit 'typename' to types from
18780 base classes.
18781
18782 * pt.c (most_specialized_class): Fix typo.
18783 (tsubst): Move constant folding to TREE_VEC case.
18784
18785 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
18786
18787 * pt.c (do_poplevel): Don't warn about unused local variables
18788 while processing_template_decl since we don't always know whether
18789 or not they will need constructing/destructing.
18790
18791 * pt.c (uses_template_parms): Check the values of an enumeration
18792 type to make sure they don't depend on template parms.
18793
18794 * decl.c (make_typename_type): Don't lookup the field if the
18795 context uses template parms, even if we're not
18796 processing_template_decl at the moment.
18797
18798 * pt.c (coerce_template_parms): Avoid looking at the
18799 TYPE_LANG_DECL portion of a typename type, since there won't be
18800 one.
18801 (tsubst): Do constant folding as necessary to make sure that
18802 arguments passed to lookup_template_class really are constants.
18803
18804 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18805
18806 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18807 * decl2.c (finish_file): Only register exception tables if we
18808 need to.
18809
18810 * decl.c (init_decl_processing): Add __builtin_[fs]p.
18811
18812 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18813
18814 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18815
18816 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
18817
18818 * error.c (dump_decl): Avoid crashing when presented with a
18819 uninitialized constant, as can occur with a template parameter.
18820 (dump_expr): Make sure that there are enough levels of
18821 current_template_parms before we start diving through them.
18822
18823 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18824
18825 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18826 c-typeck.c.
18827
18828 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18829
18830 * except.c (expand_throw): Call build_delete for all
18831 exception types, not just objects with destructors.
18832
18833 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
18834
18835 * decl.c (current_local_enum): Remove static.
18836 * pt.c (tsubst_enum): Save and restore value of current_local_enum
18837 in case template is expanded in enum decl.
18838 (instantiate_class_template): Use new tsubst_enum signature.
18839 (tsubst_expr): Likewise.
18840
18841 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
18842
18843 * pt.c (begin_member_template_processing): Take a function as
18844 argument, not a set of template arguments. Use the template
18845 parameters, rather than the arguments. Handle non-type parameters
18846 correctly. Push a binding level for the parameters so that multiple
18847 member templates using the same parameter names can be declared.
18848 (end_member_template_processing): Pop the binding level.
18849 (push_template_decl): Mark member templates as static when
18850 appropriate.
18851
18852 * lex.c (do_pending_inlines): Pass the function, not its template
18853 arguments, to begin_member_template_processing.
18854 (process_next_inline): Likewise.
18855 (do_pending_defargs): Likewise.
18856
18857 * error.c (dump_expr): Obtain the correct declaration for a
18858 TEMPLATE_CONST_PARM.
18859
18860 * call.c (add_template_conv_candidate): New function.
18861 (build_object_call): Handle member templates, as done in the other
18862 build_ functions.
18863
18864 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
18865
18866 * decl.c (replace_defag): Undo previous change.
18867 * lex.c (do_pending_defargs): Deal with member templates.
18868
18869 * pt.c (is_member_template): Avoid crashing when passed a
18870 non-function argument.
18871
18872 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18873
18874 * class.c (grow_method): Remove check for redeclaration.
18875
18876 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
18877
18878 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18879 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18880 (PRIMARY_TEMPLATE_P): Use it.
18881 * call.c (build_overload_call_real): Use it.
18882 * class.c (instantiate_type): Likewise.
18883 * decl.c (decls_match): Likewise.
18884 * method.c (build_overload_identifier): Likewise.
18885 * pt.c (push_template_decl): Likewise.
18886 (classtype_mangled_name): Likewise.
18887 (lookup_template_class): Likewise.
18888
18889 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18890 DECL_NTPARMS to conform to usage elsewhere.
18891 * call.c (add_template_candidate): Likewise.
18892 * class.c (instantiate_type): Likewise.
18893 * pt.c (instantiate_template): Likewise.
18894 (get_bindings): Likewise.
18895
18896 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18897 is_member_template.
18898
18899 * pt.c (unify): Undo changes to allow multiple levels of template
18900 parameters.
18901 (type_unification): Likewise.
18902 (fn_type_unification): Likewise.
18903 (get_class_bindings): Likewise.
18904 * cp-tree.h (Likewise).
18905
18906 * decl.c (replace_defarg): Check that the type of the default
18907 parameter does not invlove a template type before complaining
18908 about the initialization.
18909
18910 * error.c (dump_expr): Deal with template constant parameters in
18911 member templates correctly.
18912
18913 * pt.c (is_member_template): Deal with class specializations
18914 correctly.
18915 (tsubst): Handle "partial instantiation" of member templates
18916 correctly.
18917
18918 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
18919
18920 * pt.c (type_unification): Change calling sequence to allow for
18921 multiple levels of template parameters.
18922 (tsubst_expr): Likewise.
18923 (tsubst): Likewise.
18924 (tsubst_copy): Likewise.
18925 (instantiate_template): Likewise.
18926 (unify): Likewise.
18927 * call.c (build_overload_call_real): Use it.
18928 (add_builtin_candidate): Use it.
18929 (build_new_method_call): Use it.
18930 * class.c (instantiate_type): Use it.
18931 * decl.c (grokdeclarator): Use it.
18932 * decl2.c (finish_file): Use it.
18933 * method.c (build_overload_identifier): Use it.
18934
18935 * call.c (add_template_candidate): Add additional parameter for
18936 the function return type. Call fn_type_unification istead of
18937 type_unification.
18938 (build_user_type_conversion_1): Handle member templates.
18939 (build_new_function_call): Likewise.
18940 (build_new_op): Likewise.
18941 (build_new_method_call): Likewise.
18942
18943 * class.c (grow_method): Don't give an error message indicating
18944 that two member templates with the same name are ambiguous.
18945 (finish_struct): Treat member template functions just like member
18946 functions.
18947
18948 * cp-tree.h (check_member_template): Add declaration.
18949 (begin_member_template_processing): Likewise.
18950 (end_member_template_processing): Likewise.
18951 (fn_type_unification): Likewise.
18952 (is_member_template): Likewise.
18953 (tsubst): Change prototype.
18954 (tsubst_expr): Likewise.
18955 (tsubst_copy): Likewise.
18956 (instantiate_template): Likewise.
18957 (get_bindings): Likewise.
18958
18959 * decl.c (decls_match): Handle multiple levels of template
18960 parameters.
18961 (pushdecl): Handle template type params just like other type
18962 declarations.
18963 (push_class_level_binding): Return immediately if the
18964 class_binding_level is NULL.
18965 (grokfndecl): If check_classfn() returns a member_template, use
18966 the result of the template, not the template itself.
18967
18968 * decl2.c (check_member_template): New function. Check to see
18969 that the entity declared to be a member template can be one.
18970 (check_classfn): Allow redeclaration of member template functions
18971 with different types; the new functions can be specializations or
18972 explicit instantiations.
18973
18974 * error.c (dump_decl): Handle multiple levels of template
18975 parameters.
18976 (dump_function_decl): Update to handle function templates.
18977
18978 * lex.c (do_pending_inlines): Set up template parameter context
18979 for member templates.
18980 (process_next_inline): Likewise.
18981
18982 * method.c (build_overload_identifier): Adjust for multiple levels
18983 of template parameters.
18984
18985 * parse.y (fn.def2): Add member templates.
18986 (component_decl_1): Likewise.
18987
18988 * pt.c (begin_member_template_processing): New function.
18989 (end_member_template_processing): Likewise.
18990 (is_member_template): Likewise.
18991 (fn_type_unification): Likewise.
18992 (current_template_parms): Return a vector of all the template
18993 parms, not just the innermost level of parms.
18994 (push_template_decl): Deal with the possibility of member
18995 templates.
18996 (lookup_template_class): Likewise.
18997 (uses_template_parms): Likewise.
18998 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18999 TEMPLATE_CONST_PARM to deal with multiple levels of template
19000 arguments. Add processing of TEMPLATE_DECL to produce new
19001 TEMPLATE_DECLs from old ones.
19002 (do_decl_instantiation): Handle member templates.
19003
19004 * search.c (lookup_fnfields_1): Handle member template conversion
19005 operators.
19006
19007 * tree.c (cp_tree_equal): Check the levels, as well as the
19008 indices, of TEMPLATE_CONST_PARMs.
19009
19010 * typeck.c (comptypes): Check the levels, as well as the indices,
19011 fo TEMPLATE_TYPE_PARMs.
19012 (build_x_function_call): Treat member templates like member
19013 functions.
19014
19015 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19016
19017 * typeck.c (c_expand_return): Always convert_for_initialization
19018 before checking for returning a pointer to local.
19019
19020 * pt.c (type_unification): If strict and the function parm doesn't
19021 use template parms, just compare types.
19022
19023 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
19024
19025 * method.c (build_overloaded_value): Replace direct call
19026 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19027
19028 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19029
19030 * typeck.c (convert_arguments): Don't arbitrarily choose the first
19031 of a set of overloaded functions.
19032
19033 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19034
19035 * lex.c (real_yylex): Don't elide __FUNCTION__.
19036
19037 * method.c (build_overload_value): Add in_template parm.
19038 (build_overload_int): Likewise.
19039 (build_overload_identifier): Pass it.
19040
19041 * decl.c (duplicate_decls): Don't bash a previous template
19042 definition with a redeclaration.
19043
19044 * pt.c (unify): float doesn't match double.
19045
19046 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19047 TYPE_DECL. Handle getting non-template types.
19048 * parse.y (explicit_instantiation): Use typespec instead of
19049 aggr template_type.
19050
19051 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
19052
19053 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19054
19055 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
19056
19057 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19058 (compare_ics): Likewise.
19059
19060 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19061
19062 * call.c (joust): Warn about choosing one conversion op over
19063 another because of 'this' argument when the other return type is
19064 better.
19065 (source_type): New fn.
19066
19067 * call.c (build_new_op): Strip leading REF_BIND from first operand
19068 to builtin operator.
19069
19070 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19071 use its RTL.
19072
19073 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19074
19075 * call.c (null_ptr_cst_p): Remove support for (void*)0.
19076
19077 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
19078
19079 * typeck.c (expand_target_expr): Make definition match declaration.
19080
19081 * class.c (get_basefndecls): Make definition match declaration.
19082
19083 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
19084
19085 * input.c (sub_getch): Eventually give up and release the input file.
19086
19087 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19088 right place.
19089
19090 * call.c (joust): Tweak message.
19091
19092 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
19093
19094 * error.c (type_as_string): Put const/volatile on template type
19095 parameters where appropriate.
19096
19097 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
19098
19099 * call.c (strictly_better): Make arguments unsigned ints.
19100
19101 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
19102
19103 * lex.c (real_yylex): Refer to __complex instead of complex.
19104
19105 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
19106
19107 * lex.c (real_yylex): Don't use getc directly.
19108
19109 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19110
19111 * call.c (is_subseq): Don't try to be clever.
19112
19113 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19114
19115 * parse.y, pt.c: Include "except.h".
19116 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19117 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19118 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19119 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19120 prototyping.
19121
19122 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19123
19124 * decl2.c (mark_vtable_entries): Instead of replacing pure
19125 virtuals with a reference to __pure_virtual, copy the decl and
19126 change the RTL.
19127
19128 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19129
19130 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19131
19132 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19133
19134 * pt.c (instantiate_class_template): Call repo_template_used
19135 before finish_prevtable_vardecl.
19136
19137 * call.c (is_subseq): New fn.
19138 (compare_ics): Use it.
19139
19140 * repo.c (finish_repo): Don't crash on no args.
19141
19142 * parse.y (named_complex_class_head_sans_basetype): Handle
19143 explicit global scope.
19144 * decl2.c (handle_class_head): New fn.
19145
19146 * pt.c (unify): Add CONST_DECL case.
19147
19148 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19149
19150 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19151
19152 * cp-tree.h (report_type_mismatch): Add prototype.
19153 * call.c (build_overload_call_real): Remove erroneous fourth
19154 argument to report_type_mismatch.
19155 (build_user_type_conversion_1): Remove erroneous second arg to
19156 tourney.
19157 (build_new_function_call): Likewise.
19158 (build_object_call): Likewise.
19159 (build_new_op): Likewise.
19160 (build_new_method_call): Likewise.
19161
19162 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19163
19164 * error.c (dump_decl): Don't bother processing a function with no
19165 DECL_LANG_SPECIFIC.
19166
19167 * method.c (emit_thunk): Call init_function_start in the macro case.
19168
19169 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19170
19171 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19172 defined and used to set flag_vtable_thunks.
19173
19174 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19175
19176 * parse.y: Don't clear the inlines from their obstack until they've
19177 all been processed.
19178
19179 * decl.c (duplicate_decls): Don't complain about exception
19180 specification mismatch if flag_exceptions is off.
19181
19182 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
19183
19184 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19185
19186 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
19187
19188 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19189 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19190 Include <stdio.h> before include files that formerly used STDIO_PROTO.
19191
19192 * decl.c, g++spec.c, lex.c, method.c, repo.c:
19193 Include "config.h" first, as per autoconf manual.
19194
19195 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19196
19197 * decl.c (duplicate_decls): Tweak wording.
19198 * lex.c (do_pending_defargs): Don't die if we see a default arg
19199 that isn't a DEFAULT_ARG.
19200 * error.c (dump_expr): Handle DEFAULT_ARG.
19201
19202 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19203 * lang-options.h: Add -fhandle-exceptions.
19204
19205 * class.c (build_vtable): Vtables are artificial.
19206 (prepare_fresh_vtable): Likewise.
19207
19208 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19209
19210 * cvt.c (ocp_convert): After converting to the target type, set
19211 LOOKUP_NO_CONVERSION.
19212
19213 * call.c (joust): Warn about potentially confusing promotion rules
19214 with -Wsign-promo.
19215 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19216
19217 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
19218
19219 * exception.cc: Declare __terminate_func with noreturn attribute.
19220
19221 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19222
19223 * parse.y: Break out eat_saved_input, handle errors.
19224 (function_try_block): Use compstmt instead of compstmt_or_error.
19225
19226 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19227
19228 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19229
19230 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19231
19232 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19233 existence of cc1plus check whether $(LANGUAGES) contains C++.
19234
19235 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19236
19237 * method.c (do_build_copy_constructor): When copying an anonymous
19238 union member loop around to handle nested anonymous unions. Use
19239 the offset of the member relative to the outer structure, not the
19240 union.
19241
19242 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19243
19244 * call.c (resolve_args): New fn.
19245 (build_new_function_call): Use it.
19246 (build_object_call): Likewise.
19247 (build_new_method_call): Likewise.
19248
19249 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19250
19251 * call.c (build_over_call): tsubst all default parms from templates.
19252
19253 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19254
19255 * decl.c (struct cp_function): Add static_labelno.
19256 (push_cp_function_context): Save it.
19257 (pop_cp_function_context): Restore it.
19258
19259 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19260
19261 * typeck.c (build_component_ref_1): Convert from reference.
19262
19263 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19264
19265 * parse.y (current_declspecs, prefix_attributes): Initialize to
19266 NULL_TREE.
19267
19268 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19269 before we try to force it to be a TREE_LIST.
19270 (decl): Make sure $1.t is non-nil.
19271
19272 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19273
19274 * pt.c (uses_template_parms): Handle template first-parse codes.
19275
19276 * decl.c (cp_finish_decl): Only warn about user-defined statics.
19277
19278 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19279
19280 * pt.c (unify): Handle BOOLEAN_TYPE.
19281
19282 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19283 * pt.c (tsubst): Don't set it.
19284 * call.c (build_over_call): Use uses_template_parms.
19285
19286 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19287
19288 * method.c (build_overload_nested_name): Use static_labelno
19289 instead of var_labelno.
19290 (build_qualified_name): New fn.
19291 (build_overload_name): Split out from here.
19292 (build_static_name): Use build_qualified_name.
19293 * decl.c (cp_finish_decl): Statics in extern inline functions
19294 have comdat linkage.
19295 (start_function): Initialize static_labelno.
19296
19297 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19298
19299 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19300 before "all member functions in class [] are private".
19301
19302 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19303
19304 * lex.c (do_scoped_id): convert_from_reference.
19305 * init.c (build_offset_ref): Likewise.
19306
19307 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
19308
19309 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19310
19311 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19312
19313 * typeck.c (get_member_function_from_ptrfunc): Promote index
19314 before saving it.
19315
19316 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19317
19318 * tree.c (layout_basetypes): Move non-virtual destructor warning.
19319 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19320
19321 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19322
19323 * decl.c (grokdeclarator): Call add_defarg_fn for the function
19324 type, too.
19325 * lex.c (add_defarg_fn): Adjust.
19326 (do_pending_defargs): Adjust. Don't skip the first parm.
19327
19328 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19329
19330 * decl.c (build_enumerator): Global enumerators are also readonly.
19331
19332 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19333 (build_dynamic_cast): Call it and convert_from_reference.
19334
19335 * lex.c (add_defarg_fn): New fn.
19336 (snarf_defarg): Don't add to defarg_types.
19337 (do_pending_defargs): Lose defarg_types. All fns we process now
19338 have defargs.
19339 * decl.c (grokfndecl): Call add_defarg_fn.
19340
19341 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19342 * cp-tree.def: Add DEFAULT_ARG.
19343 * spew.c (yylex): Call snarf_defarg as appropriate.
19344 * parse.y: New tokens DEFARG and DEFARG_MARKER.
19345 (defarg_again, pending_defargs, defarg, defarg1): New rules.
19346 (structsp): Use pending_defargs.
19347 (parms, full_parm): Use defarg.
19348 * lex.c (init_lex): Initialize inline_text_firstobj.
19349 (do_pending_inlines): Never pass the obstack to feed_input.
19350 (process_next_inline): Call end_input instead of restore_pending_input.
19351 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19352 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19353 * input.c (end_input): New fn.
19354 (sub_getch): At the end of some fed input, just keep returning EOF
19355 until someone calls end_input.
19356 Remove 'obstack' field from struct input_source.
19357 * decl.c (grokparms): Handle DEFAULT_ARG.
19358 (replace_defarg): New fn.
19359 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19360
19361 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19362
19363 * call.c (implicit_conversion): If nothing else works, try binding
19364 an rvalue to a reference.
19365
19366 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
19367
19368 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19369 ifndef for Cygwin32 to include SIGSEGV.
19370
19371 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19372
19373 * class.c (finish_struct_1): Only complain about pointers without
19374 copy stuff if there are any constructors.
19375
19376 * rtti.c (build_dynamic_cast): Call complete_type on the types.
19377
19378 * decl.c (grokfndecl): If the function we chose doesn't actually
19379 match, die.
19380
19381 * decl2.c (grokclassfn): Don't specify 'const int' for the
19382 artificial destructor parm.
19383
19384 * pt.c (type_unification): If we are called recursively, nothing
19385 decays.
19386
19387 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
19388
19389 * decl.c (init_decl_processing): Stop trying to catch signals
19390 other than SIGABRT since the Cygwin32 library doesn't support
19391 them correctly yet. This fixes a situation in which g++ causes
19392 a hang on SIGSEGVs and other such signals in our Win32-hosted
19393 tools.
19394
19395 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
19396
19397 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19398
19399 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19400
19401 * typeck2.c (store_init_value): Always return the value if our
19402 type needs constructing.
19403
19404 * method.c (hack_identifier): Convert class statics from
19405 reference, too.
19406
19407 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19408
19409 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19410
19411 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
19412
19413 * typeck.c (c_expand_return): Make sure we clean up temporaries at
19414 the end of return x;
19415
19416 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19417
19418 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19419
19420 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
19421
19422 * except.c (expand_builtin_throw): Add support
19423 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19424
19425 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19426
19427 * repo.c (extract_string): Null-terminate.
19428
19429 * cp-tree.h (TI_SPEC_INFO): New macro.
19430 (CLASSTYPE_TI_SPEC_INFO): New macro.
19431 * pt.c (push_template_decl): Correctly determine # of template parms
19432 for partial specs.
19433
19434 * call.c (compare_ics): Really fix 'this' conversions.
19435
19436 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19437 non-template fn.
19438
19439 * pt.c (push_template_decl): Complain about mismatch in # of
19440 template parms between a class template and a member template.
19441
19442 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19443
19444 * method.c (synthesize_method): You can't call
19445 function_cannot_inline_p after finish_function.
19446 * decl.c (finish_function): Turn on flag_inline_functions and turn
19447 off DECL_INLINE before handing a synthesized method to the
19448 backend.
19449
19450 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19451
19452 * method.c (synthesize_method): Remove July 30 change to never set
19453 DECL_INLINE if at_eof.
19454
19455 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
19456
19457 * xref.c (GNU_xref_member): Ensure that the node has a
19458 decl_lang_specific part before checking DECL_FRIEND_P.
19459
19460 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19461
19462 * pt.c (instantiate_class_template): Diagnose non-class types used
19463 as bases.
19464
19465 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19466
19467 * typeck.c (build_conditional_expr): Use convert_for_initialization
19468 instead of convert_and_check.
19469
19470 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19471
19472 * parse.y (typespec): Don't pedwarn for typeof.
19473
19474 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
19475
19476 * repo.c (finish_repo): Only check changes if we would write a
19477 repo file.
19478
19479 * call.c (compare_ics): Fix handling of 'this' conversions.
19480
19481 * pt.c (do_decl_instantiation): Support static data too. Rename
19482 from do_function_instantiation.
19483 * cp-tree.h: Adjust.
19484 * parse.y: Adjust.
19485
19486 * repo.c (extract_string): New fn.
19487 (get_base_filename): Use it.
19488 (init_repo): Compare old args with current args.
19489
19490 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
19491
19492 * Makefile.in, Make-lang.in: Protect C-ls with a comment
19493 character, idea from Paul Eggert <eggert@twinsun.com>.
19494
19495 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
19496
19497 * typeck.c (c_expand_return): Be more persistent in looking for
19498 returned temps.
19499
19500 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19501 pointer to reference.
19502
19503 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19504
19505 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19506
19507 * init.c (build_member_call, build_offset_ref):
19508 Use do_scoped_id instead of do_identifier.
19509
19510 * cvt.c (convert): Remove bogosity.
19511
19512 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19513
19514 * cvt.c (build_up_reference): Do checks of ARGTYPE and
19515 TARGET_TYPE before trying to use get_binfo.
19516
19517 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
19518
19519 * cvt.c (build_up_reference): Call get_binfo to get access control.
19520
19521 * decl2.c (import_export_decl): If we don't support weaks, leave
19522 statics undefined.
19523
19524 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
19525
19526 * except.c (expand_builtin_throw): Add support for machines that
19527 cannot access globals after throw's epilogue when
19528 -fno-sjlj-exceptions is used.
19529
19530 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19531
19532 * parse.y: 'std::' becomes '::'.
19533 * lex.c (real_yylex): Remove 'namespace' warning.
19534 * init.c (build_member_call): Ignore 'std::'.
19535 (build_offset_ref): Likewise.
19536 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19537 (do_toplevel_using_decl): Ignore 'using std::whatever'.
19538 * decl.c (push_namespace): Just sorry.
19539 (pop_namespace): Nop.
19540 (init_decl_processing): Declare std namespace.
19541
19542 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19543
19544 * search.c (push_class_decls): A name which ambiguously refers to
19545 several instantiations of the same template just refers to the
19546 template.
19547
19548 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
19549
19550 * decl.c (build_enumerator): Fix problem with unsigned long
19551 enumerated values being smashed to ints, causing overflow
19552 when computing next enumerated value (for enum values around
19553 MAX_VAL).
19554
19555 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19556
19557 * typeck.c (build_component_ref): Only call mark_used on a decl.
19558
19559 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19560
19561 * typeck.c (build_c_cast): Make the check for a ptr to function
19562 more specific before possible default_conversion call.
19563
19564 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
19565
19566 * except.c (expand_exception_blocks): Simplify and fix and make
19567 sure we don't end a region in a sequence, as expand_end_bindings
19568 doesn't like it.
19569
19570 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
19571
19572 * except.c (init_exception_processing): Mark terminate as not
19573 returning so that the optimizer can optimize better.
19574
19575 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
19576
19577 * cvt.c (convert): Don't do any extra work, if we can avoid it
19578 easily.
19579
19580 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
19581
19582 * *.[chy]: Change cp_convert to ocp_convert, change convert to
19583 cp_convert. convert is now reserved for the backend, and doesn't
19584 have the semantics a frontend person should ever want.
19585
19586 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19587
19588 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
19589 Lose -traditional support.
19590
19591 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19592
19593 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
19594
19595 * parse.y (self_reference): Do it for templates, too.
19596 * class.c (pushclass): Don't overload_template_name; the alias
19597 generated by build_self_reference serves the same purpose.
19598
19599 * tree.c (list_hash): Make static, take more args.
19600 (list_hash_lookup): Likewise.
19601 (list_hash_add): Make static.
19602 (list_hash_canon): Lose.
19603 (hash_tree_cons): Only build a new node if one isn't already in the
19604 hashtable.
19605 (hash_tree_chain): Use hash_tree_cons.
19606 * cp-tree.h: Adjust.
19607 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
19608 of calling lookup_name.
19609
19610 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
19611
19612 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
19613 doesn't refer to the CONST_DECLs.
19614
19615 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
19616
19617 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
19618 is bigger.
19619 (expand_class_desc): Convert the last argument to a sizetype.
19620
19621 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19622
19623 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
19624 __real__): Add reswords.
19625 * hash.h: Regenerate.
19626 * lex.h (rid): Add RID_COMPLEX.
19627 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
19628 * lex.c (init_lex): Add building of RID_COMPLEX.
19629 (real_yylex): General cleanup in line with what c-lex.c also has,
19630 sans the cruft for traditional; add handling of SPEC_IMAG, complex
19631 types, and imaginary numeric constants.
19632 * parse.y (REALPART, IMAGPART): Add tokens.
19633 (unary_expr): Add REALPART and IMAGPART rules.
19634 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
19635 * decl.c (complex_{integer,float,double,long}_type_node): Define
19636 types.
19637 (init_decl_processing): Set up the types.
19638 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
19639 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19640 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19641 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19642 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19643 COMPLEX_TYPE case.
19644 * method.c (build_overload_name): Add handling of the different
19645 COMPLEX_TYPEs, prefixing them with `J'.
19646 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19647 as a template parm.
19648 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19649 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19650 (mapcar): Handle COMPLEX_CST.
19651 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19652 (common_type): Add code for complex types.
19653 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19654 (convert_for_assignment): Likewise.
19655 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19656
19657 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19658
19659 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19660 tsubst_expr, as it might try to do overload resolution.
19661
19662 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19663
19664 * pt.c (instantiate_class_template): Oops.
19665
19666 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19667
19668 * cp-tree.def: Add TAG_DEFN.
19669 * pt.c (tsubst_enum): New fn.
19670 (instantiate_class_template): Use it.
19671 (tsubst_expr): Support TAG_DEFN.
19672 (tsubst): Support local enums.
19673 (tsubst_copy): Likewise.
19674 * decl.c (finish_enum): Likewise.
19675 (start_enum): If this is a local enum, switch to permanent_obstack.
19676
19677 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
19678
19679 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19680 (finish_function): Put the base init code for constructors just
19681 after the parm cleanup insns.
19682 (struct cp_function): Add last_parm_cleanup_insn.
19683 (push_cp_function_context): Likewise.
19684 (pop_cp_function_context): Likewise.
19685
19686 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19687
19688 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19689
19690 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19691
19692 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19693 for THUNK_FNDECL before we switch to temporary allocation.
19694
19695 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19696
19697 * call.c (build_new_op): Handle null arg2 for ?:.
19698
19699 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
19700
19701 * except.c (expand_exception_blocks): Ensure that we flow through
19702 the end of the exception region for the exception specification.
19703 Move exception region for the exception specification in, so that
19704 it doesn't protect the parm cleanup. Remove some obsolete code.
19705 * decl.c (store_parm_decls): Likewise.
19706 (finish_function): Likewise.
19707
19708 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19709
19710 * init.c (build_new): Fix nothrow handling.
19711
19712 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19713
19714 * init.c (emit_base_init): Don't warn about the initialization
19715 list for an artificial member.
19716
19717 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19718
19719 * expr.c (do_case): Handle !START case for the error msg.
19720
19721 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19722
19723 * decl2.c, lang-options.h: New option -Weffc++.
19724 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19725 to -Weffc++.
19726
19727 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19728 to MULTIPLE_SYMBOL_SPACES.
19729
19730 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19731
19732 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19733
19734 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19735
19736 * typeck.c (c_expand_return): Don't complain about returning void
19737 to void in an artificial function.
19738 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19739 don't set DECL_RESULT, set DECL_ARTIFICIAL.
19740 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19741
19742 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
19743
19744 * init.c (init_decl_processing): Add support for setjmp/longjmp based
19745 exception handling.
19746 * except.c (init_exception_processing): Likewise.
19747 (expand_end_catch_block): Likewise.
19748 (expand_exception_blocks): Likewise.
19749 (expand_throw): Likewise.
19750 * exception.cc (__default_terminate): Likewise.
19751
19752 * init.c (perform_member_init): Use new method of expr level
19753 cleanups, instead of cleanups_this_call and friends.
19754 (emit_base_init): Likewise.
19755 (expand_aggr_vbase_init_1): Likewise.
19756 (expand_vec_init): Likewise.
19757 * decl.c (cp_finish_decl): Likewise.
19758 (expand_static_init): Likewise.
19759 (store_parm_decls): Likewise.
19760 (cplus_expand_expr_stmt): Likewise.
19761 * decl2.c (finish_file): Likewise.
19762
19763 * Make-lang.in (exception.o): Ok to compile with -O now.
19764
19765 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19766 we know it will be done later by the backend.
19767
19768 * decl2.c (lang_f_options): Remove support for short temps.
19769 * lang-options.h: Likewise.
19770
19771 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19772
19773 * tree.c (varargs_function_p): New fn.
19774 * method.c (emit_thunk): Replace broken generic code with code to
19775 generate a heavyweight thunk function.
19776
19777 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
19778
19779 * pt.c (process_template_parm): pedwarn about floating-point parms.
19780
19781 * decl.c (grokdeclarator): inline no longer implies static.
19782
19783 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19784
19785 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19786
19787 * class.c (check_for_override): The signature of an overriding
19788 function is not changed.
19789
19790 * call.c (build_over_call): Move setting of conv into the loop.
19791 Note: this change, along with the related changes of the 18th thru
19792 the 20th of April, fix an infinite loop problem in conversions.
19793
19794 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19795
19796 * call.c (build_user_type_conversion_1): Really ignore rvalue
19797 conversions when looking for a REFERENCE_TYPE.
19798
19799 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19800 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19801 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19802 (build_unary_op): Likewise.
19803 * call.c (build_over_call): See through a CONVERT_EXPR around the
19804 ADDR_EXPR for on a temporary.
19805 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19806 the ADDR_EXPR for a local variable.
19807
19808 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
19809
19810 * call.c (build_user_type_conversion_1): If we're trying to
19811 convert to a REFERENCE_TYPE, only consider lvalue conversions.
19812 (build_new_function_call): Print candidates.
19813 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19814 (reference_binding): Binding a temporary of a reference-related type
19815 is BAD.
19816
19817 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19818
19819 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19820 * tinfo2.cc (type_info::before): Likewise.
19821
19822 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
19823
19824 * call.c (implicit_conversion): Oops.
19825
19826 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19827
19828 * call.c (implicit_conversion): Try to find a reference conversion
19829 before binding a const reference to a temporary.
19830
19831 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
19832
19833 * exception.cc (__default_unexpected): Call terminate by default,
19834 so that if the user overrides terminate, the correct function will
19835 be called.
19836
19837 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
19838
19839 * parse.y (left_curly): Avoid trying to use any fields of
19840 error_mark_node, as there aren't any.
19841
19842 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19843
19844 * lex.c (do_identifier): Avoid breaking on overloaded methods
19845 as default arguments.
19846
19847 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
19848
19849 * call.c (add_template_candidate): Initialize the variable "dummy".
19850
19851 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
19852
19853 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19854 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19855
19856 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19857
19858 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19859 (debug_binfo): Delete decl, not needed.
19860
19861 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19862 promotes_to_aggr_type): Delete fns.
19863 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19864 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19865 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19866
19867 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19868
19869 * friend.c (is_friend_type): Delete fn.
19870 * cp-tree.h (is_friend_type): Delete decl.
19871
19872 * decl.c (original_result_rtx, double_ftype_double,
19873 double_ftype_double_double, int_ftype_int, long_ftype_long,
19874 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19875 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19876
19877 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19878 fwd decls.
19879 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19880
19881 * decl.c (pushdecl_nonclass_level): #if 0, unused.
19882 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19883
19884 * lex.c (reinit_lang_specific): #if 0, unused.
19885 * cp-tree.h (reinit_lang_specific): #if 0 decl.
19886
19887 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19888 * cp-tree.h (revert_static_member_fn): Delete decl.
19889
19890 * class.c (root_lang_context_p): Delete fn.
19891 * cp-tree.h (root_lang_context_p): Delete decl.
19892
19893 * decl.c (set_current_level_tags_transparency): #if 0, unused.
19894 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19895
19896 * lex.c (set_vardecl_interface_info): Make static.
19897 * cp-tree.h (set_vardecl_interface_info): Delete decl.
19898
19899 * call.c (find_scoped_type): Make static.
19900 * cp-tree.h (find_scoped_type): Delete decl.
19901
19902 * search.c (convert_pointer_to_vbase): Make static.
19903 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19904
19905 * decl.c (const_ptr_type_node): Likewise.
19906 * cp-tree.h (const_ptr_type_node): Delete decl.
19907
19908 * typeck.c (common_base_type): Make static.
19909 * cp-tree.h (common_base_types): Delete erroneous decl.
19910
19911 * pt.c (classtype_mangled_name): Make static.
19912 * cp-tree.h (classtype_mangled_name): Delete decl.
19913
19914 * lex.c (check_newline): Make static.
19915 * cp-tree.h (check_newline): Delete decl.
19916
19917 * typeck.c (build_x_array_ref): Delete fn, same idea as
19918 grok_array_decl.
19919 * cp-tree.h (build_x_array_ref): Delete decl.
19920
19921 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19922 copy_lang_decl.
19923 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19924
19925 * class.c (build_vtable_entry): Make static.
19926 * cp-tree.h (build_vtable_entry): Delete decl.
19927
19928 * class.c (build_vbase_pointer): Make static.
19929 * cp-tree.h (build_vbase_pointer): Delete decl.
19930
19931 * sig.c (build_sptr_ref): Add forward decl and make static.
19932 * cp-tree.h (build_sptr_ref): Delete decl.
19933
19934 * call.c (build_new_method_call): Add forward decl and make static.
19935 * cp-tree.h (build_new_method_call): Delete decl.
19936
19937 * call.c (build_object_call): Make static.
19938 * class.c (check_for_override, complete_type_p, mark_overriders):
19939 Likewise.
19940 * decl.c (cp_function_chain): Likewise.
19941 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19942 Likewise.
19943 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19944 Likewise.
19945 * tree.c (build_cplus_array_type_1): Likewise.
19946 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19947 (comp_target_parms): Likewise.
19948
19949 * init.c (build_builtin_call): Make static.
19950 * cp-tree.h (build_builtin_call): Delete decl.
19951
19952 * typeck.c (binary_op_error): Delete decl.
19953 * cp-tree.h (binary_op_error): Likewise.
19954
19955 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19956
19957 * call.c (build_method_call): Compare against error_mark_node
19958 directly, rather than the ERROR_MARK tree code.
19959 * cvt.c (cp_convert): Likewise.
19960 * decl.c (print_binding_level): Likewise.
19961 (duplicate_decls): Likewise.
19962 (grokdeclarator): Likewise.
19963 (grokdeclarator): Likewise.
19964 * init.c (expand_aggr_init_1): Likewise.
19965 (decl_constant_value): Likewise.
19966 * method.c (build_opfncall): Likewise.
19967 (hack_identifier): Likewise.
19968 * typeck.c (build_modify_expr): Likewise.
19969
19970 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19971
19972 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19973
19974 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19975
19976 * pt.c (coerce_template_parms): Add new error message.
19977
19978 * method.c (build_overload_value): Implement name mangling for
19979 floating-point template arguments.
19980
19981 * method.c (build_overload_int, icat, dicat): Fix mangling of template
19982 arguments whose absolute value doesn't fit in a signed word.
19983
19984 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19985
19986 * friend.c: New file; put all of the friend stuff in here.
19987 * init.c: Instead of here.
19988 * Makefile.in (CXX_OBJS): Add friend.o.
19989 (friend.o): Add dependencies.
19990 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19991
19992 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19993
19994 * call.c (build_scoped_method_call): Complain if the scope isn't a
19995 base.
19996
19997 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19998
19999 * parse.y (left_curly): Don't crash on erroneous type.
20000
20001 * init.c (build_delete): Fix type of ref.
20002
20003 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
20004
20005 * search.c (get_vbase_1): Renamed from get_vbase.
20006 (get_vbase): Wrapper, now non-static.
20007 (convert_pointer_to_vbase): Now static.
20008
20009 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20010 * init.c (build_delete): Pass one.
20011 (build_partial_cleanup_for): Use build_scoped_method_call.
20012 * decl.c (finish_function): Pass a binfo.
20013
20014 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20015
20016 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20017
20018 * typeck.c (build_c_cast): Lose other reference to flag.
20019
20020 * call.c (build_field_call): Don't look for [cd]tor_identifier.
20021 * decl2.c (delete_sanity): Remove meaningless use of
20022 LOOKUP_HAS_IN_CHARGE.
20023 * decl.c (finish_function): Use build_scoped_method_call instead
20024 of build_delete for running vbase dtors.
20025 * init.c (build_delete): Call overload resolution code instead of
20026 duplicating it badly.
20027
20028 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
20029
20030 * call.c (build_over_call): Call mark_used before trying to elide
20031 the call.
20032
20033 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20034
20035 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20036
20037 * typeck.c (build_modify_expr): Always pedwarn for a cast to
20038 non-reference used as an lvalue.
20039
20040 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20041
20042 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20043
20044 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20045
20046 * parse.y (handler): Fix template typo.
20047
20048 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20049
20050 * error.c (lang_decl_name): New fn.
20051 * tree.c (lang_printable_name): Use it.
20052
20053 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
20054
20055 * g++spec.c: Include config.h so that we can catch bzero #defines
20056 from the config file.
20057
20058 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
20059
20060 * new1.cc: Include a declaration for malloc, to avoid warning, and
20061 avoid lossing on systems that require one (ones that define malloc
20062 in xm.h).
20063
20064 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20065
20066 * decl2.c (max_tinst_depth): New variable.
20067 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20068 option.
20069 * pt.c (max_tinst_depth): Variable moved.
20070 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20071 as legal.
20072
20073 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
20074
20075 * decl.c (xref_basetypes): Allow a base class that depends on
20076 template parms to be incomplete.
20077
20078 * decl2.c (build_expr_from_tree): Support typeid(type).
20079 * rtti.c (get_typeid): Support templates.
20080 (expand_si_desc, expand_class_desc): Fix string length.
20081 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20082
20083 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
20084
20085 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20086
20087 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20088
20089 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20090
20091 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20092 smashes together template and non-template decls of the same
20093 signature.
20094
20095 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
20096
20097 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20098
20099 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20100
20101 * decl.c (duplicate_decls): Next route, pedwarn about different
20102 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20103
20104 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20105
20106 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20107 (struct lang_type): Delete has_default_implementation member.
20108 Increase dummy to 21.
20109 * decl.c (start_method): Delete usage.
20110
20111 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20112 store_after_parms, start_decl_1, auto_function): Add decls.
20113 (get_arglist_len_in_bytes, declare_implicit_exception,
20114 have_exceptions_p, make_type_decl, typedecl_for_tag,
20115 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20116 build_component_type_expr, cplus_exception_name,
20117 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20118 * call.c (build_this): Make static.
20119 (is_complete): Likewise.
20120 (implicit_conversion): Likewise.
20121 (reference_binding): Likewise.
20122 (standard_conversion): Likewise.
20123 (strip_top_quals): Likewise.
20124 (non_reference): Likewise.
20125 (build_conv): Likewise.
20126 (user_harshness): Likewise.
20127 (rank_for_ideal): Likewise.
20128 * decl.c (start_decl_1): Delete forward decl.
20129 (push_decl_level): Make static.
20130 (resume_binding_level): Make static.
20131 (namespace_bindings_p): Make static.
20132 (declare_namespace_level): Make static.
20133 (lookup_name_real): Make static.
20134 (duplicate_decls): Make static. Take register off NEWDECL and
20135 OLDDECL parm decls.
20136 * decl2.c (get_sentry): Make static.
20137 (temp_name_p): Delete fn.
20138 * except.c (auto_function): Delete decl.
20139 * lex.c (handle_{cp,sysv}_pragma): Make static.
20140 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20141 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20142 * pt.c (tsubst_expr_values): Make static.
20143 * rtti.c (combine_strings): Delete decl.
20144
20145 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20146
20147 * pt.c (push_template_decl): Handle getting a typedef.
20148
20149 * call.c (build_new_function_call): Complain about void arg.
20150
20151 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20152
20153 * decl.c (duplicate_decls): Give pedwarn of different exceptions
20154 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20155
20156 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
20157
20158 * except.c (expand_throw): Don't expand the cleanup tree here,
20159 since we are not going to write the rtl out. Fixes problem with
20160 -g -O on SPARC.
20161
20162 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
20163
20164 * Make-lang.in: Add $(exeext) as necessary.
20165
20166 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
20167
20168 * parse.y (handler_seq): Must have at least one catch clause.
20169
20170 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20171
20172 * call.c (add_builtin_candidate): Restore ?: hack.
20173
20174 * decl.c (grok_op_properties): More warnings.
20175
20176 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20177
20178 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20179 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20180
20181 * decl.c (duplicate_decls): Scale back to a warning, and only do
20182 'em if -pedantic.
20183
20184 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
20185
20186 * decl.c (duplicate_decls): pedwarn mismatched exception
20187 specifications.
20188
20189 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
20190
20191 * call.c (build_new_method_call): Don't display the invisible
20192 argument for controlling virtual bases.
20193
20194 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
20195
20196 * new: Add nothrow new and delete, bad_alloc and throw specifications
20197 for delete.
20198 * decl.c (init_decl_processing): Add throw specification for delete.
20199 * new.cc (nothrow): Define.
20200 * lex.c (real_yylex): Removing warning that throw and friends are
20201 keywords.
20202 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20203 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20204 * Make-lang.in: Add new{1,2}.{cc,o}.
20205
20206 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20207
20208 * lex.c (cons_up_default_function): Fix return type of synth op=.
20209
20210 * init.c (emit_base_init): Add warnings for uninitialized members
20211 and bases.
20212
20213 * decl.c (xref_basetypes): Add warning for non-polymorphic type
20214 with destructor used as base type.
20215
20216 * decl.c (grok_op_properties): Add warning for op= returning void.
20217 * typeck.c (c_expand_return): Add warning for op= returning anything
20218 other than *this.
20219
20220 * class.c (finish_struct_1): Add warning for class with pointers
20221 but not copy ctor or copy op=.
20222
20223 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20224 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20225 (instantiate_template): If -fexternal-templates, add this
20226 instantiation to pending_templates.
20227
20228 * decl2.c (copy_assignment_arg_p): Disable old hack to support
20229 Booch components.
20230
20231 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
20232
20233 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20234
20235 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
20236
20237 * call.c (standard_conversion): Handle getting references. Tack
20238 on RVALUE_CONV here. Do it for non-class types, too.
20239 (reference_binding): Pass references to standard_conversion.
20240 (implicit_conversion): Likewise.
20241 (add_builtin_candidate): Disable one ?: kludge.
20242 (convert_like): Handle RVALUE_CONVs for non-class types.
20243 (joust): Disable the other ?: kludge.
20244
20245 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20246
20247 * decl.c (init_decl_processing): Add code to build up common
20248 function types beforehand, to avoid creation then removal of
20249 things already in the hash table.
20250
20251 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20252
20253 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20254 the arguments.
20255
20256 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20257 current_template_parms.
20258
20259 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
20260
20261 * search.c (lookup_field): Don't return a function, check want_type.
20262
20263 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20264
20265 * init.c (build_new): Make sure PLACEMENT has a type.
20266
20267 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20268
20269 * init.c (build_new): Support new (nothrow).
20270
20271 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
20272
20273 * pt.c (instantiate_decl): Also do push_to_top_level before setting
20274 up DECL_INITIAL.
20275
20276 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20277 * pt.c (tsubst): Defer instantiation of default args.
20278 * call.c (build_over_call): Until here.
20279
20280 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20281
20282 * search.c (lookup_field): Make sure we have an
20283 IDENTIFIER_CLASS_VALUE before we try to return it.
20284
20285 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20286
20287 * call.c (build_method_call): Delete unused var PARM.
20288 (build_overload_call_real): Likewise.
20289 (build_object_call): Delete unused var P.
20290 (build_new_op): Likewise.
20291 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20292 var definitions, which are never used.
20293 (shadow_tag): Delete unused var FN.
20294 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20295 * init.c (build_new): Delete unused var ALLOC_TEMP.
20296 * method.c (hack_identifier): Delete unused var CONTEXT.
20297 (do_build_copy_constructor): Delete unused var NAME.
20298 (synthesize_method): Delete unused var BASE.
20299 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20300 * rtti.c (build_headof): Delete unused var VPTR.
20301 (get_typeid): Delete unused var T.
20302 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20303 and ORIG_OP2.
20304 (build_ptrmemfunc): Delete unused vars U and NINDEX.
20305 * typeck2.c (build_functional_cast): Delete unused var BINFO.
20306
20307 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20308
20309 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20310 things in a type being defined.
20311 * decl.c (finish_enum): Reverse the values so that they are in
20312 the correct order.
20313
20314 * pt.c (instantiate_class_template): Don't initialize
20315 BINFO_BASETYPES until the vector is filled out.
20316 (unify): Don't abort on conflicting bindings, just fail.
20317 (instantiate_decl): Do push_tinst_level before any tsubsting.
20318
20319 * method.c (build_overload_value): Handle getting a
20320 TEMPLATE_CONST_PARM for a pointer.
20321
20322 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
20323
20324 * init.c (expand_member_init): Don't give 'not a base' error for
20325 templates.
20326
20327 * pt.c (instantiate_decl): Call import_export_decl later.
20328
20329 * pt.c (instantiate_class_template): Return a value.
20330
20331 * parse.y (extension): New rule for __extension__.
20332 (extdef, unary_expr, decl, component_decl): Use it.
20333
20334 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
20335
20336 * class.c (base_binfo): Remove unused base_has_virtual member.
20337 (finish_base_struct): Likewise.
20338 (finish_struct_1): Likewise.
20339
20340 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
20341
20342 * search.c (expand_upcast_fixups): Fix bogus code generation
20343 problem where the generated code uses the wrong index into the
20344 runtime built vtable on the stack. Old code could clobber random
20345 stack values.
20346
20347 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
20348
20349 * init.c (perform_member_init): Make sure the partial EH cleanups
20350 live on the function_obstack.
20351
20352 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
20353
20354 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20355 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20356
20357 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
20358
20359 * decl.c (grokvardecl): Avoid ANSI style initialization.
20360
20361 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20362
20363 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20364
20365 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20366
20367 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20368
20369 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20370
20371 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20372 arguments we compare against. Start the count of I at 1, not 0,
20373 since argv[0] is still the command.
20374
20375 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
20376
20377 * lang-specs.h: Accept .cp as an C++ extension.
20378
20379 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20380
20381 * cp-tree.h (ptr_reasonably_similar): Add decl.
20382
20383 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20384
20385 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20386 pointer. New local SPECBITS with the parm's value.
20387 (grokdeclarator): Pass &specbits down.
20388
20389 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20390 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20391
20392 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20393 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20394
20395 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20396 not an error_mark_node.
20397
20398 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20399
20400 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20401 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20402
20403 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20404
20405 * decl.c (grokdeclarator): When giving an anonymous struct a name,
20406 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20407 not affected).
20408
20409 * typeck2.c (build_m_component_ref): If component is a pointer
20410 to data member, resolve the OFFSET_REF now.
20411
20412 * call.c (convert_like): Don't go into infinite recursion.
20413
20414 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20415
20416 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20417 * tree.c (layout_basetypes): And on the vbase ptr.
20418
20419 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20420
20421 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20422 CHAR_TYPE_SIZE so bool is always the same size as another type.
20423
20424 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20425
20426 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
20427
20428 * decl2.c (grok_x_components): Remove synthesized methods from
20429 TYPE_METHODS of an anonymous union, complain about member
20430 functions.
20431 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20432 anonymous unions.
20433 (finish_function): Just clear the DECL_RTL of our arguments.
20434
20435 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20436
20437 * decl2.c (finish_file): Emit DWARF debugging info for static data
20438 members.
20439
20440 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20441
20442 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
20443
20444 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20445 IDENTIFIER_NODE.
20446
20447 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20448
20449 * Make-lang.in (g++-cross$(exeext)): Fix typo.
20450
20451 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20452
20453 Make the g++ driver now be a standalone program, rather than one
20454 that tries to run the gcc driver after munging up the options.
20455 * Make-lang.in (g++.c, g++spec.o): New rules.
20456 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20457 added.
20458 (g++$(exeext)): New rule, based on xgcc rule.
20459 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20460 * g++spec.c: New file.
20461 * g++.c: Removed file.
20462
20463 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
20464
20465 * cvt.c (build_up_reference): Arrange for any temporary values
20466 that have been keep in registers until now to be put into memory.
20467
20468 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20469
20470 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20471 that make -j3 bootstrap works better.
20472
20473 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20474
20475 * decl.c (pushtag): Do pushdecl for anon tags.
20476
20477 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20478
20479 * typeck.c (c_expand_return): Fix logic.
20480 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20481
20482 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
20483
20484 * g++.c (main): Make sure arglist has a final NULL entry. Add
20485 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20486 stdin/stdout of the invoked program are redirected to
20487 nowheresville.
20488
20489 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20490
20491 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20492
20493 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
20494
20495 * init.c (resolve_offset_ref): Handle obj.vfn better.
20496 * typeck.c (build_component_ref): Set TREE_TYPE on result from
20497 build_vfn_ref.
20498
20499 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
20500
20501 * typeck.c (convert_for_assignment): Also handle anachronistic
20502 implicit conversions from (::*)() to cv void*.
20503 * cvt.c (cp_convert_to_pointer): Likewise.
20504
20505 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20506
20507 * lex.c (handle_cp_pragma): Fix bogus warning.
20508
20509 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
20510
20511 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20512 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20513
20514 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20515
20516 * class.c (finish_struct_1): Support DWARF2_DEBUG.
20517 * search.c (dfs_debug_mark): Likewise.
20518 * decl2.c (finish_vtable_vardecl): Likewise.
20519 * decl.c (pushtag, finish_enum): Likewise.
20520 * lex.c (check_newline): Use debug_* instead of calling *out
20521 functions directly.
20522
20523 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20524
20525 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20526 on some picky hosts.
20527
20528 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20529
20530 * class.c (finish_struct_1): A class has a non-trivial copy
20531 constructor if it has virtual functions.
20532
20533 * cvt.c (cp_convert): Always call a constructor.
20534
20535 * call.c (reference_binding): Still tack on a REF_BIND
20536 for bad conversions.
20537 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20538
20539 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20540 (c_expand_return): Likewise.
20541 * typeck2.c (digest_init): Likewise for { }.
20542 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20543 * cvt.c (cp_convert): Handle failure better.
20544
20545 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20546
20547 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20548 of GCC be path-relative.
20549
20550 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20551
20552 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20553 it does need choose-temp.o and pexecute.o.
20554
20555 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20556
20557 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20558 that we still use it.
20559 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20560
20561 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20562
20563 * init.c (expand_default_init): Avoid calling constructors to
20564 initialize reference temps.
20565
20566 * cvt.c (convert_to_reference): Fix.
20567
20568 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20569
20570 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
20571 (convert_to_reference): Likewise.
20572 * typeck.c (convert_for_initialization): Likewise.
20573 * init.c (expand_default_init): Likewise.
20574 (expand_aggr_init_1): Likewise.
20575 * cp-tree.h (CONV_NONCONVERTING): Lose.
20576 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
20577 * *.c: Adjust.
20578 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
20579
20580 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
20581
20582 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
20583
20584 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20585
20586 * init.c (expand_aggr_init_1): Don't crash on non-constructor
20587 TARGET_EXPR.
20588
20589 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20590
20591 * g++.c: Include gansidecl.h.
20592 (VPROTO, PVPROTO, VA_START): Delete.
20593 (choose_temp_base_try, choose_temp_base, perror_exec,
20594 run_dos) [__MSDOS__]: Delete fns.
20595 (pfatal_with_name): Delete fn.
20596 (temp_filename): Declare like in gcc.c.
20597 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
20598 (error_count, signal_count): Define.
20599 (error): Delete both definitions.
20600 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
20601 (pfatal_pexecute): Add fn from gcc.c.
20602 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
20603 code to use the pexecute stuff also used by gcc.c.
20604 (MIN_FATAL_STATUS): Define.
20605 * Make-lang.in (g++): Add dependency on and linking with
20606 choose-temp.o and pexecute.o.
20607
20608 * cp-tree.h: Include gansidecl.h.
20609 (STDIO_PROTO): Delete #undef/#define.
20610 * cvt.c (NULL): Delete #undef/#define.
20611 * expr.c (NULL): Likewise.
20612 * init.c (NULL): Likewise.
20613 * rtti.c (NULL): Likewise.
20614 * xref.c (NULL): Likewise.
20615
20616 * cp-tree.h (build_user_type_conversion): Add prototype.
20617 * call.c (build_user_type_conversion): Delete prototype. Correct
20618 decl of FLAGS arg to be an int.
20619 * cvt.c (build_user_type_conversion): Likewise.
20620
20621 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
20622
20623 * cp-tree.def: Add TRY_BLOCK and HANDLER.
20624 * except.c (expand_start_catch_block): Support templates.
20625 * parse.y (try_block, handler_seq): Likewise.
20626 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
20627
20628 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20629
20630 * pt.c (current_template_args): New fn.
20631 (push_template_decl): Use it.
20632 * decl.c (grokdeclarator): Use it.
20633
20634 * decl2.c (build_expr_from_tree): Dereference ref vars.
20635
20636 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20637 the decl-specifier-seq.
20638
20639 * decl.c (grok_op_properties): Don't force the type of a conversion
20640 op to be complete. Don't warn about converting to the same type
20641 for template instantiations.
20642
20643 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20644 methods.
20645
20646 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
20647
20648 * typeck.c (get_delta_difference): Remove previous bogusness.
20649 Don't give errors if force is set.
20650
20651 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20652
20653 * decl2.c (finish_file): Don't emit debug info.
20654 * decl.c (pushdecl): Lose obsolete code.
20655 (grokdeclarator): Still do the long long thing after complaining.
20656 * search.c (note_debug_info_needed): Don't do anything if we're in a
20657 template.
20658 * method.c (synthesize_method): For non-local classes,
20659 push_to_top_level first.
20660
20661 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
20662
20663 * typeck.c (get_delta_difference): Add no_error parameter.
20664 (build_ptrmemfunc): Call get_delta_difference with no_error set;
20665 we don't want error messages when converting unrelated
20666 pointer-to-member functions.
20667
20668 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
20669
20670 * error.c (dump_expr): Improve the wording on error messages that
20671 involve pointer to member functions.
20672
20673 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
20674
20675 * cvt.c (cp_convert_to_pointer): Move code for conversions from
20676 (::*)() to void* or (*)() up a bit, so that we can convert from
20677 METHOD_TYPEs as well.
20678
20679 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20680
20681 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20682 There are no 'member' types.
20683 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20684 (build_x_typeid): Handle errors.
20685
20686 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
20687
20688 * typeck.c (convert_for_assignment): Handle anachronistic implicit
20689 conversions from (::*)() to void* or (*)().
20690 * cvt.c (cp_convert_to_pointer): Likewise.
20691 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20692 conversions from here.
20693 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20694 * lang-options.h: Likewise.
20695 * decl2.c (warn_pmf2ptr): Define.
20696 * cp-tree.h: Declare it.
20697 * typeck2.c (digest_init): Allow pmfs down into
20698 convert_for_initialization.
20699
20700 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20701
20702 * typeck.c (c_expand_return): Fix for returning overloaded fn.
20703
20704 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20705
20706 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20707 * decl.c (grok_reference_init): Pass DIRECT_BIND.
20708 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
20709 DIRECT_BIND.
20710 * call.c (convert_like): Don't pass INDIRECT_BIND.
20711 * typeck.c (convert_arguments): Likewise.
20712 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20713
20714 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20715
20716 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20717 similar code in build_up_ref.
20718 * cvt.c (build_up_reference): Drastically simplify.
20719
20720 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
20721
20722 * typeck.c (signed_or_unsigned_type): If the given type already
20723 as the correct signedness, then just return it.
20724
20725 * typeck.c ({un,}signed_type): If can't do anything, call
20726 signed_or_unsigned_type.
20727
20728 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
20729
20730 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20731 current_class_type is NULL.
20732
20733 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
20734
20735 * class.c (finish_struct_1): Avoid empty structs by adding a field
20736 so layout_type gets the mode right.
20737
20738 * typeck.c (c_expand_return): Drastically simplify.
20739
20740 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20741
20742 * typeck.c (decay_conversion): Handle overloaded methods.
20743
20744 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20745
20746 * call.c (build_over_call): A TARGET_EXPR has side-effects.
20747
20748 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
20749
20750 * cvt.c (convert_to_pointer_force): Add code to support pointer to
20751 member function to pointer to function conversions.
20752 * init.c (resolve_offset_ref): Add code to allow faked up objects,
20753 ignoring them if they are not used, and giving an error, if they
20754 are needed.
20755 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20756 code, and so that we can give an error, if we needed an object,
20757 and one was not provided.
20758 (build_c_cast): Don't call default_conversion when we want to
20759 convert to pointer to function from a METHOD_TYPE.
20760
20761 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
20762
20763 * Make-lang.in (cplib2.ready): Fix logic.
20764
20765 * decl.c (shadow_tag): Only complain about non-artificial function
20766 members.
20767
20768 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20769
20770 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
20771
20772 * expr.c (cplus_expand_expr): Pre-tweak call_target like
20773 expand_inline_function would.
20774
20775 * pt.c (mark_decl_instantiated): If extern_p, call
20776 mark_inline_for_output.
20777
20778 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
20779
20780 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20781 pmd conversions.
20782
20783 * typeck.c (get_delta_difference): Fix wording, as we can be used
20784 for pointer to data members.
20785
20786 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
20787
20788 * pt.c (tsubst): If the function decl isn't a member of this
20789 template, return a copy of the decl (including copying the
20790 lang-specific part) so we don't hose ourselves later.
20791
20792 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20793
20794 * class.c (finish_struct): Remove DWARF-specific tag handling.
20795 * decl.c (pushtag): Likewise.
20796 (finish_function): Always clear DECL_ARGUMENTS on function decls with
20797 no saved RTX.
20798 * decl2.c (finish_file): Emit DWARF debugging info for static data
20799 members.
20800
20801 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
20802
20803 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20804 isn't the same as the new one before we whack it.
20805
20806 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20807
20808 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20809 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20810 warn_traditional and warn_strict_prototypes; remove ancient
20811 'overload' code; remove references to flag_traditional.
20812
20813 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
20814
20815 * input.c (sub_getch): Handle 8-bit characters in string literals.
20816
20817 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20818
20819 * tree.c (mapcar): Handle CONSTRUCTORs.
20820 (copy_to_permanent): Handle expression_obstack properly.
20821
20822 * Make-lang.in (cplib2.txt): Also depend on the headers.
20823
20824 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20825 INT_TYPE_SIZE.
20826 (expand_class_desc): Use USItype for offset field.
20827 * tinfo.h (struct __class_type_info): Likewise.
20828
20829 * method.c (build_overload_int): TYPE_PRECISION should be applied
20830 to types.
20831
20832 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20833
20834 * call.c (build_new_op): A COND_EXPR involving void must be a
20835 builtin.
20836
20837 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20838
20839 * typeck.c (build_x_component_ref): New fn.
20840 (build_object_ref): Use it.
20841 * parse.y (primary): Use it.
20842 * decl2.c (build_expr_from_tree): Use it.
20843 * cp-tree.h: Declare it.
20844
20845 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20846 * error.c (dump_type_suffix): Handle variable arrays.
20847
20848 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20849
20850 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20851
20852 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20853
20854 * decl.c (lookup_name_real): Don't try to look up anything in a
20855 TYPENAME_TYPE.
20856
20857 * tinfo2.cc (__throw_type_match_rtti): Oops.
20858
20859 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20860
20861 * Make-lang.in (exception.o): Use -fno-PIC for now.
20862
20863 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20864
20865 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20866 calling them.
20867 (get_tinfo_fn_dynamic): Extracted from build_typeid.
20868 * tinfo2.cc (__dynamic_cast): Adjust.
20869
20870 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20871 (build_x_typeid): Likewise.
20872
20873 * parse.y: Call build_x_typeid instead of build_typeid.
20874 * cp-tree.def: Add TYPEID_EXPR.
20875 * pt.c (tsubst_copy): Handle typeid.
20876 * decl2.c (build_expr_from_tree): Likewise.
20877 * rtti.c (build_x_typeid): Throw bad_typeid from here.
20878 (build_typeid): Not here.
20879 * cp-tree.h: Declare build_x_typeid.
20880
20881 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
20882
20883 * call.c (convert_like): Pull out constant values.
20884
20885 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20886
20887 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20888
20889 * decl.c (init_decl_processing): Create short int types before
20890 creating size_t in case a machine description needs to use
20891 unsigned short for size_t.
20892
20893 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20894
20895 * Make-lang.in (exception.o): Turn off pic.
20896
20897 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20898 type, multi-level ptr conversions.
20899
20900 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20901 (throw_bad_cast): Use it.
20902 (throw_bad_typeid): New fn.
20903 (build_typeid): Throw bad_typeid as needed.
20904 Use build_call.
20905 (synthesize_tinfo_fn): Handle functions and arrays before checking
20906 for cv-quals.
20907
20908 * Remove .h from standard C++ headers, add new.h, move into inc
20909 subdirectory.
20910
20911 * exception*: Remove pointer from object, constructors. Add
20912 default exception::what that uses type_info::name. Add
20913 __throw_bad_typeid.
20914
20915 * init.c (build_new): Don't add a cookie to new (void *) T[2].
20916
20917 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20918
20919 * Make-lang.in: Building C++ code depends on cc1plus.
20920
20921 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20922
20923 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20924 a HOST_WIDE_INT, not a tree.
20925
20926 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20927
20928 * exception.cc: Don't include <stdlib.h>.
20929
20930 * Make-lang.in (c++.clean): Remove cplib2.*.
20931
20932 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
20933
20934 * parse.y (component_decl_1, component_costructor_declarator case):
20935 Pass attributes/prefix_attributes in tree list.
20936
20937 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20938
20939 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20940
20941 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20942
20943 * lex.c (do_identifier): Don't do deferred lookup in a template
20944 header.
20945
20946 * typeck2.c (store_init_value): Oops.
20947
20948 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20949 New files for C++ lang-support library.
20950 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20951 (CXX_LIB2FUNCS): Define.
20952 And rules for building the C++ lang-support code.
20953 * config-lang.in (headers): Define.
20954 (lib2funcs): Define.
20955
20956 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20957
20958 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20959 digest_init.
20960 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20961 * typeck2.c (store_init_value): Check for initializing pmf with { }
20962 here.
20963 (process_init_constructor): Not here.
20964
20965 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20966
20967 * pt.c (begin_template_parm_list): Increment
20968 processing_template_decl here.
20969 (end_template_parm_list): Not here.
20970 (process_template_parm): No need to add 1 to it now.
20971 * *.c: Use processing_template_decl instead of current_template_parms
20972 to check for being in a template.
20973
20974 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
20975 (tsubst_copy): Handle CONSTRUCTOR.
20976 (instantiate_decl): Set up context properly for variables.
20977 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20978 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20979
20980 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20981
20982 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20983
20984 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20985
20986 * method.c (make_thunk): Call comdat_linkage before setting the
20987 TREE_CODE.
20988
20989 * decl2.c (comdat_linkage): Use make_decl_one_only.
20990 (import_export_decl): Likewise.
20991 * decl.c (init_decl_processing): Check supports_one_only instead of
20992 SUPPORTS_WEAK.
20993
20994 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20995
20996 * decl2.c (grokfield): Tighten checking for access decls.
20997
20998 * decl.c (make_typename_type): Resolve references to
20999 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
21000 (lookup_name_real): Types that depend on a template parameter get
21001 an implicit 'typename' unless they're in the current scope.
21002 (start_decl_1): We don't care about incomplete types that depend
21003 on a template parm.
21004 (grokdeclarator): Resolve 'typename's in the type specifier that
21005 refer to members of the current scope.
21006
21007 * call.c (build_over_call): Remove 'inline called before
21008 definition' diagnostic.
21009 (build_method_call): Likewise.
21010 * decl.c (duplicate_decls): Downgrade 'used before declared
21011 inline' to a warning, only with -Winline.
21012
21013 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
21014
21015 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21016
21017 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21018
21019 * call.c (build_method_call): When calling a signature
21020 default implementation, as in other cases, let instance_ptr simply
21021 be instance.
21022
21023 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
21024
21025 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21026
21027 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
21028
21029 * except.c (expand_start_catch_block): Add a pushlevel so that -g
21030 works on hppa and SPARC.
21031
21032 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21033
21034 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21035
21036 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21037
21038 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21039 before testing whether it's a signature.
21040
21041 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21042
21043 * call.c (build_new_method_call): Don't complain about signature
21044 pointers and references not being an aggr type.
21045 (build_this): If a signature pointer or reference was passed in,
21046 just return it.
21047 (build_new_method_call): If instance is a signature pointer, set
21048 basetype to the signature type of instance.
21049 * sig.c (build_signature_method_call): Deleted basetype and
21050 instance parameters, they can be found as the DECL_CONTEXT of
21051 function and as the first argument passed in.
21052 * cp-tree.h: Changed declaration of build_signature_method_call.
21053 * call.c (build_method_call): Deleted first two arguments in call
21054 of build_signature_method_call.
21055 (build_over_call): Added call to build_signature_method_call.
21056
21057 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21058
21059 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21060 target_expr.
21061
21062 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21063
21064 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21065
21066 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
21067
21068 * except.c (expand_start_try_stmts): Move to except.c in the backend.
21069 (expand_end_try_stmts): Remove.
21070
21071 * init.c (perform_member_init): Use add_partial_entry () instead
21072 of directly manipulating lists.
21073 (emit_base_init): Likewise.
21074
21075 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
21076
21077 * except.c (expand_exception_blocks): Always make sure USE and
21078 CLOBBER insns that came at the end still do, the backend relies
21079 upon this.
21080
21081 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21082
21083 * call.c (build_over_call): We can only use a TARGET_EXPR of the
21084 right type.
21085
21086 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21087
21088 * cvt.c (convert_to_reference): Revert last change, don't complain
21089 about temp without target decl.
21090
21091 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
21092
21093 * decl.c (grokdeclarator): Don't core dump when void() is given.
21094
21095 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21096
21097 * decl.c (copy_args_p): Don't crash.
21098
21099 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
21100
21101 * pt.c (tsubst): And support template args inside the exception
21102 specification.
21103
21104 * pt.c (tsubst): Add support for exception specifications in
21105 template functions.
21106
21107 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
21108
21109 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21110 fields now.
21111 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21112 (start_function): Likewise.
21113 (start_method): Likewise.
21114 (grokfield): Likewise.
21115 (make_call_declarator): Add throw spec parameter.
21116 (set_quals_and_spec): Add routine.
21117 * lex.c (set_quals_and_spec): Likewise.
21118 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21119 * decl.c (shadow_tag): Eliminate the throw spec parameter to
21120 grokdeclarator.
21121 (groktypename): Likewise.
21122 (start_decl): Eliminate the throw spec parameter. Eliminate the
21123 throw spec parameter to grokdeclarator. Eliminate the throw spec
21124 field in DECL_STMT.
21125 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21126 (grokfndecl): Remove useless set of raises.
21127 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
21128 the throw spec parameter to start_decl. Pull the throw spec out
21129 of the call declarator.
21130 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21131 (start_function): Eliminate the throw spec parameter. Eliminate
21132 the throw spec parameter to grokdeclarator.
21133 (start_method): Likewise.
21134 * decl2.c (grokfield): Likewise.
21135 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21136 (grokoptypename): Likewise.
21137 (finish_file): Eliminate the throw spec parameter to
21138 start_function. Add throw spec to make_call_declarator.
21139 * except.c (init_exception_processing): Add throw spec to
21140 make_call_declarator. Eliminate the throw spec parameter to
21141 start_decl.
21142 (expand_start_catch_block): Eliminate the throw spec parameter to
21143 grokdeclarator.
21144 (expand_builtin_throw): Add throw spec to make_call_declarator.
21145 Eliminate the throw spec parameter to start_function.
21146 (start_anon_func): Likewise.
21147 * lex.c (make_call_declarator): Add throw spec parameter.
21148 (set_quals_and_spec): New routine.
21149 (cons_up_default_function): Add throw spec to make_call_declarator.
21150 Eliminate the throw spec parameter to grokfield.
21151 * method.c (synthesize_method): Eliminate the throw spec parameter
21152 to start_function.
21153 * pt.c (process_template_parm): Eliminate the throw spec parameter
21154 to grokdeclarator.
21155 (tsubst): Add throw spec to make_call_declarator.
21156 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21157 (do_function_instantiation): Eliminate the throw spec parameter to
21158 grokdeclarator. Eliminate the throw spec parameter to
21159 start_function.
21160 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21161 to start_function.
21162 * parse.y (datadef): Remove non-winning optimization.
21163 (decl): Likewise.
21164 (fndef): Remove ambiguous error productions uncovered by grammar
21165 fixing.
21166 (constructor_declarator): Add exception_specification_opt here.
21167 (component_constructor_declarator): Likewise.
21168 (direct_after_type_declarator): Likewise.
21169 (complex_direct_notype_declarator): Likewise.
21170 (direct_abstract_declarator): Likewise.
21171 (fn.def1): Remove exception_specification_opt.
21172 (fn.def2): Likewise.
21173 (condition): Likewise.
21174 (initdcl0): Likewise.
21175 (initdcl): Likewise.
21176 (notype_initdcl0): Likewise.
21177 (nomods_initdcl0): Likewise.
21178 (component_decl_1): Likewise.
21179 (component_declarator): Likewise.
21180 (after_type_component_declarator0): Likewise.
21181 (after_type_component_declarator): Likewise.
21182 (notype_component_declarator): Likewise.
21183
21184 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21185
21186 * call.c (build_over_call): Also use an INIT_EXPR when
21187 initializing anything from an rvalue.
21188
21189 * call.c (build_over_call): Call stabilize_reference when building
21190 an INIT_EXPR instead of calling the copy ctor.
21191
21192 * call.c (joust): Extend the previous change to all comparisons.
21193
21194 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21195 NO_LINKAGE_HEURISTICS.
21196
21197 * decl2.c (finish_file): Emit any statics that weren't already.
21198
21199 * typeck.c (build_static_cast): Implement.
21200 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21201 * decl.c (grokparms): Use can_convert_arg instead of
21202 implicit_conversion directly.
21203 (copy_args_p): New fn.
21204 * cvt.c (convert_to_reference): Don't complain about temp with
21205 static_cast.
21206 (build_up_reference): Handle TARGET_EXPRs.
21207 * call.c (build_over_call): Elide unnecessary temps.
21208 (can_convert*): Use new overloading code.
21209
21210 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21211
21212 * call.c: Move TYPE_PTR*_MACROS ...
21213 * cp-tree.h: To here.
21214 * typeck.c (build_reinterpret_cast): Implement.
21215
21216 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21217 ptr_complete_ob.
21218 (joust): If we're comparing a function to a builtin and the worst
21219 conversion for the builtin is worse than the worst conversion for the
21220 function, take the function.
21221
21222 * typeck.c (build_const_cast): Implement.
21223 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21224 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21225
21226 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
21227
21228 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21229 too early. Make sure we explode if exprtype turns out to be a
21230 NULL_TREE when it shouldn't be.
21231
21232 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
21233
21234 * cp-tree.h: New routine make_call_declarator.
21235 * lex.c (make_call_declarator): Define it.
21236 * except.c (init_exception_processing): Use it.
21237 (expand_builtin_throw): Likewise.
21238 (start_anon_func): Likewise.
21239 * decl2.c (finish_file): Likewise.
21240 * lex.c (cons_up_default_function): Likewise.
21241 * parse.y: Likewise.
21242 * pt.c (tsubst): Likewise.
21243
21244 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
21245
21246 * decl2.c (groktypefield): Remove unused code.
21247
21248 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
21249
21250 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21251 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
21252 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
21253 nonempty_cv_qualifiers.
21254 * hash.h: Rebuild.
21255
21256 * lex.c (make_pointer_declarator): Change type_quals into
21257 cv_qualifiers.
21258 (make_reference_declarator): Likewise.
21259
21260 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21261
21262 * decl.c (start_function): Only check interface_* for templates
21263 with flag_alt_external_templates.
21264
21265 * call.c (build_new_op): Check for comparison of different enum types.
21266 (build_over_call): Fix arg # output.
21267
21268 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21269
21270 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21271
21272 * call.c (build_new_op): Check for erroneous args.
21273
21274 * call.c (build_new_method_call): Add missing args to cp_error.
21275
21276 * tree.c (error_type): Don't print reference-to-array.
21277
21278 * typeck.c (convert_for_assignment): Don't say contravariance for
21279 removing const.
21280
21281 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21282
21283 * call.c (build_over_call): Diagnose bad convs for `this'.
21284
21285 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21286 on _ctor_arg.
21287
21288 * call.c (convert_like): Handle bad convs.
21289 (build_over_call): Handle bad convs better.
21290
21291 * decl2.c: -fansi-overloading is now the default.
21292
21293 * call.c (build_new_method_call): Check for erroneous args.
21294
21295 * pt.c (instantiate_class_template): Propagate
21296 TYPE_USES_MULTIPLE_INHERITANCE.
21297
21298 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
21299
21300 * call.c (enforce_access): Add static to routine.
21301
21302 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21303
21304 * call.c (build_user_type_conversion_1): Fix bad handling.
21305 (compare_ics): Likewise.
21306
21307 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21308
21309 * call.c (standard_conversion): Oops.
21310
21311 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
21312
21313 * g++.c: Update test for win32 (&& ! cygwin32).
21314
21315 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21316
21317 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21318 (ptr_reasonably_similar): New fn.
21319 * call.c (BAD_RANK): New rank.
21320 (ICS_BAD_FLAG): New macro.
21321 (standard_conversion): Handle almost-right pointer conversions.
21322 (reference_binding): Handle bad rvalue bindings.
21323 (add_*_candidate): Stuff.
21324 (build_over_call): Pass bad conversions to convert_for_initialization.
21325 (compare_ics): Handle bad convs.
21326 (joust): Likewise.
21327
21328 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
21329
21330 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21331 integer_type_node when computing pointer offsets.
21332
21333 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21334
21335 * tree.c (lvalue_type): New fn.
21336 (error_type): New fn.
21337 * call.c (op_error): Use error_type.
21338 (add_conv_candidate): Use lvalue_type.
21339 (add_builtin_candidates): Likewise.
21340 * error.c (args_as_string): Use error_type.
21341
21342 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21343
21344 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21345 (tsubst): Not here.
21346
21347 * decl.c (init_decl_processing): With -ansi, __null's type is the
21348 signed integral type with the same number of bits as a pointer.
21349 Introduce a new variable null_node for it.
21350 * cp-tree.h: Adjust.
21351 * call.c (null_ptr_cst_p): Adjust.
21352
21353 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
21354
21355 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21356 optimize.
21357
21358 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21359
21360 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21361 fns of classes without virtual functions.
21362
21363 * call.c (add_function_candidate): Handle `this' specially.
21364 (compare_ics): Likewise.
21365
21366 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
21367
21368 * typeck.c (build_conditional_expr): Fix handling of __null.
21369
21370 * decl2.c (comdat_linkage): New fn.
21371 (import_export_vtable): Use it.
21372 (import_export_decl): Use it.
21373 * method.c (make_thunk): Use it.
21374
21375 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21376
21377 * pt.c (end_template_decl): If we don't actually have parms, return.
21378 * parse.y (template_header): Accept 'template <>'.
21379
21380 * errfn.c: Allow 5 args.
21381
21382 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21383
21384 * tree.c (make_temp_vec): New fn.
21385 * pt.c (push_template_decl): Handle partial specs.
21386 (instantiate_class_template): Likewise.
21387 (more_specialized): Use get_bindings.
21388 (more_specialized_class): New fn.
21389 (get_class_bindings): New fn.
21390 (most_specialized_class): New fn.
21391 (do_function_instantiation): List candidates for ambiguous case.
21392 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21393 (shadow_tag): Call push_template_decl for partial specializations.
21394 * parse.y: Likewise.
21395 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21396 DECL_TEMPLATE_MEMBERS.
21397 * call.c (print_z_candidates): Reduce duplication.
21398
21399 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21400
21401 * decl2.c (lang_decode_option): Allow -fansi-overloading.
21402
21403 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21404
21405 * pt.c (get_bindings): New fn.
21406 (most_specialized): Likewise.
21407 (do_function_instantiation): Use them.
21408 (add_maybe_template): New fn.
21409 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21410 * call.c (build_new_op): Handle guiding decls.
21411 (build_new_function_call): Likewise.
21412 * decl2.c (finish_file): Likewise.
21413
21414 * decl2.c (mark_used): Do synthesis here.
21415 * call.c (build_method_call): Not here.
21416 (build_over_call): Or here.
21417 * typeck.c (build_function_call_real): Or here.
21418 * tree.c (bot_manip): Call mark_used on functions used in default
21419 args.
21420
21421 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21422
21423 * decl2.c (import_export_vtable): Delete code that disabled vtable
21424 heuristic on systems with ASM_OUTPUT_EXTERNAL.
21425
21426 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21427
21428 * typeck.c (build_x_function_call): Handle static call context
21429 better.
21430
21431 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21432 the function, not its outer block.
21433
21434 * call.c (build_field_call): Pass fields on to build_opfncall
21435 regardless of TYPE_OVERLOADS_CALL_EXPR.
21436 (build_method_call): Pass on to build_new_method_call sooner.
21437
21438 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21439 gives us.
21440 * class.c (instantiate_type): Don't put a POINTER_TYPE to
21441 METHOD_TYPE on an expression. Also make a copy of rhs instead of
21442 modifying it.
21443
21444 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21445
21446 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21447 (add_builtin_candidate): Don't take enums for ++.
21448 (build_new_method_call): Handle non-aggregates and field calls.
21449 Move new overloading code from...
21450 * cvt.c: Here.
21451
21452 * decl.c (grokparms): Don't check default args in templates.
21453
21454 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
21455
21456 * cvt.c (build_new_op): Fix args to build_unary_op.
21457 (add_builtin_candidates): Don't call type_promotes_to on float.
21458
21459 * decl.c (grokparms): Check the type of the default arg.
21460
21461 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21462 returning NULL_TREE.
21463
21464 * typeck.c (build_x_binary_op): Avoid doing extra work.
21465 (build_x_unary_op): Likewise.
21466 (build_x_conditional_expr): Likewise.
21467 * cvt.c (build_over_call): Return.
21468 (add_builtin_candidate): Fix MEMBER_REF.
21469 (build_new_op): Likewise.
21470
21471 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
21472
21473 * method.c (build_overload_name): Put bug fix into code but leave
21474 disabled for now so we can be bug compatible with older releases
21475 that do repeats incorrectly. In the future, we can enable it.
21476
21477 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21478
21479 * cvt.c (convert_like): Don't call build_cplus_new twice.
21480
21481 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21482 Control new overloading code with -fansi-overloading.
21483
21484 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21485
21486 * cvt.c (build_over_call): Call build_cplus_new.
21487 * call.c (build_method_call): Likewise.
21488 * typeck.c (build_function_call_real): Likewise.
21489 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21490 the COND_EXPR in a TARGET_EXPR so they use the same slot.
21491
21492 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21493 recursive calls.
21494 * typeck.c (complete_type): Propagate
21495 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21496
21497 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21498
21499 * cvt.c (joust): More ?: kludging. Sigh.
21500 (build_over_call): Don't try to synthesize global fns.
21501
21502 * search.c (lookup_conversions): Use binfo marking.
21503
21504 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
21505
21506 * search.c (build_mi_matrix): Use the correct value of cid
21507 when determining the new mi_size.
21508
21509 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21510
21511 * cvt.c (add_builtin_candidates): Do consider type conversion ops
21512 for the first parms of += et al.
21513 (strip_top_quals): New fn.
21514 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21515 (implicit_conversion): Likewise.
21516 (add_builtin_candidates): Be careful about arrays.
21517 (build_new_method_call): Handle vtable optimization.
21518
21519 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
21520
21521 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21522 * cvt.c (reference_binding): Use it.
21523 (implicit_conversion): Use it.
21524 (add_builtin_candidate, COND_EXPR): Use it.
21525
21526 * cvt.c (build_new_function_call): Check for error args.
21527
21528 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21529
21530 * gxx.gperf: Add __null.
21531 * hash.h: Regenerate.
21532 * lex.h: Add RID_NULL.
21533 * lex.c (init_lex): Create null_pointer_node here, stick it in
21534 RID_NULL.
21535 * decl.c (init_decl_processing): Still set its type here.
21536 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21537 (convert_to_pointer_force): Likewise.
21538 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21539 if (! pedantic).
21540 * call.c (convert_harshness): Use null_ptr_cst_p.
21541 * typeck.c (convert_for_assignment): Likewise. Don't produce
21542 null_pointer_node.
21543
21544 * error.c (args_as_string): Handle lists of actual args, too.
21545 * cvt.c (null_ptr_cst): Support (void*)0 for now.
21546 (build_user_type_conversion_1): Improve diagnostics.
21547 (build_new_function_call): Likewise.
21548 (build_object_call): Likewise.
21549 (build_new_method_call): Likewise. Move call before def diagnostic...
21550 (build_over_call): Here.
21551
21552 * cvt.c (build_new_method_call): Don't complain about no match if
21553 LOOKUP_SPECULATIVELY.
21554 (build_over_call): Fix 'this' for virtual fn.
21555 (build_new_method_call): Add diagnostic.
21556
21557 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21558
21559 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21560 constructors to be passed in.
21561 (build_over_call): Likewise.
21562 (build_user_type_conversion_1): Pass them in.
21563 (convert_like): Likewise.
21564 (build_object_call): Handle overloaded conversions.
21565 (build_over_call): Pass the right args to build_vfn_ref.
21566 (standard_conversion): Fix pmf convs.
21567 (joust): Handle comparing statics and non-statics.
21568 (build_new_method_call): New fn.
21569 * call.c (build_method_call): Call it if NEW_OVER.
21570
21571 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
21572
21573 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
21574 %D instead.
21575
21576 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
21577
21578 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
21579 instead of just maybe_build_cleanup so that we deallocate the
21580 thrown object.
21581
21582 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21583
21584 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
21585 * cp-tree.h (finish_prevtable_vardecl): Add decl.
21586
21587 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
21588
21589 * pt.c (instantiate_class_template): Call complete_type. Also, if
21590 we're at the end of the file and we just instantiated a template
21591 class with a vtable, call finish_prevtable_vardecl.
21592
21593 * error.c (dump_decl): Don't explode (or explode more gracefully
21594 as appropriate) if the object being dumped has a null type.
21595 (dump_expr): Likewise.
21596
21597 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
21598 by counting the number of nodes that we'll need before allocating
21599 the array.
21600 (lookup_fnfields): Fix comment.
21601 (breadth_first_search): Fix comment.
21602
21603 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21604
21605 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
21606 TYPE_ALIGN.
21607 * class.c (finish_struct): Call cplus_decl_attributes here.
21608 (finish_struct_1): Not here.
21609 * cp-tree.h: Adjust.
21610
21611 * pt.c (type_unification): New parameter STRICT.
21612 (unify): If STRICT, don't allow cv addition or base deduction.
21613 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
21614
21615 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21616
21617 * search.c (get_template_base{_recursive}): New fns.
21618 * pt.c (more_specialized): New fn.
21619 (do_function_instantiation): Use it.
21620 (unify): Handle base deduction.
21621 * cvt.c (joust): Use more_specialized.
21622 Don't arbitrarily choose between non-builtin candidates.
21623 (build_over_call): Call require_complete_type.
21624
21625 * decl.c (start_function): Statics are static even in a #pragma
21626 interface file.
21627
21628 * decl2.c (import_export_vtable): Disable vtable heuristic on
21629 systems with ASM_OUTPUT_EXTERNAL.
21630
21631 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
21632 (standard_conversion): No std conv to enum type.
21633
21634 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21635 for ptm's.
21636
21637 * cvt.c (reference_binding): Bind directly to a base subobject of
21638 a class rvalue.
21639
21640 * cvt.c (build_new_op): Enforce access control.
21641
21642 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
21643
21644 * typeck2.c (process_init_constructor): When scanning the
21645 union for a named field, skip things that aren't FIELD_DECLs.
21646
21647 * method.c (synthesize_method): Don't scan fndecl's rtl if
21648 we're at the end of the file; just assume the function can't
21649 be inlined.
21650
21651 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21652
21653 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21654 it failed.
21655
21656 * cvt.c (build_user_type_conversion_1): Handle overloaded
21657 conversion ops.
21658
21659 * cvt.c (add_builtin_candidates): Don't consider type conversion
21660 operators for the first parameter of operator=.
21661
21662 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
21663
21664 * typeck.c (complete_type): Only call layout_type if we're not
21665 expanding a template.
21666
21667 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21668
21669 * cvt.c (compare_ics): Oops.
21670
21671 * cvt.c (op_error): Oops.
21672
21673 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21674 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
21675 (build_conv): Use them.
21676 (implicit_conversion): Use them.
21677 (convert_like): Handle them.
21678 (build_new_op): Handle builtin COND_EXPR again.
21679 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
21680 in lists of types for COND_EXPR.
21681 (add_builtin_candidate): Add enum candidates for COND_EXPR.
21682
21683 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
21684
21685 * typeck.c (build_modify_expr): Always attempt to build a call to
21686 the assignment operator, even if we're using a default one.
21687 (convert_for_initialization): Call complete_type.
21688
21689 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21690
21691 * cvt.c (reference_binding): A REF_BIND gets the reference type.
21692 (implicit_conversion): Likewise.
21693 (convert_like): Likewise.
21694 (compare_ics): Likewise.
21695 (compare_qual): Likewise.
21696 (print_z_candidates): Handle no candidates.
21697 (build_new_op): Don't handle builtin COND_EXPR for now.
21698
21699 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
21700
21701 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21702
21703 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21704
21705 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21706
21707 * cvt.c (build_builtin_candidate): Oops.
21708 (build_new_op): Oops.
21709
21710 * method.c (build_opfncall): Pass COND_EXPR on.
21711 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21712 (add_builtin_candidate{,s}): Likewise.
21713 (add_builtin_candidates): Likewise.
21714 (print_z_candidates, op_error, build_new_op): Likewise.
21715 (type_decays_to): New fn.
21716 * lex.c (init_lex): Just say ?: for COND_EXPR.
21717
21718 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21719
21720 * typeck.c (complete_type): Call layout_type rather than building
21721 a new array type.
21722
21723 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21724 only use ptrdiff_t.
21725
21726 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21727
21728 * cvt.c: Always compile the new overloading code (but don't use it).
21729 (implicit_conversion): Add a BASE_CONV when converting to
21730 the same class type.
21731 (convert_like): Handle BASE_CONV.
21732
21733 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21734
21735 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21736 (add_builtin_candidate): Likewise.
21737
21738 NEW_OVER changes:
21739 * typeck.c (build_x_function_call): Try an operator function
21740 whenever we call an object of class type.
21741 * method.c (build_opfncall): Pass CALL_EXPRs through.
21742 * cvt.c (implicit_conversion): Do const-ref case first.
21743 (add_conv_candidate, build_object_call, op_error): New fns.
21744 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21745 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21746 builtin candidates.
21747 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
21748 Fall back on preincrement handling. Use op_error.
21749 Handle warn_synth.
21750 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
21751 an error_mark_node.
21752 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21753 properly.
21754
21755 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
21756
21757 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21758
21759 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
21760
21761 * typeck.c (build_component_ref_1): Use build_component_ref
21762 instead of open coding it here.
21763
21764 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21765
21766 * g++.c (main): Don't link with -lg++.
21767
21768 NEW_OVER changes:
21769 * cvt.c (convert_to_reference): Don't use convert_from_reference on
21770 result of build_type_conversion.
21771 (cp_convert): Only call build_method_call for ctors if
21772 build_type_conversion failed.
21773 (ptr_complete_ob): New function.
21774 (TYPE_PTR{,OB,MEM}_P): New macros.
21775 ({add,build}_builtin_candidate{,s}): New functions.
21776 (print_z_candidates): Handle builtins.
21777 (build_user_type_conversion_1): Don't use conversion fns for
21778 converting to a base type.
21779 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21780 (build_user_type_conversion): Use convert_from_reference.
21781 (build_new_op): New function.
21782 (build_over_call): Fix handling of methods.
21783 (compare_ics): Handle AMBIG_CONV properly.
21784 * typeck2.c: Increment abort count.
21785 * method.c (build_opfncall): Forward most requests to build_new_op.
21786 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21787
21788 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21789
21790 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21791 invalid second argument to dump_expr_list.
21792
21793 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
21794
21795 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21796
21797 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
21798
21799 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21800 ASSEMBLE_EXTERNAL.
21801
21802 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
21803
21804 * typeck2.c (process_init_constructor): New pedwarn for using { }
21805 to initialize a pointer to member function.
21806 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21807 we can avoid the new error.
21808
21809 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
21810
21811 * typeck.c (build_ptrmemfunc1): New function to hide details of
21812 pointer to member functions better.
21813
21814 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
21815
21816 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21817 methods into the actual method, as we know the implied object is
21818 not used.
21819
21820 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21821
21822 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21823 inside a system header.
21824
21825 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
21826
21827 * call.c (build_method_call): Call complete_type on the
21828 instance type.
21829
21830 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
21831
21832 * typeck.c (build_component_ref): Always build up an OFFSET_REF
21833 for obj_ptr->func so that we can know which object to use in a
21834 method call.
21835
21836 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
21837
21838 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21839 around things. Also improve maintainability.
21840
21841 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
21842
21843 * decl.c (grokdeclarator): Check for overflow when evaluating an
21844 array dimension.
21845
21846 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21847
21848 * cvt.c (cp_convert): Don't check for ambiguity with constructor
21849 if NEW_OVER.
21850
21851 * typeck.c (build_x_function_call): Pass function overload
21852 questions to new overloading code if NEW_OVER.
21853 * init.c (expand_aggr_init_1): Only check for type conversion ops
21854 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21855 Don't check for ambiguity with constructor if NEW_OVER.
21856 * cvt.c (convert_to_reference): Dereference the result of a type
21857 conversion operator.
21858 (build_conv): Propagate ICS_USER_FLAG.
21859 (implicit_conversion): Call instantiate_type.
21860 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21861 (add_function_candidate): Fix cv-quals on argtype.
21862 (print_z_candidates): New function.
21863 (build_new_function_call): Call it.
21864 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21865 consider non-converting constructors.
21866 Call print_z_candidates.
21867 Return an AMBIG_CONV for an ambiguous conversion.
21868 (build_user_type_conversion): Handle AMBIG_CONV.
21869 (convert_like): Fix test for building TARGET_EXPR.
21870 Call instantiate_type.
21871 Handle AMBIG_CONV and LVALUE_CONV.
21872 (build_over_call): Handle 0 args and ellipsis.
21873 * cp-tree.def: Add AMBIG_CONV.
21874
21875 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
21876
21877 * decl.c (lookup_name_real): If we find mem in obj when parsing
21878 `obj->mem', make sure we return the right value.
21879
21880 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
21881
21882 * search.c (get_base_distance): Call complete_type.
21883
21884 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
21885
21886 * decl.c (store_bindings): Make static.
21887
21888 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21889
21890 * init.c (expand_aggr_init_1): Don't check type conversions if
21891 NEW_OVER.
21892
21893 * cvt.c (z_candidate): Put back template field.
21894 (add_function_candidate): Set it.
21895 (add_template_candidate): Likewise.
21896 (joust): Use it.
21897 (compare_qual): Handle references and pointers to members.
21898 (compare_ics): Handle reference bindings.
21899
21900 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21901
21902 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
21903
21904 * call.c (compute_conversion_costs): Call complete_type.
21905
21906 * tree.c (vec_binfo_member): Use comptypes instead of comparing
21907 pointers, so we can handle template parameters.
21908
21909 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
21910
21911 * cvt.c (cp_convert_to_pointer): We have to call complete_type
21912 here; let's make it explicit instead of a side effect of an
21913 error check.
21914
21915 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21916
21917 * cvt.c (z_candidate): Remove template field.
21918 (reference_binding): Handle binding to temporary.
21919 (implicit_conversion): Likewise.
21920 (add_function_candidate): Handle artificial constructor parms.
21921 Handle functions with too few parms.
21922 (add_template_candidate): New function.
21923 (build_user_type_conversion_1): Handle constructors.
21924 (convert_like): Likewise.
21925 (build_over_call): Likewise.
21926 (build_new_function_call): Support templates.
21927 (compare_ics): Fix reference, inheritance handling.
21928
21929 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
21930
21931 * decl.c: Add signed_size_zero_node.
21932 (init_decl_processing): Build it.
21933 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21934 when we're trying to make a negative delta.
21935
21936 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21937
21938 Stop doing this damn index==strchr variable name confusion.
21939 * class.c (add_virtual_function): Change local var INDEX to be
21940 named IDX.
21941 (add_method): Likewise.
21942 * lex.c (print_parse_statistics): Likewise.
21943 * search.c (make_memoized_table_entry): Likewise.
21944 (lookup_fnfields_here): Likewise.
21945 (lookup_field): Likewise.
21946 (lookup_fnfields): Likewise.
21947 (get_baselinks): Likewise.
21948 * sig.c (build_signature_table_constructor): Likewise.
21949 (build_signature_method_call): Likewise.
21950 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21951 (get_member_function_from_ptrfunc): Likewise.
21952 (build_ptrmemfunc): Change local var INDEX to be IDX.
21953 (c_expand_start_case): Likewise.
21954
21955 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21956
21957 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21958 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21959 (convert_to_reference): Use build_type_conversion to convert to
21960 the reference type directly.
21961 (standard_conversion): Fix void* case, non-conversions.
21962 (reference_binding): Fix expr == 0 case, non-conversions.
21963 (convert_like): Support REF_BIND.
21964 (compare_qual): Split out from compare_ics.
21965 (compare_ics): Use it, handle icses with only a qual_conv.
21966
21967 * init.c (expand_vec_init): Don't crash if decl is NULL.
21968
21969 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
21970
21971 * mpw-config.in: New file, configury for Mac MPW.
21972 * mpw-make.sed: New file, makefile editing for MPW.
21973
21974 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21975
21976 * pt.c (instantiate_class_template): Call repo_template_used.
21977
21978 * search.c (lookup_conversions): Only lookup conversions in
21979 complete types.
21980
21981 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21982
21983 * cp-tree.def: Renamed from tree.def, to avoid confusion with
21984 gcc's tree.def.
21985 * cp-tree.h, lex.c: Include cp-tree.def.
21986 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21987
21988 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
21989
21990 * init.c (build_vec_delete_1): Call complete_type.
21991
21992 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
21993
21994 * except.c (start_anon_func): Make sure anonymous functions are
21995 never external.
21996
21997 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21998
21999 * decl.c (finish_function): If function_depth > 1, set nested.
22000
22001 * decl2.c (grokbitfield): Revert Bob's change.
22002 * class.c (finish_struct_1): Fix handling of named bitfield widths.
22003
22004 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22005
22006 * pt.c (add_pending_template): Handle types.
22007 (lookup_template_class): With -fexternal-templates, just add the class
22008 to pending_templates instead of instantiating it now.
22009 * decl2.c (finish_file): Handle types in pending_templates.
22010
22011 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
22012
22013 * decl2.c (grokbitfield): Handle constant decls appropriately.
22014 Give an appropriate error message now instead of spewing core
22015 later.
22016
22017 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22018
22019 * decl2.c: Don't turn on thunks by default for now.
22020
22021 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
22022
22023 * typeck.c (complete_type): Handle error_mark_node.
22024 (common_type, OFFSET_TYPE): Handle template_type_parms.
22025
22026 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22027
22028 * pt.c (instantiate_decl): If at_eof, call import_export_decl
22029 regardless of DECL_INLINE.
22030
22031 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22032
22033 * class.c (finish_struct_bits): Copy TYPE_SIZE.
22034
22035 * rtti.c (build_dynamic_cast): Support templates.
22036 * tree.def: Support DYNAMIC_CAST_EXPR.
22037 * pt.c (tsubst_copy): Likewise.
22038 * decl2.c (build_expr_from_tree): Likewise.
22039
22040 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22041
22042 * typeck.c (build_static_cast): Support templates.
22043 (build_const_cast): Likewise.
22044 * tree.def: Support CONST/STATIC_CAST_EXPR.
22045 * pt.c (tsubst_copy): Likewise.
22046 * decl2.c (build_expr_from_tree): Likewise.
22047
22048 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22049
22050 * decl2.c (finish_vtable_vardecl): Don't trust
22051 TREE_SYMBOL_REFERENCED for vtables of local classes.
22052
22053 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22054
22055 * pt.c (tsubst_copy): Handle operator T.
22056
22057 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22058
22059 * init.c (build_delete): Move creation of PARMS inside test of
22060 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22061
22062 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
22063
22064 * typeck.c (build_conditional_expr): Don't assume that
22065 the arguments to ?: are always pointers or records.
22066
22067 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22068
22069 * decl2.c (import_export_decl): Still emit static/weak/comdat
22070 copies of inline template functions with -fno-implicit-templates.
22071
22072 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
22073
22074 * init.c (build_delete): Determine the complete basetype
22075 path to the destructor we're calling.
22076
22077 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
22078
22079 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22080 initialize the enum, because we really and truly don't know where
22081 it came from.
22082 (start_enum): Don't copy integer_zero_node because
22083 build_enumerator will do it.
22084
22085 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22086
22087 * decl.c (finish_function): Do access control on base destructors.
22088
22089 * pt.c (tsubst, case FUNCTION_DECL): Set up
22090 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22091 hose us.
22092
22093 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
22094
22095 * cvt.c (build_up_reference): If we have already extended the
22096 lifetime of the temporary, don't try it again.
22097 * typeck.c (c_expand_return): Don't try and convert the return
22098 value twice when we want a reference, once is enough.
22099
22100 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
22101
22102 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22103 LOOKUP_ONLYCONVERTING at all for now.
22104
22105 * search.c (add_conversions): Put the conversion function in
22106 TREE_VALUE, the basetype in TREE_PURPOSE.
22107 * cvt.c (build_type_conversion): Adjust.
22108 * cvt.c (build_expr_type_conversion): Adjust.
22109 * call.c (user_harshness): Adjust.
22110
22111 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22112
22113 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22114 backend's benefit.
22115
22116 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
22117
22118 * except.c (expand_start_catch_block): Add a dummy region, if we
22119 get an error, so that we can avoid core dumping later.
22120
22121 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
22122
22123 * cp-tree.h (OFFSET_REF): Remove.
22124 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22125 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22126 * init.c (expand_aggr_init_1): Likewise.
22127 (build_new): Likewise.
22128 * typeck.c (expand_target_expr): Likewise.
22129
22130 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22131
22132 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22133 TARGET_EXPR.
22134
22135 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
22136
22137 * cvt.c (build_up_reference): Redo how and when temporaries are
22138 created.
22139 * decl.c (grok_reference_init): Don't try and be smart about
22140 running cleanups.
22141
22142 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
22143
22144 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22145 (TARGET_EXPR...), now that it has 4 arguments.
22146 * tree.c (build_cplus_new): Likewise.
22147
22148 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22149
22150 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22151
22152 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22153 * decl.c (struct saved_scope): Remove named_labels,
22154 {base,member}_init_list.
22155 (maybe_push_to_top_level): Don't set them. Call
22156 push_cp_function_context if appropriate.
22157 (pop_from_top_level): Likewise.
22158
22159 * method.c (do_build_assign_ref): Remove obsolete check of
22160 TYPE_HAS_ASSIGN_REF (basetype).
22161
22162 * decl.c (grokfndecl): Diagnose user definition of
22163 implicitly-declared methods.
22164
22165 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
22166
22167 * method.c (do_build_copy_constructor): Add code to give
22168 meaningful error messages instead of crashing.
22169 (do_build_assign_ref): Don't synthesize assignment operators for
22170 classes containing reference or const members.
22171
22172 * class.c (struct base_info): Remove cant_synth_copy_ctor
22173 and cant_synth_asn_ref.
22174 (finish_base_struct): Remove the code that tries to conditionalize
22175 synthesis of copy constructors & assignment operators based on
22176 access permissions. Instead, let it fail when it tries to
22177 synthesize the copy constructor. This will give meaningful error
22178 messages instead of silently generating code to perform a bitcopy.
22179
22180 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
22181
22182 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22183 determining types for constant values.
22184
22185 * decl.c (struct named_label_list): Use instead of stuffing
22186 random items into a TREE_LIST node.
22187 (named_label_uses): Use the new struct.
22188 (poplevel): Likewise.
22189 (lookup_label): Likewise.
22190 (define_label): Add an error message to tell the user the line
22191 where the goto is located in addition to the destination of the
22192 goto.
22193 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22194 named_label_uses.
22195 (finish_function): Likewise.
22196
22197 (start_decl): Complain about defining a static data member
22198 in a different type from which it was declared.
22199
22200 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22201
22202 * cvt.c (build_expr_type_conversion): Adjust.
22203
22204 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22205
22206 * call.c (build_method_call): Always convert 'this' to the
22207 appropriate type.
22208
22209 * search.c (add_conversions): Put the conversion function in
22210 TREE_VALUE, the type in TREE_PURPOSE.
22211 * cvt.c (build_type_conversion): Adjust.
22212 * call.c (user_harshness): Adjust.
22213
22214 * method.c (emit_thunk): Call temporary_allocation and
22215 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22216
22217 * tree.c (build_cplus_array_type): Handle tweaking of
22218 TYPE_MAIN_VARIANT here.
22219 * typeck.c (common_type): Not here.
22220
22221 * typeck.c (complete_type): Only try to complete an array type if
22222 it has a domain.
22223
22224 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22225
22226 * decl.c (grokvardecl): Call complete_type.
22227 (grokdeclarator): Call complete_type for PARM_DECLs.
22228
22229 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
22230
22231 * pt.c (instantiate_class_template): Re-set
22232 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22233
22234 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
22235
22236 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22237 smart enough to do it right.
22238 * tree.c (cp_expand_decl_cleanup): Likewise.
22239 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22240 cp_expand_decl_cleanup.
22241 (store_parm_decls): Likewise.
22242 (hack_incomplete_structures): Likewise.
22243 * except.c (push_eh_cleanup): Likewise.
22244
22245 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
22246
22247 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22248 frontend to the backend where it belongs.
22249 * tree.c (unsave_expr): Likewise.
22250 (unsave_expr_now): Likewise.
22251 * tree.def (UNSAVE_EXPR): Likewise.
22252 * cp-tree.h (unsave_expr): Likewise.
22253 (unsave_expr_now): Likewise.
22254
22255 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
22256
22257 * init.c (emit_base_init): Make sure the partial EH cleanups live
22258 on the function_obstack.
22259
22260 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
22261
22262 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22263 when checking for pointer types.
22264
22265 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22266
22267 * pt.c (instantiate_class_template): Remove obsolete check for
22268 access declarations.
22269
22270 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
22271
22272 * call.c (build_overload_call): Simplify calls to
22273 build_overload_call by removing last parameter.
22274 (build_method_call): Likewise.
22275 * cp-tree.h: Likewise.
22276 * method.c (build_opfncall): Likewise.
22277 * typeck.c (build_x_function_call): Likewise.
22278
22279 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
22280
22281 * call.c (default_parm_conversions): Factor out common code.
22282 (build_method_call): Use it.
22283 (build_overload_call_real): Use it.
22284
22285 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
22286
22287 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22288 but pedwarn as the code is bogus.
22289 * typeck.c (decay_conversion): Likewise.
22290 (build_function_call_real): Use build_addr_func instead of
22291 default_conversion. Don't allow pointer-to-method functions down
22292 here.
22293 (build_unary_op): Use real pointer-to-member functions instead of
22294 fake ones.
22295 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22296 (convert_for_assignment): Removed some obsolete code.
22297 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22298 build_x_function_call instead of current_class_ptr. Only call
22299 digest_init once on an initializer, we do this just checking
22300 TREE_TYPE.
22301 (build_expr_from_tree): Pass current_class_ref to
22302 build_x_function_call instead of current_class_ptr.
22303 * init.c (build_member_call): Likewise.
22304 * pase.y: Likewise.
22305 * error.c (dump_expr): Handle OFFSET_REFs better.
22306 * pt.c (unify): Handle pointer-to-member functions better.
22307 * decl.c (finish_function): Clear out current_class_ref just like
22308 we do for current_class_ptr.
22309
22310 * typeck.c (get_delta_difference): Handle virtual bases better.
22311
22312 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
22313
22314 * sig.c (build_signature_table_constructor): Use the delta for
22315 the original basetype for this virtual function with thunks.
22316 (build_signature_method_call): We still need to adjust 'this'
22317 with thunks.
22318
22319 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
22320
22321 * call.c (build_addr_func): New routine. Used to get the `real'
22322 address of a function or a method. Needed to avoid getting a
22323 pointer-to-member function.
22324 (build_call): New routine to build CALL_EXPRs.
22325 (build_method_call): Use it.
22326 * cvt.c (convert_to_aggr): Likewise.
22327 * typeck.c (build_function_call_real): Likewise.
22328 * sig.c (build_signature_table_constructor): Use build_addr_func.
22329 * cp-tree.h (build_call, build_addr_func): Declare them.
22330
22331 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
22332
22333 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22334 * parse.y: Remove uses of LOOKUP_AGGR.
22335
22336 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
22337
22338 * *.[chy]: Rename current_class_decl to current_class_ptr, and
22339 C_C_D to current_class_ref.
22340
22341 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22342
22343 * call.c (convert_harshness): Tighten up pointer conversions.
22344
22345 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
22346
22347 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22348 (finish_file): Likewise.
22349
22350 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22351
22352 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22353
22354 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22355 code.
22356
22357 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22358
22359 * decl2.c: Turn on thunks by default where supported.
22360
22361 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
22362
22363 * cp-tree.h (build_overload_call_maybe): Removed.
22364 * call.c (build_overload_call_real): Invert meaning of last arg to
22365 be require_complete.
22366 (build_overload_call): Likewise.
22367 * typeck.c (build_x_function_call): Use build_overload_call_real
22368 instead of build_overload_call_maybe.
22369
22370 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22371
22372 * decl2.c (finish_file): Don't try to emit functions that haven't
22373 been compiled.
22374
22375 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22376
22377 * decl2.c (finish_vtable_vardecl): Oops.
22378
22379 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22380 Also store the bindings from previous_class_values.
22381 (pop_from_top_level): Restore them.
22382
22383 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22384
22385 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22386 symbol has been referenced.
22387 (finish_file): Re-join synthesis/vtable loop with inline emission
22388 loop, disable inlining when an inline is output.
22389
22390 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
22391
22392 * except.c (init_exception_processing): Setup saved_in_catch.
22393 (push_eh_cleanup): Reset __eh_in_catch.
22394 (expand_start_catch_block): Set __eh_in_catch.
22395
22396 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
22397
22398 * except.c (push_eh_cleanup): Add tracking for whether or not we
22399 have an active exception object.
22400 (expand_builtin_throw): Use it to make sure a rethrow without an
22401 exception object is caught.
22402
22403 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22404
22405 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22406 cache.
22407
22408 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22409
22410 * decl2.c (finish_file): Also use sentries for vars with
22411 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22412 created).
22413
22414 * lex.c (handle_cp_pragma): Disable #pragma
22415 interface/implementation if SUPPORTS_ONE_ONLY > 1.
22416
22417 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22418
22419 * method.c (emit_thunk): Wrap default case in
22420 temporary/permanent_allocation.
22421
22422 * method.c (make_thunk): Use DECL_ONE_ONLY.
22423 (emit_thunk): Call assemble_end_function.
22424
22425 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22426
22427 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22428 (import_export_decl): Likewise.
22429 (finish_prevtable_vardecl): Disable vtable hack if
22430 SUPPORTS_ONE_ONLY > 1.
22431
22432 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
22433
22434 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22435 PREDECREMENT_EXPRs take two arguments, not one.
22436
22437 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
22438
22439 * class.c (build_vtable_entry): Don't build thunks for abstract
22440 virtuals.
22441
22442 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22443 frontend.
22444
22445 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22446
22447 * class.c (set_rtti_entry): Use size_zero_node.
22448 (build_vtable): Likewise.
22449
22450 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
22451
22452 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22453 (prepare_fresh_vtable): Likewise.
22454
22455 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
22456
22457 * method.c (emit_thunk): Call mark_used on the target function.
22458
22459 * call.c (build_method_call): Don't warn about pending templates.
22460
22461 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22462
22463 * decl2.c (finish_file): Fix list walking logic.
22464
22465 * typeck2.c (check_for_new_type): Only warn if -pedantic.
22466
22467 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
22468
22469 * class.c (finish_struct_1): Remove old code for
22470 dont_allow_type_definitions.
22471 * cp-tree.h: Likewise.
22472 * spew.c: Make sure cp-tree.h is included before parse.h, so the
22473 definition of flagged_type_tree is found before it is used.
22474 * lex.c: Likewise.
22475 * parse.y: Added the ftype member to the type union, and changed a
22476 number of rules to use it instead of ttype. Added calls to
22477 check_for_new_type() as appropriate.
22478 * typeck2.c (check_for_new_type): New function for checking
22479 if a newly defined type appears in the specified tree.
22480 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
22481 for check_for_new_type().
22482
22483 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
22484
22485 * decl2.c (finish_file): Only use a sentry if the decl is public.
22486
22487 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22488 don't pass LOOKUP_ONLYCONVERTING.
22489
22490 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
22491
22492 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22493 properly keeps track of const and volatile type modifiers.
22494
22495 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22496
22497 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22498 * pt.c (comp_template_args): Use it.
22499
22500 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22501 assemble_external for artificial function decls.
22502
22503 * decl.c (cp_finish_decl): Oops.
22504
22505 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22506
22507 * decl2.c (import_export_decl): Put static data member templates
22508 into common storage, or make them weak, depending on whether they
22509 are dynamically or statically initialized.
22510 (get_sentry): New function.
22511 (finish_file): Do import_export_decl for static data members before
22512 building the init/fini functions. Don't init/fini a variable that's
22513 EXTERNAL. Use a sentry for variables in common. Fix mismatching
22514 push/pop_temp_slots.
22515 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22516 expand_static_init thang.
22517 * method.c (get_id_2): New function.
22518
22519 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
22520
22521 * parse.y (empty_parms): Make sure we use C++-style prototypes
22522 when we're declaring member functions.
22523
22524 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22525
22526 * Makefile.in (CONFLICTS): 16 s/r conflicts.
22527 * parse.y (self_template_type): New nonterminal.
22528
22529 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22530
22531 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22532 name.
22533 * parse.y (base_class.1): Allow 'typename foo::bar'.
22534
22535 * lex.c (check_newline): Remove #pragma code that plays with the
22536 input stream, since we now deal with tokens. Clear nextchar when
22537 we're done.
22538 (handle_cp_pragma): Use real_yylex.
22539 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
22540 in one place.
22541
22542 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22543
22544 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22545
22546 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22547
22548 * parse.y: New token SELFNAME for potential constructor.
22549 * spew.c (yylex): Handle it.
22550 * lex.c (identifier_type): Produce it.
22551
22552 * parse.y (complete_type_name): In :: case, don't push class binding.
22553 (complex_type_name): Likewise.
22554
22555 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
22556
22557 * typeck.c (build_reinterpret_cast): Handle pointer to member
22558 functions.
22559
22560 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22561
22562 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22563 pragmas.
22564 (check_newline): Put the vtable/unit/implementation/interface pragma
22565 code into handle_cp_pragma, replacing it with a call.
22566 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
22567 args. Get the next token after handling the pragma token.
22568
22569 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22570
22571 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
22572 (convert_to_pointer_force): Likewise.
22573
22574 * init.c (build_new): Fix array new without -fcheck-new.
22575
22576 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22577
22578 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
22579 tree.c: Lose TYPE_NESTED_NAME.
22580
22581 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
22582 as identifiers.
22583
22584 * tree.def: Add VEC_INIT_EXPR.
22585 * expr.c (cplus_expand_expr): Handle it.
22586 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
22587 the extra file-scope symbol nastiness.
22588
22589 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22590
22591 * method.c (make_thunk): Thunks are static.
22592 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
22593
22594 * decl2.c (mark_vtable_entries): Emit thunks as needed.
22595 (finish_file): Don't emit them here.
22596
22597 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22598
22599 * rtti.c (build_dynamic_cast): Handle null pointers.
22600 (ifnonnull): New function.
22601
22602 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
22603
22604 * call.c (build_method_call): Remember the original basetype we
22605 were called with. Give an error message instead of trying
22606 (incorrectly) to call a non-static member function through a
22607 non-inherited class.
22608
22609 * search.c (expand_upcast_fixups): Mark the new fixup as
22610 DECL_ARTIFICIAL.
22611
22612 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22613
22614 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
22615
22616 * class.c (set_rtti_entry): Fix for thunks.
22617
22618 * decl2.c (import_export_decl): Still emit typeinfo fns for
22619 cv-variants of builtin types.
22620
22621 * rtti.c (expand_class_desc): Set up base_info_type_node here.
22622 (init_rtti_processing): Instead of here.
22623
22624 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22625
22626 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
22627 (build_typeid): Only complain about taking dynamic typeid without
22628 -frtti.
22629
22630 * decl2.c: flag_rtti defaults to 1.
22631
22632 * rtti.c (get_tinfo_var): The general class case is now smaller.
22633 (init_rtti_processing): Pack the latter three fields of base_info
22634 into 32 bits.
22635
22636 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
22637
22638 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22639
22640 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
22641
22642 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22643 (push_memoized_context): Split out code to undefer pop_type_level to
22644 (clear_memoized_cache): here.
22645 (pop_memoized_context): We can only handle one layer of deferral of
22646 pop_type_level so clear the cache, if there was a previous level.
22647
22648 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22649
22650 * rtti.c (init_rtti_processing): Build up base_info_type_node.
22651 (expand_class_desc): Use one pointer to an array of base_info
22652 structs, passed using a CONSTRUCTOR.
22653
22654 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
22655
22656 * class.c (build_vbase_path): Remove block extern for
22657 flag_assume_nonnull_objects here.
22658 (build_vfn_ref): Split out functionality into build_vtbl_ref.
22659 (build_vtbl_ref): New routine.
22660 (build_vtable): Set up rtti info here.
22661 (add_virtual_function): Note in CLASSTYPE_RTTI the best
22662 place where we can get the rtti pointers from to avoid having to
22663 search around for a place.
22664 (finish_base_struct): Likewise.
22665 (finish_struct_1): Likewise. Never create totally new vtables
22666 with totally new vtable pointers for rtti. Disable code to layout
22667 vtable pointers better until we want to break binary
22668 compatibility.
22669 * rtti.c (build_headof_sub): New routine to convert down to a
22670 sub-object that has an rtti pointer in the vtable.
22671 (build_headof): Use it. Also, use build_vtbl_ref now to be more
22672 maintainable.
22673 (build_dynamic_cast): Make sure we have saved it, if we need to.
22674 * search.c (dfs_init_vbase_pointers): Disable code that deals with
22675 a more efficient vtable layout, enable later.
22676 * call.c (flag_assume_nonnull_objects): Moved declaration to
22677 * cp-tree.h: here. Declare build_vtbl_ref.
22678 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22679 function calls that want a tree.
22680
22681 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22682
22683 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22684 other X subobjects in the most derived type. Ack.
22685
22686 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22687 get_typeid will do it for us.
22688 (get_typeid_1): Break out call-building for expand_*_desc to use.
22689 (get_typeid): Call it.
22690 (expand_*_desc): Likewise.
22691 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22692 and void *.
22693 (init_decl_processing): Lose builtin_type_tdescs lossage.
22694 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22695
22696 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
22697
22698 * pt.c (tsubst): When calling set_nested_typename, use
22699 TYPE_NESTED_NAME (current_class_type) instead of
22700 current_class_name.
22701
22702 * decl.c (pushdecl): Likewise.
22703 (pushdecl_class_level): Likewise.
22704 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22705 set_nested_typename.
22706
22707 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22708
22709 * rtti.c (synthesize_tinfo_fn): Handle arrays.
22710
22711 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22712
22713 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22714
22715 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22716 (init_rtti_processing): Lose bad_cast_type.
22717 (build_dynamic_cast): Use throw_bad_cast.
22718
22719 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22720
22721 * decl2.c (finish_file): Don't synthesize artificial functions
22722 that are external and not inline.
22723
22724 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22725
22726 * decl2.c (finish_file): Handle having new inlines added to
22727 saved_inlines by synthesis.
22728
22729 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22730
22731 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22732
22733 RTTI rewrite to initialize nodes as needed, not require that
22734 users #include <typeinfo>, complete functionality and reduce wasted
22735 space.
22736 * rtti.c (init_rtti_processing): New fn.
22737 (build_typeid): The vtable entry is now a function.
22738 (get_tinfo_var): New fn.
22739 (get_tinfo_fn): Likewise.
22740 (get_typeid): Use it.
22741 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22742 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22743 points __rtti_*.
22744 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22745 (synthesize_tinfo_fn): New fn.
22746 * method.c (build_t_desc_overload): Lose.
22747 (build_overload_with_type): More generic.
22748 * decl.c (init_decl_processing): Call init_rtti_processing.
22749 * class.c (set_rtti_entry): Use get_tinfo_fn.
22750 * decl2.c (mark_vtable_entries): Mark the rtti function.
22751 (finish_prevtable_vardecl): Don't build_t_desc.
22752 (import_export_decl): Handle tinfo functions.
22753 (finish_file): Likewise.
22754 * typeck.c (inline_conversion): New fn.
22755 (build_function_call_real): Use it.
22756 * cp-tree.h: Add decls.
22757
22758 * method.c (hack_identifier): Also convert component_refs from
22759 references.
22760
22761 * lex.c (cons_up_default_function): Use the type, not the name, in
22762 declspecs.
22763
22764 * decl2.c (import_export_vtable): Fix weak vtables.
22765
22766 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
22767
22768 * search.c (get_base_distance_recursive): Fix access checks for
22769 protected bases.
22770
22771 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22772
22773 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22774 cp-tree.h.
22775 (convert_harshness): Add prototypes wrapped by PROTO.
22776 * decl2.c (grok_function_init): Likewise.
22777 (do_toplevel_using_decl): Change to void return type.
22778 * class.c (build_vtable_entry): Remove decl of make_thunk.
22779 (merge_overrides): Fix order of arg definitions.
22780 (finish_vtbls): Likewise.
22781 (fixup_vtable_deltas): Likewise.
22782 (modify_all_direct_vtables): Likewise.
22783 (modify_all_indirect_vtables): Likewise.
22784 * search.c (get_base_distance_recursive): Likewise.
22785 (get_abstract_virtuals_1): Likewise.
22786 (fixup_virtual_upcast_offsets): Likewise.
22787 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22788 * init.c (perform_member_init): Fix order of arg definitions.
22789 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22790 * cp-tree.h (make_thunk): Add decl.
22791 (overload_template_name, push_template_decl): Add decls.
22792 (do_toplevel_using_decl): Change to void return type.
22793 (vec_binfo_member): Add decl.
22794
22795 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22796
22797 * typeck.c (mark_addressable, convert_for_assignment,
22798 convert_for_initialization, pointer_int_sum, pointer_diff,
22799 unary_complex_lvalue): Add prototypes wrapped by PROTO.
22800 (convert_sequence): #if 0 fn decl, since definition also is.
22801
22802 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
22803
22804 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22805 cast to pointer types for type searching.
22806
22807 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22808
22809 * typeck.c (get_delta_difference): Use cp_error, not error, in the
22810 case where BINFO == 0.
22811
22812 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
22813
22814 * call.c (build_method_call): Fix wording of error messages so
22815 constructors come out right.
22816
22817 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
22818
22819 * decl.c (push_overloaded_decl): Don't warn about hidden
22820 constructors when both the type and the function are declared
22821 in a system header file.
22822
22823 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
22824
22825 * class.c (finish_struct_1): Propagate the TYPE_PACKED
22826 flag for the type to the type's fields.
22827
22828 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22829
22830 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22831
22832 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
22833
22834 * class.c (base_info, finish_base_struct): Replace
22835 needs_virtual_dtor with base_has_virtual.
22836
22837 (finish_struct_1): Remove the old code that tried to make default
22838 destructors virtual. Use base_has_virtual when checking if we need
22839 to add a vtable entry for the rtti code.
22840
22841 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22842
22843 * pt.c (push_template_decl): Complain about template decl with
22844 inappropriate declaration.
22845
22846 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
22847
22848 * typeck.c (build_x_unary_op): Remove bogus check for taking
22849 the address of a member function.
22850
22851 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22852
22853 * parse.y (constructor_declarator): Only push the class if
22854 we are not already in the class.
22855
22856 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
22857
22858 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22859 Add additional argument to INIT_CUMULATIVE_ARGS.
22860
22861 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22862
22863 * decl.c (shadow_tag): Fix error about anon union with methods.
22864
22865 * parse.y (self_reference): Only generate a self-reference if this
22866 is a non-template class.
22867 (opt.component_decl_list): Only use it if it was generated.
22868
22869 * parse.y (component_decl_1): Use constructor_declarator.
22870 (fn.def2): Likewise.
22871 (notype_component_declarator0): Likewise.
22872
22873 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
22874
22875 * typeck.c (build_x_unary_op): Add checks for taking the address
22876 of a TARGET_EXPR or of a member function, and give appropriate
22877 warnings.
22878
22879 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22880
22881 * pt.c (process_template_parm): Allow template type parms to be
22882 used as types for template const parms.
22883
22884 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
22885
22886 * init.c (expand_vec_init): Ensure the eh cleanups are on the
22887 function_obstack.
22888
22889 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22890
22891 * decl.c (lookup_name_real): Be even more picky about the
22892 ambiguous lookup warning.
22893 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22894 * parse.y (constructor_declarator): Rather than here.
22895
22896 * parse.y (constructor_declarator): New nonterminal.
22897 (fn.def1): Use it.
22898 (explicit_instantiation): Likewise.
22899
22900 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22901
22902 Add implicit declaration of class name at class scope.
22903 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22904 * parse.y (self_reference): New nonterminal.
22905 (opt.component_decl_list): Use it.
22906 (fn.def1): Add nested_name_specifier type_name cases.
22907 * class.c (build_self_reference): New function.
22908 (finish_struct): Handle access_default later, move self-reference
22909 decl to the end.
22910 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22911 * cp-tree.h: Adjust.
22912
22913 * pt.c (do_function_instantiation): Separate handling of member
22914 functions and non-member functions properly.
22915
22916 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22917
22918 * pt.c (process_template_parm): Improve error for 'volatile class K'.
22919
22920 * class.c (finish_struct_1): Check the right slot for destructors.
22921
22922 * decl.c (start_enum): Complain about enum templates.
22923
22924 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
22925
22926 * init.c (resolve_offset_ref): Offset pointers to member data by one.
22927 * typeck.c (unary_complex_lvalue): Likewise.
22928
22929 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
22930
22931 * typeck.c (c_expand_return): Check for a returned local
22932 array name, similar to the check for an ADDR_EXPR.
22933
22934 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22935
22936 * decl.c (cp_finish_decl): Don't build cleanups for static
22937 variables here.
22938
22939 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
22940
22941 * typeck.c (build_modify_expr): Fix error messages to be more
22942 accurate.
22943 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22944 assignment operators.
22945 * error.c (assop_as_string): Likewise. Add support for `%Q' for
22946 assignment operators.
22947
22948 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22949
22950 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
22951 give an error if initialized. pedwarn about nested type with the
22952 same name as its enclosing class.
22953
22954 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22955
22956 * typeck.c (require_complete_type): Be sure to instantiate the
22957 MAIN_VARIANT of the type.
22958
22959 * decl2.c (finish_file): Instantiate pending templates before
22960 processing static constructors and destructors.
22961
22962 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22963 unless at_eof.
22964
22965 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
22966
22967 * decl2.c (delete_sanity): If error_mark_node is passed
22968 in as an expression, quit while we're ahead.
22969
22970 * decl.c (grokdeclarator): Give an error message if `friend'
22971 is combined with any storage class specifiers.
22972
22973 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
22974
22975 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22976 definition of nonexistent nested type.
22977
22978 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22979 not to say 'typedef'.
22980
22981 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22982
22983 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22984 * search.c (dfs_walk, dfs_init_vbase_pointers,
22985 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22986 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22987
22988 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22989
22990 * except.c (build_throw): Support minimal parse.
22991 * pt.c (tsubst_copy): Support THROW_EXPR.
22992 * decl2.c (build_expr_from_tree): Likewise.
22993
22994 * pt.c (mangle_class_name_for_template): Always allocate
22995 scratch_firstobj.
22996
22997 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
22998
22999 * cvt.c (cp_convert_to_pointer): Give an appropriate error
23000 when trying to cast from an incomplete type.
23001
23002 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23003
23004 * pt.c (instantiate_class_template): Don't bother setting up
23005 CLASSTYPE_TAGS explicitly, as the nested types will add
23006 themselves.
23007
23008 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
23009
23010 * decl.c (shadow_tag): Remove old error check for usage of
23011 an enum without a previous declaration.
23012 (xref_tag): Add error message about usage of enums without a
23013 previous declaration.
23014
23015 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23016
23017 * lex.c (do_identifier): Only do name consistency check if we're
23018 parsing.
23019
23020 * pt.c (push_template_decl): Don't crash if we get a member defn
23021 that doesn't match.
23022
23023 * decl.c (xref_tag_from_type): New function to do an xref without
23024 always having to figure out code_type_node.
23025 * cp-tree.h: Declare it.
23026 * pt.c (instantiate_class_template): Use it for friend classes.
23027 (lookup_template_class): Use it.
23028
23029 * typeck2.c (build_functional_cast): Pull out a single parm before
23030 passing it to build_c_cast.
23031
23032 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
23033
23034 * expr.c (do_case): Give an error message if a pointer is
23035 given as a case value.
23036
23037 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23038
23039 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23040 an overload list.
23041
23042 * lex.c (cons_up_default_function): Really, now, interface hackery
23043 does not apply to synthesized methods.
23044
23045 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
23046
23047 * call.c (build_method_call): Ctors and dtors now have special names
23048 with respect to lookups.
23049 * class.c (add_method): Likewise.
23050 (grow_method): Likewise.
23051 (finish_struct_methods): Likewise.
23052 (warn_hidden): Likewise.
23053 (finish_struct_1): Likewise.
23054 * cvt.c (convert_to_reference): Likewise.
23055 (convert_to_aggr): Likewise.
23056 (cp_convert): Likewise.
23057 * decl2.c (check_classfn): Likewise.
23058 * init.c (expand_member_init): Likewise.
23059 (expand_default_init): Likewise.
23060 (expand_aggr_init_1): Likewise.
23061 (build_offset_ref): Likewise.
23062 (build_new): Likewise.
23063 (build_delete): Likewise.
23064 * lex.c (do_inline_function_hair): Likewise.
23065 * search.c (lookup_field_1): Likewise.
23066 (lookup_fnfields_here): Likewise.
23067 (lookup_field): Likewise.
23068 (lookup_fnfields): Likewise.
23069 (get_virtual_destructor): Likewise.
23070 (dfs_debug_mark): Likewise.
23071 (dfs_pushdecls): Likewise.
23072 (dfs_compress_decls): Likewise.
23073 * tree.c (layout_basetypes): Likewise.
23074 * typeck.c (build_component_ref): Likewise.
23075 (build_x_function_call): Likewise.
23076 (build_modify_expr): Likewise.
23077 (convert_for_initialization): Likewise.
23078 (build_functional_cast): Likewise.
23079 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23080 (CTOR_NAME): New.
23081 (DTOR_NAME): New.
23082 * decl.c (ctor_identifier): New.
23083 (dtor_identifier): New.
23084 (init_decl_processing): Set them.
23085
23086 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
23087
23088 * typeck.c (build_component_ref): Don't get confused by fields whose
23089 context has no type name, like pointer to member functions.
23090
23091 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23092
23093 * decl.c (grokdeclarator): Handle typedef without declarator.
23094
23095 * pt.c (tsubst): Handle SCOPE_REF in declarator.
23096
23097 * parse.y (bad_parm): Catch another case of missing `typename'.
23098
23099 * lex.c (yyprint): Handle TYPE_DECLs.
23100
23101 * decl.c (start_function): Don't try to be clever.
23102
23103 * lex.c: Lose compiler_error_with_decl.
23104 * typeck2.c: Lose error_with_aggr_type.
23105 (incomplete_type_error): Use cp_* instead of old functions.
23106 (readonly_error): Likewise.
23107 * typeck.c (convert_arguments): Likewise.
23108 * search.c (lookup_nested_field): Likewise.
23109 * method.c (make_thunk): Likewise.
23110 * decl.c (grokparms): Likewise.
23111 * cp-tree.h: Update.
23112
23113 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23114 and value.
23115
23116 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
23117
23118 * method.c (build_opfncall): When deleting a pointer to an
23119 array, build a new pointer to the tree past any ARRAY_TYPE
23120 nodes.
23121
23122 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23123
23124 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23125
23126 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
23127
23128 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23129 and ! DECL_INLINE.
23130
23131 * decl.c (finish_function): Don't set nested based on
23132 hack_decl_function_context.
23133 * parse.y (function_try_block): Check for nested function.
23134 (pending_inlines): Likewise.
23135
23136 * decl2.c (build_expr_from_tree): If a unary op already has a
23137 type, just return it.
23138
23139 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23140
23141 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23142 (finish_file): Check the return value of walk_vtables.
23143 (finish_prevtable_vardecl): Return int.
23144 (finish_vtable_vardecl): Likewise.
23145 (prune_vtable_vardecl): Likewise.
23146 * lex.c (set_vardecl_interface_info): Likewise.
23147 * cp-tree.h: Adjust return types.
23148
23149 * class.c (delete_duplicate_fields_1): Don't complain about
23150 duplicate nested types if they're the same type.
23151 (finish_struct): Remove check for duplicate.
23152 * decl2.c (grokfield): Don't check for typedef of anonymous type.
23153
23154 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23155
23156 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23157
23158 * decl.c (grokdeclarator): Lose special handling of class-level
23159 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
23160 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23161
23162 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23163
23164 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23165
23166 * search.c (compute_access): Fix handling of anonymous union
23167 members.
23168 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23169 from anonymous unions to their members.
23170
23171 * typeck.c (build_x_function_call): For static member functions,
23172 hand off to build_member_call.
23173
23174 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23175
23176 * typeck.c (build_component_ref): Handle OFFSET_REFs.
23177
23178 * init.c (expand_vec_init): Fix init == 0 case.
23179
23180 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23181
23182 * init.c (build_new): pedwarn about init and array new.
23183 (expand_vec_init): Handle lists, use convert_for_initialization.
23184
23185 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23186 when converting to an aggregate type.
23187 * cvt.c (cp_convert): Pass it through.
23188
23189 * typeck.c (build_conditional_expr): Handle user-defined
23190 conversions to slightly different types.
23191
23192 * decl.c (grokdeclarator): Force an array type in a parm to be
23193 permanent.
23194
23195 * decl2.c (do_using_directive): Sorry.
23196 (do_namespace_alias): Likewise.
23197 * lex.c (real_yylex): Warn about using the `namespace' keyword.
23198
23199 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23200
23201 * parse.y (datadef): Move call to note_list_got_semicolon up.
23202
23203 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
23204
23205 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23206
23207 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
23208
23209 * decl.c (cp_finish_decl): The exception regions have to be
23210 nested, not overlapping. We start the exception region for a
23211 decl, after it has been fully built, and all temporaries for it
23212 have been cleaned up.
23213
23214 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
23215
23216 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23217
23218 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23219
23220 * tree.def: Add RETURN_INIT.
23221 * pt.c (instantiate_decl): Handle RETURN_INIT.
23222 * decl.c (store_return_init): Handle minimal_parse_mode.
23223
23224 * tree.c (cp_build_type_variant): Just return an error_mark_node.
23225 * decl.c (make_typename_type): Don't try to get the file and line
23226 of an identifier.
23227 * typeck.c (comptypes): Handle TYPENAME_TYPE.
23228
23229 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
23230
23231 * decl.c (poplevel): Make sure we clear out and restore old local
23232 non-VAR_DECL values by default when they go out of scope.
23233
23234 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23235
23236 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23237 referring to addresses of variables and functions.
23238
23239 * error.c (dump_expr): Support SIZEOF_EXPR.
23240
23241 * init.c (do_friend): Use the return value of check_classfn.
23242
23243 * typeck.c (convert_arguments): Call complete_type.
23244
23245 * method.c (hack_identifier): After giving an error, set value to
23246 error_mark_node.
23247
23248 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23249
23250 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23251 lossage for local classes.
23252 * cp-tree.h: Declare it.
23253 * decl.c (lookup_name_real): Evil, painful hack for local classes.
23254 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23255 Use hack_decl_function_context.
23256 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23257 (start_function): Use hack_decl_function_context.
23258 (finish_function): Likewise.
23259 * method.c (synthesize_method): Likewise.
23260 * lex.c (process_next_inline): Likewise.
23261 (do_pending_inlines): Likewise.
23262 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23263 done with it.
23264
23265 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
23266
23267 * sig.c (build_signature_pointer_or_reference_type): Align
23268 signature pointers/references on 8-byte boundaries so they can be
23269 grabbed 2 words at a time on a Sparc.
23270
23271 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
23272
23273 * method.c (hack_identifier): Requiring a static chain is now a
23274 hard error.
23275 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23276 functions.
23277
23278 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23279
23280 * init.c (build_offset_ref): Call complete_type.
23281
23282 * decl.c (pop_from_top_level): Always pop previous_class_type.
23283
23284 * parse.y: Handle multiple decls in a for-init-statement.
23285 * pt.c (tsubst_expr): Likewise.
23286
23287 * pt.c (tsubst): Use tsubst_expr for the second operand of an
23288 ARRAY_REF.
23289
23290 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23291 (poplevel_class): Set it here.
23292 (pop_from_top_level): Pop it here if we're returning to class scope.
23293 * class.c (pushclass): Don't set it here.
23294
23295 * decl.c (maybe_push_to_top_level): Save current_template_parms,
23296 and clear it if !pseudo.
23297 (pop_from_top_level): Restore it.
23298
23299 * decl2.c (finish_file): Push the dummy each time we walk the list
23300 of vtables.
23301
23302 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23303 something for CAST_EXPR.
23304
23305 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23306
23307 * cvt.c (cp_convert): Warn about implicit conversion of the
23308 address of a function to bool, as it is always true.
23309
23310 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23311
23312 * typeck.c (c_expand_return): Fix warning for local externs returned.
23313
23314 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
23315
23316 * tree.c (mapcar): Propagate const and volatile properly.
23317
23318 * typeck.c (complete_type): Be sure to instantiate the
23319 MAIN_VARIANT of the type.
23320
23321 * method.c (synthesize_method): Class interface hackery does not
23322 apply to synthesized methods.
23323
23324 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
23325
23326 * pt.c (comp_template_args): Use comptypes rather than just
23327 checking for TEMPLATE_TYPE_PARM equivalence.
23328
23329 * typeck.c (build_x_function_call): Call complete_type before
23330 checking TYPE_OVERLOADS_CALL_EXPR.
23331
23332 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
23333
23334 * g++.c (main): Check also for new define ALT_LIBM.
23335
23336 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23337
23338 * pt.c (instantiate_class_template): If we don't have a pattern
23339 yet, that's OK.
23340 (coerce_template_parms): If we see a local class, bail.
23341
23342 * decl.c (grok_reference_init): Make sure there's a type before
23343 checking its code.
23344
23345 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23346 (push_template_decl): Likewise.
23347
23348 * parse.y (named_class_head): Set
23349 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23350
23351 * decl.c (xref_tag): Diagnose redeclaration of template
23352 type-parameter name.
23353
23354 * error.c (dump_type): Handle anonymous template type parms.
23355
23356 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23357 TYPE_STUB_DECL.
23358 (coerce_template_parms): Likewise.
23359
23360 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
23361
23362 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23363 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23364
23365 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23366
23367 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23368 before trying to get its STUB_DECL.
23369 (coerce_template_parms): Likewise.
23370
23371 * parse.y (template_type_parm): If they didn't use 'class',
23372 pretend they did after giving an error.
23373
23374 * pt.c (coerce_template_parms): Diagnose use of local class.
23375
23376 * decl.c (grok_reference_init): Use instantiate_type.
23377
23378 * error.c (dump_expr): Handle TEMPLATE_DECLs.
23379
23380 * parse.y (named_class_head): Diagnose mismatching types and tags.
23381
23382 * decl.c (pushdecl): Type decls and class templates clash with
23383 artificial type decls, not hide them.
23384
23385 * decl.c (redeclaration_error_message): Diagnose redefinition of
23386 templates properly.
23387 (duplicate_decls): Diagnose disallowed overloads for template
23388 functions, too.
23389
23390 * decl.c (start_decl): Call complete_type before checking for a
23391 destructor.
23392
23393 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23394
23395 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23396
23397 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23398
23399 * decl.c (grok_op_properties): Don't check for operator++(int) in
23400 a template.
23401
23402 * tree.c (perm_manip): Return a copy of variable and function
23403 decls with external linkage.
23404
23405 * tree.def: Change some of the min tree codes to type "1".
23406 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23407 * method.c (build_overload_int): Emit something arbitrary for
23408 anything but an INTEGER_CST if we're in a template.
23409
23410 * decl.c (cp_finish_decl): Call complete_type before deciding
23411 whether or not to lay out the decl.
23412
23413 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23414
23415 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23416
23417 * typeck2.c (build_x_arrow): Call complete_type.
23418
23419 * pt.c (add_pending_template): Broken out.
23420 (lookup_template_class): If -fexternal-templates, call it for all
23421 the methods of implemented types.
23422 (instantiate_class_template): Instead of instantiating them here.
23423 (instantiate_decl): Handle -fexternal-templates earlier.
23424
23425 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23426
23427 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23428 memoized lookup stuff inside GATHER_STATISTICS.
23429
23430 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23431
23432 * decl.c (start_decl): Complain about array of incomplete type
23433 here.
23434 (grokdeclarator): Not here.
23435
23436 * parse.y (template_parm): Expand full_parm inline so we can set
23437 the rule's precedence.
23438
23439 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23440 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23441 * decl2.c (grokbitfield): Don't check for integer constant here.
23442 * class.c (finish_struct_1): Check here.
23443
23444 * decl.c (define_label): Make the min decl go on permanent_obstack.
23445
23446 * pt.c (unify): Don't handle CONST_DECLs.
23447 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23448 (tsubst_copy): Likewise.
23449
23450 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23451 CONST_DECL for a template parm.
23452
23453 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
23454
23455 * decl.c (grokdeclarator): Complain about array of incomplete type
23456 here.
23457 (start_decl_1): Not here.
23458
23459 * pt.c (tsubst): Handle pointer-to-function declarators.
23460
23461 * method.c (hack_identifier): If pedantic, diagnose local class
23462 methods that require a static chain.
23463
23464 * decl.c (grok_op_properties): No longer static.
23465 * cp-tree.h: Declare it.
23466 * pt.c (tsubst): Call it for operators.
23467 Use tsubst_copy for TREE_VECs.
23468
23469 * parse.y (template_arg): The expr has precedence like '>'.
23470
23471 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
23472
23473 * pt.c (coerce_template_parms): Don't coerce an expression using
23474 template parms.
23475 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23476 (tsubst): Don't use build_index_2_type if the max_value uses template
23477 parms.
23478 * method.c (build_overload_int): Emit something arbitrary for an
23479 expression using template parms.
23480
23481 * parse.y (template_close_bracket): New non-terminal to catch use
23482 of '>>' instead of '> >' in template class names.
23483 (template_type): Use it.
23484 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23485
23486 * tree.def: Add CAST_EXPR.
23487 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23488 CONVERT_EXPR for minimal_parse_mode.
23489 * typeck.c (build_c_cast): Likewise.
23490 * pt.c (tsubst_copy): Likewise.
23491 * decl2.c (build_expr_from_tree): Likewise.
23492 * error.c (dump_expr): Likewise.
23493
23494 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23495
23496 * except.c (SetTerminate, SetUnexpected): Put back global vars.
23497 (init_exception_processing): Put back decl/init of
23498 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23499 fns from libstdc++.
23500
23501 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23502 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23503 Delete unused fns.
23504 * cp-tree.h (declare_uninstantiated_type_level,
23505 uninstantiated_type_level_p): Delete prototypes.
23506
23507 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23508
23509 * pt.c (tsubst_expr): Add default return.
23510
23511 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23512
23513 * error.c (fndecl_as_string): Delete unused arg CNAME.
23514 * sig.c (build_signature_table_constructor,
23515 build_signature_method_call): Fix calls.
23516
23517 * class.c (the_null_vtable_entry): Delete var definition.
23518 (init_class_processing): Delete tree the_null_vtable_entry init.
23519 * decl.c (no_print_{functions, builtins}): Declare as static.
23520 (__tp_desc_type_node): #if 0 var definition.
23521 (init_type_desc): #if 0 init of __tp_desc_type_node.
23522 (vb_off_identifier): Move var decl into init_decl_processing.
23523 (current_function_assigns_this): Declare as static.
23524 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23525 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23526 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23527 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23528 * init.c (BI_header_type, BI_header_size): Declare as static.
23529 * pt.c (template_classes): Delete unused var.
23530 (add_pending_template): Delete decl for non-existent fn.
23531 (lookup_template_class): Delete vars CODE and TAG_CODE.
23532 (instantiate_template): Delete unused var TARGS.
23533 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23534 Delete decls.
23535 (__tp_desc_type_node): #if 0 var decl.
23536 (fndecl_as_string): Fix prototype.
23537
23538 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23539
23540 * tree.def: Add GOTO_STMT.
23541 * pt.c (tsubst_expr): Support goto and labels.
23542 * decl.c (define_label): Support minimal parsing.
23543 * parse.y (simple_stmt): Likewise.
23544
23545 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23546
23547 * xref.c (GNU_xref_member): Only define/set var I if
23548 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23549 used.
23550 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23551 (GNU_xref_end): Fix call.
23552 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23553 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23554
23555 * tree.c (build_exception_variant): Delete unused vars I, A, T,
23556 T2, and CNAME.
23557 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23558 (mapcar): Delete unused var CODE.
23559 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23560 (break_out_cleanups): Fix call.
23561 (bot_manip): Likewise.
23562 * call.c (build_method_call): Likewise.
23563 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23564 Likewise.
23565 * typeck.c (unary_complex_lvalue, build_modify_expr,
23566 convert_for_initialization): Likewise.
23567 * typeck2.c (build_functional_cast): Likewise.
23568 * cp-tree.h (build_cplus_new): Fix prototype.
23569
23570 * repo.c (open_repo_file): Delete unused var Q.
23571 (repo_compile_flags, repo_template_declared,
23572 repo_template_defined, repo_class_defined, repo_inline_used,
23573 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
23574 (repo_get_id, repo_vtable_used): Declare as static.
23575 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
23576 prototypes.
23577
23578 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23579
23580 * parse.y (pending_inlines): Add function_try_block case.
23581
23582 * pt.c (unify): Fix for template const parms.
23583
23584 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23585
23586 * lex.c (extract_interface_info): Delete forward decl.
23587 (default_copy_constructor_body, default_assign_ref_body): Delete
23588 decls for non-existent functions.
23589 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
23590 (init_lex): Delete setting them.
23591 (cons_up_default_function): Delete unused vars FUNC_BUF,
23592 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
23593 #if 0'd synth code.
23594 (toplevel, expression_obstack): Delete unused extern decls.
23595 (tree_node_kind): Delete unused enum.
23596 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
23597 GATHER_STATISTICS.
23598 (tree_node_kind_names): Delete unused extern decl.
23599 (synth_obstack): Delete unused var.
23600 (init_lex): Don't set it.
23601 (init_parse): Add decl before use.
23602 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
23603 (current_unit_{name, language}): Delete unused vars.
23604 (check_newline): Don't bother setting them, just accept the #pragma.
23605 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
23606 (current_unit_{name, language}): Delete decls.
23607
23608 * search.c: Wrap all of the memoized functions, macros, and
23609 variables inside #ifdef GATHER_STATISTICS.
23610 (lookup_field, lookup_fnfields): Likewise.
23611 (init_search_processing): Likewise.
23612 (reinit_search_statistics): Wrap whole function.
23613 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
23614
23615 * decl.c (finish_function): Only call pop_memoized_context if
23616 GATHER_STATISTICS is defined.
23617 (start_function): Likewise for push_memoized_context.
23618 * class.c (pushclass, popclass): Likewise.
23619
23620 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
23621 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
23622
23623 * cvt.c (cp_convert): Delete unused local var FORM.
23624 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
23625 prototypes.
23626
23627 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23628
23629 * pt.c (do_poplevel): Oops; really return what we get from
23630 poplevel this time.
23631
23632 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23633
23634 * cp-tree.h (is_aggr_type): Add prototype.
23635
23636 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23637 * method.c ({push,pop}_cp_function_context): Delete decls.
23638 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23639 (SetUnexpected, SetTerminate): Delete unused vars.
23640 (init_exception_processing): Don't set SetUnexpected or
23641 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23642 (output_exception_table_entry): Delete unused array LABEL.
23643 (expand_internal_throw): Delete unused var PARAMS.
23644 (expand_start_catch_block): Delete unused var CLEANUP.
23645 (emit_exception_table): Delete unused var EH_NODE_DECL.
23646 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23647 GOTO_UNWIND_AND_THROW. Don't set them.
23648 (end_eh_unwinder): Add top decl.
23649 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23650 (exception_section, push_rtl_perm, do_function_call,
23651 lang_interim_eh, push_eh_cleanup, eh_outer_context,
23652 expand_end_eh_spec, end_eh_unwinder): Declare as static.
23653 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23654 throw_used): Likewise.
23655 * cp-tree.h (expand_end_eh_spec): Delete prototype.
23656
23657 * search.c (dfs_mark, dfs_mark_vtable_path,
23658 dfs_unmark_vtable_path, dfs_mark_new_vtable,
23659 dfs_unmark_new_vtable, dfs_clear_search_slot,
23660 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23661 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23662 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23663 functions.
23664 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23665 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23666 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23667 Only define #ifdef GATHER_STATISTICS.
23668 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23669 is defined.
23670 (vbase_decl): Delete var definition.
23671 (init_search): Delete old decl.
23672 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23673 never actually used.
23674 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23675 (get_base_distance_recursive): Delete unused fourth arg
23676 BASETYPE_PATH. Fix call .
23677 (get_base_distance): Fix call.
23678 (push_class_decls): Delete unused var ID.
23679 (make_memoized_table_entry): Declare as static.
23680 (breadth_first_search): Declare as static.
23681 (tree_has_any_destructor_p): Declare as static.
23682 (pop_class_decls): Delete unused arg pop_class_decls.
23683 * class.c (popclass): Fix call to pop_class_decls.
23684 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23685 tree_has_any_destructor_p): Delete prototypes.
23686
23687 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23688 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
23689 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23690 (build_user_desc): Delete unused var T.
23691 (build_class_desc): Delete unused vars T and OFF.
23692 (build_t_desc): Delete unused var NAME_STRING.
23693 (build_headof): Make static.
23694 (get_bad_cast_node): Likewise.
23695 (get_def_to_follow): Likewise.
23696 * cp-tree.h (init_type_desc): Add prototype.
23697 (build_headof): Remove prototype.
23698
23699 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23700
23701 * pt.c (tsubst): Only look for matching decls at file scope for
23702 non-member functions.
23703
23704 * call.c (build_scoped_method_call): Handle scoped destructor
23705 calls in templates.
23706
23707 * decl.c (*_top_level): Also save previous_class_values.
23708
23709 * pt.c (tsubst_expr): Support do {} while loops.
23710 * parse.y (simple_stmt): Likewise.
23711 * tree.def: Likewise.
23712
23713 * method.c (build_overload_identifier): For a class nested in a
23714 template class, don't mangle in the template parms from our
23715 context.
23716
23717 * lex.c, cp-tree.h: Remove support for template instantiations in
23718 the pending_inlines code.
23719 * pt.c: Remove dead functions and unused arguments.
23720 (uses_template_parms): TYPENAME_TYPEs always use template parms.
23721 * parse.y: Stop passing anything to end_template_decl.
23722 * tree.c (print_lang_statistics): Only print tinst info #ifdef
23723 GATHER_STATISTICS.
23724
23725 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23726
23727 * init.c (expand_recursive_init{,_1}): Delete decls.
23728 (sort_member_init): Delete unused var INIT.
23729 (emit_base_init): Delete unused var X.
23730 (build_offset_ref): Delete unused var CNAME.
23731 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23732 (emit_base_init): Delete unused local var BASE. Delete extern
23733 decl of IN_CHARGE_IDENTIFIER.
23734 (build_delete): Delete unused local var VIRTUAL_SIZE.
23735
23736 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23737 (build_delete): Fix call.
23738 * decl2.c (delete_sanity): Likewise.
23739 * cp-tree.h (build_vec_delete): Update prototype.
23740
23741 * typeck.c (common_base_type): Delete unused var TMP.
23742 (build_binary_op): Delete local var ARGS_SAVE.
23743 (build_array_ref): Delete unused var ITYPE.
23744 (c_expand_return): Delete unused var USE_TEMP.
23745
23746 * typeck.c (compexcepttypes): Delete unused arg STRICT.
23747 (comptypes): Fix calls.
23748 * decl.c (duplicate_decls): Likewise.
23749 * cp-tree.h (compexcepttypes): Delete extra arg.
23750
23751 * decl2.c (check_classfn): Delete unused second arg CNAME.
23752 * decl.c (start_decl, grokfndecl): Fix calls.
23753 * init.c (do_friend): Likewise.
23754 * cp-tree.h (check_classfn): Update prototype.
23755
23756 * cp-tree.h (signature_error, import_export_vtable,
23757 append_signature_fields, id_in_current_class, mark_used,
23758 copy_assignment_arg_p): Add decls.
23759 * decl2.c (mark_used): Delete decl.
23760
23761 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23762
23763 * class.c (get_vtable_entry): Disable unused function.
23764 (doing_hard_virtuals): Delete unused static global var.
23765 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23766 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23767 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23768 (modify_one_vtable): Delete unused var OLD_RTTI.
23769 (finish_struct_anon): Delete unused vars OFFSET and X.
23770 (finish_struct_bits): Delete unused var METHOD_VEC.
23771 (get_basefndecls): Delete unused var PURPOSE. Delete unused
23772 for-scope local variable METHODS.
23773
23774 * call.c (user_harshness): Delete unused/unneeded arg PARM.
23775 (ideal_candidate): Delete unused args BASETYPE and PARMS.
23776 (build_method_call): Delete unused args passed into ideal_candidate.
23777 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
23778 * cp-tree.h (synthesize_method): Add decl.
23779
23780 * decl.c (note_level_for_for): Give void return type.
23781 (pushdecl_nonclass_level): Likewise.
23782 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23783 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23784 (suspend_binding_level): Delete unused var LEVEL.
23785 (duplicate_decls): Delete unused var CTYPE.
23786 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23787 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23788 PTR_ENDLINK.
23789 (grokdeclarator): Delete unused var C.
23790 (grokdeclarator): Delete unused var SIZE_VARIES.
23791 (grokparms): Delete unused var SAW_VOID.
23792 (start_function): Delete unused var OLDDECL.
23793 (cplus_expand_expr_stmt): Delete unused var
23794 REMOVE_IMPLICIT_IMMEDIATELY.
23795
23796 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23797
23798 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23799
23800 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
23801
23802 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23803 (build_min_nt): Likewise.
23804 * pt.c (do_pushlevel): Emit line note.
23805 (do_poplevel): Return what we get from poplevel.
23806 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23807 * parse.y: Use do_pushlevel and do_poplevel.
23808 * cp-tree.h: Declare do_poplevel.
23809
23810 * cp-tree.h: Declare at_eof.
23811 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23812 * decl2.c (import_export_decl): Renamed from import_export_inline.
23813 (finish_file): Call it to do interface handling for statics.
23814 * pt.c (tsubst_copy): Call mark_used on variables and functions
23815 used here.
23816
23817 * decl2.c (finish_file): Don't emit statics we can't generate.
23818 * pt.c (instantiate_decl): Don't set interface on instantiations
23819 we can't generate.
23820
23821 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23822 * tree.c (print_lang_statistics): Print max template depth.
23823 * pt.c (push_tinst_level): Dump entire instantiation context.
23824 (instantiate_class_template): Use it and pop_tinst_level.
23825 (instantiate_decl): Likewise.
23826
23827 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23828 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23829
23830 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
23831
23832 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23833 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23834 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23835 the new template implementation.
23836
23837 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23838
23839 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23840
23841 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
23842
23843 * decl.c (cp_finish_decl): Delay emitting the debug information for
23844 a typedef that has been installed as the canonical typedef, if the
23845 type has not yet been defined.
23846
23847 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23848
23849 * decl2.c (grokfield): Still call pop_nested_class for access decls.
23850
23851 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23852
23853 * decl.c (lookup_label): Call label_rtx.
23854
23855 * decl.c (make_binding_level): New function.
23856 (pushlevel, pushlevel_class): Call it instead of explicit
23857 duplicate calls to xmalloc.
23858
23859 * decl.c (init_decl_processing): Delete useless build_pointer_type
23860 call.
23861
23862 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23863 (sizet_ftype_string): Delete variable.
23864 (init_decl_processing): Add built-in functions fabsf, fabsl,
23865 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
23866 variable strlen_ftype, used for strlen.
23867
23868 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23869
23870 * decl.c (push_to_top_level): Start from current_binding_level
23871 again for now; the stl hacks depend on g++ being broken in this
23872 way, and it'll be fixed in the template rewrite.
23873
23874 * tree.def: Add USING_DECL.
23875 * decl2.c (do_class_using_decl): Implement.
23876 (grokfield): Pass access decls off to do_class_using_decl instead of
23877 grokdeclarator.
23878 * error.c (dump_decl): Handle USING_DECLs.
23879 * decl.c (grokdeclarator): Remove code for handling access decls.
23880 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23881 as access decls for now.
23882 (finish_struct): Don't check USING_DECLs for other uses of the name.
23883
23884 * search.c (get_matching_virtual): Use cp_error_at.
23885
23886 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23887
23888 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23889 match c-typeck.c.
23890 (self_promoting_args_p): Move the check that TYPE is non-nil
23891 before trying to look at its main variant.
23892 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23893
23894 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23895 Delete macros.
23896 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23897 (do_friend): Delete call to xref_friend.
23898 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23899
23900 * typeck.c (convert_sequence): #if 0 unused function.
23901
23902 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23903 be in decl_in_memory_p.
23904 (decl_in_memory_p): Delete decl.
23905 * expr.c (decl_in_memory_p): Delete fn.
23906 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23907
23908 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23909
23910 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23911
23912 * class.c (finish_struct_1): Check for a pure-specifier on a
23913 non-virtual function here.
23914
23915 * decl2.c (grok_function_init): Don't check whether the function
23916 is virtual here.
23917 (grokfield): Don't call check_for_override here.
23918
23919 * decl.c (push_to_top_level): Start from inner_binding_level,
23920 check class_shadowed in class levels.
23921
23922 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
23923
23924 * decl.c (resume_level): Ignore things that don't have names, instead
23925 of core dumping.
23926
23927 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23928
23929 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23930
23931 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
23932
23933 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23934 synthesized dtor.
23935
23936 * parse.y (complete_type_name): Bind global_scope earlier.
23937 (complex_type_name): Likewise.
23938 (qualified_type_name): Remove.
23939
23940 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23941
23942 * decl.c (grokfndecl): Move code that looks for virtuals in base
23943 classes...
23944 * class.c (check_for_override): ... to a new function.
23945 (finish_struct_1): Call it.
23946
23947 * cp-tree.h: Declare warn_sign_compare.
23948
23949 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23950 rather than extra_warnings to decide whether to warn about
23951 comparison of signed and unsigned.
23952
23953 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
23954 implies -Wsign-compare. -Wall doesn't imply -W.
23955
23956 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
23957
23958 * typeck.c (build_component_ref): Fix to handle anon unions in base
23959 classes as well.
23960
23961 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23962
23963 * class.c (resolves_to_fixed_type_p): Delete code dealing with
23964 a WITH_CLEANUP_EXPR, since we don't generate them any more.
23965 * cvt.c (build_up_reference): Likewise.
23966 * decl.c (grok_reference_init): Likewise.
23967 (cp_finish_decl): Likewise.
23968 * error.c (dump_expr): Likewise.
23969 * tree.c (real_lvalue_p): Likewise.
23970 (lvalue_p): Likewise.
23971 (build_cplus_new): Likewise.
23972 (unsave_expr_now): Likewise.
23973 * typeck.c (unary_complex_lvalue, build_modify_expr,
23974 c_expand_return): Likewise.
23975
23976 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23977
23978 Make the C++ front-end pay attention to attributes for structures.
23979 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23980 finish_struct_1.
23981 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23982 Take out old round_up_size use and setting the DECL_ALIGN possibly
23983 using it. Take out setting of TYPE_ALIGN to round_up_size, which
23984 can override what the attribute set.
23985 * cp-tree.h (finish_struct): Update prototype.
23986 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23987 attributes to finish_struct.
23988 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23989 value down into finish_struct.
23990 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23991
23992 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
23993
23994 * decl.c (poplevel): Re-word dead for local handling.
23995 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
23996 (cp_finish_decl): If is_for_scope, check for duplicates so
23997 we can disable is_for_scope. Otherwise, preserve_temp_slots.
23998
23999 * lex.c (do_identifier): Use global binding in preference of
24000 dead for local variable.
24001
24002 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
24003
24004 * init.c (initializing_context): Handle anon union changes, the
24005 context where fields of anon unions can be initialized now has to be
24006 found by walking up the TYPE_CONTEXT chain.
24007
24008 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
24009
24010 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24011 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24012 (obscure_complex_init): If bss is supported, always set
24013 DECL_INITIAL to error_mark_node.
24014
24015 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24016
24017 * init.c (is_friend): Make sure there's a context before we see if
24018 it's an aggr type.
24019
24020 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
24021
24022 * init.c (is_friend): Classes are not friendly with nested classes.
24023
24024 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
24025
24026 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24027 and record its result.
24028
24029 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
24030
24031 * class.c (finish_struct_anon): Switch around code to not move anon
24032 union elements around, nor mess up their contexts, nor offsets,
24033 instead we now build up the right number of COMPONENT_REFs for all
24034 the anon unions that may be present at build_component_ref time.
24035 * typeck.c (lookup_anon_field): New routine to handle field lookup
24036 on fields without names. We find them, based upon their unique type
24037 instead.
24038 * typeck.c (build_component_ref): Allow FIELD_DECL components.
24039 Handle finding components in anonymous unions, and ensure that a
24040 COMPONENT_REF is built for each level as necessary.
24041
24042 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
24043
24044 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24045 code that ensures that copy ctors are used if appropriate.
24046
24047 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24048
24049 * init.c (build_vec_delete): Only give an error if base isn't an
24050 error_mark_node.
24051
24052 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
24053
24054 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24055 (yylex): If we see `new', keep slurping.
24056
24057 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
24058
24059 * class.c (finish_struct_1): Move code for handling anon unions...
24060 (finish_struct_anon): to here. Fixup so that we do the offset
24061 calculations right, and so that the fields are physically moved to
24062 the containers's chain.
24063
24064 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24065
24066 * decl.c (grokdeclarator): Avoid trying to get an operand off an
24067 identifier node.
24068
24069 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
24070
24071 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24072 POINTER_SIZE to agree with expr.c.
24073
24074 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
24075
24076 * search.c (lookup_field): Don't report ambiguities if protect is 0,
24077 instead return NULL_TREE.
24078
24079 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
24080
24081 * class.c (finish_struct_1): Call warn_hidden if we want warnings
24082 about overloaded virtual functions.
24083 (warn_hidden): New routine to warn of virtual functions that are
24084 hidden by other virtual functions, that are not overridden.
24085 (get_basefndecls): New routine, used by warn_hidden.
24086 (mark_overriders): New routine, used by warn_hidden.
24087 * search.c (get_matching_virtual): Remove old warning that just
24088 isn't very useful.
24089
24090 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24091
24092 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24093
24094 * typeck.c (null_ptr_cst_p): Delete unused fn.
24095 (build_function_call_maybe): Delete unused fn.
24096
24097 * expr.c (extract_init): #if 0 the code after unconditional return 0
24098 for now.
24099
24100 Delete old cadillac code.
24101 * edsel.c: Remove file.
24102 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24103 * Makefile.in (CXX_OBJS): Delete edsel.o.
24104 (edsel.o): Delete rule.
24105 * cp-tree.h (flag_cadillac): Delete var decl.
24106 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24107 * decl2.c (flag_cadillac): Delete var definition.
24108 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24109 (grokfield): Delete code depending on flag_cadillac.
24110 (finish_anon_union): Likewise.
24111 * class.c (finish_struct_1): Likewise.
24112 (pushclass): Likewise.
24113 (popclass): Likewise.
24114 (push_lang_context): Likewise.
24115 (pop_lang_context): Likewise.
24116 * decl.c (init_decl_processing): Likewise.
24117 (start_decl): Likewise.
24118 (cp_finish_decl): Likewise.
24119 (xref_tag): Likewise.
24120 (finish_enum): Likewise.
24121 (start_function): Likewise.
24122 (finish_function): Likewise.
24123 (finish_stmt): Likewise.
24124 * lex.c (lang_init): Likewise.
24125 (check_newline): Likewise.
24126
24127 * lex.c (do_pending_inlines): Delete synthesized method kludge.
24128
24129 Delete defunct, ancient garbage collection implementation.
24130 * rtti.c: New file with the RTTI stuff from gc.c.
24131 * gc.c: Removed file (moved the remaining stuff into rtti.c).
24132 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24133 (rtti.o): New rule, replacing gc.o.
24134 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24135 * cp-tree.h: Delete gc-related fn decls.
24136 (DECL_GC_OFFSET): Delete macro.
24137 (flag_gc): Delete extern decl.
24138 * decl.c (current_function_obstack_index): Delete var decl.
24139 (current_function_obstack_usage): Delete var decl.
24140 (start_function): Delete clearing of current_function_obstack_index
24141 and current_function_obstack_usage.
24142 (init_decl_processing): Delete code relying on -fgc.
24143 Delete call to init_gc_processing.
24144 (cp_finish_decl): Delete calls to build_static_gc_entry and
24145 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
24146 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24147 and to expand_expr of a __gc_main call.
24148 (maybe_gc_cleanup): Delete var decl.
24149 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24150 * decl2.c (flag_gc): Delete var decl.
24151 (lang_f_options): Delete offering of -fgc.
24152 (lang_decode_option): Delete -fgc and -fno-gc handling.
24153 (get_temp_regvar): Delete gc code.
24154 * init.c (build_new): Delete gc code.
24155 * lex.c (init_lex): Delete checking of flag_gc.
24156
24157 * typeck.c (convert_arguments): Delete gc code.
24158 (build_component_addr): Delete -fgc warning.
24159 (build_modify_expr): Delete gc code.
24160
24161 * decl2.c (build_push_scope): Delete fn.
24162 * cp-tree.h (build_push_scope): Delete decl.
24163
24164 * search.c (clear_search_slots): Delete fn.
24165 * cp-tree.h (clear_search_slots): Delete decl.
24166
24167 * search.c (tree_needs_constructor_p): Delete fn.
24168 * cp-tree.h (tree_needs_constructor_p): Delete decl.
24169
24170 * tree.c (id_cmp): Delete fn.
24171
24172 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24173 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24174
24175 * tree.c (decl_value_member): Delete fn.
24176 * cp-tree.h (decl_value_member): Delete decl.
24177
24178 * tree.c (list_hash_lookup_or_cons): Delete fn.
24179 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24180
24181 * method.c (cplus_exception_name): Delete fn.
24182 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24183
24184 * spew.c (shift_tokens): Delete fn.
24185
24186 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24187
24188 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24189 to cp_finish_decl.
24190 * parse.y: Likewise.
24191
24192 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24193
24194 * tree.c (build_cplus_staticfn_type): Delete function definition;
24195 never used.
24196 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24197
24198 * tree.c (virtual_member): Delete function definition; never used.
24199 * cp-tree.h (virtual_member): Delete decl.
24200
24201 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
24202
24203 * typeck.c (build_component_ref): Handle getting vbase pointers
24204 out of complex multiple inheritance better.
24205
24206 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
24207
24208 * typeck.c (build_object_ref): Make sure we use the real type, not
24209 any reference type.
24210
24211 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
24212
24213 * tree.c (build_exception_variant): Don't create new types if we
24214 don't have to, also build new types on the right obstack.
24215
24216 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24217
24218 * decl.c (store_bindings): Split out from push_to_top_level.
24219 (push_to_top_level): Call it for b->type_shadowed on class binding
24220 levels.
24221
24222 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
24223
24224 * search.c (expand_upcast_fixups): Fix so that offsets stored in
24225 vbase_offsets are always right. Fixes a problem where virtual base
24226 upcasting and downcasting could be wrong during conversions on this
24227 during virtual function dispatch at ctor/dtor time when dynamic
24228 vtable fixups for deltas are needed. This only sounds easier than
24229 it is. :-)
24230 (fixup_virtual_upcast_offsets): Change to reflect new calling
24231 convention for expand_upcast_fixups.
24232
24233 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24234
24235 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24236 check that it's usable as the bitfield width.
24237
24238 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24239
24240 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24241 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24242 only ever used for functions in it.
24243
24244 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24245
24246 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24247 (nested_type): Likewise.
24248 (nested_name_specifier): Use lastiddecl.
24249
24250 * decl.c (grokdeclarator): Adjust accordingly.
24251 * init.c (expand_member_init): Likewise.
24252 * parse.y (base_class): Likewise.
24253 * typeck2.c (build_functional_cast): Likewise.
24254
24255 * typeck2.c (build_functional_cast): Fill in name after we've
24256 checked for non-aggr type.
24257
24258 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
24259
24260 * decl2.c (warn_pointer_arith): Default to on.
24261
24262 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24263
24264 * lex.c (is_rid): New function.
24265 * decl.c (grokdeclarator): Diagnose reserved words used as
24266 declarator-ids.
24267
24268 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
24269
24270 * tree.c (get_decl_list): Don't lose cv-quals.
24271
24272 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24273 typespecs used as declarator-ids.
24274
24275 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
24276
24277 * decl.c (poplevel): When poping a level, don't give a warning for
24278 any subblocks that already exist.
24279
24280 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24281
24282 * typeck.c (build_object_ref): Finish what I started.
24283
24284 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24285
24286 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24287
24288 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24289 scope.
24290
24291 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24292
24293 * decl.c (xref_tag): Handle passing a type in directly.
24294
24295 * parse.y (qualified_type_name): Pull out the type.
24296 (nested_type): Likewise.
24297 Take types directly instead of as identifiers.
24298 * call.c (build_scoped_method_call): Take types directly instead of
24299 as identifiers.
24300 * decl.c (xref_basetypes): Likewise.
24301 * init.c (expand_member_init): Likewise.
24302 (build_member_call): Likewise.
24303 (build_offset_ref): Likewise.
24304 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24305 * method.c (do_build_assign_ref): Likewise.
24306 * decl.c (grokdeclarator): Handle a type appearing as the
24307 declarator-id for constructors.
24308 * method.c (do_build_copy_constructor): current_base_init_list now
24309 uses the types directly, not their names.
24310 * init.c (sort_base_init): Likewise.
24311 (expand_member_init): Likewise.
24312 * init.c (is_aggr_type): New function, like is_aggr_typedef.
24313
24314 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
24315
24316 * tree.c (layout_basetypes): Call build_lang_field_decl instead
24317 of build_lang_decl if first arg is a FIELD_DECL.
24318
24319 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24320
24321 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24322 non-empty.
24323 * except.c (expand_start_catch_block): Set TREE_USED to avoid
24324 warnings about the catch handler.
24325
24326 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
24327
24328 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24329 expand_target_expr.
24330
24331 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24332
24333 Fix access control to use trees rather than integers.
24334 * class.c (access_{default, public, protected, private,
24335 default_virtual, public_virtual, private_virtual}_node): Add
24336 definitions.
24337 (init_class_processing): Do creation of those nodes.
24338 * cp-tree.h (access_type): Delete enum decl.
24339 (access_{default, public, protected, private, default_virtual,
24340 public_virtual, private_virtual}_node): Add decls.
24341 (compute_access): Change return type.
24342 * search.c (compute_access): Have tree return type, instead of enum.
24343 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24344 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24345 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24346 * parse.y (VISSPEC): Make ttype rather than itype.
24347 (base_class_access_list): Likewise.
24348 * *.[cy]: Change all refs of `access_public' to `access_public_node',
24349 etc.
24350 * call.c (build_method_call): Make ACCESS be a tree.
24351 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24352 * cvt.c (convert_to_aggr): Likewise.
24353 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24354 Likewise.
24355 * method.c (hack_identifier): Likewise.
24356 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24357
24358 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
24359
24360 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24361 frontend, and make it more consistent with respect to
24362 warn_pointer_arith.
24363
24364 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
24365
24366 * decl.c (pushdecl): Check for duplicate parameter names.
24367
24368 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
24369
24370 * decl.c (expand_static_init): Call assemble_external for atexit.
24371
24372 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
24373
24374 * except.c (do_unwind): Remove some generated dead code.
24375 (eh_outer_context): New routine, factor out some common code from
24376 expand_builtin_throw and end_eh_unwinder. Add code to do return
24377 address masking for the PA.
24378 (expand_builtin_throw): Use eh_outer_context instead of open coding
24379 it here.
24380 (end_eh_unwinder): Likewise.
24381
24382 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
24383
24384 * except.c (expand_throw): Call assemble_external for __empty, if we
24385 use it.
24386
24387 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
24388
24389 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24390 NORMAL_RETURN_ADDR_OFFSET.
24391 (end_eh_unwinder): Likewise.
24392
24393 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
24394
24395 * gc.c (build_dynamic_cast): Make sure we don't cast away const
24396 when dealing with references, and make sure we handle dynamic
24397 casting to a cv qualified reference.
24398
24399 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
24400
24401 * except.c (struct eh_context): New structure top hold eh context
24402 information.
24403 (push_eh_context): New routine.
24404 (pop_eh_context): Likewise.
24405 * decl.c (push_cp_function_context): Use them.
24406 (pop_cp_function_context): Likewise.
24407
24408 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
24409
24410 * decl2.c (finish_file): Also prune uninteresting functions in the
24411 inline emission loop.
24412
24413 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
24414
24415 * sig.c (build_signature_table_constructor): Mark functions
24416 in the signature as referenced.
24417
24418 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
24419
24420 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24421 the inline emission stuff.
24422
24423 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
24424
24425 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24426 weak symbols.
24427 * lang-options.h: Add -f{no-,}weak.
24428 * decl.c (init_decl_processing): If the target does not support weak
24429 symbols, don't use them.
24430 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24431
24432 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24433
24434 * init.c (expand_member_init): warning for base init after members.
24435
24436 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
24437
24438 * cvt.c (build_expr_type_conversion): Don't convert to a reference
24439 type.
24440
24441 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
24442
24443 * method.c (report_type_mismatch): Improve wording for volatile
24444 mismatches.
24445
24446 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
24447
24448 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24449 expand_assignment, as the later doesn't handle things that have
24450 copy constructors well. The compiler would do bitwise copying,
24451 instead of ctor calling in some cases.
24452
24453 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
24454
24455 * g++.c (my_strerror): Return "cannot access" if errno is 0.
24456 (pfatal_with_name, perror_exec): Don't assume that
24457 the returned value from my_strerror contains no '%'s.
24458 (concat): Remove.
24459 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24460
24461 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
24462
24463 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24464 TYPE_METHODS/TREE_CHAIN mean what they used to.
24465 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24466 instead of TYPE_METHODS.
24467 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24468 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24469 * cp-tree.h (CLASSTYPE_METHODS): Lose.
24470 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24471 TYPE_METHODS.
24472 (struct lang_decl): Lose next_method field.
24473 (DECL_NEXT_METHOD): Lose.
24474 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24475 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24476 anymore.
24477 (finish_struct_methods): Don't mess with the TREE_CHAINs in
24478 fn_fields.
24479
24480 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24481 vector.
24482
24483 * call.c (build_method_call): Synthesize here even when not inlining.
24484 * typeck.c (build_function_call_real): Likewise.
24485
24486 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
24487
24488 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24489 == DBX_DEBUG, call dbxout_start_new_source_file and
24490 dbxout_resume_previous_source_file when appropriate.
24491
24492 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
24493
24494 * except.c (start_anon_func): Push to the top level.
24495 (end_anon_func): Pop from the top level.
24496
24497 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
24498
24499 * cp-tree.h (build_cleanup): New routine to build cleanups.
24500 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24501 call at ctor time and use atexit to run it later.
24502 * decl2.c (build_cleanup): New routine, taken from finish_file.
24503 (finish_file): Use build_cleanup instead, and don't put function
24504 local statics in global dtor list.
24505
24506 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
24507
24508 * except.c (expand_throw): Ensure that we have cleanups, if we try
24509 and expand cleanups.
24510
24511 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
24512
24513 * except.c (expand_throw): Add logic to manage dynamic cleanups for
24514 the EH object.
24515 (expand_end_catch_block): Use the magic of expand_goto, instead of
24516 emit_jump so that we get the cleanup for any catch clause parameter
24517 and the cleanup for the exception object. Update to reflect label
24518 changes.
24519 (push_eh_cleanup): New routine to register a cleanup for an
24520 exception object.
24521 (empty_fndecl): Used to default cleanup actions to
24522 nothing.
24523 (init_exception_processing): Setup empty_fndecl. Setup
24524 saved_cleanup.
24525 (expand_start_catch_block): Update to reflect label changes. Call
24526 push_eh_object to register the cleanup for the EH object.
24527 (start_anon_func): New routine to start building lambda expressions
24528 from trees.
24529 (end_anon_func): New routine to end them.
24530 (struct labelNode): Change so that we can use tree labels, or rtx
24531 labels.
24532 (saved_cleanup): Object to check for dynamic cleanups for the
24533 exception handling object.
24534 (push_label_entry): Change so that we can use tree labels, or rtx
24535 labels.
24536 (pop_label_entry): Likewise.
24537 (top_label_entry): Likewise.
24538 (expand_start_all_catch): Use tree label instead of rtx label, so
24539 that we can get the magic of expand_goto.
24540 (expand_end_all_catch): Update to reflect label changes.
24541
24542 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24543 use UNSAVE_EXPRs.
24544 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24545 building_cleanup logic, as we now use UNSAVE_EXPRs.
24546 * cp-tree.h (unsave_expr): Declare it.
24547 * decl.c (building_cleanup): Remove.
24548 (maybe_build_cleanup): Remove building_cleanup logic, and use
24549 UNSAVE_EXPR instead.
24550
24551 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
24552
24553 * gc.c (build_t_desc): Update error message to say <typeinfo>.
24554
24555 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24556
24557 * decl.c (pushdecl): Only warn about shadowing a local variable if
24558 warn_shadow is true.
24559
24560 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24561
24562 * typeck.c (build_binary_op_nodefault): Added warning about
24563 comparisons between different enum types with -Wall, unless
24564 -fenum-int-equiv set.
24565
24566 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
24567
24568 * class.c (finish_struct_1): Skip down to the inner type in
24569 multidimensional arrays. Ensures ctors will be made for types that
24570 need constructing.
24571
24572 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
24573
24574 * decl.c (last_dtor_insn): New to track the last compiler generated
24575 insn in a dtor.
24576 (store_parm_decls): Set it.
24577 (finish_function): Use it to see if the dtor is empty. Avoid doing
24578 vtable setup all the time, if we can.
24579 (struct cp_function): Add last_dtor_insn.
24580 (push_cp_function_context): Save it.
24581 (pop_cp_function_context): Restore it.
24582
24583 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
24584
24585 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
24586 warnings.
24587
24588 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
24589
24590 * typeck.c (expand_target_expr): Make sure targets get put into the
24591 current temp_slot_level, so that the free_temp_slots call will reuse
24592 them.
24593
24594 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
24595
24596 * class.c (finish_struct_1): Delay delta fixups for virtual bases
24597 until after we have done the hard virtuals, to avoid a bogus `every
24598 virtual function must have a unique final overrider' for virtual
24599 functions that are only overridden by hard virtuals.
24600
24601 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24602
24603 * pt.c (do_function_instantiation): Don't try to find a file-scope
24604 template for a member function.
24605
24606 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
24607
24608 * g++.c (main): Add handling of -nodefaultlibs.
24609
24610 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
24611
24612 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
24613 distinguish between direct bindings of reference variables, and
24614 indirect bindings of reference variables.
24615 * cvt.c (build_up_reference): Use it.
24616 * typeck.c (convert_arguments): Use it to indicate this is an
24617 indirect binding.
24618 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
24619 as they are unused.
24620 (expand_static_init): Likewise.
24621 (cplus_expand_expr_stmt): Likewise.
24622 * decl2.c (finish_file): Likewise.
24623 * init.c (perform_member_init): Likewise.
24624 (emit_base_init): Likewise.
24625 (expand_aggr_vbase_init_1): Likewise.
24626
24627 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24628
24629 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
24630 get a DECL_LANG_SPECIFIC node.
24631 * cp-tree.h (lang_decl_flags): Add new member `level'.
24632 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
24633 decl_flags level member.
24634
24635 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24636
24637 * call.c (build_method_call): Make sure instance has a
24638 TYPE_LANG_SPECIFIC node before we dive into it.
24639
24640 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
24641
24642 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24643
24644 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
24645
24646 * decl.c (duplicate_decls): When smashing decls, smash staticness in
24647 the usual way.
24648
24649 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
24650
24651 * decl.c (poplevel): Handle the merging of subblocks of cleanups
24652 when finishing blocks that have already been created (usually due to
24653 the fixup goto code). Fixes bad debugging information.
24654
24655 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
24656
24657 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24658 that's not a list of overloaded functions.
24659
24660 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24661
24662 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24663 before trying to use DECL_ABSTRACT_VIRTUAL_P.
24664
24665 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
24666
24667 * decl2.c (mark_used): New function for hooking into setting of
24668 TREE_USED on decls.
24669 * call.c (build_method_call): Use it.
24670 * class.c (instantiate_type): Likewise.
24671 * init.c (build_offset_ref): Likewise. Don't call assemble_external
24672 for all like-named functions.
24673 * method.c (hack_identifier): Likewise.
24674 (emit_thunk): Don't call assemble_external.
24675 (make_thunk): Create thunk as a FUNCTION_DECL so that it
24676 gets the right mode and ENCODE_SECTION_INFO works.
24677
24678 * parse.y: Use mark_used. Pass operator names to do_identifier.
24679 * lex.c (do_identifier): Handle operator names.
24680
24681 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24682
24683 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24684
24685 * errfn.c: Include stdio.h.
24686 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24687
24688 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
24689
24690 * typeck2.c (digest_init): Always convert initializers to the
24691 right type.
24692
24693 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
24694
24695 * init.c (member_init_ok_or_else): Don't allow member initializers
24696 for indirect members, as it is invalid.
24697
24698 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24699
24700 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24701
24702 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
24703
24704 * parse.y (for.init.statement): Catch compound statements inside for
24705 initializations, if we're being pedantic.
24706
24707 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
24708
24709 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24710 looking for.
24711
24712 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
24713
24714 * error.c (dump_expr): Don't core dump when a boolean expression is
24715 used as a default argument.
24716
24717 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24718
24719 * class.c (finish_struct_bits): Check aggregate_value_p instead of
24720 RETURN_IN_MEMORY.
24721
24722 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
24723
24724 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24725 BLKmode type that would otherwise be returned in registers.
24726
24727 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24728
24729 * g++.c (WITHLIBC): New macro.
24730 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
24731 saw_libc and pass it at the end if it was set.
24732
24733 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24734
24735 * parse.y (fn.def1): Call split_specs_attrs in
24736 declmods notype_declarator case.