492a4dc461903cc5fc44b2def5539517a18d4a43
[gcc.git] / gcc / cp / ChangeLog
1 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2
3 * search.c (lookup_fnfields_here): Remove.
4 (look_for_overrides_r): Use lookup_fnfields_1.
5 Ignore functions from using declarations.
6
7 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
8
9 Implement exceptions specifiers for implicit member functions.
10 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11 * method.c (synthesize_exception_spec): New function.
12 (locate_dtor, locate_ctor, locate_copy): New functions.
13 (implicitly_declare_fn): Generate the exception spec too.
14 * search.c (check_final_overrider): Check artificial functions
15 too.
16 * typeck2.c (merge_exception_specifiers): New function.
17
18 2001-01-03 Jason Merrill <jason@redhat.com>
19
20 * init.c (build_default_init): New fn.
21 (perform_member_init): Split out from here.
22 (build_new_1): Use it. Simplify initialization logic.
23 (build_vec_init): Take an array, rather than a pointer and maxindex.
24 Speed up simple initializations. Don't clean up if we're assigning.
25 * cp-tree.h: Adjust.
26 * decl2.c (do_static_initialization): Remove TREE_VEC case.
27 * parse.y (new_initializer): Return void_zero_node for ().
28 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
29 * typeck2.c (digest_init): Only complain about user-written
30 CONSTRUCTORs.
31
32 2000-12-22 Mike Stump <mrs@wrs.com>
33
34 * decl2.c: (max_tinst_depth): Increase to 50.
35
36 2001-01-02 Mark Mitchell <mark@codesourcery.com>
37
38 * class.c (invalidate_class_lookup_cache): Zero the
39 previous_class_values.
40 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
41 TREE_INT_CST_HIGH.
42 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
43 * decl.c (free_bindings): New variable.
44 (push_binding): Don't create a new binding if we have one on the
45 free list.
46 (pop_binding): Put old bindings on the free list.
47 (init_decl_processing): Use size_int, not build_int_2.
48 Register free_bindings as a GC root.
49 (cp_make_fname_decl): Use size_int, not build_int_2.
50 (push_inline_template_parms_recursive): Likewise.
51 (end_template_parm_list): Likewise.
52 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
53 (tsubst_template_parms): Use size_int, not build_int_2.
54 (tsubst): Likewise.
55 * rtti.c (get_vmi_pseudo_type_info): Likewise.
56
57 2001-01-02 Richard Henderson <rth@redhat.com>
58
59 * parse.y (asm): Set ASM_INPUT_P.
60
61 2001-01-02 Jason Merrill <jason@redhat.com>
62
63 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
64 for v3 ABI.
65
66 * typeck.c (cp_truthvalue_conversion): New fn.
67 * cvt.c (ocp_convert): Use it.
68
69 * cp-tree.h: Lose c-common.c decls.
70
71 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
72 * cvt.c (convert_to_void): Use type_unknown_p.
73
74 * typeck.c (strip_all_pointer_quals): Also strip quals from
75 pointer-to-member types.
76
77 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
78 parse.y as C.
79
80 * call.c (build_new_method_call): Do evaluate the object parameter
81 when accessing a static member.
82 * typeck.c (build_component_ref): Likewise.
83
84 2001-01-02 Andreas Jaeger <aj@suse.de>
85
86 * decl.c (cp_missing_noreturn_ok_p): New.
87 (init_decl_processing): Set lang_missing_noreturn_ok_p.
88
89 2000-12-29 Jakub Jelinek <jakub@redhat.com>
90
91 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
92
93 2000-12-29 Mark Mitchell <mark@codesourcery.com>
94
95 * class.c (pushclass): Remove #if 0'd code.
96 * cp-tree.h (overload_template_name): Remove.
97 * decl.c (store_bindings): Simplify.
98 (pop_from_top_level): Likewise.
99 * pt.c (overload_template_name): Remove.
100 (instantiate_decl): Don't call push_to_top_level if it's not
101 needed.
102
103 2000-12-28 Mark Mitchell <mark@codesourcery.com>
104
105 * pt.c (register_local_specialization): Don't return a value.
106 (lookup_template_class): Use move-to-front heuristic when looking
107 up template instantiations.
108 (instantiate_decl): Only push_to_top_level when we're actually
109 going to instantiate the template.
110
111 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
112
113 * search.c (binfo_for_vtable): Return least derived class, not
114 most. Handle secondary vtables.
115
116 2000-12-22 Jason Merrill <jason@redhat.com>
117
118 * pt.c (more_specialized): Don't optimize len==0.
119 (fn_type_unification): If we're adding the return type, increase len.
120
121 * typeck.c (build_binary_op): Fix pmf comparison logic.
122
123 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
124 DECL_STATIC_FUNCTION_P.
125
126 * semantics.c (genrtl_finish_function): Don't try to jump to
127 return_label unless it exists.
128
129 In partial ordering for a call, ignore parms for which we don't have
130 a real argument.
131 * call.c (joust): Pass len to more_specialized.
132 (add_template_candidate_real): Strip 'this', pass len.
133 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
134 (get_bindings_order): New fn. Pass len down.
135 (get_bindings_real): Strip 'this', pass len.
136 (fn_type_unification): Likewise.
137 (type_unification_real): Succeed after checking 'len' args.
138 (most_specialized_instantiation): Lose explicit_args parm.
139 * class.c (resolve_address_of_overloaded_function): Strip 'this',
140 pass len.
141
142 2000-12-21 Jason Merrill <jason@redhat.com>
143
144 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
145 DECL_TEMPLATE_RESULT.
146
147 * search.c (lookup_field_r): Call lookup_fnfields_1, not
148 lookup_fnfields_here.
149
150 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
151
152 * call.c (build_object_call): Also allow conversions that return
153 reference to pointer to function.
154 (add_conv_candidate): Handle totype being ref to ptr to fn.
155 (build_field_call): Also allow members of type reference to function.
156 Lose support for calling pointer to METHOD_TYPE fields.
157
158 * error.c (dump_expr): Handle *_CAST_EXPR.
159
160 * typeck2.c (build_scoped_ref): Always convert to the naming class.
161
162 * tree.c (break_out_cleanups): Lose.
163 * cp-tree.h: Remove prototype.
164 * typeck.c (build_component_ref): Don't break_out_cleanups.
165 (build_compound_expr): Likewise.
166 * semantics.c (finish_expr_stmt): Likewise.
167
168 2000-12-20 Richard Henderson <rth@redhat.com>
169
170 * cp-tree.h: Update declarations.
171 * decl.c (finish_case_label): Return the new stmt node.
172 * semantics.c (finish_goto_stmt): Likewise.
173 (finish_expr_stmt, finish_return_stmt): Likewise.
174 (finish_break_stmt, finish_continue_stmt): Likewise.
175 (finish_asm_stmt): Likewise.
176 * parse.y (already_scoped_stmt): Set STMT_LINENO.
177 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
178 (simple_if, simple_stmt): Return the new stmt node.
179 (save_lineno): New.
180
181 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
182
183 * cp-tree.h: Don't declare warn_long_long.
184
185 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
186
187 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
188 IS_AGGR_TYPE.
189
190 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
191
192 * pt.c (unify): Handle when both ARG and PARM are
193 BOUND_TEMPLATE_TEMPLATE_PARM.
194
195 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
196
197 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
198 DECL_TEMPLATE_PARM_P.
199
200 2000-12-15 Jason Merrill <jason@redhat.com>
201
202 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
203
204 * init.c (build_new_1): Don't strip quals from type.
205
206 * decl.c (pushdecl): Don't check for linkage on a non-decl.
207
208 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
209
210 * call.c (build_new_function_call): Lose space before paren in
211 error message.
212 (build_new_method_call): Likewise.
213
214 * typeck2.c (build_m_component_ref): Propagate quals from datum.
215
216 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
217
218 * pt.c (check_explicit_specialization): Propagate default
219 function arguments to explicit specializations.
220
221 2000-12-13 DJ Delorie <dj@redhat.com>
222
223 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
224 and <? operators.
225
226 2000-12-08 Jason Merrill <jason@redhat.com>
227
228 * error.c (dump_function_name): Don't let the user see __comp_ctor.
229
230 Clean up copy-initialization in overloading code.
231 * call.c (build_user_type_conversion_1): Die if we are asked to
232 convert to the same or a base type.
233 (implicit_conversion): Avoid doing so. Lose reference binding code.
234 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
235 direct-initialization. Also do direct-init part of copy-init.
236 (build_user_type_conversion): Don't provide context to convert_like.
237 * cvt.c (ocp_convert): build_user_type_conversion will now provide
238 the constructor call for copy-init.
239
240 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
241 instantiation of a member template.
242 (do_decl_instantiation): Not here.
243
244 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
245
246 * class.c (check_field_decls): Don't special case anonymous
247 fields in error messages.
248 (note_name_declared_in_class): Use %D on diagnostic.
249
250 * tree.c (pod_type_p): Use strip_array_types.
251 (cp_valid_lang_attribute): Likewise.
252 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
253 multiple evaluations.
254 (cp_has_mutable_p): Use strip_array_types.
255
256 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
257
258 * cp-tree.h (sufficient_parms_p): Declare new function.
259 * call.c (sufficient_parms_p): New function, broken out of ...
260 (add_function_candidate): ... here. Use it.
261 (add_conv_candidate): Use it.
262 * decl.c (grok_ctor_properties): Use it.
263
264 2000-12-07 Jakub Jelinek <jakub@redhat.com>
265
266 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
267
268 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
269
270 * decl2.c (lang_decode_option): Handle -Wformat-security.
271
272 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
273
274 * pt.c (verify_class_unification): New function.
275 (get_class_bindings): Use it.
276 (try_class_unification): Tidy.
277 (unify): Handle when argument of a template-id is not
278 template parameter dependent.
279 (template_args_equal): Handle when TREE_CODE's do not match.
280
281 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
282
283 * lang-specs.h (c++): When invoking the stand-alone preprocessor
284 for -save-temps, pass all relevant -Defines to it, and then don't
285 pass them to cc1plus.
286
287 2000-12-05 Will Cohen <wcohen@redhat.com>
288
289 * decl.c (finish_case_label): Cleared
290 more_cleanups_ok in surrounding function scopes.
291 (define_label): Likewise.
292
293 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
294
295 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
296 (get_matching_virtual): Remove.
297 (look_for_overrides): Declare new function.
298 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
299 DECL_VINDEX here.
300 * class.c (check_for_override): Move base class iteration code
301 to look_for_overrides.
302 * search.c (next_baselink): Remove.
303 (get_virtuals_named_this): Remove.
304 (get_virtual_destructor): Remove.
305 (tree_has_any_destructors_p): Remove.
306 (struct gvnt_info): Remove.
307 (check_final_overrider): Remove `virtual' from error messages.
308 (get_matching_virtuals): Remove. Move functionality to ...
309 (look_for_overrides): ... here, and ...
310 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
311 to be overriding.
312
313 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
314
315 * typeck.c (get_delta_difference): If via a virtual base,
316 return zero.
317 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
318 adjustment.
319
320 2000-12-04 Richard Henderson <rth@redhat.com>
321
322 * error.c (dump_tree): Use output_add_string not OB_PUTS.
323
324 2000-12-04 Jason Merrill <jason@redhat.com>
325
326 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
327 (write_builtin_type): Pass intSI_type_node and the like through
328 type_for_mode.
329 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
330 Pass intSI_type_node and the like through type_for_mode.
331 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
332 * pt.c (tsubst, unify): Likewise.
333 * tree.c (walk_tree): Likewise.
334 * error.c (dump_type): Likewise.
335 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
336
337 * Make-lang.in: Tweak top comment for emacs.
338 (cp/TAGS): Restore.
339
340 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
341
342 * class.c (clone_function_decl): Robustify.
343
344 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
345
346 * decl.c (store_bindings): Only search in the non modified
347 old_bindings for duplicates.
348
349 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
350
351 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
352 TYPE_POLYMORPHIC_P.
353
354 * typeck.c (build_static_cast): Remove unused variable.
355
356 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
357
358 * pt.c: Fix typo in comment.
359
360 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
361
362 * decl2.c (warn_format): Remove definition.
363 (lang_decode_option): Handle -Wformat-nonliteral,
364 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
365
366 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
367
368 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
369 (init_decl_processing): Don't create string_type_node,
370 const_string_type_node, wint_type_node, intmax_type_node,
371 uintmax_type_node, default_function_type, ptrdiff_type_node and
372 unsigned_ptrdiff_type_node. Adjust position of call to
373 c_common_nodes_and_builtins.
374 (identifier_global_value): New function.
375
376 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
377
378 * call.c (standard_conversion): Reject pointer to member
379 conversions from ambiguous, inaccessible or virtual bases.
380 * typeck.c (build_static_cast): Don't check pointers to members
381 specially.
382
383 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
384
385 * method.c (do_build_copy_constructor): Preserve cv
386 qualifications when accessing source object members.
387 (do_build_assign_ref): Likewise. Remove separate diagnostics for
388 unnamed fields.
389
390 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
391
392 * method.c (do_build_assign_ref): Construct appropriately
393 CV-qualified base reference. Don't allow const casts in base
394 conversion.
395
396 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
397
398 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
399 incomplete return type.
400
401 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
402
403 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
404 * semantics.c (finish_base_specifier): Accept a _TYPE not a
405 _DECL.
406
407 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
408
409 * spew.c (yyerror): Cope if yylval.ttype is NULL.
410
411 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
412
413 * decl.c (grokdeclarator): Diagnose undefined template contexts.
414
415 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
416
417 * decl.c (grokdeclarator): Do type access control on friend
418 class.
419
420 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
421
422 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
423 bison parser ickiness.
424 * pt.c (tsubst_friend_function): Enter namespace scope when
425 tsubsting the function name.
426 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
427
428 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
429
430 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
431 * cvt.c (cp_convert_to_pointer): Add force parameter.
432 Allow conversions via virtual base if forced.
433 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
434 (ocp_convert): Likewise.
435 * search.c (binfo_from_vbase): Return the virtual base's binfo.
436 * typeck.c (get_delta_difference): Adjust handling of virtual
437 bases.
438
439 2000-11-26 Mark Mitchell <mark@codesourcery.com>
440
441 * tree.c (struct list_hash): Remove.
442 (list_hash_table): Make it be an htab.
443 (struct list_proxy): New type.
444 (list_hash_eq): New function.
445 (list_hash_pieces): Renamed from ...
446 (list_hash): ... this.
447 (list_hash_lookup): Remove.
448 (list_hash_add): Remove.
449 (hash_tree_cons): Use the generic hashtable.
450 (mark_list_hash): Remove.
451 (init_tree): Create the hashtable.
452
453 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
454
455 * method.c (build_mangled_C9x_name): Rename to
456 build_mangled_C99_name. Change C9X references in comments to
457 refer to C99.
458
459 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
460
461 * parse.y (unary_expr): Move VA_ARG from here ...
462 (primary): ... to here.
463
464 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
465
466 * semantics.c (finish_id_expr): If type is error_mark, return
467 error_mark.
468
469 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
470
471 * pt.c (lookup_template_class): Simplify loop exit constructs.
472 Cope when there is no partial instantiation of a template
473 template member.
474
475 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
476
477 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
478
479 2000-11-22 Mark Mitchell <mark@codesourcery.com>
480
481 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
482 prefix.
483
484 * pt.c (do_decl_instantiate): Explicitly clone constructors and
485 destructors that haven't already been cloned.
486
487 2000-11-20 Richard Henderson <rth@redhat.com>
488
489 * parse.y (yyparse_1): Rename the parser entry point.
490
491 2000-11-20 Alex Samuel <samuel@codesourcery.com>
492
493 * mangle.c (write_name): Use <unscoped-name> for names directly in
494 function scope.
495 (write_unscoped_name): Accept names directly in function scope.
496
497 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
498
499 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
500 * parse.y (extdef): Add EXPORT reduction.
501 * spew.c (yylex): Don't skip export here.
502
503 2000-11-19 Mark Mitchell <mark@codesourcery.com>
504
505 * decl.c (init_decl_processing): Correct name of pure virtual
506 function under the new ABI.
507 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
508 (throw_bad_typeid): Likewise for bad typeid function.
509
510 2000-11-18 Mark Mitchell <mark@codesourcery.com>
511
512 * decl.c (grokparms): Don't even function types of `void' type,
513 either.
514 * mangle.c (write_type): Don't crash when confronted with the
515 error_mark_node.
516
517 * decl.c (grokparms): Don't create parameters of `void' type.
518
519 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
520
521 * lex.c (mark_impl_file_chain): Delete.
522 (init_parse): Remove call to ggc_add_string_root. No need to
523 ggc_strdup a string constant. Do not add impl_file_chain to GC
524 roots.
525 (handle_pragma_implementation): No need to ggc_strdup main_filename.
526
527 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
528
529 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
530
531 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
532
533 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
534 * decl.c (grokdeclarator): Don't reject void parms here.
535 (require_complete_types_for_parms): Simplify, use
536 complete_type_or_else.
537 (grokparms): Remove bitrot. Remove funcdef parm.
538 Deal with ellipsis parm lists here.
539 * semantics.c (finish_parmlist): Don't append void_list_node
540 here. Set PARMLIST_ELLIPSIS_P.
541
542 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
543
544 * typeck2.c (incomplete_type_error): Reorganise to avoid
545 excessive diagnostics.
546
547 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
548
549 * lex.c (struct impl_files, internal_filename): Constify a char *.
550
551 2000-11-16 Mark Mitchell <mark@codesourcery.com>
552
553 * mangle.c (write_special_name_constructor): Don't generate
554 assembler junk when confronted with an old-style constructor.
555 (write_special_name_destructor): Likewise.
556 (mangle_decl_string): Do it here instead.
557
558 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
559
560 * call.c (op_error): Make error messages clearer.
561
562 2000-11-15 Mark Mitchell <mark@codesourcery.com>
563
564 * decl.c (wrapup_globals_for_namespace): Don't mark things
565 TREE_ASM_WRITTEN when they're not.
566
567 2000-11-15 Jason Merrill <jason@redhat.com>
568
569 * typeck2.c (friendly_abort): Uncount the error before handing
570 off to fancy_abort.
571
572 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
573
574 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
575
576 2000-11-14 Mark Mitchell <mark@codesourcery.com>
577
578 * class.c (build_vtbl_initializer): Fix typo in comment.
579 * typeck.c (expr_sizeof): Don't crash on errors.
580
581 2000-11-14 Jim Wilson <wilson@redhat.com>
582
583 * lang-specs.h: Add %2 after %(cc1_options).
584
585 2000-11-14 Richard Henderson <rth@redhat.com>
586
587 * typeck.c (c_sizeof): Be strict about casting result value
588 back to c_size_type_node.
589 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
590
591 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
592
593 * typeck.c (build_unary_op): Use boolean_increment from
594 c-common.c, moving the relevant code there.
595
596 2000-11-11 Jason Merrill <jason@redhat.com>
597
598 * typeck.c (mark_addressable): Don't call put_var_into_stack.
599
600 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
601 in inlines.
602
603 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
604
605 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
606 * lex.c (copy_lang_decl): Likewise.
607
608 2000-11-09 Mark Mitchell <mark@codesourcery.com>
609
610 * dump.c (cp_dump_tree): Don't dump function bodies here.
611
612 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
613 (dump.o): Update dependency list.
614 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
615 (flag_dump_translation_unit): Likewise.
616 (CP_TYPE_QUALS): Adjust definition.
617 (DECL_C_BIT_FIELD): Remove.
618 (SET_DECL_C_BIT_FIELD): Likewise.
619 (CLEAR_DECL_C_BIT_FIELD): Likewise.
620 (add_maybe_template): Likewise.
621 (strip_array_types): Likewise.
622 (dump_node_to_file): Likewise.
623 (cp_dump_tree): New function.
624 * decl.c (init_decl_processing): Set lang_dump_tree.
625 * decl2.c (flag_dump_translation_unit): Remove.
626 * dump.c: Move most of it to ../c-dump.c.
627 (cp_dump_tree): New function.
628 * pt.c (add_maybe_template): Remove.
629 * typeck.c (strip_array_types): Likewise.
630
631 2000-11-07 Eric Christopher <echristo@redhat.com>
632
633 * decl.c (init_decl_processing): Change definition of
634 __wchar_t to wchar_t. Remove artificial declaration of
635 wchar_t.
636 * lex.c: Change instances of __wchar_t to wchar_t.
637
638 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
639
640 * lex.c (do_identifier): Don't lookup_name for operators.
641 * parse.y (operator): Save looking_for_typename.
642 (unoperator): Restore it.
643 * spew.c (frob_opname): Use nth_token for lookahead.
644
645 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
646
647 * decl.c (grok_op_properties): Always use coerce_new_type and
648 coerce_delete_type.
649 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
650 exception specification. Tidy up.
651 (coerce_delete_type): Preserve exception specification. Tidy up.
652
653 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
654
655 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
656 (push_binding_level), error.c (cp_tree_printer), pt.c
657 (process_partial_specialization, tsubst_template_arg_vector),
658 search.c (lookup_member): Use memset () instead of bzero ().
659
660 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
661
662 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
663
664 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
665
666 * Make-lang.in (c++.distdir): Remove.
667
668 2000-11-04 Mark Mitchell <mark@codesourcery.com>
669
670 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
671 declarations from different namespaces to be combined.
672
673 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
674
675 * decl.c: Include tm_p.h.
676
677 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
678
679 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
680
681 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
682
683 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
684 (build_overload_value), repo.c (open_repo_file), xref.c
685 (open_xref_file): Use strchr () and strrchr () instead of index ()
686 and rindex ().
687
688 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
689
690 * call.c (build_over_call): Call fold on the CALL_EXPR.
691
692 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
693
694 * error.c (dump_template_decl): Separate template hearders with
695 space not comma.
696
697 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
698
699 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
700 TS_* flags with corresponding TFF_*. Adjust prototypes of
701 functions (which used to take a tree_string_flags) to take an int.
702
703 * cp-tree.h (enum tree_string_flags): Remove
704 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
705 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
706 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
707 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
708 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
709 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
710 (type_as_string, decl_as_string, expr_as_string,
711 context_as_string): Adjust prototype.
712
713 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
714 instead of TS_PLAIN.
715
716 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
717 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
718 plain `0'.
719
720 2000-10-30 Mark Mitchell <mark@codesourcery.com>
721
722 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
723 (linkage_kind): New enumeration.
724 (decl_linkage): New function.
725 * decl2.c (comdat_linkage): Extend comment.
726 * error.c (dump_function_decl): Print the arguments used to
727 instantiate a template, even when not printing the type of the
728 function.
729 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
730 not TREE_PUBLIC, to test for external linkage.
731 * tree.c (decl_linkage): New function.
732
733 2000-10-28 Mark Mitchell <mark@codesourcery.com>
734
735 * pt.c (instantiate_decl): Always instantiate static data members
736 initialized in-class.
737
738 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
739
740 * Make-lang.in: Move all build rules here from Makefile.in,
741 adapt to new context. Wrap all rules that change the current
742 directory in parentheses. Expunge all references to $(P).
743 When one command depends on another and they're run all at
744 once, use && to separate them, not ;. Add OUTPUT_OPTION to
745 all object-file generation rules. Delete obsolete variables.
746
747 * Makefile.in: Delete.
748 * config-lang.in: Delete outputs= line.
749
750 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
751
752 * error.c (dump_function_decl): Print no space between
753 `ptr-operator' the `type-specifier' of the return type.
754 (dump_type_prefix): Make sure we put space at the appropriate
755 place.
756
757 2000-10-23 Jason Merrill <jason@redhat.com>
758
759 * call.c (equal_functions): Also call decls_match for extern "C" fns.
760
761 2000-10-22 Jason Merrill <jason@redhat.com>
762
763 * call.c (build_conditional_expr): Use ocp_convert to force
764 rvalue conversion.
765
766 2000-10-22 Mark Mitchell <mark@codesourcery.com>
767
768 * call.c (standard_conversion): Use RVALUE_CONVs for all
769 expressions that satisfy lvalue_p, not just those that satisfy
770 real_lvalue_p.
771
772 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
773
774 * typeck.c (c_sizeof): Return an expression of `size_t' type,
775 not one with TYPE_IS_SIZETYPE set.
776 (dubious_conversion_warnings): Remove special-case code.
777
778 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
779
780 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
781 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
782 (dump_type_prefix): Print vector-of-int as 'int vector'.
783 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
784 * tree.c (walk_tree): Handle VECTOR_TYPE.
785
786 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
787
788 2000-10-21 Jason Merrill <jason@redhat.com>
789
790 * parse.y (operator): Set got_object from got_scope.
791 Set looking_for_typename.
792 * decl.c (lookup_name_real): Clear val after setting from_obj.
793 Reorganize diagnostic.
794
795 2000-10-20 Jason Merrill <jason@redhat.com>
796
797 * tree.c (walk_tree): Don't walk into default args.
798
799 * error.c (dump_expr): Use host_integerp.
800
801 2000-10-20 David Edelsohn <edelsohn@gnu.org>
802
803 * typeck2.c (abstract_virtuals_error): Use "because" instead of
804 "since" in error message.
805
806 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
807
808 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
809
810 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
811
812 * decl.c (revert_static_member_fn): Fixed typo.
813
814 2000-10-19 Mark Mitchell <mark@codesourcery.com>
815
816 * class.c (subobject_offset_fn): New type.
817 (dfs_record_base_offsets): Remove.
818 (record_base_offsets): Likewise.
819 (dfs_search_base_offsets): Likewise.
820 (record_subobject_offset): New function.
821 (check_subobject_offset): Likewise.
822 (walk_subobject_offsets): Likewise.
823 (record_subobject_offsets): Likewise.
824 (layout_conflict_p): Reimplement.
825 (layout_nonempty_base_or_field): Correct handling of type
826 conflicts during layout.
827 (layout_empty_base): Likewise.
828 (build_base_field): Adjust to handle new representation of empty
829 base offset table.
830 (build_base_fields): Likewise.
831 (layout_virtual_bases): Likewise.
832 (splay_tree_compare_integer_csts): New function.
833 (layout_class_type): Use a splay_tree, rather than a varray, to
834 represent the offsets of empty bases.
835
836 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
837 * decl.c (select_decl): Don't return declarations that are
838 DECL_ANTICIPATED.
839
840 2000-10-18 Mark Mitchell <mark@codesourcery.com>
841
842 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
843 (fake_std_node): New macro.
844 * decl.c (in_std): Rename to ...
845 (in_fake_std): ... this.
846 (flag_no_builtin): Remove.
847 (flag_no_nonansi_builtin): Likewise.
848 (walk_namespaces_r): Use fake_std_node.
849 (push_namespace): Use std_identifier.
850 (pop_namespace): Use in_fake_std.
851 (lookup_name_real): Use fake_std_node.
852 (init_decl_processing): When -fhonor-std, create the `std'
853 namespace. Don't create a dummy fake_std_node in that case.
854 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
855 (builtin_function): Put builtins whose names don't begin
856 with `_' in the std namespace.
857 * decl2.c (flag_no_builtin): Remove.
858 (flag_no_nonansi_builtin): Likewise.
859 (set_decl_namespace): Use fake_std_node.
860 (validate_nonmember_using_decl): Likewise.
861 (do_using_directive): Likewise.
862 (handle_class_head): Likewise.
863 * dump.c (dequeue_and_dump): Likewise.
864 * except.c (init_exception_processing): Use std_identifier.
865 * init.c (build_member_call): Use fake_std_node.
866 * rtti.c (init_rtti_processing): Use std_identifier.
867
868 2000-10-17 Mark Mitchell <mark@codesourcery.com>
869
870 * cp-tree.h (back_end_hook): Remove declaration.
871 * decl2.c (back_end_hook): Remove definition.
872
873 * dump.c (dequeue_and_dump): Dump TREE_USED.
874
875 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
876
877 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
878
879 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
880
881 * decl.c (WINT_TYPE): Define.
882 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
883 c_size_type_node, signed_size_type_node and wint_type_node.
884
885 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
886
887 * decl2.c (warn_missing_format_attribute): New variable.
888 (lang_decode_option): Decode -Wmissing-format-attribute.
889
890 2000-10-16 Mark Mitchell <mark@codesourcery.com>
891
892 * typeck.c (qualify_type): Remove.
893 (composite_pointer_type): Fix handling of conversions to `cv void*'.
894
895 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
896
897 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
898
899 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
900
901 * Makefile.in (parse.c, parse.h): Create atomically.
902
903 2000-10-12 Mark Mitchell <mark@codesourcery.com>
904
905 * class.c (current_obstack): Remove.
906 * decl.c (ggc_p): Remove.
907 (start_decl): Don't use decl_tree_cons.
908 (grokdeclarator): Don't use build_decl_list.
909 (start_function): Don't use decl_tree_cons.
910 (finish_function): Don't mess with obstacks.
911 * decl2.c (grok_x_components): Don't use build_decl_list.
912 * lex.c (make_call_declarator): Don't call decl_tree_cons.
913 (implicitly_declare_fn): Don't call build_decl_list.
914 * parse.y (frob_specs): Don't call build_decl_list or
915 decl_tree_cons.
916 (expr_or_declarator_intern): Don't call decl_tree_cons.
917 (primary): Don't call build_decl_list.
918 (fcast_or_absdcl): Likewise.
919 (typed_declspecs): Don't call decl_tree_cons.
920 (reserved_declspecs): Don't call build_decl_list.
921 (declmods): Likewise.
922 (reserved_typespecquals): Likewise.
923 (aggr): Likewise.
924 (new_type_id): Likewise.
925 (cv_qualifiers): Likewise.
926 (after_type_declarator_intern): Likewise.
927 (notype_declarator_intern): Likewise.
928 (absdcl_intern): Likewise.
929 (named_parm): Likewise.
930 * pt.c (most_specialized_class): Likewise.
931 * repo.c (temporary_obstack): Make it a structure, not a pointer.
932 (init_repo): Initialize it.
933 * search.c (current_obstack): Remove.
934 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
935
936 2000-10-09 Richard Henderson <rth@cygnus.com>
937
938 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
939 (c++ language support bits for libgcc): Remove.
940 (c++.clean): Remove cplib2.txt cleanup.
941 * config-lang.in (headers, lib2funcs): Remove.
942
943 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
944 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
945 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
946 * inc/new.h, inc/typeinfo: Remove files.
947
948 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
949
950 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
951 defined.
952 (init_decl_processing): Initialize intmax_type_node and
953 uintmax_type_node.
954
955 2000-10-06 Richard Henderson <rth@cygnus.com>
956
957 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
958 (original_result_rtx): Remove.
959 * decl.c (save_function_data): Don't clear x_result_rtx.
960 (mark_lang_function): Don't mark it either.
961 * expr.c (fixup_result_decl): Remove.
962 * semantics.c (genrtl_named_return_value): Frob the return decl
963 before calling emit_local_var.
964 (genrtl_finish_function): Don't call fixup_result_decl.
965 Always emit the jump to return_label.
966
967 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
968
969 * pt.c (lookup_template_class): Set current access for enum.
970 (tsubst_enum): Set file & line for enum decl.
971
972 * spew.c (yylex): Remove unused variable.
973
974 2000-10-05 Richard Henderson <rth@cygnus.com>
975
976 * semantics.c (genrtl_finish_function): Don't init or check
977 can_reach_end; remove noreturn and return value checks.
978
979 2000-10-05 Tom Tromey <tromey@cygnus.com>
980
981 * init.c (build_java_class_ref): Use `build_static_name' with a
982 suffix, not a prefix, to build the class object's name.
983
984 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
985
986 * cp-tree.h (access_kind): Fix comment typo.
987 * decl2.c (grokfield): Fix diagnostic typo.
988 * semantics.c (finish_template_type): Fix comment typo.
989 (finish_qualified_object_call_expr): Likewise.
990
991 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
992
993 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
994 tsubsting fails.
995
996 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
997
998 * spew.c (frob_id): New static function.
999 (frob_opname): Use it.
1000 (yylex): Use it.
1001
1002 2000-10-01 Mark Mitchell <mark@codesourcery.com>
1003
1004 * decl.c (lang_mark_false_label_stack): Remove.
1005 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1006
1007 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
1008
1009 * gxxint.texi: Use @email for formatting email addresses.
1010
1011 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
1012
1013 * error.c: Remove direct obstack manipulation. Replace with
1014 output_buffer-based formatting. Adjust calls to removed macros.
1015 (obstack_chunk_alloc, obstack_chunk_free): Remove.
1016 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1017 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1018
1019 2000-09-24 Mark Mitchell <mark@codesourcery.com>
1020
1021 * ir.texi: Move to ../c-tree.texi.
1022
1023 2000-09-20 Jason Merrill <jason@redhat.com>
1024
1025 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1026
1027 2000-09-21 Andreas Jaeger <aj@suse.de>
1028
1029 * errfn.c: Move declaration of cp_printer and cp_printers to ...
1030 * cp-tree.h: ... here.
1031
1032 * error.c: Remove declaration of cp_printer.
1033
1034 2000-09-20 Mark Mitchell <mark@codesourcery.com>
1035
1036 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1037
1038 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
1039
1040 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1041 users.
1042
1043 2000-09-18 Mark Mitchell <mark@codesourcery.com>
1044
1045 * decl.c (start_function): Robustify.
1046
1047 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1048
1049 * cp-tree.h (check_function_format): Accept a `status' parameter.
1050
1051 * call.c, typeck.c: Updates calls to `check_function_format'.
1052
1053 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
1054
1055 * decl2.c (handle_class_head): Always push some scope even
1056 in the error case.
1057
1058 2000-09-16 Mark Mitchell <mark@codesourcery.com>
1059
1060 * cp-tree.h (struct cp_language_function): Remove
1061 x_scope_stmt_stack and name_declared.
1062 (current_scope_stmt_stack): Remove.
1063 (function_name_declared_p): New macro.
1064 (struct lang_decl_flags): Use c_lang_decl as a base class.
1065 (context): Remove.
1066 (struct lang_decl): Replace saved_tree with context.
1067 (DECL_FRIEND_CONTEXT): Adjust accordingly.
1068 (SET_DECL_FRIEND_CONTEXT): Likewise.
1069 (DECL_VIRTUAL_CONTEXT): Likewise.
1070 (DECL_SAVED_TREE): Remove.
1071 (C_DECLARED_LABEL_FLAG): Likewise.
1072 (cplus_expand_expr_stmt): Don't declare.
1073 (add_decl_stmt): Likewise.
1074 (add_scope_stmt): Likewise.
1075 * decl.c (mark_stmt_tree): Remove.
1076 (case_compare): Likewise.
1077 (finish_case_label): Use c_add_case_label.
1078 (init_decl_processing): Set more language-specific hooks.
1079 (build_enumerator): Fix typo in comment.
1080 (cplus_expand_expr_stmt): Remove.
1081 (mark_lang_function): Use mark_c_language_function.
1082 (lang_mark_tree): Use c_mark_lang_decl.
1083 * decl2.c: Change order of inclusion.
1084 * except.c: Likewise.
1085 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
1086 back on c_expand_expr.
1087 * friend.c: Include expr.h.
1088 * init.c: Change order of inclusion.
1089 * Makefile.in: Update dependencies.
1090 * lex.h (free_lang_decl_chain): Remove.
1091 * optimize.c (maybe_clone_body): Use function_name_declared_p.
1092 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
1093 it doesn't exist.
1094 (instantiate_decl): Use function_name_declared_p.
1095 * semantics.c (lang_expand_expr_stmt): Remove.
1096 (set_current_function_name_declared): Likewise.
1097 (current_function_name_declared): Likewise.
1098 (begin_compound_stmt): Use function_name_declared_p.
1099 (add_decl_stmt): Remove.
1100 (setup_vtbl_ptr): Use function_name_declared_p.
1101 (add_scope_stmt): Remove.
1102 (current_scope_stmt_stack): New function.
1103 (cp_expand_stmt): Don't handle SCOPE_STMTs.
1104 (expand_body): Use function_name_declared_p.
1105 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
1106 * typeck.c: Change order of includes.
1107 (convert_sequence): Remove.
1108
1109 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
1110
1111 * lex.c (reswords): Add _Complex.
1112
1113 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1114
1115 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
1116
1117 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
1118
1119 * init.c (begin_init_stmts): Don't use // comments.
1120
1121 2000-09-12 Jason Merrill <jason@redhat.com>
1122
1123 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
1124 all non-extern arrays.
1125
1126 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
1127 typenames, too. Downgrade complaint to pedwarn.
1128 (xref_tag): Warn about surprising behavior of 'friend struct T'.
1129 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
1130 'class This::Inherited'.
1131
1132 2000-09-12 Mark Mitchell <mark@codesourcery.com>
1133
1134 * decl.c (finish_case_label): Given the LABEL_DECL a
1135 DECL_CONTEXT.
1136
1137 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
1138
1139 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
1140 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
1141 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1142 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1143 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
1144 New macros.
1145 (sorry_for_unsupported_tree, print_scope_operator,
1146 print_left_paren, print_right_paren, print_left_bracket,
1147 print_right_bracket, print_whitespace): Likewise.
1148 (aggr_variety): Rename to class_key_or_enum.
1149 (print_type): Rename to print_type_id.
1150 (print_type_specifier_seq, print_simple_type_specifier,
1151 print_elaborated_type_specifier,
1152 print_rest_of_abstract_declarator,
1153 print_parameter_declaration_clause, print_exception_specification,
1154 print_nested_name_specifier, print_template_id,
1155 typedef_original_name, print_template_argument_list_start,
1156 print_template_argument_list_end): New functions.
1157
1158 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
1159
1160 * ir.texi: Add more documentation.
1161
1162 2000-09-11 Mark Mitchell <mark@codesourcery.com>
1163
1164 * cp-tree.h (struct saved_scope): Remove x_function_parms.
1165 (current_function_parms): Don't define.
1166 (struct cp_language_function): Remove parms_stored.
1167 (current_function_just_assigned_this): Don't define.
1168 (current_function_parms_stored): Likewise.
1169 (static_ctors): Declare.
1170 (static_dtors): Likewise.
1171 (SF_EXPAND): Don't define.
1172 (expand_start_early_try_stmts): Remove declaration.
1173 (store_parm_decls): Likewise.
1174 * decl.c (static_ctors): Don't declare.
1175 (static_dtors): Likewise.
1176 (struct binding_level): Remove this_block.
1177 (poplevel): Remove dead code.
1178 (set_block): Likewise.
1179 (mark_binding_level): Don't mark this_block.
1180 (mark_saved_scope): Don't mark x_function_parms.
1181 (init_decl_processing): Don't add current_function_parms as a GC
1182 root.
1183 (check_function_type): Change prototype.
1184 (start_function): Remove RTL-generation code.
1185 (expand_start_early_try_stmts): Remove.
1186 (store_parm_decls): Give it internal linkage. Remove
1187 RTL-generation code.
1188 (finish_function): Remove RTL-generation code.
1189 * decl2.c (static_ctors): Fix formatting.
1190 (static_dtors): Likewise.
1191 * method.c (use_thunk): Don't call store_parm_decls.
1192 (synthesize_method): Likewise.
1193 * optimize.c (maybe_clone_body): Likewise.
1194 * parse.y (fn.def2): Likewise.
1195 (.set_base_init): Likewise.
1196 (nodecls): Likewise.
1197 * pt.c (instantiate_decl): Likewise.
1198 * rtti.c (synthesize_tinfo_fn): Likewise.
1199 * semantics.c (genrtl_try_block): Simplify.
1200 (expand_body): Use genrtl_start_function and
1201 genrtl_finish_function.
1202 (genrtl_start_function): New function.
1203 (genrtl_finish_function): Likewise.
1204
1205 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
1206
1207 * error.c (cp_tree_printer, case 'P'): Append break.
1208
1209 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
1210
1211 * cp-tree.h (frob_opname): Declare.
1212 * parse.y (saved_scopes): New static variable.
1213 (cp_parse_init): Adjust.
1214 (do_id): If lastiddecl is NULL, do do_identifier.
1215 (operator): Save scope information.
1216 (unoperator): New reduction. Restore scope information.
1217 (operator_name): Append unoperator. Call frob_opname.
1218 * spew.c (frob_opname): Define.
1219
1220 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
1221
1222 * decl.c, rtti.c: Include defaults.h if not already included.
1223 Don't define the *_TYPE_SIZE macros.
1224
1225 2000-09-09 Mark Mitchell <mark@codesourcery.com>
1226
1227 * cp-tree.h (push_switch): Change prototype.
1228 (check_cp_case_value): Remove declaration.
1229 (decl_constant_value): Likewise.
1230 * decl.c (struct cp_switch): Add switch_stmt and cases.
1231 (case_compare): New function.
1232 (push_switch): Set switch_stmt. Initialize cases.
1233 (pop_switch): Clean up cases.
1234 (define_case_label): Rename to ...
1235 (finish_case_label): ... this. Do semantic analysis for case
1236 labels here.
1237 (start_function): Correct comment.
1238 * decl2.c (check_cp_case_value): Remove.
1239 * expr.c (do_case): Remove.
1240 * pt.c (tsubst_expr): Adjust call to finish_case_label.
1241 * semantics.c (genrtl_do_poplevel): Remove declaration.
1242 (RECHAIN_STMTS): Remove.
1243 (finish_break_stmt): Use build_break_stmt.
1244 (finish_continue_stmt): Use build_continue_stmt.
1245 (finish_switch_cond): Adjust condition here, rater than in
1246 c_expand_start_case.
1247 (finish_case_label): Remove.
1248 * typeck.c (c_expand_return): Remove.
1249 (c_expand_start_case): Likewise.
1250
1251 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
1252
1253 * ir.texi: Document type nodes.
1254
1255 2000-09-06 Mark Mitchell <mark@codesourcery.com>
1256
1257 * cp-tree.h (init_cp_semantics): Declare.
1258 (genrtl_try_block): Don't declare.
1259 (genrtl_handler): Likewise.
1260 (genrtl_catch_block): Likewise.
1261 (genrtl_ctor_stmt): Likewise.
1262 (genrtl_subobject): Likewise.
1263 (genrtl_do_poplevel): Likewise.
1264 (genrtl_named_return_value): Likewise.
1265 * lex.c (init_parse): Call init_cp_semantics.
1266 * semantics.c (genrtl_try_block): Give it internal linkage.
1267 (genrtl_handler): Likewise.
1268 (genrtl_catch_block): Likewise.
1269 (genrtl_ctor_stmt): Likewise.
1270 (genrtl_subobject): Likewise.
1271 (genrtl_do_poplevel): Likewise.
1272 (genrtl_named_return_value): Likewise.
1273 (lang_expand_stmt): Rename to ...
1274 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
1275 (init_cp_semantics): Define.
1276
1277 * decl.c (initialize_local_var): Remove RTL-generating code.
1278 * semantics.c (genrtl_try_block): Fix formatting.
1279
1280 Move statement-tree facilities from C++ to C front-end.
1281 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
1282 (void_zero_node): Remove.
1283 (stmt_tree): Likewise.
1284 (scope_chain): Adjust.
1285 (language_function): Rename to cp_language_function.
1286 (cp_function_chain): Adjust.
1287 (current_stmt_tree): Remove.
1288 (last_tree): Likewise.
1289 (last_expr_type): Likewise.
1290 (struct lang_decl): Adjust.
1291 (STMT_IS_FULL_EXPR_P): Remove.
1292 (add_tree): Remove.
1293 (begin_stmt_tree): Likewise.
1294 (finish_stmt_tree): Likewise.
1295 (walk_tree_fn): Likewise.
1296 (walk_stmt_tree): Likewise.
1297 * class.c (finish_struct): Replace use of add_tree with add_stmt.
1298 * decl.c (mark_stmt_tree): Adjust type.
1299 (init_decl_processing): Don't build void_zero_node.
1300 (initialize_local_var): Adjust usage of current_stmt_tree.
1301 (finish_enum): Use add_stmt, not add_tree.
1302 (save_function_data): Adjust use of language_function.
1303 (finish_constructor_body): Use add_stmt, not add_tree.
1304 (finish_destructor_body): Likewise.
1305 (push_cp_function_context): Adjust use of language_function.
1306 (pop_cp_function_context): Likewise.
1307 (mark_lang_function): Likewise.
1308 (mark_cp_function_context): Likewise.
1309 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
1310 (build_vec_init): Likewise.
1311 * semantics.c (SET_LAST_STMT): Remove.
1312 (RECHAIN_STMTS): Don't use it.
1313 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
1314 (current_stmt_tree): Define.
1315 (add_tree): Remove.
1316 (finish_goto_stmt): Use add_stmt, not add_tree.
1317 (finish_expr_stmt): Likewise.
1318 (begin_if_stmt): Likewise.
1319 (finish_then_clause): Likewise.
1320 (begin_while_stmt): Likewise.
1321 (begin_do_stmt): Likewise.
1322 (finish_return_stmt): Likewise.
1323 (begin_for_stmt): Likewise.
1324 (finish_break_stmt): Likewise.
1325 (finish_continue_stmt): Likewise.
1326 (begin_switch_stmt): Likewise.
1327 (finish_case_label): Likewise.
1328 (begin_try_block): Likewise.
1329 (begin_function_try_block): Likewise.
1330 (begin_handler): Likewise.
1331 (begin_catch_block): Likewise.
1332 (begin_compound_stmt): Likewise.
1333 (begin_asm_stmt): Likewise.
1334 (finish_asm_stmt): Likewise.
1335 (finish_label_stmt): Likewise.
1336 (add_decl_stmt): Likewise.
1337 (finish_subobject): Likewise.
1338 (finish_decl_cleanup): Likewise.
1339 (finish_named_return_value): Likewise.
1340 (setup_vtbl_ptr): Likewise.
1341 (add_scope_stmt): Likewise.
1342 (finish_stmt_expr): Likewise.
1343 (prune_unused_decls): Remove.
1344 (begin_stmt_tree): Likewise.
1345 (finish_stmt_tree): Likewise.
1346 (prep_stmt): Adjust use of current_stmt_tree.
1347 (lang_expand_stmt): Likewise.
1348 * tree.c (statement_code_p): Remove.
1349 (cp_statement_code_p): New function.
1350 (walk_stmt_tree): Remove.
1351 (init_tree): Set lang_statement_code_p.
1352
1353 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
1354
1355 Integrated preprocessor.
1356
1357 * Make-lang.in, Makefile.in: Remove all references to input.c,
1358 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
1359 * gxx.gperf, hash.h, input.c: Delete.
1360 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
1361 initialized properly.
1362
1363 * class.c (fixup_pending_inline): Take a tree, not a
1364 struct pending_inline *. All callers changed.
1365 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
1366 RID_PROTECTED entries in ridpointers[] array here.
1367 * decl.c (duplicate_decls): Do not refer to struct
1368 pending_inline.
1369 (record_builtin_type, init_decl_processing): Use RID_MAX not
1370 CP_RID_MAX.
1371 (grokdeclarator): Use C_IS_RESERVED_WORD.
1372 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
1373 cpplib.
1374 (grok_x_components): Do not inspect pending_inlines chain.
1375
1376 * cp-tree.h (struct lang_identifier): Add rid_code entry.
1377 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
1378 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
1379 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
1380 TIME_IDENTIFIER_FILEINFO): Kill.
1381 Update prototypes.
1382 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
1383 single 32-bit word.
1384 * parse.y: Call do_pending_inlines unconditionally.
1385 reinit_parse_for_method is now snarf_method. fn.defpen is no
1386 longer necessary. Remove unnecessary <itype> annotation on
1387 SCOPE. Do not refer to end_of_file or struct pending_inline.
1388 * semantics.c (begin_inline_definitions): Call
1389 do_pending_inlines unconditionally.
1390
1391 * lex.c: Remove all code now shared with C front end.
1392 Initialize cpplib properly if USE_CPPLIB. Put reserved words
1393 into the get_identifier table. Rewrite pragma handling to
1394 work with the registry. Move code to save tokens for later
1395 processing to spew.c.
1396
1397 * spew.c: Rewrite everything in terms of token streams instead
1398 of text. Move routines here from lex.c / input.c as
1399 appropriate. GC-mark trees hanging off the pending inlines
1400 chain.
1401
1402 2000-09-06 Mark Mitchell <mark@codesourcery.com>
1403
1404 * NEWS: Mention that the named return value extension has been
1405 deprecated.
1406 * cp-tree.h (original_result_rtx): Define.
1407 (TREE_REFERENCE_EXPR): Remove.
1408 (DECL_VPARENT): Likewise.
1409 (pushdecl_nonclass_level): Likewise.
1410 (store_return_init): Likewise.
1411 (reinit_lang_specific): Likewise.
1412 (genrtl_named_return_value): Change prototype.
1413 * decl.c (original_result_rtx): Remove.
1414 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1415 Do not generate RTL for local variables here.
1416 (store_return_init): Remove.
1417 * semantics.c (genrtl_named_return_value): Simplify. Fold in
1418 store_return_init.
1419 (finish_named_return_value): Adjust accordingly. Warn that this
1420 extension is deprecated.
1421 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1422
1423 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1424
1425 * pt.c (type_unification_real): Replace switch with if.
1426 (unify): Tsubst non-type parms before comparing.
1427
1428 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1429
1430 * error.c (dump_typename): New function, broken out of ...
1431 (dump_type): ... here. Use it.
1432 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1433
1434 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1435
1436 * init.c (build_offset_ref): Deal with namespace scoped
1437 TEMPLATE_ID_EXPRs.
1438
1439 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1440
1441 * class.c (resolve_address_of_overloaded_function): Add
1442 explanation message.
1443 * decl.c (define_case_label): Reformat explanation.
1444 * decl2.c (finish_static_data_member_decl): Likewise.
1445 (grokfield): Likewise.
1446 * friend.c (do_friend): Likewise.
1447
1448 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
1449
1450 * tree.c (walk_tree): Expose tail recursion.
1451 (walk_stmt_tree): New function.
1452 * cp-tree.h: Prototype walk_stmt_tree.
1453 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1454 the BLOCKs directly. If a BLOCK has no variables after
1455 pruning, discard it.
1456 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
1457 restore the line number.
1458
1459 2000-09-05 Mark Mitchell <mark@codesourcery.com>
1460
1461 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1462 (pt.o): Remove dependency on HTAB_H.
1463 * cp-tree.h: Include hashtab.h.
1464 (walk_tree): Change prototype.
1465 (walk_tree_without_duplicates): New function.
1466 * decl.c (check_default_argument): Use it.
1467 * optimize.c (remap_decl): Adjust calls to walk_tree.
1468 (copy_body): Likewise.
1469 (expand_calls_inline): Likewise.
1470 (calls_setjmp_p): Use walk_tree_without_duplicates.
1471 * pt.c: Don't include hashtab.h.
1472 (for_each_template_parm): Use walk_tree_without_duplicates.
1473 * semantics.c (finish-stmt_tree): Likewise.
1474 (expand_body): Likewise.
1475 * tree.c (walk_tree): Add additional parameter.
1476 (walk_tree_without_duplicates): New function.
1477 (count_trees): Use it.
1478 (verify_stmt_tree): Adjust call to walk_tree.
1479 (find_tree): Use walk_tree_without_duplicates.
1480 (no_linkage_check): Likewise.
1481 (break_out_target_exprs): Adjust call to walk_tree.
1482 (cp_unsave): Likewise.
1483
1484 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1485
1486 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1487 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1488 * cp-tree.h (TYPE_BINFO): Adjust comment.
1489 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1490 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1491 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1492 (TYPE_TEMPLATE_INFO): Likewise.
1493 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1494 * class.c (push_nested_class): Likewise.
1495 * decl.c (lookup_name_real): Likewise.
1496 (grokdeclarator): Likewise.
1497 (grok_op_properties): Likewise.
1498 (xref_tag): Likewise.
1499 (xref_basetypes): Likewise.
1500 * decl2.c (constructor_name_full): Likewise.
1501 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1502 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1503 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1504 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1505 (dump_type_suffix): Likewise.
1506 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1507 instead.
1508 (get_aggr_from_typedef): Likewise.
1509 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1510 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1511 (write_template_parm): Likewise.
1512 (write_template_template_parm): Check tree code instead of
1513 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1514 * method.c (build_overload_nested_name): Add
1515 BOUND_TEMPLATE_TEMPLATE_PARM.
1516 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1517 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1518 * pt.c (convert_template_argument): Check tree code instead of
1519 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1520 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1521 (for_each_template_parm): Adjust comment.
1522 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
1523 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1524 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
1525 template_args_equal to compare template template parameter cases.
1526 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1527 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1528 instead.
1529 * tree.c (copy_template_template_parm): Decide whether to create
1530 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1531 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1532 (copy_tree_r): Likewise.
1533 * typeck.c (comptypes): Likewise. Check tree code instead of
1534 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1535
1536 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
1537
1538 * decl.c (finish_function): Move the code for handling functions
1539 marked with the constructor and destructor attributes inside the
1540 expand_p block.
1541
1542 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1543
1544 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1545
1546 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1547
1548 * pt.c (lookup_template_class): Remove abort.
1549 * tree.c (get_type_decl): Allow error_mark_node.
1550
1551 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1552
1553 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1554 TEMPLATE_ID_EXPRs.
1555
1556 2000-09-03 Mark Mitchell <mark@codesourcery.com>
1557
1558 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1559 new ABI mangling.
1560
1561 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1562
1563 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1564 union tag mismatch error reporting.
1565
1566 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1567
1568 * call.c (build_scoped_method_call): Check it is not a namespace.
1569
1570 2000-08-30 Jason Merrill <jason@redhat.com>
1571
1572 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1573
1574 * tree.c (bot_manip): Check TREE_CONSTANT rather than
1575 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
1576 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1577
1578 * decl.c (start_function): Always call make_function_rtl.
1579
1580 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1581
1582 * semantics.c (prune_unused_decls): New function.
1583 (finish_stmt_tree): Call it via walk_tree.
1584
1585 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1586
1587 * class.c (build_secondary_vtable): Constify a char *.
1588 * decl.c (init_decl_processing): Initialize function_id_node,
1589 pretty_function_id_node, and func_id_node.
1590 * input.c (struct input_source): Constify 'str'.
1591 (feed_input): Constify first argument.
1592 * mangle.c (write_identifier): Constify argument.
1593 * pt.c (mangle_class_name_for_template): Constify argument.
1594
1595 2000-08-29 Mark Mitchell <mark@codesourcery.com>
1596
1597 * typeck.c (mark_addressable): Remove code that pokes around in
1598 RTL.
1599
1600 2000-08-28 Jason Merrill <jason@redhat.com>
1601
1602 * lex.c (file_name_nondirectory): Move to toplev.c.
1603
1604 * cp-tree.h (LOCAL_CLASS_P): New macro.
1605 * class.c (finish_struct_1): Use it.
1606
1607 2000-08-27 Alex Samuel <samuel@codesourcery.com>
1608
1609 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
1610 (write_encoding): Pass another argument to write_name.
1611 (write_name): Add ignore_local_scope parameter. Fix handling of
1612 local names.
1613 (write_nested_name): Use write_unqualified_name.
1614 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
1615 (write_template_prefix): Use write_unqualified_name.
1616 (write_component): Remove.
1617 (write_local_name): Add parameter. Use direct local entity to
1618 discriminator calculation.
1619 (write_class_enum_type): Pass another argument to write_name.
1620 (write_template_template_arg): Likewise.
1621 (make_guard_variable): Likewise.
1622
1623 2000-08-27 Jason Merrill <jason@redhat.com>
1624
1625 * decl.c (pushdecl): Matching decls for local externs are found in
1626 the current level. Propagate linkage information from previous
1627 declarations.
1628
1629 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
1630
1631 * ir.texi (Expressions): Fix typo.
1632
1633 2000-08-25 Greg McGary <greg@mcgary.org>
1634
1635 * tree.c (init_tree): Use ARRAY_SIZE.
1636
1637 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1638
1639 * error.c (cp_tree_printer): Rework.
1640
1641 2000-08-25 Mark Mitchell <mark@codesourcery.com>
1642
1643 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
1644 dyn-string.o.
1645 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
1646 (cp-demangle.o): Remove target.
1647 (dyn-string.o): Likewise.
1648
1649 * decl.c (grokfndecl): Require that `main' return an `int'.
1650 * mangle.c (write_encoding): Don't mangle return types for
1651 conversion functions.
1652
1653 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1654
1655 * error.c (tree_formatting_info): New data type.
1656 (tree_being_formatted): New macro.
1657 (tree_formatting_flags): Likewise.
1658 (put_whitespace): Likewise.
1659 (print_tree_identifier): Likewise.
1660 (print_identifier): Likewise.
1661 (cp_tree_printer, print_function_argument_list, print_declaration,
1662 print_expression, print_function_declaration,
1663 print_function_parameter, print_type, print_cv_qualifier): New
1664 functions.
1665 (init_error): Initialize lang_printer.
1666
1667 2000-08-24 Jason Merrill <jason@redhat.com>
1668
1669 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
1670 adjustment necessary.
1671
1672 2000-08-24 Greg McGary <greg@mcgary.org>
1673
1674 * cp-tree.h (MAIN_NAME_P): Remove macro.
1675
1676 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
1677
1678 * error.c (print_instantiation_context): Don't forget to flush the
1679 buffer.
1680
1681 2000-08-23 Jason Merrill <jason@redhat.com>
1682
1683 * typeck.c (build_ptrmemfunc): Save the input pmf.
1684
1685 * method.c (process_modifiers): Use same_type_p.
1686
1687 2000-08-23 Mark Mitchell <mark@codesourcery.com>
1688
1689 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
1690 * mangle.c (write_function_type): Change prototype.
1691 (write_encoding): Don't mangle return types for
1692 constructors or destructors.
1693 (write_type): Adjust call to write_function_type.
1694 * pt.c (instantiate_template): Instantiate alternate entry points
1695 when instantiating the main function.
1696
1697 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1698
1699 * error.c (cp_print_error_function): Don't use embedded '\n' in
1700 output_printf.
1701
1702 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1703
1704 * decl.c (init_decl_processing): Remove bogus initialization.
1705 * error.c (lang_print_error_function): Restore here.
1706 (init_error): Initialize print_error_function.
1707
1708 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1709
1710 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
1711
1712 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
1713
1714 * Makefile.in (error.o): Depends on diagnostic.h
1715
1716 * cp-tree.h (problematic_instantiation_changed,
1717 record_last_problematic_instantiation, current_instantiation,
1718 print_instantiation_context): Declare.
1719 (maybe_print_template_context): Remove.
1720
1721 * decl.c (init_decl_processing): Set print_error_function to NULL.
1722 (lang_print_error_function): Remove, since we're using a new
1723 machinery.
1724
1725 * error.c: #include diagnostic.h
1726 (function_category): New function.
1727 (cp_diagnostic_starter): Likewise.
1728 (cp_diagnostic_finalizer): Likewise.
1729 (cp_print_error_function): Likewise.
1730 (maybe_print_instantiation_context): Likewise.
1731 (print_instantiation_full_context): Likewise.
1732 (print_instantiation_partial_context): Likewise.
1733 (print_instantiation_context): Define.
1734 (init_error): Initialize diagnostic pager and finalizer.
1735
1736 * pt.c (problematic_instantiation_changed): Define.
1737 (record_last_problematic_instantiation): Likewise.
1738 (current_instantiation): Likewise.
1739 (maybe_print_template_context): Remove.
1740 (print_template_context): Likewise.
1741 (current_tinst_level): Make static to reflect Brendan Kehoe's
1742 change of 1995-04-13.
1743 (push_tinst_level): Call print_instantiation_context.
1744
1745 2000-08-21 Nix <nix@esperi.demon.co.uk>
1746
1747 * lang-specs.h: Do not process -o or run the assembler if
1748 -fsyntax-only.
1749
1750 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
1751
1752 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
1753 variables.
1754 * decl2.c (lang_decode_option): Disable gettext attributes for
1755 -ansi.
1756
1757 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
1758
1759 * lex.c (lang_init_options): Default diagnostic message maximum
1760 length to 80, when line-wrapping.
1761
1762 2000-08-20 Mark Mitchell <mark@codesourcery.com>
1763
1764 * class.c (build_vtbl_initializer): Clear the entire
1765 vtbl_init_data. Start keeping track of the functions for which we
1766 have created vcall offsets here.
1767 (dfs_build_vcall_offset_vtbl_entries): Remove.
1768 (build_vcall_offset_vtbl_entries): Reimplement.
1769 (add_vcall_offset_vtbl_entries_r): New function.
1770 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
1771 computing when vcall offsets are necessary.
1772
1773 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1774
1775 * decl.c (member_function_or_else): Use cp_error ... %T.
1776 (grokdeclarator): Likewise.
1777 (start_method): Likewise.
1778 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
1779
1780 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1781
1782 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
1783 TYPE_DECLs.
1784
1785 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1786
1787 * cp-tree.h (PTRMEM_OK_P): New macro.
1788 (itf_ptrmem_ok): New enumeration value.
1789 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
1790 argument. Diagnose implicit pointer to member.
1791 (instantiate_type): Don't diagnose implicit pointer to member
1792 here. Pass itf_ptrmem_ok if ok. Adjust calls to
1793 resolve_address_of_overloaded_function.
1794 * init.c (build_offset_ref): Set PTRMEM_OK_P.
1795 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
1796 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
1797 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
1798 (build_unary_op): Deal with single non-static member in
1799 microsoft-land.
1800
1801 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1802
1803 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
1804
1805 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1806
1807 * cp-tree.h (enum_name_string): Remove prototype.
1808 (report_case_error): Remove prototype.
1809 * cp/typeck2.c (enum_name_string): Remove.
1810 (report_case_error): Remove.
1811 * error.c (dump_expr): Deal with enum values directly.
1812 Correctly negate integer constant.
1813
1814 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1815
1816 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
1817 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
1818 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
1819 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
1820 (__cxa_vec_new): Use __cxa_vec_new2.
1821 (__cxa_vec_delete): Use __cxa_vec_delete2.
1822
1823 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1824
1825 * vec.cc (__cxa_vec_new): Set "C" linkage.
1826 (__cxa_vec_ctor): Likewise.
1827 (__cxa_vec_cctor): Likewise.
1828 (__cxa_vec_dtor): Likewise.
1829 (__cxa_vec_delete): Likewise.
1830 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
1831 (__cxa_vec_ctor): Likewise.
1832 (__cxa_vec_cctor): Likewise.
1833 (__cxa_vec_dtor): Likewise.
1834 (__cxa_vec_delete): Likewise.
1835
1836 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1837
1838 * class.c (instantiate_type): Reinstate local variable
1839 deleted in previous change.
1840
1841 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
1842 itf_no_attributes.
1843
1844 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1845
1846 * cp-tree.h (instantiate_type_flags): New enumeration.
1847 (instantiate_type): Change parameter.
1848 * class.c (instantiate_type): Adjust prototype. Adjust.
1849 * call.c (standard_conversion): Adjust instantiate_type call.
1850 (reference_binding): Likewise.
1851 (build_op_delete_call): Likewise.
1852 (convert_like_real): Likewise.
1853 * cvt.c (cp_convert_to_pointer): Likewise.
1854 (convert_to_reference): Likewise.
1855 * pt.c (convert_nontype_argument): Likewise.
1856 * typeck.c (build_binary_op): Likewise.
1857 (build_ptrmemfunc): Likewise.
1858 (convert_for_assignment): Likewise.
1859
1860 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1861
1862 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
1863 (current_aggr): Define.
1864 * decl.c (grokdeclarator): Make sure a friend class is an
1865 elaborated type specifier.
1866 * parse.y (current_aggr): Remove static definition.
1867 (cp_parse_init): Adjust.
1868 (structsp): Clear and restore current_aggr.
1869 (component_decl_list): Clear current_aggr.
1870
1871 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
1872 aggregate tag on the typename's context.
1873
1874 * pt.c (tsubst_friend_class): Return error_mark_node, if
1875 parms becomes NULL.
1876 (instantiate_class_template): Ignore error_mark_node friend types.
1877
1878 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
1879
1880 * cvt.c (warn_ref_binding): New static function, broken out of ...
1881 (convert_to_reference): ... here. Use it.
1882
1883 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1884
1885 * parse.y (template_arg): Add rule for template qualified with
1886 global scope.
1887
1888 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1889
1890 * decl2.c (add_function): Reorganize.
1891 (arg_assoc): Do not consider function template decls.
1892
1893 2000-08-11 Jason Merrill <jason@redhat.com>
1894
1895 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
1896 looking inside.
1897
1898 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1899
1900 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
1901 (lookup_nested_tag): Likewise.
1902
1903 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
1904 can be produced.
1905
1906 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1907
1908 * parse.y (named_complex_class_head_sans_basetype): Remove
1909 always true if.
1910
1911 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1912
1913 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
1914 explicit TEMPLATE_ID_EXPR args.
1915 (build_expr_from_tree, case CALL_EXPR): Likewise.
1916
1917 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1918
1919 * decl.c (check_tag_decl): Diagnose typename's which don't
1920 declare anything.
1921
1922 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
1923
1924 * init.c (build_aggr_init): Reject bogus array initializers
1925 early.
1926
1927 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1928
1929 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
1930 runtime.
1931 * cp/tinfo.cc (__dynamic_cast): Likewise.
1932 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
1933
1934 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1935
1936 * cvt.c (convert_to_pointer_force): Fix error message when
1937 attempting to cast from ambiguous base.
1938
1939 2000-08-08 Jason Merrill <jason@redhat.com>
1940
1941 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
1942 (tsubst_template_arg_vector): Likewise.
1943
1944 * decl2.c (build_anon_union_vars): Choose the largest field; don't
1945 assume that one will be as large as the union.
1946
1947 2000-08-07 Kazu Hirata <kazu@hxi.com>
1948
1949 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
1950 * decl.c (pop_labels): Likewise.
1951
1952 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
1953
1954 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
1955 specifications.
1956 (__pointer_to_member_type_info): Likewise.
1957 (__base_class_info): Likewise.
1958 (__class_type_info): Likewise.
1959 (__si_class_type_info): Likewise.
1960 (__vmi_class_type_info): Likewise.
1961 * tinfo.cc (__si_class_type_info::__do_find_public_src):
1962 Changed member names to match specifications.
1963 (__vmi_class_type_info::__do_find_public_src): Likewise.
1964 (__si_class_type_info::__do_dyncast): Likewise.
1965 (__vmi_class_type_info::__do_dyncast): Likewise.
1966 (__si_class_type_info::__do_upcast): Likewise.
1967 (__vmi_class_type_info::__do_upcast): Likewise.
1968 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
1969 (__pbase_type_info::__pointer_catch): Likewise.
1970 (__pointer_type_info::__pointer_catch): Likewise.
1971 (__pointer_to_member_type_info::__pointer_catch): Likewise.
1972
1973 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
1974
1975 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
1976 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
1977 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
1978
1979 2000-08-04 Mark Mitchell <mark@codesourcery.com>
1980
1981 * cp-tree.h (add_method): Change prototype.
1982 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
1983 Don't double the size of the method vector in the error case.
1984 (handle_using_decl): Adjust call to add_method.
1985 (add_implicitly_declared_members): Likewise.
1986 (clone_function_decl): Likewise.
1987 * decl2.c (check_classfn): Likewise.
1988 * semantics.c (finish_member_declaration): Likewise.
1989
1990 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
1991
1992 * decl.c (flag_isoc94): New variable.
1993
1994 2000-08-02 Jason Merrill <jason@redhat.com>
1995
1996 * pt.c (do_type_instantiation): Add complain parm; don't complain
1997 if called recursively.
1998 * cp-tree.h, parse.y: Adjust.
1999
2000 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
2001
2002 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
2003 -Wno-strict-prototypes.
2004
2005 * g++spec.c: Adjust type of second argument to
2006 lang_specific_driver, and update code as necessary.
2007
2008 * cp-tree.h: Don't prototype min_precision here.
2009 (my_friendly_assert): Cast expression to void.
2010 * semantics.c (do_poplevel): Initialize scope_stmts.
2011
2012 2000-08-02 Mark Mitchell <mark@codesourcery.com>
2013
2014 * cp-tree.h (DECL_NEEDED_P): Tweak.
2015
2016 2000-07-28 Jason Merrill <jason@redhat.com>
2017
2018 * lang-specs.h: Use %i in rule for .ii files.
2019
2020 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
2021
2022 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2023
2024 2000-07-30 Mark Mitchell <mark@codesourcery.com>
2025
2026 Allow indirect primary bases.
2027 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
2028 primary_base.
2029 (CLASSTYPE_VFIELD_PARENT): Remove.
2030 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2031 (BINFO_PRIMARY_BINFO): Remove.
2032 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2033 (BINFO_VBASE_PRIMARY_P): Likewise.
2034 (BINFO_PRIMARY_BASE_OF): New macro.
2035 (BINFO_INDIRECT_PRIMARY_P): Likewise.
2036 (get_primary_binfo): New function.
2037 * decl.c (lang_mark_tree): Make lang_type::primary_base.
2038 * class.c (vcall_offset_data_s): Rename to ...
2039 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
2040 and add ctor_vtbl_p.
2041 (get_derived_offset): Use get_primary_binfo.
2042 (dfs_mark_primary_bases): Adjust handling of virtual primary
2043 bases.
2044 (mark_primary_bases): Likewise.
2045 (set_primary_base): Take a binfo, not an integer, as a
2046 representation of the primary base.
2047 (indirect_primary_base_p): Remove.
2048 (determine_primary_base): Adjust for indirect primary bases.
2049 (dfs_find_final_overrider): Fix typo in coment.
2050 (update_vtable_entry_for_fn): Use get_primary_binfo.
2051 (layout_nonempty_base_or_field): Tweak.
2052 (build_base_fields): Adjust for new primary base semantics.
2053 (dfs_propagate_binfo_offsets): Remove.
2054 (propagate_binfo_offsets): Rewrite.
2055 (dfs_set_offset_for_shared_vbases): Remove.
2056 (layout_virtual_bases): Don't use it.
2057 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
2058 ABI.
2059 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
2060 CLASSTYPE_VFIELD_PARENT.
2061 (dfs_get_primary_binfo): New function.
2062 (get_primary_binfo): Likewise.
2063 (dump_class_hierarchy_r): Tweak printing of primary bases.
2064 (build_vtbl_initializer): Fix typo in comments. Use
2065 vtbl_init_data.
2066 (build_vcall_and_vbase_vtbl_entries): Likewise.
2067 (build_vbaes_offset_vtbl_entries): Likewise.
2068 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
2069 BV_VCALL_INDEX to handle indirect primary bases.
2070 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
2071 (build_rtti_vtbl_entries): Likewise.
2072 * search.c (get_shared_vbase_if_not_primary): Tweak.
2073 (find_vbase_instance): Likewise.
2074 (binfo_for_vtable): Simplify.
2075 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
2076 (make_binfo): Make it have 11 entries.
2077
2078 2000-07-30 Alex Samuel <samuel@codesourcery.com>
2079
2080 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
2081 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
2082 ascertaining primaryness.
2083 (G): Remove template_args.
2084 (decl_is_template_id): New function.
2085 (write_encoding): Use decl_is_template_id.
2086 (write_name): Likewise. Handle type_decls. Get main variant of
2087 type decls.
2088 (write_nested_name): Likewise.
2089 (write_prefix): Likewise.
2090 (write_template_prefix): Likewise.
2091 (write_special_name_constructor): Remove defunct production from
2092 comment.
2093 (write_bare_function_type): Remove comment about absent parameter.
2094 (write_template_template_arg): Add missing grammar production to
2095 comment.
2096
2097 2000-07-27 Jason Merrill <jason@redhat.com>
2098
2099 * decl.c (duplicate_decls): If common_type produces a non-typedef
2100 type for a typedef, just use the old type.
2101
2102 2000-07-27 Mark Mitchell <mark@codesourcery.com>
2103
2104 * cp-tree.h (function_depth): Declare.
2105 (verify_stmt_tree): Likewise.
2106 (find_tree): Likewise.
2107 * decl.c (function_depth): Give it external linkage.
2108 * optimize.c (optimize_function): Increment and decrement it.
2109 * tree.c (verify_stmt_tree_r): New function.
2110 (verify_stmt_tree): Likewise.
2111 (find_tree_r): Likewise.
2112 (find_tree): Likewise.
2113
2114 2000-07-27 Jason Merrill <jason@redhat.com>
2115
2116 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
2117 TYPE_PTRMEMFUNC_P.
2118 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2119
2120 2000-07-26 Mark Mitchell <mark@codesourcery.com>
2121
2122 * decl.c (start_cleanup_fn): Mark the function as `inline'.
2123 * decl2.c (get_guard): Call cp_finish_decl, not
2124 rest_of_decl_compilation, for local guards.
2125 * lex.c (do_identifier): Remove unused variable.
2126
2127 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
2128
2129 * parse.y: Add missing ';'.
2130
2131 2000-07-26 Mark Mitchell <mark@codesourcery.com>
2132
2133 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
2134 of `extern "C++"'.
2135
2136 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
2137
2138 Kill strict_prototype. Backwards compatibility only for
2139 non NO_IMPLICIT_EXTERN_C systems.
2140 * cp-tree.h (flag_strict_prototype): Remove.
2141 (strict_prototype): Remove.
2142 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2143 * decl.c (maybe_push_to_top_level): Adjust.
2144 (pop_from_top_level): Adjust.
2145 (decls_match): Only allow sloppy parm matching for ancient
2146 system headers.
2147 (init_decl_processing): Adjust.
2148 (grokdeclarator): Adjust.
2149 * decl2.c (flag_strict_prototype): Remove.
2150 (strict_prototype): Remove.
2151 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2152 (lang_f_options): Remove "strict-prototype".
2153 (unsupported-options): Add "strict-prototype".
2154 * lex.c (do_identifier): Adjust.
2155 (do_scoped_id): Adjust.
2156 * parse.y (empty_parms): Adjust.
2157 * class.c (push_lang_context): Adjust.
2158 (pop_lang_context): Adjust.
2159 * typeck.c (comp_target_parms): Adjust.
2160
2161 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
2162
2163 * decl.c (poplevel): Deal with anonymous variables at for scope.
2164 (maybe_inject_for_scope_var): Likewise.
2165
2166 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
2167
2168 * decl.c: Remove all signal handling code, now done in toplev.c.
2169
2170 2000-07-23 Mark Mitchell <mark@codesourcery.com>
2171
2172 * decl.c (make_rtl_for_nonlocal_decl): Rework.
2173
2174 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
2175 correctly.
2176
2177 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
2178
2179 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
2180 Define my_friendly_assert and my_friendly_abort as macros
2181 which may call friendly_abort. Prototype friendly abort, not
2182 my_friendly_abort or my_friendly_assert.
2183 * decl.c (signal_catch): Report the signal caught in the error
2184 message. Call fatal directly.
2185 * typeck2.c (ack, my_friendly_assert): Delete.
2186 (my_friendly_abort): Rename to friendly_abort. Expect file,
2187 line, and function parameters. Report the abort code, then
2188 call fancy_abort. Do not mask an abort if errors have
2189 already occurred.
2190
2191 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
2192
2193 * typeck.c (comp_target_parms): Remove obsolete parameter.
2194 (comp_target_types): Adjust.
2195
2196 2000-07-17 Jason Merrill <jason@redhat.com>
2197
2198 * typeck.c (mark_addressable): Never set TREE_USED.
2199 * call.c (build_call): Don't abort on calls to library functions
2200 that have been declared normally.
2201
2202 * typeck.c (build_binary_op): Fix grammar in warning.
2203
2204 * exception.cc (__eh_free): Fix prototype.
2205
2206 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
2207
2208 * decl.c (pushdecl): Handle seeing an OVERLOAD in
2209 IDENTIFIER_NAMESPACE_VALUE.
2210
2211 2000-07-16 Mark Mitchell <mark@codesourcery.com>
2212
2213 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
2214 * method.c (use_thunk): Correct handling of vcall offsets.
2215
2216 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
2217
2218 * .cvsignore: parse.h and parse.c have no cp- prefix.
2219
2220 2000-07-13 Mark Mitchell <mark@codesourcery.com>
2221
2222 * .cvsignore: New file.
2223
2224 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
2225
2226 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
2227
2228 2000-07-12 Mark Mitchell <mark@codesourcery.com>
2229
2230 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
2231 * parse.c: Remove.
2232 * parse.h: Likewise.
2233
2234 2000-07-11 Mark Mitchell <mark@codesourcery.com>
2235
2236 * class.c (layout_class_type): Add pointers to virtual bases after
2237 base classes under the old ABI.
2238
2239 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
2240
2241 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
2242 (finish_continue_stmt): Likewise.
2243 (begin_for_stmt): Remove call to note_level_for_for.
2244 (finish_goto_stmt): Change call from build_min_nt
2245 to build_stmt.
2246 (finish_expr_stmt): Likewise.
2247 (begin_if_stmt): Likewise.
2248 (begin_while_stmt): Likewise.
2249 (finish_while_stmt): Likewise.
2250 (finish_return_stmt): Likewise.
2251 (begin_for_stmt): Likewise.
2252 (finish_for_stmt): Likewise.
2253 (finish_break_stmt): Likewise.
2254 (begin_switch_stmt): Likewise.
2255 (finish_case_label): Likewise.
2256 (genrtl_try_block): Likewise.
2257 (begin_try_block): Likewise.
2258 (begin_handler): Likewise.
2259 (begin_compound_stmt): Likewise.
2260 (finish_asm_stmt): Likewise.
2261 (finish_label_stmt): Likewise.
2262 (add_decl_stmt): Likewise.
2263 (finish_subobject): Likewise.
2264 (finish_decl_cleanup): Likewise.
2265 (finish_named_return_value): Likewise.
2266 (setup_vtbl_ptr): Likewise.
2267 (add_scope_stmt): Likewise.
2268 * decl.c (finish_constructor_body): Likewise.
2269 (finish_destructor_body): Likewise.
2270 * optimize.c (copy_body_r): Likewise.
2271 (initialize_inlined_parameters): Likewise.
2272 (declare_return_variable): Likewise.
2273 (expand_call_inline): Likewise.
2274
2275 2000-07-10 Jakub Jelinek <jakub@redhat.com>
2276
2277 * semantics.c (expand_body): Sync interface information
2278 at the end of function body expansion.
2279
2280 2000-07-09 Jason Merrill <jason@redhat.com>
2281
2282 * init.c (build_new_1): Bail early if the call to new fails.
2283
2284 * decl.c (compute_array_index_type): Check specifically for
2285 an INTEGER_CST, not just TREE_CONSTANT.
2286
2287 * decl.c (duplicate_decls): Don't call duplicate_decls on
2288 the DECL_TEMPLATE_RESULT.
2289 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
2290 codes.
2291
2292 * error.c (dump_template_bindings): Don't crash if we had an
2293 invalid argument list.
2294
2295 * typeck.c (c_expand_start_case): Do narrowing here.
2296 * semantics.c (finish_switch_cond): Not here.
2297
2298 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
2299
2300 * parse.y (asm_clobbers): Do string concatenation.
2301
2302 2000-07-09 Mark Mitchell <mark@codesourcery.com>
2303
2304 * decl.c (pushtag): Don't put local classes in template functions
2305 on the local_classes list.
2306
2307 2000-07-04 Scott Snyder <snyder@fnal.gov>
2308
2309 * decl2.c (get_guard): Add missing return for old ABI local
2310 variable case.
2311
2312 2000-07-09 Mark Mitchell <mark@codesourcery.com>
2313
2314 * cp-tree.h (char_type_p): New function.
2315 * decl.c (init_decl_processing): Don't initialize
2316 signed_wchar_type_node or unsigned_wchar_type_node.
2317 (complete_array_type): Handle brace-enclosed string-constants.
2318 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
2319 * tree.c (char_type_p): New function.
2320 * typeck2.c (digest_init): Use char_type_p.
2321
2322 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
2323
2324 * pt.c (tsubst): Don't layout type, if it's error_mark.
2325
2326 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
2327
2328 * pt.c (instantiate_pending_templates): Reset template level.
2329
2330 2000-07-05 Jason Merrill <jason@redhat.com>
2331
2332 * call.c (joust): Don't complain about `operator char *()' beating
2333 `operator const char *() const'.
2334
2335 2000-07-04 scott snyder <snyder@fnal.gov>
2336 Jason Merrill <jason@redhat.com>
2337
2338 * repo.c (repo_get_id): Handle the case where a class with virtual
2339 bases has a null TYPE_BINFO_VTABLE.
2340
2341 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
2342 Jason Merrill <jason@redhat.com>
2343
2344 * parse.y (member_init): Just pass in the type.
2345 * init.c (expand_member_init): Handle getting a type.
2346
2347 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2348 Jason Merrill <jason@redhat.com>
2349
2350 * decl.c (finish_function): Warn if a function has no return
2351 statement.
2352 Suggested by Andrew Koenig.
2353 * typeck.c (check_return_expr): Do set current_function_returns_value
2354 if we got an error_mark_node.
2355
2356 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
2357
2358 * decl2.c (push_decl_namespace): Push the original namespace.
2359
2360 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
2361
2362 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
2363 * semantics.c (begin_class_definition): Clear it.
2364
2365 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
2366
2367 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
2368 (genrtl_expr_stmt): Likewise.
2369 (genrtl_decl_stmt): Likewise.
2370 (genrtl_if_stmt): Likewise.
2371 (genrtl_while_stmt): Likewise.
2372 (genrtl_do_stmt): Likewise.
2373 (genrtl_return_stmt): Likewise.
2374 (genrtl_for_stmt): Likewise.
2375 (genrtl_break_stmt): Likewise.
2376 (genrtl_continue_stmt): Likewise.
2377 (genrtl_scope_stmt): Likewise.
2378 (genrtl_switch_stmt): Likewise.
2379 (genrtl_case_label): Likewise.
2380 (genrtl_begin_compound_stmt): Likewise.
2381 (genrtl_finish_compound_stmt): Likewise.
2382 (genrtl_compound_stmt): Likewise.
2383 (genrtl_asm_stmt): Likewise.
2384
2385 * init.c (begin_init_stmts): Remove call to
2386 genrtl_begin_compound_stmt.
2387 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
2388
2389 * semantics.c (lang_expand_stmt): Changed call to
2390 genrtl_compound_stmt to ignore return value.
2391
2392 2000-07-02 Mark Mitchell <mark@codesourcery.com>
2393
2394 * mangle.c (canonicalize_for_substitution): Return the canonical
2395 variant of a type.
2396
2397 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2398 TYPE_DECL.
2399 * typeck.c (commonparms): Remove obstack manipulations.
2400
2401 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
2402
2403 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2404
2405 * Makefile.in (OBJS): Added ../c-semantics.o.
2406 (OBJDEPS): Likewise.
2407
2408 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2409 ../c-common.h.
2410 (struct stmt_tree): Added comment.
2411 (current_function_name_declared): Removed.
2412 (stmts_are_full_exprs_p): Likewise.
2413 (genrtl_do_pushlevel): Likewise.
2414 (genrtl_clear_out_block): Likewise.
2415 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2416 (DECL_ANON_UNION_ELEMS): Likewise.
2417 (emit_local_var): Likewise.
2418 (make_rtl_for_local_static): Likewise.
2419 (do_case): Likewise.
2420 (expand_stmt): Likewise.
2421 (genrtl_decl_cleanup): Likewise.
2422 (c_expand_asm_operands): Likewise.
2423 (c_expand_return): Likewise.
2424 (c_expand_start_case): Likewise.
2425
2426 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2427 (emit_local_var): Likewise.
2428 (initialize_local_var): Change reference to
2429 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2430 Change reference to stmts_are_full_exprs_p to
2431 current_stmt_tree->stmts_are_full_exprs_p.
2432 (push_cp_function_context): Likewise.
2433
2434 * expect.c (expand_throw): Change reference to
2435 stmts_are_full_exprs_p.
2436
2437 * init.c (build_aggr_init): Change reference to
2438 stmts_are_full_exprs_p.
2439 (build_vec_init): Likewise.
2440
2441 * optimize.c (maybe_clone_body): Change reference to
2442 current_function_name_declared to
2443 cp_function_chain->name_declared.
2444
2445 * pt.c (instantiate_decl): Change reference to
2446 current_function_name_declared to
2447 cp_function_chain->name_declared.
2448
2449 * semantics.c (expand_cond): Moved declaration to c-common.h.
2450 (genrtl_do_pushlevel): Moved to c-semantics.c.
2451 (genrtl_clear_out_block): Likewise.
2452 (genrtl_goto_stmt): Likewise.
2453 (genrtl_expr_stmt): Likewise.
2454 (genrtl_decl_stmt): Likewise.
2455 (gerntl_if_stmt): Likewise.
2456 (genrtl_while_stmt): Likewise.
2457 (genrtl_do_stmt): Likewise.
2458 (genrtl_return_stmt): Likewise.
2459 (genrtl_for_stmt): Likewise.
2460 (genrtl_break_stmt): Likewise.
2461 (genrtl_continue_stmt): Likewise.
2462 (genrtl_scope_stmt): Likewise.
2463 (genrtl_switch_stmt): Likewise.
2464 (genrtl_case_label): Likewise.
2465 (genrtl_begin_compound_stmt): Likewise.
2466 (genrtl_finish_compound_stmt): Likewise.
2467 (genrtl_compound_stmt): Likewise.
2468 (genrtl_asm_stmt): Likewise.
2469 (genrtl_decl_cleanup): Likewise.
2470 (expand_cond): Likewise.
2471 (expand_stmt): Renamed to ...
2472 (lang_expand_stmt): ... this.
2473 (lang_expand_expr_stmt): Initialize.
2474 (set_current_function_name_declared): Likewise.
2475 (stmts_are_full_exprs_p): Likewise.
2476 (current_function_name_declared): Likewise.
2477 (anon_aggr_type_p): Likewise.
2478 (do_poplevel): Change reference to
2479 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2480 Change reference to stmts_are_full_exprs_p to
2481 current_stmt_tree->stmts_are_full_exprs_p.
2482 (add_tree): Likewise.
2483 (finish_expr_stmt): Likewise.
2484 (prep_stmt): Likewise.
2485 (lang_expand_stmt): Likewise.
2486 (begin_compound_stmt): Change reference to
2487 current_function_name_declared to
2488 cp_function_chain->name_declared and call to
2489 current_function_name_declared().
2490 (setup_vtbl_ptr): Likewise.
2491 (genrtl_do_poplevel): Removed.
2492
2493 2000-06-30 Jason Merrill <jason@redhat.com>
2494
2495 * init.c (init_init_processing): Go back to aligning like
2496 double_type_node for old ABI.
2497 (get_cookie_size): Make cookie larger if we get a type that needs
2498 more alignment.
2499 (build_vec_delete): Call it.
2500
2501 * typeck.c (qualify_type_recursive): New fn.
2502 (composite_pointer_type): Use it.
2503 (build_binary_op): Use composite_pointer_type.
2504
2505 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
2506 Jason Merrill <jason@redhat.com>
2507
2508 * typeck.c (check_return_expr): Don't complain about returning
2509 NULL from operator new if -fcheck-new.
2510 * cp-tree.h: Declare flag_check_new here.
2511 * init.c: Not here.
2512
2513 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2514
2515 * mangle.c (find_substitution): Use same_type_p.
2516 (write_encoding): Don't check for substitutions.
2517
2518 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2519
2520 * parse.y (expr_no_comma_rangle): New non-terminal.
2521 (template_parm): Use it for default parameter case.
2522 (template_arg): Use it.
2523 (expr_no_commas): Remove commented out undefined extensions.
2524 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2525 * parse.h, parse.c: Rebuilt.
2526
2527 2000-06-30 Mark Mitchell <mark@codesourcery.com>
2528
2529 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2530 (finish_asm_stmt): Do it here, instead.
2531
2532 * cp-tree.h (ridpointers): Don't declare.
2533 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2534 (record_builtin_java_type): Likewise.
2535 (init_decl_processing): Likewise.
2536 * lex.c: Move inclusion of lex.h.
2537 (ridpointers): Don't define.
2538 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
2539 RID_MAX.
2540 * lex.h (enum rid): Rename to ...
2541 (enum cp_rid): ... this.
2542 (ridpointers): Don't declare.
2543 * parse.y: Move inclusion of lex.h.
2544 * parse.c: Regenerated.
2545 * spew.c: Move inclusion of lex.h.
2546
2547 * cp-tree.h (struct language_function): Remove temp_name_counter.
2548 (temp_name_counter): Remove.
2549 (get_temp_name): Change prototype.
2550 (get_guard): New function.
2551 (get_guard_cond): Likewise.
2552 (set_guard): Likewise.
2553 * cvt.c (build_up_reference): Adjust call to get_temp_name.
2554 * decl.c (expand_static_init): Use get_guard and friends to
2555 implement guard variables.
2556 * decl2.c (get_temp_name): Assume that the variables created are
2557 always static.
2558 (get_sentry): Rename to ...
2559 (get_guard): ... this. Implement new ABI guard variables.
2560 (get_guard_bits): New function.
2561 (get_guard_cond): Likewise.
2562 (set_guard): Likewise.
2563 (start_static_initialization_or_destruction): Use them.
2564 (do_static_initialization): Replace sentry with guard throughout.
2565 (do_static_destruction): Likewise.
2566 * init.c (create_temporary_var): Add comment.
2567
2568 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2569
2570 * mangle.c (find_substitution): Use same_type_p.
2571 (write_encoding): Don't check for substitutions.
2572
2573 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2574
2575 * parse.y (expr_no_comma_rangle): New non-terminal.
2576 (template_parm): Use it for default parameter case.
2577 (template_arg): Use it.
2578 (expr_no_commas): Remove commented out undefined extensions.
2579 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2580 * parse.h, parse.c: Rebuilt.
2581
2582 2000-06-29 Mark Mitchell <mark@codesourcery.com>
2583
2584 * cp-tree.h (flag_const_strings): Remove.
2585 (warn_parentheses): Likewise.
2586 (warn_format): Likewise.
2587 (common_type): Likewise.
2588 (default_conversion): Likewise.
2589 (build_binary_op): Likewise.
2590 (cp_build_binary_op): New macro.
2591 * call.c (build_new_op): Use cp_build_binary_op instead of
2592 build_binary_op.
2593 * class.c (build_vtable_entry_ref): Likewise.
2594 * decl.c (expand_static_init): Likewise.
2595 (compute_array_index_type): Likewise.
2596 (build_enumerator): Likewise.
2597 * decl2.c (delete_sanity): Likewise.
2598 (start_static_initialization_or_destruction): Likewise.
2599 * error.c (dump_type_suffix): Likewise.
2600 * init.c (resolve_offset_ref): Likewise.
2601 (build_new): Likewise.
2602 (build_new_1): Likewise.
2603 (build_vec_delete_1): Likewise.
2604 (build_vec_init): Likewise.
2605 (build_delete): Likewise.
2606 * rtti.c (synthesize_tinfo_fn): Likewise.
2607 (synthesize_tinfo_var): Likewise.
2608 * search.c (expand_upcast_fixups): Likewise.
2609 (fixup_all_virtual_upcast_offsets): Likewise.
2610 * typeck.c (build_array_ref): Likewise.
2611 (get_member_function_from_ptrfunc): Likewise.
2612 (build_binary_op): Add parameter.
2613 (pointer_int_sum): Use cp_build_binary_op.
2614 (pointer_diff): Likewise.
2615 (build_modify_expr): Likewise.
2616 (get_delta_difference): Likewise.
2617 (build_ptrmemfunc): Likewise.
2618
2619 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
2620
2621 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
2622 * decl.c (create_implicit_typedef): Adjust.
2623 * decl2.c (build_artificial_parm): Adjust.
2624 * method.c (implicitly_declare_fn): Adjust.
2625 * pt.c (push_inline_template_parms_recursive): Adjust.
2626 (process_template_parm): Adjust.
2627 (overloaded_template_name): Adjust.
2628 * semantics.c (finish_template_template_parm): Adjust.
2629
2630 2000-06-28 Mark Mitchell <mark@codesourcery.com>
2631
2632 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
2633 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
2634 where to emit thunks.
2635 (build_vtt): Adjust call to build_vtt_inits.
2636 (build_vtt_inits): Add parameter to indicate whether or not
2637 sub-VTTs for virtual bases should be included. Adjust handling of
2638 construction vtables.
2639 (get_matching_base): New function.
2640 (dfs_build_vtt_inits): Rename to ...
2641 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
2642 construction vtables.
2643 (dfs_fixup_binfo_vtbls): Likewise.
2644 (build_ctor_vtbl_groups): Build construction vtables for virtual
2645 bases, too.
2646 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
2647 to build construction vtbls.
2648 (dfs_accumulate_vtbl_inits): Adjust handling of
2649 construction vtables.
2650
2651 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
2652 types correctly.
2653
2654 2000-06-27 Mark Mitchell <mark@codesourcery.com>
2655
2656 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2657
2658 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2659
2660 * search.c (hides): Remove.
2661 (is_subobject_of_p): Add most_derived parameter. Use
2662 CANONICAL_BINFO.
2663 (lookup_field_queue_p): Adjust.
2664 (lookup_field_r): Adjust.
2665
2666 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2667
2668 * decl2.c (handle_class_head): Bash typedefs to the type's main
2669 decl.
2670
2671 2000-06-25 Mark Mitchell <mark@codesourcery.com>
2672
2673 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
2674 (begin_global_stmt_expr): ... this.
2675 (genrtl_finish_stmt_expr): Rename to ...
2676 (finish_global_stmt_expr): ... this.
2677 * init.c (begin_init_stmts): Adjust calls.
2678 (finish_init_stmts): Likewise.
2679 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
2680 (begin_global_stmt_expr): ... this.
2681 (genrtl_finish_stmt_expr): Rename to ...
2682 (finish_global_stmt_expr): ... this.
2683
2684 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2685
2686 * search.c (lookup_member): Fix typo in comment.
2687
2688 2000-06-24 Jason Merrill <jason@redhat.com>
2689
2690 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
2691 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2692
2693 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2694
2695 * parse.y (complex_direct_notype_declarator): Support global_scope.
2696 * Makefile.in: Adjust conflict count.
2697
2698 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2699
2700 * parse.y (template_arg): Convert TEMPLATE_DECL
2701 that is a template template paramter to
2702 TEMPLATE_TEMPLATE_PARM here.
2703
2704 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2705 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
2706 (copy_template_template_parm): Adjust prototype.
2707 * decl.c (grokdeclarator): Remove dead code.
2708 * pt.c (process_template_parm): Tidy.
2709 (lookup_template_class): Construct nodes in
2710 copy_template_template_parm.
2711 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
2712 lookup_template_class. Use TYPE_TI_TEMPLATE.
2713 * tree.c (copy_template_template_parm): Add NEWARGS
2714 parameter.
2715 (mapcar): Adjust call to copy_template_template_parm.
2716 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2717 * method.c (build_template_template_parm_names): Change error
2718 code to avoid compilation warning.
2719
2720 * gxxint.texi: Document template template parameter
2721 name mangling.
2722
2723 2000-06-21 Alex Samuel <samuel@codesourcery.com>
2724
2725 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
2726 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
2727 (cp-demangle.o): New rule.
2728 (dyn-string.o): Likewise.
2729 * inc/cxxabi.h (__cxa_demangle): New declaration.
2730
2731 2000-06-22 Mark Mitchell <mark@codesourcery.com>
2732
2733 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
2734 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
2735 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
2736 a tree, not an int.
2737 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
2738 (make_thunk): Change prototype.
2739 (emit_thunk): Rename to use_thunk.
2740 (mangle_thunk): Change prototype.
2741 * class.c (get_derived_offset): Simplify.
2742 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
2743 BV_GENERATE_THUNK_WITH_VTABLE_P.
2744 (build_primary_vtable): Simplify.
2745 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
2746 (dfs_find_base): Remove.
2747 (update_vtable_entry_for_fn): Correct bug in finding the base
2748 where a virtual function was first declared. Figure out whether
2749 or not to emit a vcall-thunk with the vtables in which it appears.
2750 Correct logic for deciding whether to use an ordinary thunk, or a
2751 vcall thunk.
2752 (finish_struct_1): Remove unnecssary code.
2753 (build_vtbl_initializer): Use ssize_int for the running counter of
2754 negative indices.
2755 (build_vtbl_initializer): Only use vcall thunks where necessary.
2756 Mark thunks as needing to be emitted with their vtables, or not.
2757 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
2758 indices. Use size_binop.
2759 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
2760 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
2761 size_binop.
2762 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
2763 (build_vtable_entry): Mark thunks as needing to be emitted with
2764 their vtables, or not.
2765 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
2766 * decl2.c (mark_vtable_entries): Use use_thunk instead of
2767 emit_thunk.
2768 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
2769 information.
2770 * error.c (dump_expr): Use BV_FN.
2771 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
2772 not an int.
2773 * method.c (make_thunk): Likewise.
2774 (emit_thunk): Rename to use_thunk. Allow callers to decide
2775 whether or not to actually emit the thunk. Adjust for changes in
2776 representation of vcall offsets.
2777 * search.c (dfs_get_pure_virtuals): Use BV_FN.
2778 * semantics.c (emit_associated_thunks): New function.
2779 (expand_body): Use it.
2780 * ir.texi: Adjust decriptions of thunks.
2781
2782 2000-06-22 Jason Merrill <jason@redhat.com>
2783
2784 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
2785 (tsubst_friend_function): Copy it here.
2786
2787 * decl.c (grok_op_properties): Fix typo.
2788
2789 * decl2.c (delete_sanity): Clarify warning, avoid failure on
2790 deleting void*.
2791
2792 * pt.c (check_explicit_specialization): Clarify error.
2793
2794 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
2795 an old OVERLOAD when we're declaring a non-function.
2796 (pushdecl, destroy_local_var): Check for error_mark_node.
2797 (warn_extern_redeclared_static): Also bail early if
2798 we're a CONST_DECL.
2799 (push_overloaded_decl): Ignore an old error_mark_node.
2800
2801 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
2802
2803 * call.c (build_x_va_arg): Check if in a template decl.
2804 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
2805
2806 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
2807
2808 * class.c (push_lang_context): TYPE_NAME gets you to the Java
2809 types DECLs.
2810 * decl.c (check_goto): Computed gotos assumed OK.
2811
2812 2000-06-20 Jason Merrill <jason@redhat.com>
2813
2814 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
2815 for which we don't need to look for instantiations.
2816
2817 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
2818
2819 * parse.y (program): Always call finish_translation_unit.
2820 * parse.c, parse.h: Rebuilt.
2821
2822 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
2823
2824 * method.c: Don't include hard-reg-set.h.
2825
2826 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
2827
2828 * rtti.c (get_base_offset): Cope when vbase field is in a base.
2829
2830 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
2831
2832 * call.c (build_conditional_expr): Use VOID_TYPE_P.
2833 * cvt.c (cp_convert_to_pointer): Likewise.
2834 (convert_to_void): Likewise.
2835 * error.c (dump_expr): Likewise.
2836 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
2837 * init.c (build_delete): Likewise.
2838 * method.c (emit_thunk): Likewise.
2839 * optmize.c (declare_return_variable): Likewise.
2840 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2841 (get_typeid): Likewise.
2842 (build_dynamic_cast_1): Likewise.
2843 * typeck.c (composite_pointer_type): Likewise.
2844 (common_type): Likewise.
2845 (build_indirect_ref): Likewise.
2846 (build_binary_op): Likewise.
2847 (build_x_compound_expr): Likewise.
2848 (check_return_expr): Likewise.
2849 * typeck2.c (add_exception_specifier): Likewise.
2850
2851 * mangle.c (write_method_parms): Use direct comparison for end
2852 of parmlist.
2853
2854 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
2855
2856 * cp-tree.h (genrtl_try_block): Declare function.
2857 (genrtl_handler): Likewise.
2858 (genrtl_catch_block): Likewise.
2859 (genrtl_ctor_stmt): Likewise.
2860 (genrtl_subobject): Likewise.
2861 (genrtl_decl_cleanup): Likewise.
2862 (genrtl_do_poplevel): Likewise.
2863 (genrtl_do_pushlevel): Likewise.
2864 (genrtl_clear_out_block): Likewise.
2865 (genrtl_goto_stmt): Likewise.
2866 (genrtl_expr_stmt): Likewise.
2867 (genrtl_decl_stmt): Likewise.
2868 (genrtl_if_stmt): Likewise.
2869 (genrtl_while_stmt): Likewise.
2870 (genrtl_do_stmt): Likewise.
2871 (genrtl_return_stmt): Likewise.
2872 (genrtl_for_stmt): Likewise.
2873 (genrtl_break_stmt): Likewise.
2874 (genrtl_continue_stmt): Likewise.
2875 (genrtl_scope_stmt): Likewise.
2876 (genrtl_switch_stmt): Likewise.
2877 (genrtl_case_label): Likewise.
2878 (genrtl_begin_compound_stmt): Likewise.
2879 (genrtl_finish_compound_stmt): Likewise.
2880 (genrtl_compound_stmt): Likewise.
2881 (genrtl_asm_stmt): Likewise.
2882 (genrtl_named_return_value): Likewise.
2883 (genrtl_begin_stmt_expr): Likewise.
2884 (genrtl_finish_stmt_expr): Likewise.
2885 (finish_for_stmt): Removed first argument.
2886 (finish_switch_stmt): Likewise.
2887
2888 * semantics.c (genrtl_try_block): Define function.
2889 (genrtl_handler): Likewise.
2890 (genrtl_catch_block): Likewise.
2891 (genrtl_ctor_stmt): Likewise.
2892 (genrtl_subobject): Likewise.
2893 (genrtl_decl_cleanup): Likewise.
2894 (genrtl_do_poplevel): Likewise.
2895 (genrtl_do_pushlevel): Likewise.
2896 (genrtl_clear_out_block): Likewise.
2897 (genrtl_goto_stmt): Likewise.
2898 (genrtl_expr_stmt): Likewise.
2899 (genrtl_decl_stmt): Likewise.
2900 (genrtl_if_stmt): Likewise.
2901 (genrtl_while_stmt): Likewise.
2902 (genrtl_do_stmt): Likewise.
2903 (genrtl_return_stmt): Likewise.
2904 (genrtl_for_stmt): Likewise.
2905 (genrtl_break_stmt): Likewise.
2906 (genrtl_continue_stmt): Likewise.
2907 (genrtl_scope_stmt): Likewise.
2908 (genrtl_switch_stmt): Likewise.
2909 (genrtl_case_label): Likewise.
2910 (genrtl_begin_compound_stmt): Likewise.
2911 (genrtl_finish_compound_stmt): Likewise.
2912 (genrtl_compound_stmt): Likewise.
2913 (genrtl_asm_stmt): Likewise.
2914 (genrtl_named_return_value): Likewise.
2915 (genrtl_begin_stmt_expr): Likewise.
2916 (genrtl_finish_stmt_expr): Likewise.
2917 (finish_for_stmt): Removed first argument and generate rtl
2918 specific code.
2919 (finish_switch_stmt): Likewise.
2920 (do_poplevel): Removed generate rtl specific code.
2921 (do_pushlevel): Likewise.
2922 (add_tree): Likewise.
2923 (finish_goto_stmt): Likewise.
2924 (finish_expr_stmt): Likewise.
2925 (begin_if_stmt): Likewise.
2926 (finish_if_stmt_cond): Likewise.
2927 (finish_then_clause): Likewise.
2928 (begin_else_clause): Likewise.
2929 (finish_else_clause): Likewise.
2930 (finish_if_stmt): Likewise.
2931 (clear_out_block): Likewise.
2932 (begin_while_stmt): Likewise.
2933 (finish_while_stmt_cond): Likewise.
2934 (finish_while_stmt): Likewise.
2935 (begin_do_stmt): Likewise.
2936 (finish_do_body): Likewise.
2937 (finish_do_stmt): Likewise.
2938 (finish_return_stmt): Likewise.
2939 (begin_for_stmt): Likewise.
2940 (finish_for_init_stmt): Likewise.
2941 (finish_for_cond): Likewise.
2942 (finish_for_expr): Likewise.
2943 (finish_break_stmt): Likewise.
2944 (finish_continue_stmt): Likewise.
2945 (begin_switch_stmt): Likewise.
2946 (finish_switch_cond): Likewise.
2947 (finish_case_label): Likewise.
2948 (begin_try_block): Likewise.
2949 (begin_function_try_block): Likewise.
2950 (finish_try_block): Likewise.
2951 (finish_cleanup_try_block): Likewise.
2952 (finish_cleanup): Likewise.
2953 (finish_function_try_block): Likewise.
2954 (finish_handler_sequence): Likewise.
2955 (finish_function_handler_sequence): Likewise.
2956 (begin_handler): Likewise.
2957 (finish_handler_parms): Likewise.
2958 (begin_catch_block): Likewise.
2959 (finish_handler): Likewise.
2960 (begin_compound_stmt): Likewise.
2961 (finish_compound_stmt): Likewise.
2962 (finish_asm_stmt): Likewise.
2963 (finish_label_stmt): Likewise.
2964 (finish_label_decl): Likewise.
2965 (finish_subobject): Likewise.
2966 (finish_decl_cleanup): Likewise.
2967 (finish_named_return_value): Likewise.
2968 (begin_stmt_expr): Likewise.
2969 (finish_stmt_expr): Likewise.
2970
2971 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
2972 to call genrtl_expr_stmt when appropriate.
2973
2974 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
2975 begin_compound_expr to call genrtl_begin_stmt_expr and
2976 genrtl_begin_compound_expr when appropriate.
2977 (finish_init_stmts): Changed calls to finish_compound_expr and
2978 finish_stmt_expr to call genrtl_finish_compound_expr and
2979 genrtl_finish_stmt_expr when appropriate.
2980 (expand_default_init): Changed call to finish_expr_stmt to call
2981 genrtl_expr_stmt when appropriate.
2982 (build_vec_init): Likewise.
2983
2984 * parse.y (simple_stmt): Removed first argument from call to
2985 finish_for_stmt. Removed first argument from call to
2986 finish_switch_stmt.
2987
2988 * parse.c: Regenerated.
2989
2990 * pt.c (tsubst_expr): Removed first argument from call to
2991 finish_for_stmt. Removed first argument from call to
2992 finish_switch_stmt.
2993
2994 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
2995
2996 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
2997 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
2998
2999 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
3000 (cplus_tree_code_length[]): Likewise.
3001 (cplus_tree_code_name[]): Likewise.
3002 (init_parse): Added call to add_c_tree_codes. Changed
3003 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
3004
3005 2000-06-16 Mark Mitchell <mark@codesourcery.com>
3006
3007 * cp-tree.h (finish_mem_initializers): Declare.
3008 (count_trees): Likewise.
3009 * parse.y (base_init): Use finish_mem_initializers.
3010 * semantics.c (finish_mem_initializers): New function.
3011
3012 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
3013 the number of trees.
3014 (n_trees): Remove.
3015 (count_trees): Don't use it.
3016
3017 2000-06-15 Jason Merrill <jason@redhat.com>
3018
3019 * tree.c (count_trees): New debugging function.
3020
3021 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3022 * init.c (build_member_call): Pull out the name of a DECL.
3023
3024 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3025 * semantics.c (expand_body): Push to TV_INTEGRATION here.
3026 * optimize.c (optimize_function): Not here.
3027 * pt.c (instantiate_decl): Push to TV_PARSE.
3028
3029 2000-06-15 Mark Mitchell <mark@codesourcery.com>
3030
3031 * cp-tree.h (struct language_function): Remove x_base_init_list
3032 and x_member_init_list.
3033 (current_base_init_list): Remove.
3034 (current_member_init_list): Likewise.
3035 (setup_vtbl_ptr): Change prototype.
3036 (emit_base_init): Likewise.
3037 (expand_member_init): Likewise.
3038 (reinit_parse_for_function): Remove.
3039 * decl.c (save_function_data): Don't clear x_base_init_list and
3040 x_member_init_list.
3041 (mark_language_function): Don't mark them.
3042 * init.c (perform_member_init): Tweak comment.
3043 (sort_member_init): Take the list of initializers as an argument.
3044 (sort_base_init): Likewise.
3045 (emit_base_init): Likewise.
3046 (expand_member_init): Return the initializer. Don't use global
3047 variables.
3048 * lex.c (reinit_parse_for_function): Remove.
3049 * method.c (build_template_parm_names): Correct substitution.
3050 (do_build_copy_constructor): Don't use current_member_init_list
3051 and current_base_init_list.
3052 (synthesize_method): Likewise.
3053 * parse.y (base_init): Split mem-initializers into
3054 base-initializers and field-initializers.
3055 (member_init_list): Build up the list here.
3056 (member_init): Return the initializer.
3057 (fn.depfn): Don't use reinit_parse_for_function.
3058 * parse.c: Regenerated.
3059 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
3060 ERROR_MARK.
3061 (tsubst_expr): Don't use current_member_init_list
3062 and current_base_init_list.
3063 (tsubst_expr_values): Rename to ...
3064 (tsubst_initializer_list): ... this. Use convert_from_reference.
3065 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
3066 and current_base_init_list.
3067 (begin_function_definition): Don't call reinit_parse_for_function.
3068
3069 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
3070
3071 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
3072 correctly.
3073
3074 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
3075
3076 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
3077
3078 * cp-tree.h (IF_COND): Move to c-common.h.
3079 (THEN_CLAUSE): Likewise.
3080 (ELSE_CLAUSE): Likewise.
3081 (WHILE_COND): Likewise.
3082 (WHILE_BODY): Likewise.
3083 (DO_COND): Likewise.
3084 (DO_BODY): Likewise.
3085 (RETURN_EXPR): Likewise.
3086 (EXPR_STMT_EXPR): Likewise.
3087 (FOR_INIT_STMT): Likewise.
3088 (FOR_COND): Likewise.
3089 (FOR_EXPR): Likewise.
3090 (FOR_BODY): Likewise.
3091 (SWITCH_COND): Likewise.
3092 (SWITCH_BODY): Likewise.
3093 (CASE_LOW): Likewise.
3094 (CASE_HIGH): Likewise.
3095 (GOTO_DESTINATION): Likewise.
3096 (COMPOUND_BODY): Likewise.
3097 (ASM_CV_QUAL): Likewise.
3098 (ASM_STRING): Likewise.
3099 (ASM_OUTPUTS): Likewise.
3100 (ASM_INPUTS): Likewise.
3101 (ASM_CLOBBERS): Likewise.
3102 (DECL_STMT_DECL): Likewise.
3103 (STMT_EXPR_STMT): Likewise.
3104 (LABEL_STMT_LABEL): Likewise.
3105 (SCOPE_BEGIN_P): Likewise.
3106 (SCOPE_END_P): Likewise.
3107 (SCOPE_STMT_BLOCK): Likewise.
3108 (SCOPE_NULLIFIED_P): Likewise.
3109 (SCOPE_NO_CLEANUPS_P): Likewise.
3110 (SCOPE_PARTIAL_P): Likewise.
3111 (ASM_VOLATILE_P): Likewise.
3112 (STMT_LINENO): Likewise.
3113 (STMT_LINENO_FOR_FN_P): Likewise.
3114
3115 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
3116 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
3117 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
3118 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
3119 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
3120
3121 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
3122
3123 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
3124 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
3125
3126 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
3127 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
3128 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
3129
3130 2000-06-14 Mark Mitchell <mark@codesourcery.com>
3131
3132 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
3133 * class.c (dfs_find_final_overrider): Set it appropriately.
3134 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
3135 avoid unneeded secondary vptrs.
3136
3137 2000-06-13 Jakub Jelinek <jakub@redhat.com>
3138
3139 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
3140 (check_bitfield_decl, check_field_decl): Likewise.
3141 (build_vtbl_or_vbase_field, build_base_field): Likewise.
3142 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
3143 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
3144 (xfer_tag, finish_enum): Likewise.
3145 * decl2.c (finish_builtin_type): Likewise.
3146 * init.c (init_init_processing): Likewise.
3147 * pt.c (instantiate_class_template): Likewise.
3148 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
3149 * cp-tree.h (struct lang_type): Add user_align member.
3150 (CLASSTYPE_USER_ALIGN): Define.
3151
3152 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3153
3154 * Make-lang.in (c++.install-common): Install g++-cross in
3155 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
3156 $(target_alias)-g++ and $(target_alias)-c++.
3157
3158 2000-06-12 Mark Mitchell <mark@codesourcery.com>
3159
3160 * class.c (vcall_offset_data_s): Add last_init and fns.
3161 (overrides): Rename to same_signature_p.
3162 (dfs_find_final_overrider): Adjust accordingly.
3163 (mark_overriders): Likewise.
3164 (warn_hidden): Likewise.
3165 (build_vtbl_initializer): Reorganize machinery for building things
3166 at negative offsets.
3167 (build_vcall_and_vbase_vtbl_entries): Likewise.
3168 (build_vbase_offset_vtbl_entries): Likewise.
3169 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
3170 offset entries. Do not create two entries for functions with the
3171 same signature.
3172 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
3173 (build_rtti_vtbl_entries): Reorganize machinery for building things
3174 at negative offsets.
3175
3176 * optimize.c (expand_call_inline): Don't recurse into the code
3177 used to initialize the parameters more than once.
3178
3179 2000-06-11 Mark Mitchell <mark@codesourcery.com>
3180
3181 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
3182 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
3183 (find_substitution): Only use the `Sa' substitution for
3184 std::allocator, not instantiations of it.
3185 (write_template_prefix): Move comment. Only use a TREE_LIST to
3186 represent substitutions for a member template.
3187 (write_array_type): Mangle array dimensions correctly.
3188 * optimize.c (maybe_clone_body): Copy more information from the
3189 cloned function.
3190 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
3191 on the regenerated declaration.
3192
3193 2000-06-11 Chip Salzenberg <chip@valinux.com>
3194 Mark Mitchell <mark@codesourcery.com>
3195
3196 * class.c (build_vtable): Clarify comment.
3197 (build_ctor_vtbl_group): Pass the most derived type to
3198 build_vtable.
3199
3200 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3201
3202 * decl2.c (compare_options): Don't needlessly cast away const-ness.
3203
3204 2000-06-10 Mark Mitchell <mark@codesourcery.com>
3205
3206 * decl.c (add_binding): Handle duplicate declarations of external
3207 variables.
3208
3209 2000-06-09 Chip Salzenberg <chip@valinux.com>
3210 Mark Mitchell <mark@codesourcery.com>
3211
3212 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
3213 argument.
3214 (write_signed_number): New macro.
3215 (write_unsigned_number): Likewise.
3216 (write_source_name): Use them.
3217 (write_number): Handle signed and unsigned values.
3218 (write_integer_cst): Use tree_int_cst_sgn, and use
3219 write_unsigned_number or write_signed_number as appropriate.
3220 (write_discriminator): Use write_unsigned_number or
3221 write_signed_number as appropriate.
3222 (write_template_arg_literal): Likewise.
3223 (write_array_type): Use tree_low_cst.
3224 (write_template_parm): Use write_unsigned_number or
3225 write_signed_number as appropriate.
3226 (write_substitution): Adjust call to write_number.
3227 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
3228 (write_expression): Handle non-type template arguments of
3229 reference type correctly.
3230 (mangle_thunk): Use write_signed_number.
3231
3232 2000-06-09 Chip Salzenberg <chip@valinux.com>
3233
3234 * mangle.c (find_substition): Don't mangle objects with typename
3235 substitutions (e.g. "cin" as "Si").
3236
3237 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
3238
3239 * call.c (add_candidate): Use ggc_alloc_cleared.
3240 * decl.c (lookup_label): Likewise.
3241 * lex.c (retrofit_lang_decl): Likewise.
3242
3243 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
3244
3245 * semantics.c (expand_body): Push to TV_EXPAND.
3246 * optimize.c (optimize_function): Push to TV_INTEGRATION.
3247 * decl.c (start_function): Always call announce_function.
3248
3249 * tinfo2.cc: Just declare abort.
3250
3251 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
3252
3253 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
3254 whenever @ is a symbolic name.
3255
3256 2000-06-08 Jakub Jelinek <jakub@redhat.com>
3257
3258 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
3259
3260 2000-06-07 Mark Mitchell <mark@codesourcery.com>
3261
3262 * decl.c (pushdecl): Look up functions by DECL_NAME, not
3263 DECL_ASSEMBLER_NAME.
3264
3265 2000-06-06 Mark Mitchell <mark@codesourcery.com>
3266
3267 * decl2.c (c_language): Define.
3268
3269 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
3270
3271 * lex.c (lang_init_options): Tweak.
3272
3273 * decl2.c: Remove #inclusion of diagnostic.h
3274 (lang_decode_option): Move diagnostic formatting options to
3275 toplevel.
3276
3277 * lang-options.h: Remove documentation for diagnostic options.
3278
3279 * Makefile.in (lex.o): Depends upon diagnostic.h
3280
3281 2000-06-06 Mark Mitchell <mark@codesourcery.com>
3282
3283 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
3284 the same DECL_RESULT, it's not a redefinition.
3285 * pt.c (tsubst_decl): Remove code to handle illegal
3286 specializations.
3287
3288 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
3289
3290 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
3291
3292 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
3293
3294 * search.c (maybe_suppress_debug_info): Don't check
3295 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
3296
3297 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
3298 here if extern_p.
3299
3300 Remember instantiation context in deferred instantiations.
3301 * cp-tree.h (struct tinst_level): Remove.
3302 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
3303 * pt.c (current_tinst_level): Now a tree.
3304 (print_template_context, push_tinst_level, pop_tinst_level,
3305 tinst_for_decl): Adjust.
3306 (reopen_tinst_level): New fn.
3307 (init_pt): Register current_tinst_level as a root.
3308 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
3309 of the pending templates list.
3310 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
3311 * lex.c (extract_interface_info): Adjust.
3312 * decl2.c (warn_if_unknown_interface): Adjust.
3313
3314 2000-06-05 Mark Mitchell <mark@codesourcery.com>
3315
3316 * class.c (indirect_primary_base_p): New function.
3317 (determine_primary_base): Use it.
3318
3319 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
3320
3321 Update new-abi dynamic cast algorithm.
3322 * tinfo.cc (__class_type_info::__dyncast_result): Add
3323 whole_details. Adjust constructor.
3324 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
3325 Avoid unnecessary searching.
3326 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
3327
3328 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3329
3330 * decl.c (init_decl_processing): Don't call record_component_aliases.
3331 * tree.c (build_cplus_array_type_1): Likewise.
3332
3333 2000-06-04 Mark Mitchell <mark@codesourcery.com>
3334
3335 * ir.texi: Correct typo.
3336 * mangle.c (write_expression): Handle non-type template arguments
3337 with reference type.
3338 * method.c (build_overload_value): Likewise.
3339 * pt.c (convert_nontype_argument): Explicitly represent conversion
3340 to a reference with an ADDR_EXPR.
3341 (unify): Always unify arguments in left-to-right order.
3342
3343 2000-06-03 Alex Samuel <samuel@codesourcery.com>
3344 Mark Mitchell <mark@codesourcery.com>
3345
3346 * Make-lang.in (CXX_SRCS): Add mangle.c.
3347 * Makefile.in (CXX_OBJS): Add mangle.o.
3348 (mangle.o): New rule.
3349
3350 * class.c (local_classes): New variable.
3351 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
3352 (get_vtt_name): Use mangle_vtt_name for new ABI.
3353 (init_class_processing): Initialize local_classes.
3354 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
3355 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
3356 (std_identifier): New macro.
3357 (DECL_VOLATILE_MEMFUNC_P): New macro.
3358 (DECL_NAMESPACE_STD_P): Likewise.
3359 (local_classes): Declare.
3360 (get_mostly_instantiated_function_type): Declare.
3361 (init_mangle): Declare.
3362 (mangle_decl): Likewise.
3363 (mangle_type_string): Likewise.
3364 (mangle_type): Likewise.
3365 (mangle_typeinfo_for_type): Likewise.
3366 (mangle_typeinfo_string_for_type): Likewise.
3367 (mangle_vtbl_for_type): Likewise.
3368 (mangle_vtt_for_type): Likewise.
3369 (mangle_ctor_vtbl_for_type): Likewise.
3370 (mangle_thunk): Likewise.
3371 (mangle_conv_op_name_for_type): Likewise.
3372 (mangle_guard_variable): Likewise.
3373 * decl.c (pushtag): Keep track of local classes.
3374 (initialize_predefined_identifiers): Initialize std_identifier.
3375 (init_decl_processing): Use std_identifier.
3376 (start_decl): Don't treat instantiations as specializations.
3377 (grokdeclarator): Likewise.
3378 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
3379 name for fully-instantiated templates.
3380 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
3381 destructors with the new ABI.
3382 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
3383 (grokfield): Use mangle_type for new ABI.
3384 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
3385 (get_sentry): Use mangle_guard_variable for new ABI.
3386 (start_static_initialization_or_destruction): Likewise.
3387 * expr.c (extract_aggr_init): Remove.
3388 (extract_scalar_init): Likewise.
3389 (extract_init): Remove #if 0'd code.
3390 * mangle.c: New function.
3391 * method.c (build_mangled_name): Assert not flag_new_abi.
3392 (build_static_name): Likewise.
3393 (build_decl_overload_real): Likewise.
3394 (build_typename_overload): Likewise.
3395 (build_overload_with_type): Likewise.
3396 (build_overload_name): Likewise.
3397 (get_ctor_vtbl_name): Likewise.
3398 (start_squangling): Likewise.
3399 (get_id_2): Likewise.
3400 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3401 (init_method): Call init_mangle for new ABI.
3402 (make_thunk): Call mangle_thunk for new ABI.
3403 * operators.def: Correct new ABI manglings for the `%' operator.
3404 Add `::' operator.
3405 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3406 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3407 (lookup_template_class): Call mangle_decl for new ABI.
3408 (get_mostly_instantiated_function_type): New function.
3409 (set_mangled_name_for_template_decl): Use it.
3410 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3411 the new ABI. Use mangle_conv_op_name_for_type for instantiated
3412 conversion op names.
3413 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3414 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3415 (tinfo_base_init): Likewise. Mangle typeinfo string name with
3416 mangle_typeinfo_string_for_type.
3417
3418 2000-06-03 Mark Mitchell <mark@codesourcery.com>
3419
3420 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3421 (INNERMOST_TEMPLATE_ARGS): New macro.
3422 (innermost_args): Remove.
3423 (get_innermost_template_args): New function.
3424 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3425 * error.c (dump_function_decl): Be caution when using
3426 most_general_template.
3427 * method.c (build_template_parm_names): Use
3428 INNERMOST_TEMPLATE_ARGS.
3429 * pt.c (add_to_template_args): Tidy comment
3430 (get_innermost_template_args): New function.
3431 (check_explicit_specialization): Clear DECL_INITIAL for a new
3432 specialization.
3433 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3434 Tidy.
3435 (push_template_decl): Always register specializations of the most
3436 general template.
3437 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3438 (coerce_template_parms): Likewise.
3439 (lookup_template_class): Likewise.
3440 (innermost_args): Remove.
3441 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3442 (tsubst_decl): Handle tricky specializations. Use
3443 get_innermost_template_args.
3444 (instantiate_template): Simplify handling of partial
3445 instantiations.
3446 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3447 (most_general_template): Reimplement, in a more straightforward
3448 manner.
3449 (regenerate_decl_from_template): Tweak formatting. Use
3450 TMPL_ARGS_DEPTH for clarity.
3451 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3452
3453 * dump.c (dequeue_and_dump): Dump information about thunks.
3454
3455 2000-06-01 Richard Henderson <rth@cygnus.com>
3456
3457 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3458
3459 2000-06-01 Richard Henderson <rth@cygnus.com>
3460
3461 * decl2.c (unsupported_options): Fix typo, make const.
3462 (lang_decode_option): Fix bsearch argument order.
3463
3464 2000-06-01 Mark Mitchell <mark@codesourcery.com>
3465
3466 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3467 on FIELD_DECLs.
3468
3469 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3470
3471 * cp-tree.h (c_get_alias_set): Deleted.
3472 * Makefile.in (decl.o): Include ../expr.h.
3473 * decl.c (expr.h): Include.
3474 (init_decl_processing): Call record_component_aliases for arrays.
3475 (grokdeclarator): Likewise.
3476 Set TREE_ADDRESSABLE for fields that aren't bitfields.
3477 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3478
3479 2000-05-31 Mark Mitchell <mark@codesourcery.com>
3480
3481 Remove guiding declaration support.
3482 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3483 (flag_guiding_decls): Remove.
3484 * call.c (build_user_type_conversion_1): Remove support for
3485 guiding decls.
3486 (build_new_function_call): Likewise.
3487 (build_new_op): Likewise.
3488 (build_new_method_call): Likewise.
3489 * decl.c (start_function): Likewise.
3490 * friend.c (is_friend): Likewise.
3491 (do_friend): Likewise.
3492 * decl2.c ((flag_dump_translation_unit): Make it const.
3493 (flag_guiding_decls): Remove.
3494 (unsupported_options): New variable
3495 (compare_options): New function.
3496 (lang_decode_option): Use them.
3497
3498 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3499
3500 * method.c (mangle_expression): Adjust test for legal expression
3501 operators.
3502
3503 * pt.c (instantiate_decl): Save and restore the local
3504 specializations list.
3505
3506 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
3507
3508 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3509
3510 2000-05-30 Mark Mitchell <mark@codesourcery.com>
3511
3512 * call.c (add_template_candidate_real): Handle member template
3513 constructors for classes with virtual bases.
3514 (build_user_type_conversion_1): Use in_charge_arg_for_name.
3515 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3516
3517 * ir.texi: Update thunk documentation.
3518
3519 * call.c (joust): Fix handling of overloaded builtin operators.
3520
3521 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
3522
3523 * cp-tree.h (DECL_ANTICIPATED): New macro.
3524 Document new use of DECL_LANG_FLAG_7.
3525 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3526 in the user namespace.
3527 * lex.c (do_identifier): If the identifier's declaration has
3528 DECL_ANTICIPATED on, it has not yet been declared. But do not
3529 replace it with an ordinary implicit declaration.
3530
3531 * tinfo2.cc: Include stdlib.h.
3532
3533 2000-05-29 Mark Mitchell <mark@codesourcery.com>
3534
3535 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3536 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3537 CLASSTYPE_ALIGN.
3538
3539 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
3540
3541 * decl2.c (lang_decode_option): Use skip_leading_substring instead
3542 of plain strncmp.
3543
3544 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
3545
3546 * operators.def (<?): Duplicated, should have been...
3547 (>?): this. Fixed.
3548
3549 2000-05-27 Alex Samuel <samuel@codesourcery.com>
3550 Mark Mitchell <mark@codesourcery.com>
3551
3552 * cp-tree.h (ansi_opname): Make it a macro.
3553 (ansi_assopname): Likewise.
3554 (struct lang_decl_flags): Add assignment_operator_p.
3555 (struct lang_decl): Add operator_code.
3556 (DECL_VTT_PARM): Adjust.
3557 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3558 overloaded operator.
3559 (SET_OVERLOADED_OPERATOR_CODE): New macro.
3560 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3561 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3562 (opname_tab): Remove.
3563 (assignop_tab): Likewise.
3564 (operator_name_info_t): New type.
3565 (operator_name_info): New variable.
3566 (assignment_operator_name_info): Likewise.
3567 (build_cp_library_fn): Remove declaration.
3568 (push_cp_library_fn): Likewise.
3569 (operator_name_string): Likewise.
3570 (build_decl_overload): Likewise.
3571 * call.c (print_z_candidates): Simplify.
3572 (build_object_call): Adjust usage of ansi_opname. Use
3573 DECL_OVERLOADED_OPERATOR_P.
3574 (op_error): Adjust operator name lookup.
3575 (build_conditional_expr): Adjust usage of ansi_opname.
3576 (build_new_op): Likewise.
3577 (build_op_delete_call): Likewise.
3578 (build_over_call): Likewise.
3579 (joust): Use DECL_OVERLOADED_OPERATOR_P.
3580 * decl.c (duplicate_decls): Copy operator_code.
3581 (init_decl_processing): Adjust parameters to push_cp_library_fn.
3582 (builtin_function): Adjust parameters to build_library_fn_1.
3583 (build_library_fn_1): Accept an overloaded operator code.
3584 (build_library_fn): Pass ERROR_MARK.
3585 (build_cp_library_fn): Accept an overloaded operator code.
3586 (push_cp_library_fn): Likewise.
3587 (grokfndecl): Tweak.
3588 (grokdeclarator): Simplify code to compute names of overloaded
3589 operators. Adjust use of ansi_opname.
3590 (ambi_op_p): Work on tree_codes, not identifiers.
3591 (unary_op_p): Likewise.
3592 (grok_op_properties): Likewise.
3593 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3594 (lang_mark_tree): Don't try to mark the operator_code.
3595 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3596 * error.c (dump_decl): Remove special handling for operator
3597 names.
3598 (dump_function_name): Likewise.
3599 (dump_expr): Adjust name lookup of operators.
3600 (op_to_string): Simplify.
3601 (assop_to_string): Likewise.
3602 * init.c (build_new_1): Adjust use of ansi_opname.
3603 * lex.c (opname_tab): Remove.
3604 (assignop_tab): Likewise.
3605 (ansi_opname): Likewise.
3606 (ansi_assopname): Likewise.
3607 (operator_name_string): Likewise.
3608 (reinit_lang_specific): Likewise.
3609 (operator_name_info): New variable.
3610 (assignment_operator_name_info): Likewise.
3611 (init_operators): New function.
3612 (init_parse): Use it.
3613 (do_identifier): Adjust use of ansi_opname.
3614 * method.c (mangle_expression): Don't use ansi_opname for
3615 mangling.
3616 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
3617 (build_decl_overload): Remove.
3618 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
3619 (do_build_assign_ref): Adjust use of ansi_opname.
3620 (synthesize_method): Likewise.
3621 (implicitly_declare_fn): Likewise.
3622 * operators.def: New file.
3623 * parse.y (operator): Adjust use of ansi_opname.
3624 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
3625 (set_mangled_name_for_template_decl): Don't play games with
3626 current_namespace.
3627 (special_function_p): Adjust use of ansi_opname.
3628 * typeck.c (check_return_expr): Likewise.
3629 * Make-lang.in (cc1plus): Depend on operators.def.
3630 * Makefile.in (lex.o): Likewise.
3631 (decl.o): Likewise.
3632
3633 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
3634
3635 * Make-lang.in (cplib2.ready): Eradicate.
3636
3637 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3638
3639 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
3640 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
3641 (built_min, cp_tree_equal): Likewise.
3642
3643 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3644
3645 * class.c (layout_nonempty_base_or_field): Replace
3646 `record_layout_info' with `record_layout_info_s'.
3647
3648 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
3649
3650 Fix goto checking.
3651 * cp-tree.h (struct language_function): x_named_labels is now
3652 a struct named_label_list*.
3653 * decl.c (struct named_label_use_list): Renamed from...
3654 (struct named_label_list): ...this. New struct.
3655 (push_binding_level): Don't set eh_region.
3656 (note_level_for_eh): New fn.
3657 (pop_label): Take label and old value directly.
3658 (pop_labels): Adjust for new named_labels format.
3659 (lookup_label): Likewise.
3660 (poplevel): Note characteristics of a binding level containing a
3661 named label. Mess with named label lists earlier.
3662 (mark_named_label_lists): New fn.
3663 (mark_lang_function): Call it.
3664 (use_label): New fn, split out from...
3665 (make_label_decl): ...here. Don't call it.
3666 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
3667 check_previous_gotos): New fns, split out from...
3668 (define_label): ...here.
3669 (check_switch_goto): New fn.
3670 (define_case_label): Call it.
3671 (check_goto): New fn.
3672 * semantics.c (finish_goto_stmt): Call it and use_label.
3673 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
3674 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
3675
3676 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3677
3678 * class.c (build_vtable_entry_ref): Correct usage of
3679 get_vtbl_decl_for_binfo.
3680
3681 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
3682 * method.c (implicitly_declare_fn): Not here.
3683
3684 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
3685
3686 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
3687 (CPTI_PTMD_DESC_TYPE): ... here.
3688 (ptmd_desc_type_node): Rename to ...
3689 (ptm_desc_type_node): ... here.
3690 * decl.c: Likewise.
3691 * rtti.c (ptmd_initializer): Rename to ...
3692 (ptm_initializer): ... here.
3693 (sythesize_tinfo_var): Adjust. Deal with pointer to member
3694 function.
3695 (create_tinfo_types): Adjust.
3696
3697 2000-05-25 Mark Mitchell <mark@codesourcery.com>
3698
3699 Finish implementation of VTTs.
3700 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
3701 CPTI_VTT_PARM_IDENTIFIER.
3702 (vtt_parm_identifier): New macro.
3703 (vtt_parm_type): Likewise.
3704 (BINFO_SUBVTT_INDEX): Likewise.
3705 (BINFO_VPTR_INDEX): Likewise.
3706 (struct lang_decl): Add vtt_parm.
3707 (DECL_VTT_PARM): New macro.
3708 (DECL_USE_VTT_PARM): Likewise.
3709 (DECL_NEEDS_VTT_PARM_P): Likewise.
3710 (get_vtt_name): Declare.
3711 (build_artifical_parm): Likewise.
3712 (fixup_all_virtual_upcast_offsets): Likewise.
3713 (expand_indirect_vtbls_init): Remove.
3714 * call.c (build_new_method_call): Pass the vtt to subobject
3715 constructors and destructors.
3716 * class.c (get_vtt_name): Give it external linkage.
3717 (build_clone): Handle the magic VTT parameters for clones.
3718 (clone_function_decl): Fix typo in comment.
3719 (build_vtt): Keep track of the indices in the VTTs where various
3720 entities are stored.
3721 (build_vtt_inits): Likewise.
3722 (dfs_build_vtt_inits): Likewise.
3723 (build_ctor_vtbl_group): Tweak type of construction vtables.
3724 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
3725 primary bases, when building construction vtables.
3726 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
3727 (initialize_predefined_identifiers): Add vtt_parm_identifier.
3728 (init_decl_processing): Initialize vtt_parm_type.
3729 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
3730 (lang_mark_tree): Make vtt_parm.
3731 * decl2.c (build_artificial_parm): New function.
3732 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
3733 (grokclassfn): Use build_artificial_parm.
3734 * init.c (initialize_vtbl_ptrs): Call
3735 fixup_all_virtual_upcast_offsets directly.
3736 (perform_member_init): Use the complete subobject destructor for
3737 member cleanups.
3738 (build_vtbl_address): New function.
3739 (expand_virtual_init): Handle VTTs.
3740 * optimize (maybe_clone_body): Likewise.
3741 * search.c (fixup_all_virtual_upcast_offsets): Give it external
3742 linkage.
3743 (expand_indirect_vtbls_init): Remove.
3744 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
3745 * tree.c (make_binfo): Make them bigger.
3746
3747 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3748
3749 * inc/cxxabi.h (__pbase_type_info): Define, based on
3750 __pointer_type_info.
3751 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
3752 (__pointer_to_member_type_info): Likewise.
3753 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
3754 (__pointer_to_member_type_info::__is_pointer_p): Remove.
3755 (__pointer_type_info::__do_catch): Rename to ...
3756 (__pbase_type_info::__do_catch): ... here. Adjust.
3757 (__pbase_type_info::__pointer_catch): Implement.
3758 (__pointer_type_info::__pointer_catch): Adjust.
3759 (__pointer_to_member_type_info::__pointer_catch): Adjust.
3760
3761 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3762
3763 * tinfo.h (__user_type_info::contained_virtual_p): New
3764 predicate.
3765 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
3766 shaped heirarchy.
3767 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
3768 diamond shaped heirarchy. Add early out for mixed diamond and
3769 duplicate shaped heirarchy.
3770
3771 2000-05-24 Mark Mitchell <mark@codesourcery.com>
3772
3773 * cp-tree.h (build_delete): Change prototype.
3774 (build_vec_delete): Likewise.
3775 * call.c (build_scoped_method_call): Use special_function_kind
3776 values to indicate the kind of destruction to be done.
3777 (build_method_call): Likewise.
3778 * decl.c (finish_destructor_body): Likewise.
3779 (maybe_build_cleanup_1): Likewise. Rename to ...
3780 (maybe_build_cleanup): ... this.
3781 * decl2.c (delete_sanity): Use special_function_kind
3782 values to indicate the kind of destruction to be done.
3783 (build_cleanup): Likewise.
3784 * init.c (perform_member_init): Likewise.
3785 (build_vec_delete_1): Likewise.
3786 (build_dtor_call): Simplify.
3787 (build_delete): Use special_function_kind
3788 values to indicate the kind of destruction to be done.
3789 (build_vbase_delete): Likewise.
3790 (build_vec_delete): Likewise.
3791
3792 * init.c (sort_member_init): Fix typo in error message generation
3793 code.
3794
3795 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
3796
3797 * semantics.c (begin_class_definition): make the packed
3798 attribute be sensitive to the "-fpack-struct" command line flag
3799
3800 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
3801
3802 Update new-abi upcast algorithm.
3803 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
3804 prototype and meaning of return value.
3805 (__si_class_type_info::__do_upcast): Likewise.
3806 (__vmi_class_type_info::__do_upcast): Likewise.
3807 * tinfo.cc (__class_type_info::__upcast_result): Replace
3808 whole2dst with part2dst. Adjust ctor.
3809 (__class_type_info::__do_upcast): Adjust call of worker function.
3810 (__class_type_info::__do_upcast): Adjust.
3811 (__si_class_type_info::__do_upcast): Adjust. Use parent's
3812 __do_upcast.
3813 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
3814 virtual base in diamond heirarchy bug.
3815
3816 2000-05-23 Mark Mitchell <mark@codesourcery.com>
3817
3818 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
3819 and bitfield to tinfo_fn_p.
3820 (DECL_TINFO_FN_P): Adjust.
3821 (SET_DECL_TINFO_FN_P): Likewise.
3822 (DECL_MUTABLE_P): Likewise.
3823 (DECL_C_BIT_FIELD): Likewise.
3824 (SET_DECL_C_BIT_FIELD): Likewise.
3825 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3826 (DECL_UNINLINABLE): Likewise.
3827 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
3828 (handle_using_decl): Remove assertion.
3829 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
3830 to build FIELD_DECLs.
3831 (build_base_field): Likewise.
3832 (layout_class_type): Likewise.
3833 * decl.c (init_decl_processing): Likewise.
3834 (build_ptrmemfunc_type): Likewise.
3835 (grokdeclarator): Likewise.
3836 * decl2.c (grok_x_components): Likewise.
3837 * except.c (call_eh_info): Likewise.
3838 * init.c (init_init_processing): Likewise.
3839 * rtti.c (expand_class_desc): Likewise.
3840 (create_pseudo_type_info): Likewise.
3841 (get_vmi_pseudo_type_info): Likewise.
3842 (create_tinfo_types): Likewise.
3843 * ptree.c (print_lang_decl): Adjust.
3844 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
3845 before checking DECL_MUTABLE_P.
3846
3847 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
3848 parameters for template functions.
3849 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
3850 destructors as well as constructors.
3851
3852 2000-05-22 Mark Mitchell <mark@codesourcery.com>
3853
3854 * class.c (build_ctor_vtbl_group): Set inits.
3855 * optimize.c (maybe_clone_body): Set DECL_INLINE and
3856 DECL_THIS_INLINE appropriately for clones.
3857
3858 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
3859 (DECL_CONV_FN_P): Simplify.
3860 (DECL_OPERATOR): Remove.
3861 (language_to_string): Declare.
3862 * decl.c (duplicate_decls): Fix typo in comment.
3863 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
3864 (grok_op_properties): Use DECL_CONV_FN_P instead of
3865 IDENTIFIER_TYPENAME_P.
3866 * dump.c (dequeue_and_dump): Dump the language linkage of
3867 declarations.
3868 * error.c (language_to_string): Give it external linkage.
3869 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
3870 (implicitly_declare_fn): Set DECL_LANGUAGE.
3871 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
3872 IDENTIFIER_TYPENAME_P.
3873 (tsubst_decl): Likewise.
3874 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
3875 * semantics.c (finish_member_declaration): Don't mark members of
3876 classes declared in an extern "C" region as extern "C".
3877
3878 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3879
3880 * decl2.c (qualified_lookup_using_namespace): Look through
3881 namespace aliases.
3882
3883 * decl.c (push_using_decl): Return the old decl on namespace level.
3884
3885 2000-05-21 Mark Mitchell <mark@codesourcery.com>
3886
3887 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
3888 (VTT_NAME_PREFIX): New macro.
3889 (CTOR_VTBL_NAME_PREFIX): Likewise.
3890 (get_ctor_vtbl_name): New function.
3891 * class.c (get_vtable_name): Simplify.
3892 (get_vtt_name): New function.
3893 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
3894 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
3895 when a virtual base becomes primary.
3896 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
3897 VTTs.
3898 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
3899 additional parameters.
3900 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
3901 (initialize_array): New function.
3902 (build_vtt): Likewise.
3903 (build_vtt_inits): Likewise.
3904 (dfs_build_vtt_inits): Likewise.
3905 (dfs_fixup_binfo_vtbls): Likewise.
3906 (build_ctor_vtbl_group): Likewise.
3907 (initialize_vtable): Use initialize_array.
3908 (accumulate_vtbl_inits): Reimplement to handle construction
3909 vtables.
3910 (dfs_accumulate_vtbl_inits): Likewise.
3911 (bulid_vtbl_initializer): Adjust parameter name.
3912 * method.c (build_typename_overload): Remove #if 0'd code.
3913 (get_ctor_vtbl_name): New function.
3914 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
3915 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
3916
3917 * cp-tree.h (struct lang_type): Remove search_slot.
3918 (CLASSTYPE_SEARCH_SLOT): Remove.
3919 (emit_base_init): Change prototype.
3920 (initialize_vtbl_ptrs): Likewise.
3921 (expand_indirect_vtbls_init): Likewise.
3922 (clear_search_slots): Remove.
3923 * decl.c (lang_mark_tree): Don't mark search_slot.
3924 * init.c (initialize_vtbl_ptrs): Simplify.
3925 (emit_base_init): Likewise.
3926 * search.c (struct vbase_info): Document decl_ptr.
3927 (convert_pointer_to_single_level): Remove.
3928 (dfs_find_vbases): Remove.
3929 (dfs_init_base_pointers): Simplify.
3930 (dfs_clear_vbase_slots): Remove.
3931 (dfs_vtable_path_unmark): New function.
3932 (init_vbase_pointers): Simplify.
3933 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
3934 (expand_indirect_vtbls_init): Simplify. Don't call
3935 mark_all_temps_used.
3936 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
3937 initialize_vtbl_ptrs.
3938
3939 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
3940
3941 * except.c: Add static prototypes.
3942
3943 2000-05-20 H.J. Lu <hjl@gnu.org>
3944
3945 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
3946
3947 2000-05-19 Mark Mitchell <mark@codesourcery.com>
3948
3949 Don't create a separate copy of virtual bases for the
3950 CLASSTYPE_VBASECLASSES list.
3951 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
3952 (BINFO_FOR_VBASE): Remove.
3953 (CANONICAL_BINFO): Adjust.
3954 (binfo_for_vbase): New function.
3955 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
3956 instead of BINFO_FOR_VBASE.
3957 (build_vbase_pointer): Likewise.
3958 (build_secondary_vtable): Likewise.
3959 (dfs_mark_primary_bases): Likewise.
3960 (mark_primary_bases): Likewise.
3961 (layout_nonempty_base_or_field): Likewise.
3962 (dfs_set_offset_for_shared_vbases): Likewise.
3963 (dfs_set_offset_for_unshared_vbases): Likewise.
3964 (layout_virtual_bases): Likewise. Adjust for changes to the
3965 CLASSTYPE_VBASECLASSES list.
3966 (dump_class_hierarchy_r): Use binfo_for_vbase
3967 instead of BINFO_FOR_VBASE.
3968 (dump_class_hierarchy): Likewise.
3969 (finish_vtbls): Likewise.
3970 (build_vtbl_initializer): Adjust for changes to the
3971 CLASSTYPE_VBASECLASSES list.
3972 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
3973 * decl.c (finish_destructor_body): Adjust for changes to the
3974 CLASSTYPE_VBASECLASSES list.
3975 * init.c (sort_base_init): Use binfo_for_vbase.
3976 (construct_virtual_bases): Adjust for changes to the
3977 CLASSTYPE_VBASECLASSES list.
3978 (expand_member_init): Use binfo_for_vbase.
3979 (build_vbase_delete): Adjust for changes to the
3980 CLASSTYPE_VBASECLASSES list.
3981 * method.c (do_build_copy_constructor): Likewise.
3982 * rtti.c (get_base_offset): Use binfo_for_vbase.
3983 (expand_class_desc): Remove #if 0'd code.
3984 * search.c (struct vbase_info): Remove vbase_types.
3985 (get_base_distance): Use binfo_for_vbase.
3986 (lookup_field_queue_p): Use CANONICAL_BINFO.
3987 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
3988 (get_pure_virtuals): Adjust for changes to the
3989 CLASSTYPE_VBASECLASSES list.
3990 (dfs_find_vbases): Use binfo_for_vbase.
3991 (dfs_init_vbase_pointers): Likewise.
3992 (init_vbase_pointers): Don't initialize vi.vbase_types.
3993 (virtual_context): Use binfo_for_vbase.
3994 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
3995 CLASSTYPE_VBASECLASSES list.
3996 (expand_indirect_vtbls_init): Simplify.
3997 (dfs_get_vbase_types): Don't replicate virtual bases.
3998 (find_vbase_instance): Use binfo_for_vbase.
3999 (binfo_for_vbase): New function.
4000 * typeck.c (get_delta_difference): Use binfo_for_vbase.
4001
4002 2000-05-17 Mark Mitchell <mark@codesourcery.com>
4003
4004 * decl2.c (finish_anon_union): Generalize error messages to handle
4005 anonymous structures.
4006 * init.c (perform_member_init): Remove `name' parameter.
4007 (build_field_list): New function.
4008 (sort_member_init): Handle anonymous union initialization order
4009 correctly. Check for multiple initializations of the same union.
4010 (emit_base_init): Don't look up fields by name here.
4011 (expand_member_init): Record the result of name lookup for future
4012 reference.
4013 * typeck.c (build_component_ref): Fix formatting.
4014
4015 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
4016
4017 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4018 * typeck.c (build_x_compound_expr): Replace warn_unused with
4019 warn_unused_value.
4020
4021 * decl2.c (lang_decode_option): Update -Wall unused flags by
4022 calling set_Wunused.
4023
4024 2000-05-16 Mark Mitchell <mark@codesourcery.com>
4025
4026 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4027 * init.c (dfs_vtable_path_unmark): Remove.
4028 * search.c (marked_new_vtable_p): Likewise.
4029 (unmarked_new_vtable_p): Likewise.
4030 (dfs_search_slot_nonempty_p): Likewise.
4031 (dfs_mark): Likewise.
4032 (dfs_vtable_path_unmark): Likewise.
4033 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4034 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4035 (dfs_init_vbase_pointers): Remove special-case new ABI code.
4036 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4037 (init_vbase_pointers): Simplify.
4038 (expand_indirect_vtbls_init): Likewise.
4039
4040 * class.c (copy_virtuals): New function.
4041 (build_primary_table): Use it.
4042 (build_secondary_vtable): Likewise.
4043 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
4044 indicate that no vcall offset is required.
4045 (add_virtual_function): Likewise.
4046 (modify_all_vtables): Likewise.
4047 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4048 (dfs_accumulate_vtbl_inits): Likewise.
4049 (build_vtbl_initializer): Make changes to handle construction
4050 vtables.
4051 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4052 (build_rtti_vtbl_entries): Likewise.
4053 (build_vtable_entries): Handle a NULL vcall_index.
4054
4055 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
4056
4057 * decl2.c (lang_decode_option): Fix thinko.
4058
4059 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
4060
4061 * except.c (check_handlers): New fn.
4062 * cp-tree.h: Declare it.
4063 * semantics.c (finish_handler_sequence): Call it.
4064 (finish_function_handler_sequence): Likewise.
4065 (finish_handler_parms): Set TREE_TYPE on the handler.
4066 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
4067 * search.c (get_base_distance_recursive): If protect>1, ignore
4068 special access.
4069 (get_base_distance): Don't reduce watch_access.
4070
4071 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
4072
4073 * lex.c: #include diagnostic.h.
4074 (lang_init_options): Set default prefixing rules.
4075
4076 * lang-options.h: Add -fdiagnostics-show-location=.
4077
4078 * decl2.c: #include diagnostic.h.
4079 (lang_decode_option): Handle -fdiagnostics-show-location=.
4080
4081 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
4082
4083 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
4084 * vec.cc: Revert my 2000-05-07 change.
4085
4086 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
4087
4088 * class.c (check_field_decls): Complain about non-static data
4089 members with same name as class in class with constructor.
4090
4091 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
4092
4093 * decl.c (grokdeclarator): Allow non-static data members with
4094 same name as class.
4095
4096 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
4097
4098 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
4099 and pending_inline.filename. Update prototypes.
4100 * decl.c (define_label): Constify filename parameter.
4101 * decl2.c (warn_if_unknown_interface): Constify local char *.
4102 * input.c Constify input_source.filename. Don't declare
4103 input_filename or lineno. Constify filename parameter to feed_input.
4104 * lex.c (init_parse): Constify parameter and return value.
4105 (cp_pragma_interface, cp_pragma_implementation): Constify
4106 filename argument.
4107 (reinit_parse_for_method, reinit_parse_for_block,
4108 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
4109 Constify local char *.
4110 * pt.c: Don't declare lineno or input_filename.
4111 (print_template_context, tsubst_friend_function, tsubst_decl,
4112 tsubst, instantiate_decl): Constify local char *.
4113 * semantics.c (expand_body): Constify local char *.
4114 * tree.c (build_srcloc): Constify filename parameter.
4115 * typeck.c (c_expand_asm_operands): Constify filename
4116 parameter.
4117
4118 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
4119
4120 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
4121 offsetof expansion.
4122
4123 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
4124
4125 * inc/cxxabi.h: Fix typos in comment.
4126 (__base_class_info::__offset): Use a static_cast.
4127
4128 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
4129
4130 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
4131 of std::size_t and std::ptrdiff_t respectively.
4132 * tinfo.cc: Likewise.
4133 * vec.cc: Likewise.
4134
4135 2000-05-06 Richard Henderson <rth@cygnus.com>
4136
4137 * typeck.c (build_c_cast): Don't warn integer->pointer size
4138 mismatch for constants.
4139
4140 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
4141
4142 * rtti.c (ptmd_initializer): Set non-public, if class is
4143 incomplete.
4144
4145 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
4146 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4147 __cxa_vec_delete): Likewise.
4148 * tinfo.cc (__dynamic_cast): Likewise.
4149 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4150 __cxa_vec_delete): Likewise.
4151
4152 2000-05-04 Mark Mitchell <mark@codesourcery.com>
4153
4154 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
4155 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
4156 (lang_decl_flags): Add vcall_offset.
4157 (THUNK_VCALL_OFFSET): Use it.
4158 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
4159 * method.c (make_thunk): Create the lang_decl here, not in
4160 emit_thunk.
4161 (emit_thunk): Make generic thunks into ordinary functions once
4162 they have been fed to expand_body.
4163 * semantics.c (expand_body): Set current_function_is_thunk here.
4164
4165 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4166
4167 * class.c (update_vtable_entry_for_fn): Prototype.
4168
4169 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
4170 and `tmpl'.
4171
4172 * search.c (dfs_build_inheritance_graph_order): Prototype.
4173
4174 2000-05-04 Mark Mitchell <mark@codesourcery.com>
4175
4176 * cp-tree.h (special_function_kind): Add various kinds of
4177 destructors.
4178 (special_function_p): New function.
4179 * class.c (overrides): Don't let one kind of destructor override
4180 another.
4181 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
4182 whether or not to instantiate a template.
4183 * tree.c (special_function_p): Define.
4184
4185 2000-05-03 Mark Mitchell <mark@codesourcery.com>
4186
4187 * cp-tree.def (THUNK_DECL): Remove.
4188 * cp-tree.h (DECL_THUNK_P): New macro.
4189 (DECL_NON_THUNK_FUNCTION_P): Likewise.
4190 (DECL_EXTERN_C_FUNCTION_P): Likewise.
4191 (SET_DECL_THUNK_P): Likewise.
4192 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
4193 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
4194 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
4195 * decl.c (decls_match): Use DECL_EXTERN_C_P.
4196 (duplicate_decls): Likewise.
4197 (pushdecl): Likewise. Adjust thunk handling.
4198 (grokfndecl): Use DECL_EXTERN_C_P.
4199 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
4200 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
4201 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
4202 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
4203 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
4204 DECL_NO_STATIC_CHAIN.
4205 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
4206 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
4207 * search.c (covariant_return_p): Remove THUNK_DECL handling.
4208 * ir.texi: Update.
4209
4210 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
4211
4212 * tree.c (walk_tree): Set lineno.
4213
4214 2000-05-01 Mark Mitchell <mark@codesourcery.com>
4215
4216 * exception.cc: Update license notice.
4217 * new.cc: Likewise.
4218 * new1.cc: Likewise.
4219 * new2.cc: Likewise.
4220 * tinfo.cc: Likewise.
4221 * tinfo2.cc: Likewise.
4222 * vec.cc: Likewise.
4223 * inc/cxxabi.h: Likewise.
4224 * inc/exception: Likewise.
4225 * inc/new: Likewise.
4226 * inc/new.h: Likewise.
4227 * inc/typeinfo: Likewise.
4228
4229 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
4230
4231 * tree.c (build_target_expr_with_type): If we already have a
4232 TARGET_EXPR, just return it.
4233
4234 * optimize.c (initialize_inlined_parameters): Don't generate an
4235 EXPR_STMT if we can just use DECL_INITIAL.
4236 * decl.c (emit_local_var): Only make the initialization a
4237 full-expression if stmts_are_full_exprs_p.
4238
4239 2000-05-01 Mark Mitchell <mark@codesourcery.com>
4240
4241 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
4242 macro.
4243 * call.c (standard_conversion): Use it.
4244 (direct_reference_binding): Likewise.
4245 (build_over_call): Likewise.
4246 (is_properly_derived_from): Likewise.
4247 (compare_ics): Likewise.
4248 * class.c (resolves_to_fixed_type_p): Likewise.
4249 * optimize.c (declare_return_variable): Likewise.
4250 * pt.c (is_specialization_of): Likewise.
4251 (unify): Likewise.
4252 * typeck.c (comp_target_parms): Likeiwse.
4253 (build_static_cast): Likewise.
4254 (build_reinterpret_cast): Likewise.
4255 (build_const_cast): Likewise.
4256 (comp_ptr_ttypes_real): Likewise.
4257 (comp_ptr_ttypes_const): Likewise.
4258 * typeck2.c (process_init_constructor): Likewise.
4259
4260 2000-04-30 Scott Snyder <snyder@fnal.gov>
4261
4262 * decl.c (finish_destructor_body): Use the base destructor when
4263 destroying virtual bases.
4264
4265 2000-04-30 Mark Mitchell <mark@codesourcery.com>
4266
4267 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
4268 STMT_EXPRs.
4269 * optimize.c (struct inline_data): Add target_exprs field.
4270 (declare_return_variable): When a function returns an aggregate,
4271 use the variable declared in the TARGET_EXPR as the remapped
4272 DECL_RESULT.
4273 (expand_call_inline): Update the pending target_exprs stack.
4274 (optimize_function): Initialize the stack.
4275
4276 * decl2.c (finish_file): Fix typo in comment.
4277
4278 * method.c (emit_thunk): Don't try to return a `void' value.
4279
4280 * optimize.c (initialize_inlined_parameters): If the parameter is
4281 addressable, we need to make a new VAR_DECL, even if the
4282 initializer is constant.
4283
4284 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
4285
4286 * decl.c (grok_op_properties): Add an extra check of argtypes.
4287
4288 2000-04-27 Mark Mitchell <mark@codesourcery.com>
4289
4290 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
4291 variables.
4292 (initialize_inlined_parameters): Try to avoid creating new
4293 VAR_DECLs.
4294
4295 2000-04-27 Alex Samuel <samuel@codesourcery.com>
4296
4297 * lex.c (my_get_run_time): Remove.
4298 (init_filename_times): Use get_run_time instead of my_get_run_time.
4299 (check_newline): Likewise.
4300 (dump_time_statistics): Likewise.
4301 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
4302 of computing elapsed time explicitly.
4303
4304 2000-04-26 Mark Mitchell <mark@codesourcery.com>
4305
4306 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
4307 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
4308 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
4309 before calling decl_constant_value.
4310 * class.c (check_bitfield_decl): Likewise.
4311 * cvt.c (ocp_convert): Likewise.
4312 (convert): Likewise.
4313 * decl.c (compute_array_index_type): Likewise.
4314 (build_enumerator): Likewise.
4315 * decl2.c (check_cp_case_value): Likewise.
4316 * pt.c (convert_nontype_argument): Likewise.
4317 (tsubst): Likewise.
4318 * typeck.c (decay_conversion): Likewise.
4319 (build_compound_expr): Likewise.
4320 (build_reinterpret_cast): Likewise.
4321 (build_c_cast): Likewise.
4322 (convert_for_assignment): Likewise.
4323
4324 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
4325
4326 * decl.c (finish_function): Don't play games with DECL_INLINE.
4327
4328 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
4329
4330 * ir.texi: Correct typo.
4331
4332 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4333
4334 * decl.c (grokdeclarator): Reject VLAs as members.
4335
4336 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
4337
4338 * call.c (standard_conversion): Accept conversion between
4339 COMPLEX_TYPEs.
4340
4341 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
4342
4343 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
4344
4345 * decl2.c (finish_file): Remove double setup for accounting
4346 compile time.
4347
4348 2000-04-24 Robert Lipe <robertlipe@usa.net>
4349
4350 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
4351
4352 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
4353
4354 * new.cc (set_new_handler): Needs to be in std::.
4355
4356 2000-04-23 Mark Mitchell <mark@codesourcery.com>
4357
4358 * cp-tree.h (lang_decl): Remove pretty_function_p.
4359 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
4360 language-specific node.
4361 * decl.c (cp_make_fname_decl): Use build_decl, not
4362 build_lang_decl, to build the variables.
4363 (grokvardecl): Don't call build_lang_decl for local variables in
4364 templates.
4365 (grokdeclarator): Don't call build_lang_decl for local type
4366 declarations in templates.
4367 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
4368 zero'd memory, rather than calling memset.
4369 * pt.c: Include hashtab.h.
4370 (local_specializations): New variable.
4371 (retrieve_local_specialization): Use it.
4372 (register_local_specialization): Likewise.
4373 (tsubst_decl): Don't assume local variables have
4374 DECL_LANG_SPECIFIC.
4375 (instantiate_decl): Set up local_specializations.
4376 * Makefile.in (HTAB_H): New variable.
4377
4378 2000-04-23 Richard Henderson <rth@cygnus.com>
4379
4380 * typeck.c (c_expand_asm_operands): Restore the original
4381 contents of the output list.
4382
4383 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
4384
4385 * ir.texi: Document complex number representation.
4386
4387 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
4388
4389 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
4390 (target_incomplete_p): New function.
4391 (tinfo_base_init): Create comdat NTBS name variable.
4392 (ptr_initializer): Add non_public parameter. Calculate it.
4393 (ptmd_initializer): Likewise.
4394 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4395 (create_real_tinfo_var): Add non_public parameter. Use it.
4396 Push proxy into global namespace.
4397 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4398 New enumeration.
4399 * inc/typeinfo (type_info::before, type_info::operator==):
4400 Compare __name addresses.
4401
4402 * tinfo2.cc: Remove new-abi builtins comment.
4403
4404 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
4405
4406 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4407
4408 * call.c (joust): Exit early if we get the same function, too.
4409
4410 * decl2.c (key_method): Return NULL_TREE for template classes.
4411 (import_export_class): Don't need to check for template classes.
4412
4413 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
4414
4415 * lex.c: Remove references to cccp.c.
4416
4417 2000-04-18 Mark Mitchell <mark@codesourcery.com>
4418
4419 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4420 volatile_memfunc. Add destructor_attr. Adjust dummy.
4421 (DECL_DESTRUCTOR_P): Use destructor_attr.
4422 (DECL_CONST_MEMFUNC_P): Reimplement.
4423 (DECL_VOLATILE_MEMFUNC_P): Remove.
4424 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4425 (overrides): Use DECL_DESTRUCTOR_P.
4426 (check_for_override): Likewise.
4427 * decl.c (start_function): Likewise.
4428 * decl2.c (grokfclassfn): Likewise.
4429 (check_classfn): Likewise.
4430 (grok_function_init): Likewise.
4431
4432 2000-04-17 Mark Mitchell <mark@codesourcery.com>
4433
4434 * decl2.c (grokfield): Issue error on illegal data member
4435 declaration.
4436
4437 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
4438
4439 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4440
4441 2000-04-16 Mark Mitchell <mark@codesourcery.com>
4442
4443 * class.c (build_vtable_entry): Don't build thunks for type-info
4444 functions.
4445
4446 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
4447
4448 * decl.c (decls_match): Allow a redeclaration of a builtin to
4449 specify args while the builtin did not.
4450
4451 2000-04-15 Mark Mitchell <mark@codesourcery.com>
4452
4453 * cp-tree.def (THUNK_DECL): Add to documentation.
4454 * cp-tree.h (flag_huge_objects): Declare.
4455 * class.c (modify_vtable_entry): Tidy.
4456 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4457 Calculate delta appropriately for the new ABI.
4458 (dfs_modify_vtables): Use it.
4459 (modify_all_vtables): Fix thinko in code to add overriding copies
4460 of functions to primary vtables.
4461 (build_clone): Fix typo in comment.
4462 (clone_function_decl): Correct order of destructors in vtable.
4463 (build_vbase_offset_vtbl_entries): Adjust comment.
4464 (dfs_vcall_offset_queue_p): Remove.
4465 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4466 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4467 (build_vtable_entry): Correct check for pure virtual functions.
4468 Don't declare flag_huge_objects.
4469 * decl.c (flag_huge_objects): Remove declaration.
4470 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4471 Use int_size_in_bytes.
4472 (emit_thunk): Handle vcall offset thunks.
4473
4474 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4475
4476 * decl2.c (parse_time, varconst_time): Delete declarations.
4477 (finish_file): Delete LINENO declaration.
4478 START_TIME and THIS_TIME now long.
4479
4480 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
4481
4482 * class.c (build_base_field): Reformat comment.
4483
4484 * inc/cxxabi.h (stddef.h): Comment inclusion.
4485 (__base_class_info::__offset): Comment shift.
4486
4487 2000-04-12 Mark Mitchell <mark@codesourcery.com>
4488
4489 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4490 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4491 (cp_push_exception_identifier): New macro.
4492 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4493 (DECL_BASE_DESTRUCTOR_P): Likewise.
4494 (DECL_DELETING_DESTRUCTOR_P): Likewise.
4495 (get_vtbl_decl_for_binfo): Fix formatting.
4496 (in_charge_arg_for_name): New macro.
4497 (maybe_build_cleanup_and_delete): Remove declaration.
4498 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4499 (in_charge_arg_for_name): New function.
4500 (build_new_method_call): Use it. Handle cloned destructors.
4501 (build_clone): Don't make the base constructor virtual.
4502 Automatically defer generated functions.
4503 (clone_function_decl): Handle destructors, too.
4504 (clone_constructors_and_destructors): Likewise.
4505 (create_vtable_ptr): Don't create a vtable entry for a cloned
4506 function.
4507 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4508 (initialize_predefined_identifiers): Update appropriately.
4509 (finish_destructor_body): Simplify.
4510 (maybe_build_cleanup_and_delete): Remove.
4511 * except.c (expand_throw): Handle new-ABI destructors.
4512 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4513 (build_dtor_call): New function.
4514 (build_delete): Use it. Simplify.
4515 * optimize.c (maybe_clone_body): Handle destructors.
4516 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4517
4518 * exception.cc (cleanup_fn): New typedef.
4519 (CALL_CLEANUP): New macro.
4520 (cp_eh_info): Use them.
4521 (__cp_push_exception): Likewise.
4522 (__cp_pop_exception): Likewise.
4523
4524 2000-04-11 Mark Mitchell <mark@codesourcery.com>
4525
4526 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4527 (complete_dtor_identifier): New macro.
4528 (CLASSTYPE_FIRST_CONVERSION): Remove.
4529 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4530 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4531 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4532 (CLASSTYPE_CONSTRUCTORS): Likewise.
4533 (CLASSTYPE_DESTRUCTORS): Likewise.
4534 (lang_decl): Add cloned_function.
4535 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4536 (DECL_BASE_CONSTRUCTOR_P): Likewise.
4537 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4538 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4539 (DECL_CLONED_FUNCTION_P): Likewise.
4540 (DECL_CLONED_FUNCTION): Likewise.
4541 (clone_function_decl): Declare.
4542 (maybe_clone_body): Likewise.
4543 * call.c (build_user_type_conversion_1): Call complete object
4544 constructors in the new ABI.
4545 (build_new_method_call): Don't add in-charge parameters under the
4546 new ABI.
4547 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4548 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4549 CLASSTYPE_DESTRUCTOR_SLOT.
4550 (build_clone): New function.
4551 (clone_function_decl): Likewise.
4552 (clone_constructors_and_destructors): Likewise.
4553 (check_bases_and_members): Use it.
4554 * decl.c (iniitialize_predefined_identifiers): Initialize
4555 complete_dtor_identifier.
4556 (finish_function): Don't add extra code to a clone.
4557 (lang_mark_tree): Mark cloned_function.
4558 * decl2.c (mark_used): Don't bother trying to instantiate things
4559 we synthesized.
4560 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4561 * method.c (set_mangled_name_for_decl): Don't treat clones as
4562 constructors.
4563 (synthesize_method): Sythesize cloned functions, not the clones.
4564 * optimize.c (inline_data): Update comment on ret_label.
4565 (remap_block): Don't assume DECL_INITIAL exists.
4566 (copy_body_r): Allow ret_label to be NULL.
4567 (maybe_clone_body): Define.
4568 * pt.c (tsubst_decl): Handle clones.
4569 (instantiate_clone): New function.
4570 (instantiate_template): Use it.
4571 (set_mangled_name_for_template_decl): Don't treat clones as
4572 constructors.
4573 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4574 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4575 * semantics.c (expand_body): Clone function bodies as necessary.
4576
4577 * optimize.c (remap_decl): Avoid sharing structure for arrays
4578 whose size is only known at run-time.
4579 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4580
4581 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4582 to has_in_charge_parm_p.
4583 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4584 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4585 (DECL_COPY_CONSTRUCTOR_P): New macro.
4586 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4587 (build_user_type_conversion_1): Likewise.
4588 (convert_like_real): Likewise.
4589 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
4590 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4591 (copy_args_p): Likewise.
4592 (grok_ctor_properties): Likewise.
4593 (start_function): Likewise.
4594 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
4595 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4596 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4597 * method.c (do_build_copy_constructor): Use
4598 DECL_HAS_IN_CHARGE_PARM_P.
4599 (synthesize_method): Likewise.
4600 * pt.c (instantiate_template): Remove goto.
4601 * tree.c (build_cplus_method_type): Remove mention of obstacks in
4602 comment.
4603
4604 * cp-tre.h (finish_function): Change prototype.
4605 * decl.c (end_cleanup_fn): Adjust caller.
4606 (finish_function): Take only one parameter.
4607 * decl2.c (finish_objects): Adjust caller.
4608 (finish_static_storage_duration_function): Likewise.
4609 * method.c (emit_thunk): Likewise.
4610 * parse.y: Likewise.
4611 * parse.c: Regenerated.
4612 * pt.c (instantiate_decl): Likewise.
4613 * rtti.c (synthesize_tinfo_fn): Likewise.
4614 * semantics.c (expand_body): Likewise.
4615
4616 * cp-tree.h (copy_decl): New function.
4617 * class.c (finish_struct_1): Use it.
4618 * lex.c (copy_decl): Define it.
4619 * pt.c (tsubst_decl): Likewise.
4620 * tree.c (copy_template_template_parm): Likewise.
4621
4622 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
4623 has_nonpublic_assign_ref.
4624 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
4625 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
4626 * class.c (finish_struct_methods): Don't set
4627 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
4628 (interface_only): Don't declare.
4629 (interface_unknown): Likewise.
4630
4631 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4632
4633 * tree.h (HAVE_TEMPLATES): Remove definition.
4634 * lang-options.h (-fthis-is-variable): Remove documentation.
4635
4636 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
4637
4638 * class.c (instantiate_type): Handle object-relative template-id.
4639
4640 * semantics.c (finish_expr_stmt): Call convert_to_void here.
4641 * decl.c (cplus_expand_expr_stmt): Not here.
4642
4643 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
4644 Initialize exprtype earlier.
4645
4646 * parse.y (fn.def1): Check for defining types in return types.
4647
4648 * decl.c (check_tag_decl): Notice extra fundamental types.
4649 Diagnose empty decls in classes, too.
4650
4651 * decl.c (grokdeclarator): Don't override an anonymous name if no
4652 declarator was given.
4653
4654 * cvt.c (convert_to_void): Call resolve_offset_ref.
4655
4656 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
4657
4658 * decl2.c (decl_namespace): Handle getting a type.
4659
4660 * typeck.c (build_c_cast): Re-enable warning for cast between
4661 pointer and integer of different size.
4662
4663 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
4664
4665 * inc/cxxabi.h (__pointer_type_info): Add restrict and
4666 incomplete flags.
4667 (__pointer_type_info::__pointer_catch): New virtual function.
4668 (__pointer_to_member_type_info): Derive from
4669 __pointer_type_info. Adjust.
4670 (__pointer_to_member_type_info::__do_catch): Remove.
4671 (__pointer_to_member_type_info::__is_pointer_p): Declare.
4672 (__pointer_to_member_type_info::__pointer_catch): Declare.
4673 * rtti.c (qualifier_flags): Add restrict flag.
4674 (ptmd_initializer): Reorder members.
4675 (create_tinfo_types): Expand comments. Reorder
4676 ptmd_desc_type_node members.
4677 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
4678 Implement.
4679 (__pointer_type_info::__do_catch): Move specific code into
4680 __pointer_catch. Call it.
4681 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
4682 specific catch checking. Fix void conversion check.
4683 (__pointer_to_member_type_info::__do_catch): Remove.
4684 (__pointer_to_member_type_info::__pointer_catch): Implement.
4685
4686 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4687
4688 * lex.c (init_parse): Remove traces of classof and headof.
4689 * decl2.c (flag_operator_names): Default to 1.
4690 (lang_decode_option): Do not set it for -ansi.
4691
4692 2000-04-09 Mark Mitchell <mark@codesourcery.com>
4693
4694 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
4695 (DECL_MAIN_VARIANT): Remove.
4696 * decl.c (duplicate_decls): Don't set it.
4697 (start_function): Likewise.
4698 (lang_mark_tree): Don't mark it.
4699 * decl2.c (defer_fn): Don't use it.
4700 * lex.c (retrofit_lang_decl): Don't set it.
4701 * pt.c (tsubst_decl): Likewise.
4702 * ptree.c (print_lang_decl): Don't print it.
4703 * typeck.c (mark_addressable): Don't use it.
4704
4705 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4706
4707 * vec.cc: Include <new> and <exception>.
4708 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
4709 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
4710 terminate.
4711 (__cxa_vec_delete): Catch dtor exceptions.
4712
4713 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4714
4715 Prepend __ to implementation defined names.
4716 * inc/typeinfo (type_info): Rename _name to __name.
4717 (type_info::type_info): Rename parameter.
4718 (type_info::operator==, type_info::operator!=,
4719 type_info::before): Likewise.
4720 (type_info::is_pointer_p, type_info::is_function_p,
4721 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
4722 parameters.
4723 * inc/cxxabi.h
4724 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
4725 (__pointer_type_info::__pointer_type_info): Likewise.
4726 (__pointer_type_info::is_pointer_p,
4727 __pointer_type_info::do_catch): Prepend __. Rename parameters.
4728 (__array_type_info::__array_type_info): Rename parameters.
4729 (__function_type_info::__function_type_info): Likewise.
4730 (__function_type_info::is_function_p): Prepend __.
4731 (__enum_type_info::__enum_type_info): Rename parameters.
4732 (__pointer_to_member_type_info::__pointer_to_member_type_info):
4733 Likewise.
4734 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
4735 parameters.
4736 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
4737 (__class_type_info::__class_type_info): Rename parameters.
4738 (__class_type_info::sub_kind): Prepend __. Adjust member names.
4739 (__class_type_info::upcast_result,
4740 __class_type_info::dyncast_result): Prepend __. Move definition
4741 into tinfo.cc.
4742 (__class_type_info::do_upcast, __class_type_info::do_catch,
4743 __class_type_info::find_public_src,
4744 __class_type_info::do_dyncast,
4745 __class_type_info::do_find_public_src): Prepend __. Rename
4746 parameters.
4747 (__si_class_type_info::__si_class_type_info): Rename parameters.
4748 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
4749 __si_class_type_info::do_find_public_src): Prepent __. Rename
4750 parameters.
4751 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
4752 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
4753 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
4754 parameters.
4755 (__dynamic_cast): Rename parameters.
4756 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
4757 type_info::do_catch, type_info::do_upcast): Prepend __.
4758 (contained_p, public_p, virtual_p, contained_public_p,
4759 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
4760 (__class_type_info::do_catch,
4761 __class_type_info::do_upcast): Prepend __. Adjust.
4762 (__class_type_info::__upcast_result,
4763 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
4764 Adjust.
4765 (__class_type_info::find_public_src): Prepend __. Adjust.
4766 (__class_type_info::do_find_public_src,
4767 __si_class_type_info::do_find_public_src,
4768 __vmi_class_type_info::do_find_public_src): Likewise.
4769 (__class_type_info::do_dyncast,
4770 __si_class_type_info::do_dyncast,
4771 __vmi_class_type_info::do_dyncast): Likewise.
4772 (__class_type_info::do_upcast,
4773 __si_class_type_info::do_upcast,
4774 __vmi_class_type_info::do_upcast): Likewise.
4775 (__dynamic_cast): Adjust.
4776 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
4777 (__function_type_info::is_function_p): Likewise.
4778 (__pointer_type_info::do_catch): Likewise. Adjust.
4779 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
4780 (__throw_type_match_rtti_2): Adjust.
4781 (__is_pointer): Adjust.
4782
4783 2000-04-08 Mark Mitchell <mark@codesourcery.com>
4784
4785 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
4786 (complete_ctor_identifier): New macro.
4787 (special_function_kind): Add sfk_copy_constructor and
4788 sfk_assignment_operator.
4789 (LOOKUP_HAS_IN_CHARGE): Remove.
4790 (cons_up_default_function): Rename to ...
4791 (implicitly_declare_fn): ... this.
4792 * call.c (build_new_method_call): Add in-charge parameters for
4793 constructors here.
4794 * class.c (add_implicitly_declared_members): Change parameter name
4795 from cant_have_assignment to cant_have_const_assignment.
4796 Replace calls to cons_up_default_function to implicitly_declare_fn.
4797 * cvt.c (ocp_convert): Use complete_ctor_identifier.
4798 * decl.c (initialize_predefined_identifiers): Initialize it.
4799 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
4800 complex expression.
4801 * init.c (expand_default_init): Don't calculate the in-charge
4802 parameter here.
4803 (build_new_1): Likewise.
4804 * lex.c (cons_up_default_function): Move to method.c.
4805 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
4806 (implicitly_declare_fn): New function.
4807 * typeck.c (build_static_cast): Use complete_ctor_identifier.
4808 (build_modify_expr): Likewise.
4809 * typeck2.c (build_functional_cast): Likewise.
4810
4811 Under the new ABI, constructors don't return `this'.
4812 * cp-tree.h (warn_reorder): Declare.
4813 (special_function_kind): New enum.
4814 (global_base_init_list): Remove declaration.
4815 (emit_base_init): Don't return a value.
4816 (check_base_init): Don't declare.
4817 (is_aggr_typedef): Likewise.
4818 * decl.c (check_special_function_return_type): New function.
4819 (return_types): Remove.
4820 (grokdeclarator): Use check_special_function_return_type.
4821 (start_function): Don't initialize ctor_label under the new ABI.
4822 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
4823 * init.c (begin_init_stmts): Move to top of file.
4824 (finish_init_stmts): Likewise.
4825 (warn_reorder): Don't declare.
4826 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
4827 value.
4828 (check_base_init): Remove.
4829 (is_aggr_typedef): Likewise.
4830 (build_new_1): Don't use the return value of a constructor.
4831 * semantics.c (setup_vtbl_ptr): Don't use the return value
4832 of emit_base_init.
4833 * typeck.c (check_return_expr): Don't magically convert return
4834 statements into `return this' in constructors under the new ABI.
4835
4836 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
4837 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
4838 (base_ctor_identifier): New macro.
4839 (base_dtor_identifier): Likewise.
4840 (deleting_dtor_identifier): Likewise.
4841 * decl.c: Don't include obstack.h.
4842 (obstack_chunk_alloc): Don't define.
4843 (obstack_chunk_free): Likewise.
4844 (struct predefined_identifier): New type.
4845 (initialize_predefined_identifiers): New function.
4846 (init_decl_processing): Use it.
4847 (debug_temp_inits): Remove.
4848 (start_method): Don't call preserve_data.
4849 (hack_incomplete_structures): Update comment.
4850 * init.c (init_init_processing): Don't initialize
4851 nelts_identifier.
4852 (build_offset_rf): Remove dead code.
4853 (build_delete): Use CLASSTYPE_N_BASECLASSES.
4854 * search.c (init_search_processing): Don't initialize
4855 vptr_identifier.
4856
4857 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4858
4859 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
4860 some sign_compare warnings.
4861
4862 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
4863
4864 Rename abi::__vmi_class_type_info members.
4865 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
4866 base_list, detail_masks members to vmi_flags, vmi_base_count,
4867 vmi_bases and vmi_flags_masks respectively.
4868 (__vmi_class_type_info::vmi_flags_masks): Rename
4869 details_unknown_mask to flags_unknown_mask.
4870 * tinfo.cc (__class_type_info::do_upcast): Adjust.
4871 (__vmi_class_type_info::do_find_public_src): Adjust.
4872 (__vmi_class_type_info::do_dyncast): Adjust.
4873 (__vmi_class_type_info::do_upcast): Adjust.
4874
4875 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
4876
4877 * tinfo.cc (convert_to_base): New function.
4878 (get_vbase_offset): Remove. Move into convert_to_base.
4879 (__vmi_class_type_info::do_find_public_src): Adjust.
4880 (__vmi_class_type_info::do_dyncast): Adjust.
4881 (__vmi_class_type_info::do_upcast): Adjust.
4882
4883 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
4884
4885 * tinfo.cc (operator=): Use __builtin_strcmp.
4886 * tinfo2.cc (before): Likewise.
4887
4888 2000-04-06 Mark Mitchell <mark@codesourcery.com>
4889
4890 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
4891 (DECL_SAVED_INLINE): Rename to ...
4892 (DECL_DEFERRED_FN): ... this.
4893 (in_function_p): Remove declaration.
4894 (mark_inline_for_output): Rename to ...
4895 (defer_fn): ... this.
4896 * decl.c (finish_function): Adjust call to mark_inline_for_output.
4897 (in_function_p): Remove definition.
4898 * decl2.c (saved_inlines): Rename to ...
4899 (deferred_fns): ... this.
4900 (saved_inlines_used): Rename to ...
4901 (deferred_fns_used): ... this.
4902 (mark_inline_for_output): Rename to ...
4903 (defer_fn): ... this.
4904 (finish_file): Adjust accordingly.
4905 (init_decl2): Likewise.
4906 * lex.c (cons_up_default_function): Likewise.
4907 * pt.c (mark_decl_instantiated): Likewise.
4908 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
4909 circumstances.
4910 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
4911 * semantics.c (expand_body): Defer more functions.
4912
4913 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4914
4915 * vec.cc: New file.
4916 * Make-lang.in (CXX_LIB2FUNCS): Add it.
4917 (vec.o): Build it.
4918 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4919 __cxa_vec_delete): Declare.
4920
4921 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4922
4923 * rtti.c (dfs_class_hint_mark): New static function.
4924 (dfs_class_hint_unmark): New static function.
4925 (class_hint_flags): Use them.
4926
4927 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
4928
4929 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
4930
4931 2000-04-05 Mark Mitchell <mark@codesourcery.com>
4932
4933 * cp-tree.h (instantiate_decl): Change prototype.
4934 * decl2.c (mark_used): Adjust call.
4935 * optimize.c (inlinable_function_p): Adjust handling of templates.
4936 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
4937 (do_type_instantiation): Likewise.
4938 (instantiate_decl): Defer more templates.
4939 (instantiate_pending_templates): Adjust logic to handle inline
4940 friend functions.
4941
4942 * Makefile.in (GGC_H): New variable. Use it throughout in place
4943 of ggc.h.
4944
4945 * call.c: Don't include obstack.h. Include ggc.h.
4946 (obstack_chunk_alloc): Don't define.
4947 (obstack_chunk_free): Likewise.
4948 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
4949 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
4950 (pop_switch): Free it.
4951
4952 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
4953
4954 * dump.c (dequeue_and_dump): Don't try to print the bit_position
4955 if we don't have a DECL_FIELD_OFFSET.
4956
4957 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
4958
4959 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
4960 special_function_p.
4961
4962 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4963
4964 * cfns.gperf (hash, libc_name_p): Prototype.
4965
4966 * rtti.c (build_dynamic_cast_1): Constification.
4967
4968 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
4969
4970 * semantics.c (deferred_type_access_control): Prototype.
4971
4972 2000-04-04 Mark Mitchell <mark@codesourcery.com>
4973
4974 Correct many new ABI issues regarding vbase and vcall offset
4975 layout.
4976 * cp-tree.h (BINFO_VTABLE): Document.
4977 (struct lang_type): Tweak formatting.
4978 (BINFO_PRIMARY_BINFO): Add to documentation.
4979 (CLASSTYPE_VSIZE): Fix typo in comment.
4980 (CLASSTYPE_VBASECLASSES): Update documentation.
4981 (BINFO_VBASE_MARKED): Remove.
4982 (SET_BINFO_VBASE_MARKED): Likewise.
4983 (CLEAR_BINFO_VBASE_MARKED): Likewise.
4984 (BINFO_FIELDS_MARKED): Remove.
4985 (SET_BINFO_FIELDS_MARKED): Likewise.
4986 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
4987 (enum access_kind): New enumeration.
4988 (num_extra_vtbl_entries): Remove declaration.
4989 (size_extra_vtbl_entries): Likewise.
4990 (get_vtbl_decl_for_binfo): New function.
4991 (dfs_vbase_unmark): Remove declaration.
4992 (mark_primary_bases): Likewise.
4993 * class.c (SAME_FN): Remove.
4994 (struct vcall_offset_data_s): Move definition.
4995 (build_vbase_pointer): Use `build', not `build_binary_op', to
4996 access the vbase pointer under the new ABI.
4997 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
4998 (build_primary_vtable): Likewise.
4999 (dfs_mark_primary_bases): Move here from search.c.
5000 (mark_primary_bases): Likewise.
5001 (determine_primary_bases): Under the new ABI, don't make a base
5002 class a primary base just because we don't yet have any virtual
5003 functions.
5004 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
5005 (num_vfun_entries): Remove.
5006 (dfs_count_virtuals): Likewise.
5007 (num_extra_vtbl_entries): Likewise.
5008 (size_extra_vtbl_entries): Likewise.
5009 (layout_virtual_bases): Iterate in inheritance graph order under
5010 the new ABI.
5011 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5012 indicate that a vfield is present.
5013 (init_class_processing): Initialize access_public_node, etc., from
5014 ak_public, etc.
5015 (get_vtbl_decl_for_binfo): New function.
5016 (dump_class_hierarchy_r): Likewise.
5017 (dump_class_hierarchy): Use it.
5018 (finish_vtbls): Build the vtbls in inheritance graph order.
5019 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5020 (initialize_vtable): Use get_vtbl_decl_for_binfo.
5021 (accumulate_vtbl_inits): Add comments explaining why a pre-order
5022 walk is required.
5023 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5024 where the vptr points, even for primary vtables.
5025 (build_vtbl_initializer): Adjust handling of vbase and vcall
5026 offsets.
5027 (build_vcall_and_vbase_vtable_entries): New function.
5028 (dfs_build_vbase_offset_vtbl_entries): Remove.
5029 (build_vbase_offset_vtbl_entries): Reimplement.
5030 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5031 were already handled in a primary base class vtable.
5032 (build_vcall_offset_vtbl_entries): Adjust.
5033 (build_rtti_vtbl_entries): Adjust.
5034 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5035 * init.c (expand_virtual_init): Simplify.
5036 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5037 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5038 * search.c (BINFO_ACCESS): New macro.
5039 (SET_BINFO_ACCESS): Likewise.
5040 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5041 (access_in_type): Likewise.
5042 (dfs_accessible_p): Likewise.
5043 (protected_accessible_p): Likewise.
5044 (lookup_fnfields_1): Adjust documentation.
5045 (dfs_mark_primary_bases): Move to class.c
5046 (mark_primary_bases): Likewise.
5047 (dfs_vbase_unmark): Remove.
5048 (virtual_context): Use BINFO_FOR_VBASE.
5049 (dfs_get_vbase_types): Simplify.
5050 (dfs_build_inheritance_graph_order): New function.
5051 (get_vbase_types): Use it.
5052 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
5053
5054 * tinfo.cc (get_vbase_offset): New function.
5055 (__vmi_class_type_info::do_find_public_src): Use it.
5056 (__vmi_class_type_info::do_dyncast): Likewise.
5057 (__vmi_class_type_info::do_upcast): Likewise.
5058
5059 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
5060
5061 * lang-specs.h: Pass -fno-show-column to the preprocessor.
5062
5063 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
5064
5065 * rtti.c (class_hint_flags): Rename flags.
5066 (class_initializer): Remove flags.
5067 (synthesize_tinfo_var): Combine offset and flags. Add flags
5068 for __vmi_class_type_info.
5069 (create_tinfo_types): Remove flags from __class_type_info and
5070 __si_class_type_info. Merge flags and offset from
5071 base_class_type_info.
5072 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
5073 (__base_class_info::is_virtual_p): Adjust.
5074 (__base_class_info::is_public_p): Adjust.
5075 (__base_class_info::offset): New accessor.
5076 (__class_type_info::details): Remove member.
5077 (__class_type_info::__class_type_info): Lose details.
5078 (__class_type_info::detail_masks): Remove.
5079 (__si_class_type_info::__si_class_type_info): Lose details.
5080 (__vmi_class_type_info::details): New member.
5081 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
5082 (__vmi_class_type_info::detail_masks): New member.
5083 * tinfo.cc (__class_type_info::do_upcast): Initialize result
5084 with unknown_details_mask.
5085 (__vmi_class_type_info::do_find_public_src): Adjust
5086 (__vmi_class_type_info::do_dyncast): Adjust.
5087 (__vmi_class_type_info::do_upcast): Set result details, if
5088 needed. Adjust.
5089 (__dynamic_cast): Temporarily #if out optimization.
5090
5091 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
5092
5093 * rtti.c (get_tinfo_decl): Mark used.
5094 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
5095 mark as dealt with, if we output it.
5096
5097 2000-03-28 Mark Mitchell <mark@codesourcery.com>
5098
5099 * class.c: Reorganize to put virtual function table initialization
5100 machinery at the end of the file.
5101
5102 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
5103
5104 * class.c (finish_struct): Use bitsize_zero_node.
5105 * pt.c (instantiate_class_template): Likewise.
5106
5107 2000-03-28 Mark Mitchell <mark@codesourcery.com>
5108
5109 Put RTTI entries at negative offsets in new ABI.
5110 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
5111 vbase offset at index -3, not -1.
5112 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
5113 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
5114 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
5115 (build_rtti_vtbl_entries): New function.
5116 (set_rtti_entry): Remove.
5117 (build_primary_vtable): Don't use it.
5118 (build_secondary_vtable): Likewise.
5119 (start_vtable): Remove.
5120 (first_vfun_index): New function.
5121 (set_vindex): Likewise.
5122 (add_virtual_function): Don't call start_vtable. Do call
5123 set_vindex.
5124 (set_primary_base): Rename parameter.
5125 (determine_primary_base): Likewise.
5126 (num_vfun_entries): Don't use skip_rtti_stuff.
5127 (num_extra_vtbl_entries): Include RTTI information.
5128 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
5129 (skip_rtti_stuff): Remove.
5130 (dfs_modify_vtables): Don't use it.
5131 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
5132 (layout_nonempty_base_or_field): Update size handling.
5133 (create_vtable_ptr): Tweak.
5134 (layout_class_type): Adjust parameter names.
5135 (finish_struct_1): Simplify.
5136 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
5137 (skip_rtti_stuff): Remove.
5138 (first_vfun_index): New function.
5139 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5140 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
5141 (marked_vtable_pathp): Declare.
5142 (unmarked_vtable_pathp): Likewise.
5143 * error.c (dump_expr): Use first_vfun_index to calculate vtable
5144 offsets.
5145 * rtti.c (build_headof): Look for RTTI at negative offsets.
5146 (get_tinfo_decl_dynamic): Likewise.
5147 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
5148 here.
5149 (create_pseudo_type_info): Do it here instead. Adjust so that
5150 vptr points at first virtual function.
5151 * search.c (marked_vtable_pathp): Make it global.
5152 (unmarked_vtable_pathp): Likewise.
5153 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5154 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5155 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
5156 (get_pure_virtuals): Likewise.
5157 (expand_upcast_fixups): Likewise.
5158 * tree.c (debug_binfo): Likewise.
5159 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
5160 negative offset.
5161
5162 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5163
5164 * class.c (check_field_decl): Fix typo.
5165 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
5166 (check_methods): Likewise.
5167 (check_field_decls): Likewise.
5168 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
5169 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
5170 Use DECL_RESULT_FLD, not DECL_RESULT.
5171 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
5172 * lex.c (identifier_type): Likewise.
5173 * pt.c (determine_specialization, lookup_template_class): Likewise.
5174 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
5175 (resolve_overloaded_unification, more_specialized): Likewise.
5176 * semantics.c (finish_member_declaration): Likewise.
5177 * typeck.c (build_x_function_call): Likewise.
5178
5179 2000-03-26 Mark Mitchell <mark@codesourcery.com>
5180
5181 * class.c (layout_empty_base): Handle empty bases with non-byte
5182 alignment.
5183 (build_base_field): Likewise.
5184 (layout_virtual_bases): Likewise.
5185
5186 * class.c (finish_struct_1): Fix typo in this change:
5187
5188 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5189
5190 2000-03-25 Mark Mitchell <mark@codesourcery.com>
5191
5192 * decl.c (grokdeclarator): Count partial specializations when
5193 keeping track of how many template classes have been seen.
5194
5195 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
5196
5197 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5198
5199 * class.c (build_vbase_pointer_fields): layout_field now place_field.
5200 (get_vfield_offset): Use byte_position.
5201 (set_rtti_entry): Set OFFSET to ssizetype zero.
5202 (get_binfo_offset_as_int): Deleted.
5203 (dfs_record_base_offsets): Use tree_low_cst.
5204 (dfs_search_base_offsets): Likewise.
5205 (layout_nonempty_base_or_field): Reflect changes in RLI format
5206 and call byte_position.
5207 (layout_empty_base): Convert offset to ssizetype.
5208 (build_base_field): use rli_size_unit_so_far.
5209 (dfs_propagate_binfo_offsets): Do computation in proper type.
5210 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
5211 (layout_class_type): Reflect changes in RLI names and fields.
5212 (finish_struct_1): Set DECL_FIELD_OFFSET.
5213 * dump.c (dequeue_and_dump): Call bit_position.
5214 * expr.c (cplus_expand_constant): Use byte_position.
5215 * rtti.c (expand_class_desc): Use bitsize_one_node.
5216 * typeck.c (build_component_addr): Use byte_position and don't
5217 special case for zero offset.
5218
5219 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
5220
5221 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
5222
5223 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
5224 tinfo object.
5225 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
5226 vtable.
5227
5228 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5229
5230 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
5231 DECL_P macros.
5232 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
5233 make_typename_type, check_initializer, cp_finish_decl,
5234 xref_tag): Likewise.
5235 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
5236 decl_namespace, arg_assoc_template_arg, arg_assoc,
5237 validate_nonmember_using_decl, do_class_using_decl): Likewise.
5238 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
5239 args_to_string): Likewise.
5240 * friend.c (is_friend): Likewise.
5241 * lex.c (note_got_semicolon, note_list_got_semicolon,
5242 is_global): Likewise.
5243 * method.c (build_overload_nested_name, build_overload_value,
5244 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
5245 * parse.y (typename_sub, typename_sub1): Likewise.
5246 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
5247 process_partial_specialization, convert_template_argument,
5248 template_args_equal, add_pending_template, lookup_template_class,
5249 for_each_template_parm_r, maybe_fold_nontype_arg,
5250 tsubst, instantiate_template, type_unification_real, unify,
5251 instantiate_pending_templates, set_mangled_name_for_template_decl):
5252 Likewise.
5253 * repo.c (repo_get_id, repo_template_used): Likewise.
5254 * search.c (lookup_field_1): Likewise.
5255 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
5256 * xref.c (classname): Likewise.
5257
5258 2000-03-22 Mark Mitchell <mark@codesourcery.com>
5259
5260 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
5261 (CANONICAL_BINFO): New macro.
5262 (BINFO_NEW_VTABLE_MARKED): Use it.
5263 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
5264 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
5265 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
5266 not TREE_TYPE.
5267 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5268 (build_secondary_vtable): Likewise.
5269 (dfs_finish_vtbls): Likewise.
5270 (dfs_accumulate_vtbl_inits): Likewise.
5271 (accumulate_vtbl_inits): New function.
5272 (finish_vtbls): Make sure that virtual bases come after
5273 non-virtual bases in the vtable group.
5274 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
5275 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5276 * search.c (struct vbase_info): Move definition.
5277 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5278 (unmarked_new_vtable_p): Likewise.
5279 (dfs_mark_vtable_path): Remove.
5280 (dfs_mark_new_vtable): Remove.
5281 (dfs_unmark_new_vtable): Likewise.
5282 (dfs_clear_search_slot): Likewise.
5283 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5284 (dfs_clear_vbase_slots): Likewise.
5285 (init_vbase_pointers): LIkewise.
5286
5287 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
5288
5289 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
5290 SIZETYPE to a non-SIZETYPE.
5291
5292 2000-03-21 Mark Mitchell <mark@codesourcery.com>
5293
5294 * class.c (layout_virtual_bases): Adjust names in conditionally
5295 compiled code.
5296
5297 * class.c (record_base_offsets): New function.
5298 (layout_conflict_p): Likewise.
5299 (layout_nonempty_base_or_field): Use it.
5300 (layout_empty_base): New function.
5301 (build_base_field): Use it.
5302 (build_base_fields): Update comment.
5303 (layout_virtual_bases): Fold in a little code form
5304 layout_basetypes. Use layout_empty_base.
5305 (layout_basetypes): Remove.
5306 (end_of_class): New function.
5307 (layout_class_type): Use it. Adjust.
5308
5309 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
5310 (fntype_p): Remove.
5311 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
5312 comment.
5313 (dfs_skip_nonprimary_vbases_markedp): Likewise.
5314 * typeck.c (fntype_p): Remove.
5315
5316 * cp-tree.h (TI_SPEC_INFO): Remove.
5317 (CLASSTYPE_TI_SPEC_INFO): Likewise.
5318 * pt.c (process_partial_specialization): Likewise.
5319
5320 * class.c (build_base_field): Fix thinko in computation of binfo
5321 offsets.
5322
5323 * tree.c (mark_local_for_remap_p): Mark variables declared in
5324 TARGET_EXPRs as well.
5325
5326 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
5327
5328 * typeck.c (require_complete_type, complete_type,
5329 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
5330 build_array_ref, convert_arguments, pointer_diff,
5331 build_x_unary_op, build_unary_op, build_c_cast,
5332 build_modify_expr): Use COMPLETE_TYPE_P etc.
5333 * call.c (is_complete, convert_like_real,
5334 build_new_method_call): Likewise.
5335 * class.c (build_vbase_pointer_fields, check_bases,
5336 build_base_field, finish_struct_1, pushclass): Likewise.
5337 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
5338 * decl.c (maybe_process_template_type_declaration, pushtag,
5339 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
5340 layout_var_decl, check_initializer, cp_finish_decl,
5341 grokdeclarator, require_complete_types_for_parms,
5342 grok_op_properties, xref_tag, xref_basetypes,
5343 check_function_type): Likewise.
5344 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
5345 * friend.c (do_friend): Likewise.
5346 * init.c (build_offset_ref): Likewise.
5347 * parse.y (structsp): Likewise.
5348 * pt.c (maybe_process_partial_specialization,
5349 tsubst_friend_function, instantiate_class_template, tsubst,
5350 do_type_instantiation, instantiate_pending_templates): Likewise.
5351 * repo.c (repo_get_id): Likewise.
5352 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
5353 synthesize_tinfo_var, emit_support_tinfos): Likewise.
5354 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
5355 * semantics.c (begin_class_definition): Likewise.
5356 * tree.c (build_cplus_method_type): Likewise.
5357 * typeck2.c (digest_init, build_functional_cast,
5358 add_exception_specifier): Likewise.
5359 * parse.h, parse.c: Regenerated.
5360
5361 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
5362
5363 * inc/cxxabi.h: New header file. Define new-abi entry points.
5364 (__pointer_type_info::target): Rename member to ...
5365 (__pointer_type_info::type): ... here.
5366 (__base_class_info::type): Rename member to ...
5367 (__base_class_info::base): ... here.
5368 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
5369 * cp-tree.h (CPTI_ABI): New global tree enumeration.
5370 (abi_node): New global tree node.
5371 * decl.c (abi_node): Document.
5372 (init_decl_processing): Initialize abi_node.
5373 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
5374 (get_vmi_pseudo_type_info): Likewise.
5375 (create_tinfo_types): Likewise.
5376 (emit_support_tinfos): Likewise.
5377 * tinfo.h (cxxabi.h): Include for new-abi.
5378 Move rtti class definitions to new header file.
5379 * tinfo.cc (abi): Use the namespace.
5380 (std): Move new abi rtti classes from here ...
5381 (__cxxabiv1): ... to here.
5382 * tinfo2.cc (cxxabi.h): Include for new-abi.
5383 Move rtti class definitions to new header file.
5384 (std): Move new abi rtti classes from here ...
5385 (__cxxabiv1): ... to here.
5386 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
5387 namespace.
5388
5389 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
5390 Jason Merrill <jason@casey.cygnus.com>
5391
5392 * method.c (build_overload_int): Use host_integerp.
5393
5394 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5395
5396 * init.c (build_offset_ref): Handle the case of a templated member
5397 function.
5398
5399 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5400
5401 * except.c (expand_exception_blocks): Clear catch_clauses_last.
5402
5403 2000-03-18 Mark Mitchell <mark@codesourcery.com>
5404
5405 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5406 * class.c (check_bitfield_decl): Turn illegal bitfields into
5407 non-bitfields.
5408 (dfs_propagate_binfo_offsets): Adjust for new size_binop
5409 semantics.
5410 (dfs_offset_for_unshared_vbases): Likewise.
5411 * cvt.c (cp_convert_to_pointer): Convert NULL to a
5412 pointer-to-member correctly under the new ABI.
5413 * expr.c (cplus_expand_constant): Don't use cp_convert when
5414 turning an offset into a pointer-to-member.
5415 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5416 when dereferencing them under the new ABI.
5417 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5418 of pointers-to-members under the new ABI.
5419
5420 * class.c (check_bitfield_decl): Remove restriction on really long
5421 bitfields.
5422 (layout_class_type): Implement new ABI handling of bitfields
5423 longer than their types.
5424
5425 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5426
5427 * parse.y (extdefs): Call ggc_collect.
5428 * parse.c: Regenerated.
5429
5430 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
5431
5432 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5433 (note_name_declared_in_class): Use OVL_CURRENT to get at a
5434 potential overload.
5435
5436 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5437
5438 * class.c (build_vbase_path): Use integer_zerop.
5439 (build_vtable_entry): Use tree_low_cst.
5440 (get_vfield_offset): Use bit_position.
5441 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5442 Use tree_low_cst.
5443 (check_bitfield_decl): Set DECL_SIZE using convert.
5444 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5445 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5446 Use tree_low_cst.
5447 (finish_struct_1): Use bit_position.
5448 (dump_class_hierarchy): Use tree_low_cst.
5449 * cp-tree.h (min_precision): Add declaration.
5450 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5451 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5452 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5453 * expr.c (cplus_expand_constant): Use bit_position.
5454 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5455 * rtti.c (get_base_offset): Use bit_position.
5456 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5457 host_integerp, and tree_low_cst.
5458 (pointer_int_sum): Use integer_zerop.
5459 (build_component_addr): Use bit_position.
5460
5461 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
5462
5463 * typeck.c (require_complete_type): Don't assume size_zero_node.
5464 (complete_type_or_else): Likewise.
5465
5466 2000-03-16 Steven Grady <grady@digitaldeck.com>
5467 Jason Merrill <jason@casey.cygnus.com>
5468
5469 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5470
5471 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
5472
5473 * decl2.c (grokfield): Bail out if type is error_mark_node.
5474
5475 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5476
5477 * tinfo2.cc (__ptr_to_member_data): Rename to ...
5478 (__pointer_to_member_data): ... here. Adjust.
5479 * rtti.c (create_tinfo_types): Adjust.
5480
5481 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5482
5483 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5484 * decl.c (ref_desc_type_node): Undocument.
5485 * rtti.c (ptr_ref_initializer): Rename to ...
5486 (ptr_initializer): ... here. Adjust comments.
5487 (ptmd_initializer): Fix comment thinko.
5488 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5489 (create_tinfo_types): Remove ref_desc_type_node init.
5490 * tinfo2.cc (__reference_type_info): Remove.
5491
5492 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5493
5494 * decl.c (cp_finish_decl): Remove obsolete comment.
5495
5496 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5497
5498 2000-03-14 Mark Mitchell <mark@codesourcery.com>
5499
5500 * cp-tree.h: Tweak documentation.
5501 * class.c (build_vbase_pointer_fields): Layout the fields, too.
5502 (avoid_overlap): Remove.
5503 (get_binfo_offset_as_int): New function.
5504 (dfs_serach_base_offsets): Likewise.
5505 (layout_nonempty_base_or_field): Likewise.
5506 (build_base_field): Layout fields here. Avoid placing two objects
5507 of the same type at the same address, under the new ABI.
5508 (build_base_fields): Adjust accordingly.
5509 (create_vtable_ptr): Return the new field, but don't attach it to
5510 TYPE_FIELDS.
5511 (remove_base_field): Remove.
5512 (remove_base_fields): Remove.
5513 (layout_basetypes): Adjust accordingly.
5514 (layout_class_type): Call layout_field for each field, rather than
5515 just making a wholesale call to layout_type.
5516
5517 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
5518
5519 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5520
5521 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
5522
5523 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5524
5525 * except.c (dtor_nothrow): New fn.
5526 (do_pop_exception): Use it. Take type parm.
5527 (push_eh_cleanup): Take type parm.
5528 (expand_start_catch_block): Pass it.
5529 (build_eh_type_type_ref): Accept null type.
5530
5531 2000-03-12 Mark Mitchell <mark@codesourcery.com>
5532
5533 * cp-tree.h (revert_static_member_fn): Change prototype.
5534 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5535 (grok_op_properties): Likewise.
5536 (start_function): Likewise.
5537 (revert_static_member_fn): Simplify.
5538 * pt.c (check_explicit_specialization): Adjust call to
5539 revert_static_member_fn.
5540
5541 2000-03-11 Mark Mitchell <mark@codesourcery.com>
5542
5543 * cp-tree.h (scope_kind): New type.
5544 (tmpl_spec_kind): Likewise.
5545 (declare_pseudo_global_level): Remove.
5546 (pseudo_global_level_p): Rename to template_parm_scope_p.
5547 (pushlevel): Remove declaration.
5548 (begin_scope): New function.
5549 (finish_scope): Likewise.
5550 (current_tmpl_spec_kind): Likewise.
5551 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5552 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
5553 Add template_spec_p.
5554 (toplevel_bindings_p): Adjust.
5555 (declare_pseudo_global_level): Remove.
5556 (pseudo_global_level_p): Rename to template_parm_scope_p.
5557 (current_tmpl_spec_kind): New function.
5558 (begin_scope): Likewise.
5559 (finish_scope): Likewise.
5560 (maybe_push_to_top_level): Adjust.
5561 (maybe_process_template_type_declaration): Likewise.
5562 (pushtag): Likewise.
5563 (pushdecl_nonclass_level): Likewise.
5564 (lookup_tag): Likewise.
5565 (grokfndecl): Handle member template specializations. Share
5566 constructor and non-constructor code.
5567 * decl2.c (check_classfn): Handle member template specializations.
5568 * pt.c (begin_template_parm_list): Use begin_scope.
5569 (begin_specialization): Likewise.
5570 (end_specialization): Likewise.
5571 (check_explicit_specialization): Use current_tmpl_spec_kind.
5572 Handle member template specializations.
5573 (end_template_decl): Use finish_scope. Remove call to
5574 get_pending_sizes.
5575 (push_template_decl_real): Remove bogus error message.
5576 (tsubst_decl): Fix typo in code contained in comment.
5577 (instantiate_template): Handle member template specializations.
5578 (most_general_template): Likewise.
5579
5580 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
5581
5582 * lex.c (whitespace_cr): Compress consecutive calls to warning().
5583 (do_identifier): Ditto for error().
5584
5585 * pt.c (convert_nontype_argument): Ditto for cp_error().
5586 (convert_template_argument): Ditto for cp_pedwarn().
5587
5588 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
5589
5590 * exception.cc (__check_null_eh_spec): New fn.
5591 * except.c (expand_end_eh_spec): Call it if the spec is throw().
5592
5593 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5594
5595 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5596 * except.c (expand_end_eh_spec): Add the return type.
5597 * rtti.c (throw_bad_cast): Add the parmtypes.
5598 (throw_bad_typeid): Likewise.
5599
5600 * semantics.c (expand_stmt): Only leave out rtl for unused
5601 artificials, and set DECL_IGNORED_P on them as well.
5602 * decl.c (wrapup_globals_for_namespace): Likewise.
5603
5604 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
5605
5606 * decl.c (maybe_commonize_var): Skip all artificial decls.
5607 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
5608
5609 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5610
5611 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
5612 * cp-tree.h: Declare flag_enforce_eh_specs.
5613 * decl.c (store_parm_decls, finish_function): Check it.
5614
5615 C library functions don't throw.
5616 * Makefile.in (cfns.h): New target.
5617 (except.o): Depend on it.
5618 * Make-lang.in (cc1plus): Depend on cfns.gperf.
5619 * cfns.gperf: New file.
5620 * cfns.h: Generated.
5621 * except.c: Include it.
5622 (nothrow_libfn_p): New fn.
5623 * decl.c (grokfndecl): Use it.
5624 * cp-tree.h: Declare it.
5625
5626 * decl.c (push_overloaded_decl_1, auto_function,
5627 define_function): Lose.
5628 (build_library_fn_1): New static fn.
5629 (builtin_function): Use it.
5630 (get_atexit_node): Use build_library_fn_ptr.
5631 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
5632 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
5633 push_void_library_fn, push_throw_library_fn): New fns.
5634 * cp-tree.h: Declare them.
5635 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
5636 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
5637 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
5638 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
5639 * rtti.c (build_runtime_decl): Lose.
5640 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
5641 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
5642 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
5643
5644 * call.c (build_call): Remove result_type parm.
5645 Call mark_used on unused artificial fns.
5646 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
5647
5648 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
5649
5650 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
5651 appropriate.
5652 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
5653 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
5654 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
5655 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
5656 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5657 expand_generic_desc): Likewise.
5658
5659 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5660
5661 * exception.cc (__cp_pop_exception): Cleanup the original object.
5662
5663 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5664
5665 * decl.c (grok_op_properties): Merge conversion to void warning
5666 with other silly op warnings.
5667
5668 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
5669
5670 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
5671 array CONSTRUCTOR elements. Don't use expr_tree_cons.
5672
5673 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5674
5675 * decl.c (cp_make_fname_decl): New function.
5676 (wrapup_globals_for_namespace): Don't emit unused static vars.
5677 (init_decl_processing): Remove comment about use of
5678 array_domain_type. Set make_fname_decl.
5679 (cp_finish_decl): Remove __FUNCTION__ nadgering.
5680 * semantics.c (begin_compound_stmt): Remove
5681 current_function_name_declared flagging.
5682 (expand_stmt): Don't emit unused local statics.
5683 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
5684 specially.
5685
5686 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5687
5688 * typeck.c (convert_for_assignment): Don't look at array
5689 initializer.
5690 * call.c (convert_like_real): Likewise.
5691
5692 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
5693
5694 Add initial support for '\uNNNN' specifier.
5695 * lex.c (read_ucs): New fn.
5696 (readescape, skip_white_space): Call it.
5697 (is_extended_char, is_extended_char_1): New fns.
5698 (utf8_extend_token): New fn, #if 0'd out.
5699 (real_yylex): Treat extended chars like letters.
5700
5701 * search.c (note_debug_info_needed): Walk the bases even if we
5702 weren't deferring the type itself.
5703
5704 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5705
5706 * decl2.c (finish_objects): Constify a char*.
5707
5708 * method.c (emit_thunk): Likewise.
5709
5710 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
5711
5712 * typeck.c (dubious_conversion_warnings): Look through
5713 REFERENCE_TYPE.
5714
5715 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5716
5717 * class.c (dfs_modify_vtables): I is now unsigned.
5718 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
5719 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
5720 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
5721 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5722 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
5723 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
5724 Call integer_all_onesp.
5725 * typeck2.c (process_init_constructor): Use compare_tree_int.
5726
5727 * lang-specs.h (as): Don't call if -syntax-only.
5728
5729 2000-03-06 Mark Mitchell <mark@codesourcery.com>
5730
5731 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
5732 RTL_EXPR_HAS_NO_SCOPE after all.
5733
5734 2000-03-05 Mark Mitchell <mark@codesourcery.com>
5735
5736 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
5737 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
5738 RTL_EXPR_HAS_NO_SCOPE.
5739
5740 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
5741 later.
5742
5743 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
5744
5745 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
5746
5747 * call.c (convert_like): Macrofy.
5748 (convert_like_with_context): New macro.
5749 (convert_like_real): Renamed from convert_like. Add calling
5750 context parameters, for diagnostics. Add recursive flag. Call
5751 dubious_conversion_warnings for outer conversion.
5752 (build_user_type_conversion): Use convert_like_with_context.
5753 (build_over_call): Likewise. Don't warn about dubious
5754 conversions here. Adjust convert_default_arg calls.
5755 (convert_default_arg): Add context parameters for diagnostics.
5756 Pass throught to convert_like_with_context.
5757 * cp-tree.h (convert_default_arg): Add context parameters.
5758 (dubious_conversion_warnings): Prototype new function.
5759 * typeck.c (convert_arguments): Adjust convert_default_arg call.
5760 (dubious_conversion_warnings): New function, broken
5761 out of convert_for_assignment.
5762 (convert_for_assignment): Adjust.
5763
5764 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
5765
5766 * decl2.c (key_method): Break out from...
5767 (import_export_vtable, import_export_class): ...here.
5768
5769 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
5770 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
5771
5772 * search.c (note_debug_info_needed, dfs_debug_mark,
5773 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
5774 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
5775
5776 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
5777
5778 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
5779 typos.
5780
5781 2000-03-02 Mark Mitchell <mark@codesourcery.com>
5782
5783 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
5784 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
5785 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
5786 (lang_type): Split gets_new into has_new and has_array_new.
5787 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5788 (TYPE_GETS_NEW): Split into ...
5789 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
5790 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
5791 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
5792 (build_op_new_call): Don't declare.
5793 (build_new_1): Likewise.
5794 * call.c (build_op_new_call): Remove.
5795 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5796 instead of TYPE_NEEDS_DESTRUCTOR.
5797 (finish_struct_bits): Likewise.
5798 (add_implicitly_declared_members): Likewise.
5799 (check_field_decl): Likewise.
5800 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
5801 correctly under the new ABI.
5802 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5803 instead of TYPE_NEEDS_DESTRUCTOR.
5804 (initialize_local_var): Likewise.
5805 (destroy_local_var): Likewise.
5806 (cp_finish_decl): Likewise.
5807 (register_dtor_fn): Likewise.
5808 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
5809 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
5810 TYPE_VEC_DELETE_TAKES_SIZE here.
5811 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
5812 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
5813 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5814 (finish_destructor_body): Likewise.
5815 (maybe_build_cleanup_1): Likewise.
5816 * decl2.c (do_static_destruction): Likewise.
5817 * init.c (build_new_1): Make it static.
5818 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5819 (expand_cleanup_for_base): Likewise.
5820 (get_cookie_size): New function.
5821 (build_new_1): Handle array-new cookies correctly under the new
5822 ABI.
5823 (build_vec_delete_1): Likewise.
5824 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5825 (build_delete): Likewise.
5826 (build_vec_delete): Handle array-new cookies correctly under the new
5827 ABI.
5828 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5829 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
5830 TYPE_HAS_ARRAY_NEW_OPERATOR.
5831 * ptree.c (print_lang_type): Check them.
5832 * search.c (context_for_name_lookup): Fix typo in comment.
5833 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5834 * tree.c (break_out_cleanups): Likewise.
5835 (build_cplus_array_test_1): Likewise.
5836 (cp_build_qualified_type_real): Likewise.
5837 * typeck.c (complete_type): Likewise.
5838
5839 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
5840 the command-line, not the end.
5841
5842 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
5843
5844 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
5845
5846 2000-03-02 Tom Tromey <tromey@cygnus.com>
5847
5848 * cp-tree.h (build_java_class_ref): Declare.
5849 * init.c (build_java_class_ref): No longer static.
5850 * except.c (expand_throw): Generate a Java-style `throw' if the
5851 thrown object is a "Java" object.
5852 (initialize_handler_parm): Generate a Java-style lookup of
5853 exception info if the caught object is a "Java" object.
5854 (catch_language, catch_language_init): New globals.
5855 (decl_is_java_type): New function.
5856 (expand_start_catch_block): Don't call push_eh_info() or
5857 push_eh_cleanup() when handling a Java-style "catch". Pass Java
5858 class reference to build_catch_block.
5859
5860 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5861
5862 * typeck.c (comptypes): Treat sizetype like its language equivalent.
5863
5864 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
5865
5866 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
5867 to merge reference/pointer code and fix incorrect warnings.
5868
5869 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
5870
5871 * search.c (protected_accessible_p): Use context_for_name_lookup.
5872
5873 * init.c (construct_virtual_bases): Fix thinko.
5874 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
5875
5876 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
5877
5878 * decl.c (current_function_decl): Move to toplev.c.
5879
5880 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
5881
5882 * pt.c (fn_type_unification): Unify return type, whenever
5883 provided.
5884 (get_bindings_real): Only pass return type when necessary.
5885 Remove explicit return type check.
5886 * class.c (resolve_address_of_overloaded_function): Pass desired
5887 return type to fn_type_unification.
5888
5889 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5890
5891 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
5892 DECL_FIELD_SIZE.
5893 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
5894 DECL_FIELD_SIZE.
5895 * rtti.c (expand_class_desc): Likewise.
5896 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
5897 (THUNK_VCALL_OFFSET): Likewise.
5898 (THUNK_DELTA): Reflect changes in ../tree.h.
5899
5900 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
5901
5902 * search.c (protected_accessible_p): Also allow the access if
5903 the member is public in DERIVED. Lose TYPE parm.
5904 (friend_accessible_p): Lose TYPE parm.
5905 (accessible_p): Adjust.
5906
5907 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5908
5909 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
5910 on things that are not sizes; ssize_binop deleted.
5911 Call size_diffop when appropriate.
5912 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5913 (build_primary_vtable, build_secondary_vtable): Likewise.
5914 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
5915 Variable I is HOST_WIDE_INT.
5916 (get_vfield_offset): Pass proper types to size_binop.
5917 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
5918 (finish_struct_1): Likewise.
5919 (skip_rtti_stuff): Arg N is now pointer to signed.
5920 (layout_class_type): Use size_zero_node.
5921 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
5922 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
5923 * decl.c (complete_arry_type): Pass proper types to size_binop.
5924 (xref_basetypes): BINFO_OFFSET is sizetype.
5925 * error.c (dump_expr): Don't use size_binop non-sizes.
5926 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
5927 * init.c (construct_virtual_bases): Fix type error.
5928 (build_vec_delete_1): Pass proper type to size_binop and don't
5929 fold result.
5930 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
5931 * rtti.c (get_base_offset): Pass proper type to size_binop.
5932 * search.c (dfs_find_vbases): Fix type error.
5933 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
5934 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
5935 * tree.c (debug_binfo): Variable N is signed.
5936 Use HOST_WIDE_INT_PRINT_DEC.
5937 * typeck.c (comptypes): sizetype is same as equivalent integer type.
5938 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
5939 size_one_node and size_zero_node.
5940 (c_alignof): Use size_one_node.
5941 (build_component_addr): Pass proper types to size_binop.
5942 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
5943
5944 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
5945
5946 Implement class scope using-declarations for functions.
5947 * class.c (handle_using_decl): Call add_method for used functions.
5948 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
5949 (add_method): Used functions are hidden by local functions.
5950 (check_bases_and_members): Handle using-decls before finalizing
5951 CLASSTYPE_METHOD_VEC.
5952 * call.c (add_function_candidate): Add ctype parm; if non-zero,
5953 override the type of 'this' accordingly.
5954 (add_template_candidate, add_template_candidate_real): Add ctype parm.
5955 (convert_class_to_reference, build_user_type_conversion_1,
5956 build_new_function_call, build_object_call, build_new_op,
5957 build_new_method_call): Pass ctype parm.
5958
5959 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
5960 the baselink.
5961 * call.c (convert_class_to_reference, build_user_type_conversion_1,
5962 build_new_function_call, build_object_call, build_new_op,
5963 build_new_method_call, build_op_delete_call): Don't get basetype_path
5964 from a baselink.
5965 * typeck.c (build_component_ref): Likewise.
5966 * init.c (build_offset_ref): Likewise.
5967 (resolve_offset_ref): Don't call enforce_access.
5968 Call build_scoped_ref.
5969 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
5970 would cause an error or if -pedantic.
5971 * class.c (alter_access): Lose binfo parm.
5972
5973 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5974
5975 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
5976 types.
5977
5978 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
5979
5980 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
5981 pseudo_type_info creation into the std namespace
5982
5983 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5984
5985 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
5986 (import_export_class): Remove declaration.
5987 * decl2.c (import_export_class): Make it static.
5988 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
5989 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
5990 EXPR_WITH_FILE_LOCATION.
5991 * lex.c (check_newline): Tweak filename/lineno setting.
5992 * semantics.c (begin_while_stmt): Fix typo in comment.
5993
5994 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5995
5996 * lang-options.h (-fmessage-length=): Add missing option.
5997
5998 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
5999
6000 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
6001
6002 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
6003
6004 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
6005
6006 * optimize.c (expand_call_inline): Emit the return label before
6007 evaluating the return value.
6008
6009 2000-02-24 Mark Mitchell <mark@codesourcery.com>
6010
6011 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6012 than duplicating functionality here.
6013 * optimize.c: Include input.h.
6014 (expand_call_inline): Use push_srcloc and pop_srcloc.
6015 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6016 * parse.c: Regenerated.
6017 * Makefile.in (lex.o): Depend on input.h.
6018 (optimize.o): Likewise.
6019
6020 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
6021
6022 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6023 function type, rather than ICE.
6024
6025 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
6026
6027 * decl.c (grokdeclarator): Call decl_type_access_control.
6028 * parse.y (parse_end_decl): Don't call decl_type_access_control if
6029 decl is null.
6030
6031 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
6032
6033 * decl.c (decls_match): Remove obsolete static member nadgering.
6034
6035 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6036
6037 * decl.c (grokdeclarator): Change ANSI to ISO.
6038 * lex.c (consume_string, readescape, do_identifier): Likewise.
6039 (parse_float, real_yylex): Likewise.
6040 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6041 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6042 new_type_id, maybe_label_decls, simple_stmt,
6043 for.init.statement): Likewise.
6044 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
6045 * semantics.c (finish_named_return_value): Likewise.
6046 * parse.c: Regenerate.
6047
6048 2000-02-21 Mark Mitchell <mark@codesourcery.com>
6049
6050 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
6051 (CPTI_CLASS_STAR_TYPE): Remove.
6052 (vtable_index_type): Likewise.
6053 (class_star_type_node): Remove.
6054 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
6055 (build_binary_op_nodefault): Remove.
6056 * call.c (build_new_op): Use build_binary_op instead of
6057 build_binary_op_nodefault.
6058 * decl.c (init_decl_processing): Remove class_star_type_node
6059 initialization. Make delta_type_node ptrdiff_type_node under the
6060 new ABI. Initialize vtable_index_type.
6061 (build_ptrmemfunc_type): Build different structures for the new
6062 ABI.
6063 (build_enumerator): Use build_binary_op instead of
6064 build_binary_op_nodefault.
6065 * method.c (build_overload_value): Mangle pointers-to-members
6066 appropriately under the new ABI.
6067 * typeck.c (build_array_ref): Use build_binary_op instead of
6068 build_binary_op_nodefault.
6069 (get_member_function_from_ptrfunc): Adjust for the new ABI.
6070 (build_binary_op_nodefault): Rename to ...
6071 (build_binary_op): ... this. Remove old version. Adjust for
6072 pointer-to-member comparisons under the new ABI.
6073 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
6074 (build_ptrmemfunc): Adjust for the new ABI.
6075 (expand_ptrmemfunc_cst): Likewise.
6076 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
6077 (pfn_from_ptrmemfunc): Adjust for the new ABI.
6078
6079 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
6080
6081 * call.c (build_object_call): Compress consecutive calls to
6082 cp_error.
6083 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
6084 (build_op_delete_call): Adjust message formatting.
6085
6086 * class.c (check_bases): Compress consecutive calls to
6087 cp_pedwarn.
6088 (finish_struct_anon): Say 'ISO C++'.
6089
6090 * decl.c (start_decl): Same here.
6091 (grok_reference_init): Likewise.
6092 (grokfndecl): Correct message formatting.
6093 (grokfndecl): Improve diagnostic.
6094 (check_static_variable_definition): Likewise. Say 'ISO C++'
6095 (compute_array_index_type): Say 'ISO C++'
6096 (create_array_type_for_decl): Compress consecutive calls to
6097 cp_error.
6098 (grokdeclarator): Say 'ISO C++'
6099 (grok_op_properties): Likewise.
6100
6101 * decl2.c (delete_sanity): Clairify diagnostic.
6102 (check_member_template): Same here.
6103 (grok_function_init): Use consistent terminology.
6104
6105 * expr.c (do_case): Say 'ISO C++'
6106
6107 * friend.c (do_friend): Compress consecutive calls to warning.
6108
6109 2000-02-20 Mark Mitchell <mark@codesourcery.com>
6110
6111 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
6112 * class.c (build_secondary_vtable): Reorganize. Don't create a
6113 new vtable under the new ABI.
6114 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
6115 computing the size.
6116 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
6117 the initializing elements.
6118 (initialize_vtable): New function.
6119 (dfs_finish_vtbls): Use it.
6120 (dfs_accumulate_vtbl_inits): New function.
6121 (finish_vtbls): Merge primary and secondary vtables under the new
6122 ABI.
6123 (finish_struct_1): Remove redundant call to layout_vtable_decl.
6124 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
6125 aren't VAR_DECLs.
6126
6127 * class.c (build_vtable): New function, split out from ...
6128 (get_vtable_decl): ... here, and ...
6129 (build_secondary_vtable): ... here.
6130
6131 * pt.c (tsubst_decl): Fix formatting.
6132
6133 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6134
6135 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
6136 (avoid_overlap, build_base_field): Likewise.
6137 (build_base_field, build_base_fields, is_empty_class):
6138 Test DECL_SIZE with integer_zero.
6139 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
6140 * cp-tree.h (struct lang_type): New field size_unit.
6141 (CLASSTYPE_SIZE_UNIT): New macro.
6142 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
6143 (cp_finish_decl): Delete -Wlarger-than processing.
6144 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
6145 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
6146 * tree.c (make_binfo): binfo vector is one entry longer.
6147 (walk_tree): Walk DECL_SIZE_UNIT.
6148
6149 2000-02-19 Mark Mitchell <mark@codesourcery.com>
6150
6151 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
6152 comment.
6153 (build_vtable_entry): Don't assume all vtable entries are
6154 functions.
6155 (build_vtbl_initializer): Adjust accordingly.
6156 (get_vtable_decl): Fix formatting.
6157
6158 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
6159
6160 * semantics.c (deferred_type_access_control): Walk the entire
6161 type_lookups list.
6162 (save_type_access_control): Rename from
6163 initial_deferred_type_access_control. Just remember the value.
6164 (decl_type_access_control): New fn.
6165 (begin_function_definition): Use deferred_type_access_control, after
6166 we've started the function. Set type_lookups to error_mark_node.
6167 * parse.y (frob_specs, fn.def1): Adjust.
6168 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
6169 (parse_end_decl, parse_bitfield0, parse_method): New fns.
6170 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
6171 (after_type_component_declarator0): Likewise.
6172 (after_type_component_declarator): Likewise.
6173 (notype_component_declarator): Likewise.
6174 * cp-tree.h: Adjust.
6175
6176 * decl.c (redeclaration_error_message): Allow redeclaration of
6177 namespace-scope decls.
6178
6179 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
6180
6181 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
6182
6183 2000-02-17 Mark Mitchell <mark@codesourcery.com>
6184
6185 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
6186 * decl2.c (grokclassfn): Likewise.
6187
6188 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
6189
6190 * decl2.c (lang_decode_option): Don't set default message length
6191 here.
6192 * lex.c (lang_init_options): Set it here.
6193
6194 2000-02-16 Mark Mitchell <mark@codesourcery.com>
6195
6196 Make DECL_CONTEXT mean the class in which a member function was
6197 declared, even for a virtual function.
6198 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
6199 (DECL_FRIEND_CONTEXT): New macro.
6200 (DECL_REAL_CONTEXT): Remove.
6201 (SET_DECL_FRIEND_CONTEXT): Likewise.
6202 (DECL_VIRTUAL_CONTEXT): Adjust.
6203 (DECL_CLASS_SCOPE_P): Use TYPE_P.
6204 (add_friends): Remove.
6205 (hack_decl_function_context): Likewise.
6206 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
6207 CP_DECL_CONTEXT.
6208 (build_over_call): Fix indentation. Use DECL_CONTEXT
6209 instead of DECL_CLASS_CONTEXT.
6210 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
6211 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6212 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6213 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
6214 (build_base_field): Likewise.
6215 (finish_struct_1): Likewise.
6216 (build_self_reference): Likewise.
6217 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
6218 DECL_REAL_CONTEXT.
6219 (pushtag): Use decl_function_context, not
6220 hack_decl_function_context.
6221 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6222 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
6223 (pushdecl): Remove bogus code.
6224 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
6225 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6226 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6227 Use decl_function_context, nothack_decl_function_context.
6228 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
6229 (grokdeclarator): Likewise. Use decl_function_context, not
6230 hack_decl_function_context.
6231 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
6232 (start_function): Use DECL_FRIEND_CONTEXT, not
6233 DECL_CLASS_CONTEXT. Use decl_function_context, not
6234 hack_decl_function_context.
6235 (finish_function): Use decl_function_context, not
6236 hack_decl_function_context.
6237 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
6238 DECL_CLASS_CONTEXT.
6239 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
6240 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
6241 (grokfield): Likewise.
6242 (finish_builtin_type): Likewise.
6243 (finish_vtable_vardec): Use decl_function_context, not
6244 hack_decl_function_context.
6245 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6246 (start_static_initialization_or_destruction): Likewise.
6247 (finish_static_initialization_or_destruction): Likewise.
6248 (mark_used): Adjust logic for deciding when to synthesize methods.
6249 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
6250 DECL_REAL_CONTEXT.
6251 * error.c (dump_function_decl): Use DECL_CONTEXT, not
6252 DECL_CLASS_CONTEXT.
6253 * friend.c (is_friend): Likewise.
6254 (add_friends): Remove.
6255 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
6256 * lex.c (begin_definition_of_inclass_inline): Use
6257 decl_function_context, not hack_decl_function_context.
6258 (process_next_inline): Likewise.
6259 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6260 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
6261 DECL_CLASSS_CONTEXT.
6262 (hack_identifier): Likewise.
6263 (synthesize_method): Use decl_function_context, not
6264 hack_decl_function_context.
6265 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
6266 DECL_REAL_CONTEXT.
6267 (is_member_template): Use decl_function_context, not
6268 hack_decl_function_context. Use DECL_CONTEXT, not
6269 DECL_CLASS_CONTEXT.
6270 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
6271 DECL_CLASS_CONTEXT.
6272 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
6273 DECL_REAL_CONTEXT.
6274 (push_template_decl_real): Likewise.
6275 (instantiate_class_template): Don't call add_friends.
6276 (tsubst_default_argument): Use DECL_CONTEXT, not
6277 DECL_REAL_CONTEXT.
6278 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6279 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6280 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
6281 DECL_CLASS_CONTEXT.
6282 * repo.c (repo_inline_used): Likewise.
6283 * search.c (current_scope): Adjust for new _CONTEXT macros.
6284 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
6285 DECL_REAL_CONTEXT.
6286 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6287 (lookup_fnfields_here):Likewise.
6288 (check_final_overrider): Likewise.
6289 (init_vbase_pointers): Likewise.
6290 (virtual_context): Likewise.
6291 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
6292 (expand_body): Use decl_function_context, not
6293 hack_decl_function_context.
6294 * tree.c (hack_decl_function_context): Remove.
6295 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
6296 DECL_CLASS_CONTEXT.
6297 * typeck2.c (error_not_base_type): Likewise.
6298
6299 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
6300
6301 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
6302
6303 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6304
6305 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
6306
6307 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
6308
6309 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
6310
6311 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
6312
6313 * decl2.c (lang_decode_option): Enable automatic line wrapping.
6314
6315 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
6316
6317 * parse.y (frob_specs): Split out...
6318 (parse_decl): From here.
6319 (fn.def2): Call initial_deferred_type_access_control.
6320 (after_type_component_declarator0): Call frob_specs.
6321 (notype_component_declarator0): Likewise.
6322 * search.c (friend_accessible_p): Nested classes are friends of their
6323 enclosing classes.
6324
6325 2000-02-10 Mark Mitchell <mark@codesourcery.com>
6326
6327 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
6328 used to create an implicit temporary.
6329
6330 * class.c (dfs_modify_vtables): Tweak calculation of functions to
6331 override.
6332
6333 2000-02-08 Nathan Sidwell <nathan@acm.org>
6334
6335 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
6336 strip array element qualifiers too.
6337
6338 2000-02-07 Mark Mitchell <mark@codesourcery.com>
6339
6340 * decl.c (store_parm_decls): Don't build cleanups for parameters
6341 while processing_template_decl.
6342
6343 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
6344
6345 * cp-tree.h (struct saved_scope): Add incomplete field.
6346 (namespace_scope_incomplete): New macro.
6347 * decl.c (pushdecl): Use it.
6348 (hack_incomplete_structures): Use it. See through artificial
6349 binding levels.
6350 (mark_saved_scope): Mark it.
6351
6352 Implement access control for nested types.
6353 * search.c (type_access_control): New fn.
6354 (accessible_p): Now we do perform access control for types.
6355 * semantics.c (deferred_type_access_control): New fn.
6356 (initial_deferred_type_access_control): New fn.
6357 (begin_function_definition): Call it. Add lookups parm.
6358 * decl.c (struct binding_level): Add this_class field.
6359 (pushlevel_class): Set it.
6360 (mark_binding_level): Mark it.
6361 (lookup_name_real): Use it. Call type_access_control.
6362 (mark_saved_scope): Mark lookups field.
6363 * cp-tree.h (flagged_type_tree): Add lookups field.
6364 (struct saved_scope): Add lookups field.
6365 (type_lookups): New macro.
6366 * parse.y (declmods): Now <ftype>.
6367 (parse_decl): Add lookups parm. Call
6368 initial_deferred_type_access_control.
6369 (lang_extdef): Clear type_lookups.
6370 (typed_declspecs, declmods, typespec): Set lookups field.
6371 (initdcl): Call deferred_type_access_control.
6372 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
6373 component_decl_1, named_parm): Adjust.
6374 * friend.c (is_friend): Nested classes are friends of their
6375 enclosing classes.
6376
6377 * class.c (currently_open_derived_class): New fn.
6378 * method.c (hack_identifier): Use it.
6379
6380 * lex.c (do_identifier): Remove obsolete code.
6381
6382 * parse.y (typed_typespecs): Propagate new_type_flag properly.
6383
6384 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
6385
6386 * tinfo.h: Remove apostrophes from C++ comment (xgettext
6387 thinks this file is plain C).
6388
6389 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6390
6391 * Makefile.in (call.o): Depend on $(EXPR_H).
6392
6393 * call.c: Include "expr.h".
6394
6395 * class.c (dump_class_hierarchy): Add prototype.
6396
6397 * search.c (dfs_get_pure_virtuals): Likewise.
6398
6399 2000-02-1 Ulrich Drepper <drepper@redhat.com>
6400
6401 * parse.y (simple_stmt): Allow :: token in asm parameter list.
6402 * parse.c: Rebuilt.
6403
6404 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
6405
6406 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6407 Store it in DECL_FCONTEXT.
6408 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6409
6410 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
6411
6412 * tinfo.h (old abi): #include "tconfig.h".
6413 * tinfo.cc (convert_to_base): Move into old abi section.
6414
6415 2000-01-31 Mark Mitchell <mark@codesourcery.com>
6416
6417 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6418 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6419 (BINFO_PRIMARY_BINFO): New macro.
6420 (BF_DELTA): Rename to ...
6421 (BV_DELTA): ... this.
6422 (BF_VCALL_INDEX): Rename to ...
6423 (BV_VCALL_INDEX): ... this.
6424 (BF_FN): Rename to ...
6425 (BV_FN): ... this.
6426 * class.c (build_vbase_path): Adjust for changes to reverse_path.
6427 (set_rtti_entry): Rename BF_ macros to BV_ variants.
6428 (modify_vtable_entry): Simplify.
6429 (add_virtual_function): Rename BF_ macros to BV_ variants.
6430 (build_vtable_initializer): Likewise.
6431 (get_class_offset_1): Remove.
6432 (dfs_get_class_offset): Likewise.
6433 (get_class_offset): Likewise.
6434 (dfs_find_final_overrider): New function.
6435 (find_final_overrider): Likewise.
6436 (modify_one_vtable): Remove.
6437 (dfs_find_base): New function.
6438 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
6439 find_final_overrider.
6440 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
6441 virtuals.
6442 (dfs_fixup_vtable_deltas): Remove.
6443 (override_one_vtable): Remove.
6444 (merge_overrides): Likewise.
6445 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6446 unreal chilren of virtual bases.
6447 (finish_struct_1): Don't use merge_overrides. Don't use
6448 dfs_fixup_vtable_deltas.
6449 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6450 BINFOs.
6451
6452 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6453 Jason Merrill <jason@yorick.cygnus.com>
6454
6455 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6456
6457 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
6458
6459 * exception.cc (__throw_bad_typeid): Add missing std::.
6460
6461 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6462
6463 * cp-tree.h (make_thunk): PROTO -> PARAMS.
6464
6465 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
6466
6467 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6468
6469 Runtime support for new-abi rtti.
6470 * inc/typeinfo (type_info::operator!=): Define in class.
6471 (type_info::before, type_info::name, type_info::operator==,
6472 type_info::operator!=): Define new ABI implementations.
6473 (type_info::is_pointer_p, type_info::is_function_p): Declare
6474 new virtual functions.
6475 (type_info::do_catch, type_info::do_upcast): Likewise.
6476
6477 * tinfo.h (__base_class_info): Define new class.
6478 (__class_type_info): Likewise.
6479 (__si_class_type_info): Likewise.
6480 (__vmi_class_type_info): Likewise.
6481 (__dynamic_cast): Prototype.
6482
6483 * tinfo.cc: Conditionalize old and new rtti mechanisms.
6484 (type_info::is_pointer_p): Define new function.
6485 (type_info::is_function_p): Likewise.
6486 (type_info::do_catch): Likewise.
6487 (type_info::do_upcast): Likewise.
6488 (vtable_prefix): New structure for vtable access.
6489 (adjust_pointer): Define new template function.
6490 (contained_p, public_p, virtual_p, contained_public_p,
6491 contained_nonpublic_p, contained_nonvirtual_p): Define new
6492 functions.
6493 (nonvirtual_base_type): New local variable.
6494 (__class_type_info::~__class_type_info): Define.
6495 (__si_class_type_info::~__si_class_type_info): Likewise.
6496 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6497 (__class_type_info::do_catch): Define new function.
6498 (__class_type_info::do_upcast): Likewise.
6499 (__class_type_info::find_public_src): Likewise.
6500 (__class_type_info::do_find_public_src): Likewise.
6501 (__si_class_type_info::do_find_public_src): Likewise.
6502 (__vmi_class_type_info::do_find_public_src): Likewise.
6503 (__class_type_info::do_dyncast): Likewise.
6504 (__si_class_type_info::do_dyncast): Likewise.
6505 (__vmi_class_type_info::do_dyncast): Likewise.
6506 (__class_type_info::do_upcast): Likewise.
6507 (__si_class_type_info::do_upcast): Likewise.
6508 (__vmi_class_type_info::do_upcast): Likewise.
6509 (__dynamic_cast): Likewise.
6510
6511 * tinfo2.cc (__fundamental_type_info): Define new class.
6512 (__pointer_type_info): Likewise.
6513 (__reference_type_info): Likewise.
6514 (__array_type_info): Likewise.
6515 (__function_type_info): Likewise.
6516 (__enum_type_info): Likewise.
6517 (__ptr_to_member_type_info): Likewise.
6518 (__fundamental_type_info::~__fundamental_type_info): Define.
6519 (__pointer_type_info::~__pointer_type_info): Likewise.
6520 (__reference_type_info::~__reference_type_info): Likewise.
6521 (__array_type_info::~__array_type_info): Likewise.
6522 (__function_type_info::~__function_type_info): Likewise.
6523 (__enum_type_info::~__enum_type_info): Likewise.
6524 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6525 (__pointer_type_info::do_catch): Define new function.
6526 (__ptr_to_member_type_info::do_catch): Define new function.
6527
6528 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6529 (__is_pointer): Likewise.
6530
6531 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6532
6533 2000-01-30 Mark Mitchell <mark@codesourcery.com>
6534
6535 * cp/class.c (build_vtable): Rename to build_primary_vtable.
6536 (prepare_fresh_vtable): Rename to build_secondary_vtable.
6537 (make_new_vtable): New function.
6538 (modify_vtable_entry): Handle generation of new vtables correctly.
6539 (modify_one_vtable): Remove unused parameter.
6540 (dfs_fixup_vtable_deltas): Likewise.
6541 (override_one_vtable): Use build_secondary_vtable.
6542 (finish_struct_1): Use build_primary_vtable and
6543 build_secondary_vtable.
6544
6545 2000-01-28 Ulrich Drepper <drepper@redhat.com>
6546
6547 * cp/decl.c: Adjust variable names, comments, help strings.
6548
6549 2000-01-29 Nathan Sidwell <nathan@acm.org>
6550
6551 * new2.cc (operator delete[]): Use operator delete, don't assume
6552 implementation.
6553
6554 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
6555
6556 * class.c (build_vtbl_initializer): Add argument to
6557 build_vtable_entry call.
6558
6559 2000-01-27 Mark Mitchell <mark@codesourcery.com>
6560
6561 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6562 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6563 (BF_DELTA): New macro.
6564 (BF_VCALL_INDEX): Likewise.
6565 (BF_FN): Likewise.
6566 (THUNK_VCALL_OFFSET): Likewise.
6567 (make_thunk): Change prototype.
6568 * class.c (build_vtable_entry): Integrate
6569 build_vtable_entry_for_fn. Handle vcall indices.
6570 (build_vtable_entry_for_fn): Remove.
6571 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
6572 BF_VCALL_INDEX, BF_FN.
6573 (modify_vtable_entry): Integrate common code from
6574 modify_one_vtable and dfs_fixup_vtable_deltas.
6575 (add_virtual_function): Set BF_VCALL_INDEX.
6576 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
6577 and BF_FN.
6578 (modify_one_vtable): Simplify.
6579 (dfs_fixup_vtable_deltas): Likewise.
6580 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6581 * method.c (make_thunk): Handle vcall indices.
6582
6583 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
6584
6585 Compiler side new abi rtti (not enabled).
6586 * cp-tree.h (new_abi_rtti_p): New macro.
6587 (emit_support_tinfos): Prototype new function.
6588 (tinfo_decl_p): Likewise.
6589 (emit_tinfo_decl): Likwise.
6590 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6591 macros.
6592 (doing_runtime): New local static.
6593 (init_rtti_processing): Add new-abi initializer.
6594 (get_tinfo_decl): Add new-abi logic.
6595 (tinfo_from_decl): Likewise.
6596 (build_dynamic_cast_1): Likewise.
6597 (qualifier_flags): New static function.
6598 (tinfo_base_init): Likewise.
6599 (generic_initializer): Likewise.
6600 (ptr_ref_initializer): Likewise.
6601 (ptmd_initializer): Likewise.
6602 (class_hint_flags): Likewise.
6603 (class_initializer): Likewise.
6604 (synthesize_tinfo_var): Likewise.
6605 (create_real_tinfo_var): Likewise.
6606 (create_pseudo_type_info): Likewise.
6607 (get_vmi_pseudo_type_info): Likewise.
6608 (create_tinfo_types): Likewise.
6609 (emit_support_tinfos): New global function.
6610 (tinfo_decl_p): New global predicate.
6611 (emit_tinfo_decl): New global function.
6612 * class.c (set_rtti_entry): Generalize for old and new rtti.
6613 (build_vtbl_initializer): Likewise.
6614 * decl2.c (finish_file): Likewise.
6615
6616 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
6617
6618 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
6619 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
6620
6621 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
6622
6623 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
6624 for scopes.
6625
6626 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
6627
6628 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
6629
6630 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
6631
6632 * optimize.c (calls_setjmp_r): Supply new argument
6633 to special_function_p.
6634
6635 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6636
6637 * call.c: PROTO -> PARAMS.
6638 * class.c: Likewise.
6639 * cp-tree.h: Likewise.
6640 * cvt.c: Likewise.
6641 * decl.c: Likewise.
6642 * decl.h: Likewise.
6643 * decl2.c: Likewise.
6644 * dump.c: Likewise.
6645 * errfn.c: Likewise.
6646 * error.c: Likewise.
6647 * except.c: Likewise.
6648 * expr.c: Likewise.
6649 * init.c: Likewise.
6650 * input.c: Likewise.
6651 * lex.c: Likewise.
6652 * lex.h: Likewise.
6653 * method.c: Likewise.
6654 * optimize.c: Likewise.
6655 * parse.y: Likewise.
6656 * pt.c: Likewise.
6657 * repo.c: Likewise.
6658 * rtti.c: Likewise.
6659 * search.c: Likewise.
6660 * semantics.c: Likewise.
6661 * spew.c: Likewise.
6662 * tree.c: Likewise.
6663 * typeck.c: Likewise.
6664 * typeck2.c: Likewise.
6665 * xref.c: Likewise.
6666
6667 2000-01-25 Richard Henderson <rth@cygnus.com>
6668
6669 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
6670
6671 2000-01-25 Mark Mitchell <mark@codesourcery.com>
6672
6673 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
6674 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
6675 (struct vcall_offset_data_s): New type.
6676 (dfs_vcall_offset_queue_p): New function.
6677 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6678 (build_vcall_offset_vtbl_entries): Likewise.
6679 (layout_vtable_decl): Likewise.
6680 (num_vfun_entries): Likewise.
6681 (num_extra_vtbl_entries): Add the entries for vcall offsets.
6682 (build_vtbl_initializer): Likewise.
6683 (dfs_finish_vtabls): Use layout_vtable_decl.
6684 (modify_one_vtables): Always duplicate vtables under the new ABI.
6685 (finish_struct_1): Use layout_vtable_decl.
6686
6687 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6688
6689 * decl.c (member_function_or_else): Change third arg from a format
6690 specifier to an `enum overload_flags'. Callers changed.
6691
6692 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
6693
6694 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
6695 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
6696 build_const_cast, get_delta_difference, check_return_expr): Avoid
6697 ANSI string concatenation usage.
6698
6699 2000-01-24 Mark Mitchell <mark@codesourcery.com>
6700
6701 * class.c (layout_class_type): Put the fields required to make a
6702 class non-empty at the end, not the beginning, of the TYPE_FIELDs
6703 list.
6704
6705 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
6706
6707 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
6708 template.
6709
6710 * decl2.c (mark_used): Do instantiate inlines that have been
6711 explicitly instantiated.
6712
6713 2000-01-24 Richard Henderson <rth@cygnus.com>
6714
6715 * call.c (build_over_call): Use expand_tree_builtin.
6716 * typeck.c (build_function_call_real): Likewise.
6717 (build_binary_op_nodefault): Handle unordered compares.
6718
6719 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6720
6721 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
6722 cp_tree_index values.
6723 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
6724 New global node #defines for them.
6725 * rtti.c (call_void_fn): Replace with ...
6726 (build_runtime_decl): ... new static function.
6727 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
6728 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
6729 (build_dynamic_cast_1): Always produce correctly typed result.
6730 Explicitly produce type_info addresses. Use dynamic_cast_node.
6731 * exception.cc (__throw_bad_cast): Return `void *'.
6732 (__throw_bad_typeid): Return `const type_info &'.
6733
6734 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6735
6736 * cp-tree.h (get_vtable_decl): Prototype new function.
6737 * class.c (get_vtable_decl): New function. Broken out from ...
6738 (build_vtable): ... here. Use it.
6739 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
6740 by get_vtable_decl.
6741
6742 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6743
6744 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
6745 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
6746 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
6747 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
6748 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
6749 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
6750 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
6751 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
6752 (CPTI_TINFO_VAR_ID): New enumeration.
6753 (__tp_desc_type_node, __access_mode_type_node,
6754 __bltn_desc_type_node, __user_desc_type_node,
6755 __class_desc_type_node, __ptr_desc_type_node,
6756 __attr_desc_type_node, __func_desc_type_node,
6757 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
6758 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6759 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
6760 enum_desc_type_node, class_desc_type_node,
6761 si_class_desc_type_node, vmi_class_desc_type_node,
6762 ptmd_desc_type_node, base_desc_type_node): New #defines.
6763 (tinfo_fn_id, tinfo_fn_type): Rename to ...
6764 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
6765 (tinfo_var_id): New enumeration.
6766 (DECL_TINFO_FN_P): Augment comment.
6767 * decl.c (cp_global_trees): Adjust documentation.
6768 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
6769 tinfo_decl_type and tinfo_var_id.
6770 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
6771 (build_typeid): Remove unused variable.
6772 (get_tinfo_var): Use tinfo_var_id.
6773 (tinfo_name): New static function.
6774 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
6775 (tinfo_from_decl): Likewise.
6776 (get_base_offset): New static function, broken out of
6777 expand_class_desc.
6778 (expand_si_desc): Use tinfo_name.
6779 (expand_class_desc): Likewise. Lose local static variable.
6780 Use base_desc_type_node. Use get_base_offset.
6781 (expand_ptr_desc): Use tinfo_name.
6782 (expand_attr_desc): Likewise.
6783 (expand_generic_desc): Likewise.
6784
6785 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
6786 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
6787
6788 2000-01-23 Mark Mitchell <mark@codesourcery.com>
6789
6790 * cp-tree.h (__eprintf): Remove declaration.
6791 * tree.c (__eprintf): Remove definition.
6792
6793 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
6794 Mark Mitchell <mark@codesourcery.com>
6795
6796 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
6797 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
6798
6799 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
6800
6801 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
6802
6803 2000-01-23 Mark Mitchell <mark@codesourcery.com>
6804
6805 * cp-tree.h (register_dtor_fn): New function.
6806 * decl.c (destroy_local_static): Rename to ...
6807 (register_dtor_fn): ... this. Give it external linkage.
6808 (expand_static_init): Use it.
6809 * decl2.c (do_static_initialization): Likewise, if using
6810 __cxa_atexit.
6811 (do_static_destruction): Check that __cxa_atexit is not in use.
6812 (finish_file): Don't call do_static_destruction if using
6813 __cxa_atexit.
6814
6815 * typeck.c (convert_arguments): Restore two-message error
6816 reporting.
6817
6818 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
6819
6820 Remap dynamic cast hint values to be consistent across ABIs.
6821 * search.c (dynamic_cast_base_recurse): Remap generated value.
6822 (get_dynamic_cast_base_type): Adjust documentation.
6823 * tinfo.h (__user_type_info::dyncast): Likewise.
6824 (__user_type_info::find_public_subobj): Remap BOFF meaning.
6825 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
6826 (__class_type_info::do_dyncast): Likewise.
6827 (__class_type_info::do_find_public_subobj): Likewise.
6828 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
6829
6830 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
6831
6832 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
6833
6834 * typeck2.c (incomplete_type_error): Restore previous
6835 cp_error and cp_error_at call sequence.
6836
6837 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
6838
6839 * class.c (dump_class_hierarchy): Make format agree with argument;
6840 cast pointer to unsigned long and print with %lx.
6841
6842 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
6843
6844 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
6845
6846 * typeck.c (composite_pointer_type, common_type,
6847 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
6848 build_function_call_real, convert_arguments,
6849 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
6850 build_unary_op, mark_addressable, build_compound_expr,
6851 build_static_cast, build_reinterpret_cast, build_const_cast,
6852 build_c_cast, build_modify_expr, get_delta_difference,
6853 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
6854 'ISO C++'. Fusion consecutive calls to diagnotic message routines
6855 into a single one.
6856 * typeck2.c (readonly_error, abstract_virtuals_error,
6857 process_init_constructor, check_for_new_type): Likewise.
6858
6859 2000-01-19 Mark Mitchell <mark@codesourcery.com>
6860
6861 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
6862 VAR_DECLs.
6863
6864 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
6865
6866 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
6867 (build_x_typeid): Likewise.
6868 (get_tinfo_fn): Likewise.
6869 (get_tinfo_fn_unused): Rename to ...
6870 (get_tinfo_decl): ... here.
6871 * rtti.c (build_headof): Replace logic error with assertion.
6872 (get_tinfo_fn_dynamic): Rename to ...
6873 (get_tinfo_decl_dynamic): ... here. Make static. Use
6874 complete_type_or_else.
6875 (build_x_typeid): Move into ...
6876 (build_typeid): ... here. Adjust call to
6877 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
6878 throw_bad_typeid expression.
6879 (get_tinfo_fn_unused): Rename to ...
6880 (get_tinfo_decl): ... here. Adjust comment.
6881 (get_tinfo_fn): Delete.
6882 (tinfo_from_decl): New static function.
6883 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
6884 (get_typeid): Use complete_type_or_else.
6885 (build_dynamic_cast_1): Adjust calls to
6886 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
6887 * parse.y (primary): Adjust call to build_typeid.
6888 * except.c (build_eh_type_type_ref): Adjust call to
6889 get_tinfo_decl. Mark as used.
6890 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
6891 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
6892 * parse.c: Regenerated.
6893
6894 2000-01-17 Mark Mitchell <mark@codesourcery.com>
6895
6896 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
6897 calling convention.
6898 (resolves_to_fixed_type_p): Document calling convention.
6899 * rtti.c (build_x_typeid): Initialize NONNULL.
6900
6901 * cp-tree.h (build_shared_int_cst): New function.
6902 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
6903 * class.c (modify_vtable_entry): Likewise.
6904 (add_virtual_function): Split out code to generated shared
6905 INTEGER_CSTs to build_share_int_cst.
6906 (modify_all_vtables): Handle all the overridden functions here.
6907 Add overridden functions from non-primary virtual bases to the
6908 primary vtable.
6909 (finish_struct_1): Adjust call to modify_all_vtables. Add
6910 overridden functions from non-primary bases to the vtable.
6911 * tree.c (build_shared_int_cst): New function.
6912
6913 * cp-tree.h (scratchalloc): Remove.
6914 (build_scratch_list): Likewise.
6915 * call.c (convert_class_to_reference): Replace build_scratch_list
6916 and build_expr_list with build_tree_list.
6917 (add_candidate): Replace scratchalloc with expralloc. Note memory
6918 leak.
6919 (build_user_type_conversion_1): Replace build_scratch_list
6920 and build_expr_list with build_tree_list.
6921 (build_new_op): Likewise.
6922 (build_op_delete_call): Likewise.
6923 (convert_like): Likewise.
6924 * cvt.c (ocp_convert): Likewise.
6925 * decl.c (start_decl): Likewise.
6926 (start_function): Likewise.
6927 (finish_destructor_body): Likewise.
6928 (maybe_build_cleanup_1): Likewise.
6929 * decl2.c (reparse_decl_as_expr): Likewise.
6930 * init.c (perform_member_init): Likewise.
6931 (expand_cleanup_for_base): Likewise.
6932 (build_builtin_delete_call): Likewise.
6933 (build_new_1): Likewise.
6934 (build_delete): Likewise.
6935 * method.c (do_build_assign_ref): Likewise.
6936 * parse.y (already_scoped_stmt): Likewise.
6937 (nontrivial_exprlist): Likewise.
6938 (net_initializer): Likewise.
6939 (initlist): Likewise.
6940 * parse.c: Regenerated.
6941 * rtti.c (build_x_typeid): Likewise.
6942 (build_dynamic_cast_1): Likewise.
6943 * typeck.c (build_x_compound_expr): Likewise.
6944 (build_static_cast): Likewise.
6945 (build_modify_expr): Likewise.
6946
6947 * cp-tree.h (DECL_VINDEX): Add documentation.
6948 * class.c (build_vtable_entry): Likewise.
6949 (start_vtable): Add comment.
6950 (add_virtual_function): Replace pending_hard_virtuals with
6951 overridden_virtuals and pending_virtuals with new_virtuals.
6952 Replace redundant assignments with assertions.
6953 (check_for_override): Add comment.
6954 (check_bases_and_members): Replace pending_hard_virtuals with
6955 overridden_virtuals and pending_virtuals with new_virtuals.
6956 (create_vtbl_ptr): Likewise.
6957 (layout_class_type): Likewise.
6958 (finish_struct_1): Likewise. Add comments.
6959
6960 2000-01-16 Mark Mitchell <mark@codesourcery.com>
6961
6962 * class.c (finish_struct_1): Replace redundant code with
6963 assertions.
6964
6965 * cp-tree.h (flag_new_abi): Move.
6966 (flag_use_cxa_atexit): Likewise.
6967 (flag_honor_std): Likewise.
6968 (flag_rtti): Likewise.
6969 (vbase_offsets_in_vtable_p): Define.
6970 (vptrs_present_everywhere_p): Likewise.
6971 (TYPE_CONTAINS_VPTR_P): Likewise.
6972 (dfs_walk_real): Declare.
6973 * class.c (build_vbase_pointer_fields): Check
6974 vbase_offsets_in_vtable_p.
6975 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
6976 BINFO_VPTR_FIELD.
6977 (build_vbase_offset_vtbl_entries): Simplify.
6978 (build_vbase_offset_vtbl_entries): Adjust.
6979 (build_vbase_pointer): Add ability to look up vbase offsets in
6980 vtable.
6981 (start_vtable): New function.
6982 (add_virtual_function): Use it.
6983 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
6984 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
6985 (build_vtbl_initializer): Take the type of the complete object as
6986 input. Use it to correctly calculate vbase offsets.
6987 (dfs_finish_vtbls): Pass the complete type to
6988 build_vtbl_initializer.
6989 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
6990 (create_vtable_ptr): Create a vtable even if there are no
6991 new virtual functions, under the new ABI.
6992 (finish_struct_1): Likewise.
6993 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
6994 * decl.c (exapnd_static_init): Remove call to
6995 preserve_initializer.
6996 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
6997 vtables.
6998 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
6999 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
7000 (construct_virtual_bases): Don't initialize virtual base pointers
7001 under the new ABI.
7002 (build_aggr_init): Clean up comment.
7003 (expand_aggr_init_1): Likewise.
7004 * rtti.c (expand_class_desc): Store the virtual function table
7005 index where the vbase offset lives in the offset field.
7006 * search.c (dfs_walk_real): Make it global.
7007 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7008 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7009
7010 * tinfo.h (USItype): Make it signed under the new ABI.
7011 * tinfo.cc (convert_to_base): New function. Encapsulate base
7012 conversion logic here.
7013 (__class_type_info::do_upcast): Use it.
7014 (__class_type_info::do_dyncast): Likewise.
7015 (__class_type_info::do_find_public_subobj): Likewise.
7016
7017 * init.c (construct_virtual_bases): Don't look up the addresses of
7018 virtual bases at run-time.
7019
7020 * class.c (build_vbase_pointer): Relocate.
7021 (build_vbase_pointer_fields): Likewise.
7022 (dfs_build_vbase_offset_vtbl_entries): Likewise.
7023 (build_vbase_offset_vtbl_entries): Likewise.
7024
7025 * decl.c (init_decl_processing): Complain if -fnew-abi
7026 -fno-vtable-thunks is used.
7027
7028 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7029 flag_new_abi.
7030
7031 2000-01-15 Mark Mitchell <mark@codesourcery.com>
7032
7033 * cp-tree.h (num_extra_vtbl_entries): New function.
7034 (size_extra_vtbl_entries): Likewise.
7035 (dfs_vtable_path_unmark): Likewise.
7036 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7037 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7038 * class.c (num_extra_vtbl_entries): New function.
7039 (size_extra_vtbl_entries): Likewise.
7040 (dfs_build_vbase_offset_vtbl_entries): New function.
7041 (build_vbase_offset_vtbl_entries): Likewise.
7042 (build_vtbl_initializer): Use it.
7043 (finish_struct_1): Adjust vtable sizes (using
7044 num_extra_vtbl_entries).
7045 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
7046 THUNK_DECL is non-NULL before expanding it.
7047 * init.c (expand_virtual_init): Adjust the vtable pointer by
7048 size_extra_vtbl_entries before storing it.
7049 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
7050 Handle TREE_LIST parameters here, not in the dfs_* functions.
7051 (dfs_unmarked_real_bases_queue_p): Adjust.
7052 (dfs_marked_real_bases_queue_p): Likewise.
7053 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
7054 (dfs_vtable_path_marked_real_bases_queue_p): New function.
7055 (dfs_vtable_path_unmark): Likewise.
7056
7057 2000-01-14 Mark Mitchell <mark@codesourcery.com>
7058
7059 * optimize.c (copy_body_r): Clear the operand three of a
7060 TARGET_EXPR when copying it.
7061
7062 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7063
7064 * method.c (build_decl_overload_real): Check whether we are in ::
7065 before returning __builtin_new/delete.
7066
7067 2000-01-13 Mark Mitchell <mark@codesourcery.com>
7068
7069 * pt.c (tsubst_friend_function): Improve comment.
7070 (instantiate_decl): Avoid crashing when a "nested" function is
7071 instantiated from the top level.
7072
7073 * dump.c (dqeueue_and_dump): Dump
7074 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
7075
7076 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7077
7078 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
7079
7080 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
7081
7082 * g++spec.c (lang_specific_driver): Add -fnew-abi if
7083 ENABLE_NEW_GXX_ABI defined.
7084 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
7085 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
7086 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
7087
7088 2000-01-12 Mark Mitchell <mark@codesourcery.com>
7089
7090 * decl.c (start_cleanup_fn): Call pushdecl.
7091
7092 * call.c (convert_class_to_reference): Fix typos.
7093 (build_conditional_expr): Handle errors gracefully.
7094 * class.c (push_nested_class): Likewise.
7095 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7096 (DECL_THIS_EXTERN): Use it.
7097 (DECL_THIS_STATIC): Likewise.
7098 * cvt.c (convert_to_void): Handle errors gracefully.
7099 (build_expr_type_conversion): Likewise.
7100 * decl.c (maybe_push_decl): Likewise.
7101 (start_decl_1): Likewise.
7102 (require_complete_types_for_parms): Likewise.
7103 * parse.y (structsp): Likewise.
7104 (base_class): Likewise.
7105 * parse.c: Regenerated.
7106 * pt.c (finish_member_template_decl): Likewise.
7107 * typeck.c (decay_conversion): Likewise.
7108
7109 * cp-tree.h (dfs_skip_vbases): New function.
7110 (find_vbase_instance): Likewise.
7111 * class.c (determine_primary_base): Allow a nearly empty base to
7112 serve as a primary base class under the new ABI.
7113 (get_class_offset_1): Rename to ...
7114 (dfs_get_class_offset): ... this. Simplify. Don't issue error
7115 messages here.
7116 (get_class_offset): Use it. Issue error messages here.
7117 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
7118 find the right copies of virtual bases.
7119 (fixup_vtable_deltas1): Rename to ...
7120 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
7121 bases as primary bases.
7122 (fixup_vtable_deltas): Remove.
7123 (override_one_vtable): Handle virtual bases as primary bases.
7124 (merge_overrides): Likewise.
7125 (finish_struct_1): Likewise.
7126 (dump_class_hierarchy): Dump primary-ness of bases as well.
7127 * search.c (mark_primary_bases): Use a pre-order traversal to
7128 handle primary virtual bases.
7129 (dfs_skip_vbases): New fiunction.
7130 (expand_upcast_fixups): Adjust to handle primary virtual bases.
7131 (fixup_virtual_upcast_offsets): Likewise.
7132 (fixup_all_virtual_upcast_offsets): Likewise.
7133 (dfs_find_vbase_instances): New function.
7134 (find_vbase_instance): Likewise.
7135
7136 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
7137
7138 * lex.c (DIR_SEPARATOR): Delete macro.
7139
7140 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
7141
7142 * decl2.c (lang_decode_option): Handle automatic line wrapping
7143 option.
7144
7145 2000-01-11 Mark Mitchell <mark@codesourcery.com>
7146
7147 * friend.c (do_friend): Don't resolve scopes when processing
7148 template declarations, even if the qualifying scope doesn't
7149 involve template parameters.
7150
7151 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
7152
7153 * class.c (dfs_modify_vtables_queue_p): Remove.
7154 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
7155 and dfs_marked_real_bases_queue_p instead of
7156 dfs_modify_vtables_queue_p.
7157
7158 * class.c (build_vbase_path): Simplify.
7159 (dfs_propagate_binfo_offsets): New function.
7160 (propagate_binfo_offsets): Use it.
7161 (remove_base_field): Simplify.
7162 (dfs_set_offset_for_vbases): Remove.
7163 (dfs_set_offset_for_shared_vbases): New function.
7164 (dfs_set_offset_for_unshared_vbases): Likewise.
7165 (layout_virtual_bases): Use them.
7166 (layout_basetypes): Don't call propagate_binfo_offsets.
7167 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
7168 for the vbases.
7169
7170 * class.c (build_base_field): New function, split out from ...
7171 (build_base_fields): ... here. Use it. Allocate primary bases
7172 first, under the new ABI.
7173 (get_vtable_entry): Remove.
7174 (remove_base_field): New function, split out from ...
7175 (remove_base_fields): ... here. Adjust since primary bases come
7176 first under the new ABI.
7177
7178 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
7179 (initialize_vtbl_ptrs): New function.
7180 (expand_indirect_vtbls_init): Change prototype.
7181 (convert_pointer_to_vbase): Declare.
7182 * init.c (expand_direct_vtbls_init): Remove.
7183 (dfs_initialize_vtbl_ptrs): New function.
7184 (initialize_vtbl_ptrs): Likewise.
7185 (emit_base_init): Use initialize_vtbl_ptrs.
7186 * search.c (convert_pointer_to_vbase): Make it global.
7187 (expand_indirect_vtbls_init): Remove vtable initialization code.
7188 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
7189
7190 * class.c (dfs_finish_vtbls): New function.
7191 (finish_vtbls): Use it.
7192 (dump_class_hierarchy): New function.
7193
7194 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
7195 (BINFO_VBASE_PRIMARY_P): New macro.
7196 (BINFO_VIRTUALS): Add to documentation.
7197 (SET_BINFO_PRIMARY_MARKED_P): Remove.
7198 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7199 (dfs_mark_primary_bases_queue_p): Likewise.
7200 (dfs_unmarked_real_bases_queue_p): New function.
7201 (dfs_marked_real_bases_queue_p): Likewise.
7202 * search.c (dfs_mark_primary_bases): Adjust.
7203 (mark_primary_bases): Likewise.
7204 (get_shared_vbase_if_not_primary): New function.
7205 (dfs_unmarked_real_bases_queue_p): Likewise.
7206 (dfs_marked_real_bases_queue_p): Likewise.
7207 (dfs_get_pure_virtuals): Simplify.
7208 (get_pure_virtuals): Likewise.
7209
7210 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7211
7212 * lex.c: Include tm_p.h.
7213
7214 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
7215
7216 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
7217
7218 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
7219
7220 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
7221 * pt.c (instantiate_decl): Defer comdat templates that might not be
7222 needed.
7223
7224 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
7225 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
7226 (finish_file): Likewise.
7227
7228 * decl2.c (import_export_class): Undo 12/14 change.
7229
7230 * error.c (dump_decl): operator new, not operatornew.
7231
7232 * class.c (field_decl_cmp): A nontype is "greater" than a type.
7233 * search.c (lookup_field_1): Look for the last field with the
7234 desired name.
7235
7236 2000-01-05 Nathan Sidwell <nathan@acm.org>
7237
7238 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
7239 FUNCTION_DECL.
7240
7241 2000-01-05 Nathan Sidwell <nathan@acm.org>
7242
7243 * typeck.c (build_static_cast): Don't strip target qualifiers
7244 when casting from a class.
7245
7246 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7247
7248 * class.c (warn_hidden): Initialize variable `fndecl'.
7249
7250 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
7251
7252 * decl.c (flag_isoc9x): New variable to be able to use code in
7253 c-common.c. For now always zero.
7254
7255 2000-01-03 Mark Mitchell <mark@codesourcery.com>
7256
7257 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
7258 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
7259 or unshare_base_binfos for virtual bases here.
7260 * search.c (dfs_get_vbase_types): Do it here.
7261 (get_vbase_types): Adjust.
7262
7263 2000-01-02 Mark Mitchell <mark@codesourcery.com>
7264
7265 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
7266 (BINFO_PRIMARY_MARKED_P): Use flag 5.
7267 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7268 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7269 (unmark_primary_bases): Remove declaration.
7270 (unmarkedp): Declare.
7271 (dfs_vbase_unmark): Likewise.
7272 * class.c (determine_primary_base): Return immediately if there
7273 are no base classes. Call mark_primary_bases here.
7274 (modify_all_direct_vtables): Remove.
7275 (modify_all_indirect_vtables): Remove.
7276 (dfs_modify_vtables_queue_p): New function.
7277 (dfs_modify_vtables): New function.
7278 (modify_all_vtables): Use them.
7279 (build_base_fields): Build FIELD_DECLs for primary virtual base
7280 classes.
7281 (create_vtable_ptr): Don't call determine_primary_base here.
7282 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
7283 (dfs_set_offset_for_vbases): ... this.
7284 (layout_virtual_bases): Use it.
7285 (layout_class_type): Call determine_primary_base here.
7286 * search.c (unmarkedp): Make it global.
7287 (shared_marked_p): Simplify.
7288 (shared_unmarked_p): Likewise.
7289 (dfs_primary_bases_queue_p): Remove.
7290 (dfs_unmark_primary_bases): Likewise.
7291 (unmark_primary_bases): Likewise.
7292 (mark_primary_bases): Simplify.
7293 (get_pure_virtuals): Don't call mark_primary_bases here.
7294 (dfs_vbase_unmark): New function.
7295 (get_vbase_types): Simplify.
7296
7297 * class.c (struct base_info): Remove.
7298 (determine_primary_base): Take has_virtual_p rather than a
7299 base_info as input. Don't calculate max_has_virtual.
7300 (finish_struct_bits): Remove max_has_virtual argument.
7301 (create_vtable_ptr): Remove max_has_virtual_p argument.
7302 (layout_virtual_bases): Remove max argument.
7303 (layout_basetypes): Likewise.
7304 (layout_class_type): Remove max_has_virtual_p argument.
7305 (finish_struct_1): Remove max_has_virtual.
7306
7307 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
7308 (layout_basetypes): Remove.
7309 * class.c (propagate_binfo_offsets): Moved here from tree.c.
7310 Update to handle primary virtual bases.
7311 (remove_base_fields): New function, split out from
7312 layout_basetypes.
7313 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
7314 (layout_virtual_bases): New function, split out from
7315 layout_basetypes. Update to handle primary virtual bases.
7316 (layout_basetypes): Moved here from tree.c. Use
7317 remove_base_fields and layout_virtual_bases.
7318 * search.c (dfs_mark_primary_bases_queue_p): New function.
7319 (mark_primary_bases): Use it.
7320 * tree.c (CEIL): Remove.
7321 (propagate_binfo_offsets): Remove.
7322 (layout_basetypes): Remove.
7323
7324 2000-01-01 Mark Mitchell <mark@codesourcery.com>
7325
7326 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
7327 (BINFO_PRIMARY_MARKED_P): New macro.
7328 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7329 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7330 (mark_primary_bases): New function.
7331 (unmark_primary_bases): Likewise.
7332 * search.c (get_abstract_virtuals_1): Remove.
7333 (dfs_mark_primary_bases): New function.
7334 (mark_primary_bases): Likewise.
7335 (dfs_unmark_primary_bases): Likewise.
7336 (unmark_primary_bases): Likewise.
7337 (dfs_get_pure_virtuals): Likewise.
7338
7339 2000-01-01 Mark Mitchell <mark@codesourcery.com>
7340
7341 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
7342 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
7343 (modify_one_vtable): Adjust.
7344 (fixup_vtable_deltas1): Likewise.
7345 (override_one_vtable): Likewise.
7346 * search.c (get_abstract_virtuals_1): Likewise.
7347 (get_pure_virtuals): Likewise.
7348 (expand_upcast_fixups): Likewise.
7349 * tree.c (debug_binfo): Likewise.
7350
7351 * class.c (build_vtable): Don't return a value. Don't rebuild
7352 vtables for bases that have already been handled.
7353 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
7354 already been handled.
7355 (modify_one_vtable): Adjust accordingly.
7356 (fixup_vtable_deltas1): Likewise.
7357 (finish_struct_1): Likewise.
7358
7359 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7360
7361 * call.c (build_new_method_call): Also check destructors.