a0a3f49fb14de418f6651fdf396954cebdeed51a
[gcc.git] / gcc / cp / ChangeLog
1 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
2
3 * decl.c: Include c-common.h.
4 (shadow_warning): Move to c-common.c.
5
6 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7
8 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9
10 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11
12 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
13
14 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
15
16 PR g++/164
17 * init.c (sort_base_init): Allow binfos to be directly specified.
18 * method.c (do_build_copy_constructor): Explicitly convert to the
19 base instance.
20 (do_build_assign_ref): Likewise.
21
22 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
23
24 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
25 declaration and initialization.
26
27 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
28
29 * typeck2.c: Remove leading capital from diagnostic messages, as
30 per GNU coding standards.
31
32 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
33
34 PR c++/3394
35 * decl.c (xref_basetypes): Handle attributes between
36 'class' and name.
37
38 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
39
40 PR g++/3381
41 * parse.y (named_complex_class_head_sans_basetype): Add new
42 reduction.
43 * Make-lang.in (parse.c): Adjust expected conflict count.
44
45 2001-12-03 Jason Merrill <jason@redhat.com>
46
47 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
48 immediate binfos for our virtual bases.
49
50 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
51
52 * call.c (build_java_interface_fn_ref): Similarly.
53 * except.c (is_admissible_throw_operand): Similarly.
54 * init.c (build_java_class_ref): Similarly.
55 * xref.c (open_xref_file): Similarly.
56
57 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
58
59 * class.c (finish_struct): Remove trailing periods from messages.
60 * decl.c (check_tag_decl): Similarly.
61 * lex.c (cxx_set_yydebug): Similarly.
62 * typeck2.c (friendly_abort): Similarly.
63
64 2001-11-29 Mark Mitchell <mark@codesourcery.com>
65
66 PR c++/3048
67 * cp-tree.h (ovl_member): Remove.
68 * decl2.c (merge_functions): Handle extern "C" functions
69 specially.
70 * tree.c (ovl_member): Remove.
71
72 2001-11-29 Mark Mitchell <mark@codesourcery.com>
73
74 PR c++/4842
75 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
76 FUNCTION_DECL, as input.
77 (mark_overriders): Remove.
78 (warn_hidden): Rework for the new ABI.
79
80 2001-11-29 Mark Mitchell <mark@codesourcery.com>
81
82 PR c++/3471
83 * call.c (convert_like_real): Do not build additional temporaries
84 for rvalues of class type.
85
86 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
87
88 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
89 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
90 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
91 (DERIVED_FROM_P): Likewise.
92 (enum base_access): Renumber, add ba_quiet bit mask.
93 (get_binfo): Remove.
94 (get_base_distance): Remove.
95 (binfo_value): Remove.
96 (ACCESSIBLY_DERIVED_FROM_P): Remove.
97 * call.c (standard_conversion): Use lookup_base.
98 * class.c (strictly_overrides): Likewise.
99 (layout_virtual_bases): Likewise.
100 (warn_about_ambiguous_direct_bases): Likewise.
101 (is_base_of_enclosing_class): Likewise.
102 (add_vcall_offset_vtbl_entries_1): Likewise.
103 * cvt.c (build_up_reference): Adjust comment.
104 * init.c (build_member_call): Reformat.
105 * search.c (get_binfo): Remove.
106 (get_base_distance_recursive): Remove.
107 (get_base_distance): Remove.
108 (lookup_base_r): Tweak.
109 (lookup_base): Add ba_quiet control. Complete the types here.
110 (covariant_return_p): Use lookup_base.
111 * tree.c (binfo_value): Remove.
112 (maybe_dummy_object): Use lookup_base.
113 * typeck.c (build_static_cast): Use lookup_base.
114 (get_delta_difference): Likewise.
115 * typeck2.c (binfo_or_else): Use lookup_base.
116 (build_scoped_ref): Add back error_mark_check.
117 (build_m_component_ref): Use lookup_base.
118
119 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
120
121 * Make-lang.in (c++.generated-manpages): New dummy target.
122
123 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
124
125 * Make-lang.in (cp-lang.o): Depends on c-common.h.
126 * cp-lang.c (c-common.h): Include.
127 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
128 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
129 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
130
131 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
132
133 * decl2.c (c_language): Move to c-common.c.
134 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
135 functions.
136 (cxx_init): Update.
137
138 2001-11-26 Jason Merrill <jason@redhat.com>
139
140 * call.c (joust): Remove COND_EXPR hack.
141
142 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
143
144 * cp/search.c (lookup_base_r): Declare bk in variable declaration
145 space.
146
147 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
148
149 PR g++/3145
150 * class.c (build_vbase_pointer): Remove.
151 (build_vbase_path): Remove.
152 (build_base_path): New function.
153 * cp-tree.h (base_access, base_kind): New enumerations.
154 (build_base_path): Declare.
155 (convert_pointer_to_real): Remove.
156 (convert_pointer_to): Remove.
157 (lookup_base): Declare.
158 (convert_pointer_to_vbase): Remove.
159 * call.c (build_scoped_method_call): Use lookup_base &
160 build_base_path instead of convert_pointer_to_real,
161 get_base_distance & get_binfo.
162 (build_over_call): Likewise.
163 * cvt.c (cp_convert_to_pointer): Likewise.
164 (convert_to_pointer_force): Likewise.
165 (build_up_reference): Likewise.
166 (convert_pointer_to_real): Remove.
167 (convert_pointer_to): Remove.
168 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
169 instead of convert_pointer_to_vbase & build_vbase_path.
170 (emit_base_init): Use build_base_path instead of
171 convert_pointer_to_real.
172 (expand_virtual_init): Lose unrequired conversions.
173 (resolve_offset_ref): Use lookup_base and build_base_path
174 instead of convert_pointer_to.
175 * rtti.c (build_dynamic_cast_1): Use lookup_base &
176 build_base_path instead of get_base_distance & build_vbase_path.
177 * search.c (get_vbase_1): Remove.
178 (get_vbase): Remove.
179 (convert_pointer_to_vbase): Remove.
180 (lookup_base_recursive): New function.
181 (lookup_base): New function.
182 * typeck.c (require_complete_type): Use lookup_base &
183 build_base_path instead of convert_pointer_to.
184 (build_component_ref): Likewise.
185 (build_x_function_call): Likewise.
186 (get_member_function_from_ptrfunc): Likewise.
187 (build_component_addr): Likewise.
188 * typeck2.c (build_scoped_ref): Likewise.
189
190 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
191
192 * cp-tree.h (CP_TYPE_QUALS): Removed.
193 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
194 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
195 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
196 * dump.c (cp_dump_tree): Use void* dump_info argument to match
197 lang-hooks prototype.
198 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
199 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
200 CP_TYPE_QUALS changed to cp_type_quals.
201 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
202 (CXX_C_OBJS): Remove c-dump.o.
203
204 2001-11-21 Mark Mitchell <mark@codesourcery.com>
205
206 PR c++/3637
207 * pt.c (lookup_template_class): Ensure that all specializations
208 are registered on the list corresponding to the most general
209 template.
210
211 2001-11-20 Mark Mitchell <mark@codesourcery.com>
212
213 * call.c (non_reference): Add documentation.
214 (convert_class_to_reference): Do not strip reference types
215 from conversion operators.
216 (maybe_handle_ref_bind): Simplify.
217 (compare_ics): Correct handling of references.
218
219 2001-11-19 John Wilkinson <johnw@research.att.com>
220
221 * dump.c (dump_op): New function.
222 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
223 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
224 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
225
226 2001-11-19 Mark Mitchell <mark@codesourcery.com>
227
228 PR4629
229 * semantics.c (finish_sizeof): Make sure that expression created
230 while processing a template do not have a type.
231 (finish_alignof): Likewise.
232 * typeck.c (c_sizeof): Likewise.
233 (expr_sizeof): Likewise.
234
235 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
236
237 * lex.c (cxx_finish): Call c_common_finish.
238 (finish_parse): Remove.
239
240 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
241
242 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
243 when displaying error message about missing array bounds.
244
245 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
246
247 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
248 CONST_CAST_EXPR.
249 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
250
251 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
252
253 * cp-tree.h (print_class_statistics): Restore.
254
255 2001-11-15 Jason Merrill <jason@redhat.com>
256
257 * method.c (use_thunk): Don't emit debugging information for thunks.
258
259 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
260 * decl.c (make_typename_type): Handle getting a class template.
261 * search.c (lookup_field_r): A class template is good enough for
262 want_type.
263
264 * call.c (convert_like_real): Only use cp_convert for the bad part.
265 (standard_conversion): Also allow bad int->enum.
266 * typeck.c (ptr_reasonably_similar): Also allow functions to
267 interconvert. Pointers to same-size integers are reasonably
268 similar.
269
270 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
271 give it void type.
272
273 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
274
275 PR g++/3154
276 * init.c (sort_base_init): Remove unreachable code.
277 (expand_member_init): Adjust comment to reflect reality. Simplify
278 and remove unreachable code.
279
280 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
281
282 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
283 (cxx_init): Update prototype.
284 * decl.c (init_decl_processing): Rename. Move null node init
285 to its creation time.
286 * lex.c (cxx_init_options): Update.
287 (cxx_init): Combine with old init_parse; also call
288 cxx_init_decl_processing.
289
290 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
291
292 * decl.c (check_initializer): Try to complete the type of an
293 array element before checking whether it's complete. Don't
294 complain about arrays with complete element types but an
295 unknown size.
296 (cp_finish_decl): Build the hierarchical constructor before
297 calling maybe_deduce_size_from_array_init.
298
299 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
300
301 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
302
303 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
304
305 PR g++/4206
306 * parse.y (already_scoped_stmt): Remove.
307 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
308
309 2001-11-12 H.J. Lu <hjl@gnu.org>
310
311 * cp/cvt.c (ocp_convert): Don't warn the address of a weak
312 function is always `true'.
313
314 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
315
316 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
317 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
318 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
319 * cp-tree.h (print_class_statistics): Remove.
320 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
321 cxx_print_identifier, cxx_set_yydebug): New.
322 * lex.c (set_yydebug): Rename c_set_yydebug.
323 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
324 lang_print_xnode): Rename.
325 * tree.c (print_lang_statistics): Rename.
326
327 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
328
329 * class.c (dump_array): Fix format specifier warning.
330
331 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
332
333 * cp-lang.c (LANG_HOOKS_NAME): Override.
334 (struct lang_hooks): Constify.
335 * lex.c (cxx_init_options): Update.
336 (lang_identify): Remove.
337 * parse.y (language_string): Remove.
338
339 2001-11-08 Andreas Franck <afranck@gmx.de>
340
341 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
342 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
343 suggested by autoconf.
344 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
345 (c++.install-common): Use the transformed target alias names.
346
347 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
348
349 * Make-lang.in: Update.
350 * cp-lang.c: Include langhooks-def.h.
351
352 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
353
354 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
355
356 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
357
358 * lex.c (copy_lang_type): Add static prototype.
359
360 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
361
362 * pt.c (unify): Handle SCOPE_REF.
363
364 2001-11-01 Jakub Jelinek <jakub@redhat.com>
365
366 * tree.c (cp_copy_res_decl_for_inlining): Adjust
367 DECL_ABSTRACT_ORIGIN for the return variable.
368
369 2001-10-31 Zack Weinberg <zack@codesourcery.com>
370
371 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
372
373 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
374
375 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
376 semantics.c, spew.c: Fix spelling errors.
377
378 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
379
380 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
381
382 2001-10-25 Zack Weinberg <zack@codesourcery.com>
383
384 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
385 pop_everything.
386
387 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
388
389 * cp-lang.c (cxx_get_alias_set): New function.
390 Point LANG_HOOKS_GET_ALIAS_SET to it.
391
392 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
393
394 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
395 * cp-tree.h (make_unbound_class_template): Prototype new function.
396 * decl.c (make_unbound_class_template): New function.
397 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
398 * error.c (dump_type): Likewise.
399 * mangle.c (write_type): Likewise.
400 * parse.y (template_parm): Likewise.
401 (template_argument): Use make_unbound_class_template.
402 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
403 (tsubst): Likewise.
404 (tsubst_copy): Likewise.
405 (unify): Likewise.
406 * tree.c (walk_tree): Likewise.
407 * typeck.c (comptypes): Likewise.
408
409 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
410
411 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
412 extra calls into fewer ones.
413
414 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
415
416 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
417 Warn when merging inline with attribute noinline.
418 (start_decl, start_function): Warn if inline and attribute
419 noinline appear in the same declaration.
420
421 2001-10-16 H.J. Lu <hjl@gnu.org>
422
423 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
424 for tree checking disabled.
425
426 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
427
428 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
429 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
430
431 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
432
433 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
434 (unify): Only handle MINUS_EXPR specially if the above flag is set
435 and the subtracted constant is 1. Clear the flag on recursive calls.
436 Set it when unifying the maximum value in an INTEGER_TYPE's range.
437
438 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
439
440 * decl.c (bad_specifiers): Don't allow exception specifications
441 on any typedefs.
442
443 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
444
445 * cp/lex.c (init_cp_pragma): Similarly.
446
447 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
448
449 * pt.c (lookup_template_class): Build complete template arguments
450 for BOUND_TEMPLATE_TEMPLATE_PARM.
451
452 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
453
454 * cp-tree.h (TYPE_BINFO): Update comment.
455 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
456 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
457 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
458 (copy_type): Prototype new function.
459 * lex.c (copy_lang_decl): Gather tree node statistics.
460 (copy_lang_type): New function.
461 (copy_type): Likewise.
462 (cp_make_lang_type): Create lang_type for
463 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
464 and BOUND_TEMPLATE_TEMPLATE_PARM.
465 * pt.c (tsubst): Use copy_type instead of copy_node.
466 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
467
468 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
469
470 * pt.c (determine_specialization): Ignore functions without
471 DECL_TEMPLATE_INFO.
472
473 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
474
475 PR g++/4476
476 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
477
478 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
479
480 * typeck2.c (store_init_value): Don't re-digest a bracketed
481 initializer.
482
483 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
484 ANON_AGGR_TYPE_P.
485
486 2001-10-11 Richard Henderson <rth@redhat.com>
487
488 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
489 of an asm statement.
490 (build_vtbl_ref_1): Split out from build_vtbl_ref.
491 (build_vfn_ref): Use it to handle vtable descriptors before
492 calling build_vtable_entry_ref.
493 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
494
495 2001-10-10 Richard Henderson <rth@redhat.com>
496
497 * parse.y (asm_operand): Allow named operands.
498 * semantics.c (finish_asm_stmt): Tweek for changed location
499 of the operand constrant.
500
501 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
502
503 * call.c (standard_conversion): Add bad conversion between
504 integers and pointers.
505 (convert_like_real): Don't use convert_for_initialization for bad
506 conversions; complain here and use cp_convert.
507 (build_over_call): Don't handle bad conversions specially.
508 (perform_implicit_conversion): Allow bad conversions.
509 (can_convert_arg_bad): New fn.
510 * cp-tree.h: Declare it.
511 * typeck.c (convert_for_assignment): Use it.
512 (ptr_reasonably_similar): Any target type is similar to void.
513
514 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
515
516 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
517 (cp/cp-lang.o): New rule.
518 * cp-tree.h: Declare hooks.
519 * tree.c: Make hooks non-static.
520 (init_tree): Don't initialize hooks here.
521 * lex.c: Likewise. Move definition of lang_hooks to...
522 * cp-lang.c: ... new file.
523
524 2001-10-08 Richard Henderson <rth@redhat.com>
525
526 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
527 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
528
529 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
530
531 * class.c (build_vtable_entry_ref): Const-ify.
532 * decl.c (predefined_identifier,
533 initialize_predefined_identifiers): Likewise.
534 * init.c (build_new_1): Likewise.
535 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
536 Likewise.
537
538 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
539
540 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
541 (INSNS_PER_STMT): Likewise.
542 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
543 (copy_body, initialize_inlined_parameters): Likewise.
544 (declare_return_variable, inlinable_function_p): Likewise.
545 (expand_call_inline, expand_calls_inline): Likewise.
546 (optimize_inline_calls, clone_body): Likewise.
547 * tree.c (walk_tree): Moved to ../tree-inline.c.
548 (walk_tree_without_duplicates): Likewise.
549 (copy_tree_r, remap_save_expr): Likewise.
550
551 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
552
553 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
554 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
555 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
556 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
557 (flag_inline_trees): Moved declaration to ../tree-inline.h.
558 (walk_tree): Moved declaration to ../tree-inline.h.
559 (walk_tree_without_duplicates, copy_tree_r): Likewise.
560 (remap_save_expr): Likewise.
561 * decl.c: Include tree-inline.h.
562 (lang_mark_tree): Don't mark inlined_fns.
563 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
564 * optimize.c: Include tree-inline.h.
565 (optimize_inline_calls): Move declaration to ../tree.h, as
566 non-static.
567 (remap_decl): Use language-independent constructs and hooks.
568 (remap_block, copy_body_r, declare_return_variable): Likewise.
569 (inlinable_function_p): Likewise. Don't test for
570 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
571 no longer language-specific.
572 (optimize_inline_calls): Likewise. Make it non-static. Moved
573 call of dump_function to...
574 (optimize_function): Here...
575 (clone_body): New function, extracted from...
576 (maybe_clone_body): ... here. Build decl_map locally and pass
577 it on to clone_body.
578 * pt.c, semantics.c: Include tree-inline.h.
579 * tree.c: Likewise.
580 (cp_walk_subtrees): New language-specific hook for tree inlining.
581 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
582 cp_is_overload_p, cp_auto_var_in_fn_p,
583 cp_copy_res_decl_for_inlining): Likewise.
584 (walk_tree): Move language-specific constructs into...
585 (cp_walk_subtrees): this new function.
586 (copy_tree_r): Use language-independent constructs and hooks.
587 (init_tree): Initialize tree inlining hooks.
588 (remap_save_expr): Adjust prototype so that the declaration
589 does not require the definition of splay_tree.
590
591 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
592
593 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
594 to build the declaration instead of the declaration itself.
595
596 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
597
598 * decl2.c (cxx_decode_option): Add 'else'.
599
600 * spew.c (end_input): No longer static.
601 * cp-tree.h: Declare it.
602 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
603
604 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
605
606 * call.c (build_over_call), typeck.c (build_function_call_real):
607 Pass type attributes to check_function_format rather than name or
608 assembler name. Don't require there to be a name or assembler
609 name to check formats.
610
611 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
612
613 * decl.c (init_decl_processing): Don't call
614 init_function_format_info. Initialize lang_attribute_table
615 earlier.
616 (builtin_function): Call decl_attributes.
617 (insert_default_attributes): New.
618
619 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
620
621 * decl.c (grokdeclarator): Copy array typedef handling from C
622 frontend.
623
624 * decl.c (grokdeclarator): Copy too-large array handling from C
625 frontend.
626
627 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
628
629 * config-lang.in (target_libs): Added target-gperf, so that we
630 don't try to build it if C++ is disabled.
631
632 2001-09-23 Zack Weinberg <zack@codesourcery.com>
633
634 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
635 (cp/errfn.o): Delete rule.
636 (cp/error.o): Depend on flags.h.
637 * errfn.c: Delete file.
638 * cp-tree.h: Declare warn_deprecated. Remove definitions of
639 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
640 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
641 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
642 internal_error respectively. Make cp_deprecated into a macro.
643 Don't define cp_printer typedef or declare cp_printers.
644 * error.c: Include flags.h.
645 Delete: struct tree_formatting_info, print_function_argument_list,
646 print_declaration, print_expression, print_function_declaration,
647 print_function_parameter, print_type_id, print_cv_qualifier_seq,
648 print_type_specifier_seq, print_simple_type_specifier,
649 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
650 print_parameter_declaration_clause, print_exception_specification,
651 print_nested_name_specifier, and definition of cp_printers.
652 (locate_error): New function.
653 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
654 rewritten in terms of locate_error and diagnostic.c.
655 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
656 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
657 (init_error): Adjust to match.
658
659 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
660
661 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
662
663 2001-09-21 Richard Henderson <rth@redhat.com>
664
665 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
666 (build_vtbl_initializer): Likewise.
667 (build_vfn_ref): New.
668 * cp-tree.h: Declare it.
669 * call.c (build_over_call): Use it.
670 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
671 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
672
673 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
674
675 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
676
677 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
678
679 Table-driven attributes.
680 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
681 * decl2.c (cplus_decl_attributes): Only take one attributes
682 parameter.
683 * cp-tree.c (cplus_decl_attributes): Update prototype.
684 * class.c (finish_struct), decl.c (start_decl, start_function),
685 decl2.c (grokfield), friend.c (do_friend), parse.y
686 (parse_bitfield): Update calls to cplus_decl_attributes.
687 * decl.c (grokdeclarator): Take a pointer to a single ordinary
688 attribute list.
689 * decl.h (grokdeclarator): Update prototype.
690 * decl2.c (grokfield): Take a single ordinary attribute list.
691 * friend.c (do_friend): Likewise.
692 * decl.c (shadow_tag, groktypename, start_decl,
693 start_handler_parms, grokdeclarator, grokparms, start_function,
694 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
695 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
696 (process_template_parm, do_decl_instantiation): Pass single
697 ordinary attribute lists around.
698 * decl.c (grokdeclarator): Correct handling of nested attributes.
699 Revert the patch
700 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
701 * decl.c (grokdeclarator): Embedded attrs bind to the right,
702 not the left.
703 .
704 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
705 (cp_attribute_table): Declare.
706 * decl.c (valid_lang_attribute): Don't define.
707 (lang_attribute_table): Define.
708 (init_decl_processing): Initialize lang_attribute_table instead of
709 valid_lang_attribute.
710 * tree.c (cp_valid_lang_attribute): Remove.
711 (handle_java_interface_attribute, handle_com_interface_attribute,
712 handle_init_priority_attribute): New functions.
713 (cp_attribute_table): New array.
714 * decl2.c (import_export_class): Don't use
715 targetm.valid_type_attribute.
716
717 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
718
719 * Make-lang.in (cp/error.o): Depend on real.h
720 * error.c: #include "real.h"
721
722 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
723
724 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
725 xmalloc/strcpy/strcat.
726
727 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
728
729 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
730 Const-ification.
731 * pt.c (tsubst_decl): Likewise.
732
733 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
734
735 * decl2.c (lang_f_options): Const-ification.
736 * lex.c (cplus_tree_code_name): Likewise.
737 * spew.c (yyerror): Likewise.
738
739 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
740
741 PR c++/3986
742 * class.c (force_canonical_binfo_r): Check & move an indirect
743 primary base first.
744 (force_canonical_binfo): Check that it's not already
745 canonical.
746 (mark_primary_virtual_base): Remove BINFO parameter.
747 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
748
749 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
750
751 Remove TYPE_NONCOPIED_PARTS.
752 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
753 CLASSTYPE_PURE_VIRTUALS.
754 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
755 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
756 (layout_class_type): Don't call fixup_inline_methods here ...
757 (finish_struct_1): ... call it here.
758
759 2001-09-04 Mark Mitchell <mark@codesourcery.com>
760
761 * decl.c (duplicate_decls): Remove code deadling with
762 DECL_SAVED_INSNS.
763 * decl2.c (finish_file): Likewise.
764 * pt.c (instantiate_decl): Likewise.
765 * semantics.c (expand_body): Don't defer local functions if
766 they wouldn't be deferred for some other reason. Don't
767 generate RTL for functions that will not be emitted.
768 (genrtl_start_function): Remove code deadling with
769 DECL_SAVED_INSNS.
770 (genrtl_finish_function): Likewise.
771
772 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
773
774 PR c++/4203
775 * call.c (build_over_call): Do not optimize any empty base
776 construction.
777
778 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
779
780 * error.c (dump_template_decl): Output template parameters
781 together with their specifiers.
782 Output `class' prefix for template template parameter.
783 (dump_decl): Fix formatting.
784
785 2001-08-30 Kurt Garloff <garloff@suse.de>
786
787 * optimize.c (inlinable_function_p): Allow only smaller single
788 functions. Halve inline limit after reaching recursive limit.
789
790 2001-08-30 Joern Rennecke <amylaar@redhat.com>
791 Jason Merrill <jason_merrill@redhat.com>
792
793 * class.c (build_vtable_entry_ref): Subtract in char*, not
794 ptrdiff_t.
795
796 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
797
798 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
799 (build_cplus_array_type): Use cp_build_qualified_type, not
800 TYPE_MAIN_VARIANT, to get an unqualified version.
801
802 * decl2.c (grok_alignof): Lose.
803 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
804 * typeck.c (c_alignof): Lose.
805 * semantics.c (finish_sizeof, finish_alignof): New.
806 * parse.y: Use them.
807 * cp-tree.h: Declare them.
808
809 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
810
811 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
812 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
813 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
814
815 2001-08-19 Jakub Jelinek <jakub@redhat.com>
816
817 * typeck2.c (add_exception_specifier): Only require complete type if
818 not in processing template declaration.
819
820 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
821
822 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
823 GNU_xref_start_scope and GNU_xref_end_scope.
824
825 * tree.c (TYPE_HASH): Moved to ../tree.h.
826
827 2001-08-16 Mark Mitchell <mark@codesourcery.com>
828
829 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
830 on COMPOUND_EXPRs.
831
832 2001-08-14 Richard Henderson <rth@redhat.com>
833
834 * class.c, cp-tree.h (build_vfn_ref): Remove.
835 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
836
837 2001-08-13 Mark Mitchell <mark@codesourcery.com>
838
839 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
840 empty class assignment as having side-effects to avoid
841 spurious warnings.
842
843 2001-08-13 Zack Weinberg <zackw@panix.com>
844
845 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
846 * except.c: Include libfuncs.h.
847
848 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
849
850 * decl.c (grokdeclarator): Clarify diagnostic message.
851
852 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
853
854 * decl2.c (do_nonmember_using_decl): Replace using directive
855 with using declaration in the error message.
856
857 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
858
859 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
860 criterion to avoid rebuilding expression tree instead of
861 processing_template_decl.
862
863 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
864
865 Support named return value optimization for inlines, too.
866 * decl.c (finish_function): Nullify returns here.
867 * semantics.c (genrtl_start_function): Not here.
868 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
869 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
870 Also nullify the CLEANUP_STMT for the nrv.
871 * cp-tree.h: Declare it.
872 * optimize.c (declare_return_variable): Replace the nrv with the
873 return variable.
874 * typeck.c (check_return_expr): Be more flexible on alignment check.
875 Ignore cv-quals when checking for a matching type.
876
877 2001-08-09 Richard Henderson <rth@redhat.com>
878
879 * decl2.c (finish_objects): Use target hooks instead of
880 assemble_constructor and assemble_destructor.
881
882 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
883
884 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
885
886 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
887
888 PR c++/3820
889 Stop using TYPE_NONCOPIED_PARTS.
890 * call.c (build_over_call): Be careful when copy constructing
891 or assigning to an empty class.
892 * class.c (check_bases_and_members): It has a
893 COMPLEX_ASSIGN_REF if it has a vptr.
894 (layout_class_type): Don't add empty class padding to
895 TYPE_NONCOPIED_PARTS.
896 (finish_struct_1): Don't add the VFIELD either.
897 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
898 initialization.
899
900 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
901
902 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
903
904 2001-08-06 Richard Henderson <rth@redhat.com>
905
906 * decl2.c (finish_objects): Pass a symbol_ref and priority to
907 assemble_{constructor,destructor}. Remove priority handling.
908
909 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
910
911 Don't allow template-id in using-declaration.
912 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
913 (do_class_using_decl): Likewise.
914
915 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
916
917 * cp/spew.c (read_token): No need to pop buffers.
918
919 2001-08-02 Stan Shebs <shebs@apple.com>
920
921 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
922 (fnaddr_from_vtable_entry): Remove decl.
923 * method.c (use_thunk): Update comment.
924
925 2001-08-01 Andrew Cagney <ac131313@redhat.com>
926
927 * repo.c (get_base_filename): Change return value to const char
928 pointer.
929
930 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
931
932 Kill -fhonor-std.
933 * NEWS: Document.
934 * cp-tree.h (flag_honor_std): Remove.
935 (CPTI_FAKE_STD): Remove.
936 (std_node): Remove comment about it being NULL.
937 (fake_std_node): Remove.
938 * decl.c (in_fake_std): Remove.
939 (walk_namespaces_r): Remove fake_std_node check.
940 (push_namespace): Remove in_fake_std code.
941 (pop_namespace): Likewise.
942 (lookup_name_real): Remove fake_std_node check.
943 (init_decl_processing): Always create std_node. Always add
944 std:: things there.
945 (builtin_function): Always put non '_' fns in std.
946 * decl2.c (flag_honor_std): Remove.
947 (lang_f_options): Remove honor-std.
948 (unsupported_options): Add honor-std.
949 (set_decl_namespace): Remove fake_std_node check.
950 (validate_nonmember_using_decl): Likewise.
951 (do_using_directive): Likewise.
952 (handle_class_head): Likewise.
953 * dump.c (cp_dump_tree): Likewise.
954 * except.c (init_exception_processing): Adjust.
955 * init.c (build_member_call): Remove fake_std_node check.
956 (build_offset_ref): Likewise.
957 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
958 * rtti.c (init_rtti_processing): Adjust.
959
960 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
961
962 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
963 operand while calling cp_tree_equal.
964
965 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
966
967 The 3.0 ABI no longer has vbase pointer fields.
968 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
969 FORMAT_VBASE_NAME): Remove.
970 * method.c (do_build_copy_constructor): Adjust.
971 (do_build_assign_ref): Adjust.
972 * search.c (lookup_field_r): Adjust.
973 * typeck.c (build_component_ref): Adjust.
974
975 The 3.0 ABI always has a vtable pointer at the start of every
976 polymorphic class.
977 * rtti.c (build_headof_sub): Remove.
978 (build_headof): Adjust.
979 (get_tinfo_decl_dynamic): No need to check flag_rtti
980 here. Adjust.
981 (create_real_tinfo_var): Explain why we need a hidden name.
982
983 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
984
985 PR c++/3631
986 * class.c (update_vtable_entry_for_fn): The fixed adjustment
987 of a virtual thunk should be from declaring base.
988
989 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
990
991 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
992 the shared virtual base, so preserving inheritance graph order.
993
994 2001-07-30 Andreas Jaeger <aj@suse.de>
995
996 * decl2.c: Remove unused var global_temp_name_counter.
997
998 2001-07-28 Richard Henderson <rth@redhat.com>
999
1000 * method.c (pending_inlines): Remove.
1001
1002 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
1003
1004 * class.c (mark_primary_virtual_base): Don't adjust base
1005 offsets here.
1006 (dfs_unshared_virtual_bases): Adjust them here.
1007 (mark_primary_bases): Explain why we adjust at the end.
1008
1009 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
1010
1011 * class.c (finish_struct_1): When copying the primary base's
1012 VFIELD, make sure we find it is at offset zero.
1013
1014 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1015
1016 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
1017 tsubst_expr for default template arguments.
1018
1019 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1020
1021 PR c++/3621
1022 * spew.c (yylex): Only copy the token's lineno, if it is
1023 non-zero.
1024
1025 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1026
1027 PR c++/3624
1028 * call.c (resolve_args): Simplify, call
1029 convert_from_reference.
1030 (build_new_op): Resolve and convert from reference ARG1
1031 earlier. Adjust ARG2 & ARG3 resolve and conversion.
1032
1033 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1034
1035 * decl.c (last_function_parm_tags): Remove.
1036 (current_function_parm_tags): Remove.
1037 (init_decl_processing): Adjust.
1038 (start_function): Adjust.
1039 (store_parm_decls): Adjust.
1040
1041 PR c++/3152
1042 * decl.c (grokdeclarator): Detect when a function typedef is
1043 declaring a function, and create last_function_parms correctly.
1044
1045 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
1046
1047 * call.c (joust): Only prefer a non-builtin candidate to a builtin
1048 one if they have the same signature.
1049
1050 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
1051 it rather than toplevel_bindings_p. Give it a mangled name if static.
1052 (convert_to_reference): Adjust.
1053 * decl2.c (get_temp_name): Lose.
1054 * mangle.c (mangle_ref_init_variable): New fn.
1055 (mangle_guard_variable): Strip the ref-init header.
1056 * cp-tree.h: Adjust.
1057 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
1058 initializer.
1059 (grok_reference_init): Always use DECL_INITIAL.
1060
1061 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1062
1063 PR c++/3416
1064 * call.c (build_conditional_expr): Recheck args after
1065 conversions.
1066 * cp-tree.h (build_conditional_expr): Move to correct file.
1067 * typeck.c (decay_conversion): Diagnose any unknown types
1068 reaching here.
1069 (build_binary_op): Don't do initial decay or default
1070 conversions on overloaded functions.
1071 (build_static_cast): Don't do a decay conversion here.
1072
1073 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1074
1075 PR c++/3543
1076 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
1077 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
1078
1079 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1080
1081 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
1082 (create_vtbl_ptr): ... here.
1083
1084 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1085
1086 * class.c (build_vbase_offset_vbtl_entries): Look for
1087 non-primary base of which we are a sub vtable.
1088
1089 2001-07-24 Phil Edwards <pme@sources.redhat.com>
1090
1091 * semantics.c (finish_this_expr): Remove unused code.
1092
1093 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
1094
1095 Simplify rtti, now we've only one ABI.
1096 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
1097 CPTI_TINFO_VAR_ID.
1098 (tinfo_decl_id, tinfo_var_id): Remove.
1099 (get_typeid_1): Remove.
1100 * rtti.c
1101 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
1102 (typeid_ok_p): New function.
1103 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
1104 (get_tinfo_decl): Remove old abi documentation.
1105 (tinfo_from_decl): Remove.
1106 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
1107 (get_typeid_1): Remove.
1108 (get_base_offset): Remove.
1109 (synthesize_tinfo_var): Absorb get_base_offset.
1110 (create_real_tinfo_var): Don't use tinfo_decl_id.
1111
1112 2001-07-23 Graham Stott <grahams@redhat.com>
1113
1114 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
1115 variable has_two_argument_delete_p.
1116
1117 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
1118
1119 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
1120 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
1121 (CPTI_INDEX_IDENTIFIER): Remove.
1122 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
1123 (delta2_identifier): Remove.
1124 (index_identifier): Remove.
1125 (pfn_or_delta2_identifier): Remove.
1126 (flag_vtable_thunks): Remove.
1127 (VTABLE_DELTA2_NAME): Remove.
1128 (VTABLE_INDEX_NAME): Remove.
1129 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
1130 (vfunc_ptr_type_node): Adjust.
1131 (VTABLE_NAME_PREFIX): Adjust.
1132 (build_vfn_ref): Lose first parameter.
1133 (fixup_all_virtual_upcast_offsets): Remove.
1134 * decl.c (initialize_predefined_identifiers): Remove
1135 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
1136 (init_decl_processing): Remove no-vtable-thunk code.
1137 * decl2.c (flag_vtable_thunks): Remove.
1138 (mark_vtable_entries): Remove no-vtable-thunk code.
1139 * error.c (dump_decl): Remove no-vtable-thunk code.
1140 (dump_expr): Adjust ptr to member function code.
1141 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
1142 code.
1143 * rtti.c (build_headof): Remove no-vtable-thunk code.
1144 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
1145 * search.c (get_base_distance): Remove expand_upcast_fixups case.
1146 (virtual_context) Remove.
1147 (expand_upcast_fixups): Remove.
1148 (fixup_virtual_upcast_offsets): Remove.
1149 (fixup_all_virtual_upcast_offsets): Remove.
1150 * typeck.c (get_member_function_from_ptrfunc): Remove
1151 no-vtable-thunk code.
1152 * call.c (build_over_call): Adjust call to build_vfn_ref.
1153 * class.c (build_vfn_ref): Lose first parameter. Remove
1154 no-vtable-thunk code.
1155 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
1156 (build_vtable_entry): Remove no-vtable-thunk code.
1157
1158 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
1159
1160 Remove old-abi remnants. Remove comments about old abi
1161 behaviour. Remove refences to 'new-abi' in comments.
1162 * cp-tree.h: Adjust comments.
1163 (vbase_offsets_in_vtable_p): Delete.
1164 (vcall_offsets_in_vtable_p): Delete.
1165 (vptrs_present_everywhere_p): Delete.
1166 (all_overridden_vfuns_in_vtables_p): Delete.
1167 (merge_primary_and_secondary_vtables_p): Delete.
1168 (TYPE_CONTAINS_VPTR_P): Adjust.
1169 (VTT_NAME_PREFIX): Remove.
1170 (CTOR_VTBL_NAME_PREFIX): Remove.
1171 (init_vbase_pointers): Remove.
1172 * class.c: Adjust coments.
1173 (build_vbase_pointer_fields): Delete.
1174 (build_vbase_pointer): Remove old-abi code.
1175 (build_secondary_vtable): Likewise.
1176 (modify_all_vtables): Likewise.
1177 (create_vtable_ptr): Likewise.
1178 (layout_class_type): Likewise.
1179 (finish_struct_1): Likewise.
1180 (finish_vtbls): Likewise.
1181 (dfs_finish_vtbls): Delete.
1182 (build_vbase_offset_vtbl_entries): Remove old-abi code.
1183 * cvt.c: Adjust comments.
1184 * decl.c: Adjust comments.
1185 * decl2.c: Adjust comments.
1186 * init.c: Adjust comments.
1187 (construct_virtual_bases): Remove old-abi code.
1188 * lang-specs.h: Remove -fno-new-abi.
1189 * mangle.c: Adjust comments.
1190 * rtti.c: Adjust comments.
1191 (get_base_offset): Remove old-abi-code.
1192 * search.c: Adjust comments.
1193 (dfs_init_vbase_pointers): Remove.
1194 (dfs_vtable_path_unmark): Remove.
1195 (init_vbase_pointers): Remove.
1196 * semantics.c: Adjust comments.
1197 (emit_associated_thunks): Remove old-abi code.
1198 * typeck.c: Adjust comments.
1199
1200 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
1201
1202 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
1203 params.h.
1204
1205 2001-07-19 Mark Mitchell <mark@codesourcery.com>
1206
1207 * class.c (finish_struct_anon): Forbid nested classes.
1208
1209 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
1210
1211 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
1212 * optimize.c: Include debug.h.
1213 (maybe_clone_body): Use debug hook.
1214 * semantics.c: Include debug.h.
1215 (expand_body): Use debug hook.
1216
1217 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
1218
1219 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
1220
1221 2001-07-18 Mark Mitchell <mark@codesourcery.com>
1222
1223 * class.c (type_requires_array_cookie): New function.
1224 (check_methods): Don't try to figure out whether the type needs a
1225 cookie here.
1226 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
1227 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
1228 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
1229 * pt.c (instantiate_class_template): Don't set
1230 TYPE_VEC_DELETE_TAKES_SIZE.
1231 * NEWS: Document ABI changes from GCC 3.0.
1232
1233 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
1234 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1235
1236 * NEWS (Changes in GCC 3.0): Fix typo.
1237
1238 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
1239
1240 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
1241 which attributes are to be attached, and a flags argument. Update
1242 call to decl_attributes.
1243 (grokfield): Update call to decl_attributes.
1244 * class.c (finish_struct): Update call to cplus_decl_attributes.
1245 * cp-tree.h (cplus_decl_attributes): Update prototype.
1246 * decl.c (start_decl, grokdeclarator, start_function): Update
1247 calls to decl_attributes and cplus_decl_attributes.
1248 * friend.c (do_friend): Update call to cplus_decl_attributes.
1249 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
1250
1251 2001-07-12 Mark Mitchell <mark@codesourcery.com>
1252
1253 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
1254 for `register' variables with an asm-specification.
1255
1256 2001-07-11 Mark Mitchell <mark@codesourcery.com>
1257
1258 * semantics.c (finish_asm_stmt): Mark the output operands
1259 to an asm addressable, if necessary.
1260
1261 2001-07-11 Ben Elliston <bje@redhat.com>
1262
1263 * Revert this change -- there is a subtle bug.
1264
1265 PR c++/80
1266 * decl.c (finish_enum): New "attributes" argument; pass it to
1267 cplus_decl_attributes. Use a narrower type if the enum is packed.
1268 * cp-tree.h (finish_enum): Adjust prototype.
1269 * parse.y (enum_head): New non-terminal.
1270 (structsp): Use it. Enums now may be preceded or followed by
1271 optional attributes -- pass their chained tree to finish_enum().
1272 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
1273
1274 2001-07-10 Mark Mitchell <mark@codesourcery.com>
1275
1276 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
1277 variables.
1278
1279 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
1280
1281 * semantics.c (cp_expand_stmt): Fix for null
1282 current_function_return_value.
1283
1284 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
1285
1286 * call.c (build_op_delete_call): Initialize fn.
1287 (convert_like_real): Delete conditional.
1288 (joust): Initialize *w and *l.
1289 * class.c: Add prototype for binfo_ctor_vtable.
1290 (get_primary_binfo): Initialize result.
1291 * init.c (build_java_class_ref): Initialize name.
1292
1293 2001-07-09 Erik Rozendaal <dlr@acm.org>
1294
1295 * typeck.c (unary_complex_lvalue): Do not duplicate the
1296 argument to modify, pre-, or post-increment when used as an
1297 lvalue and when the argument has side-effects.
1298
1299 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
1300
1301 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1302 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
1303 cplus_decl_attributes even if attrs is NULL.
1304 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1305
1306 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
1307
1308 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
1309 calls to decl_attributes.
1310
1311 2001-07-06 Ira Ruben <ira@apple.com>
1312
1313 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
1314 be DECL_TEMPLATE_RESULT.
1315
1316 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1317
1318 * cp-tree.h (copy_template_template_parm): Rename to ...
1319 (bind_template_template_parm): ... here.
1320 * tree.c (copy_template_template_parm): Rename to ...
1321 (bind_template_template_parm): ... here. Remove the case when
1322 NEWARGS is NULL_TREE.
1323 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
1324 BOUND_TEMPLATE_TEMPLATE_PARM.
1325 * pt.c (lookup_template_class): Adjust.
1326
1327 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
1328
1329 * cvt.c (convert_lvalue): New fn.
1330 * cp-tree.h: Declare it.
1331 * method.c (do_build_assign_ref): Use it.
1332 (do_build_copy_constructor): Convert parm to base types
1333 before calling base constructors.
1334
1335 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
1336 DECL_USER_ALIGN. Check flag_elide_constructors instead of
1337 optimize.
1338 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
1339
1340 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
1341
1342 * optimize.c (optimize_inline_calls): New function, broken out
1343 of ...
1344 (optimize_function): ... here. Call it. Don't inline if it is
1345 a thunk.
1346 (dump_function): Print name of dump flag causing this dump.
1347 * semantics.c (expand_body): Move thunk inline check to
1348 optimize_function.
1349
1350 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
1351
1352 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
1353 (comptypes): Use target.comp_type_attributes.
1354
1355 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
1356
1357 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
1358
1359 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1360
1361 * error.c (lang_print_error_function): Add a `diagnostic_context *'
1362 parameter. Tweak.
1363
1364 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1365
1366 * decl2.c (import_export_class): Update.
1367
1368 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
1369
1370 * error.c (init_error): Adjust settings.
1371
1372 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
1373
1374 * error.c (init_error): Adjust settings.
1375
1376 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
1377
1378 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
1379 return pointers to data members by reference rather than by value.
1380
1381 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
1382
1383 Implement the Named Return Value optimization.
1384 * cp-tree.h (struct cp_language_function): Add x_return_value.
1385 (current_function_return_value): Now a macro.
1386 * decl.c: Don't define it.
1387 (define_label, finish_case_label): Don't clear it.
1388 (init_decl_processing): Don't register it with GC.
1389 * semantics.c (genrtl_finish_function): Don't check it for
1390 no_return_label. Copy the RTL from the return value to
1391 current_function_return_value and walk, calling...
1392 (nullify_returns_r): ...this new fn.
1393 * typeck.c (check_return_expr): Set current_function_return_value.
1394
1395 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
1396
1397 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
1398 sharing a ctor vtable with. Merge code for cases 1 and 2.
1399 (binfo_ctor_vtable): New fn.
1400 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
1401
1402 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
1403
1404 * class.c (dfs_find_final_overrider): Fix logic.
1405
1406 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
1407 virtual thunk instead of non-virtual.
1408 (get_matching_virtual): Uncomment.
1409
1410 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
1411 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
1412 PARM, not ARG.
1413
1414 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
1415
1416 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
1417 we've not emerged from the hierarchy of RTTI_BINFO on reaching
1418 a non-virtual base.
1419
1420 2001-06-13 Mark Mitchell <mark@codesourcery.com>
1421
1422 * NEWS: Update release number.
1423
1424 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
1425
1426 PR c++/3130, c++/3131, c++/3132
1427 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
1428 * class.c (force_canonical_binfo_r): Move
1429 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
1430 virtual bases unless they're primary and what they're primary
1431 too has been moved.
1432 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
1433 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
1434 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
1435 derived binfo.
1436 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
1437 (layout_nonempty_base_or_field): Add most derived type
1438 parameter. Adjust.
1439 (layout_empty_base): Likewise.
1440 (build_base_field): Likewise.
1441 (build_base_fields): Likewise.
1442 (propagate_binfo_offsets): Add most derived type
1443 parameter. Skip non canonical virtual bases too.
1444 (dfs_set_offset_for_unshared_vbases): Don't skip primary
1445 bases. Do skip canonical bases.
1446 (layout_virtual_bases): Adjust.
1447 (layout_class_type): Adjust.
1448 (dfs_get_primary_binfo): Build list of virtual primary base
1449 candidates.
1450 (get_primary_binfo): Check that the shared virtual primary
1451 base candidate was found first.
1452 (accumulate_vtbl_inits): Don't do anything for non-vptr
1453 containing binfos. For case 1 primary virtual bases, keep
1454 checking that we've not emerged from the hierarchy of RTTI_BINFO.
1455
1456 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
1457
1458 PR c++/3089
1459 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
1460 hierarchy looking for primary bases for a ctor
1461 vtable. Recursively call oneself, if we meet our primary via
1462 this route and haven't met it yet via inheritance graph order.
1463
1464 2001-06-11 Mark Mitchell <mark@codesourcery.com>
1465
1466 * lang-options.h: Emit documentation for -fno-honor-std, not
1467 -fhonor-std.
1468
1469 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
1470
1471 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
1472 Don't clobber delta.
1473 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
1474
1475 2001-06-10 Mark Mitchell <mark@codesourcery.com>
1476 Gabriel Dos Reis <gdr@codesourcery.com>
1477
1478 * Make-lang.in (cp/call.o): Depend on diagnostic.h
1479 (cp/typeck.o): Depend on diagnostic.h
1480 (cp/typeck2.o): Depend on diagnostic.h
1481 (cp/repo.o): Depend on dignostic.h
1482 * typeck.c: #include diagnostic.h
1483 (convert_for_initialization): Remove extern declaration for
1484 warningcount and errorcount.
1485
1486 * call.c: #include diagnostic.h
1487 (convert_like_real): Remove extern declaration for warnincount and
1488 errorcount.
1489
1490 * repo.c: #include diagnostic.h
1491 * typeck2.c: #include diagnostic.h
1492
1493 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1494
1495 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
1496 in previous change.
1497
1498 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1499
1500 PR c++/2929
1501 * friend.c (do_friend): Use push_decl_namespace for classes at
1502 namespace scope.
1503
1504 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1505 Jason Merrill <jason_merrill@redhat.com>
1506
1507 PR c++/3061
1508 * class.c (build_secondary_vtable): Use assert, rather than an error
1509 message.
1510 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
1511 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
1512 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
1513 Don't set BINFO_VTABLE for a primary virtual base.
1514
1515 2001-06-07 Mark Mitchell <mark@codesourcery.com>
1516
1517 * decl.c (duplicate_decls): Update source position information
1518 when a template function is defined.
1519
1520 2001-06-07 Phil Edwards <pme@sources.redhat.com>
1521
1522 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
1523
1524 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
1525
1526 PR c++/2914
1527 * decl.c (pushtag): Don't push into a complete type's scope.
1528
1529 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
1530
1531 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
1532 (struct lang_decl_flags): Lose generate_with_vtable_p.
1533 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
1534 * class.c (copy_virtuals): Adjust.
1535 * decl2.c (mark_vtable_entries): Adjust.
1536 * method.c (make_thunk, build_vtable_entry): Adjust.
1537 * class.c (update_vtable_entry_for_fn): Only look as far as the
1538 first defining class.
1539 (build_vtbl_initializer): Put nothing in the slot for a function only
1540 defined in a lost primary virtual base.
1541 (add_vcall_offset_vtbl_entries_1): Use the same code for
1542 the lost primary case and the normal case.
1543 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
1544 (get_vfield_offset, get_derived_offset): Lose.
1545 (dfs_find_final_overrider): Use look_for_overrides_here.
1546 (get_matching_virtual): New fn.
1547 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
1548 not BV_VCALL_INDEX.
1549 * search.c (look_for_overrides_here): Split out from...
1550 (look_for_overrides_r): Here.
1551
1552 * class.c (find_final_overrider): Return error_mark_node on error.
1553
1554 * decl2.c (key_method): #if 0 accidental change.
1555
1556 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
1557
1558 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
1559 (build_over_call): Likewise.
1560 * decl.c (grokparms): Likewise.
1561 * pt.c (tsubst_decl): Likewise.
1562 * typeck.c (convert_arguments): Likewise.
1563
1564 2001-06-05 Mark Mitchell <mark@codesourcery.com>
1565
1566 * semantics.c (begin_class_definition): Robustify.
1567
1568 * pt.c (instantiate_decl): Tell the repository code about the
1569 clones, not the cloned functions.
1570 * repo.c (repo_template_used): Explicitly instantiate the cloned
1571 function, not the clones.
1572
1573 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1574
1575 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
1576 ICS_BAD_FLAG on created conversion.
1577 (compare_ics): Break out rank.
1578
1579 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1580
1581 * decl.c (xref_tag): Remove extraneous %s on dependent name
1582 lookup warning.
1583
1584 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1585
1586 * class.c (layout_vtable_decl): Fix off by one error on
1587 build_index_type.
1588 (build_vtt): Likewise.
1589 (build_ctor_vtbl_group): Likewise.
1590
1591 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1592
1593 * class.c (maybe_indent_hierarchy): New function.
1594 (dump_class_hierarchy_r): Add flags. Dump extra binfo
1595 information, if enabled. Use maybe_indent_hierarchy. Adjust
1596 output format.
1597 (dump_class_hierarchy): Adjust prototype. Adjust output format.
1598 (dump_array, dump_vtable, dump_vtt): New functions.
1599 (finish_struct_1): Adjust hierarchy dumping.
1600 (initialize_vtable): Call dump_vtable.
1601 (build_vtt): Call dump_vtt.
1602 (build_ctor_vtbl_group): Call dump_vtable.
1603 * decl2.c (flag_dump_class_layout): Remove.
1604 (cxx_decode_option): Remove dump translation unit
1605 and dump class hierarchy check. Call dump_switch_p.
1606 (finish_file): Adjust dumping.
1607 (dump.c): Only dump base classes if not TDF_SLIM.
1608 Only dump namespace members if not TDF_SLIM.
1609 * optimize.c (dump_function): New function.
1610 (optimize_function): Call dump_function.
1611 * semantics.c (expand_body): Use dump_enabled_p.
1612
1613 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
1614
1615 PR g++/2936
1616 Part missed from first commit
1617 * decl2.c (finish_anon_union): Copy context.
1618
1619 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
1620
1621 PR g++/2936
1622 * optimize.c (remap_decl): Remap anonymous aggregate members too.
1623
1624 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
1625
1626 PR g++/2823
1627 * semantics.c (expand_body): Don't optimize thunks.
1628
1629 2001-05-25 Sam TH <sam@uchicago.edu>
1630
1631 * cp-tree.h lex.h: Fix header include guards.
1632
1633 2001-05-25 Mark Mitchell <mark@codesourcery.com>
1634
1635 * decl.c (init_decl_processing): Tweak.
1636
1637 2001-05-24 Mark Mitchell <mark@codesourcery.com>
1638
1639 * decl.c (duplicate_decls): Tidy.
1640 (init_decl_processing): Always set flag_no_builtin.
1641
1642 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
1643
1644 PR c++/2184
1645 * decl2.c (do_local_using_decl): Push the decls, even in a
1646 template.
1647
1648 2001-05-22 Mark Mitchell <mark@codesourcery.com>
1649
1650 * optimize.c (initialize_inlined_parameters): Don't set
1651 TREE_READONLY for a VAR_DECL taking the place of an inlined
1652 PARM_DECL.
1653
1654 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
1655
1656 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
1657 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
1658 attribute.
1659
1660 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
1661
1662 * parse.y: Refer to compound literals as such, not as
1663 constructor-expressions.
1664
1665 2001-05-21 Mark Mitchell <mark@codesourcery.com>
1666
1667 * call.c (build_op_delete_call): Ignore exception-specifications
1668 when looking for matching delete operators.
1669 * init.c (build_new_1): Compute whether or not the allocation
1670 function used is a placement allocation function or not, and
1671 communicate this information to build_op_delete_call.
1672
1673 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
1674
1675 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
1676 (build_vtbl_ref): Adjust.
1677 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
1678 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
1679 Re-add vtable-gc.
1680 (unsupported_options): Correspondingly.
1681
1682 * decl2.c (maybe_make_one_only): Check flag_weak, not
1683 supports_one_only().
1684
1685 * cp-tree.def (START_CATCH_STMT): Lose.
1686 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
1687 * tree.c (cp_statement_code_p): Don't case it.
1688 * semantics.c (cp_expand_stmt): Likewise.
1689 * cp-tree.h (START_CATCH_TYPE): Lose.
1690 (HANDLER_TYPE): New.
1691 * except.c (expand_start_catch_block): Don't start any blocks.
1692 Return the type.
1693 (expand_end_catch_block): Don't end any blocks.
1694 * parse.y (handler): Don't pass anything from finish_handler_parms
1695 to finish_handler.
1696 * pt.c (tsubst_expr): Likewise.
1697 * semantics.c (begin_handler): Call note_level_for_catch here.
1698 (finish_handler_parms): Don't return anything.
1699 (genrtl_catch_block, begin_catch_block): Lose.
1700 (genrtl_handler): Call expand_start_catch here.
1701
1702 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
1703
1704 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
1705 (get_vtable_decl, build_vtt): Not here.
1706
1707 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
1708
1709 PR c++/2781
1710 * optimize.c (update_cloned_parm): Copy addressability and other
1711 flags.
1712
1713 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1714
1715 * pt.c (determine_specialization): Ignore artificial functions.
1716
1717 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
1718
1719 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
1720 (C_RID_CODE): Remove.
1721 * lex.c (cxx_init_options): Call set_identifier_size. Update.
1722 (init_parse): Don't do it here.
1723
1724 2001-05-18 Diego Novillo <dnovillo@redhat.com>
1725
1726 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
1727 function declaration to avoid stripping the symbol's attributes.
1728
1729 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
1730
1731 * decl.c (pushdecl): Adjust error string.
1732 (xref_tag): Adjust friend class injection warning. Remove the
1733 inherited name from the class shadowed scope.
1734
1735 2001-05-17 Mark Mitchell <mark@codesourcery.com>
1736
1737 * except.c (cp_protect_cleanup_actions): New function.
1738 (init_exception_processing): Don't set protect_cleanup_actions
1739 here. Do set lang_protect_cleanup_actions.
1740
1741 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
1742
1743 * spew.c (read_token): Call yyerror on all unexpected tokens.
1744
1745 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
1746
1747 * init.c (member_init_ok_or_else): Take a tree rather than
1748 string for name.
1749 (expand_member_init): Adjust.
1750
1751 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
1752
1753 * decl.c (duplicate_decls): Suppress warning about duplicate
1754 decls if the first decl is a friend.
1755
1756 2001-05-12 Zack Weinberg <zackw@stanford.edu>
1757
1758 * except.c (choose_personality_routine): Export. Add
1759 explanatory comment. Take an enum languages, not a boolean.
1760 (initialize_handler_parm): Adjust to match.
1761 * cp-tree.h: Prototype choose_personality_routine.
1762 * lex.c (handle_pragma_java_exceptions): New function.
1763 (init_cp_pragma): Register #pragma GCC java_exceptions.
1764
1765 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1766
1767 * method.c (build_mangled_C99_name): Remove unused prototype.
1768
1769 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
1770
1771 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
1772 * typeck.c (get_member_function_from_ptrfunc,
1773 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
1774 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
1775
1776 Reverted Geoff Keating's 2001-05-03's patch.
1777
1778 2001-05-11 Ira Ruben <ira@apple.com>
1779
1780 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
1781
1782 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
1783
1784 * cp-tree.h (finish_label_expr, lookup_label): Delete.
1785 * parse.y: Update for '&&'; don't issue warning here.
1786 * semantics.c (finish_label_expr): Delete.
1787
1788 2001-05-07 Mark Mitchell <mark@codesourcery.com>
1789
1790 * splay-tree.h (splay_tree_max): New function.
1791 (splay_tree_min): Likewise.
1792
1793 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
1794
1795 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
1796 (pfn_vflag_identifier): Define.
1797 Update comment about layout of pointer functions.
1798 (build_ptrmemfunc1): Update prototype.
1799 (expand_ptrmemfunc_cst): Update prototype.
1800 * decl.c (initialize_predefined_identifiers): Initialize
1801 pfn_vflag_identifier.
1802 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
1803 an extra field to the type.
1804 * expr.c (cplus_expand_constant): Pass 'flag' between
1805 expand_ptrmemfunc_cst and build_ptrmemfunc1.
1806 * typeck.c (get_member_function_from_ptrfunc): When
1807 FUNCTION_BOUNDARY < 16, look at additional field to determine
1808 if a pointer-to-member is a real pointer or a vtable offset.
1809 (build_ptrmemfunc1): Add new parameter to contain extra field.
1810 (build_ptrmemfunc): Pass the extra field around.
1811 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
1812 (pfn_from_ptrmemfunc): Ignore the extra field.
1813
1814 2001-05-03 Mark Mitchell <mark@codesourcery.com>
1815
1816 * cp-tree.h (flag_inline_trees): Update documentation.
1817 * decl.c (init_decl_processing): Adjust handling of
1818 flag_inline_functions and flag_inline_trees to support -O3.
1819 (grokfndecl): Set DECL_INLINE on all functions if that's what
1820 the user requested.
1821 (save_function_data): Clear DECL_INLINE in
1822 current_function_cannot_inline is non-NULL.
1823 * decl2.c (flag_inline_trees): Update documentation.
1824
1825 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
1826
1827 * dump.c (cp_dump_tree, USING_STMT case): New case.
1828 * tree.c (cp_statement_code_p): Add USING_STMT.
1829 * decl2.c (do_using_directive): Add the using directive statement.
1830
1831 * tree.c (walk_tree): Reformat an if block.
1832
1833 2001-05-02 Mark Mitchell <mark@codesourcery.com>
1834
1835 * decl.c (compute_array_index_type): Don't try to do anything with
1836 the indices when processing a template.
1837
1838 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1839
1840 * call.c: NULL_PTR -> NULL.
1841 * class.c: Likewise.
1842 * cvt.c: Likewise.
1843 * decl.c: Likewise.
1844 * decl2.c: Likewise.
1845 * except.c: Likewise.
1846 * init.c: Likewise.
1847 * rtti.c: Likewise.
1848 * search.c: Likewise.
1849 * tree.c: Likewise.
1850 * typeck.c: Likewise.
1851 * typeck2.c: Likewise.
1852
1853 2001-05-02 Mark Mitchell <mark@codesourcery.com>
1854
1855 * decl2.c (do_using_directive): Revert previous patch.
1856
1857 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1858
1859 * cp-tree.def (USING_STMT): New statement node.
1860 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
1861 * decl2.c (do_using_directive): Add USING_STMT to statement
1862 tree. Don't emit errors when processing template decl.
1863 * pt.c (tsubst_expr, USING_STMT case): New case.
1864 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
1865
1866 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1867
1868 * call.c (build_new_op): Convert args from reference here.
1869 (build_conditional_expr): Don't convert here.
1870
1871 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1872
1873 * spew.c (last_token_id): New static variable.
1874 (read_token): Set it here.
1875 (yyerror): Use it here.
1876
1877 2001-04-30 Richard Henderson <rth@redhat.com>
1878
1879 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
1880 * decl.c: Likewise.
1881
1882 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1883
1884 * gxxint.texi: Remove.
1885 * Make-lang.in: Remove all traces of gxxint.texi.
1886
1887 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
1888
1889 * decl2.c (start_static_initialization_or_destruction): Correct
1890 logic to handle the -fno-use-cxa-atexit case.
1891
1892 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1893
1894 * optimize.c (update_cloned_parm): New function.
1895 (maybe_clone_body): Use it. Update the `this' parameter too.
1896
1897 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
1898
1899 * decl2.c (unsupported_options): Add new-abi.
1900 * lang-options.h: Remove no longer supported options.
1901
1902 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1903
1904 * except.c (can_convert_eh): Don't check template parms,
1905 typename types etc.
1906
1907 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1908
1909 * optimize.c (maybe_clone_body): Copy parameter names and locations.
1910
1911 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1912
1913 * cp-tree.h (adjust_clone_args): Prototype new function.
1914 * class.c (adjust_clone_args): New function.
1915 * decl.c (start_function): Call it for in charge ctors.
1916
1917 2001-04-26 Mark Mitchell <mark@codesourcery.com>
1918
1919 * method.c (use_thunk): Make sure that thunks really are emitted
1920 when requested.
1921
1922 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
1923
1924 * mangle.c (write_chars): New macro.
1925 (hwint_to_ascii): New function
1926 (write_number): Use it.
1927 (write_integer_cst): Deal with really big numbers.
1928
1929 2001-04-25 Mark Mitchell <mark@codesourcery.com>
1930
1931 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1932 the clone.
1933
1934 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
1935
1936 * decl.c (grokdeclarator): Set context of namespace scope
1937 TYPE_DECLS.
1938
1939 2001-04-24 Zack Weinberg <zackw@stanford.edu>
1940
1941 * cp/optimize.c: Include hashtab.h.
1942 (struct inline_data): Add tree_pruner.
1943 (expand_call_inline, expand_calls_inline): Use it when calling
1944 walk_tree.
1945 (optimize_function): Initialize and free tree_pruner.
1946
1947 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1948
1949 Lazy __FUNCTION__ generation.
1950 * cp-tree.def (FUNCTION_NAME): Remove.
1951 * cp-tree.h (function_name_declared_p): Remove.
1952 (cp_fname_init): Prototype.
1953 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1954 don't call declare_function_name. Call start_fname_decls.
1955 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1956 clobber the line number.
1957 (cp_fname_init): New function.
1958 (start_function): Call start_fname_decls.
1959 (finish_function): Call finish_fname_decls.
1960 * lex.c (reswords): Add slots for __FUNCTION__ et al.
1961 (rid_to_yy): Add mappings for __FUNCTION__ et al.
1962 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1963 * parse.y (VAR_FUNC_NAME): New token.
1964 (primary): Add VAR_FUNC_NAME.
1965 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1966 generation.
1967 (tsubst, FUNCTION_NAME case): Remove.
1968 (tsubst_copy, FUNCTION_NAME case): Remove.
1969 (tsubst_expr, DECL_STMT case): Be careful with a
1970 DECL_PRETTY_FUNCTION_P.
1971 (instantiate_decl): Remove function_name_declared_p.
1972 * semantics.c (begin_compound_statement): Don't call
1973 declare_function_name here.
1974 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1975 (finish_translation_unit): Call finish_fname_decls.
1976 (expand_body): Remove function_name_declared_p.
1977 * typeck2.c (digest_init): Allow any ERROR_MARK.
1978
1979 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1980
1981 * pt.c (tsubst_decl): Use VOID_TYPE_P.
1982 * semantics.c: Fix some typos.
1983
1984 2001-04-23 Phil Edwards <pme@sources.redhat.com>
1985
1986 * cp/decl2.c (flag_honor_std): Always initialize to 1.
1987
1988 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1989
1990 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1991
1992 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
1993
1994 * except.c (build_throw): Wrap the initialization of the exception
1995 object in a MUST_NOT_THROW_EXPR.
1996 (do_free_exception): #if 0.
1997
1998 2001-04-20 Mark Mitchell <mark@codesourcery.com>
1999
2000 * cp-tree.h (finish_enum): Change prototype.
2001 * decl.c (finish_enum): Reorganize.
2002 * parse.y (structsp): Adjust calls to finish_enum.
2003
2004 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
2005
2006 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
2007 't' case.
2008
2009 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
2010
2011 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
2012 (layout_empty_base): Return at end flag.
2013 (build_base_field): Likewise.
2014 (build_base_fields): Likewise.
2015 (layout_virtual_bases): Don't add 1 to eoc value.
2016 (end_of_class): Use full size for empty bases.
2017 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
2018 empty bases. Don't add 1 to eoc value. Only add trailing padding
2019 if we're an empty class with no empty bases.
2020 (dump_class_hierarchy): Dump size and alignment.
2021
2022 2001-04-20 Jakub Jelinek <jakub@redhat.com>
2023
2024 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
2025 ICS_BAD_FLAG.
2026
2027 2001-04-20 Jakub Jelinek <jakub@redhat.com>
2028
2029 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
2030 is found, look first if name does not match the structure name.
2031
2032 2001-04-19 Mark Mitchell <mark@codesourcery.com>
2033
2034 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
2035 set.
2036 (SET_DECL_LANGUAGE): New macro.
2037 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
2038 (pushdecl): Likewise.
2039 (build_library_fn_1): Likewise.
2040 (build_cp_library_fn): Likewise.
2041 (grokfndecl): Likewise.
2042 (grokvardecl): Mark `extern "C"' variables as having C linkage.
2043 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
2044 * lex.c (retrofit_lang_decl): Likewise.
2045 * mangle.c (mangle_decl_string): Don't mangle the names of
2046 variables declared with C language linkage.
2047 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
2048
2049 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
2050
2051 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
2052 flag_access_control from uninitialized storage.
2053
2054 2001-04-15 Mark Mitchell <mark@codesourcery.com>
2055
2056 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
2057 * mangle.c (write_pointer_to_member_type): Fix mangling of
2058 pointers to cv-qualified member function types.
2059
2060 * init.c (build_delete): Create a SAVE_EXPR for the address if
2061 we're going to use it more than once.
2062
2063 2001-04-13 Mark Mitchell <mark@codesourcery.com>
2064
2065 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
2066 (expand_ptremfunc_cst): Change prototype.
2067 (delta2_from_ptrmemfunc): Remove.
2068 * expr.c (cplus_expand_constant): Adjust call to
2069 expand_ptrmemfunc_cst.
2070 * typeck.c (build_ptrmemfunc1): Simplify.
2071 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
2072 results in a constant.
2073 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
2074 (delta2_from_ptrmemfunc): Remove.
2075 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
2076
2077 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
2078
2079 * cp-tree.h (decl_namespace_list): New macro.
2080 (struct saved_scope): Add decl_ns_list.
2081 * decl.c (mark_saved_scope): Mark it.
2082 * decl2.c: Lose static decl_namespace_list.
2083 (init_decl2): Don't save it.
2084
2085 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2086
2087 * cp-tree.h (warn_return_type, yylex): Delete redundant
2088 declarations.
2089
2090 * decl.c (current_class_depth, global_namespace): Likewise.
2091
2092 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
2093
2094 * repo.c (flag_use_repository): Likewise.
2095
2096 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2097
2098 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
2099 set_block, pushdecl, getdecls, gettags, init_decl_processing,
2100 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
2101 lvalue_or_else, print_lang_statistics, comp_target_types,
2102 unsigned_type, signed_type, signed_or_unsigned_type,
2103 build_function_call, mark_addressable, incomplete_type_error):
2104 Delete redundant declarations.
2105
2106 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
2107
2108 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
2109 (TYPE_ANONYMOUS_P): New macro.
2110 (TAGGED_TYPE_P): New macro.
2111 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
2112 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
2113 * tree.c (no_linkage_helper): Likewise.
2114 * semantics.c (begin_class_definition): Likewise.
2115 * pt.c (convert_template_argument): Likewise.
2116 * lex.c (check_for_missing_semicolon): Likewise.
2117
2118 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
2119
2120 * class.c (dfs_unshared_virtual_bases): New function.
2121 (mark_primary_bases): Call it.
2122 (check_bases): Ignore virtual bases when determining
2123 nearly-emptiness.
2124
2125 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
2126
2127 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
2128
2129 2001-04-11 Mark Mitchell <mark@codesourcery.com>
2130
2131 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
2132 cloned function to the clone.
2133
2134 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2135
2136 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
2137
2138 * semantics.c: Include expr.h.
2139
2140 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
2141
2142 * method.c (implicitly_declare_fn): Commonize code for copy ctor
2143 and assignment op. Set TREE_USED for parameter.
2144
2145 2001-04-10 Mark Mitchell <mark@codesourcery.com>
2146
2147 * class.c (find_final_overrider_data): Add `candidates'.
2148 (dfs_find_final_overrider): Don't issue error messages
2149 prematurely.
2150 (find_final_overrider): Issue error messages here.
2151 (build_base_field): Don't warn about amgibuous direct bases here.
2152 (warn_about_ambiguous_direct_bases): New function.
2153 (layout_class_type): Use it.
2154
2155 2001-04-10 Richard Henderson <rth@redhat.com>
2156
2157 * typeck.c (build_array_ref): Push the array reference inside
2158 COMPOUND_EXPR and COND_EXPR.
2159
2160 2001-04-05 Mark Mitchell <mark@codesourcery.com>
2161
2162 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
2163 * decl.c (duplicate_decls): Adjust accordingly.
2164 (maybe_commonize_var): Likewise.
2165 (grokfndecl): Likewise.
2166 (start_function): Likewise.
2167 (start_method): Likewise.
2168 * decl2.c (key_method): Likewise.
2169 (import_export_decl): Likewise.
2170 * method.c (implicitly_declare_fn): Likewise.
2171 * optimize.c (maybe_clone_body): Likewise.
2172
2173 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
2174
2175 * lang-specs.h: Add __DEPRECATED.
2176
2177 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
2178
2179 * search.c (get_dynamic_cast_base_type): When building a new
2180 constant, set its type to ssizetype.
2181
2182 2001-04-04 Jakub Jelinek <jakub@redhat.com>
2183
2184 * optimize.c (expand_call_inline): Only add newly inlined statements
2185 into inlined_stmts.
2186
2187 2001-04-03 Mark Mitchell <mark@codesourcery.com>
2188
2189 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
2190 (OPERATOR_FORMAT): Likewise.
2191 (OPERATOR_TYPENAME_FORMAT): Likewise.
2192 * operators.def: Remove old name-mangling information.
2193 * decl.c (grok_op_properties): Adjust accordingly.
2194 * lex.c (init_operators): Likewise.
2195 * rtti.c (get_tinfo_decl): Issue error messages about types that
2196 have variable size.
2197
2198 2001-04-03 Mark Mitchell <mark@codesourcery.com>
2199
2200 * decl2.c (import_export_decl): Don't call import_export_class
2201 when processing an inline member function.
2202 * semantics.c (expand_body): Call import_export_decl before
2203 emitting inline functions.
2204
2205 2001-03-28 Richard Henderson <rth@redhat.com>
2206
2207 IA-64 ABI Exception Handling:
2208 * cp-tree.def (EH_SPEC_BLOCK): New.
2209 (MUST_NOT_THROW_EXPR): New.
2210 * cp-tree.h: Update changed function declarations.
2211 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
2212 (CPTI_CALL_UNEXPECTED): New.
2213 (struct cp_language_function): Rename x_eh_spec_try_block
2214 to x_eh_spec_block.
2215 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
2216 * decl.c (current_binding_level): If no current function
2217 bindings, revert to scope_chain.
2218 (initialize_predefined_identifiers): Remove __cp_push_exception.
2219 (store_parm_decls): Use begin_eh_spec_block.
2220 (finish_function): Use finish_eh_spec_block.
2221 (mark_lang_function): Update for name changes.
2222 * decl2.c (finish_file): No mark_all_runtime_matches.
2223 * dump.c (cp_dump_tree): Handle new tree codes.
2224 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
2225 * except.c (catch_language_init, catch_language): Remove.
2226 (init_exception_processing): Don't set language code.
2227 Initialize call_unexpected_node, protect_cleanup_actions,
2228 eh_personality_libfunc, lang_eh_runtime_type.
2229 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
2230 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
2231 (prepare_eh_type): Split out type canonicalizations ...
2232 (build_eh_type_type): ... from here.
2233 (build_eh_type_type_ref): Remove.
2234 (mark_all_runtime_matches): Remove.
2235 (build_exc_ptr): New.
2236 (do_begin_catch, do_end_catch): New.
2237 (do_pop_exception): Remove.
2238 (build_terminate_handler): Remove.
2239 (choose_personality_routine): Split out language choice from ...
2240 (initialize_handler_parm): ... here.
2241 Use MUST_NOT_THROW_EXPR.
2242 (expand_start_catch_block): Use do_begin_catch. Simplify Java
2243 exception object handling.
2244 (expand_start_eh_spec, expand_end_eh_spec): Remove.
2245 (expand_exception_blocks, alloc_eh_object): Remove.
2246 (begin_eh_spec_block, finish_eh_spec_block): New.
2247 (do_allocate_exception, do_free_exception): New.
2248 (expand_throw): Merge into ...
2249 (build_throw): ... here. Update for abi.
2250 * expr.c (cplus_expand_expr): No expand_internal_throw.
2251 Handle MUST_NOT_THROW_EXPR.
2252 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
2253 * semantics.c (*) Update for except.h name changes.
2254 (genrtl_try_block): No protect_with_terminate.
2255 (genrtl_eh_spec_block): New.
2256 (genrtl_handler): Don't emit the goto here.
2257 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
2258 (genrtl_finish_function): Don't expand_exception_blocks.
2259 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
2260
2261 2001-03-28 Richard Henderson <rth@redhat.com>
2262
2263 * decl.c (struct named_label_list): Rename eh_region to
2264 in_try_scope, add in_catch_scope.
2265 (struct binding_level): Rename eh_region to is_try_scope,
2266 add is_catch_scope.
2267 (note_level_for_try): Rename from note_level_for_eh.
2268 (note_level_for_catch): New.
2269 (poplevel): Copy both is_try_scope and is_catch_scope to
2270 the named_label_list struct.
2271 (check_previous_goto_1): Don't check for catch block via
2272 DECL_ARTIFICIAL; use in_try_scope instead.
2273 (check_goto): Likewise.
2274 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
2275 * except.c (expand_start_catch_block): Call note_level_for_catch.
2276 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
2277
2278 2001-03-27 Richard Henderson <rth@redhat.com>
2279
2280 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
2281 exceptions_via_longjmp.
2282
2283 2001-03-27 Phil Edwards <pme@sources.redhat.com>
2284
2285 * pt.c (check_default_tmpl_args): Make error messages clearer.
2286
2287 2001-03-26 Phil Edwards <pme@sources.redhat.com>
2288
2289 * error.c: Also undefine 'A' macro used for cp_printers definition.
2290
2291 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2292
2293 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2294
2295 2001-03-26 Mike Yang <yang@research.att.com>
2296 Mark Mitchell <mark@codesourcery.com>
2297
2298 * dump.c (dump_access): New function.
2299 (cp_dump_tree): Use it. Dump basetype information for class
2300 types.
2301
2302 2001-03-26 Mark Mitchell <mark@codesourcery.com>
2303
2304 * Makefile.in (optimize.o): Depend on params.h.
2305 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
2306 (init_decl_processing): Set flag_no_inline when doing
2307 inlining-on-trees.
2308 * optimize.c: Include params.h.
2309 (struct inline_data): Improve documentation of FNS. Add
2310 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
2311 (INSNS_PER_STMT): New macro.
2312 (remap_block): Use CLONING_P.
2313 (inlinable_function_p): Don't inline big functions.
2314 (expand_call_inline): Keep track of how much inlining we've done.
2315 (optimize_function): Set FIRST_INLINED_FN.
2316 (maybe_clone_body): Set CLONING_P.
2317 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
2318 tree nodes.
2319 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
2320 rest_of_compilation. Clear DECL_RTL for local variables
2321 afterwards.
2322 (clear_decl_rtl): New function.
2323
2324 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
2325
2326 Implement DR 209
2327 * cp-tree.h (skip_type_access_control,
2328 reset_type_access_control): Prototype.
2329 * decl.c (grokdeclarator): Access of friends is not checked.
2330 * parse.y (component_decl_list): Reset type access control.
2331 * semantics.c (decl_type_access_control): Clear
2332 current_type_lookups.
2333 (save_type_access_control): Don't save if not deferring.
2334 (skip_type_access_control, reset_type_access_control): New
2335 functions.
2336 (begin_class_definition): Do type access control for basetypes.
2337 Start deferred access control.
2338 (finish_class_definition): Resume immediate access control if
2339 this is a local class.
2340
2341 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2342
2343 * class.c (add_method): Use memcpy/memmove, not bcopy.
2344
2345 * decl.c (duplicate_decls): Likewise.
2346
2347 2001-03-23 Jakub Jelinek <jakub@redhat.com>
2348
2349 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
2350 not `_'.
2351
2352 2001-03-23 Jakub Jelinek <jakub@redhat.com>
2353
2354 * decl.c (local_names): Define.
2355 (push_local_name): New.
2356 (grok_reference_init): Return init if initializing static reference
2357 variable with non-constant instead of emitting it.
2358 Move expand_static_init call to cp_finish_decl.
2359 (layout_var_decl): Call push_local_name.
2360 (maybe_commonize_var): Allow inlining functions even if they have
2361 static local variables, use comdat_linkage for them if flag_weak.
2362 (check_initializer): Call obscure_complex_init if
2363 grok_reference_init returned non-zero.
2364 (save_function_data): Clear x_local_names.
2365 (pop_cp_function_context): Free x_local_names.
2366 (mark_inlined_fns): Remove.
2367 (mark_lang_function): Mark x_local_names.
2368 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
2369 Mark inlined_fns as tree, remove call to mark_inlined_fns.
2370 * class.c (alter_access): Ensure DECL_ACCESS is never set if
2371 DECL_DISCRIMINATOR_P.
2372 * cp-tree.h (cp_language_function): Add x_local_names.
2373 (lang_decl_flags): Add discriminator into u2.
2374 (lang_decl_inlined_fns): Remove.
2375 (lang_decl): inlined_fns is now a TREE_VEC.
2376 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
2377 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
2378 TREE_VEC, not a custom structure.
2379 (optimize_function): Likewise.
2380 * mangle.c (discriminator_for_local_entity): Discriminate among
2381 VAR_DECL local entities.
2382 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
2383 is not valid.
2384
2385 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
2386
2387 Add support for Java interface method calls.
2388 * cp-tree.h (struct lang_type): Add java_interface flag.
2389 (TYPE_JAVA_INTERFACE): New macro.
2390 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
2391 by setting TYPE_JAVA_INTERFACE.
2392 * call.c (java_iface_lookup_fn): New static.
2393 (build_over_call): If calling a method declared in a
2394 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
2395 expression which resolves the function address.
2396 (build_java_interface_fn_ref): New function.
2397
2398 2001-03-22 Richard Henderson <rth@redhat.com>
2399
2400 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
2401 * except.c: Don't include it.
2402
2403 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2404 based on an idea from Joe Buck <jbuck@synopsys.com>
2405
2406 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
2407 New nonterminals.
2408 (data_def, component_decl): Add reductions to bad_decl.
2409
2410 2001-03-22 Jakub Jelinek <jakub@redhat.com>
2411
2412 * method.c (do_build_assign_ref): Don't use build_modify_expr for
2413 anonymous aggregates, since they don't have assignment operator
2414 method.
2415 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
2416 assignment operators for anonymous structure fields.
2417
2418 2001-03-21 Jason Merrill <jason@redhat.com>
2419
2420 * pt.c (instantiate_decl): Abort if we see a member constant
2421 instantiation that doesn't already have its initializer.
2422 Downgrade explicit instantiation without definition to pedwarn.
2423
2424 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
2425 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
2426 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
2427
2428 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
2429 (pending_vtables): Remove.
2430 * decl2.c (pending_vtables): Remove.
2431 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
2432 CLASSTYPE_VTABLE_NEEDS_WRITING.
2433 (import_export_class): Likewise.
2434 (init_decl2): Don't mark pending_vtables.
2435 * lex.c (handle_pragma_vtable): Just sorry.
2436 * pt.c (instantiate_class_template): Don't mess with
2437 CLASSTYPE_VTABLE_NEEDS_WRITING.
2438 (mark_class_instantiated): Likewise.
2439 * ptree.c (print_lang_type): Don't print it.
2440 * semantics.c (begin_class_definition): Don't set it.
2441
2442 * pt.c (template_tail): Replace with last_pending_template.
2443 (maybe_templates, maybe_template_tail): Remove.
2444 (add_pending_template): Adjust.
2445 (instantiate_pending_templates): Adjust.
2446
2447 * cp-tree.h (struct saved_scope): Remove lang_stack field.
2448 (current_lang_stack): Remove.
2449 * decl.c (maybe_push_to_top_level): Don't initialize it.
2450 (duplicate_decls): Use current_lang_depth.
2451 (xref_basetypes): Likewise.
2452 * class.c (current_lang_depth): New fn.
2453 (push_lang_context): Use more varray functionality.
2454 (pop_lang_context): Likewise.
2455
2456 * error.c (GLOBAL_THING): Always use '__'.
2457
2458 2001-03-21 Mark Mitchell <mark@codesourcery.com>
2459
2460 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
2461
2462 * mangle.c (mangle_decl_string): Mangle the names of overloaded
2463 operators, even when they have `extern "C"' linkage.
2464
2465 2001-03-19 Mark Mitchell <mark@codesourcery.com>
2466
2467 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
2468 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2469 where it's not necessary.
2470 (add_method): Remove optimization involving comparison of
2471 DECL_ASSEMBLER_NAME.
2472 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
2473 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2474 where it's not necessary.
2475 (check_methods): Likewise.
2476 (build_clone): Likewise.
2477 (built_vtt): Likewise.
2478 * cp-tree.h (DECL_NEEDED_P): Likewise.
2479 * decl.c (pushtag): Likewise.
2480 (duplicate_decls): Likewise.
2481 (pushdecl): Likewise.
2482 (builtin_function): Likewise.
2483 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
2484 (build_cp_library_fn): Likewise.
2485 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
2486 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2487 where it's not necessary.
2488 (make_rtl_for_nonlocal_decl): Likewise.
2489 (cp_finish_decl): Likewise.
2490 (grokfndecl): Likewise.
2491 (grokvardecl): Likewise.
2492 (grokdeclarator): Likewise.
2493 (start_function): Likewise.
2494 (cp_missing_return_ok_p): Likewise.
2495 * decl2.c (grokclassfn): Likewise.
2496 (check_classfn): Likewise.
2497 (finish_static_data_member_decl): Likewise.
2498 (grokfield): Likewise.
2499 * error.c (GLOBAL_IORD_P): Remove.
2500 (dump_global_iord): Improve output.
2501 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
2502 * except.c (nothrow_libfn_p): Summarily reject any function not in
2503 namespace-scope.
2504 * init.c (build_java_class_ref): Don't explicitly set
2505 DECL_ASSEMBLER_NAME after calling mangle_decl.
2506 * mangle.c (mangle_decl_string): Handle extern "C" functions.
2507 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
2508 * method.c (set_mangled_name_for_decl): Don't explicitly set
2509 DECL_ASSEMBLER_NAME after calling mangle_decl.
2510 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
2511 IDENTIFIER_GLOBAL_VALUE for the thunk.
2512 * pt.c (set_mangled_name_for_template_decl): Remove.
2513 (check_explicit_specialization): Don't use it.
2514 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
2515 (tsubst_friend_function): Likewise.
2516 (tsubst_decl): Likewise.
2517 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
2518 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
2519 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2520 where it's not necessary.
2521 (tinfo_base_init): Likewise.
2522 (create_real_tinfo_var): Likewise.
2523 * search.c (looup_field_1): Likewise.
2524 * semantics.c (finish_named_return_value): Likewise.
2525 * tree.c (init_tree): Set lang_set_decl_assembler_name.
2526
2527 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
2528
2529 Correct semantics restrictions checking in throw-expression.
2530 * except.c (is_admissible_throw_operand): New function.
2531 (build_throw): Use it.
2532
2533 2001-03-14 Mark Mitchell <mark@codesourcery.com>
2534
2535 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
2536 and its ilk.
2537
2538 2001-03-14 Mark Mitchell <mark@codesourcery.com>
2539
2540 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2541 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
2542 * decl.c (duplicate_decls): Likewise.
2543 (builtin_function): Likewise.
2544 (build_library_fn): Likewise.
2545 (build_cp_library_fn): Likewise.
2546 (check_initializer): Likewise.
2547 (cp_finish_decl): Likewise.
2548 * decl2.c (grokfield): Likewise.
2549 (grok_function_init): Remove #if 0'd code.
2550 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2551 * friend.c (do_friend): Likewise.
2552 * init.c (get_temp_regvar): Likewise.
2553 * method.c (make_thunk): Likewise.
2554 * pt.c (tsubst_friend_function): Likewise.
2555 (tsubst_decl): Likewise.
2556 (regenerate_decl_from_template): Likewise.
2557 * semantics.c (genrtl_named_return_value): Likewise.
2558 (expand_body): Likewise.
2559 (genrtl_finish_function): Likewise.
2560 * tree.c (cp_tree_equal): Likewise.
2561
2562 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
2563
2564 * call.c (convert_like_real): Add extra semantics to INNER
2565 parameter. Don't convert to temporary if a user conversion
2566 gives us an lvalue that we're about to bind to a reference.
2567 Set INNER to indicate pending reference binding on recursive
2568 calls.
2569
2570 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
2571
2572 * cp/lex.c: Delete duplicate pending_lang_change.
2573
2574 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
2575
2576 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
2577 Similarly.
2578 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
2579 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
2580
2581 2001-03-09 Zack Weinberg <zackw@stanford.edu>
2582
2583 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
2584
2585 2001-03-08 Stan Shebs <shebs@apple.com>
2586
2587 * cp-tree.h (set_identifier_local_value): Remove unused decl.
2588
2589 2001-03-06 Zack Weinberg <zackw@stanford.edu>
2590
2591 * spew.c: Remove references to CPP_OSTRING.
2592
2593 2001-03-06 Andrew Haley <aph@redhat.com>
2594
2595 * typeck.c (convert_arguments): Check that we have an fndecl.
2596
2597 2001-03-05 Andrew Haley <aph@redhat.com>
2598
2599 * typeck.c (convert_arguments): Don't do ellipsis conversion for
2600 __built_in_constant_p.
2601
2602 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2603
2604 * typeck.c (build_static_cast): Allow enum to enum conversions
2605 as per DR 128.
2606
2607 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2608
2609 * class.c (check_field_decls): Pointers to member do not a
2610 non-pod struct make, as per DR 148.
2611
2612 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2613
2614 * call.c (joust): cp_pedwarn when using gnu extension concerning
2615 worst conversion sequences.
2616
2617 2001-03-01 Zack Weinberg <zackw@stanford.edu>
2618
2619 * decl.c: Replace all uses of 'boolean' with 'bool'.
2620
2621 2001-03-01 Zack Weinberg <zackw@stanford.edu>
2622
2623 * lang-specs.h: Add zero initializer for cpp_spec field to
2624 all array elements that need one. Don't put an #ifdef inside
2625 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
2626 use it.
2627
2628 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
2629
2630 Implement using decls inside template functions.
2631 * decl2.c (validate_nonmember_using_decl): Don't special case
2632 fake_std_node in the global namespace. Don't reject early when
2633 processing a template.
2634 (do_local_using_decl): Add to statement tree. Don't do further
2635 processing when building a template.
2636 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
2637
2638 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
2639
2640 * decl2.c (do_nonmember_using_decl): Don't complain if we find
2641 same function. Do complain about ambiguating extern "C"
2642 declarations.
2643
2644 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
2645
2646 Remove floating point and complex type template constant parms.
2647 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
2648 COMPLEX_TYPE extensions.
2649 (invalid_nontype_parm_type_p): Likewise.
2650
2651 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
2652
2653 * except.c (call_eh_info): Revert "match_function"'s type.
2654
2655 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
2656
2657 Fix ctor vtable vcall offsets.
2658 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
2659 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
2660 (get_matching_base): Remove.
2661 (get_original_base): New function.
2662 (build_vtbl_initializer): Initialize vid.rtti_binfo.
2663 Use a virtual thunk for a ctor vtable with an index
2664 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
2665 primary base within a constructor vtable. Only set
2666 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
2667 when primary base has been lost.
2668 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
2669
2670 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
2671
2672 * call.c (joust): Ensure more_specialized()'s argument length
2673 parameter has correct value for constructors.
2674
2675 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
2676
2677 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
2678
2679 * decl.c (mark_inlined_fns): Prototype.
2680
2681 2001-02-22 Mark Mitchell <mark@codesourcery.com>
2682
2683 * spew.c (yylex): Correct handling of friends.
2684
2685 2001-02-22 Mark Mitchell <mark@codesourcery.com>
2686
2687 * mangle.c (write_encoding): Pass write_function_type the
2688 FUNCTION_DECL for the function being encoded.
2689 (write_function_type): Pass it along to write_bare_function_type.
2690 (write_bare_function_type): Pass it along to write_method_parms.
2691 (write_method_parms): Don't mangle the compiler-generated
2692 parameters to a constructor or destructor.
2693
2694 2001-02-22 Andreas Jaeger <aj@suse.de>
2695
2696 * optimize.c: Include toplev.h for
2697 note_deferral_of_defined_inline_function prototype.
2698
2699 2001-02-22 Jakub Jelinek <jakub@redhat.com>
2700
2701 * cp-tree.h (struct lang_decl_inlined_fns): New.
2702 (struct lang_decls): Add inlined_fns.
2703 (DECL_INLINED_FNS): New macro.
2704 * optimize.c (struct inline_data): Add inlined_fns.
2705 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
2706 (inlinable_function_p): Likewise, fix typo in comment,
2707 function is not inlinable if it already inlined function currently
2708 being optimized.
2709 (expand_call_inline): Add fn to inlined_fns if necessary.
2710 (optimize_function): Initialize inlined_fns.
2711 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
2712 * decl.c (mark_inlined_fns): New function.
2713 (lang_mark_tree): Call it.
2714
2715 2001-02-21 Jason Merrill <jason@redhat.com>
2716
2717 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
2718 (DECL_UNINLINABLE): Move to middle-end.
2719
2720 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
2721 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
2722 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
2723 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
2724 parms and outer BLOCK. note_deferral_of_defined_inline_function.
2725
2726 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
2727 second parm of op=.
2728
2729 2001-02-19 Mark Mitchell <mark@codesourcery.com>
2730
2731 * decl2.c (set_decl_namespace): Allow explicit instantiations in
2732 any namespace.
2733
2734 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2735
2736 * optimize.c (expand_call_inline): Don't walk subtrees of type
2737 nodes.
2738
2739 2001-02-18 Mark Mitchell <mark@codesourcery.com>
2740
2741 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
2742 for a destructor.
2743
2744 2001-02-18 Jason Merrill <jason@redhat.com>
2745
2746 Do put the VTT parameter in DECL_ARGUMENTS.
2747 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
2748 (current_vtt_parm): New macro.
2749 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
2750 (DECL_HAS_VTT_PARM_P): New macro.
2751 (DECL_VTT_PARM): Remove.
2752 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
2753 * decl.c (duplicate_decls): Only copy the operator code if
2754 appropriate.
2755 (start_function): Set current_vtt_parm.
2756 (lang_mark_tree): Don't mark vtt_parm.
2757 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
2758 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
2759 * class.c (build_clone): Maybe remove the VTT parm.
2760 * optimize.c (maybe_clone_body): Set up the VTT parm.
2761 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
2762 * call.c (build_over_call): Just allow the VTT arg.
2763 * method.c (make_thunk): Don't set DECL_VTT_PARM.
2764 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
2765 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
2766 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
2767 * error.c (dump_function_decl): Likewise.
2768 * call.c (build_user_type_conversion_1, convert_like_real): Abort
2769 if we try to call a constructor with in-charge or VTT parms.
2770 * method.c (skip_artificial_parms_for): New fn.
2771 * call.c (add_function_candidate, build_over_call): Call it.
2772 * call.c (build_new_method_call): Use current_vtt_parm.
2773 * init.c (expand_virtual_init): Likewise.
2774 * class.c (same_signature_p): No longer static.
2775 * cp-tree.h: Declare it.
2776 * search.c (look_for_overrides_r): Use it.
2777
2778 2001-02-17 Mark Mitchell <mark@codesourcery.com>
2779
2780 * cp-tree.h (new_abi_rtti_p): Remove.
2781 (name_mangling_version): Likewise.
2782 (flag_do_squangling): Likewise.
2783 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
2784 * decl.c (grokfndecl): Likewise.
2785 * decl2.c (name_mangling_version): Remove.
2786 (flag_do_squangling): Likewise.
2787 (lang_f_options): Remove `squangle'.
2788 (unsupported_options): Add `squangle'.
2789 (cxx_decode_option): Issue a warning about uses of
2790 -fname-mangling-version.
2791 (finish_file): Remove old ABI support.
2792 * pt.c (check_explicit_specialization): Likewise.
2793 (tsubst_decl): Likewise.
2794 * rtti.c (init_rtti_processing): Likewise.
2795 (build_headof): Likewise.
2796 (get_tinfo_decl_dynamic): Likewise.
2797 (tinfo_from_decl): Likewise.
2798 (build_dynamic_cast_1): Likewise.
2799 (synthesize_tinfo_var): Likewise.
2800 * init.c (build_new): Allow enumeration types for the array-bounds
2801 in a direct-new-declarator.
2802
2803 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
2804
2805 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
2806 TREE_PROTECTED from the template being specialized.
2807
2808 2001-02-17 Jason Merrill <jason@redhat.com>
2809
2810 * decl2.c (build_artificial_parm): Set TREE_READONLY.
2811
2812 * decl.c (bad_specifiers): Allow throw specs on things with
2813 pointer-to-function or -member-function type.
2814 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
2815 a pmf.
2816
2817 2001-02-17 Mark Mitchell <mark@codesourcery.com>
2818
2819 * call.c (check_dtor_name): Handle template names correctly.
2820
2821 2001-02-16 Jason Merrill <jason@redhat.com>
2822
2823 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
2824 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
2825 * optimize.c (maybe_clone_body): Don't substitute it.
2826 * call.c (build_new_method_call): Check in_chrg instead.
2827 * init.c (expand_virtual_init): Likewise.
2828
2829 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
2830
2831 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
2832 class-type introduces at least a type-name.
2833
2834 2001-02-16 Jakub Jelinek <jakub@redhat.com>
2835
2836 * call.c (convert_like_real): Create a temporary for non-lvalue.
2837
2838 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
2839
2840 * cp-tree.h: Fix typos in comments.
2841
2842 2001-02-16 Jason Merrill <jason@redhat.com>
2843
2844 * optimize.c (remap_block): If we're compiling a clone, pass the
2845 new block to insert_block.
2846
2847 2001-02-16 Mark Mitchell <mark@codesourcery.com>
2848
2849 * semantics.c (finish_asm_stmt): Robustify.
2850
2851 2001-02-15 Mark Mitchell <mark@codesourcery.com>
2852
2853 * pt.c (push_template_decl_real): Don't remangle the name of a
2854 class template.
2855
2856 2001-02-15 Jim Meyering <meyering@lucent.com>
2857
2858 * Make-lang.in (c++.install-common): Depend on installdirs.
2859 (c++.install-info): Likewise.
2860 (c++.install-man): Likewise.
2861
2862 2001-02-15 Mark Mitchell <mark@codesourcery.com>
2863
2864 * typeck2.c (build_m_component_ref): Robustify.
2865
2866 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
2867
2868 * friend.c (do_friend): Don't take the nested [template] class
2869 into account when deciding whether to warn about the friend
2870 function not referring to a template function.
2871
2872 2001-02-14 Jakub Jelinek <jakub@redhat.com>
2873
2874 * typeck.c (build_unary_op): Clarify error message.
2875
2876 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
2877
2878 * parse.y (component_constructor_declarator): allow optional
2879 parentheses around constructor class name.
2880
2881 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2882
2883 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
2884 section.
2885 * init.c (emit_base_init): Remove incorrect comment about
2886 virtual bases.
2887 * method.c (make_thunk): Fix comment alignment.
2888
2889 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2890
2891 Kill remnants of this is variable.
2892 * cp-tree.h (flag_this_is_variable): Remove.
2893 * decl2.c (flag_this_is_variable): Remove.
2894 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
2895 (build_vbase_path): The path is non-static, even in a cdtor.
2896 (resolves_to_fixed_type_p): Add additional return value.
2897 * search.c (init_vbase_pointers): Adjust.
2898 * tree.c (lvalue_p_1): Adjust.
2899 * typeck.c (mark_addressable): Adjust.
2900
2901 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2902
2903 * pt.c (unify): Don't check cv quals of array types.
2904
2905 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2906
2907 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
2908 check whether we already have the type.
2909
2910 2001-02-13 Mark Mitchell <mark@codesourcery.com>
2911
2912 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
2913 * call.c (build_op_delete_call): Simplify to remove duplicate
2914 code.
2915 * class.c (clone_function_decl): Don't build the deleting variant
2916 of a non-virtual destructor.
2917 * decl.c (finish_destructor_body): Don't call delete if this is a
2918 non-virtual destructor.
2919 * init.c (build_delete): Explicitly call `operator delete' when
2920 deleting an object with a non-virtual destructor.
2921
2922 2001-02-13 Jason Merrill <jason@redhat.com>
2923
2924 * lang-specs.h: Add more __EXCEPTIONS.
2925
2926 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2927
2928 * typeck2.c (process_init_constructor): Check
2929 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2930
2931 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2932
2933 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2934 Remove spurious information in comment. Allow further
2935 adjustments of REFERENCE_TYPE args.
2936
2937 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2938
2939 * errfn.c (cp_deprecated): Tweak diagnostic text.
2940 * parse.y (new_initializer): Deprecate initializer lists
2941 extension.
2942
2943 2001-02-12 Mark Mitchell <mark@codesourcery.com>
2944
2945 Remove old ABI support.
2946
2947 2001-02-11 Mark Mitchell <mark@codesourcery.com>
2948
2949 * decl2.c (flag_vtable_thunks): Always set it to 1.
2950 (flag_new_abi): Likewise.
2951 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2952
2953 * Makefile.in (g++spec.o): Fix typo.
2954
2955 2001-02-09 Jason Merrill <jason@redhat.com>
2956
2957 * lang-specs.h: Restore definition of __EXCEPTIONS.
2958
2959 2001-02-08 Jason Merrill <jason@redhat.com>
2960
2961 * search.c (shared_member_p): New function.
2962 (lookup_field_r): Use it.
2963 * cp-tree.h (SHARED_MEMBER_P): Remove.
2964
2965 * method.c (process_overload_item): Handle template-dependent array
2966 bounds.
2967 * pt.c (type_unification_real): If we end up with undeduced nontype
2968 parms, try again.
2969
2970 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2971 types.
2972
2973 * typeck2.c (friendly_abort): Don't say anything if we have
2974 earlier errors or sorries.
2975
2976 * decl.c (check_tag_decl): Notice attempts to redefine bool and
2977 wchar_t. Ignore if in_system_header.
2978
2979 * decl.c (maybe_push_cleanup_level): New fn...
2980 (start_decl_1): ...split out from here.
2981 * cvt.c (build_up_reference): Use it.
2982 * cp-tree.h: Declare it.
2983
2984 2001-02-07 Mark Mitchell <mark@codesourcery.com>
2985
2986 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2987 spec.
2988
2989 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
2990
2991 * pt.c (lookup_template_class): Make sure it's a primary
2992 template or template_template_parm when called from the parser.
2993 (instantiate_template_class): Add assertion.
2994
2995 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
2996
2997 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2998 from error_mark_node.
2999
3000 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
3001
3002 Fix specification and implementation bugs in V3 ABI
3003 construction vtables.
3004 * cp-tree.h (flag_dump_class_layout): New flag.
3005 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
3006 (BINFO_LOST_PRIMARY_P): New flag.
3007 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
3008 (BINFO_PRIMARY_MARKED_P): Rename to ...
3009 (BINFO_PRIMARY_P): ... here.
3010 (binfo_via_virtual): New prototype.
3011 * decl2.c (flag_dump_class_layout): New flag.
3012 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
3013 use `=' as a file name separator.
3014 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
3015 bases.
3016 (build_vtbl_address): If this is a virtual primary base, then
3017 get the vtbl of what it is ultimately primary for.
3018 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
3019 for BINFO_PRIMARY_P.
3020 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3021 (get_shared_vbase_if_not_primary): Likewise.
3022 (dfs_get_pure_virtuals): Likewise.
3023 (expand_upcast_fixups): Likewise.
3024 (fixup_virtual_upcast_offsets): Likewise.
3025 (dfs_find_vbase_instance): Likewise.
3026 (find_vbase_instance): Likewise.
3027 (binfo_from_vbase): Adjust comment to reflect reality.
3028 (binfo_via_virtual): New function.
3029 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
3030 for binfo walking during VTT construction.
3031 (dfs_mark_primary_bases): Remove.
3032 (force_canonical_binfo_r): New function.
3033 (force_canonical_binfo): New function.
3034 (mark_primary_virtual_base): New function.
3035 (mark_primary_bases): Walk in inheritance graph order, use
3036 mark_primary_virtual_base.
3037 (determine_primary_base): Use some more intermediate variables.
3038 (dfs_find_final_overrider): Don't check for overriding along a
3039 virtual path.
3040 (dfs_modify_vtables): Walk into primary virtual bases too.
3041 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
3042 (build_base_fields): Likewise.
3043 (dfs_set_offset_for_unshared_vbases): Likewise.
3044 (layout_virtual_bases): Likewise.
3045 (end_of_class): Likewise.
3046 (finish_struct_1): Call dump_class_hierarchy, if requested.
3047 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
3048 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
3049 (dump_class_hierarchy): Add file parameter. Append to file, if
3050 required.
3051 (finish_vtbls): Adjust accumulate_vtbl_inits call.
3052 Use canonical base for virtual bases.
3053 (build_vtt): Add more comments. Adjust build_vtt_inits call.
3054 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
3055 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
3056 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
3057 virtual VTTs.
3058 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
3059 from DATA. We want virtual primary bases and all bases via virtual.
3060 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
3061 virtual base when not a construction vtable.
3062 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
3063 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
3064 Use canonical bases when processing virtual bases.
3065 (accumulate_vtbl_inits): We're interested in any base via a
3066 virtual path.
3067 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
3068 within a construction vtable, determine what is being overridden.
3069 (build_vtbl_initializer): Add more comments
3070 (add_vcall_offset_vtbl_entries_1): Adjust comment.
3071 (build_rtti_vtbl_entries): Check if the base has lost its
3072 primary.
3073
3074 2001-02-05 Mark Mitchell <mark@codesourcery.com>
3075
3076 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
3077
3078 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3079
3080 * decl.c (pushdecl): Call abort instead of fatal.
3081 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
3082 * init.c (build_new_1): Likewise.
3083 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
3084 * decl.c (build_typename_type): hash_table_init now returns void.
3085 decl.c (init_decl_processing): Make an error non-fatal.
3086
3087 2001-02-04 Mark Mitchell <mark@codesourcery.com>
3088
3089 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
3090 Document.
3091 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
3092 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
3093 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3094 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
3095 * decl.c (maybe_commonize_var): Use the new name-mangling where
3096 appropriate.
3097 * decl2.c (comdat_linkage): Enhance comments. Make all
3098 compiler-generated things static, if COMDAT is not available.
3099 (get_tinfo_decl): Do not make typeinfo objects that belong in the
3100 library COMDAT.
3101 (tinfo_base_init): Use the correct mangled name for typeinfo
3102 strings, and push them into the global scope.
3103 (typeinfo_in_lib_p): New function.
3104 (synthesize_tinfo_var): Use it.
3105 (create_real_tinfo_var): Likewise.
3106
3107 2001-02-03 Jakub Jelinek <jakub@redhat.com>
3108
3109 * decl.c (push_class_binding): Use context_for_name_lookup instead
3110 of CP_DECL_CONTEXT.
3111 * search.c (context_for_name_lookup): Remove static. Check for NULL
3112 context in the loop.
3113 * cp-tree.h (context_for_name_lookup): Add prototype.
3114
3115 2001-02-02 Jakub Jelinek <jakub@redhat.com>
3116
3117 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
3118 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
3119 Remove.
3120 * call.c (convert_class_to_reference, build_user_type_conversion_1,
3121 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
3122
3123 2001-02-02 Mark Mitchell <mark@codesourcery.com>
3124
3125 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
3126 of macros used when compiling g++spec.c.
3127 * g++spec.c (lang_specific_driver): Link with the shared
3128 libgcc by default.
3129
3130 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
3131
3132 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
3133 make_reference_declarator, make_call_declarator), method.c
3134 (implicitly_declare_fn), parse.y (namespace_using_decl,
3135 notype_unqualified_id, expr_or_declarator, new_type_id,
3136 after_type_declarator, direct_after_type_declarator,
3137 notype_declarator, complex_notype_declarator,
3138 complex_direct_notype_declarator, qualified_id,
3139 notype_qualified_id, overqualified_id, direct_new_declarator,
3140 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
3141 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
3142 instead of build_parse_node.
3143
3144 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3145
3146 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
3147 (minus_one_node): Moved to top level gcc directory. Renamed
3148 to integer_minus_one_node.
3149
3150 * init.c (init_init_processing): Don't set minus_one_node.
3151 (build_vec_init): Use integer_minus_one_node.
3152
3153 * rtti.c (get_tinfo_decl_dynamic): Likewise.
3154
3155 2001-01-28 Jakub Jelinek <jakub@redhat.com>
3156
3157 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
3158 identical and they would be replaced with constant, remove
3159 MODIFY_EXPR from the tree.
3160
3161 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3162
3163 * Make-lang.in: Remove all dependencies on defaults.h.
3164 * call.c: Don't include defaults.h.
3165 * decl.c: Likewise.
3166 * decl2.c: Likewise.
3167 * except.c: Likewise.
3168 * pt.c: Likewise.
3169 * rtti.c: Likewise.
3170 * tree.c: Likewise.
3171 * typeck.c: Likewise.
3172
3173 2001-01-25 Jakub Jelinek <jakub@redhat.com>
3174
3175 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
3176 operators even in "C" linkage.
3177 * method.c (set_mangled_name_for_decl): Likewise.
3178 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
3179 overloaded operators in "C" linkage.
3180
3181 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
3182
3183 * pt.c (tsubst_decl): Remove IN_DECL parameter.
3184 (tsubst_arg_types): Check parameter is not void.
3185 (tsubst): Adjust tsubst_decl call.
3186
3187 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
3188
3189 * call.c (add_builtin_candidate): Quote std properly, from
3190 previous change.
3191
3192 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3193
3194 * pt.c (check_explicit_specialization): Clone constructors and
3195 destructors.
3196
3197 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
3198
3199 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
3200 indicates anything special about template depth. Make sure we
3201 only count the user visible template classes.
3202
3203 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
3204
3205 * call.c (build_conv): Typo in comment.
3206 (add_builtin_candidate): Add more explanation.
3207 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
3208 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
3209 when we have enumeral types.
3210 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
3211 candidates for relops and eqops.
3212 (joust): Simplify control flow. Allow a non-template user
3213 function to hide a builtin.
3214
3215 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
3216
3217 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
3218 (more_specialized): Add deduction parameter.
3219 * call.c (joust): Adjust more_specialized call.
3220 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
3221 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
3222 (get_bindings_order): Remove.
3223 (get_bindings_real): Add DEDUCE parameter.
3224 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
3225 REFERENCE_TYPE jig for DEDUCE_ORDER.
3226 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
3227 maybe_adjust_types_for_deduction.
3228 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
3229 directly.
3230 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
3231 (check_cv_quals_for_unify): Use new unify qualifier flags.
3232 (unify): Clear new unify qualifier flags.
3233 (get_bindings_real): Add DEDUCE parameter.
3234 (get_bindings): Adjust call to get_bindings_real.
3235 (get_bindings_overload): Likewise.
3236 (most_specialized_instantiation): Adjust call to
3237 more_specialized.
3238
3239 2001-01-19 Jason Merrill <jason@redhat.com>
3240
3241 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
3242
3243 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
3244 -fnew-abi.
3245
3246 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
3247
3248 * decl2.c (arg_assoc_class): Fix double iteration logic.
3249
3250 2001-01-19 Jason Merrill <jason@redhat.com>
3251
3252 * init.c (build_delete): Always call convert_force to strip cv-quals.
3253
3254 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
3255 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
3256 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
3257
3258 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3259
3260 * search.c (get_vbase_1): Count only virtual bases.
3261
3262 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3263
3264 * class.c (duplicate_tag_error): Robustify flag clearing.
3265
3266 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3267
3268 * cp-tree.h (lookup_template_class): Add complain parm.
3269 * decl.c (lookup_namespace_name): Adjust call to
3270 lookup_template_class.
3271 (make_typename_type): Likewise.
3272 * semantics.c (finish_template_type): Likewise.
3273 * pt.c (lookup_template_class): Add complain parm. Adjust.
3274 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
3275 (tsubst): Likewise.
3276
3277 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3278
3279 * pt.c (copy_default_args_to_explicit_spec): Preserve
3280 object's CV quals. Reorganize.
3281
3282 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3283
3284 * typeck.c (build_modify_expr): Say `initialization' for
3285 INIT_EXPRs.
3286 * init.c (build_default_init): Convert to enumeral type, if
3287 needed.
3288
3289 2001-01-18 Jakub Jelinek <jakub@redhat.com>
3290
3291 * parse.y (nomods_initdcl0): Properly set things up for
3292 initdcl0_innards.
3293
3294 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3295
3296 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
3297 (type_unification_real): Set it.
3298 (unify): Use it.
3299
3300 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3301
3302 * decl.c (finish_destructor_body): Convert to vbase pointer here.
3303
3304 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3305
3306 * semantics.c (begin_class_definition): Check we're not inside a
3307 template parm list.
3308
3309 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3310
3311 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
3312 BASELINK_P.
3313
3314 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3315
3316 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
3317 * call.c (build_over_call): Add comment.
3318
3319 2001-01-16 Daniel Berlin <dberlin@redhat.com>
3320
3321 * cvt.c (ocp_convert): Handle vector type conversion
3322 * typeck2.c (digest_init): Handle vector type initializations
3323
3324 2001-01-16 Phil Edwards <pme@sources.redhat.com>
3325
3326 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
3327 was given.
3328
3329 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
3330
3331 * pt.c (check_nontype_parm): Rename to ...
3332 (invalid_nontype_parm_type_p): ... here.
3333 (process_template_parm): Adjust.
3334 (convert_template_argument): Adjust.
3335
3336 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
3337
3338 * pt.c (check_nontype_parm): New function.
3339 (process_template_parm): Use it.
3340 (convert_template_argument): Use it.
3341 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
3342 member.
3343
3344 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
3345
3346 * tree.c: Add defaults.h
3347 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
3348 * Make-lang.in (cp/tree.o): Add defaults.h.
3349
3350 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3351
3352 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
3353
3354 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3355
3356 * g++.1: Change to be ".so man1/gcc.1".
3357
3358 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3359
3360 * Make-lang.in (c++.info, c++.install-info): Build and install g++
3361 internals info.
3362 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
3363 ($(srcdir)/cp/g++int.info): New target.
3364 * gxxint.texi: Add info directory entry. Use @@ in email address.
3365 * .cvsignore: Update.
3366
3367 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
3368
3369 * typeck.c (build_c_cast): Do template processing earlier.
3370 Always pedwarn on array casts.
3371
3372 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
3373
3374 * friend.c (make_friend_class): Make sure a templated class is
3375 actually a template.
3376
3377 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3378
3379 * decl2.c (get_guard): Set linkage from guarded decl.
3380
3381 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3382
3383 * call.c (convert_default_arg): Check for unprocessed
3384 DEFAULT_ARG.
3385 * cp-tree.h (replace_defarg): Move to spew.c.
3386 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
3387 spew.c, which is where they really are.
3388 (done_pending_defargs): Declare.
3389 (unprocessed_defarg_fn): Declare.
3390 * decl.c (replace_defarg): Move to spew.c
3391 * parse.y (structsp): Call done_pending_defargs.
3392 * spew.c (defarg_fns): Rearrange list structure.
3393 (defarg_fnsdone): New static variable.
3394 (defarg_depfns): New static variable.
3395 (init_spew): Adjust.
3396 (add_defarg_fn): Store the type in TREE_TYPE.
3397 (do_pending_defargs): Detect and deal with ordering constraints
3398 and circularity.
3399 (done_pending_defargs): New function.
3400 (unprocessed_defarg_fn): New function.
3401 (replace_defarg): Moved from decl.c. Robustify. Don't save
3402 if circularity detected.
3403
3404 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3405
3406 * pt.c (unify): Check array has a domain, before checking
3407 whether it is variable sized.
3408
3409 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3410
3411 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
3412 parameters with pointers to arrays of unknown bound.
3413
3414 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3415
3416 * parse.y (template_parm_header, template_spec_header): New
3417 reductions. Split out from ...
3418 (template_header): ... here. Use them.
3419 (template_template_parm): Use template_parm_header.
3420 * semantics.c (finish_template_template_parm): Add assert.
3421
3422 2001-01-10 Mark Mitchell <mark@codesourcery.com>
3423
3424 * mangle.c (write_builtin_type): Fix thinko.
3425
3426 * pt.c (copy_default_args_to_explicit_spec_1): New function.
3427 (copy_default_args_to_explicit_spec): Likewise.
3428 (check_explicit_specialization): Use it.
3429
3430 * class.c (finish_struct_1): Remove last argument in call to
3431 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3432 * decl.c (builtin_function): Likewise.
3433 (build_cp_library_fn): Likewise.
3434 (check_initializer): Likewise.
3435 (make_rtl_for_nonlocal_decl): Likewise.
3436 (cp_finish_decl): Likewise.
3437 (start_function): Likewise.
3438 * decl2.c (finish_anon_union): Likewise.
3439 * friend.c (do_friend): Likewise.
3440 * init.c (build_java_class_ref): Likewise.
3441 * method.c (make_thunk): Likewise.
3442 * pt.c (tsubst_friend_function): Likewise.
3443 * semantics.c (expand_body): Likewise.
3444
3445 2001-01-10 Mark Mitchell <mark@codesourcery.com>
3446
3447 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
3448 looking at DECL_CLONED_FUNCTION for non-functions.
3449
3450 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3451
3452 * error.c (dump_template_parameter): Use parm to determine how
3453 to print default value.
3454
3455 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3456
3457 * class.c (duplicate_tag_error): Clear more flags.
3458
3459 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3460
3461 * call.c (build_new_method_call): Use binfo_for_vbase.
3462
3463 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
3464
3465 * cp-tree.h (flag_cond_mismatch): Don't declare.
3466 * decl2.c (flag_cond_mismatch): Don't define.
3467 (lang_f_options): Remove cond-mismatch.
3468 (unsupported_options): Add cond-mismatch.
3469
3470 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
3471
3472 * class.c (handle_using_decl): Reject using of constructor name
3473 of sourcing class. Allow injecting of a method with same name as
3474 nested class. Fixup error messages.
3475
3476 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
3477
3478 * decl2.c (lang_decode_option): Handle -Wformat=2.
3479
3480 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3481
3482 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
3483 initialized_in_class.
3484 (DECL_DEFINED_IN_CLASS_P): Rename to ...
3485 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
3486 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
3487 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
3488 * pt.c (check_default_tmpl_args): Adjust for
3489 DECL_INITIALIZED_IN_CLASS_P.
3490 (instantiate_class_template): Likewise.
3491 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
3492
3493 * class.c (finish_struct): Constify saved_filename.
3494
3495 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3496
3497 * class.c (duplicate_tag_error): Adjust diagnostic.
3498 (finish_struct): Locally set location to start of struct.
3499 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
3500
3501 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3502
3503 * decl.c (struct binding_level): Adjust class_shadowed comments
3504 to reflect reality.
3505 (push_class_level_binding): Ajust comments to reflect reality.
3506 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
3507 Don't set TREE_VALUE on the class_shadowed list.
3508
3509 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3510
3511 * decl2.c (acceptable_java_type): Allow references too.
3512 * init.c (build_java_class_ref): When using the new ABI, search
3513 `class$' and have it mangled with `mangle_decl.'
3514 * mangle.c (write_java_integer_type_codes): New function.
3515 (write_builtin_type): Detect and mangle Java integer and real
3516 types.
3517
3518 2001-01-07 Mark Mitchell <mark@codesourcery.com>
3519
3520 * decl2.c (grokfield): Don't accept `asm' specifiers for
3521 non-static data members.
3522
3523 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3524
3525 * expr.c (cplus_expand_expr): Don't reset `target'.
3526
3527 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
3528
3529 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
3530
3531 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
3532
3533 * parse.y (template_datadef): Check for error_mark_node.
3534
3535 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
3536
3537 * cp-tree.def (DEFAULT_ARG): Make `x' class.
3538
3539 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
3540
3541 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
3542 (record_builtin_type): Make non-static.
3543 (flag_short_double): Don't declare.
3544 (init_decl_processing): Remove the creation of many tree nodes now
3545 in c_common_nodes_and_builtins.
3546 (build_void_list_node): New function.
3547 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
3548 * cp-tree.h (flag_short_wchar): Don't declare.
3549
3550 2001-01-04 Mark Mitchell <mark@codesourcery.com>
3551
3552 * call.c (build_conv): Don't use build1 for USER_CONV.
3553 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
3554
3555 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
3556
3557 * lex.c (lang_init): Call c_common_lang_init.
3558
3559 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
3560
3561 * search.c (lookup_fnfields_here): Remove.
3562 (look_for_overrides_r): Use lookup_fnfields_1.
3563 Ignore functions from using declarations.
3564
3565 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
3566
3567 Implement exceptions specifiers for implicit member functions.
3568 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
3569 * method.c (synthesize_exception_spec): New function.
3570 (locate_dtor, locate_ctor, locate_copy): New functions.
3571 (implicitly_declare_fn): Generate the exception spec too.
3572 * search.c (check_final_overrider): Check artificial functions
3573 too.
3574 * typeck2.c (merge_exception_specifiers): New function.
3575
3576 2001-01-03 Jason Merrill <jason@redhat.com>
3577
3578 * init.c (build_default_init): New fn.
3579 (perform_member_init): Split out from here.
3580 (build_new_1): Use it. Simplify initialization logic.
3581 (build_vec_init): Take an array, rather than a pointer and maxindex.
3582 Speed up simple initializations. Don't clean up if we're assigning.
3583 * cp-tree.h: Adjust.
3584 * decl2.c (do_static_initialization): Remove TREE_VEC case.
3585 * parse.y (new_initializer): Return void_zero_node for ().
3586 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
3587 * typeck2.c (digest_init): Only complain about user-written
3588 CONSTRUCTORs.
3589
3590 2000-12-22 Mike Stump <mrs@wrs.com>
3591
3592 * decl2.c: (max_tinst_depth): Increase to 50.
3593
3594 2001-01-02 Mark Mitchell <mark@codesourcery.com>
3595
3596 * class.c (invalidate_class_lookup_cache): Zero the
3597 previous_class_values.
3598 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
3599 TREE_INT_CST_HIGH.
3600 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
3601 * decl.c (free_bindings): New variable.
3602 (push_binding): Don't create a new binding if we have one on the
3603 free list.
3604 (pop_binding): Put old bindings on the free list.
3605 (init_decl_processing): Use size_int, not build_int_2.
3606 Register free_bindings as a GC root.
3607 (cp_make_fname_decl): Use size_int, not build_int_2.
3608 (push_inline_template_parms_recursive): Likewise.
3609 (end_template_parm_list): Likewise.
3610 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
3611 (tsubst_template_parms): Use size_int, not build_int_2.
3612 (tsubst): Likewise.
3613 * rtti.c (get_vmi_pseudo_type_info): Likewise.
3614
3615 2001-01-02 Richard Henderson <rth@redhat.com>
3616
3617 * parse.y (asm): Set ASM_INPUT_P.
3618
3619 2001-01-02 Jason Merrill <jason@redhat.com>
3620
3621 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
3622 for v3 ABI.
3623
3624 * typeck.c (cp_truthvalue_conversion): New fn.
3625 * cvt.c (ocp_convert): Use it.
3626
3627 * cp-tree.h: Lose c-common.c decls.
3628
3629 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
3630 * cvt.c (convert_to_void): Use type_unknown_p.
3631
3632 * typeck.c (strip_all_pointer_quals): Also strip quals from
3633 pointer-to-member types.
3634
3635 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
3636 parse.y as C.
3637
3638 * call.c (build_new_method_call): Do evaluate the object parameter
3639 when accessing a static member.
3640 * typeck.c (build_component_ref): Likewise.
3641
3642 2001-01-02 Andreas Jaeger <aj@suse.de>
3643
3644 * decl.c (cp_missing_noreturn_ok_p): New.
3645 (init_decl_processing): Set lang_missing_noreturn_ok_p.
3646
3647 2000-12-29 Jakub Jelinek <jakub@redhat.com>
3648
3649 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
3650
3651 2000-12-29 Mark Mitchell <mark@codesourcery.com>
3652
3653 * class.c (pushclass): Remove #if 0'd code.
3654 * cp-tree.h (overload_template_name): Remove.
3655 * decl.c (store_bindings): Simplify.
3656 (pop_from_top_level): Likewise.
3657 * pt.c (overload_template_name): Remove.
3658 (instantiate_decl): Don't call push_to_top_level if it's not
3659 needed.
3660
3661 2000-12-28 Mark Mitchell <mark@codesourcery.com>
3662
3663 * pt.c (register_local_specialization): Don't return a value.
3664 (lookup_template_class): Use move-to-front heuristic when looking
3665 up template instantiations.
3666 (instantiate_decl): Only push_to_top_level when we're actually
3667 going to instantiate the template.
3668
3669 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
3670
3671 * search.c (binfo_for_vtable): Return least derived class, not
3672 most. Handle secondary vtables.
3673
3674 2000-12-22 Jason Merrill <jason@redhat.com>
3675
3676 * pt.c (more_specialized): Don't optimize len==0.
3677 (fn_type_unification): If we're adding the return type, increase len.
3678
3679 * typeck.c (build_binary_op): Fix pmf comparison logic.
3680
3681 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
3682 DECL_STATIC_FUNCTION_P.
3683
3684 * semantics.c (genrtl_finish_function): Don't try to jump to
3685 return_label unless it exists.
3686
3687 In partial ordering for a call, ignore parms for which we don't have
3688 a real argument.
3689 * call.c (joust): Pass len to more_specialized.
3690 (add_template_candidate_real): Strip 'this', pass len.
3691 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
3692 (get_bindings_order): New fn. Pass len down.
3693 (get_bindings_real): Strip 'this', pass len.
3694 (fn_type_unification): Likewise.
3695 (type_unification_real): Succeed after checking 'len' args.
3696 (most_specialized_instantiation): Lose explicit_args parm.
3697 * class.c (resolve_address_of_overloaded_function): Strip 'this',
3698 pass len.
3699
3700 2000-12-21 Jason Merrill <jason@redhat.com>
3701
3702 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
3703 DECL_TEMPLATE_RESULT.
3704
3705 * search.c (lookup_field_r): Call lookup_fnfields_1, not
3706 lookup_fnfields_here.
3707
3708 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
3709
3710 * call.c (build_object_call): Also allow conversions that return
3711 reference to pointer to function.
3712 (add_conv_candidate): Handle totype being ref to ptr to fn.
3713 (build_field_call): Also allow members of type reference to function.
3714 Lose support for calling pointer to METHOD_TYPE fields.
3715
3716 * error.c (dump_expr): Handle *_CAST_EXPR.
3717
3718 * typeck2.c (build_scoped_ref): Always convert to the naming class.
3719
3720 * tree.c (break_out_cleanups): Lose.
3721 * cp-tree.h: Remove prototype.
3722 * typeck.c (build_component_ref): Don't break_out_cleanups.
3723 (build_compound_expr): Likewise.
3724 * semantics.c (finish_expr_stmt): Likewise.
3725
3726 2000-12-20 Richard Henderson <rth@redhat.com>
3727
3728 * cp-tree.h: Update declarations.
3729 * decl.c (finish_case_label): Return the new stmt node.
3730 * semantics.c (finish_goto_stmt): Likewise.
3731 (finish_expr_stmt, finish_return_stmt): Likewise.
3732 (finish_break_stmt, finish_continue_stmt): Likewise.
3733 (finish_asm_stmt): Likewise.
3734 * parse.y (already_scoped_stmt): Set STMT_LINENO.
3735 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
3736 (simple_if, simple_stmt): Return the new stmt node.
3737 (save_lineno): New.
3738
3739 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3740
3741 * cp-tree.h: Don't declare warn_long_long.
3742
3743 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3744
3745 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
3746 IS_AGGR_TYPE.
3747
3748 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3749
3750 * pt.c (unify): Handle when both ARG and PARM are
3751 BOUND_TEMPLATE_TEMPLATE_PARM.
3752
3753 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3754
3755 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
3756 DECL_TEMPLATE_PARM_P.
3757
3758 2000-12-15 Jason Merrill <jason@redhat.com>
3759
3760 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
3761
3762 * init.c (build_new_1): Don't strip quals from type.
3763
3764 * decl.c (pushdecl): Don't check for linkage on a non-decl.
3765
3766 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
3767
3768 * call.c (build_new_function_call): Lose space before paren in
3769 error message.
3770 (build_new_method_call): Likewise.
3771
3772 * typeck2.c (build_m_component_ref): Propagate quals from datum.
3773
3774 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3775
3776 * pt.c (check_explicit_specialization): Propagate default
3777 function arguments to explicit specializations.
3778
3779 2000-12-13 DJ Delorie <dj@redhat.com>
3780
3781 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
3782 and <? operators.
3783
3784 2000-12-08 Jason Merrill <jason@redhat.com>
3785
3786 * error.c (dump_function_name): Don't let the user see __comp_ctor.
3787
3788 Clean up copy-initialization in overloading code.
3789 * call.c (build_user_type_conversion_1): Die if we are asked to
3790 convert to the same or a base type.
3791 (implicit_conversion): Avoid doing so. Lose reference binding code.
3792 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
3793 direct-initialization. Also do direct-init part of copy-init.
3794 (build_user_type_conversion): Don't provide context to convert_like.
3795 * cvt.c (ocp_convert): build_user_type_conversion will now provide
3796 the constructor call for copy-init.
3797
3798 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
3799 instantiation of a member template.
3800 (do_decl_instantiation): Not here.
3801
3802 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
3803
3804 * class.c (check_field_decls): Don't special case anonymous
3805 fields in error messages.
3806 (note_name_declared_in_class): Use %D on diagnostic.
3807
3808 * tree.c (pod_type_p): Use strip_array_types.
3809 (cp_valid_lang_attribute): Likewise.
3810 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
3811 multiple evaluations.
3812 (cp_has_mutable_p): Use strip_array_types.
3813
3814 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
3815
3816 * cp-tree.h (sufficient_parms_p): Declare new function.
3817 * call.c (sufficient_parms_p): New function, broken out of ...
3818 (add_function_candidate): ... here. Use it.
3819 (add_conv_candidate): Use it.
3820 * decl.c (grok_ctor_properties): Use it.
3821
3822 2000-12-07 Jakub Jelinek <jakub@redhat.com>
3823
3824 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
3825
3826 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
3827
3828 * decl2.c (lang_decode_option): Handle -Wformat-security.
3829
3830 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3831
3832 * pt.c (verify_class_unification): New function.
3833 (get_class_bindings): Use it.
3834 (try_class_unification): Tidy.
3835 (unify): Handle when argument of a template-id is not
3836 template parameter dependent.
3837 (template_args_equal): Handle when TREE_CODE's do not match.
3838
3839 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
3840
3841 * lang-specs.h (c++): When invoking the stand-alone preprocessor
3842 for -save-temps, pass all relevant -Defines to it, and then don't
3843 pass them to cc1plus.
3844
3845 2000-12-05 Will Cohen <wcohen@redhat.com>
3846
3847 * decl.c (finish_case_label): Cleared
3848 more_cleanups_ok in surrounding function scopes.
3849 (define_label): Likewise.
3850
3851 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
3852
3853 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
3854 (get_matching_virtual): Remove.
3855 (look_for_overrides): Declare new function.
3856 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
3857 DECL_VINDEX here.
3858 * class.c (check_for_override): Move base class iteration code
3859 to look_for_overrides.
3860 * search.c (next_baselink): Remove.
3861 (get_virtuals_named_this): Remove.
3862 (get_virtual_destructor): Remove.
3863 (tree_has_any_destructors_p): Remove.
3864 (struct gvnt_info): Remove.
3865 (check_final_overrider): Remove `virtual' from error messages.
3866 (get_matching_virtuals): Remove. Move functionality to ...
3867 (look_for_overrides): ... here, and ...
3868 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
3869 to be overriding.
3870
3871 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
3872
3873 * typeck.c (get_delta_difference): If via a virtual base,
3874 return zero.
3875 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
3876 adjustment.
3877
3878 2000-12-04 Richard Henderson <rth@redhat.com>
3879
3880 * error.c (dump_tree): Use output_add_string not OB_PUTS.
3881
3882 2000-12-04 Jason Merrill <jason@redhat.com>
3883
3884 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
3885 (write_builtin_type): Pass intSI_type_node and the like through
3886 type_for_mode.
3887 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
3888 Pass intSI_type_node and the like through type_for_mode.
3889 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
3890 * pt.c (tsubst, unify): Likewise.
3891 * tree.c (walk_tree): Likewise.
3892 * error.c (dump_type): Likewise.
3893 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
3894
3895 * Make-lang.in: Tweak top comment for emacs.
3896 (cp/TAGS): Restore.
3897
3898 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
3899
3900 * class.c (clone_function_decl): Robustify.
3901
3902 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
3903
3904 * decl.c (store_bindings): Only search in the non modified
3905 old_bindings for duplicates.
3906
3907 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
3908
3909 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
3910 TYPE_POLYMORPHIC_P.
3911
3912 * typeck.c (build_static_cast): Remove unused variable.
3913
3914 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3915
3916 * pt.c: Fix typo in comment.
3917
3918 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3919
3920 * decl2.c (warn_format): Remove definition.
3921 (lang_decode_option): Handle -Wformat-nonliteral,
3922 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
3923
3924 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3925
3926 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3927 (init_decl_processing): Don't create string_type_node,
3928 const_string_type_node, wint_type_node, intmax_type_node,
3929 uintmax_type_node, default_function_type, ptrdiff_type_node and
3930 unsigned_ptrdiff_type_node. Adjust position of call to
3931 c_common_nodes_and_builtins.
3932 (identifier_global_value): New function.
3933
3934 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
3935
3936 * call.c (standard_conversion): Reject pointer to member
3937 conversions from ambiguous, inaccessible or virtual bases.
3938 * typeck.c (build_static_cast): Don't check pointers to members
3939 specially.
3940
3941 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3942
3943 * method.c (do_build_copy_constructor): Preserve cv
3944 qualifications when accessing source object members.
3945 (do_build_assign_ref): Likewise. Remove separate diagnostics for
3946 unnamed fields.
3947
3948 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3949
3950 * method.c (do_build_assign_ref): Construct appropriately
3951 CV-qualified base reference. Don't allow const casts in base
3952 conversion.
3953
3954 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3955
3956 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3957 incomplete return type.
3958
3959 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3960
3961 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3962 * semantics.c (finish_base_specifier): Accept a _TYPE not a
3963 _DECL.
3964
3965 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3966
3967 * spew.c (yyerror): Cope if yylval.ttype is NULL.
3968
3969 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3970
3971 * decl.c (grokdeclarator): Diagnose undefined template contexts.
3972
3973 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3974
3975 * decl.c (grokdeclarator): Do type access control on friend
3976 class.
3977
3978 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3979
3980 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3981 bison parser ickiness.
3982 * pt.c (tsubst_friend_function): Enter namespace scope when
3983 tsubsting the function name.
3984 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3985
3986 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3987
3988 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3989 * cvt.c (cp_convert_to_pointer): Add force parameter.
3990 Allow conversions via virtual base if forced.
3991 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3992 (ocp_convert): Likewise.
3993 * search.c (binfo_from_vbase): Return the virtual base's binfo.
3994 * typeck.c (get_delta_difference): Adjust handling of virtual
3995 bases.
3996
3997 2000-11-26 Mark Mitchell <mark@codesourcery.com>
3998
3999 * tree.c (struct list_hash): Remove.
4000 (list_hash_table): Make it be an htab.
4001 (struct list_proxy): New type.
4002 (list_hash_eq): New function.
4003 (list_hash_pieces): Renamed from ...
4004 (list_hash): ... this.
4005 (list_hash_lookup): Remove.
4006 (list_hash_add): Remove.
4007 (hash_tree_cons): Use the generic hashtable.
4008 (mark_list_hash): Remove.
4009 (init_tree): Create the hashtable.
4010
4011 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
4012
4013 * method.c (build_mangled_C9x_name): Rename to
4014 build_mangled_C99_name. Change C9X references in comments to
4015 refer to C99.
4016
4017 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
4018
4019 * parse.y (unary_expr): Move VA_ARG from here ...
4020 (primary): ... to here.
4021
4022 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
4023
4024 * semantics.c (finish_id_expr): If type is error_mark, return
4025 error_mark.
4026
4027 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
4028
4029 * pt.c (lookup_template_class): Simplify loop exit constructs.
4030 Cope when there is no partial instantiation of a template
4031 template member.
4032
4033 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
4034
4035 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
4036
4037 2000-11-22 Mark Mitchell <mark@codesourcery.com>
4038
4039 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
4040 prefix.
4041
4042 * pt.c (do_decl_instantiate): Explicitly clone constructors and
4043 destructors that haven't already been cloned.
4044
4045 2000-11-20 Richard Henderson <rth@redhat.com>
4046
4047 * parse.y (yyparse_1): Rename the parser entry point.
4048
4049 2000-11-20 Alex Samuel <samuel@codesourcery.com>
4050
4051 * mangle.c (write_name): Use <unscoped-name> for names directly in
4052 function scope.
4053 (write_unscoped_name): Accept names directly in function scope.
4054
4055 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
4056
4057 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
4058 * parse.y (extdef): Add EXPORT reduction.
4059 * spew.c (yylex): Don't skip export here.
4060
4061 2000-11-19 Mark Mitchell <mark@codesourcery.com>
4062
4063 * decl.c (init_decl_processing): Correct name of pure virtual
4064 function under the new ABI.
4065 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
4066 (throw_bad_typeid): Likewise for bad typeid function.
4067
4068 2000-11-18 Mark Mitchell <mark@codesourcery.com>
4069
4070 * decl.c (grokparms): Don't even function types of `void' type,
4071 either.
4072 * mangle.c (write_type): Don't crash when confronted with the
4073 error_mark_node.
4074
4075 * decl.c (grokparms): Don't create parameters of `void' type.
4076
4077 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
4078
4079 * lex.c (mark_impl_file_chain): Delete.
4080 (init_parse): Remove call to ggc_add_string_root. No need to
4081 ggc_strdup a string constant. Do not add impl_file_chain to GC
4082 roots.
4083 (handle_pragma_implementation): No need to ggc_strdup main_filename.
4084
4085 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4086
4087 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
4088
4089 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4090
4091 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
4092 * decl.c (grokdeclarator): Don't reject void parms here.
4093 (require_complete_types_for_parms): Simplify, use
4094 complete_type_or_else.
4095 (grokparms): Remove bitrot. Remove funcdef parm.
4096 Deal with ellipsis parm lists here.
4097 * semantics.c (finish_parmlist): Don't append void_list_node
4098 here. Set PARMLIST_ELLIPSIS_P.
4099
4100 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4101
4102 * typeck2.c (incomplete_type_error): Reorganise to avoid
4103 excessive diagnostics.
4104
4105 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
4106
4107 * lex.c (struct impl_files, internal_filename): Constify a char *.
4108
4109 2000-11-16 Mark Mitchell <mark@codesourcery.com>
4110
4111 * mangle.c (write_special_name_constructor): Don't generate
4112 assembler junk when confronted with an old-style constructor.
4113 (write_special_name_destructor): Likewise.
4114 (mangle_decl_string): Do it here instead.
4115
4116 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
4117
4118 * call.c (op_error): Make error messages clearer.
4119
4120 2000-11-15 Mark Mitchell <mark@codesourcery.com>
4121
4122 * decl.c (wrapup_globals_for_namespace): Don't mark things
4123 TREE_ASM_WRITTEN when they're not.
4124
4125 2000-11-15 Jason Merrill <jason@redhat.com>
4126
4127 * typeck2.c (friendly_abort): Uncount the error before handing
4128 off to fancy_abort.
4129
4130 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
4131
4132 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
4133
4134 2000-11-14 Mark Mitchell <mark@codesourcery.com>
4135
4136 * class.c (build_vtbl_initializer): Fix typo in comment.
4137 * typeck.c (expr_sizeof): Don't crash on errors.
4138
4139 2000-11-14 Jim Wilson <wilson@redhat.com>
4140
4141 * lang-specs.h: Add %2 after %(cc1_options).
4142
4143 2000-11-14 Richard Henderson <rth@redhat.com>
4144
4145 * typeck.c (c_sizeof): Be strict about casting result value
4146 back to c_size_type_node.
4147 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
4148
4149 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
4150
4151 * typeck.c (build_unary_op): Use boolean_increment from
4152 c-common.c, moving the relevant code there.
4153
4154 2000-11-11 Jason Merrill <jason@redhat.com>
4155
4156 * typeck.c (mark_addressable): Don't call put_var_into_stack.
4157
4158 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
4159 in inlines.
4160
4161 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4162
4163 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
4164 * lex.c (copy_lang_decl): Likewise.
4165
4166 2000-11-09 Mark Mitchell <mark@codesourcery.com>
4167
4168 * dump.c (cp_dump_tree): Don't dump function bodies here.
4169
4170 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4171 (dump.o): Update dependency list.
4172 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
4173 (flag_dump_translation_unit): Likewise.
4174 (CP_TYPE_QUALS): Adjust definition.
4175 (DECL_C_BIT_FIELD): Remove.
4176 (SET_DECL_C_BIT_FIELD): Likewise.
4177 (CLEAR_DECL_C_BIT_FIELD): Likewise.
4178 (add_maybe_template): Likewise.
4179 (strip_array_types): Likewise.
4180 (dump_node_to_file): Likewise.
4181 (cp_dump_tree): New function.
4182 * decl.c (init_decl_processing): Set lang_dump_tree.
4183 * decl2.c (flag_dump_translation_unit): Remove.
4184 * dump.c: Move most of it to ../c-dump.c.
4185 (cp_dump_tree): New function.
4186 * pt.c (add_maybe_template): Remove.
4187 * typeck.c (strip_array_types): Likewise.
4188
4189 2000-11-07 Eric Christopher <echristo@redhat.com>
4190
4191 * decl.c (init_decl_processing): Change definition of
4192 __wchar_t to wchar_t. Remove artificial declaration of
4193 wchar_t.
4194 * lex.c: Change instances of __wchar_t to wchar_t.
4195
4196 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
4197
4198 * lex.c (do_identifier): Don't lookup_name for operators.
4199 * parse.y (operator): Save looking_for_typename.
4200 (unoperator): Restore it.
4201 * spew.c (frob_opname): Use nth_token for lookahead.
4202
4203 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
4204
4205 * decl.c (grok_op_properties): Always use coerce_new_type and
4206 coerce_delete_type.
4207 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
4208 exception specification. Tidy up.
4209 (coerce_delete_type): Preserve exception specification. Tidy up.
4210
4211 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
4212
4213 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
4214 (push_binding_level), error.c (cp_tree_printer), pt.c
4215 (process_partial_specialization, tsubst_template_arg_vector),
4216 search.c (lookup_member): Use memset () instead of bzero ().
4217
4218 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
4219
4220 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
4221
4222 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
4223
4224 * Make-lang.in (c++.distdir): Remove.
4225
4226 2000-11-04 Mark Mitchell <mark@codesourcery.com>
4227
4228 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
4229 declarations from different namespaces to be combined.
4230
4231 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
4232
4233 * decl.c: Include tm_p.h.
4234
4235 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
4236
4237 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
4238
4239 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
4240
4241 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
4242 (build_overload_value), repo.c (open_repo_file), xref.c
4243 (open_xref_file): Use strchr () and strrchr () instead of index ()
4244 and rindex ().
4245
4246 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
4247
4248 * call.c (build_over_call): Call fold on the CALL_EXPR.
4249
4250 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
4251
4252 * error.c (dump_template_decl): Separate template hearders with
4253 space not comma.
4254
4255 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
4256
4257 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
4258 TS_* flags with corresponding TFF_*. Adjust prototypes of
4259 functions (which used to take a tree_string_flags) to take an int.
4260
4261 * cp-tree.h (enum tree_string_flags): Remove
4262 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
4263 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
4264 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4265 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4266 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
4267 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
4268 (type_as_string, decl_as_string, expr_as_string,
4269 context_as_string): Adjust prototype.
4270
4271 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
4272 instead of TS_PLAIN.
4273
4274 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
4275 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
4276 plain `0'.
4277
4278 2000-10-30 Mark Mitchell <mark@codesourcery.com>
4279
4280 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
4281 (linkage_kind): New enumeration.
4282 (decl_linkage): New function.
4283 * decl2.c (comdat_linkage): Extend comment.
4284 * error.c (dump_function_decl): Print the arguments used to
4285 instantiate a template, even when not printing the type of the
4286 function.
4287 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
4288 not TREE_PUBLIC, to test for external linkage.
4289 * tree.c (decl_linkage): New function.
4290
4291 2000-10-28 Mark Mitchell <mark@codesourcery.com>
4292
4293 * pt.c (instantiate_decl): Always instantiate static data members
4294 initialized in-class.
4295
4296 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
4297
4298 * Make-lang.in: Move all build rules here from Makefile.in,
4299 adapt to new context. Wrap all rules that change the current
4300 directory in parentheses. Expunge all references to $(P).
4301 When one command depends on another and they're run all at
4302 once, use && to separate them, not ;. Add OUTPUT_OPTION to
4303 all object-file generation rules. Delete obsolete variables.
4304
4305 * Makefile.in: Delete.
4306 * config-lang.in: Delete outputs= line.
4307
4308 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
4309
4310 * error.c (dump_function_decl): Print no space between
4311 `ptr-operator' the `type-specifier' of the return type.
4312 (dump_type_prefix): Make sure we put space at the appropriate
4313 place.
4314
4315 2000-10-23 Jason Merrill <jason@redhat.com>
4316
4317 * call.c (equal_functions): Also call decls_match for extern "C" fns.
4318
4319 2000-10-22 Jason Merrill <jason@redhat.com>
4320
4321 * call.c (build_conditional_expr): Use ocp_convert to force
4322 rvalue conversion.
4323
4324 2000-10-22 Mark Mitchell <mark@codesourcery.com>
4325
4326 * call.c (standard_conversion): Use RVALUE_CONVs for all
4327 expressions that satisfy lvalue_p, not just those that satisfy
4328 real_lvalue_p.
4329
4330 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
4331
4332 * typeck.c (c_sizeof): Return an expression of `size_t' type,
4333 not one with TYPE_IS_SIZETYPE set.
4334 (dubious_conversion_warnings): Remove special-case code.
4335
4336 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
4337
4338 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
4339 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
4340 (dump_type_prefix): Print vector-of-int as 'int vector'.
4341 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
4342 * tree.c (walk_tree): Handle VECTOR_TYPE.
4343
4344 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
4345
4346 2000-10-21 Jason Merrill <jason@redhat.com>
4347
4348 * parse.y (operator): Set got_object from got_scope.
4349 Set looking_for_typename.
4350 * decl.c (lookup_name_real): Clear val after setting from_obj.
4351 Reorganize diagnostic.
4352
4353 2000-10-20 Jason Merrill <jason@redhat.com>
4354
4355 * tree.c (walk_tree): Don't walk into default args.
4356
4357 * error.c (dump_expr): Use host_integerp.
4358
4359 2000-10-20 David Edelsohn <edelsohn@gnu.org>
4360
4361 * typeck2.c (abstract_virtuals_error): Use "because" instead of
4362 "since" in error message.
4363
4364 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4365
4366 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
4367
4368 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
4369
4370 * decl.c (revert_static_member_fn): Fixed typo.
4371
4372 2000-10-19 Mark Mitchell <mark@codesourcery.com>
4373
4374 * class.c (subobject_offset_fn): New type.
4375 (dfs_record_base_offsets): Remove.
4376 (record_base_offsets): Likewise.
4377 (dfs_search_base_offsets): Likewise.
4378 (record_subobject_offset): New function.
4379 (check_subobject_offset): Likewise.
4380 (walk_subobject_offsets): Likewise.
4381 (record_subobject_offsets): Likewise.
4382 (layout_conflict_p): Reimplement.
4383 (layout_nonempty_base_or_field): Correct handling of type
4384 conflicts during layout.
4385 (layout_empty_base): Likewise.
4386 (build_base_field): Adjust to handle new representation of empty
4387 base offset table.
4388 (build_base_fields): Likewise.
4389 (layout_virtual_bases): Likewise.
4390 (splay_tree_compare_integer_csts): New function.
4391 (layout_class_type): Use a splay_tree, rather than a varray, to
4392 represent the offsets of empty bases.
4393
4394 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
4395 * decl.c (select_decl): Don't return declarations that are
4396 DECL_ANTICIPATED.
4397
4398 2000-10-18 Mark Mitchell <mark@codesourcery.com>
4399
4400 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
4401 (fake_std_node): New macro.
4402 * decl.c (in_std): Rename to ...
4403 (in_fake_std): ... this.
4404 (flag_no_builtin): Remove.
4405 (flag_no_nonansi_builtin): Likewise.
4406 (walk_namespaces_r): Use fake_std_node.
4407 (push_namespace): Use std_identifier.
4408 (pop_namespace): Use in_fake_std.
4409 (lookup_name_real): Use fake_std_node.
4410 (init_decl_processing): When -fhonor-std, create the `std'
4411 namespace. Don't create a dummy fake_std_node in that case.
4412 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
4413 (builtin_function): Put builtins whose names don't begin
4414 with `_' in the std namespace.
4415 * decl2.c (flag_no_builtin): Remove.
4416 (flag_no_nonansi_builtin): Likewise.
4417 (set_decl_namespace): Use fake_std_node.
4418 (validate_nonmember_using_decl): Likewise.
4419 (do_using_directive): Likewise.
4420 (handle_class_head): Likewise.
4421 * dump.c (dequeue_and_dump): Likewise.
4422 * except.c (init_exception_processing): Use std_identifier.
4423 * init.c (build_member_call): Use fake_std_node.
4424 * rtti.c (init_rtti_processing): Use std_identifier.
4425
4426 2000-10-17 Mark Mitchell <mark@codesourcery.com>
4427
4428 * cp-tree.h (back_end_hook): Remove declaration.
4429 * decl2.c (back_end_hook): Remove definition.
4430
4431 * dump.c (dequeue_and_dump): Dump TREE_USED.
4432
4433 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
4434
4435 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
4436
4437 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
4438
4439 * decl.c (WINT_TYPE): Define.
4440 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
4441 c_size_type_node, signed_size_type_node and wint_type_node.
4442
4443 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
4444
4445 * decl2.c (warn_missing_format_attribute): New variable.
4446 (lang_decode_option): Decode -Wmissing-format-attribute.
4447
4448 2000-10-16 Mark Mitchell <mark@codesourcery.com>
4449
4450 * typeck.c (qualify_type): Remove.
4451 (composite_pointer_type): Fix handling of conversions to `cv void*'.
4452
4453 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4454
4455 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
4456
4457 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4458
4459 * Makefile.in (parse.c, parse.h): Create atomically.
4460
4461 2000-10-12 Mark Mitchell <mark@codesourcery.com>
4462
4463 * class.c (current_obstack): Remove.
4464 * decl.c (ggc_p): Remove.
4465 (start_decl): Don't use decl_tree_cons.
4466 (grokdeclarator): Don't use build_decl_list.
4467 (start_function): Don't use decl_tree_cons.
4468 (finish_function): Don't mess with obstacks.
4469 * decl2.c (grok_x_components): Don't use build_decl_list.
4470 * lex.c (make_call_declarator): Don't call decl_tree_cons.
4471 (implicitly_declare_fn): Don't call build_decl_list.
4472 * parse.y (frob_specs): Don't call build_decl_list or
4473 decl_tree_cons.
4474 (expr_or_declarator_intern): Don't call decl_tree_cons.
4475 (primary): Don't call build_decl_list.
4476 (fcast_or_absdcl): Likewise.
4477 (typed_declspecs): Don't call decl_tree_cons.
4478 (reserved_declspecs): Don't call build_decl_list.
4479 (declmods): Likewise.
4480 (reserved_typespecquals): Likewise.
4481 (aggr): Likewise.
4482 (new_type_id): Likewise.
4483 (cv_qualifiers): Likewise.
4484 (after_type_declarator_intern): Likewise.
4485 (notype_declarator_intern): Likewise.
4486 (absdcl_intern): Likewise.
4487 (named_parm): Likewise.
4488 * pt.c (most_specialized_class): Likewise.
4489 * repo.c (temporary_obstack): Make it a structure, not a pointer.
4490 (init_repo): Initialize it.
4491 * search.c (current_obstack): Remove.
4492 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
4493
4494 2000-10-09 Richard Henderson <rth@cygnus.com>
4495
4496 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
4497 (c++ language support bits for libgcc): Remove.
4498 (c++.clean): Remove cplib2.txt cleanup.
4499 * config-lang.in (headers, lib2funcs): Remove.
4500
4501 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
4502 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
4503 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
4504 * inc/new.h, inc/typeinfo: Remove files.
4505
4506 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
4507
4508 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
4509 defined.
4510 (init_decl_processing): Initialize intmax_type_node and
4511 uintmax_type_node.
4512
4513 2000-10-06 Richard Henderson <rth@cygnus.com>
4514
4515 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
4516 (original_result_rtx): Remove.
4517 * decl.c (save_function_data): Don't clear x_result_rtx.
4518 (mark_lang_function): Don't mark it either.
4519 * expr.c (fixup_result_decl): Remove.
4520 * semantics.c (genrtl_named_return_value): Frob the return decl
4521 before calling emit_local_var.
4522 (genrtl_finish_function): Don't call fixup_result_decl.
4523 Always emit the jump to return_label.
4524
4525 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
4526
4527 * pt.c (lookup_template_class): Set current access for enum.
4528 (tsubst_enum): Set file & line for enum decl.
4529
4530 * spew.c (yylex): Remove unused variable.
4531
4532 2000-10-05 Richard Henderson <rth@cygnus.com>
4533
4534 * semantics.c (genrtl_finish_function): Don't init or check
4535 can_reach_end; remove noreturn and return value checks.
4536
4537 2000-10-05 Tom Tromey <tromey@cygnus.com>
4538
4539 * init.c (build_java_class_ref): Use `build_static_name' with a
4540 suffix, not a prefix, to build the class object's name.
4541
4542 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4543
4544 * cp-tree.h (access_kind): Fix comment typo.
4545 * decl2.c (grokfield): Fix diagnostic typo.
4546 * semantics.c (finish_template_type): Fix comment typo.
4547 (finish_qualified_object_call_expr): Likewise.
4548
4549 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4550
4551 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
4552 tsubsting fails.
4553
4554 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4555
4556 * spew.c (frob_id): New static function.
4557 (frob_opname): Use it.
4558 (yylex): Use it.
4559
4560 2000-10-01 Mark Mitchell <mark@codesourcery.com>
4561
4562 * decl.c (lang_mark_false_label_stack): Remove.
4563 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
4564
4565 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
4566
4567 * gxxint.texi: Use @email for formatting email addresses.
4568
4569 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
4570
4571 * error.c: Remove direct obstack manipulation. Replace with
4572 output_buffer-based formatting. Adjust calls to removed macros.
4573 (obstack_chunk_alloc, obstack_chunk_free): Remove.
4574 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
4575 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
4576
4577 2000-09-24 Mark Mitchell <mark@codesourcery.com>
4578
4579 * ir.texi: Move to ../c-tree.texi.
4580
4581 2000-09-20 Jason Merrill <jason@redhat.com>
4582
4583 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
4584
4585 2000-09-21 Andreas Jaeger <aj@suse.de>
4586
4587 * errfn.c: Move declaration of cp_printer and cp_printers to ...
4588 * cp-tree.h: ... here.
4589
4590 * error.c: Remove declaration of cp_printer.
4591
4592 2000-09-20 Mark Mitchell <mark@codesourcery.com>
4593
4594 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
4595
4596 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
4597
4598 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
4599 users.
4600
4601 2000-09-18 Mark Mitchell <mark@codesourcery.com>
4602
4603 * decl.c (start_function): Robustify.
4604
4605 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4606
4607 * cp-tree.h (check_function_format): Accept a `status' parameter.
4608
4609 * call.c, typeck.c: Updates calls to `check_function_format'.
4610
4611 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
4612
4613 * decl2.c (handle_class_head): Always push some scope even
4614 in the error case.
4615
4616 2000-09-16 Mark Mitchell <mark@codesourcery.com>
4617
4618 * cp-tree.h (struct cp_language_function): Remove
4619 x_scope_stmt_stack and name_declared.
4620 (current_scope_stmt_stack): Remove.
4621 (function_name_declared_p): New macro.
4622 (struct lang_decl_flags): Use c_lang_decl as a base class.
4623 (context): Remove.
4624 (struct lang_decl): Replace saved_tree with context.
4625 (DECL_FRIEND_CONTEXT): Adjust accordingly.
4626 (SET_DECL_FRIEND_CONTEXT): Likewise.
4627 (DECL_VIRTUAL_CONTEXT): Likewise.
4628 (DECL_SAVED_TREE): Remove.
4629 (C_DECLARED_LABEL_FLAG): Likewise.
4630 (cplus_expand_expr_stmt): Don't declare.
4631 (add_decl_stmt): Likewise.
4632 (add_scope_stmt): Likewise.
4633 * decl.c (mark_stmt_tree): Remove.
4634 (case_compare): Likewise.
4635 (finish_case_label): Use c_add_case_label.
4636 (init_decl_processing): Set more language-specific hooks.
4637 (build_enumerator): Fix typo in comment.
4638 (cplus_expand_expr_stmt): Remove.
4639 (mark_lang_function): Use mark_c_language_function.
4640 (lang_mark_tree): Use c_mark_lang_decl.
4641 * decl2.c: Change order of inclusion.
4642 * except.c: Likewise.
4643 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
4644 back on c_expand_expr.
4645 * friend.c: Include expr.h.
4646 * init.c: Change order of inclusion.
4647 * Makefile.in: Update dependencies.
4648 * lex.h (free_lang_decl_chain): Remove.
4649 * optimize.c (maybe_clone_body): Use function_name_declared_p.
4650 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
4651 it doesn't exist.
4652 (instantiate_decl): Use function_name_declared_p.
4653 * semantics.c (lang_expand_expr_stmt): Remove.
4654 (set_current_function_name_declared): Likewise.
4655 (current_function_name_declared): Likewise.
4656 (begin_compound_stmt): Use function_name_declared_p.
4657 (add_decl_stmt): Remove.
4658 (setup_vtbl_ptr): Use function_name_declared_p.
4659 (add_scope_stmt): Remove.
4660 (current_scope_stmt_stack): New function.
4661 (cp_expand_stmt): Don't handle SCOPE_STMTs.
4662 (expand_body): Use function_name_declared_p.
4663 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
4664 * typeck.c: Change order of includes.
4665 (convert_sequence): Remove.
4666
4667 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
4668
4669 * lex.c (reswords): Add _Complex.
4670
4671 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4672
4673 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
4674
4675 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
4676
4677 * init.c (begin_init_stmts): Don't use // comments.
4678
4679 2000-09-12 Jason Merrill <jason@redhat.com>
4680
4681 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
4682 all non-extern arrays.
4683
4684 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
4685 typenames, too. Downgrade complaint to pedwarn.
4686 (xref_tag): Warn about surprising behavior of 'friend struct T'.
4687 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
4688 'class This::Inherited'.
4689
4690 2000-09-12 Mark Mitchell <mark@codesourcery.com>
4691
4692 * decl.c (finish_case_label): Given the LABEL_DECL a
4693 DECL_CONTEXT.
4694
4695 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
4696
4697 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
4698 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
4699 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4700 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4701 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
4702 New macros.
4703 (sorry_for_unsupported_tree, print_scope_operator,
4704 print_left_paren, print_right_paren, print_left_bracket,
4705 print_right_bracket, print_whitespace): Likewise.
4706 (aggr_variety): Rename to class_key_or_enum.
4707 (print_type): Rename to print_type_id.
4708 (print_type_specifier_seq, print_simple_type_specifier,
4709 print_elaborated_type_specifier,
4710 print_rest_of_abstract_declarator,
4711 print_parameter_declaration_clause, print_exception_specification,
4712 print_nested_name_specifier, print_template_id,
4713 typedef_original_name, print_template_argument_list_start,
4714 print_template_argument_list_end): New functions.
4715
4716 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
4717
4718 * ir.texi: Add more documentation.
4719
4720 2000-09-11 Mark Mitchell <mark@codesourcery.com>
4721
4722 * cp-tree.h (struct saved_scope): Remove x_function_parms.
4723 (current_function_parms): Don't define.
4724 (struct cp_language_function): Remove parms_stored.
4725 (current_function_just_assigned_this): Don't define.
4726 (current_function_parms_stored): Likewise.
4727 (static_ctors): Declare.
4728 (static_dtors): Likewise.
4729 (SF_EXPAND): Don't define.
4730 (expand_start_early_try_stmts): Remove declaration.
4731 (store_parm_decls): Likewise.
4732 * decl.c (static_ctors): Don't declare.
4733 (static_dtors): Likewise.
4734 (struct binding_level): Remove this_block.
4735 (poplevel): Remove dead code.
4736 (set_block): Likewise.
4737 (mark_binding_level): Don't mark this_block.
4738 (mark_saved_scope): Don't mark x_function_parms.
4739 (init_decl_processing): Don't add current_function_parms as a GC
4740 root.
4741 (check_function_type): Change prototype.
4742 (start_function): Remove RTL-generation code.
4743 (expand_start_early_try_stmts): Remove.
4744 (store_parm_decls): Give it internal linkage. Remove
4745 RTL-generation code.
4746 (finish_function): Remove RTL-generation code.
4747 * decl2.c (static_ctors): Fix formatting.
4748 (static_dtors): Likewise.
4749 * method.c (use_thunk): Don't call store_parm_decls.
4750 (synthesize_method): Likewise.
4751 * optimize.c (maybe_clone_body): Likewise.
4752 * parse.y (fn.def2): Likewise.
4753 (.set_base_init): Likewise.
4754 (nodecls): Likewise.
4755 * pt.c (instantiate_decl): Likewise.
4756 * rtti.c (synthesize_tinfo_fn): Likewise.
4757 * semantics.c (genrtl_try_block): Simplify.
4758 (expand_body): Use genrtl_start_function and
4759 genrtl_finish_function.
4760 (genrtl_start_function): New function.
4761 (genrtl_finish_function): Likewise.
4762
4763 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
4764
4765 * error.c (cp_tree_printer, case 'P'): Append break.
4766
4767 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
4768
4769 * cp-tree.h (frob_opname): Declare.
4770 * parse.y (saved_scopes): New static variable.
4771 (cp_parse_init): Adjust.
4772 (do_id): If lastiddecl is NULL, do do_identifier.
4773 (operator): Save scope information.
4774 (unoperator): New reduction. Restore scope information.
4775 (operator_name): Append unoperator. Call frob_opname.
4776 * spew.c (frob_opname): Define.
4777
4778 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
4779
4780 * decl.c, rtti.c: Include defaults.h if not already included.
4781 Don't define the *_TYPE_SIZE macros.
4782
4783 2000-09-09 Mark Mitchell <mark@codesourcery.com>
4784
4785 * cp-tree.h (push_switch): Change prototype.
4786 (check_cp_case_value): Remove declaration.
4787 (decl_constant_value): Likewise.
4788 * decl.c (struct cp_switch): Add switch_stmt and cases.
4789 (case_compare): New function.
4790 (push_switch): Set switch_stmt. Initialize cases.
4791 (pop_switch): Clean up cases.
4792 (define_case_label): Rename to ...
4793 (finish_case_label): ... this. Do semantic analysis for case
4794 labels here.
4795 (start_function): Correct comment.
4796 * decl2.c (check_cp_case_value): Remove.
4797 * expr.c (do_case): Remove.
4798 * pt.c (tsubst_expr): Adjust call to finish_case_label.
4799 * semantics.c (genrtl_do_poplevel): Remove declaration.
4800 (RECHAIN_STMTS): Remove.
4801 (finish_break_stmt): Use build_break_stmt.
4802 (finish_continue_stmt): Use build_continue_stmt.
4803 (finish_switch_cond): Adjust condition here, rater than in
4804 c_expand_start_case.
4805 (finish_case_label): Remove.
4806 * typeck.c (c_expand_return): Remove.
4807 (c_expand_start_case): Likewise.
4808
4809 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
4810
4811 * ir.texi: Document type nodes.
4812
4813 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4814
4815 * cp-tree.h (init_cp_semantics): Declare.
4816 (genrtl_try_block): Don't declare.
4817 (genrtl_handler): Likewise.
4818 (genrtl_catch_block): Likewise.
4819 (genrtl_ctor_stmt): Likewise.
4820 (genrtl_subobject): Likewise.
4821 (genrtl_do_poplevel): Likewise.
4822 (genrtl_named_return_value): Likewise.
4823 * lex.c (init_parse): Call init_cp_semantics.
4824 * semantics.c (genrtl_try_block): Give it internal linkage.
4825 (genrtl_handler): Likewise.
4826 (genrtl_catch_block): Likewise.
4827 (genrtl_ctor_stmt): Likewise.
4828 (genrtl_subobject): Likewise.
4829 (genrtl_do_poplevel): Likewise.
4830 (genrtl_named_return_value): Likewise.
4831 (lang_expand_stmt): Rename to ...
4832 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
4833 (init_cp_semantics): Define.
4834
4835 * decl.c (initialize_local_var): Remove RTL-generating code.
4836 * semantics.c (genrtl_try_block): Fix formatting.
4837
4838 Move statement-tree facilities from C++ to C front-end.
4839 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
4840 (void_zero_node): Remove.
4841 (stmt_tree): Likewise.
4842 (scope_chain): Adjust.
4843 (language_function): Rename to cp_language_function.
4844 (cp_function_chain): Adjust.
4845 (current_stmt_tree): Remove.
4846 (last_tree): Likewise.
4847 (last_expr_type): Likewise.
4848 (struct lang_decl): Adjust.
4849 (STMT_IS_FULL_EXPR_P): Remove.
4850 (add_tree): Remove.
4851 (begin_stmt_tree): Likewise.
4852 (finish_stmt_tree): Likewise.
4853 (walk_tree_fn): Likewise.
4854 (walk_stmt_tree): Likewise.
4855 * class.c (finish_struct): Replace use of add_tree with add_stmt.
4856 * decl.c (mark_stmt_tree): Adjust type.
4857 (init_decl_processing): Don't build void_zero_node.
4858 (initialize_local_var): Adjust usage of current_stmt_tree.
4859 (finish_enum): Use add_stmt, not add_tree.
4860 (save_function_data): Adjust use of language_function.
4861 (finish_constructor_body): Use add_stmt, not add_tree.
4862 (finish_destructor_body): Likewise.
4863 (push_cp_function_context): Adjust use of language_function.
4864 (pop_cp_function_context): Likewise.
4865 (mark_lang_function): Likewise.
4866 (mark_cp_function_context): Likewise.
4867 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
4868 (build_vec_init): Likewise.
4869 * semantics.c (SET_LAST_STMT): Remove.
4870 (RECHAIN_STMTS): Don't use it.
4871 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
4872 (current_stmt_tree): Define.
4873 (add_tree): Remove.
4874 (finish_goto_stmt): Use add_stmt, not add_tree.
4875 (finish_expr_stmt): Likewise.
4876 (begin_if_stmt): Likewise.
4877 (finish_then_clause): Likewise.
4878 (begin_while_stmt): Likewise.
4879 (begin_do_stmt): Likewise.
4880 (finish_return_stmt): Likewise.
4881 (begin_for_stmt): Likewise.
4882 (finish_break_stmt): Likewise.
4883 (finish_continue_stmt): Likewise.
4884 (begin_switch_stmt): Likewise.
4885 (finish_case_label): Likewise.
4886 (begin_try_block): Likewise.
4887 (begin_function_try_block): Likewise.
4888 (begin_handler): Likewise.
4889 (begin_catch_block): Likewise.
4890 (begin_compound_stmt): Likewise.
4891 (begin_asm_stmt): Likewise.
4892 (finish_asm_stmt): Likewise.
4893 (finish_label_stmt): Likewise.
4894 (add_decl_stmt): Likewise.
4895 (finish_subobject): Likewise.
4896 (finish_decl_cleanup): Likewise.
4897 (finish_named_return_value): Likewise.
4898 (setup_vtbl_ptr): Likewise.
4899 (add_scope_stmt): Likewise.
4900 (finish_stmt_expr): Likewise.
4901 (prune_unused_decls): Remove.
4902 (begin_stmt_tree): Likewise.
4903 (finish_stmt_tree): Likewise.
4904 (prep_stmt): Adjust use of current_stmt_tree.
4905 (lang_expand_stmt): Likewise.
4906 * tree.c (statement_code_p): Remove.
4907 (cp_statement_code_p): New function.
4908 (walk_stmt_tree): Remove.
4909 (init_tree): Set lang_statement_code_p.
4910
4911 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
4912
4913 Integrated preprocessor.
4914
4915 * Make-lang.in, Makefile.in: Remove all references to input.c,
4916 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
4917 * gxx.gperf, hash.h, input.c: Delete.
4918 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
4919 initialized properly.
4920
4921 * class.c (fixup_pending_inline): Take a tree, not a
4922 struct pending_inline *. All callers changed.
4923 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4924 RID_PROTECTED entries in ridpointers[] array here.
4925 * decl.c (duplicate_decls): Do not refer to struct
4926 pending_inline.
4927 (record_builtin_type, init_decl_processing): Use RID_MAX not
4928 CP_RID_MAX.
4929 (grokdeclarator): Use C_IS_RESERVED_WORD.
4930 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4931 cpplib.
4932 (grok_x_components): Do not inspect pending_inlines chain.
4933
4934 * cp-tree.h (struct lang_identifier): Add rid_code entry.
4935 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4936 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4937 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4938 TIME_IDENTIFIER_FILEINFO): Kill.
4939 Update prototypes.
4940 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
4941 single 32-bit word.
4942 * parse.y: Call do_pending_inlines unconditionally.
4943 reinit_parse_for_method is now snarf_method. fn.defpen is no
4944 longer necessary. Remove unnecessary <itype> annotation on
4945 SCOPE. Do not refer to end_of_file or struct pending_inline.
4946 * semantics.c (begin_inline_definitions): Call
4947 do_pending_inlines unconditionally.
4948
4949 * lex.c: Remove all code now shared with C front end.
4950 Initialize cpplib properly if USE_CPPLIB. Put reserved words
4951 into the get_identifier table. Rewrite pragma handling to
4952 work with the registry. Move code to save tokens for later
4953 processing to spew.c.
4954
4955 * spew.c: Rewrite everything in terms of token streams instead
4956 of text. Move routines here from lex.c / input.c as
4957 appropriate. GC-mark trees hanging off the pending inlines
4958 chain.
4959
4960 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4961
4962 * NEWS: Mention that the named return value extension has been
4963 deprecated.
4964 * cp-tree.h (original_result_rtx): Define.
4965 (TREE_REFERENCE_EXPR): Remove.
4966 (DECL_VPARENT): Likewise.
4967 (pushdecl_nonclass_level): Likewise.
4968 (store_return_init): Likewise.
4969 (reinit_lang_specific): Likewise.
4970 (genrtl_named_return_value): Change prototype.
4971 * decl.c (original_result_rtx): Remove.
4972 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4973 Do not generate RTL for local variables here.
4974 (store_return_init): Remove.
4975 * semantics.c (genrtl_named_return_value): Simplify. Fold in
4976 store_return_init.
4977 (finish_named_return_value): Adjust accordingly. Warn that this
4978 extension is deprecated.
4979 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4980
4981 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4982
4983 * pt.c (type_unification_real): Replace switch with if.
4984 (unify): Tsubst non-type parms before comparing.
4985
4986 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4987
4988 * error.c (dump_typename): New function, broken out of ...
4989 (dump_type): ... here. Use it.
4990 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4991
4992 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4993
4994 * init.c (build_offset_ref): Deal with namespace scoped
4995 TEMPLATE_ID_EXPRs.
4996
4997 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4998
4999 * class.c (resolve_address_of_overloaded_function): Add
5000 explanation message.
5001 * decl.c (define_case_label): Reformat explanation.
5002 * decl2.c (finish_static_data_member_decl): Likewise.
5003 (grokfield): Likewise.
5004 * friend.c (do_friend): Likewise.
5005
5006 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
5007
5008 * tree.c (walk_tree): Expose tail recursion.
5009 (walk_stmt_tree): New function.
5010 * cp-tree.h: Prototype walk_stmt_tree.
5011 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
5012 the BLOCKs directly. If a BLOCK has no variables after
5013 pruning, discard it.
5014 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
5015 restore the line number.
5016
5017 2000-09-05 Mark Mitchell <mark@codesourcery.com>
5018
5019 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
5020 (pt.o): Remove dependency on HTAB_H.
5021 * cp-tree.h: Include hashtab.h.
5022 (walk_tree): Change prototype.
5023 (walk_tree_without_duplicates): New function.
5024 * decl.c (check_default_argument): Use it.
5025 * optimize.c (remap_decl): Adjust calls to walk_tree.
5026 (copy_body): Likewise.
5027 (expand_calls_inline): Likewise.
5028 (calls_setjmp_p): Use walk_tree_without_duplicates.
5029 * pt.c: Don't include hashtab.h.
5030 (for_each_template_parm): Use walk_tree_without_duplicates.
5031 * semantics.c (finish-stmt_tree): Likewise.
5032 (expand_body): Likewise.
5033 * tree.c (walk_tree): Add additional parameter.
5034 (walk_tree_without_duplicates): New function.
5035 (count_trees): Use it.
5036 (verify_stmt_tree): Adjust call to walk_tree.
5037 (find_tree): Use walk_tree_without_duplicates.
5038 (no_linkage_check): Likewise.
5039 (break_out_target_exprs): Adjust call to walk_tree.
5040 (cp_unsave): Likewise.
5041
5042 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5043
5044 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
5045 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5046 * cp-tree.h (TYPE_BINFO): Adjust comment.
5047 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5048 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
5049 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
5050 (TYPE_TEMPLATE_INFO): Likewise.
5051 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
5052 * class.c (push_nested_class): Likewise.
5053 * decl.c (lookup_name_real): Likewise.
5054 (grokdeclarator): Likewise.
5055 (grok_op_properties): Likewise.
5056 (xref_tag): Likewise.
5057 (xref_basetypes): Likewise.
5058 * decl2.c (constructor_name_full): Likewise.
5059 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
5060 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
5061 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
5062 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5063 (dump_type_suffix): Likewise.
5064 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
5065 instead.
5066 (get_aggr_from_typedef): Likewise.
5067 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
5068 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5069 (write_template_parm): Likewise.
5070 (write_template_template_parm): Check tree code instead of
5071 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5072 * method.c (build_overload_nested_name): Add
5073 BOUND_TEMPLATE_TEMPLATE_PARM.
5074 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
5075 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5076 * pt.c (convert_template_argument): Check tree code instead of
5077 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5078 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
5079 (for_each_template_parm): Adjust comment.
5080 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
5081 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5082 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
5083 template_args_equal to compare template template parameter cases.
5084 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5085 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
5086 instead.
5087 * tree.c (copy_template_template_parm): Decide whether to create
5088 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
5089 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5090 (copy_tree_r): Likewise.
5091 * typeck.c (comptypes): Likewise. Check tree code instead of
5092 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5093
5094 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
5095
5096 * decl.c (finish_function): Move the code for handling functions
5097 marked with the constructor and destructor attributes inside the
5098 expand_p block.
5099
5100 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5101
5102 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
5103
5104 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5105
5106 * pt.c (lookup_template_class): Remove abort.
5107 * tree.c (get_type_decl): Allow error_mark_node.
5108
5109 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5110
5111 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
5112 TEMPLATE_ID_EXPRs.
5113
5114 2000-09-03 Mark Mitchell <mark@codesourcery.com>
5115
5116 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
5117 new ABI mangling.
5118
5119 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
5120
5121 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
5122 union tag mismatch error reporting.
5123
5124 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
5125
5126 * call.c (build_scoped_method_call): Check it is not a namespace.
5127
5128 2000-08-30 Jason Merrill <jason@redhat.com>
5129
5130 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
5131
5132 * tree.c (bot_manip): Check TREE_CONSTANT rather than
5133 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
5134 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
5135
5136 * decl.c (start_function): Always call make_function_rtl.
5137
5138 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
5139
5140 * semantics.c (prune_unused_decls): New function.
5141 (finish_stmt_tree): Call it via walk_tree.
5142
5143 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
5144
5145 * class.c (build_secondary_vtable): Constify a char *.
5146 * decl.c (init_decl_processing): Initialize function_id_node,
5147 pretty_function_id_node, and func_id_node.
5148 * input.c (struct input_source): Constify 'str'.
5149 (feed_input): Constify first argument.
5150 * mangle.c (write_identifier): Constify argument.
5151 * pt.c (mangle_class_name_for_template): Constify argument.
5152
5153 2000-08-29 Mark Mitchell <mark@codesourcery.com>
5154
5155 * typeck.c (mark_addressable): Remove code that pokes around in
5156 RTL.
5157
5158 2000-08-28 Jason Merrill <jason@redhat.com>
5159
5160 * lex.c (file_name_nondirectory): Move to toplev.c.
5161
5162 * cp-tree.h (LOCAL_CLASS_P): New macro.
5163 * class.c (finish_struct_1): Use it.
5164
5165 2000-08-27 Alex Samuel <samuel@codesourcery.com>
5166
5167 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
5168 (write_encoding): Pass another argument to write_name.
5169 (write_name): Add ignore_local_scope parameter. Fix handling of
5170 local names.
5171 (write_nested_name): Use write_unqualified_name.
5172 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
5173 (write_template_prefix): Use write_unqualified_name.
5174 (write_component): Remove.
5175 (write_local_name): Add parameter. Use direct local entity to
5176 discriminator calculation.
5177 (write_class_enum_type): Pass another argument to write_name.
5178 (write_template_template_arg): Likewise.
5179 (make_guard_variable): Likewise.
5180
5181 2000-08-27 Jason Merrill <jason@redhat.com>
5182
5183 * decl.c (pushdecl): Matching decls for local externs are found in
5184 the current level. Propagate linkage information from previous
5185 declarations.
5186
5187 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
5188
5189 * ir.texi (Expressions): Fix typo.
5190
5191 2000-08-25 Greg McGary <greg@mcgary.org>
5192
5193 * tree.c (init_tree): Use ARRAY_SIZE.
5194
5195 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
5196
5197 * error.c (cp_tree_printer): Rework.
5198
5199 2000-08-25 Mark Mitchell <mark@codesourcery.com>
5200
5201 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
5202 dyn-string.o.
5203 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
5204 (cp-demangle.o): Remove target.
5205 (dyn-string.o): Likewise.
5206
5207 * decl.c (grokfndecl): Require that `main' return an `int'.
5208 * mangle.c (write_encoding): Don't mangle return types for
5209 conversion functions.
5210
5211 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
5212
5213 * error.c (tree_formatting_info): New data type.
5214 (tree_being_formatted): New macro.
5215 (tree_formatting_flags): Likewise.
5216 (put_whitespace): Likewise.
5217 (print_tree_identifier): Likewise.
5218 (print_identifier): Likewise.
5219 (cp_tree_printer, print_function_argument_list, print_declaration,
5220 print_expression, print_function_declaration,
5221 print_function_parameter, print_type, print_cv_qualifier): New
5222 functions.
5223 (init_error): Initialize lang_printer.
5224
5225 2000-08-24 Jason Merrill <jason@redhat.com>
5226
5227 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
5228 adjustment necessary.
5229
5230 2000-08-24 Greg McGary <greg@mcgary.org>
5231
5232 * cp-tree.h (MAIN_NAME_P): Remove macro.
5233
5234 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
5235
5236 * error.c (print_instantiation_context): Don't forget to flush the
5237 buffer.
5238
5239 2000-08-23 Jason Merrill <jason@redhat.com>
5240
5241 * typeck.c (build_ptrmemfunc): Save the input pmf.
5242
5243 * method.c (process_modifiers): Use same_type_p.
5244
5245 2000-08-23 Mark Mitchell <mark@codesourcery.com>
5246
5247 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
5248 * mangle.c (write_function_type): Change prototype.
5249 (write_encoding): Don't mangle return types for
5250 constructors or destructors.
5251 (write_type): Adjust call to write_function_type.
5252 * pt.c (instantiate_template): Instantiate alternate entry points
5253 when instantiating the main function.
5254
5255 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
5256
5257 * error.c (cp_print_error_function): Don't use embedded '\n' in
5258 output_printf.
5259
5260 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
5261
5262 * decl.c (init_decl_processing): Remove bogus initialization.
5263 * error.c (lang_print_error_function): Restore here.
5264 (init_error): Initialize print_error_function.
5265
5266 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5267
5268 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
5269
5270 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
5271
5272 * Makefile.in (error.o): Depends on diagnostic.h
5273
5274 * cp-tree.h (problematic_instantiation_changed,
5275 record_last_problematic_instantiation, current_instantiation,
5276 print_instantiation_context): Declare.
5277 (maybe_print_template_context): Remove.
5278
5279 * decl.c (init_decl_processing): Set print_error_function to NULL.
5280 (lang_print_error_function): Remove, since we're using a new
5281 machinery.
5282
5283 * error.c: #include diagnostic.h
5284 (function_category): New function.
5285 (cp_diagnostic_starter): Likewise.
5286 (cp_diagnostic_finalizer): Likewise.
5287 (cp_print_error_function): Likewise.
5288 (maybe_print_instantiation_context): Likewise.
5289 (print_instantiation_full_context): Likewise.
5290 (print_instantiation_partial_context): Likewise.
5291 (print_instantiation_context): Define.
5292 (init_error): Initialize diagnostic pager and finalizer.
5293
5294 * pt.c (problematic_instantiation_changed): Define.
5295 (record_last_problematic_instantiation): Likewise.
5296 (current_instantiation): Likewise.
5297 (maybe_print_template_context): Remove.
5298 (print_template_context): Likewise.
5299 (current_tinst_level): Make static to reflect Brendan Kehoe's
5300 change of 1995-04-13.
5301 (push_tinst_level): Call print_instantiation_context.
5302
5303 2000-08-21 Nix <nix@esperi.demon.co.uk>
5304
5305 * lang-specs.h: Do not process -o or run the assembler if
5306 -fsyntax-only.
5307
5308 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
5309
5310 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
5311 variables.
5312 * decl2.c (lang_decode_option): Disable gettext attributes for
5313 -ansi.
5314
5315 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
5316
5317 * lex.c (lang_init_options): Default diagnostic message maximum
5318 length to 80, when line-wrapping.
5319
5320 2000-08-20 Mark Mitchell <mark@codesourcery.com>
5321
5322 * class.c (build_vtbl_initializer): Clear the entire
5323 vtbl_init_data. Start keeping track of the functions for which we
5324 have created vcall offsets here.
5325 (dfs_build_vcall_offset_vtbl_entries): Remove.
5326 (build_vcall_offset_vtbl_entries): Reimplement.
5327 (add_vcall_offset_vtbl_entries_r): New function.
5328 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
5329 computing when vcall offsets are necessary.
5330
5331 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5332
5333 * decl.c (member_function_or_else): Use cp_error ... %T.
5334 (grokdeclarator): Likewise.
5335 (start_method): Likewise.
5336 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
5337
5338 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5339
5340 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
5341 TYPE_DECLs.
5342
5343 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5344
5345 * cp-tree.h (PTRMEM_OK_P): New macro.
5346 (itf_ptrmem_ok): New enumeration value.
5347 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
5348 argument. Diagnose implicit pointer to member.
5349 (instantiate_type): Don't diagnose implicit pointer to member
5350 here. Pass itf_ptrmem_ok if ok. Adjust calls to
5351 resolve_address_of_overloaded_function.
5352 * init.c (build_offset_ref): Set PTRMEM_OK_P.
5353 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
5354 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
5355 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
5356 (build_unary_op): Deal with single non-static member in
5357 microsoft-land.
5358
5359 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5360
5361 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
5362
5363 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5364
5365 * cp-tree.h (enum_name_string): Remove prototype.
5366 (report_case_error): Remove prototype.
5367 * cp/typeck2.c (enum_name_string): Remove.
5368 (report_case_error): Remove.
5369 * error.c (dump_expr): Deal with enum values directly.
5370 Correctly negate integer constant.
5371
5372 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5373
5374 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
5375 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
5376 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
5377 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
5378 (__cxa_vec_new): Use __cxa_vec_new2.
5379 (__cxa_vec_delete): Use __cxa_vec_delete2.
5380
5381 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5382
5383 * vec.cc (__cxa_vec_new): Set "C" linkage.
5384 (__cxa_vec_ctor): Likewise.
5385 (__cxa_vec_cctor): Likewise.
5386 (__cxa_vec_dtor): Likewise.
5387 (__cxa_vec_delete): Likewise.
5388 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
5389 (__cxa_vec_ctor): Likewise.
5390 (__cxa_vec_cctor): Likewise.
5391 (__cxa_vec_dtor): Likewise.
5392 (__cxa_vec_delete): Likewise.
5393
5394 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5395
5396 * class.c (instantiate_type): Reinstate local variable
5397 deleted in previous change.
5398
5399 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
5400 itf_no_attributes.
5401
5402 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5403
5404 * cp-tree.h (instantiate_type_flags): New enumeration.
5405 (instantiate_type): Change parameter.
5406 * class.c (instantiate_type): Adjust prototype. Adjust.
5407 * call.c (standard_conversion): Adjust instantiate_type call.
5408 (reference_binding): Likewise.
5409 (build_op_delete_call): Likewise.
5410 (convert_like_real): Likewise.
5411 * cvt.c (cp_convert_to_pointer): Likewise.
5412 (convert_to_reference): Likewise.
5413 * pt.c (convert_nontype_argument): Likewise.
5414 * typeck.c (build_binary_op): Likewise.
5415 (build_ptrmemfunc): Likewise.
5416 (convert_for_assignment): Likewise.
5417
5418 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5419
5420 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
5421 (current_aggr): Define.
5422 * decl.c (grokdeclarator): Make sure a friend class is an
5423 elaborated type specifier.
5424 * parse.y (current_aggr): Remove static definition.
5425 (cp_parse_init): Adjust.
5426 (structsp): Clear and restore current_aggr.
5427 (component_decl_list): Clear current_aggr.
5428
5429 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
5430 aggregate tag on the typename's context.
5431
5432 * pt.c (tsubst_friend_class): Return error_mark_node, if
5433 parms becomes NULL.
5434 (instantiate_class_template): Ignore error_mark_node friend types.
5435
5436 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
5437
5438 * cvt.c (warn_ref_binding): New static function, broken out of ...
5439 (convert_to_reference): ... here. Use it.
5440
5441 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5442
5443 * parse.y (template_arg): Add rule for template qualified with
5444 global scope.
5445
5446 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5447
5448 * decl2.c (add_function): Reorganize.
5449 (arg_assoc): Do not consider function template decls.
5450
5451 2000-08-11 Jason Merrill <jason@redhat.com>
5452
5453 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
5454 looking inside.
5455
5456 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5457
5458 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
5459 (lookup_nested_tag): Likewise.
5460
5461 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
5462 can be produced.
5463
5464 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5465
5466 * parse.y (named_complex_class_head_sans_basetype): Remove
5467 always true if.
5468
5469 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5470
5471 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
5472 explicit TEMPLATE_ID_EXPR args.
5473 (build_expr_from_tree, case CALL_EXPR): Likewise.
5474
5475 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5476
5477 * decl.c (check_tag_decl): Diagnose typename's which don't
5478 declare anything.
5479
5480 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
5481
5482 * init.c (build_aggr_init): Reject bogus array initializers
5483 early.
5484
5485 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
5486
5487 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
5488 runtime.
5489 * cp/tinfo.cc (__dynamic_cast): Likewise.
5490 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
5491
5492 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
5493
5494 * cvt.c (convert_to_pointer_force): Fix error message when
5495 attempting to cast from ambiguous base.
5496
5497 2000-08-08 Jason Merrill <jason@redhat.com>
5498
5499 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
5500 (tsubst_template_arg_vector): Likewise.
5501
5502 * decl2.c (build_anon_union_vars): Choose the largest field; don't
5503 assume that one will be as large as the union.
5504
5505 2000-08-07 Kazu Hirata <kazu@hxi.com>
5506
5507 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
5508 * decl.c (pop_labels): Likewise.
5509
5510 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
5511
5512 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
5513 specifications.
5514 (__pointer_to_member_type_info): Likewise.
5515 (__base_class_info): Likewise.
5516 (__class_type_info): Likewise.
5517 (__si_class_type_info): Likewise.
5518 (__vmi_class_type_info): Likewise.
5519 * tinfo.cc (__si_class_type_info::__do_find_public_src):
5520 Changed member names to match specifications.
5521 (__vmi_class_type_info::__do_find_public_src): Likewise.
5522 (__si_class_type_info::__do_dyncast): Likewise.
5523 (__vmi_class_type_info::__do_dyncast): Likewise.
5524 (__si_class_type_info::__do_upcast): Likewise.
5525 (__vmi_class_type_info::__do_upcast): Likewise.
5526 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
5527 (__pbase_type_info::__pointer_catch): Likewise.
5528 (__pointer_type_info::__pointer_catch): Likewise.
5529 (__pointer_to_member_type_info::__pointer_catch): Likewise.
5530
5531 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
5532
5533 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
5534 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
5535 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
5536
5537 2000-08-04 Mark Mitchell <mark@codesourcery.com>
5538
5539 * cp-tree.h (add_method): Change prototype.
5540 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
5541 Don't double the size of the method vector in the error case.
5542 (handle_using_decl): Adjust call to add_method.
5543 (add_implicitly_declared_members): Likewise.
5544 (clone_function_decl): Likewise.
5545 * decl2.c (check_classfn): Likewise.
5546 * semantics.c (finish_member_declaration): Likewise.
5547
5548 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
5549
5550 * decl.c (flag_isoc94): New variable.
5551
5552 2000-08-02 Jason Merrill <jason@redhat.com>
5553
5554 * pt.c (do_type_instantiation): Add complain parm; don't complain
5555 if called recursively.
5556 * cp-tree.h, parse.y: Adjust.
5557
5558 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
5559
5560 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
5561 -Wno-strict-prototypes.
5562
5563 * g++spec.c: Adjust type of second argument to
5564 lang_specific_driver, and update code as necessary.
5565
5566 * cp-tree.h: Don't prototype min_precision here.
5567 (my_friendly_assert): Cast expression to void.
5568 * semantics.c (do_poplevel): Initialize scope_stmts.
5569
5570 2000-08-02 Mark Mitchell <mark@codesourcery.com>
5571
5572 * cp-tree.h (DECL_NEEDED_P): Tweak.
5573
5574 2000-07-28 Jason Merrill <jason@redhat.com>
5575
5576 * lang-specs.h: Use %i in rule for .ii files.
5577
5578 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
5579
5580 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
5581
5582 2000-07-30 Mark Mitchell <mark@codesourcery.com>
5583
5584 Allow indirect primary bases.
5585 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
5586 primary_base.
5587 (CLASSTYPE_VFIELD_PARENT): Remove.
5588 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
5589 (BINFO_PRIMARY_BINFO): Remove.
5590 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
5591 (BINFO_VBASE_PRIMARY_P): Likewise.
5592 (BINFO_PRIMARY_BASE_OF): New macro.
5593 (BINFO_INDIRECT_PRIMARY_P): Likewise.
5594 (get_primary_binfo): New function.
5595 * decl.c (lang_mark_tree): Make lang_type::primary_base.
5596 * class.c (vcall_offset_data_s): Rename to ...
5597 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
5598 and add ctor_vtbl_p.
5599 (get_derived_offset): Use get_primary_binfo.
5600 (dfs_mark_primary_bases): Adjust handling of virtual primary
5601 bases.
5602 (mark_primary_bases): Likewise.
5603 (set_primary_base): Take a binfo, not an integer, as a
5604 representation of the primary base.
5605 (indirect_primary_base_p): Remove.
5606 (determine_primary_base): Adjust for indirect primary bases.
5607 (dfs_find_final_overrider): Fix typo in coment.
5608 (update_vtable_entry_for_fn): Use get_primary_binfo.
5609 (layout_nonempty_base_or_field): Tweak.
5610 (build_base_fields): Adjust for new primary base semantics.
5611 (dfs_propagate_binfo_offsets): Remove.
5612 (propagate_binfo_offsets): Rewrite.
5613 (dfs_set_offset_for_shared_vbases): Remove.
5614 (layout_virtual_bases): Don't use it.
5615 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
5616 ABI.
5617 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
5618 CLASSTYPE_VFIELD_PARENT.
5619 (dfs_get_primary_binfo): New function.
5620 (get_primary_binfo): Likewise.
5621 (dump_class_hierarchy_r): Tweak printing of primary bases.
5622 (build_vtbl_initializer): Fix typo in comments. Use
5623 vtbl_init_data.
5624 (build_vcall_and_vbase_vtbl_entries): Likewise.
5625 (build_vbaes_offset_vtbl_entries): Likewise.
5626 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
5627 BV_VCALL_INDEX to handle indirect primary bases.
5628 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
5629 (build_rtti_vtbl_entries): Likewise.
5630 * search.c (get_shared_vbase_if_not_primary): Tweak.
5631 (find_vbase_instance): Likewise.
5632 (binfo_for_vtable): Simplify.
5633 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
5634 (make_binfo): Make it have 11 entries.
5635
5636 2000-07-30 Alex Samuel <samuel@codesourcery.com>
5637
5638 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
5639 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
5640 ascertaining primaryness.
5641 (G): Remove template_args.
5642 (decl_is_template_id): New function.
5643 (write_encoding): Use decl_is_template_id.
5644 (write_name): Likewise. Handle type_decls. Get main variant of
5645 type decls.
5646 (write_nested_name): Likewise.
5647 (write_prefix): Likewise.
5648 (write_template_prefix): Likewise.
5649 (write_special_name_constructor): Remove defunct production from
5650 comment.
5651 (write_bare_function_type): Remove comment about absent parameter.
5652 (write_template_template_arg): Add missing grammar production to
5653 comment.
5654
5655 2000-07-27 Jason Merrill <jason@redhat.com>
5656
5657 * decl.c (duplicate_decls): If common_type produces a non-typedef
5658 type for a typedef, just use the old type.
5659
5660 2000-07-27 Mark Mitchell <mark@codesourcery.com>
5661
5662 * cp-tree.h (function_depth): Declare.
5663 (verify_stmt_tree): Likewise.
5664 (find_tree): Likewise.
5665 * decl.c (function_depth): Give it external linkage.
5666 * optimize.c (optimize_function): Increment and decrement it.
5667 * tree.c (verify_stmt_tree_r): New function.
5668 (verify_stmt_tree): Likewise.
5669 (find_tree_r): Likewise.
5670 (find_tree): Likewise.
5671
5672 2000-07-27 Jason Merrill <jason@redhat.com>
5673
5674 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
5675 TYPE_PTRMEMFUNC_P.
5676 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
5677
5678 2000-07-26 Mark Mitchell <mark@codesourcery.com>
5679
5680 * decl.c (start_cleanup_fn): Mark the function as `inline'.
5681 * decl2.c (get_guard): Call cp_finish_decl, not
5682 rest_of_decl_compilation, for local guards.
5683 * lex.c (do_identifier): Remove unused variable.
5684
5685 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
5686
5687 * parse.y: Add missing ';'.
5688
5689 2000-07-26 Mark Mitchell <mark@codesourcery.com>
5690
5691 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
5692 of `extern "C++"'.
5693
5694 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
5695
5696 Kill strict_prototype. Backwards compatibility only for
5697 non NO_IMPLICIT_EXTERN_C systems.
5698 * cp-tree.h (flag_strict_prototype): Remove.
5699 (strict_prototype): Remove.
5700 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5701 * decl.c (maybe_push_to_top_level): Adjust.
5702 (pop_from_top_level): Adjust.
5703 (decls_match): Only allow sloppy parm matching for ancient
5704 system headers.
5705 (init_decl_processing): Adjust.
5706 (grokdeclarator): Adjust.
5707 * decl2.c (flag_strict_prototype): Remove.
5708 (strict_prototype): Remove.
5709 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5710 (lang_f_options): Remove "strict-prototype".
5711 (unsupported-options): Add "strict-prototype".
5712 * lex.c (do_identifier): Adjust.
5713 (do_scoped_id): Adjust.
5714 * parse.y (empty_parms): Adjust.
5715 * class.c (push_lang_context): Adjust.
5716 (pop_lang_context): Adjust.
5717 * typeck.c (comp_target_parms): Adjust.
5718
5719 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
5720
5721 * decl.c (poplevel): Deal with anonymous variables at for scope.
5722 (maybe_inject_for_scope_var): Likewise.
5723
5724 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
5725
5726 * decl.c: Remove all signal handling code, now done in toplev.c.
5727
5728 2000-07-23 Mark Mitchell <mark@codesourcery.com>
5729
5730 * decl.c (make_rtl_for_nonlocal_decl): Rework.
5731
5732 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
5733 correctly.
5734
5735 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
5736
5737 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
5738 Define my_friendly_assert and my_friendly_abort as macros
5739 which may call friendly_abort. Prototype friendly abort, not
5740 my_friendly_abort or my_friendly_assert.
5741 * decl.c (signal_catch): Report the signal caught in the error
5742 message. Call fatal directly.
5743 * typeck2.c (ack, my_friendly_assert): Delete.
5744 (my_friendly_abort): Rename to friendly_abort. Expect file,
5745 line, and function parameters. Report the abort code, then
5746 call fancy_abort. Do not mask an abort if errors have
5747 already occurred.
5748
5749 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
5750
5751 * typeck.c (comp_target_parms): Remove obsolete parameter.
5752 (comp_target_types): Adjust.
5753
5754 2000-07-17 Jason Merrill <jason@redhat.com>
5755
5756 * typeck.c (mark_addressable): Never set TREE_USED.
5757 * call.c (build_call): Don't abort on calls to library functions
5758 that have been declared normally.
5759
5760 * typeck.c (build_binary_op): Fix grammar in warning.
5761
5762 * exception.cc (__eh_free): Fix prototype.
5763
5764 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
5765
5766 * decl.c (pushdecl): Handle seeing an OVERLOAD in
5767 IDENTIFIER_NAMESPACE_VALUE.
5768
5769 2000-07-16 Mark Mitchell <mark@codesourcery.com>
5770
5771 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
5772 * method.c (use_thunk): Correct handling of vcall offsets.
5773
5774 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
5775
5776 * .cvsignore: parse.h and parse.c have no cp- prefix.
5777
5778 2000-07-13 Mark Mitchell <mark@codesourcery.com>
5779
5780 * .cvsignore: New file.
5781
5782 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
5783
5784 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
5785
5786 2000-07-12 Mark Mitchell <mark@codesourcery.com>
5787
5788 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
5789 * parse.c: Remove.
5790 * parse.h: Likewise.
5791
5792 2000-07-11 Mark Mitchell <mark@codesourcery.com>
5793
5794 * class.c (layout_class_type): Add pointers to virtual bases after
5795 base classes under the old ABI.
5796
5797 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
5798
5799 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
5800 (finish_continue_stmt): Likewise.
5801 (begin_for_stmt): Remove call to note_level_for_for.
5802 (finish_goto_stmt): Change call from build_min_nt
5803 to build_stmt.
5804 (finish_expr_stmt): Likewise.
5805 (begin_if_stmt): Likewise.
5806 (begin_while_stmt): Likewise.
5807 (finish_while_stmt): Likewise.
5808 (finish_return_stmt): Likewise.
5809 (begin_for_stmt): Likewise.
5810 (finish_for_stmt): Likewise.
5811 (finish_break_stmt): Likewise.
5812 (begin_switch_stmt): Likewise.
5813 (finish_case_label): Likewise.
5814 (genrtl_try_block): Likewise.
5815 (begin_try_block): Likewise.
5816 (begin_handler): Likewise.
5817 (begin_compound_stmt): Likewise.
5818 (finish_asm_stmt): Likewise.
5819 (finish_label_stmt): Likewise.
5820 (add_decl_stmt): Likewise.
5821 (finish_subobject): Likewise.
5822 (finish_decl_cleanup): Likewise.
5823 (finish_named_return_value): Likewise.
5824 (setup_vtbl_ptr): Likewise.
5825 (add_scope_stmt): Likewise.
5826 * decl.c (finish_constructor_body): Likewise.
5827 (finish_destructor_body): Likewise.
5828 * optimize.c (copy_body_r): Likewise.
5829 (initialize_inlined_parameters): Likewise.
5830 (declare_return_variable): Likewise.
5831 (expand_call_inline): Likewise.
5832
5833 2000-07-10 Jakub Jelinek <jakub@redhat.com>
5834
5835 * semantics.c (expand_body): Sync interface information
5836 at the end of function body expansion.
5837
5838 2000-07-09 Jason Merrill <jason@redhat.com>
5839
5840 * init.c (build_new_1): Bail early if the call to new fails.
5841
5842 * decl.c (compute_array_index_type): Check specifically for
5843 an INTEGER_CST, not just TREE_CONSTANT.
5844
5845 * decl.c (duplicate_decls): Don't call duplicate_decls on
5846 the DECL_TEMPLATE_RESULT.
5847 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
5848 codes.
5849
5850 * error.c (dump_template_bindings): Don't crash if we had an
5851 invalid argument list.
5852
5853 * typeck.c (c_expand_start_case): Do narrowing here.
5854 * semantics.c (finish_switch_cond): Not here.
5855
5856 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
5857
5858 * parse.y (asm_clobbers): Do string concatenation.
5859
5860 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5861
5862 * decl.c (pushtag): Don't put local classes in template functions
5863 on the local_classes list.
5864
5865 2000-07-04 Scott Snyder <snyder@fnal.gov>
5866
5867 * decl2.c (get_guard): Add missing return for old ABI local
5868 variable case.
5869
5870 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5871
5872 * cp-tree.h (char_type_p): New function.
5873 * decl.c (init_decl_processing): Don't initialize
5874 signed_wchar_type_node or unsigned_wchar_type_node.
5875 (complete_array_type): Handle brace-enclosed string-constants.
5876 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
5877 * tree.c (char_type_p): New function.
5878 * typeck2.c (digest_init): Use char_type_p.
5879
5880 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5881
5882 * pt.c (tsubst): Don't layout type, if it's error_mark.
5883
5884 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5885
5886 * pt.c (instantiate_pending_templates): Reset template level.
5887
5888 2000-07-05 Jason Merrill <jason@redhat.com>
5889
5890 * call.c (joust): Don't complain about `operator char *()' beating
5891 `operator const char *() const'.
5892
5893 2000-07-04 scott snyder <snyder@fnal.gov>
5894 Jason Merrill <jason@redhat.com>
5895
5896 * repo.c (repo_get_id): Handle the case where a class with virtual
5897 bases has a null TYPE_BINFO_VTABLE.
5898
5899 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
5900 Jason Merrill <jason@redhat.com>
5901
5902 * parse.y (member_init): Just pass in the type.
5903 * init.c (expand_member_init): Handle getting a type.
5904
5905 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5906 Jason Merrill <jason@redhat.com>
5907
5908 * decl.c (finish_function): Warn if a function has no return
5909 statement.
5910 Suggested by Andrew Koenig.
5911 * typeck.c (check_return_expr): Do set current_function_returns_value
5912 if we got an error_mark_node.
5913
5914 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5915
5916 * decl2.c (push_decl_namespace): Push the original namespace.
5917
5918 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5919
5920 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
5921 * semantics.c (begin_class_definition): Clear it.
5922
5923 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
5924
5925 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5926 (genrtl_expr_stmt): Likewise.
5927 (genrtl_decl_stmt): Likewise.
5928 (genrtl_if_stmt): Likewise.
5929 (genrtl_while_stmt): Likewise.
5930 (genrtl_do_stmt): Likewise.
5931 (genrtl_return_stmt): Likewise.
5932 (genrtl_for_stmt): Likewise.
5933 (genrtl_break_stmt): Likewise.
5934 (genrtl_continue_stmt): Likewise.
5935 (genrtl_scope_stmt): Likewise.
5936 (genrtl_switch_stmt): Likewise.
5937 (genrtl_case_label): Likewise.
5938 (genrtl_begin_compound_stmt): Likewise.
5939 (genrtl_finish_compound_stmt): Likewise.
5940 (genrtl_compound_stmt): Likewise.
5941 (genrtl_asm_stmt): Likewise.
5942
5943 * init.c (begin_init_stmts): Remove call to
5944 genrtl_begin_compound_stmt.
5945 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5946
5947 * semantics.c (lang_expand_stmt): Changed call to
5948 genrtl_compound_stmt to ignore return value.
5949
5950 2000-07-02 Mark Mitchell <mark@codesourcery.com>
5951
5952 * mangle.c (canonicalize_for_substitution): Return the canonical
5953 variant of a type.
5954
5955 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5956 TYPE_DECL.
5957 * typeck.c (commonparms): Remove obstack manipulations.
5958
5959 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
5960
5961 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5962
5963 * Makefile.in (OBJS): Added ../c-semantics.o.
5964 (OBJDEPS): Likewise.
5965
5966 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5967 ../c-common.h.
5968 (struct stmt_tree): Added comment.
5969 (current_function_name_declared): Removed.
5970 (stmts_are_full_exprs_p): Likewise.
5971 (genrtl_do_pushlevel): Likewise.
5972 (genrtl_clear_out_block): Likewise.
5973 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5974 (DECL_ANON_UNION_ELEMS): Likewise.
5975 (emit_local_var): Likewise.
5976 (make_rtl_for_local_static): Likewise.
5977 (do_case): Likewise.
5978 (expand_stmt): Likewise.
5979 (genrtl_decl_cleanup): Likewise.
5980 (c_expand_asm_operands): Likewise.
5981 (c_expand_return): Likewise.
5982 (c_expand_start_case): Likewise.
5983
5984 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5985 (emit_local_var): Likewise.
5986 (initialize_local_var): Change reference to
5987 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5988 Change reference to stmts_are_full_exprs_p to
5989 current_stmt_tree->stmts_are_full_exprs_p.
5990 (push_cp_function_context): Likewise.
5991
5992 * expect.c (expand_throw): Change reference to
5993 stmts_are_full_exprs_p.
5994
5995 * init.c (build_aggr_init): Change reference to
5996 stmts_are_full_exprs_p.
5997 (build_vec_init): Likewise.
5998
5999 * optimize.c (maybe_clone_body): Change reference to
6000 current_function_name_declared to
6001 cp_function_chain->name_declared.
6002
6003 * pt.c (instantiate_decl): Change reference to
6004 current_function_name_declared to
6005 cp_function_chain->name_declared.
6006
6007 * semantics.c (expand_cond): Moved declaration to c-common.h.
6008 (genrtl_do_pushlevel): Moved to c-semantics.c.
6009 (genrtl_clear_out_block): Likewise.
6010 (genrtl_goto_stmt): Likewise.
6011 (genrtl_expr_stmt): Likewise.
6012 (genrtl_decl_stmt): Likewise.
6013 (gerntl_if_stmt): Likewise.
6014 (genrtl_while_stmt): Likewise.
6015 (genrtl_do_stmt): Likewise.
6016 (genrtl_return_stmt): Likewise.
6017 (genrtl_for_stmt): Likewise.
6018 (genrtl_break_stmt): Likewise.
6019 (genrtl_continue_stmt): Likewise.
6020 (genrtl_scope_stmt): Likewise.
6021 (genrtl_switch_stmt): Likewise.
6022 (genrtl_case_label): Likewise.
6023 (genrtl_begin_compound_stmt): Likewise.
6024 (genrtl_finish_compound_stmt): Likewise.
6025 (genrtl_compound_stmt): Likewise.
6026 (genrtl_asm_stmt): Likewise.
6027 (genrtl_decl_cleanup): Likewise.
6028 (expand_cond): Likewise.
6029 (expand_stmt): Renamed to ...
6030 (lang_expand_stmt): ... this.
6031 (lang_expand_expr_stmt): Initialize.
6032 (set_current_function_name_declared): Likewise.
6033 (stmts_are_full_exprs_p): Likewise.
6034 (current_function_name_declared): Likewise.
6035 (anon_aggr_type_p): Likewise.
6036 (do_poplevel): Change reference to
6037 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
6038 Change reference to stmts_are_full_exprs_p to
6039 current_stmt_tree->stmts_are_full_exprs_p.
6040 (add_tree): Likewise.
6041 (finish_expr_stmt): Likewise.
6042 (prep_stmt): Likewise.
6043 (lang_expand_stmt): Likewise.
6044 (begin_compound_stmt): Change reference to
6045 current_function_name_declared to
6046 cp_function_chain->name_declared and call to
6047 current_function_name_declared().
6048 (setup_vtbl_ptr): Likewise.
6049 (genrtl_do_poplevel): Removed.
6050
6051 2000-06-30 Jason Merrill <jason@redhat.com>
6052
6053 * init.c (init_init_processing): Go back to aligning like
6054 double_type_node for old ABI.
6055 (get_cookie_size): Make cookie larger if we get a type that needs
6056 more alignment.
6057 (build_vec_delete): Call it.
6058
6059 * typeck.c (qualify_type_recursive): New fn.
6060 (composite_pointer_type): Use it.
6061 (build_binary_op): Use composite_pointer_type.
6062
6063 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
6064 Jason Merrill <jason@redhat.com>
6065
6066 * typeck.c (check_return_expr): Don't complain about returning
6067 NULL from operator new if -fcheck-new.
6068 * cp-tree.h: Declare flag_check_new here.
6069 * init.c: Not here.
6070
6071 2000-06-28 Alex Samuel <samuel@codesourcery.com>
6072
6073 * mangle.c (find_substitution): Use same_type_p.
6074 (write_encoding): Don't check for substitutions.
6075
6076 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
6077
6078 * parse.y (expr_no_comma_rangle): New non-terminal.
6079 (template_parm): Use it for default parameter case.
6080 (template_arg): Use it.
6081 (expr_no_commas): Remove commented out undefined extensions.
6082 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
6083 * parse.h, parse.c: Rebuilt.
6084
6085 2000-06-30 Mark Mitchell <mark@codesourcery.com>
6086
6087 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
6088 (finish_asm_stmt): Do it here, instead.
6089
6090 * cp-tree.h (ridpointers): Don't declare.
6091 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
6092 (record_builtin_java_type): Likewise.
6093 (init_decl_processing): Likewise.
6094 * lex.c: Move inclusion of lex.h.
6095 (ridpointers): Don't define.
6096 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
6097 RID_MAX.
6098 * lex.h (enum rid): Rename to ...
6099 (enum cp_rid): ... this.
6100 (ridpointers): Don't declare.
6101 * parse.y: Move inclusion of lex.h.
6102 * parse.c: Regenerated.
6103 * spew.c: Move inclusion of lex.h.
6104
6105 * cp-tree.h (struct language_function): Remove temp_name_counter.
6106 (temp_name_counter): Remove.
6107 (get_temp_name): Change prototype.
6108 (get_guard): New function.
6109 (get_guard_cond): Likewise.
6110 (set_guard): Likewise.
6111 * cvt.c (build_up_reference): Adjust call to get_temp_name.
6112 * decl.c (expand_static_init): Use get_guard and friends to
6113 implement guard variables.
6114 * decl2.c (get_temp_name): Assume that the variables created are
6115 always static.
6116 (get_sentry): Rename to ...
6117 (get_guard): ... this. Implement new ABI guard variables.
6118 (get_guard_bits): New function.
6119 (get_guard_cond): Likewise.
6120 (set_guard): Likewise.
6121 (start_static_initialization_or_destruction): Use them.
6122 (do_static_initialization): Replace sentry with guard throughout.
6123 (do_static_destruction): Likewise.
6124 * init.c (create_temporary_var): Add comment.
6125
6126 2000-06-28 Alex Samuel <samuel@codesourcery.com>
6127
6128 * mangle.c (find_substitution): Use same_type_p.
6129 (write_encoding): Don't check for substitutions.
6130
6131 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
6132
6133 * parse.y (expr_no_comma_rangle): New non-terminal.
6134 (template_parm): Use it for default parameter case.
6135 (template_arg): Use it.
6136 (expr_no_commas): Remove commented out undefined extensions.
6137 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
6138 * parse.h, parse.c: Rebuilt.
6139
6140 2000-06-29 Mark Mitchell <mark@codesourcery.com>
6141
6142 * cp-tree.h (flag_const_strings): Remove.
6143 (warn_parentheses): Likewise.
6144 (warn_format): Likewise.
6145 (common_type): Likewise.
6146 (default_conversion): Likewise.
6147 (build_binary_op): Likewise.
6148 (cp_build_binary_op): New macro.
6149 * call.c (build_new_op): Use cp_build_binary_op instead of
6150 build_binary_op.
6151 * class.c (build_vtable_entry_ref): Likewise.
6152 * decl.c (expand_static_init): Likewise.
6153 (compute_array_index_type): Likewise.
6154 (build_enumerator): Likewise.
6155 * decl2.c (delete_sanity): Likewise.
6156 (start_static_initialization_or_destruction): Likewise.
6157 * error.c (dump_type_suffix): Likewise.
6158 * init.c (resolve_offset_ref): Likewise.
6159 (build_new): Likewise.
6160 (build_new_1): Likewise.
6161 (build_vec_delete_1): Likewise.
6162 (build_vec_init): Likewise.
6163 (build_delete): Likewise.
6164 * rtti.c (synthesize_tinfo_fn): Likewise.
6165 (synthesize_tinfo_var): Likewise.
6166 * search.c (expand_upcast_fixups): Likewise.
6167 (fixup_all_virtual_upcast_offsets): Likewise.
6168 * typeck.c (build_array_ref): Likewise.
6169 (get_member_function_from_ptrfunc): Likewise.
6170 (build_binary_op): Add parameter.
6171 (pointer_int_sum): Use cp_build_binary_op.
6172 (pointer_diff): Likewise.
6173 (build_modify_expr): Likewise.
6174 (get_delta_difference): Likewise.
6175 (build_ptrmemfunc): Likewise.
6176
6177 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
6178
6179 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
6180 * decl.c (create_implicit_typedef): Adjust.
6181 * decl2.c (build_artificial_parm): Adjust.
6182 * method.c (implicitly_declare_fn): Adjust.
6183 * pt.c (push_inline_template_parms_recursive): Adjust.
6184 (process_template_parm): Adjust.
6185 (overloaded_template_name): Adjust.
6186 * semantics.c (finish_template_template_parm): Adjust.
6187
6188 2000-06-28 Mark Mitchell <mark@codesourcery.com>
6189
6190 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
6191 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
6192 where to emit thunks.
6193 (build_vtt): Adjust call to build_vtt_inits.
6194 (build_vtt_inits): Add parameter to indicate whether or not
6195 sub-VTTs for virtual bases should be included. Adjust handling of
6196 construction vtables.
6197 (get_matching_base): New function.
6198 (dfs_build_vtt_inits): Rename to ...
6199 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
6200 construction vtables.
6201 (dfs_fixup_binfo_vtbls): Likewise.
6202 (build_ctor_vtbl_groups): Build construction vtables for virtual
6203 bases, too.
6204 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
6205 to build construction vtbls.
6206 (dfs_accumulate_vtbl_inits): Adjust handling of
6207 construction vtables.
6208
6209 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
6210 types correctly.
6211
6212 2000-06-27 Mark Mitchell <mark@codesourcery.com>
6213
6214 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
6215
6216 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
6217
6218 * search.c (hides): Remove.
6219 (is_subobject_of_p): Add most_derived parameter. Use
6220 CANONICAL_BINFO.
6221 (lookup_field_queue_p): Adjust.
6222 (lookup_field_r): Adjust.
6223
6224 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
6225
6226 * decl2.c (handle_class_head): Bash typedefs to the type's main
6227 decl.
6228
6229 2000-06-25 Mark Mitchell <mark@codesourcery.com>
6230
6231 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
6232 (begin_global_stmt_expr): ... this.
6233 (genrtl_finish_stmt_expr): Rename to ...
6234 (finish_global_stmt_expr): ... this.
6235 * init.c (begin_init_stmts): Adjust calls.
6236 (finish_init_stmts): Likewise.
6237 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
6238 (begin_global_stmt_expr): ... this.
6239 (genrtl_finish_stmt_expr): Rename to ...
6240 (finish_global_stmt_expr): ... this.
6241
6242 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6243
6244 * search.c (lookup_member): Fix typo in comment.
6245
6246 2000-06-24 Jason Merrill <jason@redhat.com>
6247
6248 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
6249 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
6250
6251 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6252
6253 * parse.y (complex_direct_notype_declarator): Support global_scope.
6254 * Makefile.in: Adjust conflict count.
6255
6256 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6257
6258 * parse.y (template_arg): Convert TEMPLATE_DECL
6259 that is a template template paramter to
6260 TEMPLATE_TEMPLATE_PARM here.
6261
6262 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6263 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
6264 (copy_template_template_parm): Adjust prototype.
6265 * decl.c (grokdeclarator): Remove dead code.
6266 * pt.c (process_template_parm): Tidy.
6267 (lookup_template_class): Construct nodes in
6268 copy_template_template_parm.
6269 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
6270 lookup_template_class. Use TYPE_TI_TEMPLATE.
6271 * tree.c (copy_template_template_parm): Add NEWARGS
6272 parameter.
6273 (mapcar): Adjust call to copy_template_template_parm.
6274 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
6275 * method.c (build_template_template_parm_names): Change error
6276 code to avoid compilation warning.
6277
6278 * gxxint.texi: Document template template parameter
6279 name mangling.
6280
6281 2000-06-21 Alex Samuel <samuel@codesourcery.com>
6282
6283 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
6284 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
6285 (cp-demangle.o): New rule.
6286 (dyn-string.o): Likewise.
6287 * inc/cxxabi.h (__cxa_demangle): New declaration.
6288
6289 2000-06-22 Mark Mitchell <mark@codesourcery.com>
6290
6291 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
6292 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
6293 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
6294 a tree, not an int.
6295 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
6296 (make_thunk): Change prototype.
6297 (emit_thunk): Rename to use_thunk.
6298 (mangle_thunk): Change prototype.
6299 * class.c (get_derived_offset): Simplify.
6300 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
6301 BV_GENERATE_THUNK_WITH_VTABLE_P.
6302 (build_primary_vtable): Simplify.
6303 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
6304 (dfs_find_base): Remove.
6305 (update_vtable_entry_for_fn): Correct bug in finding the base
6306 where a virtual function was first declared. Figure out whether
6307 or not to emit a vcall-thunk with the vtables in which it appears.
6308 Correct logic for deciding whether to use an ordinary thunk, or a
6309 vcall thunk.
6310 (finish_struct_1): Remove unnecssary code.
6311 (build_vtbl_initializer): Use ssize_int for the running counter of
6312 negative indices.
6313 (build_vtbl_initializer): Only use vcall thunks where necessary.
6314 Mark thunks as needing to be emitted with their vtables, or not.
6315 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
6316 indices. Use size_binop.
6317 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
6318 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
6319 size_binop.
6320 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
6321 (build_vtable_entry): Mark thunks as needing to be emitted with
6322 their vtables, or not.
6323 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
6324 * decl2.c (mark_vtable_entries): Use use_thunk instead of
6325 emit_thunk.
6326 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
6327 information.
6328 * error.c (dump_expr): Use BV_FN.
6329 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
6330 not an int.
6331 * method.c (make_thunk): Likewise.
6332 (emit_thunk): Rename to use_thunk. Allow callers to decide
6333 whether or not to actually emit the thunk. Adjust for changes in
6334 representation of vcall offsets.
6335 * search.c (dfs_get_pure_virtuals): Use BV_FN.
6336 * semantics.c (emit_associated_thunks): New function.
6337 (expand_body): Use it.
6338 * ir.texi: Adjust decriptions of thunks.
6339
6340 2000-06-22 Jason Merrill <jason@redhat.com>
6341
6342 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
6343 (tsubst_friend_function): Copy it here.
6344
6345 * decl.c (grok_op_properties): Fix typo.
6346
6347 * decl2.c (delete_sanity): Clarify warning, avoid failure on
6348 deleting void*.
6349
6350 * pt.c (check_explicit_specialization): Clarify error.
6351
6352 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
6353 an old OVERLOAD when we're declaring a non-function.
6354 (pushdecl, destroy_local_var): Check for error_mark_node.
6355 (warn_extern_redeclared_static): Also bail early if
6356 we're a CONST_DECL.
6357 (push_overloaded_decl): Ignore an old error_mark_node.
6358
6359 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
6360
6361 * call.c (build_x_va_arg): Check if in a template decl.
6362 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
6363
6364 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6365
6366 * class.c (push_lang_context): TYPE_NAME gets you to the Java
6367 types DECLs.
6368 * decl.c (check_goto): Computed gotos assumed OK.
6369
6370 2000-06-20 Jason Merrill <jason@redhat.com>
6371
6372 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
6373 for which we don't need to look for instantiations.
6374
6375 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
6376
6377 * parse.y (program): Always call finish_translation_unit.
6378 * parse.c, parse.h: Rebuilt.
6379
6380 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
6381
6382 * method.c: Don't include hard-reg-set.h.
6383
6384 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
6385
6386 * rtti.c (get_base_offset): Cope when vbase field is in a base.
6387
6388 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
6389
6390 * call.c (build_conditional_expr): Use VOID_TYPE_P.
6391 * cvt.c (cp_convert_to_pointer): Likewise.
6392 (convert_to_void): Likewise.
6393 * error.c (dump_expr): Likewise.
6394 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
6395 * init.c (build_delete): Likewise.
6396 * method.c (emit_thunk): Likewise.
6397 * optmize.c (declare_return_variable): Likewise.
6398 * rtti.c (get_tinfo_decl_dynamic): Likewise.
6399 (get_typeid): Likewise.
6400 (build_dynamic_cast_1): Likewise.
6401 * typeck.c (composite_pointer_type): Likewise.
6402 (common_type): Likewise.
6403 (build_indirect_ref): Likewise.
6404 (build_binary_op): Likewise.
6405 (build_x_compound_expr): Likewise.
6406 (check_return_expr): Likewise.
6407 * typeck2.c (add_exception_specifier): Likewise.
6408
6409 * mangle.c (write_method_parms): Use direct comparison for end
6410 of parmlist.
6411
6412 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
6413
6414 * cp-tree.h (genrtl_try_block): Declare function.
6415 (genrtl_handler): Likewise.
6416 (genrtl_catch_block): Likewise.
6417 (genrtl_ctor_stmt): Likewise.
6418 (genrtl_subobject): Likewise.
6419 (genrtl_decl_cleanup): Likewise.
6420 (genrtl_do_poplevel): Likewise.
6421 (genrtl_do_pushlevel): Likewise.
6422 (genrtl_clear_out_block): Likewise.
6423 (genrtl_goto_stmt): Likewise.
6424 (genrtl_expr_stmt): Likewise.
6425 (genrtl_decl_stmt): Likewise.
6426 (genrtl_if_stmt): Likewise.
6427 (genrtl_while_stmt): Likewise.
6428 (genrtl_do_stmt): Likewise.
6429 (genrtl_return_stmt): Likewise.
6430 (genrtl_for_stmt): Likewise.
6431 (genrtl_break_stmt): Likewise.
6432 (genrtl_continue_stmt): Likewise.
6433 (genrtl_scope_stmt): Likewise.
6434 (genrtl_switch_stmt): Likewise.
6435 (genrtl_case_label): Likewise.
6436 (genrtl_begin_compound_stmt): Likewise.
6437 (genrtl_finish_compound_stmt): Likewise.
6438 (genrtl_compound_stmt): Likewise.
6439 (genrtl_asm_stmt): Likewise.
6440 (genrtl_named_return_value): Likewise.
6441 (genrtl_begin_stmt_expr): Likewise.
6442 (genrtl_finish_stmt_expr): Likewise.
6443 (finish_for_stmt): Removed first argument.
6444 (finish_switch_stmt): Likewise.
6445
6446 * semantics.c (genrtl_try_block): Define function.
6447 (genrtl_handler): Likewise.
6448 (genrtl_catch_block): Likewise.
6449 (genrtl_ctor_stmt): Likewise.
6450 (genrtl_subobject): Likewise.
6451 (genrtl_decl_cleanup): Likewise.
6452 (genrtl_do_poplevel): Likewise.
6453 (genrtl_do_pushlevel): Likewise.
6454 (genrtl_clear_out_block): Likewise.
6455 (genrtl_goto_stmt): Likewise.
6456 (genrtl_expr_stmt): Likewise.
6457 (genrtl_decl_stmt): Likewise.
6458 (genrtl_if_stmt): Likewise.
6459 (genrtl_while_stmt): Likewise.
6460 (genrtl_do_stmt): Likewise.
6461 (genrtl_return_stmt): Likewise.
6462 (genrtl_for_stmt): Likewise.
6463 (genrtl_break_stmt): Likewise.
6464 (genrtl_continue_stmt): Likewise.
6465 (genrtl_scope_stmt): Likewise.
6466 (genrtl_switch_stmt): Likewise.
6467 (genrtl_case_label): Likewise.
6468 (genrtl_begin_compound_stmt): Likewise.
6469 (genrtl_finish_compound_stmt): Likewise.
6470 (genrtl_compound_stmt): Likewise.
6471 (genrtl_asm_stmt): Likewise.
6472 (genrtl_named_return_value): Likewise.
6473 (genrtl_begin_stmt_expr): Likewise.
6474 (genrtl_finish_stmt_expr): Likewise.
6475 (finish_for_stmt): Removed first argument and generate rtl
6476 specific code.
6477 (finish_switch_stmt): Likewise.
6478 (do_poplevel): Removed generate rtl specific code.
6479 (do_pushlevel): Likewise.
6480 (add_tree): Likewise.
6481 (finish_goto_stmt): Likewise.
6482 (finish_expr_stmt): Likewise.
6483 (begin_if_stmt): Likewise.
6484 (finish_if_stmt_cond): Likewise.
6485 (finish_then_clause): Likewise.
6486 (begin_else_clause): Likewise.
6487 (finish_else_clause): Likewise.
6488 (finish_if_stmt): Likewise.
6489 (clear_out_block): Likewise.
6490 (begin_while_stmt): Likewise.
6491 (finish_while_stmt_cond): Likewise.
6492 (finish_while_stmt): Likewise.
6493 (begin_do_stmt): Likewise.
6494 (finish_do_body): Likewise.
6495 (finish_do_stmt): Likewise.
6496 (finish_return_stmt): Likewise.
6497 (begin_for_stmt): Likewise.
6498 (finish_for_init_stmt): Likewise.
6499 (finish_for_cond): Likewise.
6500 (finish_for_expr): Likewise.
6501 (finish_break_stmt): Likewise.
6502 (finish_continue_stmt): Likewise.
6503 (begin_switch_stmt): Likewise.
6504 (finish_switch_cond): Likewise.
6505 (finish_case_label): Likewise.
6506 (begin_try_block): Likewise.
6507 (begin_function_try_block): Likewise.
6508 (finish_try_block): Likewise.
6509 (finish_cleanup_try_block): Likewise.
6510 (finish_cleanup): Likewise.
6511 (finish_function_try_block): Likewise.
6512 (finish_handler_sequence): Likewise.
6513 (finish_function_handler_sequence): Likewise.
6514 (begin_handler): Likewise.
6515 (finish_handler_parms): Likewise.
6516 (begin_catch_block): Likewise.
6517 (finish_handler): Likewise.
6518 (begin_compound_stmt): Likewise.
6519 (finish_compound_stmt): Likewise.
6520 (finish_asm_stmt): Likewise.
6521 (finish_label_stmt): Likewise.
6522 (finish_label_decl): Likewise.
6523 (finish_subobject): Likewise.
6524 (finish_decl_cleanup): Likewise.
6525 (finish_named_return_value): Likewise.
6526 (begin_stmt_expr): Likewise.
6527 (finish_stmt_expr): Likewise.
6528
6529 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
6530 to call genrtl_expr_stmt when appropriate.
6531
6532 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
6533 begin_compound_expr to call genrtl_begin_stmt_expr and
6534 genrtl_begin_compound_expr when appropriate.
6535 (finish_init_stmts): Changed calls to finish_compound_expr and
6536 finish_stmt_expr to call genrtl_finish_compound_expr and
6537 genrtl_finish_stmt_expr when appropriate.
6538 (expand_default_init): Changed call to finish_expr_stmt to call
6539 genrtl_expr_stmt when appropriate.
6540 (build_vec_init): Likewise.
6541
6542 * parse.y (simple_stmt): Removed first argument from call to
6543 finish_for_stmt. Removed first argument from call to
6544 finish_switch_stmt.
6545
6546 * parse.c: Regenerated.
6547
6548 * pt.c (tsubst_expr): Removed first argument from call to
6549 finish_for_stmt. Removed first argument from call to
6550 finish_switch_stmt.
6551
6552 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
6553
6554 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
6555 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
6556
6557 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
6558 (cplus_tree_code_length[]): Likewise.
6559 (cplus_tree_code_name[]): Likewise.
6560 (init_parse): Added call to add_c_tree_codes. Changed
6561 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
6562
6563 2000-06-16 Mark Mitchell <mark@codesourcery.com>
6564
6565 * cp-tree.h (finish_mem_initializers): Declare.
6566 (count_trees): Likewise.
6567 * parse.y (base_init): Use finish_mem_initializers.
6568 * semantics.c (finish_mem_initializers): New function.
6569
6570 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
6571 the number of trees.
6572 (n_trees): Remove.
6573 (count_trees): Don't use it.
6574
6575 2000-06-15 Jason Merrill <jason@redhat.com>
6576
6577 * tree.c (count_trees): New debugging function.
6578
6579 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
6580 * init.c (build_member_call): Pull out the name of a DECL.
6581
6582 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
6583 * semantics.c (expand_body): Push to TV_INTEGRATION here.
6584 * optimize.c (optimize_function): Not here.
6585 * pt.c (instantiate_decl): Push to TV_PARSE.
6586
6587 2000-06-15 Mark Mitchell <mark@codesourcery.com>
6588
6589 * cp-tree.h (struct language_function): Remove x_base_init_list
6590 and x_member_init_list.
6591 (current_base_init_list): Remove.
6592 (current_member_init_list): Likewise.
6593 (setup_vtbl_ptr): Change prototype.
6594 (emit_base_init): Likewise.
6595 (expand_member_init): Likewise.
6596 (reinit_parse_for_function): Remove.
6597 * decl.c (save_function_data): Don't clear x_base_init_list and
6598 x_member_init_list.
6599 (mark_language_function): Don't mark them.
6600 * init.c (perform_member_init): Tweak comment.
6601 (sort_member_init): Take the list of initializers as an argument.
6602 (sort_base_init): Likewise.
6603 (emit_base_init): Likewise.
6604 (expand_member_init): Return the initializer. Don't use global
6605 variables.
6606 * lex.c (reinit_parse_for_function): Remove.
6607 * method.c (build_template_parm_names): Correct substitution.
6608 (do_build_copy_constructor): Don't use current_member_init_list
6609 and current_base_init_list.
6610 (synthesize_method): Likewise.
6611 * parse.y (base_init): Split mem-initializers into
6612 base-initializers and field-initializers.
6613 (member_init_list): Build up the list here.
6614 (member_init): Return the initializer.
6615 (fn.depfn): Don't use reinit_parse_for_function.
6616 * parse.c: Regenerated.
6617 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
6618 ERROR_MARK.
6619 (tsubst_expr): Don't use current_member_init_list
6620 and current_base_init_list.
6621 (tsubst_expr_values): Rename to ...
6622 (tsubst_initializer_list): ... this. Use convert_from_reference.
6623 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
6624 and current_base_init_list.
6625 (begin_function_definition): Don't call reinit_parse_for_function.
6626
6627 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
6628
6629 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
6630 correctly.
6631
6632 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
6633
6634 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
6635
6636 * cp-tree.h (IF_COND): Move to c-common.h.
6637 (THEN_CLAUSE): Likewise.
6638 (ELSE_CLAUSE): Likewise.
6639 (WHILE_COND): Likewise.
6640 (WHILE_BODY): Likewise.
6641 (DO_COND): Likewise.
6642 (DO_BODY): Likewise.
6643 (RETURN_EXPR): Likewise.
6644 (EXPR_STMT_EXPR): Likewise.
6645 (FOR_INIT_STMT): Likewise.
6646 (FOR_COND): Likewise.
6647 (FOR_EXPR): Likewise.
6648 (FOR_BODY): Likewise.
6649 (SWITCH_COND): Likewise.
6650 (SWITCH_BODY): Likewise.
6651 (CASE_LOW): Likewise.
6652 (CASE_HIGH): Likewise.
6653 (GOTO_DESTINATION): Likewise.
6654 (COMPOUND_BODY): Likewise.
6655 (ASM_CV_QUAL): Likewise.
6656 (ASM_STRING): Likewise.
6657 (ASM_OUTPUTS): Likewise.
6658 (ASM_INPUTS): Likewise.
6659 (ASM_CLOBBERS): Likewise.
6660 (DECL_STMT_DECL): Likewise.
6661 (STMT_EXPR_STMT): Likewise.
6662 (LABEL_STMT_LABEL): Likewise.
6663 (SCOPE_BEGIN_P): Likewise.
6664 (SCOPE_END_P): Likewise.
6665 (SCOPE_STMT_BLOCK): Likewise.
6666 (SCOPE_NULLIFIED_P): Likewise.
6667 (SCOPE_NO_CLEANUPS_P): Likewise.
6668 (SCOPE_PARTIAL_P): Likewise.
6669 (ASM_VOLATILE_P): Likewise.
6670 (STMT_LINENO): Likewise.
6671 (STMT_LINENO_FOR_FN_P): Likewise.
6672
6673 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
6674 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
6675 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
6676 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
6677 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
6678
6679 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
6680
6681 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
6682 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
6683
6684 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
6685 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
6686 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
6687
6688 2000-06-14 Mark Mitchell <mark@codesourcery.com>
6689
6690 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
6691 * class.c (dfs_find_final_overrider): Set it appropriately.
6692 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
6693 avoid unneeded secondary vptrs.
6694
6695 2000-06-13 Jakub Jelinek <jakub@redhat.com>
6696
6697 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
6698 (check_bitfield_decl, check_field_decl): Likewise.
6699 (build_vtbl_or_vbase_field, build_base_field): Likewise.
6700 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
6701 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
6702 (xfer_tag, finish_enum): Likewise.
6703 * decl2.c (finish_builtin_type): Likewise.
6704 * init.c (init_init_processing): Likewise.
6705 * pt.c (instantiate_class_template): Likewise.
6706 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
6707 * cp-tree.h (struct lang_type): Add user_align member.
6708 (CLASSTYPE_USER_ALIGN): Define.
6709
6710 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6711
6712 * Make-lang.in (c++.install-common): Install g++-cross in
6713 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
6714 $(target_alias)-g++ and $(target_alias)-c++.
6715
6716 2000-06-12 Mark Mitchell <mark@codesourcery.com>
6717
6718 * class.c (vcall_offset_data_s): Add last_init and fns.
6719 (overrides): Rename to same_signature_p.
6720 (dfs_find_final_overrider): Adjust accordingly.
6721 (mark_overriders): Likewise.
6722 (warn_hidden): Likewise.
6723 (build_vtbl_initializer): Reorganize machinery for building things
6724 at negative offsets.
6725 (build_vcall_and_vbase_vtbl_entries): Likewise.
6726 (build_vbase_offset_vtbl_entries): Likewise.
6727 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
6728 offset entries. Do not create two entries for functions with the
6729 same signature.
6730 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
6731 (build_rtti_vtbl_entries): Reorganize machinery for building things
6732 at negative offsets.
6733
6734 * optimize.c (expand_call_inline): Don't recurse into the code
6735 used to initialize the parameters more than once.
6736
6737 2000-06-11 Mark Mitchell <mark@codesourcery.com>
6738
6739 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
6740 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
6741 (find_substitution): Only use the `Sa' substitution for
6742 std::allocator, not instantiations of it.
6743 (write_template_prefix): Move comment. Only use a TREE_LIST to
6744 represent substitutions for a member template.
6745 (write_array_type): Mangle array dimensions correctly.
6746 * optimize.c (maybe_clone_body): Copy more information from the
6747 cloned function.
6748 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
6749 on the regenerated declaration.
6750
6751 2000-06-11 Chip Salzenberg <chip@valinux.com>
6752 Mark Mitchell <mark@codesourcery.com>
6753
6754 * class.c (build_vtable): Clarify comment.
6755 (build_ctor_vtbl_group): Pass the most derived type to
6756 build_vtable.
6757
6758 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6759
6760 * decl2.c (compare_options): Don't needlessly cast away const-ness.
6761
6762 2000-06-10 Mark Mitchell <mark@codesourcery.com>
6763
6764 * decl.c (add_binding): Handle duplicate declarations of external
6765 variables.
6766
6767 2000-06-09 Chip Salzenberg <chip@valinux.com>
6768 Mark Mitchell <mark@codesourcery.com>
6769
6770 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
6771 argument.
6772 (write_signed_number): New macro.
6773 (write_unsigned_number): Likewise.
6774 (write_source_name): Use them.
6775 (write_number): Handle signed and unsigned values.
6776 (write_integer_cst): Use tree_int_cst_sgn, and use
6777 write_unsigned_number or write_signed_number as appropriate.
6778 (write_discriminator): Use write_unsigned_number or
6779 write_signed_number as appropriate.
6780 (write_template_arg_literal): Likewise.
6781 (write_array_type): Use tree_low_cst.
6782 (write_template_parm): Use write_unsigned_number or
6783 write_signed_number as appropriate.
6784 (write_substitution): Adjust call to write_number.
6785 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
6786 (write_expression): Handle non-type template arguments of
6787 reference type correctly.
6788 (mangle_thunk): Use write_signed_number.
6789
6790 2000-06-09 Chip Salzenberg <chip@valinux.com>
6791
6792 * mangle.c (find_substition): Don't mangle objects with typename
6793 substitutions (e.g. "cin" as "Si").
6794
6795 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
6796
6797 * call.c (add_candidate): Use ggc_alloc_cleared.
6798 * decl.c (lookup_label): Likewise.
6799 * lex.c (retrofit_lang_decl): Likewise.
6800
6801 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
6802
6803 * semantics.c (expand_body): Push to TV_EXPAND.
6804 * optimize.c (optimize_function): Push to TV_INTEGRATION.
6805 * decl.c (start_function): Always call announce_function.
6806
6807 * tinfo2.cc: Just declare abort.
6808
6809 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
6810
6811 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
6812 whenever @ is a symbolic name.
6813
6814 2000-06-08 Jakub Jelinek <jakub@redhat.com>
6815
6816 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
6817
6818 2000-06-07 Mark Mitchell <mark@codesourcery.com>
6819
6820 * decl.c (pushdecl): Look up functions by DECL_NAME, not
6821 DECL_ASSEMBLER_NAME.
6822
6823 2000-06-06 Mark Mitchell <mark@codesourcery.com>
6824
6825 * decl2.c (c_language): Define.
6826
6827 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6828
6829 * lex.c (lang_init_options): Tweak.
6830
6831 * decl2.c: Remove #inclusion of diagnostic.h
6832 (lang_decode_option): Move diagnostic formatting options to
6833 toplevel.
6834
6835 * lang-options.h: Remove documentation for diagnostic options.
6836
6837 * Makefile.in (lex.o): Depends upon diagnostic.h
6838
6839 2000-06-06 Mark Mitchell <mark@codesourcery.com>
6840
6841 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
6842 the same DECL_RESULT, it's not a redefinition.
6843 * pt.c (tsubst_decl): Remove code to handle illegal
6844 specializations.
6845
6846 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
6847
6848 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
6849
6850 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
6851
6852 * search.c (maybe_suppress_debug_info): Don't check
6853 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
6854
6855 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
6856 here if extern_p.
6857
6858 Remember instantiation context in deferred instantiations.
6859 * cp-tree.h (struct tinst_level): Remove.
6860 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
6861 * pt.c (current_tinst_level): Now a tree.
6862 (print_template_context, push_tinst_level, pop_tinst_level,
6863 tinst_for_decl): Adjust.
6864 (reopen_tinst_level): New fn.
6865 (init_pt): Register current_tinst_level as a root.
6866 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
6867 of the pending templates list.
6868 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
6869 * lex.c (extract_interface_info): Adjust.
6870 * decl2.c (warn_if_unknown_interface): Adjust.
6871
6872 2000-06-05 Mark Mitchell <mark@codesourcery.com>
6873
6874 * class.c (indirect_primary_base_p): New function.
6875 (determine_primary_base): Use it.
6876
6877 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
6878
6879 Update new-abi dynamic cast algorithm.
6880 * tinfo.cc (__class_type_info::__dyncast_result): Add
6881 whole_details. Adjust constructor.
6882 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
6883 Avoid unnecessary searching.
6884 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
6885
6886 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6887
6888 * decl.c (init_decl_processing): Don't call record_component_aliases.
6889 * tree.c (build_cplus_array_type_1): Likewise.
6890
6891 2000-06-04 Mark Mitchell <mark@codesourcery.com>
6892
6893 * ir.texi: Correct typo.
6894 * mangle.c (write_expression): Handle non-type template arguments
6895 with reference type.
6896 * method.c (build_overload_value): Likewise.
6897 * pt.c (convert_nontype_argument): Explicitly represent conversion
6898 to a reference with an ADDR_EXPR.
6899 (unify): Always unify arguments in left-to-right order.
6900
6901 2000-06-03 Alex Samuel <samuel@codesourcery.com>
6902 Mark Mitchell <mark@codesourcery.com>
6903
6904 * Make-lang.in (CXX_SRCS): Add mangle.c.
6905 * Makefile.in (CXX_OBJS): Add mangle.o.
6906 (mangle.o): New rule.
6907
6908 * class.c (local_classes): New variable.
6909 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
6910 (get_vtt_name): Use mangle_vtt_name for new ABI.
6911 (init_class_processing): Initialize local_classes.
6912 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
6913 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
6914 (std_identifier): New macro.
6915 (DECL_VOLATILE_MEMFUNC_P): New macro.
6916 (DECL_NAMESPACE_STD_P): Likewise.
6917 (local_classes): Declare.
6918 (get_mostly_instantiated_function_type): Declare.
6919 (init_mangle): Declare.
6920 (mangle_decl): Likewise.
6921 (mangle_type_string): Likewise.
6922 (mangle_type): Likewise.
6923 (mangle_typeinfo_for_type): Likewise.
6924 (mangle_typeinfo_string_for_type): Likewise.
6925 (mangle_vtbl_for_type): Likewise.
6926 (mangle_vtt_for_type): Likewise.
6927 (mangle_ctor_vtbl_for_type): Likewise.
6928 (mangle_thunk): Likewise.
6929 (mangle_conv_op_name_for_type): Likewise.
6930 (mangle_guard_variable): Likewise.
6931 * decl.c (pushtag): Keep track of local classes.
6932 (initialize_predefined_identifiers): Initialize std_identifier.
6933 (init_decl_processing): Use std_identifier.
6934 (start_decl): Don't treat instantiations as specializations.
6935 (grokdeclarator): Likewise.
6936 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
6937 name for fully-instantiated templates.
6938 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6939 destructors with the new ABI.
6940 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6941 (grokfield): Use mangle_type for new ABI.
6942 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6943 (get_sentry): Use mangle_guard_variable for new ABI.
6944 (start_static_initialization_or_destruction): Likewise.
6945 * expr.c (extract_aggr_init): Remove.
6946 (extract_scalar_init): Likewise.
6947 (extract_init): Remove #if 0'd code.
6948 * mangle.c: New function.
6949 * method.c (build_mangled_name): Assert not flag_new_abi.
6950 (build_static_name): Likewise.
6951 (build_decl_overload_real): Likewise.
6952 (build_typename_overload): Likewise.
6953 (build_overload_with_type): Likewise.
6954 (build_overload_name): Likewise.
6955 (get_ctor_vtbl_name): Likewise.
6956 (start_squangling): Likewise.
6957 (get_id_2): Likewise.
6958 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6959 (init_method): Call init_mangle for new ABI.
6960 (make_thunk): Call mangle_thunk for new ABI.
6961 * operators.def: Correct new ABI manglings for the `%' operator.
6962 Add `::' operator.
6963 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6964 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6965 (lookup_template_class): Call mangle_decl for new ABI.
6966 (get_mostly_instantiated_function_type): New function.
6967 (set_mangled_name_for_template_decl): Use it.
6968 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6969 the new ABI. Use mangle_conv_op_name_for_type for instantiated
6970 conversion op names.
6971 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6972 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6973 (tinfo_base_init): Likewise. Mangle typeinfo string name with
6974 mangle_typeinfo_string_for_type.
6975
6976 2000-06-03 Mark Mitchell <mark@codesourcery.com>
6977
6978 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6979 (INNERMOST_TEMPLATE_ARGS): New macro.
6980 (innermost_args): Remove.
6981 (get_innermost_template_args): New function.
6982 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6983 * error.c (dump_function_decl): Be caution when using
6984 most_general_template.
6985 * method.c (build_template_parm_names): Use
6986 INNERMOST_TEMPLATE_ARGS.
6987 * pt.c (add_to_template_args): Tidy comment
6988 (get_innermost_template_args): New function.
6989 (check_explicit_specialization): Clear DECL_INITIAL for a new
6990 specialization.
6991 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6992 Tidy.
6993 (push_template_decl): Always register specializations of the most
6994 general template.
6995 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6996 (coerce_template_parms): Likewise.
6997 (lookup_template_class): Likewise.
6998 (innermost_args): Remove.
6999 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
7000 (tsubst_decl): Handle tricky specializations. Use
7001 get_innermost_template_args.
7002 (instantiate_template): Simplify handling of partial
7003 instantiations.
7004 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
7005 (most_general_template): Reimplement, in a more straightforward
7006 manner.
7007 (regenerate_decl_from_template): Tweak formatting. Use
7008 TMPL_ARGS_DEPTH for clarity.
7009 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
7010
7011 * dump.c (dequeue_and_dump): Dump information about thunks.
7012
7013 2000-06-01 Richard Henderson <rth@cygnus.com>
7014
7015 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
7016
7017 2000-06-01 Richard Henderson <rth@cygnus.com>
7018
7019 * decl2.c (unsupported_options): Fix typo, make const.
7020 (lang_decode_option): Fix bsearch argument order.
7021
7022 2000-06-01 Mark Mitchell <mark@codesourcery.com>
7023
7024 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
7025 on FIELD_DECLs.
7026
7027 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7028
7029 * cp-tree.h (c_get_alias_set): Deleted.
7030 * Makefile.in (decl.o): Include ../expr.h.
7031 * decl.c (expr.h): Include.
7032 (init_decl_processing): Call record_component_aliases for arrays.
7033 (grokdeclarator): Likewise.
7034 Set TREE_ADDRESSABLE for fields that aren't bitfields.
7035 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
7036
7037 2000-05-31 Mark Mitchell <mark@codesourcery.com>
7038
7039 Remove guiding declaration support.
7040 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
7041 (flag_guiding_decls): Remove.
7042 * call.c (build_user_type_conversion_1): Remove support for
7043 guiding decls.
7044 (build_new_function_call): Likewise.
7045 (build_new_op): Likewise.
7046 (build_new_method_call): Likewise.
7047 * decl.c (start_function): Likewise.
7048 * friend.c (is_friend): Likewise.
7049 (do_friend): Likewise.
7050 * decl2.c ((flag_dump_translation_unit): Make it const.
7051 (flag_guiding_decls): Remove.
7052 (unsupported_options): New variable
7053 (compare_options): New function.
7054 (lang_decode_option): Use them.
7055
7056 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
7057
7058 * method.c (mangle_expression): Adjust test for legal expression
7059 operators.
7060
7061 * pt.c (instantiate_decl): Save and restore the local
7062 specializations list.
7063
7064 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
7065
7066 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
7067
7068 2000-05-30 Mark Mitchell <mark@codesourcery.com>
7069
7070 * call.c (add_template_candidate_real): Handle member template
7071 constructors for classes with virtual bases.
7072 (build_user_type_conversion_1): Use in_charge_arg_for_name.
7073 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
7074
7075 * ir.texi: Update thunk documentation.
7076
7077 * call.c (joust): Fix handling of overloaded builtin operators.
7078
7079 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
7080
7081 * cp-tree.h (DECL_ANTICIPATED): New macro.
7082 Document new use of DECL_LANG_FLAG_7.
7083 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
7084 in the user namespace.
7085 * lex.c (do_identifier): If the identifier's declaration has
7086 DECL_ANTICIPATED on, it has not yet been declared. But do not
7087 replace it with an ordinary implicit declaration.
7088
7089 * tinfo2.cc: Include stdlib.h.
7090
7091 2000-05-29 Mark Mitchell <mark@codesourcery.com>
7092
7093 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
7094 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
7095 CLASSTYPE_ALIGN.
7096
7097 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
7098
7099 * decl2.c (lang_decode_option): Use skip_leading_substring instead
7100 of plain strncmp.
7101
7102 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
7103
7104 * operators.def (<?): Duplicated, should have been...
7105 (>?): this. Fixed.
7106
7107 2000-05-27 Alex Samuel <samuel@codesourcery.com>
7108 Mark Mitchell <mark@codesourcery.com>
7109
7110 * cp-tree.h (ansi_opname): Make it a macro.
7111 (ansi_assopname): Likewise.
7112 (struct lang_decl_flags): Add assignment_operator_p.
7113 (struct lang_decl): Add operator_code.
7114 (DECL_VTT_PARM): Adjust.
7115 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
7116 overloaded operator.
7117 (SET_OVERLOADED_OPERATOR_CODE): New macro.
7118 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
7119 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
7120 (opname_tab): Remove.
7121 (assignop_tab): Likewise.
7122 (operator_name_info_t): New type.
7123 (operator_name_info): New variable.
7124 (assignment_operator_name_info): Likewise.
7125 (build_cp_library_fn): Remove declaration.
7126 (push_cp_library_fn): Likewise.
7127 (operator_name_string): Likewise.
7128 (build_decl_overload): Likewise.
7129 * call.c (print_z_candidates): Simplify.
7130 (build_object_call): Adjust usage of ansi_opname. Use
7131 DECL_OVERLOADED_OPERATOR_P.
7132 (op_error): Adjust operator name lookup.
7133 (build_conditional_expr): Adjust usage of ansi_opname.
7134 (build_new_op): Likewise.
7135 (build_op_delete_call): Likewise.
7136 (build_over_call): Likewise.
7137 (joust): Use DECL_OVERLOADED_OPERATOR_P.
7138 * decl.c (duplicate_decls): Copy operator_code.
7139 (init_decl_processing): Adjust parameters to push_cp_library_fn.
7140 (builtin_function): Adjust parameters to build_library_fn_1.
7141 (build_library_fn_1): Accept an overloaded operator code.
7142 (build_library_fn): Pass ERROR_MARK.
7143 (build_cp_library_fn): Accept an overloaded operator code.
7144 (push_cp_library_fn): Likewise.
7145 (grokfndecl): Tweak.
7146 (grokdeclarator): Simplify code to compute names of overloaded
7147 operators. Adjust use of ansi_opname.
7148 (ambi_op_p): Work on tree_codes, not identifiers.
7149 (unary_op_p): Likewise.
7150 (grok_op_properties): Likewise.
7151 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
7152 (lang_mark_tree): Don't try to mark the operator_code.
7153 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
7154 * error.c (dump_decl): Remove special handling for operator
7155 names.
7156 (dump_function_name): Likewise.
7157 (dump_expr): Adjust name lookup of operators.
7158 (op_to_string): Simplify.
7159 (assop_to_string): Likewise.
7160 * init.c (build_new_1): Adjust use of ansi_opname.
7161 * lex.c (opname_tab): Remove.
7162 (assignop_tab): Likewise.
7163 (ansi_opname): Likewise.
7164 (ansi_assopname): Likewise.
7165 (operator_name_string): Likewise.
7166 (reinit_lang_specific): Likewise.
7167 (operator_name_info): New variable.
7168 (assignment_operator_name_info): Likewise.
7169 (init_operators): New function.
7170 (init_parse): Use it.
7171 (do_identifier): Adjust use of ansi_opname.
7172 * method.c (mangle_expression): Don't use ansi_opname for
7173 mangling.
7174 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
7175 (build_decl_overload): Remove.
7176 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
7177 (do_build_assign_ref): Adjust use of ansi_opname.
7178 (synthesize_method): Likewise.
7179 (implicitly_declare_fn): Likewise.
7180 * operators.def: New file.
7181 * parse.y (operator): Adjust use of ansi_opname.
7182 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
7183 (set_mangled_name_for_template_decl): Don't play games with
7184 current_namespace.
7185 (special_function_p): Adjust use of ansi_opname.
7186 * typeck.c (check_return_expr): Likewise.
7187 * Make-lang.in (cc1plus): Depend on operators.def.
7188 * Makefile.in (lex.o): Likewise.
7189 (decl.o): Likewise.
7190
7191 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
7192
7193 * Make-lang.in (cplib2.ready): Eradicate.
7194
7195 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7196
7197 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
7198 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
7199 (built_min, cp_tree_equal): Likewise.
7200
7201 2000-05-26 Mark Mitchell <mark@codesourcery.com>
7202
7203 * class.c (layout_nonempty_base_or_field): Replace
7204 `record_layout_info' with `record_layout_info_s'.
7205
7206 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
7207
7208 Fix goto checking.
7209 * cp-tree.h (struct language_function): x_named_labels is now
7210 a struct named_label_list*.
7211 * decl.c (struct named_label_use_list): Renamed from...
7212 (struct named_label_list): ...this. New struct.
7213 (push_binding_level): Don't set eh_region.
7214 (note_level_for_eh): New fn.
7215 (pop_label): Take label and old value directly.
7216 (pop_labels): Adjust for new named_labels format.
7217 (lookup_label): Likewise.
7218 (poplevel): Note characteristics of a binding level containing a
7219 named label. Mess with named label lists earlier.
7220 (mark_named_label_lists): New fn.
7221 (mark_lang_function): Call it.
7222 (use_label): New fn, split out from...
7223 (make_label_decl): ...here. Don't call it.
7224 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
7225 check_previous_gotos): New fns, split out from...
7226 (define_label): ...here.
7227 (check_switch_goto): New fn.
7228 (define_case_label): Call it.
7229 (check_goto): New fn.
7230 * semantics.c (finish_goto_stmt): Call it and use_label.
7231 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
7232 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
7233
7234 2000-05-26 Mark Mitchell <mark@codesourcery.com>
7235
7236 * class.c (build_vtable_entry_ref): Correct usage of
7237 get_vtbl_decl_for_binfo.
7238
7239 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
7240 * method.c (implicitly_declare_fn): Not here.
7241
7242 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
7243
7244 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
7245 (CPTI_PTMD_DESC_TYPE): ... here.
7246 (ptmd_desc_type_node): Rename to ...
7247 (ptm_desc_type_node): ... here.
7248 * decl.c: Likewise.
7249 * rtti.c (ptmd_initializer): Rename to ...
7250 (ptm_initializer): ... here.
7251 (sythesize_tinfo_var): Adjust. Deal with pointer to member
7252 function.
7253 (create_tinfo_types): Adjust.
7254
7255 2000-05-25 Mark Mitchell <mark@codesourcery.com>
7256
7257 Finish implementation of VTTs.
7258 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
7259 CPTI_VTT_PARM_IDENTIFIER.
7260 (vtt_parm_identifier): New macro.
7261 (vtt_parm_type): Likewise.
7262 (BINFO_SUBVTT_INDEX): Likewise.
7263 (BINFO_VPTR_INDEX): Likewise.
7264 (struct lang_decl): Add vtt_parm.
7265 (DECL_VTT_PARM): New macro.
7266 (DECL_USE_VTT_PARM): Likewise.
7267 (DECL_NEEDS_VTT_PARM_P): Likewise.
7268 (get_vtt_name): Declare.
7269 (build_artificial_parm): Likewise.
7270 (fixup_all_virtual_upcast_offsets): Likewise.
7271 (expand_indirect_vtbls_init): Remove.
7272 * call.c (build_new_method_call): Pass the vtt to subobject
7273 constructors and destructors.
7274 * class.c (get_vtt_name): Give it external linkage.
7275 (build_clone): Handle the magic VTT parameters for clones.
7276 (clone_function_decl): Fix typo in comment.
7277 (build_vtt): Keep track of the indices in the VTTs where various
7278 entities are stored.
7279 (build_vtt_inits): Likewise.
7280 (dfs_build_vtt_inits): Likewise.
7281 (build_ctor_vtbl_group): Tweak type of construction vtables.
7282 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
7283 primary bases, when building construction vtables.
7284 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
7285 (initialize_predefined_identifiers): Add vtt_parm_identifier.
7286 (init_decl_processing): Initialize vtt_parm_type.
7287 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
7288 (lang_mark_tree): Make vtt_parm.
7289 * decl2.c (build_artificial_parm): New function.
7290 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
7291 (grokclassfn): Use build_artificial_parm.
7292 * init.c (initialize_vtbl_ptrs): Call
7293 fixup_all_virtual_upcast_offsets directly.
7294 (perform_member_init): Use the complete subobject destructor for
7295 member cleanups.
7296 (build_vtbl_address): New function.
7297 (expand_virtual_init): Handle VTTs.
7298 * optimize (maybe_clone_body): Likewise.
7299 * search.c (fixup_all_virtual_upcast_offsets): Give it external
7300 linkage.
7301 (expand_indirect_vtbls_init): Remove.
7302 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
7303 * tree.c (make_binfo): Make them bigger.
7304
7305 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
7306
7307 * inc/cxxabi.h (__pbase_type_info): Define, based on
7308 __pointer_type_info.
7309 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
7310 (__pointer_to_member_type_info): Likewise.
7311 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
7312 (__pointer_to_member_type_info::__is_pointer_p): Remove.
7313 (__pointer_type_info::__do_catch): Rename to ...
7314 (__pbase_type_info::__do_catch): ... here. Adjust.
7315 (__pbase_type_info::__pointer_catch): Implement.
7316 (__pointer_type_info::__pointer_catch): Adjust.
7317 (__pointer_to_member_type_info::__pointer_catch): Adjust.
7318
7319 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
7320
7321 * tinfo.h (__user_type_info::contained_virtual_p): New
7322 predicate.
7323 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
7324 shaped heirarchy.
7325 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
7326 diamond shaped heirarchy. Add early out for mixed diamond and
7327 duplicate shaped heirarchy.
7328
7329 2000-05-24 Mark Mitchell <mark@codesourcery.com>
7330
7331 * cp-tree.h (build_delete): Change prototype.
7332 (build_vec_delete): Likewise.
7333 * call.c (build_scoped_method_call): Use special_function_kind
7334 values to indicate the kind of destruction to be done.
7335 (build_method_call): Likewise.
7336 * decl.c (finish_destructor_body): Likewise.
7337 (maybe_build_cleanup_1): Likewise. Rename to ...
7338 (maybe_build_cleanup): ... this.
7339 * decl2.c (delete_sanity): Use special_function_kind
7340 values to indicate the kind of destruction to be done.
7341 (build_cleanup): Likewise.
7342 * init.c (perform_member_init): Likewise.
7343 (build_vec_delete_1): Likewise.
7344 (build_dtor_call): Simplify.
7345 (build_delete): Use special_function_kind
7346 values to indicate the kind of destruction to be done.
7347 (build_vbase_delete): Likewise.
7348 (build_vec_delete): Likewise.
7349
7350 * init.c (sort_member_init): Fix typo in error message generation
7351 code.
7352
7353 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
7354
7355 * semantics.c (begin_class_definition): make the packed
7356 attribute be sensitive to the "-fpack-struct" command line flag
7357
7358 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
7359
7360 Update new-abi upcast algorithm.
7361 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
7362 prototype and meaning of return value.
7363 (__si_class_type_info::__do_upcast): Likewise.
7364 (__vmi_class_type_info::__do_upcast): Likewise.
7365 * tinfo.cc (__class_type_info::__upcast_result): Replace
7366 whole2dst with part2dst. Adjust ctor.
7367 (__class_type_info::__do_upcast): Adjust call of worker function.
7368 (__class_type_info::__do_upcast): Adjust.
7369 (__si_class_type_info::__do_upcast): Adjust. Use parent's
7370 __do_upcast.
7371 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
7372 virtual base in diamond heirarchy bug.
7373
7374 2000-05-23 Mark Mitchell <mark@codesourcery.com>
7375
7376 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
7377 and bitfield to tinfo_fn_p.
7378 (DECL_TINFO_FN_P): Adjust.
7379 (SET_DECL_TINFO_FN_P): Likewise.
7380 (DECL_MUTABLE_P): Likewise.
7381 (DECL_C_BIT_FIELD): Likewise.
7382 (SET_DECL_C_BIT_FIELD): Likewise.
7383 (CLEAR_DECL_C_BIT_FIELD): Likewise.
7384 (DECL_UNINLINABLE): Likewise.
7385 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
7386 (handle_using_decl): Remove assertion.
7387 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
7388 to build FIELD_DECLs.
7389 (build_base_field): Likewise.
7390 (layout_class_type): Likewise.
7391 * decl.c (init_decl_processing): Likewise.
7392 (build_ptrmemfunc_type): Likewise.
7393 (grokdeclarator): Likewise.
7394 * decl2.c (grok_x_components): Likewise.
7395 * except.c (call_eh_info): Likewise.
7396 * init.c (init_init_processing): Likewise.
7397 * rtti.c (expand_class_desc): Likewise.
7398 (create_pseudo_type_info): Likewise.
7399 (get_vmi_pseudo_type_info): Likewise.
7400 (create_tinfo_types): Likewise.
7401 * ptree.c (print_lang_decl): Adjust.
7402 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
7403 before checking DECL_MUTABLE_P.
7404
7405 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
7406 parameters for template functions.
7407 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
7408 destructors as well as constructors.
7409
7410 2000-05-22 Mark Mitchell <mark@codesourcery.com>
7411
7412 * class.c (build_ctor_vtbl_group): Set inits.
7413 * optimize.c (maybe_clone_body): Set DECL_INLINE and
7414 DECL_THIS_INLINE appropriately for clones.
7415
7416 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
7417 (DECL_CONV_FN_P): Simplify.
7418 (DECL_OPERATOR): Remove.
7419 (language_to_string): Declare.
7420 * decl.c (duplicate_decls): Fix typo in comment.
7421 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
7422 (grok_op_properties): Use DECL_CONV_FN_P instead of
7423 IDENTIFIER_TYPENAME_P.
7424 * dump.c (dequeue_and_dump): Dump the language linkage of
7425 declarations.
7426 * error.c (language_to_string): Give it external linkage.
7427 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
7428 (implicitly_declare_fn): Set DECL_LANGUAGE.
7429 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
7430 IDENTIFIER_TYPENAME_P.
7431 (tsubst_decl): Likewise.
7432 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
7433 * semantics.c (finish_member_declaration): Don't mark members of
7434 classes declared in an extern "C" region as extern "C".
7435
7436 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7437
7438 * decl2.c (qualified_lookup_using_namespace): Look through
7439 namespace aliases.
7440
7441 * decl.c (push_using_decl): Return the old decl on namespace level.
7442
7443 2000-05-21 Mark Mitchell <mark@codesourcery.com>
7444
7445 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
7446 (VTT_NAME_PREFIX): New macro.
7447 (CTOR_VTBL_NAME_PREFIX): Likewise.
7448 (get_ctor_vtbl_name): New function.
7449 * class.c (get_vtable_name): Simplify.
7450 (get_vtt_name): New function.
7451 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
7452 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
7453 when a virtual base becomes primary.
7454 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
7455 VTTs.
7456 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
7457 additional parameters.
7458 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
7459 (initialize_array): New function.
7460 (build_vtt): Likewise.
7461 (build_vtt_inits): Likewise.
7462 (dfs_build_vtt_inits): Likewise.
7463 (dfs_fixup_binfo_vtbls): Likewise.
7464 (build_ctor_vtbl_group): Likewise.
7465 (initialize_vtable): Use initialize_array.
7466 (accumulate_vtbl_inits): Reimplement to handle construction
7467 vtables.
7468 (dfs_accumulate_vtbl_inits): Likewise.
7469 (bulid_vtbl_initializer): Adjust parameter name.
7470 * method.c (build_typename_overload): Remove #if 0'd code.
7471 (get_ctor_vtbl_name): New function.
7472 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
7473 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
7474
7475 * cp-tree.h (struct lang_type): Remove search_slot.
7476 (CLASSTYPE_SEARCH_SLOT): Remove.
7477 (emit_base_init): Change prototype.
7478 (initialize_vtbl_ptrs): Likewise.
7479 (expand_indirect_vtbls_init): Likewise.
7480 (clear_search_slots): Remove.
7481 * decl.c (lang_mark_tree): Don't mark search_slot.
7482 * init.c (initialize_vtbl_ptrs): Simplify.
7483 (emit_base_init): Likewise.
7484 * search.c (struct vbase_info): Document decl_ptr.
7485 (convert_pointer_to_single_level): Remove.
7486 (dfs_find_vbases): Remove.
7487 (dfs_init_base_pointers): Simplify.
7488 (dfs_clear_vbase_slots): Remove.
7489 (dfs_vtable_path_unmark): New function.
7490 (init_vbase_pointers): Simplify.
7491 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
7492 (expand_indirect_vtbls_init): Simplify. Don't call
7493 mark_all_temps_used.
7494 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
7495 initialize_vtbl_ptrs.
7496
7497 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
7498
7499 * except.c: Add static prototypes.
7500
7501 2000-05-20 H.J. Lu <hjl@gnu.org>
7502
7503 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
7504
7505 2000-05-19 Mark Mitchell <mark@codesourcery.com>
7506
7507 Don't create a separate copy of virtual bases for the
7508 CLASSTYPE_VBASECLASSES list.
7509 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
7510 (BINFO_FOR_VBASE): Remove.
7511 (CANONICAL_BINFO): Adjust.
7512 (binfo_for_vbase): New function.
7513 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
7514 instead of BINFO_FOR_VBASE.
7515 (build_vbase_pointer): Likewise.
7516 (build_secondary_vtable): Likewise.
7517 (dfs_mark_primary_bases): Likewise.
7518 (mark_primary_bases): Likewise.
7519 (layout_nonempty_base_or_field): Likewise.
7520 (dfs_set_offset_for_shared_vbases): Likewise.
7521 (dfs_set_offset_for_unshared_vbases): Likewise.
7522 (layout_virtual_bases): Likewise. Adjust for changes to the
7523 CLASSTYPE_VBASECLASSES list.
7524 (dump_class_hierarchy_r): Use binfo_for_vbase
7525 instead of BINFO_FOR_VBASE.
7526 (dump_class_hierarchy): Likewise.
7527 (finish_vtbls): Likewise.
7528 (build_vtbl_initializer): Adjust for changes to the
7529 CLASSTYPE_VBASECLASSES list.
7530 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
7531 * decl.c (finish_destructor_body): Adjust for changes to the
7532 CLASSTYPE_VBASECLASSES list.
7533 * init.c (sort_base_init): Use binfo_for_vbase.
7534 (construct_virtual_bases): Adjust for changes to the
7535 CLASSTYPE_VBASECLASSES list.
7536 (expand_member_init): Use binfo_for_vbase.
7537 (build_vbase_delete): Adjust for changes to the
7538 CLASSTYPE_VBASECLASSES list.
7539 * method.c (do_build_copy_constructor): Likewise.
7540 * rtti.c (get_base_offset): Use binfo_for_vbase.
7541 (expand_class_desc): Remove #if 0'd code.
7542 * search.c (struct vbase_info): Remove vbase_types.
7543 (get_base_distance): Use binfo_for_vbase.
7544 (lookup_field_queue_p): Use CANONICAL_BINFO.
7545 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
7546 (get_pure_virtuals): Adjust for changes to the
7547 CLASSTYPE_VBASECLASSES list.
7548 (dfs_find_vbases): Use binfo_for_vbase.
7549 (dfs_init_vbase_pointers): Likewise.
7550 (init_vbase_pointers): Don't initialize vi.vbase_types.
7551 (virtual_context): Use binfo_for_vbase.
7552 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
7553 CLASSTYPE_VBASECLASSES list.
7554 (expand_indirect_vtbls_init): Simplify.
7555 (dfs_get_vbase_types): Don't replicate virtual bases.
7556 (find_vbase_instance): Use binfo_for_vbase.
7557 (binfo_for_vbase): New function.
7558 * typeck.c (get_delta_difference): Use binfo_for_vbase.
7559
7560 2000-05-17 Mark Mitchell <mark@codesourcery.com>
7561
7562 * decl2.c (finish_anon_union): Generalize error messages to handle
7563 anonymous structures.
7564 * init.c (perform_member_init): Remove `name' parameter.
7565 (build_field_list): New function.
7566 (sort_member_init): Handle anonymous union initialization order
7567 correctly. Check for multiple initializations of the same union.
7568 (emit_base_init): Don't look up fields by name here.
7569 (expand_member_init): Record the result of name lookup for future
7570 reference.
7571 * typeck.c (build_component_ref): Fix formatting.
7572
7573 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
7574
7575 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
7576 * typeck.c (build_x_compound_expr): Replace warn_unused with
7577 warn_unused_value.
7578
7579 * decl2.c (lang_decode_option): Update -Wall unused flags by
7580 calling set_Wunused.
7581
7582 2000-05-16 Mark Mitchell <mark@codesourcery.com>
7583
7584 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
7585 * init.c (dfs_vtable_path_unmark): Remove.
7586 * search.c (marked_new_vtable_p): Likewise.
7587 (unmarked_new_vtable_p): Likewise.
7588 (dfs_search_slot_nonempty_p): Likewise.
7589 (dfs_mark): Likewise.
7590 (dfs_vtable_path_unmark): Likewise.
7591 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
7592 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
7593 (dfs_init_vbase_pointers): Remove special-case new ABI code.
7594 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
7595 (init_vbase_pointers): Simplify.
7596 (expand_indirect_vtbls_init): Likewise.
7597
7598 * class.c (copy_virtuals): New function.
7599 (build_primary_table): Use it.
7600 (build_secondary_vtable): Likewise.
7601 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
7602 indicate that no vcall offset is required.
7603 (add_virtual_function): Likewise.
7604 (modify_all_vtables): Likewise.
7605 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7606 (dfs_accumulate_vtbl_inits): Likewise.
7607 (build_vtbl_initializer): Make changes to handle construction
7608 vtables.
7609 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7610 (build_rtti_vtbl_entries): Likewise.
7611 (build_vtable_entries): Handle a NULL vcall_index.
7612
7613 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
7614
7615 * decl2.c (lang_decode_option): Fix thinko.
7616
7617 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
7618
7619 * except.c (check_handlers): New fn.
7620 * cp-tree.h: Declare it.
7621 * semantics.c (finish_handler_sequence): Call it.
7622 (finish_function_handler_sequence): Likewise.
7623 (finish_handler_parms): Set TREE_TYPE on the handler.
7624 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
7625 * search.c (get_base_distance_recursive): If protect>1, ignore
7626 special access.
7627 (get_base_distance): Don't reduce watch_access.
7628
7629 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
7630
7631 * lex.c: #include diagnostic.h.
7632 (lang_init_options): Set default prefixing rules.
7633
7634 * lang-options.h: Add -fdiagnostics-show-location=.
7635
7636 * decl2.c: #include diagnostic.h.
7637 (lang_decode_option): Handle -fdiagnostics-show-location=.
7638
7639 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
7640
7641 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
7642 * vec.cc: Revert my 2000-05-07 change.
7643
7644 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
7645
7646 * class.c (check_field_decls): Complain about non-static data
7647 members with same name as class in class with constructor.
7648
7649 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
7650
7651 * decl.c (grokdeclarator): Allow non-static data members with
7652 same name as class.
7653
7654 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
7655
7656 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
7657 and pending_inline.filename. Update prototypes.
7658 * decl.c (define_label): Constify filename parameter.
7659 * decl2.c (warn_if_unknown_interface): Constify local char *.
7660 * input.c Constify input_source.filename. Don't declare
7661 input_filename or lineno. Constify filename parameter to feed_input.
7662 * lex.c (init_parse): Constify parameter and return value.
7663 (cp_pragma_interface, cp_pragma_implementation): Constify
7664 filename argument.
7665 (reinit_parse_for_method, reinit_parse_for_block,
7666 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
7667 Constify local char *.
7668 * pt.c: Don't declare lineno or input_filename.
7669 (print_template_context, tsubst_friend_function, tsubst_decl,
7670 tsubst, instantiate_decl): Constify local char *.
7671 * semantics.c (expand_body): Constify local char *.
7672 * tree.c (build_srcloc): Constify filename parameter.
7673 * typeck.c (c_expand_asm_operands): Constify filename
7674 parameter.
7675
7676 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
7677
7678 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
7679 offsetof expansion.
7680
7681 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
7682
7683 * inc/cxxabi.h: Fix typos in comment.
7684 (__base_class_info::__offset): Use a static_cast.
7685
7686 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
7687
7688 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
7689 of std::size_t and std::ptrdiff_t respectively.
7690 * tinfo.cc: Likewise.
7691 * vec.cc: Likewise.
7692
7693 2000-05-06 Richard Henderson <rth@cygnus.com>
7694
7695 * typeck.c (build_c_cast): Don't warn integer->pointer size
7696 mismatch for constants.
7697
7698 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
7699
7700 * rtti.c (ptmd_initializer): Set non-public, if class is
7701 incomplete.
7702
7703 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
7704 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7705 __cxa_vec_delete): Likewise.
7706 * tinfo.cc (__dynamic_cast): Likewise.
7707 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7708 __cxa_vec_delete): Likewise.
7709
7710 2000-05-04 Mark Mitchell <mark@codesourcery.com>
7711
7712 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
7713 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
7714 (lang_decl_flags): Add vcall_offset.
7715 (THUNK_VCALL_OFFSET): Use it.
7716 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
7717 * method.c (make_thunk): Create the lang_decl here, not in
7718 emit_thunk.
7719 (emit_thunk): Make generic thunks into ordinary functions once
7720 they have been fed to expand_body.
7721 * semantics.c (expand_body): Set current_function_is_thunk here.
7722
7723 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7724
7725 * class.c (update_vtable_entry_for_fn): Prototype.
7726
7727 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
7728 and `tmpl'.
7729
7730 * search.c (dfs_build_inheritance_graph_order): Prototype.
7731
7732 2000-05-04 Mark Mitchell <mark@codesourcery.com>
7733
7734 * cp-tree.h (special_function_kind): Add various kinds of
7735 destructors.
7736 (special_function_p): New function.
7737 * class.c (overrides): Don't let one kind of destructor override
7738 another.
7739 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
7740 whether or not to instantiate a template.
7741 * tree.c (special_function_p): Define.
7742
7743 2000-05-03 Mark Mitchell <mark@codesourcery.com>
7744
7745 * cp-tree.def (THUNK_DECL): Remove.
7746 * cp-tree.h (DECL_THUNK_P): New macro.
7747 (DECL_NON_THUNK_FUNCTION_P): Likewise.
7748 (DECL_EXTERN_C_FUNCTION_P): Likewise.
7749 (SET_DECL_THUNK_P): Likewise.
7750 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
7751 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
7752 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
7753 * decl.c (decls_match): Use DECL_EXTERN_C_P.
7754 (duplicate_decls): Likewise.
7755 (pushdecl): Likewise. Adjust thunk handling.
7756 (grokfndecl): Use DECL_EXTERN_C_P.
7757 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
7758 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
7759 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
7760 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
7761 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
7762 DECL_NO_STATIC_CHAIN.
7763 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
7764 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
7765 * search.c (covariant_return_p): Remove THUNK_DECL handling.
7766 * ir.texi: Update.
7767
7768 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
7769
7770 * tree.c (walk_tree): Set lineno.
7771
7772 2000-05-01 Mark Mitchell <mark@codesourcery.com>
7773
7774 * exception.cc: Update license notice.
7775 * new.cc: Likewise.
7776 * new1.cc: Likewise.
7777 * new2.cc: Likewise.
7778 * tinfo.cc: Likewise.
7779 * tinfo2.cc: Likewise.
7780 * vec.cc: Likewise.
7781 * inc/cxxabi.h: Likewise.
7782 * inc/exception: Likewise.
7783 * inc/new: Likewise.
7784 * inc/new.h: Likewise.
7785 * inc/typeinfo: Likewise.
7786
7787 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
7788
7789 * tree.c (build_target_expr_with_type): If we already have a
7790 TARGET_EXPR, just return it.
7791
7792 * optimize.c (initialize_inlined_parameters): Don't generate an
7793 EXPR_STMT if we can just use DECL_INITIAL.
7794 * decl.c (emit_local_var): Only make the initialization a
7795 full-expression if stmts_are_full_exprs_p.
7796
7797 2000-05-01 Mark Mitchell <mark@codesourcery.com>
7798
7799 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
7800 macro.
7801 * call.c (standard_conversion): Use it.
7802 (direct_reference_binding): Likewise.
7803 (build_over_call): Likewise.
7804 (is_properly_derived_from): Likewise.
7805 (compare_ics): Likewise.
7806 * class.c (resolves_to_fixed_type_p): Likewise.
7807 * optimize.c (declare_return_variable): Likewise.
7808 * pt.c (is_specialization_of): Likewise.
7809 (unify): Likewise.
7810 * typeck.c (comp_target_parms): Likeiwse.
7811 (build_static_cast): Likewise.
7812 (build_reinterpret_cast): Likewise.
7813 (build_const_cast): Likewise.
7814 (comp_ptr_ttypes_real): Likewise.
7815 (comp_ptr_ttypes_const): Likewise.
7816 * typeck2.c (process_init_constructor): Likewise.
7817
7818 2000-04-30 Scott Snyder <snyder@fnal.gov>
7819
7820 * decl.c (finish_destructor_body): Use the base destructor when
7821 destroying virtual bases.
7822
7823 2000-04-30 Mark Mitchell <mark@codesourcery.com>
7824
7825 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
7826 STMT_EXPRs.
7827 * optimize.c (struct inline_data): Add target_exprs field.
7828 (declare_return_variable): When a function returns an aggregate,
7829 use the variable declared in the TARGET_EXPR as the remapped
7830 DECL_RESULT.
7831 (expand_call_inline): Update the pending target_exprs stack.
7832 (optimize_function): Initialize the stack.
7833
7834 * decl2.c (finish_file): Fix typo in comment.
7835
7836 * method.c (emit_thunk): Don't try to return a `void' value.
7837
7838 * optimize.c (initialize_inlined_parameters): If the parameter is
7839 addressable, we need to make a new VAR_DECL, even if the
7840 initializer is constant.
7841
7842 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
7843
7844 * decl.c (grok_op_properties): Add an extra check of argtypes.
7845
7846 2000-04-27 Mark Mitchell <mark@codesourcery.com>
7847
7848 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
7849 variables.
7850 (initialize_inlined_parameters): Try to avoid creating new
7851 VAR_DECLs.
7852
7853 2000-04-27 Alex Samuel <samuel@codesourcery.com>
7854
7855 * lex.c (my_get_run_time): Remove.
7856 (init_filename_times): Use get_run_time instead of my_get_run_time.
7857 (check_newline): Likewise.
7858 (dump_time_statistics): Likewise.
7859 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
7860 of computing elapsed time explicitly.
7861
7862 2000-04-26 Mark Mitchell <mark@codesourcery.com>
7863
7864 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
7865 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
7866 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
7867 before calling decl_constant_value.
7868 * class.c (check_bitfield_decl): Likewise.
7869 * cvt.c (ocp_convert): Likewise.
7870 (convert): Likewise.
7871 * decl.c (compute_array_index_type): Likewise.
7872 (build_enumerator): Likewise.
7873 * decl2.c (check_cp_case_value): Likewise.
7874 * pt.c (convert_nontype_argument): Likewise.
7875 (tsubst): Likewise.
7876 * typeck.c (decay_conversion): Likewise.
7877 (build_compound_expr): Likewise.
7878 (build_reinterpret_cast): Likewise.
7879 (build_c_cast): Likewise.
7880 (convert_for_assignment): Likewise.
7881
7882 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
7883
7884 * decl.c (finish_function): Don't play games with DECL_INLINE.
7885
7886 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
7887
7888 * ir.texi: Correct typo.
7889
7890 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7891
7892 * decl.c (grokdeclarator): Reject VLAs as members.
7893
7894 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
7895
7896 * call.c (standard_conversion): Accept conversion between
7897 COMPLEX_TYPEs.
7898
7899 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
7900
7901 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
7902
7903 * decl2.c (finish_file): Remove double setup for accounting
7904 compile time.
7905
7906 2000-04-24 Robert Lipe <robertlipe@usa.net>
7907
7908 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
7909
7910 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
7911
7912 * new.cc (set_new_handler): Needs to be in std::.
7913
7914 2000-04-23 Mark Mitchell <mark@codesourcery.com>
7915
7916 * cp-tree.h (lang_decl): Remove pretty_function_p.
7917 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
7918 language-specific node.
7919 * decl.c (cp_make_fname_decl): Use build_decl, not
7920 build_lang_decl, to build the variables.
7921 (grokvardecl): Don't call build_lang_decl for local variables in
7922 templates.
7923 (grokdeclarator): Don't call build_lang_decl for local type
7924 declarations in templates.
7925 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7926 zero'd memory, rather than calling memset.
7927 * pt.c: Include hashtab.h.
7928 (local_specializations): New variable.
7929 (retrieve_local_specialization): Use it.
7930 (register_local_specialization): Likewise.
7931 (tsubst_decl): Don't assume local variables have
7932 DECL_LANG_SPECIFIC.
7933 (instantiate_decl): Set up local_specializations.
7934 * Makefile.in (HTAB_H): New variable.
7935
7936 2000-04-23 Richard Henderson <rth@cygnus.com>
7937
7938 * typeck.c (c_expand_asm_operands): Restore the original
7939 contents of the output list.
7940
7941 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
7942
7943 * ir.texi: Document complex number representation.
7944
7945 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
7946
7947 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7948 (target_incomplete_p): New function.
7949 (tinfo_base_init): Create comdat NTBS name variable.
7950 (ptr_initializer): Add non_public parameter. Calculate it.
7951 (ptmd_initializer): Likewise.
7952 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7953 (create_real_tinfo_var): Add non_public parameter. Use it.
7954 Push proxy into global namespace.
7955 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7956 New enumeration.
7957 * inc/typeinfo (type_info::before, type_info::operator==):
7958 Compare __name addresses.
7959
7960 * tinfo2.cc: Remove new-abi builtins comment.
7961
7962 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
7963
7964 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7965
7966 * call.c (joust): Exit early if we get the same function, too.
7967
7968 * decl2.c (key_method): Return NULL_TREE for template classes.
7969 (import_export_class): Don't need to check for template classes.
7970
7971 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
7972
7973 * lex.c: Remove references to cccp.c.
7974
7975 2000-04-18 Mark Mitchell <mark@codesourcery.com>
7976
7977 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7978 volatile_memfunc. Add destructor_attr. Adjust dummy.
7979 (DECL_DESTRUCTOR_P): Use destructor_attr.
7980 (DECL_CONST_MEMFUNC_P): Reimplement.
7981 (DECL_VOLATILE_MEMFUNC_P): Remove.
7982 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7983 (overrides): Use DECL_DESTRUCTOR_P.
7984 (check_for_override): Likewise.
7985 * decl.c (start_function): Likewise.
7986 * decl2.c (grokfclassfn): Likewise.
7987 (check_classfn): Likewise.
7988 (grok_function_init): Likewise.
7989
7990 2000-04-17 Mark Mitchell <mark@codesourcery.com>
7991
7992 * decl2.c (grokfield): Issue error on illegal data member
7993 declaration.
7994
7995 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
7996
7997 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7998
7999 2000-04-16 Mark Mitchell <mark@codesourcery.com>
8000
8001 * class.c (build_vtable_entry): Don't build thunks for type-info
8002 functions.
8003
8004 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
8005
8006 * decl.c (decls_match): Allow a redeclaration of a builtin to
8007 specify args while the builtin did not.
8008
8009 2000-04-15 Mark Mitchell <mark@codesourcery.com>
8010
8011 * cp-tree.def (THUNK_DECL): Add to documentation.
8012 * cp-tree.h (flag_huge_objects): Declare.
8013 * class.c (modify_vtable_entry): Tidy.
8014 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
8015 Calculate delta appropriately for the new ABI.
8016 (dfs_modify_vtables): Use it.
8017 (modify_all_vtables): Fix thinko in code to add overriding copies
8018 of functions to primary vtables.
8019 (build_clone): Fix typo in comment.
8020 (clone_function_decl): Correct order of destructors in vtable.
8021 (build_vbase_offset_vtbl_entries): Adjust comment.
8022 (dfs_vcall_offset_queue_p): Remove.
8023 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
8024 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
8025 (build_vtable_entry): Correct check for pure virtual functions.
8026 Don't declare flag_huge_objects.
8027 * decl.c (flag_huge_objects): Remove declaration.
8028 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
8029 Use int_size_in_bytes.
8030 (emit_thunk): Handle vcall offset thunks.
8031
8032 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8033
8034 * decl2.c (parse_time, varconst_time): Delete declarations.
8035 (finish_file): Delete LINENO declaration.
8036 START_TIME and THIS_TIME now long.
8037
8038 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
8039
8040 * class.c (build_base_field): Reformat comment.
8041
8042 * inc/cxxabi.h (stddef.h): Comment inclusion.
8043 (__base_class_info::__offset): Comment shift.
8044
8045 2000-04-12 Mark Mitchell <mark@codesourcery.com>
8046
8047 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
8048 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
8049 (cp_push_exception_identifier): New macro.
8050 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
8051 (DECL_BASE_DESTRUCTOR_P): Likewise.
8052 (DECL_DELETING_DESTRUCTOR_P): Likewise.
8053 (get_vtbl_decl_for_binfo): Fix formatting.
8054 (in_charge_arg_for_name): New macro.
8055 (maybe_build_cleanup_and_delete): Remove declaration.
8056 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
8057 (in_charge_arg_for_name): New function.
8058 (build_new_method_call): Use it. Handle cloned destructors.
8059 (build_clone): Don't make the base constructor virtual.
8060 Automatically defer generated functions.
8061 (clone_function_decl): Handle destructors, too.
8062 (clone_constructors_and_destructors): Likewise.
8063 (create_vtable_ptr): Don't create a vtable entry for a cloned
8064 function.
8065 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
8066 (initialize_predefined_identifiers): Update appropriately.
8067 (finish_destructor_body): Simplify.
8068 (maybe_build_cleanup_and_delete): Remove.
8069 * except.c (expand_throw): Handle new-ABI destructors.
8070 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
8071 (build_dtor_call): New function.
8072 (build_delete): Use it. Simplify.
8073 * optimize.c (maybe_clone_body): Handle destructors.
8074 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
8075
8076 * exception.cc (cleanup_fn): New typedef.
8077 (CALL_CLEANUP): New macro.
8078 (cp_eh_info): Use them.
8079 (__cp_push_exception): Likewise.
8080 (__cp_pop_exception): Likewise.
8081
8082 2000-04-11 Mark Mitchell <mark@codesourcery.com>
8083
8084 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
8085 (complete_dtor_identifier): New macro.
8086 (CLASSTYPE_FIRST_CONVERSION): Remove.
8087 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
8088 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
8089 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
8090 (CLASSTYPE_CONSTRUCTORS): Likewise.
8091 (CLASSTYPE_DESTRUCTORS): Likewise.
8092 (lang_decl): Add cloned_function.
8093 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
8094 (DECL_BASE_CONSTRUCTOR_P): Likewise.
8095 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
8096 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
8097 (DECL_CLONED_FUNCTION_P): Likewise.
8098 (DECL_CLONED_FUNCTION): Likewise.
8099 (clone_function_decl): Declare.
8100 (maybe_clone_body): Likewise.
8101 * call.c (build_user_type_conversion_1): Call complete object
8102 constructors in the new ABI.
8103 (build_new_method_call): Don't add in-charge parameters under the
8104 new ABI.
8105 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
8106 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
8107 CLASSTYPE_DESTRUCTOR_SLOT.
8108 (build_clone): New function.
8109 (clone_function_decl): Likewise.
8110 (clone_constructors_and_destructors): Likewise.
8111 (check_bases_and_members): Use it.
8112 * decl.c (iniitialize_predefined_identifiers): Initialize
8113 complete_dtor_identifier.
8114 (finish_function): Don't add extra code to a clone.
8115 (lang_mark_tree): Mark cloned_function.
8116 * decl2.c (mark_used): Don't bother trying to instantiate things
8117 we synthesized.
8118 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
8119 * method.c (set_mangled_name_for_decl): Don't treat clones as
8120 constructors.
8121 (synthesize_method): Sythesize cloned functions, not the clones.
8122 * optimize.c (inline_data): Update comment on ret_label.
8123 (remap_block): Don't assume DECL_INITIAL exists.
8124 (copy_body_r): Allow ret_label to be NULL.
8125 (maybe_clone_body): Define.
8126 * pt.c (tsubst_decl): Handle clones.
8127 (instantiate_clone): New function.
8128 (instantiate_template): Use it.
8129 (set_mangled_name_for_template_decl): Don't treat clones as
8130 constructors.
8131 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
8132 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
8133 * semantics.c (expand_body): Clone function bodies as necessary.
8134
8135 * optimize.c (remap_decl): Avoid sharing structure for arrays
8136 whose size is only known at run-time.
8137 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
8138
8139 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
8140 to has_in_charge_parm_p.
8141 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
8142 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
8143 (DECL_COPY_CONSTRUCTOR_P): New macro.
8144 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
8145 (build_user_type_conversion_1): Likewise.
8146 (convert_like_real): Likewise.
8147 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
8148 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
8149 (copy_args_p): Likewise.
8150 (grok_ctor_properties): Likewise.
8151 (start_function): Likewise.
8152 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
8153 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
8154 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
8155 * method.c (do_build_copy_constructor): Use
8156 DECL_HAS_IN_CHARGE_PARM_P.
8157 (synthesize_method): Likewise.
8158 * pt.c (instantiate_template): Remove goto.
8159 * tree.c (build_cplus_method_type): Remove mention of obstacks in
8160 comment.
8161
8162 * cp-tre.h (finish_function): Change prototype.
8163 * decl.c (end_cleanup_fn): Adjust caller.
8164 (finish_function): Take only one parameter.
8165 * decl2.c (finish_objects): Adjust caller.
8166 (finish_static_storage_duration_function): Likewise.
8167 * method.c (emit_thunk): Likewise.
8168 * parse.y: Likewise.
8169 * parse.c: Regenerated.
8170 * pt.c (instantiate_decl): Likewise.
8171 * rtti.c (synthesize_tinfo_fn): Likewise.
8172 * semantics.c (expand_body): Likewise.
8173
8174 * cp-tree.h (copy_decl): New function.
8175 * class.c (finish_struct_1): Use it.
8176 * lex.c (copy_decl): Define it.
8177 * pt.c (tsubst_decl): Likewise.
8178 * tree.c (copy_template_template_parm): Likewise.
8179
8180 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
8181 has_nonpublic_assign_ref.
8182 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
8183 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
8184 * class.c (finish_struct_methods): Don't set
8185 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
8186 (interface_only): Don't declare.
8187 (interface_unknown): Likewise.
8188
8189 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8190
8191 * tree.h (HAVE_TEMPLATES): Remove definition.
8192 * lang-options.h (-fthis-is-variable): Remove documentation.
8193
8194 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
8195
8196 * class.c (instantiate_type): Handle object-relative template-id.
8197
8198 * semantics.c (finish_expr_stmt): Call convert_to_void here.
8199 * decl.c (cplus_expand_expr_stmt): Not here.
8200
8201 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
8202 Initialize exprtype earlier.
8203
8204 * parse.y (fn.def1): Check for defining types in return types.
8205
8206 * decl.c (check_tag_decl): Notice extra fundamental types.
8207 Diagnose empty decls in classes, too.
8208
8209 * decl.c (grokdeclarator): Don't override an anonymous name if no
8210 declarator was given.
8211
8212 * cvt.c (convert_to_void): Call resolve_offset_ref.
8213
8214 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
8215
8216 * decl2.c (decl_namespace): Handle getting a type.
8217
8218 * typeck.c (build_c_cast): Re-enable warning for cast between
8219 pointer and integer of different size.
8220
8221 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
8222
8223 * inc/cxxabi.h (__pointer_type_info): Add restrict and
8224 incomplete flags.
8225 (__pointer_type_info::__pointer_catch): New virtual function.
8226 (__pointer_to_member_type_info): Derive from
8227 __pointer_type_info. Adjust.
8228 (__pointer_to_member_type_info::__do_catch): Remove.
8229 (__pointer_to_member_type_info::__is_pointer_p): Declare.
8230 (__pointer_to_member_type_info::__pointer_catch): Declare.
8231 * rtti.c (qualifier_flags): Add restrict flag.
8232 (ptmd_initializer): Reorder members.
8233 (create_tinfo_types): Expand comments. Reorder
8234 ptmd_desc_type_node members.
8235 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
8236 Implement.
8237 (__pointer_type_info::__do_catch): Move specific code into
8238 __pointer_catch. Call it.
8239 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
8240 specific catch checking. Fix void conversion check.
8241 (__pointer_to_member_type_info::__do_catch): Remove.
8242 (__pointer_to_member_type_info::__pointer_catch): Implement.
8243
8244 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8245
8246 * lex.c (init_parse): Remove traces of classof and headof.
8247 * decl2.c (flag_operator_names): Default to 1.
8248 (lang_decode_option): Do not set it for -ansi.
8249
8250 2000-04-09 Mark Mitchell <mark@codesourcery.com>
8251
8252 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
8253 (DECL_MAIN_VARIANT): Remove.
8254 * decl.c (duplicate_decls): Don't set it.
8255 (start_function): Likewise.
8256 (lang_mark_tree): Don't mark it.
8257 * decl2.c (defer_fn): Don't use it.
8258 * lex.c (retrofit_lang_decl): Don't set it.
8259 * pt.c (tsubst_decl): Likewise.
8260 * ptree.c (print_lang_decl): Don't print it.
8261 * typeck.c (mark_addressable): Don't use it.
8262
8263 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
8264
8265 * vec.cc: Include <new> and <exception>.
8266 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
8267 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
8268 terminate.
8269 (__cxa_vec_delete): Catch dtor exceptions.
8270
8271 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
8272
8273 Prepend __ to implementation defined names.
8274 * inc/typeinfo (type_info): Rename _name to __name.
8275 (type_info::type_info): Rename parameter.
8276 (type_info::operator==, type_info::operator!=,
8277 type_info::before): Likewise.
8278 (type_info::is_pointer_p, type_info::is_function_p,
8279 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
8280 parameters.
8281 * inc/cxxabi.h
8282 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
8283 (__pointer_type_info::__pointer_type_info): Likewise.
8284 (__pointer_type_info::is_pointer_p,
8285 __pointer_type_info::do_catch): Prepend __. Rename parameters.
8286 (__array_type_info::__array_type_info): Rename parameters.
8287 (__function_type_info::__function_type_info): Likewise.
8288 (__function_type_info::is_function_p): Prepend __.
8289 (__enum_type_info::__enum_type_info): Rename parameters.
8290 (__pointer_to_member_type_info::__pointer_to_member_type_info):
8291 Likewise.
8292 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
8293 parameters.
8294 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
8295 (__class_type_info::__class_type_info): Rename parameters.
8296 (__class_type_info::sub_kind): Prepend __. Adjust member names.
8297 (__class_type_info::upcast_result,
8298 __class_type_info::dyncast_result): Prepend __. Move definition
8299 into tinfo.cc.
8300 (__class_type_info::do_upcast, __class_type_info::do_catch,
8301 __class_type_info::find_public_src,
8302 __class_type_info::do_dyncast,
8303 __class_type_info::do_find_public_src): Prepend __. Rename
8304 parameters.
8305 (__si_class_type_info::__si_class_type_info): Rename parameters.
8306 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
8307 __si_class_type_info::do_find_public_src): Prepent __. Rename
8308 parameters.
8309 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
8310 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
8311 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
8312 parameters.
8313 (__dynamic_cast): Rename parameters.
8314 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
8315 type_info::do_catch, type_info::do_upcast): Prepend __.
8316 (contained_p, public_p, virtual_p, contained_public_p,
8317 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
8318 (__class_type_info::do_catch,
8319 __class_type_info::do_upcast): Prepend __. Adjust.
8320 (__class_type_info::__upcast_result,
8321 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
8322 Adjust.
8323 (__class_type_info::find_public_src): Prepend __. Adjust.
8324 (__class_type_info::do_find_public_src,
8325 __si_class_type_info::do_find_public_src,
8326 __vmi_class_type_info::do_find_public_src): Likewise.
8327 (__class_type_info::do_dyncast,
8328 __si_class_type_info::do_dyncast,
8329 __vmi_class_type_info::do_dyncast): Likewise.
8330 (__class_type_info::do_upcast,
8331 __si_class_type_info::do_upcast,
8332 __vmi_class_type_info::do_upcast): Likewise.
8333 (__dynamic_cast): Adjust.
8334 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
8335 (__function_type_info::is_function_p): Likewise.
8336 (__pointer_type_info::do_catch): Likewise. Adjust.
8337 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
8338 (__throw_type_match_rtti_2): Adjust.
8339 (__is_pointer): Adjust.
8340
8341 2000-04-08 Mark Mitchell <mark@codesourcery.com>
8342
8343 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
8344 (complete_ctor_identifier): New macro.
8345 (special_function_kind): Add sfk_copy_constructor and
8346 sfk_assignment_operator.
8347 (LOOKUP_HAS_IN_CHARGE): Remove.
8348 (cons_up_default_function): Rename to ...
8349 (implicitly_declare_fn): ... this.
8350 * call.c (build_new_method_call): Add in-charge parameters for
8351 constructors here.
8352 * class.c (add_implicitly_declared_members): Change parameter name
8353 from cant_have_assignment to cant_have_const_assignment.
8354 Replace calls to cons_up_default_function to implicitly_declare_fn.
8355 * cvt.c (ocp_convert): Use complete_ctor_identifier.
8356 * decl.c (initialize_predefined_identifiers): Initialize it.
8357 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
8358 complex expression.
8359 * init.c (expand_default_init): Don't calculate the in-charge
8360 parameter here.
8361 (build_new_1): Likewise.
8362 * lex.c (cons_up_default_function): Move to method.c.
8363 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
8364 (implicitly_declare_fn): New function.
8365 * typeck.c (build_static_cast): Use complete_ctor_identifier.
8366 (build_modify_expr): Likewise.
8367 * typeck2.c (build_functional_cast): Likewise.
8368
8369 Under the new ABI, constructors don't return `this'.
8370 * cp-tree.h (warn_reorder): Declare.
8371 (special_function_kind): New enum.
8372 (global_base_init_list): Remove declaration.
8373 (emit_base_init): Don't return a value.
8374 (check_base_init): Don't declare.
8375 (is_aggr_typedef): Likewise.
8376 * decl.c (check_special_function_return_type): New function.
8377 (return_types): Remove.
8378 (grokdeclarator): Use check_special_function_return_type.
8379 (start_function): Don't initialize ctor_label under the new ABI.
8380 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
8381 * init.c (begin_init_stmts): Move to top of file.
8382 (finish_init_stmts): Likewise.
8383 (warn_reorder): Don't declare.
8384 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
8385 value.
8386 (check_base_init): Remove.
8387 (is_aggr_typedef): Likewise.
8388 (build_new_1): Don't use the return value of a constructor.
8389 * semantics.c (setup_vtbl_ptr): Don't use the return value
8390 of emit_base_init.
8391 * typeck.c (check_return_expr): Don't magically convert return
8392 statements into `return this' in constructors under the new ABI.
8393
8394 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
8395 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
8396 (base_ctor_identifier): New macro.
8397 (base_dtor_identifier): Likewise.
8398 (deleting_dtor_identifier): Likewise.
8399 * decl.c: Don't include obstack.h.
8400 (obstack_chunk_alloc): Don't define.
8401 (obstack_chunk_free): Likewise.
8402 (struct predefined_identifier): New type.
8403 (initialize_predefined_identifiers): New function.
8404 (init_decl_processing): Use it.
8405 (debug_temp_inits): Remove.
8406 (start_method): Don't call preserve_data.
8407 (hack_incomplete_structures): Update comment.
8408 * init.c (init_init_processing): Don't initialize
8409 nelts_identifier.
8410 (build_offset_rf): Remove dead code.
8411 (build_delete): Use CLASSTYPE_N_BASECLASSES.
8412 * search.c (init_search_processing): Don't initialize
8413 vptr_identifier.
8414
8415 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8416
8417 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
8418 some sign_compare warnings.
8419
8420 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
8421
8422 Rename abi::__vmi_class_type_info members.
8423 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
8424 base_list, detail_masks members to vmi_flags, vmi_base_count,
8425 vmi_bases and vmi_flags_masks respectively.
8426 (__vmi_class_type_info::vmi_flags_masks): Rename
8427 details_unknown_mask to flags_unknown_mask.
8428 * tinfo.cc (__class_type_info::do_upcast): Adjust.
8429 (__vmi_class_type_info::do_find_public_src): Adjust.
8430 (__vmi_class_type_info::do_dyncast): Adjust.
8431 (__vmi_class_type_info::do_upcast): Adjust.
8432
8433 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
8434
8435 * tinfo.cc (convert_to_base): New function.
8436 (get_vbase_offset): Remove. Move into convert_to_base.
8437 (__vmi_class_type_info::do_find_public_src): Adjust.
8438 (__vmi_class_type_info::do_dyncast): Adjust.
8439 (__vmi_class_type_info::do_upcast): Adjust.
8440
8441 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
8442
8443 * tinfo.cc (operator=): Use __builtin_strcmp.
8444 * tinfo2.cc (before): Likewise.
8445
8446 2000-04-06 Mark Mitchell <mark@codesourcery.com>
8447
8448 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
8449 (DECL_SAVED_INLINE): Rename to ...
8450 (DECL_DEFERRED_FN): ... this.
8451 (in_function_p): Remove declaration.
8452 (mark_inline_for_output): Rename to ...
8453 (defer_fn): ... this.
8454 * decl.c (finish_function): Adjust call to mark_inline_for_output.
8455 (in_function_p): Remove definition.
8456 * decl2.c (saved_inlines): Rename to ...
8457 (deferred_fns): ... this.
8458 (saved_inlines_used): Rename to ...
8459 (deferred_fns_used): ... this.
8460 (mark_inline_for_output): Rename to ...
8461 (defer_fn): ... this.
8462 (finish_file): Adjust accordingly.
8463 (init_decl2): Likewise.
8464 * lex.c (cons_up_default_function): Likewise.
8465 * pt.c (mark_decl_instantiated): Likewise.
8466 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
8467 circumstances.
8468 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
8469 * semantics.c (expand_body): Defer more functions.
8470
8471 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
8472
8473 * vec.cc: New file.
8474 * Make-lang.in (CXX_LIB2FUNCS): Add it.
8475 (vec.o): Build it.
8476 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8477 __cxa_vec_delete): Declare.
8478
8479 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
8480
8481 * rtti.c (dfs_class_hint_mark): New static function.
8482 (dfs_class_hint_unmark): New static function.
8483 (class_hint_flags): Use them.
8484
8485 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
8486
8487 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
8488
8489 2000-04-05 Mark Mitchell <mark@codesourcery.com>
8490
8491 * cp-tree.h (instantiate_decl): Change prototype.
8492 * decl2.c (mark_used): Adjust call.
8493 * optimize.c (inlinable_function_p): Adjust handling of templates.
8494 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
8495 (do_type_instantiation): Likewise.
8496 (instantiate_decl): Defer more templates.
8497 (instantiate_pending_templates): Adjust logic to handle inline
8498 friend functions.
8499
8500 * Makefile.in (GGC_H): New variable. Use it throughout in place
8501 of ggc.h.
8502
8503 * call.c: Don't include obstack.h. Include ggc.h.
8504 (obstack_chunk_alloc): Don't define.
8505 (obstack_chunk_free): Likewise.
8506 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
8507 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
8508 (pop_switch): Free it.
8509
8510 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
8511
8512 * dump.c (dequeue_and_dump): Don't try to print the bit_position
8513 if we don't have a DECL_FIELD_OFFSET.
8514
8515 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
8516
8517 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
8518 special_function_p.
8519
8520 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8521
8522 * cfns.gperf (hash, libc_name_p): Prototype.
8523
8524 * rtti.c (build_dynamic_cast_1): Constification.
8525
8526 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
8527
8528 * semantics.c (deferred_type_access_control): Prototype.
8529
8530 2000-04-04 Mark Mitchell <mark@codesourcery.com>
8531
8532 Correct many new ABI issues regarding vbase and vcall offset
8533 layout.
8534 * cp-tree.h (BINFO_VTABLE): Document.
8535 (struct lang_type): Tweak formatting.
8536 (BINFO_PRIMARY_BINFO): Add to documentation.
8537 (CLASSTYPE_VSIZE): Fix typo in comment.
8538 (CLASSTYPE_VBASECLASSES): Update documentation.
8539 (BINFO_VBASE_MARKED): Remove.
8540 (SET_BINFO_VBASE_MARKED): Likewise.
8541 (CLEAR_BINFO_VBASE_MARKED): Likewise.
8542 (BINFO_FIELDS_MARKED): Remove.
8543 (SET_BINFO_FIELDS_MARKED): Likewise.
8544 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
8545 (enum access_kind): New enumeration.
8546 (num_extra_vtbl_entries): Remove declaration.
8547 (size_extra_vtbl_entries): Likewise.
8548 (get_vtbl_decl_for_binfo): New function.
8549 (dfs_vbase_unmark): Remove declaration.
8550 (mark_primary_bases): Likewise.
8551 * class.c (SAME_FN): Remove.
8552 (struct vcall_offset_data_s): Move definition.
8553 (build_vbase_pointer): Use `build', not `build_binary_op', to
8554 access the vbase pointer under the new ABI.
8555 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
8556 (build_primary_vtable): Likewise.
8557 (dfs_mark_primary_bases): Move here from search.c.
8558 (mark_primary_bases): Likewise.
8559 (determine_primary_bases): Under the new ABI, don't make a base
8560 class a primary base just because we don't yet have any virtual
8561 functions.
8562 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
8563 (num_vfun_entries): Remove.
8564 (dfs_count_virtuals): Likewise.
8565 (num_extra_vtbl_entries): Likewise.
8566 (size_extra_vtbl_entries): Likewise.
8567 (layout_virtual_bases): Iterate in inheritance graph order under
8568 the new ABI.
8569 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
8570 indicate that a vfield is present.
8571 (init_class_processing): Initialize access_public_node, etc., from
8572 ak_public, etc.
8573 (get_vtbl_decl_for_binfo): New function.
8574 (dump_class_hierarchy_r): Likewise.
8575 (dump_class_hierarchy): Use it.
8576 (finish_vtbls): Build the vtbls in inheritance graph order.
8577 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8578 (initialize_vtable): Use get_vtbl_decl_for_binfo.
8579 (accumulate_vtbl_inits): Add comments explaining why a pre-order
8580 walk is required.
8581 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
8582 where the vptr points, even for primary vtables.
8583 (build_vtbl_initializer): Adjust handling of vbase and vcall
8584 offsets.
8585 (build_vcall_and_vbase_vtable_entries): New function.
8586 (dfs_build_vbase_offset_vtbl_entries): Remove.
8587 (build_vbase_offset_vtbl_entries): Reimplement.
8588 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
8589 were already handled in a primary base class vtable.
8590 (build_vcall_offset_vtbl_entries): Adjust.
8591 (build_rtti_vtbl_entries): Adjust.
8592 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
8593 * init.c (expand_virtual_init): Simplify.
8594 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
8595 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
8596 * search.c (BINFO_ACCESS): New macro.
8597 (SET_BINFO_ACCESS): Likewise.
8598 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
8599 (access_in_type): Likewise.
8600 (dfs_accessible_p): Likewise.
8601 (protected_accessible_p): Likewise.
8602 (lookup_fnfields_1): Adjust documentation.
8603 (dfs_mark_primary_bases): Move to class.c
8604 (mark_primary_bases): Likewise.
8605 (dfs_vbase_unmark): Remove.
8606 (virtual_context): Use BINFO_FOR_VBASE.
8607 (dfs_get_vbase_types): Simplify.
8608 (dfs_build_inheritance_graph_order): New function.
8609 (get_vbase_types): Use it.
8610 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
8611
8612 * tinfo.cc (get_vbase_offset): New function.
8613 (__vmi_class_type_info::do_find_public_src): Use it.
8614 (__vmi_class_type_info::do_dyncast): Likewise.
8615 (__vmi_class_type_info::do_upcast): Likewise.
8616
8617 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
8618
8619 * lang-specs.h: Pass -fno-show-column to the preprocessor.
8620
8621 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
8622
8623 * rtti.c (class_hint_flags): Rename flags.
8624 (class_initializer): Remove flags.
8625 (synthesize_tinfo_var): Combine offset and flags. Add flags
8626 for __vmi_class_type_info.
8627 (create_tinfo_types): Remove flags from __class_type_info and
8628 __si_class_type_info. Merge flags and offset from
8629 base_class_type_info.
8630 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
8631 (__base_class_info::is_virtual_p): Adjust.
8632 (__base_class_info::is_public_p): Adjust.
8633 (__base_class_info::offset): New accessor.
8634 (__class_type_info::details): Remove member.
8635 (__class_type_info::__class_type_info): Lose details.
8636 (__class_type_info::detail_masks): Remove.
8637 (__si_class_type_info::__si_class_type_info): Lose details.
8638 (__vmi_class_type_info::details): New member.
8639 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
8640 (__vmi_class_type_info::detail_masks): New member.
8641 * tinfo.cc (__class_type_info::do_upcast): Initialize result
8642 with unknown_details_mask.
8643 (__vmi_class_type_info::do_find_public_src): Adjust
8644 (__vmi_class_type_info::do_dyncast): Adjust.
8645 (__vmi_class_type_info::do_upcast): Set result details, if
8646 needed. Adjust.
8647 (__dynamic_cast): Temporarily #if out optimization.
8648
8649 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
8650
8651 * rtti.c (get_tinfo_decl): Mark used.
8652 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
8653 mark as dealt with, if we output it.
8654
8655 2000-03-28 Mark Mitchell <mark@codesourcery.com>
8656
8657 * class.c: Reorganize to put virtual function table initialization
8658 machinery at the end of the file.
8659
8660 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
8661
8662 * class.c (finish_struct): Use bitsize_zero_node.
8663 * pt.c (instantiate_class_template): Likewise.
8664
8665 2000-03-28 Mark Mitchell <mark@codesourcery.com>
8666
8667 Put RTTI entries at negative offsets in new ABI.
8668 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
8669 vbase offset at index -3, not -1.
8670 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
8671 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
8672 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
8673 (build_rtti_vtbl_entries): New function.
8674 (set_rtti_entry): Remove.
8675 (build_primary_vtable): Don't use it.
8676 (build_secondary_vtable): Likewise.
8677 (start_vtable): Remove.
8678 (first_vfun_index): New function.
8679 (set_vindex): Likewise.
8680 (add_virtual_function): Don't call start_vtable. Do call
8681 set_vindex.
8682 (set_primary_base): Rename parameter.
8683 (determine_primary_base): Likewise.
8684 (num_vfun_entries): Don't use skip_rtti_stuff.
8685 (num_extra_vtbl_entries): Include RTTI information.
8686 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
8687 (skip_rtti_stuff): Remove.
8688 (dfs_modify_vtables): Don't use it.
8689 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
8690 (layout_nonempty_base_or_field): Update size handling.
8691 (create_vtable_ptr): Tweak.
8692 (layout_class_type): Adjust parameter names.
8693 (finish_struct_1): Simplify.
8694 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
8695 (skip_rtti_stuff): Remove.
8696 (first_vfun_index): New function.
8697 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8698 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
8699 (marked_vtable_pathp): Declare.
8700 (unmarked_vtable_pathp): Likewise.
8701 * error.c (dump_expr): Use first_vfun_index to calculate vtable
8702 offsets.
8703 * rtti.c (build_headof): Look for RTTI at negative offsets.
8704 (get_tinfo_decl_dynamic): Likewise.
8705 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
8706 here.
8707 (create_pseudo_type_info): Do it here instead. Adjust so that
8708 vptr points at first virtual function.
8709 * search.c (marked_vtable_pathp): Make it global.
8710 (unmarked_vtable_pathp): Likewise.
8711 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8712 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8713 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
8714 (get_pure_virtuals): Likewise.
8715 (expand_upcast_fixups): Likewise.
8716 * tree.c (debug_binfo): Likewise.
8717 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
8718 negative offset.
8719
8720 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8721
8722 * class.c (check_field_decl): Fix typo.
8723 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
8724 (check_methods): Likewise.
8725 (check_field_decls): Likewise.
8726 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
8727 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
8728 Use DECL_RESULT_FLD, not DECL_RESULT.
8729 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
8730 * lex.c (identifier_type): Likewise.
8731 * pt.c (determine_specialization, lookup_template_class): Likewise.
8732 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
8733 (resolve_overloaded_unification, more_specialized): Likewise.
8734 * semantics.c (finish_member_declaration): Likewise.
8735 * typeck.c (build_x_function_call): Likewise.
8736
8737 2000-03-26 Mark Mitchell <mark@codesourcery.com>
8738
8739 * class.c (layout_empty_base): Handle empty bases with non-byte
8740 alignment.
8741 (build_base_field): Likewise.
8742 (layout_virtual_bases): Likewise.
8743
8744 * class.c (finish_struct_1): Fix typo in this change:
8745
8746 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8747
8748 2000-03-25 Mark Mitchell <mark@codesourcery.com>
8749
8750 * decl.c (grokdeclarator): Count partial specializations when
8751 keeping track of how many template classes have been seen.
8752
8753 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
8754
8755 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8756
8757 * class.c (build_vbase_pointer_fields): layout_field now place_field.
8758 (get_vfield_offset): Use byte_position.
8759 (set_rtti_entry): Set OFFSET to ssizetype zero.
8760 (get_binfo_offset_as_int): Deleted.
8761 (dfs_record_base_offsets): Use tree_low_cst.
8762 (dfs_search_base_offsets): Likewise.
8763 (layout_nonempty_base_or_field): Reflect changes in RLI format
8764 and call byte_position.
8765 (layout_empty_base): Convert offset to ssizetype.
8766 (build_base_field): use rli_size_unit_so_far.
8767 (dfs_propagate_binfo_offsets): Do computation in proper type.
8768 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
8769 (layout_class_type): Reflect changes in RLI names and fields.
8770 (finish_struct_1): Set DECL_FIELD_OFFSET.
8771 * dump.c (dequeue_and_dump): Call bit_position.
8772 * expr.c (cplus_expand_constant): Use byte_position.
8773 * rtti.c (expand_class_desc): Use bitsize_one_node.
8774 * typeck.c (build_component_addr): Use byte_position and don't
8775 special case for zero offset.
8776
8777 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
8778
8779 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
8780
8781 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
8782 tinfo object.
8783 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
8784 vtable.
8785
8786 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8787
8788 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
8789 DECL_P macros.
8790 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
8791 make_typename_type, check_initializer, cp_finish_decl,
8792 xref_tag): Likewise.
8793 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
8794 decl_namespace, arg_assoc_template_arg, arg_assoc,
8795 validate_nonmember_using_decl, do_class_using_decl): Likewise.
8796 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
8797 args_to_string): Likewise.
8798 * friend.c (is_friend): Likewise.
8799 * lex.c (note_got_semicolon, note_list_got_semicolon,
8800 is_global): Likewise.
8801 * method.c (build_overload_nested_name, build_overload_value,
8802 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
8803 * parse.y (typename_sub, typename_sub1): Likewise.
8804 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
8805 process_partial_specialization, convert_template_argument,
8806 template_args_equal, add_pending_template, lookup_template_class,
8807 for_each_template_parm_r, maybe_fold_nontype_arg,
8808 tsubst, instantiate_template, type_unification_real, unify,
8809 instantiate_pending_templates, set_mangled_name_for_template_decl):
8810 Likewise.
8811 * repo.c (repo_get_id, repo_template_used): Likewise.
8812 * search.c (lookup_field_1): Likewise.
8813 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
8814 * xref.c (classname): Likewise.
8815
8816 2000-03-22 Mark Mitchell <mark@codesourcery.com>
8817
8818 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
8819 (CANONICAL_BINFO): New macro.
8820 (BINFO_NEW_VTABLE_MARKED): Use it.
8821 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
8822 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
8823 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
8824 not TREE_TYPE.
8825 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8826 (build_secondary_vtable): Likewise.
8827 (dfs_finish_vtbls): Likewise.
8828 (dfs_accumulate_vtbl_inits): Likewise.
8829 (accumulate_vtbl_inits): New function.
8830 (finish_vtbls): Make sure that virtual bases come after
8831 non-virtual bases in the vtable group.
8832 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
8833 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8834 * search.c (struct vbase_info): Move definition.
8835 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8836 (unmarked_new_vtable_p): Likewise.
8837 (dfs_mark_vtable_path): Remove.
8838 (dfs_mark_new_vtable): Remove.
8839 (dfs_unmark_new_vtable): Likewise.
8840 (dfs_clear_search_slot): Likewise.
8841 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8842 (dfs_clear_vbase_slots): Likewise.
8843 (init_vbase_pointers): LIkewise.
8844
8845 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
8846
8847 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
8848 SIZETYPE to a non-SIZETYPE.
8849
8850 2000-03-21 Mark Mitchell <mark@codesourcery.com>
8851
8852 * class.c (layout_virtual_bases): Adjust names in conditionally
8853 compiled code.
8854
8855 * class.c (record_base_offsets): New function.
8856 (layout_conflict_p): Likewise.
8857 (layout_nonempty_base_or_field): Use it.
8858 (layout_empty_base): New function.
8859 (build_base_field): Use it.
8860 (build_base_fields): Update comment.
8861 (layout_virtual_bases): Fold in a little code form
8862 layout_basetypes. Use layout_empty_base.
8863 (layout_basetypes): Remove.
8864 (end_of_class): New function.
8865 (layout_class_type): Use it. Adjust.
8866
8867 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
8868 (fntype_p): Remove.
8869 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
8870 comment.
8871 (dfs_skip_nonprimary_vbases_markedp): Likewise.
8872 * typeck.c (fntype_p): Remove.
8873
8874 * cp-tree.h (TI_SPEC_INFO): Remove.
8875 (CLASSTYPE_TI_SPEC_INFO): Likewise.
8876 * pt.c (process_partial_specialization): Likewise.
8877
8878 * class.c (build_base_field): Fix thinko in computation of binfo
8879 offsets.
8880
8881 * tree.c (mark_local_for_remap_p): Mark variables declared in
8882 TARGET_EXPRs as well.
8883
8884 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8885
8886 * typeck.c (require_complete_type, complete_type,
8887 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
8888 build_array_ref, convert_arguments, pointer_diff,
8889 build_x_unary_op, build_unary_op, build_c_cast,
8890 build_modify_expr): Use COMPLETE_TYPE_P etc.
8891 * call.c (is_complete, convert_like_real,
8892 build_new_method_call): Likewise.
8893 * class.c (build_vbase_pointer_fields, check_bases,
8894 build_base_field, finish_struct_1, pushclass): Likewise.
8895 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
8896 * decl.c (maybe_process_template_type_declaration, pushtag,
8897 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
8898 layout_var_decl, check_initializer, cp_finish_decl,
8899 grokdeclarator, require_complete_types_for_parms,
8900 grok_op_properties, xref_tag, xref_basetypes,
8901 check_function_type): Likewise.
8902 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
8903 * friend.c (do_friend): Likewise.
8904 * init.c (build_offset_ref): Likewise.
8905 * parse.y (structsp): Likewise.
8906 * pt.c (maybe_process_partial_specialization,
8907 tsubst_friend_function, instantiate_class_template, tsubst,
8908 do_type_instantiation, instantiate_pending_templates): Likewise.
8909 * repo.c (repo_get_id): Likewise.
8910 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
8911 synthesize_tinfo_var, emit_support_tinfos): Likewise.
8912 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
8913 * semantics.c (begin_class_definition): Likewise.
8914 * tree.c (build_cplus_method_type): Likewise.
8915 * typeck2.c (digest_init, build_functional_cast,
8916 add_exception_specifier): Likewise.
8917 * parse.h, parse.c: Regenerated.
8918
8919 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8920
8921 * inc/cxxabi.h: New header file. Define new-abi entry points.
8922 (__pointer_type_info::target): Rename member to ...
8923 (__pointer_type_info::type): ... here.
8924 (__base_class_info::type): Rename member to ...
8925 (__base_class_info::base): ... here.
8926 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8927 * cp-tree.h (CPTI_ABI): New global tree enumeration.
8928 (abi_node): New global tree node.
8929 * decl.c (abi_node): Document.
8930 (init_decl_processing): Initialize abi_node.
8931 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8932 (get_vmi_pseudo_type_info): Likewise.
8933 (create_tinfo_types): Likewise.
8934 (emit_support_tinfos): Likewise.
8935 * tinfo.h (cxxabi.h): Include for new-abi.
8936 Move rtti class definitions to new header file.
8937 * tinfo.cc (abi): Use the namespace.
8938 (std): Move new abi rtti classes from here ...
8939 (__cxxabiv1): ... to here.
8940 * tinfo2.cc (cxxabi.h): Include for new-abi.
8941 Move rtti class definitions to new header file.
8942 (std): Move new abi rtti classes from here ...
8943 (__cxxabiv1): ... to here.
8944 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8945 namespace.
8946
8947 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8948 Jason Merrill <jason@casey.cygnus.com>
8949
8950 * method.c (build_overload_int): Use host_integerp.
8951
8952 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8953
8954 * init.c (build_offset_ref): Handle the case of a templated member
8955 function.
8956
8957 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8958
8959 * except.c (expand_exception_blocks): Clear catch_clauses_last.
8960
8961 2000-03-18 Mark Mitchell <mark@codesourcery.com>
8962
8963 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8964 * class.c (check_bitfield_decl): Turn illegal bitfields into
8965 non-bitfields.
8966 (dfs_propagate_binfo_offsets): Adjust for new size_binop
8967 semantics.
8968 (dfs_offset_for_unshared_vbases): Likewise.
8969 * cvt.c (cp_convert_to_pointer): Convert NULL to a
8970 pointer-to-member correctly under the new ABI.
8971 * expr.c (cplus_expand_constant): Don't use cp_convert when
8972 turning an offset into a pointer-to-member.
8973 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8974 when dereferencing them under the new ABI.
8975 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8976 of pointers-to-members under the new ABI.
8977
8978 * class.c (check_bitfield_decl): Remove restriction on really long
8979 bitfields.
8980 (layout_class_type): Implement new ABI handling of bitfields
8981 longer than their types.
8982
8983 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8984
8985 * parse.y (extdefs): Call ggc_collect.
8986 * parse.c: Regenerated.
8987
8988 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
8989
8990 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8991 (note_name_declared_in_class): Use OVL_CURRENT to get at a
8992 potential overload.
8993
8994 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8995
8996 * class.c (build_vbase_path): Use integer_zerop.
8997 (build_vtable_entry): Use tree_low_cst.
8998 (get_vfield_offset): Use bit_position.
8999 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
9000 Use tree_low_cst.
9001 (check_bitfield_decl): Set DECL_SIZE using convert.
9002 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
9003 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
9004 Use tree_low_cst.
9005 (finish_struct_1): Use bit_position.
9006 (dump_class_hierarchy): Use tree_low_cst.
9007 * cp-tree.h (min_precision): Add declaration.
9008 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
9009 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
9010 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
9011 * expr.c (cplus_expand_constant): Use bit_position.
9012 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
9013 * rtti.c (get_base_offset): Use bit_position.
9014 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
9015 host_integerp, and tree_low_cst.
9016 (pointer_int_sum): Use integer_zerop.
9017 (build_component_addr): Use bit_position.
9018
9019 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
9020
9021 * typeck.c (require_complete_type): Don't assume size_zero_node.
9022 (complete_type_or_else): Likewise.
9023
9024 2000-03-16 Steven Grady <grady@digitaldeck.com>
9025 Jason Merrill <jason@casey.cygnus.com>
9026
9027 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
9028
9029 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
9030
9031 * decl2.c (grokfield): Bail out if type is error_mark_node.
9032
9033 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9034
9035 * tinfo2.cc (__ptr_to_member_data): Rename to ...
9036 (__pointer_to_member_data): ... here. Adjust.
9037 * rtti.c (create_tinfo_types): Adjust.
9038
9039 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9040
9041 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
9042 * decl.c (ref_desc_type_node): Undocument.
9043 * rtti.c (ptr_ref_initializer): Rename to ...
9044 (ptr_initializer): ... here. Adjust comments.
9045 (ptmd_initializer): Fix comment thinko.
9046 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
9047 (create_tinfo_types): Remove ref_desc_type_node init.
9048 * tinfo2.cc (__reference_type_info): Remove.
9049
9050 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9051
9052 * decl.c (cp_finish_decl): Remove obsolete comment.
9053
9054 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
9055
9056 2000-03-14 Mark Mitchell <mark@codesourcery.com>
9057
9058 * cp-tree.h: Tweak documentation.
9059 * class.c (build_vbase_pointer_fields): Layout the fields, too.
9060 (avoid_overlap): Remove.
9061 (get_binfo_offset_as_int): New function.
9062 (dfs_serach_base_offsets): Likewise.
9063 (layout_nonempty_base_or_field): Likewise.
9064 (build_base_field): Layout fields here. Avoid placing two objects
9065 of the same type at the same address, under the new ABI.
9066 (build_base_fields): Adjust accordingly.
9067 (create_vtable_ptr): Return the new field, but don't attach it to
9068 TYPE_FIELDS.
9069 (remove_base_field): Remove.
9070 (remove_base_fields): Remove.
9071 (layout_basetypes): Adjust accordingly.
9072 (layout_class_type): Call layout_field for each field, rather than
9073 just making a wholesale call to layout_type.
9074
9075 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
9076
9077 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
9078
9079 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
9080
9081 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
9082
9083 * except.c (dtor_nothrow): New fn.
9084 (do_pop_exception): Use it. Take type parm.
9085 (push_eh_cleanup): Take type parm.
9086 (expand_start_catch_block): Pass it.
9087 (build_eh_type_type_ref): Accept null type.
9088
9089 2000-03-12 Mark Mitchell <mark@codesourcery.com>
9090
9091 * cp-tree.h (revert_static_member_fn): Change prototype.
9092 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
9093 (grok_op_properties): Likewise.
9094 (start_function): Likewise.
9095 (revert_static_member_fn): Simplify.
9096 * pt.c (check_explicit_specialization): Adjust call to
9097 revert_static_member_fn.
9098
9099 2000-03-11 Mark Mitchell <mark@codesourcery.com>
9100
9101 * cp-tree.h (scope_kind): New type.
9102 (tmpl_spec_kind): Likewise.
9103 (declare_pseudo_global_level): Remove.
9104 (pseudo_global_level_p): Rename to template_parm_scope_p.
9105 (pushlevel): Remove declaration.
9106 (begin_scope): New function.
9107 (finish_scope): Likewise.
9108 (current_tmpl_spec_kind): Likewise.
9109 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
9110 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
9111 Add template_spec_p.
9112 (toplevel_bindings_p): Adjust.
9113 (declare_pseudo_global_level): Remove.
9114 (pseudo_global_level_p): Rename to template_parm_scope_p.
9115 (current_tmpl_spec_kind): New function.
9116 (begin_scope): Likewise.
9117 (finish_scope): Likewise.
9118 (maybe_push_to_top_level): Adjust.
9119 (maybe_process_template_type_declaration): Likewise.
9120 (pushtag): Likewise.
9121 (pushdecl_nonclass_level): Likewise.
9122 (lookup_tag): Likewise.
9123 (grokfndecl): Handle member template specializations. Share
9124 constructor and non-constructor code.
9125 * decl2.c (check_classfn): Handle member template specializations.
9126 * pt.c (begin_template_parm_list): Use begin_scope.
9127 (begin_specialization): Likewise.
9128 (end_specialization): Likewise.
9129 (check_explicit_specialization): Use current_tmpl_spec_kind.
9130 Handle member template specializations.
9131 (end_template_decl): Use finish_scope. Remove call to
9132 get_pending_sizes.
9133 (push_template_decl_real): Remove bogus error message.
9134 (tsubst_decl): Fix typo in code contained in comment.
9135 (instantiate_template): Handle member template specializations.
9136 (most_general_template): Likewise.
9137
9138 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
9139
9140 * lex.c (whitespace_cr): Compress consecutive calls to warning().
9141 (do_identifier): Ditto for error().
9142
9143 * pt.c (convert_nontype_argument): Ditto for cp_error().
9144 (convert_template_argument): Ditto for cp_pedwarn().
9145
9146 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
9147
9148 * exception.cc (__check_null_eh_spec): New fn.
9149 * except.c (expand_end_eh_spec): Call it if the spec is throw().
9150
9151 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
9152
9153 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
9154 * except.c (expand_end_eh_spec): Add the return type.
9155 * rtti.c (throw_bad_cast): Add the parmtypes.
9156 (throw_bad_typeid): Likewise.
9157
9158 * semantics.c (expand_stmt): Only leave out rtl for unused
9159 artificials, and set DECL_IGNORED_P on them as well.
9160 * decl.c (wrapup_globals_for_namespace): Likewise.
9161
9162 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
9163
9164 * decl.c (maybe_commonize_var): Skip all artificial decls.
9165 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
9166
9167 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
9168
9169 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
9170 * cp-tree.h: Declare flag_enforce_eh_specs.
9171 * decl.c (store_parm_decls, finish_function): Check it.
9172
9173 C library functions don't throw.
9174 * Makefile.in (cfns.h): New target.
9175 (except.o): Depend on it.
9176 * Make-lang.in (cc1plus): Depend on cfns.gperf.
9177 * cfns.gperf: New file.
9178 * cfns.h: Generated.
9179 * except.c: Include it.
9180 (nothrow_libfn_p): New fn.
9181 * decl.c (grokfndecl): Use it.
9182 * cp-tree.h: Declare it.
9183
9184 * decl.c (push_overloaded_decl_1, auto_function,
9185 define_function): Lose.
9186 (build_library_fn_1): New static fn.
9187 (builtin_function): Use it.
9188 (get_atexit_node): Use build_library_fn_ptr.
9189 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
9190 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
9191 push_void_library_fn, push_throw_library_fn): New fns.
9192 * cp-tree.h: Declare them.
9193 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
9194 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
9195 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
9196 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
9197 * rtti.c (build_runtime_decl): Lose.
9198 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
9199 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
9200 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
9201
9202 * call.c (build_call): Remove result_type parm.
9203 Call mark_used on unused artificial fns.
9204 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
9205
9206 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
9207
9208 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
9209 appropriate.
9210 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
9211 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
9212 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
9213 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
9214 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9215 expand_generic_desc): Likewise.
9216
9217 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9218
9219 * exception.cc (__cp_pop_exception): Cleanup the original object.
9220
9221 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9222
9223 * decl.c (grok_op_properties): Merge conversion to void warning
9224 with other silly op warnings.
9225
9226 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
9227
9228 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
9229 array CONSTRUCTOR elements. Don't use expr_tree_cons.
9230
9231 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9232
9233 * decl.c (cp_make_fname_decl): New function.
9234 (wrapup_globals_for_namespace): Don't emit unused static vars.
9235 (init_decl_processing): Remove comment about use of
9236 array_domain_type. Set make_fname_decl.
9237 (cp_finish_decl): Remove __FUNCTION__ nadgering.
9238 * semantics.c (begin_compound_stmt): Remove
9239 current_function_name_declared flagging.
9240 (expand_stmt): Don't emit unused local statics.
9241 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
9242 specially.
9243
9244 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9245
9246 * typeck.c (convert_for_assignment): Don't look at array
9247 initializer.
9248 * call.c (convert_like_real): Likewise.
9249
9250 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
9251
9252 Add initial support for '\uNNNN' specifier.
9253 * lex.c (read_ucs): New fn.
9254 (readescape, skip_white_space): Call it.
9255 (is_extended_char, is_extended_char_1): New fns.
9256 (utf8_extend_token): New fn, #if 0'd out.
9257 (real_yylex): Treat extended chars like letters.
9258
9259 * search.c (note_debug_info_needed): Walk the bases even if we
9260 weren't deferring the type itself.
9261
9262 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9263
9264 * decl2.c (finish_objects): Constify a char*.
9265
9266 * method.c (emit_thunk): Likewise.
9267
9268 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
9269
9270 * typeck.c (dubious_conversion_warnings): Look through
9271 REFERENCE_TYPE.
9272
9273 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9274
9275 * class.c (dfs_modify_vtables): I is now unsigned.
9276 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
9277 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
9278 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
9279 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
9280 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
9281 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
9282 Call integer_all_onesp.
9283 * typeck2.c (process_init_constructor): Use compare_tree_int.
9284
9285 * lang-specs.h (as): Don't call if -syntax-only.
9286
9287 2000-03-06 Mark Mitchell <mark@codesourcery.com>
9288
9289 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
9290 RTL_EXPR_HAS_NO_SCOPE after all.
9291
9292 2000-03-05 Mark Mitchell <mark@codesourcery.com>
9293
9294 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
9295 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
9296 RTL_EXPR_HAS_NO_SCOPE.
9297
9298 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
9299 later.
9300
9301 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
9302
9303 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
9304
9305 * call.c (convert_like): Macrofy.
9306 (convert_like_with_context): New macro.
9307 (convert_like_real): Renamed from convert_like. Add calling
9308 context parameters, for diagnostics. Add recursive flag. Call
9309 dubious_conversion_warnings for outer conversion.
9310 (build_user_type_conversion): Use convert_like_with_context.
9311 (build_over_call): Likewise. Don't warn about dubious
9312 conversions here. Adjust convert_default_arg calls.
9313 (convert_default_arg): Add context parameters for diagnostics.
9314 Pass through to convert_like_with_context.
9315 * cp-tree.h (convert_default_arg): Add context parameters.
9316 (dubious_conversion_warnings): Prototype new function.
9317 * typeck.c (convert_arguments): Adjust convert_default_arg call.
9318 (dubious_conversion_warnings): New function, broken
9319 out of convert_for_assignment.
9320 (convert_for_assignment): Adjust.
9321
9322 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
9323
9324 * decl2.c (key_method): Break out from...
9325 (import_export_vtable, import_export_class): ...here.
9326
9327 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
9328 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
9329
9330 * search.c (note_debug_info_needed, dfs_debug_mark,
9331 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
9332 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
9333
9334 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
9335
9336 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
9337 typos.
9338
9339 2000-03-02 Mark Mitchell <mark@codesourcery.com>
9340
9341 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
9342 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
9343 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
9344 (lang_type): Split gets_new into has_new and has_array_new.
9345 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9346 (TYPE_GETS_NEW): Split into ...
9347 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
9348 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
9349 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
9350 (build_op_new_call): Don't declare.
9351 (build_new_1): Likewise.
9352 * call.c (build_op_new_call): Remove.
9353 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9354 instead of TYPE_NEEDS_DESTRUCTOR.
9355 (finish_struct_bits): Likewise.
9356 (add_implicitly_declared_members): Likewise.
9357 (check_field_decl): Likewise.
9358 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
9359 correctly under the new ABI.
9360 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9361 instead of TYPE_NEEDS_DESTRUCTOR.
9362 (initialize_local_var): Likewise.
9363 (destroy_local_var): Likewise.
9364 (cp_finish_decl): Likewise.
9365 (register_dtor_fn): Likewise.
9366 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
9367 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
9368 TYPE_VEC_DELETE_TAKES_SIZE here.
9369 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
9370 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
9371 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9372 (finish_destructor_body): Likewise.
9373 (maybe_build_cleanup_1): Likewise.
9374 * decl2.c (do_static_destruction): Likewise.
9375 * init.c (build_new_1): Make it static.
9376 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9377 (expand_cleanup_for_base): Likewise.
9378 (get_cookie_size): New function.
9379 (build_new_1): Handle array-new cookies correctly under the new
9380 ABI.
9381 (build_vec_delete_1): Likewise.
9382 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9383 (build_delete): Likewise.
9384 (build_vec_delete): Handle array-new cookies correctly under the new
9385 ABI.
9386 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9387 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
9388 TYPE_HAS_ARRAY_NEW_OPERATOR.
9389 * ptree.c (print_lang_type): Check them.
9390 * search.c (context_for_name_lookup): Fix typo in comment.
9391 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9392 * tree.c (break_out_cleanups): Likewise.
9393 (build_cplus_array_test_1): Likewise.
9394 (cp_build_qualified_type_real): Likewise.
9395 * typeck.c (complete_type): Likewise.
9396
9397 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
9398 the command-line, not the end.
9399
9400 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
9401
9402 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
9403
9404 2000-03-02 Tom Tromey <tromey@cygnus.com>
9405
9406 * cp-tree.h (build_java_class_ref): Declare.
9407 * init.c (build_java_class_ref): No longer static.
9408 * except.c (expand_throw): Generate a Java-style `throw' if the
9409 thrown object is a "Java" object.
9410 (initialize_handler_parm): Generate a Java-style lookup of
9411 exception info if the caught object is a "Java" object.
9412 (catch_language, catch_language_init): New globals.
9413 (decl_is_java_type): New function.
9414 (expand_start_catch_block): Don't call push_eh_info() or
9415 push_eh_cleanup() when handling a Java-style "catch". Pass Java
9416 class reference to build_catch_block.
9417
9418 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9419
9420 * typeck.c (comptypes): Treat sizetype like its language equivalent.
9421
9422 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
9423
9424 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
9425 to merge reference/pointer code and fix incorrect warnings.
9426
9427 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
9428
9429 * search.c (protected_accessible_p): Use context_for_name_lookup.
9430
9431 * init.c (construct_virtual_bases): Fix thinko.
9432 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
9433
9434 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
9435
9436 * decl.c (current_function_decl): Move to toplev.c.
9437
9438 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
9439
9440 * pt.c (fn_type_unification): Unify return type, whenever
9441 provided.
9442 (get_bindings_real): Only pass return type when necessary.
9443 Remove explicit return type check.
9444 * class.c (resolve_address_of_overloaded_function): Pass desired
9445 return type to fn_type_unification.
9446
9447 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9448
9449 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
9450 DECL_FIELD_SIZE.
9451 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
9452 DECL_FIELD_SIZE.
9453 * rtti.c (expand_class_desc): Likewise.
9454 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
9455 (THUNK_VCALL_OFFSET): Likewise.
9456 (THUNK_DELTA): Reflect changes in ../tree.h.
9457
9458 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
9459
9460 * search.c (protected_accessible_p): Also allow the access if
9461 the member is public in DERIVED. Lose TYPE parm.
9462 (friend_accessible_p): Lose TYPE parm.
9463 (accessible_p): Adjust.
9464
9465 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9466
9467 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
9468 on things that are not sizes; ssize_binop deleted.
9469 Call size_diffop when appropriate.
9470 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9471 (build_primary_vtable, build_secondary_vtable): Likewise.
9472 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
9473 Variable I is HOST_WIDE_INT.
9474 (get_vfield_offset): Pass proper types to size_binop.
9475 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
9476 (finish_struct_1): Likewise.
9477 (skip_rtti_stuff): Arg N is now pointer to signed.
9478 (layout_class_type): Use size_zero_node.
9479 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
9480 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
9481 * decl.c (complete_arry_type): Pass proper types to size_binop.
9482 (xref_basetypes): BINFO_OFFSET is sizetype.
9483 * error.c (dump_expr): Don't use size_binop non-sizes.
9484 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
9485 * init.c (construct_virtual_bases): Fix type error.
9486 (build_vec_delete_1): Pass proper type to size_binop and don't
9487 fold result.
9488 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
9489 * rtti.c (get_base_offset): Pass proper type to size_binop.
9490 * search.c (dfs_find_vbases): Fix type error.
9491 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
9492 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
9493 * tree.c (debug_binfo): Variable N is signed.
9494 Use HOST_WIDE_INT_PRINT_DEC.
9495 * typeck.c (comptypes): sizetype is same as equivalent integer type.
9496 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
9497 size_one_node and size_zero_node.
9498 (c_alignof): Use size_one_node.
9499 (build_component_addr): Pass proper types to size_binop.
9500 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
9501
9502 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
9503
9504 Implement class scope using-declarations for functions.
9505 * class.c (handle_using_decl): Call add_method for used functions.
9506 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
9507 (add_method): Used functions are hidden by local functions.
9508 (check_bases_and_members): Handle using-decls before finalizing
9509 CLASSTYPE_METHOD_VEC.
9510 * call.c (add_function_candidate): Add ctype parm; if non-zero,
9511 override the type of 'this' accordingly.
9512 (add_template_candidate, add_template_candidate_real): Add ctype parm.
9513 (convert_class_to_reference, build_user_type_conversion_1,
9514 build_new_function_call, build_object_call, build_new_op,
9515 build_new_method_call): Pass ctype parm.
9516
9517 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
9518 the baselink.
9519 * call.c (convert_class_to_reference, build_user_type_conversion_1,
9520 build_new_function_call, build_object_call, build_new_op,
9521 build_new_method_call, build_op_delete_call): Don't get basetype_path
9522 from a baselink.
9523 * typeck.c (build_component_ref): Likewise.
9524 * init.c (build_offset_ref): Likewise.
9525 (resolve_offset_ref): Don't call enforce_access.
9526 Call build_scoped_ref.
9527 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
9528 would cause an error or if -pedantic.
9529 * class.c (alter_access): Lose binfo parm.
9530
9531 2000-02-26 Mark Mitchell <mark@codesourcery.com>
9532
9533 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
9534 types.
9535
9536 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
9537
9538 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
9539 pseudo_type_info creation into the std namespace
9540
9541 2000-02-26 Mark Mitchell <mark@codesourcery.com>
9542
9543 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
9544 (import_export_class): Remove declaration.
9545 * decl2.c (import_export_class): Make it static.
9546 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
9547 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
9548 EXPR_WITH_FILE_LOCATION.
9549 * lex.c (check_newline): Tweak filename/lineno setting.
9550 * semantics.c (begin_while_stmt): Fix typo in comment.
9551
9552 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9553
9554 * lang-options.h (-fmessage-length=): Add missing option.
9555
9556 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
9557
9558 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
9559
9560 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
9561
9562 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
9563
9564 * optimize.c (expand_call_inline): Emit the return label before
9565 evaluating the return value.
9566
9567 2000-02-24 Mark Mitchell <mark@codesourcery.com>
9568
9569 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
9570 than duplicating functionality here.
9571 * optimize.c: Include input.h.
9572 (expand_call_inline): Use push_srcloc and pop_srcloc.
9573 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
9574 * parse.c: Regenerated.
9575 * Makefile.in (lex.o): Depend on input.h.
9576 (optimize.o): Likewise.
9577
9578 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
9579
9580 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
9581 function type, rather than ICE.
9582
9583 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
9584
9585 * decl.c (grokdeclarator): Call decl_type_access_control.
9586 * parse.y (parse_end_decl): Don't call decl_type_access_control if
9587 decl is null.
9588
9589 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
9590
9591 * decl.c (decls_match): Remove obsolete static member nadgering.
9592
9593 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9594
9595 * decl.c (grokdeclarator): Change ANSI to ISO.
9596 * lex.c (consume_string, readescape, do_identifier): Likewise.
9597 (parse_float, real_yylex): Likewise.
9598 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
9599 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
9600 new_type_id, maybe_label_decls, simple_stmt,
9601 for.init.statement): Likewise.
9602 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
9603 * semantics.c (finish_named_return_value): Likewise.
9604 * parse.c: Regenerate.
9605
9606 2000-02-21 Mark Mitchell <mark@codesourcery.com>
9607
9608 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
9609 (CPTI_CLASS_STAR_TYPE): Remove.
9610 (vtable_index_type): Likewise.
9611 (class_star_type_node): Remove.
9612 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
9613 (build_binary_op_nodefault): Remove.
9614 * call.c (build_new_op): Use build_binary_op instead of
9615 build_binary_op_nodefault.
9616 * decl.c (init_decl_processing): Remove class_star_type_node
9617 initialization. Make delta_type_node ptrdiff_type_node under the
9618 new ABI. Initialize vtable_index_type.
9619 (build_ptrmemfunc_type): Build different structures for the new
9620 ABI.
9621 (build_enumerator): Use build_binary_op instead of
9622 build_binary_op_nodefault.
9623 * method.c (build_overload_value): Mangle pointers-to-members
9624 appropriately under the new ABI.
9625 * typeck.c (build_array_ref): Use build_binary_op instead of
9626 build_binary_op_nodefault.
9627 (get_member_function_from_ptrfunc): Adjust for the new ABI.
9628 (build_binary_op_nodefault): Rename to ...
9629 (build_binary_op): ... this. Remove old version. Adjust for
9630 pointer-to-member comparisons under the new ABI.
9631 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
9632 (build_ptrmemfunc): Adjust for the new ABI.
9633 (expand_ptrmemfunc_cst): Likewise.
9634 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
9635 (pfn_from_ptrmemfunc): Adjust for the new ABI.
9636
9637 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
9638
9639 * call.c (build_object_call): Compress consecutive calls to
9640 cp_error.
9641 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
9642 (build_op_delete_call): Adjust message formatting.
9643
9644 * class.c (check_bases): Compress consecutive calls to
9645 cp_pedwarn.
9646 (finish_struct_anon): Say 'ISO C++'.
9647
9648 * decl.c (start_decl): Same here.
9649 (grok_reference_init): Likewise.
9650 (grokfndecl): Correct message formatting.
9651 (grokfndecl): Improve diagnostic.
9652 (check_static_variable_definition): Likewise. Say 'ISO C++'
9653 (compute_array_index_type): Say 'ISO C++'
9654 (create_array_type_for_decl): Compress consecutive calls to
9655 cp_error.
9656 (grokdeclarator): Say 'ISO C++'
9657 (grok_op_properties): Likewise.
9658
9659 * decl2.c (delete_sanity): Clairify diagnostic.
9660 (check_member_template): Same here.
9661 (grok_function_init): Use consistent terminology.
9662
9663 * expr.c (do_case): Say 'ISO C++'
9664
9665 * friend.c (do_friend): Compress consecutive calls to warning.
9666
9667 2000-02-20 Mark Mitchell <mark@codesourcery.com>
9668
9669 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
9670 * class.c (build_secondary_vtable): Reorganize. Don't create a
9671 new vtable under the new ABI.
9672 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
9673 computing the size.
9674 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
9675 the initializing elements.
9676 (initialize_vtable): New function.
9677 (dfs_finish_vtbls): Use it.
9678 (dfs_accumulate_vtbl_inits): New function.
9679 (finish_vtbls): Merge primary and secondary vtables under the new
9680 ABI.
9681 (finish_struct_1): Remove redundant call to layout_vtable_decl.
9682 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
9683 aren't VAR_DECLs.
9684
9685 * class.c (build_vtable): New function, split out from ...
9686 (get_vtable_decl): ... here, and ...
9687 (build_secondary_vtable): ... here.
9688
9689 * pt.c (tsubst_decl): Fix formatting.
9690
9691 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9692
9693 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
9694 (avoid_overlap, build_base_field): Likewise.
9695 (build_base_field, build_base_fields, is_empty_class):
9696 Test DECL_SIZE with integer_zero.
9697 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
9698 * cp-tree.h (struct lang_type): New field size_unit.
9699 (CLASSTYPE_SIZE_UNIT): New macro.
9700 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
9701 (cp_finish_decl): Delete -Wlarger-than processing.
9702 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
9703 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
9704 * tree.c (make_binfo): binfo vector is one entry longer.
9705 (walk_tree): Walk DECL_SIZE_UNIT.
9706
9707 2000-02-19 Mark Mitchell <mark@codesourcery.com>
9708
9709 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
9710 comment.
9711 (build_vtable_entry): Don't assume all vtable entries are
9712 functions.
9713 (build_vtbl_initializer): Adjust accordingly.
9714 (get_vtable_decl): Fix formatting.
9715
9716 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
9717
9718 * semantics.c (deferred_type_access_control): Walk the entire
9719 type_lookups list.
9720 (save_type_access_control): Rename from
9721 initial_deferred_type_access_control. Just remember the value.
9722 (decl_type_access_control): New fn.
9723 (begin_function_definition): Use deferred_type_access_control, after
9724 we've started the function. Set type_lookups to error_mark_node.
9725 * parse.y (frob_specs, fn.def1): Adjust.
9726 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
9727 (parse_end_decl, parse_bitfield0, parse_method): New fns.
9728 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
9729 (after_type_component_declarator0): Likewise.
9730 (after_type_component_declarator): Likewise.
9731 (notype_component_declarator): Likewise.
9732 * cp-tree.h: Adjust.
9733
9734 * decl.c (redeclaration_error_message): Allow redeclaration of
9735 namespace-scope decls.
9736
9737 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
9738
9739 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
9740
9741 2000-02-17 Mark Mitchell <mark@codesourcery.com>
9742
9743 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
9744 * decl2.c (grokclassfn): Likewise.
9745
9746 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
9747
9748 * decl2.c (lang_decode_option): Don't set default message length
9749 here.
9750 * lex.c (lang_init_options): Set it here.
9751
9752 2000-02-16 Mark Mitchell <mark@codesourcery.com>
9753
9754 Make DECL_CONTEXT mean the class in which a member function was
9755 declared, even for a virtual function.
9756 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
9757 (DECL_FRIEND_CONTEXT): New macro.
9758 (DECL_REAL_CONTEXT): Remove.
9759 (SET_DECL_FRIEND_CONTEXT): Likewise.
9760 (DECL_VIRTUAL_CONTEXT): Adjust.
9761 (DECL_CLASS_SCOPE_P): Use TYPE_P.
9762 (add_friends): Remove.
9763 (hack_decl_function_context): Likewise.
9764 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
9765 CP_DECL_CONTEXT.
9766 (build_over_call): Fix indentation. Use DECL_CONTEXT
9767 instead of DECL_CLASS_CONTEXT.
9768 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
9769 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9770 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9771 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
9772 (build_base_field): Likewise.
9773 (finish_struct_1): Likewise.
9774 (build_self_reference): Likewise.
9775 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
9776 DECL_REAL_CONTEXT.
9777 (pushtag): Use decl_function_context, not
9778 hack_decl_function_context.
9779 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9780 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
9781 (pushdecl): Remove bogus code.
9782 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
9783 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9784 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9785 Use decl_function_context, nothack_decl_function_context.
9786 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
9787 (grokdeclarator): Likewise. Use decl_function_context, not
9788 hack_decl_function_context.
9789 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
9790 (start_function): Use DECL_FRIEND_CONTEXT, not
9791 DECL_CLASS_CONTEXT. Use decl_function_context, not
9792 hack_decl_function_context.
9793 (finish_function): Use decl_function_context, not
9794 hack_decl_function_context.
9795 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
9796 DECL_CLASS_CONTEXT.
9797 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
9798 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
9799 (grokfield): Likewise.
9800 (finish_builtin_type): Likewise.
9801 (finish_vtable_vardec): Use decl_function_context, not
9802 hack_decl_function_context.
9803 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9804 (start_static_initialization_or_destruction): Likewise.
9805 (finish_static_initialization_or_destruction): Likewise.
9806 (mark_used): Adjust logic for deciding when to synthesize methods.
9807 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
9808 DECL_REAL_CONTEXT.
9809 * error.c (dump_function_decl): Use DECL_CONTEXT, not
9810 DECL_CLASS_CONTEXT.
9811 * friend.c (is_friend): Likewise.
9812 (add_friends): Remove.
9813 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
9814 * lex.c (begin_definition_of_inclass_inline): Use
9815 decl_function_context, not hack_decl_function_context.
9816 (process_next_inline): Likewise.
9817 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9818 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
9819 DECL_CLASSS_CONTEXT.
9820 (hack_identifier): Likewise.
9821 (synthesize_method): Use decl_function_context, not
9822 hack_decl_function_context.
9823 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
9824 DECL_REAL_CONTEXT.
9825 (is_member_template): Use decl_function_context, not
9826 hack_decl_function_context. Use DECL_CONTEXT, not
9827 DECL_CLASS_CONTEXT.
9828 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
9829 DECL_CLASS_CONTEXT.
9830 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
9831 DECL_REAL_CONTEXT.
9832 (push_template_decl_real): Likewise.
9833 (instantiate_class_template): Don't call add_friends.
9834 (tsubst_default_argument): Use DECL_CONTEXT, not
9835 DECL_REAL_CONTEXT.
9836 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9837 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9838 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
9839 DECL_CLASS_CONTEXT.
9840 * repo.c (repo_inline_used): Likewise.
9841 * search.c (current_scope): Adjust for new _CONTEXT macros.
9842 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
9843 DECL_REAL_CONTEXT.
9844 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9845 (lookup_fnfields_here):Likewise.
9846 (check_final_overrider): Likewise.
9847 (init_vbase_pointers): Likewise.
9848 (virtual_context): Likewise.
9849 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
9850 (expand_body): Use decl_function_context, not
9851 hack_decl_function_context.
9852 * tree.c (hack_decl_function_context): Remove.
9853 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
9854 DECL_CLASS_CONTEXT.
9855 * typeck2.c (error_not_base_type): Likewise.
9856
9857 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
9858
9859 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
9860
9861 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9862
9863 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
9864
9865 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
9866
9867 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
9868
9869 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
9870
9871 * decl2.c (lang_decode_option): Enable automatic line wrapping.
9872
9873 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
9874
9875 * parse.y (frob_specs): Split out...
9876 (parse_decl): From here.
9877 (fn.def2): Call initial_deferred_type_access_control.
9878 (after_type_component_declarator0): Call frob_specs.
9879 (notype_component_declarator0): Likewise.
9880 * search.c (friend_accessible_p): Nested classes are friends of their
9881 enclosing classes.
9882
9883 2000-02-10 Mark Mitchell <mark@codesourcery.com>
9884
9885 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
9886 used to create an implicit temporary.
9887
9888 * class.c (dfs_modify_vtables): Tweak calculation of functions to
9889 override.
9890
9891 2000-02-08 Nathan Sidwell <nathan@acm.org>
9892
9893 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
9894 strip array element qualifiers too.
9895
9896 2000-02-07 Mark Mitchell <mark@codesourcery.com>
9897
9898 * decl.c (store_parm_decls): Don't build cleanups for parameters
9899 while processing_template_decl.
9900
9901 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
9902
9903 * cp-tree.h (struct saved_scope): Add incomplete field.
9904 (namespace_scope_incomplete): New macro.
9905 * decl.c (pushdecl): Use it.
9906 (hack_incomplete_structures): Use it. See through artificial
9907 binding levels.
9908 (mark_saved_scope): Mark it.
9909
9910 Implement access control for nested types.
9911 * search.c (type_access_control): New fn.
9912 (accessible_p): Now we do perform access control for types.
9913 * semantics.c (deferred_type_access_control): New fn.
9914 (initial_deferred_type_access_control): New fn.
9915 (begin_function_definition): Call it. Add lookups parm.
9916 * decl.c (struct binding_level): Add this_class field.
9917 (pushlevel_class): Set it.
9918 (mark_binding_level): Mark it.
9919 (lookup_name_real): Use it. Call type_access_control.
9920 (mark_saved_scope): Mark lookups field.
9921 * cp-tree.h (flagged_type_tree): Add lookups field.
9922 (struct saved_scope): Add lookups field.
9923 (type_lookups): New macro.
9924 * parse.y (declmods): Now <ftype>.
9925 (parse_decl): Add lookups parm. Call
9926 initial_deferred_type_access_control.
9927 (lang_extdef): Clear type_lookups.
9928 (typed_declspecs, declmods, typespec): Set lookups field.
9929 (initdcl): Call deferred_type_access_control.
9930 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9931 component_decl_1, named_parm): Adjust.
9932 * friend.c (is_friend): Nested classes are friends of their
9933 enclosing classes.
9934
9935 * class.c (currently_open_derived_class): New fn.
9936 * method.c (hack_identifier): Use it.
9937
9938 * lex.c (do_identifier): Remove obsolete code.
9939
9940 * parse.y (typed_typespecs): Propagate new_type_flag properly.
9941
9942 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
9943
9944 * tinfo.h: Remove apostrophes from C++ comment (xgettext
9945 thinks this file is plain C).
9946
9947 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9948
9949 * Makefile.in (call.o): Depend on $(EXPR_H).
9950
9951 * call.c: Include "expr.h".
9952
9953 * class.c (dump_class_hierarchy): Add prototype.
9954
9955 * search.c (dfs_get_pure_virtuals): Likewise.
9956
9957 2000-02-1 Ulrich Drepper <drepper@redhat.com>
9958
9959 * parse.y (simple_stmt): Allow :: token in asm parameter list.
9960 * parse.c: Rebuilt.
9961
9962 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
9963
9964 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9965 Store it in DECL_FCONTEXT.
9966 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9967
9968 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
9969
9970 * tinfo.h (old abi): #include "tconfig.h".
9971 * tinfo.cc (convert_to_base): Move into old abi section.
9972
9973 2000-01-31 Mark Mitchell <mark@codesourcery.com>
9974
9975 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9976 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9977 (BINFO_PRIMARY_BINFO): New macro.
9978 (BF_DELTA): Rename to ...
9979 (BV_DELTA): ... this.
9980 (BF_VCALL_INDEX): Rename to ...
9981 (BV_VCALL_INDEX): ... this.
9982 (BF_FN): Rename to ...
9983 (BV_FN): ... this.
9984 * class.c (build_vbase_path): Adjust for changes to reverse_path.
9985 (set_rtti_entry): Rename BF_ macros to BV_ variants.
9986 (modify_vtable_entry): Simplify.
9987 (add_virtual_function): Rename BF_ macros to BV_ variants.
9988 (build_vtable_initializer): Likewise.
9989 (get_class_offset_1): Remove.
9990 (dfs_get_class_offset): Likewise.
9991 (get_class_offset): Likewise.
9992 (dfs_find_final_overrider): New function.
9993 (find_final_overrider): Likewise.
9994 (modify_one_vtable): Remove.
9995 (dfs_find_base): New function.
9996 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
9997 find_final_overrider.
9998 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
9999 virtuals.
10000 (dfs_fixup_vtable_deltas): Remove.
10001 (override_one_vtable): Remove.
10002 (merge_overrides): Likewise.
10003 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
10004 unreal chilren of virtual bases.
10005 (finish_struct_1): Don't use merge_overrides. Don't use
10006 dfs_fixup_vtable_deltas.
10007 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
10008 BINFOs.
10009
10010 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
10011 Jason Merrill <jason@yorick.cygnus.com>
10012
10013 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
10014
10015 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
10016
10017 * exception.cc (__throw_bad_typeid): Add missing std::.
10018
10019 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10020
10021 * cp-tree.h (make_thunk): PROTO -> PARAMS.
10022
10023 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
10024
10025 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
10026
10027 Runtime support for new-abi rtti.
10028 * inc/typeinfo (type_info::operator!=): Define in class.
10029 (type_info::before, type_info::name, type_info::operator==,
10030 type_info::operator!=): Define new ABI implementations.
10031 (type_info::is_pointer_p, type_info::is_function_p): Declare
10032 new virtual functions.
10033 (type_info::do_catch, type_info::do_upcast): Likewise.
10034
10035 * tinfo.h (__base_class_info): Define new class.
10036 (__class_type_info): Likewise.
10037 (__si_class_type_info): Likewise.
10038 (__vmi_class_type_info): Likewise.
10039 (__dynamic_cast): Prototype.
10040
10041 * tinfo.cc: Conditionalize old and new rtti mechanisms.
10042 (type_info::is_pointer_p): Define new function.
10043 (type_info::is_function_p): Likewise.
10044 (type_info::do_catch): Likewise.
10045 (type_info::do_upcast): Likewise.
10046 (vtable_prefix): New structure for vtable access.
10047 (adjust_pointer): Define new template function.
10048 (contained_p, public_p, virtual_p, contained_public_p,
10049 contained_nonpublic_p, contained_nonvirtual_p): Define new
10050 functions.
10051 (nonvirtual_base_type): New local variable.
10052 (__class_type_info::~__class_type_info): Define.
10053 (__si_class_type_info::~__si_class_type_info): Likewise.
10054 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
10055 (__class_type_info::do_catch): Define new function.
10056 (__class_type_info::do_upcast): Likewise.
10057 (__class_type_info::find_public_src): Likewise.
10058 (__class_type_info::do_find_public_src): Likewise.
10059 (__si_class_type_info::do_find_public_src): Likewise.
10060 (__vmi_class_type_info::do_find_public_src): Likewise.
10061 (__class_type_info::do_dyncast): Likewise.
10062 (__si_class_type_info::do_dyncast): Likewise.
10063 (__vmi_class_type_info::do_dyncast): Likewise.
10064 (__class_type_info::do_upcast): Likewise.
10065 (__si_class_type_info::do_upcast): Likewise.
10066 (__vmi_class_type_info::do_upcast): Likewise.
10067 (__dynamic_cast): Likewise.
10068
10069 * tinfo2.cc (__fundamental_type_info): Define new class.
10070 (__pointer_type_info): Likewise.
10071 (__reference_type_info): Likewise.
10072 (__array_type_info): Likewise.
10073 (__function_type_info): Likewise.
10074 (__enum_type_info): Likewise.
10075 (__ptr_to_member_type_info): Likewise.
10076 (__fundamental_type_info::~__fundamental_type_info): Define.
10077 (__pointer_type_info::~__pointer_type_info): Likewise.
10078 (__reference_type_info::~__reference_type_info): Likewise.
10079 (__array_type_info::~__array_type_info): Likewise.
10080 (__function_type_info::~__function_type_info): Likewise.
10081 (__enum_type_info::~__enum_type_info): Likewise.
10082 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
10083 (__pointer_type_info::do_catch): Define new function.
10084 (__ptr_to_member_type_info::do_catch): Define new function.
10085
10086 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
10087 (__is_pointer): Likewise.
10088
10089 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
10090
10091 2000-01-30 Mark Mitchell <mark@codesourcery.com>
10092
10093 * cp/class.c (build_vtable): Rename to build_primary_vtable.
10094 (prepare_fresh_vtable): Rename to build_secondary_vtable.
10095 (make_new_vtable): New function.
10096 (modify_vtable_entry): Handle generation of new vtables correctly.
10097 (modify_one_vtable): Remove unused parameter.
10098 (dfs_fixup_vtable_deltas): Likewise.
10099 (override_one_vtable): Use build_secondary_vtable.
10100 (finish_struct_1): Use build_primary_vtable and
10101 build_secondary_vtable.
10102
10103 2000-01-28 Ulrich Drepper <drepper@redhat.com>
10104
10105 * cp/decl.c: Adjust variable names, comments, help strings.
10106
10107 2000-01-29 Nathan Sidwell <nathan@acm.org>
10108
10109 * new2.cc (operator delete[]): Use operator delete, don't assume
10110 implementation.
10111
10112 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
10113
10114 * class.c (build_vtbl_initializer): Add argument to
10115 build_vtable_entry call.
10116
10117 2000-01-27 Mark Mitchell <mark@codesourcery.com>
10118
10119 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
10120 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
10121 (BF_DELTA): New macro.
10122 (BF_VCALL_INDEX): Likewise.
10123 (BF_FN): Likewise.
10124 (THUNK_VCALL_OFFSET): Likewise.
10125 (make_thunk): Change prototype.
10126 * class.c (build_vtable_entry): Integrate
10127 build_vtable_entry_for_fn. Handle vcall indices.
10128 (build_vtable_entry_for_fn): Remove.
10129 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
10130 BF_VCALL_INDEX, BF_FN.
10131 (modify_vtable_entry): Integrate common code from
10132 modify_one_vtable and dfs_fixup_vtable_deltas.
10133 (add_virtual_function): Set BF_VCALL_INDEX.
10134 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
10135 and BF_FN.
10136 (modify_one_vtable): Simplify.
10137 (dfs_fixup_vtable_deltas): Likewise.
10138 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
10139 * method.c (make_thunk): Handle vcall indices.
10140
10141 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
10142
10143 Compiler side new abi rtti (not enabled).
10144 * cp-tree.h (new_abi_rtti_p): New macro.
10145 (emit_support_tinfos): Prototype new function.
10146 (tinfo_decl_p): Likewise.
10147 (emit_tinfo_decl): Likwise.
10148 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
10149 macros.
10150 (doing_runtime): New local static.
10151 (init_rtti_processing): Add new-abi initializer.
10152 (get_tinfo_decl): Add new-abi logic.
10153 (tinfo_from_decl): Likewise.
10154 (build_dynamic_cast_1): Likewise.
10155 (qualifier_flags): New static function.
10156 (tinfo_base_init): Likewise.
10157 (generic_initializer): Likewise.
10158 (ptr_ref_initializer): Likewise.
10159 (ptmd_initializer): Likewise.
10160 (class_hint_flags): Likewise.
10161 (class_initializer): Likewise.
10162 (synthesize_tinfo_var): Likewise.
10163 (create_real_tinfo_var): Likewise.
10164 (create_pseudo_type_info): Likewise.
10165 (get_vmi_pseudo_type_info): Likewise.
10166 (create_tinfo_types): Likewise.
10167 (emit_support_tinfos): New global function.
10168 (tinfo_decl_p): New global predicate.
10169 (emit_tinfo_decl): New global function.
10170 * class.c (set_rtti_entry): Generalize for old and new rtti.
10171 (build_vtbl_initializer): Likewise.
10172 * decl2.c (finish_file): Likewise.
10173
10174 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
10175
10176 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
10177 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
10178
10179 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
10180
10181 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
10182 for scopes.
10183
10184 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
10185
10186 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
10187
10188 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
10189
10190 * optimize.c (calls_setjmp_r): Supply new argument
10191 to special_function_p.
10192
10193 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10194
10195 * call.c: PROTO -> PARAMS.
10196 * class.c: Likewise.
10197 * cp-tree.h: Likewise.
10198 * cvt.c: Likewise.
10199 * decl.c: Likewise.
10200 * decl.h: Likewise.
10201 * decl2.c: Likewise.
10202 * dump.c: Likewise.
10203 * errfn.c: Likewise.
10204 * error.c: Likewise.
10205 * except.c: Likewise.
10206 * expr.c: Likewise.
10207 * init.c: Likewise.
10208 * input.c: Likewise.
10209 * lex.c: Likewise.
10210 * lex.h: Likewise.
10211 * method.c: Likewise.
10212 * optimize.c: Likewise.
10213 * parse.y: Likewise.
10214 * pt.c: Likewise.
10215 * repo.c: Likewise.
10216 * rtti.c: Likewise.
10217 * search.c: Likewise.
10218 * semantics.c: Likewise.
10219 * spew.c: Likewise.
10220 * tree.c: Likewise.
10221 * typeck.c: Likewise.
10222 * typeck2.c: Likewise.
10223 * xref.c: Likewise.
10224
10225 2000-01-25 Richard Henderson <rth@cygnus.com>
10226
10227 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
10228
10229 2000-01-25 Mark Mitchell <mark@codesourcery.com>
10230
10231 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
10232 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
10233 (struct vcall_offset_data_s): New type.
10234 (dfs_vcall_offset_queue_p): New function.
10235 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10236 (build_vcall_offset_vtbl_entries): Likewise.
10237 (layout_vtable_decl): Likewise.
10238 (num_vfun_entries): Likewise.
10239 (num_extra_vtbl_entries): Add the entries for vcall offsets.
10240 (build_vtbl_initializer): Likewise.
10241 (dfs_finish_vtabls): Use layout_vtable_decl.
10242 (modify_one_vtables): Always duplicate vtables under the new ABI.
10243 (finish_struct_1): Use layout_vtable_decl.
10244
10245 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10246
10247 * decl.c (member_function_or_else): Change third arg from a format
10248 specifier to an `enum overload_flags'. Callers changed.
10249
10250 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
10251
10252 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
10253 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
10254 build_const_cast, get_delta_difference, check_return_expr): Avoid
10255 ANSI string concatenation usage.
10256
10257 2000-01-24 Mark Mitchell <mark@codesourcery.com>
10258
10259 * class.c (layout_class_type): Put the fields required to make a
10260 class non-empty at the end, not the beginning, of the TYPE_FIELDs
10261 list.
10262
10263 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
10264
10265 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
10266 template.
10267
10268 * decl2.c (mark_used): Do instantiate inlines that have been
10269 explicitly instantiated.
10270
10271 2000-01-24 Richard Henderson <rth@cygnus.com>
10272
10273 * call.c (build_over_call): Use expand_tree_builtin.
10274 * typeck.c (build_function_call_real): Likewise.
10275 (build_binary_op_nodefault): Handle unordered compares.
10276
10277 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10278
10279 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
10280 cp_tree_index values.
10281 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
10282 New global node #defines for them.
10283 * rtti.c (call_void_fn): Replace with ...
10284 (build_runtime_decl): ... new static function.
10285 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
10286 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
10287 (build_dynamic_cast_1): Always produce correctly typed result.
10288 Explicitly produce type_info addresses. Use dynamic_cast_node.
10289 * exception.cc (__throw_bad_cast): Return `void *'.
10290 (__throw_bad_typeid): Return `const type_info &'.
10291
10292 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10293
10294 * cp-tree.h (get_vtable_decl): Prototype new function.
10295 * class.c (get_vtable_decl): New function. Broken out from ...
10296 (build_vtable): ... here. Use it.
10297 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
10298 by get_vtable_decl.
10299
10300 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10301
10302 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
10303 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
10304 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
10305 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
10306 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
10307 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
10308 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
10309 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
10310 (CPTI_TINFO_VAR_ID): New enumeration.
10311 (__tp_desc_type_node, __access_mode_type_node,
10312 __bltn_desc_type_node, __user_desc_type_node,
10313 __class_desc_type_node, __ptr_desc_type_node,
10314 __attr_desc_type_node, __func_desc_type_node,
10315 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
10316 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
10317 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
10318 enum_desc_type_node, class_desc_type_node,
10319 si_class_desc_type_node, vmi_class_desc_type_node,
10320 ptmd_desc_type_node, base_desc_type_node): New #defines.
10321 (tinfo_fn_id, tinfo_fn_type): Rename to ...
10322 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
10323 (tinfo_var_id): New enumeration.
10324 (DECL_TINFO_FN_P): Augment comment.
10325 * decl.c (cp_global_trees): Adjust documentation.
10326 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
10327 tinfo_decl_type and tinfo_var_id.
10328 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
10329 (build_typeid): Remove unused variable.
10330 (get_tinfo_var): Use tinfo_var_id.
10331 (tinfo_name): New static function.
10332 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
10333 (tinfo_from_decl): Likewise.
10334 (get_base_offset): New static function, broken out of
10335 expand_class_desc.
10336 (expand_si_desc): Use tinfo_name.
10337 (expand_class_desc): Likewise. Lose local static variable.
10338 Use base_desc_type_node. Use get_base_offset.
10339 (expand_ptr_desc): Use tinfo_name.
10340 (expand_attr_desc): Likewise.
10341 (expand_generic_desc): Likewise.
10342
10343 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
10344 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
10345
10346 2000-01-23 Mark Mitchell <mark@codesourcery.com>
10347
10348 * cp-tree.h (__eprintf): Remove declaration.
10349 * tree.c (__eprintf): Remove definition.
10350
10351 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
10352 Mark Mitchell <mark@codesourcery.com>
10353
10354 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
10355 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
10356
10357 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
10358
10359 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
10360
10361 2000-01-23 Mark Mitchell <mark@codesourcery.com>
10362
10363 * cp-tree.h (register_dtor_fn): New function.
10364 * decl.c (destroy_local_static): Rename to ...
10365 (register_dtor_fn): ... this. Give it external linkage.
10366 (expand_static_init): Use it.
10367 * decl2.c (do_static_initialization): Likewise, if using
10368 __cxa_atexit.
10369 (do_static_destruction): Check that __cxa_atexit is not in use.
10370 (finish_file): Don't call do_static_destruction if using
10371 __cxa_atexit.
10372
10373 * typeck.c (convert_arguments): Restore two-message error
10374 reporting.
10375
10376 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
10377
10378 Remap dynamic cast hint values to be consistent across ABIs.
10379 * search.c (dynamic_cast_base_recurse): Remap generated value.
10380 (get_dynamic_cast_base_type): Adjust documentation.
10381 * tinfo.h (__user_type_info::dyncast): Likewise.
10382 (__user_type_info::find_public_subobj): Remap BOFF meaning.
10383 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
10384 (__class_type_info::do_dyncast): Likewise.
10385 (__class_type_info::do_find_public_subobj): Likewise.
10386 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
10387
10388 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
10389
10390 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
10391
10392 * typeck2.c (incomplete_type_error): Restore previous
10393 cp_error and cp_error_at call sequence.
10394
10395 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
10396
10397 * class.c (dump_class_hierarchy): Make format agree with argument;
10398 cast pointer to unsigned long and print with %lx.
10399
10400 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
10401
10402 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
10403
10404 * typeck.c (composite_pointer_type, common_type,
10405 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
10406 build_function_call_real, convert_arguments,
10407 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
10408 build_unary_op, mark_addressable, build_compound_expr,
10409 build_static_cast, build_reinterpret_cast, build_const_cast,
10410 build_c_cast, build_modify_expr, get_delta_difference,
10411 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
10412 'ISO C++'. Fusion consecutive calls to diagnotic message routines
10413 into a single one.
10414 * typeck2.c (readonly_error, abstract_virtuals_error,
10415 process_init_constructor, check_for_new_type): Likewise.
10416
10417 2000-01-19 Mark Mitchell <mark@codesourcery.com>
10418
10419 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
10420 VAR_DECLs.
10421
10422 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
10423
10424 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
10425 (build_x_typeid): Likewise.
10426 (get_tinfo_fn): Likewise.
10427 (get_tinfo_fn_unused): Rename to ...
10428 (get_tinfo_decl): ... here.
10429 * rtti.c (build_headof): Replace logic error with assertion.
10430 (get_tinfo_fn_dynamic): Rename to ...
10431 (get_tinfo_decl_dynamic): ... here. Make static. Use
10432 complete_type_or_else.
10433 (build_x_typeid): Move into ...
10434 (build_typeid): ... here. Adjust call to
10435 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
10436 throw_bad_typeid expression.
10437 (get_tinfo_fn_unused): Rename to ...
10438 (get_tinfo_decl): ... here. Adjust comment.
10439 (get_tinfo_fn): Delete.
10440 (tinfo_from_decl): New static function.
10441 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
10442 (get_typeid): Use complete_type_or_else.
10443 (build_dynamic_cast_1): Adjust calls to
10444 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
10445 * parse.y (primary): Adjust call to build_typeid.
10446 * except.c (build_eh_type_type_ref): Adjust call to
10447 get_tinfo_decl. Mark as used.
10448 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
10449 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
10450 * parse.c: Regenerated.
10451
10452 2000-01-17 Mark Mitchell <mark@codesourcery.com>
10453
10454 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
10455 calling convention.
10456 (resolves_to_fixed_type_p): Document calling convention.
10457 * rtti.c (build_x_typeid): Initialize NONNULL.
10458
10459 * cp-tree.h (build_shared_int_cst): New function.
10460 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
10461 * class.c (modify_vtable_entry): Likewise.
10462 (add_virtual_function): Split out code to generated shared
10463 INTEGER_CSTs to build_share_int_cst.
10464 (modify_all_vtables): Handle all the overridden functions here.
10465 Add overridden functions from non-primary virtual bases to the
10466 primary vtable.
10467 (finish_struct_1): Adjust call to modify_all_vtables. Add
10468 overridden functions from non-primary bases to the vtable.
10469 * tree.c (build_shared_int_cst): New function.
10470
10471 * cp-tree.h (scratchalloc): Remove.
10472 (build_scratch_list): Likewise.
10473 * call.c (convert_class_to_reference): Replace build_scratch_list
10474 and build_expr_list with build_tree_list.
10475 (add_candidate): Replace scratchalloc with expralloc. Note memory
10476 leak.
10477 (build_user_type_conversion_1): Replace build_scratch_list
10478 and build_expr_list with build_tree_list.
10479 (build_new_op): Likewise.
10480 (build_op_delete_call): Likewise.
10481 (convert_like): Likewise.
10482 * cvt.c (ocp_convert): Likewise.
10483 * decl.c (start_decl): Likewise.
10484 (start_function): Likewise.
10485 (finish_destructor_body): Likewise.
10486 (maybe_build_cleanup_1): Likewise.
10487 * decl2.c (reparse_decl_as_expr): Likewise.
10488 * init.c (perform_member_init): Likewise.
10489 (expand_cleanup_for_base): Likewise.
10490 (build_builtin_delete_call): Likewise.
10491 (build_new_1): Likewise.
10492 (build_delete): Likewise.
10493 * method.c (do_build_assign_ref): Likewise.
10494 * parse.y (already_scoped_stmt): Likewise.
10495 (nontrivial_exprlist): Likewise.
10496 (net_initializer): Likewise.
10497 (initlist): Likewise.
10498 * parse.c: Regenerated.
10499 * rtti.c (build_x_typeid): Likewise.
10500 (build_dynamic_cast_1): Likewise.
10501 * typeck.c (build_x_compound_expr): Likewise.
10502 (build_static_cast): Likewise.
10503 (build_modify_expr): Likewise.
10504
10505 * cp-tree.h (DECL_VINDEX): Add documentation.
10506 * class.c (build_vtable_entry): Likewise.
10507 (start_vtable): Add comment.
10508 (add_virtual_function): Replace pending_hard_virtuals with
10509 overridden_virtuals and pending_virtuals with new_virtuals.
10510 Replace redundant assignments with assertions.
10511 (check_for_override): Add comment.
10512 (check_bases_and_members): Replace pending_hard_virtuals with
10513 overridden_virtuals and pending_virtuals with new_virtuals.
10514 (create_vtbl_ptr): Likewise.
10515 (layout_class_type): Likewise.
10516 (finish_struct_1): Likewise. Add comments.
10517
10518 2000-01-16 Mark Mitchell <mark@codesourcery.com>
10519
10520 * class.c (finish_struct_1): Replace redundant code with
10521 assertions.
10522
10523 * cp-tree.h (flag_new_abi): Move.
10524 (flag_use_cxa_atexit): Likewise.
10525 (flag_honor_std): Likewise.
10526 (flag_rtti): Likewise.
10527 (vbase_offsets_in_vtable_p): Define.
10528 (vptrs_present_everywhere_p): Likewise.
10529 (TYPE_CONTAINS_VPTR_P): Likewise.
10530 (dfs_walk_real): Declare.
10531 * class.c (build_vbase_pointer_fields): Check
10532 vbase_offsets_in_vtable_p.
10533 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
10534 BINFO_VPTR_FIELD.
10535 (build_vbase_offset_vtbl_entries): Simplify.
10536 (build_vbase_offset_vtbl_entries): Adjust.
10537 (build_vbase_pointer): Add ability to look up vbase offsets in
10538 vtable.
10539 (start_vtable): New function.
10540 (add_virtual_function): Use it.
10541 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
10542 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
10543 (build_vtbl_initializer): Take the type of the complete object as
10544 input. Use it to correctly calculate vbase offsets.
10545 (dfs_finish_vtbls): Pass the complete type to
10546 build_vtbl_initializer.
10547 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
10548 (create_vtable_ptr): Create a vtable even if there are no
10549 new virtual functions, under the new ABI.
10550 (finish_struct_1): Likewise.
10551 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
10552 * decl.c (exapnd_static_init): Remove call to
10553 preserve_initializer.
10554 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
10555 vtables.
10556 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
10557 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
10558 (construct_virtual_bases): Don't initialize virtual base pointers
10559 under the new ABI.
10560 (build_aggr_init): Clean up comment.
10561 (expand_aggr_init_1): Likewise.
10562 * rtti.c (expand_class_desc): Store the virtual function table
10563 index where the vbase offset lives in the offset field.
10564 * search.c (dfs_walk_real): Make it global.
10565 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
10566 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
10567
10568 * tinfo.h (USItype): Make it signed under the new ABI.
10569 * tinfo.cc (convert_to_base): New function. Encapsulate base
10570 conversion logic here.
10571 (__class_type_info::do_upcast): Use it.
10572 (__class_type_info::do_dyncast): Likewise.
10573 (__class_type_info::do_find_public_subobj): Likewise.
10574
10575 * init.c (construct_virtual_bases): Don't look up the addresses of
10576 virtual bases at run-time.
10577
10578 * class.c (build_vbase_pointer): Relocate.
10579 (build_vbase_pointer_fields): Likewise.
10580 (dfs_build_vbase_offset_vtbl_entries): Likewise.
10581 (build_vbase_offset_vtbl_entries): Likewise.
10582
10583 * decl.c (init_decl_processing): Complain if -fnew-abi
10584 -fno-vtable-thunks is used.
10585
10586 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
10587 flag_new_abi.
10588
10589 2000-01-15 Mark Mitchell <mark@codesourcery.com>
10590
10591 * cp-tree.h (num_extra_vtbl_entries): New function.
10592 (size_extra_vtbl_entries): Likewise.
10593 (dfs_vtable_path_unmark): Likewise.
10594 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
10595 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10596 * class.c (num_extra_vtbl_entries): New function.
10597 (size_extra_vtbl_entries): Likewise.
10598 (dfs_build_vbase_offset_vtbl_entries): New function.
10599 (build_vbase_offset_vtbl_entries): Likewise.
10600 (build_vtbl_initializer): Use it.
10601 (finish_struct_1): Adjust vtable sizes (using
10602 num_extra_vtbl_entries).
10603 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
10604 THUNK_DECL is non-NULL before expanding it.
10605 * init.c (expand_virtual_init): Adjust the vtable pointer by
10606 size_extra_vtbl_entries before storing it.
10607 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
10608 Handle TREE_LIST parameters here, not in the dfs_* functions.
10609 (dfs_unmarked_real_bases_queue_p): Adjust.
10610 (dfs_marked_real_bases_queue_p): Likewise.
10611 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
10612 (dfs_vtable_path_marked_real_bases_queue_p): New function.
10613 (dfs_vtable_path_unmark): Likewise.
10614
10615 2000-01-14 Mark Mitchell <mark@codesourcery.com>
10616
10617 * optimize.c (copy_body_r): Clear the operand three of a
10618 TARGET_EXPR when copying it.
10619
10620 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10621
10622 * method.c (build_decl_overload_real): Check whether we are in ::
10623 before returning __builtin_new/delete.
10624
10625 2000-01-13 Mark Mitchell <mark@codesourcery.com>
10626
10627 * pt.c (tsubst_friend_function): Improve comment.
10628 (instantiate_decl): Avoid crashing when a "nested" function is
10629 instantiated from the top level.
10630
10631 * dump.c (dqeueue_and_dump): Dump
10632 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
10633
10634 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10635
10636 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
10637
10638 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
10639
10640 * g++spec.c (lang_specific_driver): Add -fnew-abi if
10641 ENABLE_NEW_GXX_ABI defined.
10642 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
10643 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
10644 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
10645
10646 2000-01-12 Mark Mitchell <mark@codesourcery.com>
10647
10648 * decl.c (start_cleanup_fn): Call pushdecl.
10649
10650 * call.c (convert_class_to_reference): Fix typos.
10651 (build_conditional_expr): Handle errors gracefully.
10652 * class.c (push_nested_class): Likewise.
10653 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
10654 (DECL_THIS_EXTERN): Use it.
10655 (DECL_THIS_STATIC): Likewise.
10656 * cvt.c (convert_to_void): Handle errors gracefully.
10657 (build_expr_type_conversion): Likewise.
10658 * decl.c (maybe_push_decl): Likewise.
10659 (start_decl_1): Likewise.
10660 (require_complete_types_for_parms): Likewise.
10661 * parse.y (structsp): Likewise.
10662 (base_class): Likewise.
10663 * parse.c: Regenerated.
10664 * pt.c (finish_member_template_decl): Likewise.
10665 * typeck.c (decay_conversion): Likewise.
10666
10667 * cp-tree.h (dfs_skip_vbases): New function.
10668 (find_vbase_instance): Likewise.
10669 * class.c (determine_primary_base): Allow a nearly empty base to
10670 serve as a primary base class under the new ABI.
10671 (get_class_offset_1): Rename to ...
10672 (dfs_get_class_offset): ... this. Simplify. Don't issue error
10673 messages here.
10674 (get_class_offset): Use it. Issue error messages here.
10675 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
10676 find the right copies of virtual bases.
10677 (fixup_vtable_deltas1): Rename to ...
10678 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
10679 bases as primary bases.
10680 (fixup_vtable_deltas): Remove.
10681 (override_one_vtable): Handle virtual bases as primary bases.
10682 (merge_overrides): Likewise.
10683 (finish_struct_1): Likewise.
10684 (dump_class_hierarchy): Dump primary-ness of bases as well.
10685 * search.c (mark_primary_bases): Use a pre-order traversal to
10686 handle primary virtual bases.
10687 (dfs_skip_vbases): New fiunction.
10688 (expand_upcast_fixups): Adjust to handle primary virtual bases.
10689 (fixup_virtual_upcast_offsets): Likewise.
10690 (fixup_all_virtual_upcast_offsets): Likewise.
10691 (dfs_find_vbase_instances): New function.
10692 (find_vbase_instance): Likewise.
10693
10694 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
10695
10696 * lex.c (DIR_SEPARATOR): Delete macro.
10697
10698 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
10699
10700 * decl2.c (lang_decode_option): Handle automatic line wrapping
10701 option.
10702
10703 2000-01-11 Mark Mitchell <mark@codesourcery.com>
10704
10705 * friend.c (do_friend): Don't resolve scopes when processing
10706 template declarations, even if the qualifying scope doesn't
10707 involve template parameters.
10708
10709 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
10710
10711 * class.c (dfs_modify_vtables_queue_p): Remove.
10712 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
10713 and dfs_marked_real_bases_queue_p instead of
10714 dfs_modify_vtables_queue_p.
10715
10716 * class.c (build_vbase_path): Simplify.
10717 (dfs_propagate_binfo_offsets): New function.
10718 (propagate_binfo_offsets): Use it.
10719 (remove_base_field): Simplify.
10720 (dfs_set_offset_for_vbases): Remove.
10721 (dfs_set_offset_for_shared_vbases): New function.
10722 (dfs_set_offset_for_unshared_vbases): Likewise.
10723 (layout_virtual_bases): Use them.
10724 (layout_basetypes): Don't call propagate_binfo_offsets.
10725 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
10726 for the vbases.
10727
10728 * class.c (build_base_field): New function, split out from ...
10729 (build_base_fields): ... here. Use it. Allocate primary bases
10730 first, under the new ABI.
10731 (get_vtable_entry): Remove.
10732 (remove_base_field): New function, split out from ...
10733 (remove_base_fields): ... here. Adjust since primary bases come
10734 first under the new ABI.
10735
10736 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
10737 (initialize_vtbl_ptrs): New function.
10738 (expand_indirect_vtbls_init): Change prototype.
10739 (convert_pointer_to_vbase): Declare.
10740 * init.c (expand_direct_vtbls_init): Remove.
10741 (dfs_initialize_vtbl_ptrs): New function.
10742 (initialize_vtbl_ptrs): Likewise.
10743 (emit_base_init): Use initialize_vtbl_ptrs.
10744 * search.c (convert_pointer_to_vbase): Make it global.
10745 (expand_indirect_vtbls_init): Remove vtable initialization code.
10746 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
10747
10748 * class.c (dfs_finish_vtbls): New function.
10749 (finish_vtbls): Use it.
10750 (dump_class_hierarchy): New function.
10751
10752 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
10753 (BINFO_VBASE_PRIMARY_P): New macro.
10754 (BINFO_VIRTUALS): Add to documentation.
10755 (SET_BINFO_PRIMARY_MARKED_P): Remove.
10756 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10757 (dfs_mark_primary_bases_queue_p): Likewise.
10758 (dfs_unmarked_real_bases_queue_p): New function.
10759 (dfs_marked_real_bases_queue_p): Likewise.
10760 * search.c (dfs_mark_primary_bases): Adjust.
10761 (mark_primary_bases): Likewise.
10762 (get_shared_vbase_if_not_primary): New function.
10763 (dfs_unmarked_real_bases_queue_p): Likewise.
10764 (dfs_marked_real_bases_queue_p): Likewise.
10765 (dfs_get_pure_virtuals): Simplify.
10766 (get_pure_virtuals): Likewise.
10767
10768 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10769
10770 * lex.c: Include tm_p.h.
10771
10772 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
10773
10774 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
10775
10776 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
10777
10778 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
10779 * pt.c (instantiate_decl): Defer comdat templates that might not be
10780 needed.
10781
10782 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
10783 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
10784 (finish_file): Likewise.
10785
10786 * decl2.c (import_export_class): Undo 12/14 change.
10787
10788 * error.c (dump_decl): operator new, not operatornew.
10789
10790 * class.c (field_decl_cmp): A nontype is "greater" than a type.
10791 * search.c (lookup_field_1): Look for the last field with the
10792 desired name.
10793
10794 2000-01-05 Nathan Sidwell <nathan@acm.org>
10795
10796 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
10797 FUNCTION_DECL.
10798
10799 2000-01-05 Nathan Sidwell <nathan@acm.org>
10800
10801 * typeck.c (build_static_cast): Don't strip target qualifiers
10802 when casting from a class.
10803
10804 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10805
10806 * class.c (warn_hidden): Initialize variable `fndecl'.
10807
10808 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
10809
10810 * decl.c (flag_isoc9x): New variable to be able to use code in
10811 c-common.c. For now always zero.
10812
10813 2000-01-03 Mark Mitchell <mark@codesourcery.com>
10814
10815 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
10816 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
10817 or unshare_base_binfos for virtual bases here.
10818 * search.c (dfs_get_vbase_types): Do it here.
10819 (get_vbase_types): Adjust.
10820
10821 2000-01-02 Mark Mitchell <mark@codesourcery.com>
10822
10823 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
10824 (BINFO_PRIMARY_MARKED_P): Use flag 5.
10825 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10826 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10827 (unmark_primary_bases): Remove declaration.
10828 (unmarkedp): Declare.
10829 (dfs_vbase_unmark): Likewise.
10830 * class.c (determine_primary_base): Return immediately if there
10831 are no base classes. Call mark_primary_bases here.
10832 (modify_all_direct_vtables): Remove.
10833 (modify_all_indirect_vtables): Remove.
10834 (dfs_modify_vtables_queue_p): New function.
10835 (dfs_modify_vtables): New function.
10836 (modify_all_vtables): Use them.
10837 (build_base_fields): Build FIELD_DECLs for primary virtual base
10838 classes.
10839 (create_vtable_ptr): Don't call determine_primary_base here.
10840 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
10841 (dfs_set_offset_for_vbases): ... this.
10842 (layout_virtual_bases): Use it.
10843 (layout_class_type): Call determine_primary_base here.
10844 * search.c (unmarkedp): Make it global.
10845 (shared_marked_p): Simplify.
10846 (shared_unmarked_p): Likewise.
10847 (dfs_primary_bases_queue_p): Remove.
10848 (dfs_unmark_primary_bases): Likewise.
10849 (unmark_primary_bases): Likewise.
10850 (mark_primary_bases): Simplify.
10851 (get_pure_virtuals): Don't call mark_primary_bases here.
10852 (dfs_vbase_unmark): New function.
10853 (get_vbase_types): Simplify.
10854
10855 * class.c (struct base_info): Remove.
10856 (determine_primary_base): Take has_virtual_p rather than a
10857 base_info as input. Don't calculate max_has_virtual.
10858 (finish_struct_bits): Remove max_has_virtual argument.
10859 (create_vtable_ptr): Remove max_has_virtual_p argument.
10860 (layout_virtual_bases): Remove max argument.
10861 (layout_basetypes): Likewise.
10862 (layout_class_type): Remove max_has_virtual_p argument.
10863 (finish_struct_1): Remove max_has_virtual.
10864
10865 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
10866 (layout_basetypes): Remove.
10867 * class.c (propagate_binfo_offsets): Moved here from tree.c.
10868 Update to handle primary virtual bases.
10869 (remove_base_fields): New function, split out from
10870 layout_basetypes.
10871 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
10872 (layout_virtual_bases): New function, split out from
10873 layout_basetypes. Update to handle primary virtual bases.
10874 (layout_basetypes): Moved here from tree.c. Use
10875 remove_base_fields and layout_virtual_bases.
10876 * search.c (dfs_mark_primary_bases_queue_p): New function.
10877 (mark_primary_bases): Use it.
10878 * tree.c (CEIL): Remove.
10879 (propagate_binfo_offsets): Remove.
10880 (layout_basetypes): Remove.
10881
10882 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10883
10884 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
10885 (BINFO_PRIMARY_MARKED_P): New macro.
10886 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10887 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10888 (mark_primary_bases): New function.
10889 (unmark_primary_bases): Likewise.
10890 * search.c (get_abstract_virtuals_1): Remove.
10891 (dfs_mark_primary_bases): New function.
10892 (mark_primary_bases): Likewise.
10893 (dfs_unmark_primary_bases): Likewise.
10894 (unmark_primary_bases): Likewise.
10895 (dfs_get_pure_virtuals): Likewise.
10896
10897 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10898
10899 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
10900 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
10901 (modify_one_vtable): Adjust.
10902 (fixup_vtable_deltas1): Likewise.
10903 (override_one_vtable): Likewise.
10904 * search.c (get_abstract_virtuals_1): Likewise.
10905 (get_pure_virtuals): Likewise.
10906 (expand_upcast_fixups): Likewise.
10907 * tree.c (debug_binfo): Likewise.
10908
10909 * class.c (build_vtable): Don't return a value. Don't rebuild
10910 vtables for bases that have already been handled.
10911 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
10912 already been handled.
10913 (modify_one_vtable): Adjust accordingly.
10914 (fixup_vtable_deltas1): Likewise.
10915 (finish_struct_1): Likewise.
10916
10917 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10918
10919 * call.c (build_new_method_call): Also check destructors.