]>
Commit | Line | Data |
---|---|---|
ff47d094 MM |
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 | ||
70adf8a9 JM |
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 | ||
fd81d24f ZW |
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 | ||
70a51bda KG |
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 | ||
eca1bd08 UD |
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 | ||
07a3462a JW |
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 | ||
ab044c74 JM |
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 | ||
5e19c053 MM |
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 | ||
d4bf4842 JM |
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 | ||
02e59efb KG |
124 | 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
125 | ||
126 | * cp-tree.h (make_thunk): PROTO -> PARAMS. | |
127 | ||
808c61c8 NS |
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 | ||
28531dd0 MM |
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 | ||
d828f724 UD |
208 | 2000-01-28 Ulrich Drepper <drepper@redhat.com> |
209 | ||
210 | * cp/decl.c: Adjust variable names, comments, help strings. | |
211 | ||
97119bb7 NS |
212 | 2000-01-29 Nathan Sidwell <nathan@acm.org> |
213 | ||
214 | * new2.cc (operator delete[]): Use operator delete, don't assume | |
215 | implementation. | |
216 | ||
02fed91d NS |
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 | ||
c0bbf652 MM |
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 | ||
7267d692 NS |
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 | ||
aa1eac0c JW |
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 | ||
e905ac8a MS |
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 | ||
24e2e58e JM |
289 | 2000-01-26 Jason Merrill <jason@casey.cygnus.com> |
290 | ||
291 | * pt.c (unify): Use fold, not maybe_fold_nontype_arg. | |
292 | ||
e09d24ff R |
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 | ||
158991b7 KG |
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 | ||
7913f3d0 RH |
330 | 2000-01-25 Richard Henderson <rth@cygnus.com> |
331 | ||
332 | * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. | |
333 | ||
1a588ad7 MM |
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 | ||
4dacf5bd KG |
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 | ||
ddcc7cf6 GDR |
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 | ||
534170eb MM |
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 | ||
7610f2ce JM |
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 | ||
1eb8759b RH |
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 | ||
059fa5e7 NS |
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 | ||
1aa4ccd4 NS |
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 | ||
db1147b2 NS |
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 | ||
ba793d6e MM |
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 | ||
92ac3c0f BL |
462 | 2000-01-23 Brad Lucier <lucier@math.purdue.edu> |
463 | ||
464 | * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. | |
465 | ||
bf419747 MM |
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 | ||
f08dda39 NS |
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 | ||
f621dedc GDR |
493 | 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom> |
494 | ||
1eb8759b | 495 | * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. |
f621dedc | 496 | |
1eb8759b RH |
497 | * typeck2.c (incomplete_type_error): Restore previous |
498 | cp_error and cp_error_at call sequence. | |
f621dedc | 499 | |
2984dacf BL |
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 | ||
7e4d7898 GDR |
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 | ||
301e21af MM |
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 | ||
e5f614d7 NS |
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 | ||
051e6fd7 MM |
557 | 2000-01-17 Mark Mitchell <mark@codesourcery.com> |
558 | ||
97d953bb MM |
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 | ||
a68ad5bd MM |
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 | ||
051e6fd7 MM |
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 | ||
84602ee0 MM |
623 | 2000-01-16 Mark Mitchell <mark@codesourcery.com> |
624 | ||
1eb4bea9 MM |
625 | * class.c (finish_struct_1): Replace redundant code with |
626 | assertions. | |
627 | ||
bbd15aac MM |
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 | ||
a6786148 MM |
680 | * init.c (construct_virtual_bases): Don't look up the addresses of |
681 | virtual bases at run-time. | |
682 | ||
f8361147 MM |
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 | ||
5bb2a292 MM |
688 | * decl.c (init_decl_processing): Complain if -fnew-abi |
689 | -fno-vtable-thunks is used. | |
690 | ||
84602ee0 MM |
691 | * decl2.c (lang_decode_option): Don't couple flag_honor_std to |
692 | flag_new_abi. | |
693 | ||
70ae3201 MM |
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 | ||
ef97bf6b MM |
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 | ||
64f1326a ML |
725 |