]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
decl.c (store_parm_decls): Don't build cleanups for parameters while processing_templ...
[gcc.git] / gcc / cp / ChangeLog
1 2000-02-07 Mark Mitchell <mark@codesourcery.com>
2
3 * decl.c (store_parm_decls): Don't build cleanups for parameters
4 while processing_template_decl.
5
6 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
7
8 * cp-tree.h (struct saved_scope): Add incomplete field.
9 (namespace_scope_incomplete): New macro.
10 * decl.c (pushdecl): Use it.
11 (hack_incomplete_structures): Use it. See through artificial
12 binding levels.
13 (mark_saved_scope): Mark it.
14
15 Implement access control for nested types.
16 * search.c (type_access_control): New fn.
17 (accessible_p): Now we do perform access control for types.
18 * semantics.c (deferred_type_access_control): New fn.
19 (initial_deferred_type_access_control): New fn.
20 (begin_function_definition): Call it. Add lookups parm.
21 * decl.c (struct binding_level): Add this_class field.
22 (pushlevel_class): Set it.
23 (mark_binding_level): Mark it.
24 (lookup_name_real): Use it. Call type_access_control.
25 (mark_saved_scope): Mark lookups field.
26 * cp-tree.h (flagged_type_tree): Add lookups field.
27 (struct saved_scope): Add lookups field.
28 (type_lookups): New macro.
29 * parse.y (declmods): Now <ftype>.
30 (parse_decl): Add lookups parm. Call
31 initial_deferred_type_access_control.
32 (lang_extdef): Clear type_lookups.
33 (typed_declspecs, declmods, typespec): Set lookups field.
34 (initdcl): Call deferred_type_access_control.
35 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
36 component_decl_1, named_parm): Adjust.
37 * friend.c (is_friend): Nested classes are friends of their
38 enclosing classes.
39
40 * class.c (currently_open_derived_class): New fn.
41 * method.c (hack_identifier): Use it.
42
43 * lex.c (do_identifier): Remove obsolete code.
44
45 * parse.y (typed_typespecs): Propagate new_type_flag properly.
46
47 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
48
49 * tinfo.h: Remove apostrophes from C++ comment (xgettext
50 thinks this file is plain C).
51
52 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
53
54 * Makefile.in (call.o): Depend on $(EXPR_H).
55
56 * call.c: Include "expr.h".
57
58 * class.c (dump_class_hierarchy): Add prototype.
59
60 * search.c (dfs_get_pure_virtuals): Likewise.
61
62 2000-02-1 Ulrich Drepper <drepper@redhat.com>
63
64 * parse.y (simple_stmt): Allow :: token in asm parameter list.
65 * parse.c: Rebuilt.
66
67 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
68
69 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
70 Store it in DECL_FCONTEXT.
71 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
72
73 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
74
75 * tinfo.h (old abi): #include "tconfig.h".
76 * tinfo.cc (convert_to_base): Move into old abi section.
77
78 2000-01-31 Mark Mitchell <mark@codesourcery.com>
79
80 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
81 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
82 (BINFO_PRIMARY_BINFO): New macro.
83 (BF_DELTA): Rename to ...
84 (BV_DELTA): ... this.
85 (BF_VCALL_INDEX): Rename to ...
86 (BV_VCALL_INDEX): ... this.
87 (BF_FN): Rename to ...
88 (BV_FN): ... this.
89 * class.c (build_vbase_path): Adjust for changes to reverse_path.
90 (set_rtti_entry): Rename BF_ macros to BV_ variants.
91 (modify_vtable_entry): Simplify.
92 (add_virtual_function): Rename BF_ macros to BV_ variants.
93 (build_vtable_initializer): Likewise.
94 (get_class_offset_1): Remove.
95 (dfs_get_class_offset): Likewise.
96 (get_class_offset): Likewise.
97 (dfs_find_final_overrider): New function.
98 (find_final_overrider): Likewise.
99 (modify_one_vtable): Remove.
100 (dfs_find_base): New function.
101 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
102 find_final_overrider.
103 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
104 virtuals.
105 (dfs_fixup_vtable_deltas): Remove.
106 (override_one_vtable): Remove.
107 (merge_overrides): Likewise.
108 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
109 unreal chilren of virtual bases.
110 (finish_struct_1): Don't use merge_overrides. Don't use
111 dfs_fixup_vtable_deltas.
112 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
113 BINFOs.
114
115 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
116 Jason Merrill <jason@yorick.cygnus.com>
117
118 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
119
120 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
121
122 * exception.cc (__throw_bad_typeid): Add missing std::.
123
124 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
125
126 * cp-tree.h (make_thunk): PROTO -> PARAMS.
127
128 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
129
130 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
131
132 Runtime support for new-abi rtti.
133 * inc/typeinfo (type_info::operator!=): Define in class.
134 (type_info::before, type_info::name, type_info::operator==,
135 type_info::operator!=): Define new ABI implementations.
136 (type_info::is_pointer_p, type_info::is_function_p): Declare
137 new virtual functions.
138 (type_info::do_catch, type_info::do_upcast): Likewise.
139
140 * tinfo.h (__base_class_info): Define new class.
141 (__class_type_info): Likewise.
142 (__si_class_type_info): Likewise.
143 (__vmi_class_type_info): Likewise.
144 (__dynamic_cast): Prototype.
145
146 * tinfo.cc: Conditionalize old and new rtti mechanisms.
147 (type_info::is_pointer_p): Define new function.
148 (type_info::is_function_p): Likewise.
149 (type_info::do_catch): Likewise.
150 (type_info::do_upcast): Likewise.
151 (vtable_prefix): New structure for vtable access.
152 (adjust_pointer): Define new template function.
153 (contained_p, public_p, virtual_p, contained_public_p,
154 contained_nonpublic_p, contained_nonvirtual_p): Define new
155 functions.
156 (nonvirtual_base_type): New local variable.
157 (__class_type_info::~__class_type_info): Define.
158 (__si_class_type_info::~__si_class_type_info): Likewise.
159 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
160 (__class_type_info::do_catch): Define new function.
161 (__class_type_info::do_upcast): Likewise.
162 (__class_type_info::find_public_src): Likewise.
163 (__class_type_info::do_find_public_src): Likewise.
164 (__si_class_type_info::do_find_public_src): Likewise.
165 (__vmi_class_type_info::do_find_public_src): Likewise.
166 (__class_type_info::do_dyncast): Likewise.
167 (__si_class_type_info::do_dyncast): Likewise.
168 (__vmi_class_type_info::do_dyncast): Likewise.
169 (__class_type_info::do_upcast): Likewise.
170 (__si_class_type_info::do_upcast): Likewise.
171 (__vmi_class_type_info::do_upcast): Likewise.
172 (__dynamic_cast): Likewise.
173
174 * tinfo2.cc (__fundamental_type_info): Define new class.
175 (__pointer_type_info): Likewise.
176 (__reference_type_info): Likewise.
177 (__array_type_info): Likewise.
178 (__function_type_info): Likewise.
179 (__enum_type_info): Likewise.
180 (__ptr_to_member_type_info): Likewise.
181 (__fundamental_type_info::~__fundamental_type_info): Define.
182 (__pointer_type_info::~__pointer_type_info): Likewise.
183 (__reference_type_info::~__reference_type_info): Likewise.
184 (__array_type_info::~__array_type_info): Likewise.
185 (__function_type_info::~__function_type_info): Likewise.
186 (__enum_type_info::~__enum_type_info): Likewise.
187 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
188 (__pointer_type_info::do_catch): Define new function.
189 (__ptr_to_member_type_info::do_catch): Define new function.
190
191 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
192 (__is_pointer): Likewise.
193
194 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
195
196 2000-01-30 Mark Mitchell <mark@codesourcery.com>
197
198 * cp/class.c (build_vtable): Rename to build_primary_vtable.
199 (prepare_fresh_vtable): Rename to build_secondary_vtable.
200 (make_new_vtable): New function.
201 (modify_vtable_entry): Handle generation of new vtables correctly.
202 (modify_one_vtable): Remove unused parameter.
203 (dfs_fixup_vtable_deltas): Likewise.
204 (override_one_vtable): Use build_secondary_vtable.
205 (finish_struct_1): Use build_primary_vtable and
206 build_secondary_vtable.
207
208 2000-01-28 Ulrich Drepper <drepper@redhat.com>
209
210 * cp/decl.c: Adjust variable names, comments, help strings.
211
212 2000-01-29 Nathan Sidwell <nathan@acm.org>
213
214 * new2.cc (operator delete[]): Use operator delete, don't assume
215 implementation.
216
217 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
218
219 * class.c (build_vtbl_initializer): Add argument to
220 build_vtable_entry call.
221
222 2000-01-27 Mark Mitchell <mark@codesourcery.com>
223
224 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
225 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
226 (BF_DELTA): New macro.
227 (BF_VCALL_INDEX): Likewise.
228 (BF_FN): Likewise.
229 (THUNK_VCALL_OFFSET): Likewise.
230 (make_thunk): Change prototype.
231 * class.c (build_vtable_entry): Integrate
232 build_vtable_entry_for_fn. Handle vcall indices.
233 (build_vtable_entry_for_fn): Remove.
234 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
235 BF_VCALL_INDEX, BF_FN.
236 (modify_vtable_entry): Integrate common code from
237 modify_one_vtable and dfs_fixup_vtable_deltas.
238 (add_virtual_function): Set BF_VCALL_INDEX.
239 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
240 and BF_FN.
241 (modify_one_vtable): Simplify.
242 (dfs_fixup_vtable_deltas): Likewise.
243 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
244 * method.c (make_thunk): Handle vcall indices.
245
246 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
247
248 Compiler side new abi rtti (not enabled).
249 * cp-tree.h (new_abi_rtti_p): New macro.
250 (emit_support_tinfos): Prototype new function.
251 (tinfo_decl_p): Likewise.
252 (emit_tinfo_decl): Likwise.
253 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
254 macros.
255 (doing_runtime): New local static.
256 (init_rtti_processing): Add new-abi initializer.
257 (get_tinfo_decl): Add new-abi logic.
258 (tinfo_from_decl): Likewise.
259 (build_dynamic_cast_1): Likewise.
260 (qualifier_flags): New static function.
261 (tinfo_base_init): Likewise.
262 (generic_initializer): Likewise.
263 (ptr_ref_initializer): Likewise.
264 (ptmd_initializer): Likewise.
265 (class_hint_flags): Likewise.
266 (class_initializer): Likewise.
267 (synthesize_tinfo_var): Likewise.
268 (create_real_tinfo_var): Likewise.
269 (create_pseudo_type_info): Likewise.
270 (get_vmi_pseudo_type_info): Likewise.
271 (create_tinfo_types): Likewise.
272 (emit_support_tinfos): New global function.
273 (tinfo_decl_p): New global predicate.
274 (emit_tinfo_decl): New global function.
275 * class.c (set_rtti_entry): Generalize for old and new rtti.
276 (build_vtbl_initializer): Likewise.
277 * decl2.c (finish_file): Likewise.
278
279 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
280
281 * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
282 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
283
284 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
285
286 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
287 for scopes.
288
289 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
290
291 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
292
293 Wed Jan 26 22:19:14 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
294
295 * cp/optimize.c (calls_setjmp_r): Supply new argument
296 to special_function_p.
297
298 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
299
300 * call.c: PROTO -> PARAMS.
301 * class.c: Likewise.
302 * cp-tree.h: Likewise.
303 * cvt.c: Likewise.
304 * decl.c: Likewise.
305 * decl.h: Likewise.
306 * decl2.c: Likewise.
307 * dump.c: Likewise.
308 * errfn.c: Likewise.
309 * error.c: Likewise.
310 * except.c: Likewise.
311 * expr.c: Likewise.
312 * init.c: Likewise.
313 * input.c: Likewise.
314 * lex.c: Likewise.
315 * lex.h: Likewise.
316 * method.c: Likewise.
317 * optimize.c: Likewise.
318 * parse.y: Likewise.
319 * pt.c: Likewise.
320 * repo.c: Likewise.
321 * rtti.c: Likewise.
322 * search.c: Likewise.
323 * semantics.c: Likewise.
324 * spew.c: Likewise.
325 * tree.c: Likewise.
326 * typeck.c: Likewise.
327 * typeck2.c: Likewise.
328 * xref.c: Likewise.
329
330 2000-01-25 Richard Henderson <rth@cygnus.com>
331
332 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
333
334 2000-01-25 Mark Mitchell <mark@codesourcery.com>
335
336 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
337 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
338 (struct vcall_offset_data_s): New type.
339 (dfs_vcall_offset_queue_p): New function.
340 (dfs_build_vcall_offset_vtbl_entries): Likewise.
341 (build_vcall_offset_vtbl_entries): Likewise.
342 (layout_vtable_decl): Likewise.
343 (num_vfun_entries): Likewise.
344 (num_extra_vtbl_entries): Add the entries for vcall offsets.
345 (build_vtbl_initializer): Likewise.
346 (dfs_finish_vtabls): Use layout_vtable_decl.
347 (modify_one_vtables): Always duplicate vtables under the new ABI.
348 (finish_struct_1): Use layout_vtable_decl.
349
350 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
351
352 * decl.c (member_function_or_else): Change third arg from a format
353 specifier to an `enum overload_flags'. Callers changed.
354
355 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
356
357 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
358 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
359 build_const_cast, get_delta_difference, check_return_expr): Avoid
360 ANSI string concatenation usage.
361
362 2000-01-24 Mark Mitchell <mark@codesourcery.com>
363
364 * class.c (layout_class_type): Put the fields required to make a
365 class non-empty at the end, not the beginning, of the TYPE_FIELDs
366 list.
367
368 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
369
370 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
371 template.
372
373 * decl2.c (mark_used): Do instantiate inlines that have been
374 explicitly instantiated.
375
376 2000-01-24 Richard Henderson <rth@cygnus.com>
377
378 * call.c (build_over_call): Use expand_tree_builtin.
379 * typeck.c (build_function_call_real): Likewise.
380 (build_binary_op_nodefault): Handle unordered compares.
381
382 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
383
384 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
385 cp_tree_index values.
386 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
387 New global node #defines for them.
388 * rtti.c (call_void_fn): Replace with ...
389 (build_runtime_decl): ... new static function.
390 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
391 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
392 (build_dynamic_cast_1): Always produce correctly typed result.
393 Explicitly produce type_info addresses. Use dynamic_cast_node.
394 * exception.cc (__throw_bad_cast): Return `void *'.
395 (__throw_bad_typeid): Return `const type_info &'.
396
397 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
398
399 * cp-tree.h (get_vtable_decl): Prototype new function.
400 * class.c (get_vtable_decl): New function. Broken out from ...
401 (build_vtable): ... here. Use it.
402 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
403 by get_vtable_decl.
404
405 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
406
407 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
408 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
409 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
410 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
411 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
412 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
413 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
414 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
415 (CPTI_TINFO_VAR_ID): New enumeration.
416 (__tp_desc_type_node, __access_mode_type_node,
417 __bltn_desc_type_node, __user_desc_type_node,
418 __class_desc_type_node, __ptr_desc_type_node,
419 __attr_desc_type_node, __func_desc_type_node,
420 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
421 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
422 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
423 enum_desc_type_node, class_desc_type_node,
424 si_class_desc_type_node, vmi_class_desc_type_node,
425 ptmd_desc_type_node, base_desc_type_node): New #defines.
426 (tinfo_fn_id, tinfo_fn_type): Rename to ...
427 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
428 (tinfo_var_id): New enumeration.
429 (DECL_TINFO_FN_P): Augment comment.
430 * decl.c (cp_global_trees): Adjust documentation.
431 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
432 tinfo_decl_type and tinfo_var_id.
433 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
434 (build_typeid): Remove unused variable.
435 (get_tinfo_var): Use tinfo_var_id.
436 (tinfo_name): New static function.
437 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
438 (tinfo_from_decl): Likewise.
439 (get_base_offset): New static function, broken out of
440 expand_class_desc.
441 (expand_si_desc): Use tinfo_name.
442 (expand_class_desc): Likewise. Lose local static variable.
443 Use base_desc_type_node. Use get_base_offset.
444 (expand_ptr_desc): Use tinfo_name.
445 (expand_attr_desc): Likewise.
446 (expand_generic_desc): Likewise.
447
448 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
449 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
450
451 2000-01-23 Mark Mitchell <mark@codesourcery.com>
452
453 * cp-tree.h (__eprintf): Remove declaration.
454 * tree.c (__eprintf): Remove definition.
455
456 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
457 Mark Mitchell <mark@codesourcery.com>
458
459 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
460 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
461
462 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
463
464 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
465
466 2000-01-23 Mark Mitchell <mark@codesourcery.com>
467
468 * cp-tree.h (register_dtor_fn): New function.
469 * decl.c (destroy_local_static): Rename to ...
470 (register_dtor_fn): ... this. Give it external linkage.
471 (expand_static_init): Use it.
472 * decl2.c (do_static_initialization): Likewise, if using
473 __cxa_atexit.
474 (do_static_destruction): Check that __cxa_atexit is not in use.
475 (finish_file): Don't call do_static_destruction if using
476 __cxa_atexit.
477
478 * typeck.c (convert_arguments): Restore two-message error
479 reporting.
480
481 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
482
483 Remap dynamic cast hint values to be consistent across ABIs.
484 * search.c (dynamic_cast_base_recurse): Remap generated value.
485 (get_dynamic_cast_base_type): Adjust documentation.
486 * tinfo.h (__user_type_info::dyncast): Likewise.
487 (__user_type_info::find_public_subobj): Remap BOFF meaning.
488 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
489 (__class_type_info::do_dyncast): Likewise.
490 (__class_type_info::do_find_public_subobj): Likewise.
491 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
492
493 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom>
494
495 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
496
497 * typeck2.c (incomplete_type_error): Restore previous
498 cp_error and cp_error_at call sequence.
499
500 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
501
502 * class.c (dump_class_hierarchy): Make format agree with argument;
503 cast pointer to unsigned long and print with %lx.
504
505 2000-01-19 Gabriel Dos Reis <gdr@codesourcery>
506
507 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
508
509 * typeck.c (composite_pointer_type, common_type,
510 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
511 build_function_call_real, convert_arguments,
512 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
513 build_unary_op, mark_addressable, build_compound_expr,
514 build_static_cast, build_reinterpret_cast, build_const_cast,
515 build_c_cast, build_modify_expr, get_delta_difference,
516 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
517 'ISO C++'. Fusion consecutive calls to diagnotic message routines
518 into a single one.
519 * typeck2.c (readonly_error, abstract_virtuals_error,
520 process_init_constructor, check_for_new_type): Likewise.
521
522 2000-01-19 Mark Mitchell <mark@codesourcery.com>
523
524 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
525 VAR_DECLs.
526
527 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
528
529 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
530 (build_x_typeid): Likewise.
531 (get_tinfo_fn): Likewise.
532 (get_tinfo_fn_unused): Rename to ...
533 (get_tinfo_decl): ... here.
534 * rtti.c (build_headof): Replace logic error with assertion.
535 (get_tinfo_fn_dynamic): Rename to ...
536 (get_tinfo_decl_dynamic): ... here. Make static. Use
537 complete_type_or_else.
538 (build_x_typeid): Move into ...
539 (build_typeid): ... here. Adjust call to
540 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
541 throw_bad_typeid expression.
542 (get_tinfo_fn_unused): Rename to ...
543 (get_tinfo_decl): ... here. Adjust comment.
544 (get_tinfo_fn): Delete.
545 (tinfo_from_decl): New static function.
546 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
547 (get_typeid): Use complete_type_or_else.
548 (build_dynamic_cast_1): Adjust calls to
549 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
550 * parse.y (primary): Adjust call to build_typeid.
551 * except.c (build_eh_type_type_ref): Adjust call to
552 get_tinfo_decl. Mark as used.
553 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
554 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
555 * parse.c: Regenerated.
556
557 2000-01-17 Mark Mitchell <mark@codesourcery.com>
558
559 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
560 calling convention.
561 (resolves_to_fixed_type_p): Document calling convention.
562 * rtti.c (build_x_typeid): Initialize NONNULL.
563
564 * cp-tree.h (build_shared_int_cst): New function.
565 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
566 * class.c (modify_vtable_entry): Likewise.
567 (add_virtual_function): Split out code to generated shared
568 INTEGER_CSTs to build_share_int_cst.
569 (modify_all_vtables): Handle all the overridden functions here.
570 Add overridden functions from non-primary virtual bases to the
571 primary vtable.
572 (finish_struct_1): Adjust call to modify_all_vtables. Add
573 overridden functions from non-primary bases to the vtable.
574 * tree.c (build_shared_int_cst): New function.
575
576 * cp-tree.h (scratchalloc): Remove.
577 (build_scratch_list): Likewise.
578 * call.c (convert_class_to_reference): Replace build_scratch_list
579 and build_expr_list with build_tree_list.
580 (add_candidate): Replace scratchalloc with expralloc. Note memory
581 leak.
582 (build_user_type_conversion_1): Replace build_scratch_list
583 and build_expr_list with build_tree_list.
584 (build_new_op): Likewise.
585 (build_op_delete_call): Likewise.
586 (convert_like): Likewise.
587 * cvt.c (ocp_convert): Likewise.
588 * decl.c (start_decl): Likewise.
589 (start_function): Likewise.
590 (finish_destructor_body): Likewise.
591 (maybe_build_cleanup_1): Likewise.
592 * decl2.c (reparse_decl_as_expr): Likewise.
593 * init.c (perform_member_init): Likewise.
594 (expand_cleanup_for_base): Likewise.
595 (build_builtin_delete_call): Likewise.
596 (build_new_1): Likewise.
597 (build_delete): Likewise.
598 * method.c (do_build_assign_ref): Likewise.
599 * parse.y (already_scoped_stmt): Likewise.
600 (nontrivial_exprlist): Likewise.
601 (net_initializer): Likewise.
602 (initlist): Likewise.
603 * parse.c: Regenerated.
604 * rtti.c (build_x_typeid): Likewise.
605 (build_dynamic_cast_1): Likewise.
606 * typeck.c (build_x_compound_expr): Likewise.
607 (build_static_cast): Likewise.
608 (build_modify_expr): Likewise.
609
610 * cp-tree.h (DECL_VINDEX): Add documentation.
611 * class.c (build_vtable_entry): Likewise.
612 (start_vtable): Add comment.
613 (add_virtual_function): Replace pending_hard_virtuals with
614 overridden_virtuals and pending_virtuals with new_virtuals.
615 Replace redundant assignments with assertions.
616 (check_for_override): Add comment.
617 (check_bases_and_members): Replace pending_hard_virtuals with
618 overridden_virtuals and pending_virtuals with new_virtuals.
619 (create_vtbl_ptr): Likewise.
620 (layout_class_type): Likewise.
621 (finish_struct_1): Likewise. Add comments.
622
623 2000-01-16 Mark Mitchell <mark@codesourcery.com>
624
625 * class.c (finish_struct_1): Replace redundant code with
626 assertions.
627
628 * cp-tree.h (flag_new_abi): Move.
629 (flag_use_cxa_atexit): Likewise.
630 (flag_honor_std): Likewise.
631 (flag_rtti): Likewise.
632 (vbase_offsets_in_vtable_p): Define.
633 (vptrs_present_everywhere_p): Likewise.
634 (TYPE_CONTAINS_VPTR_P): Likewise.
635 (dfs_walk_real): Declare.
636 * class.c (build_vbase_pointer_fields): Check
637 vbase_offsets_in_vtable_p.
638 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
639 BINFO_VPTR_FIELD.
640 (build_vbase_offset_vtbl_entries): Simplify.
641 (build_vbase_offset_vtbl_entries): Adjust.
642 (build_vbase_pointer): Add ability to look up vbase offsets in
643 vtable.
644 (start_vtable): New function.
645 (add_virtual_function): Use it.
646 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
647 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
648 (build_vtbl_initializer): Take the type of the complete object as
649 input. Use it to correctly calculate vbase offsets.
650 (dfs_finish_vtbls): Pass the complete type to
651 build_vtbl_initializer.
652 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
653 (create_vtable_ptr): Create a vtable even if there are no
654 new virtual functions, under the new ABI.
655 (finish_struct_1): Likewise.
656 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
657 * decl.c (exapnd_static_init): Remove call to
658 preserve_initializer.
659 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
660 vtables.
661 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
662 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
663 (construct_virtual_bases): Don't initialize virtual base pointers
664 under the new ABI.
665 (build_aggr_init): Clean up comment.
666 (expand_aggr_init_1): Likewise.
667 * rtti.c (expand_class_desc): Store the virtual function table
668 index where the vbase offset lives in the offset field.
669 * search.c (dfs_walk_real): Make it global.
670 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
671 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
672
673 * tinfo.h (USItype): Make it signed under the new ABI.
674 * tinfo.cc (convert_to_base): New function. Encapsulate base
675 conversion logic here.
676 (__class_type_info::do_upcast): Use it.
677 (__class_type_info::do_dyncast): Likewise.
678 (__class_type_info::do_find_public_subobj): Likewise.
679
680 * init.c (construct_virtual_bases): Don't look up the addresses of
681 virtual bases at run-time.
682
683 * class.c (build_vbase_pointer): Relocate.
684 (build_vbase_pointer_fields): Likewise.
685 (dfs_build_vbase_offset_vtbl_entries): Likewise.
686 (build_vbase_offset_vtbl_entries): Likewise.
687
688 * decl.c (init_decl_processing): Complain if -fnew-abi
689 -fno-vtable-thunks is used.
690
691 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
692 flag_new_abi.
693
694 2000-01-15 Mark Mitchell <mark@codesourcery.com>
695
696 * cp-tree.h (num_extra_vtbl_entries): New function.
697 (size_extra_vtbl_entries): Likewise.
698 (dfs_vtable_path_unmark): Likewise.
699 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
700 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
701 * class.c (num_extra_vtbl_entries): New function.
702 (size_extra_vtbl_entries): Likewise.
703 (dfs_build_vbase_offset_vtbl_entries): New function.
704 (build_vbase_offset_vtbl_entries): Likewise.
705 (build_vtbl_initializer): Use it.
706 (finish_struct_1): Adjust vtable sizes (using
707 num_extra_vtbl_entries).
708 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
709 THUNK_DECL is non-NULL before expanding it.
710 * init.c (expand_virtual_init): Adjust the vtable pointer by
711 size_extra_vtbl_entries before storing it.
712 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
713 Handle TREE_LIST parameters here, not in the dfs_* functions.
714 (dfs_unmarked_real_bases_queue_p): Adjust.
715 (dfs_marked_real_bases_queue_p): Likewise.
716 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
717 (dfs_vtable_path_marked_real_bases_queue_p): New function.
718 (dfs_vtable_path_unmark): Likewise.
719
720 2000-01-14 Mark Mitchell <mark@codesourcery.com>
721
722 * optimize.c (copy_body_r): Clear the operand three of a
723 TARGET_EXPR when copying it.
724
725 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
726
727 * method.c (build_decl_overload_real): Check whether we are in ::
728 before returning __builtin_new/delete.
729
730 2000-01-13 Mark Mitchell <mark@codesourcery.com>
731
732 * pt.c (tsubst_friend_function): Improve comment.
733 (instantiate_decl): Avoid crashing when a "nested" function is
734 instantiated from the top level.
735
736 * dump.c (dqeueue_and_dump): Dump
737 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
738
739 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
740
741 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
742
743 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
744
745 * g++spec.c (lang_specific_driver): Add -fnew-abi if
746 ENABLE_NEW_GXX_ABI defined.
747 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
748 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
749 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
750
751 2000-01-12 Mark Mitchell <mark@codesourcery.com>
752
753 * decl.c (start_cleanup_fn): Call pushdecl.
754
755 * call.c (convert_class_to_reference): Fix typos.
756 (build_conditional_expr): Handle errors gracefully.
757 * class.c (push_nested_class): Likewise.
758 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
759 (DECL_THIS_EXTERN): Use it.
760 (DECL_THIS_STATIC): Likewise.
761 * cvt.c (convert_to_void): Handle errors gracefully.
762 (build_expr_type_conversion): Likewise.
763 * decl.c (maybe_push_decl): Likewise.
764 (start_decl_1): Likewise.
765 (require_complete_types_for_parms): Likewise.
766 * parse.y (structsp): Likewise.
767 (base_class): Likewise.
768 * parse.c: Regenerated.
769 * pt.c (finish_member_template_decl): Likewise.
770 * typeck.c (decay_conversion): Likewise.
771
772 * cp-tree.h (dfs_skip_vbases): New function.
773 (find_vbase_instance): Likewise.
774 * class.c (determine_primary_base): Allow a nearly empty base to
775 serve as a primary base class under the new ABI.
776 (get_class_offset_1): Rename to ...
777 (dfs_get_class_offset): ... this. Simplify. Don't issue error
778 messages here.
779 (get_class_offset): Use it. Issue error messages here.
780 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
781 find the right copies of virtual bases.
782 (fixup_vtable_deltas1): Rename to ...
783 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
784 bases as primary bases.
785 (fixup_vtable_deltas): Remove.
786 (override_one_vtable): Handle virtual bases as primary bases.
787 (merge_overrides): Likewise.
788 (finish_struct_1): Likewise.
789 (dump_class_hierarchy): Dump primary-ness of bases as well.
790 * search.c (mark_primary_bases): Use a pre-order traversal to
791 handle primary virtual bases.
792 (dfs_skip_vbases): New fiunction.
793 (expand_upcast_fixups): Adjust to handle primary virtual bases.
794 (fixup_virtual_upcast_offsets): Likewise.
795 (fixup_all_virtual_upcast_offsets): Likewise.
796 (dfs_find_vbase_instances): New function.
797 (find_vbase_instance): Likewise.
798
799 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
800
801 * lex.c (DIR_SEPARATOR): Delete macro.
802
803 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
804
805 * decl2.c (lang_decode_option): Handle automatic line wrapping
806 option.
807
808 2000-01-11 Mark Mitchell <mark@codesourcery.com>
809
810 * friend.c (do_friend): Don't resolve scopes when processing
811 template declarations, even if the qualifying scope doesn't
812 involve template parameters.
813
814 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
815
816 * class.c (dfs_modify_vtables_queue_p): Remove.
817 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
818 and dfs_marked_real_bases_queue_p instead of
819 dfs_modify_vtables_queue_p.
820
821 * class.c (build_vbase_path): Simplify.
822 (dfs_propagate_binfo_offsets): New function.
823 (propagate_binfo_offsets): Use it.
824 (remove_base_field): Simplify.
825 (dfs_set_offset_for_vbases): Remove.
826 (dfs_set_offset_for_shared_vbases): New function.
827 (dfs_set_offset_for_unshared_vbases): Likewise.
828 (layout_virtual_bases): Use them.
829 (layout_basetypes): Don't call propagate_binfo_offsets.
830 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
831 for the vbases.
832
833 * class.c (build_base_field): New function, split out from ...
834 (build_base_fields): ... here. Use it. Allocate primary bases
835 first, under the new ABI.
836 (get_vtable_entry): Remove.
837 (remove_base_field): New function, split out from ...
838 (remove_base_fields): ... here. Adjust since primary bases come
839 first under the new ABI.
840
841 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
842 (initialize_vtbl_ptrs): New function.
843 (expand_indirect_vtbls_init): Change prototype.
844 (convert_pointer_to_vbase): Declare.
845 * init.c (expand_direct_vtbls_init): Remove.
846 (dfs_initialize_vtbl_ptrs): New function.
847 (initialize_vtbl_ptrs): Likewise.
848 (emit_base_init): Use initialize_vtbl_ptrs.
849 * search.c (convert_pointer_to_vbase): Make it global.
850 (expand_indirect_vtbls_init): Remove vtable initialization code.
851 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
852
853 * class.c (dfs_finish_vtbls): New function.
854 (finish_vtbls): Use it.
855 (dump_class_hierarchy): New function.
856
857 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
858 (BINFO_VBASE_PRIMARY_P): New macro.
859 (BINFO_VIRTUALS): Add to documentation.
860 (SET_BINFO_PRIMARY_MARKED_P): Remove.
861 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
862 (dfs_mark_primary_bases_queue_p): Likewise.
863 (dfs_unmarked_real_bases_queue_p): New function.
864 (dfs_marked_real_bases_queue_p): Likewise.
865 * search.c (dfs_mark_primary_bases): Adjust.
866 (mark_primary_bases): Likewise.
867 (get_shared_vbase_if_not_primary): New function.
868 (dfs_unmarked_real_bases_queue_p): Likewise.
869 (dfs_marked_real_bases_queue_p): Likewise.
870 (dfs_get_pure_virtuals): Simplify.
871 (get_pure_virtuals): Likewise.
872
873 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
874
875 * lex.c: Include tm_p.h.
876
877 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
878
879 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
880
881 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
882
883 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
884 * pt.c (instantiate_decl): Defer comdat templates that might not be
885 needed.
886
887 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
888 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
889 (finish_file): Likewise.
890
891 * decl2.c (import_export_class): Undo 12/14 change.
892
893 * error.c (dump_decl): operator new, not operatornew.
894
895 * class.c (field_decl_cmp): A nontype is "greater" than a type.
896 * search.c (lookup_field_1): Look for the last field with the
897 desired name.
898
899 2000-01-05 Nathan Sidwell <nathan@acm.org>
900
901 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
902 FUNCTION_DECL.
903
904 2000-01-05 Nathan Sidwell <nathan@acm.org>
905
906 * typeck.c (build_static_cast): Don't strip target qualifiers
907 when casting from a class.
908
909 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
910
911 * class.c (warn_hidden): Initialize variable `fndecl'.
912
913 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
914
915 * decl.c (flag_isoc9x): New variable to be able to use code in
916 c-common.c. For now always zero.
917
918 2000-01-03 Mark Mitchell <mark@codesourcery.com>
919
920 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
921 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
922 or unshare_base_binfos for virtual bases here.
923 * search.c (dfs_get_vbase_types): Do it here.
924 (get_vbase_types): Adjust.
925
926 2000-01-02 Mark Mitchell <mark@codesourcery.com>
927
928 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
929 (BINFO_PRIMARY_MARKED_P): Use flag 5.
930 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
931 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
932 (unmark_primary_bases): Remove declaration.
933 (unmarkedp): Declare.
934 (dfs_vbase_unmark): Likewise.
935 * class.c (determine_primary_base): Return immediately if there
936 are no base classes. Call mark_primary_bases here.
937 (modify_all_direct_vtables): Remove.
938 (modify_all_indirect_vtables): Remove.
939 (dfs_modify_vtables_queue_p): New function.
940 (dfs_modify_vtables): New function.
941 (modify_all_vtables): Use them.
942 (build_base_fields): Build FIELD_DECLs for primary virtual base
943 classes.
944 (create_vtable_ptr): Don't call determine_primary_base here.
945 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
946 (dfs_set_offset_for_vbases): ... this.
947 (layout_virtual_bases): Use it.
948 (layout_class_type): Call determine_primary_base here.
949 * search.c (unmarkedp): Make it global.
950 (shared_marked_p): Simplify.
951 (shared_unmarked_p): Likewise.
952 (dfs_primary_bases_queue_p): Remove.
953 (dfs_unmark_primary_bases): Likewise.
954 (unmark_primary_bases): Likewise.
955 (mark_primary_bases): Simplify.
956 (get_pure_virtuals): Don't call mark_primary_bases here.
957 (dfs_vbase_unmark): New function.
958 (get_vbase_types): Simplify.
959
960 * class.c (struct base_info): Remove.
961 (determine_primary_base): Take has_virtual_p rather than a
962 base_info as input. Don't calculate max_has_virtual.
963 (finish_struct_bits): Remove max_has_virtual argument.
964 (create_vtable_ptr): Remove max_has_virtual_p argument.
965 (layout_virtual_bases): Remove max argument.
966 (layout_basetypes): Likewise.
967 (layout_class_type): Remove max_has_virtual_p argument.
968 (finish_struct_1): Remove max_has_virtual.
969
970 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
971 (layout_basetypes): Remove.
972 * class.c (propagate_binfo_offsets): Moved here from tree.c.
973 Update to handle primary virtual bases.
974 (remove_base_fields): New function, split out from
975 layout_basetypes.
976 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
977 (layout_virtual_bases): New function, split out from
978 layout_basetypes. Update to handle primary virtual bases.
979 (layout_basetypes): Moved here from tree.c. Use
980 remove_base_fields and layout_virtual_bases.
981 * search.c (dfs_mark_primary_bases_queue_p): New function.
982 (mark_primary_bases): Use it.
983 * tree.c (CEIL): Remove.
984 (propagate_binfo_offsets): Remove.
985 (layout_basetypes): Remove.
986
987 2000-01-01 Mark Mitchell <mark@codesourcery.com>
988
989 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
990 (BINFO_PRIMARY_MARKED_P): New macro.
991 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
992 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
993 (mark_primary_bases): New function.
994 (unmark_primary_bases): Likewise.
995 * search.c (get_abstract_virtuals_1): Remove.
996 (dfs_mark_primary_bases): New function.
997 (mark_primary_bases): Likewise.
998 (dfs_unmark_primary_bases): Likewise.
999 (unmark_primary_bases): Likewise.
1000 (dfs_get_pure_virtuals): Likewise.
1001
1002 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1003
1004 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1005 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1006 (modify_one_vtable): Adjust.
1007 (fixup_vtable_deltas1): Likewise.
1008 (override_one_vtable): Likewise.
1009 * search.c (get_abstract_virtuals_1): Likewise.
1010 (get_pure_virtuals): Likewise.
1011 (expand_upcast_fixups): Likewise.
1012 * tree.c (debug_binfo): Likewise.
1013
1014 * class.c (build_vtable): Don't return a value. Don't rebuild
1015 vtables for bases that have already been handled.
1016 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1017 already been handled.
1018 (modify_one_vtable): Adjust accordingly.
1019 (fixup_vtable_deltas1): Likewise.
1020 (finish_struct_1): Likewise.
1021
1022 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1023
1024 * call.c (build_new_method_call): Also check destructors.
1025
1026 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1027
1028 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1029 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1030 (set_primary_base): New function, split out from ...
1031 (finish_base_struct): ... here. Rename to ...
1032 (determine_primary_base): ... this. Simplify.
1033 (create_vtable_ptr): Tweak accordingly.
1034 (finish_struct_1): Simplify.
1035
1036 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1037 (CLASSTYPE_N_BASECLASSES): Likewise.
1038 (BINFO_FOR_VBASE): New macro.
1039 (get_vbase_types): Change prototype.
1040 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1041 (prepare_fresh_vtable): Likewise.
1042 (finish_vtbls): Likewise.
1043 (get_class_offset_1): Likewise.
1044 (modify_all_indirect_vtables): Likewise.
1045 (build_vbase_pointer_fields): Likewise.
1046 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1047 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1048 (expand_member_init): Likewise.
1049 * search.c (get_base_distance): Likewise.
1050 (lookup_field_queue_p): Likewise.
1051 (virtual_context): Likewise.
1052 (get_vbase_types): Don't return a value. Set
1053 CLASSTYPE_VBASECLASSES here.
1054 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1055
1056 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1057
1058 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1059
1060 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1061
1062 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1063 the class, not the end, in the new ABI.
1064 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1065 ABI.
1066
1067 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1068
1069 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1070 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1071 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1072 (check_field_decls): Likewise.
1073 (check_bases_and_members): Likewise.
1074
1075 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1076
1077 * cp-tree.h (do_inline_function_hair): Remove.
1078 * class.c (layout_class_type): New function, split out from
1079 finish_struct_1.
1080 (fixup_pending_inline): Likewise.
1081 (fixup_inline_methods): New function.
1082 * method.c (fixup_pending_inline): Remove.
1083 (do_inline_function_hair): Likewise.
1084
1085 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1086 new ABI.
1087
1088 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1089 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1090 (CLASSTYPE_PURE_VIRTUALS): ... this.
1091 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1092 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1093 (DECL_PURE_VIRTUAL_P): ... this.
1094 (get_abstract_virtuals): Rename to ...
1095 (get_pure_virtuals): ... this.
1096 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1097 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1098 CLASSTYPE_PURE_VIRTUALS.
1099 * class.c (build_vtable_entry): Likewise.
1100 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1101 get_abstract_virtuals.
1102 (build_vtbl_initializer): Likewise.
1103 (override_one_vtable): Likewise.
1104 (check_methods): Likewise.
1105 * decl.c (duplicate_decls): Likewise.
1106 (redeclaration_error_message): Likewise.
1107 (lang_mark_tree): Likewise.
1108 * decl2.c (grok_function_init): Likewise.
1109 (import_export_vtable): Likewise.
1110 (import_expor_class): Likewise.
1111 * typeck2.c (abstract_virtuals_error): Likewise.
1112 * xref.c (GNU_xref_member): Likewise.
1113 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1114
1115 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1116
1117 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1118 throughout.
1119
1120 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1121
1122 * decl.c (store_return_init): Use mode of old RTL generated for
1123 DECL_RESULT, not the mode of DECL_RESULT itself.
1124 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1125 for functions that used named return values.
1126
1127 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1128
1129 * semantics.c (expand_body): Use
1130 note_deferral_of_defined_inline_function.
1131
1132 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1133
1134 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1135
1136 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1137
1138 * error.c (dump_decl): Support named return values.
1139
1140 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1141
1142 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1143 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1144 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1145 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1146 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1147 (check_bases_and_members): Set them here instead.
1148 (create_vtable_ptr): New function, split out from ...
1149 (finish_struct_1): ... here. Use it. Tidy. Use
1150 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1151 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1152 the first field in the class.
1153 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1154 seeing TYPE_VFIELD as the first field in the class.
1155
1156 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1157 (TYPE_POLYMORPHIC_P): ... this.
1158 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1159 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1160 (TREE_CALLS_NEW): Remove.
1161 (TREE_MANGLED): Likewise.
1162 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1163 and TYPE_POLYMORPHIC_P.
1164 * class.c (check_bases): Likewise.
1165 (finish_base_struct): Likewise.
1166 (finish_struct_bits): Likewise.
1167 (check_for_override): Likewise.
1168 (finish_struct_1): Likewise.
1169 (get_vfield_name): Likewise.
1170 * decl.c (xref_basetypes): Likewise.
1171 * decl2.c (import_export_class): Likewise.
1172 (import_export_decl): Likewise.
1173 * error.c (dump_function_decl): Likewise.
1174 * pt.c (instantiate_class_template): Likewise.
1175 * repo.c (repo_inline_used): Likewise.
1176 * rtti.c (build_headof): Likewise.
1177 (get_tinfo_fn_dynamic): Likewise.
1178 (build_x_typeid): Likewise.
1179 (get_tinfo_var): Likewise.
1180 (build_dynamic_cast_1): Likewise.
1181 (synthesize_tinfo_fn): Likewise.
1182 * search.c (lookup_field_1): Likewise.
1183 (dfs_debug_mark): Likewise.
1184 (maybe_suppress_debug_info): Likewise.
1185 * typeck.c (build_component_ref): Likewise.
1186 (build_component_addr): Likewise.
1187 * typeck2.c (process_init_constructor): Likewise.
1188
1189 1999-12-20 Nathan Sidwell <nathan@acm.org>
1190
1191 * typeck.c (strip_all_pointer_quals): New static function.
1192 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1193
1194 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1195
1196 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1197 (dso_handle_node): New macro.
1198 (flag_use_cxa_atexit): New variable.
1199 (declare_global_var): New function.
1200 (start_anon_func): Remove declaration.
1201 (end_anon_func): Likewise.
1202 * decl.c (get_atexit_node): New function, split out from
1203 destroy_local_static. Handle flag_use_cxa_atexit.
1204 (get_dso_handle_node): Likewise.
1205 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
1206 except.c. Handle flag_use_cxa_atexit.
1207 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
1208 except.c.
1209 (declare_global_var): New variable.
1210 (destroy_local_static): Handle flag_use_cxa_atexit.
1211 * decl2.c (flag_use_cxa_atexit): New variable.
1212 (lang_f_options): Likewise.
1213 * except.c (start_anon_func): Remove.
1214 (end_anon_func): Liekwise.
1215 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1216 * rtti.c (get_tinfo_var): Use declare_global_var.
1217
1218 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1219
1220 * class.c (check_field_decls): Don't return a value.
1221 (avoid_overlap): Moved here from tree.c.
1222 (build_base_fields): Likewise.
1223 (check_bases): New function, split out from finish_base_struct.
1224 (check_bases_and_members): New function, split out from
1225 finish_struct_1.
1226 (struct base_info): Remove cant_have_default_ctor,
1227 cant_have_const_ctor, cant_have_asn_ref.
1228 (finish_base_struct): Split semantic analysis into check_bases.
1229 (finish_struct_methods): Fix bogus assertion.
1230 (check_field_decls): Call finish_struct_anon here.
1231 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1232 (finish_struct_1): Use check_bases_and_members. Reorganize.
1233 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1234 (build_base_fields): Don't declare.
1235 * tree.c (avoid_overlap): Remove.
1236 (build_base_fields): Likewise.
1237
1238 * optimize.c (struct inline_data): Remove scope_stmt.
1239 (remap_block): Don't use insert_block_after_note. Don't update
1240 scope_stmt.
1241 (expand_call_inline): Don't update scope_stmt.
1242 (optimize_function): Don't initialize scope_stmt.
1243 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1244 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1245
1246 1999-12-15 Mark Mitchell <mark@codesourcery.com>
1247
1248 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1249 out of the class, rather than taking them as parameters.
1250 (build_vbase_pointer_fields): Move here from tree.c.
1251 (build_vtbl_or_vbase_field): New function.
1252 (check_methods): Likewise.
1253 (remove_zero_width_bitfields): Likewise.
1254 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1255 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
1256 USING_DECLs here.
1257 (finish_struct_methods): Handle the case where there are no
1258 methods here.
1259 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1260 (check_field_decls): Call delete_duplicate_fields here.
1261 (finish_struct_1): Tidy. Use check_methods and
1262 remove_zero_width_bitfields.
1263 * cp-tree.h (build_vbase_pointer_fields): Remove.
1264 * decl.c (grokdeclarator): Use tree_cons instead of
1265 temp_tree_cons.
1266 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1267 instead of temp_tree_cons.
1268 * lex.c (cons_up_default_function): Remove dead code.
1269 * method.c (fixup_pending_inline): New function, split out from ...
1270 (do_inline_function_hair): ... here.
1271 * tree.c (build_vbase_pointer_fields): Remove.
1272
1273 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
1274
1275 * tree.c (walk_tree): Walk operand subtrees in forward order.
1276 * optimize.c (expand_call_inline): Likewise.
1277 (optimize_function): Initialize id->scope_stmt to something useful.
1278 (remap_block): Assume id->scope_stmt has a useful value.
1279
1280 1999-12-15 Nathan Sidwell <nathan@acm.org>
1281
1282 * typeck.c (build_c_cast): Expand warning message. Move pointer
1283 alignment warning to after the cast. Don't warn about pointer
1284 alignment when given a pointer to incomplete.
1285
1286 1999-12-15 Richard Henderson <rth@cygnus.com>
1287
1288 * cp-tree.h (make_aggr_type): Declare.
1289 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1290 (make_aggr_type): New.
1291
1292 * decl.c (build_typename_type, init_decl_processing): Use it.
1293 (build_ptrmemfunc_type, xref_tag): Likewise.
1294 * except.c (call_eh_info): Likewise.
1295 * init.c (init_init_processing): Likewise.
1296 * pt.c (process_template_parm, lookup_template_class): Likewise.
1297 * rtti.c (expand_class_desc): Likewise.
1298 * semantics.c (begin_class_definition, finish_typeof): Likewise.
1299 * tree.c (copy_template_template_parm): Likewise.
1300
1301 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
1302
1303 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1304 sizeof (struct tree_common).
1305
1306 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
1307
1308 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1309 outermost block to point to the inlined function decl.
1310
1311 * error.c (dump_decl): operator==, not operator ==.
1312 (op_to_string): Likewise.
1313
1314 * decl.c (compute_array_index_type): Handle null name.
1315
1316 * decl2.c (ambiguous_decl): Fix to match comment.
1317 (lookup_using_namespace): Adjust.
1318
1319 * decl2.c (import_export_class): Don't ignore dllimport.
1320
1321 1999-12-14 Mark Mitchell <mark@codesourcery.com>
1322
1323 * class.c (check_field_decls): Split out from ...
1324 (finish_struct_1): ... here. Use it. Tidy.
1325
1326 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1327 * optimize.c (copy_body_r): Pass it.
1328 * tree.c (remap_save_expr): Clear walk_subtrees for an
1329 already-handled SAVE_EXPR.
1330 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1331
1332 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1333 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1334
1335 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1336
1337 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
1338
1339 * class.c (finish_base_struct): Allow multiple COM base classes
1340 as well as non-COM bases as long as it's not the leftmost.
1341
1342 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
1343
1344 * lex.c (saving_parse_to_obstack): New global.
1345 (reinit_parse_for_block): Use.
1346 (reinit_parse_for_expr): Use.
1347 (check_newline): Use.
1348
1349 1999-12-13 Mark Mitchell <mark@codesourcery.com>
1350
1351 * optimize.c (initialize_inlined_parameters): Take FN to which the
1352 parameters belong as an argument.
1353 (expand_call_inline): Expand calls into the parameter
1354 initializations before pushing the function onto the list of
1355 functions we are presently expanding.
1356
1357 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1358
1359 * class.c (get_vtable_name): Use a literal format string and
1360 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1361 (prepare_fresh_vtable): Likewise.
1362
1363 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1364 VTABLE_NAME_FORMAT.
1365
1366 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1367
1368 * init.c (build_vec_init): Initialize variable `try_body'.
1369
1370 * lex.c (yyerror): Don't call a variadic function with a
1371 non-literal format string.
1372
1373 * optimize.c (optimize_function): Call memset, not bzero.
1374
1375 * pt.c (for_each_template_parm_r): Add static prototype.
1376
1377 1999-12-09 Andreas Jaeger <aj@suse.de>
1378
1379 * except.c (expand_throw): Add static attribute to match
1380 prototype.
1381
1382 * Makefile.in (semantics.o): Add dependency on output.h.
1383 * semantics.c: Include output.h for declaration of
1384 make_function_rtl.
1385
1386 1999-12-09 Mark Mitchell <mark@codesourcery.com>
1387
1388 * decl.c (init_decl_processing): Reenable inlining on trees.
1389 (finish_function): Likewise.
1390 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1391 * semantics.c (simplify_aggr_init_exprs): New function.
1392 (expand_body): Use it.
1393 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1394 sometimes present the same sub-tree twice.
1395
1396 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1397 `csl'.
1398
1399 * semantics.c (finish_switch_cond): Do conversions here, not ...
1400 * typeck.c (c_expand_start_case): Here.
1401
1402 * semantics.c (do_poplevel): Remove unused variable.
1403
1404 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1405
1406 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1407 unless we're declaring the variable in question.
1408
1409 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1410
1411 * decl.c (init_decl_processing): #if 0 last patch.
1412 (finish_function): Likewise.
1413
1414 1999-12-05 Mark Mitchell <mark@codesourcery.com>
1415
1416 * decl.c (init_decl_processing): Set flag_inline_trees if
1417 !flag_no_inline.
1418
1419 * cp-tree.h (calls_setjmp_p): Declare.
1420 * decl.c (finish_function): Mark functions that call setjmp as
1421 uninlinable.
1422 * optimize.c (calls_setjmp_r): New function.
1423 (calls_setjmp_p): Likewise.
1424
1425 1999-12-04 Mark Mitchell <mark@codesourcery.com>
1426
1427 * optimize.c (expand_call_inline): Wrap the expanded call in an
1428 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1429 inlined functions.
1430
1431 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
1432 in_target_cleanup_p.
1433 (remap_decl): New function.
1434 (remap_block): Likewise.
1435 (copy_scope_stmt): Likewise.
1436 (copy_body_r): Use remap_decl and copy_scope_stmt.
1437 (copy_body): Use VARRAY_TOP_TREE.
1438 (initialize_inlined_parameters): Likewise.
1439 (declare_return_variable): Likewise.
1440 (inlinable_function_p): Check flag_inline_trees.
1441 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1442 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
1443 parameters of the inlined function.
1444 (optimize_function): Prevent recursion into partially complete
1445 functions.
1446
1447 * cp-tree.def (SCOPE_STMT): Take one operand.
1448 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1449 (SCOPE_NULLIFIED_P): Redefine.
1450 (SCOPE_NO_CLEANUPS_P): New macro.
1451 (add_scope_stmt): Change prototype.
1452 * decl.c (poplevel): Tidy. Warn about unused variables here.
1453 Record SCOPE_STMT_BLOCKs.
1454 (finish_function): Keep DECL_INITIAL for functions that might be
1455 inlined.
1456 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1457 * semantics.c: Include rtl.h.
1458 (add_scope_stmt): Return the new scope statement and, for an
1459 end-of-scope statement, its matching begin statement. Don't set
1460 SCOPE_NULLIFIED_P.
1461 (do_pushlevel): Simplify, now that we are always
1462 function-at-a-time.
1463 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
1464 (expand_stmt): Don't call expand_start_bindings or
1465 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1466 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1467 SCOPE_NULLIFIED_P.
1468 * Makefile.in (semantics.o): Depend on RTL_H.
1469
1470 * decl2.c (pending_statics_used): Make it a macro.
1471 (saved_inlines_used): Likewise.
1472 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1473 (mark_inline_for_output): Likewise.
1474 (ssdf_decls_used): Remove.
1475 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1476 (generate_ctor_or_dtor_function): Adjust accordingly.
1477
1478 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
1479 Greg McGary <gkm@gnu.org>
1480
1481 * decl.c (duplicate_decls): Merge
1482 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1483 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1484
1485 1999-12-02 Mike Stump <mrs@wrs.com>
1486
1487 * init.c (perform_member_init): Handle parse errors better.
1488
1489 1999-12-01 Mark Mitchell <mark@codesourcery.com>
1490
1491 * cp-tree.h (min_tree_cons): Remove.
1492 (scratch_ovl_cons): Likewise.
1493 * decl.c (saveable_obstack): Don't declare.
1494 (duplicate_decls): Tweak error-message.
1495 (initialize_local_var): Explicitly mark the definition as static.
1496 (finish_function): Call permanent_allocation, just so
1497 that the middle-end sees the obstacks it expects.
1498 (mark_cp_function_context): Likewise.
1499 * init.c (build_new): Don't use min_tree_cons.
1500 * lex.c (permanent_obstack): Don't declare.
1501 (current_obstack, saveable_obstack): Likewise.
1502 * spew.c (current_obstack, saveable_obstack): Likewise.
1503 * tree.c (current_obstack, saveable_obstack): Likewise.
1504 (scratch_ovl_cons): Remove.
1505 (build_min_nt): Don't mess with obstacks.
1506 (build_min): Likewise.
1507 (min_tree_cons): Remove
1508 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1509 (build_x_function_call): Likewise.
1510 (build_c_cast): Don't use min_tree_cons.
1511
1512 1999-11-29 Mark Mitchell <mark@codesourcery.com>
1513
1514 * pt.c (tsubst_decl): Robustify.
1515
1516 1999-11-27 Mark Mitchell <mark@codesourcery.com>
1517
1518 * decl2.c (finish_file): Call expand_body for inline functions
1519 that will be written out but that do not yet have RTL.
1520 * semantics.c (expand_body): Do not generate RTL For inline
1521 functions that do not yet need to be written out.
1522
1523 1999-11-25 Mark Mitchell <mark@codesourcery.com>
1524
1525 * Make-lang.in (CXX_SRCS): Add optimize.c.
1526 * Makefile.in (CXX_OBJS): Add optimize.o.
1527 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1528 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1529 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1530 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1531 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1532 (dump.o): Likewise.
1533 (optimize.o): New target.
1534 * class.c: Don't include splay-tree.h.
1535 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
1536 * cp-tree.h: Include splay-tree.h.
1537 (DECL_UNINLINABLE): New macro.
1538 (CTOR_BEGIN_P, CTOR_END_P): New macros.
1539 (flag_inline_trees): New variable.
1540 (local_variable_p): New function.
1541 (nonstatic_local_decl_p): Likewise.
1542 (optimize_function): Likewise.
1543 (cplus_unsave_expr_now): Remove.
1544 (copy_tree_r): Declare.
1545 (remap_save_expr): Likewise.
1546 * decl.c (local_variable_p): Don't
1547 make it static.
1548 (local_variable_p_walkfn): New function.
1549 (make_rtl_for_local_static): Remove code to try to avoid writing
1550 out static constants.
1551 (emit_local_var): Fix indentation.
1552 (nonstatic_local_decl_p): New function.
1553 (check_default_argument): Use local_variable_p_walkfn, not
1554 local_variable_p, when walking the tree.
1555 (start_function): Set the DECL_CONTEXT for automatically generated
1556 labels.
1557 (finish_constructor_body): Use CTOR_STMT to mark the end of a
1558 constructor.
1559 * decl2.c: Don't include splay-tree.h.
1560 (flag_inline_trees): Define.
1561 * dump.c: Don't include
1562 splay-tree.h.
1563 * except.c (expand_end_catch_block): Fix comment formatting.
1564 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
1565 (expand_throw): Tidy comment.
1566 * init.c (build_vec_delete_1): Use create_temporary_var.
1567 * lex.c (cplus_tree_code_type): Make it static.
1568 (cplus_tree_code_length): Likewise.
1569 (cplus_tree_code_name): Likewise.
1570 * optimize.c: New file.
1571 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
1572 with computed gotos.
1573 (setup_vtbl_ptr): Mark the beginnings of constructors with
1574 CTOR_STMT.
1575 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
1576 (expand_body): Call optimize_function. Save bodies if we're doing
1577 inlining on trees.
1578 * tree.c: Don't include splay-tree.h. Include insn-config.h and
1579 integrate.h.
1580 (copy_tree_r): Make it public.
1581 (statement_code_p): New function.
1582 (mark_local_for_remap_r): Likewise.
1583 (cp_usave_r): Likewise.
1584 (cp_unsave): Likewise.
1585 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
1586 (walk_tree): Walk into `s' class nodes. Walk statement chains.
1587 (copy_tree_r): Handle 's' class nodes. Restore chains for
1588 statements. Nullify scopes. Don't copy types.
1589 (init_tree): Set lang_unsave to cp_unsave.
1590 (remap_save_expr): Define.
1591 * ir.texi: Document CTOR_STMT.
1592
1593 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
1594
1595 * search.c (note_debug_info_needed): Do perform this optimization
1596 for dwarf2.
1597 (maybe_suppress_debug_info): Likewise. Start by clearing
1598 TYPE_DECL_SUPPRESS_DEBUG.
1599
1600 1999-11-24 Mark Mitchell <mark@codesourcery.com>
1601
1602 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
1603
1604 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1605
1606 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1607
1608 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
1609 function with a non-literal format string.
1610
1611 * lex.c (do_identifier): Likewise.
1612
1613 * typeck.c (build_unary_op): Likewise.
1614
1615 1999-11-23 Mark Mitchell <mark@codesourcery.com>
1616
1617 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1618
1619 1999-11-22 Mark Mitchell <mark@codesourcery.com>
1620
1621 * cp-tree.def (CTOR_COMPLETE): New tree node.
1622 * decl.c (finish_constructor_body): Add it, to mark the end of the
1623 constructor.
1624 (finish_function): Don't call end_protect_partials here.
1625 * ir.texi (CTOR_COMPLETE): Document it.
1626 * semantics.c (expand_stmt): Handle it.
1627
1628 * cp-tree.def (FUNCTION_NAME): New tree node.
1629 * cp-tree.h (current_function_name_declared): Tweak documentation.
1630 (lang_decl_flags): Add pretty_function_p, adjust dummy.
1631 (DECL_PRETTY_FUNCTION_P): New macro.
1632 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
1633 etc., in a template function. Use at_function_scope_p instead of
1634 expanding it inline.
1635 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
1636 specially.
1637 (tsubst): Handle FUNCTION_NAME.
1638 (tsubst_copy): Likewise.
1639 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
1640 etc. in instantiation.
1641 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
1642 even in template functions.
1643 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
1644 conditional scope at the top of a destructor.
1645
1646 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
1647 specializations too.
1648
1649 1999-11-22 Nathan Sidwell <nathan@acm.org>
1650
1651 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
1652 when actually negative.
1653
1654 * typeck.c (convert_for_assignment): Expand comment about
1655 strange NULL check, moved from ...
1656 (convert_for_initialization): ... here. Remove unneeded
1657 code.
1658
1659 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1660
1661 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
1662 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
1663 Always destruct virtual bases of array components, but never
1664 delete them.
1665 (build_vec_init): Adjust invocations.
1666 (build_delete): Likewise.
1667 * decl2.c (delete_sanity): Likewise.
1668
1669 1999-11-19 Nathan Sidwell <nathan@acm.org>
1670
1671 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
1672 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
1673 * decl2.c (grok_method_quals): Accept `restrict' as applying to
1674 the object pointer. Return such qualifiers.
1675 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
1676 variables.
1677
1678 1999-11-18 Mark Mitchell <mark@codesourcery.com>
1679
1680 * except.c (expand_end_catch_block): Fix typo.
1681 (expand_exception_blocks): Simplify. Don't call
1682 expand_leftover_cleanups.
1683
1684 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
1685
1686 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
1687 * pt.c (tsubst, case INTEGER_TYPE): Call it.
1688 Check uses_template_parms.
1689
1690 * class.c (finish_struct): If we're a local class in a template
1691 function, add a TAG_DEFN.
1692 * pt.c (lookup_template_class): If this is a local class in a
1693 template function, call pushtag.
1694 (tsubst_expr, case TAG_DEFN): Handle classes, too.
1695
1696 Emit debug info with the vtable.
1697 * search.c (maybe_suppress_debug_info): New function...
1698 * class.c (finish_struct_1): ...split out from here.
1699 * cp-tree.h: Declare it.
1700 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
1701 if we're writing out the vtable.
1702 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
1703 note_debug_info_needed): #if 0 out.
1704
1705 1999-11-14 Mark Mitchell <mark@codesourcery.com>
1706
1707 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
1708 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
1709 TREE_PERMANENT.
1710 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
1711 * decl2.c (lookup_arg_dependent): Use it.
1712
1713 * cp-tree.h (cp_finish_decl): Change prototype.
1714 (finish_static_data_member_decl): Likewise.
1715 (push_permanent_obstack): Remove declaration.
1716 (push_expression_obstack): Likewise.
1717 (push_scratch_obstack): Likewise.
1718 (DECL_TEMPLATE_PARM_P): Robustify.
1719 (SET_DECL_TEMPLATE_PARM_P): New macro.
1720 * class.c (add_method): Don't manipulate obstacks.
1721 (finish_vtbls): Likewise.
1722 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
1723 * decl.c (binding_for_name): Don't manipulate obstacks.
1724 (maybe_push_to_top_level): Likewise.
1725 (pop_from_top_level): Likewise.
1726 (duplicate_decls): Likewise.
1727 (pushdecl): Likewise.
1728 (implicitly_declare): Likewise.
1729 (build_typename_type): Likewise.
1730 (start_decl): Likewise.
1731 (cp_finish_decl): Likewise.
1732 (finish_decl): Likewise.
1733 (destroy_local_static): Likewise.
1734 (expand_static_init): Likewise.
1735 (complete_array_type): Likewise.
1736 (grokvardecl): Likewise.
1737 (build_ptrmemfnc_type): Likewise.
1738 (grokdeclarator): Likewise.
1739 (xref_tag): Likewise.
1740 (xref_basetypes): Likewise.
1741 (start_enum): Likewise.
1742 (finish_enum): Likewise.
1743 (start_function): Likewise.
1744 (finish_function): Likewise.
1745 (start_method): Adjust call to cp_finish_decl.
1746 * decl2.c (finish_static_data_member_decl): Don't manipulate
1747 obstacks.
1748 (grokfield): Likewise.
1749 (grokbitfield): Likewise.
1750 (get_temp_name): Likewise.
1751 (get_sentry): Likewise.
1752 (fnish_file): Likewise.
1753 (lookup_arg_dependent): Likewise.
1754 * except.c (call_eh_info): Likewise.
1755 (push_eh_info): Likewise.
1756 (do_pop_exception): Likewise.
1757 (initialize_handler_parm): Likewise.
1758 (expand_end_eh_spec): Likewise.
1759 (alloc_eh_object): Likewise.
1760 (expand_throw): Likewise.
1761 * expr.c (extract_scalar_init): Likewise.
1762 * init.c (build_java_class_ref): Likewise.
1763 * lex.c (get_time_identifier): Likewise.
1764 (snarf_defarg): Likewise.
1765 (add_defarg_fn): Likewise.
1766 (is_global): Simplify.
1767 (do_identifier): Don't check TREE_PERMANENT.
1768 * method.c (emit_thunk): Don't manipulate obstacks.
1769 * parse.y (condition): Adjust call to cp_finish_decl.
1770 (primary): Likewise.
1771 (initdcl): Likewise.
1772 (initdcl0_innards): Likewise.
1773 (nomods_initdcl0): Likewise.
1774 * pt.c (push_inline_template_parms_recursive): Use
1775 SET_DECL_TEMPLATE_PARM_P.
1776 (process_template_parm): Likewise.
1777 (lookup_template_class): Don't manipulate obstacks.
1778 (instantiate_class_template): Adjust call to
1779 finish_static_data_member_decl.
1780 (tsubst_decl): Don't manipulate obstacks.
1781 (tsubst_expr): Likewise.
1782 (instantiate_template): Likewise.
1783 (instantiate_decl): Adjust calls to cp_finish_decl.
1784 * rtti.c (call_void_fn): Don't manipulate obstacks.
1785 (get_tinfo_var): Likewise.
1786 (get_tinfo_fn_unused): Likewise.
1787 (build_dynamic_cast_1): Likewise.
1788 (expand_si_desc): Likewise.
1789 (expand_class_desc): Likewise.
1790 (expand_ptr_desc): Likewise.
1791 (expand_attr_desc): Likewise.
1792 (expand_generic_desc): Likewise.
1793 (synthesize_tinfo_fn): Likewise.
1794 * search.c (expand_upcast_fixups): Likewise.
1795 * semantics.c (finish_asm_stmt): Likewise.
1796 (finish_named_return_value): Likewise.
1797 (begin_class_definition): Likewise.
1798 (finish_class_definition): Likewise.
1799 (finish_typeof): Likewise.
1800 * tree.c (build_cplus_method_type): Likewise.
1801 (reverse_path): Likewise.
1802 (copy_template_template_parm): Likewise.
1803 (build_expr_ptr_wrapper): Likewise.
1804 (push_expression_obstack): Remove.
1805 (push_permanent_obstack): Likewise.
1806 * typeck.c (mark_addressable): Likewise.
1807
1808 1999-11-13 Mark Mitchell <mark@codesourcery.com>
1809
1810 * call.c (build_conditional_expr): Use build_target_expr_with_type.
1811 (convert_like): Likewise.
1812 (build_over_call): Likewise.
1813 * cp-tree.h (build_target_expr): Remove.
1814 (build_target_expr_with_type): New function.
1815 * cvt.c (build_up_reference): Use get_target_expr.
1816 * decl.c (build_target_expr): Move to ...
1817 * tree.c (build_target_expr): Here. Make it static.
1818 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
1819 the temporary VAR_DECLs.
1820 (get_target_expr): Use it.
1821
1822 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
1823
1824 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
1825 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
1826 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
1827 * class.c (set_rtti_entry): Use it.
1828
1829 1999-11-12 Mark Mitchell <mark@codesourcery.com>
1830
1831 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
1832 here.
1833 * semantics.c (finish_expr_stmt): Call it here instead. Move
1834 default_conversion logic to semantic-analysis time.
1835
1836 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
1837
1838 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
1839
1840 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1841
1842 * init.c (init_init_processing): Re-instated Nov 11 patch after
1843 approval.
1844
1845 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1846
1847 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
1848 Patch had not been approved yet.
1849
1850 1999-11-12 Mark Mitchell <mark@codesourcery.com>
1851
1852 * decl.c (compute_array_index_type): New function, split out from
1853 grokdeclarator.
1854 (create_array_type_for_decl): Likewise.
1855 (grokdeclarator): Use them.
1856
1857 * semantics.c (expand_stmt): Don't suspend_momentary or
1858 resume_momentary.
1859
1860 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1861
1862 * init.c (init_init_processing): Header information for
1863 arrays allocated via `new' should have the same alignment used by
1864 malloc.
1865
1866 1999-11-10 Mark Mitchell <mark@codesourcery.com>
1867
1868 * error.c (dump_function_name): Don't crash if given a friend
1869 pseudo-instantiation.
1870
1871 * cp-tree.h (build_enumerator): Change prototype.
1872 * decl.c (enum_next_value): Remove.
1873 (enum_overflow): Likewise.
1874 (init_decl_processing): Don't register enum_next_value as a root.
1875 (start_enum): Clear TYPE_VALUES for a redefined enum.
1876 (finish_enum): Reset the type of enumeration constants.
1877 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
1878 we don't need to. Maintain the TYPE_VALUES list and look there
1879 for the previously defined enumeration constant. Let enumeration
1880 constants have the type of their values until the enumeration type
1881 is complete.
1882 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1883 (structsp): Adjust.
1884 * parse.c: Regenerated.
1885 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1886
1887 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
1888 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1889
1890 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1891
1892 1999-11-09 Mark Mitchell <mark@codesourcery.com>
1893
1894 * cp-tree.h (language_function): Remove x_last_dtor_insn and
1895 x_last_parm_cleanup_insn.
1896 * decl.c (last_dtor_insn): Remove.
1897 (last_parm_cleanup_insn): Likewise.
1898 (expand_start_early_try_stmts): Don't set them.
1899 (store_parm_decls): Likewise.
1900 (save_function_data): Or save them.
1901 (mark_lang_function): Or mark them.
1902
1903 1999-11-08 Mark Mitchell <mark@codesourcery.com>
1904
1905 * decl.c (store_parm_decls): Generate cleanup code at
1906 semantic-analysis time. Destroy objects in the correct order.
1907
1908 1999-11-07 Mark Mitchell <mark@codesourcery.com>
1909
1910 * cp-tree.h (begin_new_placement): Remove.
1911 (finish_new_placement): Likewise.
1912 * class.c (finish_struct_1): Don't suspend_momentary or
1913 resume_momentary.
1914 * decl.c (grokdeclarator): Likewise.
1915 (maybe_build_cleanup_1): Likewise.
1916 * except.c (push_eh_cleanup): Likewise.
1917 (build_terminate_handler): Likewise.
1918 * init.c (build_new_1): Likewise.
1919 * parse.y (parse_decl): Change prototype.
1920 (initdecls, notype_initdecls, initdcl): Don't return int.
1921 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1922 (.begin_new_placement): Remove.
1923 (.finish_new_placement): Likewise.
1924 (nonmomentary_expr): Likewise.
1925 (suspend_mom): Likewise.
1926 (condition): Don't suspend_momentary, resume_momentary, or keep
1927 track of need to resume.
1928 (unary_expr): Likewise.
1929 (new_placement): Likewise.
1930 (decl): Likewise.
1931 (structsp): Likewise.
1932 (new_type_id): Likewise.
1933 (maybe_parmlist): Likewise.
1934 (direct_after_type_declaration): Likewise.
1935 (direct_new_declarator): Likewise.
1936 (direct_abstract_declaration): Likewise.
1937 * parse.c: Regenerated.
1938 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1939 * semantics.c (begin_new_placement): Remove.
1940 (finish_new_placement): Likewise.
1941
1942 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1943
1944 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1945 (DECL_TEMPLATE_INFO): Use it.
1946 * decl.c (warn_extern_redeclared_static): Do nothing for
1947 TEMPLATE_DECLs.
1948 * decl2.c (mark_used): Explicitly check for function or variable.
1949 * semantics.c (finish_unary_op_expr): Check whether result is also
1950 an INTEGER_CST.
1951
1952 1999-11-05 Mark Mitchell <mark@codesourcery.com>
1953
1954 * Makefile.in (typeck2.o): Depend on output.h.
1955 * typeck2.c: Include output.h.
1956
1957 * decl.c (flag_ansi): Remove declaration.
1958
1959 * pt.c (tinst_level_tick): Make it static.
1960 (last_template_error_tick): Likewise.
1961
1962 * cp-tree.h (mapcar): Remove declaration.
1963 (search_tree): Likewise.
1964 (walk_tree_fn): New typedef.
1965 (walk_tree): New function.
1966 * tree.c (bot_manip): Change prototype. Adjust to be called via
1967 walk_tree.
1968 (bot_replace): Likewise.
1969 (no_linkage_helper): Likewise.
1970 (copy_tree_r): New function.
1971 (search_tree): Rename, and adjust, to become ...
1972 (walk_tree): New function.
1973 (mapcar): Remove.
1974 (target_remap): Remove.
1975 (target_remap_count): Likewise.
1976 (break_out_target_exprs): Use walk_tree.
1977 * decl.c (local_variable_p): Change prototype.
1978 (check_default_argument): Use walk_tree.
1979 * pt.c (for_each_template_parm_r): New function, split out from ...
1980 (for_each_template_parm): Here. Use it, via walk_tree.
1981
1982 1999-11-03 Mark Mitchell <mark@codesourcery.com>
1983
1984 * class.c (check_bitfield_decl): New function, split out from
1985 finish_stuct_1.
1986 (check_field_decl): Likewise. Recursively examine members of
1987 anonymous structs.
1988 (finish_struct_1): Use them.
1989 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
1990
1991 1999-11-02 Mark Mitchell <mark@codesourcery.com>
1992
1993 * decl.c (grokfndecl): Remove dead code.
1994
1995 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
1996
1997 1999-11-02 Scott Snyder <snyder@fnal.gov>
1998
1999 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2000 IMAGPART_EXPR.
2001 * pt.c (tsubst_copy): Likewise.
2002
2003 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2004
2005 * decl2.c (maybe_make_one_only): Always make things comdat on
2006 ELF targets, too.
2007
2008 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2009
2010 * decl.c (finish_function): Call free_after_parsing for functions
2011 we are not immediately turning into RTL.
2012
2013 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2014
2015 * cp-tree.h (flag_dump_translation_unit): Add decl.
2016
2017 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2018
2019 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2020
2021 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2022
2023 * decl.c (pop_cp_function_context): Don't call free on a NULL
2024 pointer.
2025 * semantics.c: Include ggc.h.
2026 (expand_body): Do garbage-collection after processing a template
2027 function. Clear DECL_SAVED_TREE after generating RTL for a
2028 function.
2029 * Makefile.in (semantics.o): Depend on ggc.h.
2030
2031 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2032
2033 * cp-tree.h (make_typename_type): Change prototype.
2034 * decl.c (make_typename_type): Only complain if so requested.
2035 * parse.y (nested_name_specifier): Adjust calls.
2036 (typename_sub0): Likewise.
2037 (typename_sub1): Likewise.
2038 * parse.c: Regenerated.
2039 * pt.c (convert_template_argument): Pass complain to
2040 make_typename_type.
2041 (tsubst): Likewise.
2042
2043 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2044
2045 * semantics.c (finish_handler): End the scope of the handler
2046 before attaching it to the statement-tree.
2047
2048 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2049
2050 * rtti.c (build_dynamic_cast_1): Give a better error message for
2051 an attempt to dynamic_cast from a non-polymorphic type.
2052
2053 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2054
2055 * cp-tree.h (make_temp_vec): Remove.
2056 (make_scratch_vec): Likewise.
2057 * call.c (add_function_candidate): Use make_tree_vec.
2058 (add_conv_candidate): Likewise.
2059 (build_builtin_candidate): Likewise.
2060 (add_template_candidate_real): Likewise.
2061 * class.c (resolve_address_of_overloaded_function): Likewise.
2062 * decl.c (start_function): Don't fool with the momentary obstack.
2063 (finish_function): Likewise.
2064 * init.c (expand_direct_vtbls_init): Likewise.
2065 (begin_init_stmts): Likewise.
2066 (finish_init_stmts): Likewise.
2067 * pt.c (add_to_template_args): Use make_tree_vec.
2068 (check_explicit_specialization): Likewise.
2069 (coerce_template_parms): Likewise.
2070 (lookup_template_class): Don't fool with the momentary obstack.
2071 (instantiate_class_template): Likewise.
2072 (tsubst_template_arg_vector): Use make_tree_vec.
2073 (tsubst_aggr_type): Don't fool with the momentary obstack.
2074 (tsubst_decl): Likewise. Use make_tree_vec.
2075 (try_one_overload): Likewise.
2076 (try_class_unification): Don't fool with the momentary obstack.
2077 (get_bindings_real): Use make_tree_vec.
2078 (set_mangled_name_for_template_decl): Likewise.
2079 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2080 * semantics.c (finish_expr_stmt): Likewise.
2081 (finish_do_stmt): Likewise.
2082 (finish_for_expr): Likewise.
2083 (finish_switch_cond): Likewise.
2084 (do_pushlevel): Likewise.
2085 (do_poplevel): Likewise.
2086 * tree.c (make_temp_vec): Remove.
2087
2088 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2089 CLEANUP_P for a TRY_BLOCK.
2090 * ir.texi: Document SAVE_EXPR.
2091
2092 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2093
2094 * call.c (build_over_call): Check that the built-in function is
2095 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2096 * typeck.c (build_function_call_real): Similarly.
2097
2098 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2099
2100 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2101 remember_end_note.
2102
2103 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2104
2105 * decl.c (push_overloaded_decl_1): Use pushdecl.
2106
2107 * decl.c (auto_function): Replace #ifdef'd __inline with just
2108 plain inline.
2109 * lex.c (my_get_run_time): Likeise.
2110 (yyprint): Likewise.
2111 (identifier_type): Likewise.
2112 * method.c (start_squangling): Likewise.
2113 (end_squangling): Likewise.
2114 (icat): Likewise.
2115 (old_backref_index): Likewise.
2116 (flush_repeats): Likewise.
2117 (issue_ktype): Likewise.
2118 * parse.y (empty_parms): Likewise.
2119 * parse.c: Regenerated.
2120
2121 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2122
2123 * dump.c (dequeue_and_dump): Replace several uses of
2124 queue_and_dump_index with dump_child.
2125
2126 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2127
2128 * expr.c: Include tm_p.h.
2129
2130 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2131
2132 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2133 (pushlevel_temporary): Remove.
2134 (add_scope_stmt): New function.
2135 * decl.c (pushlevel_temporary): Remove.
2136 (poplevel): Use add_scope_stmt.
2137 (start_decl_1): Likewise.
2138 * semantics.c (add_scope_stmt): New function.
2139 (do_pushlevel): Use it.
2140 (do_poplevel): Use it.
2141 (expand_stmt): Check SCOPE_PARTIAL_P.
2142
2143 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2144 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2145 * expr.c (cplus_expand_expr): Expand it.
2146 * ir.texi: Document EMPTY_CLASS_EXPR.
2147
2148 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2149
2150 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2151 parameters as having namespace scope.
2152
2153 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2154
2155 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2156 (mangling_flags): New type.
2157 (build_overload_int): Change prototype.
2158 (build_overload_value): Likewise.
2159 (numeric_output_need_bar): Improve comment.
2160 (mangle_expression): New function, broken out from ...
2161 (build_overload_int): Here.
2162 (build_overload_value): Adjust for use of mangling flags. Don't
2163 warn about real-valued template parameters here. Do handle
2164 complex expressions involving real-valued template parameters.
2165 (build_template_parm_names): Encase non-type template parameters
2166 in underscores, if necessary.
2167 (process_overload_item): Remove conditional on
2168 PARM_CAN_BE_ARRAY_TYPE.
2169
2170 1999-10-17 Mark Mitchell <mark@codesourcery.com>
2171
2172 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2173
2174 * ir.texi: Clean up documentation of RETURN_INIT.
2175
2176 1999-10-15 Greg McGary <gkm@gnu.org>
2177
2178 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2179 (lang_init): Set default for flag_bounds_check if still "unspecified".
2180
2181 1999-10-13 Andrew Haley <aph@cygnus.com>
2182
2183 * class.c (finish_struct_1): Force alignment of non-bitfields to
2184 BITS_PER_UNIT.
2185
2186 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
2187
2188 * typeck2.c (process_init_constructor): Handle empty constructors.
2189
2190 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
2191
2192 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2193
2194 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2195 array error.
2196
2197 1999-10-13 Mark Mitchell <mark@codesourcery.com>
2198
2199 * decl.c (make_rtl_for_local_static): Don't create register RTL
2200 for addressable constants.
2201
2202 1999-10-13 Nathan Sidwell <nathan@acm.org>
2203
2204 * cp-tree.h (build_x_va_arg): Prototype new function.
2205 * call.c (build_x_va_arg): Define it.
2206 * parse.y (unary_expr): Call build_x_va_arg.
2207
2208 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2209 * call.c (convert_type_from_ellipsis): Define it.
2210 * decl.c (init_decl_processing): Set lang_type_promotes_to.
2211
2212 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2213
2214 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
2215
2216 * class.c (fixed_type_or_null): Always set *nonnull.
2217
2218 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2219
2220 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2221 __GNUC__ and __GNUC_MINOR__.
2222
2223 1999-10-09 Mark Mitchell <mark@codesourcery.com>
2224
2225 * cp-tree.h (make_rtl_for_local_static): New function.
2226 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2227 local statics ...
2228 (make_rtl_for_local_static): Here.
2229 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2230
2231 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2232
2233 * method.c: Include tm_p.h.
2234
2235 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2236
2237 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2238 * lex.c (cp_make_lake_type): Likewise.
2239 * tree.c (init_tree): Init make_lang_type_fn.
2240
2241 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2242
2243 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2244 paramter.
2245
2246 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2247 local statics if we don't really have them.
2248
2249 * ir.texi: Improve documentation for STMT_EXPR. Describe
2250 CLEANUP_POINT_EXPR.
2251
2252 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
2253
2254 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2255
2256 1999-10-07 Greg McGary <gkm@gnu.org>
2257
2258 * class.c (finish_struct_1): Use simpler method of
2259 removing elements of a singly-linked list which doesn't
2260 lose for classes without data members.
2261
2262 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2263
2264 * friend.c (make_friend_class): Robustify.
2265
2266 * semantics.c (finish_object_call_expr): Reject calls to template
2267 types.
2268
2269 1999-10-06 Mark Mitchell <mark@codesourcery.com>
2270
2271 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2272
2273 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2274 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2275 CLASSTYPE_VFIELD.
2276 * class.c (get_vfield_offset): Likewise.
2277 (finish_base_struct): Likewise.
2278 (modify_one_vtable): Likewise.
2279 (fixup_vtable_deltas): Likewise.
2280 (finish_struct_1): Likewise.
2281 * init.c (expand_virtual_init): Likewise.
2282 * search.c (lookup_field_1): Likewise.
2283 (expand_upcast_fixups): Likewise.
2284 * typeck.c (build_component_ref): Likewise.
2285 (build_binary_op_nodefault): Likewise.
2286
2287 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2288 * ir.texi: Document TYPE_VFIELD.
2289
2290 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
2291
2292 * decl.c (grokdeclarator): Only warn about non-zero arrays if
2293 !in_system_header (linux socketbits.h can give this for
2294 __cmsg_data, which is using a GNU extension).
2295
2296 1999-10-05 Mark Mitchell <mark@codesourcery.com>
2297
2298 * decl2.c (start_static_storage_duration_function): Push the
2299 function declaration so it ends up in namespace scope.
2300
2301 * dump.c (DUMP_CHILDREN): Remove.
2302 (DUMP_BINFO): Adjust.
2303 (struct dump_node_info): Remove dump_children_p.
2304 (queue_and_dump_type): Remove dump_children_p parameter.
2305 (queue): Don't set dump_children_p.
2306 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2307 queue_and_dump_index.
2308 (dequeue_and_dump): Unconditionally print children. Adjust calls
2309 to functions mentioned above.
2310 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2311
2312 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2313 * dump.c (dequeue_and_dump): Dump them.
2314
2315 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2316
2317 * decl.c (start_function): Set current_in_charge_parm for
2318 constructors, too, where appropriate.
2319 * search.c (fixup_all_virtual_upcast_offsets): New function.
2320 (expand_indirect_vtbls_init): Use it.
2321
2322 1999-10-04 Nathan Sidwell <nathan@acm.org>
2323
2324 * decl2.c (grok_alignof): Don't decay lvalues.
2325
2326 * init.c (build_new): Remove unused variable.
2327
2328 1999-10-04 Mark Mitchell <mark@codesourcery.com>
2329
2330 * cp-tree.h (struct language_function): Remove static_labelno.
2331 (static_labelno): Remove macro.
2332 * method.c (build_overload_nested_name): Make static_labelno
2333 static here.
2334
2335 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2336 to decide whether or not a function is defined.
2337
2338 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2339 situations where make_node will do it automatically.
2340 * decl.c (grok_reference_init): Likewise.
2341 (expand_static_init): Likewise.
2342 (do_static_initialization): Likewise.
2343 * init.c (perform_member_init): Likewise.
2344 (expand_aggr_init_1): Likewise.
2345 (build_new_1): Likewise.
2346 * method.c (do_build_copy_constructor): Likewise.
2347 (do_build_assign_ref): Likewise.
2348 * search.c (expand_upcast_fixups): Likewise.
2349 * semantics.c (finish_stmt_expr): Likewise.
2350 * typeck.c (build_unary_op): Likewise.
2351 (check_return_expr): Likewise.
2352
2353 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
2354
2355 * init.c (build_vec_delete_1): Fold COND_EXPRs.
2356
2357 1999-10-03 Mark Mitchell <mark@codesourcery.com>
2358
2359 * cp-tree.def (VEC_INIT_EXPR): Remove.
2360 * cp-tree.h (struct stmt_tree): New type.
2361 (struct saved_scope): Remove firstobj. Add x_saved_tree,
2362 x_stmt_tree.
2363 (class_cache_firstobj): Remove.
2364 (struct language_function): Remove stmts_are_full_exprs_p,
2365 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
2366 (current_stmt_tree): New macro.
2367 (last_tree): Adjust.
2368 (last_expr_type): Likewise.
2369 (doing_semantic_analysis_p): Simplify.
2370 (stmts_are_full_exprs_p): Adjust.
2371 (begin_tree): Remove prototype.
2372 (end_tree): Likewise.
2373 (begin_stmt_tree): Change prototype.
2374 (finish_stmt_tree): Likewise.
2375 (building_stmt_tree): Simplify.
2376 * decl.c (mark_stmt_tree): New function.
2377 (mark_saved_scope): Use it.
2378 (start_function): Rearrange slightly to call begin_stmt_tree
2379 earlier.
2380 (save_function_data): Tweak.
2381 (finish_function): Adjust call to finish_stmt_tree.
2382 (mark_lang_function): Use mark_stmt_tree.
2383 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2384 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2385 (build_vec_init): Remove creation of stand-in intializer.
2386 * pt.c (begin_tree): Remove.
2387 (end_tree): Likewise.
2388 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
2389 (begin_compound_stmt): Handle a compound-statement outside of a
2390 function.
2391 (begin_stmt_expr): Handle a statement-expression outsidef of a
2392 function.
2393 (finish_stmt_expr): Likewise.
2394 (begin_class_definition): Don't call begin_tree.
2395 (finish_inline_definitions): Don't call end_tree.
2396 (begin_stmt_tree): Take a pointer to tree, not a function as input.
2397 (finish_stmt_tree): Likewise.
2398 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2399 (mapcar): Likewise.
2400
2401 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2402 * parse.c: Regenerated.
2403
2404 * dump.c (dqueue_and_dump): Dump bitfieldness.
2405
2406 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2407 bitfields, rather than DECL_BIT_FIELD.
2408 * ir.texi: Document how to tell whether or not a field is a
2409 bitfield.
2410
2411 * lex.c (make_lang_type): Fix typo in comment.
2412
2413 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
2414
2415 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2416
2417 1999-10-01 Mark Mitchell <mark@codesourcery.com>
2418
2419 * pt.c (tsubst_decl): If the type of a template instantiation is
2420 bogus, so is the whole instantiation.
2421
2422 1999-09-30 Mark Mitchell <mark@codesourcery.com>
2423
2424 * decl.c (initialize_local_var): Handle static variables here.
2425 (cp_finish_decl): Tweak handling of function-scope static
2426 variables.
2427 * semantics.c (expand_stmt): Handle DECL_STMTs for static
2428 variables.
2429
2430 * method.c (emit_thunk): Don't crash when -fsyntax-only.
2431
2432 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2433 global_dtor_p. Add init_priority.
2434 (DECL_ACCESS): Adjust accordingly.
2435 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2436 (GLOBAL_INIT_PRIORITY): Likewise.
2437 * decl.c (lang_mark_tree): Adjust accordingly.
2438 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
2439 and GLOBAL_INIT_PRIORITY.
2440 * dump.c (dequeue_and_dump): Print them.
2441 * ir.texi: Document them.
2442
2443 * decl2.c (struct priority_info_s): Remove initialization_sequence
2444 and destruction_sequence.
2445 (start_static_storage_duration_function): Return the body of the
2446 function. Convert for function-at-a-time mode.
2447 (generate_inits_for_priority): Remove.
2448 (finish_static_storage_duration_function): Change prototype.
2449 Adjust for function-at-a-time mode.
2450 (do_static_initialization): Likewise.
2451 (do_static_destruction): Likewise.
2452 (do_static_initialization_and_destruction): Remove.
2453 (start_static_initialization_or_destruction): New function.
2454 (finish_static_initialization_or_destruction): Likewise.
2455 (get_priority_info): Don't manipulation initialization_sequence or
2456 destruction_sequence.
2457 (prune_vars_needing_no_initialization): New function.
2458 (write_out_vars): Likewise.
2459 (finish_file): Use the various new functions instead of the old.
2460
2461 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
2462
2463 * cp-tree.h (warn_float_equal): Declare.
2464 * decl2.c (warn_float_equal): Define.
2465 (lang_decode_option): Recognize -W[no-]float-equal.
2466 * typeck.c (build_binary_op_nodefault): Conditionally warn
2467 about equality tests of floating point types.
2468
2469 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
2470
2471 Support normal type_info-based EH mechanisms with -fno-rtti.
2472 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2473 (build_eh_type_type_ref): Likewise.
2474 (build_eh_type): Remove.
2475 (expand_throw): Call build_eh_type_type, not build_eh_type.
2476 * decl2.c (import_export_decl): Don't associate the tinfo fn with
2477 the vtable if -fno-rtti.
2478 * decl.c (init_decl_processing): Always init_rtti_processing.
2479
2480 * rtti.c (get_typeid): Don't complain about -fno-rtti.
2481
2482 * class.c (class_cache_obstack, class_obstack): Remove.
2483 (init_class_processing): Don't initialize class_obstack.
2484 (push_cache_obstack): Remove.
2485 (pushclass): Don't call it.
2486 * cp-tree.h: Remove prototype for push_cache_obstack.
2487 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2488 (pushlevel_class): Don't push_decl_level.
2489 (poplevel_class): Don't pop_stack_level.
2490 (push_class_level_binding): Don't push_cache_obstack.
2491 (init_decl_processing): Don't intialize decl_obstack.
2492 * search.c (push_class_decls): Don't push_cache_obstack.
2493 * tree.c (list_hash_add): Put hash node on permanent_obstack.
2494 (hash_tree_cons): Don't mess with obstacks.
2495 (print_lang_statistics): Don't print stats for class_obstack and
2496 decl_obstack.
2497
2498 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2499
2500 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2501 * ir.texi: Document DECL_EXTERNAL.
2502
2503 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2504 * ir.texi: Document THUNK_DECLs.
2505
2506 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2507 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2508 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2509 * error.c (dump_template_bindings): Remove unused parameter.
2510 Handle multiple levels of template parameters.
2511 (dump_template_decl): Use `parms', not `args', for template
2512 parameters. Fix thinko.
2513 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
2514 flags to dump_template_bindings.
2515 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2516 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2517 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2518 (tsubst_copy): Clarify variable name.
2519 (most_general_template): Robustify.
2520
2521 1999-09-29 Nathan Sidwell <nathan@acm.org>
2522
2523 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2524 to change primary template rendering.
2525
2526 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2527
2528 * cp-tree.h (UPT_TEMPLATE): Remove.
2529 (UPT_PARMS): Likewise.
2530 (DECL_NEEDED_P): New macro.
2531 * decl2.c (finish_vtable_vardecl): Use it.
2532 (finish_objects): Don't crash with -fsyntax-only.
2533 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
2534 -fsyntax-only.
2535 * pt.c (tsubst_friend_function): Remove FIXME that talks about
2536 obstacks.
2537 (tsubst_expr): Correct handling of function try-blocks.
2538 * semantics.c: Include flags.h.
2539 (expand_body): Don't do RTL generation if -fsyntax-only.
2540 * Makefile.in (semantics.o): Depends on flags.h.
2541
2542 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
2543
2544 * pt.c (most_general_template): Adjust declaration.
2545
2546 * cp-tree.h: (most_general_template): Declare.
2547
2548 * error.c (dump_template_value): Rename to ...
2549 (dump_template_argument): This.
2550 (dump_template_argument_list): New function.
2551 (dump_type): Use it.
2552 (dump_template_parameter): New function.
2553 (dump_template_decl): Use it.
2554 (dump_template_bindings): New function.
2555 (dump_function_decl): Use it. Pretty print function template
2556 instantiations.
2557
2558 1999-09-28 Nathan Sidwell <nathan@acm.org>
2559
2560 * decl.c (grokdeclarator): Distinguish parameter context for
2561 diagnostics. Tidy up missing type diagnostic.
2562 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
2563
2564 1999-09-28 Mark Mitchell <mark@codesourcery.com>
2565
2566 * ir.texi: Improve documentation for TARGET_EXPR.
2567
2568 1999-09-27 Nathan Sidwell <nathan@acm.org>
2569
2570 Augment stringification of trees.
2571 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
2572 (fndecl_as_string, type_as_string_real, args_as_string,
2573 code_as_string, language_as_string, parm_as_string,
2574 op_as_string, assop_as_string, cv_as_string): Remove.
2575 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
2576 (context_as_string): Declare new function.
2577 * error.c (cp_printers): Move definition.
2578 (OB_UNPUT): Remove.
2579 (OB_END_TEMPLATE_ID): Adjust.
2580 (interesting_scope_p): Remove.
2581 (dump_scope): New static function.
2582 (dump_qualifiers): Adjust prototype, reimplement.
2583 (dump_template_value): Use tree_string_flags.
2584 (dump_type_real): Move back to dump_type.
2585 (dump_type): Adjust prototype. Use tree_string_flags.
2586 (dump_aggr_type): Likewise. Use dump_template_parms.
2587 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
2588 Return pad flag.
2589 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
2590 (dump_simple_decl): Likewise.
2591 (dump_decl): Likewise. Use dump_template_decl.
2592 (dump_template_decl): New static function broken out of dump_decl.
2593 (dump_function_decl): Adjust prototype. Use tree_string_flags.
2594 (dump_parameters): Likewise. Prefix space.
2595 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
2596 (dump_function_name): Likewise. Use dump_template_parms.
2597 (dump_template_parms): New static function broken out of
2598 dump_function_name.
2599 (dump_expr_list): Adjust prototype. Use tree_string_flags.
2600 (dump_expr): Likewise.
2601 (fndecl_as_string): Removed
2602 (type_as_string_real): Removed
2603 (dump_binary_op): Adjust prototype. Use tree_string_flags.
2604 (dump_unary_op): Likewise.
2605 (type_as_string): Likewise.
2606 (expr_as_string): Likewise.
2607 (decl_as_string): Likewise.
2608 (context_as_string): New function.
2609 (lang_decl_name): Adjust.
2610 (decl_to_string): New static print callback.
2611 (expr_to_string): Likewise.
2612 (fndecl_to_string): Likewise.
2613 (code_as_string): Renamed to ...
2614 (code_to_string): ... here. Adjust.
2615 (language_as_string): Renamed to ...
2616 (language_to_string): ... here. Adjust.
2617 (parm_as_string): Renamed to ...
2618 (parm_to_string): ... here.
2619 (op_as_string): Renamed to ...
2620 (op_to_string): ... here.
2621 (assop_as_string): Renamed to ...
2622 (assop_to_string): ... here.
2623 (type_to_string): New static print callback.
2624 (args_as_string): Renamed to ...
2625 (args_to_string): ... here. Adjust.
2626 (cv_as_string): Renamed to ...
2627 (cv_to_string): ... here. Adjust.
2628 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
2629 (print_template_context): Likewise.
2630
2631 1999-09-26 Mark Mitchell <mark@codesourcery.com>
2632
2633 * cp-tree.h (expand_throw): Remove prototype.
2634 * except.c (expand_throw): Make it static. Use tree-generation
2635 functions, rather than RTL-generation functions.
2636 (build_throw): Use it.
2637 * expr.c: Include except.h.
2638 (cplus_expand_expr): Don't call expand_throw here.
2639 * Makefile.in (expr.o): Depend on except.h.
2640 * ir.texi: Update documentation for THROW_EXPR.
2641
2642 * decl.c (start_function): Set x_dont_save_pending_sizes rather
2643 than calling get_pending_sizes.
2644 * init.c (build_new): Don't save and restore
2645 immediate_size_expand; instead, assert that it has the expected
2646 value already.
2647
2648 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2649
2650 * lex.c (compiler_error): Add missing call to va_end().
2651
2652 1999-09-25 Mark Mitchell <mark@codesourcery.com>
2653
2654 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
2655 * ir.texi: Document RESULT_DECL and DECL_RESULT.
2656
2657 * cp-tree.h (check_return_expr): New function.
2658 * decl.c (finish_constructor_body): New function.
2659 (pushdecl): Put global friend functions in namespace binding
2660 level, not the class binding level.
2661 (finish_destructor_body): Make sure the dtor_label is always
2662 defined. Fix typo in comment.
2663 (finish_function): Move generation of constructor-termination code
2664 to semantic-analysis time. Move generation of implicit `main'
2665 return value to semantic-analysis time.
2666 * semantics.c (finish_return_stmt): Generate goto's to
2667 ctor_label/dtor_label here. Use check_return_expr to do semantic
2668 analysis on the returned expression.
2669 * typeck.c (maybe_warn_about_returning_address_of_local): New
2670 function split out from c_expand_return.
2671 (check_return_expr): Likewise.
2672 (c_expand_return): Just generate the RTL for the return.
2673
2674 1999-09-24 Mark Mitchell <mark@codesourcery.com>
2675
2676 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
2677 (cleanup_type): Likewise.
2678 (search_tree): Change prototype.
2679 * decl.c (local_variable_p): Adjust for new interface to
2680 search_tree.
2681 (check_default_argument): Likewise.
2682 * error.c (dump_expr): Handle INIT_EXPR.
2683 * except.c (expand_throw): Don't make cleanup_type a local static.
2684 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
2685 * init.c (build_new): Call build_new_1 directly, rather than
2686 building a NEW_EXPR.
2687 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
2688 processing file-scope initializers.
2689 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
2690 * tree.c: Include splay-tree.h
2691 (no_linkage_helper): Adjust for new interface to search_tree.
2692 (search_tree): Pass around pointers to tree nodes, rather than the
2693 nodes themselves. Handle VEC_INIT_EXPR.
2694 (no_linkage_check): Adjust for new interface to search_tree.
2695 (mapcar): Handle VEC_INIT_EXPR.
2696 (target_remap): New variable.
2697 (bot_manip): Use it.
2698 (bot_replace): New function.
2699 (break_out_target_exprs): Use it to remap all variables used in a
2700 default argument expression.
2701 * typeck.c (build_modify_expr): Don't crash when outside a
2702 function and presented with an INIT_EXPR assignment
2703 * Makefile.in (tree.o): Depend on splay-tree.h.
2704
2705 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2706
2707 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
2708 DECL_BUILT_IN.
2709 (builtin_function): New arg CLASS. Arg CODE now of type int. All
2710 callers changed.
2711 Set the builtin's DECL_BUILT_IN_CLASS.
2712
2713 1999-09-24 Mark Mitchell <mark@codesourcery.com>
2714
2715 * decl.c (pushdecl): Don't make local declarations of extern
2716 variables give the variable a DECL_CONTEXT for the function.
2717 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
2718 Don't accidentally make RTL for local declarations.
2719 (emit_local_var): Handle declarations with asm-specifiers here.
2720
2721 1999-09-23 Mark Mitchell <mark@codesourcery.com>
2722
2723 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
2724 STMT_IS_FULL_EXPR_P.
2725
2726 * cp-tree.h (language_function): Add cannot_inline.
2727 * decl.c (start_function): Restore current_function_cannot_inline
2728 from the saved value.
2729 (save_function_data): Save current_function_cannot_inline.
2730 * decl2.c (start_objects): Change prototype. Build the function
2731 in function-at-a-time mode.
2732 (finish_objects): Likewise.
2733 (generate_ctor_or_dtor_function): Adjust accordingly.
2734
2735 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
2736 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
2737 Don't call expand_anon_union_decl here
2738 * semantics.c (exapnd_stmt): Call it here, instead.
2739 * typeck.c (mark_addressable): Addressed variables are implicitly
2740 used.
2741
2742 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2743
2744 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
2745 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
2746 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
2747 * cp-tree.h: Add tree checking macros to various tree access
2748 macros.
2749 * ptree.c (print_lang_decl): Test for function or variable
2750 before accessing template info.
2751
2752 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
2753
2754 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
2755 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
2756 * decl2.c (lang_f_options): Add -fshort-wchar.
2757 * cp-tree.h: Declare flag_short_wchar.
2758 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
2759 int' for wchar_t.
2760
2761 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2762
2763 * ir.texi: Fix formatting errors and typos.
2764
2765 1999-09-22 Mark Mitchell <mark@codesourcery.com>
2766
2767 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
2768
2769 * decl.c (pushdecl): Do create a binding for extern "C" functions,
2770 but not for their DECL_ASSEMBLER_NAMEs.
2771 (lookup_name_current_level): Fix formatting.
2772 (xref_tag): Likewise.
2773 * decl2.c (start_objects): Mark static constructors and
2774 destructors as used.
2775
2776 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
2777
2778 * decl.c (define_case_label): Don't crash if we're not in a switch.
2779
2780 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
2781 * lang-options.h: Restore -fthis-is-variable. Remove help strings
2782 for unsupported flags.
2783
2784 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
2785
2786 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
2787 Accept and warn about -fthis-is-variable.
2788
2789 1999-09-21 Mark Mitchell <mark@codesourcery.com>
2790
2791 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
2792 CLEANUP_STMT, and SCOPE_STMT.
2793
2794 * decl2.c (lang_decode_option): Adjust, in the wake of recent
2795 changes to option processing.
2796
2797 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2798
2799 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
2800 function pointer from pmfs with no object given.
2801 (convert_for_assignment): Do not return error when converting
2802 pmfs.
2803
2804 1999-09-21 Alex Samuel <samuel@codesourcery.com>
2805
2806 * lex.c (internal_filename): New variable.
2807 (INTERNAL_FILENAME): New macro.
2808 (init_parse): Allocate internal_filename and mark as root. Use it
2809 instead of a string constant.
2810
2811 1999-09-21 Nathan Sidwell <nathan@acm.org>
2812
2813 Reimplement dynamic cast and catch matching.
2814 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
2815 * search.c (dynamic_cast_base_recurse): New function.
2816 (get_dynamic_cast_base_type): New function for dynamic cast.
2817 * rtti.c (build_dynamic_cast_1): Determine source and target
2818 class relationship. Call __dynamic_cast_2.
2819 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
2820 (__user_type_info::dyncast): New dynamic cast dispatcher.
2821 (__user_type_info::sub_kind): New nested enumeration.
2822 (__user_type_info::contained_p): sub_kind predicate.
2823 (__user_type_info::contained_public_p): Likewise.
2824 (__user_type_info::contained_nonpublic_p): Likewise.
2825 (__user_type_info::contained_nonvirtual_p: Likewise.
2826 (__user_type_info::upcast_result): New nested struct.
2827 (__user_type_info::dyncast_result): New nested struct.
2828 (*::do_upcast): New catch function.
2829 (*::do_dyncast): New dynamic cast function.
2830 (__user_type_info::find_public_subobj): New dynamic cast
2831 helper dispatcher.
2832 (*::do_find_public_subobj): New dynamic cast helper function.
2833 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
2834 (__user_type_info::dyncast): Define dynamic cast dispatcher.
2835 (*::do_upcast): Define catch function.
2836 (*::do_dyncast): Define dynamic cast function.
2837 (*::do_find_public_subobj): Define dynamic cast helper function.
2838 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
2839 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
2840 (__dynamic_cast_2): New dynamic cast runtime.
2841
2842 1999-09-20 Mark Mitchell <mark@codesourcery.com>
2843
2844 * cp-tree.h (finish_stmt_expr): Change prototype.
2845 * expr.c (cplus_expand_expr): Adjust call accordingly.
2846 * init.c (finish_init_stmts): Likewise.
2847 * parse.y (primary): Likewise.
2848 * pt.c (tsubst_copy): Likewise.
2849 * semantics.c (finish_stmt_expr): Don't take two parameters.
2850 Don't remove generated BLOCKs from the block-tree.
2851
2852 Remove support for assigning to `this'.
2853 * NEWS: Note that fact.
2854 * class.c (build_vbase_path): Don't check flag_this_is_variable.
2855 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2856 (language_function): Remove assigns_this, just_assigned_this, and
2857 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
2858 (base_init_expr): Remove.
2859 (current_vcalls_possible_p): New macro.
2860 (vtbls_set_up_p): Likewise.
2861 (emit_base_init): Change prototype.
2862 * decl.c (finish_destructor_body): New function, split out from
2863 finish_function.
2864 (current_function_assigns_this): Remove.
2865 (current_function_just_assigned_this): Likewise.
2866 (start_function): Don't set them.
2867 (finish_function): Don't check them. Don't emit
2868 base-initialization code here. Generate code for destructors when
2869 doing semantic analysis.
2870 (finish_stmt): Don't check current_function_just_assigned_this.
2871 * decl2.c (lang_f_options): Remove this-is-variable.
2872 (lang_decode_option): Likewise.
2873 (grokclassfn): Don't check flag_this_is_variable.
2874 * init.c (emit_base_init): Return the expression generated.
2875 (construct_virtual_bases): Don't push/pop obstacks. Fix
2876 typo.
2877 (build_new_1): Don't check flag_this_is_variable.
2878 (get_temp_regvar): Don't set DECL_REGISTER.
2879 (build_vec_init): Don't call use_variable.
2880 * lang-options.h: Remove "-fthis-is-variable" and
2881 "-fno-this-is-variable".
2882 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2883 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2884 expand_expr_stmt.
2885 * semantics.c (finish_expr_stmt_real): Rename to ...
2886 (finish_expr_stmt): This. Remove assigned_this parameter.
2887 (begin_if_stmt): Call do_pushlevel before starting the statement.
2888 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2889 blocks.
2890 (setup_vtbl_ptr): Emit initialization code for bases and members
2891 at semantic-analysis time. Emit code to initialize vtables in
2892 destructors here.
2893 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2894 Don't handle CTOR_INITIALIZER any more.
2895 * typeck.c (build_modify_expr): Don't check for assignments to
2896 this.
2897 (c_expand_return): Don't suggest assigning to `this'.
2898
2899 * Makefile.in (decl.o): Depend on RTL_H.
2900 (decl2.o): Likewise.
2901 (class.o): Likewise.
2902 (call.o): Likewise.
2903 (method.o): Likewise.
2904 (search.o): Likewise.
2905 (tree.o): Likewise.
2906 (pt.o): Likewise.
2907
2908 * decl.c (duplicate_decls): When a builtin function is redeclared
2909 as static, make sure it is mangled correctly.
2910
2911 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
2912 detail about the statement-tree.
2913
2914 1999-09-20 Nathan Sidwell <nathan@acm.org>
2915
2916 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2917
2918 1999-09-20 Nick Clifton <nickc@cygnus.com>
2919
2920 * decl2.c (lang_decode_option): Extend comment.
2921
2922 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2923
2924 * typeck.c: Include "tm_p.h".
2925
2926 1999-09-19 Mark Mitchell <mark@codesourcery.com>
2927
2928 * ir.texi: New file.
2929
2930 1999-09-19 Paul Burchard <burchard@pobox.com>
2931
2932 * semantics.c (expand_stmt): Initialize return value.
2933
2934 1999-09-18 Paul Burchard <burchard@pobox.com>
2935
2936 * gxxint.texi: G++ now implements namespaces.
2937
2938 1999-09-18 Mark Mitchell <mark@codesourcery.com>
2939
2940 * decl.c (pop_label): Don't warn about unused labels more than
2941 once.
2942 * semantics.c (finish_goto_stmt): Always marked used labels as
2943 used.
2944
2945 * decl.c (layout_var_decl): Change prototype. Call layout_decl
2946 even when the declaration is external.
2947 (cp_finish_decl): Adjust call to layout_var_decl.
2948 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2949
2950 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2951
2952 * typeck.c (get_member_function_from_ptrfunc): Always consider
2953 virtuality inside member pointer.
2954
2955 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2956
2957 Turn on function-at-a-time processing.
2958 * cp-tree.h (doing_semantic_analysis_p): New macro.
2959 (SF_DEFAULT): Define to zero, not SF_EXPAND.
2960 (start_handler_parms): Change prototype.
2961 (expand_start_catch_block): Likewise.
2962 (expand_end_catch_block): Likewise.
2963 (expand_start_eh_spec): Likewise.
2964 (expand_end_eh_spec): Declare.
2965 (finish_handler_parms): Change prototype.
2966 (begin_catch_block): Declare.
2967 (finish_handler): Change prototype.
2968 (do_pushlevel): Declare.
2969 (do_poplevel): Likewise.
2970 * decl.c (pushlevel): Don't create
2971 binding levels when not doing semantic analysis.
2972 (poplevel): Don't pop them.
2973 (pushdecl): Assert that we are never called when not doing
2974 semantic analysis.
2975 (pushdecl_top_level): Use push_to_top_level.
2976 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
2977 label when expanding.
2978 (cp_finish_decl): Only inject for-scope variables when doing
2979 semantic analysis. Add comments.
2980 (start_handler_parms): Return the handler parm.
2981 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
2982 already set. Reinitialize from saved function data if available.
2983 Don't pushlevel when not doing semantic analysis.
2984 (store_parm_decls): Only generate RTL when expanding. Only
2985 pushdecl when doing semantic analysis. Set
2986 current_eh_spec_try_block if appropriate.
2987 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
2988 Combine common code. Don't poplevel when not doing semantic
2989 analysis.
2990 (push_cp_function_context): Don't expand functions without an
2991 explicit call to expand_body.
2992 (mark_lang_function): Make eh_spec_try_block and
2993 x_scope_stmt_stack.
2994 * except.c (expand_end_eh_spec): Don't
2995 declare.
2996 (process_start_catch_block): Likewise.
2997 (push_eh_cleanup): Use finish_decl_cleanup.
2998 (initialize_handler_parm): New function.
2999 (expand_start_catch_block): Use it.
3000 (expand_end_catch_block): Use tree-generation functions, not
3001 RTL-generation functions.
3002 (expand_start_eh_spec): Likewise.
3003 (expand_end_eh_spec): Likewise.
3004 (expand_exception_blocks): Simplify.
3005 (start_anon_func): Use do_pushlevel.
3006 (end_anon_func): Use do_poplvel. Call expand_body for the
3007 function.
3008 * expr.c (do_case): Don't call define_case_label.
3009 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3010 variables.
3011 * method.c (emit_thunk): Call expand_body for the
3012 thunk.
3013 (sythesize_method): Likewise.
3014 * parse.y (handler_args): Give it ttype.
3015 (eat_saved_input): Call expand_body.
3016 (base_init): Use do_pushlevel.
3017 (pending_inline): Call expand_body.
3018 (handler): Adjust calls to finish_handler_parms and
3019 finish_handler.
3020 (handler_args): Don't call expand_start_catch_block. Return the
3021 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3022 * parse.c: Regenerated.
3023 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3024 * semantics.c (do_pushlevel): Give it external linkage. Build
3025 SCOPE_STMTs.
3026 (do_poplevel): Likewise.
3027 (finish_case_label): Call define_case_label when doing semantic
3028 analysis.
3029 (finish_goto_stmt): Create RTL for labels.
3030 (finish_function_try_block): Set in_function_try_handler
3031 unconditionally.
3032 (finish_function_handler_sequence): Unset it.
3033 (finish_handler_parms): Use expand_start_catch_block even when
3034 building a statement-tree.
3035 (begin_catch_block): New function.
3036 (finish_handler): Move a little RTL-generation logic here.
3037 (finish_decl_cleanup): Allow cleanups for empty declarations.
3038 (finish_named_return_value): Don't pushdecl when not doing
3039 semantic analysis.
3040 (expand_stmt): Don't do semantic analysis for variable
3041 declarations. Handle START_CATCH_STMT. Call expand_label
3042 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3043 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3044 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3045 RETURN_INIT and function try blocks.
3046
3047 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3048 x_scope_stmt_stack. Add x_in_charge_parm.
3049 (current_eh_spec_try_block): New macro.
3050 (current_scope_stmt_stack): Likewise.
3051 (current_in_charge_parm): Likewise.
3052 * decl.c (start_function): Initialize current_in_charge_parm.
3053 (finish_function): Use current_in_charge_parm rather than looking
3054 up __in_chrg.
3055 * search.c (expand_indirect_vtbls_init): Likewise.
3056
3057 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3058 (TRY_BLOCK): Likewise.
3059 (HANDLER): Likewise.
3060 (START_CATCH_STMT): New tree node.
3061 (SCOPE_STMT): Likewise.
3062 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3063 (SCOPE_NULLIFIED_P): Likewise.
3064 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3065 (struct lang_decl): Add saved_language_function.
3066 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3067 (DECL_PENDING_INLINE_P): New macro.
3068 (TYPE_TI_ARGS): Fix typo in comment.
3069 (DECL_SAVED_TREE): Add to documentation.
3070 (DECL_SAVED_FUNCTION_DATA): New macro.
3071 (START_CATCH_TYPE): Likewise.
3072 (SCOPE_END_P): New macro.
3073 (declare_parm_level): Don't declare.
3074 * decl.c (mark_lang_function): New function, split out from
3075 mark_cp_function_context.
3076 (save_function_data): New function.
3077 (declare_parm_level): Remove.
3078 (finish_function): Use save_function_data to squirrel away
3079 important stuff for later use.
3080 (mark_cp_function_context): Use mark_function_data.
3081 (lang_mark_tree): Likewise.
3082 * lex.c (begin_definition_of_inclass_inline): Set
3083 DECL_PENDING_INLINE_P.
3084 (store_pending_inline): Clear it.
3085 * pt.c (tsubst_decl): Likewise.
3086
3087 1999-09-17 Nathan Sidwell <nathan@acm.org>
3088
3089 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3090
3091 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3092
3093 * decl.c (warn_extern_redeclared_static): Don't get confused by
3094 static member functions.
3095 (duplicate_decls): Merge DECL_THIS_STATIC.
3096
3097 * decl.c (expand_static_init): Make sure assignments to local
3098 statics actually occur.
3099
3100 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3101
3102 * cp-tree.h (poplevel_class): Declare.
3103 * class.c (popclass): Use poplevel_class, not poplevel.
3104 * decl.c (poplevel_class): Don't make it static. Don't return a
3105 value.
3106 (poplevel): Don't call poplevel_class; abort in a class
3107 binding level is seen.
3108 * semantics.c (finish_translation_unit): Use pop_everything.
3109 * parse.y (member_init): Allow errors.
3110 (pending_inline): Call finish_function.
3111 * parse.c: Regenerated.
3112 * Makefile.in (CONFLICTS): Adjust.
3113
3114 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3115
3116 * error.c: Reduce code duplication.
3117 (dump_template_value): New function.
3118 (dump_type_real): Use it.
3119 (dump_decl): Likewise.
3120 (dump_function_name): Likewise.
3121 (dump_function_decl): Don't be too talkative about function return
3122 type variety.
3123
3124 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3125
3126 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3127
3128 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3129
3130 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3131
3132 * decl2.c (finish_file): Also call check_global_declarations for
3133 the pending_statics list.
3134
3135 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3136
3137 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3138 in header files.
3139
3140 1999-09-15 Richard Henderson <rth@cygnus.com>
3141
3142 * lex.c (mark_impl_file_chain): Follow the next chain.
3143
3144 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3145
3146 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3147 problems with extern "C" functions redeclared as static.
3148 (duplicate_decls): When a builtin is redeclared static, make the
3149 new function have internal linkage.
3150
3151 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3152
3153 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3154 * pt.c (tsubst_copy): Likewise.
3155 * tree.c (search_tree): Likewise.
3156 (mapcar): Likewise.
3157
3158 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3159
3160 * typeck2.c (ack): Don't declare progname.
3161
3162 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3163
3164 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3165 filenames with ggc_alloc_string.
3166
3167 1999-09-14 Mark Mitchell <mark@codesourcery.com>
3168
3169 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
3170 TARGET_EXPR.
3171 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3172 the TARGET_EXPR.
3173 * cvt.c (build_up_reference): Likewise.
3174 * tree.c (build_cplus_new): Likewise.
3175 (get_target_expr): Likewise.
3176
3177 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
3178
3179 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
3180
3181 1999-09-13 Mark Mitchell <mark@codesourcery.com>
3182
3183 * cp-tree.h (build_target_expr): New function.
3184 * call.c (build_conditional_expr): Use build_target_expr.
3185 (convert_like): Likewise.
3186 (build_over_call): Likewise.
3187 * cvt.c (build_up_reference): Likewise.
3188 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3189 (destroy_local_var): Here.
3190 (build_target_expr): New function.
3191 * tree.c (build_cplus_new): Use it.
3192 (get_target_expr): Likewise.
3193
3194 1999-09-13 Nathan Sidwell <nathan@acm.org>
3195
3196 * typeck.c (expr_sizeof): Don't decay arrays and functions.
3197 Remove misleading comment.
3198 (build_compound_expr): Don't decay arrays.
3199
3200 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
3201
3202 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3203 class rvalues again.
3204
3205 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3206
3207 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3208
3209 * g++spec.c: Include gcc.h.
3210 (lang_specific_driver): Constify a char*. Call xcalloc, not
3211 xmalloc/bzero. All calls to the function pointer parameter now
3212 explicitly call `fatal'.
3213
3214 1999-09-12 Mark Mitchell <mark@codesourcery.com>
3215
3216 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
3217 * cvt.c (ocp_convert): Complete the from and destination types.
3218 Adjust warning about functions always being `true' in conditionals.
3219 * decl.c (duplicate_decls): Don't play funny games with abort.
3220 * error.c (dump_expr): Handle OVERLOADs.
3221 * spew.c (probe_obstack): Remove.
3222 * typeck.c (condition_conversion): Use perform_implicit_conversion.
3223
3224 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
3225
3226 * cp-tree.h (auto_function, define_function): Adjust prototypes.
3227 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
3228 changed.
3229 (auto_function): Likewise, for CODE arg.
3230 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3231 (builtin_function): ... here.
3232
3233 1999-09-11 Mark Mitchell <mark@codesourcery.com>
3234
3235 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3236 (init_decl_processing): Don't set TREE_PERMANENT for the
3237 error_mark_node.
3238 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3239 (grokdeclarator): Likewise.
3240 (grokparms): Don't check TREE_PERMANENT when building up lists.
3241 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3242 (mark_inline_for_output): Likewise.
3243 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3244 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3245 * lex.c (check_newline): Don't check ggc_p; it is always one.
3246 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3247 * spew.c (yylex): Don't copy_node or probe_obstacks for
3248 non-permanent CONSTANTs and STRINGs.
3249 * tree.c (build_cplus_array_type_1): Don't fuss with
3250 TREE_PERMANENT on ARRAY_TYPEs.
3251
3252 * cp-tree.def (CLEANUP_STMT): New node.
3253 * cp-tree.h (language_function): Add name_declared.
3254 (current_function_name_declared): New macro.
3255 (CLEANUP_DECL): New macro.
3256 (CLEANUP_EXPR): Likewise.
3257 (emit_local_var): Likewise.
3258 (finish_decl_cleanup): New function.
3259 * cvt.c (build_up_reference): Simplify.
3260 (ocp_convert): Remove dead code.
3261 * decl.c (start_decl): Remove call to add_decl_stmt.
3262 (grok_reference_init): Adjust, to handle bindings temporaries to
3263 references. Remove dead code.
3264 (initialize_local_var): Don't generate RTL for
3265 declarations here, or build cleanups here. Don't fuss with
3266 obstacks. Replace expand_start_target_temps calls with explicit
3267 setting of stms_are_full_exprs_p.
3268 (destroy_local_var): New function.
3269 (emit_local_var): Likewise.
3270 (cp_finish_decl): Use them, as appropriate.
3271 (start_function): Announce template functions.
3272 (store_parm_decls): Don't call declare_function_name here.
3273 (finish_stmt): Don't start emit base-initialization code when just
3274 building the statement-tree.
3275 * init.c (create_temporary_var): Move add_decl_stmt call ...
3276 (get_temp_regvar): Here.
3277 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3278 cp_finish_decl would expect. Don't call add_decl_stmt.
3279 * semantics.c (begin_compound_stmt): Call declare_function_name,
3280 if appropriate.
3281 (finish_decl_cleanup): New function.
3282 (expand_stmt): Use emit_local_var to output variables.
3283 (expand_body): Set current_funtion_name_declared.
3284
3285 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3286
3287 * cp-tree.h (finish_cleanup_try_block): New function.
3288 * semantics.c (finish_cleanup_try_block): Add comment.
3289
3290 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3291
3292 * cp-tree.h: Delete declarations for all tree nodes now moved to
3293 global_trees.
3294 * decl.c: Delete their definitions.
3295 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3296 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3297 provide defaults.
3298 (init_decl_processing): Call build_common_tree_nodes and
3299 build_common_tree_nodes_2 instead of building their nodes here.
3300 Don't add gc roots for them.
3301
3302 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3303
3304 * cp-tree.h (language_function): Rename expanding_p to
3305 x_expanding_p. Rename named_label_uses to x_named_label_uses.
3306 (expanding_p): Adjust accordingly.
3307 (TREE_VIA_PRIVATE): Fix typo in comment.
3308 (DECL_REFERENCE_SLOT): Remove.
3309 (SET_DECL_REFERENCE_SLOT): Likewise.
3310 * decl.c (named_label_uses): Adjust. Remove chicken comment.
3311 (push_overloaded_decl): Don't truncate the chain of bindings when
3312 adding an overloaded function.
3313 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3314 (initialize_local_var): Fix typo in comment.
3315 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
3316 * decl2.c (start_objects): Make the fact that we are expanding
3317 the generated function right away explicit.
3318 (start_static_storage_duration_function): Likewise.
3319 (finish_file): Fix typo in comment.
3320 * init.c (build_vec_init): Correct bugs in handling cleanups.
3321 * semantics.c (maybe_convert_cond): New function.
3322 (FINISH_COND): Always store the condition, even if there's
3323 a declaration.
3324 (finish_if_stmt_cond): Use maybe_convert_cond.
3325 (finish_while_stmt_cond): Likewise.
3326 (finish_do_stmt): Likewise.
3327 (finish_for_cond): Likewise.
3328 (expand_cond): Adjust.
3329
3330 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3331 * init.c (perform_member_init): Remove obstack machinations.
3332 (expand_cleanup_for_base): Likewise.
3333 (finish_init_stmts): Mark the statement-expression as used.
3334 * method.c (emit_thunk): Use tree-generating functions, not
3335 RTL.
3336 (do_build_copy_constructor): Likewise.
3337 (do_build_assign_ref): Likewise.
3338 (synthesize_method): Likewise. Keep track of line numbers.
3339 * pt.c (tsubst_expr): Handle various kinds of try blocks.
3340 * semantics.c (expand_stmts): Remove.
3341 (begin_function_try_block): Set FN_TRY_BLOCK_P.
3342 (finish_function_try_block): Be careful rechaining
3343 function try blocks.
3344 (expand_stmt): Loop through all the statements at a given level.
3345 (exapnd_body): Be careful with line-numbers here too. Prepare for
3346 being called directly from the parser.
3347
3348 * cp-tree.h (finish_function): Adjust prototype.
3349 * decl.c (finish_function): Return the function compiled.
3350 * pt.c (instantiate_decl): Don't play games with obstacks.
3351 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3352 (search_tree): Likewise.
3353 * typeck.c: Fix typo in comment.
3354 * typeck2.c (store_init_value): Add comment.
3355
3356 * cp-tree.h (CPTI_ATEXIT): New macro.
3357 (atexit_node): Likewise.
3358 * decl.c (destroy_local_static): New function, broken out from ...
3359 (expand_static_init): Here.
3360
3361 * rtti.c (get_tinfo_var): These should always be global
3362 (expand_si_desc): Use tree, not RTL, functions to generate code.
3363 (expand_class_desc): Likewise.
3364 (expand_ptr_desc): Likewise.
3365 (expand_attr_desc): Likewise.
3366 (expand_generic_desc): Likewise.
3367 (synthesize_tinfo_fn): Likewise.
3368
3369 1999-09-09 Mark Mitchell <mark@codesourcery.com>
3370
3371 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3372 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
3373 RECHAIN_STMTS.
3374 (RECHAIN_STMST_FROM_CHAIN): Likewise.
3375
3376 * parse.y (simple_stmt): Fix typo in last change.
3377
3378 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3379 (STMT_IS_FULL_EXPR_P): Likewise.
3380 (STMT_LINENO_FOR_FN_P): Likewise.
3381 (prep_stmt): New function.
3382 (building_stmt_tree): Tweak for safety.
3383 * pt.c (tsubst_expr): Use prep_stmt throughout.
3384 (add_tree): Move it to semantics.c
3385 * semantics.c (add_tree): Move it here.
3386 (finish_expr_stmt_real): New function.
3387 (finish_expr_stmt): Use it.
3388 (finish_if_stmt_cond): Use FINISH_COND.
3389 (finish_while_stmt_cond): Likewise.
3390 (finish_for_cond): Likewise.
3391 (finish_stmt_tree): Tweak line-number handling.
3392 (prep_stmt): New function.
3393 (expand_stmt): Use it.
3394
3395 * cp-tree.h (begin_switch_stmt): Adjust prototype.
3396 (finish_switch_cond): Likewise.
3397 * parse.y (simple_stmt): Adjust accordingly.
3398 * parse.c: Regenerated.
3399 * pt.c (tsubst_expr): Adjust accordingly.
3400 * semantics.c (expand_cond): New function.
3401 (FINISH_COND): New macro.
3402 (begin_switch_stmt): Build the SWITCH_STMT here.
3403 (finish_switch_stmt_cond): Not here.
3404 (expand_stmt): Adjust calls to begin_switch_stmt and
3405 finish_switch_cond. Use expand_cond throughout.
3406
3407 * dump.c (dequeue_and_dump): Dump types for constants.
3408 Describe DECL_ARG_TYPE more intuitively.
3409 Handle ARRAY_REF.
3410
3411 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3412 (lang_cleanup_tree): Remove.
3413 * lex.c (make_lang_type): Use ggc_alloc to allocate
3414 TYPE_LANG_SPECIFIC.
3415
3416 Reorganize per-function data.
3417 * cp-tree.h (saved_scope): Add function_decl, bindings.
3418 (language_function): Rename binding_level to bindings.
3419 (cp_function_chain): Use the current_function, not the
3420 outer_function_chain.
3421 (current_class_ptr): Make it work, even when there's no
3422 current function.
3423 (current_class_ref): Likewise.
3424 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
3425 macros.
3426 (clear_temp_name): Remove.
3427 * decl.c (check_function_type): New function, broken out from
3428 start_function.
3429 (current_binding_level): Adjust definition.
3430 (pushlevel): Simplify.
3431 (poplevel): Don't use named_label_uses when we're outside
3432 a function scope.
3433 (mark_saved_scope): Mark function_decl and bindings.
3434 (maybe_push_to_top_level): Don't unconditionally push a new
3435 function context. Save bindings and the current_function_decl.
3436 Don't clear named_labels.
3437 (pop_from_top_level): Pop function context if appropriate.
3438 (init_decl_processing): Set init_lang_status and free_lang_status,
3439 rather than save_lang_status and restore_lang_status.
3440 (start_function): Take SF_* flags. Don't clear per-function data.
3441 Reorder and simplify to use new per-function data code. Add
3442 asserts.
3443 (store_parm_decls): Don't call init_function_start here.
3444 (finish_function): Adjust for new handling of per-function data.
3445 (push_cp_function_context): Simplify.
3446 (mark_cp_function_context): Change binding_level to bindings.
3447 * decl2.c (clear_temp_name): Remove.
3448 (start_objects): Use SF flags to start_function.
3449 (start_static_storage_duration_function): Likewise.
3450 * except.c (start_anon_func): Remove redundant calls to
3451 push_function_context_to. Use SF flags to start function.
3452 (end_anon_func): Remove redundant call to pop_function_context
3453 from.
3454 * lex.c (reinit_parse_for_function): Don't initialize per-function
3455 data.
3456 * method.c (emit_thunk): Clear current_function after calling
3457 assemble_end_function. Use SF flags for start_function.
3458 (synthesize_method): Use SF flags for start_function.
3459 * parse.c: Regenerated.
3460 * parse.y (fn.defpen): Likewise.
3461 (pending_inline): Clear current_function, even if something goes
3462 wrong.
3463 * pt.c (instantiate_decl): Use SF flags to start_function.
3464 Don't save and restore expanding_p.
3465 (add_tree): Handle the case where we are outside any function.
3466 (end_tree): Likewise.
3467 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3468 * semantics.c (begin_function_definition): Likewise.
3469 (expand_body): Likewise.
3470
3471 1999-09-09 Nathan Sidwell <nathan@acm.org>
3472
3473 * cp-tree.h (convert_to_void): Prototype new function.
3474 (require_complete_type_in_void): Remove prototype.
3475 * cvt.c (convert_to_void): New function.
3476 (ocp_convert): Use convert_to_void.
3477 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3478 expressions.
3479 * typeck.c (require_complete_type_in_void): Remove function.
3480 (build_compound_expr): Use convert_to_void.
3481 (build_static_cast): Likewise.
3482 (build_c_cast): Likewise.
3483 * semantics.c (finish_expr_stmt): Do not decay full expressions.
3484
3485 * typeck.c (build_x_compound_expr): Add FIXME.
3486
3487 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3488
3489 * cp-tree.h (scratch_tree_cons): Remove.
3490 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3491 and perm_tree_cons with plain tree_cons.
3492 * class.c: Likewise.
3493 * decl.c: Likewise.
3494 * decl2.c: Likewise.
3495 * except.c: Likewise.
3496 * expr.c: Likewise.
3497 * init.c: Likewise.
3498 * lex.c: Likewise.
3499 * method.c: Likewise.
3500 * parse.y: Likewise.
3501 * pt.c: Likewise.
3502 * repo.c: Likewise.
3503 * rtti.c: Likewise.
3504 * search.c: Likewise.
3505 * typeck.c: Likewise.
3506 * parse.c: Regenerated.
3507 * tree.c (build_srcloc): Simplify.
3508
3509 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3510
3511 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3512 Remove next.
3513 (LANG_DECL_PERMANENT): Remove.
3514 * decl.c (duplicate_decls): Don't mess about with obstacks trying
3515 to free memory.
3516 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3517 * lex.c (free_lang_decl_chain): Remove.
3518 (build_lang_decl): Don't use obstacks.
3519 (retrofit_lang_decl): Likewise.
3520 (copy_lang_decl): Likewise.
3521
3522 * cp-tree.h (saved_scope): Remove old_binding_level and
3523 function_decl. Tidy up.
3524 * decl.c (mark_saved_scope): Don't set them.
3525 (maybe_push_to_top_level): Clear memory.
3526
3527 * decl.c (layout_var_decl): Change prototype. Don't complete
3528 types for external objects.
3529 (check_initializer): Likewise. Tidy.
3530 (initialize_local_var): Complete types here.
3531 (cp_finish_decl): Not here. Reorganize a little.
3532 (grokvardecl): Don't complete types here.
3533
3534 * decl.c (start_function): Clear last_dtor_insn and
3535 last_parm_cleanup_insn.
3536 (push_cp_function_context): Just copy over a little of
3537 the old context, not all of it.
3538
3539 * cp-tree.h (copy_to_permanent): Remove.
3540 (permanent_p): Likewise.
3541 * decl.c (building_typename_type): Don't use copy_to_permanent.
3542 (start_decl): Likewise.
3543 (grok_reference_init): Likewise.
3544 (cp_finish_decl): Likewise.
3545 * init.c (build_new_1): Don't use mapcar.
3546 (build_vec_delete_1): Don't use copy_to_permanent.
3547 (build_vec_init): Likewise.
3548 * parse.y (primary): Likewise.
3549 * parse.c: Regenerated.
3550 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
3551 (lookup_template_class): Likewise.
3552 (tsubst_friend_function): Likewise.
3553 (instantiate_class_template): Likewise.
3554 (tsubst_decl): Likewise.
3555 (tsubst): Likewise.
3556 (instantiate_template): Likewise.
3557 (unify): Likewise.
3558 * rtti.c (get_tinfo_fn): Likewise.
3559 (build_dynamic_cast): Likewise.
3560 * semantics.c (finish_if_stmt_cond): Likewise.
3561 (finish_while_stmt_cond): Likewise.
3562 (finish_do_stmt): Likewise.
3563 (finish_for_cond): Likewise.
3564 (finish_for_expr): Likewise.
3565 (finish_cleanup): Likewise.
3566 (add_decl_stmt): Likewise.
3567 (finish_named_return_value): Likewise.
3568 (finish_qualified_call_expr): Likewise.
3569 * tree.c (perm_manip): Remove.
3570 (build_exception_variant): Don't use copy_to_permanent.
3571 (permanent_p): Remove.
3572 (copy_to_permament): Remove.
3573 (build_min_nt): Don't use copy_to_permanent.
3574 (build_min): Likewise.
3575 (min_tree_cons): Likewise.
3576 * typeckc.c (build_static_cast): Likewise.
3577 (build_reinterpret_cast): Likewise.
3578 (build_const_cast): Likewise.
3579
3580 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3581
3582 * decl.c (ggc_p): Set it to 1.
3583 (mark_saved_scope): Add prototype.
3584
3585 1999-09-07 Richard Henderson <rth@cygnus.com>
3586
3587 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
3588 * typeck.c (self_promoting_args_p): Delete.
3589
3590 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
3591
3592 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
3593 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
3594
3595 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3596
3597 * Makefile.in (tree.o): Depend on ggc.h.
3598 * class.c (make_method_vec): Remove.
3599 (free_method_vec): Likewise.
3600 (free_method_vecs): Remove.
3601 (add_method): Don't use them.
3602 * cp-tree.def (PTRMEM_CST): Make it longer.
3603 (TEMPLATE_PARM_INDEX): Make it shorter.
3604 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
3605 (template_parm_index): Remove RTL field.
3606 (ptrmem_cst): Add RTL field.
3607 (finish_function): Removed parameter.
3608 (process_next_inline): Change prototype.
3609 (init_cplus_unsave): Rename to init_tree.
3610 (binding_init): Remove.
3611 * decl.c (free_binding_nodes): Remove.
3612 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
3613 (pop_binding): Don't use free_binding_nodes.
3614 (free_binding_vecs): Remove.
3615 (store_bindings): Don't use them.
3616 (pop_from_top_level): Likewise.
3617 (lookup_namespace_name): Simplify.
3618 (build_typename_type): Don't use obstack_free.
3619 (unqualified_namespace_lookup): Simplify.
3620 (lookup_name_real): Simplify.
3621 (start_function): Remove comment about leaks.
3622 (finish_function): Removed nested parameter. Call
3623 expand_end_bindings even when building_stmt_tree.
3624 Call ggc_push_context and ggc_pop_context around
3625 rest_of_compilation, if necessary.
3626 (mark_cp_function_context): Handle a NULL language-context.
3627 (lang_mark_false_label_stack): Fix typo.
3628 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
3629 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
3630 pointer to method types.
3631 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
3632 * decl2.c (finish_objects): Adjust call to finish_function.
3633 (finish_static_store_duration_function): Likewise.
3634 (do_nonmember_using_decl): Remove call to binding_init.
3635 * except.c (end_anon_func): Adjust call to finish_function.
3636 * lex.c (mark_impl_file_chain): New function.
3637 (init_parse): Call init_tree, not init_cplus_unsave.
3638 Add GC roots.
3639 (cp_pramga_interface): Use xmalloc, not permalloc.
3640 (cp_pragma_implementation): Likewise.
3641 (begin_definition_of_inclass_inline): Simplify.
3642 (process_next_inline): Adjust prototype.
3643 (do_scoped_id): Don't call binding_init.
3644 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
3645 * method.c (emit_thunk): Adjust call to finish_function.
3646 (synthesize_method): Likewise.
3647 * parse.y (%union): Add a new `pi' variant.
3648 (PRE_PARSED_FUNCTION_DECL): Use it.
3649 (fn.defpen): Likewise.
3650 (fndef): Adjust call to finish_function.
3651 * pt.c (instantiate_decl): Likewise.
3652 * rtti.c (syntheisze_tinfo_fn): Likewise.
3653 * semantics.c (expand_body): Likewise.
3654 * tree.c: Include ggc.h.
3655 (mark_list_hash): New function.
3656 (binding_init): Remove.
3657 (init_cplus_unsave): Rename to ...
3658 (init_tree): This. Add GC roots.
3659
3660 1999-09-05 Mark Mitchell <mark@codesourcery.com>
3661
3662 Get ready for garbage collection.
3663 * Makefile.in (CXX_TREE_H): Add varray.h
3664 (lex.o): Depend on ggc.h.
3665 (decl.o): Likewise.
3666 (decl2.o): Likewise.
3667 (method.o): Likewise.
3668 (search.o): Likewise.
3669 (pt.o): Likewise.
3670 (repo.o): Likewise.
3671 * class.c: Include ggc.h.
3672 (current_class_name): Remove.
3673 (current_class_type): Likewise.
3674 (current_access_specifier): Likewise.
3675 (previous_class_type): Likewise.
3676 (previous_class_values): Likewise.
3677 (class_cache_firstobj): Likewise.
3678 (current_lang_base): Likewise.
3679 (current_lang_stack): Likewise.
3680 (current_lang_stacksize): Likewise.
3681 (lang_name_c): Likewise.
3682 (lang_name_cplusplus): Likewise.
3683 (lang_name_java): Likewise.
3684 (current_lang_name): Likewise.
3685 (base_layout_decl): Likewise.
3686 (access_default_node): Likewise.
3687 (access_public_node): Likewise.
3688 (access_protected_node): Likewise.
3689 (access_private_node): Likewise.
3690 (access_default_virtual_node): Likewise.
3691 (access_public_virtual_node): Likewise.
3692 (access_protected_virtual_node): Likewise.
3693 (access_private_virtual_node): Likewise.
3694 (signed_zero_node): Likewise.
3695 (init_class_processing): Don't build base_layout_decl.
3696 (push_lang_context): Adjust now that current_lang_base is a varray.
3697 (pop_lang_context): Likewise.
3698 * cp-tree.h: Include varray.h.
3699 (cp_global_trees): Add access_default, access_public,
3700 access_protected, access_private, access_default_virtual,
3701 access_public_virtual, access_protected_virtual,
3702 access_private_virtual, ctor_identifier, delta2_identifier,
3703 delta_identifier, dtor_identifier, in_charge_identifier,
3704 index_identifier, nelts_identifier, this_identifier,
3705 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
3706 lang_name_c, lang_name_cplusplus, lang_name_java,
3707 empty_except_spec, null, jclass, minus_one, terminate.
3708 (saved_scope): Move here from decl.c. Define globals in terms of
3709 saved_scope: current_namespace, current_class_name,
3710 current_class_type, current_access_specifier, current_lang_stack,
3711 current_lang_base, current_lang_name, current_function_parms,
3712 current_template_parms, processing_template_decl,
3713 processing_specialization, processing_explicit_instantiation,
3714 previous_class_type, previous_class_values, class_cache_firstobj.
3715 (scope_chain): New variable.
3716 (init_pt): New function.
3717 * decl.c (current_namespace): Remove.
3718 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
3719 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
3720 (delta_identifier, delta2_identifier): Likewise.
3721 (pfn_or_delta2_identifier, tag_identifier): Likewise
3722 (vt_off_identifier, empty_except_spec, null_node): Likewise.
3723 (current_function_parms, current_lang_base): Remove.
3724 (current_lang_stack, previous_class_values): Remove.
3725 (class_binding_level): Macroize.
3726 (saved_scope): Remove.
3727 (current_saved_scope): Rename to scope_chain.
3728 (mark_saved_scope): Adjust for new scope structure.
3729 (maybe_push_to_top_level): Likewise.
3730 (pop_from_top_level): Likewise.
3731 (duplicate_decls): Adjust now that current_lang_base is a varray.
3732 (build_typename_type): Call ggc_add_tree_hash_table_root.
3733 (init_decl_processing): Call init_pt. Call push_to_top_level to
3734 set up globals. Add GC roots.
3735 (xref_basetypes): Adjust now that current_lang_base is a varray.
3736 * decl.h (this_identifier): Remove.
3737 (in_charge_identifier): Likewise.
3738 * decl2.c: Don't include varray.h.
3739 (current_namespace): Remove.
3740 (init_decl2): Add GC roots.
3741 * except.c (Terminate): Remove.
3742 (init_exception_processing): Use terminate_node instead.
3743 (build_terminate_handler): Likewise.
3744 * init.c (nc_nelts_field_id): Remove.
3745 (minus_one): Likewise.
3746 (init_init_processing): Use minus_one_node and nelts_identifier
3747 instead. Add GC roots.
3748 (jclass_node): Remove.
3749 (build_new_1): Use nelts_identifier.
3750 (build_vec_init): Likewise.
3751 (build_vec_delete): Likewise.
3752 * lex.c: Include ggc.h.
3753 (defarg_fn): Move declaration early.
3754 (defarg_parms): Likewise.
3755 (init_parse): Add GC roots.
3756 (handle_cp_pragma): Remove redundant declaration of
3757 pending_vtables.
3758 * method.c: Include ggc.h.
3759 (btypelist): Make it a varray. All uses changed.
3760 (ktypelist): Likewise.
3761 (init_method): Add GC roots.
3762 * pt.c: Don't include varray.h. Include ggc.h.
3763 (current_template_parms): Remove.
3764 (processing_template_decl): Likewise.
3765 (processing_specialization): Likewise.
3766 (processing_explicit_instantiation): Likewise.
3767 (init_pt): New function.
3768 * repo.c: Include ggc.h.
3769 (init_repo): Add GC roots.
3770 * search.c: Don't include varray.h.
3771 (_vptr_name): Remove.
3772 (lookup_field_1): Use vtpr_identifier instead.
3773 (expand_indirect_vtbls_init): Remove redundant declaration of
3774 in_charge_identifier.
3775 (init_search_processing): Use vptr_identifier.
3776
3777 1999-09-05 Richard Henderson <rth@cygnus.com>
3778 Bernd Schmidt <bernds@cygnus.co.uk>
3779 Mark Mitchell <mark@codesourcery.com>
3780
3781 * Makefile.in (parse.o): Depend on ggc.h.
3782 (decl2.o): Depend on ggc.h.
3783 (init.o): Depend on ggc.h.
3784 * cp-tree.h (init_decl2): Declare.
3785 (cp_parse_init): Likewise.
3786 * decl.c (ggc_p): Define to zero.
3787 (mark_saved_scope): New function.
3788 (init_decl_processing): Call cp_parse_init, and cp_decl2.
3789 Register GC roots.
3790 (expand_static_init): Add GC roots.
3791 * decl2.c: Include ggc.h.
3792 (init_decl2): New function.
3793 * init.c: Include ggc.h.
3794 (init_init_processing): Add GC roots.
3795 * parse.y: Include ggc.h.
3796 (cp_parse_init): New function.
3797
3798 1999-09-04 Mark Mitchell <mark@codesourcery.com>
3799
3800 * decl.c (init_decl_processing): Set mark_lang_status.
3801 (lang_mark_false_label_stack): Adjust prototype.
3802 * decl2.c (grok_function_init): Remove extraneous declaration of
3803 abort_fndecl.
3804
3805 * Make-lang.in (cc1plus): Remove dependency on GGC.
3806 * Makefile.in (OBJS): Don't mention ggc-simple.o.
3807 (OBJDEPS): Don't mention ggc-simple.o.
3808
3809 * Make-lang.in (cc1plus): Depend on $(GGC).
3810 * Makefile.in (OBJS): Add ggc-simple.o.
3811 (OBJDEPS): Likewise.
3812 * cp-tree.h (language_function): Rename members to `x_' versions;
3813 we now have x_named_labels, x_ctor_label, x_dtor_label,
3814 x_base_init_list, x_member_init_list, x_base_init_expr,
3815 x_current_class_ptr, x_current_class_ref, x_last_tree,
3816 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
3817 x_result_rtx.
3818 (dtor_label, ctor_label, current_base_init_list,
3819 current_member_init_list, base_init_expr, current_class_ptr,
3820 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
3821 * decl.c: Include ggc.h.
3822 (last_dtor_insn): Adjust to use x_ names.
3823 (last_parm_cleanup_insn): Likewise.
3824 (original_result_rtx): Likewise.
3825 (named_labels): Likewise.
3826 (mark_binding_level): New function.
3827 (mark_cp_function_context): Likewise.
3828 (mark_false_label_stack): Likewise.
3829 (lang_mark_tree): Likewise.
3830 (lang_cleanup_tree): Likewise.
3831
3832 1999-09-03 Mark Mitchell <mark@codesourcery.com>
3833
3834 * Makefile.in (CXX_TREE_H): Include function.h.
3835 (decl.o): Don't depend on function.h.
3836 (decl2.o): Likewise.
3837 (typeck.o): Likewise.
3838 (init.o): Likewise.
3839 (method.o): Likewise.
3840 * cp-tree.h: Include function.h.
3841 (cp_function): Rename to language_function. Remove next.
3842 (cp_function_chain): Make it a macro, not a variable.
3843 (push_cp_function_context): Don't declare.
3844 (pop_cp_function_context): Likewise.
3845 * decl.c: Don't include function.h.
3846 (push_cp_function_context): Make it static. Make it suitable for
3847 a save_lang_status callback.
3848 (pop_cp_function_context): Likewise.
3849 (maybe_push_to_top_level): Call push_function_context_to, not
3850 push_cp_function_context.
3851 (pop_from_top_level): Call pop_function_context_from, not
3852 pop_cp_function_context.
3853 (init_decl_processing): Set save_lang_status and
3854 restore_lang_status. Call push_function_context_to, not
3855 push_cp_function_context.
3856 (cp_function_chain): Remove.
3857 * decl2.c: Don't include function.h.
3858 * except.c: Don't include function.h.
3859 (start_anon_func): Call push_function_context_to, not
3860 push_cp_function_context.
3861 (end_anon_func): Call pop_function_context_from, not
3862 pop_cp_function_context.
3863 * init.c: Don't include function.h.
3864 * lex.c (begin_definition_of_inclass_inline): Call
3865 push_function_context_to, not push_cp_function_context.
3866 (process_next_inline): Call pop_function_context_from, not
3867 pop_cp_function_context.
3868 * method.c: Don't include function.h.
3869 (synthesize_method): Call push_function_context_to, not
3870 push_cp_function_context. Call pop_function_context_from, not
3871 pop_cp_function_context.
3872 * typeck.c: Don't include function.h.
3873
3874 * decl.c (expand_static_init): Tweak handling of static
3875 initializations for objects without constructors.
3876
3877 1999-09-03 Nathan Sidwell <nathan@acm.org>
3878
3879 * typeck.c (build_indirect_ref): Reject dereference of pointer to
3880 void.
3881
3882 1999-09-02 Mark Mitchell <mark@codesourcery.com>
3883
3884 * cp-tree.h (cp_function): Move here, from decl.c.
3885 (cp_function_chain): Declare.
3886 (dtor_label): New macro, instead of variable.
3887 (ctor_label): Likewise.
3888 (current_base_init_list): Likewise.
3889 (current_member_init_list): Likewise.
3890 (base_init_expr): Likewise.
3891 (current_class_ptr): Likewise.
3892 (current_class_ref): Likewise.
3893 (last_tree): Likewise.
3894 (last_expr_type): Likewise.
3895 (current_function_returns_value): Likewise.
3896 (current_function_returns_null): Likewise.
3897 (current_function_just_assigned_this): Likewise.
3898 (current_function_parms_stored): Likewise.
3899 (temp_name_counter): Likewise.
3900 (static_labelno): Likewise.
3901 (expanding_p): Likewise.
3902 (stmts_are_full_exprs_p): Likewise.
3903 (in_function_try_handler): Likewise.
3904 (lang_type): Remove nested type_flags. All uses changed.
3905 * call.c (ctor_label): Remove.
3906 (dtor_label): Likewise.
3907 * class.c (current_class_ptr): Remove.
3908 (current_class_ref): Likewise.
3909 * decl.c (static_labelno): Remove.
3910 (dtor_label): Likewise.
3911 (last_dtor_insn): New macro, instead of variable.
3912 (last_parm_cleanup_insn): Likewise.
3913 (original_result_rtx): Likewise.
3914 (in_function_try_handler): Remove.
3915 (named_label_uses): New macro, instead of variable.
3916 (named_labels): Likewise.
3917 (current_function_returns_value): Remove.
3918 (current_function_returns_null): Likewise.
3919 (current_function_assigns_this): New macro, instead of variable.
3920 (current_function_just_assigned_this): Likewise.
3921 (current_binding_level): Likewise.
3922 (init_decl_processing): Call push_cp_function_context.
3923 (cp_function): Move to cp-tree.h
3924 (cp_function_chain): Make it global.
3925 (temp_name_counter): Remove.
3926 (push_cp_function_context): Simplify.
3927 (pop_cp_function_context): Likewise.
3928 * decl2.c (temp_name_counter): Remove.
3929 * init_c (current_base_init_list): Likewise.
3930 (current_member_init_list): Likewise.
3931 (base_init_expr): Likewise.
3932 * method.c (static_labelno): Likewise.
3933 * pt.c (last_tree): Likewise.
3934 * semantics.c (expanding_p): Likewise.
3935 (stmts_are_full_exprs_p): Likewise.
3936 (last_expr_type): Likewise.
3937 * typeck.c (dtor_label): Likewise.
3938 (ctor_label): Likewise.
3939
3940 1999-09-01 Alex Samuel <samuel@codesourcery.com>
3941
3942 * decl2.c (arg_assoc_template_arg): New prototype. New function.
3943 (arg_assoc_class): Use arg_assoc_template_arg for template
3944 arguments.
3945 (arg_assoc): Likewise.
3946 * pt.c (mangle_class_name_for_template): Allow member template
3947 template arguments.
3948
3949 1999-09-02 Nathan Sidwell <nathan@acm.org>
3950
3951 * call.c (build_conditional_expr): Warn on enum mismatches.
3952 (convert_arg_to_ellipsis): Move non-pod check to after
3953 conversion.
3954
3955 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3956
3957 * gxx.gperf (hash, is_reserved_word): Add prototypes.
3958
3959 * init.c (build_vec_init): Initialize variable `try_block'.
3960
3961 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3962 Likewise for bzero/memset.
3963 (token_getch, token_put_back): Add static prototypes. Remove
3964 `inline' from the definitions.
3965 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
3966
3967 1999-09-01 Mark Mitchell <mark@codesourcery.com>
3968
3969 * cp-tree.h (lang_type): Move align into type_flags.
3970 (CLASSTYPE_ALIGN): Adjust accordingly.
3971 * call.c (direct_reference_binding): Remove misleading comment.
3972
3973 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3974
3975 * parse.y (language_string): Constify.
3976
3977 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3978
3979 * repo.c (getpwd): Don't prototype.
3980 * xref.c (getpwd): Likewise
3981
3982 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3983
3984 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
3985 Remove hacks for stuff which now comes from libiberty.
3986
3987 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
3988
3989 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
3990
3991 1999-08-30 Mark Mitchell <mark@codesourcery.com>
3992
3993 * cp-tree.h (begin_init_stmts): Declare.
3994 (finish_init_stmts): Likewise.
3995 * cvt.c (build_up_reference): Wrap the declaration of a temporary
3996 in a statement-expression so that we will see it when expanding
3997 tree structure later.
3998 * init.c (begin_init_stmts): Don't make it static.
3999 (finish_init_stmts): Likewise.
4000
4001 * cp-tree.h (start_handler_parms): New function.
4002 (expand_start_catch_block): Take only one parameter.
4003 (start_handler_parms): New function.
4004 * decl.c (start_handler_parms): Define it.
4005 * except.c (process_start_catch_block): Take only one parameter.
4006 Don't call grokdeclarator here.
4007 (expand_start_catch_block): Don't call grokdeclarator here,
4008 either.
4009 * parse.y (handler_args): Adjust call to
4010 expand_start_catch_block. Use start_handler_parms.
4011 * pt.c (push_template_decl_real): Make permanent lists have
4012 permanent elements.
4013 (tsubst_expr): Adjust calls to expand_start_catch_block
4014 appropriately.
4015 * semantics.c (expand_stmt): Likewise.
4016
4017 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4018
4019 * pt.c (push_template_decl_real): Use template declaration from
4020 class type if it exists.
4021
4022 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4023
4024 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4025 (maybe_inject_for_scope_var): Declare it.
4026 (initialize_local_var): Likewise.
4027 * decl.c (maybe_inject_for_scope_var): Make it global.
4028 (initialize_local_var): Likewise. Move cleanup handling here,
4029 from cp_finish_decl.
4030 (make_rtl_for_nonlocal_decl): Use
4031 push_obstacks_nochange/pop_obstacks, rather than
4032 end_temporary_allocation/resume_temporary_allocation.
4033 (cp_finish_decl): Try to complete the type of a variable when it
4034 is declared. Move cleanup-handling to initialize_local_var.
4035 (expand_static_init): Use tree-building code, rather than
4036 RTL-building code.
4037 * decl2.c (get_temp_name): Assert non-initializedness of
4038 temporaries.
4039 * init.c (create_temporary_var): Move RTL-assigning code to ...
4040 (get_temp_regvar): Here.
4041 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4042 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4043 call initialize_local_var to generate initialization code.
4044
4045 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4046
4047 * cp-tree.h (fndecl_as_string, type_as_string,
4048 type_as_string_real, args_as_string, decl_as_string,
4049 expr_as_string, code_as_string, language_as_string,
4050 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4051 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4052
4053 * errfn.c (cp_printer): Likewise.
4054
4055 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4056 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4057 cp_file_of, code_as_string, language_as_string, parm_as_string,
4058 op_as_string, assop_as_string, args_as_string, cv_as_string):
4059 Likewise.
4060
4061 * tree.c (lang_printable_name): Likewise.
4062
4063 1999-08-28 Richard Henderson <rth@cygnus.com>
4064
4065 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4066
4067 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4068
4069 * cp-tree.h (strip_array_types): New function.
4070 * decl.c (maybe_deduce_size_from_array_init): New function, split
4071 out from cp_finish_decl.
4072 (layout_var_decl): Likewise.
4073 (maybe_commonize_var): Likewise.
4074 (maybe_inject_for_scope_var): Likewise.
4075 (initialize_local_var): Likewise.
4076 (build_cleanup_on_safe_obstack): Likewise.
4077 (check_initializer): Likewise.
4078 (make_rtl_for_nonlocal_decl): Likewise.
4079 (cp_finish_decl): Use them.
4080 * typeck.c (strip_array_types): New function.
4081
4082 * cp-tree.def (LABEL_STMT): New tree node.
4083 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4084 (shadow_label): Remove.
4085 (declare_local_label): New function.
4086 (finish_label_decl): Likewise.
4087 * decl.c (make_label_decl): New function, split out from
4088 lookup_label.
4089 (shadowed_labels): Remove.
4090 (binding_level): Add shadowed_labels.
4091 (clear_binding_level): Remove.
4092 (push_binding_level): Just bzero the new binding level.
4093 (pushlevel): Fix indentation.
4094 (pop_label): New function.
4095 (pop_labels): Likewise, split out from poplevel.
4096 (poplevel): Pop local labels. Use pop_labels.
4097 (maybe_push_to_top_level): Don't clear shadowed_labels.
4098 (lookup_label): Use make_label_decl.
4099 (shadow_label): Remove.
4100 (declare_local_label): New function.
4101 (define_label): Simplify.
4102 (start_function): Don't clear shadowed_labels.
4103 (cp_function): Remove shadowed_labels.
4104 (push_cp_function_context): Don't save shadowed_labels.
4105 (pop_cp_function_context): Don't restore it.
4106 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4107 * parse.y (label_decl): Use finish_label_decl.
4108 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4109 declarations.
4110 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4111 building_stmt_tree.
4112 (finish_label_decl): New function.
4113 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4114
4115 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4116
4117 * decl.c (lookup_label): Build labels on the permanent obstack
4118 when building statement trees. Don't build RTL for labels when
4119 building statement trees.
4120 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4121 building statement trees.
4122 (finish_label_stmt): Likewise.
4123 (expand_stmt): Adjust accordingly.
4124 * pt.c (tsubst_expr); Likewise.
4125 (do_decl_instantiation): Robustify.
4126
4127 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4128 * tree.c (build_cplus_new): Set it.
4129 * expr.c (cplus_expand_expr): Use it.
4130 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4131
4132 * decl.c (store_parm_decls): Reset immediate_size_expand.
4133 (finish_function): Likewise.
4134
4135 * tree.c (cplus_unsave_expr_now): Don't return a value.
4136
4137 * semantics.c (do_poplevel): Always initialize the return value.
4138
4139 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4140
4141 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4142 * tree.h (cplus_unsave_expr_now) : Same.
4143
4144 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4145
4146 * decl.c (grokdeclarator): Amend comment.
4147 * except.c (expand_start_catch_block): Call push_template_decl for
4148 catch-block parameters.
4149 * method.c (synthesize_method): Build an empty compound statement
4150 for the body of a constructor.
4151
4152 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4153
4154 * tree.c (cp_build_qualified_type_real): If we're asking for the
4155 same quals we already have, just return.
4156
4157 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4158
4159 * cp-tree.def (SUBOBJECT): New tree node.
4160 * cp-tree.h (CLEANUP_P): New macro.
4161 (SUBOBJECT_CLEANUP): Likewise.
4162 (keep_next_level): Add parameter.
4163 (get_temp_regvar): Don't declare.
4164 (emit_base_init): Remove parameter.
4165 (expand_aggr_init): Rename to build_aggr_init.
4166 (expand_vec_init): Rename to build_vec_init.
4167 (do_pushlevel): Remove.
4168 (do_poplevel): Likewise.
4169 (finish_cleanup): New function.
4170 (finish_subobject): Likewise.
4171 (stmts_are_full_exprs_p): New variable.
4172 * decl.c (keep_next_level): Add parameter.
4173 (cp_finish_decl): Use build_aggr_init, not
4174 expand_aggr_init. Use finish_expr_stmt to expand the code.
4175 (expand_static_init): Use tree-generating, not RTL-generating,
4176 functions to handle the initialization.
4177 (start_function): Remove dead code. Always have a momentary
4178 obstack inside the function, even before hitting the first curly
4179 brace.
4180 (cplus_expand_expr_stmt): Move calls to
4181 expand_{start,end}_target_temps into semantics.c.
4182 (cp_function): Add stmts_are_full_exprs_p.
4183 (push_cp_function_context): Save it.
4184 (pop_cp_function_context): Restore it.
4185 * decl2.c (get_temp_regvar): Move to init.c.
4186 (do_static_initialization): Use build_{aggr,vec}_init.
4187 (do_static_destruction): Fix typo in comment.
4188 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4189 * except.c (expand_throw): Use create_temporary_var.
4190 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4191 * init.c (expand_vec_init_try_block): Remove.
4192 (expand_vec_init_catch_clause): Likewise.
4193 (get_temp_regvar): New function.
4194 (begin_init_stmts): Likewise.
4195 (finish_init_stmts): Likewise.
4196 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
4197 structure here.
4198 (emit_base_init): Likewise. Remove unused parameter.
4199 (expand_virtual_init): Likewise.
4200 (expand_cleanup_for_base): Use finish_subobject.
4201 (expand_aggr_vbase_init_1): Simplify.
4202 (construct_virtual_bases): Use tree-generating functions to build
4203 up initialization.
4204 (expand_aggr_init): Likewise. Rename to build_aggr_init.
4205 (expand_default_init): Likewise.
4206 (expand_aggr_init_1): Likewise.
4207 (expand_vec_init): Rename to build_vec_init.
4208 * method.c (do_build_copy_constructor): Use tree-generating
4209 functions. Don't call clear_last_expr.
4210 (do_build_assign_ref): Likewise.
4211 (synthesize_method): Call clear_last_expr here.
4212 * parse.y (base_init): Don't call clear_last_expr here.
4213 (nodecls): Likewise.
4214 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4215 * semantics.c (do_pushlevel): Move to here.
4216 (do_poplevel): Likewise.
4217 (stmts_are_full_exprs_p): New variable.
4218 (finish_expr_stmt): Handle logic for temoprary cleanup here.
4219 (finish_for_stmt): Use finish_expr_stmt.
4220 (finish_cleanup): New function.
4221 (finish_function_try_block): Fix indentation.
4222 (finish_subobject): New function.
4223 (setup_vtbl_ptr): Call keep_next_level here.
4224 (finish_stmt_expr): Handle a block with no scope inside the
4225 statement-expression.
4226 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
4227 SUBOBJECT.
4228 * tree.c (search_tree): Handle INIT_EXPR.
4229 (mapcar): Likewise.
4230 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4231 * typeck2.c (store_init_value): Change expand_aggr_init to
4232 build_aggr_init in comment.
4233
4234 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4235
4236 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4237
4238 1999-08-25 Nathan Sidwell <nathan@acm.org>
4239
4240 * decl2.c (handle_class_head): Be graceful about additional
4241 scope qualifiers. Adjust comments to reflect reality.
4242
4243 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
4244
4245 * call.c (build_conditional_expr): Fix typo.
4246 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4247 lvalue before trying to mess with the sides.
4248
4249 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4250
4251 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
4252
4253 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4254
4255 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
4256
4257 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4258 Return arbitrary pointer or NULL.
4259 (check_eh_spec): Call __throw_type_match_rtti_2.
4260 * tinfo.h (*::dcast): Return int. Add valp parm.
4261 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
4262 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4263 (__throw_type_match_rtti): Now just a wrapper.
4264
4265 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4266 (init_exception_processing): Don't initialize them.
4267
4268 1999-08-23 Paul Burchard <burchard@pobox.com>
4269
4270 * decl.c (check_default_argument): Fix typo.
4271
4272 1999-08-22 Mark Mitchell <mark@codesourcery.com>
4273
4274 * cp-tree.def (STMT_EXPR): Fix typo in node name.
4275
4276 * dump.c (dump_next_stmt): New function.
4277 (dequeue_and_dump): Use it.
4278
4279 * pt.c (tsubst_copy): Make sure to initialize return value for a
4280 STMT_EXPR, even when processing_template_decl.
4281 * semantics.c (finish_stmt_expr): A statement-expression whose
4282 last statement is not an expression-statement has type `void'.
4283
4284 1999-08-20 Mark Mitchell <mark@codesourcery.com>
4285
4286 * semantics.c (finish_stmt_expr): Fix typo in comment.
4287 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4288 (mapcar): Likewise.
4289 * init.c (build_vec_delete_1): Make the children of a permanent
4290 BIND_EXPR permanent.
4291 * pt.c (register_specialization): Don't register a specialization
4292 more than once.
4293
4294 1999-08-18 Andrew Haley <aph@cygnus.com>
4295
4296 * method.c (process_overload_item): Call build_mangled_C9x_name ()
4297 for all integer parameter types larger than long long.
4298
4299 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4300
4301 * pt.c (redeclare_class_template): Merge default template
4302 arguments in both directions.
4303
4304 * typeck.c (common_type): Undo 1999-08-18 change. Remove
4305 compiler_error message.
4306
4307 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
4308
4309 * cp-tree.h: Declare flag_use_repository.
4310 * pt.c (do_decl_instantiation): Don't complain about duplicate
4311 instantiation with -frepo.
4312 (do_type_instantiation): Likewise.
4313
4314 * pt.c (push_template_decl_real): Complain about everything
4315 that isn't a valid template.
4316
4317 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4318 affect inlines.
4319
4320 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4321
4322 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4323 * decl2.c (build_expr_from_tree): Handle it.
4324 * error.c (dump_expr): Likewise.
4325 * pt.c (for_each_template_parm): Likewise.
4326 (tsubst_copy): Likewise.
4327 * tree.c (search_tree): Likewise.
4328 * semantics.c (finish_pseudo_destructor_call): Create it.
4329
4330 1999-08-18 Mark Mitchell <mark@codesourcery.com>
4331
4332 * search.c (setup_class_bindings): Robustify.
4333 * typeck.c (common_type): Use same_type_p, not pointer equality,
4334 to compare types.
4335
4336 * cp-tree.h (build_lang_field_decl): Remove.
4337 * class.c (build_vtable): Replace calls to build_lang_field_decl
4338 with build_lang_decl.
4339 (prepare_fresh_vtable): Likewise.
4340 (finish_struct_1): Likewise.
4341 (init_class_processing): Likewise.
4342 * decl.c (push_using_decl): Likewise.
4343 (init_decl_processsing): Likewise.
4344 (grokvardecl): Likewise.
4345 (build_ptrmemfunc_type): Likewise.
4346 (grokdeclarator): Likewise.
4347 (build_enumerator): Likewise.
4348 * decl2.c (grok_x_components): Likewise.
4349 (do_class_using_decl): Likewise.
4350 * except.c (call_eh_info): Likewise.
4351 * init.c (init_init_processing): Likewise.
4352 * rtti.c (expand_class_decl): Likewise.
4353 * tree.c (build_base_fields): Likewise.
4354 (build_vbase_pointer_fields): Likewise.
4355 * lex.c (build_lang_decl): Build declarations on the permanent
4356 obstack if we're building statmeent trees.
4357 (retrofit_lang_decl): Handle both the full lang_decl and also the
4358 smaller lang_decl_flags here.
4359 (build_lang_field_decl): Remove.
4360 * pt.c (push_template_decl_real): Issue errors for variable
4361 declarations that are not static members.
4362
4363 1999-08-18 Richard Henderson <rth@cygnus.com>
4364
4365 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4366 (mapcar): Likewise.
4367
4368 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4369
4370 * cp-tree.h (back_end_hook): New variable.
4371 * decl2.c (back_end_hook): Define it.
4372 (finish_file): If it's non-NULL, call it.
4373
4374 * decl.c (add_decl_to_level): New function.
4375 (push_local_binding): Use it.
4376 (find_binding): Fix typo in comment.
4377 (pushdecl): Use add_decl_to_level. Put templates on the
4378 corresponding namespace-scope binding levels.
4379 * dump.c (dequeue_and_dump): Print the specializations of a
4380 template.
4381 * pt.c (push_template_decl_real): Don't push a template multiple
4382 times.
4383
4384 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4385
4386 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4387 (CALL_DECLARATOR_QUALS): Likewise.
4388 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4389 * decl.c (grokdeclarator): Adjust to use them.
4390 * decl2.c (grokfield): Likewise.
4391 (reparse_absdcl_as_casts): Likewise.
4392 * lex.c (make_call_declarator): Likewise.
4393 (set_quals_and_spec): Likewise.
4394 * pt.c (tsubst): Likewise.
4395 * tree.c (mapcar): Remove special hack to handle third operand of
4396 a CALL_EXPR.
4397
4398 1999-08-16 Mark Mitchell <mark@codesourcery.com>
4399
4400 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4401 * class.c (build_vtable): Use build_lang_field_decl to build the
4402 VAR_DECLs for vtables.
4403 (prepare_fresh_vtable): Likewise.
4404 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4405 CAN_HAVE_FULL_LANG_DECL_P.
4406 (push_using_decl): Use build_lang_decl to build USING_DECLs.
4407 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4408 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4409 (build_lang_field_decl): Likewise.
4410 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4411 to copy.
4412
4413 * cp-tree.def (STMT_EXPR): New tree node.
4414 * cp-tree.h (STMT_EXPR_STMT): New macro.
4415 (store_return_init): Change prototype.
4416 (finish_named_return_value): New function.
4417 (expand_stmt): Likewise.
4418 (expand_body): Likewise.
4419 (begin_stmt_tree): Likewise.
4420 (finish_stmt_tree): Likewise.
4421 (expanding_p): New variable.
4422 (last_expr_type): Likewise.
4423 (building_stmt_tree): New macro.
4424 * decl.c (start_function): Use building_stmt_tree, not
4425 processing_template_decl, where appropriate.
4426 (store_parm_decls): Likewise.
4427 (store_return_init): Move most of the body to semantics.c.
4428 (finish_function): Use building_stmt_tree.
4429 (finish_stmt): Clear last_expr_type here.
4430 (cp_function): Add expanding_p, last_tree, last_expr_type.
4431 (push_cp_function_context): Save them.
4432 (pop_cp_function_context): Restore them.
4433 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4434 * error.c (dump_expr): Handle STMT_EXPR.
4435 * except.c (expand_start_catch_block): Use building_stmt_tree.
4436 Use add_decl_stmt.
4437 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4438 (do_case): Move add_tree call to semantics.c.
4439 * parse.y (return_init): Use finish_named_return_value.
4440 (for.init.statement): Use finish_expr_stmt.
4441 * parse.c: Regenerated.
4442 * pt.c (do_pushlevel): Move to semantics.c.
4443 (do_poplevel): Likewise.
4444 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4445 (tsubst_expr): Don't expand all the way to RTL here. Handle
4446 RETURN_INIT and CTOR_INITIALIZER.
4447 (instantiate_decl): Call expand_body after tsubst'ing into
4448 DECL_SAVED_TREE.
4449 * semantics.c (expand_stmts): New function.
4450 (expanding_p): New variable.
4451 (last_expr_type): Likewise.
4452 (finish_expr_stmt): Use building_stmt_tree.
4453 (begin_if_stmt): Likewise.
4454 (finish_if_stmt_cond): Likewise.
4455 (finish_then_clause): Likewise.
4456 (begin_else_clause): Likewise.
4457 (finish_else_clause): Likewise.
4458 (begin_while_stmt): Likewise.
4459 (finish_while_stmt_cond): Likewise.
4460 (finish_while_stmt): Likewise.
4461 (finish_do_body): Likewise.
4462 (finish_do_stmt): Likewise.
4463 (finish_return_stmt): Likewise.
4464 (begin_for_stmt): Likewise.
4465 (fnish_for_init_stmt): Likewise.
4466 (finish_for_cond): Likewise.
4467 (finish_for_expr): Likewise.
4468 (finish_for_stmt): Likewise.
4469 (finish_break_stmt): Likewise.
4470 (finish_continue_stmt): Likewise.
4471 (finish_switch_cond): Likewise.
4472 (finish_switch_stmt): Likewise.
4473 (finish_case_label): Call add_tree here if necessary.
4474 (finish_goto_statement): Use building_stmt_tree.
4475 (begin_try_block): Likewise.
4476 (begin_function_try_block): Likewise.
4477 (finish_try_block): Likewise.
4478 (finish_function_try_block): Likewise.
4479 (finish_handler_sequence): Likewise.
4480 (finish_function_handler_sequence): Likewise.
4481 (begin_handler): Likewise.
4482 (finish_handler_parms): Likewise.
4483 (finish_handler): Likewise.
4484 (begin_compound_stmt): Likewise.
4485 (finish_compound_stmt): Likewise.
4486 (finish_asm_stmt): Likewise.
4487 (finish_label_stmt): Likewise.
4488 (finish_named_return_value): New function.
4489 (setup_vtbl_ptr): Moved here from decl2.c.
4490 (do_pushlevel): Moved here from pt.c.
4491 (do_poplevel): Likewise.
4492 (begin_stmt_expr): Use building_stmt_tree.
4493 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
4494 when building_stmt_tree.
4495 (begin_stmt_tree): New function.
4496 (finish_stmt_tree): Likewise.
4497 (expand_stmt): Likewise.
4498 (expand_body): Likewise.
4499 * tree.c (build_cplus_method_type): Make sure the argument types
4500 end up on the same obstack as the METHOD_TYPE.
4501 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4502 THROW_EXPR, STMT_EXPR.
4503 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
4504 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
4505 sorry, if an unsupported node is encountered.
4506 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4507 (c_expand_return): Don't call add_tree here.
4508
4509 1999-08-15 Mark Mitchell <mark@codesourcery.com>
4510
4511 * pt.c (check_default_tmpl_args): Don't check in local scopes.
4512 (tsubst_decl): Make sure the declaration is on a saveable
4513 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4514 variable.
4515 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4516
4517 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
4518
4519 Speed up Koenig lookup.
4520 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
4521 to return namespaces we've looked at.
4522 * decl2.c (lookup_using_namespace): Likewise.
4523 (add_function): Don't call ovl_member.
4524 (lookup_arg_dependent): Initialize k.namespaces to the list of
4525 namespaces seen in unqualified lookup.
4526 * call.c (equal_functions): Move here from tree.c.
4527 (joust): Use it to handle duplicate candidates.
4528 * tree.c (ovl_member): Use ==.
4529
4530 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4531
4532 * cp-tree.def (DECL_STMT): Make it smaller.
4533 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
4534 (lang_decl): ... here. Add next.
4535 (DECL_SAVED_TREE): Adjust accordingly.
4536 (DECL_IMPLICIT_TYPEDEF_P): New macro.
4537 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4538 (DECL_STMT_DECL): Likewise.
4539 (create_implicit_typedef): New function.
4540 (maybe_push_decl): Likewise.
4541 (tsubst_default_argument): New function.
4542 (at_function_scope_p): Likewise.
4543 (add_decl_stmt): Likewise.
4544 (push_permanent_obstack): Likewise.
4545 * call.c (convert_default_arg): Use tsubst_default_argument.
4546 * class.c (add_method): Use push_permanent_obstack.
4547 (build_self_reference): Create a TEMPLATE_DECL for the
4548 self-reference, if necessary.
4549 * decl.c (pseudo_global_level_p): Only look at the current binding
4550 level.
4551 (push_binding): Use push_permanent_obstack.
4552 (create_implicit_typedef): New function.
4553 (pushtag): Use it.
4554 (duplicate_decls): Use push_permanent_obstack.
4555 (maybe_push_decl): New function.
4556 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
4557 (start_decl_1): Remove dead code.
4558 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
4559 pseudo_global_level_p.
4560 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
4561 template.
4562 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
4563 pseudo_global_level_p.
4564 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
4565 a template.
4566 (get_sentry): Use push_permanent_obstack.
4567 * dump.c (dequeue_and_dump): Enable DECL_STMT.
4568 * except.c (call_eh_info): Use push_permanent_obstack.
4569 (build_eh_type_ref): Likewise.
4570 (do_pop_exception): Likewise.
4571 (expand_eh_spec): Likewise.
4572 (alloc_eh_object): Likewise.
4573 (expand_throw): Likewise.
4574 * init.c (build_java_class_ref): Likewise.
4575 * lex.c (get_time_identifier): Likewise.
4576 (free_lang_decl_chain): Correct type.
4577 (retrofit_lang_decl): Adjust accordingly.
4578 (build_lang_field_decl): Likewise.
4579 * lex.h (free_lang_decl_chain): Likewise.
4580 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
4581 * parse.c: Regenerated.
4582 * pt.c (tsubst_default_arguments): New function.
4583 (retrieve_local_specialization): Likewise.
4584 (register_local_specialization): Likewise.
4585 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
4586 pseudo_global_level_p to determine whether or not a template is
4587 primary.
4588 (lookup_template_class): Likewise. Use create_implicit_typedef.
4589 (instantiate_class_template): Call tsubst_default_arguments for
4590 member functions, if appropriate.
4591 (tsubst_default_argument): New function.
4592 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
4593 * search.c (at_function_scope_p): New function.
4594 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
4595 (finish_label_stmt): Likewise.
4596 (add_decl_stmt): New function.
4597 (begin_class_definition): Likewise.
4598 (finish_typeof): Likewise.
4599 * tree.c (copy_template_template_parm): Likewise.
4600 (copy_to_permanent): Likewise.
4601 (push_permanent_obstack): Define.
4602 (mark_addressable): Use it.
4603 * typeck.c (mark_addressable): Likewise.
4604
4605 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
4606
4607 * cp-tree.h (init_cplus_unsave): New.
4608 (cplus_unsave_expr_now): New.
4609 * lex.c (init_parse): Call init_cplus_unsave.
4610 * tree.c (init_cplus_unsave): New.
4611 (cplus_unsave_expr_now): New.
4612
4613 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4614
4615 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
4616 decl_constant_value to simplify array bounds.
4617
4618 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
4619
4620 * lang-options.h: Add -fms-extensions.
4621 * cp-tree.h: Declare flag_ms_extensions.
4622 * decl2.c: Define it.
4623 * class.c (instantiate_type): Don't complain about taking the address
4624 of a bound member function if -fms-extensions.
4625 * typeck.c (build_unary_op): Likewise.
4626 * decl.c (grokdeclarator): Or about implicit int.
4627 * init.c (resolve_offset_ref): Or about implicit '&'.
4628
4629 1999-08-11 Mark Mitchell <mark@codesourcery.com>
4630
4631 * cp-tree.h (minimal_parse_mode): Remove.
4632 (finish_label_stmt): New function.
4633 * decl.c (saved_scope): Remove minimal parse mode.
4634 (maybe_push_to_top_level): Don't save it.
4635 (pop_from_top_level): Don't restore it.
4636 (define_label): Split out template-handling code to semantics.c.
4637 (start_decl): Don't use minimal_parse_mode.
4638 (cp_finish_decl): Likewise.
4639 (start_function): Don't increment it.
4640 (store_return_init): Don't use it.
4641 (finish_function): Don't decrement it.
4642 * parse.y (label_colon): Use finish_label_stmt throughout.
4643 * parse.c: Regenerated.
4644 * pt.c (minimal_parse_mode): Don't define it.
4645 (tsubst_expr): Use finish_label_stmt.
4646 * semantics.c (finish_label_stmt): New function.
4647
4648 * dump.c (queue): Be careful when computing bitmasks.
4649 (dequeue_and_dump): Describe binfos as binfos, not as
4650 vectors.
4651
4652 * parse.y (pedantic): Give it itype. Adjust usage accordingly
4653 throughout.
4654 * parse.c: Regenerated.
4655
4656 * Make-lang.in (CXX_SRCS): Remove sig.c.
4657 * Makefile.in (CXX_OBJS): Remove sig.o.
4658 (sig.o): Remove.
4659 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
4660 (CPTI_SIGNATURE_TYPE): Likewise.
4661 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
4662 (opaque_type_node): Likewise.
4663 (signature_type_node): Likewise.
4664 (sigtable_entry_type): Likewise.
4665 (flag_handle_signatures): Likewise.
4666 (lang_type): Remove is_signature, is_signature_pointer,
4667 is_signature_reference, has_opaque_typedecls,
4668 sigtables_has_been_generated. Adjust dummy. Remove signature,
4669 signature_pointer_to, signature_reference_to.
4670 (IS_SIGNATURE): Remove.
4671 (SET_SIGNATURE): Remove.
4672 (CLEAR_SIGNATURE): Remove.
4673 (IS_SIGNATURE_POINTER): Remove.
4674 (IS_SIGNATURE_REFERENCE): Remove.
4675 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
4676 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
4677 (CLASSTYPE_SIGNATURE): Remove.
4678 (SIGNATURE_TYPE): Remove.
4679 (SIGNATURE_METHOD_VEC): Remove.
4680 (SIGNATURE_POINTER_TO): Remove.
4681 (SIGNATURE_REFERENCE_TO): Remove.
4682 (lang_decl_flags): Remove is_default_implementation. Rename
4683 memfunc_pointer_to to saved_tree.
4684 (IS_DEFAULT_IMPLEMENTATION): Remove.
4685 (DECL_MEMFUNC_POINTER_TO): Remove.
4686 (DECL_MEMFUNC_POINTING_TO): Remove.
4687 (DECL_SAVED_TREE): Adjust definition.
4688 (tag_types): Remove signature_type_node.
4689 (SIGNATURE_FIELD_NAME): Remove.
4690 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
4691 (SIGNATURE_OPTR_NAME): Likewise.
4692 (SIGNATURE_SPTR_NAME): Likewise.
4693 (SIGNATURE_POINTER_NAME): Likewise.
4694 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
4695 (SIGNATURE_REFERENCE_NAME): Likewise.
4696 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
4697 (SIGTABLE_PTR_TYPE): Likewise.
4698 (SIGTABLE_NAME_FORMAT): Likewise.
4699 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
4700 (SIGTABLE_TAG_NAME): Likewise.
4701 (SIGTABLE_VB_OFF_NAME): Likewise.
4702 (SIGTABLE_VT_OFF_NAME): Likewise.
4703 (finish_base_specifiers): Change prototype.
4704 (build_signature_pointer_type): Remove.
4705 (build_signature_reference_type): Remove.
4706 (build_signature_pointer_constructor): Remove.
4707 (build_signature_method_call): Remove.
4708 (build_optr_ref): Likewise.
4709 (append_signature_fields): Likewise.
4710 (signature_error): Likewise.
4711 * call.c (build_this): Remove signature support.
4712 (build_over_call): Likewise.
4713 (build_new_method_call): Likewise.
4714 * class.c (add_implicitly_declared_members): Likewise.
4715 (finish_struct_1): Likewise.
4716 (finish_struct): Likewise.
4717 * cvt.c (cp_convert_to_pointer): Likewise.
4718 (convert_to_pointer_force): Likewise.
4719 (ocp_convert): Likewise.
4720 * decl.c (sigtable_decl_p): Remove.
4721 (init_decl_processing): Remove support for signatures.
4722 (cp_finish_decl): Likewise.
4723 (grokdeclarator): Likewise.
4724 (grokparms): Likewise.
4725 (xref_tag): Likewise.
4726 (start_function): Likewise.
4727 (start_method): Likewise.
4728 * decl2.c (finish_sigtable_vardecl): Remove.
4729 (flag_handle_signatures): Remove.
4730 (lang_f_options): Remove handle-signatures.
4731 (grokfield): Remove support for signatures.
4732 (grokbitfield): Likewise.
4733 (finish_file): Likewise.
4734 (reparse_absdcl_as_casts): Likewise.
4735 * error.c (dump_type_real): Likewise.
4736 (dump_function_decl): Likewise.
4737 * friend.c (make_friend_class): Likewise.
4738 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
4739 * hash.h: Regenerated.
4740 * init.c (build_new_1): Remove support for signatures.
4741 * lang-options.h: Remove -fhandle-signatures,
4742 -fno-handle-signatures.
4743 * lex.c (init_parse): Remove support for signatures.
4744 (yyprint): Likewise.
4745 * lex.h (rid): Remove RID_SIGNATURE.
4746 * method.c (build_decl_overload_real): Remove support for
4747 signatures.
4748 (hack_identifier): Likewise.
4749 * parse.y (base_class): Likewise.
4750 (base_class.1): Likewise.
4751 (access_specifier): Likewise.
4752 * search.c (lookup_member): Likewise.
4753 * semantics.c (finish_qualified_object_call_expr): Likewise.
4754 (finish_template_type_parm): Likewise.
4755 (begin_class_definition): Likewise.
4756 (finish_base_specifier): Likewise.
4757 * sig.c: Remove.
4758 * tree.c (build_cplus_method_type): Remove support for signatures.
4759 * typeck.c (require_complete_type): Likewise.
4760 (c_sizeof): Likewise.
4761 (c_alignof): Likewise.
4762 (build_object_ref): Likewise.
4763 (build_component_ref): Likewise.
4764 (build_indirect_ref): Likewise.
4765 (build_c_cast): Likewise.
4766 (build_modify_expr): Likewise.
4767 (convert_for_initialization): Likewise.
4768 * typeck2.c (signature_error): Remove.
4769 (store_init_value): Remove support for signatures.
4770 (digest_init): Likewise.
4771 (build_x_arrow): Likewise.
4772 (build_functional_cast): Likewise.
4773 * xref.c (GNU_xref_decl): Likewise.
4774
4775 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
4776
4777 * lex.c (do_identifier): Remove unnecessary lookup of class field.
4778
4779 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
4780
4781 * decl2.c (set_decl_namespace): Do not complain about non-matching
4782 decls if processing a template.
4783
4784 1999-08-09 Mark Mitchell <mark@codesourcery.com>
4785
4786 * decl.c (build_ptrmemfunc_type): Handle qualified
4787 pointer-to-member types here.
4788 * tree.c (cp_build_qualified_type_real): Simplify handling here.
4789
4790 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4791
4792 * lex.c (lang_identify): Likewise.
4793
4794 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
4795
4796 * Makefile.in: Update dependencies.
4797 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
4798 NULL_RTX.
4799 * decl.c: Include "function.h"
4800 (cleanup_label, return_label): Delete declarations.
4801 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
4802 (finish_function): Rename last_parm_insn variable to
4803 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
4804 * decl2.c: Include "function.h".
4805 (rtl_expr_chain): Delete declaration.
4806 * method.c: Include "function.h"
4807 * tree.c (build_vbase_pointer_fields): Don't initialize
4808 DECL_SAVED_INSNS with NULL_RTX.
4809 * typeck.c: Include "function.h"
4810
4811 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
4812
4813 * semantics.c (begin_function_try_block, finish_function_try_block,
4814 finish_function_handler_sequence): New fns.
4815 * parse.y (function_try_block): Use them.
4816 * pt.c (instantiate_decl): Likewise.
4817
4818 * cp-tree.h: Declare in_function_try_handler.
4819 * decl.c: Define it.
4820 (start_function): Clear it.
4821 (struct cp_function, push_cp_function_context): Save it.
4822 (pop_cp_function_context): Restore it.
4823 * parse.y (function_try_block): Set and clear it.
4824 * except.c (expand_end_catch_block): Rethrow if we reach the end
4825 of a function-try-block handler in a ctor or dtor.
4826 * typeck.c (c_expand_return): Complain about returning from a
4827 function-try-block handler of a ctor.
4828
4829 * parse.y (function_try_block): Call end_protect_partials
4830 before expand_start_all_catch.
4831
4832 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
4833
4834 * decl.c (struct binding_level): Add eh_region field.
4835 (push_binding_level): Set it.
4836 (define_label): Complain about jumping into an EH block.
4837
4838 * ptree.c (print_lang_type): Print the real type of a PMF.
4839 Print what exceptions a fn type throws.
4840
4841 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4842
4843 * class.c (count_fields, add_fields_to_vec): Add static prototype.
4844
4845 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
4846 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
4847 char*.
4848
4849 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
4850 Constify a char*.
4851
4852 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4853 char*.
4854
4855 * dump.c (queue_and_dump_index, dump_int, dump_string,
4856 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4857 a char*.
4858 (dump_stmt): Add static prototype.
4859
4860 * errfn.c (cp_thing): Constify a char*.
4861
4862 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4863 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4864 dump_expr): Constify a char*.
4865
4866 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4867 read_line_number): Add static prototype.
4868 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4869 (real_yylex): Move label `letter' into the scope where it is used.
4870
4871 * method.c (build_mangled_template_parm_index, build_overload_int,
4872 build_decl_overload_real, get_id_2): Constify a char*.
4873
4874 * search.c (check_final_overrider): Make static.
4875
4876 * typeck.c (composite_pointer_type): Constify a char*.
4877
4878 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4879
4880 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4881 we're looking at a class.
4882
4883 * decl.c (lookup_name_real): Set the complain flag if we're
4884 looking for a namespace member.
4885
4886 * lex.c (real_yylex): We can have a number with no digits.
4887
4888 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4889
4890 * search.c (binfo_from_vbase): New fn.
4891 * cp-tree.h: Declare it.
4892 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4893 from pointer to member of virtual base.
4894 * typeck.c (get_delta_difference): Likewise.
4895
4896 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
4897
4898 * pt.c (tsubst): Use build_index_type to build in-template array
4899 index type. Fixes g++.oliva/dwarf1.C.
4900 * decl.c (grokdeclarator): Likewise, just for consistency, as it
4901 doesn't seem to trigger the bug without it.
4902
4903 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4904
4905 * typeck2.c (add_exception_specifier): Use complete_type.
4906
4907 1999-08-06 Mark Mitchell <mark@codesourcery.com>
4908
4909 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4910 (dump_binary_op): Bulletproof.
4911 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4912 * tree.c (search_tree): Don't enumerate all the nodes of classes
4913 `1', `2', and `<'; handle them generically. Don't be sorry about
4914 "unrecognized tree codes"; just abort.
4915 (no_linkage_check): Don't do linkage checks for templates.
4916
4917 * tree.c (cp_build_qualified_type_real): Handle
4918 pointer-to-member-function types correctly.
4919
4920 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
4921
4922 * decl.c (pushdecl): Only give an error for shadowing a parm
4923 from *this* function.
4924
4925 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
4926
4927 * typeck2.c: Update URLs and mail addresses.
4928
4929 1999-08-04 Nathan Sidwell <nathan@acm.org>
4930
4931 * cp-tree.h (empty_except_spec): New global var.
4932 (compexcepttypes): Remove prototype.
4933 (comp_except_specs): Prototype new global function.
4934 (add_exception_specifier): Prototype new global function.
4935 * decl.c (empty_except_spec): Define new global var.
4936 (duplicate_decls): Use comp_except_specs, reword error message.
4937 (init_decl_processing): Initialize empty_except_spec.
4938 Adjust build_exception_variant calls.
4939 * parse.y (exception_specification_opt): Use empty_except_spec.
4940 (ansi_raise_identifier): Call check_for_new_type.
4941 (ansi_raise_identifiers): Use add_exception_specifier.
4942 * pt.c (tsubst): Use add_exception_specifier to build exception
4943 specifier.
4944 * search.c (check_final_overrider): New static function, broken
4945 out of get_matching_virtual. Check throw specifiers, reword
4946 diagnostics.
4947 (get_matching_virtual): Use check_final_overrider.
4948 * tree.c (build_exception_variant): Use comp_except_specs.
4949 * typeck.c (compexcepttypes): Remove.
4950 (comp_except_types): New static function, helper for
4951 comp_except_specs. Compare two types as exception specifiers.
4952 (comp_except_specs): New global function, compare two exception
4953 specifiers.
4954 (comptypes): Adjust for comp_except_specs.
4955 * typeck2.c (add_exception_specifier): New global function.
4956
4957 * class.c (check_for_override): Reword error message.
4958
4959 1999-08-03 Nathan Sidwell <nathan@acm.org>
4960
4961 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4962 * cp-tree.h (struct lang_type): Added non_pod_class flag.
4963 (CLASSTYPE_NON_POD_P): New macro to access it.
4964 * class.c (finish_struct_1): Determine non-PODness.
4965 Check for arrays of pointers (-Weffc++).
4966 Remove array inspection duplicated code.
4967 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
4968 Use CLASSTYPE_NON_POD_P.
4969
4970 1999-08-03 Nathan Sidwell <nathan@acm.org>
4971
4972 * class.c (duplicate_tag_error): Preserve template information.
4973
4974 1999-08-03 Nathan Sidwell <nathan@acm.org>
4975
4976 * decl.c (start_enum): Show location of previous definition.
4977 * parse.y (enumlist_opt): New reduction.
4978 (structsp): Simplify enum rules to use enumlist_opt.
4979
4980 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
4981
4982 * lex.c (yyprint): Handle PFUNCNAME.
4983
4984 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
4985 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
4986
4987 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
4988
4989 * decl.c (start_decl): Set attributes before duplicate_decls call.
4990
4991 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4992
4993 * Make-lang.in (CXX_SRCS): Add dump.c.
4994 * Makefile.in (CXX_OBJS): Add dump.o.
4995 (dump.o): New target.
4996 * cp-tree.h (DECL_CONV_FN_P): Document.
4997 (DECL_OVERLOADED_OPERATOR_P): New function.
4998 (TYPE_PTRMEM_CLASS_TYPE): New macro.
4999 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5000 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5001 (ASM_VOLATILE_P): New macro.
5002 (STMT_LINENO): Likewise.
5003 (cp_namespace_decls): New function.
5004 (dump_node_to_file): New function.
5005 * decl.c (cp_namespace_decls): New function.
5006 (walk_namespaces_r): Use it.
5007 (wrapup_globals_for_namespace): Likewise.
5008 * decl2.c (flag_dump_translation_unit): New variable.
5009 (lang_decode_option): Handle -fdump-translation-unit.
5010 (finish_file): If flag_dump_translation_unit is set, dump the
5011 translation unit.
5012 * dump.c: New file.
5013 * lang-options.h: Add -fdump-translation-unit.
5014 * pt.c (tsubst_template_parms): Robustify.
5015 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5016 (tsubst_expr): Use STMT_LINENO.
5017 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5018 for invalid cv-qualifiers even while building templates.
5019
5020 1999-08-02 Richard Henderson <rth@cygnus.com>
5021
5022 * call.c: Include defaults.h instead of expr.h.
5023 * decl.c: Likewise.
5024 * pt.c: Likewise.
5025 * typeck.c: Include defaults.h.
5026
5027 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5028
5029 * lex.c (errorcount, sorrycount): Don't declare.
5030 * repo.c (errorcount, sorrycount): Likewise.
5031 * typeck2.c (errorcount, sorrycount): Likewise.
5032
5033 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5034
5035 * call.c (convert_default_arg, build_over_call): Change all uses of
5036 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5037 Ensure expr.h is included.
5038 * decl.c (grokparams): Ditto.
5039 * pt.c (tsubst_decl): Ditto.
5040 * typeck.c (convert_arguments): Ditto.
5041
5042 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5043
5044 * class.c (mark_overriders): Fix order of args to overrides.
5045 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5046 functions with the same name.
5047
5048 1999-08-02 Richard Henderson <rth@cygnus.com>
5049
5050 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5051
5052 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5053
5054 * call.c (build_conditional_expr): Fix typo in comment.
5055
5056 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5057
5058 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5059 case_stack; use in_control_zone_p.
5060 * typeck.c (c_expand_return): Likewise.
5061
5062 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5063
5064 * except.c (catch_clauses): Delete declaration.
5065
5066 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5067
5068 * call.c (build_conditional_expr): Call convert_from_reference to
5069 avoid reference/non-reference type confusion. Fix typo.
5070
5071 1999-07-30 Richard Henderson <rth@cygnus.com>
5072
5073 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5074 * cp-tree.h (initializer_constant_valid_p): Remove.
5075
5076 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5077
5078 * call.c (conditional_conversion): Don't build BASE_CONVs for
5079 conversions between things that have the same type.
5080 (build_conditional_expr): Tweak.
5081 (convert_like): Some BASE_CONVs really do require the generation
5082 of code.
5083
5084 * init.c (perform_member_init): Don't go through build_modify_expr
5085 for simple initializations.
5086
5087 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5088
5089 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5090 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5091 virtual functions and MI. Simplify.
5092
5093 * method.c: Remove prototype for largest_union_member.
5094 * pt.c (determine_specialization): Fix uninitialized warning.
5095 * lex.c (real_yylex): Likewise.
5096
5097 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5098
5099 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5100 here too.
5101
5102 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5103 * class.c (modify_one_vtable): Change prototype accordingly.
5104 (modify_all_vtables): Likewise.
5105 (modify_all_direct_vtables): Likewise.
5106 (modify_all_indirect_vtables): Likewise.
5107 (build_vtable_entry_for_fn): New function.
5108 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5109 (modify_vtable_entry): Likewise.
5110 (add_virtual_function): Likewise.
5111 (build_vtbl_initializer): New function.
5112 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5113 (fixup_vtable_deltas1): Likewise.
5114 (fixup_vtable_deltas): Likewise.
5115 (override_one_vtable): Likewise.
5116 (finish_struct_1): Likewise.
5117
5118 * error.c (dump_expr): Likewise.
5119 * search.c (get_abstract_virtuals_1): Likewise.
5120 (get_abstract_virtuals): Likewise.
5121 (expand_upcast_fixups): Likewise.
5122 * tree.c (debug_binfo): Likewise.
5123 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5124 __pure_virtual here.
5125
5126 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5127
5128 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5129 as per 1999-07-26 change.
5130
5131 * typeck.c (c_sizeof): Don't allow non-static data members.
5132 (expr_sizeof): Likewise.
5133
5134 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5135
5136 * input.c (feed_input): Only touch lineno and input_filename
5137 if !USE_CPPLIB. Save the old values before setting the new ones.
5138
5139 * input.c (feed_input): Add file, line parms.
5140 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5141 (real_yylex): Check linemode before input_redirected().
5142
5143 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5144 from op new to warning.
5145
5146 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5147
5148 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5149 * call.c: All uses changed.
5150 * typeck.c: Likewise.
5151
5152 1999-07-26 Nathan Sidwell <nathan@acm.org>
5153
5154 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5155 prototype.
5156
5157 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5158
5159 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5160 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5161 (strip_top_quals): Declare.
5162 (ncp_convert): Likewise.
5163 (type_after_usual_arithmetic_converions): Likewise.
5164 (composite_pointer_type): Likewise.
5165 * call.c (strip_top_quals): Don't make it static.
5166 (promoted_arithmetic_type_p): New function.
5167 (conditional_conversion): Likewise.
5168 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5169 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
5170 for converting a type to itself.
5171 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5172 (implicit_conversion): Make sure the from and to types are
5173 complete.
5174 (add_builtin_candidate): Correct handling of ?: operator.
5175 (add_builtin_candidates): Improve documentation.
5176 (build_conditional_expr): New function.
5177 (can_convert): Implement in terms of can_convert_arg.
5178 (ncp_convert): New function.
5179 * typeck.c (type_after_usual_arithmetic_conversions): New
5180 function, split out from common_type.
5181 (composite_pointer_type): New function, split out from
5182 build_conditional_expr.
5183 (common_type): Use type_after_usual_arithmetic_conversions.
5184 Remove redundant attribute merging.
5185 (comptypes): Tidy. Handle COMPLEX_TYPE.
5186 (build_binary_op_nodefault): Use null_ptr_cst_p.
5187 (build_conditional_expr): Remove.
5188 (convert_for_assignment): Use new conversion functions.
5189
5190 * cp-tree.h (abstract_virtuals_error): Change declaration.
5191 * typeck2.c (abstract_virtuals_error): Check to see if an error
5192 ocurred, and return a boolean value accordingly.
5193 (build_functional_cast): Adjust accordingly.
5194 * class.c (finish_struct_1): Likewise.
5195 * cvt.c (ocp_convert): Likewise.
5196 * decl.c (cp_finish_decl): Likewise.
5197 (grokparams): Likewise.
5198 (grok_op_properties): Likewise.
5199 (start_function): Likewise.
5200 * init.c (build_new_1): Likewise.
5201
5202 * pt.c (unify): Don't get confused by pointers-to-member functions.
5203
5204 * search.c (build_cplus_new): Robustify.
5205
5206 1999-07-24 Richard Henderson <rth@cygnus.com>
5207
5208 * gxx.gperf (__builtin_va_arg): New.
5209 * parse.y (VA_ARG): New token.
5210 (unary_expr): Recognize it.
5211
5212 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
5213
5214 * g++FAQ.texi: Deleted per Joe Buck's request.
5215 * Makefile.in: Corresponding changes.
5216
5217 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
5218
5219 * lex.c: Sync with C frontend.
5220 (whitespace_cr): New fn.
5221 (skip_white_space): Use it.
5222 (init_parse): Reorder.
5223 (yyprint): Support CONSTANT.
5224 (pragma_getc, pragma_ungetc): Bring back.
5225 (read_line_number): Change in_system_header directly.
5226 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5227 (parse_float): Update to C version.
5228 (yylex): Handle '$' under the letter case.
5229 Remove looking_for_typename handling.
5230 Support hex floating point constants.
5231 Follow C's lead for choosing type of integer constants.
5232 Rearrange stuff to match C frontend.
5233 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5234 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5235
5236 1999-07-23 Mark Mitchell <mark@codesourcery.com>
5237
5238 * call.c (reference_binding): Tweak.
5239 (mayble_handle_implicit_object): Use direct_reference_binding to
5240 create the right implicit conversion sequence.
5241
5242 1999-07-22 Mark Mitchell <mark@codesourcery.com>
5243
5244 * pt.c (convert_nontype_argument): Don't call decl_constant_value
5245 if we're converting to a reference type.
5246
5247 * call.c (NEED_TEMPORARY_P): New macro.
5248 (standard_conversion): Set it, for derived-to-base conversions.
5249 (reference_related_p): New function.
5250 (reference_compatible_p): Likewise.
5251 (convert_class_to_reference): Likewise.
5252 (direct_reference_binding): Likewise.
5253 (reference_binding): Rework for standards-compliance.
5254 (convert_like): Adjust accordingly.
5255 (maybe_handle_ref_bind): Simplify; the right conversion sequences
5256 are now built up in reference_binding.
5257 (initialize_reference): New function.
5258 * cp-tree.h (ICS_USER_FLAG): Document.
5259 (ICS_THIS_FLAG): Likewise.
5260 (ICS_BAD_FLAG): Likewise.
5261 (NEED_TEMPORARY_P): Likewise.
5262 (cp_lvalue_kind): New type.
5263 (real_lvalue_p): Return it.
5264 * error.c (dump_expr): Provide more accurate representation for
5265 AGGR_INIT_EXPRs.
5266 * init.c (expand_default_init): Do not try to perform implicit
5267 conversions for a brace-enclosed initializer.
5268 * search.c (lookup_conversions): Document.
5269 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
5270 appropriately.
5271 (real_lvalue_p): Adjust accordingly.
5272 (lvalue_p): Likewise.
5273 (build_cplus_new): Don't allow the creation of an abstract class.
5274 * typeck.c (convert_for_initialization): Use initialize_reference.
5275
5276 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
5277
5278 * lex.c (real_yylex) : Correct the test for overflow when lexing
5279 integer literals.
5280
5281 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
5282
5283 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5284 not DECL_BUILT_IN, to determine if a function is internally declared.
5285 (duplicate_decls): Likewise. Improve handling of builtins.
5286 (push_overloaded_decl): Remove special handling of builtins.
5287
5288 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5289
5290 * decl.c (grokdeclarator): Pull out decl_constant_value in
5291 templates, too.
5292
5293 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5294 * cp-tree.h, pt.c, semantics.c: Adjust.
5295 * method.c (largest_union_member): Remove.
5296
5297 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5298
5299 * lex.c (token_getch, token_put_back): New fns.
5300 (real_yylex): Use them.
5301
5302 * lex.c (lang_init): Generalize.
5303 (lang_init_options): Tell cpplib this is C++.
5304 (nextchar): Remove. Replace uses with put_back.
5305 (skip_white_space): Handle linemode here. Optimize for cpplib.
5306 (extend_token_buffer_to): New fn.
5307 (extend_token_buffer): Use it.
5308 (read_line_number, check_newline): Just deal with tokens.
5309 (real_yylex): More cpplib optimizations. Simplify. Don't produce
5310 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5311 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5312 * parse.y (PAREN_STAR_PAREN): Remove.
5313 * input.c: Don't use the putback machinery with cpplib.
5314 (sub_getch): Fold back into getch.
5315 (getch): Don't handle linemode here.
5316 (feed_input): Unget any text in the token buffer.
5317
5318 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5319 nextyychar, nextyylval): Remove.
5320
5321 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
5322 Jason Merrill <jason@yorick.cygnus.com>
5323
5324 * lex.c (indent_level): New variable.
5325 (init_parse): Set cpp_token to CPP_DIRECTIVE.
5326 (consume_string): Make this smart about USE_CPPLIB.
5327 (yyungetc): Use put_back function.
5328 (pragma_getc, pragma_ungetc): Functions deleted.
5329 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5330 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5331 pragma_ungetc.
5332 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5333 Also, clean up cases where we redundantly set token_buffer[0].
5334 (read_line_number): New fn.
5335 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5336 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5337 (sub_getch): Conditionalize out code that's not appropriate if
5338 USE_CPPLIB.
5339 (put_back): Rewrite in case USE_CPPLIB is defined.
5340 (input_redirected): Ditto.
5341
5342 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5343
5344 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5345 c_global_trees and accessor macros defined in c-common.h.
5346 (cp_tree_index): New enumeration.
5347 (cp_global_trees): Declare new array. Add accessor macros for it, and
5348 delete declarations of tree nodes replaced by it.
5349 (builtin_function): Delete macro, add declaration for new function.
5350 Include c-common.h.
5351 * decl.c: Delete definitions for tree nodes that were replaced by
5352 cp_global_trees and c_global_trees.
5353 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5354 to generate the common builtins here.
5355 (builtin_function): New function.
5356 * decl2.c (abort_fndecl): Delete declaration.
5357 * except.c (expand_builtin_return_address): Delete declaration.
5358 (builtin_return_address_fndecl): Delete variable.
5359 (const_ptr_type_node): Delete declaration.
5360 * lex.c (cons_up_default_function): Delete declaration of
5361 void_list_node.
5362 * parse.y (void_list_node): Delete declaration.
5363 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5364 Delete variables.
5365 (const_string_type_node): Delete declaration.
5366 * search.c (abort_fndecl): Delete declaration.
5367 * Makefile.in: Update dependencies.
5368
5369 1999-07-19 Mark Mitchell <mark@codesourcery.com>
5370
5371 * pt.c (check_default_tmpl_args): Move test for missing default
5372 arguments here, from ...
5373 (end_template_parm_list): Here.
5374
5375 1999-07-18 Mark Mitchell <mark@codesourcery.com>
5376
5377 * decl.c (lookup_nested_type): Remove.
5378 (pushtag): Don't call it.
5379
5380 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
5381
5382 * Makefile.in (INTERFACE): Bump to 2.
5383
5384 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
5385
5386 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5387 instructions to gcc.gnu.org. Removed e-mail address.
5388
5389 1999-07-17 Mark Mitchell <mark@codesourcery.com>
5390
5391 * pt.c (determine_specialization): Tighten error-checking.
5392 (end_template_parm_list): Likewise.
5393
5394 1999-07-14 Mark Mitchell <mark@codesourcery.com>
5395
5396 * pt.c (check_default_tmpl_args): Handle friends defined in the
5397 class just like member functions defined in the class.
5398
5399 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5400 Jason Merrill <jason@yorick.cygnus.com>
5401
5402 * cp-tree.h (struct lang_decl): Added field for storing sorted
5403 FIELD_DECLs (used in TYPE_DECLs).
5404 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5405 (DECL_SORTED_FIELDS): New macro.
5406 * class.c (method_name_cmp): New function.
5407 (finish_struct_methods): Modified to support sorting and searching
5408 methods.
5409 (finish_struct_anon): Changed code in inner loop to use ELT rather
5410 than UELT (which required an extra indirection for every reference).
5411 (field_decl_cmp): New function to support sorting FIELD_DECLs.
5412 (finish_struct_1): Sort fields.
5413 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5414 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5415 Also, switch to using array indexing rather than a changing pointer.
5416 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5417 DECL_SORTED_FIELDS.
5418
5419 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
5420
5421 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5422 casts in system headers or extern "C" blocks.
5423
5424 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5425 errors to pedwarn.
5426
5427 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5428
5429 * decl2.c (write_virtuals): Deleted declaration.
5430 * cp-tree.h (write_virtuals): Deleted extern declaration.
5431 * class.c (finish_struct_1): Removed #if 0'd code that mentions
5432 write_virtuals.
5433 * semantics.c (begin_class_definition): Rewrite code to not depend
5434 on write_virtuals.
5435
5436 * lex.c (cp_pragma_interface): New function.
5437 (cp_pragma_implementation): Likewise.
5438 (handle_cp_pragma): Call them.
5439
5440 * typeck.c (comptypes): Simplify C code in look_hard.
5441
5442 * xref.c (PALLOC): Use xcalloc, not calloc.
5443 (SALLOC): Use xmalloc, not malloc.
5444
5445 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5446
5447 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5448 is NO_DEBUG.
5449
5450 * decl.c (duplicate_decls): If a redeclaration doesn't match the
5451 initial declaration, then don't save the inline info and by all
5452 means don't mark the function as a builtin function.
5453
5454 * decl.c (lookup_name_real): Set NONCLASS to 1 if
5455 CURRENT_CLASS_TYPE is 0.
5456
5457 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5458 NULL_TREE.
5459
5460 * ptree.c (print_lang_type): Added vtable-needs-writing.
5461
5462 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
5463
5464 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5465
5466 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
5467
5468 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5469 Merged into c-common.
5470
5471 1999-07-05 Dave Brolley <brolley@cygnus.com>
5472
5473 * lex.c (errorcount): Declare it.
5474 (finish_parse): Update errorcount for when using CPPLIB.
5475
5476 1999-07-05 Mark Mitchell <mark@codesourcery.com>
5477
5478 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5479 parameters.
5480 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5481 * decl.c (push_class_binding): Use it.
5482 (lookup_name_real): Likewise.
5483
5484 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
5485
5486 * cp-tree.h (widest_integer_literal_type_node,
5487 widest_unsigned_literal_type) : New.
5488 * decl.c (widest_integer_literal_type_node,
5489 widest_unsigned_literal_type) : New.
5490 (init_decl_processing): Handle/use the two new types.
5491 * lex.c (real_yylex): Same.
5492 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5493 Same.
5494
5495 1999-07-01 Mark Mitchell <mark@codesourcery.com>
5496
5497 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5498 to anonymous cv-qualified types.
5499
5500 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
5501
5502 * lex.c (real_yylex) : Change integer literal overflow handling to
5503 be like c-lex.c.
5504
5505 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5506
5507 1999-06-28 Richard Henderson <rth@cygnus.com>
5508
5509 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5510
5511 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
5512
5513 * error.c (dump_type_real): Handle TREE_LIST again.
5514
5515 * typeck.c (comp_target_parms): Don't complain about
5516 converting from () to (...) if !flag_strict_prototype.
5517
5518 * decl.c (grokdeclarator): Update the names of all variants when
5519 de-anonymizing.
5520
5521 1999-06-21 Mark Mitchell <mark@codesourcery.com>
5522
5523 * init.c (expand_aggr_vbase_init): Rename to
5524 construct_virtual_bases. Conditionalize construction here,
5525 rather than ...
5526 (emit_base_init): Here.
5527
5528 1999-06-19 Mark Mitchell <mark@codesourcery.com>
5529
5530 * semantics.c (finish_asm_stmt): Apply decay conversions to
5531 input operands.
5532
5533 * decl.c (expand_static_init): When building an anonymous function
5534 for use with atexit, compute its body before and after entering
5535 the function.
5536
5537 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
5538 EXIT_EXPR.
5539
5540 1999-06-18 Mark Mitchell <mark@codesourcery.com>
5541
5542 * init.c (expand_aggr_vbase_init): Add flag parameter.
5543 (build_partial_cleanup_for): Remove, inlining into ..
5544 (expand_cleanup_for_base): ... here. Take flag parameter.
5545 (emit_base_init): Pass the in_chrg parameter to
5546 emit_aggr_vbase_init.
5547 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
5548
5549 1999-06-16 Mark Mitchell <mark@codesourcery.com>
5550
5551 * decl2.c (import_export_decl): Use same_type_p, rather than
5552 relying on pointer-equality for types.
5553
5554 * method.c (do_build_copy_constructor): Simplify.
5555
5556 * call.c (build_method_call): Remove bogus code for two-argument
5557 delete.
5558 * init.c (build_new_1): Expand on comment, and remove dead code.
5559
5560 * init.c (expand_cleanup_for_base): New function, split out
5561 from ...
5562 (emit_base_init): Here.
5563 (expand_aggr_vbase_init): Use it.
5564
5565 1999-06-15 Mark Mitchell <mark@codesourcery.com>
5566
5567 * cp-tree.h (class_cache_firstobj): Declare.
5568 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5569 * class.c (permanent_obstack): Remove declaration.
5570 (class_cache_firstobj): Make it global.
5571 (add_method): Don't use permanent_obstack directly.
5572 (pushclass): Only free the class_cache_obstack if we know how far
5573 back to free it.
5574 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5575 * decl.c: Remove dead comment.
5576 (saved_scope): Add class_cache_firstobj.
5577 (push_to_top_level): Save it.
5578 (pop_from_top_level): Restore it.
5579 (push_class_level_binding): Use push_cache_obstack, not
5580 maybe_push_cache_obstack.
5581 * search.c (push_class_decls): Likewise.
5582
5583 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5584
5585 * pt.c (tsubst_friend_function): Push into namespace of friend
5586 function before pushdecl'ing it.
5587
5588 1999-06-14 Nathan Sidwell <nathan@acm.org>
5589
5590 * call.c (build_new_op): Remove REF_BIND from all operands.
5591
5592 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
5593
5594 * init.c (build_new_1): Look up operator delete even if there was
5595 no explicit new placement.
5596
5597 1999-06-08 Nathan Sidwell <nathan@acm.org>
5598
5599 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
5600 of ...
5601 (build_throw): ... here. Call it.
5602 (process_start_catch_block): Call it.
5603
5604 1999-06-07 Mark Mitchell <mark@codesourcery.com>
5605
5606 * search.c (convert_pointer_to_single_level): Reimplement without
5607 using get_binfo.
5608
5609 1999-06-06 Mark Mitchell <mark@codesourcery.com>
5610
5611 * method.c (is_back_referenceable_type): Back-reference bools when
5612 not squangling.
5613
5614 1999-06-07 Dave Brolley <brolley@cygnus.com>
5615
5616 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
5617 * input.c (putback_buffer): New structure type.
5618 (putback): Replaces putback_char member.
5619 (putback): Replaces putback_char static variable.
5620 (feed_input): Use putback.
5621 (end_input): Use putback.
5622 (sub_getch): Use putback.
5623 (put_back): Use putback.
5624
5625 1999-06-05 Mark Mitchell <mark@codesourcery.com>
5626
5627 * decl.c (grokdeclarator): Fix typo in last change.
5628
5629 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
5630
5631 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
5632 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
5633
5634 1999-06-04 Nathan Sidwell <nathan@acm.org>
5635
5636 * except.c (build_throw): Check throw expression validity.
5637
5638 1999-06-03 Mark Mitchell <mark@codesourcery.com>
5639
5640 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
5641 just because flag_signed_bitfields is false.
5642
5643 1999-06-03 Nathan Sidwell <nathan@acm.org>
5644
5645 * semantics.c (begin_class_definition): Update the struct's
5646 location here ...
5647 * class.c (finish_struct): ... rather than here.
5648
5649 * decl.c (make_typename_type): Don't rely on uninitialized
5650 variable.
5651
5652 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5653
5654 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
5655
5656 1999-05-31 Mark Mitchell <mark@codesourcery.com>
5657
5658 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
5659 and friends rather than messing with current_obstack directly.
5660 (cp_build_qualified_type_real): Rework ARRAY_TYPE
5661 allocation to match practice throughout the rest of the
5662 compiler.
5663
5664 1999-05-30 Mark Mitchell <mark@codesourcery.com>
5665
5666 * lex.c (make_lang_type): Create TYPE_BINFO for
5667 TEMPLATE_TYPE_PARMs just like for non-template types.
5668
5669 * decl.c (start_decl): Move checks on initialization to ...
5670 (cp_finish_decl): Here. Tidy formatting slightly.
5671
5672 1999-05-28 Mark Mitchell <mark@codesourcery.com>
5673
5674 * decl.c (add_binding): Don't complain about a redeclaration of a
5675 semantically identical typedef in a local scope.
5676
5677 1999-05-28 Nathan Sidwell <nathan@acm.org>
5678
5679 * decl.c (complete_array_type): Allocate off same obstack. Fix
5680 DO_DEFAULT comment to match reality.
5681
5682 * friend.c (make_friend_class): Fix diagnostic typo.
5683
5684 1999-05-28 Mark Mitchell <mark@codesourcery.com>
5685
5686 * decl.c (lookup_namespace_name): Handle getting a
5687 TEMPLATE_ID_EXPR.
5688 (expand_static_init): Don't call pushdecl for implicitly declared
5689 `atexit' used to register destructors.
5690
5691 1999-05-25 Mark Mitchell <mark@codesourcery.com>
5692
5693 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
5694 intialize a vtable.
5695
5696 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
5697 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
5698 by combining TEMPLATE_INFO and LEVEL into a single union.
5699 (DECL_TEMPLATE_INFO): Reformat.
5700 (DECL_SAVED_TREE): Document.
5701 (DECL_TEMPLATE_INJECT): Remove.
5702 * class.c (finish_struct): Remove code to deal with
5703 DECL_TEMPLATE_INJECT.
5704
5705 * decl.c (maybe_process_template_type_declaration): Handle all new
5706 types in templates uniformly.
5707 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
5708 DECL_CONTEXT.
5709 * pt.c (lookup_template_class): Inject template instantiations of
5710 forward-declarations.
5711 (instantiate_class_template): Remove code processing
5712 DECL_TEMPLATE_INJECT.
5713
5714 * pt.c (lookup_template_class): Tweak lookup to find member
5715 templates.
5716
5717 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
5718 ASM_CV_QUAL.
5719 * semantics.c (finish_asm_stmt): Make strings permanent if they're
5720 used in a template.
5721
5722 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
5723
5724 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
5725 parts of pointer to data member types.
5726
5727 1999-05-24 Mark Mitchell <mark@codesourcery.com>
5728
5729 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
5730 and then make it look like `abort'. Just use `abort' instead.
5731
5732 * typeck.c (build_static_cast): Don't allow static_casts that cast
5733 away constness.
5734 (casts_away_constness_r): New function.
5735 (casts_away_constness): Likewise.
5736
5737 * decl.c (lookup_tag): Remove code no longer needed after
5738 name-lookup improvements.
5739 * decl2.c (handle_class_head): Make error-recovery more robust.
5740 * friend.c (make_friend_class): Reject templated typename types.
5741 * lex.c (is_global): A template parameter isn't global.
5742 * parse.y (class_head): Robustify.
5743 * parse.c: Regenerated.
5744
5745 1999-05-22 Mark Mitchell <mark@codesourcery.com>
5746
5747 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
5748 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
5749
5750 * cp-tree.h (push_nested_namespace): Declare.
5751 (pop_nested_namespace): Likewise.
5752 * decl.c (push_nested_namespace): New function.
5753 (pop_nested_namespace): Likewise.
5754 * pt.c (instantiate_class_template): Use them.
5755
5756 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
5757
5758 * cp-tree.h (cplus_expand_constant): Declare.
5759 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
5760 converted from one pointer-to-object type to another.
5761 * expr.c (cplus_expand_constant): Don't make it static.
5762 * typeck.c (build_component_ref): Don't crash when presented with
5763 a component which is a TEMPLATE_DECL.
5764 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
5765 cast from a pointer-to-member constant to its own type does not
5766 result in a valid non-type template argument.
5767
5768 1999-05-21 Mark Mitchell <mark@codesourcery.com>
5769 Nathan Sidwell <nathan@acm.org>
5770
5771 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
5772 * cp-tree.h: Fix typo in documentation on pointers-to-members.
5773 (cp_build_qualified_type): Make it a macro.
5774 (cp_build_qualified_type_real): Declare.
5775 * decl.c (grokdeclarator): Remove misleading comment. Avoid
5776 problem with template parameters and restrict-qualification.
5777 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
5778 * hash.h: Regenerated.
5779 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
5780 the enumeration.
5781 (NORID): Remove definition.
5782 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
5783 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
5784 (fn_type_unification): Check that the function type resulting from
5785 the deduction is legal.
5786 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
5787 (unify): Use cp_build_qualified_type_real.
5788 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
5789 (cp_build_qualified_type): Rename to ...
5790 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
5791 and modify appropriately.
5792
5793 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
5794 reveal optimization opportunities.
5795
5796 * pt.c (tsubst): Don't issue error messages when we're not
5797 complaining, even if we see a qualified function type.
5798 (check_cv_quals_for_unify): Don't allow a qualified function
5799 type.
5800
5801 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
5802
5803 * class.c (instantiate_type): Downgrade errors for object-dependent
5804 memfn refs to pedwarn.
5805
5806 1999-05-20 Mark Mitchell <mark@codesourcery.com>
5807
5808 * decl.c (grokdeclarator): Don't treat [] as indicating a
5809 zero-sized array in a typedef.
5810
5811 * call.c (build_object_call): Don't look at DECL_NAME for a type.
5812 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
5813 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
5814
5815 * pt.c (for_each_template_parm): Rework to match documentation.
5816 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
5817
5818 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
5819
5820 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
5821
5822 * class.c (finish_base_struct): Allow non-COM bases for COM classes
5823 except at the leftmost position.
5824 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
5825 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
5826 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
5827
5828 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
5829 (build_cplus_new): Make sure that what we return is of the right type.
5830
5831 1999-05-20 Mark Mitchell <mark@codesourcery.com>
5832
5833 * cp-tree.h (make_ptrmem_cst): New function.
5834 * expr.c (cplus_expand_constant): Split out from ...
5835 (cplus_expand_expr): Here. Use cplus_expand_constant.
5836 (init_cplus_expand): Set lang_expand_constant.
5837 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
5838
5839 * tree.c (make_ptrmem_cst): Define.
5840 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
5841 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
5842
5843 1999-05-19 Mark Mitchell <mark@codesourcery.com>
5844
5845 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
5846
5847 * decl2.c (start_static_storage_duration_function): Fix comment.
5848 (finish_file): Create static storage duration functions lazily.
5849
5850 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
5851
5852 Implement anonymous structs.
5853 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5854 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5855 * class.c (finish_struct_1): Remove redundant check for anon struct.
5856 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5857 (check_tag_decl): Check for anonymous struct here.
5858 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5859 * init.c (sort_member_init, emit_base_init): Handle getting fields
5860 as well as names in current_member_init_list.
5861 (perform_member_init): Handle getting an anon aggr.
5862 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5863 (do_build_copy_constructor): Likewise.
5864
5865 1999-05-19 Mark Mitchell <mark@codesourcery.com>
5866
5867 * tree.c (cp_build_qualified_type): Don't allow qualified function
5868 types.
5869
5870 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
5871
5872 * gxxint.texi: Fix typo.
5873
5874 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
5875
5876 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5877 * class.c (finish_struct_1): Use CLASS_TYPE_P.
5878 * ptree.c (print_lang_type): Likewise.
5879 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5880 IS_AGGR_TYPE_CODE.
5881 * typeck2.c (digest_init): Likewise.
5882
5883 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
5884
5885 * call.c (joust): Compare the types of the conv ops, not the
5886 target types of the conversions.
5887
5888 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
5889
5890 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5891 was not given.
5892
5893 1999-05-17 Mark Mitchell <mark@codesourcery.com>
5894
5895 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5896 * decl.c (grokfndecl): Don't allow inline declarations of friend
5897 template specializations, or friend template specializations with
5898 default arguments.
5899 * pt.c (tsubst): Handle substitution into array types that does
5900 not yield a fixed upper bound, even when not processing a
5901 template.
5902 (tsubst_copy): Deal with the fact that the second operand to a
5903 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5904 * search.c (marked_pushdecls_p): Don't descend into
5905 TEMPLATE_TYPE_PARMs and the like.
5906 (unmarked_pushdecls_p): Likewise.
5907
5908 * call.c (build_over_call): Don't throw away
5909 initializations/copies of empty classes; use MODIFY_EXPR and
5910 INIT_EXPR as for non-empty classes.
5911 * class.c (finish_struct_1): Put the padding byte for an empty
5912 class on the TYPE_NONCOPIED_PARTS list for the class.
5913
5914 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5915
5916 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5917 indicate a reference to a field that is a qualified name.
5918
5919 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
5920
5921 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5922 ASM_OUTPUT_CONSTRUCTOR.
5923
5924 * friend.c (do_friend): Add attrlist arg. Remove support for
5925 getting a non-decl as 'decl'.
5926 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
5927 rtl.
5928 (grokdeclarator): Adjust.
5929 * cp-tree.h: Adjust.
5930
5931 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5932
5933 * cp-tree.h (permanent_p): New function.
5934 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5935 possibly complex tree node.
5936 * tree.c (mapcar): Adjust comments, and follow coding standards in
5937 conditional.
5938 (permanent_p): New function.
5939
5940 1999-05-13 Per Bothner <bothner@cygnus.com>
5941
5942 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
5943 primitive Java types, if we actually see `extern "Java"'.
5944
5945 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5946
5947 * lang-specs.h: Pass -$ to the preprocessor.
5948
5949 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
5950
5951 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5952 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5953 (resolve_offset_ref): Don't handle a raw baselink.
5954 * cvt.c (build_expr_type_conversion): Likewise.
5955 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5956 convert_for_initialization): Likewise.
5957 * class.c (instantiate_type): Handle seeing a baselink under an
5958 OFFSET_REF.
5959 * error.c (dump_expr): Likewise.
5960 * pt.c (for_each_template_parm): Likewise.
5961 (resolve_overloaded_unification): Likewise.
5962 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5963 * typeck.c (expr_sizeof): Also complain about other permutations
5964 of overloaded functions.
5965
5966 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
5967
5968 * init.c (resolve_offset_ref): Don't return a raw method.
5969 Use BASELINK_P.
5970 * typeck.c (decay_conversion): Don't handle a raw method.
5971 Resolve all OFFSET_REFs.
5972 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
5973 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
5974 same_type_p for pmf bits. Don't use build_binary_op to compare
5975 raw pointers to methods.
5976 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
5977 to decide when to call resolve_offset_ref.
5978 (build_c_cast, convert_for_initialization): Likewise.
5979 * cvt.c (build_expr_type_conversion): Likewise.
5980
5981 1999-05-06 Nathan Sidwell <nathan@acm.org>
5982
5983 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
5984
5985 1999-05-05 Mark Mitchell <mark@codesourcery.com>
5986
5987 * decl2.c (start_objects): Don't let static constructors and
5988 destructors get inlined.
5989
5990 * parse.y (nested_name_specifier): Make sure ordinary types are
5991 complete, just like template types.
5992 * parse.c: Regenerated.
5993
5994 * pt.c (check_explicit_specialization): Improve error messages.
5995
5996 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
5997
5998 * typeck.c (string_conv_p): Use same_type_p to check whether we
5999 try to convert between char and wchar_t.
6000
6001 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6002
6003 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6004 lookup to error_mark_node here.
6005 (lookup_member): Revise documentation. Add comments. Don't set
6006 the TREE_TYPE to error_mark_node here, and don't build up an extra
6007 TREE_LIST for ambiguous lookups.
6008 (setup_class_bindings): Adjust accordingly.
6009 (push_class_decls): Revise out-of-date comments.
6010
6011 * typeck.c (build_const_cast): Tighten checks for legality.
6012
6013 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6014
6015 * init.c (build_member_call): Lookup names coming from
6016 namespace-scoped LOOKUP_EXPR.
6017
6018 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6019
6020 * gxxint.texi: Add documentation for 'I'.
6021
6022 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6023
6024 * tinfo.cc (operator==): Qualify type_info with std::.
6025
6026 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6027
6028 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6029 (DECL_COMDAT): Remove definition.
6030
6031 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6032
6033 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6034 change.
6035
6036 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6037
6038 * class.c (build_vtable): Use build_lang_decl when building
6039 vtables, not just build_decl.
6040 (prepare_fresh_vtable): Likewise.
6041 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6042 DECL_EXTERNAL when calling wrapup_global_declarations.
6043 * decl2.c (priority_info_s): Add initializations_p and
6044 destructions_p members.
6045 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6046 when deciding what vtables to write out.
6047 (ssdf_decls): New variable.
6048 (ssdf_decls_used): Likewise.
6049 (start_static_storage_duration_function): Deal with being called
6050 multiple times. Avoid inlining this function.
6051 (generate_inits_for_priority): Deal with reuse of priority map.
6052 (get_priority_info): Clear initializations_p and destructions_p.
6053 (do_static_initialization): Tweak comment.
6054 (do_static_destruction): Likewise. Fix condition on sentries for
6055 destruction.
6056 (generate_ctor_or_dtor_function): Call all of the static storage
6057 duration functions.
6058 (generate_ctor_or_dtor_function_for_priority): Check
6059 initializations_p and destructions_p to see what priorities need
6060 initialization functions.
6061 (finish_file): Rework to generate multiple static storage duration
6062 functions, rather than just one.
6063
6064 * typeck.c (build_const_cast): Tweak last change to handle
6065 templates correctly.
6066
6067 * typeck.c (build_const_cast): Disallow use of const_cast to
6068 anything but a pointer or reference type.
6069
6070 1999-04-30 Nathan Sidwell <nathan@acm.org>
6071
6072 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6073 signature type.
6074
6075 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6076
6077 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6078 (finish_file): Indent comments properly.
6079
6080 1999-04-29 Richard Henderson <rth@cygnus.com>
6081
6082 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6083 (do_static_destruction): Likewise.
6084
6085 1999-04-29 Nathan Sidwell <nathan@acm.org>
6086
6087 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6088 * decl2.c (delete_sanity): Warn on deleting void *.
6089 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6090 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6091 throwing operator new.
6092
6093 1999-04-28 Nathan Sidwell <nathan@acm.org>
6094
6095 * cp-tree.h (build_component_addr): Remove prototype.
6096 * typeck.c (build_component_addr): Make static. Remove MSG
6097 argument.
6098 (build_component_addr): Remove MSG parameter, clean up
6099 comment.
6100 (build_x_function_call): Use cp_error.
6101 (build_unary_op): Adjust call of build_component_addr.
6102
6103 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6104
6105 * pt.c (tsubst_friend_class): Check for NULL.
6106
6107 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6108
6109 * search.c (binfo_for_vtable): Initialize bfvi.var.
6110
6111 1999-04-27 Nathan Sidwell <nathan@acm.org>
6112
6113 * rtti.c (build_x_typeid): Check rtti is enabled.
6114
6115 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6116
6117 * search.c (is_subobject_of_p): Make sure we're looking at the
6118 right baseclasses.
6119
6120 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6121
6122 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6123
6124 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6125
6126 * decl2.c (finish_file): Tweak handling of extern inlines so that
6127 they are not unnecessarily put out.
6128
6129 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6130 such as base classes.
6131
6132 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6133
6134 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6135 not trying V, while cycling through U.
6136
6137 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6138
6139 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6140 preserves_first_arg. Enlarge dummy accordingly.
6141 (DECL_TINFO_FN_P): New macro.
6142 (SET_DECL_TINFO_FN_P): Likeiwse.
6143 (DECL_RETURNS_FIRST_ARG): Remove.
6144 (DECL_PRESERVES_THIS): Likewise.
6145 (DECL_INIT_PRIORITY): New macro.
6146 (finish_struct_1): Change prototype.
6147 (cat_namespace_levels): Remove prototype.
6148 (vtable_decl_p): New prototype.
6149 (vtype_decl_p): Likewise.
6150 (sigtable_decl_p): Likewise.
6151 (walk_globals_pred): New typedef.
6152 (walk_globals_fn): Likewise.
6153 (walk_globals): New prototype.
6154 (walk_namespaces_fn): New typedef.
6155 (walk_namespaces): New prototype.
6156 (wrapup_globals_for_namespace): Likewise.
6157 (walk_vtables): Remove prototype.
6158 (walk_sigtables): Likewise.
6159 (instantiate_pending_templates): New prototype.
6160 * class.c (finish_struct_1): Don't return a value.
6161 * decl.h (pending_statics): Remove declaration.
6162 * decl.c (walk_namespaces_r): New function.
6163 (walk_globals_r): Likewise.
6164 (vtable_decl_p): Likewise.
6165 (vtype_decl_p): Likewise.
6166 (sigtable_decl_p): Likewise.
6167 (walk_namespaces): Likewise.
6168 (walk_globals_data): New type.
6169 (walk_globals): New function.
6170 (wrapup_globals_for_namespace): Likewise.
6171 (expand_static_init): Remove assertion. Remove redundancy in
6172 conditional. Don't put static data members in static_aggregates
6173 Tidy.
6174 (finish_function): Remove redundancy in conditional. Don't set
6175 DECL_RETURNS_FIRST_ARG.
6176 (cat_namespace_levels): Remove.
6177 * decl2.c: Include splay-tree.h and varray.h.
6178 (priority_info_s): New structure.
6179 (finish_vtable_vardecl): Change prototype. Adjust for new calling
6180 conventions.
6181 (prune_vtable_vardecl): Likewise.
6182 (finish_sigtable_vardecl): Likewise.
6183 (setup_initp): Remove.
6184 (do_dtors): Remove.
6185 (do_ctors): Remove.
6186 (start_static_storage_duration_function): New function.
6187 (generate_inits_for_priority): Likewise.
6188 (finish_static_storage_duration_function): Likewise.
6189 (get_priority_info): Likewise.
6190 (do_static_initialization): Likewise.
6191 (do_static_destruction): Likewise.
6192 (do_static_initialization_and_destruction): Likewise.
6193 (generate_ctor_or_dtor_function): Likewise.
6194 (generate_ctor_and_dtor_functions_for_priority): Likewise.
6195 (pending_statics): Make it a varray.
6196 (pending_statics_used): New variable.
6197 (saved_inlines): Make it a varray.
6198 (saved_inlines_used): New variable.
6199 (finish_static_data_member): Change method of updating
6200 pending_statics.
6201 (mark_inline_for_output): Remove #if 0'd code. Change method of
6202 updating saved_inlines.
6203 (walk_vtables): Remove.
6204 (walk_sigtables): Likewise.
6205 (import_export_decl): Use DECL_TINFO_FN_P.
6206 (pending_templates): Remove declaration.
6207 (maybe_templates): Likewise.
6208 (static_aggregates_initp): Likewise.
6209 (setup_initp): Likewise.
6210 (finish_objects): Simplify.
6211 (INITIALIZE_P_IDENTIFIER): New macro.
6212 (PRIORITY_IDENTIFIER): New macro.
6213 (SSDF_IDENTIFIER): New macro.
6214 (initialize_p_decl): New variable.
6215 (priority_decl): Likewise.
6216 (ssdf_decl): Likewise.
6217 (priority_info_map): Likewise.
6218 (finish_file): Recode output of static intializers and other
6219 file-scope finalization tasks.
6220 * error.c (OB_END_TEMPLATE_ID): New macro.
6221 (dump_type_real): Use it.
6222 (dump_decl): Likewise.
6223 (dump_function_name): Likewise.
6224 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6225 interface.
6226 (check_newline): Use walk_globals, not walk_vtables.
6227 * pt.c (pending_tempalte_expansions): Remove.
6228 (set_vardecl_interface_info): Likewise.
6229 (pending_templates): Make static.
6230 (maybe_templates): Likewise.
6231 (instantiate_class_template): Adjust call to finish_struct_1.
6232 (instantiate_pending_templates): New function.
6233 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6234 * tree.c (static_aggregates_initp): Remove.
6235 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6236 instead.
6237 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6238
6239 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6240 with the RTL code RETURN.
6241 * hash.h: Regenerated.
6242 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6243 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6244 * parse.c: Regenerated.
6245 * pt.c: Include varray.h. Include rtl.h since varray.h requires
6246 it.
6247 (inline_parm_levels): New variable.
6248 (inline_parm_levels_used): Likewise.
6249 (maybe_begin_member_template_processing): Update them.
6250 (maybe_end_member_template_processing): Use them, rather than
6251 guessing how many levels to pop.
6252
6253 * decl.c (make_typename_type): Tighten error-checking.
6254
6255 1999-04-20 Mark Mitchell <mark@codesourcery.com>
6256
6257 * cp-tree.h (build_binary_op): Remove unneeded parameter.
6258 * class.c (build_vrable_entry_ref): Adjust call to
6259 build_binary_op.
6260 * decl.c (expand_static_init): Likewise.
6261 (grokdeclarator): Likewise.
6262 (finish_function): Likewise.
6263 * decl2.c (delete_sanity): Likewise.
6264 (do_dtors): Likewise.
6265 (do_ctors): Likewise.
6266 * error.c (dump_type_suffix): Likewise.
6267 * expr.c (cplus_expand_expr): Likewise.
6268 * init.c (resolve_offset_ref): Likewise.
6269 (build_new): Likewise.
6270 (build_new_1): Likewise.
6271 (build_vec_delete_1): Likewise.
6272 (expand_vec_init_catch_clause): Likewise.
6273 (build_delete): Likewise.
6274 * pt.c (tsubst): Likewise.
6275 * rtti.c (synthesize_tinfo_fn): Likewise.
6276 * search.c (expand_upcast_fixups): Likewise.
6277 (expand_direct_vtbls_init): Likewise.
6278 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6279 (build_binary_op_nodefault): Likewise.
6280 (point_int_sum): Likewise.
6281 (pointer_diff): Likewise.
6282 (build_unary_op): Likewise.
6283 (build_modify_expr): Likewise.
6284 (get_delta_difference): Likewise.
6285 (build_ptrmemfunc): Likewise.
6286 (expand_ptrmemfunc_cst): Likewise.
6287
6288 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
6289
6290 * decl.c (grokfndecl): Always call cplus_decl_attributes.
6291 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6292
6293 1999-04-19 Mark Mitchell <mark@codesourcery.com>
6294
6295 * cp-tree.h (finish_static_data_member_decl): New function.
6296 * decl2.c (finish_static_data_member_decl): Split out from ...
6297 (grokfield): Here.
6298 * pt.c (instantiate_class_template): Use it here instead of
6299 trying to fake it.
6300 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6301 finish_static_data_member_decl will do that. Explicit set
6302 DECL_EXTERNAL to match non-template processing.
6303
6304 1999-04-18 Mark Mitchell <mark@codesourcery.com>
6305
6306 * cp-tree.h (finish_class_definition): Add parameter.
6307 * parse.y (structsp): Use it. Don't call pop_scope here.
6308 * parse.c: Regenerated.
6309 * semantics.c (finish_class_definition): Pop it here.
6310
6311 1999-04-17 Mark Mitchell <mark@codesourcery.com>
6312
6313 * decl.c (xref_tag): Revise handling of nested template
6314 declarations.
6315 * pt.c (check_explicit_specialization): Tweak handling of friend
6316 templates in template classes.
6317 (tsubst_friend_class): Handle friend declarations for nested
6318 member template classes.
6319
6320 1999-04-16 Mark Mitchell <mark@codesourcery.com>
6321
6322 * class.c (finish_struct): Remove unused variable.
6323 (pushclass): Likewise.
6324 (invalidate_class_lookup_cache): Likewise.
6325 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6326 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6327 doesn't get obliterated.
6328 (make_typename_type): Handle template classes correctly.
6329
6330 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6331 (storetags): Declare.
6332 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6333 (pushclass): Likewise. Use storetags to install tag declarations,
6334 not pushtag.
6335 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6336 * decl.c (storetags): Make it global.
6337 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6338 implicit typename declaration.
6339 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
6340 * method.c (hack_identifier): Likewise.
6341 * search.c (lookup_member): Likewise.
6342
6343 * decl.c (warn_about_implicit_typename_lookup): New function.
6344 (lookup_name_real): Use it. Rework handling of implicit typename
6345 extension.
6346
6347 1999-04-15 Mark Mitchell <mark@codesourcery.com>
6348
6349 * cp-tree.h (lookup_nested_field): Remove.
6350 * class.c (push_nested_class): Handle UNION_TYPEs.
6351 (pop_nested_class): Likewise.
6352 * decl.c (lookup_name_real): Don't call lookup_nested_field.
6353 (start_decl): Use push_nested_class, not just pushclass.
6354 (cp_finish_decl): Use pop_nested_class, not just popclass.
6355 * search.c (lookup_nested_field): Remove.
6356
6357 * cp-tree.h (lang_type): Add documentation.
6358 * decl2.c (handle_class_head): Create template declarations here,
6359 as appropriate.
6360 * parse.y (class_head): Return whether or not we entered a new
6361 scope, as well as the type named.
6362 (named_class_head): Likewise.
6363 (named_complex_class_head_sans_basetype): Likewise.
6364 (structsp): Adjust accordingly. Pop scope when required.
6365 * parse.c: Regenerated.
6366 * pt.c (check_default_tmpl_args): Robustify.
6367 (redeclare_class_template): Likewise.
6368 (instantiate_class_template): An instantiation of an
6369 anonymous union is itself an anonymous union.
6370 * semantics.c (begin_class_definition): Don't create template
6371 declarations here.
6372
6373 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
6374
6375 * parse.y (after_type_declarator_intern): New nonterminal.
6376 (after_type_declarator): Use it.
6377 (direct_after_type_declarator): Likewise. Move above
6378 nonnested_type to fix reduce/reduce conflict resolution.
6379 (declmods): Reducing from just 'attributes' has EMPTY precedence.
6380 * Makefile.in (CONFLICTS): Update.
6381
6382 * decl.c (define_label): Downgrade error for jumping over a
6383 non-POD decl to pedwarn.
6384
6385 1999-04-14 Mark Mitchell <mark@codesourcery.com>
6386
6387 * cp-tree.h (popclass): Change declaration.
6388 (pop_nested_class): Likewise.
6389 (poplevel_class): Remove declaration.
6390 * call.c (convert_default_argument): Pass no arguments to
6391 popclass.
6392 * class.c (finish_struct_1): Likewise.
6393 (finish_struct): Likewise.
6394 (popclass): Remove argument. Simplify code accordingly.
6395 (pop_nested_class): Likewise.
6396 * decl.c (poplevel_class): Declare it here, and make it static.
6397 (poplevel): Handle class scopes.
6398 (poplevel_class): Don't take an rgument. Simplify.
6399 (pop_everything): Pass no arguments to pop_nested_class.
6400 (cp_finish_decl): Pass no arguments to popclass.
6401 (grokdeclarator): Pass no arguments to pop_nested_class.
6402 (finish_function): Likewise.
6403 * decl2.c (grokfield): Likewise.
6404 (pop_scope): Pass no arguments to popclass.
6405 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6406 * pt.c (instantiate_class_template): Move call to pushclass, and
6407 document. Pass no arguments to popclass.
6408 (regenerate_decl_from_template): Likewise.
6409
6410 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
6411
6412 * typeck.c (build_unary_op): Handle taking the address of a unique
6413 bound non-static member function.
6414
6415 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
6416
6417 * lang-options.h (-Wdeprecated): New flag.
6418 * decl2.c (warn_deprecated): New flag.
6419 (lang_decode_option): Deprecated this-is-variable,
6420 external-templates, alt-external-templates.
6421 Support -Wdeprecated.
6422 * errfn.c (cp_deprecated): New function.
6423
6424 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
6425
6426 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6427 of the decls themselves.
6428
6429 * pt.c (tsubst_function_type): Copy attributes over.
6430
6431 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
6432 and com_interface.
6433 * cp-tree.h: Add prototype.
6434 * decl.c (init_decl_processing): Set valid_lang_attribute.
6435
6436 1999-04-13 Mark Mitchell <mark@codesourcery.com>
6437
6438 * class.c (finish_struct_1): Look at the const-ness of the field's
6439 type, not the TREE_READONLY-ness of the declaration.
6440 * method.c (synthesize_method): Likewise.
6441 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6442 creating new declarations.
6443
6444 1999-04-13 Mike Stump <mrs@wrs.com>
6445
6446 * decl2.c (import_export_decl): Because vtables always reference
6447 virtual functions, even if they are inlined, don't allow
6448 -fno-implement-inlines to not emit them, instead, emit them with
6449 the vtable.
6450 * decl.c (start_function): Likewise.
6451
6452 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
6453
6454 * cp-tree.h (struct lang_type): Add com_interface.
6455 (CLASSTYPE_COM_INTERFACE): New macro.
6456 * class.c (set_rtti_entry): COM interface classes have no RTTI
6457 entries in their vtables; adjust.
6458 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6459 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6460 finish_struct_1): Likewise.
6461 * decl2.c (mark_vtable_entries): Likewise.
6462 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6463 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6464 expand_upcast_fixups): Likewise.
6465 * tree.c (debug_binfo): Likewise.
6466
6467 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6468 * typeck.c (comptypes): If we get it, ignore attributes.
6469 * class.c (instantiate_type): Use BASELINK_P. Change complain
6470 parameter to flags; 2 means ignore attributes.
6471 * call.c (build_op_delete_call): Pass it.
6472
6473 * decl.c (xref_tag): Only complain once about using a typedef-name
6474 with 'struct'. Downgrade to pedwarn.
6475
6476 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6477
6478 * parse.y (absdcl_intern): New nonterminal.
6479 (absdcl, direct_abstract_declarator): Use it.
6480
6481 * pt.c (lookup_template_class): Look through implict typename.
6482
6483 1999-04-11 Mark Mitchell <mark@codesourcery.com>
6484
6485 * friend.c (add_friend): Deal gracefully with error_mark_node.
6486 * method.c (build_overload_value): Handle pointers-to-members as
6487 template parameters.
6488
6489 * decl.c (push_binding): Fix typo in comment.
6490
6491 1999-04-10 Mark Mitchell <mark@codesourcery.com>
6492
6493 * error.c (dump_type_real): If a typename is a template-id, put
6494 out the template arguments.
6495 (dump_expr): Handle TEMPLATE_ID_EXPR.
6496 * pt.c (lookup_template_class): Now that full arguments are
6497 available everywhere, remove code that tried to guess them.
6498
6499 1999-04-09 Mark Mitchell <mark@codesourcery.com>
6500
6501 * decl.c (make_typename_type): Complain if we don't find a type
6502 when trying to make a typename type for a non-template type.
6503
6504 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
6505
6506 * decl.c (start_decl): Pass attributes to grokdeclarator.
6507 (grokdeclarator): Handle attributes on constructor-syntax
6508 initializers.
6509
6510 1999-04-08 Mark Mitchell <mark@codesourcery.com>
6511
6512 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6513 don't have types.
6514
6515 * search.c (template_self_reference_p): Tweak.
6516
6517 1999-04-07 Mark Mitchell <mark@codesourcery.com>
6518
6519 * init.c (build_offset_ref): Don't build yet another weird data
6520 structure to describe overloaded functions.
6521
6522 1999-04-06 Mark Mitchell <mark@codesourcery.com>
6523
6524 * cp-tree.h (BASELINK_P): New macro.
6525 (SET_BASELINK_P): Likewise.
6526 * init.c (build_member_call): Remove needless assignment in if
6527 statement.
6528 * search.c (lookup_field_r): Fix handling when we are looking
6529 specifically for a type; these are not hidden by functions and
6530 variables.
6531 (lookup_member): Use SET_BASELINK_P.
6532 * tree.c (is_overloaded_fn): Use BASELINK_P.
6533 (really_overloaed_fn): Likewise.
6534 (get_first_fn): Likewise.
6535
6536 1999-04-05 Mark Mitchell <mark@codesourcery.com>
6537
6538 * decl.c (lookup_name_current_level): Tweak, and improve
6539 documentation.
6540
6541 * class.c (maybe_fixup_vptrs): Remove declaration.
6542 (build_class_init_list): Likewise.
6543 * decl.c (pushdecl_class_level): Call check_template_shadow here
6544 ...
6545 (push_class_level_binding): ... not here.
6546 * search.c (dfs_push_type_decls): Only avoid
6547 template-self-reference TYPE_DECLs if they are from base classes.
6548
6549 1999-04-04 Mark Mitchell <mark@codesourcery.com>
6550
6551 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
6552 nodes. Tidy.
6553
6554 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
6555
6556 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
6557 (finish_struct_1): Don't call build_class_init_list.
6558
6559 1999-04-02 Mark Mitchell <mark@codesourcery.com>
6560
6561 * tinfo.h (__class_type_info): Fix illegal declaration.
6562
6563 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
6564 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
6565 (IDENTIFIER_CLASS_VALUE): Improve documentation.
6566 (is_properly_derived_from): Declare.
6567 (invalidate_class_lookup_cache): Likewise.
6568 (maybe_maybe_note_name_used_in_class): Likewise.
6569 (note_name_declared_in_class): Likewise.
6570 (push_using_decl): Remove duplicate declaration.
6571 (id_in_current_class): Remove declaration.
6572 (push_class_binding): Change prototype.
6573 (clear_identitifer_class_values): Declare.
6574 * call.c (is_properly_derived_from): Make it global.
6575 (build_new_function_call): Be careful about updating candidates.
6576 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
6577 asked to make illegal calls.
6578 * class.c: Include splay-tree.h.
6579 (class_stack_node): Add names_used slot.
6580 (check_member_decl_is_same_in_complete_scope): Remove.
6581 (add_method): Fix comment. Push the declaration into class
6582 scope.
6583 (finish_struct_1): When popping the class, pop the bindings too.
6584 Remove check for data member/function member conflict.
6585 (finish_struct): Remove calls to
6586 check_member_decl_is_same_in_complete_scope. Change calls to
6587 popclass.
6588 (pushclass): Clear names_used in the class stack entry.
6589 Use invalidate_class_lookup_cache to remove cached entries, rather
6590 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
6591 before entering a new class. Remove dead code. Don't mess with
6592 current_function_decl when pushing declarations.
6593 (invalidate_class_lookup_cache): New function, split out from ...
6594 (popclass): Here. Clean up names_used on our way out.
6595 (instantiate_type): Adjust.
6596 (build_self_reference): Don't push the declaration here.
6597 (maybe_note_name_used_in_class): New function.
6598 (note_name_declared_in_class): Likewise.
6599 * decl.c (add_binding): Change prototype.
6600 (find_class_binding_level): New function.
6601 (innermost_nonclass_level): Likewise.
6602 (current_binding_level): Update documentation.
6603 (inner_binding_level): Remove. Replace with current_binding_level
6604 throughout.
6605 (push_binding_level): Remove special handling of
6606 class_binding_level.
6607 (pop_binding_level): Likewise. Use find_class_binding_level.
6608 (suspend_binding_level): Likewise.
6609 (global_bindings_p): Use innermost_nonclass_level.
6610 (toplevel_bindings_p): Likewise.
6611 (namespace_bindings_p): Likewise.
6612 (pseudo_global_level_p): Likewise.
6613 (push_binding): Clear INHERITED_VALUE_BINDING_P.
6614 (add_binding): Check for illegal multiple declarations. Return a
6615 value indicating whether or not the new binding was legal.
6616 (push_local_binding): Skip over class binding levels. Check
6617 return value from add_binding.
6618 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
6619 note_name_declared_in_class.
6620 (pushlevel_class): Remove "fake out the rest of the compiler"
6621 code.
6622 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
6623 (clear_identifier_class_values): New function.
6624 (pop_from_top_level): Use it.
6625 (pop_everything): Tweak.
6626 (maybe_process_template_type_declaration): Don't push the
6627 declaration for the template here.
6628 (pushtag): Don't push tag declarations into class scope here.
6629 (pushdecl): Apply DeMorgan's law for readability.
6630 (pushdecl_class_level): Remove special-case code for
6631 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
6632 (push_class_level_bindng): Deal with inherited bindings.
6633 (lookup_name_real): Remove special-case code for
6634 TYPE_BEING_DEFINED, and some implicit typename magic.
6635 (grokdeclarator): Handle COMPONENT_REF for a template function.
6636 (build_enumerator): Don't call pushdecl_class_level here.
6637 (id_in_current_class): Remove.
6638 * decl2.c (grokfield): Don't call pushdecl_class_level or
6639 check_template_shadow.
6640 * errfn.c (cp_file_of): Don't declare.
6641 (cp_line_of): Likewise.
6642 * error.c (dump_decl): Handle an OVERLOAD.
6643 (cp_file_of): Likewise.
6644 (cp_line_of): Likewise.
6645 * init.c (build_member_call): Handle a COMPONENT_REF.
6646 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
6647 pushdecl_class_level.
6648 * method.c (hack_identifier): Build COMPONENT_REFs for references
6649 to member templates as well as member functions. Remove dead
6650 code.
6651 * parse.y (left_curly): Remove.
6652 (nonnested_type): Call maybe_note_name_used_in_class, not
6653 pushdecl_class_level.
6654 * parse.c: Regenerated.
6655 (nested_name_specifier_1): Likewise.
6656 * pt.c (check_explicit_specialization): Adjust, for robustness.
6657 (check_template_shadow): Handle OVERLOADs.
6658 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
6659 TEMPLATE_DECL, if appropriate.
6660 * search.c (envelope_add_decl): Remove.
6661 (dfs_pushdecls): Likewise.
6662 (dfs_compress_decls): Likewise.
6663 (dfs_push_decls): New function.
6664 (dfs_push_type_decls): Likewise.
6665 (setup_class_bindings): Likewise.
6666 (template_self_reference_p): Likewise.
6667 (lookup_field_r): Use it.
6668 (looup_member): Remove old comment. Deal with ambiguity.
6669 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
6670 and remove envelope processing.
6671 * semantics.c (begin_class_definition): Let pushclass push
6672 declarations for base classes.
6673 (finish_member_declaration): Push declarations into class scope.
6674 * typeck.c (build_component_ref): Just put an OVERLOAD into the
6675 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
6676 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
6677 * Makefile.in (class.o): Depend on splay-tree.h.
6678
6679 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
6680
6681 * cvt.c (convert_pointer_to_real): Use same_type_p.
6682 * typeck.c (comp_target_types): Use same_type_p.
6683
6684 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
6685
6686 * semantics.c (begin_inline_definitions,
6687 finish_inline_definitions): Rename from finish_default_args and
6688 begin_inline_definitions, respectively, to something that isn't a
6689 total lie. :)
6690 * parse.y (structsp): Adjust.
6691
6692 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
6693 (list_hash_lookup): Likewise.
6694 (hash_tree_chain): Adjust.
6695 * pt.c (tsubst): Adjust.
6696 (tsubst_arg_types): Use plain hash_tree_cons.
6697 * cp-tree.h (hash_tree_cons_simple): Lose.
6698 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
6699
6700 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6701
6702 * Makefile.in (hash.h): Generate using gperf language 'C', not
6703 'KR-C', so gperf uses the `const' keyword on strings.
6704
6705 * gxx.gperf (resword): Const-ify a char*.
6706
6707 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
6708
6709 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
6710 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
6711 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
6712 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
6713 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
6714 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
6715 tree.c: Adjust.
6716
6717 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
6718
6719 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
6720
6721 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
6722
6723 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
6724
6725 1999-03-27 Mark Mitchell <mark@codesourcery.com>
6726
6727 * cp-tree.h (add_friend): Declare.
6728 (add_friends): Likewise.
6729 * friend.c (add_friend): Make it global. Don't add to
6730 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
6731 (add_friends): Make it global.
6732 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
6733 befriending class is a template.
6734 * parse.y (component_decl_1): Fix typo in comment.
6735 * parse.c: Regenerated.
6736 * pt.c (instantiate_class_template): Use add_friend and
6737 add_friends rather that duplicating some of their functionality
6738 here.
6739
6740 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
6741
6742 * call.c (build_field_call): Unify 'this' and non-'this' cases.
6743
6744 * typeck.c (build_indirect_ref): Check for 'this' sooner.
6745
6746 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6747
6748 * call.c (op_error): Const-ify a char*.
6749 (add_candidate, source_type, add_warning): Add static prototype.
6750 (print_z_candidates): Const-ify a char*.
6751
6752 * class.c (resolve_address_of_overloaded_function,
6753 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
6754 (get_vtable_name, finish_struct_1): Const-ify a char*.
6755
6756 * cvt.c (convert_to_reference): Likewise.
6757
6758 * decl.c (redeclaration_error_message, record_builtin_type,
6759 record_unknown_type, member_function_or_else, bad_specifiers):
6760 Likewise.
6761 (find_binding, select_decl, unqualified_namespace_lookup,
6762 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
6763 Add static prototype.
6764 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
6765 implicitly_declare, record_builtin_java_type, define_function,
6766 grok_op_properties, tag_name): Const-ify a char*.
6767
6768 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
6769 (define_function, finish_builtin_type): Const-ify a char*.
6770 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
6771 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
6772 (file_name_nondirectory): Const-ify a char*.
6773 (init_filename_times): Don't prototype.
6774 (compiler_error): Prototype.
6775 (yyerror, init_repo): Const-ify a char*.
6776 (build_srcloc): Don't prototype.
6777 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
6778 Const-ify a char*.
6779 (warn_for_assignment): Don't prototype.
6780 (convert_for_initialization, readonly_error, check_for_new_type,
6781 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
6782 Const-ify a char*.
6783
6784 * decl2.c (acceptable_java_type, output_vtable_inherit,
6785 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
6786 merge_functions, decl_namespace, validate_nonmember_using_decl,
6787 do_nonmember_using_decl): Add static prototype.
6788 (lang_f_options): Const-ify a char*.
6789 (finish_builtin_type): Likewise.
6790 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
6791 prototype.
6792
6793 * errfn.c: Include cp-tree.h.
6794 (cp_thing): Add static prototype.
6795 (compiler_error): Don't protoptype.
6796 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
6797 passing it to `cp_thing'.
6798
6799 * error.c (interesting_scope_p): Add static prototype.
6800
6801 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
6802 a char*.
6803
6804 * init.c (compiler_error): Don't prototype.
6805 (member_init_ok_or_else): Const-ify a char*.
6806 (build_java_class_ref): Add static prototype.
6807
6808 * lex.c (compiler_error): Don't prototype.
6809 (get_time_identifier, interface_strcmp, extend_token_buffer,
6810 handle_cp_pragma): Const-ify a char*.
6811 (is_global, init_filename_times): Add static prototype.
6812 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
6813 (compiler_error): Change from fixed args to variable args.
6814 (yyerror): Const-ify a char*.
6815
6816 * parse.y (cond_stmt_keyword): Const-ify a char*.
6817 (parse_decl): Add static prototype.
6818
6819 * pt.c (template_args_equal, print_template_context): Likewise.
6820 (print_candidates, check_default_tmpl_args): Const-ify a char*.
6821 (instantiate_class_template): Likewise.
6822
6823 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
6824
6825 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
6826 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
6827
6828 * search.c (lookup_field_info, lookup_member): Likewise.
6829 (lookup_member): Cast the first argument of `bzero' to a PTR.
6830
6831 * sig.c (compiler_error): Don't prototype.
6832 (build_signature_pointer_or_reference_nam): Const-ify a char*.
6833 (get_sigtable_name, build_member_function_pointer): Likewise.
6834
6835 * tree.c (compiler_error): Don't prototype.
6836 (no_linkage_helper, build_srcloc): Add static prototype.
6837 (build_vbase_pointer_fields): Const-ify a char*.
6838 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
6839
6840 * typeck.c (compiler_error): Don't prototype.
6841 (convert_for_assignment): Const-ify a char*.
6842 (comp_cv_target_types): Add static prototype.
6843 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
6844 build_component_addr, build_unary_op, convert_for_initialization):
6845 Const-ify a char*.
6846
6847 * typeck2.c (ack): Add static prototype and change from fixed args
6848 to variable args.
6849 (readonly_error, check_for_new_type): Const-ify a char*.
6850
6851 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
6852 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
6853 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
6854 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6855 gen_assign, GNU_xref_member): Const-ify a char*.
6856
6857 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6858
6859 * gxxint.texi: Remove old discussion on copying virtual bases.
6860
6861 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
6862
6863 * Make-lang.in: Remove all references to g++.o/g++.c.
6864 Link g++ from gcc.o.
6865
6866 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6867
6868 * decl2.c (comdat_linkage): Treat vtables like functions.
6869
6870 1999-03-25 Mark Mitchell <mark@codesourcery.com>
6871
6872 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6873
6874 1999-03-25 Nathan Sidwell <nathan@acm.org>
6875
6876 * decl.c (init_decl_processing): Add `signed' type as a synonym
6877 for `int'.
6878
6879 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6880
6881 * typeck.c (common_type): Handle cv-qual unification for pointers
6882 to members.
6883
6884 * decl.c (unqualified_namespace_lookup): Return error_mark_node
6885 on error.
6886 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6887 * lex.c (do_identifier): If we got error_mark_node, call
6888 lookup_name again.
6889
6890 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6891
6892 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6893 classes.
6894
6895 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
6896
6897 * decl.c (lookup_name_real): Do nested field lookup regardless of
6898 TYPE_BEING_DEFINED.
6899
6900 1999-03-24 Mark Mitchell <mark@codesourcery.com>
6901
6902 * cp-tree.h (lang_type): Remove has_assignment and
6903 has_real_assignment. Add befriending_classes.
6904 (TYPE_HAS_ASSIGNMENT): Remove.
6905 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6906 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6907 (lang_decl): Document.
6908 (DECL_BEFRIENDING_CLASSES): New macro.
6909 (FRIEND_NAME): Move declaration to more obvious location.
6910 (FRIEND_DECLS): Likewise.
6911 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6912 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6913 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6914 (grok_op_properties): Likewise.
6915 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6916 (add_friend): Likewise. Don't do weird things with assignment
6917 operators. Update DECL_BEFRIENDING_CLASSES.
6918 (add_friends): Don't do weird things with assignment operators.
6919 (make_friend_class): Likewise. Update
6920 CLASSTYPE_BEFRIENDING_CLASSES.
6921 * pt.c (instantiate_class_template): Don't set
6922 TYPE_HAS_ASSIGNMENT.
6923 (tsubst_copy): Substitute the TREE_TYPE for more unary
6924 expressions.
6925 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6926 * search.c (protected_accessible_p): New function.
6927 (friend_accessible_p): Likewise.
6928 (accessible_p): Use them.
6929
6930 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6931
6932 * pt.c (convert_nontype_argument): Don't create things that aren't
6933 PTRMEM_CSTs when applying a qualification conversion to a
6934 PTRMEM_CST.
6935
6936 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6937
6938 * Makefile.in (OBJS): Don't mention hash.o.
6939 (OBJDEPS): Likewise.
6940
6941 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
6942
6943 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6944 * decl.c (expand_static_init): Make sure we don't add any after
6945 then.
6946
6947 * decl.c (cp_finish_decl): Move intelligence about handling
6948 DECL_COMDAT for variables from here...
6949 * decl2.c (comdat_linkage): ...to here.
6950 (maybe_make_one_only): Tweak.
6951 (import_export_decl): Call comdat_linkage for variables, too.
6952 (finish_file): Handle template statics properly.
6953
6954 1999-03-22 Mark Mitchell <mark@codesourcery.com>
6955
6956 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6957 Document internals of pointer-to-member-functions.
6958 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6959 (PFN_FROM_PTRMEMFUNC): Likewise.
6960 (build_type_conversion): Remove unused parameter.
6961 (build_ptrmemfunc1): Declare.
6962 (expand_ptrmemfunc_cst): New function.
6963 (delta2_from_ptrmemfunc): Likewise.
6964 (pfn_from_ptrmemfunc): Likewise.
6965 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
6966 build_type_conversion. Use TYPE_PTRMEM_P for readability.
6967 (convert_to_reference): Remove unused parameter to
6968 build_type_conversion.
6969 (ocp_convert): Likewise.
6970 (build_user_type_conversion): Likewise.
6971 * error.c (dump_expr): Handle NULL pointer-to-member functions.
6972 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
6973 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
6974 open when handling pointer-to-member functions.
6975 * pt.c (convert_nontype_argument): Clean up error messages. Be
6976 more stringent with pointers-to-members.
6977 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
6978 (build_unary_op): Tidy ever-so-slightly.
6979 (build_conditional_expr): Remove extra parameter to
6980 build_type_conversion.
6981 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
6982 we're using.
6983 (expand_ptrmemfunc_cst): Define.
6984 (delta2_from_ptrmemfunc): Likewise.
6985 (pfn_from_ptrmemfunc): Likewise.
6986
6987 1999-03-19 Mark Mitchell <mark@codesourcery.com>
6988
6989 * init.c (build_member_call): Handle template-id expressions
6990 correctly.
6991 * typeck.c (build_x_function_call): Likewise.
6992
6993 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
6994
6995 * friend.c (make_friend_class): Avoid core dump when
6996 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
6997
6998 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
6999
7000 * decl.c (start_function): Suppress normal linkage heuristics
7001 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7002
7003 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7004
7005 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7006 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7007
7008 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7009
7010 * parse.y (named_complex_class_head_sans_basetype):
7011 Do not push a scope for error_mark_node.
7012 (maybe_base_class_list): Likewise.
7013
7014 * decl.c (start_decl): Check for error_mark_node as a type.
7015 Detected by g++.brendan/array-refs.C.
7016 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7017 (maybe_build_cleanup_1): Likewise. Detected by
7018 g++.jason/incomplete1.C.
7019
7020 * tree.c (build_dummy_object): Use void_zero_node instead of the
7021 error_mark_node.
7022 (is_dummy_object): Check for such a node.
7023 Detected by g++.bob/inherit1.C
7024
7025 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7026
7027 * method.c (old_backref_index): Split out...
7028 (flush_repeats): From here. Rename back from try_old_backref.
7029 (build_mangled_name): Put back some old-style repeat handling.
7030
7031 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7032
7033 * lex.c: Don't include setjmp.h.
7034 (parse_float): New static function.
7035 (pf_args): New struct.
7036 (real_yylex): Use them in call to `do_float_handler'.
7037
7038 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7039
7040 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7041 * tree.c (layout_basetypes): Not here.
7042 * search.c (dfs_search): Remove; no longer used.
7043
7044 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7045
7046 * decl2.c (validate_nonmember_using_decl): Issue sensible
7047 error-messages on bogus qualifiers.
7048
7049 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7050
7051 * call.c (add_function_candidate): Fix uninitialized variable.
7052
7053 * Makefile.in (search.o): Add dependency on varray.h.
7054
7055 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7056
7057 * decl.c (duplicate_decls): Use same_type_p.
7058 * method.c (try_old_backref): Renamed from flush_repeats. Use
7059 same_type_p. Don't try to handle repeats. Return success.
7060 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7061 calls from old-style code, too.
7062 (check_ktype): Use same_type_p.
7063 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7064 (build_qualified_name): Simplify logic.
7065 (process_overload_item): Strip typedefs and quals at the top.
7066 (build_mangled_name_for_type_with_Gcode): Remove call to
7067 type_canonical_variant.
7068 (build_mangled_name): Likewise. Remove support for old-style
7069 repeats, which have been disabled since 2.7.2. Don't mess with
7070 TREE_USED.
7071 (build_decl_overload_real): Don't mess with TREE_USED.
7072
7073 1999-03-13 Nathan Sidwell <nathan@acm.org>
7074
7075 * error.c (cp_printers): Add 'F' escape character.
7076 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7077 Functionality moved to dump_parameters.
7078 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7079 (dump_function_decl): Extend meaning of V parameter. Use
7080 dump_parameters and dump_exception_spec.
7081 (dump_parameters): New static function.
7082 (dump_exception_spec): New static function.
7083 (fndecl_as_string): Change argument semantics. Use
7084 dump_function_decl directly.
7085
7086 * sig.c (build_signature_table_constructor): Use cp_error.
7087
7088 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7089
7090 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7091 Detected by g++.law/enum5.C.
7092
7093 * typeck.c (build_modify_expr): Check for errors after resolving
7094 offsets. Detected by g++.brendan/static1.C.
7095
7096 * decl.c (complete_array_type): Ignore initial_value if it is an
7097 error. Detected by g++.benjamin/17930.C.
7098
7099 * typeck2.c (process_init_constructor): Return error if one argument
7100 is in error. Detected by g++.benjamin/13478.C.
7101
7102 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7103
7104 * decl.c (select_decl): Allow class templates when we need types.
7105 * decl2.c (ambiguous_decl): Likewise.
7106
7107 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7108
7109 * lex.c (do_identifier): Correct call to enforce_access.
7110 * search.c (accessible_p): Tweak comment.
7111
7112 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7113
7114 * semantics.c (begin_class_definition): Call build_self_reference.
7115 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7116
7117 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7118
7119 * search.c (dfs_canonical_queue): New function.
7120 (dfs_assert_unmarked_p): Likewise.
7121 (assert_canonical_unmarked): Likewise.
7122 (access_in_type): Use it.
7123 (accessible_p): Likewise. Walk the whole tree when umarking.
7124
7125 * sig.c (build_signature_table_constructor): Use accessible_p
7126 instead of compute_access.
7127
7128 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7129
7130 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7131
7132 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7133
7134 * cp-tree.h (flag_access_control): Declare.
7135 (TREE_VIA_PPUBLIC): Document.
7136 (DECL_NONSTATIC_MEMBER_P): New macro.
7137 (enforce_access): Return an indication of whether or not access
7138 was permitted.
7139 (build_self_reference): Change prototype.
7140 (compute_access): Replace with ...
7141 (accessible_p): New function.
7142 (dfs_walk): Change prototype.
7143 (dfs_unmark): Likewise.
7144 (markedp): Likewise.
7145 * call.c (enforce_access): Use accessible_p.
7146 * class.c (build_self_reference): Insert the declaration into the
7147 list of members for this type, and make it public.
7148 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7149 * init.c (build_offset_ref): Use lookup_member, not three separate
7150 name-lookups. Call enforce_access rather than checking for
7151 illegal accesses here.
7152 (resolve_offset_ref): Likewise.
7153 * lex.c (do_identifier): Likewise.
7154 * method.c (hack_identifier): Likewise.
7155 * parse.y (self_reference): Remove.
7156 (opt_component_decl_list): Don't use it.
7157 * parse.c: Regenerated.
7158 * pt.c (print_candidates): Generalize to handle lists of
7159 overloaded functions.
7160 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7161 not set.
7162 (get_template_base): Use new calling convention for dfs_walk.
7163 * search.c: Include varray.h. Add prototypes.
7164 (dfs_walk): Accept a data pointer to pass to the work functions.
7165 All callers changed. All work functions changed.
7166 (breadth_first_search): Rename to bfs_walk, and make consistent
7167 with dfs_walk.
7168 (dfs_walk_real): New function.
7169 (canonical_binfo): New function.
7170 (context_for_name_lookup): Likewise.
7171 (shared_marked_p): Likewise.
7172 (shared_unmarked_p): Likewise.
7173 (lokup_field_queue_p): Likewise.
7174 (lookup_field_r): Generalize to handle both functions and fields.
7175 (lookup_field): Just call lookup_member.
7176 (lookup_fnfields): Likewise.
7177 (lookup_member): Move body of lookup_field here and generalize.
7178 (dfs_accessible_queue_p): Likewise.
7179 (dfs_accessible_p): Likewise.
7180 (dfs_access_in_type): Likewise.
7181 (access_in_type): Likewise.
7182 (compute_access): Remove, and replace with ...
7183 (accessible_p): New function.
7184 (vbase_types): Remove.
7185 (vbase_decl_ptr_intermediate): Likewise.
7186 (vbase_decl_ptr): Likewise.
7187 (vbase_init_result): Likewise.
7188 (closed_envelopes): Likewise.
7189 (bvtable): Likewise.
7190
7191 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7192
7193 * call.c (add_function_candidate): Check for proper number of args
7194 before checking the validity of those args.
7195
7196 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
7197
7198 * cp-tree.h (struct lang_type): Add anon_union field.
7199 (ANON_UNION_TYPE_P): Use it instead of examining type.
7200 (SET_ANON_UNION_TYPE_P): New macro.
7201 * decl.c (check_tag_decl): Use it.
7202
7203 * search.c (compute_access): Handle non-type contexts earlier, and
7204 handle NULL_TREE.
7205
7206 * tree.c (build_exception_variant): Use copy_to_permanent.
7207
7208 * decl2.c (setup_initp): Give statics with no priority the default
7209 priority here.
7210 (do_dtors, do_ctors, finish_file): Remove special handling of
7211 non-prioritized statics.
7212
7213 1999-03-05 Mark Mitchell <mark@markmitchell.com>
7214
7215 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7216 * decl.c (make_typename_type): Don't issue an error if an
7217 immediate lookup fails; it migt be resolved later.
7218 * friend.c (is_friend): Add comment.
7219 * search.c (breadth_first_search): Add POSTFN and DATA
7220 parameters. Tidy. All callers changed.
7221 (lookup_field_queue_p): New function.
7222 (lookup_field_r): Likewise.
7223 (lookup_field_post): Likewise.
7224 (lookup_field): Use them, via breadth_first_search, instead of
7225 duplicating logic.
7226 (compute_access): Robustify.
7227 (lookup_fnfield_info): New structure.
7228
7229 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
7230
7231 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7232
7233 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
7234
7235 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7236 cc happy.
7237
7238 * decl2.c (import_export_class): Also return if
7239 CLASSTYPE_INTERFACE_ONLY is set.
7240
7241 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
7242
7243 * decl.c (push_overloaded_decl): Only overwrite the old binding if
7244 there was one.
7245 * decl2.c (do_local_using_decl): Fix loop termination.
7246
7247 1999-03-02 Mark Mitchell <mark@markmitchell.com>
7248
7249 * cp-tree.h (determine_specialization): Don't declare.
7250 * pt.c (determine_specialization): Make it static. Eliminate
7251 complain parameter. Note that decl is always non-NULL now, and
7252 simplify accordingly.
7253
7254 * decl.c (maybe_push_to_top_level): Always call
7255 push_cp_function_context.
7256 (pop_from_top_level): Always call pop_cp_function_context.
7257
7258 1999-02-26 Nathan Sidwell <nathan@acm.org>
7259
7260 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7261 diagnostics.
7262 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7263 * init.c (build_new_1): Extra arg to complete_type_or_else.
7264 (build_delete): Likewise.
7265 * typeck.c (require_complete_type): Likewise.
7266 (pointer_int_sum): Likewise.
7267 (pointer_diff): Likewise.
7268 (build_component_ref): Likewise.
7269
7270 * typeck2.c (incomplete_type_error): Always use cp_error.
7271 Show declaration of undefined type, if appropriate.
7272 Deal with UNKNOWN_TYPE nodes.
7273
7274 * typeck.c (require_complete_type): Use TYPE_SIZE as
7275 size_zero_node to mean incomplete type.
7276 (require_complete_type_in_void): New function.
7277 (build_compound_expr): Call complete_type_in_void for LHS.
7278 (build_c_cast): Call complete_type_in_void for void cast.
7279 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7280 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7281 require_complete_type_in_void. Call it.
7282 * cp-tree.h (require_complete_type_in_void): Prototype new function.
7283
7284 * typeck.c (convert_arguments): Use alternative format for
7285 function decls. Don't require_complete_type here. Simplify
7286 diagnostic printing.
7287 (convert_for_initialization): Don't require_complete_type on RHS yet.
7288 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7289
7290 * call.c (build_over_call): Cope with qualified void return type.
7291 * semantics.c (finish_call_expr): Likewise.
7292 * typeck.c (build_function_call_real): Likewise.
7293 (c_expand_return): Likewise.
7294 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7295
7296 * call.c (print_z_candidates): Use alternate print format, to be
7297 consistent with (pt.c) print_candidates.
7298 * method.c (hack_identifier): List candidate members.
7299 * search.c (lookup_field): Build ambiguous list, and show it, if
7300 ambiguous.
7301
7302 1999-02-26 Mark Mitchell <mark@markmitchell.com>
7303
7304 * typeck.c (decay_conversion): Don't confuse constant array
7305 variables with their initializers.
7306
7307 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7308 merging decls.
7309 * pt.c (regenerate_decl_from_template): Tweak for clarity.
7310 (instantiate_decl): Mark a decl instantiated before regenerating
7311 it to avoid recursion.
7312 * tree.c (mapcar): Don't call decl_constant_value unless we know
7313 something is TREE_READONLY_DECL_P.
7314
7315 * class.c (check_for_override): Don't stop checking when we find
7316 the first overridden function. Delete #if 0'd code.
7317 * search.c (get_matching_virtual): Likewise.
7318
7319 1999-02-25 Richard Henderson <rth@cygnus.com>
7320
7321 * lang-specs.h: Define __FAST_MATH__ when appropriate.
7322
7323 1999-02-24 Mike Stump <mrs@wrs.com>
7324
7325 * typeck.c (convert_for_assignment): Allow boolean integral constant
7326 expressions to convert to null pointer.
7327
7328 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
7329
7330 * decl.c (lookup_namespace_name): Resolve namespace aliases.
7331
7332 * class.c (push_nested_class): Allow namespaces.
7333
7334 * decl2.c (set_decl_namespace): Add friendp parameter.
7335 * decl.c (grokfndecl): Pass it.
7336 (grokvardecl): Likewise.
7337 * cp-tree.h: Change declaration.
7338
7339 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
7340
7341 * pt.c (tsubst): Allow an array of explicit size zero.
7342
7343 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
7344
7345 * errfn.c: Change varargs code to look like toplev.c.
7346
7347 * method.c (process_modifiers): Don't prepend 'U' for char or
7348 wchar_t.
7349
7350 1999-02-20 Craig Burley <craig@jcb-sc.com>
7351
7352 * Make-lang.in (cplib2.ready): Don't consider updating
7353 cplib2 stuff if the current directory isn't writable, as
7354 it won't work (such as during a `make install').
7355
7356 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
7357
7358 * decl2.c (start_objects): Make file scope constructors and
7359 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7360 ASM_OUTPUT_DESTRUCTOR are defined.
7361
7362 1999-02-19 Mark Mitchell <mark@markmitchell.com>
7363
7364 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7365 (fn_type_unification): Adjust prototype.
7366 (lookup_fnfields_1): Declare.
7367 * call.c (add_template_candidate_real): Adjust call to
7368 fn_type_unification.
7369 * class.c (add_method): Don't allow duplicate declarations of
7370 constructors or destructors.
7371 (resolve_address_of_overloaded_function): Remove unused variable.
7372 Adjust call to fn_type_unification.
7373 * decl.c (grokfndecl): Be more robust in the face of illegal
7374 specializations.
7375 * decl2.c (check_classfn): Remove hokey handling of member
7376 templates.
7377 * pt.c (determine_specialization): Improve comments. Adjust to
7378 handle template argument deduction as per the standard.
7379 (check_explicit_specialization): Fix comment spacing. Handle
7380 type-conversion operators correctly. Improve error-recovery.
7381 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7382 (get_bindings_real): Simplify handling of static members.
7383 * search.c (lookup_fnfields_1): Make it have external linkage.
7384 * typeck.c (compparms): Fix comment.
7385 (build_unary_op): Don't try to figure out which template
7386 specialization is being referred to when when the address-of
7387 operator is used with a template function.
7388
7389 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7390
7391 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7392 keyword to match an analogous change at the top level.
7393
7394 * tree.c (lvalue_or_else): Likewise.
7395
7396 1999-02-17 Mark Mitchell <mark@markmitchell.com>
7397
7398 * decl.c (xref_basetypes): Comment.
7399 * pt.c (instantiate_class_template): Use xref_basetypes.
7400
7401 1999-02-16 Mark Mitchell <mark@markmitchell.com>
7402
7403 * cp-tree.h (tsubst): Change prototype.
7404 (tsubst_expr): Likewise.
7405 (tsubst_copy): Likewise.
7406 (type_unification): Remove prototype.
7407 * call.c (convert_default_arg): Adjust call to tsubst_expr.
7408 * class.c (resolve_address_of_overloaded_function): Just use
7409 fn_type_unification.
7410 * decl.c (grokdeclarator): Adjust call to tsubst.
7411 * method.c (build_template_parm_names): Likewise.
7412 * pt.c (GTB_VIA_VIRTUAL): New macro.
7413 (GTB_IGNORE_TYPE): Likewise.
7414 (resolve_overloaded_unification): Add `complain' parameter.
7415 (try_one_overload): Likewise.
7416 (tsubst_template_arg_vector): Likewise.
7417 (tsubst_template_parms): Likewise.
7418 (tsubst_aggr_type): Likewise.
7419 (tsubst_arg_types): Likewise.
7420 (tsubst_call_declarator_parms): Likewise.
7421 (unify): Remove explicit_mask.
7422 (type_unification_real): Likewise.
7423 (get_template_base_recursive): Likewise.
7424 (coerce_template_template_parms): Provide prototype.
7425 (tsubst_function_type): Likewise.
7426 (try_class_unification): New function.
7427 All callers changed to use new complain parameter.
7428 (get_template_base): Use try_class_unification.
7429 (unify): Adjust handling of classes derived from template types.
7430 (fn_type_unification): Substitute explicit arguments before
7431 unification.
7432
7433 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7434
7435 * decl.c (pushdecl): Remove dead code.
7436
7437 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
7438
7439 * decl2.c (finish_objects): Fix code I missed in previous change.
7440
7441 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
7442
7443 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7444 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7445
7446 * pt.c (maybe_process_partial_specialization): Complain about
7447 'template <>' on non-specialization.
7448
7449 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
7450
7451 * decl.c (grokdeclarator): Catch wierd declarators.
7452 * decl2.c (finish_file): Don't abort because of namespace parsing
7453 failure.
7454 (check_decl_namespace): Remove.
7455
7456 1999-02-09 Mark Mitchell <mark@markmitchell.com>
7457
7458 * cp-tree.h (get_template_base): Don't declare.
7459 (dfs_walk): Declare.
7460 (dfs_unmark): Likewise.
7461 (markedp): Likewise.
7462 * pt.c (unify): Remove duplicate declaration. Pass tparms and
7463 targs to get_template_base.
7464 (get_template_base_recursive): Move here from search.c. Check to
7465 see that the base found can be instantiated to form the desired
7466 type.
7467 (get_template_base): Likewise.
7468 (get_class_bindings): Simplify.
7469 * search.c (get_template_base_recursive): Move to pt.c.
7470 (get_template_base): Likewise.
7471 (markedp): Make it global.
7472 (dfs_walk): Likewise.
7473 (dfs_unmark): Likewise.
7474
7475 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
7476
7477 * pt.c (maybe_process_partial_specialization): Complain about
7478 specialization in wrong namespace.
7479 * tree.c (decl_namespace_context): New fn.
7480
7481 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7482
7483 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7484 * pt.c (coerce_template_template_parms): Handle nested
7485 template template parameters.
7486
7487 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
7488
7489 * typeck2.c: Update email addresses.
7490
7491 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7492
7493 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7494 turned off.
7495
7496 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
7497
7498 * lex.c (retrofit_lang_decl): Split out...
7499 (build_lang_decl): From here.
7500 * decl.c (pushdecl): Call it for functions generated by the middle
7501 end that don't have DECL_LANG_SPECIFIC.
7502 * cp-tree.h: Declare it.
7503
7504 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
7505 (start_objects, finish_objects): Only use special
7506 init_priority code if the user specified a priority.
7507 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7508 objects.
7509
7510 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
7511
7512 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7513 mkstemp.o. Get them from libiberty now.
7514 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7515
7516 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7517
7518 * decl2.c (lang_decode_option): Use read_integral_parameter.
7519
7520 1999-02-01 Mark Mitchell <mark@markmitchell.com>
7521
7522 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7523 before calling complete_type_or_else.
7524
7525 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7526
7527 * input.c (inline): Don't define, its handled by system.h.
7528
7529 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
7530
7531 * decl2.c: Don't define flag_no_ident here. Don't process
7532 -f(no-)ident here.
7533 * cp-tree.h: Don't declare flag_no_ident here.
7534 * lang-specs.h: Map -Qn to -fno-ident.
7535
7536 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
7537
7538 * cp-tree.h (struct tree_binding): Replace scope field with a union.
7539 (BINDING_SCOPE): Adjust.
7540 * decl.c (BINDING_LEVEL): Adjust.
7541
7542 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
7543
7544 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
7545 member constants.
7546
7547 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
7548 a ctor initializer.
7549
7550 * tree.c (equal_functions): Fix name in prototype.
7551
7552 * decl.c (push_local_binding): Add FLAGS argument.
7553 (pushdecl, push_overloaded_decl): Pass it.
7554 * decl2.c (do_local_using_decl): Likewise.
7555 * cp-tree.h: Adjust prototype.
7556 * decl.c (poplevel): Fix logic.
7557
7558 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
7559 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
7560 (cat_namespace_levels): Don't loop forever.
7561
7562 1999-01-25 Richard Henderson <rth@cygnus.com>
7563
7564 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
7565
7566 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
7567
7568 * class.c (resolve_address_of_overloaded_function): Mark the
7569 chosen function used.
7570
7571 * call.c (build_call): Make sure that a function coming in has
7572 been marked used already.
7573 * decl.c (expand_static_init): Call mark_used instead of
7574 assemble_external.
7575 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
7576 alloc_eh_object, expand_throw): Likewise.
7577 * init.c (build_builtin_delete_call): Likewise.
7578 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
7579 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7580 expand_generic_desc): Likewise.
7581
7582 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7583
7584 * tree.c (equal_functions): New function.
7585 (ovl_member): Call it.
7586
7587 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7588
7589 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
7590
7591 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
7592
7593 * decl.c (decls_match): Return 1 if old and new are identical.
7594 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
7595
7596 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7597
7598 * decl.c (start_function): Make member functions one_only on windows.
7599 * decl2.c (import_export_decl): Likewise.
7600
7601 * decl.c (grokdeclarator): Don't complain about implicit int in
7602 a system header. Change same-name field check to not complain in
7603 a system header instead of within extern "C".
7604
7605 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7606
7607 * cp-tree.h (PUSH_GLOBAL): New macro.
7608 (PUSH_LOCAL): Likewise.
7609 (PUSH_USING): Likewise.
7610 (namespace_bindings_p): Declare.
7611 (push_overloaded_decl): Likewise.
7612 * decl.c (push_overloaded_decl): Don't make it static. Check for
7613 illegal declarations after using declarations here.
7614 (namespace_bindings_p): Likewise.
7615 (duplicate_decls): Don't consider declarations from different
7616 namespaces to be the same.
7617 (pushdecl): Use symbolic PUSH_ constants in calls to
7618 push_overloaded_decl.
7619 (push_overloaded_decl_1): Likewise.
7620 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
7621 (do_nonmember_using_decl): Check for illegal using declarations
7622 after ordinary declarations here.
7623 (do_local_using_decl): Call pushdecl to insert declarations.
7624
7625 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
7626
7627 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
7628
7629 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7630
7631 * tree.c (build_cplus_array_type_1): Don't call build_array_type
7632 for types involving template parameters.
7633
7634 * cp-tree.h (PARM_DECL_EXPR): Delete.
7635 (convert_default_arg): Change prototype.
7636 (check_default_argument): Declare.
7637 (search_tree): Likewise.
7638 * call.c (convert_default_arg): Take the function to which the
7639 default argument belongs as a parameter, and do any necessary
7640 instantiation here, instead of ...
7641 (build_over_call): Here.
7642 * decl.c (local_variable_p): New function.
7643 (check_default_argument): Likewise, split out and tidied from ...
7644 (grokparms): Here.
7645 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
7646 * pt.c (tsubst_call_declarator_parms): New function.
7647 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
7648 with CALL_EXPRs, rather than trying to be clever.
7649 (tsubst): Use tsubst_call_declarator_parms.
7650 * tree.c (search_tree): Don't make it static.
7651 * typeck.c (convert_arguments): Use new interface to
7652 convert_default_arg.
7653
7654 1999-01-20 Mark Mitchell <mark@markmitchell.com>
7655
7656 * error.c (dump_function_decl): Don't print the argument types for
7657 a function when the verbosity level is negative.
7658
7659 * call.c (build_over_call): Check format attributes at call-time.
7660
7661 * pt.c (tsubst_copy): Fix comment.
7662 (unify): Don't allow unification with variable-sized arrays.
7663
7664 * semantics.c (finish_stmt_expr): When processing a template make
7665 the BIND_EXPR long-lived.
7666
7667 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
7668
7669 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
7670 (import_export_vtable): Not here.
7671
7672 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
7673
7674 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
7675 non-static member function.
7676
7677 1999-01-18 Nathan Sidwell <nathan@acm.org>
7678
7679 * class.c (instantiate_type): Only diagnose illegal address of member
7680 function if complaining.
7681
7682 * decl.c (lookup_name_real): Remove duplicate code.
7683
7684 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
7685
7686 * tree.c (copy_template_template_parm): Use permanent_obstack.
7687
7688 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7689
7690 * pt.c (unify): Remove restrictions on deduction of argument
7691 of template template parameters.
7692
7693 1999-01-18 Nathan Sidwell <nathan@acm.org>
7694
7695 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
7696
7697 * class.c (resolve_address_of_overloaded_function): Show list of
7698 all candidates, when none of them match.
7699
7700 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
7701
7702 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
7703 definition of 'casting away const' in reinterpret_cast<>.
7704
7705 1999-01-18 Graham <grahams@rcp.co.uk>
7706
7707 * cvt.c: Add include for decl.h, remove extern for
7708 static_aggregates which is now provided by decl.h.
7709
7710 * Makefile.in (cvt.o): Add dependency for decl.h and missing
7711 dependencies for convert.h and flags.h.
7712
7713 1999-01-18 Nathan Sidwell <nathan@acm.org>
7714
7715 * decl2.c (do_dtors): Set current location to that of the
7716 decl, for sensible diagnostics and debugging.
7717 (check_classfn): Issue `incomplete type' error, if
7718 class is not defined.
7719
7720 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
7721
7722 * cp-tree.h: Add prototype for bound_pmf_p.
7723
7724 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
7725 Manfred Hollstein <manfred@s-direktnet.de>
7726
7727 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
7728 -Wreturn-type.
7729
7730 1999-01-16 Nathan Sidwell <nathan@acm.org>
7731
7732 * cp-tree.h (struct lang_type): Added has_mutable flag.
7733 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
7734 (TYPE_HAS_MUTABLE_P): New macro to read it.
7735 (cp_has_mutable_p): Prototype for new function.
7736 * class.c (finish_struct_1): Set has_mutable from members.
7737 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
7738 it contains a mutable.
7739 * typeck.c (cp_has_mutable_p): New function.
7740
7741 1999-01-15 Mark Mitchell <mark@markmitchell.com>
7742
7743 * pt.c (process_template_parm): Ignore top-level qualifiers on
7744 non-type parameters.
7745
7746 * decl.c (start_function): Use current_function_parms in the call
7747 to require_complete_type_for_parms, not the probably empty
7748 DECL_ARGUMENTS.
7749
7750 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
7751
7752 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
7753
7754 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
7755 that we don't suppress the other copies.
7756 * lex.c (handle_cp_pragma): Likewise.
7757
7758 1999-01-13 Mark Mitchell <mark@markmitchell.com>
7759
7760 * decl.c (grokdeclarator): Undo 1998-12-14 change.
7761 * tree.c (build_cplus_array_type_1): Likewise.
7762 * pt.c (instantiate_class_template): Remove misleading comment.
7763 (tsubst_aggr_type): Substitute if there are template parameters,
7764 regardless of whether or not they use template arguments.
7765 (unify): Likewise, but for unification.
7766
7767 1999-01-12 Richard Henderson <rth@cygnus.com>
7768
7769 * cp-tree.h (flag_permissive): Declare extern.
7770
7771 1999-01-06 Mark Mitchell <mark@markmitchell.com>
7772
7773 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
7774 here.
7775 (lang_type): Add is_partial_instantiation. Decrease width of
7776 dummy.
7777 (PARTIAL_INSTANTIATION_P): New macro.
7778 (OPERATOR_TYPENAME_P): Remove.
7779 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
7780 OPERATOR_TYPENAME_P.
7781 (grok_op_properties): Likewise.
7782 * friend.c (do_friend): Handle friends that are member functions
7783 correctly.
7784 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
7785 * pt.c (instantiate_class_template): Rework for clarity. Avoid
7786 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
7787 any more partial instantiation than is absolutely necessary for
7788 implicit typename. Set PARTIAL_INSTANTIATION_P.
7789 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
7790 * semantics.c (begin_class_definition): Handle partial
7791 specializations of a type that was previously partially
7792 instantiated.
7793
7794 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
7795
7796 * g++spec.c (LIBSTDCXX): Provide default definition.
7797 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
7798
7799 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7800
7801 * Make-lang.in (g++.o): Depend on prefix.h.
7802
7803 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
7804
7805 * tree.c (bound_pmf_p): New fn.
7806 * typeck.c (build_c_cast): Use it.
7807
7808 * decl.c (grok_op_properties): Use same_type_p.
7809
7810 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7811
7812 * Makefile.in (cvt.o): Depend on toplev.h.
7813
7814 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
7815
7816 * cvt.c: Include toplev.h.
7817
7818 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
7819 definitions.
7820
7821 * init.c (expand_vec_init): Initialize variable `itype'.
7822
7823 * lex.c (yyerror): Cast the argument passed to a ctype function to
7824 an unsigned char.
7825
7826 * method.c (build_mangled_C9x_name): Wrap prototype and definition
7827 in "HOST_BITS_PER_WIDE_INT >= 64".
7828
7829 * typeck.c (build_binary_op): Mark parameter `convert_p' with
7830 ATTRIBUTE_UNUSED.
7831
7832 1998-12-22 Mark Mitchell <mark@markmitchell.com>
7833
7834 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
7835 * tree.c (build_exception_variant): Don't crash on empty throw
7836 specs.
7837
7838 1998-12-18 DJ Delorie <dj@cygnus.com>
7839
7840 * cvt.c (convert_to_reference): Check for both error_mark_node
7841 and NULL_NODE after call to convert_for_initialization.
7842
7843 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
7844
7845 * error.c (interesting_scope_p): New fn.
7846 (dump_simple_decl): Use it.
7847 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
7848 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7849
7850 1998-12-16 Mark Mitchell <mark@markmitchell.com>
7851
7852 * class.c (resolve_address_of_overloaded_function): Do conversion
7853 to correct type here, rather than ...
7854 (instantiate_type): Here.
7855
7856 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7857 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7858 (decl_template_parm_p): Remove.
7859 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7860 parameter.
7861 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7862 * pt.c (push_inline_template_parms_recursive): Set it.
7863 (decl_template_parm_p): Remove.
7864 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7865 (process_template_parm): Set it.
7866
7867 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
7868
7869 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7870 if configured with cpplib.
7871
7872 1998-12-15 Mark Mitchell <mark@markmitchell.com>
7873
7874 * decl.c (poplevel): Make sure ns_binding is initialized.
7875
7876 * decl.c (finish_function): Undo inadvertent change in previous
7877 patch.
7878
7879 1998-12-14 Mark Mitchell <mark@markmitchell.com>
7880
7881 * class.c (pushclass): Tweak handling of class-level bindings.
7882 (resolve_address_of_overloaded_function): Update pointer-to-member
7883 handling.
7884 (instantiate_type): Likewise.
7885 * cvt.c (cp_convert_to_pointer): Likewise.
7886 * decl.c (pop_binding): Take the DECL to pop, not just the name.
7887 Deal with `struct stat' hack.
7888 (binding_level): Add to documentation.
7889 (push_binding): Clear BINDING_TYPE.
7890 (add_binding): New function.
7891 (push_local_binding): Use it.
7892 (push_class_binding): Likewise.
7893 (poplevel): Adjust calls to pop_binding.
7894 (poplevel_class): Likewise.
7895 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7896 declarations to current binding level.
7897 (push_class_level_binding): Likewise.
7898 (push_overloaded_decl): Adjust handling of OVERLOADs in local
7899 bindings.
7900 (lookup_namespace_name): Don't crash when confronted with a
7901 TEMPLATE_DECL.
7902 (lookup_name_real): Do `struct stat' hack in local binding
7903 contexts.
7904 (build_ptrmemfunc_type): Adjust documentation.
7905 (grokdeclarator): Don't avoid building real array types when
7906 processing templates unless really necessary.
7907 (finish_method): Adjust calls to pop_binding.
7908 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7909 not reparse_decl_as_expr.
7910 (build_expr_from_tree): Deal with a template-id as the function to
7911 call in a METHOD_CALL_EXPR.
7912 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7913 (maybe_adjust_types_For_deduction): Don't do peculiar things with
7914 METHOD_TYPEs here.
7915 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
7916 pointer-to-member types where necessary.
7917 * tree.c (build_cplus_array_type_1): Don't avoid building real
7918 array types when processing templates unless really necessary.
7919 (build_exception_variant): Compare the exception lists correctly.
7920
7921 1998-12-13 Mark Mitchell <mark@markmitchell.com>
7922
7923 * cp-tree.def (CPLUS_BINDING): Update documentation.
7924 * cp-tree.h (LOCAL_BINDING_P): New macro.
7925 (lang_identifier): Rename local_value to bindings.
7926 (tree_binding): Make `scope' of type `void*', not `tree'.
7927 (BINDING_SCOPE): Update documentation.
7928 (IDENTIFIER_LOCAL_VALUE): Remove.
7929 (IDENTIFIER_CLASS_VALUE): Document.
7930 (IDENTIFIER_BINDING): New macro.
7931 (IDENTIFIER_VALUE): Likewise.
7932 (TIME_IDENTIFIER_TIME): Likewise.
7933 (TIME_IDENTIFIER_FILEINFO): Likewise.
7934 (IMPLICIT_TYPENAME_P): Likewise.
7935 (set_identifier_local_value): Remove.
7936 (push_local_binding): New function.
7937 (push_class_binding): Likewise.
7938 * class.c (pushclass): Update comments; use push_class_binding.
7939 * decl.c (set_identifier_local_value_with_scope): Remove.
7940 (set_identifier_local_value): Likewise.
7941 (push_binding): New function.
7942 (pop_binding): Likewise.
7943 (binding_level): Update documentation. Remove shadowed.
7944 (BINDING_LEVEL): New macro.
7945 (free_binding_nodes): New variable.
7946 (poplevel): Adjust for new name-lookup scheme. Don't mess up
7947 BLOCK_VARs when doing for-scope extension. Remove effectively
7948 dead code.
7949 (pushlevel_class): Tweak formatting.
7950 (poplevel_class): Adjust for new name-lookup scheme.
7951 (print_binding_level): Likewise.
7952 (store_bindings): Likewise.
7953 (pushdecl): Likewise.
7954 (pushdecl_class_level): Likewise.
7955 (push_class_level_binding): Likewise.
7956 (push_overloaded_decl): Update comments. Adjust for new
7957 name-lookup scheme.
7958 (lookup_name_real): Likewise.
7959 (lookup_name_current_level): Likewise.
7960 (cp_finish_decl): Likewise.
7961 (require_complete_types_for_parms): Likewise. Remove misleading
7962 #if 0'd code.
7963 (grok_parms): Likewise. Don't call
7964 require_complete_types_for_parms here.
7965 (grok_ctor_properties): Don't treat templates as copy
7966 constructors.
7967 (grop_op_properties): Or as assignment operators.
7968 (start_function): Document. Adjust for new name-lookup scheme.
7969 (finish_function): Likewise.
7970 * decl2.c (do_local_using_decl): Use push_local_binding.
7971 * lex.c (begin_definition_of_inclass_inline): New function, split
7972 out from ...
7973 (do_pending_inlines): Here, and ...
7974 (process_next_inline): Here.
7975 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
7976 (init_filename_times): Likewise.
7977 (extract_interface_info): Likewise.
7978 (ste_typedecl_interface_info): Likewise.
7979 (check_newline): Likewise.
7980 (dump_time_statistics): Likewise.
7981 (handle_cp_pragma): Likewise.
7982 (do_identifier): Adjust for new name-lookup scheme.
7983 * parse.y (function_try_block): Return ctor_initializer_opt value.
7984 (fndef): Use it.
7985 (fn.defpen): Pass appropriate values to start_function.
7986 (pending_inline): Use functor_try_block value, and pass
7987 appropriate values to finish_function.
7988 * pt.c (is_member_template): Update documentation; remove handling
7989 of FUNCTION_DECLs. As per name, this function should deal only in
7990 TEMPLATE_DECLs.
7991 (decl_template_parm_p): Change name of olddecl parameter to decl.
7992 (check_template_shadow): Adjust for new name-lookup scheme.
7993 (lookup_template_class): Likewise.
7994 (tsubst_decl): Tweak so as not to confuse member templates with
7995 copy constructors and assignment operators.
7996 (unify): Handle UNION_TYPEs.
7997 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
7998 (lang_print_xnode): Adjust for new name-lookup scheme.
7999 * typeck.c (mark_addressable): Likewise.
8000 (c_expand_return): Likewise.
8001
8002 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8003
8004 * decl.c (grokdeclarator): Allow field with same name as class
8005 in extern "C".
8006
8007 * decl.c (lookup_name_real): Don't limit field lookup to types.
8008 * class.c (check_member_decl_is_same_in_complete_scope): No error
8009 if icv and x are the same.
8010 * lex.c (do_identifier): Tweak error message.
8011
8012 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8013
8014 * decl.c (start_enum): Use push_obstacks, not
8015 end_temporary_allocation.
8016 (finish_enum): Call pop_obstacks.
8017
8018 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8019
8020 * class.c (instantiate_type): Return error_mark_node rather than
8021 junk.
8022
8023 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8024
8025 * cp-tree.h (most_specialized_instantiation): New function.
8026 (print_candidates): Likewise.
8027 * class.c (validate_lhs): Remove.
8028 (resolve_address_of_overloaded_function): New function, split out
8029 and then substantially reworked, from ...
8030 (instantiate_type): Use it. Simplify.
8031 * cvt.c (convert_to_reference): Complain when caller has indicated
8032 that's the right thing to do. Don't crash if instantiate_type
8033 fails.
8034 * pt.c: Substitute `parameters' for `paramters' throughout.
8035 (print_candidates): Don't make it static.
8036 (most_specialized_instantiation): Split out from ...
8037 (most_specialized): Here.
8038
8039 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8040
8041 * lex.c (lang_init_options): Initialize cpplib.
8042 * decl2.c (parse_options,cpp_initialized): Removed.
8043 (lang_decode_option): Move initialization of cpplib to
8044 lang_init_options.
8045
8046 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8047
8048 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8049 well as the TYPE_DECL, when a typedef name is assigned to a
8050 previously anonymous type.
8051
8052 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8053
8054 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8055 __cp_eh_info for getting the eh info pointer. Add table_index to
8056 field list.
8057 (push_eh_cleanup): Don't increment 'handlers' data field.
8058 (process_start_catch_block): Don't set the 'caught' field.
8059
8060 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8061 exception info pointer within library routines.
8062 (__cp_eh_info): Use CP_EH_INFO.
8063 (__start_cp_handler): Get exception info pointer, set caught field,
8064 and increment the handlers field. Avoids this being done by handlers.
8065 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8066 (uncaught_exception): Use CP_EH_INFO macro.
8067
8068 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8069
8070 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8071
8072 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8073
8074 * lex.c (check_newline): Add support for \ as `natural'
8075 characters in file names in #line to be consistent with #include
8076 handling. We support escape processing in the # 1 "..." version of
8077 the command. See also support in cp/lex.c.
8078
8079 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8080
8081 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8082 structure.
8083
8084 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8085
8086 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8087
8088 * error.c (dump_simple_decl): Also print namespace context.
8089 (dump_function_decl): Likewise.
8090
8091 * decl2.c (ambiguous_decl): Don't print old value if it's
8092 error_mark_node.
8093
8094 * decl.c (lookup_name_real): Fix handling of local types shadowed
8095 by a non-type decl. Remove obsolete code.
8096 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8097
8098 * lang-options.h: Add -fpermissive.
8099 * decl2.c: Likewise.
8100 * cp-tree.h: Add flag_permissive.
8101 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8102 were specified, set flag_pedantic_errors.
8103 * call.c (build_over_call): Turn dropped qualifier messages
8104 back into pedwarns.
8105 * cvt.c (convert_to_reference): Likewise.
8106 * typeck.c (convert_for_assignment): Likewise.
8107
8108 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8109
8110 * decl2.c (coerce_new_type): Use same_type_p.
8111 (coerce_delete_type): Likewise.
8112
8113 * call.c (check_dtor_name): Return 1, not error_mark_node.
8114
8115 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8116
8117 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8118 if MULTIPLE_SYMBOL_SPACES.
8119
8120 * pt.c (check_template_shadow): New fn.
8121 * decl2.c (grokfield): Use it.
8122 * decl.c (pushdecl): Likewise.
8123 (pushdecl_class_level): Likewise.
8124 (start_method): Likewise.
8125 (xref_tag): Don't try to use 't' if we're defining.
8126
8127 * call.c (check_dtor_name): Just return an error_mark_node.
8128 * pt.c (lookup_template_class): Complain about using non-template here.
8129 * parse.y (apparent_template_type): Not here.
8130
8131 * pt.c (check_explicit_specialization): Complain about specialization
8132 with C linkage.
8133
8134 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8135
8136 * pt.c (convert_nontype_argument): Don't assume that any integer
8137 argument is intended to be a constant-expression.
8138
8139 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8140
8141 * class.c (handle_using_decl): Fix comment. Don't lookup
8142 constructors in base classes.
8143 (validate_lhs): Fix typo in comment.
8144 * search.c (lookup_field_1): Don't return a USING_DECL.
8145
8146 * cp-tree.h (DECL_ACCESS): Improve documentation.
8147
8148 * decl.c (expand_static_init): Don't set the initialization-done
8149 flag until the initialization is done.
8150
8151 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8152
8153 * decl2.c (validate_nonmember_using_decl): Complain about using
8154 declarations for class members.
8155
8156 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
8157
8158 * typeck2.c (process_init_constructor): Use same_type_p.
8159
8160 * decl.c (check_tag_decl): Don't warn about null decl inside a
8161 class.
8162
8163 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8164 UNIFY_ALLOW_NONE.
8165 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8166 (resolve_overloaded_unification): Strip baselinks.
8167
8168 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8169
8170 * g++spec.c: Don't prototype xmalloc.
8171
8172 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
8173
8174 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8175
8176 * decl.c (check_tag_decl): Do complain about null friend decl at
8177 file scope.
8178
8179 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8180
8181 * lex.c (make_lang_type): Clear the whole struct lang_type, not
8182 only the first multiple of sizeof (int).
8183
8184 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8185
8186 * decl.c (start_decl): An explicit specialization of a static data
8187 member is only a definition if it has an initializer.
8188
8189 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8190 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8191 cp_finish_decl.
8192 * init.c (expand_default_init): Check for DIRECT_BIND instead of
8193 DECL_ARTIFICIAL.
8194
8195 * call.c (build_over_call): Use build_decl.
8196
8197 * except.c (expand_throw): Just use convert, not
8198 build_reinterpret_cast.
8199
8200 * lex.c (handle_generic_pragma): Use token_buffer.
8201
8202 * decl.c (check_tag_decl): Don't complain about null friend decl.
8203
8204 1998-11-24 Dave Pitts <dpitts@cozx.com>
8205
8206 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8207 first position.
8208 * lex.c (check_newline): Use ISALPHA.
8209 (readescape): Use ISGRAPH.
8210 (yyerror): Use ISGRAPH.
8211
8212 1998-11-24 Nathan Sidwell <nathan@acm.org>
8213
8214 * search.c (get_abstract_virtuals): Do not use initial
8215 CLASSTYPE_ABSTRACT_VIRTUALS.
8216 * typeck2.c (abstract_virtuals_error): Show location of abstract
8217 declaration.
8218 * call.c (build_new_method_call): Use
8219 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8220 * class.c (finish_struct_bits): Don't bother working out whether
8221 get_abstract_virtuals will do anything, just do it.
8222
8223 1998-11-24 Graham <grahams@rcp.co.uk>
8224
8225 * typeck.c (build_component_ref): Remove unused statement.
8226
8227 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8228
8229 * class.c (add_method): Catch invalid overloads.
8230
8231 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8232 * search.c (lookup_conversions): Handle getting real OVERLOADs.
8233 (add_conversions): Likewise. Revert last change.
8234 * call.c (add_conv_candidate): Pass totype to add_candidate instead
8235 of fn. Don't add a new candidate if the last one was for the same
8236 type.
8237 (print_z_candidates): Handle getting a type as a function.
8238 (joust): If we got two conversion candidates to the same type,
8239 just pick one.
8240 (build_object_call): Lose 'templates'.
8241 (build_user_type_conversion_1): Handle getting real OVERLOADs.
8242
8243 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8244
8245 * typeck2.c (process_init_constructor): If there are elements
8246 that don't have initializers and they need to have constructors
8247 run, supply them with initializers.
8248
8249 * class.c (finish_struct_1): A class with a 0-width bitfield is
8250 still empty.
8251
8252 1998-11-23 Mark Mitchell <mark@markmitchell.com>
8253
8254 * pt.c (instantiate_class_template): Don't try to figure out what
8255 specialization to use for a partial instantiation. Correct
8256 typos in a couple of comments. Avoid calling uses_template_parms
8257 multiple times.
8258
8259 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
8260
8261 * method.c (process_overload_item): Add call to
8262 build_mangled_C9x_name for intTI_type_nodes.
8263 (build_mangled_C9x_name): Add prototype, define.
8264 * decl.c (init_decl_processing): Add names for
8265 TImode_type_node.
8266
8267 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8268
8269 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8270
8271 * class.c (finish_struct_1): Set things up for 0-width bitfields
8272 like we do for others.
8273
8274 * decl.c (check_tag_decl): New fn.
8275 (shadow_tag): Split out from here.
8276 * decl2.c (grok_x_components): Call it.
8277
8278 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
8279
8280 * decl.c: Lose warn_about_return_type.
8281 (grokdeclarator): Always complain about implicit int, except for
8282 `main () { ... }'.
8283
8284 * decl.c (tag_name): New fn.
8285 (xref_tag): Complain about using typedef-name after class-key.
8286
8287 * init.c (expand_vec_init): Also keep going if from_array.
8288
8289 * tree.c (is_overloaded_fn): Also handle the output of
8290 build_offset_ref.
8291
8292 * decl.c (grokdeclarator): Use constructor_name when comparing
8293 field name against enclosing class.
8294 * class.c (finish_struct_anon): Likewise.
8295
8296 1998-11-22 Mark Mitchell <mark@markmitchell.com>
8297
8298 * decl.c (poplevel): Remove code to handle KEEP == 2.
8299 (finish_function): Don't confuse BLOCK-order when
8300 processing a destructor.
8301
8302 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8303
8304 * decl.c (require_complete_types_for_parms): Call layout_decl
8305 after we've completed the type.
8306
8307 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
8308
8309 * decl2.c (validate_nonmember_using_decl): Allow using templates
8310 from the global namespace.
8311
8312 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8313
8314 Handle specifying template args to member function templates.
8315 * tree.c (build_overload): Always create an OVERLOAD for a template.
8316 * search.c (add_conversions): Handle finding an OVERLOAD.
8317 * decl2.c (check_classfn): Likewise.
8318 * lex.c (identifier_type): See through a baselink.
8319 * parse.y (do_id): Don't call do_identifier if we got a baselink.
8320 * class.c (instantiate_type, case TREE_LIST): Recurse.
8321
8322 * decl.c (grokdeclarator): Allow a boolean constant for array
8323 bounds, odd as that sounds.
8324
8325 * pt.c (unify): Be more strict about non-type parms, except for
8326 array bounds.
8327 (UNIFY_ALLOW_INTEGER): New macro.
8328
8329 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
8330
8331 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8332
8333 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
8334
8335 * semantics.c (begin_class_definition): Call
8336 maybe_process_partial_specialization before push_template_decl.
8337 Don't call push_template_decl for a specialization.
8338 * search.c (lookup_field): Do return a member template class.
8339 * decl2.c (handle_class_head): Handle member template classes.
8340
8341 * decl.c (grokdeclarator): A parm type need not be complete.
8342
8343 * pt.c (convert_nontype_argument): Fix thinko.
8344
8345 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8346
8347 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8348 (global_delete_fndecl): New variable.
8349 * decl.c (global_delete_fndecl): Define it.
8350 (init_decl_processing): Set it.
8351 * init.c (build_builtin_delete_call): Use it.
8352 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8353 nodes.
8354
8355 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8356
8357 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8358 type.
8359
8360 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8361 * call.c (build_object_call): Also support references to functions.
8362 * typeck.c (convert_for_initialization): Don't decay a function
8363 if the target is a reference to function.
8364
8365 * search.c (add_conversions): Get all the overloads from a class.
8366
8367 * decl.c (grok_ctor_properties): Complain about any constructor
8368 that will take a single arg of the class type by value.
8369
8370 * typeck2.c (build_functional_cast): Can't create objects of
8371 abstract classes this way.
8372 * cvt.c (ocp_convert): Likewise.
8373
8374 * decl.c (grokfndecl): Member functions of local classes are not
8375 public.
8376
8377 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8378
8379 * Make-lang.in (cc1plus): Add dependency on hash.o.
8380
8381 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8382
8383 * search.c (get_abstract_virtuals): Complain about virtuals with
8384 no final overrider.
8385 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8386 with no final overrider.
8387 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8388 on virtuals with no final overrider.
8389
8390 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8391
8392 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8393 after layout_type.
8394
8395 * friend.c (do_friend): Don't set_mangled_name_for_decl.
8396
8397 * class.c (finish_struct_anon): Complain about non-fields.
8398 * decl2.c (build_anon_union_vars): Likewise.
8399
8400 * decl.c (grokdeclarator): Normal data members can't have the same
8401 name as the class, either.
8402 * class.c (finish_struct_anon): Neither can members of an
8403 anonymous union.
8404
8405 1998-11-17 Mark Mitchell <mark@markmitchell.com>
8406
8407 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8408 (TYPE_BINFO): Likewise.
8409 (IS_AGGR_TYPE): Tweak.
8410 (SET_IS_AGGR_TYPE): New macro.
8411 (CLASS_TYPE_P): Tweak.
8412 (lang_type): Group mark bitfields together. Remove linenum.
8413 (CLASSTYPE_SOURCE_LINE): Remove macro.
8414 (CLASSTYPE_MARKED_N): New macro.
8415 (SET_CLASSTYPE_MARKED_N): Likewise.
8416 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8417 (CLASS_TYPE_MARKED_*): Use them.
8418 (SET_CLASSTYPE_MARKED_*): Likewise.
8419 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8420 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8421 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8422 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8423 * class.c (class_cache_obstack): New variable.
8424 (class_cache_firstobj): Likewise.
8425 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8426 (pushclass): Free the cache, when appropriate.
8427 (popclass): Tidy.
8428 (maybe_push_cache_obstack): Use class_cache_obstack.
8429 * decl.c (include hash.h).
8430 (typename_hash): New function.
8431 (typename_compare): Likewise.
8432 (build_typename_type): Check the hash table to avoid creating
8433 duplicates.
8434 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8435 (grokdeclarator): Use CLASS_TYPE_P.
8436 (xref_basetypes): Likewise.
8437 (start_function): Likewise. Don't put current_class_ref on the
8438 permanent obstack.
8439 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8440 and TYPE_TI_ARGS.
8441 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8442 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8443 fields for types other than class types. Do clear TYPE_ALIAS_SET
8444 for types other than class types, though.
8445 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8446 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8447 * pt.c (process_template_parm): Don't set
8448 CLASSTYPE_GOT_SEMICOLON.
8449 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8450 Coerce arguments on the momentary obstack.
8451 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8452 (instantiate_class_template): Calculate template arguments on the
8453 momentary obstack. Tidy.
8454 (tsubst_template_arg_vector): Use make_temp_vec.
8455 (tsubst_aggr_type): Put template arguments on the momentary
8456 obstack.
8457 (tsubst_decl): Likewise.
8458 (tsubst): Copy the array bounds index to the permanent obstack
8459 before building index types. Use new macros.
8460 (unify): Use new macros.
8461 (do_type_instantiation): Likewise.
8462 * search.c (lookup_fnfields_1): Use new macros.
8463 (dfs_pushdecls): Build envelopes on the cache obstack.
8464 (dfs_compress_decls): Use new macros.
8465 (push_class_decls): Build on the cache obstack.
8466 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8467 * sign.c (build_signature_pointer_or_reference_type): Use
8468 SET_IS_AGGR_TYPE.
8469 * tree.c (make_binfo): Check CLASS_TYPE_P.
8470 (copy_template_template_parm): Adjust.
8471 (make_temp_vec): Use push_expression_obstack.
8472 * typeck.c (complete_type): Use new macros.
8473 (comptypes): Likewise.
8474
8475 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
8476
8477 * pt.c (tsubst): Add diagnostics for invalid array, reference
8478 and pointer to member types.
8479
8480 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8481
8482 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8483
8484 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8485 Simplify.
8486
8487 * parse.y (structsp): Fix cut-and-paste error.
8488
8489 * init.c (build_new): Complain about non-integral size.
8490
8491 * parse.y (unary_expr): Complain about defining types in sizeof.
8492
8493 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8494
8495 * rtti.c (build_x_typeid): Complain about typeid without
8496 including <typeinfo>.
8497 (get_typeid): Likewise. Complain about typeid of incomplete type.
8498 (get_tinfo_fn_dynamic): Likewise.
8499 (get_typeid_1): Not static anymore.
8500 * except.c (build_eh_type_type): Use get_typeid_1.
8501
8502 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8503 ambiguous or private bases. Fix warning for reference cast.
8504
8505 1998-11-16 Mark Mitchell <mark@markmitchell.com>
8506
8507 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8508 * decl.c (duplicate_decls): Remove special-case code to deal with
8509 template friends, and just do the obvious thing.
8510 * pt.c (register_specialization): Tweak for clarity, and also to
8511 clear DECL_INITIAL for an instantiation before it is merged with a
8512 specialization.
8513 (check_explicit_specialization): Fix indentation.
8514 (tsubst_friend_function): Handle both definitions in friend
8515 declaration and outside friend declarations.
8516 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8517 (regenerate_decl_from_template): Tweak accordingly.
8518 (instantiate_decl): Likewise.
8519
8520 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8521
8522 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8523 member function reference to error.
8524 * cvt.c (ocp_convert): Complain about converting an overloaded
8525 function to void.
8526
8527 * init.c (build_offset_ref): Just return a lone static member
8528 function.
8529
8530 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8531 not internal ones.
8532
8533 * typeck.c (build_binary_op_nodefault): Improve error handling.
8534
8535 * decl.c (grokfndecl): Complain about making 'main' a template.
8536
8537 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
8538
8539 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
8540 TYPE_DECL in a template.
8541
8542 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
8543
8544 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
8545
8546 * decl.c (struct cp_function): Add named_label_uses.
8547 (push_cp_function_context): Save it.
8548 (pop_cp_function_context): Restore it.
8549 (define_label): Also complain about jumping into the scope of
8550 non-POD objects that don't have constructors.
8551 * tree.c (pod_type_p): New fn.
8552
8553 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
8554 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
8555 (get_tinfo_fn): Not here.
8556 * repo.c (repo_get_id): Abort if we get called for an incomplete
8557 type.
8558
8559 1998-11-13 Mark Mitchell <mark@markmitchell.com>
8560
8561 * except.c (expand_throw): Make sure first argument to
8562 __cp_push_exception is of type `void*' to avoid spurious error
8563 messages.
8564
8565 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
8566
8567 * pt.c (try_one_overload): Take orig_targs again. Only check for
8568 mismatches against them; we don't care what a previous call found.
8569 (resolve_overloaded_unification): Adjust.
8570
8571 * search.c (lookup_field): Don't return anything for a non-type
8572 field from a dependent type.
8573 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
8574 in an array declarator.
8575 (start_decl): Push into the class before looking for the field.
8576
8577 1998-11-08 Mark Mitchell <mark@markmitchell.com>
8578
8579 * method.c (build_overload_value): Handle REFERENCE_TYPE.
8580
8581 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
8582
8583 * decl.c (grokdeclarator): Allow namespace-scoped members if they
8584 are friends.
8585
8586 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
8587
8588 * pt.c (tsubst_decl): Don't mess with the global value of an
8589 un-mangled DECL_ASSEMBLER_NAME.
8590
8591 1998-11-03 Christopher Faylor <cgf@cygnus.com>
8592
8593 * decl.c (init_decl_processing): Remove CYGWIN conditional
8594 since CYGWIN is now able to deal with trapping signals.
8595
8596 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8597
8598 * cp-tree.h: Don't include gansidecl.h.
8599 * exception.cc: Include gansidecl.h (since we don't include config.h)
8600 * g++spec.c: Don't include gansidecl.h.
8601
8602 1998-11-06 Mark Mitchell <mark@markmitchell.com>
8603
8604 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
8605 size of dummy.
8606 (DECL_DEFINED_IN_CLASS_P): New macro.
8607 (TEMPLATE_PARMS_FOR_INLINE): Document.
8608 (check_static_variable_definition): New function.
8609 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
8610 appropriate.
8611 (check_static_variable_definition): Split out from ...
8612 (grokdeclarator): Here.
8613 * pt.c (check_default_tmpl_args): New function, split out from ...
8614 (push_template_decl_real): Here.
8615 (instantiate_template): Fix comment.
8616
8617 1998-11-04 Mark Mitchell <mark@markmitchell.com>
8618
8619 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
8620 (CP_TYPE_VOLATILE_P): Likewise.
8621 (CP_TYPE_RESTRICT_P): Likewise.
8622
8623 1998-11-03 Mark Mitchell <mark@markmitchell.com>
8624
8625 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
8626
8627 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
8628
8629 * class.c (instantiate_type): Be more helpful.
8630
8631 * decl2.c (import_export_decl): Call import_export_class.
8632
8633 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
8634 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
8635 * pt.c (tsubst_copy): Likewise.
8636
8637 1998-11-02 Mark Mitchell <mark@markmitchell.com>
8638
8639 * init.c (expand_vec_init): Fix off-by-one error.
8640
8641 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
8642
8643 * parse.y (apparent_template_type): New type.
8644 (named_complex_class_head_sans_basetype): Use it.
8645 * Makefile.in (CONFLICTS): One new conflict.
8646 * parse.c: Regenerated.
8647
8648 1998-11-01 Mark Mitchell <mark@markmitchell.com>
8649
8650 * cp-tree.h (COMPARE_STRICT): New macro.
8651 (COMPARE_BASE): Likewise.
8652 (COMPARE_RELAXED): Likewise.
8653 (COMPARE_REDECLARATION): Likewise.
8654 (same_type_p): Likewise.
8655 (same_or_base_type_p): Likewise.
8656 * call.c (standard_conversion): Use them, in place of comptypes
8657 with numeric arguments.
8658 (reference_binding): Likewise.
8659 (convert_like): Likewise.
8660 (build_over_call): Likewise.
8661 (is_subseq): Likewise.
8662 (is_properly_derived_from): Likewise.
8663 (compare_ics): Likewise.
8664 (joust): Likewise.
8665 * class.c (delete_duplicate_fields_1): Likewise.
8666 (resolves_to_fixed_type_p): Likewise.
8667 (instantiate_type): Likewise. Remove #if 0'd code.
8668 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
8669 (pushdecl): Likewise.
8670 (lookup_name_real): Likewise.
8671 (grokdeclarator): Likewise. Check for illegal array declarations.
8672 (grokparms): Likewise.
8673 (grok_op_properties): Likewise.
8674 * decl2.c (check_classfn): Likewise.
8675 * friend.c (is_friend): Likewise.
8676 (make_friend_class): Likewise.
8677 * init.c (expand_aggr_init): Likewise.
8678 (expand_vec_init): Likewise.
8679 * pt.c (is_member_template_class): Remove declaration.
8680 (is_specialization_of): Use COMPARE_* and new macros.
8681 (comp_template_parms): Likewise.
8682 (convert_nontype_argument): Likewise.
8683 (coerce_template_template_parms): Likewise.
8684 (template_args_equal): Likewise.
8685 (lookup_template_class): Likewise.
8686 (type_unification_real): Likewise.
8687 (unify): Likewise.
8688 (get_bindings_real): Likewise.
8689 * search.c (covariant_return_p): Likewise.
8690 (get_matching_virtual): Likewise.
8691 * sig.c (match_method_types): Likewise.
8692 * tree.c (vec_binfo_member): Likewise.
8693 (cp_tree_equal): Likewise.
8694 * typeck.c (common_type): Likewise.
8695 (comp_array_types): Likewise. Get issues involving unknown array
8696 bounds right.
8697 (comptypes): Update comments. Use new flags.
8698 (comp_target_types): Use new macros.
8699 (compparms): Likewise.
8700 (comp_target_parms): Likewise.
8701 (string_conv_p): Likewise.
8702 (build_component_ref): Likewise.
8703 (build_indirect_ref): Likewise.
8704 (build_conditional_expr): Likewise.
8705 (build_static_cast): Likewise.
8706 (build_reinterpret_cast): Likewise.
8707 (build_const_cast): Likewise.
8708 (build_modify_expr): Likewise.
8709 (convert_for_assignment): Likewise.
8710 (comp_ptr_ttypes_real): Likewise.
8711 (ptr_reasonably_similar): Likewise.
8712 (comp_ptr_ttypes_const): Likewise.
8713
8714 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
8715
8716 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
8717
8718 1998-10-30 Mark Mitchell <mark@markmitchell.com>
8719
8720 * decl2.c (delete_sanity): Pass integer_zero_node, not
8721 integer_two_node, to build_vec_delete.
8722 * init.c (build_array_eh_cleanup): Remove.
8723 (expand_vec_init_try_block): New function.
8724 (expand_vec_init_catch_clause): Likewise.
8725 (build_vec_delete_1): Don't deal with case that auto_delete_vec
8726 might be integer_two_node anymore.
8727 (expand_vec_init): Rework for initialization-correctness and
8728 exception-correctness.
8729 * typeck2.c (process_init_constructor): Make mutual exclusivity
8730 of cases more obvious.
8731
8732 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
8733
8734 * decl.c (lookup_name_real): OK, only warn if not lexing.
8735 Simplify suggested fix.
8736
8737 * cp-tree.h (IDENTIFIER_MARKED): New macro.
8738 * search.c (lookup_conversions): Use breadth_first_search.
8739 (add_conversions): Avoid adding two conversions to the same type.
8740 (breadth_first_search): Work with base binfos, rather
8741 than binfos and base indices.
8742 (get_virtual_destructor): Adjust.
8743 (tree_has_any_destructor_p): Adjust.
8744 (get_matching_virtual): Adjust.
8745
8746 * pt.c (push_template_decl_real): Generalize check for incorrect
8747 number of template parms.
8748 (is_member_template_class): #if 0.
8749
8750 1998-10-29 Richard Henderson <rth@cygnus.com>
8751
8752 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
8753 last.
8754
8755 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
8756
8757 * lex.c: Call check_newline from lang_init always. After
8758 calling cpp_start_read, set yy_cur and yy_lim to read from the
8759 cpplib token buffer.
8760
8761 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
8762
8763 * class.c (instantiate_type): Don't consider templates for a normal
8764 match.
8765
8766 * class.c (finish_struct_1): Don't complain about non-copy
8767 assignment ops in union members.
8768
8769 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
8770 (prepare_fresh_vtable): Likewise.
8771 (finish_struct_1): Don't call import_export_class.
8772 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
8773 (finish_prevtable_vardecl): Lose.
8774 (finish_file): Don't call it.
8775 * pt.c (instantiate_class_template): Likewise.
8776 * cp-tree.h: Remove it.
8777
8778 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
8779 * decl.c (finish_function): Not here.
8780 (start_function): Do set DECL_INITIAL.
8781
8782 * pt.c (push_template_decl_real): Complain about default template
8783 args for enclosing classes.
8784
8785 * call.c (add_function_candidate): Treat conversion functions
8786 as coming from the argument's class.
8787 * cp-tree.h (DECL_CONV_FN_P): New fn.
8788 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
8789 * class.c (add_method): Use DECL_CONV_FN_P.
8790 * decl2.c (check_classfn): Likewise.
8791 * error.c (dump_function_name): Likewise.
8792 (dump_function_decl): Likewise.
8793 * pt.c (fn_type_unification): Likewise.
8794 * search.c (add_conversions): Likewise.
8795
8796 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
8797
8798 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
8799 * method.c (hack_identifier): Also check for using RESULT_DECL
8800 from outer context.
8801
8802 1998-10-27 Mark Mitchell <mark@markmitchell.com>
8803
8804 * decl.c (grokdeclarator): Use type_quals, rather than constp,
8805 consistently.
8806
8807 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
8808
8809 * call.c (standard_conversion): instantiate_type here.
8810 (reference_binding): And here.
8811 (implicit_conversion): Not here.
8812 (build_op_delete_call): No need to cons up an OVERLOAD.
8813 * cvt.c (cp_convert_to_pointer): instantiate_type here.
8814 (convert_to_reference): And here.
8815 * decl.c (grok_reference_init): Not here.
8816 (grokparms): Or here.
8817 * typeck2.c (digest_init): Or here.
8818 * typeck.c (decay_conversion): Take the address of overloaded
8819 functions, too.
8820 (require_instantiated_type): Lose.
8821 (convert_arguments): Don't handle unknown types here.
8822 (build_c_cast): Likewise.
8823 (build_binary_op): Gut.
8824 (build_conditional_expr): Don't require_instantiated_type.
8825 (build_modify_expr): Likewise.
8826 (build_static_cast): Don't instantiate_type.
8827 (build_reinterpret_cast): Likewise.
8828 (build_const_cast): Likewise.
8829 (convert_for_initialization): Likewise.
8830 (build_ptrmemfunc): Use type_unknown_p.
8831 (convert_for_assignment): Also do default_conversion on overloaded
8832 functions. Hand them off to ocp_convert.
8833
8834 1998-10-26 Mark Mitchell <mark@markmitchell.com>
8835
8836 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
8837 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
8838
8839 * class.c (finish_struct_1): Use build_cplus_array_type to build
8840 array types.
8841 * decl.c (init_decl_processing): Likewise.
8842 * except.c (expand_end_eh_spec): Likewise.
8843 * search.c (expand_upcast_fixups): Simplify very slightly.
8844
8845 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8846
8847 * decl.c (grokdeclarator): Complain about a variable using
8848 constructor syntax coming back null from start_decl.
8849
8850 * friend.c (make_friend_class): Complain about trying to make
8851 a non-class type a friend.
8852
8853 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8854 (start_function): Not here.
8855
8856 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
8857
8858 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8859
8860 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8861
8862 * typeck2.c (process_init_constructor): Only skip anonymous fields
8863 if they are bitfields.
8864
8865 * cp-tree.def (TYPEOF_TYPE): New code.
8866 * error.c (dump_type_real): Handle it.
8867 * pt.c (tsubst): Likewise.
8868 * tree.c (search_tree): Likewise.
8869 * semantics.c (finish_typeof): New fn.
8870 * parse.y (typespec): Use it.
8871 * cp-tree.h: Declare it.
8872
8873 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
8874
8875 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8876
8877 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8878
8879 * typeck.c (convert_arguments): Don't handle pmf references
8880 specially.
8881
8882 * init.c (build_member_call): Don't try to convert to the base type
8883 if it's ambiguous or pedantic.
8884
8885 * typeck2.c (check_for_new_type): Only depend on pedantic for
8886 C-style casts.
8887
8888 1998-10-25 Mark Mitchell <mark@markmitchell.com>
8889
8890 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8891 non-converting constructors.
8892
8893 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8894
8895 * gxxint.texi: Correct documentation for n, N, Q, and B.
8896
8897 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
8898
8899 * parse.y (condition): Convert VAR_DECL from reference to indirect
8900 reference.
8901
8902 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
8903
8904 * exception.cc (__cp_pop_exception): Free the original exception
8905 value, not the potentially coerced one.
8906
8907 1998-10-23 Mark Mitchell <mark@markmitchell.com>
8908
8909 * Makefile.in (hash.h): Run gperf when necessary.
8910
8911 * cp-tree.h (CP_TYPE_READONLY): Remove.
8912 (CP_TYPE_VOLATILE): Likewise.
8913 (CP_TYPE_QUALS): New macro.
8914 (CP_TYPE_CONST_P): Likewise.
8915 (CP_TYPE_VOLATILE_P): Likewise.
8916 (CP_TYPE_RESTRICT_P): Likewise.
8917 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8918 (cp_build_type_variant): Rename to ...
8919 (cp_build_qualified_type): New function.
8920 (c_apply_type_quals_to_decl): Declare.
8921 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8922 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8923 (cp_type_qual_from_rid): New function.
8924 (compparms): Remove unused parameter. All callers changed.
8925 (cp_type_quals): New function.
8926 (at_least_as_qualified_p): Likewise.
8927 (more_qualified_p): Likewise.
8928
8929 * call.c (standard_conversion): Replace calls to
8930 cp_build_type_variant with cp_build_qualified_type. Use
8931 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8932 compare them. Use CP_TYPE_* macros to check qualifiers.
8933 (reference_binding): Likewise.
8934 (implicit_conversion): Likewise.
8935 (add_builtin_candidates): Likewise.
8936 (build_over_call): Likewise.
8937 * class.c (overrides): Compare all qualifiers, not just `const',
8938 on method declarations.
8939 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8940 (convert_pointer_to_real): Likewise.
8941 (type_promotes_to): Likewise.
8942 * decl.c (check_for_uninitialized_const_var): New function.
8943 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8944 (cp_finish_decl): Use check_for_uninitialized_const_var.
8945 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
8946 handle `restrict'.
8947 (grok_ctor_properties): Likewise.
8948 (grok_op_properties): Likewise.
8949 (start_function): Likewise.
8950 (rever_static_member_fn): Likewise.
8951 * decl2.c (grok_method_quals): Likewise.
8952 (grokfield): Likewise.
8953 * error.c (dump_readonly_or_volatile): Rename to ...
8954 (dump_qualifiers): New function. Handle `restrict'.
8955 (dump_type_real): Use it.
8956 (dump_aggr_type): Likewise.
8957 (dump_type_prefix): Likewise.
8958 (dump_type_suffix): Likewise.
8959 (dump_function_decl): Likewise.
8960 (cv_as_string): Likewise.
8961 * gxx.gperf: Add __restrict and __restrict__.
8962 * gxxint.texi: Document `u' as used for `__restrict', and a few
8963 other previously undocumented codes.
8964 * hash.h: Regenerated.
8965 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
8966 (build_member_call): Likewise.
8967 (build_new_1): Likewise.
8968 * lex.c (init_parse): Add entry for RID_RESTRICT.
8969 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
8970 (cp_type_qual_from_rid): Define.
8971 * lex.h (enum rid): Add RID_RESTRICT.
8972 * method.c (process_modifiers): Deal with `restrict'.
8973 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
8974 * parse.c: Regenerated.
8975 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
8976 (tsubst_aggr_type): Likewise.
8977 (tsubst): Likewise.
8978 (check_cv_quals_for_unify): Likewise.
8979 (unify): Likewise.
8980 * rtti.c (init_rtti_processing): Likewise.
8981 (build_headof): Likewise.
8982 (get_tinfo_var): Likewise.
8983 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
8984 (expand_class_desc): Likewise.
8985 (expand_attr_desc): Likewise.
8986 (synthesize_tinfo_fn): Likewise.
8987 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
8988 (get_matching_virtual): Likewise.
8989 (expand_upcast_fixups): Likewise.
8990 * sig.c (build_signature_pointer_or_reference_name): Take
8991 type_quals, not constp and volatilep.
8992 (build_signature_pointer_or_reference_type): Likewise.
8993 (match_method_types): More CP_TYPE_QUALS conversion, etc.
8994 (build_signature_pointer_constructor): Likewise.
8995 (build_signature_method_call): Likewise.
8996 * tree.c (build_cplus_array_type): Likewise.
8997 (cp_build_type_variant): Rename to ...
8998 (cp_build_qualified_type): New function. Deal with `__restrict'.
8999 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9000 (build_exception_variant): Likewise.
9001 (mapcar): Likewise.
9002 * typeck.c (qualif_type): Likewise.
9003 (common_type): Likewise.
9004 (comptypes): Likewise.
9005 (comp_cv_target_types): Likewise.
9006 (at_least_as_qualified_p): Define.
9007 (more_qualified_p): Likewise.
9008 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9009 (compparms): Likewise.
9010 (inline_conversion): Likewise.
9011 (string_conv_p): Likewise.
9012 (build_component_ref): Likewise.
9013 (build_indirect_ref): Likewise.
9014 (build_array_ref): Likewise.
9015 (build_unary_op): Likewise.
9016 (build_conditional_expr): Likewise.
9017 (build_static_cast): Likewise.
9018 (build_c_cast): Likewise.
9019 (build_modify_expr): Likewise.
9020 (convert_For_assignment): Likewise.
9021 (comp_ptr_ttypes_real): Likewise.
9022 (cp_type_quals): New function.
9023
9024 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9025
9026 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9027 (CP_TYPE_VOLATILE): Likewise.
9028 * decl.c (grokdeclarator): Use them.
9029 * tree.c (canonical_type_variant): Likewise.
9030
9031 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9032
9033 * parse.y (named_class_head): Push into class while parsing the
9034 base class list.
9035 * decl2.c (push_scope, pop_scope): New functions.
9036 * cp-tree.h: Declare them.
9037 * init.c (build_new_1): Delay cleanup until end of full expression.
9038
9039 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9040
9041 * typeck.c (build_component_ref): Use of a type here is an error.
9042
9043 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9044
9045 Revamp references to member functions.
9046 * method.c (hack_identifier): Call build_component_ref for a
9047 reference to a member function.
9048 * typeck.c (build_component_ref): Only return a single function
9049 if it's static. Otherwise, return a COMPONENT_REF.
9050 (build_x_function_call): Handle a COMPONENT_REF.
9051 (build_unary_op): Handle all unknown-type things.
9052 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9053 * class.c (instantiate_type): Complain if the function we get is a
9054 nonstatic member function. Remove code for finding "compatible"
9055 functions.
9056 * pt.c (tsubst_copy): Handle NOP_EXPR.
9057 * tree.c (build_dummy_object): New fn.
9058 (maybe_dummy_object): New fn.
9059 (is_dummy_object): New fn.
9060 * cp-tree.h: Declare them.
9061 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9062 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9063 * init.c (build_member_call): Use maybe_dummy_object and
9064 is_dummy_object.
9065 (build_offset_ref): Use maybe_dummy_object.
9066 (resolve_offset_ref): Use is_dummy_object.
9067 * typeck.c (build_x_function_call): Call build_dummy_object.
9068 (unary_complex_lvalue): Call is_dummy_object.
9069
9070 * typeck.c (build_component_addr): Make sure field is a field.
9071
9072 * call.c (build_new_op): Delete obsolete code.
9073
9074 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9075
9076 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9077
9078 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9079 std if std is ignored.
9080
9081 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9082
9083 * decl.c (grokvardecl): Fix thinko.
9084
9085 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9086 not the left.
9087
9088 * parse.y (fn.def2): Fix 'attrs' format.
9089
9090 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9091
9092 * Makefile.in (CONFLICTS): Update.
9093 * parse.y (expr_or_declarator_intern): New rule.
9094 (expr_or_declarator, direct_notype_declarator, primary,
9095 functional_cast): Use it.
9096 (notype_declarator_intern): New rule.
9097 (notype_declarator, complex_notype_declarator): Use it.
9098
9099 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9100
9101 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9102 (grokvardecl): Likewise.
9103
9104 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9105
9106 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9107 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9108
9109 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9110
9111 * pt.c (process_partial_specialization): Cast 1st argument of
9112 `bzero' to (PTR).
9113
9114 * tree.c (build_base_fields): Cast `base_align' to (int) when
9115 comparing against one.
9116
9117 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9118
9119 * decl.c (lookup_name_real): Handle template parameters for member
9120 templates where said parameters have the same name as the
9121 surrounding class.
9122
9123 * decl.c (expand_static_init): Build cleanups before entering the
9124 anonymous function used to do them to avoid access-checking
9125 confusion.
9126
9127 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9128 accidentally removed by previous change, and make DECL_RTL here.
9129 * class.c (add_method): Don't make DECL_RTL here.
9130
9131 * pt.c (for_each_template_parm): Don't examine uninstantiated
9132 default arguments.
9133
9134 1998-10-16 Dave Brolley <brolley@cygnus.com>
9135
9136 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9137
9138 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9139
9140 * class.c (add_method): Fix documentation to reflect previous
9141 changes. Check for duplicate method declarations here.
9142 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9143 correctly; such things never match.
9144 (grokfndecl): Don't look for duplicate methods here.
9145 * decl2.c (check_classfn): Don't assume names are mangled.
9146 Don't add bogus member function declarations to a class before the
9147 class type is complete.
9148 (grokfield): Reformat error message.
9149 * method.c (set_mangled_name_for_decl): Don't mangle names while
9150 processing_template_decl.
9151
9152 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9153
9154 * typeck.c (build_indirect_ref): Complain about a pointer to data
9155 member, too.
9156 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9157 data member.
9158 * init.c (resolve_offset_ref): Don't undo the above.
9159
9160 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9161 (struct lang_decl_flags): Add `bitfield'.
9162 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9163 DECL_BIT_FIELD.
9164 * decl2.c (grokbitfield, grok_alignof): Likewise.
9165 * init.c (build_offset_ref): Likewise.
9166 * typeck.c (build_component_addr, expr_sizeof): Likewise.
9167 * cvt.c (build_up_reference): Don't crash if taking the address
9168 returns error_mark_node.
9169
9170 * decl.c (grokfndecl): Also check ctype when checking for ::main().
9171
9172 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
9173
9174 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9175 Do mangling here.
9176 (grokdeclarator): Instead of here.
9177 * friend.c (do_friend): Lose special handling of ::main and
9178 __builtin_*.
9179 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9180
9181 * spew.c (yylex): Clear looking_for_typename if we got
9182 'enum { ... };'.
9183
9184 1998-10-15 Mark Mitchell <mark@markmitchell.com>
9185
9186 * class.c (maybe_warn_about_overly_private_class): Improve error
9187 messages for class with only private constructors.
9188
9189 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9190 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9191 (build_typename_type): New function.
9192 * decl.c (build_typename_type): Broken out from ...
9193 (make_typename_type): Use it.
9194 * search.c (lookup_field): Likewise.
9195
9196 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9197
9198 * pt.c (convert_nontype_argument): Check against type_referred_to.
9199 * decl.c (grokvardecl): Check for declarator name before building
9200 DECL_ASSEMBLER_NAME.
9201
9202 1998-10-14 Mark Mitchell <mark@markmitchell.com>
9203
9204 * pt.c (lookup_template_class): Add comment.
9205 (instantiate_class_template): Don't mark the _TYPE node for
9206 member class templates as an instantiation.
9207
9208 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
9209
9210 * decl.c (grokfndecl): Fix my thinko.
9211
9212 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
9213
9214 * tinfo2.cc (fast_compare): Remove.
9215 (before): Just use strcmp.
9216 * tinfo.cc (operator==): Just use strcmp.
9217
9218 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9219
9220 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9221 declarations.
9222
9223 1998-10-13 Mark Mitchell <mark@markmitchell.com>
9224
9225 * cp-tree.h (specializations_of_same_template_p): Remove.
9226 * search.c (get_template_base): Don't use it.
9227 (get_template_base_recursive): Likewise.
9228 * pt.c (specializations_of_same_template_p): Remove.
9229 (unify): Don't use it.
9230 (lookup_template_class): Find the correct parent when setting
9231 CLASSTYPE_TI_TEMPLATE.
9232
9233 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9234
9235 * tinfo.cc (operator==): Always compare names.
9236
9237 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9238
9239 * decl.c (start_function): Fix cut-and-paste error.
9240
9241 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9242
9243 * inc/typeinfo: Add #pragma interface.
9244 (operator!=): Just call operator==.
9245 * tinfo.cc: Add #pragma implementation.
9246 (operator==): Move from inc/typeinfo and tinfo2.cc.
9247 Check __COMMON_UNRELIABLE instead of _WIN32.
9248
9249 * typeck2.c (my_friendly_abort): Add URL.
9250
9251 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9252
9253 * decl.c (start_method): Added extra parameter for attributes.
9254 * cp-tree.h (start_method): Update prototype.
9255 * parse.y (fn.def2): Update start_method parameter list.
9256
9257 1998-10-11 Mark Mitchell <mark@markmitchell.com>
9258
9259 * cp-tree.h (specializations_of_same_template_p): Declare.
9260 * pt.c (specializations_of_same_template_p): New function.
9261 (unify): Use it.
9262 * search.c (get_template_base): Use it.
9263 (get_template_base_recursive): Likewise.
9264
9265 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
9266
9267 * decl2.c (start_objects): Add new variable `joiner' and
9268 initialize it properly.
9269
9270 1998-10-09 Mark Mitchell <mark@markmitchell.com>
9271
9272 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9273 change to vtable types.
9274
9275 * cvt.c (ocp_convert): Avoid infinite recursion caused by
9276 1998-10-03 change.
9277
9278 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
9279
9280 * pt.c (resolve_overloaded_unification): New fn.
9281 (try_one_overload): Likewise.
9282 (unify): Don't fail on unknown type.
9283 (type_unification_real): Likewise. Use resolve_overloaded_unification
9284 to handle an overloaded argument.
9285 (template_args_equal): Split out...
9286 (comp_template_args): From here.
9287 (determine_specialization): Also allow a template with more
9288 parms than were explicitly specified.
9289 * cp-tree.h: Add template_args_equal.
9290 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9291
9292 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
9293
9294 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9295 change.
9296
9297 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
9298
9299 * typeck.c (unsigned_type): Only return TItype nodes when
9300 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9301 (signed_type): Likewise.
9302 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9303 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9304 (init_decl_processing): Only create TItype nodes when
9305 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9306 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9307 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9308
9309 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9310
9311 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9312 (gxx.gperf): Update comments describing invocation flags.
9313 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9314
9315 1998-10-07 Mark Mitchell <mark@markmitchell.com>
9316
9317 * class.c (finish_struct_1): Add commentary on previous change.
9318
9319 * cp-tree.h (vtbl_ptr_type_node): New variable.
9320 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9321 already of the right type.
9322 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9323 Simplify code to grow vtable.
9324 * decl.c (vtbl_ptr_type_node): Define.
9325 (init_decl_processing): Initialize it.
9326
9327 1998-10-06 Mark Mitchell <mark@markmitchell.com>
9328
9329 * cp-tree.def (PTRMEM_CST): New tree node.
9330 * cp-tree.h (ptrmem_cst): New type.
9331 (lang_type): Remove local_typedecls.
9332 (dummy): Increase to 12 bits from 11.
9333 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9334 (PTRMEM_CST_CLASS): New macro.
9335 (PTRMEM_CST_MEMBER): Likewise.
9336 (current_access_specifier): New variable.
9337 (current_class_type): Remove duplicate declaration.
9338 (finish_struct): Change prototype.
9339 (unreverse_member_declarations): New function.
9340 (pushdecl_class_level): Change prototype.
9341 (grok_enum_decls): Remove.
9342 (fixup_anonymous_union): New function.
9343 (grok_x_components): Change prototype.
9344 (tsubst_chain): Remove.
9345 (finish_member_template_decl): Likewise.
9346 (check_explicit_specialization): Fix indentation.
9347 (finish_class_definition): Change prototype.
9348 (finish_member_class_template): Likewise.
9349 (finish_member_declaration): New function.
9350 (check_multiple_declarators): Likewise.
9351 * class.c (class_stack_node_t): New type.
9352 (current_class_base): Remove.
9353 (current_class_stack): Change type.
9354 (current_access_specifier): New variable.
9355 (grow_method): Remove.
9356 (check_member_decl_is_same_in_complete_scope): Break out from
9357 finish_struct.
9358 (make_method_vec): New function.
9359 (free_method_vec): Likewise.
9360 (add_implicitly_declared_members): Break out from finish_struct_1.
9361 (free_method_vecs): New variable.
9362 (add_method): Rework for direct use from parser.
9363 (handle_using_decl): Watch for NULL_TREE while iterating through
9364 CLASSTYPE_METHOD_VEC.
9365 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9366 just do some error-checking.
9367 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9368 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
9369 (finish_struct): Change prototype. Simplify; fields and methods
9370 are already set up at this point.
9371 (init_class_processing): Set up current_class_stack.
9372 (pushclass): Save current_access_specifier.
9373 (popclass): Restore it.
9374 (currently_open_class): Simplify.
9375 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9376 * decl.c (saved_scope): Add access_specifier.
9377 (maybe_push_to_top_level): Save it.
9378 (pop_from_top_level): Restore it.
9379 (maybe_process_template_type_declaration): Use
9380 finish_member_declaration.
9381 (pushtag): Likewise.
9382 (pushdecl_class_level): Don't return a value.
9383 (fixup_anonymous_union): Break out from grok_x_components.
9384 (shadow_tag): Use it.
9385 (xref_tag): Complain about using an elaborated type specifier to
9386 reference a template type parameter or typedef name.
9387 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9388 (current_local_enum): Remove.
9389 (build_enumerator): Call finish_member_declaration.
9390 (grok_enum_decls): Remove.
9391 * decl2.c (grok_x_components): Simplify.
9392 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9393 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9394 (merge_functions): Add to comment.
9395 (arg_assoc_type): Prototype.
9396 (arg_assoc): Pass as many arguments as there are parameters.
9397 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
9398 OFFSET_REF.
9399 * expr.c (cpls_expand_expr): Remove dead code. Handle
9400 PTRMEM_CST.
9401 * friend.c (do_friend): Lookup friends when in nested classes.
9402 Change comments.
9403 * init.c (build_offset_ref): Do lookup even for classes that are
9404 only partially defined.
9405 (decl_constant_value): Remove dead code.
9406 * method.c (build_overload_value): Remove hack where by TYPE was
9407 not a TYPE. Handle PTRMEM_CST.
9408 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9409 should go.
9410 * parse.y (components, notype_components, component_decl,
9411 component_decl_1, component_declarator, component_declarator0):
9412 Now all are itype rather than ttype. Rework to add members to
9413 classes on the fly.
9414 (typesqpecqual_reserved): Use check_multiple_declarators.
9415 (structsp): Update class to finish_class_definition.
9416 (do_xref_defn): Unsplit into named_class_head.
9417 (access_specifier): Set current_access_specifier.
9418 * pt.c (set_current_access_from_decl): New function.
9419 (finish_member_template_decl): Don't take the parameters.
9420 (comp_template_args): Make more robust.
9421 (lookup_template_class): Don't use current_local_enum.
9422 (for_each_template_parm): Handle PTRMEM_CST.
9423 (instantiate_class_template): Use set_current_access_from_decl,
9424 finish_member_declaration and unreverse_member_declarations. Set
9425 lineno/input_filename before generating implicit member functions.
9426 (type_unification_real): Don't assume back-unification happens
9427 only for the last argument.
9428 (regenerate_decl_from_template): Call pushclass a bit earlier.
9429 (tsubst_chain): Remove.
9430 (tsubst_enum): Use set_current_access_from_decl.
9431 (set_mangled_name_for_template_decl): Fix indentation.
9432 * search.c (lookup_fnfields_1): Change iteration through
9433 CLASSTYPE_METHOD_VEC.
9434 (dfs_pushdecls): Likewise.
9435 (dfs_compress_decls): Likewise.
9436 (add_conversions): Likewise.
9437 * semantics.c (finish_class_definition): Don't take components.
9438 Change call to finish_struct.
9439 (finish_member_declaration): New function.
9440 (finish_member_class_template): Don't take template parameters.
9441 Change call to grok_x_components. Call finish_member_template_decl.
9442 (check_multiple_declarators): New function.
9443 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9444 a passed in fieldlist.
9445 * tree.c (search_tree): Handle PTRMEM_CST.
9446 (mapcar): Likewise.
9447 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9448 INTEGER_CSTs, for pointer-to-data members.
9449
9450 * call.c (resolve_args): Resolve template specializations, if
9451 possible.
9452
9453 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9454
9455 * Makefile.in (spew.o): Depend on toplev.h.
9456
9457 * call.c (compare_ics): Initialize variables `deref_from_type2',
9458 `deref_to_type1' and `deref_to_type2'.
9459
9460 * except.c (get_eh_type): Hide prototype and definition.
9461 (process_start_catch_block_old): Remove unused static prototype.
9462
9463 * pt.c (tsubst_decl): Initialize variable `argvec'.
9464
9465 * spew.c: Include toplev.h.
9466
9467 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
9468
9469 * pt.c (instantiate_decl): Do save and restore file position.
9470
9471 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
9472
9473 * method.c (build_decl_overload_real): Clear
9474 numeric_output_need_bar after __.
9475
9476 1998-10-05 Nathan Sidwell <nathan@acm.org>
9477
9478 * call.c (build_new_method_call): Issue 'incomplete type' error,
9479 if class is not defined.
9480
9481 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9482
9483 * call.c (build_object_call): Move declaration of variable
9484 `fn' into the scope where it is used. Don't access variable
9485 `fn' when it is uninitialized, instead use `fns'.
9486
9487 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9488
9489 * errfn.c (cp_thing): Print buf as a string not as a printf format
9490 to avoid problems with the operator%. Consequently, `%%' sequences
9491 in format are copied as `%' in buf.
9492
9493 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
9494
9495 * pt.c (pop_tinst_level): Call extract_interface_info.
9496 (instantiate_decl): Don't save and restore file position.
9497
9498 * decl.c (cp_finish_decl): Make statics in extern inlines and
9499 templates common, if possible and the target doesn't support weak
9500 symbols.
9501
9502 * decl.c (grokdeclarator): Remove redundant calls to
9503 build_type_variant and some duplicated code.
9504 * sig.c (build_signature_reference_type): Only take the type parm.
9505 (build_signature_pointer_type): Likewise.
9506 * tree.c (build_cplus_method_type): Adjust.
9507 * cp-tree.h: Update.
9508
9509 1998-10-04 Mark Mitchell <mark@markmitchell.com>
9510
9511 * call.c (build_over_call): Make pedwarns about dropped qualifiers
9512 into full-fledged errors.
9513 * cvt.c (convert_to_reference): Likewise.
9514 * typeck.c (convert_for_assignment): Likewise.
9515
9516 * search.c (expand_upcast_vtables): In addition to unsetting
9517 TREE_READONLY, remove top-level const type qualifier.
9518
9519 1998-10-03 Mark Mitchell <mark@markmitchell.com>
9520
9521 * class.c (current_class_ptr, current_class_ref): Clarify
9522 documentation.
9523 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9524 NOP type conversions.
9525 * decl.c (decls_match): Use comptypes directly; ignore
9526 qualifiers on the DECL.
9527 (duplicate_decls): Remove qualifier checks on DECL.
9528 (grokdeclarator): Make the type built up include top-level
9529 qualifiers.
9530 * decl2.c (do_dtors): Fix spelling error.
9531 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9532 when printing type information.
9533 * init.c (build_new_1): Add documentation. Deal with the fact
9534 that type of allocated memory now contains qualifiers.
9535 * lex.c (is_global): Improve error-recovery.
9536 * sig.c (build_member_function_pointer): Don't cast away const
9537 on fields of sigtable_entry_type.
9538 * tree.c (lvalue_type): Don't look at top-level qualifiers on
9539 expressions.
9540 * typeck.c (decay_conversion): Likewise.
9541 (build_component_ref): Make sure the type of the COMPONENT_REF
9542 contains top-level qualifiers, as appropriate. Improve
9543 error-handling.
9544 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
9545 (build_array_ref): Likewise.
9546 (build_unary_op): Improve error-recovery.
9547 (unary_complex_lvalue): Make taking the address a bound member
9548 function an error, not a sorry.
9549 (build_conditional_expr): Look at the type qualifiers, not the
9550 qualifiers on the expression itself.
9551
9552 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
9553
9554 * decl2.c (merge_functions): Remove duplicates.
9555
9556 * decl2.c: Add -f{no-,}implicit-inline-templates.
9557 (import_export_decl): Check it.
9558
9559 * decl.c (lookup_name_real): Template parms also take precedence
9560 over implicit typename. Only warn if yylex.
9561
9562 * typeck.c (build_conditional_expr): Only fold if ifexp is an
9563 INTEGER_CST.
9564
9565 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
9566 instead of linkage.
9567
9568 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
9569
9570 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
9571 * class.c (build_vbase_pointer): Use it.
9572 * rtti.c (expand_class_desc): Likewise.
9573 * tree.c (build_vbase_pointer_fields): Likewise.
9574
9575 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
9576
9577 * decl.c (start_decl): Add invocation of
9578 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9579 (start_function): Add invocation of
9580 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9581
9582 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
9583 HANDLE_GENERIC_PRAGMAS.
9584
9585 1998-09-28 Anthony Green <green@cygnus.com>
9586
9587 * semantics.c (finish_asm_stmt): Always permit volatile asms.
9588
9589 1998-09-28 Mark Mitchell <mark@markmitchell.com>
9590
9591 * decl.c (grokdeclarator): Tighten checks for invalid
9592 destructors. Improve error-messages and error-recovery.
9593 * decl2.c (check_classfn): Don't assume that mangled destructor
9594 names contain type information.
9595
9596 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
9597
9598 * search.c (get_base_distance): Remove assert.
9599
9600 * decl2.c (build_anon_union_vars): Don't process a field with no
9601 name.
9602 (finish_anon_union): Also complain about local anon unions with no
9603 members.
9604
9605 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9606
9607 * decl.c (lookup_namespace_name): If the name is a namespace,
9608 return it immediately.
9609
9610 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9611
9612 * cp-tree.h (define_case_label): Remove unused parameter.
9613 (check_java_method): Likewise.
9614 (grokclassfn): Likewise.
9615 (expand_aggr_init): Likewise.
9616 (build_x_delete): Likewise.
9617 (maybe_end_member_template_processing): Likewise.
9618 (unshare_base_binfos): Add prototype.
9619 (string_conv_p): Likewise.
9620 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
9621
9622 * cvt.c (build_up_reference): Remove unused parameter
9623 `checkconst', all callers changed.
9624 (build_type_conversion): Mark parameter `code' with
9625 ATTRIBUTE_UNUSED.
9626 (build_expr_type_conversion): Initialize variable `conv'.
9627
9628 * decl.c (push_namespace): Initialize variable `d'.
9629 (define_case_label): Remove unused parameter `decl', all callers
9630 changed.
9631
9632 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
9633 `argc' with ATTRIBUTE_UNUSED.
9634 (grokclassfn): Remove unused parameter `cname', all callers
9635 changed.
9636 (check_java_method): Likewise for parameter `ctype'.
9637 (copy_assignment_arg_p): Mark parameter `virtualp' with
9638 ATTRIBUTE_UNUSED.
9639 (finish_prevtable_vardecl): Likewise for parameter `prev'.
9640
9641 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
9642
9643 * init.c (expand_aggr_init_1): Remove unused parameter
9644 `alias_this', all callers changed.
9645 (expand_aggr_init): Likewise.
9646 (expand_default_init): Likewise.
9647 (build_new_1): Initialize variable `susp'.
9648 (build_x_delete): Remove unused parameter `type', all callers
9649 changed.
9650
9651 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
9652 ATTRIBUTE_UNUSED.
9653 (readescape): Use (unsigned) value in shift.
9654 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
9655 comparing to a signed quantity.
9656
9657 * pt.c (maybe_end_member_template_processing): Remove unused
9658 parameter `decl', all callers changed.
9659 (check_explicit_specialization): Add braces around empty body in
9660 an else-statement.
9661 (current_template_args): Initialize variable `args'.
9662 (lookup_template_class): Likewise for variable `prev_local_enum'.
9663 (tsubst_decl): Likewise for variable `r'.
9664 (set_mangled_name_for_template_decl): Initialize variable
9665 `context'.
9666
9667 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
9668 Likewise for variable `i'.
9669 (yylex): Initialize variable `trrr'.
9670
9671 * typeck.c (compparms): Mark variable `strict' with
9672 ATTRIBUTE_UNUSED.
9673
9674 * xref.c (simplify_type): Cast argument of ctype function to
9675 `unsigned char'.
9676
9677 1998-09-24 Mark Mitchell <mark@markmitchell.com>
9678
9679 * cp-tree.h (language_lvalue_valid): Remove.
9680 * decl.c (grokdeclarator): Don't disallow references to functions.
9681 * tree.c (lvalue_p_1): New function, combining duplicated
9682 code from ...
9683 (lvalue_p): Use it.
9684 (real_lvalue_p): Likewise.
9685 * typeck.c (language_lvalue_valid): Remove.
9686 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
9687 they don't have TREE_READONLY set.
9688 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
9689
9690 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
9691
9692 * spew.c (yylex): Give diagnostic.
9693 * hash.h (is_reserved_word): Add export.
9694 * gxx.gperf: Likewise.
9695 * lex.h (rid): Add RID_EXPORT.
9696 * lex.c (init_parse): Likewise.
9697
9698 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
9699
9700 * friend.c (do_friend): Make warning a full sentence.
9701
9702 1998-09-22 Mark Mitchell <mark@markmitchell.com>
9703
9704 * parse.y (component_decl_list): Improve error-recovery.
9705
9706 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
9707
9708 * decl.c (make_typename_type): Move error to point where name
9709 variable can be used by dump_type.
9710
9711 1998-09-22 Mark Mitchell <mark@markmitchell.com>
9712
9713 * decl.c (grokfndecl): Improve error-recovery.
9714 * decl2.c (grokfield): Likewise.
9715 * pt.c (finish_member_template_decl): Likewise.
9716
9717 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
9718
9719 * method.c (hack_identifier): Finding multiple members is always
9720 an error.
9721
9722 1998-09-21 Per Bothner <bothner@cygnus.com>
9723
9724 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
9725
9726 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
9727
9728 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
9729
9730 1998-09-20 Mark Mitchell <mark@markmitchell.com>
9731
9732 * class.c (maybe_warn_about_overly_private_class): Reformat.
9733
9734 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
9735
9736 * exception.cc (__cplus_type_matcher): Realign some code.
9737
9738 1998-09-16 Mark Mitchell <mark@markmitchell.com>
9739
9740 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
9741 (tinfo2.o): Likewise.
9742 (exception.o): Likewise.
9743 (new.o): Likewise.
9744 (opnew.o): Likewise.
9745 (opnewnt.o): Likewise.
9746 (opvnew.o): Likewise.
9747 (opvnewnt.o): Likewise.
9748 (opdel.o): Likewise.
9749 (opdelnt.o): Likewise.
9750 (opvdel.o): Likewise.
9751 (opvdelnt.o): Likewise.
9752
9753 1998-09-16 Richard Henderson <rth@cygnus.com>
9754
9755 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
9756
9757 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
9758
9759 * call.c (build_field_call): Handle static data members too.
9760
9761 * typeck.c (comptypes): When comparing pointer types, check
9762 whether referred types match even in strictest modes.
9763
9764 1998-09-15 Mark Mitchell <mark@markmitchell.com>
9765
9766 * cp-tree.h: Revert previous change.
9767 (finish_struct_methods): Remove declaration.
9768 * class.c: Revert previous change.
9769 (maybe_warn_about_overly_private_class): New function.
9770 (finish_struct_methods): Declare here, and make static. Remove
9771 unnecessary parameters. Tidy slightly. Use
9772 maybe_warn_about_overly_private_class.
9773 (finish_struct_1): Adjust. Remove check for private constructors,
9774 now done elsewhere.
9775 (finish_struct): Adjust.
9776
9777 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
9778
9779 * except.c (expand_start_catch_block): No need to check for new
9780 exception model.
9781 (process_start_catch_block_old): Deleted.
9782 (process_start_catch_block): Add call to start_decl_1().
9783 (expand_end_catch_block): Add call to end_catch_handler().
9784 * exception.cc (__cplus_type_matcher): Only check the exception
9785 language if there is an exception table.
9786
9787 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
9788
9789 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
9790 as used to prevent conflicts with virtual function tables.
9791
9792 1998-09-14 Mark Mitchell <mark@markmitchell.com>
9793
9794 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
9795 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
9796 * class.c (maybe_class_too_private_p): New function.
9797 (finish_struct_methods): Use it.
9798 (finish_struct_1): Likewise.
9799 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
9800 appropriate.
9801
9802 * pt.c (check_specialization_scope): Fix spelling error.
9803 (check_explicit_specialization): Remove code to handle explicit
9804 specializations in class scope; they are now correctly diagnosed
9805 as errors.
9806
9807 1998-09-10 Mark Mitchell <mark@markmitchell.com>
9808
9809 * decl.c (pushdecl): Don't copy types if the
9810 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
9811 type.
9812
9813 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9814
9815 * class.c (get_enclosing_class): New function.
9816 (is_base_of_enclosing_class): Likewise.
9817 * cp-tree.h (get_enclosing_class): Declare.
9818 (is_base_of_enclosing_class): Likewise.
9819 * pt.c (coerce_template_parms): Use them.
9820
9821 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
9822
9823 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
9824 null to decide whether to use it.
9825
9826 * error.c (dump_type_real): Handle NAMESPACE_DECL.
9827 * parse.y (base_class.1): Avoid crash on error.
9828
9829 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
9830
9831 * decl.c (make_typename_type): If context is a namespace, the code
9832 is in error.
9833
9834 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
9835
9836 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
9837
9838 1998-09-08 Mark Mitchell <mark@markmitchell.com>
9839
9840 * cp-tree.h (anonymous_namespace_name): Declare.
9841 * decl.c: Define it.
9842 (push_namespace): Use anonymous_namespace_name, rather than local
9843 static anon_name.
9844 * error.c (dump_decl): If a namespace is named
9845 anonymous_namespace_name, call it {anonymous}.
9846
9847 * decl.c (grokparms): Distinguish between references and pointers
9848 in error message.
9849
9850 1998-09-08 Richard Henderson <rth@cygnus.com>
9851 Mark Mitchell <mark@markmitchell.com>
9852
9853 * pt.c (process_partial_specialization): Consistently allocate
9854 and zero tpd.parms based on ntparms. Use tpd2.parms, not
9855 tpd.parms, where appropriate.
9856
9857 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
9858
9859 * Makefile.in (INCLUDES): Update after recent toplevel gcc
9860 reorganizations.
9861
9862 1998-09-05 Mark Mitchell <mark@markmitchell.com>
9863
9864 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9865 * class.c (finish_struct): Remove hackery to deal with explicit
9866 specializations in class scope.
9867 * decl.c (grokfndecl): Improve error-recovery.
9868 * decl2.c (grokfield): Likewise.
9869 * pt.c (check_specialization_scope): New function.
9870 (begin_specialization): Call it.
9871 (process_partial_specialization): New function, split out from
9872 push_template_decl. Check partial specializations more
9873 stringently.
9874 (push_template_decl): Call it.
9875 (check_explicit_specialization): Don't attempt to handle explicit
9876 specializations in class scope.
9877 (template_parm_data): Document. Add current_arg and
9878 arg_uses_template_parms.
9879 (mark_template_parm): Set it.
9880 (tsubst_arg_types): Remove unused variable.
9881 * semantics.c (begin_class_definition): Tweak.
9882
9883 1998-09-04 Mark Mitchell <mark@markmitchell.com>
9884
9885 * inc/typeinfo (type_info::type_info(const char*)): Make
9886 `explicit'.
9887
9888 * cp-tree.h (hash_tree_cons_simple): New macro.
9889 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
9890 (coerce_template_parms): Use make_temp_vec, instead of
9891 make_tree_vec. Document this behavior.
9892 (lookup_template_class): Likewise.
9893 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9894 Remove dead code (and add assertion to check its deadness). Fix
9895 bug w.r.t. exception specifications.
9896
9897 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
9898
9899 * decl2.c (import_export_vtable): Always make artificials comdat.
9900 (import_export_decl): Likewise.
9901 * pt.c (mark_decl_instantiated): Likewise.
9902
9903 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9904
9905 * cp-tree.h (finish_globally_qualified_member_call_expr):
9906 Rename to ...
9907 (finish_qualified_call_expr).
9908 * semantics.c: Likewise.
9909 * parse.y (primary): Use it.
9910 * method.c (hack_identifier): Remove redundant code.
9911
9912 * init.c (resolve_offset_ref): Call convert_from_reference to
9913 handle members of reference type. Improve error recovery.
9914
9915 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
9916
9917 * cp-tree.h: Declare warn_nontemplate_friend.
9918 * decl2.c (lang_decode_option): Set.
9919 * lang-options.h: Add -Wnon-template-friend.
9920 * friend.c (do_friend): Use to toggle non-template function warning.
9921
9922 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9923
9924 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9925 corresponding INTEGER_CSTs when processing_template_decl.
9926 * pt.c (tsubst_enum): Tweak accordingly.
9927
9928 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9929
9930 * decl.c (pushdecl_class_level): Add warning here.
9931 (pushdecl): Tweak.
9932
9933 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
9934
9935 * cvt.c (convert_pointer_to_real): Tidy.
9936 * search.c (get_base_distance_recursive): Simplify.
9937 (get_base_distance): Likewise.
9938
9939 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9940 parms.
9941
9942 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
9943
9944 * lex.c (check_newline): Call HANDLE_PRAGMA before
9945 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
9946 if unknown pragmas are encountered.
9947 (handle_sysv_pragma): Interpret return code from
9948 handle_pragma_token (). Return success/failure indication rather
9949 than next unprocessed character.
9950 (pragma_getc): New function: retrieves characters from the
9951 input stream. Defined when HANDLE_PRAGMA is defined.
9952 (pragma_ungetc): New function: replaces characters back into the
9953 input stream. Defined when HANDLE_PRAGMA is defined.
9954
9955 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9956
9957 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9958 * class.c (build_vtable_entry_ref): Likewise.
9959
9960 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9961
9962 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9963 * decl2.c (import_export_decl): Likewise.
9964 * pt.c (instantiate_decl): Use it.
9965
9966 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9967
9968 * decl.c (lookup_name_real): Also do implicit typename thing for
9969 artificial TYPE_DECLs.
9970 * search.c (lookup_field): Likewise.
9971 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
9972 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
9973 (enter_scope_of): Extract type from implicit typename.
9974 (begin_class_definition): Likewise.
9975 * lex.c (identifier_type): Handle implicit typename when checking
9976 for SELFNAME.
9977
9978 * cp-tree.h: Declare flag_strict_prototype.
9979 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
9980 -fstrict-prototype.
9981 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
9982 specified, set it to the value of pedantic.
9983
9984 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9985
9986 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
9987
9988 1998-08-31 Mark Mitchell <mark@markmitchell.com>
9989
9990 * decl.c (finish_enum): Handle member enums of classes declared in
9991 template functions.
9992
9993 * decl2.c (grok_x_components): Strip attributes before calling
9994 groktypename.
9995
9996 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
9997
9998 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
9999 -fenum-int-equivalence and -fno-nonnull-objects.
10000 * class.c (check_for_override): Remove support for -fall-virtual.
10001 (finish_struct_1): Likewise.
10002 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10003 * typeck.c (build_binary_op_nodefault): Likewise.
10004 * cvt.c (ocp_convert): Likewise.
10005 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10006 * class.c (build_vbase_path): Likewise.
10007
10008 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10009
10010 * Makefile.in (INTERFACE): New, set to 1.
10011
10012 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10013
10014 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10015 comparing with global_namespace.
10016 (dump_aggr_type): Likewise.
10017
10018 * decl.c (grokfndecl): Issue error on declaration of friend
10019 templates with explicit template arguments.
10020
10021 * pt.c (convert_template_argument): New function, split out
10022 from...
10023 (coerce_template_parms): Here.
10024 (tsubst): Attempt better error-recovery.
10025
10026 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10027
10028 * pt.c (decl_template_parm_p): Add checks for
10029 TEMPLATE_TEMPLATE_PARM.
10030
10031 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10032
10033 * lex.c (do_identifier): Fix thinko in previous change.
10034
10035 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10036
10037 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10038 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10039
10040 1998-08-28 Richard Henderson <rth@cygnus.com>
10041
10042 Add support for discarding unused virtual functions.
10043 * lang-options.h: Add -fvtable-gc.
10044 * cp-tree.h: Add flag_vtable_gc.
10045 * decl2.c (output_vtable_inherit): New fn.
10046 (finish_vtable_vardecl): Call it.
10047 * class.c (build_vtable_entry_ref): New fn.
10048 (build_vtbl_ref): Call it.
10049
10050 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10051
10052 * cp-tree.h (build_enumerator): Take the enumeration type as a
10053 parameter.
10054 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10055 enumeration constant values if we're processing_template_decls.
10056 Don't set the type for the CONST_DECLs either; that's done in
10057 build_enumerator.
10058 (build_enumerator): Take the enumeration type as a
10059 parameter.
10060 * lex.c (do_identifier): Don't resolve enumeration constants while
10061 processing template declarations, even if they happen to be
10062 TEMPLATE_PARM_INDEXs.
10063
10064 * parse.y (current_enum_type): New variable.
10065 (primary): Don't allow statement-expression in local classes just
10066 as we don't in global classes.
10067 (structsp): Use current_enum_type.
10068 (enum_list): Likewise.
10069 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10070 finish_enum; they no longer occur.
10071
10072 * cp-tree.h (finish_base_specifier): New function.
10073 * parse.y (base_class): Use it.
10074 * semantics.c (finish_base_specifier): Define it.
10075
10076 * parse.y (structsp): Warn on use of typename outside of template
10077 declarations.
10078
10079 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10080
10081 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10082 * lang-options.h: Remove +e options.
10083 * decl2.c (lang_decode_option): Likewise.
10084 (import_export_vtable): Don't check write_virtuals.
10085 (finish_vtable_vardecl, finish_file): Likewise.
10086 * search.c (dfs_debug_mark): Likewise.
10087 * semantics.c (begin_class_definition): Likewise.
10088 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10089
10090 * call.c (build_over_call): Check flag_elide_constructors.
10091 * decl2.c: flag_elide_constructors defaults to 1.
10092 * typeck.c (convert_arguments): Remove return_loc parm.
10093 (build_function_call_real): Adjust.
10094
10095 * search.c: Tear out all mi_matrix and memoize code.
10096 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10097 * lang-options.h: Remove documentation for -fhandle-exceptions,
10098 -fmemoize-lookups and -fsave-memoized.
10099 * cp-tree.h: Lose mi_matrix and memoize support.
10100 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10101 * class.c: Lose struct class_level.
10102 (pushclass, popclass): Lose memoize support.
10103 * init.c (build_offset_ref): Likewise.
10104
10105 Never change BINFO_INHERITANCE_CHAIN.
10106 * init.c (emit_base_init): Change modification of
10107 BINFO_INHERITANCE_CHAIN to an assert.
10108 * search.c (get_base_distance_recursive): Likewise.
10109 (get_base_distance): Likewise.
10110 (lookup_member): Likewise.
10111 (convert_pointer_to_single_level): Likewise.
10112 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10113 (lookup_fnfields): Likewise.
10114 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10115 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10116 (layout_basetypes): Call propagate_binfo_offsets instead of
10117 unshare_base_binfos.
10118 * decl.c (xref_basetypes): Call unshare_base_binfos.
10119 * pt.c (instantiate_class_template): Likewise.
10120 * tree.c (reverse_path): Remove 'copy' parm; always make a
10121 temporary copy.
10122 * class.c (build_vbase_path): Just call it.
10123 * search.c (compute_access): Likewise. Don't re-reverse.
10124
10125 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10126
10127 * class.c (build_vbase_path): Use reverse_path.
10128 (finish_base_struct): Move warnings for inaccessible bases to
10129 layout_basetypes.
10130 (modify_one_vtable): Remove check of TREE_USED (binfo).
10131 (fixup_vtable_deltas1): Likewise.
10132 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10133 (xref_tag): Remove binfos parameter.
10134 (make_binfo): Remove chain parameter.
10135 (reverse_path): Add copy parameter.
10136 * decl.c (init_decl_processing): Change calls to xref_tag.
10137 (xref_tag): Remove binfos parameter.
10138 (xref_basetypes): Change calls to make_binfo.
10139 * decl2.c (grok_x_components): Change calls to xref_tag.
10140 (handle_class_head): Likewise.
10141 * friend.c (do_friend): Likewise.
10142 * lex.c (make_lang_type): Change calls to make_binfo.
10143 * parse.y (structsp): Change calls to xref_tag.
10144 (named_complex_class_head_sans_basetype): Likewise.
10145 (named_class_head): Likewise.
10146 * rtti.c (init_rtti_processing): Likewise.
10147 * search.c (compute_access): Change calls to reverse_path.
10148 (dfs_get_vbase_types): Change calls to make_binfo.
10149 (get_vbase_types): Remove dead code.
10150 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10151 (layout_basetypes): Warn here about inaccessible bases.
10152 (make_binfo): Remove chain parameter.
10153 (reverse_path): Add copy parameter.
10154
10155 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10156
10157 * class.c: #if 0 complete_type_p.
10158 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10159 * method.c (process_overload_item): Likewise.
10160 * typeck.c (comp_target_types): Likewise.
10161
10162 Stop sharing binfos for indirect virtual bases.
10163 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10164 (layout_basetypes): Likewise.
10165 (unshare_base_binfos): Copy vbases, too.
10166 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10167 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10168 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10169 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10170 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10171 reference to BINFO_VIA_PUBLIC.
10172 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10173 (push_class_decls): Use them.
10174 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10175 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10176
10177 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10178
10179 * decl.c (build_enumerator): Set DECL_CONTEXT for the
10180 CONST_DECLs.
10181
10182 1998-08-26 Mark Mitchell <mark@markmitchell.com>
10183
10184 * cp-tree.h (finish_enum): Change prototype.
10185 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10186 VALUES parameter. Don't try to compute mins/maxs if
10187 processing_template_decl.
10188 * parse.y (structsp): Use new calling sequence for finish_enum.
10189 * pt.c (tsubst_enum): Likewise. Take the new type as input.
10190 (lookup_template_class): Remove unused variables. Tweak.
10191 Register enums on instantiation list before substituting
10192 enumeration constants.
10193 (tsubst_decl): Remove unused variables.
10194 (regenerate_decl_from_template): Likewise.
10195
10196 * decl.c (duplicate_decls): Don't obliterate the
10197 DECL_TEMPLATE_INFO for a template if we're not replacing it with
10198 anything.
10199
10200 * lex.c (do_identifier): Fix typo in comment.
10201
10202 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10203
10204 * errfn.c: Remove stdarg.h/varargs.h.
10205 * tree.c: Likewise.
10206
10207 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
10208
10209 * pt.c (tsubst_copy): Only do typename overloading on an
10210 IDENTIFIER_NODE that happens to look like a typename if it actually
10211 has a type for us to use.
10212
10213 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10214
10215 * typeck.c (comp_cv_target_types): Split out...
10216 (comp_target_types): From here. Don't allow cv-qual changes under
10217 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
10218 (build_ptrmemfunc): Pass 1 to nptrs.
10219 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10220
10221 1998-08-25 Mark Mitchell <mark@markmitchell.com>
10222
10223 * search.c (dependent_base_p): Don't compare a binfo to
10224 current_class_type; use the TREE_TYPE of the binfo instead.
10225
10226 * cp-tree.h (CLASS_TYPE_P): Revise definition.
10227
10228 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10229
10230 * decl.c (duplicate_decls): Don't complain about different
10231 exceptions from an internal decl even if pedantic.
10232
10233 * typeck.c (convert_for_assignment): Converting from pm of vbase
10234 to derived is an error, not a sorry.
10235
10236 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10237 * class.c (fixed_type_or_null): Rename from
10238 resolves_to_fixed_type_p. Return the dynamic type of the
10239 expression, if fixed, or null.
10240 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
10241 does not match the static type.
10242 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
10243 resolves_to_fixed_type_p again.
10244
10245 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10246
10247 * pt.c (tsubst_decl): Move special case code for dealing with
10248 tricky friend templates here from ...
10249 (regenerate_decl_from_template): Here.
10250
10251 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10252
10253 * decl.c (start_decl): Remove redundant linkage check.
10254
10255 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
10256
10257 * typeck.c (c_expand_return): Handle the case that valtype
10258 is wider than the functions return type.
10259
10260 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10261
10262 * cp-tree.h (CLASS_TYPE_P): New macro.
10263 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10264 * pt.c (process_template_parm): Undo previous change.
10265
10266 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
10267
10268 * cp-tree.h: Declare.
10269 * pt.c (decl_template_parm_p): New function.
10270 * decl.c (pushdecl): Check decls for redeclaring template parms.
10271 (xref_tag): Make redeclaration an error, print decl.
10272 * decl2.c (grokfield): Check field_decls for redeclaration as well.
10273
10274 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10275
10276 * parse.y (primary): Fix up the type of string constants.
10277
10278 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10279
10280 * typeck.c (convert_for_initialization): Move check for odd uses
10281 of NULL to avoid duplicate warnings.
10282
10283 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10284
10285 * tree.c (lvalue_type): Fix for arrays.
10286 * typeck.c (string_conv_p): New fn.
10287 (convert_for_assignment): Use it.
10288 (build_unary_op): Use lvalue_type.
10289 * call.c (standard_conversion, convert_like): Use string_conv_p.
10290 (add_function_candidate): Use lvalue_type.
10291 * cvt.c (convert_to_reference): Likewise.
10292 * decl2.c (lang_decode_option): Ignore -traditional.
10293 * decl.c (init_decl_processing): flag_writable_strings inhibits
10294 flag_const_strings.
10295
10296 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
10297
10298 * lang-options.h (lang_options): Add fconst-strings to the list
10299 of valid options.
10300 * decl2.c (lang_f_options, lang_decode_option): Likewise.
10301
10302 1998-08-24 Nathan Sidwell <nathan@acm.org>
10303
10304 * lex.c (real_yylex): Don't warn about long long constants if
10305 we're allowing long long.
10306
10307 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10308
10309 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10310 accessing bindings directly.
10311
10312 * search.c (my_tree_cons): Reimplement.
10313
10314 * lang-specs.h: Remove __HONOR_STD.
10315 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10316
10317 1998-08-23 Mark Mitchell <mark@markmitchell.com>
10318
10319 * decl.c (grokdeclarator): Complain about in-class initialization
10320 of aggregates and/or references.
10321 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10322 TEMPLATE_TYPE_PARMs.
10323
10324 * decl2.c (grok_array_decl): Add comment.
10325 (mark_used): Don't instantiate an explicit instantiation.
10326 * friend.c (make_friend_class): Remove bogus comment. Fix check
10327 for partial specializations.
10328 * pt.c (check_explicit_specialization): Don't
10329 SET_DECL_EXPLICIT_INSTANTIATION here.
10330 (mark_decl_instantiated): Or here.
10331 (do_decl_instantiation): Do it here, instead. Add checks for
10332 duplicate explicit instantiations, etc. Tidy.
10333 (do_type_instantiation): Likewise.
10334 (instantiate_decl): Improve comments. Complain about explicit
10335 instantiations where no definition is available.
10336
10337 * cp-tree.h (ansi_null_node): Remove.
10338 * call.c (build_over_call): Warn about converting NULL to an
10339 arithmetic type.
10340 * cvt.c (build_expr_type_conversion): Likewise. Use
10341 null_ptr_cst_p instead of expanding it inline.
10342 * decl.c (ansi_null_node): Remove.
10343 (init_decl_processing): Make null_node always have integral type.
10344 * except.c (build_throw): Warn about converting NULL to an
10345 arithmetic type.
10346 * lex.c (init_parse): Remove handling of ansi_null_node.
10347 * pt.c (type_unification_real): Don't convert NULL to void* type.
10348 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10349 (convert_for_assignment): Warn about converting NULL to an
10350 arithmetic type.
10351 (convert_for_initialization): Likewise.
10352
10353 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10354
10355 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10356 * pt.c (coerce_template_parms): Use no_linkage_check.
10357 * decl.c (grokvardecl): Likewise.
10358 (grokfndecl): Likewise. Members of anonymous types have no linkage.
10359
10360 * method.c (process_overload_item): Remove useless code.
10361
10362 1998-08-20 Per Bothner <bothner@cygnus.com>
10363
10364 Handle new'ing of Java classes.
10365 * init.c (build_class_classref): New function.
10366 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
10367 constructor does not return this; don't need to exception-protect.
10368
10369 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
10370 * decl2.c (acceptable_java_type): Handle template-derived types.
10371
10372 1998-08-20 Per Bothner <bothner@cygnus.com>
10373
10374 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
10375
10376 1998-08-20 Mark Mitchell <mark@markmitchell.com>
10377
10378 * decl.c (duplicate_decls): Always merge the old and new patterns
10379 for templates, regardless of whether or not the new one has
10380 DECL_INITIAL. Don't throw away specializations. Merge
10381 DECL_SAVED_TREE.
10382 * pt.c (tsubst_decl): Use the right pattern when calculating the
10383 complete args for a new template instance.
10384 (do_decl_instantiation): Fix typo in comment.
10385 (regenerate_decl_from_template): Deal with tricky friend template
10386 case.
10387 (instantiate_decl): Likewise.
10388
10389 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
10390
10391 * init.c (build_builtin_delete_call): Add missing assemble_external
10392 call.
10393
10394 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10395
10396 * parse.y (notype_unqualified_id): Also accept ~A<int>.
10397
10398 1998-08-19 Mark Mitchell <mark@markmitchell.com>
10399
10400 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10401 arithmetic.
10402 * except.c (build_throw): Warn when NULL is thrown, even with
10403 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
10404 thrown expression.
10405
10406 * cp-tree.h (ansi_null_node): New variable.
10407 * decl.c (ansi_null_node): New variable.
10408 (init_decl_processing): Initialize its type.
10409 * lex.c (init_parse): Initialize its value. Use ansi_null_node
10410 for null_node in non-ANSI mode.
10411 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10412 place of null_node to avoid spurious errors.
10413
10414 1998-08-17 Mark Mitchell <mark@markmitchell.com>
10415
10416 * cp-tree.h (enter_scope_of): New function.
10417 * parse.y (complex_direct_notype_declarator): Use it.
10418 * semantics.c (enter_scope_of): New function.
10419
10420 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
10421
10422 * decl.c (grokparms): No, here.
10423
10424 * decl.c (grokdeclarator): Catch parm with pointer to array of
10425 unknown bound here...
10426 * method.c (process_overload_item): ...not here.
10427
10428 * gxxint.texi: Remove obsolete documentation of overloading code.
10429
10430 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10431 * class.c (finish_struct_bits): Likewise.
10432
10433 * tree.c (lvalue_type): Fix for arrays.
10434 * typeck.c (build_unary_op): Use lvalue_type.
10435 * call.c (add_function_candidate): Likewise.
10436 * cvt.c (convert_to_reference): Likewise.
10437
10438 * decl2.c (lang_decode_option): Ignore -traditional.
10439
10440 * init.c (build_offset_ref): Don't mess with error_mark_node.
10441 * lex.c (do_scoped_id): Use cp_error.
10442
10443 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10444
10445 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
10446
10447 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10448
10449 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
10450
10451 * cp-tree.h (set_identifier_local_value): Provide prototype.
10452
10453 * decl2.c (do_namespace_alias): Remove unused variables `binding'
10454 and `old'.
10455
10456 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
10457
10458 * Makefile.in: Rename BBISON to BISON so that it can be properly
10459 inherited from the parent makefile.
10460
10461 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10462
10463 * lang-options.h: Add -finit-priority.
10464 * decl2.c: Likewise. Check flag_init_priority instead of
10465 USE_INIT_PRIORITY.
10466
10467 * decl2.c (setup_initp): New fn.
10468 (start_objects, finish_objects, do_ctors): Handle init_priority.
10469 (do_dtors, finish_file): Likewise.
10470
10471 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10472
10473 * pt.c (tsubst_copy): Hush warning.
10474
10475 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10476
10477 1998-08-12 Mark Mitchell <mark@markmitchell.com>
10478
10479 * pt.c (print_template_context): Don't abort when instantiating a
10480 synthesized method.
10481
10482 * decl.c (grokdeclarator): Issue errors on namespace qualified
10483 declarators in parameter lists or in class scope.
10484
10485 1998-08-09 Mark Mitchell <mark@markmitchell.com>
10486
10487 * pt.c (check_explicit_specialization): Don't abort on bogus
10488 explicit instantiations.
10489
10490 1998-08-07 Mark Mitchell <mark@markmitchell.com>
10491
10492 * typeck.c (require_complete_type): Use complete_type_or_else.
10493 (complete_type_or_else): Always return NULL_TREE on failure, as
10494 documented.
10495
10496 * pt.c (tsubst_aggr_type): Prototype.
10497 (tsubst_decl): New function, split out from tsubst. Set
10498 input_filename and lineno as appropriate.
10499 (pop_tinst_level): Restore the file and line number saved in
10500 push_tinst_level.
10501 (instantiate_class_template): Set input_filename and lineno as
10502 appropriate.
10503 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
10504 context for a TYPENAME_TYPE is complete.
10505
10506 * decl2.c (grokbitfield): Issue errors on bitfields declared with
10507 function type.
10508 (do_dtors): As in do_ctors, pretend to be a member of the same
10509 class as a static data member while generating a call to its
10510 destructor.
10511
10512 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10513 conversions, even in complex virtual base class hierarchies.
10514
10515 1998-08-06 Mark Mitchell <mark@markmitchell.com>
10516
10517 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10518 (TYPE_TEMPLATE_INFO): Likewise.
10519 (SET_TYPE_TEMPLATE_INFO): Likewise.
10520 (ENUM_TI_TEMPLATE): Likewise.
10521 (ENUM_TI_ARGS): Likewise.
10522 (lookup_nested_type_by_name): Remove.
10523 * decl.c (maybe_process_template_type_declaration): Handle enums.
10524 (start_enum): Don't check for primary-template enum declarations
10525 here.
10526 (finish_enum): Clean up, document. Make sure template enum
10527 constants get the correct type.
10528 (build_enumerator): Copy initializers for template enumerations,
10529 too.
10530 (grok_enum_decls): Document.
10531 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10532 better. Build LOOKUP_EXPRs for local variables, even if they are
10533 TREE_PERMANENT.
10534 * pt.c (tsubst_enum): Remove field_chain parameter.
10535 (template_class_depth): Include the depth of surrounding function
10536 contexts.
10537 (push_template_decl): Check for primary-template enum declarations
10538 here. Deal with enumeration templates.
10539 (lookup_template_class): Likewise.
10540 (for_each_template_parm): Likewise.
10541 (instantiate_class_template): Don't call tsubst_enum directly,
10542 call tsubst instead, to instantiate enums. Deal with all
10543 field_chain issues here, not in tsubst_enum.
10544 (lookup_nested_type_by_name): Remove.
10545 (tsubst_aggr_type): Revise handling of enumeration types.
10546 (tsubst): Likewise.
10547 (tsubst_copy): Likewise.
10548 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
10549
10550 1998-08-04 Mark Mitchell <mark@markmitchell.com>
10551
10552 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
10553 uses template parameters.
10554 * method.c (build_template_parm_names): Use the full set of
10555 template arguments for tsubst'ing.
10556 (build_overload_identifier): Pass the full set of template
10557 arguments to build_template_parm_names, not just the
10558 innermost_args.
10559 * pt.c (TMPL_ARGS_DEPTH): Define using
10560 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
10561 (NUM_TMPL_ARGS): New macro.
10562 (add_outermost_template_args): Deal with the case where the outer
10563 args will be completely discarded.
10564 (coerce_template_parms): Use the full set of template arguments
10565 for tsubst'ing. Simplify. Add some asserts. Improve
10566 error messages.
10567 (lookup_template_class): Pass the full set of template arguments
10568 to coerce_template_parms.
10569 (tsubst): Add assertion.
10570 (do_type_instantiation): Don't instantiate member template
10571 classes.
10572
10573 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
10574 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
10575
10576 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
10577
10578 * method.c (set_mangled_name_for_decl): Change return type to void.
10579
10580 * decl.c (lookup_name_real): A namespace-level decl takes priority
10581 over implicit typename. Avoid doing the same lookup twice.
10582
10583 * search.c (dependent_base_p): New fn.
10584 (dfs_pushdecls, dfs_compress_decls): Use it.
10585
10586 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
10587 virtual functions if the type doesn't have any.
10588
10589 1998-08-03 Mark Mitchell <mark@markmitchell.com>
10590
10591 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
10592 uses template parameters.
10593
10594 1998-08-02 Mark Mitchell <mark@markmitchell.com>
10595
10596 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
10597 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
10598 * lex.c (do_identifier): Don't use a second argument, or a type,
10599 when building LOOKUP_EXPRs.
10600 (do_identifier): Likewise.
10601 (do_scoped_id): Likewise.
10602 * method.c (hack_identifier): Improve error message.
10603 * pt.c (lookup_template_function): Don't needlessly call
10604 copy_to_permanent or build_min.
10605 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
10606 necessary.
10607 (do_decl_instantiation): Improve error message.
10608 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
10609 (build_min): Copy the type to the permanent obstack, too.
10610
10611 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
10612
10613 * init.c (init_init_processing): Remove BI* handling.
10614 (build_builtin_call): Remove.
10615 (build_builtin_delete_call): New fn.
10616 (build_delete): Use it.
10617
10618 1998-07-31 Mark Mitchell <mark@markmitchell.com>
10619
10620 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
10621 (maybe_check_template_type): New function.
10622 * decl.c (maybe_process_template_type_declaration): New function,
10623 split out from pushtag Call maybe_check_template_type.
10624 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
10625 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10626 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10627 * pt.c (template_class_depth_real): Generalization of ...
10628 (template_class_depth): Use it.
10629 (register_specialization): Use duplicate_decls for duplicate
10630 declarations of specializations.
10631 (maybe_check_template_type): New function.
10632 (push_template_decl_real): Fix comment.
10633 (convert_nontype_argument): Likewise.
10634 (lookup_template_class): Likewise. Avoid an infinite loop on
10635 erroneous code.
10636 (tsubst_friend_function): Fix comment.
10637 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
10638 an IDENTIFIER_NODE.
10639 * semantics.c (begin_function_definition): Use
10640 reset_specialization to note that template headers don't apply
10641 directly to declarations after the opening curly for a function.
10642
10643 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
10644
10645 * decl.c (push_overloaded_decl): Use current_namespace instead of
10646 DECL_CONTEXT (decl) to determine where we go.
10647
10648 * decl.c (lookup_name_real): Fix typo.
10649
10650 1998-07-28 Mark Mitchell <mark@markmitchell.com>
10651
10652 * friend.c (is_friend): Be lenient with member functions to deal
10653 with nested friends.
10654
10655 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
10656
10657 * class.c (finish_struct_1): Convert integer_zero_node to
10658 ssizetype before passing it to set_rtti_entry.
10659 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
10660 of any size to a pointer.
10661
10662 1998-07-27 Mark Mitchell <mark@markmitchell.com>
10663
10664 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
10665 (build_template_decl_overload): Remove.
10666 (set_mangled_name_for_decl): New function.
10667 (innermost_args): Remove is_spec parameter.
10668 (most_specialized, most_specialized_class): Remove declarations.
10669 (lookup_template_class): Add entering_scope parameter.
10670 (maybe_process_partial_specialization): New function.
10671 (finish_template_decl): Likewise.
10672 (finish_template_type): Likewise.
10673 * class.c (finish_struct): Clean up processing of member template
10674 specializations.
10675 * decl.c (pushtag): Fix formatting.
10676 (lookup_tag): Improve handling of pseudo-global levels.
10677 (make_typename_type): Adjust call to lookup_template_class.
10678 (shadow_tag): Use maybe_process_partial_specialization.
10679 (xref_tag): Improve handling of member friends.
10680 (start_function): Call push_nested_class before
10681 push_template_decl. Don't call push_template_decl for
10682 specializations.
10683 * decl2.c (grok_x_components): Don't call xref_tag for
10684 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
10685 (grokclassfn): Use set_mangled_name_for_decl.
10686 (arg_assoc_class): Adjust call to innermost_args.
10687 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
10688 * error.c (dump_function_name): Improve printing of template
10689 function names.
10690 * friend.c (is_friend): Don't compare types of decls to determine
10691 friendship, unless flag_guiding_decls.
10692 (make_friend_class): Partial specializations cannot be friends.
10693 (do_friend): Use set_mangled_name_for_decl. Call
10694 push_template_decl_real instead of push_template_decl.
10695 * method.c (build_decl_overload_real): Remove prototype. Give it
10696 external linkage.
10697 (build_overload_identififer): Adjust call to innermost_args.
10698 (build_template_decl_overload): Remove.
10699 (set_mangled_name_for_decl): New function.
10700 * parse.y (.finish_template_type): New non-terminal.
10701 (template_def): Use finish_template_decl. Use template_extdef
10702 instead of extdef.
10703 (template_extdef, template_datadef): New non-terminals, containing
10704 only those rules for things which can be templates.
10705 (datadef): Tidy.
10706 (template_type, self_template_type): Use .finish_template_type.
10707 (named_class_head): Use maybe_process_partial_specialization.
10708 * pt.c (mangle_class_name_for_template): Remove context parameter.
10709 (get_class_bindings): Remove outer_args parameter.
10710 (complete_template_args): Remove.
10711 (add_outermost_template_args): New function.
10712 (register_specialization): Return the specialization.
10713 (unregister_specialization): New function.
10714 (tsubst_template_parms): Likewise.
10715 (most_specialized, most_specialized_class): Prototype here as
10716 static.
10717 (original_template): Rename to most_general_template.
10718 (tsubst_template_parms): New function.
10719 (set_mangled_name_for_template_decl): Likewise.
10720 (TMPL_ARGS_DEPTH): New macro.
10721 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
10722 (TMPL_ARGS_LEVEL): New macro.
10723 (SET_TMPL_ARGS_LEVEL): Likewise.
10724 (TMPL_ARG): Likewise.
10725 (SET_TMPL_ARG): Likewise.
10726 (TMPL_ARGS_DEPTH): Likewise.
10727 (finish_member_template_decl): Use finish_template_decl.
10728 (maybe_process_partial_specialization): New function, split out
10729 from tsubst.
10730 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
10731 (maybe_begin_member_template_processing): Use new macros.
10732 (is_member_template): Likewise.
10733 (is_member_template_class): Likewise.
10734 (add_to_template_args): Likewise. Deal with multiple levels of
10735 args.
10736 (maybe_process_partial_specialization): New function.
10737 (retrieve_specialization): Add consistency check.
10738 (determine_specialization): Return full argument list.
10739 (check_explicit_specialization): Tweak friend handling. Use full
10740 argument lists. Simplify.
10741 (current_template_args): Use new macros.
10742 (push_template_decl_real): Change ill-named mainargs to specargs.
10743 Check that a partial specialization actually specializes at least
10744 one parameter. Improve friend handling. Modify for full
10745 template arguments.
10746 (classtype_mangled_name): Don't mangle the names of
10747 specializations.
10748 (lookup_template_class): Add entering_scope parameter. Use it to
10749 avoid finding a template type when an instantiation is required.
10750 Simplify. Use full template arguments.
10751 (tsubst_friend_function): Use unregister_specialization. Use new
10752 macros. Use full template arguments.
10753 (tsubst_friend_class): Substitute, using tsubst_template_parms,
10754 into the template parameters before passing them to
10755 redeclare_class_template.
10756 (instantiate_class_template): Simplify. Use full template
10757 arguments. Adjust calls to get_class_bindings. Use
10758 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
10759 (innermost_args): Use new macros.
10760 (tsubst_aggr_type): New function, split out from tsubst.
10761 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
10762 conventions for lookup_template_class. Refine handling of partial
10763 instantiations. Remove calls to complete_template_args.
10764 Simplify. Add consistency checks. Use set_mangled_name_for_decl
10765 and set_mangled_name_for_template_decl.
10766 (tsubst_copy): Use tsubst_aggr_type.
10767 (instantiate_template): Use full template arguments.
10768 (more_specialized): Improve formatting.
10769 (more_specialized_class): Adjust calls to get_class_bindings.
10770 (get_bindings_real): Don't call complete_template_args.
10771 (most_specialized): Don't overwrite input; create a new list.
10772 (most_specialized_class): Use most_general_template.
10773 (regenerate_decl_from_template): Use unregister_specialization.
10774 Use full template arguments.
10775 (instantiate_decl): Use full template arguments.
10776 (set_mangled_name_for_template_decl): New function.
10777 * semantics.c (begin_class_definition): Use
10778 maybe_process_partial_specialization.
10779 (finish_member_class_template): New function.
10780 (finish_template_decl): Likewise.
10781 (finish_template_type): Likewise.
10782 (typeck.c): Don't crash after issuing a compiler_error.
10783 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
10784
10785 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
10786
10787 * typeck2.c (build_functional_cast): Handle default-initialization.
10788
10789 * call.c (build_over_call): Pass 1 to popclass.
10790
10791 * parse.y (direct_notype_declarator): Add precedence declaration
10792 to notype_unqualified_id case.
10793 * Makefile.in (EXPECT): Adjust.
10794
10795 * tree.c (ovl_member): Fix for single function in OVL.
10796
10797 1998-07-27 Dave Brolley <brolley@cygnus.com>
10798
10799 * c-lex.c (yylex): Fix boundary conditions in character literal and
10800 string literal loops.
10801
10802 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
10803
10804 * decl.c (lookup_name_real): OK, do return the from_obj value
10805 unless got_object depends on template parms.
10806
10807 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
10808
10809 * pt.c (coerce_template_parms): Also complain about local enums.
10810
10811 * cp-tree.h: Add prototype for set_identifier_local_value.
10812 * decl.c (set_identifier_local_value_with_scope): Make static,
10813 prototype.
10814 * search.c (covariant_return_p): Likewise.
10815 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
10816
10817 * call.c (build_method_call): Only pull out the type of a destructor
10818 if it's a template type parm.
10819 * decl.c (lookup_name_real): Never return the from_obj value.
10820
10821 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
10822
10823 * except.c (process_start_catch_block_old): Call start_decl_1 for
10824 catch parm.
10825 * decl.c (start_decl_1): Avoid duplicate error.
10826
10827 * init.c (expand_default_init): Only perform the initialization if
10828 it will do something.
10829
10830 1998-07-23 H.J. Lu (hjl@gnu.org)
10831
10832 * parse.y (base_class): Check for invalid base class.
10833
10834 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
10835
10836 * decl2.c (import_export_template): Fold in...
10837 (import_export_class): ...to here. Handle dllimport/export.
10838
10839 * class.c (build_vtable): Pass at_eof to import_export_vtable.
10840 (prepare_fresh_vtable): Likewise.
10841 * decl2.c (import_export_class): Split out...
10842 (finish_prevtable_vardecl): From here.
10843 * class.c (finish_struct_1): Call import_export_class if at_eof.
10844
10845 * decl.c (start_function): #if 0 mysterious code I wrote and have
10846 forgotten why.
10847 * rtti.c (get_tinfo_fn): If this is for a class type, set
10848 DECL_CONTEXT.
10849
10850 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
10851
10852 * inc/exception: Change terminate and unexpected to ().
10853
10854 * parse.y (named_class_head_sans_basetype_defn): A
10855 named_class_head_sans_basetype followed by '{' or ':' is a defn.
10856
10857 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
10858
10859 * tree.c (canonical_type_variant): New fn to handle arrays.
10860 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10861 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
10862 * method.c (process_overload_item): Use build_overload_value for
10863 arrays.
10864
10865 1998-07-20 Dave Brolley <brolley@cygnus.com>
10866
10867 * lex.c (mbchar.h): #include it.
10868 (GET_ENVIRONMENT): New macro.
10869 (init_parse): Set character set based on LANG environment variable.
10870 (real_yylex): Handle multibyte characters in character literals.
10871 (real_yylex): Handle multibyte characters in string literals.
10872
10873 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
10874
10875 * lex.c (do_identifier): Look for class value even if we don't
10876 have a global value. Do implicit declaration if parsing is 2.
10877 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10878 lookup.
10879
10880 1998-07-19 Mark Mitchell <mark@markmitchell.com>
10881
10882 * decl.c (pushtag): Revert previous change.
10883 * pt.c (lookup_template_class): Don't put out debugging
10884 information for types that use template parameters.
10885
10886 * decl.c (pushtag): Don't put out debugging information for
10887 compiler-generated typedefs.
10888
10889 * error.c (dump_type_real): Don't crash when presented with
10890 intQI_type_node or the like.
10891
10892 * semantics.c (finish_translation_unit): Fix spelling error in
10893 comment.
10894
10895 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
10896
10897 * decl.c (lookup_name_real): Pull out single function here.
10898 (select_decl): Not here.
10899 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10900
10901 * decl.c (qualify_lookup): Tweak again.
10902
10903 * pt.c (lookup_template_class): Don't mess with the context of the
10904 instantiation.
10905 * decl2.c (current_decl_namespace): Remove special handling for
10906 templates.
10907
10908 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10909 a member template specialization.
10910
10911 * tree.c (ovl_member): Use decls_match to compare functions.
10912 * decl.c (decls_match): Check the context of a function.
10913
10914 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10915 in Koenig lookup support rules.
10916 * semantics.c (finish_call_expr): Handle the new cases.
10917
10918 * typeck.c (build_x_function_call): Handle overloaded methods.
10919
10920 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10921
10922 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10923
10924 * semantics.c (finish_object_call_expr): Revert previous change.
10925 * call.c (build_new_method_call): Likewise. Instead, convert
10926 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10927
10928 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10929
10930 * decl.c (qualify_lookup): Handle templates.
10931
10932 * decl2.c (do_using_directive): Don't pass ancestor.
10933 * decl.c (push_using_directive): Calculate ancestor.
10934
10935 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10936 * decl.c (pushdecl): Move type shadowing handling from here...
10937 (duplicate_decls): ...to here.
10938 * decl.c (set_identifier_local_value_with_scope): New fn.
10939 (pushdecl): Use it.
10940 (set_identifier_local_value, lookup_type_current_level): New fns.
10941 * decl2.c (do_local_using_decl): Handle types and binding level
10942 stuff properly.
10943
10944 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10945 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10946 (lookup_namespace_name): Likewise.
10947 * typeck.c (build_unary_op): Not here anymore.
10948
10949 * decl2.c (do_class_using_decl): Make sure we get an identifier.
10950 * class.c (handle_using_decl): Ignore TYPE_DECLs.
10951
10952 * decl.c (qualify_lookup): New fn.
10953 (lookup_name_real): Use it.
10954
10955 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10956
10957 * decl2.c (add_using_namespace): When directly using a namespace
10958 that was indirect before, promote it.
10959
10960 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10961 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10962 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10963 * decl.c (select_decl): Replace two flag parameters by one.
10964 (unqualified_namespace_lookup): Likewise, pass flag.
10965 (lookup_flags): New function.
10966 (lookup_name_real): Compute flags, pass them.
10967 (lookup_namespace_name): Call with zero-flag.
10968 * decl2.c (ambiguous_decl): Add flag parameter, complain only
10969 according to flags.
10970 (lookup_using_namespace, qualified_lookup_using_namespace):
10971 Add flag parameter, pass them through.
10972 * lex.c (do_scoped_id): Call with zero-flag.
10973
10974 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10975
10976 * typeck.c (convert_for_assignment): Use comptypes.
10977
10978 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10979
10980 * semantics.c (finish_object_call_expr): Move test for the
10981 function called being a TYPE_DECL to ...
10982 * call.c (build_new_method_call): Here.
10983
10984 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
10985
10986 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
10987 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
10988
10989 * lex.c (looking_for_typename): Don't initialize.
10990
10991 * decl2.c (ambiguous_decl): Clarify error message.
10992
10993 * decl.c (push_using_directive): Iterate over namespaces used
10994 indirectly.
10995
10996 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10997
10998 * decl2.c (add_using_namespace): Iterate over namespaces used
10999 indirectly.
11000
11001 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11002 (cat_namespace_levels): Ignore aliases.
11003 (duplicate_decls): Ignore duplicate aliases.
11004 * decl2.c (do_namespace_alias): Process block level namespace
11005 aliases. Store alias with pushdecl. Remove odr errors.
11006 * parse.y (namespace_alias): New non-terminal.
11007 (extdef): Use it.
11008
11009 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11010
11011 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11012 Handle TEMPLATE_TYPE_PARM.
11013 (arg_assoc): Rewrite.
11014
11015 * pt.c (complete_template_args): Don't look at the context unless
11016 we have to.
11017
11018 * method.c (build_decl_overload_real): Fix namespace handling.
11019
11020 * typeck.c (build_unary_op): Extract a lone function from an
11021 OVERLOAD.
11022
11023 * call.c (build_scoped_method_call): Handle getting a namespace
11024 for basetype in a destructor call.
11025 (check_dtor_name): Handle enums.
11026
11027 * parse.y (using_directive): New nonterminal.
11028 (extdef, simple_stmt): Use it.
11029
11030 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11031
11032 * decl2.c (add_function): Move error message ...
11033 (arg_assoc_namespace): ... from here.
11034
11035 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11036
11037 * parse.y (namespace_qualifier): Fix multiple level handling.
11038 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11039 (arg_assoc): Don't skip the first argument of a function.
11040
11041 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11042
11043 * search.c (my_tree_cons): Clean up.
11044
11045 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11046
11047 * call.c (joust): Don't warn about "confusing" conversions to the
11048 same type.
11049
11050 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11051
11052 * class.c (push_nested_class): Complain about namespaces.
11053 * decl.c (start_decl): Enter the object's namespace.
11054 (cp_finish_decl): Leave it.
11055 (grokdeclarator): Likewise.
11056 * decl2.c (check_decl_namespace): New function.
11057 (finish_file): Call it.
11058 * parse.y (complex_direct_notype_declarator): Set complexity
11059 of namespace-qualified ids to -1, enter the namespace.
11060
11061 * method.c (build_template_decl_overload): Expect _DECL as first
11062 parameter. Put context temporarily into current_namespace.
11063 * pt.c (check_explicit_specialization): Change caller.
11064 (tsubst): Likewise.
11065
11066 * init.c (build_offset_ref): Call mark_used and
11067 convert_from_reference for namespace members.
11068
11069 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11070
11071 * search.c (my_tree_cons): The bitfield is at index 2.
11072
11073 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11074
11075 * lang-options.h: Format changed to work with new --help support
11076 in gcc/toplev.c
11077
11078 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11079
11080 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11081 Do Koenig lookup in CALL_EXPR.
11082 (arg_assoc): Handle error_mark.
11083 * lex.c (is_global): New function.
11084 (do_identifier): Expect arguments for Koenig lookup.
11085 * parse.y (primary): Add rules for calls of unqualified function calls.
11086 (do_id): Change call of do_identifier.
11087 * pt.c (finish_stmt_expr): Likewise.
11088 * semantics.c (finish_id_expr): Likewise.
11089 (finish_call_expr): Add integer parameter to indicate
11090 argument-dependent lookup.
11091
11092 * decl.c (struct binding_level): New field using_directives.
11093 (push_using_decl): Not sorry anymore.
11094 (push_using_directive): New function.
11095 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11096 (unqualified_namespace_lookup): New function, code from ...
11097 (lookup_name_real): ... here.
11098 * decl2.c (lookup_using_namespace): Pass using list instead of
11099 initial scope.
11100 (validate_nonmember_using_decl): New function.
11101 (do_nonmember_using_decl): New function.
11102 (do_toplevel_using_decl): Use them.
11103 (do_local_using_decl): New function.
11104 (do_using_directive): Support block-level directives.
11105 * parse.y (simple_stmt): Support using declarations and
11106 directives.
11107 (namespace_qualifier, namespace_using_decl): New non-terminals.
11108
11109 * xref.c (classname): New function.
11110 (GNU_xref_hier): Change class and base parameters to tree.
11111 * decl.c (xref_baseypes): Change caller.
11112 * friend.c (make_friend_class): Likewise.
11113
11114 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11115
11116 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11117 comparison.
11118
11119 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11120 template template parameter, record its use.
11121 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11122 its template arguments if exists.
11123
11124 * pt.c (coerce_template_template_parms): New function equivalent
11125 to coerce_template_parms when IS_TMPL_PARM is true.
11126 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11127 all callers changed.
11128
11129 (coerce_template_parms): Access ARGLIST properly when creating a
11130 new vector. Only accept implicit TYPE_DECL as valid argument for
11131 a template template parameter when it is a base class of
11132 current_class_type. Don't display error message when COMPLAIN is
11133 false.
11134
11135 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11136
11137 * repo.c (get_base_filename): Use file_name_nondirectory.
11138 (open_repo_file): Likewise.
11139 * cp-tree.h (file_name_nondirectory): Add prototype.
11140
11141 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11142
11143 * friend.c (do_friend): Pull the identifier out of declarator.
11144 Use cp_error and friends.
11145 * decl2.c (qualified_lookup_using_namespace): Fix call to
11146 purpose_member.
11147 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11148 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11149 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11150 * class.c (warn_hidden): Fix for OVERLOAD.
11151 From grahams@rcp.co.uk:
11152 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11153 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11154
11155 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
11156
11157 * g++.1 (-traditional): Remove duplicated documentation.
11158
11159 1998-07-11 Mark Mitchell <mark@markmitchell.com>
11160
11161 * method.c (flush_repeats): Add nrepeats parameter.
11162 (issue_nrepeats): Likewise.
11163 (is_back_referenceable_type): New function. Don't back-reference
11164 TEMPLATE_TYPE_PARMs as well as simple types like integers.
11165 (build_mangled_name_for_type): Likewise.
11166 (build_mangled_name_for_type_with_Gcode): Likewise.
11167 (lasttype): Remove.
11168 (nrepeats): Likewise.
11169 (Nrepeats): Likewise.
11170 (start_squangling): Don't clear the variables removed above.
11171 (end_squangling): Likewise.
11172 (flush_repeats): Tidy. Use nrepeats parameter rather than
11173 Nrepeats global.
11174 (issue_nrepeats): Likewise, but with nrepeats global. Use
11175 is_backreferenceable_type.
11176 (build_overload_nested_name): Tidy. Add comment. Use
11177 build_mangled_name_for_type.
11178 (build_underscore_int): Comment.
11179 (build_overload_scope_ref): Use build_mangled_name_for_type.
11180 (build_overload_int): Likewise.
11181 (build_template_template_parm_names): Tidy.
11182 (build_template_parm_names): Use build_mangled_name_for_type.
11183 (build_overload_identifier): Add comments.
11184 (build_mangled_name_for_type_with_Gcode): Split out from
11185 build_mangled_name.
11186 (build_mangled_name_for_type): Use it.
11187 (build_mangled_name): Rework to use build_mangled_name_for_type
11188 and to not use global nrepeats/Nrepeats. Tidy.
11189 (process_modifiers): Tidy.
11190 (check_btype): Use is_backreferenceable_type. Add comment.
11191 Rename `node' to `type'.
11192 (process_overload_item): Set numeric_output_need_bar here.
11193 Use build_mangled_name_for_type. Tidy.
11194 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
11195 build_mangled_name_for_type.
11196
11197 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11198 for TYPE_DECLs.
11199
11200 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
11201
11202 * cp-tree.h (warn_long_long): Define.
11203 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11204 warning "ANSI C++ does not support `long long'".
11205 * decl2.c (warn_long_long): Define.
11206 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11207
11208 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
11209
11210 * decl.c (xref_tag): Handle attributes between 'class' and name.
11211 * parse.y (aggr): Likewise.
11212 * semantics.c (finish_class_definition): Likewise.
11213 * Makefile.in (EXPECTED): Adjust.
11214
11215 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11216 * decl2.c: Define them.
11217 (lang_decode_option): Handle them.
11218 * lang-options.h: Add -foptional-diags.
11219 * class.c (finish_struct): Don't complain about multiple meanings of
11220 name if -fno-optional-diags.
11221 * decl.c (pushdecl_class_level): Likewise.
11222 * lex.c (real_yylex): Check warn_multichar.
11223
11224 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
11225
11226 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11227
11228 * tree.c (make_binfo): Fix length.
11229
11230 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
11231
11232 * decl2.c (lang_decode_option): Remove warn_template_debugging.
11233 * lang-options.h: Likewise.
11234
11235 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11236
11237 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11238 (process_start_catch_block): Likewise for variables
11239 `false_label_rtx', `call_rtx' and `return_value_rtx'.
11240
11241 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
11242
11243 * tree.c (build_srcloc): Make sure we allocate this node on the
11244 permanent obstack.
11245
11246 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
11247
11248 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11249 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11250 (lang_specific_driver): Only add -lm automatically if need_math is
11251 nonzero.
11252
11253 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
11254
11255 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
11256
11257 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11258
11259 * Makefile.in (EXPR_H): New dependency variable.
11260 (decl2.o): Depend on $(EXPR_H).
11261 (typeck.o): Likewise.
11262 (init.o): Likewise.
11263 (expr.o): Likewise.
11264
11265 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11266
11267 * decl.c (start_enum): Put local enums on permanent_obstack.
11268
11269 1998-06-25 Mark Mitchell <mark@markmitchell.com>
11270
11271 * cp-tree.h (c_get_alias_set): Declare.
11272 * decl.c (init_decl_processing): Set lang_get_alias_set.
11273
11274 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
11275
11276 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11277 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11278 flag for all function decls which are in the exception table.
11279 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11280 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11281 code is emitted for any referenced rtti function.
11282
11283 1998-06-25 Dave Brolley <brolley@cygnus.com>
11284
11285 * lang-specs.h: Use new | syntax to eliminate
11286 string concatenation.
11287
11288 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
11289
11290 * cp-tree.h (CP_DECL_CONTEXT): New macro.
11291 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11292 * method.c (build_overload_nested_name): Likewise.
11293 * sig.c (build_signature_pointer_or_reference_type): Don't set
11294 DECL_CONTEXT.
11295
11296 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11297
11298 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11299 * cp-tree.h (FROB_CONTEXT): New macro.
11300 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11301 * decl.c (namespace_binding): Replace NULL_TREE with
11302 global_namespace.
11303 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11304 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11305 Likewise.
11306 * decl.c (pushtag): Use FROB_CONTEXT.
11307 (pushdecl, make_typename_type, define_function, grokdeclarator):
11308 Likewise.
11309 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11310 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11311 Likewise.
11312 * decl2.c (decl_namespace): Return global_namespace if no context.
11313 * method.c (build_overload_nested_name): Expect null as context.
11314 * pt.c (mangle_class_name_for_template): Do nothing for null
11315 contexts.
11316 (lookup_template_class): Allow for null id_context.
11317
11318 1998-06-25 Richard Henderson <rth@cygnus.com>
11319
11320 * method.c (emit_thunk): Set current_function_is_thunk for the
11321 ASM_OUTPUT_MI_THUNK case as well.
11322
11323 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11324
11325 * exception.cc (__cplus_type_matcher): Get a match_info pointer
11326 instead of an exception table entry as a parameter.
11327
11328 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11329
11330 * parse.y (function_try_block): Don't call start_catch_handler.
11331 * except.c (call_eh_info): Remove coerced field from declaration.
11332 (build_eh_type_type_ref): New function to create an address of a
11333 rtti function for the new style exception tables.
11334 (expand_start_catch_block): Split function, this contains the
11335 common part.
11336 (process_start_catch_block_old): New function to perform the rest
11337 of expand_start_catch_block under old style exceptions.
11338 (process_start_catch_block_old): New function to perform the rest
11339 of expand_start_catch_block under new style exceptions.
11340 (expand_end_catch_block): Only pop the false label off the stack under
11341 the old style of exceptions.
11342 * semantics.c (finish_try_block): Don't call start_catch_handler.
11343 * exception.cc (struct cp_eh_info): Add original_value field.
11344 (__cplus_type_matcher): Perform type matching on the original exception
11345 value, and if we have a match, set the current value.
11346 (__cp_push_exception): Set the original exception value.
11347
11348 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
11349
11350 * call.c (joust): Fix confusing conversion warning.
11351
11352 * call.c (build_op_delete_call): Add placement parm. Check
11353 LOOKUP_SPECULATIVELY.
11354 * cp-tree.h, decl2.c, init.c: Adjust.
11355 * decl.c (finish_function): Use it.
11356
11357 * pt.c (tsubst): Diagnose creating void fields or variables.
11358
11359 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11360
11361 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11362
11363 * cp-tree.h (check_dtor_name): Add prototype.
11364
11365 * init.c (expand_member_init): Remove unused variables
11366 `ptr_type_node', `parm' and `rval'.
11367
11368 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11369 in call to fprintf.
11370 (lang_print_xnode): Likewise.
11371
11372 * typeck2.c (enum_name_string): Cast argument to sprintf to long
11373 and use %ld specifier.
11374
11375 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11376 specifier in call to fprintf.
11377 (GNU_xref_member): Cast argument to sprintf to int.
11378
11379 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11380
11381 * typeck2.c (pop_init_level): Warn about implicit zero initialization
11382 of struct members.
11383
11384 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11385
11386 * cp-tree.h: Prototype function `check_java_method'.
11387
11388 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11389
11390 * class.c (finish_struct): Make conflicting use of id a pedwarn.
11391 * decl.c (pushdecl_class_level): Likewise.
11392
11393 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11394
11395 * pt.c (convert_nontype_argument): Issue an error when presented
11396 with an integer (real) constant that cannot be simplified to an
11397 INT_CST (REAL_CST).
11398
11399 * cp-tree.h (c_get_alias_set): Remove declaration added in
11400 1998-06-13 change that should never have been checked in.
11401
11402 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11403
11404 * typeck.c (build_binary_op_nodefault): Change % in format strings
11405 to %%.
11406
11407 * decl.c (grokvardecl): Don't build_static_name for decls that
11408 aren't at namespace scope.
11409
11410 * init.c (perform_member_init): Catch default-initialization of
11411 references.
11412
11413 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11414
11415 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11416
11417 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11418
11419 * method.c (hack_identifier): Complain about getting a namespace
11420 or class template.
11421 * typeck.c (decay_conversion): Remove check for namespaces.
11422 * typeck2.c (incomplete_type_error): Likewise.
11423 * parse.y (template_arg): Add PTYPENAME expansion.
11424
11425 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
11426
11427 * decl.c (grokvardecl): Don't build external assembler names for
11428 TYPENAMEs in other namespaces as there is no declarator.
11429 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11430 info from DECL_CONTEXT if it is NULL.
11431
11432 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
11433
11434 * call.c (check_dtor_name): Split out.
11435 (build_scoped_method_call): Use it.
11436 (build_method_call): Use it.
11437 * init.c (build_offset_ref): Use it.
11438
11439 * typeck.c (build_static_cast): Fix handling of pointers to members.
11440
11441 * decl.c (finish_function): Just return nothing from a constructor.
11442 * typeck.c (c_expand_return): Complain about returning a void
11443 expression from a destructor.
11444
11445 1998-06-13 Mark Mitchell <mark@markmitchell.com>
11446
11447 * class.c (alter_access): Accept a BINFO explaining how to get
11448 from the entity whose accessed is being altered to the type doing
11449 the altering.
11450 (handle_using_decl): New function containing code split out from ...
11451 (finish_struct_1): Here.
11452
11453 * cp-tree.h (complete_type_or_else): Declare.
11454 * init.c (build_new_1, build_delete): Use it.
11455 * typeck.c (require_complete_type): Use complete_type, rather than
11456 expanding it inline.
11457 (complete_type_or_else): New function.
11458 (build_component_ref): Use it.
11459 (pointer_int_sum): Make sure the type pointed to is complete.
11460 (pointer_diff): Likewise.
11461
11462 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11463 types.
11464
11465 * search.c (get_matching_virtual): Note that member templates
11466 cannot override virtual functions.
11467
11468 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
11469
11470 * pt.c (check_explicit_specialization): If DECLARATOR turned into
11471 an error_mark_node from lookup_template_function, return the same.
11472 (determine_specialization): Also make sure TEMPLATE_ID isn't an
11473 error_mark_node, before we try to read its operands.
11474 * decl.c (grokdeclarator): If we got an error_mark_node from
11475 check_explicit_specialization, just return it right back.
11476
11477 1998-06-12 Mark Mitchell <mark@markmitchell.com>
11478
11479 * class.c (instantiate_type): Don't treat template-ids that don't
11480 specify any template arguments as equivalent to ordinary
11481 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
11482 pointer-to-members for member templates. Tidy slightly.
11483 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11484 * init.c (build_offset_ref): Handle template-ids like ordinary
11485 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11486 offset part of the OFFSET_REF.
11487 * typeck.c (build_unary_op): Change check for unknown types to
11488 look for OFFSET_REFs, not SCOPE_REFs.
11489
11490 1998-06-11 Mark Mitchell <mark@markmitchell.com>
11491
11492 * pt.c (is_member_template_class): New function.
11493 (push_template_decl_real): Use it.
11494
11495 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
11496
11497 * friend.c (do_friend): Add support for nested classes using
11498 member functions of the enclosing class as friends.
11499
11500 1998-06-10 Mark Mitchell <mark@markmitchell.com>
11501
11502 * call.c (convert_default_arg): Make global, not static.
11503 (convert_arg_for_ellipsis): Split out from ...
11504 (build_over_call): Here.
11505 * cp-tree.h (convert_default_arg); Declare.
11506 (convert_arg_to_ellipsis): Likewise.
11507 (do_member_init): Remove.
11508 * init.c (do_member_init): Remove; this code is dead.
11509 (expand_member_init): Remove much of this code; it is dead.
11510 * typeck.c (convert_arguments): Use convert_default_arg and
11511 convert_arg_for_ellipsis, rather than duplicating here.
11512
11513 * call.c (convert_like): Don't fail silently if
11514 build_user_type_conversion fails. Always return error_mark_node
11515 for failure.
11516
11517 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11518
11519 * search.c (covariant_return_p): Complain about ambiguous base.
11520
11521 * typeck.c (build_component_ref): Diagnose ref to nested type.
11522
11523 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11524
11525 * decl.c (grokparms): Check that INIT isn't an error_mark_node
11526 before giving error about invalid type for default arg.
11527
11528 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11529
11530 * call.c (build_method_call): Fix thinko.
11531
11532 1998-06-10 Dave Brolley <brolley@cygnus.com>
11533
11534 * decl2.c (lang_decode_option): New argc/argv interface.
11535 * cp-tree.h (lang_decode_option): New argc/argv interface.
11536 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
11537 specified for cpplib-enabled compilers.
11538 * lex.c (lang_init): Don't check_newline for cpplib.
11539 (init_parse): Don't initialize cpplib here.
11540
11541 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11542
11543 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
11544 piece before checking DECL_MUTABLE_P.
11545
11546 1998-06-10 John Carr <jfc@mit.edu>
11547
11548 * tree.c (debug_binfo): Make printf format match arguments.
11549
11550 * error.c (OB_PUTI): Make printf format match arguments.
11551
11552 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11553
11554 * init.c (perform_member_init): Handle default-initialization.
11555
11556 * except.c (build_throw): Handle throwing NULL.
11557
11558 * typeck.c (build_x_function_call): Use resolve_offset_ref.
11559
11560 * search.c (compute_access): Only strip an anonymous union
11561 for a FIELD_DECL.
11562
11563 * call.c (add_builtin_candidates): Tweak.
11564
11565 * cvt.c (build_expr_type_conversion): Restore code for conversion
11566 from class types.
11567 * decl2.c (delete_sanity): Use it. Clean up.
11568
11569 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
11570
11571 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
11572
11573 * typeck.c (c_expand_return): Don't warn about void expressions on
11574 return statements in functions returning void.
11575
11576 1998-06-09 Mark Mitchell <mark@markmitchell.com>
11577
11578 * pt.c (fn_type_unification): Revise documentation. Tidy.
11579 (type_unification): Likewise.
11580
11581 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
11582
11583 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
11584 expand_end_catch.
11585 * parse.y (function_try_block): Rename expand_start_catch, and delete
11586 expand_end_catch.
11587 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
11588 expand_end_catch.
11589
11590 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
11591
11592 * search.c (lookup_member): New fn.
11593 * class.c (finish_struct_1): Use it.
11594 * decl.c (lookup_name_real): Use it.
11595
11596 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11597
11598 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
11599
11600 * cp-tree.h: Add prototype for `maybe_print_template_context' and
11601 `maybe_make_one_only'.
11602
11603 * decl.c (auto_function): Remove unused variable `decl'.
11604
11605 * decl2.c: Include dwarf2out.h and dwarfout.h.
11606
11607 * lex.c: Remove redundant declarations of `set_float_handler' and
11608 `asm_out_file'.
11609
11610 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
11611
11612 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
11613 time flag. Call __cp_eh_info instead of __cp_exception_info.
11614 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
11615 (__cp_exception_info): Return offset into cp_eh_info structure to
11616 match what use to be the start of this structure.
11617 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
11618 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
11619 compile time flag.
11620 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
11621 __cp_eh_info instead of __cp_exception_info.
11622
11623 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
11624
11625 * decl.c (cp_finish_decl): Disable inlining of extern inlines
11626 with static variables.
11627
11628 1998-06-08 Mark Mitchell <mark@markmitchell.com>
11629
11630 * init.c (build_offset_ref): Correct previous change to use build,
11631 not build_min.
11632
11633 1998-06-07 Mark Mitchell <mark@markmitchell.com>
11634
11635 * class.c (instantiate_type): Handle pointer-to-members where the
11636 member is a template.
11637 * init.c (build_offset_ref): Likewise.
11638 * typeck.c (build_unary_op): Likewise.
11639
11640 1998-06-07 Richard Henderson <rth@cygnus.com>
11641
11642 * lex.c (lang_init_options): New function.
11643 (lang_init): Remove flag_exceptions == 2 hack.
11644
11645 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
11646
11647 * search.c (envelope_add_decl): Tweak for implicit typename.
11648
11649 * call.c (joust): Also warn about confusing conversion op/constructor
11650 overload resolution.
11651
11652 * spew.c (yylex): Also return the TYPE_DECL if got_object.
11653 Don't clear got_object after '~'.
11654 * call.c (build_scoped_method_call): Tweak destructor handling.
11655 (build_method_call): Likewise.
11656 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
11657 TYPE_MAIN_VARIANT for destructors.
11658 * semantics.c (finish_object_call_expr): Complain about calling a
11659 TYPE_DECL.
11660
11661 1998-06-05 Per Bothner <bothner@cygnus.com>
11662
11663 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
11664 Define - update needed by gcc.c change.
11665
11666 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
11667
11668 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
11669
11670 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11671
11672 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
11673 * decl.c (lookup_name_real): Add namespaces_only parameter.
11674 If set, return only NAMESPACE_DECLs.
11675 (select_decl): Likewise.
11676 (identifier_type_value): Give additional parameter.
11677 (lookup_name_nonclass): Likewise.
11678 (lookup_name): Likewise.
11679 (find_binding): Skip namespace aliases.
11680 (binding_for_name): Likewise.
11681 (push_namespace): Check for namespace aliases.
11682 (lookup_name_namespace_only): New function.
11683 (begin_only_namespace_names, end_only_namespace_names): New functions.
11684 * decl2.c (set_decl_namespace): Skip namespace aliases.
11685 (do_using_directive): Likewise.
11686 (do_namespace_alias): Produce namespace aliases, fix alias
11687 redeclaration.
11688 * error.c (dump_decl): Support SCOPE_REF.
11689 * parse.y (extdef): Wrap lookup with namespace_only for namespace
11690 aliases and using declarations.
11691
11692 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
11693
11694 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
11695
11696 * error.c (dump_expr): Clean up NEW_EXPR case.
11697
11698 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
11699
11700 Suggested by Brendan Kehoe
11701 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
11702 treat it as using ::decl.
11703
11704 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
11705
11706 * tree.c (mapcar): Support NEW_EXPR.
11707
11708 * error.c (dump_expr): Support NEW_EXPR.
11709
11710 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
11711
11712 * method.c (make_thunk): Use overload machinery to make name.
11713 * search.c (covariant_return_p): New fn.
11714 (get_matching_virtual): Use it.
11715
11716 * init.c (build_new_1): Fix check for void.
11717
11718 1998-06-01 Per Bothner <bothner@cygnus.com>
11719
11720 * cp-tree.h (TYPE_FOR_JAVA): New macro.
11721 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
11722 java_int_type_node, java_long_type_node, java_float_type_node,
11723 java_double_type_node, java_char_type_node, java_boolean_type_node):
11724 New "primitive" types, with predefined names __java_byte etc.
11725 (record_builtin_java_type): New function.
11726 (init_decl_processing): Make Java types with record_builtin_java_type.
11727 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
11728 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
11729 (grokfndecl): Call check_java_method for Java classes.
11730 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
11731 (process_overload_item): Match types against specific
11732 java_XX_type_node types, rather than using is_java_type.
11733 * class.c (finish_struct_1): Don't add default copy constructor
11734 or operator= if TYPE_FOR_JAVA.
11735 (pop_lang_conext): Restore strict_prototyp proper if Java.
11736 * decl2.c (acceptable_java_type, check_java_method): New functions.
11737 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
11738 (tsubst): Move common statement after if statement.
11739 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
11740
11741 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
11742
11743 * pt.c (for_each_template_parm): Use first_rtl_op.
11744
11745 * tree.c (build_cplus_array_type_1): Also check index_type for
11746 template parms.
11747
11748 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
11749
11750 * pt.c (tsubst): Always copy BINFO_BASETYPES.
11751
11752 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
11753
11754 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
11755 TYPE_SIZE_UNIT too.
11756
11757 1998-05-29 Mark Mitchell <mark@markmitchell.com>
11758
11759 * decl.c (grokdeclarator): Don't complain about in-class
11760 initialization of static consts if we don't really know the type
11761 of the variable.
11762
11763 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
11764
11765 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
11766 * method.c (build_destructor_name): New fn.
11767 * decl2.c (maybe_retrofit_in_chrg): Split out...
11768 (grokclassfn): From here. Reorganize.
11769 * decl.c (grok_ctor_properties): Make sure ctors for types with
11770 vbases have the in_chrg parm.
11771 * pt.c (instantiate_class_template): Update
11772 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
11773 grok_*_properties.
11774 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
11775
11776 1998-05-28 Mark Mitchell <mark@markmitchell.com>
11777
11778 * pt.c (instantiate_decl): Make test for whether or not static
11779 variables should be instantiated early match its comment.
11780
11781 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
11782
11783 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
11784 a member.
11785 (start_function): Call check_default_args.
11786 * decl2.c (grokfield): Don't call check_default_args.
11787 (check_default_args): Use cp_error_at.
11788 * lex.c (do_pending_defargs): Call check_default_args.
11789
11790 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
11791
11792 * call.c (build_method_call): Make sure get_type_value returns
11793 something before we try to use its TYPE_MAIN_VARIANT.
11794 (build_scoped_method_call): Likewise.
11795
11796 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
11797
11798 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
11799 initialize an array.
11800
11801 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
11802 DECL_VIRTUAL_P.
11803
11804 * friend.c (do_friend): Clarify template warning.
11805
11806 1998-05-27 Mark Mitchell <mark@markmitchell.com>
11807
11808 * decl.c (shadow_label): Don't treat decls as identifiers.
11809 (maybe_push_to_top_level): Clear shadowed_labels.
11810
11811 * pt.c (instantiate_decl): Reset lineno and filename after calling
11812 regenerate_decl_from_template.
11813
11814 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
11815 error_mark_node.
11816
11817 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
11818
11819 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
11820
11821 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11822
11823 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
11824 (convert_nontype_argument): Handle cases when nontype template
11825 parameters become classes after substitution.
11826
11827 1998-05-26 Mark Mitchell <mark@markmitchell.com>
11828
11829 * friend.c (is_friend): Use comptypes, rather than == to compare
11830 types. Modify for new representation of template friends.
11831 (make_friend_class): Likewise.
11832 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
11833 (instantiate_class_template): Deal with template friends.
11834
11835 * decl.c (store_parm_decls): Remove redundant call to
11836 expand_main_function.
11837
11838 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
11839
11840 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
11841 DECL_USE_TEMPLATE.
11842
11843 1998-05-26 Per Bothner <bothner@cygnus.com>
11844
11845 * language_as_string: Handle lang_java.
11846
11847 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
11848
11849 * decl.c (pushdecl): Don't copy the type_decl.
11850
11851 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11852
11853 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11854 current_class_type.
11855 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11856
11857 * parse.y (complex_direct_notype_declarator): Use $1 to access
11858 scope of notype_qualified_id.
11859
11860 1998-05-26 Dave Brolley <brolley@cygnus.com>
11861
11862 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11863 (init_parse): Initialize cpplib interface.
11864
11865 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11866 empty continuation.
11867
11868 1998-05-26 Mark Mitchell <mark@markmitchell.com>
11869
11870 * decl.c (pushtag): Avoid crashing on erroneous input.
11871
11872 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11873
11874 * decl.c (push_namespace): Only produce one unique name for
11875 anonymous namespaces.
11876 (get_unique_name): Remove.
11877
11878 1998-05-25 Mark Mitchell <mark@markmitchell.com>
11879
11880 * call.c (tourney): Don't do any extra comparisons.
11881
11882 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11883
11884 * cp-tree.h (processing_template_parmlist): Declare.
11885 * decl.c (pushtag): Don't call push_template_decl when we
11886 shouldn't.
11887 * pt.c (processing_template_parmlist): New variable.
11888 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11889 (complete_template_args): Use it.
11890 (add_to_template_args): Likewise.
11891 (innermost_args): Likewise.
11892 (tsubst): Likewise.
11893 (begin_template_parm_list): Use processing_template_parmlist.
11894 (end_template_parm_list): Likewise.
11895
11896 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11897 * decl.c (grokdeclarator): Use it.
11898 * decl2.c (grok_x_components): Likewise.
11899 * init.c (initializing_context): Likewise.
11900 * method.c (do_build_copy_constructor): Likewise.
11901 (do_build_assign_ref): Likewise.
11902 * search.c (compute_access): Likewise.
11903 * typeck.c (build_component_ref): Likewise.
11904
11905 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11906 unnamed type a typedef name "for linkage purposes".
11907
11908 * pt.c (lookup_template_class): Don't look at
11909 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11910
11911 * method.c (build_overload_int): Handle error cases gracefully.
11912
11913 * pt.c (instantiate_decl): Handle static member variables
11914 correctly.
11915
11916 * pt.c (tsubst): Use the tsubst'd type when producing new
11917 TEMPLATE_PARM_INDEX nodes.
11918
11919 1998-05-24 Mark Mitchell <mark@markmitchell.com>
11920
11921 * tree.c (cp_tree_equal): Handle pointers to member functions.
11922
11923 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
11924 sure the type of the REF_BIND is a reference type.
11925 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11926 target_type for clarity.
11927
11928 * parse.y (xcond): Move call to condition_conversion ...
11929 * semantics.c (finish_for_cond): Here.
11930 * parse.c: Regenerated.
11931
11932 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
11933
11934 * decl.c (push_namespace): Namespaces have type void.
11935 * typeck2.c (incomplete_type_error): Complain about namespace
11936 used as expression.
11937 * typeck.c (decay_conversion): Likewise.
11938
11939 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11940
11941 * error.c (dump_expr): Support namespaces.
11942
11943 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
11944
11945 * cp-tree.def: Add SRCLOC.
11946 * cp-tree.h: Add struct tree_srcloc and accessor macros.
11947 * tree.c (build_srcloc, build_srcloc_here): New fns.
11948 * pt.c (add_pending_template): Use build_srcloc_here.
11949 (push_tinst_level): Update last_template_error_tick before erroring.
11950 (instantiate_decl): Restore lineno and input_filename before
11951 calling add_pending_template.
11952 * decl2.c (finish_file): Set up lineno and input_filename for
11953 pending templates.
11954
11955 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11956
11957 * decl.c (lang_print_error_function): New fn.
11958 (init_decl_processing): Set print_error_function to use it.
11959 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11960
11961 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11962 ICS_BAD_FLAG.
11963
11964 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
11965 copy-initialization.
11966
11967 * class.c (build_vtable_entry): Use int_fits_type_p.
11968 (build_vtable): Pass a signed offset to build_vtable_entry.
11969 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
11970 set_rtti_entry): Likewise.
11971
11972 1998-05-22 Per Bothner <bothner@cygnus.com>
11973
11974 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
11975 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
11976
11977 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11978
11979 * pt.c (print_template_context): Use fprintf instead of cp_error.
11980
11981 * pt.c (determine_specialization): Just return an error_mark_node.
11982 Also print the decl we want in error messages. If we complain,
11983 return error_mark_node.
11984 (tsubst_friend_function): Set lineno and input_filename so
11985 error messages will be useful.
11986 (instantiate_template): Just return an error_mark_node.
11987 (check_explicit_specialization): Don't mess with a returned
11988 error_mark_node.
11989
11990 * pt.c (print_template_context): Add new argument.
11991 (maybe_print_template_context): New fn.
11992 (push_tinst_level): Increment tinst_level_tick.
11993 (pop_tinst_level): Likewise.
11994 * errfn.c (cp_thing): Call maybe_print_template_context. Use
11995 xrealloc instead of xmalloc.
11996
11997 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
11998
11999 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12000
12001 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12002 if the template we looked up is the same as the one we already
12003 have.
12004
12005 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12006
12007 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12008 (cpp_reader,parse_in): Add for cpplib.
12009 (check_newline): Call handle_sysv_pragma with new interface.
12010 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12011
12012 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12013 (sub_getch): Call GETC for cpplib.
12014
12015 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12016 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12017
12018 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12019
12020 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12021
12022 * decl2.c (maybe_make_one_only): New fn.
12023 (import_export_vtable): Use it.
12024 (import_export_decl): Likewise.
12025 * pt.c (mark_decl_instantiated): Likewise.
12026
12027 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12028
12029 * decl2.c (find_representative_member): Rename to ...
12030 (build_anon_union_vars): New function.
12031 (finish_anon_union): Fix stupidity of previous change.
12032
12033 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12034
12035 * decl.c (grokfndecl): Handle definition of specialization in
12036 friend declaration.
12037
12038 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12039
12040 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12041
12042 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12043 to look for type declarations.
12044 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12045 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12046 (finish_member_class_template): Declare.
12047 * decl.c (pushtag): Put member class templates on the
12048 CLASSTYPE_TAGS list, just as for ordinary member classes.
12049 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12050 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12051 IDENTIFIER_NAMESPACE_VALUEs.
12052 * parse.y (component_decl): Move code to ...
12053 * semantics.c (finish_member_class_template): New function.
12054 Don't put member class templates on the list of components for a
12055 class.
12056 * parse.c: Regenerated.
12057 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12058 In fact, don't use DECL_CONTEXT at all here.
12059
12060 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12061
12062 * decl.c (record_unknown_type): New function.
12063 (init_decl_processing): Call it for the unknown and global type
12064 nodes.
12065
12066 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12067
12068 * decl2.c (find_representative_member): New function.
12069 (finish_anon_union): Use it.
12070
12071 * cp-tree.h (MAIN_NAME_P): New macro.
12072 (DECL_MAIN_P): Likwise.
12073 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12074 (grokfndecl): Use the new macros.
12075 (grokdeclarator): Likewise.
12076 (start_function): Likewise.
12077 (store_parm_decls): Likewise.
12078 (finsh_function): Likewise.
12079 * friend.c (do_friend): Likewise.
12080 * typeck.c (build_function_call_real): Likewise.
12081 (build_unary_op): Likewise.
12082
12083 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12084
12085 * decl2.c (start_objects, finish_objects, do_dtors,
12086 do_ctors): Split out from...
12087 (finish_file): ...here.
12088
12089 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12090
12091 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12092 push_class_decls.
12093
12094 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12095
12096 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12097
12098 * error.c (dump_expr): Handle an ARROW_EXPR.
12099
12100 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12101
12102 * decl.c (saveable_obstack): Declare.
12103 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12104 declare, if necessary.
12105
12106 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12107
12108 * call.c (compare_qual): Remove.
12109 (is_subseq): Tweak.
12110 (is_properly_derived_from): New function.
12111 (maybe_handle_ref_bind): Likewise.
12112 (maybe_handle_implicit_object): Likewise.
12113 (compare_ics): Modify substantially to bring into conformance with
12114 the standard.
12115 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12116 (comp_cv_qualification): Declare.
12117 (comp_cv_qual_signature): Likewise.
12118 * typeck.c (comp_cv_qualification): Likewise.
12119 (comp_cv_qual_signature): Likewise.
12120
12121 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12122
12123 * Makefile.in (parse.o): Depend on toplev.h.
12124
12125 * class.c (typecode_p): Remove prototype and definition.
12126
12127 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12128 Add prototype.
12129
12130 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12131 definition.
12132
12133 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12134 in call to `cp_thing'.
12135 (cp_warning): Likewise for function pointer `warning'.
12136
12137 * except.c (do_function_call): Remove prototype and definition.
12138 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12139
12140 * method.c (is_java_type): Add prototype and make it static.
12141
12142 * parse.y: Include toplev.h.
12143
12144 * pt.c (type_unification): Remove unused variable `arg'.
12145 (instantiate_decl): Likewise for `save_ti'.
12146
12147 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12148
12149 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12150
12151 * init.c (build_member_call): Handle template_ids.
12152 * parse.y (primary): Add global_scope template_id.
12153
12154 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12155
12156 * decl2.c (get_sentry): Use end_temporary_allocation.
12157 Don't declare permanent_obstack.
12158
12159 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
12160
12161 * parse.y (.finish_new_placement): New non-terminal.
12162 (unary_expr, new_type_id): Use it.
12163 * parse.c: Regenerated.
12164
12165 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
12166
12167 * pt.c (redeclare_class_template): Say where the original definition
12168 of the template-parameter's default argument appeared.
12169
12170 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
12171
12172 * call.c (build_over_call): Tweak empty class handling.
12173
12174 * decl.c (make_typename_type): Use currently_open_class.
12175
12176 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12177
12178 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12179
12180 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12181 for a type unless it is one.
12182
12183 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12184
12185 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
12186
12187 * Makefile.in (program_transform_name, objdir): Define.
12188
12189 * Makefile.in (BISON): Use bison from the build tree if it exists.
12190 (FLEX): Likewise.
12191
12192 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12193
12194 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12195
12196 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12197
12198 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
12199
12200 * call.c (build_scoped_method_call): Likewise.
12201
12202 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
12203
12204 * init.c (build_new_1): Call suspend_momentary around the creation
12205 of values that must be saved for exception handling.
12206 * parse.y (.build_new_placement): New non-terminal.
12207 (unary_expr, new_placement): Use it.
12208 * parse.c: Regenerated.
12209
12210 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
12211
12212 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12213 old and new types.
12214
12215 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12216 canonical type.
12217
12218 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12219
12220 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12221
12222 * decl.c (start_decl): Revert problem change.
12223
12224 * Makefile.in (CONFLICTS): Fix.
12225
12226 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12227
12228 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12229
12230 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12231
12232 * class.c (finish_struct_1): Use BINFO_SIZE.
12233
12234 * decl.c (start_decl): Use 'tem'.
12235
12236 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
12237
12238 * exception.cc: Include eh-common.h.
12239 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12240 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12241 (__cp_push_exception): Initialize eh_info struct as well.
12242 * except.c: Remove local structs and include eh-common.h.
12243 (init_exception_processing): Set language and version codes.
12244 (call_eh_info): Add presence of eh_info to runtime description of
12245 struct cp_eh_info.
12246 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12247 * semantics.c (finish_try_block): Call start_catch_block() and
12248 end_catch_block().
12249 * parse.y (function_try_block): Call start_catch_block() and
12250 end_catch_block().
12251
12252 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
12253
12254 * typeck.c (original_type): New function.
12255 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12256 to see if they're actually the same.
12257 * cp-tree.h (original_type): Declare.
12258
12259 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12260
12261 * Makefile.in (lex.o): Depend on output.h.
12262
12263 * call.c (add_function_candidate): Remove unused variable `cand'.
12264 (add_conv_candidate): Likewise.
12265 (build_builtin_candidate): Likewise.
12266
12267 * cp-tree.h: Add prototype for `types_overlap_p'.
12268
12269 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12270
12271 * decl2.c (merge_functions): Remove unused variables `tmp' and
12272 `tempn'.
12273
12274 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12275 (code_as_string): Likewise.
12276 (language_as_string): Likewise.
12277 (parm_as_string): Likewise.
12278 (op_as_string): Likewise.
12279 (assop_as_string): Likewise.
12280 (cv_as_string): Likewise.
12281
12282 * lex.c: Include output.h.
12283
12284 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12285
12286 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12287 ATTRIBUTE_UNUSED.
12288
12289 * tinfo.cc (__class_type_info::dcast): Change the type of variable
12290 `i' from int to size_t.
12291
12292 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12293 ATTRIBUTE_UNUSED.
12294
12295 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
12296
12297 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12298 DECL_NAMESPACE_SCOPE_P.
12299 (lang_decl_name): Likewise.
12300 * pt.c (tsubst_friend_function, tsubst): Likewise.
12301 * decl.c (pushdecl, redeclaration_error_message, start_decl,
12302 cp_finish_decl, start_function): Likewise.
12303 * class.c (finish_struct_1): Likewise.
12304 * call.c (build_over_call): Likewise.
12305 (compare_ics): Use DERIVED_FROM_P.
12306
12307 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
12308
12309 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12310 * method.c (build_mangled_name): Use it.
12311 (build_decl_overload_real): Likewise.
12312
12313 * error.c (dump_simple_decl): New function, broken out from ...
12314 (dump_decl): Use it.
12315
12316 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
12317
12318 * ptree.c (lang_print_xnode): Add missing `break'.
12319
12320 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12321
12322 * call.c (add_template_candidate): Adjust for changes to
12323 fn_type_unification.
12324 (add_template_candidate_real): Likewise.
12325 (add_template_conv_candidate): Likewise.
12326 (build_user_type_conversion_1): Likewise.
12327 (build_new_function_call): Likewise.
12328 (build_object_call): Likewise.
12329 (build_new_op): Likewise.
12330 (build_new_method_call): Likewise.
12331 * class.c (instantiate_type): Likewise.
12332 * cp-tree.h (unification_kind_t): New type.
12333 (fn_type_unification): Adjust prototype.
12334 (type_unificaiton): Likewise.
12335 * pt.c (UNIFY_ALLOW_NONE): New macro.
12336 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12337 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12338 (UNIFY_ALLOW_DERIVED): Likewise.
12339 (unify): Change prototype.
12340 (maybe_adjust_types_for_deduction): New function.
12341 (check_cv_quals_for_unify): Likewise.
12342 (determine_specialization): Adjust.
12343 (fn_type_unification): Likewise.
12344 (type_unification): Likewise.
12345 (type_unification_real): Likewise. Use
12346 maybe_adjust_types_for_deduction. Fix mishandling of
12347 back-unification of template functions passed as arguments. Pass
12348 appropriate combination of UNIFY_ALLOW_* to unify.
12349 (unify): Remove unused NTPARMS parameter. Use
12350 check_cv_quals_for_unify. Remove bogus code that allowed
12351 too-generous unification in order to adhere more closely to standard.
12352 (get_bindings_real): Adjust.
12353 (get_class_bindings): Likewise.
12354
12355 * method.c (build_overload_identifier): Only use the innermost
12356 template arguments when mangling.
12357 * pt.c (tsubst_template_argument_vector): New function.
12358 (complete_template_args): Deal with the situation where the
12359 extra_args contain more than one level of arguments.
12360 (lookup_template_class): Deal with member template classes, which
12361 may have more than one level of arguments.
12362 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12363 Improve handling of member template classes. Use
12364 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
12365 tsubst_template_argument_vector where appropriate.
12366 (regenerate_decl_from_template): Break out from ...
12367 (instantiate_decl): Here.
12368
12369 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12370 * parse.h: Regenerated.
12371 * parse.c: Really regenerated.
12372
12373 * cp-tree.h (finish_unary_op_expr): New function.
12374 (finish_id_expr): Likewise.
12375 (begin_new_placement): Likewise.
12376 (finish_new_placement): Likewise.
12377 (finish_declarator): Likewise.
12378 (finish_translation_unit): Likewise.
12379 (finish_parmlist): Likewise.
12380 (begin_class_definition): Likewise.
12381 (finish_class_definition): Likewise.
12382 (finish_default_args): Likewise.
12383 (finish_inline_definitions): Likewise.
12384 * parse.y (GCC_ASM_KEYWORD): Remove.
12385 (TYPENAME_ELLIPSIS): Likewise.
12386 * parse.c: Regenerated.
12387 Use new functions in semantics.c in the actions for many rules.
12388 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12389 * hash.h: Regenerated.
12390 * semantics.c (finish_expr_stmt): Allow NULL expr.
12391 (finish_unary_op_expr): New function, containing
12392 code previously in parse.y.
12393 (finish_id_expr): Likewise.
12394 (begin_new_placement): Likewise.
12395 (finish_new_placement): Likewise.
12396 (finish_declarator): Likewise.
12397 (finish_translation_unit): Likewise.
12398 (finish_parmlist): Likewise.
12399 (begin_class_definition): Likewise.
12400 (finish_class_definition): Likewise.
12401 (finish_default_args): Likewise.
12402 (finish_inline_definitions): Likewise.
12403
12404 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
12405
12406 * typeck.c (build_c_cast): Don't decay arrays and functions to
12407 pointer type when converting to a class type.
12408
12409 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
12410
12411 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12412 (DECL_CLASS_SCOPE_P): Likewise.
12413
12414 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
12415
12416 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12417 * decl2.c (constructor_name_full): Likewise.
12418
12419 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
12420
12421 * tree.c (mapcar): Add OVERLOAD support.
12422
12423 * init.c (resolve_offset_ref): We must use basetype_path before we
12424 destroy it with a call to convert_pointer_to.
12425
12426 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12427
12428 * class.c (currently_open_class): New fn.
12429 * decl.c (lookup_name_real): Use it.
12430 * search.c (lookup_field): Likewise.
12431
12432 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12433
12434 * cp-tree.def (OVERLOAD): New node.
12435 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12436 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12437 (NAMESPACE_BINDING): Remove.
12438 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12439 namespace_binding.
12440 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12441 Define.
12442 (tree_overload): New struct.
12443 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12444 (REAL_IDENTIFIER_TYPE_VALUE): Define.
12445 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12446 (lang_decl_flags): Remove in_namespace.
12447 (lang_decl): Remove chain.
12448 (DECL_CHAIN, DECL_NAMESPACE): Remove.
12449 (flag_honor_std): Declare extern.
12450 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12451 namespace_binding, set_namespace_binding,
12452 lookup_function_nonclass, cat_namespace_levels,
12453 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12454 scratch_ovl_cons, ovl_member, build_overload): Declare.
12455 (decl_list_length, get_namespace_id, current_namespace_id,
12456 overloaded_globals_p): Remove.
12457 (lookup_using_namespace, qualified_lookup_using_namespace): Change
12458 return type.
12459 (push_scratch_obstack): New macro.
12460 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12461 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12462 convs, fns.
12463 (build_new_function_call): Iterate using OVL_CHAIN.
12464 Print DECL_NAME in when reporting ambiguities.
12465 (build_object_call): Iterate using OVL_NEXT for fns, convs.
12466 (build_new_op): Call lookup_function_nonclass.
12467 Iterate using OVL_NEXT.
12468 (build_op_delete_call): Change detection of members.
12469 Do not wrap TREE_LIST around fields and single global functions.
12470 (build_over_call): Don't push a class level if the context is a
12471 namespace.
12472 (build_new_method_call): Iterate using OVL_NEXT.
12473 * class.c (add_method): Chain overloaded members using
12474 build_overload. Remove copying of method.
12475 (grow_method): When iterating through the obstack, expect OVERLOAD
12476 nodes. Chain overload members.
12477 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
12478 nodes in call to get_baselinks.
12479 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12480 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
12481 fdecls that are OVERLOAD nodes.
12482 (validate_lhs): New function.
12483 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
12484 code. Use DECL_NAME in error messages. Split code between global
12485 and member function processing.
12486 * decl.c (global_type_node): New static variable.
12487 (in_std): New global.
12488 (struct binding_level): New field usings.
12489 (resume_binding_level): Assert that we are not in a class.
12490 (toplevel_bindings_p): Just check for namespace_p or
12491 pseudo_global.
12492 (resume_level): Remove.
12493 (find_binding): New function.
12494 (binding_for_name): Call it.
12495 (namespace_binding, set_namespace_binding): New functions.
12496 (push_namespace): Associate binding level with new namespace,
12497 resume_binding_level for existing namespace. Remove old code.
12498 Fake std by counting.
12499 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12500 (maybe_push_to_top_level): Save current namespace.
12501 (pop_from_top_level): Restore saved namespace.
12502 (pop_namespace): Call suspend_binding_level. Remove old code.
12503 (cat_namespace_levels): New function.
12504 (set_identifier_type_value_with_scope): For namespace bindings,
12505 set BINDING_TYPE, and use global_type_node.
12506 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12507 (identifier_type_value): New function.
12508 (pushtag): If no context, use current_namespace.
12509 (duplicate_decls): Don't process DECL_CHAIN.
12510 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12511 already set. Never reset it to NULL_TREE. Lookup global variables
12512 in their namespace. Push overloaded templates if they are on
12513 namespace level.
12514 (pushdecl_namespace_level): New function.
12515 (pushdecl_top_level): Implement using pushdecl_namespace_level.
12516 (pushdecl_using_decl): New function.
12517 (overloaded_globals_p): Remove.
12518 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12519 them. Use namespace_binding and set_namespace_value.
12520 (redeclaration_error_message): Complain if the declarations come
12521 from different namespaces.
12522 (lookup_tag): On namespace level, look in the BINDING_TYPE.
12523 (lookup_namespace_name): Pass tree_bindings from stack. Remove
12524 old code.
12525 (select_decl): New function.
12526 (lookup_name_real): Call it for qualified and unqualified lookup.
12527 Pass tree_bindings from the stack.
12528 If prefer_type is 1, also accept namespaces.
12529 (lookup_function_nonclass): New function.
12530 (init_decl_processing): Set the binding level of the global
12531 namespace to global_binding_level.
12532 Build a proper type list for __builtin_apply.
12533 Initialize std_node to "fake std" if flag_honor_std is set.
12534 Initialize global_type_node.
12535 Allocated bad_alloc in namespace std if flag_honor_std.
12536 (define_function): Set the DECL_CONTEXT to the current_namespace.
12537 (start_decl): A namespace is not considered as a context here. If
12538 the DECL_CONTEXT is a namespace, push the decl.
12539 (cp_finish_decl): Check for namespaces used as initializers.
12540 (grokfndecl): Add namespace parameter. Remove processing of
12541 DECL_CHAIN.
12542 (grokvardecl): Add namespace parameter.
12543 (grokdeclarator): Process SCOPEs that are namespaces. For
12544 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
12545 (start_function): Check for contexts that are namespaces.
12546 Set context for declarations that have not been pushed.
12547 (store_parm_decls): Check for ::main only.
12548 (finish_function): Likewise.
12549 (start_method): Check for contexts that are namespaces.
12550 (start_method): Remove DECL_CHAIN processing.
12551 * decl2.c (flag_honor_std): Declare.
12552 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
12553 (decl_namespace_list): New static global.
12554 (grok_x_components): Ignore namespaces as type contexts.
12555 (check_classfn): Expect OVERLOAD nodes.
12556 (grokfield): Remove DECL_CHAIN processing.
12557 (finish_file): Call cat_namespace_levels.
12558 (merge_functions): New function.
12559 (ambiguous_decl): Rewrite.
12560 (lookup_using_namespace): Produce tree_bindings.
12561 (qualified_lookup_using_namespace): Likewise.
12562 (set_decl_namespace, decl_namespace, current_decl_namespace,
12563 push_decl_namespace, pop_decl_namespace): New functions.
12564 (arg_lookup): New struct.
12565 (add_function, arg_assoc_namespace, arg_assoc_class,
12566 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
12567 New functions.
12568 (get_namespace_id, current_namespace_id): Remove.
12569 (do_toplevel_using_decl): Rewrite.
12570 (do_class_using_decl): Complain about namespace qualifiers.
12571 (do_using_directive): Sorry if not on namespace level. Complain
12572 about unknown namespaces.
12573 * error.c (dump_aggr_type): Check for namespace contexts.
12574 * except.c (init_exception_processing): Push terminate into std.
12575 * friend.c (is_friend): A namespace is not a context, here.
12576 * init.c (expand_member_init): Remove DECL_CHAIN processing.
12577 (build_offset_ref): Process OVERLOAD nodes.
12578 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
12579 * lex.c (identifier_type): Loop using OVL_CHAIN.
12580 (see_typename): Set looking_for_typename to 2.
12581 (real_yylex): Likewise.
12582 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
12583 (do_scoped_id): Expect OVERLOAD nodes.
12584 Change calling convention for qualified_lookup_using_namespace.
12585 (build_lang_decl): Don't set in_namespace anymore.
12586 * method.c (typevec_size): New global.
12587 (build_overload_nested_name): Return if global_namespace.
12588 Otherwise, always expect a declaration context.
12589 (build_qualified_name): Likewise.
12590 Make sure we don't write beyond typevec_size.
12591 (build_decl_overload_real): Likewise.
12592 Allocate one extra slot for the namespace.
12593 (hack_identifier): Mark code dead.
12594 Process OVERLOAD and NAMESPACE_DECL nodes.
12595 * parse.y (program): Pop namespaces until in global namespace.
12596 (extdef): In a using-declaration, don't discard the identifier if
12597 there is no declaration.
12598 (left_curly): Ignore type contexts which are namespaces.
12599 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
12600 used as scope.
12601 * pt.c (template_class_depth): Expect types to be namespaces.
12602 (determine_specialization): Simplify by expecting OVERLOAD nodes.
12603 (push_template_decl): Push into namespace level.
12604 Reset ctx if it is a namespace.
12605 Set DECL_CONTEXT to current_namespace if not set already.
12606 Ignore real contexts that are namespaces.
12607 (mangle_class_name_for_template): Skip global_namespace.
12608 Mangle other namespaces as declarations.
12609 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
12610 (lookup_template_class): Push into namespace of context.
12611 If the context is a namespace, set it to global_namespace.
12612 Use id_context for mangling.
12613 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
12614 (tsubst_friend_function): Ignore namespace contexts.
12615 Push into namespace level.
12616 (tsubst): Handle NAMESPACE_DECL nodes.
12617 Remove DECL_CHAIN processing.
12618 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
12619 * ptree.c (print_lang_identifier): Print bindings.
12620 (lang_print_xnode): Print OVERLOAD nodes.
12621 * rtti.c (init_rtti_processing): Push type_info into std.
12622 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
12623 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
12624 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
12625 lookup_fnfields_here): Likewise.
12626 Process all nodes, instead of going through TREE_CHAIN.
12627 * sig.c (build_signature_pointer_or_reference_type): Set context
12628 to global_namespace.
12629 (build_signature_table_constructor): Expect OVERLOAD nodes.
12630 * spew.c (yylex): Save old setting of looking_for_typename.
12631 * tree.c (decl_list_length): Remove.
12632 (binding_init): New function.
12633 (count_functions): Rewrite.
12634 (is_overloaded_fn): Expect OVERLOAD nodes.
12635 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
12636 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
12637 ovl_member): New functions.
12638 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
12639 (type_unknown_p): Likewise.
12640 (require_instantiated_type): Likewise.
12641 (build_component_ref): Declare code dead.
12642 (build_x_function_call): Create and expect OVERLOAD nodes.
12643 (build_function_call_real): Check for ::main only.
12644 (build_unary_op): Likewise. Expect OVERLOAD nodes.
12645 (convert_for_assignment): Check for TREE_LIST before accessing
12646 TREE_VALUE.
12647 * decl.c (duplicate_decls): Check for namespace bindings instead
12648 of global bindings.
12649 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
12650 lookup_name_current_level, start_decl, xref_tag,
12651 finish_enum): Likewise.
12652 * init.c (build_offset_ref): Likewise.
12653 * search.c (lookup_field): Likewise.
12654 (lookup_fnfields): Likewise.
12655 (dfs_debug_mark): Likewise.
12656 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
12657 (poplevel_class, pop_from_top_level): Likewise.
12658 * decl2.c (finish_method): Likewise.
12659 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
12660 * decl.c (record_builtin_type): Likewise.
12661 (init_decl_processing, grokfndecl): Likewise.
12662 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
12663 (make_lang_type): Likewise.
12664 * parse.y (make_thunk): Likewise.
12665 * pt.c (tsubst): Likewise.
12666 * tree.c (debug_binfo): Likewise.
12667 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
12668 tinfo2.cc, inc/new.h: Add std qualifications.
12669 * inc/new: Wrap with namespace std if __HONOR_STD.
12670 * inc/typeinfo: Likewise.
12671
12672 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
12673
12674 * call.c (build_user_type_conversion_1): Handle second_conv
12675 properly for templates.
12676
12677 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
12678
12679 * method.c (build_decl_overload_real): Set TREE_USED flag to
12680 zero for build_type_variants nodes as well.
12681
12682 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
12683
12684 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
12685
12686 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
12687
12688 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
12689 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
12690 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
12691 xref.o): Add toplev.h dependencies.
12692
12693 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
12694
12695 * errfn.c (cp_error, cp_warning): Remove declarations for
12696 error and warning respectively.
12697
12698 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12699
12700 * error.c: Convert to using ctype macros defined in system.h.
12701 * method.c: Likewise.
12702 * xref.c: Likewise.
12703 * lex.c: Likewise. Also remove redundant system header stuff.
12704
12705 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
12706
12707 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
12708 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
12709 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
12710 xref.c: Add include of toplev.h.
12711
12712 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
12713
12714 * tree.c (perm_manip): Also regenerate the RTL of an extern.
12715 (copy_to_permanent): Use end_temporary_allocation.
12716
12717 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
12718
12719 * init.c (expand_vec_init): The initialization of each array
12720 element is a full-expression.
12721
12722 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
12723
12724 * method.c (build_mangled_name): Add a call to build_type_variant
12725 to get the right type.
12726
12727 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
12728
12729 * Makefile.in: Add .SUFFIXES.
12730
12731 * cp-tree.def: Remove NAMESPACE_DECL.
12732
12733 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
12734
12735 * call.c (build_over_call): Do evaluate arg even if it has empty
12736 class type.
12737 * decl.c (start_function): Don't push a member function.
12738
12739 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
12740
12741 * Makefile.in (g++FAQ.info): Put -o option before input file.
12742
12743 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
12744
12745 * gxxint.texi: Add info for squangling codes K and B.
12746
12747 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
12748
12749 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
12750 the expression in templates.
12751 (finish_stmt_expr): Likewise.
12752
12753 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
12754
12755 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
12756
12757 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
12758
12759 * decl.c (maybe_push_to_top_level): Always clear
12760 current_template_parms and processing_template_decl.
12761 (pushtag): Remove check of current_class_type and some comments,
12762 since maybe_push_to_top_level no longer creates confusion.
12763
12764 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
12765
12766 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
12767 (DECL_CLASS_TEMPLATE_P): Likewise.
12768 (DECL_PRIMARY_TEMPLATE): Likewise.
12769 (PRIMARY_TEMPLATE_P): Use it.
12770 (push_template_decl_real): New function.
12771 (redeclare_class_template): Take new template parameters as
12772 input.
12773 (is_specialization_of): New function.
12774 (comp_template_args): Declare.
12775 * decl.c (pushtag): Handle friend template classes.
12776 (xref_tag): Likewise. Use new calling convention for
12777 redeclare_class_template.
12778 * decl2.c (grok_x_components): Handle friend templates.
12779 * friend.c (is_friend): Use is_specialization_of where
12780 appropriate. Deal with friend class templates.
12781 (make_friend_class): Let a class template be friends with itself.
12782 * pt.c (comp_template_args): Remove declaration.
12783 (tsubst_friend_class): New function.
12784 (push_template_decl_real): New function.
12785 (push_template_decl): Use it.
12786 (redeclare_class_template): Adjust for new calling convention.
12787 (comp_template_args): Give it external linkage.
12788 (instantiate_class_type): Use tsubst_friend_class to deal
12789 with friend templates.
12790 * typeck.c (comptypes): Use comp_template_args, rather than
12791 expanding it inline.
12792 * parse.y (component_decl): Handle a nested template type
12793 like other component type declarations.
12794
12795 * pt.c (check_explicit_specialization): Handle overloaded
12796 constructors correctly.
12797
12798 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
12799 (lookup_template_class): Use it.
12800
12801 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
12802
12803 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
12804 * cp-tree.h: Add WRAPPER support.
12805 * call.c (add_candidate): Split out from add_*_candidate fns.
12806 (build_over_call): Take the candidate instead of function and args.
12807 Enforce access control here. Emit overload warnings here.
12808 (add_warning): New fn.
12809 (joust): Add WARN parm. If not set, call add_warning instead of
12810 printing a warning. Re-enable some warnings.
12811 (tourney): Pass it.
12812 (convert_like): Adjust.
12813 (build_new_op): Adjust.
12814 (build_new_function_call): Adjust.
12815 (build_user_type_conversion_1): Adjust.
12816 (USER_CONV_FN): Adjust.
12817 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
12818 build_int_wrapper): New fns.
12819
12820 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
12821
12822 * pt.c (unify): Fix typo in previous change.
12823
12824 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12825
12826 * error.c (dump_type_real): Declare canonical_name.
12827
12828 * typeck.c (comp_target_types): Fix PMFs.
12829
12830 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
12831
12832 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
12833 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
12834 TEMPLATE_DECL.
12835
12836 * pt.c (tsubst): Decrease the template-level of
12837 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
12838 TEMPLATE_PARM_INDEX.
12839 (template_decl_level): New function.
12840 (unify): Make sure to record unifications for template
12841 parameters, even when the parameters exactly match the arguments.
12842 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
12843 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
12844 aren't from the level we're currently working on.
12845
12846 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
12847
12848 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
12849
12850 * decl2.c (check_member_template): Set DECL_IGNORED for member
12851 class templates, too.
12852
12853 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12854
12855 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12856
12857 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12858
12859 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
12860
12861 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12862 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12863 (init_decl_processing): Handle TI types.
12864 * typeck.c (unsigned_type, signed_type): Handle TI types.
12865
12866 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
12867
12868 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12869 New local added_libraries. Increment count when add library to
12870 arglist.
12871
12872 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
12873
12874 * cp-tree.h (type_as_string_real): New function.
12875 * pt.c (mangle_class_name_for_template): Use it.
12876 * error.c (dump_aggr_type): Change prototype.
12877 (dump_type_prefix): Likewise.
12878 (dump_type_suffix): Likewise.
12879 (dump_type_real): Convert from dump_type. If desired, the
12880 "canonica" name of a typedef, i.e., the name of the underlying
12881 type, can be printed.
12882 (dump_type): Call dump_type_real.
12883
12884 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
12885
12886 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12887
12888 * typeck.c (comp_target_types): Tweak pedantic case.
12889 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
12890 Return -1 or 1 instead of 1 or 2.
12891 (compparms): Remove STRICT handling.
12892 (convert_for_assignment): Fix handling of pmfs.
12893
12894 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
12895
12896 * typeck.c (comp_target_types): Handle references like pointers.
12897 (comp_target_parms): Note that return code from comp_target_types
12898 can be negative to indicate failure.
12899
12900 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12901
12902 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12903 which requires a working target compiler to build.
12904
12905 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
12906
12907 * tree.c (avoid_overlap): Add prototype.
12908
12909 * spew.c (num_tokens): Add prototype.
12910 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12911
12912 * search.c (dfs_check_overlap): Add prototype.
12913 (dfs_no_overlap_yet): Likewise.
12914
12915 * pt.c (original_template): Add prototype.
12916 (inline_needs_template_parms): Likewise.
12917 (push_inline_template_parms_recursive): Likewise.
12918 (retrieve_specialization, register_specialization): Likewise.
12919 (print_candidates, reduce_template_parm_level): Likewise.
12920 (build_template_decl, mark_template_parm): Likewise.
12921 (tsubst_friend_function, get_bindings_real): Likewise.
12922
12923 * method.c (start_squangling): Add prototype.
12924 (end_squangling, check_ktype, issue_ktype): Likewise.
12925 (build_overloaded_scope_ref, check_btype): Likewise.
12926 (build_mangled_template_parm_index): Likewise.
12927
12928 * lex.c (init_cpp_parse): Add prototype.
12929 (handle_cp_pragma, handle_sysv_pragma): Likewise.
12930 (reduce_cmp, token_cmp): Likewise.
12931
12932 * except.c (call_eh_info): Add prototype.
12933 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12934 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12935
12936 * decl2.c (is_namespace_ancestor): Add prototype.
12937 (namespace_ancestor, add_using_namespace): Likewise.
12938 (ambiguous_decl): Likewise.
12939
12940 * decl.c (indent): Add prototype.
12941
12942 * call.c (add_template_candidate_real): Add prototype.
12943
12944 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
12945
12946 * decl2.c (build_expr_from_tree): Just return a PMF.
12947
12948 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
12949
12950 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12951 when doing initializations.
12952
12953 * pt.c (unify): Use comptypes to compare type args.
12954
12955 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
12956
12957 * decl.c (duplicate_decls): Fix check for when it's safe to free
12958 the new decl.
12959
12960 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12961 to type_as_string.
12962
12963 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
12964
12965 * pt.c (build_template_parm_index): Add prototype.
12966
12967 * search.c (my_tree_cons): Don't clear words outside the
12968 newly allocated node.
12969
12970 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
12971
12972 * lex.c (init_parse): Now returns char* containing the filename.
12973
12974 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
12975 Jeff Law <law@cygnus.com>
12976
12977 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
12978 than a pointer.
12979
12980 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12981
12982 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
12983
12984 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
12985
12986 * decl.c (duplicate_decls): Don't warn for redundant decls if
12987 friend: let add_friend take care of it.
12988
12989 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12990
12991 * sig.c (build_signature_pointer_constructor): Don't set
12992 TREE_HAS_CONSTRUCTOR for a signature pointer.
12993 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
12994 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
12995 here, too.
12996 * typeck.c (build_unary_op): Only allow taking the address of a
12997 real constructor.
12998 * typeck2.c (digest_init): Simplify.
12999 (store_init_value): Don't pedwarn about using { } for pmfs.
13000
13001 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13002
13003 * cp-tree.h (start_decl): Update prototype.
13004 * decl.c (start_decl): Like the C version, new parameters
13005 for the attributes. Call cplus_decl_attributes here,
13006 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13007 (grokdeclarator): Pass NULL for new start_decl arguments.
13008 * pt.c (tsubst_expr): Likewise.
13009 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13010 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13011 * lex.c (build_lang_decl): Add lang_name_java.
13012 * class.c (push_lang_context): Add lang_name_java.
13013 * method.c (build_mangled_name): Check for is_java_type.
13014
13015 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13016
13017 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13018 * call.c (build_scoped_method_call): Check for TREE_CODE for
13019 VOID_TYPE instead of type == void_type_node.
13020 (build_method_call): Likewise.
13021 * decl.c (lookup_name_real): Likewise.
13022 (grokdeclarator): Likewise.
13023 (start_decl): Likewise.
13024 (grokparms): Likewise.
13025 (start_function): Likewise.
13026 (finish_function): Likewise.
13027 (start_method): Likewise.
13028
13029 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13030
13031 * lex.c (finput): New variable.
13032 (init_cpp_parse): Renamed from init_parse.
13033 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13034 (finish_parse): New function.
13035 * cp-tree.h (init_lex, init_parse): Remove declarations.
13036
13037 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13038
13039 * call.c (build_call): Still evaluate the actual argument.
13040 * class.c (is_empty_class): Update for -fnew-abi.
13041
13042 * decl2.c: -fnew-abi implies -fsquangle.
13043
13044 * method.c (do_build_assign_ref): Don't do anything to copy
13045 an empty class.
13046 (do_build_copy_constructor): Likewise.
13047 * call.c (build_over_call): Likewise.
13048
13049 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13050
13051 * tree.c (avoid_overlap): Return a value.
13052
13053 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13054
13055 * method.c (check_btype): Add missing argument to xrealloc.
13056 (check_ktype): Likewise.
13057
13058 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13059
13060 Implement empty base optimization.
13061 * class.c (finish_struct_1): Add vbase fields earlier. Set
13062 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13063 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13064 (types_overlap_p): New fn.
13065 * tree.c (avoid_overlap): New fn.
13066 (build_base_fields): Use it to avoid overlapping empty bases.
13067 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13068
13069 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13070
13071 Re-implement allocation of base class subobjects.
13072 * tree.c (unshare_base_binfos): New fn.
13073 (layout_basetypes): Use it. Now handles offsets of both virtual and
13074 non-virtual bases, after layout_type.
13075 (layout_vbasetypes): Remove.
13076 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13077 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13078 * class.c (finish_base_struct): Lose offset handling code.
13079 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13080 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13081 * cp-tree.h: Adjust.
13082
13083 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13084
13085 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13086 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13087 * class.c (duplicate_tag_error): Likewise.
13088 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13089 * tree.c (layout_vbasetypes): Update from layout_record, remove
13090 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13091 (layout_basetypes): Likewise.
13092
13093 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13094
13095 * class.c, Make sure system.h is included just after config.h.
13096 Delete lingering stdio and errno references too.
13097 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13098
13099 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13100
13101 * friend.c (is_friend): Fix access control for local classes.
13102
13103 * class.c (is_empty_class): New fn.
13104 * call.c (build_call): Don't pass empty class objects to a function.
13105
13106 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13107
13108 * call.c (build_over_call): Do name resolution for default
13109 arguments of function templates in the scope of the templates.
13110
13111 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13112
13113 * call.c: Include system.h. Remove includes, declarations and
13114 defines provided by system.h.
13115 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13116 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13117 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13118 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13119 * typeck2.c, xref.c: Likewise.
13120 * Makefile.in: Dependencies updated as appropriate.
13121 * Make-lang.in: Likewise.
13122
13123 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13124
13125 * pt.c (fn_type_unification): Allow incomplete unification without
13126 an immediate error message.
13127
13128 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13129
13130 * tree.c (member_p): New fn.
13131 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13132 initializing class members.
13133
13134 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13135 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13136
13137 * call.c (build_method_call): Handle non-scoped destructors, too.
13138 * pt.c (tsubst_copy): Likewise.
13139
13140 * pt.c (print_template_context): Split out...
13141 (push_tinst_level): ...from here.
13142
13143 * friend.c (is_friend): Don't pass a type to decl_function_context.
13144
13145 * typeck.c (convert_for_initialization): Always hand off
13146 conversions to class type.
13147
13148 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13149
13150 * friend.c (is_friend): Local classes have the same access as the
13151 enclosing function.
13152
13153 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13154
13155 * typeck.c (expand_target_expr): Delete dead function.
13156
13157 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13158
13159 * repo.c (save_string): Delete dead function.
13160
13161 * method.c (thunk_printable_name): Delete dead function.
13162
13163 * lex.c (yynextch): Delete dead function.
13164
13165 * expr.c (tree_extract_aggr_init): #if 0 out.
13166
13167 * except.c (do_unwind): Delete dead function.
13168 (easy_expand_asm): Likewise.
13169
13170 * cvt.c (build_conversion_type_1): Delete dead function.
13171
13172 * cp-tree.h (push_expression_obstack): Declare.
13173
13174 * call.c (source_type): #if 0 out.
13175
13176 * class.c (alter_access): Remove unused label. Add braces
13177 around empty else clause.
13178
13179 * lex.c (yyprint): Fix argument to printf.
13180
13181 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
13182
13183 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13184
13185 * pt.c (instantiate_class_template): Make sure template
13186 arguments are permanent.
13187 * init.c (resolve_offset_ref): Don't go looking around in
13188 template types.
13189
13190 * semantics.c: Add routines to handle expressions, and some
13191 declaration processing.
13192 * parse.y: Use them.
13193 (current_class_depth): Move declaration to cp-tree.h.
13194 * parse.c: Regenerated.
13195 * cp-tree.h: Use them.
13196 (current_class_depth): Declare.
13197 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13198
13199 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
13200
13201 * error.c (dump_decl): Be a bit more explicit with template
13202 type arguments, when verbose.
13203
13204 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13205
13206 * inc/exception: Reorder closing braces.
13207
13208 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
13209
13210 * pt.c (redeclare_class_template): New function.
13211 * cp_tree.h (redeclare_class_template): Declare it.
13212 * decl.c (xref_tag): Use it.
13213
13214 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
13215
13216 * call.c (build_over_call): Check IS_AGGR_TYPE, not
13217 TYPE_LANG_SPECIFIC.
13218 * typeck.c (convert_arguments): Likewise.
13219
13220 * decl.c (grokdeclarator): Remove const and volatile from type after
13221 setting constp and volatilep.
13222
13223 * class.c (finish_struct_1): Don't warn about bool bitfield larger
13224 than one bit.
13225
13226 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
13227
13228 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13229
13230 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
13231
13232 * call.c (build_object_call): Complain about ambiguous operator(),
13233 rather that crashing.
13234 (build_new_op): Likewise.
13235 (build_op_delete_call): Likewise.
13236
13237 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
13238
13239 * cvt.c (perform_qualification_conversions): Use comp_target_types
13240 instead of comp_ptr_ttypes.
13241
13242 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
13243
13244 * cp-tree.h (enforce_access): Declare.
13245 * call.c (enforce_access): Make it extern, not static.
13246 * class.c (alter_access): Use enforce_access; modify code for ISO
13247 compliance, rather than ARM rules.
13248
13249 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13250
13251 * cp-tree.h: Fix typo.
13252
13253 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13254
13255 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13256 if (aggregate_value_p (type)).
13257
13258 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13259
13260 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
13261
13262 * tree.c (mapcar): When dealing with a DECL, use it's constant
13263 value, if any.
13264 * pt.c (lookup_template_class): Don't mangle the names of template
13265 classes whose arguments are unknown.
13266
13267 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13268
13269 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13270
13271 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13272
13273 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
13274
13275 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13276 boolean_type_node to 1.
13277
13278 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
13279
13280 * error.c (dump_expr): Remove unused variable `l'.
13281
13282 * pt.c (for_each_template_parm): New function, created by
13283 converting uses_template_parms.
13284 (tree_fn_t): New typedef.
13285 (uses_template_parms): Use it.
13286 (mark_template_parm): New function.
13287 (push_template_decl): Check that the argument list of a partial
13288 specialization uses all the template parameters.
13289
13290 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13291 with it; we might want it for debugging.
13292 * cp-tree.h (type_unification): Change interface.
13293 * class.c (finish_struct_1): Skip nested template types, just like
13294 ordinary nested types.
13295 (instantiate_type): Use new interface to type_unification.
13296 * lex.c (init_lex): Add __sz as opname for sizeof.
13297 * method.c (build_overload_scope_ref): New function.
13298 (build_overload_int): Handle complex expressions. Set
13299 numeric_output_need_bar if necessary.
13300 (build_overload_value): Handle non-PARM_DECL nodes; this
13301 routine is now used by build_overload_int. Remove some
13302 assignments to numeric_output_need_bar. Use
13303 build_overload_scope_ref.
13304 (build_qualified_name): Note that some template mangled names end
13305 with digits, and set numeric_output_need_bar appropriately. Use
13306 build_underscore_int.
13307 * pt.c (unify): Change interface.
13308 (type_unification_real): Likewise.
13309 (determine_specialization): Use new interfaces.
13310 (tsubst): Deal gracefully with situations in which the argument
13311 vector is not fully filled.
13312 (fn_type_unification): Use new interfaces.
13313 (type_unification): Likewise. Remove NOP_EXPR hack.
13314 (type_unification_real): Likewise.
13315 (unify): Likewise. Deal with unification of complex expressions.
13316
13317 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13318
13319 * pt.c (complete_template_args): Initialize skip properly.
13320
13321 * decl.c (make_typename_type): Revert.
13322 (make_implicit_typename): Remove.
13323 (lookup_name_real): Don't call it. Call lookup_field if we see a
13324 TYPE_DECL from a template base.
13325 * search.c (lookup_field): Do implicit typename stuff.
13326
13327 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
13328 Geoff Noer <noer@cygnus.com>
13329
13330 * Makefile.in: Various fixes for building cygwin32 native toolchains.
13331 * Make-lang.in: Likewise.
13332
13333 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13334
13335 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13336
13337 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
13338
13339 * decl.c (make_implicit_typename): Rewrite removed code.
13340 (make_typename_type): Call it if the type we look up comes from
13341 a base that uses template parms.
13342
13343 * pt.c (complete_template_args): Rewrite.
13344 (tsubst, FUNCTION_DECL): Use it.
13345
13346 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
13347
13348 * semantics.c (finish_asm_stmt): Fix combine strings. Call
13349 c_expand_asm_operands () if output_operands, input_operands or
13350 clobbers is not NULL_TREE.
13351
13352 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13353
13354 * pt.c (complete_template_args): New function.
13355 (get_bindings): Deal with specializations of function templates
13356 with return type containing parameters from outer class
13357 templates.
13358 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13359 substitute arguments and compose a new type.
13360
13361 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
13362
13363 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13364 FUNCTION_DECLs.
13365
13366 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13367
13368 * decl.c (make_implicit_typename): Lose useless code.
13369
13370 * call.c (standard_conversion): Handle A* -> const A* properly.
13371
13372 * pt.c (get_bindings_real): Rename from get_bindings. Add
13373 check_rettype parm.
13374 (get_bindings): Pass 1.
13375 (get_bindings_overload): Pass 0.
13376
13377 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
13378
13379 * pt.c (check_explicit_specialization): When reverting a static
13380 member function, also remove the `this' parameter from
13381 last_function_parms.
13382
13383 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13384
13385 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13386 a function context.
13387
13388 * decl.c (store_bindings): Use free_binding_vecs.
13389 (pop_from_top_level): Likewise.
13390
13391 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
13392
13393 * decl.c (make_implicit_typename): Only change the type of a
13394 TYPENAME_TYPE.
13395
13396 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
13397
13398 * semantics.c: New file, containing routines to perform the
13399 semantic phase of parsing.
13400 * parse.y: Use it.
13401 * pt.c (tsubst_expr): Likewise.
13402 * cp-tree.h: Declare the various functions in semantics.c.
13403 Provide macros to access _STMT tree nodes.
13404 * cp-tree.def: Add ASM_STMT tree node.
13405 * Makefile.in, Make-lang.in: Add dependencies on and for
13406 semantics.c.
13407
13408 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
13409
13410 * pt.c (push_template_decl): Only check primary templates.
13411
13412 * pt.c (check_explicit_specialization): Complain about default args
13413 in explicit specialization.
13414
13415 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13416 constructor_declarator.
13417
13418 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
13419
13420 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13421 has no overloaded operator ->.
13422
13423 * call.c (build_field_call): Don't crash when presented with a
13424 field that is actually a nested type.
13425
13426 * decl.c (pushtag): Deal with friend class injection in local
13427 classes.
13428
13429 * call.c (build_object_call): Don't crash if OBJ is a
13430 pointer-to-member-function.
13431
13432 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13433
13434 * pt.c (push_template_decl): Complain about template with C linkage,
13435 anonymous template class.
13436
13437 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13438
13439 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13440 * search.c: Likewise.
13441
13442 * lex.c (do_pending_defargs): Only call
13443 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13444
13445 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13446
13447 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
13448
13449 * parse.y: Deal with CONSTRUCTORS in new_initializers.
13450
13451 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
13452
13453 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13454 closely mimics the behavior in parse.y.
13455 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13456 into a compound statement.
13457
13458 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13459
13460 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13461 * pt.c (inline_needs_template_parms): New fn.
13462 (original_template): New fn.
13463 (push_inline_template_parms_recursive): New fn.
13464 (maybe_begin_member_template_processing): Use them.
13465 (maybe_end_member_template_processing): Likewise.
13466 (is_member_or_friend_template): Rename to is_member_template.
13467 Member functions of local classes are never member templates.
13468
13469 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13470
13471 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13472 added in the class scope to catch redefinition error.
13473
13474 * pt.c (reduce_template_parm_level): Also copy
13475 the DECL_TEMPLATE_PARMS field.
13476
13477 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
13478
13479 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13480 reduced-level template type parameter.
13481
13482 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
13483
13484 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13485 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13486 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13487 * decl.c (duplicate_decls): Propagate it.
13488 * typeck2.c (abstract_virtuals_error): Use two loops to emit
13489 abstract virtual functions and virtual functions which need a
13490 final overrider separately.
13491
13492 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
13493
13494 * lang-specs.h: Properly put brackets around array elements in
13495 initializer.
13496
13497 * typeck.c (build_binary_op_nodefault): Correctly place parens around
13498 && and || in expression.
13499
13500 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
13501
13502 * call.c (default_parm_conversions): Remove prototype definition.
13503 (build_method_call): Remove unused variable result.
13504
13505 * cvt.c (ocp_convert): Remove unused variable conversion.
13506
13507 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13508
13509 * except.c (do_unwind): #if 0 definition of unused variables fcall
13510 and next_pc.
13511
13512 * expr.c (extract_scalar_init): #if 0 prototype and function
13513 definition.
13514
13515 * init.c (expand_aggr_init_1): Remove unused variable init_type.
13516 (build_new_1): Remove unused variable t.
13517
13518 * pt.c (instantiate_class_template): Remove unused variable newtag;
13519 cast called function return value to void.
13520 (do_decl_instantiation): Remove unused variables name and fn.
13521
13522 * tree.c (get_type_decl): Add default return to shut up compiler from
13523 complaining control reaches end of non-void function.
13524
13525 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13526
13527 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
13528
13529 * call.c (default_parm_conversions): Remove prototype definition.
13530 (build_method_call): Remove unused variable result.
13531 (build_over_call): Add default case in enumeration switch.
13532
13533 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
13534
13535 * decl2.c (lang_decode_option): Change j's type to size_t.
13536
13537 * tree.c (layout_vbasetypes): record_align and desired_align are of
13538 type unsigned int; const_size and nonvirtual_const_size likewise.
13539
13540 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
13541
13542 * parse.y (new_initializer): Make sure all initializers are
13543 lists.
13544
13545 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
13546
13547 * decl2.c (import_export_decl): Mark tinfo functions for
13548 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
13549
13550 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
13551
13552 * method.c: Fix typo.
13553
13554 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13555
13556 * method.c: Include "system.h" to get stdlib.h, stdio.h,
13557 ctype.h, string.h, etc.
13558 (issue_nrepeats): Add default case in enumeration switch.
13559 (check_btype): Likewise.
13560 (process_overload_item): Likewise.
13561
13562 * Makefile.in (method.o): Depend on system.h.
13563
13564 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13565
13566 * lex.c (do_scoped_id): Fix parenthesizing.
13567
13568 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
13569
13570 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
13571 FLAG_RTTI is unset, initialize type info machinery and continue
13572 with FLAG_RTTI enabled.
13573 (get_typeid): Likewise.
13574
13575 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
13576
13577 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
13578 from B.
13579
13580 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
13581
13582 * pt.c (finish_member_template_decl): Deal more gracefully with
13583 invalid declarations.
13584
13585 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
13586
13587 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
13588 cp-tree.h: Clean up more old overloading code, old RTTI code, and
13589 some formatting quirks.
13590
13591 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
13592 method.c, pt.c, ptree.c, typeck.c: Remove support for
13593 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
13594 * class.h: Remove.
13595 * Makefile.in: Adjust.
13596
13597 * pt.c (unify): Don't allow reduced cv-quals when strict.
13598
13599 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
13600 *type_unification* and unify.
13601
13602 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13603
13604 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
13605 (nested_name_specifier): And add it before this use.
13606 (typename_sub0): And this use. Also add use without the keyword.
13607 (typename_sub1): Likewise.
13608 * pt.c (instantiate_class_template): Don't actually instantiate
13609 anything if our type uses template parms.
13610
13611 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
13612
13613 * decl.c (start_function): Don't call temporary_allocation for a
13614 nested function.
13615
13616 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13617
13618 * pt.c (instantiate_class_template): Don't mess with friends if
13619 our type uses template parms.
13620
13621 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
13622
13623 * parse.y (nested_name_specifier): Use explicit_template_type.
13624 (typename_sub): Allow a template_type, an explicit_template_type,
13625 or an implicit template type at the end.
13626 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
13627 * decl.c (make_typename_type): Handle template-id where the name
13628 is a TEMPLATE_DECL.
13629 * call.c (build_scoped_method_call): Handle member template
13630 destructor call.
13631 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
13632 destructor is represented by the type.
13633
13634 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
13635 * parse.y (nested_name_specifier): Add 'template' case.
13636 (explicit_template_type): New rule.
13637 (typename_sub): Use it.
13638 * decl.c (make_typename_type): Handle getting a template-id for NAME.
13639 * pt.c (tsubst): Likewise.
13640
13641 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13642
13643 * pt.c (add_to_template_args): Fix thinko.
13644 (instantiate_class_template): Call it later.
13645
13646 * pt.c (get_class_bindings): Add outer_args parm.
13647 (most_specialized_class): Likewise.
13648 (instantiate_class_template): Pass it.
13649 (more_specialized_class): Likewise.
13650 (lookup_template_class): Get context from template if none
13651 was specified.
13652 (finish_member_template_decl): Don't do anything with a
13653 partial specialization.
13654 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
13655 AGGREGATE_TYPE_P.
13656 * class.c (finish_struct): Member class templates have already been
13657 checked for name clashes.
13658 * decl.c (pushdecl_with_scope): Handle pushing at class level.
13659
13660 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
13661
13662 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
13663 (tsubst, *_PARM): Support multiple levels of template classes.
13664 (instantiate_class_template): Look up the pattern from the
13665 original template.
13666 (lookup_template_class): Handle getting a template for d1.
13667 (push_template_decl): Correct setting of 'primary'.
13668 (reduce_template_parm_level): Add 'levels' parm.
13669 (finish_member_template_decl): Support member class templates.
13670 (template_class_depth): Handle multiple levels.
13671 * parse.y (component_decl_1, fn.def2): Remove member template case.
13672 (component_decl): Add member template cases.
13673 * decl2.c (check_member_template): We now handle member template
13674 classes.
13675 * decl.c (pushtag): Handle member templates.
13676 * method.c (do_inline_function_hair): Don't touch
13677 IDENTIFIER_GLOBAL_VALUE.
13678 * init.c (build_offset_ref): If name isn't an identifier, just
13679 return it.
13680 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
13681
13682 * typeck.c (get_delta_difference): Do adjust for conversions to
13683 and from virtual base.
13684
13685 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
13686
13687 * typeck.c (get_delta_difference): Give hard error for conversion
13688 from virtual base.
13689
13690 * cp-tree.h: Tweak formatting.
13691
13692 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
13693
13694 * decl.c (push_namespace): Handle redeclaration error.
13695
13696 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
13697 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
13698 (NAMESPACE_BINDING): New macro.
13699 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
13700 * *.c: Use them.
13701
13702 * pt.c (push_template_decl): Use innermost_args.
13703
13704 * decl.c (get_unique_name): Tweak from earlier in the name.
13705
13706 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
13707
13708 * cp-tree.def: Add CPLUS_BINDING node.
13709 * cp-tree.h (tree_binding): New struct.
13710 (BINDING_SCOPE, BINDING_VALUE): New macros.
13711 (current_namespace, global_namespace): Declare extern.
13712 (struct lang_decl_flags): New field in_namespace.
13713 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
13714 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
13715 (TREE_INDIRECT_USING): New macro.
13716 * decl2.c (current_namespace, global_namespace): Declare. The
13717 value is a NAMESPACE_DECL now, not a TREE_LIST.
13718 (is_namespace_ancestor, namespace_ancestor): New static functions.
13719 (add_using_namespace, ambiguous_decl): Likewise.
13720 (lookup_using_namespace): New support function for lookup_name.
13721 (qualified_lookup_using_namespace): New support function for
13722 do_scoped_id and lookup_namespace_name.
13723 (get_namespace_id): Mark as obsolete.
13724 (current_namespace_id): Likewise.
13725 (do_namespace_alias): Implement.
13726 (do_using_directive): Implement as call to add_using_namespace.
13727 * decl.c (binding_for_name): New function.
13728 (push_namespace, pop_namespace): Implement.
13729 (push_decl): Don't install a FUNCTION_DECL in the global branch.
13730 (lookup_namespace_name): Implement using qualified lookup.
13731 (lookup_name_real): For global scoping, lookup in
13732 global_namespace. For namespace scoping, lookup in given
13733 namespace. For unscoped lookup, iterate over namespace,
13734 considering using directives.
13735 (init_decl_processing): Initialize global_namespace.
13736 (grokvardecl): Build assembler name as static name for globals.
13737 (grokdeclarator): Remove old namespace mangling.
13738 (xref_tag): When installing a global binding for the
13739 tag, make sure we have an identifier.
13740 * method.c (build_overload_nested_name): Mangle namespaces.
13741 (build_qualified_name): Likewise.
13742 (build_decl_overload_real): Likewise.
13743 * lex.c (build_lang_decl): Set namespace for new declaration to
13744 current_namespace.
13745 (do_scoped_id): Find global names in global or current
13746 namespace, or using qualified namespace lookup, depending on
13747 context.
13748 * init.c (build_member_call): When scope is namespace, use
13749 build_x_function_call instead.
13750 (build_offset_ref): When scope is namespace, collapse processing
13751 to lookup_namespace_name instead.
13752 * error.c (dump_decl): Support NAMESPACE_DECL.
13753 * decl.c (pushdecl): Bind globals to current namespace.
13754 (push_overloaded_decl): Likewise.
13755 (lookup_tag): Likewise.
13756 (lookup_name_current_level): Likewise.
13757 (xref_tag): Likewise.
13758 (start_function): Likewise.
13759 * lex.c (do_identifier): Likewise.
13760 (identifier_typedecl_value): Likewise.
13761 (real_yylex): Likewise.
13762 * method.c (do_inline_function_hair): Likewise.
13763 * parse.y (unscoped): Likewise.
13764 * pt.c (check_explicit_specialization): Likewise.
13765 (lookup_template_class): Likewise.
13766 * rtti.c (call_void_fn): Likewise.
13767 * sig.c (build_sigtable): Likewise.
13768 * ptree.c (lang_print_xnode): New function.
13769
13770 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
13771
13772 * pt.c (instantiate_class_template): Don't instantiate if pedantic
13773 and the args use template parms.
13774
13775 * pt.c (push_tinst_level): If the instantiation uses template parms,
13776 fail silently.
13777 * decl.c (xref_basetypes): Do call complete_type for basetypes
13778 that involve template parameters.
13779
13780 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
13781
13782 * typeck2.c (process_init_constructor): Fix labeled init check.
13783
13784 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
13785
13786 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
13787 argument to tsubst and friends.
13788
13789 * pt.c (tsubst, FUNCTION_DECL): Tidy.
13790
13791 * typeck.c (build_x_function_call): Handle static member function
13792 templates like non-templates. Handle friend templates like normal
13793 function templates.
13794 * pt.c (tsubst, *_PARM): Don't use orig_level.
13795 (get_bindings): Don't call add_to_template_args.
13796 (instantiate_template): Likewise.
13797 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
13798 * ptree.c (print_lang_type): Print index/level for template parms.
13799
13800 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
13801
13802 * Make-lang.in (cc1plus): Note that cc1plus depends on
13803 cp/cp-tree.h and cp/cp-tree.def.
13804
13805 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
13806 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
13807 position in a template parameter list.
13808 * cp-tree.h (template_parm_index): New structure, used as the tree
13809 structure for a TEMPLATE_PARM_INDEX.
13810 (TEMPLATE_PARM_IDX): New macro.
13811 (TEMPLATE_PARM_LEVEL): Likewise.
13812 (TEMPLATE_PARM_DESCENDANTS): Likewise.
13813 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
13814 (TEMPLATE_PARM_DECL): Likewise.
13815 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13816 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
13817 (TEMPLATE_TYPE_DECL): Likewise.
13818 (TEMPLATE_CONST_IDX): Remove.
13819 (TEMPLATE_CONST_LEVEL): Likewise.
13820 (TEMPLATE_CONST_SET_INFO): Likewise.
13821 (TEMPLATE_TYPE_SET_INFO): Likewise.
13822 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
13823 node.
13824 (TEMPLATE_TYPE_LEVEL): Likewise.
13825 * decl.c (decls_match): Call comp_template_parms, rather than
13826 expanding it inline.
13827 (duplicate_decls): If two template declarations are being merged,
13828 then their TEMPLATE_INFOs should be merged as well.
13829 (grokfndecl): Save template-id information when declaring a friend
13830 with explicit template arguments. Pass arguments to
13831 check_explicit_specialization via correct convention; at some
13832 point check_explicit_specialization changed, but these call-sites
13833 did not.
13834 (grokdeclarator): Tidy up slightly.
13835 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
13836 two template functions with the same DECL_ASSEMBLER_NAME the same,
13837 since the names are not yet mangled.
13838 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
13839 TEMPLATE_CONST_PARM.
13840 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
13841 decl for a non-type parameter, rather than printing `<tparm ...>'.
13842 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
13843 (do_friend): Deal with template friends.
13844 * lex.c (do_pending_inlines): Call
13845 maybe_begin_member_template_processing, rather than
13846 conditionally calling begin_member_template_processing.
13847 (process_next_inline): Likewise. Call
13848 maybe_end_member_template_processing, rather than
13849 conditionally calling end_member_template_processing.
13850 (do_pending_defargs): Likewise.
13851 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
13852 TEMPLATE_CONST_PARM.
13853 * method.c (build_mangled_template_parm_index): New function.
13854 (build_overload_value): Use it.
13855 (build_overload_name): Likewise.
13856 * pt.c (finish_member_template_decl): Allow friend declarations.
13857 (template_class_depth): New function.
13858 (is_member_template): Rename, and modify, to become...
13859 (is_member_or_friend_template): New function.
13860 (end_member_template_processing): Rename, and modify, to become...
13861 (maybe_end_member_template_processing).
13862 (build_template_parm_index): New function.
13863 (reduce_template_parm_level): New function.
13864 (process_template_parm): Modify to use build_template_parm_index.
13865 (push_template_decl): Deal with friend templates.
13866 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13867 TEMPLATE_CONST_PARM.
13868 (tsubst_friend_function): New function.
13869 (instantiate_class_template): Generate the DECL_FRIENDLIST
13870 for a new instantiation by using tsubst_friend_function rather
13871 than just tsubst.
13872 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13873 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13874 appropriate new macros. Use reduce_template_parm_level to
13875 generate lower-level template parameters. Handle tsubst'ing into
13876 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
13877 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13878 templates. Similarly for the template parameters for a new
13879 template.
13880 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
13881 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
13882 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13883 (get_bindings): Call add_to_template_args if necessary.
13884 (instantiate_decl): Handle instantiations of friend templates.
13885 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13886 TEMPLATE_TYPE_PARM as a list of fields; it's not!
13887 * spew.c (yylex): Do a little manual constant propagation to
13888 clarify the code.
13889
13890 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
13891
13892 * error.c: Include sys/types.h.
13893
13894 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
13895
13896 * method.c (build_mangled_name): Start CPP directives in column zero.
13897
13898 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13899
13900 * typeck2.c (process_init_constructor): Sorry about non-trivial
13901 labeled initializers.
13902 * parse.y (initlist): Re-enable labeled initializers.
13903
13904 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13905
13906 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13907 all callers changed. Rely on the new parameter instead of arg
13908 being a TREE_LIST when determine whether we are working inside
13909 template template parameter. Clean up is_type test.
13910
13911 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13912
13913 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13914 * typeck2.c (initializer_constant_valid_p): Allow conversions
13915 between pointers and references.
13916
13917 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
13918
13919 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13920 if pedantic || warn_pointer_arith.
13921
13922 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13923
13924 * pt.c (unify): Handle TEMPLATE_DECL.
13925
13926 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
13927
13928 * cp-tree.h (strip_attrs): Remove decl.
13929
13930 1998-02-18 Doug Evans <devans@cygnus.com>
13931
13932 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13933 Update olddecl's attributes too.
13934 (strip_attrs): Remove function.
13935 * typeck.c (common_type): Call merge_machine_type_attributes.
13936
13937 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
13938
13939 * parse.y (initdcl0_innards): New grammar symbol.
13940 (nomods_initdecls, nomods_initdcl0): Change type from itype to
13941 none, since the resulting value is never used.
13942 (parse_decl): New function.
13943 (datadef): Remove redundant actions.
13944 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13945 * parse.c: Regenerated.
13946
13947 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
13948
13949 * parse.y (simple_stmt): Use getdecls() to check for decl.
13950
13951 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
13952
13953 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13954 macros.
13955 (c++.install-common): Install c++filt properly as native or as cross
13956 variant.
13957 (c++.uninstall): Add c++filt.
13958
13959 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13960
13961 * call.c (standard_conversion): Fix multi-level ptr conversions.
13962
13963 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
13964
13965 * init.c (build_new): Propagate error_mark_node up.
13966
13967 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
13968
13969 * parse.y (simple_stmt): If the condition isn't a declaration,
13970 start the controlled block after the test.
13971
13972 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13973
13974 * call.c (build_over_call): Convert builtin abs, labs and fabs to
13975 tree-codes.
13976 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
13977 builtins.
13978
13979 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13980
13981 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
13982
13983 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13984
13985 * cp-tree.h: Add access_protected_virtual_node.
13986 * class.c (init_class_processing): Initialize it.
13987 * decl.c (xref_basetypes): Use it.
13988 * parse.y (base_class_access_list): Likewise.
13989
13990 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
13991 (c++.install-common): Install c++filt.
13992
13993 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13994
13995 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
13996
13997 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
13998
13999 * call.c (reference_binding): Use comptypes when comparing
14000 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14001
14002 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14003
14004 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14005 (really_overloaded_fn): Move check here from is_overloaded_fn.
14006 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14007
14008 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14009
14010 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14011 conversions.
14012
14013 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14014
14015 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14016 equivalent duplicate.
14017 * decl.c (pushtag): Use the return value from push_template_decl.
14018 (duplicate_decls): When duplicating a template declaration, merge
14019 the DECL_TEMPLATE_RESULTs as well.
14020 (make_implicit_typename): Don't try to dive into typename types to
14021 find a context for making a new implicit typename.
14022 (start_decl): Use the return value from push_template_decl.
14023 (grokdeclarator): Complain about declarations list `const operator
14024 int'. Since we don't correctly handle in-class initializations of
14025 non-static data members, complain about this (now illegal)
14026 practice. Issue an error for initializations of non-const statics
14027 since that is illegal as well, and since we don't handle that case
14028 correctly either.
14029 (start_function): Use the return value from push_template_decl.
14030 (start_method): Likewise.
14031 * decl2.c (grokfield): Likewise. Since the change to
14032 grokdeclarator ensures that all initialized fields are in fact
14033 static, remove a redundant test for TREE_PUBLIC.
14034 * parse.y (initlist): Disable labeled initializers since they do
14035 not work as per the documentation, and since they do not use the
14036 same syntax as the C front end.
14037 * pt.c (push_template_decl): Return the decl passed in, or an
14038 equivalent duplicate.
14039 (lookup_template_class): When searching in a nested context,
14040 use the right arguments.
14041 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14042 * typeck.c (build_component_ref): Assign the correct type to the
14043 result of build_vfn_ref.
14044
14045 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14046
14047 * pt.c (convert_nontype_argument): Fix typo.
14048 (check_explicit_specialization): Allow old-style specialization
14049 of class template members.
14050
14051 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14052 Manfred Hollstein <manfred@s-direktnet.de>
14053
14054 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14055 when deciding to override DECL_ASSEMBLER_NAME.
14056
14057 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14058
14059 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14060 * cp-tree.h (flag_do_squangling): Add declaration.
14061 * lang-options.h: Add -fsquangle and -fno-squangle.
14062 * method.c: Add macros and static variables for squangling.
14063 (build_overload_name): Rename to build_mangled_name, add logic for B
14064 compression, and split into process_modifiers and
14065 process_overload_item.
14066 (process_modifiers): New function, to handle constant, reference,
14067 and pointer types.
14068 (process_overload_item): New function, handles issue of type codes.
14069 (build_overload_name): New function, start squangling and call
14070 build_mangled_name.
14071 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14072 (start_squangling): New function to initialize squangling structs.
14073 (end_squangling): New function to destroy squangling structs.
14074 (nrepeats): Rename variable to Nrepeats.
14075 (issue_nrepeats): New function for issuing 'n' type repeats.
14076 (check_ktype): New function to check for type K name compression.
14077 (build_overload_nested_name): Add a check for K name compression.
14078 (build_qualified_name): Add a check for K name compression and don't
14079 use DECL_ASSEMBLER_NAME when squangling is on.
14080 (check_btype): New function, checks for B type compression.
14081 (build_static_name, build_decl_overload_real): Initiate squangling.
14082 (build_typename_overload, build_overload_with_type): Initiate
14083 squangling
14084
14085 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14086
14087 * method.c (make_thunk): Avoid name buffer overflow.
14088
14089 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14090
14091 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14092 don't define them yet.
14093
14094 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14095
14096 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14097
14098 * config-lang.in (diff_excludes): Use basename only.
14099
14100 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14101
14102 * tinfo2.cc: Add tinfo for signed char.
14103
14104 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14105
14106 * search.c (compute_access): Handle protected constructors in derived
14107 classes as accessible.
14108
14109 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14110
14111 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14112 Call convert_from_reference sooner.
14113
14114 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14115
14116 * cvt.c (ocp_convert): Obtain the constant values from constant
14117 decls even if the destination type is the same as the type of the
14118 decl.
14119
14120 * decl2.c (finish_file): Make sure that static inlines with
14121 definitions are not marked DECL_EXTERNAL before returning.
14122
14123 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14124
14125 * decl.c: Lose arg_looking_for_template.
14126 (lookup_name_real): Likewise.
14127 * parse.y: Lose processing_template_arg, template_arg1.
14128 (primary): Likewise.
14129 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14130
14131 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14132
14133 * error.c (dump_decl): Fix type of default arguments for template
14134 template parameters and nontype template parameters.
14135 * parse.y (template_parm): Handle invalid default template
14136 template arguments here.
14137
14138 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14139 for default template template argument.
14140 * pt.c (coerce_template_parms): Merge default template argument
14141 codes. Can treat RECORD_TYPE as template name if it is implicitly
14142 created. Fix argument index in error message.
14143 * typeck.c (comptypes): Merge template argument comparison codes in
14144 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14145
14146 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14147
14148 * lex.c (file_name_nondirectory): Also check for '/'.
14149
14150 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14151
14152 * parse.y (primary): Deal with statement-expressions in
14153 templates.
14154 * pt.c (tsubst_copy): Handle BIND_EXPR.
14155 * tree.c (mapcar): Likewise.
14156
14157 * call.c (add_template_candidate_real): Pass extra parameter to
14158 fn_type_unification.
14159 * cp-tree.h (fn_type_unification): Add parameter.
14160 * pt.c (fn_type_unification): Add additional parameter to deal with
14161 static member functions.
14162 (get_bindings): Deal with static member functions.
14163
14164 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14165 (revert_static_member_fn): Declare.
14166 * decl.c (revert_static_member_fn): Remove declaration. Change
14167 linkage from internal to external.
14168 (cp_finish_decl): Deal with virtual functions in classes local to
14169 template functions.
14170 * decl2.c (finish_file): Don't forget to emit increment/decrement
14171 expressions in initializers for file-scope variables.
14172 * parse.y (typename_sub2): If the typename doesn't names a
14173 template, rather than a type, issue an error message.
14174 * pt.c (check_explicit_specialization): Handle specializations of
14175 static member functions.
14176 (coerce_template_parms): Handle offset references to lists of
14177 member functions.
14178 * search.c (note_debug_info_needed): Don't crash when handed a
14179 type which is being defined.
14180 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14181 that can happen with some illegal code.
14182
14183 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14184
14185 * call.c (user_harshness): Initialize `code' to 0.
14186 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14187 (null_ptr_cst_p): Add parentheses around && within ||.
14188 (standard_conversion): Likewise.
14189 (z_candidate): Likewise.
14190 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14191 (build_object_call): Likewise for `mem_args'.
14192 (build_new_op): Likewise for `mem_arglist'. Add `return' from
14193 default case in enumeration switch.
14194
14195 * class.c (build_vtable_entry): Add explicit braces to avoid
14196 ambiguous `else'.
14197 (build_class_init_list): Likewise.
14198 (finish_struct_1): Initialize `width' to 0.
14199 (instantiate_type): Initialize `name' to NULL_TREE. Add
14200 explicit braces to avoid ambiguous `else'.
14201
14202 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14203 `else'.
14204
14205 * decl.c (grok_reference_init): Eliminate unused parameter, all
14206 callers changed.
14207 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14208 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14209 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14210 (grokdeclarator): Add parentheses around && within ||. Add
14211 explicit braces to avoid ambiguous `else'.
14212 (grokparms): Initialize `type' to NULL_TREE.
14213 (xref_tag): Remove unused label `just_return'.
14214 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14215 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14216 (hack_incomplete_structures): Add parentheses around assignment
14217 used as truth value.
14218
14219 * decl2.c (coerce_delete_type): Hide definition of `e3'.
14220
14221 * error.c: Include <stdlib.h>.
14222 (dump_expr): Change the type of `i' to size_t. Remove unused
14223 label `error'.
14224
14225 * except.c (init_exception_processing): Remove unused variable `d'.
14226 (expand_throw): Likewise for `label'.
14227
14228 * friend.c (add_friends): Add explicit braces to avoid ambiguous
14229 `else'.
14230
14231 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14232 (sort_base_init): Likewise for `binfo'.
14233 (expand_member_init): Likewise for `rval'.
14234 (build_member_call): Add parentheses around assignment used as
14235 truth value.
14236 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14237 (build_new): Initialize `nelts' to NULL_TREE. Initialize
14238 `old_immediate_size_expand' to 0.
14239 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14240 (build_vec_delete_1): Remove unused variable `block'.
14241 (expand_vec_init): Initialize `itype' to NULL_TREE.
14242
14243 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
14244 declaration of `index' and `rindex' with autoconf macros.
14245 (reinit_parse_for_expr): Remove unused variables
14246 `look_for_semicolon' and `look_for_lbrac'.
14247 (cons_up_default_function): Initialize `args' to NULL_TREE.
14248 (readescape): Initialize `firstdig' to 0.
14249 (real_yylex): Add parentheses around assignment used as truth value.
14250
14251 * method.c: Include <strings.h> if we don't have <string.h>.
14252 Protect declaration of `index' with autoconf macro.
14253
14254 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14255 Initialize `type' to NULL_TREE.
14256 (structsp): Remove unused variable `id'.
14257
14258 * pt.c (coerce_template_parms): Add explicit braces to avoid
14259 ambiguous `else'.
14260 (lookup_template_class): Initialize `template' to NULL_TREE.
14261 (instantiate_class_template): Remove unused variable `name' and `e'.
14262 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
14263 (do_poplevel): Initialize `saved_warn_unused' to 0.
14264 (type_unification): Remove unused varable `parm'.
14265 (unify): Likewise for `j'.
14266
14267 * repo.c (init_repo): Add parentheses around assignment used as
14268 truth value.
14269 (finish_repo): Remove unused varable `p'.
14270
14271 * search.c (get_binfo): Initialize `type' to NULL_TREE.
14272 (get_base_distance): Likewise.
14273 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14274 and `new_v' to NULL_TREE.
14275 (lookup_fnfields): Likewise for `rval_binfo_h'.
14276 (breadth_first_search): Add parentheses around assignment used as
14277 truth value.
14278 (get_template_base): Initialize `type' to NULL_TREE.
14279
14280 * sig.c (append_signature_fields): Initialize `last_mfptr' to
14281 NULL_TREE.
14282 (build_signature_table_constructor): Likewise for
14283 `last_rhs_field', `pfn' and `vt_off'.
14284 (build_sigtable): Likewise for `init'.
14285
14286 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14287 (propagate_binfo_offsets): Likewise for `delta'.
14288 (hash_tree_cons): Initialize hashcode to 0.
14289 (can_free): Likewise for `size'.
14290 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14291
14292 * typeck.c (convert_sequence): Hide prototype.
14293 (common_type): Add explicit braces to avoid ambiguous `else'.
14294 (comp_target_types): Likewise.
14295 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14296 (build_function_call_real): Add explicit braces to avoid ambiguous
14297 `else'.
14298 (convert_arguments): Initialize `called_thing' to 0.
14299 (convert_for_initialization): Initialize `savew' and `savee' to 0.
14300
14301 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14302 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14303 (build_x_arrow): Likewise for `last_rval'.
14304
14305 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14306
14307 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
14308
14309 * decl.c (init_decl_processing): Use set_sizetype.
14310 * decl2.c (sizetype): Don't declare.
14311 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14312 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14313 (build_component_addr, unary_complex_lvalue): Likewise.
14314 * rtti.c (expand_class_desc): Likewise.
14315 * class.c (get_vfield_offset): Likewise.
14316
14317 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
14318
14319 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14320 early to avoid bogus error. Handle overloaded function
14321 names provided as template arguments correctly.
14322 (coerce_template_parms): Don't mishandle overloaded functions when
14323 dealing with template template parameters.
14324 (lookup_template_class): Issue an error message, rather than
14325 crashing, when the TYPE_DECL provided is not a template type.
14326
14327 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14328
14329 * class.c (instantiate_type): Don't just return a known type if
14330 it's wrong.
14331
14332 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
14333
14334 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14335 since that code could never be reached.
14336
14337 * error.c (dump_decl): Avoid aborting in the midst of printing an
14338 error message about an illegal template declaration.
14339
14340 * parse.y (structsp): Print an error message, rather than crashing,
14341 when a class-head does not name a class.
14342
14343 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
14344 template arguments as a g++ extension.
14345
14346 * cp-tree.def (ALIGNOF_EXPR): New tree code.
14347 * decl2.c (grok_alignof): If processing_template_decl, just store
14348 the expression.
14349 * typeck.c (c_alignof): Likewise.
14350 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14351 * error.c (dump_expr): Likewise.
14352 * pt.c (tsubst_copy): Likewise.
14353 * tree.c (cp_tree_equal): Likewise.
14354 * pt.c (uses_template_parms): Correctly determine whether or not a
14355 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14356 folding can be done.
14357
14358 * cp-tree.h (grok_enum_decls): Remove type parameter.
14359 * decl.c (grok_enum_decls): Likewise.
14360 * decl2.c (grok_x_components): Call grok_enum_decls
14361 unconditionally, since it will do nothing if there is no
14362 current_local_enum. Use the new calling sequence.
14363 * pt.c (tsubst_enum): Use the new calling sequence for
14364 grok_enum_decls.
14365
14366 * decl.c (start_function): Make member functions of local classes
14367 in extern inline functions have comdat linkage here...
14368 (grokdeclarator): Rather than here.
14369
14370 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
14371
14372 * pt.c (convert_nontype_argument): Use decl_constant_value.
14373
14374 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
14375
14376 * call.c (add_template_candidate_real): New function.
14377 (add_template_candidate): Use it.
14378 (add_template_conv_candidate): Likewise.
14379 (joust): Pass extra argument to more_specialized.
14380 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14381 (is_local_class): Remove.
14382 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14383 * cp-tree.h (is_local_class): Remove.
14384 (perform_array_to_pointer_conversion): Likewise.
14385 (finish_member_template_decl): Add.
14386 (check_explicit_specialization): Return a tree, not an int.
14387 (more_specialized): Take additional argument.
14388 (get_bindings): Likewise.
14389 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14390 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14391 (perform_array_to_pointer_conversion): Remove.
14392 * decl.c (saved_scope): Add processing_specialization,
14393 processing_explicit_instantiation fields.
14394 (maybe_push_to_top_level): Save them.
14395 (pop_from_top_level): Restore them.
14396 (grokfndecl): Use new return value from
14397 check_explicit_specialization.
14398 (start_decl): Don't check flag_guiding_decls before pushing
14399 decls.
14400 (cp_finish_decl): Remove previous (bogus) change.
14401 (grok_declarator): Use decl_function_context rather than
14402 is_local_class.
14403 * decl2.c (finish_file): Pass extra argument to get_bindings.
14404 (build_expr_from_tree): Let build_x_component_ref check
14405 validity of arguments rather than doing it here.
14406 * lex.c (cons_up_default_function): Remove code fooling with
14407 processing_specialization, processing_explicit_instantiation
14408 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14409 * method.c (build_overload_identifier): Mangle local classes in
14410 template functions correctly.
14411 * parse.y (finish_member_template_decl): Move to pt.c.
14412 * pt.c (finish_member_template_decl): Moved here from parse.y.
14413 (print_candidates): New function.
14414 (determine_specialization): Change interface. Properly look for
14415 most specialized versions of template candidates.
14416 (check_explicit_specialization): Fully process explicit
14417 instantiations.
14418 (push_template_decl): Avoid looking at CLASSTYPE fields in
14419 FUNCTION_DECLS.
14420 (determine_overloaded_function): Remove.
14421 (convert_nontype_argument): Change name from
14422 convert_nontype_parameter. Use determine_overloaded_function
14423 instead of instantiate_type.
14424 (mangle_class_name_for_template): Handle type contexts as well as
14425 function contexts.
14426 (classtype_mangled_name): Likewise.
14427 (lookup_template_class): Likewise.
14428 (tsubst): Likewise.
14429 (more_specialized): Take explict template arguments as a
14430 parameter.
14431 (most_specialized): Likewise.
14432 (get_bindings): Likewise. Check that return types match before
14433 proclaiming a function a match.
14434 (do_decl_instantiation): Remove code searching for function to
14435 instantiate; that is now done in check_explicit_specialization.
14436 (add_maybe_template): Pass extra argument to get_bindings.
14437 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14438 implementation.
14439 * typeck.c (build_component_ref): Check for invalid arguments.
14440
14441 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
14442
14443 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14444 return_target and call_target are equivalent.
14445
14446 * pt.c (type_unification_real): Just accept function parms that
14447 don't use any template parms.
14448
14449 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
14450
14451 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14452 unset DECL_NOT_REALLY_EXTERN.
14453
14454 * parse.y (typename_sub*): Fix std::.
14455
14456 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14457
14458 * error.c (dump_decl): Fix type default template args.
14459 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14460
14461 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
14462
14463 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14464 (file_name_nondirectory): Use.
14465
14466 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14467
14468 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14469 that are not really present. Substitute default arguments in
14470 template template arguments. Correctly convert TEMPLATE_DECL to
14471 TEMPLATE_TEMPLATE_PARM.
14472 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14473 are no longer treated specially here.
14474 * parse.y (template_template_parm): Fix copy error.
14475 * decl.c (grokdeclarator): Warn about missing `typename' for nested
14476 type created from template template parameters.
14477 * parse.y (bad_parm): Likewise
14478
14479 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14480 (push_nested_class): Likewise.
14481 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14482 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14483 (copy_template_template_parm): Declare.
14484 * decl.c (arg_looking_for_template): New variable.
14485 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14486 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14487 node if arg_looking_for_template is nonzero.
14488 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14489 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14490 (grokdeclarator): Handle TEMPLATE_DECL.
14491 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14492 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14493 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14494 (dump_decl): Handle unnamed template type parameters.
14495 Handle template template parameters.
14496 (dump_function_name): Handle template template parameters.
14497 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14498 Handle TEMPLATE_TEMPLATE_PARM.
14499 * method.c (build_template_template_parm_names): New function.
14500 (build_template_parm_names): Handle TEMPLATE_DECL.
14501 (build_overload_nested_name, build_overload_name):
14502 Handle TEMPLATE_TEMPLATE_PARM.
14503 * parse.y (maybe_identifier): New nonterminal.
14504 (template_type_parm): Use it.
14505 (template_template_parm, template_arg1): New nonterminal.
14506 (template_parm): Add template_template_parm rules.
14507 (template_arg): Set processing_template_arg.
14508 (template_arg1): Rules moved from template_arg.
14509 (primary, nonnested_type): Set arg_looking_for_template if we are
14510 processing template arguments.
14511 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14512 (process_template_parm): Handle template template parameters.
14513 (coerce_template_parms, comp_template_args): Likewise.
14514 (mangle_class_name_for_template, lookup_template_class): Likewise.
14515 (uses_template_parms): Handle TEMPLATE_DECL and
14516 TEMPLATE_TEMPLATE_PARM.
14517 (current_template_args): Handle TEMPLATE_DECL.
14518 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14519 * search.c (dfs_walk, dfs_record_inheritance):
14520 Handle TEMPLATE_TEMPLATE_PARM.
14521 * tree.c (copy_template_template_parm): New function.
14522 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14523 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14524
14525 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
14526
14527 * decl.c (start_decl): Don't allow duplicate definitions of static
14528 data members.
14529
14530 * call.c (build_user_type_conversion_1): Handle user-defined
14531 template conversion operators correctly.
14532
14533 * decl2.c (build_expr_from_tree): Issue an error message if the
14534 object in a COMPONENT_REF is a TEMPLATE_DECL.
14535
14536 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
14537
14538 * class.c (is_local_class): New function.
14539 * cp-tree.h (is_local_class): Declare it.
14540 (last_tree): Likewise.
14541 (begin_tree): Likewise.
14542 (end_tree): Likewise.
14543 (lookup_template_class): Change prototype.
14544 * decl.c (cp_finish_decl): Check for NULL where necessary.
14545 Consider FUNCTION_DECLS to declare objects with top-level binding,
14546 when calling make_decl_rtl.
14547 (grokdeclarator): Give members of local classes internal linkage.
14548 (start_function): Remove declaration of last_tree.
14549 (finish_function): Set flag_keep_inline_functions around call to
14550 rest_of_compilation if we are processing a member function in a
14551 local class.
14552 (start_method): Call push_template_decl for member functions of
14553 local classes in template functions.
14554 * decl2.c (import_export_decl): Don't give external linkage to
14555 instantiations of templates with internal linkage.
14556 * parse.y (last_tree): Remove declaration.
14557 (template_type): Pass extra parameter to lookup_template_class.
14558 (self_template_type): Likewise.
14559 (structsp): Move call to reset_specialization into left_curly.
14560 (left_curly): Call reset_specialization, and begin_tree.
14561 * pt.c (saved_trees): New variable.
14562 (mangle_class_name_for_template): Change prototype. Use
14563 additional function context to name local classes in templates
14564 correctly.
14565 (classtype_mangled_name): Pass the context.
14566 (push_template_decl): Handle local classes and templates, and
14567 member functions for such classes.
14568 (convert_nontype_parameter): Fix handling of pointer-to-member
14569 constants.
14570 (lookup_template_class): Handle local classes in templates.
14571 (tsubst): Likewise. Don't assume that template instantiations
14572 have external linkage; pay attention to the template declaration.
14573 (mark_decl_instantiated): Likewise.
14574 (begin_tree): New function.
14575 (end_tree): Likewise.
14576
14577 * decl.c (xref_basetypes): Don't call complete_type for basetypes
14578 that involve template parameters; that can lead to infinite
14579 recursion unnecessarily.
14580
14581 * pt.c (register_specialization): Do not register specializations
14582 that aren't ready to be registered yet.
14583 (check_explicit_specialization): Handle explicit specialization of
14584 constructors and destructors.
14585 (build_template_decl): New function.
14586 (push_template_delc): Handle out-of-class specializations of
14587 member templates.
14588
14589 * pt.c (check_explicit_specialization): Set up the template
14590 information before registering the specialization.
14591 (coerce_template_parms): Fix thinko.
14592 (tsubst): Handle specializations of member templates correctly.
14593
14594 * class.c (finish_struct_methods): Remove calls to
14595 check_explicit_specialization from here.
14596 (finish_struct): And insert them here.
14597 * cp-tree.h (perform_qualification_conversions): New function.
14598 (perform_array_to_pointer_conversion): Likewise.
14599 (begin_explicit_instantiation): Likewise.
14600 (end_explicit_instantiation): Likewise.
14601 (determine_specialization): Renamed from
14602 determine_explicit_specialization.
14603 (comp_template_parms): New function.
14604 (processing_explicit_instantiation): New variable.
14605 * cvt.c (perform_qualification_conversions): New function.
14606 (perform_array_to_pointer_conversion): Likewise.
14607 * decl.c (duplicate_decls): Don't consider template functions
14608 alike unless they have the same parameters. Refine handling of
14609 instantiation/specialization mismatches.
14610 (start_decl): Don't call pushdecl for template specializations,
14611 since they don't affect overloading.
14612 (start_function): Likewise.
14613 (grokfndecl): Call check_explicit_specialization a little later.
14614 Don't call duplicate_decls for memberm template specializations.
14615 (grokdeclarator): Don't update template_count for classes that are
14616 themselves specializations. Remove use of `2' as parameter to
14617 grokfndecl since that value isn't used.
14618 * lex.c (cons_up_default_function): Save and restore
14619 processing_explicit_instantiation around calls to grokfield.
14620 * parse.y (finish_member_template_decl): New function.
14621 (component_decl_1): Use it.
14622 (fn.def2): Likewise.
14623 (template_arg_list_opt): New nonterminal.
14624 (template_type): Use it.
14625 (self_template_type): Likewise.
14626 (template_id): Likewise.
14627 (object_template_id): Likewise.
14628 (notype_template_declarator): Likwise.
14629 (begin_explicit_instantiation): Likewise.
14630 (end_explicit_instantiation): Likewise.
14631 (explicit_instantiation): Use them.
14632 * pt.c (coerce_template_parms): Add parameters.
14633 (processing_explicit_instantiation): New variable.
14634 (convert_nontype_parameter): New function.
14635 (determine_overloaded_function): Likewise.
14636 (begin_explicit_instantiation): Likewise.
14637 (end_explicit_instantiation): Likewise.
14638 (retrieve_specialization): Likewise.
14639 (register_specialization): Likewise.
14640 (processing_explicit_specialization): Removed.
14641 (determine_specialization): Handle specializations of member
14642 functions of template class instantiations.
14643 (check_explicit_specialization): Refine to conform to standard.
14644 (comp_template_parms): New function.
14645 (coerce_template_parms): Call convert_nontype_parameter.
14646 (tsubst): Refine handling of member templates. Use
14647 register_specialization.
14648 (instantiate_template): Use retrieve_specialization.
14649 (do_decl_instantiation): Likewise.
14650 (instantiate_decl): Likewise.
14651 (type_unification): Improve handling of explict template
14652 arguments.
14653 * tree.c (mapcar): Return error_mark_node, rather than aborting,
14654 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
14655 * typeck.c (build_unary_op): Call determine_specialization, rather
14656 than determine_explicit_specialization.
14657
14658 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
14659
14660 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
14661
14662 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14663
14664 * error.c (dump_decl): For enum tags, output the tag, not its value.
14665
14666 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
14667
14668 * decl.c (init_decl_processing): Only call init_rtti_processing
14669 FLAG_RTTI is set.
14670
14671 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
14672
14673 * init.c (build_new_1): Split out from build_new.
14674 (build_new): Just return a NEW_EXPR.
14675 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
14676
14677 * decl2.c (get_temp_regvar): Tweak.
14678
14679 * cp-tree.h (TREE_CALLS_NEW): Comment out.
14680 * class.c (resolves_to_fixed_type_p): Remove use.
14681 * method.c (build_opfncall): Likewise.
14682 * call.c (build_new_op): Likewise.
14683
14684 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
14685
14686 * exception.cc (__eh_alloc, __eh_free): New fns.
14687 (__cp_push_exception, __cp_pop_exception): Use them.
14688 (__uncatch_exception): Call terminate here if no exception.
14689 * except.c (build_terminate_handler): New fn.
14690 (expand_start_catch_block): Use it.
14691 (expand_exception_blocks): Likewise.
14692 (alloc_eh_object): New fn.
14693 (expand_throw): Use it. Protect exception init with terminate.
14694 * typeck.c (build_modify_expr): Remove code that ignores trivial
14695 methods.
14696
14697 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14698
14699 * call.c (add_builtin_candidate): Add default case in enumeration
14700 switch.
14701 (build_new_op): Likewise.
14702 (convert_like): Likewise.
14703 * cvt.c (build_expr_type_conversion): Likewise.
14704 * tree.c (real_lvalue_p): Likewise.
14705 (lvalue_p): Likewise.
14706 (cp_tree_equal): Likewise.
14707 * typeck.c (comptypes): Likewise.
14708 (build_component_ref): Likewise.
14709 (build_function_call_real): Likewise.
14710 (build_binary_op_nodefault): Likewise.
14711 (build_unary_op): Likewise.
14712 (build_modify_expr): Likewise.
14713 * typeck2.c (initializer_constant_valid_p): Likewise.
14714
14715 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
14716
14717 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
14718
14719 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
14720
14721 * pt.c (coerce_template_parms): Make sure to digest_init if
14722 possible.
14723
14724 * decl.c (duplicate_decls): Make the newdecl virtual if the
14725 olddecl was, just as is done with other attributes of olddecl.
14726
14727 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14728
14729 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
14730 address of an OFFSET_REF.
14731
14732 * cp-tree.def: Add AGGR_INIT_EXPR.
14733 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
14734 AGGR_INIT_EXPR where appropriate.
14735 * expr.c (cplus_expand_expr): Likewise. Simplify.
14736
14737 * decl2.c (finish_file): Remove call to register_exception_table.
14738
14739 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14740
14741 * pt.c (instantiate_class_template): Don't do injection when
14742 processing_template_decl is true, as pollutes current_binding_level
14743 for base classes.
14744
14745 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
14746
14747 * pt.c (maybe_fold_nontype_arg): Add prototype.
14748
14749 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14750
14751 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
14752 * error.c (dump_expr): Likewise.
14753
14754 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
14755
14756 * typeck.c (build_function_call_real): Remove "inline called before
14757 definition" pedwarn.
14758
14759 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
14760
14761 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14762
14763 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
14764
14765 * pt.c (type_unification_real): Change __null to type void* with
14766 a warning.
14767
14768 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
14769
14770 * call.c (implicit_conversion): Don't call
14771 build_user_type_conversion_1 with a NULL expr, since it will
14772 crash.
14773
14774 * pt.c (unify): Don't try to unify array bounds if either array is
14775 unbounded.
14776
14777 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14778
14779 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
14780 Replace extern decls with casts.
14781
14782 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
14783 Update last_parm_cleanup_insn.
14784 (store_after_parms): Remove.
14785 * cp-tree.h: Adjust.
14786
14787 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14788
14789 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
14790 (finish_file): Check DECL_COMDAT instead of weak|one_only.
14791 (import_export_vtable): Use make_decl_one_only instead of
14792 comdat_linkage for win32 tweak.
14793 (import_export_decl): Likewise.
14794 * pt.c (mark_decl_instantiated): Likewise.
14795
14796 * decl2.c (finish_file): Lose handling of templates in pending_statics.
14797
14798 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
14799
14800 * decl2.c (finish_file): Lose call to expand_builtin_throw.
14801 * except.c (expand_builtin_throw): Remove.
14802 * cp-tree.h: Remove ptr_ptr_type_node.
14803 * decl.c: Likewise.
14804
14805 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
14806
14807 * decl.c (ptr_ptr_type_node): Define.
14808 (init_decl_processing): Initialize it.
14809 * cp-tree.h: Declare it.
14810 * exception.cc (__cp_exception_info): Use __get_eh_info.
14811 (__cp_push_exception): Likewise.
14812 (__cp_pop_exception): Likewise.
14813
14814 From Scott Snyder <snyder@d0sgif.fnal.gov>:
14815 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
14816 saved_pc.
14817 (init_exception_processing): Removed saved_pc initialization.
14818
14819 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
14820
14821 * pt.c (instantiate_decl): Defer all templates but inline functions.
14822
14823 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14824
14825 * init.c (expand_vec_init): Don't fold a list of parameters.
14826
14827 * decl.c (copy_args_p): Handle copy elision for types with virtual
14828 bases.
14829 * call.c (build_over_call): Likewise.
14830
14831 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
14832
14833 * pt.c (lookup_template_function): Copy the template arguments,
14834 not just the list containing them, to the permanent obstack.
14835
14836 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14837
14838 * except.c (expand_start_catch_block): suspend_momentary for the
14839 terminate handler.
14840
14841 * error.c (dump_decl): Handle LOOKUP_EXPR.
14842
14843 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
14844
14845 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
14846 permanent obstack if we are processing a template decl.
14847 * typeck.c (build_static_cast): Likewise.
14848 (build_const_cast): Likewise.
14849 (build_reinterpret_cast): Likewise.
14850
14851 * pt.c (coerce_template_parms): Coerce some expressions, even
14852 when processing_template_decl.
14853
14854 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14855
14856 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14857 handling of pointer difference expressions.
14858
14859 * typeck.c (comp_target_types): Comparison of function/method types
14860 is independent of nptrs.
14861
14862 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
14863
14864 * pt.c (tsubst): Avoid creating pointer to reference and
14865 reference to reference types.
14866
14867 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14868
14869 * parse.y (do_id): New nonterminal.
14870 (template_id): Use it.
14871
14872 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14873
14874 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14875 * spew.c (yylex): Don't do_identifier here.
14876 * decl2.c (build_expr_from_tree): Revert last change.
14877
14878 * decl2.c (build_expr_from_tree): Expand the name for a method call.
14879 * parse.y (object_template_id): Don't try to take the DECL_NAME.
14880
14881 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
14882
14883 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14884 alloc_expr.
14885 * call.c (build_op_delete_call): Adjust.
14886
14887 * except.c (expand_end_catch_block): Lose rethrow region.
14888 (expand_start_catch_block): Likewise.
14889 (expand_end_catch_block): Don't expand_leftover_cleanups.
14890
14891 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14892
14893 * pt.c (tsubst): Remove tree_cons call (places redundant info into
14894 DECL_TEMPLATE_INSTANTIATION).
14895
14896 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14897
14898 * tree.c (is_overloaded_fn): Handle getting a fn template.
14899 (really_overloaded_fn): Likewise.
14900 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14901 * pt.c (check_explicit_specialization): Tweak.
14902 (determine_explicit_specialization): Tweak.
14903
14904 * tree.c, cp-tree.h (get_target_expr): New fn.
14905
14906 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
14907
14908 * pt.c (check_explicit_specialization): Fix misspelling in
14909 diagnostic: `preceeded'.
14910 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14911 `conversiona'.
14912
14913 1997-12-02 Mark Mitchell <mmitchell@usa.net>
14914
14915 * pt.c (determine_explicit_specialization): Avoid an internal
14916 error for bad specializations.
14917
14918 * method.c (build_overload_value): Handle SCOPE_REF.
14919
14920 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
14921
14922 * class.c (prepare_fresh_vtable): Enable even more complex MI
14923 vtable names.
14924
14925 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14926
14927 * exception.cc (__check_eh_spec): Optimize a bit.
14928
14929 * exception.cc (__cp_pop_exception): Lose handler arg.
14930 * except.c (do_pop_exception): Likewise.
14931 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14932 (expand_end_catch_block): Likewise.
14933
14934 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14935
14936 * pt.c (check_explicit_specialization): Complain about using a
14937 template-id for a non-specialization.
14938
14939 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
14940
14941 * repo.c: Prototype rindex only if needed.
14942 * xref.c: Likewise.
14943
14944 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14945
14946 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14947
14948 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
14949
14950 * typeck.c (build_const_cast): Handle references here instead of
14951 handing off to convert_to_reference.
14952
14953 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14954 TerminateFunctionCall.
14955 (init_exception_processing): Likewise. Terminate et al are now
14956 the fns, not ADDR_EXPRs.
14957 (various): Lose redundant assemble_external calls.
14958 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14959
14960 * cp-tree.h (struct lang_decl_flags): Add comdat.
14961 (DECL_COMDAT): New macro.
14962 * decl.c (duplicate_decls): Propagate it.
14963 (cp_finish_decl): Handle it.
14964 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
14965
14966 * class.c: Remove static pending_hard_virtuals.
14967 (add_virtual_function): Take pointers to pending_virtuals
14968 and pending_hard_virtuals.
14969 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
14970
14971 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14972
14973 * decl2.c (import_export_vtable): If we support one_only but not
14974 weak symbols, mark instantiated template vtables one_only.
14975 (import_export_decl): Likewise for tinfo functions.
14976 (finish_vtable_vardecl): Also write out vtables from explicitly
14977 instantiated template classes.
14978 * pt.c (mark_class_instantiated): Revert last change.
14979
14980 * except.c (expand_throw): Call mark_used on the destructor.
14981
14982 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
14983
14984 * lex.c (lang_init): Enable flag_exceptions by default if no
14985 command line switch was specified.
14986
14987 1997-11-26 Mark Mitchell <mmitchell@usa.net>
14988
14989 * pt.c (unify): Handle `void' template parameters in
14990 specializations.
14991
14992 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14993
14994 * rtti.c (build_dynamic_cast): Handle template case here.
14995 (build_dynamic_cast_1): Not here.
14996
14997 * typeck2.c (digest_init): Make copies where appropriate.
14998
14999 * decl2.c (delete_sanity): resolve_offset_ref.
15000
15001 * except.c: Call terminate without caching so many bits.
15002
15003 * except.c (expand_start_catch_block): Fix catching a reference
15004 to pointer.
15005
15006 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15007
15008 * init.c (build_new): Copy size to the saveable obstack.
15009
15010 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15011 TRY_CATCH_EXPR for now.
15012
15013 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15014
15015 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15016 has DECL_LANG_SPECIFIC.
15017
15018 * exception.cc (struct cp_eh_info): Add handlers field.
15019 (__cp_push_exception): Initialize it.
15020 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15021 (__throw_bad_exception): Remove.
15022 * except.c (call_eh_info): Add handlers field.
15023 (get_eh_handlers): New fn.
15024 (push_eh_cleanup): Increment handlers.
15025
15026 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15027
15028 * except.c (expand_start_eh_spec): Use the try/catch code.
15029 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15030 doing everything inline.
15031 (init_exception_processing): throw_type_match now takes
15032 const void pointers.
15033 * exception.cc (__check_eh_spec): New fn.
15034 * inc/exception: Neither terminate nor unexpected return.
15035 * decl.c: Make const_ptr_type_node public.
15036 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15037
15038 * except.c (expand_start_catch_block): We only need the rethrow
15039 region for non-sjlj exceptions.
15040 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15041
15042 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15043
15044 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15045 (various.o): Likewise.
15046 * inc/new: Add placement deletes. Add throw specs for default new.
15047 * new.cc (set_new_handler): Move here from libgcc2.
15048 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15049 (new): Move from libgcc2. Throw bad_alloc.
15050 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15051 * decl.c (init_decl_processing): Update exception specs on new and
15052 delete.
15053
15054 * method.c (build_decl_overload_real): Don't mess with global
15055 placement delete.
15056
15057 * init.c (build_new): Check for null throw spec, not nothrow_t.
15058
15059 * decl.c (duplicate_decls): Don't complain about different exceptions
15060 from an internal declaration.
15061
15062 * call.c (build_op_delete_call): Fix check for member fns again.
15063
15064 * decl2.c (import_export_decl): Interface hackery affects
15065 virtual synthesized methods.
15066
15067 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15068
15069 * decl.c (start_decl): Don't just complain about a mismatched
15070 scope, fix it.
15071
15072 * decl.c (make_implicit_typename): Handle case where t is not
15073 actually from context.
15074 * tree.c (get_type_decl): Lose identifier case.
15075 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15076 * parse.y (nonnested_type): Just use lookup_name.
15077 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15078
15079 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15080
15081 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15082 T was built in C language context (for example, by
15083 output_func_start_profiler).
15084
15085 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15086
15087 * decl.c (make_implicit_typename): New fn.
15088 (lookup_name_real): Use it. Use current_class_type as the context.
15089
15090 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15091
15092 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15093
15094 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15095
15096 * friend.c (do_friend): Warn about non-template friends in templates.
15097
15098 * call.c (build_op_delete_call): Fix handling of inherited delete.
15099
15100 * search.c (dfs_record_inheritance): Ignore template type parms.
15101
15102 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15103
15104 * call.c (build_new_op): Fix copy error.
15105 (build_op_new_call): New fn.
15106 (build_op_delete_call): New fn.
15107 * cp-tree.h: Declare them.
15108 * init.c (build_new): Use them. Support placement delete.
15109 (build_x_delete): Use build_op_delete_call.
15110 (build_delete): Likewise.
15111 * decl2.c (delete_sanity): Likewise.
15112 (coerce_delete_type): Don't complain about placement delete.
15113
15114 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15115
15116 * call.c (build_new_function_call): Remove unused 'obj' parm.
15117 * cp-tree.h, typeck.c: Adjust.
15118
15119 * init.c (build_new): Make the cleanup last longer.
15120 (expand_vec_init): Call do_pending_stack_adjust.
15121
15122 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15123
15124 * pt.c (do_type_instantiation): Fix typo.
15125 (mark_class_instantiated): If we support one_only but not weak
15126 symbols, don't mark this as known.
15127
15128 * init.c (build_new): Handle vec delete in EH cleanup.
15129
15130 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15131
15132 * call.c (build_method_call): Call complete_type before checking
15133 for destructor.
15134
15135 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15136
15137 * decl.c (add_block_current_level): Delete.
15138 * init.c (build_vec_delete_1): Delete build_block and
15139 add_block_current_level calls.
15140
15141 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15142
15143 * init.c (build_new): Handle freeing allocated memory when the
15144 constructor throws.
15145
15146 * call.c (build_new_method_call): Fix flags arg.
15147
15148 * pt.c (do_type_instantiation): Don't try to instantiate
15149 member templates.
15150 (mark_decl_instantiated): If we support one_only but not
15151 weak symbols, mark this one_only.
15152 * decl2.c (import_export_vtable): Don't defer handling of vtables
15153 if MULTIPLE_SYMBOL_SPACES.
15154
15155 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15156
15157 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15158
15159 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
15160
15161 * except.c (do_pop_exception): Return a value.
15162
15163 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15164
15165 * call.c (build_new_method_call): Handle getting a
15166 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
15167 if we got template parms.
15168 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15169 not just the args.
15170 * decl2.c (build_expr_from_tree): Tweak last change.
15171 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15172 (maybe_fold_nontype_arg): Split out from tsubst_copy.
15173 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15174
15175 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15176
15177 * pt.c (tsubst_copy): Handle explicit template arguments in
15178 function calls.
15179 * typeck.c (build_x_function_call): Likewise.
15180 * decl2.c (build_expr_from_tree): Lookup function name if it
15181 hasn't been done.
15182
15183 * pt.c (tsubst): Instantiate template functions properly when
15184 template parameter does not appear in function arguments and return
15185 type.
15186 (comp_template_args): Handle member templates required by tsubst.
15187
15188 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15189
15190 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15191 previous change.
15192
15193 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15194
15195 * pt.c (coerce_template_parms): Tweak error message.
15196
15197 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15198 return type defaults to `int', even if there are storage-class
15199 specifiers.
15200
15201 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15202
15203 Complete nested exception support.
15204 * except.c (do_pop_exception): Split out...
15205 (push_eh_cleanup): From here. Handle the EH region by hand.
15206 (expand_start_catch_block): Add a new level for the catch parm.
15207 Move the rethrow region outside the two cleanup regions.
15208 Protect the initializer for the catch parm with terminate.
15209 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
15210 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
15211 popping off the middle of the stack.
15212 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15213 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15214 (build_cplus_new): Only wrap CALL_EXPRs.
15215 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15216 the constructor call.
15217
15218 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15219
15220 * Make-lang.in (c++.distdir): Make inc subdirectory.
15221
15222 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15223
15224 * decl2.c (finish_file): Put back some code.
15225
15226 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15227
15228 * decl2.c (finish_file): Remove redundant code.
15229 * method.c (emit_thunk): Don't let the backend defer generic thunks.
15230
15231 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15232
15233 * except.c (call_eh_info): Split out...
15234 (push_eh_info): From here.
15235 (expand_builtin_throw): Use it.
15236 (expand_start_catch_block): Move region start back.
15237
15238 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
15239
15240 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15241 (real_yylex): Record wide strings using target endianness, not host.
15242
15243 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
15244
15245 * repo.c (rindex): Add decl unconditionally.
15246 (get_base_filename, open_repo_file): Don't cast rindex.
15247 * xref.c (rindex): Add decl unconditionally.
15248 (index): Remove unused decl.
15249 (open_xref_file): Don't cast rindex.
15250
15251 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15252
15253 * class.c (build_vbase_path): Propagate the result type properly.
15254
15255 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
15256
15257 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15258 remaining use of saved_throw_type with a call to get_eh_type.
15259
15260 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
15261
15262 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15263 (file_name_nondirectory): New function, doing the same as the macro.
15264 (set_typedecl_interface_info): Use it instead of the macro.
15265 (check_newline): Likewise.
15266 (handle_cp_pragma): Likewise.
15267
15268 * repo.c (get_base_filename): Cast result of rindex to char*.
15269 (open_repo_file): Likewise.
15270 * xref.c (open_xref_file): Likewise.
15271 * error.c (dump_char): Make its arg int, not char.
15272
15273 * except.c (push_eh_info): Pass the number of fields - 1 down, not
15274 the exact number of fields.
15275
15276 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15277
15278 Support for nested exceptions.
15279 * tinfo2.cc (__is_pointer): New fn.
15280 * exception.cc (struct cp_eh_info): Define.
15281 (__cp_exception_info, __uncatch_exception): New fns.
15282 (__cp_push_exception, __cp_pop_exception): New fns.
15283 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15284 Lose empty_fndecl.
15285 (init_exception_processing): Likewise. __eh_pc is now external.
15286 (push_eh_info): New fn.
15287 (get_eh_{info,value,type,caught}): New fns.
15288 (push_eh_cleanup): Just call __cp_pop_exception.
15289 (expand_start_catch_block): Use push_eh_info. Start the eh region
15290 sooner.
15291 (expand_end_eh_spec): Use push_eh_info.
15292 (expand_throw): Call __cp_push_exception to set up the exception info.
15293 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
15294 when we rethrow.
15295 (expand_builtin_throw): Don't refer to empty_fndecl.
15296
15297 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15298
15299 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15300
15301 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
15302
15303 * method.c (build_template_parm_names, build_decl_overload_real):
15304 Add static to definitions.
15305 * pt.c (add_to_template_args, note_template_header,
15306 processing_explicit_specialization, type_unification_real): Likewise.
15307 ({determine,check}_explicit_specialization): Use a single string for
15308 error messages.
15309
15310 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15311
15312 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15313 (expand_end_catch_block): Likewise.
15314 (expand_end_eh_spec): Likewise.
15315
15316 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
15317
15318 * decl.c (duplicate_decls): Handle template specializations
15319 correctly.
15320 * error.c (dump_function_name): Fix printing of specializations of
15321 member functions that are not member templates.
15322 * cp-tree.h (processing_specialization): Make global.
15323 * pt.c (processing_specialization): Likewise.
15324 * lex.c (cons_up_default_function): Save and restore
15325 processing_specialization to avoid confusion.
15326
15327 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15328
15329 * decl.c (init_decl_processing): Give null_node unknown* type.
15330 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15331 (common_type): Likewise.
15332 * error.c (args_as_string): Recognize null_node.
15333
15334 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15335
15336 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15337 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15338
15339 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15340
15341 * Make-lang.in (g++): Include prefix.o.
15342
15343 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
15344
15345 * pt.c (determine_explicit_specialization): Initialize "dummy"
15346 to keep Purify quiet.
15347
15348 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15349
15350 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15351 (build_overload_int): Not here.
15352
15353 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
15354
15355 * class.c (build_type_pathname): Remove.
15356 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15357
15358 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
15359
15360 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15361 &&label GNU extension.
15362
15363 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
15364
15365 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15366 so as to avoid incorrect manglings.
15367 * method.c (build_decl_overload_real): Don't mangle return types
15368 for constructors.
15369
15370 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15371
15372 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15373 scratch_tree_cons): Define as macros for now.
15374 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15375 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15376 typeck2.c: Use them and the expression_obstack variants.
15377
15378 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15379
15380 * decl.c (store_return_init): Allow classes with explicit ctors to
15381 be used with the named return values extension.
15382
15383 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
15384
15385 * pt.c (instantiate_decl): Fix previous change.
15386
15387 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15388
15389 * pt.c (tsubst): Fix thinko.
15390 (instantiate_decl): Really use the original template.
15391
15392 * call.c (build_new_method_call): Use simple constructor_name for
15393 error messages.
15394
15395 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
15396
15397 * method.c (build_underscore_int): Don't use ANSI specific
15398 features.
15399
15400 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15401
15402 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15403 for our key method; it might have been inlined by -O3.
15404
15405 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
15406
15407 * decl.c (make_typename_type): Do not try to call lookup_field for
15408 non-aggregate types.
15409
15410 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
15411
15412 * typeck.c (build_reinterpret_cast): Tweak.
15413
15414 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15415
15416 * typeck.c (build_reinterpret_cast): Converting a void pointer
15417 to function pointer with a reinterpret_cast produces a warning
15418 if -pedantic is issued.
15419
15420 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15421
15422 * typeck.c (c_expand_return): Don't warn about returning a
15423 reference-type variable as a reference.
15424
15425 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15426
15427 * method.c (build_static_name): Fix typo.
15428
15429 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
15430
15431 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15432 OLDDECL before we try to do DECL_USE_TEMPLATE.
15433
15434 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15435
15436 * decl.c (duplicate_decls): Don't warn about template instances.
15437
15438 * typeck.c (mark_addressable): Lose ancient code that unsets
15439 DECL_EXTERNAL.
15440
15441 * pt.c (do_decl_instantiation): Lose support for instantiating
15442 non-templates.
15443
15444 * call.c (build_new_function_call): Fix handling of null explicit
15445 template args.
15446 (build_new_method_call): Likewise.
15447
15448 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
15449
15450 * method.c (build_underscore_int): Fix typo.
15451
15452 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
15453
15454 * tree.c (print_lang_statistics): #if 0 call to
15455 print_inline_obstack_statistics until its definition is checked in.
15456
15457 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15458
15459 * decl2.c (finish_file): Move dump_tree_statistics to end.
15460
15461 * pt.c (instantiate_decl): Look for the original template.
15462 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15463 of member templates.
15464
15465 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15466
15467 * Makefile.in (g++FAQ.*): New rules.
15468 (CONFLICTS): Update.
15469 * g++FAQ.texi: Moved from libg++.
15470
15471 * parse.y (PFUNCNAME): Only specify the type once.
15472
15473 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
15474
15475 * lex.c (real_yylex): Clean up the code to fully behave the way
15476 the c-lex.c parser does for complex and real numbers.
15477
15478 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15479
15480 * method.c (build_decl_overload_real): Reformat.
15481
15482 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
15483
15484 * method.c (synthesize_method): If at_eof, determine our linkage.
15485
15486 1997-09-29 Paul Eggert <eggert@twinsun.com>
15487
15488 * lex.c (real_yylex): Treat `$' just like `_', except issue a
15489 diagnostic if !dollars_in_ident or if pedantic.
15490
15491 * lang-specs.h (@c++): -ansi no longer implies -$.
15492
15493 * decl2.c (lang_decode_option):
15494 -traditional and -ansi now do not mess with
15495 dollars_in_ident.
15496
15497 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
15498
15499 * Makefile.in (parse.o, decl.o): Also depend on
15500 $(srcdir)/../except.h $(srcdir)/../output.h.
15501 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15502 $(srcdir)/../except.h $(srcdir)/../output.h.
15503 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15504 ../insn-codes.h.
15505
15506 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15507
15508 * expr.c (cplus_expand_expr): Make it static.
15509
15510 * decl2.c, init.c, typeck.c: Include "expr.h".
15511 (expand_expr): Use proper values when calling the function.
15512
15513 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15514
15515 * lang-options.h: New -Wold-style-cast flag.
15516 * cp-tree.h (warn_old_style_cast): New variable.
15517 * decl2.c (warn_old_style_cast): Likewise.
15518 (lang_decode_option): Support -Wold-style-cast.
15519 (reparse_absdcl_as_casts): Produce old-style-cast warning.
15520
15521 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15522
15523 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15524 TREE_USED, reset value based on already_used.
15525
15526 * init.c (expand_member_init): Revert change.
15527
15528 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15529
15530 * cp-tree.h, decl.c, decl2.c, pt.c:
15531 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
15532
15533 * decl2.c (lang_decode_option): Add missing ;.
15534
15535 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15536
15537 * friend.c (do_friend): Disable injection for all template-derived
15538 decls.
15539 * decl2.c (lang_decode_option): Handle -fguiding-decls.
15540 * parse.y (notype_template_declarator): New nonterminal.
15541 (direct_notype_declarator): Use it.
15542 (complex_direct_notype_declarator): Likewise.
15543 (object_template_id): Accept any kind of identifier after TEMPLATE.
15544 (notype_qualified_id): Don't add template declarators here.
15545
15546 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
15547
15548 * call.c (add_template_candidate): Add explicit_targs parameter.
15549 (build_scoped_method_call): Use it.
15550 (build_overload_call_real): Likewise.
15551 (build_user_type_conversion_1): Likewise.
15552 (build_new_function_call): Likewise.
15553 (build_object_call): Likewise.
15554 (build_new_op): Likewise.
15555 (build_new_method_call): Likewise.
15556 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
15557 (build_new_method_call): Likewise.
15558
15559 * class.c (finish_struct_methods): Add specialization pass to
15560 determine which methods were specializing which other methods.
15561 (instantiate_type): Handle TEMPLATE_ID_EXPR.
15562
15563 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
15564
15565 * cp-tree.h (name_mangling_version): New variable.
15566 (flag_guiding_decls): Likewise.
15567 (build_template_decl_overload): New function.
15568 (begin_specialization): Likewise.
15569 (reset_specialization): Likewise.
15570 (end_specialization): Likewise.
15571 (determine_explicit_specialization): Likewise.
15572 (check_explicit_specialization): Likewise.
15573 (lookup_template_function): Likewise.
15574 (fn_type_unification): Add explicit_targs parameter.
15575 (type_unification): Likewise.
15576
15577 * decl.c (duplicate_decls): Add smarts for explicit
15578 specializations.
15579 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
15580 specializations.
15581 (grokfndecl): Call check_explicit_specialization.
15582
15583 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
15584 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
15585 (check_classfn): Handle specializations.
15586
15587 * error.c (dump_function_name): Print specialization arguments.
15588
15589 * friend.c (do_friend): Don't call pushdecl for template
15590 instantiations.
15591
15592 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
15593
15594 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
15595 and -fno-guiding-decls.
15596
15597 * lex.c (identifier_type): Return PFUNCNAME for template function
15598 names.
15599
15600 * method.c (build_decl_overload_real): New function.
15601 (build_template_parm_names): New function.
15602 (build_overload_identifier): Use it.
15603 (build_underscore_int): New function.
15604 (build_overload_int): Use it. Add levels for template
15605 parameters.
15606 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
15607 (build_overload_nested_names): Handle template type parameters.
15608 (build_template_decl_overload): New function.
15609
15610 * parse.y (YYSTYPE): New ntype member.
15611 (nested_name_specifier): Use it.
15612 (nested_name_specifier_1): Likewise.
15613 (PFUNCNAME): New token.
15614 (template_id, object_template_id): New non-terminals.
15615 (template_parm_list): Note specializations.
15616 (template_def): Likewise.
15617 (structsp): Likewise.
15618 (fn.def2): Handle member template specializations.
15619 (component_decl_1): Likewise.
15620 (direct_notype_declarator): Handle template-ids.
15621 (component_decl_1): Likewise.
15622 (direct_notype_declarator): Handle template-ids.
15623 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
15624
15625 * pt.c (processing_specializations): New variable.
15626 (template_header_count): Likewise.
15627 (type_unification_real): New function.
15628 (processing_explicit_specialization): Likewise.
15629 (note_template_header): Likewise.
15630 (is_member_template): Handle specializations.
15631 (end_template_decl): Call reset_specialization.
15632 (push_template_decl): Handle member template specializations.
15633 (tsubst): Likewise.
15634 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
15635 (instantiate_template): Handle specializations.
15636 (instantiate_decl): Likewise.
15637 (fn_type_unification): Handle explicit_targs.
15638 (type_unification): Likewise. Allow incomplete unification
15639 without an error message, if allow_incomplete.
15640 (get_bindings): Use new calling sequence for fn_type_unification.
15641
15642 * spew.c (yylex): Handle PFUNCNAME.
15643
15644 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
15645 (really_overloaded_fn): Likewise.
15646 (get_first_fn): Handle function templates.
15647
15648 * typeck.c (build_x_function_call): Use really_overloaded_fn.
15649 Handle TEMPLATE_ID_EXPR.
15650 (build_x_unary_op): Likewise.
15651 (build_unary_op): Likewise.
15652 (mark_addressable): Templates whose address is taken are marked
15653 as used.
15654
15655 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15656
15657 * decl.c (init_decl_processing): Declare __builtin_constant_p as
15658 accepting any kind of type, not only int.
15659
15660 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
15661
15662 * search.c (get_matching_virtual): Notice virtual bases when sorrying
15663 about covariant returns.
15664
15665 * parse.y (member_init): Also imply typename here. Remove ancient
15666 extension for initializing base members.
15667
15668 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15669
15670 Handle multi-level typenames and implicit typename in base list.
15671 * parse.y (typename_sub{,[0-2]}): New rules.
15672 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
15673 (nonnested_type): New rule.
15674 (complete_type_name): Use it.
15675 (base_class.1): Use typename_sub and nonnested_type.
15676 (nested_name_specifier): Don't elide std:: here.
15677 * decl.c (make_typename_type): Handle getting a type for NAME.
15678 (lookup_name_real): Turn std:: into :: here.
15679
15680 Rvalue conversions were removed in London.
15681 * call.c (is_subseq): Don't consider lvalue transformations.
15682 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
15683 (joust): Re-enable ?: kludge.
15684
15685 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
15686
15687 * decl.c (start_function): Up warning of no return type to be a
15688 pedwarn.
15689
15690 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15691
15692 * init.c (expand_member_init): Don't set TREE_USED.
15693 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
15694 set,don't clear TREE_USED wholesale.
15695
15696 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
15697
15698 * call.c (build_over_call): Do require_complete_type before
15699 build_cplus_new.
15700
15701 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15702
15703 * search.c (lookup_field): Call complete_type in all cases.
15704
15705 * decl.c (finish_function): Just warn about flowing off the end.
15706
15707 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15708
15709 * decl.c (grokparms): Don't bash a permanent list node if we're
15710 in a function.
15711
15712 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
15713
15714 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
15715
15716 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
15717
15718 * call.c (build_new_op): Give better error for syntactically
15719 correct, but semantically invalid, use of undeclared template.
15720
15721 * call.c (compare_qual): Handle pmfs.
15722
15723 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
15724 after the exception spec.
15725
15726 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15727
15728 * call.c (null_ptr_cst_p): Integer type, not integral type.
15729
15730 * call.c (joust): Disable warnings until they can be moved to the
15731 right place.
15732
15733 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
15734
15735 * Makefile.in, config-lang.in: Convert to autoconf.
15736
15737 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15738
15739 * decl.c (lookup_name_real): Add implicit 'typename' to types from
15740 base classes.
15741
15742 * pt.c (most_specialized_class): Fix typo.
15743 (tsubst): Move constant folding to TREE_VEC case.
15744
15745 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
15746
15747 * pt.c (do_poplevel): Don't warn about unused local variables
15748 while processing_template_decl since we don't always know whether
15749 or not they will need constructing/destructing.
15750
15751 * pt.c (uses_template_parms): Check the values of an enumeration
15752 type to make sure they don't depend on template parms.
15753
15754 * decl.c (make_typename_type): Don't lookup the field if the
15755 context uses template parms, even if we're not
15756 processing_template_decl at the moment.
15757
15758 * pt.c (coerce_template_parms): Avoid looking at the
15759 TYPE_LANG_DECL portion of a typename type, since there won't be
15760 one.
15761 (tsubst): Do constant folding as necessary to make sure that
15762 arguments passed to lookup_template_class really are constants.
15763
15764 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15765
15766 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
15767 * decl2.c (finish_file): Only register exception tables if we
15768 need to.
15769
15770 * decl.c (init_decl_processing): Add __builtin_[fs]p.
15771
15772 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15773
15774 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
15775
15776 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
15777
15778 * error.c (dump_decl): Avoid crashing when presented with a
15779 uninitialized constant, as can occur with a template parameter.
15780 (dump_expr): Make sure that there are enough levels of
15781 current_template_parms before we start diving through them.
15782
15783 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
15784
15785 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
15786 c-typeck.c.
15787
15788 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15789
15790 * except.c (expand_throw): Call build_delete for all
15791 exception types, not just objects with destructors.
15792
15793 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
15794
15795 * decl.c (current_local_enum): Remove static.
15796 * pt.c (tsubst_enum): Save and restore value of current_local_enum
15797 in case template is expanded in enum decl.
15798 (instantiate_class_template): Use new tsubst_enum signature.
15799 (tsubst_expr): Likewise.
15800
15801 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
15802
15803 * pt.c (begin_member_template_processing): Take a function as
15804 argument, not a set of template arguments. Use the template
15805 parameters, rather than the arguments. Handle non-type parameters
15806 correctly. Push a binding level for the parameters so that multiple
15807 member templates using the same parameter names can be declared.
15808 (end_member_template_processing): Pop the binding level.
15809 (push_template_decl): Mark member templates as static when
15810 appropriate.
15811
15812 * lex.c (do_pending_inlines): Pass the function, not its template
15813 arguments, to begin_member_template_processing.
15814 (process_next_inline): Likewise.
15815 (do_pending_defargs): Likewise.
15816
15817 * error.c (dump_expr): Obtain the correct declaration for a
15818 TEMPLATE_CONST_PARM.
15819
15820 * call.c (add_template_conv_candidate): New function.
15821 (build_object_call): Handle member templates, as done in the other
15822 build_ functions.
15823
15824 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
15825
15826 * decl.c (replace_defag): Undo previous change.
15827 * lex.c (do_pending_defargs): Deal with member templates.
15828
15829 * pt.c (is_member_template): Avoid crashing when passed a
15830 non-function argument.
15831
15832 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15833
15834 * class.c (grow_method): Remove check for redeclaration.
15835
15836 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
15837
15838 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
15839 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
15840 (PRIMARY_TEMPLATE_P): Use it.
15841 * call.c (build_overload_call_real): Use it.
15842 * class.c (instantiate_type): Likewise.
15843 * decl.c (decls_match): Likewise.
15844 * method.c (build_overload_identifier): Likewise.
15845 * pt.c (push_template_decl): Likewise.
15846 (classtype_mangled_name): Likewise.
15847 (lookup_template_class): Likewise.
15848
15849 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
15850 DECL_NTPARMS to conform to usage elsewhere.
15851 * call.c (add_template_candidate): Likewise.
15852 * class.c (instantiate_type): Likewise.
15853 * pt.c (instantiate_template): Likewise.
15854 (get_bindings): Likewise.
15855
15856 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15857 is_member_template.
15858
15859 * pt.c (unify): Undo changes to allow multiple levels of template
15860 parameters.
15861 (type_unification): Likewise.
15862 (fn_type_unification): Likewise.
15863 (get_class_bindings): Likewise.
15864 * cp-tree.h (Likewise).
15865
15866 * decl.c (replace_defarg): Check that the type of the default
15867 parameter does not invlove a template type before complaining
15868 about the initialization.
15869
15870 * error.c (dump_expr): Deal with template constant parameters in
15871 member templates correctly.
15872
15873 * pt.c (is_member_template): Deal with class specializations
15874 correctly.
15875 (tsubst): Handle "partial instantiation" of member templates
15876 correctly.
15877
15878 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
15879
15880 * pt.c (type_unification): Change calling sequence to allow for
15881 multiple levels of template parameters.
15882 (tsubst_expr): Likewise.
15883 (tsubst): Likewise.
15884 (tsubst_copy): Likewise.
15885 (instantiate_template): Likewise.
15886 (unify): Likewise.
15887 * call.c (build_overload_call_real): Use it.
15888 (add_builtin_candidate): Use it.
15889 (build_new_method_call): Use it.
15890 * class.c (instantiate_type): Use it.
15891 * decl.c (grokdeclarator): Use it.
15892 * decl2.c (finish_file): Use it.
15893 * method.c (build_overload_identifier): Use it.
15894
15895 * call.c (add_template_candidate): Add additional parameter for
15896 the function return type. Call fn_type_unification istead of
15897 type_unification.
15898 (build_user_type_conversion_1): Handle member templates.
15899 (build_new_function_call): Likewise.
15900 (build_new_op): Likewise.
15901 (build_new_method_call): Likewise.
15902
15903 * class.c (grow_method): Don't give an error message indicating
15904 that two member templates with the same name are ambiguous.
15905 (finish_struct): Treat member template functions just like member
15906 functions.
15907
15908 * cp-tree.h (check_member_template): Add declaration.
15909 (begin_member_template_processing): Likewise.
15910 (end_member_template_processing): Likewise.
15911 (fn_type_unification): Likewise.
15912 (is_member_template): Likewise.
15913 (tsubst): Change prototype.
15914 (tsubst_expr): Likewise.
15915 (tsubst_copy): Likewise.
15916 (instantiate_template): Likewise.
15917 (get_bindings): Likewise.
15918
15919 * decl.c (decls_match): Handle multiple levels of template
15920 parameters.
15921 (pushdecl): Handle template type params just like other type
15922 declarations.
15923 (push_class_level_binding): Return immediately if the
15924 class_binding_level is NULL.
15925 (grokfndecl): If check_classfn() returns a member_template, use
15926 the result of the template, not the template itself.
15927
15928 * decl2.c (check_member_template): New function. Check to see
15929 that the entity declared to be a member template can be one.
15930 (check_classfn): Allow redeclaration of member template functions
15931 with different types; the new functions can be specializations or
15932 explicit instantiations.
15933
15934 * error.c (dump_decl): Handle multiple levels of template
15935 parameters.
15936 (dump_function_decl): Update to handle function templates.
15937
15938 * lex.c (do_pending_inlines): Set up template parameter context
15939 for member templates.
15940 (process_next_inline): Likewise.
15941
15942 * method.c (build_overload_identifier): Adjust for multiple levels
15943 of template parameters.
15944
15945 * parse.y (fn.def2): Add member templates.
15946 (component_decl_1): Likewise.
15947
15948 * pt.c (begin_member_template_processing): New function.
15949 (end_member_template_processing): Likewise.
15950 (is_member_template): Likewise.
15951 (fn_type_unification): Likewise.
15952 (current_template_parms): Return a vector of all the template
15953 parms, not just the innermost level of parms.
15954 (push_template_decl): Deal with the possibility of member
15955 templates.
15956 (lookup_template_class): Likewise.
15957 (uses_template_parms): Likewise.
15958 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15959 TEMPLATE_CONST_PARM to deal with multiple levels of template
15960 arguments. Add processing of TEMPLATE_DECL to produce new
15961 TEMPLATE_DECLs from old ones.
15962 (do_decl_instantiation): Handle member templates.
15963
15964 * search.c (lookup_fnfields_1): Handle member template conversion
15965 operators.
15966
15967 * tree.c (cp_tree_equal): Check the levels, as well as the
15968 indices, of TEMPLATE_CONST_PARMs.
15969
15970 * typeck.c (comptypes): Check the levels, as well as the indices,
15971 fo TEMPLATE_TYPE_PARMs.
15972 (build_x_function_call): Treat member templates like member
15973 functions.
15974
15975 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15976
15977 * typeck.c (c_expand_return): Always convert_for_initialization
15978 before checking for returning a pointer to local.
15979
15980 * pt.c (type_unification): If strict and the function parm doesn't
15981 use template parms, just compare types.
15982
15983 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
15984
15985 * method.c (build_overloaded_value): Replace direct call
15986 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
15987
15988 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15989
15990 * typeck.c (convert_arguments): Don't arbitrarily choose the first
15991 of a set of overloaded functions.
15992
15993 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15994
15995 * lex.c (real_yylex): Don't elide __FUNCTION__.
15996
15997 * method.c (build_overload_value): Add in_template parm.
15998 (build_overload_int): Likewise.
15999 (build_overload_identifier): Pass it.
16000
16001 * decl.c (duplicate_decls): Don't bash a previous template
16002 definition with a redeclaration.
16003
16004 * pt.c (unify): float doesn't match double.
16005
16006 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16007 TYPE_DECL. Handle getting non-template types.
16008 * parse.y (explicit_instantiation): Use typespec instead of
16009 aggr template_type.
16010
16011 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16012
16013 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16014
16015 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16016
16017 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16018 (compare_ics): Likewise.
16019
16020 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16021
16022 * call.c (joust): Warn about choosing one conversion op over
16023 another because of 'this' argument when the other return type is
16024 better.
16025 (source_type): New fn.
16026
16027 * call.c (build_new_op): Strip leading REF_BIND from first operand
16028 to builtin operator.
16029
16030 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16031 use its RTL.
16032
16033 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16034
16035 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16036
16037 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16038
16039 * typeck.c (expand_target_expr): Make definition match declaration.
16040
16041 * class.c (get_basefndecls): Make definition match declaration.
16042
16043 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16044
16045 * input.c (sub_getch): Eventually give up and release the input file.
16046
16047 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16048 right place.
16049
16050 * call.c (joust): Tweak message.
16051
16052 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16053
16054 * error.c (type_as_string): Put const/volatile on template type
16055 parameters where appropriate.
16056
16057 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16058
16059 * call.c (strictly_better): Make arguments unsigned ints.
16060
16061 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16062
16063 * lex.c (real_yylex): Refer to __complex instead of complex.
16064
16065 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16066
16067 * lex.c (real_yylex): Don't use getc directly.
16068
16069 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16070
16071 * call.c (is_subseq): Don't try to be clever.
16072
16073 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16074
16075 * parse.y, pt.c: Include "except.h".
16076 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16077 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16078 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16079 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16080 prototyping.
16081
16082 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16083
16084 * decl2.c (mark_vtable_entries): Instead of replacing pure
16085 virtuals with a reference to __pure_virtual, copy the decl and
16086 change the RTL.
16087
16088 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16089
16090 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16091
16092 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16093
16094 * pt.c (instantiate_class_template): Call repo_template_used
16095 before finish_prevtable_vardecl.
16096
16097 * call.c (is_subseq): New fn.
16098 (compare_ics): Use it.
16099
16100 * repo.c (finish_repo): Don't crash on no args.
16101
16102 * parse.y (named_complex_class_head_sans_basetype): Handle
16103 explicit global scope.
16104 * decl2.c (handle_class_head): New fn.
16105
16106 * pt.c (unify): Add CONST_DECL case.
16107
16108 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16109
16110 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16111
16112 * cp-tree.h (report_type_mismatch): Add prototype.
16113 * call.c (build_overload_call_real): Remove erroneous fourth
16114 argument to report_type_mismatch.
16115 (build_user_type_conversion_1): Remove erroneous second arg to
16116 tourney.
16117 (build_new_function_call): Likewise.
16118 (build_object_call): Likewise.
16119 (build_new_op): Likewise.
16120 (build_new_method_call): Likewise.
16121
16122 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16123
16124 * error.c (dump_decl): Don't bother processing a function with no
16125 DECL_LANG_SPECIFIC.
16126
16127 * method.c (emit_thunk): Call init_function_start in the macro case.
16128
16129 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16130
16131 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16132 defined and used to set flag_vtable_thunks.
16133
16134 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16135
16136 * parse.y: Don't clear the inlines from their obstack until they've
16137 all been processed.
16138
16139 * decl.c (duplicate_decls): Don't complain about exception
16140 specification mismatch if flag_exceptions is off.
16141
16142 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16143
16144 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16145
16146 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16147
16148 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16149 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16150 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16151
16152 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16153 Include "config.h" first, as per autoconf manual.
16154
16155 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16156
16157 * decl.c (duplicate_decls): Tweak wording.
16158 * lex.c (do_pending_defargs): Don't die if we see a default arg
16159 that isn't a DEFAULT_ARG.
16160 * error.c (dump_expr): Handle DEFAULT_ARG.
16161
16162 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16163 * lang-options.h: Add -fhandle-exceptions.
16164
16165 * class.c (build_vtable): Vtables are artificial.
16166 (prepare_fresh_vtable): Likewise.
16167
16168 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16169
16170 * cvt.c (ocp_convert): After converting to the target type, set
16171 LOOKUP_NO_CONVERSION.
16172
16173 * call.c (joust): Warn about potentially confusing promotion rules
16174 with -Wsign-promo.
16175 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16176
16177 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
16178
16179 * exception.cc: Declare __terminate_func with noreturn attribute.
16180
16181 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
16182
16183 * parse.y: Break out eat_saved_input, handle errors.
16184 (function_try_block): Use compstmt instead of compstmt_or_error.
16185
16186 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16187
16188 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16189
16190 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16191
16192 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16193 existence of cc1plus check whether $(LANGUAGES) contains C++.
16194
16195 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16196
16197 * method.c (do_build_copy_constructor): When copying an anonymous
16198 union member loop around to handle nested anonymous unions. Use
16199 the offset of the member relative to the outer structure, not the
16200 union.
16201
16202 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16203
16204 * call.c (resolve_args): New fn.
16205 (build_new_function_call): Use it.
16206 (build_object_call): Likewise.
16207 (build_new_method_call): Likewise.
16208
16209 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16210
16211 * call.c (build_over_call): tsubst all default parms from templates.
16212
16213 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16214
16215 * decl.c (struct cp_function): Add static_labelno.
16216 (push_cp_function_context): Save it.
16217 (pop_cp_function_context): Restore it.
16218
16219 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16220
16221 * typeck.c (build_component_ref_1): Convert from reference.
16222
16223 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16224
16225 * parse.y (current_declspecs, prefix_attributes): Initialize to
16226 NULL_TREE.
16227
16228 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16229 before we try to force it to be a TREE_LIST.
16230 (decl): Make sure $1.t is non-nil.
16231
16232 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16233
16234 * pt.c (uses_template_parms): Handle template first-parse codes.
16235
16236 * decl.c (cp_finish_decl): Only warn about user-defined statics.
16237
16238 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16239
16240 * pt.c (unify): Handle BOOLEAN_TYPE.
16241
16242 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16243 * pt.c (tsubst): Don't set it.
16244 * call.c (build_over_call): Use uses_template_parms.
16245
16246 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16247
16248 * method.c (build_overload_nested_name): Use static_labelno
16249 instead of var_labelno.
16250 (build_qualified_name): New fn.
16251 (build_overload_name): Split out from here.
16252 (build_static_name): Use build_qualified_name.
16253 * decl.c (cp_finish_decl): Statics in extern inline functions
16254 have comdat linkage.
16255 (start_function): Initialize static_labelno.
16256
16257 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16258
16259 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16260 before "all member functions in class [] are private".
16261
16262 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16263
16264 * lex.c (do_scoped_id): convert_from_reference.
16265 * init.c (build_offset_ref): Likewise.
16266
16267 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16268
16269 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16270
16271 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16272
16273 * typeck.c (get_member_function_from_ptrfunc): Promote index
16274 before saving it.
16275
16276 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16277
16278 * tree.c (layout_basetypes): Move non-virtual destructor warning.
16279 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16280
16281 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16282
16283 * decl.c (grokdeclarator): Call add_defarg_fn for the function
16284 type, too.
16285 * lex.c (add_defarg_fn): Adjust.
16286 (do_pending_defargs): Adjust. Don't skip the first parm.
16287
16288 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
16289
16290 * decl.c (build_enumerator): Global enumerators are also readonly.
16291
16292 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16293 (build_dynamic_cast): Call it and convert_from_reference.
16294
16295 * lex.c (add_defarg_fn): New fn.
16296 (snarf_defarg): Don't add to defarg_types.
16297 (do_pending_defargs): Lose defarg_types. All fns we process now
16298 have defargs.
16299 * decl.c (grokfndecl): Call add_defarg_fn.
16300
16301 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16302 * cp-tree.def: Add DEFAULT_ARG.
16303 * spew.c (yylex): Call snarf_defarg as appropriate.
16304 * parse.y: New tokens DEFARG and DEFARG_MARKER.
16305 (defarg_again, pending_defargs, defarg, defarg1): New rules.
16306 (structsp): Use pending_defargs.
16307 (parms, full_parm): Use defarg.
16308 * lex.c (init_lex): Initialize inline_text_firstobj.
16309 (do_pending_inlines): Never pass the obstack to feed_input.
16310 (process_next_inline): Call end_input instead of restore_pending_input.
16311 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16312 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16313 * input.c (end_input): New fn.
16314 (sub_getch): At the end of some fed input, just keep returning EOF
16315 until someone calls end_input.
16316 Remove 'obstack' field from struct input_source.
16317 * decl.c (grokparms): Handle DEFAULT_ARG.
16318 (replace_defarg): New fn.
16319 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16320
16321 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16322
16323 * call.c (implicit_conversion): If nothing else works, try binding
16324 an rvalue to a reference.
16325
16326 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
16327
16328 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16329 ifndef for Cygwin32 to include SIGSEGV.
16330
16331 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16332
16333 * class.c (finish_struct_1): Only complain about pointers without
16334 copy stuff if there are any constructors.
16335
16336 * rtti.c (build_dynamic_cast): Call complete_type on the types.
16337
16338 * decl.c (grokfndecl): If the function we chose doesn't actually
16339 match, die.
16340
16341 * decl2.c (grokclassfn): Don't specify 'const int' for the
16342 artificial destructor parm.
16343
16344 * pt.c (type_unification): If we are called recursively, nothing
16345 decays.
16346
16347 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
16348
16349 * decl.c (init_decl_processing): Stop trying to catch signals
16350 other than SIGABRT since the Cygwin32 library doesn't support
16351 them correctly yet. This fixes a situation in which g++ causes
16352 a hang on SIGSEGVs and other such signals in our Win32-hosted
16353 tools.
16354
16355 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
16356
16357 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16358
16359 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
16360
16361 * typeck2.c (store_init_value): Always return the value if our
16362 type needs constructing.
16363
16364 * method.c (hack_identifier): Convert class statics from
16365 reference, too.
16366
16367 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16368
16369 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16370
16371 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
16372
16373 * typeck.c (c_expand_return): Make sure we clean up temporaries at
16374 the end of return x;
16375
16376 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16377
16378 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16379
16380 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
16381
16382 * except.c (expand_builtin_throw): Add support
16383 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16384
16385 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
16386
16387 * repo.c (extract_string): Null-terminate.
16388
16389 * cp-tree.h (TI_SPEC_INFO): New macro.
16390 (CLASSTYPE_TI_SPEC_INFO): New macro.
16391 * pt.c (push_template_decl): Correctly determine # of template parms
16392 for partial specs.
16393
16394 * call.c (compare_ics): Really fix 'this' conversions.
16395
16396 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16397 non-template fn.
16398
16399 * pt.c (push_template_decl): Complain about mismatch in # of
16400 template parms between a class template and a member template.
16401
16402 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
16403
16404 * method.c (synthesize_method): You can't call
16405 function_cannot_inline_p after finish_function.
16406 * decl.c (finish_function): Turn on flag_inline_functions and turn
16407 off DECL_INLINE before handing a synthesized method to the
16408 backend.
16409
16410 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16411
16412 * method.c (synthesize_method): Remove July 30 change to never set
16413 DECL_INLINE if at_eof.
16414
16415 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
16416
16417 * xref.c (GNU_xref_member): Ensure that the node has a
16418 decl_lang_specific part before checking DECL_FRIEND_P.
16419
16420 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16421
16422 * pt.c (instantiate_class_template): Diagnose non-class types used
16423 as bases.
16424
16425 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16426
16427 * typeck.c (build_conditional_expr): Use convert_for_initialization
16428 instead of convert_and_check.
16429
16430 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16431
16432 * parse.y (typespec): Don't pedwarn for typeof.
16433
16434 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
16435
16436 * repo.c (finish_repo): Only check changes if we would write a
16437 repo file.
16438
16439 * call.c (compare_ics): Fix handling of 'this' conversions.
16440
16441 * pt.c (do_decl_instantiation): Support static data too. Rename
16442 from do_function_instantiation.
16443 * cp-tree.h: Adjust.
16444 * parse.y: Adjust.
16445
16446 * repo.c (extract_string): New fn.
16447 (get_base_filename): Use it.
16448 (init_repo): Compare old args with current args.
16449
16450 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
16451
16452 * Makefile.in, Make-lang.in: Protect C-ls with a comment
16453 character, idea from Paul Eggert <eggert@twinsun.com>.
16454
16455 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
16456
16457 * typeck.c (c_expand_return): Be more persistent in looking for
16458 returned temps.
16459
16460 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16461 pointer to reference.
16462
16463 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16464
16465 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16466
16467 * init.c (build_member_call, build_offset_ref):
16468 Use do_scoped_id instead of do_identifier.
16469
16470 * cvt.c (convert): Remove bogosity.
16471
16472 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16473
16474 * cvt.c (build_up_reference): Do checks of ARGTYPE and
16475 TARGET_TYPE before trying to use get_binfo.
16476
16477 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
16478
16479 * cvt.c (build_up_reference): Call get_binfo to get access control.
16480
16481 * decl2.c (import_export_decl): If we don't support weaks, leave
16482 statics undefined.
16483
16484 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
16485
16486 * except.c (expand_builtin_throw): Add support for machines that
16487 cannot access globals after throw's epilogue when
16488 -fno-sjlj-exceptions is used.
16489
16490 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
16491
16492 * parse.y: 'std::' becomes '::'.
16493 * lex.c (real_yylex): Remove 'namespace' warning.
16494 * init.c (build_member_call): Ignore 'std::'.
16495 (build_offset_ref): Likewise.
16496 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16497 (do_toplevel_using_decl): Ignore 'using std::whatever'.
16498 * decl.c (push_namespace): Just sorry.
16499 (pop_namespace): Nop.
16500 (init_decl_processing): Declare std namespace.
16501
16502 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16503
16504 * search.c (push_class_decls): A name which ambiguously refers to
16505 several instantiations of the same template just refers to the
16506 template.
16507
16508 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
16509
16510 * decl.c (build_enumerator): Fix problem with unsigned long
16511 enumerated values being smashed to ints, causing overflow
16512 when computing next enumerated value (for enum values around
16513 MAX_VAL).
16514
16515 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16516
16517 * typeck.c (build_component_ref): Only call mark_used on a decl.
16518
16519 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16520
16521 * typeck.c (build_c_cast): Make the check for a ptr to function
16522 more specific before possible default_conversion call.
16523
16524 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
16525
16526 * except.c (expand_exception_blocks): Simplify and fix and make
16527 sure we don't end a region in a sequence, as expand_end_bindings
16528 doesn't like it.
16529
16530 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
16531
16532 * except.c (init_exception_processing): Mark terminate as not
16533 returning so that the optimizer can optimize better.
16534
16535 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
16536
16537 * cvt.c (convert): Don't do any extra work, if we can avoid it
16538 easily.
16539
16540 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
16541
16542 * *.[chy]: Change cp_convert to ocp_convert, change convert to
16543 cp_convert. convert is now reserved for the backend, and doesn't
16544 have the semantics a frontend person should ever want.
16545
16546 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16547
16548 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
16549 Lose -traditional support.
16550
16551 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16552
16553 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
16554
16555 * parse.y (self_reference): Do it for templates, too.
16556 * class.c (pushclass): Don't overload_template_name; the alias
16557 generated by build_self_reference serves the same purpose.
16558
16559 * tree.c (list_hash): Make static, take more args.
16560 (list_hash_lookup): Likewise.
16561 (list_hash_add): Make static.
16562 (list_hash_canon): Lose.
16563 (hash_tree_cons): Only build a new node if one isn't already in the
16564 hashtable.
16565 (hash_tree_chain): Use hash_tree_cons.
16566 * cp-tree.h: Adjust.
16567 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
16568 of calling lookup_name.
16569
16570 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
16571
16572 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
16573 doesn't refer to the CONST_DECLs.
16574
16575 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
16576
16577 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
16578 is bigger.
16579 (expand_class_desc): Convert the last argument to a sizetype.
16580
16581 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16582
16583 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
16584 __real__): Add reswords.
16585 * hash.h: Regenerate.
16586 * lex.h (rid): Add RID_COMPLEX.
16587 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
16588 * lex.c (init_lex): Add building of RID_COMPLEX.
16589 (real_yylex): General cleanup in line with what c-lex.c also has,
16590 sans the cruft for traditional; add handling of SPEC_IMAG, complex
16591 types, and imaginary numeric constants.
16592 * parse.y (REALPART, IMAGPART): Add tokens.
16593 (unary_expr): Add REALPART and IMAGPART rules.
16594 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
16595 * decl.c (complex_{integer,float,double,long}_type_node): Define
16596 types.
16597 (init_decl_processing): Set up the types.
16598 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
16599 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
16600 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16601 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
16602 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
16603 COMPLEX_TYPE case.
16604 * method.c (build_overload_name): Add handling of the different
16605 COMPLEX_TYPEs, prefixing them with `J'.
16606 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
16607 as a template parm.
16608 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
16609 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
16610 (mapcar): Handle COMPLEX_CST.
16611 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
16612 (common_type): Add code for complex types.
16613 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16614 (convert_for_assignment): Likewise.
16615 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
16616
16617 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
16618
16619 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
16620 tsubst_expr, as it might try to do overload resolution.
16621
16622 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16623
16624 * pt.c (instantiate_class_template): Oops.
16625
16626 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16627
16628 * cp-tree.def: Add TAG_DEFN.
16629 * pt.c (tsubst_enum): New fn.
16630 (instantiate_class_template): Use it.
16631 (tsubst_expr): Support TAG_DEFN.
16632 (tsubst): Support local enums.
16633 (tsubst_copy): Likewise.
16634 * decl.c (finish_enum): Likewise.
16635 (start_enum): If this is a local enum, switch to permanent_obstack.
16636
16637 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
16638
16639 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
16640 (finish_function): Put the base init code for constructors just
16641 after the parm cleanup insns.
16642 (struct cp_function): Add last_parm_cleanup_insn.
16643 (pu
This page took 0.772615 seconds and 5 git commands to generate.