]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
ddf626125140c5cff66e53893714e602607fd10d
[gcc.git] / gcc / cp / ChangeLog
1 2002-09-17 Zack Weinberg <zack@codesourcery.com>
2
3 * Make-lang.in: Remove all references to the demangler.
4 * cxxfilt.c: Moved to binutils.
5
6 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7
8 PR c++/7718
9 * pt.c (tsubst_decl): Remove assert.
10
11 Remove DR 295 implementation.
12 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
13 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
14 about ignoring volatile qualifiers.
15
16 * search.c (lookup_member): Correct documentation.
17
18 2002-09-16 Geoffrey Keating <geoffk@apple.com>
19
20 * cp-tree.h (union lang_tree_node): Add chain_next option.
21
22 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
23
24 * parse.y (parse_finish_call_expr): Check lookup_member result.
25
26 PR c++/7015
27 * semantic.c (finish_asm_stmt): Fix operand/output_operands
28 thinko.
29 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
30
31 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
32
33 PR c++/7919
34 * call.c (build_over_call): Convert this pointer for fns found by
35 using decls.
36
37 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
38
39 * ChangeLog: Follow spelling conventions.
40 * ChangeLog.1: Likewise.
41
42 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
43
44 PR c++/7768
45 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
46
47 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
48
49 * error.c: Fix comment formatting.
50 * except.c: Likewise.
51 * expr.c: Likewise.
52 * friend.c: Likewise.
53 * g++spec.c: Likewise.
54 * init.c: Likewise.
55 * lex.c: Likewise.
56 * mangle.c: Likewise.
57 * method.c: Likewise.
58 * optimize.c: Likewise.
59 * pt.c: Likewise.
60 * rtti.c: Likewise.
61 * search.c: Likewise.
62 * semantics.c: Likewise.
63 * spew.c: Likewise.
64 * tree.c: Likewise.
65 * typeck.c: Likewise.
66 * typeck2.c: Likewise.
67
68 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
69
70 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
71
72 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
73
74 * decl.c: Fix comment formatting.
75 * decl2.c: Likewise.
76
77 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
78
79 * call.c: Fix comment formatting.
80 * class.c: Likewise.
81 * cp-lang.c: Likewise.
82 * cp-tree.h: Likewise.
83 * cvt.c: Likewise.
84
85 2002-09-11 Zack Weinberg <zack@codesourcery.com>
86
87 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
88 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
89 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
90 minor adjustments (use version_string, eliminate yet another
91 duplicate of xmalloc)
92
93 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
94
95 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
96
97 2002-09-05 Jason Merrill <jason@redhat.com>
98
99 * typeck2.c (add_exception_specifier): Only pedwarn for an
100 incomplete type.
101 (require_complete_eh_spec_types): New fn.
102 (cxx_incomplete_type_diagnostic): Also support pedwarning.
103 * typeck.c (complete_type_or_diagnostic): Likewise.
104 * call.c (build_call): Call require_complete_eh_spec_types.
105 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
106 on an incomplete type.
107
108 2002-09-04 Jakub Jelinek <jakub@redhat.com>
109
110 * decl.c (start_cleanup_fn): Clear interface_only before
111 start_function, restore it afterwards.
112
113 2002-08-31 Jason Merrill <jason@redhat.com>
114
115 * cp-lang.c (cp_expr_size): Allow initialization from a
116 CONSTRUCTOR.
117
118 2002-08-30 Richard Henderson <rth@redhat.com>
119
120 PR opt/7515
121 * tree.c: Include target.h.
122 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
123 don't bind locally.
124 * Makefile.in (tree.o): Update.
125
126 2002-08-27 Mark Mitchell <mark@codesourcery.com>
127
128 * class.c (layout_virtual_bases): Warn about bugs in G++ that
129 result in incorrect object layouts.
130 (layout_class_type): Likewise.
131
132 2002-08-24 Matt Austern <austern@apple.com>
133
134 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
135 are allowable.
136 (real_lvalue_p): Update caller.
137 (lvalue_p): Ditto.
138 (non_cast_lvalue_or_else): New.
139 * tree.h: Declare it.
140 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
141
142 2002-08-22 Mark Mitchell <mark@codesourcery.com>
143
144 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
145 and COND_EXPR specially; fix error message output.
146
147 2002-08-22 Jason Merrill <jason@redhat.com>
148
149 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
150 * semantics.c (nullify_returns_r): Likewise.
151
152 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
153
154 Fix PR/7621
155 * typeck.c (finish_class_member_access_expr): Diagnose cases where
156 name lookup finds nothing.
157
158 2002-08-15 Jason Merrill <jason@redhat.com>
159
160 * semantics.c (finish_then_clause): Remove redundant assignment.
161 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
162 extra binding level outside the if/switch statement.
163 (finish_while_cond, finish_for_cond): Rewrite complex condition
164 into the loop body.
165
166 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
167
168 * parse.y (sizeof, alignof, typeof): New non-terminals to
169 increment skip_evaluation. Replace terminals with them and
170 decrement skip_evaluation at the end of rules using them.
171 * decl2.c (mark_used): Don't assemble_external if
172 skipping evaluation.
173
174 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
175
176 Fix PR/7504
177 * parse.y (parse_finish_call_expr): Handle incomplete
178 type used to name a scope.
179
180 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
181
182 PR c++/7598
183 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
184 regression caused by my 2002-08-08 patch.
185
186 2002-08-13 Mark Mitchell <mark@codesourcery.com>
187
188 * decl.c (pushdecl_class_level): Honor requests to bind names to
189 OVERLOADs.
190
191 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
192
193 * decl2.c (build_call_from_tree): Fix uninitialized variable.
194 * parse.y (parse_finish_call_expr): Likewise.
195 * repo.c (old_args, old_dir, old_main): Const-ify.
196
197 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
198
199 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
200 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
201 * optimize.c (maybe_clone_body): Likewise.
202 * pt.c (tsubst_enum): Likewise.
203 (lookup_template_class): Likewise.
204 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
205
206 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
207
208 * lang-specs.h: Remove -ansi.
209
210 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
211
212 * tree.c (maybe_dummy_object): Replace // with /* */
213
214 2002-08-09 Mark Mitchell <mark@codesourcery.com>
215
216 * call.c (standard_conversion): Use build_ptrmem_type.
217 * cp-tree.h (build_ptrmem_type): New function.
218 (adjust_result_of_qualified_name_lookup): Likewise.
219 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
220 static data members.
221 (build_ptrmem_type): New function.
222 (grokdeclarator): Do not use build_offset_type when encountering a
223 qualified name.
224 * parse.y (parse_finish_call_expr): Use
225 adjust_result_of_qualified_name_lookup.
226 * search.c (adjust_result_of_qualified_name_lookup): New function.
227 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
228 accessing OFFSET_TYPEs directly.
229
230 2002-08-08 Mike Stump <mrs@apple.com>
231
232 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
233 (type_decays_to): Likewise.
234 * class.c (find_final_overrider): Likewise.
235 (maybe_note_name_used_in_class): Likewise.
236 * decl.c (current_tmpl_spec_kind): Likewise.
237 (add_binding): Likewise.
238 (push_class_binding): Likewise.
239 (duplicate_decls): Likewise.
240 (layout_var_decl): Likewise.
241 (grokfndecl): Likewise.
242 (grokdeclarator): Likewise.
243 (check_default_argument): Likewise.
244 * decl2.c (handle_class_head): Likewise.
245 * error.c (dump_template_decl): Likewise.
246 * init.c (build_offset_ref): Likewise.
247 * pt.c (check_specialization_scope): Likewise.
248 (determine_specialization): Likewise.
249 (check_explicit_specialization): Likewise.
250 (maybe_check_template_type): Likewise.
251 (process_partial_specialization): Likewise.
252 (check_default_tmpl_args): Likewise.
253 (push_template_decl_real): Likewise.
254 (convert_template_argument): Likewise.
255 (try_class_unification): Likewise.
256 (get_bindings_real): Likewise.
257 (do_decl_instantiation): Likewise.
258 * semantics.c (begin_function_definition): Likewise.
259 (finish_member_declaration): Likewise.
260 (check_multiple_declarators): Likewise.
261 * typeck.c (comp_array_types): Likewise.
262 (comptypes): Likewise.
263 (expr_sizeof): Likewise.
264 (build_binary_op): Likewise.
265 (dubious_conversion_warnings): Likewise.
266 (check_return_expr): Likewise.
267
268 2002-08-08 Mark Mitchell <mark@codesourcery.com>
269
270 * typeck.c (build_class_member_access_expr): Do not return
271 error_mark_node when no error has occurred.
272
273 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
274
275 * typeck.c (build_component_addr): Remove.
276 (build_unary_op): Just check it's not a bitfield, and then build
277 an ADDR_EXPR.
278
279 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
280
281 * class.c (convert_to_base): Correct check for error_mark_node.
282 (create_vtable_ptr): Remove unused VFUNS_P parm.
283
284 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
285
286 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
287
288 2002-08-07 Mark Mitchell <mark@codesourcery.com>
289
290 Rework build_component_ref.
291 * call.c (build_vfield_ref): Do not go through build_component_ref.
292 (build_field_call): Use build_class_member_access_expr.
293 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
294 (build_object_call): Likewise.
295 * class.c (convert_to_base): New function.
296 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
297 (instantiate_type): Handle BASELINKs.
298 * cp-tree.def (BASELINK): New tree code.
299 * cp-tree.h (BASELINK_P): Reimplement.
300 (SET_BASELINK_P): Remove.
301 (BASELINK_BINFO): Reimplement.
302 (BASELINK_FUNCTIONS): Likewise.
303 (BASELINK_ACCESS_BINFO): Likewise.
304 (BASELINK_OPTYPE): Likewise.
305 (convert_to_base): New function.
306 (name_p): Likewise.
307 (build_object_ref): Remove.
308 (build_component_ref_1): Likewise.
309 (build_component_ref): Likewise.
310 (build_x_component_ref): Likewise.
311 (build_class_member_access_expr): New function.
312 (finish_class_member_access_expr): Likewise.
313 (build_ptrmemfunc_access_expr): Likewise.
314 * decl.c (grokdeclarator): Handle BASELINKs.
315 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
316 finish_class_member_access_expr.
317 (arg_assoc): Handle BASELINKs.
318 (do_class_using_decl): Likewise.
319 * error.c (dump_decl): Likewise.
320 (dump_expr): Use build_ptrmemfunc_access_expr.
321 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
322 destructors.
323 (build_throw): Use BASELINK_FUNCTIONS.
324 * init.c (perform_member_init): Use
325 build_class_member_access_expr.
326 (build_offset_ref): Handle BASELINKs. Use
327 build_class_member_access_expr.
328 * method.c (hack_identifier): Likewise.
329 * parse.y (do_id): Use BASELINK, not TREE_LIST.
330 (primary): Remove uses of build_object_ref.
331 * pt.c (lookup_template_function): Handle BASELINKs.
332 (resolve_overloaded_unification): Likewise.
333 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
334 (lookup_field): Use BASELINK, not TREE_LIST.
335 (lookup_fnfiels): Likewise.
336 (setup_class_bindings): Likewise.
337 * semantics.c (finish_object_call_expr): Do not use
338 build_method_call when we already know what function is being
339 called.
340 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
341 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
342 TREE_CHAIN.
343 (name_p): New function.
344 * typeck.c (build_object_ref): Remove.
345 (build_component_ref_1): Likewise.
346 (build_x_component_ref): Likewise.
347 (build_class_member_access_expr): New function.
348 (finish_class_member_access_expr): Likewise.
349 (build_ptrmemfunc_access_expr): Likewise.
350 (get_member_function_from_ptrfunc): Use
351 build_ptrmemfunc_access_expr.
352 (build_binary_op): Likewise.
353 (build_unary_op): Likewise.
354 (build_ptrmemfunc): Likewise.
355 (pfn_from_ptrmemfunc): Likewise.
356 * typeck2.c (build_m_component_ref): Adjust comment.
357
358 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
359
360 * Make-lang.in (CXX_C_OBJS): Update.
361 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
362 * cp-tree.h (cxx_decode_option): Remove.
363 * decl2.c (compare_options, lang_f_options, unsupported_options,
364 cxx_decode_option): Remove.
365
366 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
367
368 * typeck.c (build_x_unary_op): Handle pointer-to-member.
369
370 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
371
372 * class.c: Don't include obstack.h.
373 (popclass):
374 * decl2.c: Delete bogus comment.
375 * error.c: Don't include obstack.h.
376 * except.c: Likewise.
377 (dump_type): Correct comment.
378 * method.c: Don't include obstack.h.
379 * tree.c: Likewise.
380
381 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
382
383 Fix PR/2213
384 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
385 expressions to pointer-to-data-member of pointer-to-member-functions.
386
387 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
388
389 * cvt.c (ocp_convert): Delete obsolete code.
390 * parse.y (permanent_obstack): Delete declaration.
391 * pt.c (permanent_obstack): Delete declaration.
392 * repo.c (permanent_obstack): Delete declaration.
393 (open_repo_file): Use xmalloc instead of permanent_obstack.
394 (init_repo): Use xstrdup instead of permanent_obstack.
395
396 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
397
398 * cp-tree.h (VF_DERIVED_VALUE): Remove.
399 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
400
401 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
402
403 PR 7470.
404 C++ ABI change - vfunc ordering.
405 * class.c (add_virtual_function): Remove.
406 (dfs_modify_all_vtables): Take list of all declared
407 virtuals. Assign all that are not in primary base.
408 (check_for_override): Adjust comments.
409 (create_vtable_ptr): Take single list of virtuals. Build chain
410 of declared virtuals here.
411 (layout_class_type): Take single list of virtuals. Adjust.
412 (finish_struct_1): Keep virtuals on single list. Adjust.
413
414 2002-08-02 Mark Mitchell <mark@codesourcery.com>
415
416 * init.c (build_member_call): Use build_new_method_call, not
417 build_method_call.
418
419 2002-08-02 Krister Walfridsson <cato@df.lth.se>
420
421 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
422
423 2002-08-02 Mark Mitchell <mark@codesourcery.com>
424
425 * call.c (build_method_call): Issue a more helpful error message
426 about ambiguous method names.
427
428 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
429
430 * tree.c (build_shared_int_cst): Make cache file scope, and
431 GTY it.
432
433 2002-08-02 Jason Merrill <jason@redhat.com>
434
435 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
436 (cp_expr_size): New fn.
437 * call.c (build_over_call): Lose empty class hackery.
438 (convert_arg_to_ellipsis): Promote non-POD warning to error.
439 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
440
441 * semantics.c (expand_body): Do tree optimization in the function
442 context, too.
443
444 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
445
446 * cp-tree.h: Move all warning and flag declarations to c-common.h.
447 * decl.c: Move all warning and flag variables to c-common.c.
448 * decl2.c: Move all warning and flag variables to c-common.c.
449 * lex.c (flag_digraphs): Remove.
450 (warn_traditional): Now in c-common.c.
451
452 2002-07-31 Mark Mitchell <mark@codesourcery.com>
453
454 * call.c (build_field_call): Do not look up the field by name.
455 (build_method_call): Simplify.
456 (struct z_candidate): Add access_path and conversion_path. Remove
457 basetype_path.
458 (convert_class_to_reference): Adjust use of
459 add_function_candidate.
460 (add_candidate): Add conversion_path argument.
461 (add_function_candidate): Use it.
462 (add_conv_dndidate): Likewise.
463 (build_builtin_candidate): Likewise.
464 (add_template_candidate_real): Add conversion_path argument.
465 (add_template_conv_candidate): Likewise.
466 (add_template_candidate): Likewise.
467 (build_user_type_conversion_1): Use it.
468 (build_new_function_call): Remove name lookup code. Adjust use of
469 add_template_candidate and add_function_candidate.
470 (build_new_op): Likewise.
471 (convert_like_real): Use build_special_member_call.
472 (build_over_call): Use cand->conversion_path.
473 (build_special_member_call): New method.
474 (build_new_method_call): Remove name lookup code.
475 * cp-tree.def (OFFSET_REF): Update documentation.
476 (TEMPLATE_ID_EXPR): Likewise.
477 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
478 (BASELINK_OPTYPE): Likewise.
479 (build_new_method_call): Adjust prototype.
480 (build_special_member_call): New method.
481 (build_baselink): New method.
482 (build_offset_ref_call_from_tree): Likewise.
483 (build_call_from_tree): Likewise.
484 (finish_qualified_call_expr): Remove.
485 (finish_call_expr): Adjust prototype.
486 (build_x_function_call): Remove.
487 * cvt.c (ocp_convert): Use build_special_member_call.
488 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
489 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
490 CALL_EXPR.
491 (build_offset_ref_call_from_tree): New function.
492 (build_call_from_tree): Likewise.
493 * init.c (expand_cleanup): Use build_special_member_call.
494 (expand_default_init): Likewise.
495 (build_member_call): Use finish_call_expr.
496 (build_new_1): Use build_special_member_call.
497 (push_base_cleanups): Likewise.
498 * method.c (do_build_assign_ref): Likewise.
499 * parse.y (template_id): Do not pass a COMPONENT_REF to
500 lookup_template_function.
501 (primary): Use parse_finish_call_epxr, not finish_call_expr.
502 (parse_finish_call_expr): New function.
503 * pt.c (lookup_template_function): Add assertions.
504 * search.c (lookup_base): Allow T to be a binfo.
505 (build_baselink): New function.
506 (lookup_member): Use it.
507 * semantics.c (finish_call_expr): Do not do name lookup.
508 (finish_object_call_expr): Remove #if 0'd code.
509 (finish_qualified_call_expr): Remove.
510 * typeck.c (build_x_function_call): Remove.
511 (build_static_case): Use build_special_member_call.
512 * typeck2.c (build_functional_cast): Likewise.
513
514 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
515
516 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
517
518 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
519
520 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
521
522 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
523
524 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
525 documentation.
526
527 2002-07-29 Alan Modra <amodra@bigpond.net.au>
528
529 * cp-tree.h: Comment typo fix.
530
531 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
532
533 * spew.c (space_for_token): Allocate zeroed memory for a new token
534 chunk.
535
536 2002-07-27 Roger Sayle <roger@eyesopen.com>
537
538 * decl.c (builtin_function_1): No need to explicitly mark
539 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
540
541 2002-07-27 Roger Sayle <roger@eyesopen.com>
542
543 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
544
545 2002-07-26 Jason Merrill <jason@redhat.com>
546
547 * call.c (build_over_call): Likewise.
548 (cp_convert_parm_for_inlining): New fn.
549 (convert_for_arg_passing): New fn.
550 (convert_default_arg, build_over_call): Use it.
551 (type_passed_as): New fn.
552 * pt.c (tsubst_decl): Use it.
553 * decl2.c (cp_build_parm_decl): New fn.
554 (build_artificial_parm): Use it.
555 (start_static_storage_duration_function): Likewise.
556 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
557 (grokparms): Don't mess with DECL_ARG_TYPE.
558 * typeck.c (convert_arguments): Use convert_for_arg_passing.
559 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
560 Define.
561 * cp-tree.h: Declare new fns.
562
563 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
564
565 * cp-tree.h (flag_operator_names): Remove.
566 * decl2.c (flag_operator_names): Remove.
567 (lang_f_options): Remove operator-names.
568 * lex.c (D_OPNAME): Remove.
569 (reswords): Remove operator names.
570 (rid_to_yy): Remove operator names.
571 (init_reswords): No need to handle D_OPNAME.
572 * spew.c (read_process_identifier): There are no operator
573 names.
574
575 2002-07-26 Jason Merrill <jason@redhat.com>
576
577 * dump.c (cp_dump_tree): Call c_dump_tree.
578 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
579
580 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
581
582 * error.c (print_whitespace): Remove.
583 * g++spec.c (LIBUNWIND): Move.
584 * mangle.c (mangled_position, write_signed_number): Remove.
585
586 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
587
588 * decl2.c (cxx_decode_option): Similarly.
589
590 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
591
592 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
593 (cxx_sizeof_or_alignof_type): Take a third argument.
594 (cxx_sizeof): Adjust definition.
595 (cxx_alignof): Likewise.
596 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
597 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
598 complaining.
599 (c_sizeof_nowarn): Remove definition.
600 (build_unary_op): Use cxx_sizeof_nowarn.
601
602 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
603
604 * tree.c (cp_build_qualified_type_real): When copying
605 pointer-to-method types, unshare the record that holds
606 the cached pointer-to-member-function type.
607
608 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
609
610 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
611
612 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
613
614 Fix PR/7363:
615 * typeck.c (cxx_sizeof_or_alignof_type): New function.
616 (c_sizeof): Remove definition.
617 (expr_sizeof): Use cxx_sizeof.
618 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
619 * decl.c (finish_destructor_body): Use cxx_sizeof.
620 * semantics.c (finish_alignof): Likewise.
621 (finish_alignof): Use cxx_alignof.
622 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
623 (cxx_sizeof_or_alignof_type): Declare.
624 (my_friendly_assert): Move to ../c-common.h.
625
626 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
627
628 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
629
630 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
631
632 PR c++/7347, c++/7348
633 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
634 * decl.c (make_typename_type): Use it.
635 (make_unbound_class_template): Likewise.
636 (lookup_name_real): Don't call type_access_control if scope is
637 template parameter dependent.
638 * parse.y (template_arg): Call make_unbound_class_template with
639 tf_parsing set.
640 (nest_name_specifier): Call make_typename_type with tf_parsing set.
641 (typename_sub0): Likewise.
642 (typename_sub1): Likewise.
643 (instantiate_decl): Push class scope.
644 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
645 for both static variable and member function template.
646 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
647 and arguments.
648 * search.c (type_access_control): Do type access for TEMPLATE_DECL
649 too.
650
651 2002-07-20 Roger Sayle <roger@eyesopen.com>
652
653 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
654 test by using positive_option. Make whitespace consistent.
655
656 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
657
658 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
659 members with 'locus'. Adjust use throughout.
660 (struct feed): Likewise.
661 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
662 Adjust use.
663 (snarf_defarg): Use error(), not error_with_file_and_line().
664
665 2002-07-19 Chris Demetriou <cgd@broadcom.com>
666
667 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
668 cpp_options is included.
669
670 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
671
672 PR c++/2862, c++/2863
673 * pt.c (determine_specialization): Compare the length of
674 TYPE_ARG_TYPES. Tidy.
675
676 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
677
678 PR c++/3797
679 * decl.c (duplicate_decls): Don't propagate inlining parameters from
680 olddecl to newdecl when newdecl is a specialization of the
681 instantiation olddecl.
682
683 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
684
685 PR c++/4802, c++/5387
686 * decl.c (make_typename_type): Use enforce_access.
687
688 2002-07-17 Scott Snyder <snyder@fnal.gov>
689
690 PR c++/7320
691 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
692
693 2002-07-12 Mark Mitchell <mark@codesourcery.com>
694
695 * class.c (add_method): Correct handling of conversion operators.
696
697 2002-07-11 Mark Mitchell <mark@codesourcery.com>
698
699 PR c++/7224
700 * class.c (add_method): Simplify.
701
702 2002-07-11 Jason Merrill <jason@redhat.com>
703
704 PR c++/7279
705 * tree.c (cp_copy_res_decl_for_inlining): Also copy
706 TREE_ADDRESSABLE.
707
708 2002-07-10 Graham Stott <graham.stott@btinternet.com>
709
710 * pt.c (template_parm_this_level_p, push_template_decl_real):
711 Pass depth as int pointer.
712
713 2002-07-11 Tim Josling <tej@melbpc.org.au>
714
715 Remove front end hard coding from gengtype.c.
716
717 * config-lang.in (gtfiles): Add files needed for this front end.
718
719 2002-07-10 Mark Mitchell <mark@codesourcery.com>
720
721 * cp-tree.h (unqualified_name_lookup_error): Declare it.
722 (begin_function_definition): Adjust prototype.
723 * lex.c (unqualified_name_lookup_error): New function, split out
724 from ...
725 (do_identifier): ... here.
726 * parse.y (parse_begin_function_definition): New function.
727 (fn.def1): Use it.
728 * semantics.c (begin_function_definition): Accept decl-specifiers
729 and attributes as separate parameters.
730
731 2002-07-10 Jason Merrill <jason@redhat.com>
732
733 PR c++/6255
734 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
735 modifying the old one.
736
737 2002-07-09 Mark Mitchell <mark@codesourcery.com>
738
739 * cp-tree.h (constructor_name_p): Declare it.
740 (check_template_template_default_arg): Likewise.
741 * class.c (handle_using_decl): Use constructor_name_p.
742 * decl.c (grokdeclarator): Likewise.
743 * decl2.c (constructor_name_p): Define it.
744 * init.c (build_member_call): Use constructor_name_p.
745 * parse.y (template_parm): Use check_template_template_default_arg.
746 * pt.c (check_explicit_specialization): Use constructor_name_p.
747 * semantics.c (check_template_template_default_arg): New function.
748
749 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
750
751 * pt.c (can_complete_type_without_circularity): Add static to
752 function definition.
753
754 2002-07-08 Mark Mitchell <mark@codesourcery.com>
755
756 * cp-tree.h (have_extern_spec): Declare it
757 * decl.c (have_extern_spec): Define it.
758 (start_decl): Eliminate use of used_extern_spec.
759 (start_function): Likewise.
760 * parse.y (have_extern_spec): Remove declaration.
761 (used_extern_spec): Likewise.
762 (frob_specs): Eliminate use of used_extern_spec.
763 (.hush_warning): Likewise.
764
765 2002-07-07 Mark Mitchell <mark@codesourcery.com>
766
767 * Make-lang.in (cp/parse.o): Depend on decl.h.
768 * cp-tree.h (do_decl_instantiation): Change prototype.
769 * parse.y: Include decl.h.
770 (parse_decl_instantiation): New function.
771 (explicit_instantiation): Use it.
772 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
773 and DECLSPECS.
774
775 2002-07-07 Roger Sayle <roger@eyesopen.com>
776
777 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
778 constructor and destructor tests when passed a TEMPLATE_DECL.
779
780 2002-07-05 Jason Merrill <jason@redhat.com>
781
782 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
783 pointers.
784
785 PR optimization/7145
786 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
787
788 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
789
790 Repair damage on weak-impared targets caused by my previous patch.
791 * cp-tree.h (import_export_tinfo): Add parameter.
792 * decl2.c (import_export_tinfo): Add parameter, post adjust
793 DECL_COMDAT.
794 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
795 import_export_tinfo.
796
797 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
798
799 PR c++/6944
800 * init.c (build_aggr_init): Remove qualifiers of init before calling
801 build_vec_init.
802 (build_vec_init): Flatten multi-dimensional array during cleanup.
803 (build_vec_delete_1): Abort if the type of each element is array.
804
805 2002-07-03 Graham Stott <graham.stott@btinternet.com>
806
807 * pt.c (instantiate_class_template): Fix typo.
808
809 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
810
811 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
812 by CVS conflict in my last patch.
813
814 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
815
816 PR c++/6716
817 * pt.c (can_complete_type_without_circularity): New function.
818 (instantiate_class_template): Use it.
819 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
820 message due to incomplete fields.
821
822 2002-07-01 Mark Mitchell <mark@codesourcery.com>
823
824 PR c++/7112
825 * mangle.c (write_expression): Add mangling for sizeof when
826 applied to a type.
827 * operators.def: Remove stale comment.
828
829 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
830
831 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
832 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
833 (tinfo_decl_type): Replace with ...
834 (type_info_ptr_type): ... this.
835 (import_export_tinfo): Declare.
836 (tinfo_decl_p): Rename to ...
837 (unemitted_tinfo_decl_p): ... this.
838 * decl2.c (import_export_decl): Break out tinfo handling into ...
839 (import_export_tinfo): ... here. New function.
840 (finish_file): Adjust.
841 * rtti.c (TINFO_REAL_NAME): New macro.
842 (init_rtti_processing): Create the tinfo types.
843 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
844 (get_tinfo_decl): Adjust.
845 (get_tinfo_ptr): New function.
846 (get_type_id): Use it.
847 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
848 (ptr_initializer): Use get_tinfo_ptr.
849 (ptm_initializer): Likewise.
850 (synthesize_tinfo_var): Break into ...
851 (get_pseudo_ti_init): ... this. Just create the initializer.
852 (get_pseudo_ti_desc): .. and this.
853 (create_real_tinfo_var): Remove.
854 (create_pseudo_type_info): Don't create the vtable decl here.
855 (get_vmi_pseudo_type_info): Remove.
856 (create_tinfo_types): Adjust.
857 (tinfo_decl_p): Rename to ...
858 (unemitted_tinfo_decl_p): ... here. Adjust.
859 (emit_tinfo_decl): Adjust. Create the initializer.
860
861 2002-06-27 Mark Mitchell <mark@codesourcery.com>
862
863 PR c++/6695
864 * pt.c (tsubst_friend_class): Substitute into the context of the
865 friend before using it.
866
867 2002-06-26 Mark Mitchell <mark@codesourcery.com>
868
869 * cp-tree.h (xref_tag): Change prototype.
870 (handle_class_head): Likewise.
871 (build_x_component_ref): Likewise.
872 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
873 (xref_tag): Take attributes as a separate parameter.
874 (xref_tag_from_type): Adjust call to xref_tag.
875 * decl2.c (build_expr_from_tree): Adjust call to
876 build_x_component_ref.
877 (handle_class_head): Take attributes as a separate parameter.
878 * parse.y (parse_xref_tag): New function.
879 (parse_handle_class_head): Likewise.
880 (primary): Use parse_xref_tag.
881 (class_head_decl): Use parse_handle_class_head.
882 (class_head_defn): Likewise.
883 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
884 (build_dynamic_cast_1): Likewise.
885 (create_pseudo_type_info): Likewise.
886 (emit_support_tinfos): Likewise.
887 * typeck.c (build_object_ref): Adjust call to
888 build_x_component_ref.
889 (build_x_component_ref): Remove protect parameter.
890
891 2002-06-25 Mark Mitchell <mark@codesourcery.com>
892
893 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
894 * class.c (handle_using_decl): Likewise.
895 (instantiate_type): Likewise.
896 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
897 (xref_basetypes): Change prototype.
898 (begin_mem_initializers): New function.
899 (get_overloaded_fn): Likewise.
900 * decl.c (xref_basetypes): Simplify.
901 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
902 * init.c (build_offset_ref): Likewise.
903 * parse.y (base_init): Use begin_mem_initializers().
904 (structsp): Adjust call to xref_basetypes.
905 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
906 (instantiate_class_template): Adjust call to xref_basetypes.
907 * semantics.c (begin_mem_initializers): New function.
908 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
909 (really_overlaoded_fn): Likewise.
910 (get_overloaded_fn): New function.'
911 (get_first_fn): USe BASELINK_FUNCTIONS.
912
913 2002-06-24 Mark Mitchell <mark@codesourcery.com>
914
915 * cp-tree.h (SCALAR_TYPE_P): New macro.
916 (check_for_out_of_scope_variable): New function.
917 (at_class_scope_p): Likewise.
918 (finish_fname): Likewise.
919 * class.c (finish_struct): Use at_function_scope_p.
920 * decl.c (check_for_out_of_scope_variable): New function, split
921 out from do_identifier.
922 (finish_enum): Use at_function_scope_p.
923 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
924 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
925 (primary): Use at_function_scope_p.
926 * search.c (at_class_scope_p): New function.
927 * semantics.c (finish_fname): Likewise.
928 (check_multiple_declarators): Use at_function_scope_p.
929
930 2002-06-23 Mark Mitchell <mark@codesourcery.com>
931
932 * parse.y (parse_scoped_id): New function.
933 (primary): Use it.
934 * cp-tree.h (do_scoped_id): Adjust declaration.
935 * lex.c (do_scoped_id): Remove call to yylex.
936 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
937 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
938 expanding it inline.
939
940 2002-06-23 Matt Thomas <matt@3am-software.com>
941
942 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
943 "#if VMS_TARGET".
944
945 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
946
947 * mangle.c (integer_type_codes): Const-ify.
948
949 2002-06-20 Richard Henderson <rth@redhat.com>
950
951 PR c++/6747
952 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
953 Call put_var_into_stack.
954
955 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
956
957 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
958 array size calculation.
959
960 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
961
962 PR c++/6892
963 * pt.c (tsubst_expr): Handle FILE_STMT.
964
965 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
966
967 PR c++/6723
968 * pt.c (lookup_template_class): Don't build complete argument of
969 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
970 argument.
971
972 2002-06-19 Akim Demaille <akim@epita.fr>
973
974 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
975 decl.h's TYPENAME.
976 * spew.c, lex.c: Adjust.
977 * parse.y (explicit_instantiation): Add empty action to override
978 the default $$ = $1 where it introduces a type clash.
979
980 2002-06-14 Jason Merrill <jason@redhat.com>
981
982 * semantics.c (begin_for_stmt): Push the 'for' scope before
983 adding the FOR_STMT.
984
985 C++ ABI changes.
986 * class.c (build_base_field): Set DECL_PACKED.
987 (layout_class_type): Don't use tail padding of PODs.
988 * mangle.c (write_unqualified_name): Fix template conversion op
989 mangling.
990
991 2002-06-16 Richard Henderson <rth@redhat.com>
992
993 PR opt/6793
994 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
995 after template instantiation.
996
997 2002-06-16 Richard Henderson <rth@redhat.com>
998
999 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
1000
1001 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
1002
1003 * cp-tree.h (compiler_error): Remove declaration.
1004 * lex.c (compiler_error): Remove definition.
1005
1006 2002-06-14 Steve Ellcey <sje@cup.hp.com>
1007
1008 * g++spec.c (LIBUNWIND): New.
1009 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
1010
1011 2002-06-13 Jessica Han <jessica@cup.hp.com>
1012
1013 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
1014 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
1015 (build_vbase_offset_vtbl_entries): Likewise.
1016 * rtti.c (build_headof): Likewise.
1017 (get_tinfo_decl_dynamic): Likewise.
1018 (create_pseudo_type_info): Likewise.
1019
1020 2002-06-12 Stan Shebs <shebs@apple.com>
1021
1022 * mpw-config.in: Remove file, no longer used.
1023 * mpw-make.sed: Ditto.
1024
1025 2002-06-07 Zack Weinberg <zack@codesourcery.com>
1026
1027 * decl2.c: Update call to cpp_handle_option.
1028
1029 2002-06-07 H.J. Lu (hjl@gnu.org)
1030
1031 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
1032
1033 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1034
1035 * error.c (cp_error_at): Fix typo.
1036
1037 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
1038
1039 * error.c (cp_diagnostic_starter): Adjust call.
1040 (maybe_print_instantiation_context): Change prototype to take a
1041 'diagnostic_info *'.
1042 (print_instantiation_full_context): Likewise.
1043 (print_instantiation_partial_context): Likewise.
1044 (cp_diagnostic_starter): Likewise.
1045 (cp_diagnostic_finalizer): Likewise.
1046 (cp_print_error_function): Likewise.
1047 (cp_printer): Take a secondary parameter as a 'text_info *'.
1048 Remove output_state savings. Adjust calls.
1049
1050 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
1051
1052 * pt.c (inline_parm_levels): Mark for GC.
1053
1054 * mangle.c (start_mangling): Allocate G.substitutions here...
1055 (init_mangle): ... rather than here.
1056 (finish_mangling): Clear the varray pointer when done with it.
1057 * spew.c (yylexstring): Don't use VARRAY_FREE.
1058 * search.c (bfs_walk): Don't use VARRAY_FREE.
1059 * decl2.c (pending_statics): Use gengtype to mark.
1060 (deferred_fns): Likewise.
1061 (ssdf_decls): Likewise.
1062 (init_decl2): Delete.
1063 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
1064 (cxx_init_decl_processing): Don't call init_decl2.
1065 (cxx_pop_function_context): Don't use VARRAY_FREE.
1066 * cp-tree.h (struct saved_scope): No need for special marking
1067 of varrays.
1068 (struct language_function): Likewise.
1069 (local_classes): Use gengtype to mark.
1070 (init_decl2): Delete prototype.
1071 * class.c (init_class_processing): Don't use
1072 ggc_add_tree_varray_root.
1073 (build_vtbl_initializer): Don't use VARRAY_FREE.
1074
1075 * decl.c (typename_compare): Don't use same_type_p.
1076
1077 * decl.c: Include hashtab.h instead of hash.h.
1078 (typename_hash): Update to use htab_h.
1079 (typename_compare): Likewise.
1080 (typename_htab): Use gengtype to mark.
1081 (build_typename_type): Update to use htab_h.
1082 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
1083
1084 * Make-lang.in (gt-cp-tree.h): New rule.
1085 (cp/tree.o): Depend on gt-cp-tree.h.
1086 * config-lang.in (gtfiles): Add cp/tree.c.
1087 * tree.c: Include gt-cp-tree.h.
1088 (list_hash_table): Use gengtype to mark.
1089 (init_tree): Use gengtype to mark trees.
1090
1091 * Make-lang.in (cp/decl.o): Add debug.h dependency.
1092 * call.c (struct z_candidate): Use gengtype.
1093 (USER_CONV_CAND): Use WRAPPER_ZC.
1094 (convert_class_to_reference): Use build_zc_wrapper.
1095 (build_type_conversion_1): Likewise.
1096 (build_over_call): Use WRAPPER_ZC.
1097 (add_warning): Use build_zc_wrapper.
1098 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
1099 * cp-tree.h (struct lang_identifier): Use gengtype.
1100 (struct template_parm_index_s): Likewise.
1101 (struct ptrmem_cst): Likewise.
1102 (struct tree_binding): Likewise.
1103 (struct tree_overload): Likewise.
1104 (struct tree_srcloc): Likewise.
1105 (struct tree_wrapper): Likewise. Also modify to have a pointer
1106 to struct z_candidate rather than void.
1107 (enum cp_tree_node_structure_enum): New.
1108 (union lang_tree_node): New.
1109 (cxx_mark_tree): Delete prototype.
1110 (cp_tree_node_structure): New prototype.
1111 (build_ptr_wrapper): Delete prototype.
1112 (build_int_wrapper): Delete prototype.
1113 (build_zc_wrapper): New prototype.
1114 * decl.c: Include debug.h
1115 (cxx_mark_tree): Delete.
1116 (cp_tree_node_structure): New.
1117 * tree.c (build_ptr_wrapper): Delete.
1118 (build_int_wrapper): Delete.
1119 (build_zc_wrapper): New.
1120
1121 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1122 Correct typo. Patch from k_fukui@highway.ne.jp.
1123
1124 * semantics.c (current_stmt_tree): Update for change to
1125 struct language_function.
1126 (finish_mem_initializers): Likewise.
1127 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1128 * cp-tree.h (struct language_function): Rename from
1129 cp_language_function. Change all uses.
1130 (cp_function_chain): Don't need to cast.
1131
1132 * class.c (duplicate_tag_error): Reset discriminator.
1133 (check_bases_and_members): Update for data structure changes.
1134 * cp-tree.h (struct lang_id2): Use gengtype.
1135 (flagged_type_tree): Likewise.
1136 (SET_LANG_ID): Use GGC on struct lang_id2.
1137 (struct cp_language_function): Use gengtype. Remove field
1138 'x_vcalls_possible_p'.
1139 (current_vcalls_possible_p): Delete.
1140 (struct lang_type_header): New.
1141 (struct lang_type_class): Rename from struct lang_type. Include
1142 struct lang_type_header.
1143 (struct lang_type_ptrmem): New.
1144 (struct lang_type): New.
1145 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
1146 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
1147 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1148 (struct lang_decl_flags): Use gengtype. Add discriminators.
1149 (struct lang_decl): Use gengtype. Add and use discriminators.
1150 Update the macros that reference moved fields.
1151 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
1152 (SET_DECL_THUNK_P): Set discriminator too.
1153 (clear_inline_text_obstack): Delete prototype.
1154 (finish_inline_definitions): Delete prototype.
1155 (mark_pending_inlines): Delete prototype.
1156 (lang_check_failed): New prototype.
1157 * decl.c (struct named_label_use_list): Use gengtype.
1158 (struct named_label_list): Likewise.
1159 (mark_binding_level): Delete.
1160 (mark_named_label_lists): Delete.
1161 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1162 (cxx_init_decl_processing): Use generated marker routine.
1163 (begin_destructor_body): Delete dead set to
1164 current_vcalls_possible_p.
1165 (mark_lang_function): Delete.
1166 (mark_cp_function_context): Delete.
1167 (lang_mark_tree): Use generated marker routines.
1168 * decl2.c (start_objects): Set discriminator when setting
1169 GLOBAL_INIT_PRIORITY.
1170 * lex.c (retrofit_lang_decl): Set discriminators.
1171 (copy_lang_type): Update for changes to lang_type structure.
1172 (cp_make_lang_type): Set discriminator.
1173 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
1174 * search.c: Include ggc.h.
1175 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1176 (finish_inline_definitions): Delete.
1177 * spew.c (struct token): Use gengtype.
1178 (struct token_chunk): New.
1179 (struct unparsed_text): Use gengtype. Store tokens in chunks.
1180 (struct feed): Use gengtype.
1181 (feed_obstack): Delete.
1182 (feed): Mark as GC root.
1183 (pending_inlines): Mark as GC root.
1184 (pending_inlines_tail): Likewise.
1185 (processing_these_inlines): Likewise.
1186 (token_obstack): Make static.
1187 (first_token): Likewise.
1188 (init_spew): Don't initialize deleted things; use gengtype for roots.
1189 (clear_inline_text_obstack): Delete.
1190 (feed_input): Use GC for struct feed. Update for changes to
1191 struct unparsed_text.
1192 (mark_pending_inlines): Delete.
1193 (next_token): Rename from add_token. Change all callers. Update
1194 for changes to struct unparsed_text.
1195 (space_for_token): New.
1196 (remove_last_token): New.
1197 (alloc_unparsed_text): New.
1198 (snarf_block): Take an unparsed_text. Update for changes to struct
1199 unparsed_text.
1200 (snarf_method): Update for changes to struct unparsed_text.
1201 (snarf_defarg): Update for changes to struct unparsed_text.
1202 * tree.c (lang_check_failed): New.
1203
1204 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
1205 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
1206 (cp/spew.o): Add dependency on gt-<filename>.h.
1207 (cp/decl2.o): Add dependency on gt-<filename>.h.
1208 (cp/call.o): Add dependency on gt-<filename>.h.
1209 (cp/pt.o): Add dependency on gt-<filename>.h.
1210 (cp/repo.o): Add dependency on gt-<filename>.h.
1211 (cp/parse.o): Add dependency on gt-<filename>.h.
1212 * call.c: Use gengtype for roots.
1213 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
1214 decl2.c parse.y pt.c repo.c spew.c.
1215 * cp-tree.h: Use gengtype for roots.
1216 (struct saved_scope): Use GGC, gengtype.
1217 (cp_parse_init): Delete prototype.
1218 (init_pt): Delete prototype.
1219 * decl.c: Use gengtype for roots.
1220 (mark_saved_scope): Delete.
1221 (cxx_init_decl_processing): Don't call deleted initilisation
1222 routines.
1223 (signed_size_zero_node): Delete, unused.
1224 * decl.h: Use gengtype for roots.
1225 * decl2.c: Use gengtype for roots.
1226 * lex.h: Use gengtype for roots.
1227 * parse.y: Use gengtype for roots.
1228 (cp_parse_init): Delete.
1229 * pt.c: Use gengtype for roots.
1230 (init_pt): Delete.
1231 * repo.c: Use gengtype for roots.
1232 * spew.c: Use gengtype for roots.
1233
1234 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
1235 (cp/decl.o): Add dependency on gtype-cp.h.
1236 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
1237 Include gtype-cp.h. Allow for filename changes.
1238
1239 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
1240 (cp/decl.o): Add cp/gt-decl.h dependency.
1241 * config-lang.in (gtfiles): New.
1242 * tree.h: Rename struct binding_level to struct cp_binding_level.
1243 * decl.c: Rename struct binding_level to struct cp_binding_level.
1244 Include cp/gt-decl.h.
1245 (struct cp_binding_level): Use gengtype.
1246 (make_binding_level): Use GGC on struct cp_binding_level.
1247 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
1248 (cxx_init_decl_processing): Mark free_binding_level as
1249 deletable.
1250
1251 * decl.c (mark_cp_function_context): Update calling sequence.
1252
1253 * decl.c (start_function): Don't free 'struct
1254 cp_language_function'.
1255 (pop_cp_function_context): Likewise.
1256 (save_function_data): Allocate it using GC.
1257 * semantics.c (genrtl_start_function): Don't free 'struct
1258 cp_language_function'.
1259
1260 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
1261
1262 * lang-specs.h: Use cpp_debug_options.
1263
1264 2002-05-28 Zack Weinberg <zack@codesourcery.com>
1265
1266 * mangle.c, tree.c: Include real.h.
1267 * Make-lang.in: Update dependency lists.
1268
1269 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
1270
1271 * lex.c: Don't include c-lex.h.
1272 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
1273
1274 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
1275
1276 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
1277
1278 2002-05-22 Richard Henderson <rth@redhat.com>
1279
1280 * decl.c (obscure_complex_init): Check for VAR_DECL
1281 before using DECL_THREAD_LOCAL.
1282
1283 2002-05-22 Richard Henderson <rth@redhat.com>
1284
1285 * decl.c (check_tag_decl): Handle RID_THREAD.
1286 (obscure_complex_init): Reject run-time init of tls.
1287 (grokvardecl, grokdeclarator): Handle RID_THREAD.
1288 * lex.c (reswords): Add __thread.
1289 (rid_to_yy): Map RID_THREAD to SCSPEC.
1290
1291 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
1292
1293 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
1294 * cp-tree.h (cxx_post_options): Kill.
1295 * cp-lex.c (cxx_post_options): Kill.
1296
1297 2002-05-21 Richard Henderson <rth@redhat.com>
1298
1299 * lex.c (rid_to_yy): Add RID_THREAD.
1300
1301 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
1302
1303 * init.c (build_vec_init): Test for trivial copy-assignment when
1304 copy-assigning arrays.
1305
1306 2002-05-20 Andreas Jaeger <aj@suse.de>
1307
1308 * init.c (build_default_init): Remove unused variable.
1309
1310 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
1311
1312 * call.c (any_strictly_viable): New.
1313 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
1314
1315 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1316
1317 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
1318
1319 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1320
1321 PR c++/186, DR 259
1322 * pt.c (do_decl_instantiation): Don't complain explicit
1323 instantiation after explicit specialization.
1324 (do_type_instantiation): Likewise.
1325
1326 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
1327
1328 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
1329 renamed from...
1330 (complete_type_or_else): ... this. Redefined as macro.
1331 (cxx_incomplete_type_diagnostic): Declare.
1332 (cxx_incomplete_type_error): Define as macro.
1333 * init.c (build_delete): Warn about incomplete types other than
1334 void, and use the built-in operator delete for them.
1335 * typeck.c (complete_type_or_diagnostic): Renamed from
1336 complete_type_or_else. Added warn_only argument, passed to...
1337 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
1338 warnings or errors depending on new warn_only argument. Renamed
1339 from...
1340 (cxx_incomplete_type_error): ... this. New implementation in
1341 terms of cxx_incomplete_type_diagnostic.
1342
1343 2002-05-18 Jason Merrill <jason@redhat.com>
1344
1345 PR c++/6611
1346 * decl2.c (import_export_decl): If we clear
1347 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
1348
1349 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1350
1351 PR c++/6620
1352 * pt.c (verify_class_unification): Don't check if PARM is template
1353 parameter dependent. Simplify.
1354 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
1355 parameter dependent expression.
1356
1357 2002-05-14 Jason Merrill <jason@redhat.com>
1358
1359 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
1360 Do set DECL_COMDAT.
1361 (synthesize_tinfo_var): Take the public decl.
1362 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
1363 (emit_tinfo_decl): Adjust. Call import_export_decl.
1364 * decl2.c (import_export_decl): Simplify tinfo decl handling.
1365
1366 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
1367
1368 * cp-tree.h (struct lang_type): Added non_zero_init.
1369 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
1370 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
1371 * class.c (check_field_decls): Test non_zero_init.
1372 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
1373 zero-to-NULL conversions.
1374 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
1375 type that needs zero-initialization without zeros.
1376 (check_initializer_decl): Compute zero-initializer for types
1377 that require a non-trivial one.
1378 * init.c (build_forced_zero_init): New function.
1379 (build_default_init): Use it.
1380 * tree.c (zero_init_p): New function.
1381 * typeck2.c (force_store_init_value): New function.
1382 (process_init_constructor): Create non-trivial zero-initializers
1383 for array members and class fields.
1384
1385 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
1386
1387 * lang-specs.h: Remove redundant -lang-c++.
1388
1389 2002-05-13 Jason Merrill <jason@redhat.com>
1390
1391 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
1392 (fixed_type_or_null): See through reference vars.
1393 (build_base_path): Vtable contents are constant.
1394 * typeck.c (get_member_function_from_ptrfunc): Likewise.
1395
1396 2002-05-12 Jason Merrill <jason@redhat.com>
1397
1398 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
1399 structs are safe.
1400
1401 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
1402
1403 * cp-tree.h (flag_ansi): Remove.
1404 * decl2.c (flag_ansi): Remove.
1405 (cxx_decode_option): Set flag_iso and flag_undef.
1406
1407 2002-05-09 Jason Merrill <jason@redhat.com>
1408
1409 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
1410 Use subtraction rather than a bitmask to get the index.
1411 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
1412
1413 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
1414
1415 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
1416
1417 * Make-lang.in (decl2.o): Update.
1418 * cp-tree.h (warn_multichar): Remove.
1419 * decl2.c: Include c-common.h.
1420 (warn_multichar): Remove.
1421
1422 2002-05-03 Jason Merrill <jason@redhat.com>
1423
1424 * tree.c (build_cplus_array_type): Only const and volatile get
1425 special handling.
1426
1427 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
1428
1429 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1430
1431 ABI change, returning simple classes from functions.
1432 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
1433 TYPE_HAS_TRIVIAL_INIT_REF is false or
1434 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
1435
1436 2002-04-30 Jason Merrill <jason@redhat.com>
1437
1438 PR debug/6436
1439 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
1440 anonymous class with a typedef if there are attributes.
1441
1442 2002-04-29 Paul Eggert <eggert@twinsun.com>
1443
1444 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
1445
1446 2002-04-29 Jakub Jelinek <jakub@redhat.com>
1447
1448 PR c++/6477
1449 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
1450 non-NULL first.
1451
1452 2002-04-29 Mark Mitchell <mark@codesourcery.com>
1453
1454 PR c++/6492
1455 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
1456 enter that scope before name lookup.
1457
1458 PR c++/6486
1459 * method.c (do_build_copy_constructor): Avoid building
1460 cv-qualified reference types.
1461
1462 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
1463
1464 PR c++/5719
1465 * decl.c (grok_op_properties): Assignment ops don't have to return
1466 by value. operator% should.
1467
1468 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1469
1470 PR c/6343
1471 * decl.c (duplicate_decls): Call merge_weak.
1472
1473 2002-04-26 Richard Henderson <rth@redhat.com>
1474
1475 * parse.y (malloced_yyss, malloced_yyvs): New.
1476 (yyoverflow): Re-add. Set them.
1477 (free_parser_stacks): New.
1478
1479 2002-04-26 Mark Mitchell <mark@codesourcery.com>
1480
1481 PR c++/6497
1482 * method.c (do_build_assign_ref): Pass a derivation to
1483 build_method_call when calling base class assignment operators.
1484
1485 2002-04-26 Richard Henderson <rth@redhat.com>
1486
1487 * parse.y (yyoverflow): Revert.
1488
1489 2002-04-26 Richard Henderson <rth@redhat.com>
1490
1491 PR c/3581
1492 * parse.y (string): Remove. Update all uses to use STRING
1493 instead, and not call combine_strings.
1494 * rtti.c (tinfo_name): Use fix_string_type.
1495 * semantics.c (finish_asm_stmt): Don't call combine_strings.
1496 * spew.c (yylexstring): New.
1497 (read_token): Use it.
1498
1499 2002-04-25 Richard Henderson <rth@redhat.com>
1500
1501 PR c/2161
1502 * parse.y (yyoverflow): New.
1503
1504 2002-04-25 Jason Merrill <jason@redhat.com>
1505
1506 PR c++/5607
1507 * search.c (check_final_overrider): No longer static.
1508 * class.c (update_vtable_entry_for_fn): Call it.
1509 * cp-tree.h: Adjust.
1510
1511 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
1512
1513 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
1514 * cp-tree.h (cxx_set_yydebug): Die.
1515 * lex.c (YYDEBUG): Get from c-lex.h.
1516 (cxx_set_yydebug): Remove.
1517 * parse.y: Include c-lex.h.
1518 (YYDEBUG): Get from c-lex.h.
1519
1520 2002-04-24 Mark Mitchell <mark@codesourcery.com>
1521
1522 PR c++/6438.
1523 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
1524 void.
1525
1526 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
1527
1528 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
1529 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
1530 Redefine.
1531 * cp-tree.h (cp_attribute_table): Rename.
1532 * decl.c (lang_attribute_table): Remove declaration.
1533 (cxx_init_decl_processing): Don't set it.
1534 * tree.c (cp_attribute_table): Rename.
1535
1536 2002-04-24 Jason Merrill <jason@redhat.com>
1537
1538 PR c++/6331
1539 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
1540 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
1541 The pedwarn for array assignment is now unconditional.
1542 * tree.c (build_cplus_array_type_1): Still process simple array types
1543 normally in templates.
1544
1545 PR c++/6395
1546 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
1547 stuff for comdats.
1548
1549 2002-04-23 Jakub Jelinek <jakub@redhat.com>
1550
1551 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
1552 node with attributes.
1553
1554 2002-2-23 David O'Brien <obrien@FreeBSD.org>
1555
1556 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
1557 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
1558
1559 2002-04-23 Mark Mitchell <mark@codesourcery.com>
1560
1561 PR c++/6256:
1562 * pt.c (tsubst_friend_class): Handle templates with explicit
1563 nested names.
1564
1565 PR c++/6331:
1566 * typeck.c (merge_types): Remember the cv-qualification of pointer
1567 types when merging them.
1568
1569 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
1570
1571 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
1572 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
1573 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
1574 cxx_mark_function_context): New.
1575 * decl.c (push_cp_function_context, pop_cp_function_context,
1576 mark_cp_function_context): Rename for consistency.
1577 (cxx_init_decl_processing): Don't set old hooks.
1578
1579 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
1580
1581 * call.c (convert_type_from_ellipsis): Rename, update.
1582 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
1583 * cp-tree.h (convert_type_from_ellipsis): Rename.
1584 * decl.c (cxx_init_decl_processing): Don't set hook.
1585
1586 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
1587
1588 * call.c (build_new_method_call): Update.
1589 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
1590 * cp-tree.h (cxx_incomplete_type_error): New.
1591 * decl.c (grokdeclarator, grokparms): Update.
1592 * decl2.c (check_classfn): Update.
1593 * pt.c (tsubst): Update.
1594 * typeck.c (complete_type_or_else, expr_sizeof,
1595 decay_conversion): Update.
1596 * typeck2.c (incomplete_type_error): Rename.
1597 (add_exception_specifier): Update.
1598
1599 2002-04-18 Jason Merrill <jason@redhat.com>
1600
1601 PR c++/5658
1602 * search.c (setup_class_bindings): A class template qualifies as a
1603 type binding.
1604
1605 2002-04-17 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR c++/6316
1608 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
1609 before expanding.
1610
1611 2002-04-16 Mark Mitchell <mark@codesourcery.com>
1612
1613 * init.c (begin_init_stmts): Remove commented out code.
1614 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
1615 * semantics.c (begin_gobal_stmt_expr): Adjust call to
1616 expand_start_stmt_expr.
1617
1618 2002-04-15 Mark Mitchell <mark@codesourcery.com>
1619
1620 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
1621 dso_handle itself, to __cxa_atexit.
1622
1623 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1624
1625 * error.c (cxx_print_error_function): Adjust call to macros.
1626
1627 2002-04-14 Jakub Jelinek <jakub@redhat.com>
1628
1629 * class.c (layout_virtual_bases): Do all dsize computation on trees.
1630
1631 2002-04-14 Jason Merrill <jason@redhat.com>
1632
1633 * typeck.c (get_member_function_from_ptrfunc): Don't do
1634 gratuitious division and multiplication on
1635 ptrmemfunc_vbit_in_delta targets.
1636
1637 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1638
1639 PR c++/5373.
1640 * semantics.c (finish_expr_stmt): Remember the type of the
1641 expression before any conversions are performed.
1642
1643 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1644
1645 PR c++/5189.
1646 * call.c (add_template_candidate_real): Do not treat member
1647 templates as copy constructors.
1648
1649 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1650
1651 * decl.c (duplicate_decls): Do not copy the RTL for a variable
1652 declaration if the old variable had an incomplete type and the new
1653 variable does not.
1654 (complete_vars): Do not call layout_decl for completed variables.
1655
1656 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
1657
1658 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
1659 with an explicit one.
1660 (follow_tag_typedef): New.
1661 (lookup_tag): Use it to extract the tag of an explicit typedef.
1662 (xref_tag): Likewise.
1663
1664 2002-04-11 Andrew Haley <aph@redhat.com>
1665
1666 * typeck.c (type_after_usual_arithmetic_conversions):
1667 If two types have the same variant, return immediately.
1668 When two floating-point operands are the same precision:
1669 convert to float if one of the operands is float;
1670 if neither operand is one of the standard types, return the type
1671 of the first operand.
1672
1673 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
1674
1675 PR c++/5507
1676 * decl.c (make_typename_type): Remove implicit typenameness.
1677
1678 2002-04-09 Jason Merrill <jason@redhat.com>
1679
1680 PR optimization/6189
1681 * semantics.c (genrtl_start_function): Don't free
1682 DECL_SAVED_FUNCTION_DATA for inline functions.
1683
1684 * init.c (build_member_call): For now, don't convert to
1685 intermediate base if it would cause an error.
1686
1687 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
1688
1689 * parse.y (namespace_qualifier, maybe_identifier,
1690 begin_explicit_instantiation, end_explicit_instantiation,
1691 apparent_template_type, .finish_template_type,
1692 do_id, maybe_init, defarg_again, component_decl_1):
1693 Add ending ';', in accordance with POSIX.
1694
1695 2002-04-06 Mark Mitchell <mark@codesourcery.com>
1696
1697 PR c++/5571
1698 * class.c (layout_class_type): Remember incomplete static
1699 variables.
1700 (finish_struct_1): Call complete_vars, not
1701 hack_incomplete_structures.
1702 * cp-tree.h (hack_incomplete_structures): Rename to ...
1703 (complete_vars): ... this.
1704 (struct saved_scope): Remove incomplete.
1705 (namespace_scope_incomplete): Remove.
1706 * decl.c (struct binding_level): Remove incomplete.
1707 (incomplete_vars): New variable.
1708 (mark_binding_level): Don't mark incomplete.
1709 (print_binding_level): Don't print it.
1710 (mark_saved_scope): Don't mark incomplete.
1711 (pushdecl): Use maybe_register_incopmlete_var.
1712 (cxx_init_decl_processing): Register incomplete_vars for GC.
1713 (start_decl_1): Clarify error message.
1714 (hack_incomplete_vars): Remove.
1715 (maybe_register_incomplete_var): New function.
1716 (complete_vars): Likewise.
1717
1718 2002-04-06 Jason Merrill <jason@redhat.com>
1719
1720 PR c++/4934
1721 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
1722 set before checking it.
1723
1724 PR c++/525
1725 * init.c (build_member_call): Use build_scoped_ref.
1726 (resolve_offset_ref): Likewise.
1727 * call.c (build_scoped_method_call): Likewise.
1728 * tree.c (maybe_dummy_object): Kludge around current_class_type being
1729 wrong.
1730 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
1731 * cp-tree.h: Adjust.
1732
1733 * init.c (push_base_cleanups): Just use build_scoped_method_call.
1734
1735 PR c++/6179
1736 * method.c (implicitly_declare_fn): Pass unqualified type to
1737 synthesize_exception_spec.
1738
1739 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
1740
1741 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1742 * cvt.c: Update comment.
1743 * init.c (expand_cleanup_for_base): Update.
1744 * semantics.c (finish_parenthesized_expr): Update.
1745 * typeck.c (cp_truthvalue_conversion): Update.
1746
1747 2002-04-04 Jason Merrill <jason@redhat.com>
1748
1749 * semantics.c (finish_eh_cleanup): New fn.
1750 * cp-tree.h: Add prototype.
1751 * init.c (perform_member_init, expand_cleanup_for_base): Use
1752 finish_eh_cleanup.
1753 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
1754 * cp-tree.h: Remove references.
1755 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
1756 * dump.c (cp_dump_tree): Likewise.
1757 * pt.c (tsubst_expr): Likewise.
1758 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
1759 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
1760 * tree.c (cp_statement_code_p): Likewise.
1761
1762 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
1763
1764 PR c++/5636
1765 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
1766 cleanup for nrv.
1767
1768 PR c++/5104
1769 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
1770 specifiers.
1771 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
1772
1773 2002-04-03 Richard Henderson <rth@redhat.com>
1774
1775 * cp-lang.c (cxx_warn_unused_global_decl): New.
1776 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
1777
1778 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
1779
1780 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
1781 * tree.c (init_tree): Don't set hook.
1782
1783 2002-04-03 Roger Sayle <roger@eyesopen.com>
1784
1785 PR c++/5998:
1786 * decl.c (duplicate_decls): Don't mess with assembler names when
1787 redeclaring builtin functions as static.
1788
1789 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1790
1791 * call.c (build_addr_func): Update.
1792 * class.c (resolve_address_of_overloaded_function): Update.
1793 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1794 * cp-tree.h (cxx_mark_addressable): New.
1795 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
1796 * decl2.c (build_cleanup): Update.
1797 * except.c (build_throw): Update.
1798 * init.c (resolve_offset_ref): Update.
1799 * pt.c (convert_nontype_argument): Update.
1800 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
1801 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
1802 unary_complex_lvalue): Update.
1803 (mark_addressable): Rename.
1804
1805 2002-04-01 Roger Sayle <roger@eyesopen.com>
1806
1807 PR c++/5998:
1808 * decl.c (duplicate_decls): Overwrite the RTL when (and only
1809 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
1810 but follow the SET_DECL_RTL idiom used elsewhere in the function.
1811
1812 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1813
1814 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1815 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1816 * decl.c (grokdeclarator): Update.
1817 * mangle.c (write_integer_cst): Update.
1818 * typeck.c (build_binary_op): Update.
1819
1820 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1821
1822 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
1823 * lex.c (cxx_init): Don't set hook.
1824
1825 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1826
1827 * Make-lang.in (error.o): Update.
1828 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1829 * cp-tree.h (struct diagnostic_context): Predeclare.
1830 (cxx_print_error_function): New.
1831 * error.c: Include langhooks-def.h.
1832 (lang_print_error_function): Rename. Update.
1833 (init_error): Don't set hook.
1834
1835 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1836
1837 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
1838 Redefine.
1839 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
1840 * decl.c (finish_enum): Similarly.
1841 * error.c (dump_type): Similarly.
1842 * lex.c (cxx_init): Similarly.
1843 * mangle.c (write_builtin_type): Similarly.
1844 * typeck.c (comptypes): Similarly.
1845
1846 2002-03-28 Roger Sayle <roger@eyesopen.com>
1847
1848 PR c++/5998:
1849 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
1850 in the g++ front-end.
1851 (duplicate_decl): Allow redefinition of anticipated built-ins.
1852 Fix inlining problem by over-writing the old DECL_RTL.
1853 (lookup_namespace_name): Fail to find an identifier in the
1854 specified namespace if its still anticipated.
1855 (builtin_function_1): New function split out from builtin_function
1856 to create a builtin in the current namespace with given context.
1857 (builtin_function): Call builtin_function_1 to define the
1858 appropriate builtins in both the std and global namespaces.
1859 (select_decl): Don't test for anticipated decls here.
1860 (unqualified_namespace_lookup): Instead ignore them whilst
1861 searching through scopes and namespaces.
1862 * decl2.c (do_nonmember_using_decl): If a using declaration
1863 specifies an anticipated built-in function, mark it as no longer
1864 anticipated in that scope.
1865 (ambiguous_decl): Avoid resolving to an anticipated decl.
1866 * lex.c (do_scoped_id): Fail to find an identifier in the global
1867 namespace if its still anticipated.
1868
1869 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1870
1871 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
1872 * cp-tree.h (cp_make_lang_type): Rename.
1873 * lex.c (cp_make_lang_type): Rename.
1874 (make_aggr_type): Update.
1875 * tree.c (init_tree): Don't set make_lang_type_fn.
1876
1877 2002-03-29 Jakub Jelinek <jakub@redhat.com>
1878
1879 PR c++/6073
1880 * class.c (finish_struct_1): Update static field's DECL_MODE even
1881 if its type is a variant of t.
1882
1883 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1884
1885 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
1886 * cp-tree.h (cxx_insert_default_attributes): New.
1887 * decl.c (insert_default_attributes): Rename.
1888
1889 2002-03-27 Mark Mitchell <mark@codesourcery.com>
1890
1891 PR c++/4884
1892 * call.c (build_op_delete_call): Allow for the fact the placement
1893 may be a COMPOUND_EXPR.
1894
1895 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1896
1897 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1898 * cp-tree.h (init_cplus_expand): Remove.
1899 (cxx_expand_expr): New.
1900 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
1901 fix prototype.
1902 (init_cplus_expand): Remove.
1903 * lex.c (cxx_init): Don't call init_cplus_expand.
1904
1905 2002-03-26 Mark Mitchell <mark@codesourcery.com>
1906
1907 PR c++/4884.
1908 * init.c (build_new_1): Allow for the fact the result of
1909 build_function_call may be a COMPOUND_EXPR.
1910
1911 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
1912
1913 PR c++/5682
1914 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
1915 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1916 (dfs_skip_nonprimary_vbases_markedp): Remove.
1917 * search.c (get_shared_vbase_if_not_primary): Remove.
1918 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1919 (dfs_skip_nonprimary_vbases_markedp): Remove.
1920 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
1921 (dfs_marked_real_bases_queue_p): Likewise.
1922
1923 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
1924
1925 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1926 * cp-tree.h (cxx_mark_tree): New.
1927 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
1928
1929 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
1930
1931 * cp-tree.h (cxx_maybe_build_cleanup): New.
1932 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
1933 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
1934 * tree.c (build_target_expr): Update.
1935 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
1936
1937 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
1938
1939 * decl2.c (cxx_decode_option): Handle -E.
1940 * lang-specs.h (default_compilers): Preprocess with cc1plus.
1941 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
1942
1943 2002-03-23 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c++/6037
1946 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
1947
1948 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1949
1950 * error.c (dump_type): Be careful about implicit typenames.
1951
1952 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1953
1954 PR C++/3656
1955 * semantics.c (finish_base_specifier): Handle erronous base
1956 classes.
1957
1958 2002-03-22 Zack Weinberg <zack@codesourcery.com>
1959
1960 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
1961 REAL_IS_NOT_DOUBLE.
1962
1963 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
1964
1965 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
1966 an index into the vtable_entry array regardless of
1967 TARGET_PTRMEMFUNC_VBIT_LOCATION.
1968
1969 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
1970
1971 * tree.c (cp_cannot_inline_tree_fn): Same.
1972
1973 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
1974
1975 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1976 insert_block, getdecls, global_bindings_p): New.
1977
1978 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
1979
1980 PR c++/4361
1981 * mangle.c (struct globals) Add internal_mangling_p member.
1982 (write_template_param): Do internal mangling, if needed.
1983 (mangle_conv_op_name_for_type): Request internal mangling.
1984
1985 2002-03-20 Jason Merrill <jason@redhat.com>
1986
1987 PR c++/2136
1988 * init.c (build_delete): Check access for a member op delete here.
1989 * decl2.c (delete_sanity): Not here.
1990
1991 2002-03-19 Jason Merrill <jason@redhat.com>
1992
1993 PR c++/5118
1994 * class.c (get_vfield_name): Use the constructor_name.
1995
1996 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
1997
1998 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1999 * cp-tree.h (lang_printable_name): Rename.
2000 * error.c (lang_decl_name): Use new hook.
2001 * lex.c (cxx_init): Remove old hook.
2002 * pt.c (tsubst_decl): Use new hook.
2003 * tree.c (lang_printable_name): Rename.
2004
2005 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
2006
2007 PR c++/3882
2008 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
2009 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
2010 only after recording the declaration.
2011
2012 2002-03-18 Jason Merrill <jason@redhat.com>
2013
2014 PR c++/2039
2015 * init.c (resolve_offset_ref): Hand off to build_component_ref.
2016
2017 PR c++/4222, c++/5995
2018 * call.c (build_over_call): Fix empty class logic.
2019
2020 PR c++/3870
2021 * cp-tree.h (struct saved_scope): Add last_parms field.
2022 * decl.c (maybe_push_to_top_level): Save last_function_parms.
2023 (pop_from_top_level): Restore it.
2024
2025 PR c++/4377
2026 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
2027 NON_LVALUE_EXPRs.
2028
2029 PR c++/4003
2030 * pt.c (tsubst_friend_function): Use decl_namespace_context.
2031
2032 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
2033 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
2034 type with a nontrivial destructor.
2035
2036 2002-03-17 Jason Merrill <jason@redhat.com>
2037
2038 PR c++/4460
2039 * class.c (build_base_path): Virtual base layout is fixed in
2040 in-charge [cd]tors.
2041
2042 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
2043
2044 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2045 * parse.y (yyparse): Remove macro.
2046
2047 2002-03-17 Jason Merrill <jason@redhat.com>
2048
2049 PR c++/5757
2050 * init.c (build_new_1): Pass the right pointer to op delete.
2051
2052 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
2053
2054 PR c++/4361
2055 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
2056 conversion operators go.
2057 (struct lang_decl_flags): Add template_conv_p and unused
2058 bitfields.
2059 (DECL_TEMPLATE_CONV_FN_P): New macro.
2060 * call.c (build_user_type_conversion_1): Don't check second type
2061 conversion of overload set first.
2062 * class.c (add_method): Make sure templated conversion operators
2063 all end up on slot 2.
2064 * lex.c (do_identifier): A conversion operator token might be
2065 satisfied by a templated conversion operator.
2066 * pt.c (check_explicit_specialization): Use
2067 CLASSTYPE_FIRST_CONVERSION_SLOT.
2068 (template_parm_this_level_p): New function.
2069 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
2070 * search.c (lookup_fnfields_1): Template conversions will be on
2071 the first slot.
2072 * typeck.c (build_component_ref): Preserve the type of an
2073 conversion operator name on the overload type.
2074 (build_x_function_call): Retrieve the conversion operator name.
2075
2076 2002-03-15 Richard Henderson <rth@redhat.com>
2077
2078 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2079
2080 2002-03-15 Mark Mitchell <mark@codesourcery.com>
2081
2082 * cp-tree.h (CLEANUP_DECL): Remove.
2083 (CLEANUP_EXPR): Likewise.
2084 * decl.c (destroy_local_var): Simplify.
2085 (maybe_build_cleanup): Tidy.
2086 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
2087 * semantics.c (cp_expand_stmt): Likewise.
2088 * cp/tree.c (cp_statement_code_p): Likewise.
2089
2090 2002-03-15 Jason Merrill <jason@redhat.com>
2091
2092 PR c++/5857
2093 * decl.c (duplicate_decls): Use merge_types instead of common_type.
2094 * typeck.c (common_type): Just hand off to
2095 type_after_usual_arithmetic_conversions and
2096 composite_pointer_type.
2097 (merge_types): New fn.
2098 (commonparms): Use it instead of common_type.
2099 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
2100 (composite_pointer_type): Also handle attributes.
2101 * cp-tree.h: Declare merge_types.
2102
2103 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
2104 variables.
2105 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
2106
2107 2002-03-14 Richard Henderson <rth@redhat.com>
2108
2109 * decl.c: Include c-pragma.h.
2110 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
2111 * Make-lang.in: Update dependencies.
2112
2113 2002-03-14 Jakub Jelinek <jakub@redhat.com>
2114
2115 PR c++/5908
2116 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2117 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2118
2119 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2120
2121 * mangle.c (write_builtin_type): Handle 128-bit integers even if
2122 they are not a standard integer type.
2123
2124 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2125
2126 * cp-tree.h (init_init_processing): Remove declaration.
2127 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2128 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2129
2130 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2131
2132 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2133 Define.
2134 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2135 tree_code_length.
2136 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2137 cplus_tree_code_name): Delete.
2138 (cxx_init): Don't call add_c_tree_codes, instead set
2139 lang_unsafe_for_reeval. Don't try to copy into the various
2140 tree_code arrays.
2141
2142 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
2143
2144 PR c++/5659
2145 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2146 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2147 definitions.
2148
2149 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2150
2151 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
2152 DR209 is now not a defect.
2153 * cp-tree.h (skip_type_access_control): Remove.
2154 * decl.c (grokdeclarator): Do type access control for friend
2155 declarations.
2156 * semantics.c (decl_type_access_control): Don't reset
2157 current_type_lookups.
2158 (save_type_access_control): Always save the lookups.
2159 (skip_type_access_control): Remove.
2160 (finish_class_definition): Don't change type_lookups.
2161
2162 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2163
2164 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
2165 It is incorrect.
2166 * typeck.c (build_static_cast): Compare non-qualified types
2167 with pointer to member conversions.
2168
2169 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
2170 Daniel Berlin <dan@dberlin.org>
2171
2172 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2173 (cxx_get_alias_set): Use it.
2174
2175 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2176
2177 * cp-tree.h (stabilize_expr): Prototype.
2178
2179 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
2180
2181 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2182 conditional return void.
2183
2184 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
2185
2186 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2187 * cp-tree.h (cxx_unsave): New.
2188 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2189 (init_tree): Update.
2190
2191 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2192
2193 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2194 explicit sizeof/sizeof.
2195 * decl2.c (cxx_decode_option): Likewise.
2196 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2197
2198 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
2199
2200 PR c++/775
2201 * decl.c (lookup_tag): Only reject enum/class mismatch, not
2202 class/union mismatch.
2203 * parse.y (check_class_key): New function.
2204 (structsp): Call it.
2205
2206 2002-03-01 Michael Matz <matz@suse.de>
2207
2208 * typeck.c (cp_pointer_int_sum): Complete inner type which is
2209 used later by size_in_bytes().
2210
2211 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
2212
2213 * cp-tree.h: Require __GNUC__ to be #defined.
2214 (build_init): Add missing prototype.
2215
2216 2002-03-01 Jason Merrill <jason@redhat.com>
2217
2218 * except.c: Don't include decl.h or obstack.h. Do include
2219 tree-inline.h.
2220 (build_throw): Destroy temporaries from the thrown
2221 expression before calling __cxa_throw. Construct a thrown
2222 temporary directly into the exception object.
2223 (stabilize_throw_expr): New function.
2224 (wrap_cleanups_r): New function.
2225 * tree.c (stabilize_expr): New function.
2226 * init.c (build_init): New function.
2227 * Make-lang.in (cp/except.o): Adjust .h deps.
2228
2229 2002-02-28 Jason Merrill <jason@redhat.com>
2230
2231 * search.c (lookup_base_r): Don't clear is_non_public just because
2232 we found a friendly scope.
2233
2234 * decl.c (finish_function): Only warn about missing return
2235 statement with -Wreturn-type.
2236
2237 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
2238
2239 * class.c (build_clone): Update.
2240 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2241 * cp-tree.h (cxx_dup_lang_specific_decl): New.
2242 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
2243 (copy_decl): Update.
2244 * method.c (make_thunk): Update.
2245
2246 2002-02-27 Zack Weinberg <zack@codesourcery.com>
2247
2248 * decl2.c: Delete traditional-mode-related code copied from
2249 the C front end but not used, or used only to permit the
2250 compiler to link.
2251
2252 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
2253
2254 PR c++/4093
2255 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
2256 to void.
2257
2258 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2259
2260 PR other/5746
2261 * semantics.c (finish_switch_cond): Don't call get_unwidened
2262 if error_mark_node.
2263
2264 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
2265
2266 PR c++/2645, DR 295
2267 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
2268 tf_keep_type_decl.
2269 (make_typename_type): Use tsubst_flags_t.
2270 * decl.c (make_typename_type): Adjust. Return non-artificial
2271 TYPE_DECLs, if required.
2272 (grokdeclarator): Simplify CVR qualification handling. Allow bad
2273 qualifiers on typedef types.
2274 * decl2.c (handle_class_head): Adjust make_typename_type call.
2275 * parse.y (nested_name_specifier): Likewise.
2276 (typename_sub0): Likewise.
2277 (typename_sub1): Likewise.
2278 * pt.c (convert_template_argument): Adjust make_typename_type
2279 return value.
2280 (tsubst): Adjust cp_build_qualified_type_real calls.
2281 (check_cv_quals_for_unify): Cope with alowing bad qualifications
2282 on template type parms.
2283 (instantiate_decl): Recheck substitutions to give warnings on bad
2284 qualifications.
2285 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
2286
2287 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
2288
2289 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
2290
2291 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
2292 unless DECL_ALWAYS_INLINE.
2293
2294 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2295
2296 * typeck.c (cp_pointer_int_sum): Renamed from
2297 pointer_int_sum, call pointer_int_sum.
2298
2299 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2300
2301 * decl.c (duplicate_decls): Return 0 if issued error about
2302 redeclaration.
2303
2304 2002-02-19 Jason Merrill <jason@redhat.com>
2305
2306 ABI change: Mangle `void (A::*)() const' as
2307 M1AKFvvE, not MK1AFvvE.
2308 * mangle.c (write_function_type): Write cv-quals for member
2309 function type here.
2310 (write_pointer_to_member_type): Not here.
2311
2312 2002-02-18 Jason Merrill <jason@redhat.com>
2313
2314 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
2315 (do_decl_instantiation): Likewise.
2316
2317 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
2318
2319 PR c++/5685
2320 * decl.c (duplicate_decls): Make warning unconditional
2321 if duplicate default argument declarations are present.
2322
2323 2002-02-17 Jakub Jelinek <jakub@redhat.com>
2324
2325 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
2326 shortening.
2327
2328 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
2329
2330 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
2331 remove incorrect comment. Move #if 0'd code to common path. Use
2332 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
2333
2334 2002-02-13 Jason Merrill <jason@redhat.com>
2335
2336 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
2337 (finish_function): Don't warn if current_function_returns_null.
2338
2339 * typeck2.c (digest_init): Do handle values of vector type.
2340
2341 * typeck2.c (digest_init, process_init_constructor): Treat vectors
2342 like arrays.
2343
2344 2002-02-11 Jason Merrill <jason@redhat.com>
2345
2346 * parse.y (reserved_declspecs): Don't handle attributes.
2347 (reserved_typespecquals): Handle them here.
2348 * Make-lang.in (parse.c): Adjust expected conflicts.
2349
2350 2002-02-08 Jakub Jelinek <jakub@redhat.com>
2351
2352 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
2353 instead of compstmt.
2354 (compstmt_or_stmtexpr): Renamed from compstmt.
2355 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
2356
2357 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2358
2359 Rename instantiate_type_flags to tsubst_flags_t & expand use.
2360 * cp-tree.h (instantiate_type_flags): Rename to ...
2361 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
2362 add tf_warning flag.
2363 (instantiate_type): Adjust prototype.
2364 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
2365 do_type_instantiation, cp_build_qualified_type_real): Likewise.
2366 cp_build_qualified_type: Adjust.
2367 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
2368 tf_*.
2369 * call.c (standard_conversion): Rename itf_* to tf_*.
2370 (reference_binding): Likewise.
2371 (convert_like_real): Likewise.
2372 * cvt.c (cp_convert_to_pointer): Likewise.
2373 (convert_to_reference): Likewise.
2374 * decl.c (lookup_namespace_name): Use tf_* flags.
2375 (make_typename_type): Likewise.
2376 (grokdeclarator): Likewise.
2377 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
2378 (coerce_template_template_parms, convert_template_argument,
2379 coerce_template_parms, maybe_get_template_decl_from_type_decl,
2380 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
2381 instantiate_class_template, tsubst_template_arg_vector,
2382 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
2383 tsubst_decl, tsubst_arg_types, tsubst_function_type,
2384 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
2385 instantiate_template, fn_type_unification,
2386 resolve_overloaded_unification, verify_class_unification,
2387 unify, get_bindings_real, do_type_instantiation,
2388 regenerate_decl_from_template, instantiate_decl,
2389 tsubst_initializer_list, tsubst_enum,
2390 get_mostly_instantiated_function_type,
2391 invalid_nontype_parm_type_p): Likewise.
2392 * tree.c (cp_build_qualified_type_real): Likewise.
2393 * typeck.c (build_binary_op): Rename itf_* to tf_*.
2394 (build_ptrmemfunc): Likewise.
2395 (convert_for_assignment): Likewise.
2396
2397 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2398
2399 PR c++/109
2400 * decl.c (grokdeclarator): Allow friend declarations from
2401 dependent types.
2402 * decl2.c (handle_class_head): Don't push into template parm contexts.
2403 * pt.c (push_template_decl_real): Template parm contexts are never
2404 being defined.
2405
2406 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
2407
2408 * class.c: Include target.h.
2409 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
2410 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
2411 bit-field layout.
2412 * Make-lang.in: Adjust deps.
2413
2414 2002-02-05 Jason Merrill <jason@redhat.com>
2415
2416 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
2417
2418 2002-02-04 Jakub Jelinek <jakub@redhat.com>
2419
2420 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
2421 (finish_switch_cond): Set SWITCH_TYPE.
2422
2423 2002-02-04 Richard Henderson <rth@redhat.com>
2424
2425 * method.c (use_thunk): Always initialize the block tree. Reindent.
2426 * semantics.c (expand_body): Emit thunks after function, not before.
2427
2428 2002-02-04 Jason Merrill <jason@redhat.com>
2429
2430 * decl.c (start_function): Call cplus_decl_attributes immediately
2431 after grokdeclarator.
2432
2433 * decl.c (start_function): Combine DECL_RESULT handling code.
2434
2435 2002-02-03 Jason Merrill <jason@redhat.com>
2436
2437 * xref.c: Remove.
2438 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
2439 (cp/xref.o): Remove dependencies.
2440 * class.c (finish_struct_1, check_methods): Don't call xref fns.
2441 (finish_struct_1): Likewise.
2442 * friend.c (make_friend_class): Likewise.
2443 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
2444 * spew.c (read_process_identifier): Likewise.
2445
2446 2002-02-01 Jason Merrill <jason@redhat.com>
2447
2448 PR c++/4872
2449 * decl.c (finish_function): Warn about a non-void function with
2450 no return statement and no abnormal exit.
2451 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
2452 (current_function_returns_abnormally): New macro.
2453 * call.c (build_call): Set it.
2454
2455 * typeck.c (build_component_ref): Always complain about offsetof
2456 constructs on non-PODs. Only make it an error for members of
2457 virtual bases.
2458
2459 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
2460 (dump_function_decl): Always dump parms.
2461
2462 * decl2.c (finish_static_data_member_decl): Complain about a local
2463 class with a static data member.
2464
2465 PR c++/4286
2466 * search.c (lookup_field_1): Don't xref a static data member
2467 just because we looked it up.
2468
2469 2002-01-31 Jason Merrill <jason@redhat.com>
2470
2471 * Make-lang.in (parse.c): Handle .output file.
2472
2473 PR c++/3395
2474 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
2475 not TREE_TYPE.
2476 * semantics.c (finish_class_definition): Adjust.
2477
2478 Allow attributes in parms and casts.
2479 * parse.y (named_parm): Don't strip attrs.
2480 (declmods): Remove 'attributes' production.
2481 (nonempty_cv_qualifiers): Accept attributes.
2482 (ATTRIBUTE): Give precedence.
2483 * decl.c (groktypename): Handle attributes.
2484 (grokparms): Likewise.
2485
2486 2002-01-29 Jakub Jelinek <jakub@redhat.com>
2487
2488 * decl2.c (cxx_decode_option): Pass 0 as last argument to
2489 cpp_handle_option.
2490 * lang-specs.h: Use cpp_unique_options instead of cpp_options
2491 when used together with cc1_options.
2492
2493 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
2494
2495 PR c++/5132
2496 * typeck2.c (digest_init): Make sure non-array core type is
2497 instantiated.
2498 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
2499 constructor, rather than build a new one.
2500 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
2501 PURPOSE of constructor elts.
2502
2503 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2504
2505 * Make-lang.in (parse.c): Adjust expected number of
2506 shift-reduce conflicts.
2507 (decl.o): Depend on diagnostic.h.
2508 * decl.c: Include diagnostic.h.
2509 (grokdeclarator): Check for null pointer.
2510 (finish_function): Don't abort when
2511 current_binding_level->parm_flag != 1, if errors have
2512 occurred; throw away the statement tree and extra binding
2513 levels, and continue.
2514 * lex.c (note_list_got_semicolon): Check for null pointer.
2515 * method.c (hack_identifier): Just return error_mark_node if
2516 value is error_mark_node.
2517 * parse.y (primary: TYPEID(type_id)): No need to use
2518 TYPE_MAIN_VARIANT here.
2519 (handler_seq): Accept an empty list of catch clauses and
2520 generate a fake handler block to avoid later crashes.
2521 (ansi_raise_identifier): Accept the error token too.
2522 * semantics.c (begin_class_definition,
2523 finish_class_definition): Check for error_mark_node.
2524
2525 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2526
2527 * typeck2.c (friendly_abort): Delete definition.
2528 * cp-tree.h (friendly_abort): Don't prototype.
2529 (my_friendly_assert): Use fancy_abort.
2530
2531 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2532
2533 * cp-tree.h (my_friendly_abort): Remove.
2534
2535 2002-01-23 Jakub Jelinek <jakub@redhat.com>
2536
2537 * spew.c (pending_inlines, pending_inlines_tail,
2538 processing_these_inlines): Make static.
2539 (mark_pending_inlines): Remove static.
2540 (begin_parsing_inclass_inline): If in function, save pi
2541 for GC to cp_function_chain->unparsed_inlines instead.
2542 (process_next_inline): Likewise.
2543 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
2544 (mark_pending_inlines): Add prototype.
2545 * decl.c (spew_debug): Remove unused extern.
2546 (mark_lang_function): Call mark_pending_inlines.
2547
2548 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2549
2550 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
2551 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
2552 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
2553 Change my_fancy_abort() to abort().
2554
2555 2002-01-23 Jason Merrill <jason@redhat.com>
2556
2557 PR c++/5453
2558 * class.c (fixed_type_or_null): Fix thinko.
2559
2560 PR c++/3331
2561 * init.c (resolve_offset_ref): Use build_indirect_ref.
2562
2563 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
2564
2565 2002-01-22 Jason Merrill <jason@redhat.com>
2566
2567 * parse.y (function_body): Suppress the block for the outermost
2568 curly braces.
2569 * decl.c (pushdecl): Don't try to skip it.
2570 (begin_function_body): Keep the block we create, not the next one.
2571 * init.c (emit_base_init): Don't mess with keep_next_level.
2572
2573 * class.c (build_base_path): Tweak formatting.
2574
2575 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
2576
2577 Fix regression introduced with patch for c++/775
2578 * parse.y (class_head_defn): Check for template specializations
2579 with a different class-key.
2580
2581 2002-01-17 Jason Merrill <jason@redhat.com>
2582
2583 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
2584 (begin_function_body): Call them and keep_next_level.
2585 * init.c (emit_base_init): Call keep_next_level.
2586 * semantics.c (setup_vtbl_ptr): Lose.
2587 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
2588 (vtbls_set_up_p): Lose.
2589 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
2590 * method.c (do_build_copy_constructor): Likewise.
2591 (synthesize_method): Call finish_mem_initializers.
2592 * parse.y (nodecls): Likewise.
2593
2594 * error.c (dump_type_suffix): Print the exception specs before
2595 recursing.
2596 (dump_function_decl): Here, too.
2597
2598 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2599
2600 2002-01-10 Ira Ruben <ira@apple.com>
2601
2602 PR c++/907
2603 * decl.c (start_method): Handle attrlist.
2604
2605 2002-01-10 Jakub Jelinek <jakub@redhat.com>
2606
2607 * decl2.c (max_tinst_depth): Increase default limit to 500.
2608
2609 2002-01-10 Graham Stott <grahams@redhat.com>
2610
2611 * spew.c (YYCHAR): Uppercase macro parameter and add
2612 parenthesis.
2613 (YYCODE): Likewise.
2614 (NAME): Uppercase macro parameter.
2615
2616 2002-01-09 Graham Stott <grahams@redhat.com>
2617
2618 * decl.h (grokdeclarator): Wrap long line.
2619
2620 * semantics.c (FINISH_COND): Uppercase macro paramaters and
2621 add parenthesis.
2622
2623 2002-01-08 Graham Stott <grahams@redhat.com>
2624
2625 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
2626 (PALLOC): Uppercase macro parameter and whitespace.
2627 (SALLOC): Uppercase macro parameter.
2628 (SFREE): Uppercase macros parameter, add parenthese and
2629 whitespace.
2630 (STREQL): Uppercase macro parameter and whitespace.
2631 (STRNEQ): Likewise.
2632 (STRLSS): Likewise.
2633 (STRLEQ): Likewise.
2634 (STRGTR): Likewise.
2635 (STRGEQ): Likewise.
2636
2637 * call.c (convert_like): Add parenthesis and wrap.
2638 (convert_like_with_context): Likewise.
2639 (ICS_RANK): Whitespace.
2640 (NEED_TEMPORARY_P): Remove parenthesis.
2641
2642 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
2643 whitespace.
2644 (VTT_MARKED_BINFO_P): Likewise.
2645
2646 * decl.c (BINDING_LEVEL): Add parenthesis.
2647 (DEF_OPERATOR): Likewise.
2648
2649 * mangle.c (MANGLE_TRACE): Add parenthesis.
2650 (MANGLE_TRACE_TREE): Likewise.
2651 (write_signed_number): Likewise.
2652 (write_unsigned_number): Likewise.
2653
2654 * pt.c (ccat): Uppercase macro parameter.
2655 (cat): Likewise
2656
2657 * search.c (SET_BINFO_ACCESS): Add parenthesis.
2658
2659 2002-01-07 Jason Merrill <jason@redhat.com>
2660
2661 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
2662 to pedwarn.
2663
2664 PR c++/3536
2665 * method.c (make_thunk): If !flag_weak, give the thunk the
2666 function's linkage.
2667 (use_thunk): Here, too.
2668
2669 2002-01-07 Graham Stott <grahams@redhat.com>
2670
2671 * error.c: Update copyright date.
2672 (print_scope_operator): Add parenthesis.
2673 (print_left_paren): Likewise.
2674 (print_right_paren): Likewise.
2675 (print_left_bracket): Likewise.
2676 (print_right_bracket): Likewise.
2677 (print_template_argument_list_start): Likewise.
2678 (print_template_argument_list_end): Likewise.
2679 (print_non_consecutive_character): Likewise.
2680 (print_tree_identifier): Likewise.
2681 (print_identifier): Likewise.
2682 (NEXT_CODE): Uppercase macro parameter.
2683 (ident_fndecl): Delete unused.
2684 (GLOBAL_THING): Likewise.
2685
2686 2002-01-06 Graham Stott <grahams@redhat.com>
2687
2688 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
2689 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
2690 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
2691 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
2692 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
2693 (C_IS_RESERVED_WORD): Uppercase macro parameter.
2694 (C_RID_YYCODE) Likewise.
2695 (ptrmem_cst): Use rtx.
2696 (LOCAL_BINDING_P): Add whitespace.
2697 (INHERITED_VALUE_BINDING_P): Likewise.
2698 (BINDING_SCOPE): Wrap long line.
2699 (BINDING_HAS_LEVEL_P): Remove parenthesis.
2700 (BINDING_VALUE): Wrap long line.
2701 (BINDING_TYPE): Whitespace.
2702 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
2703 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
2704 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
2705 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
2706 (same_type_p): Uppercase macro parameters.
2707 (same_type_ignoring_top_level_qualifiers_p): Likewise.
2708 (OVL_FUNCTION): Wrap long line.
2709 (OVL_CHAIN): Whitespace.
2710 (OVL_CURRENT): Add parenthesis and whitespace.
2711 (OVL_NEXT): Whitespace.
2712 (OVL_USED): Likewise.
2713 (IDENTIFIER_TYPE_VALUE): Likewise.
2714 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
2715 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
2716 (LANG_ID_FIELD): Whitespace.
2717 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
2718 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
2719 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
2720 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
2721 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
2722 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
2723 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
2724 (IDENTIFIER_VIRTUAL_P): Likewise.
2725 (IDENTIFIER_OPNAME_P): Likewise.
2726 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
2727 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
2728 (C_SET_EXP_ORIGINAL_CODE): Likewise.
2729 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
2730 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2731 (IS_AGGR_TYPE): Uppercase macro parameter.
2732 (CLASS_TYPE_P): Likewise.
2733 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
2734 (IS_AGGR_TYPE_2): Whitespace.
2735 (TAGGED_TYPE_P): Uppercase macro parameter.
2736 (TYPE_BUILT_IN): Whitespace.
2737 (TYPE_FOR_JAVA): Likewise.
2738 (FUNCTION_ARG_CHAIN): Remove parenthesis.
2739 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
2740 (FUNCTION_FIRST_USER_PARAM): Likewise.
2741 (PROMOTES_TO_AGGR_TYPE): Whitespace.
2742 (DERIVED_FROM_P): Add parenthesis and wrap.
2743 (UNIQUELY_DERIVED_FROM_P): Likewise.
2744 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
2745 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2746 (CLASSTYPE_USE_TEMPLATE): Whitespace.
2747 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
2748 (TYPE_GETS_DELETE): Add parenthesis.
2749 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
2750 (TYPE_HAS_ASSIGN_REF): Likewise,
2751 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
2752 (TYPE_HAS_INIT_REF): Likewise.
2753 (TYPE_HAS_CONST_INIT_REF): Likewise.
2754 (TYPE_BEING_DEFINED): Likewise.
2755 (TYPE_LANG_SPECIFIC): Likewise.
2756 (CLASSTYPE_RTTI): Likewise.
2757 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
2758 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2759 (TYPE_OVERLOADS_ARROW): Likewise.
2760 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
2761 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
2762 (CLASSTYPE_METHOD_VEC): Likewise.
2763 (CLASSTYPE_MARKED_N): Likewise.
2764 (CLASSTYPE_MARKED): Likewise.
2765 (CLASSTYPE_MARKED2): Likewise.
2766 (CLASSTYPE_MARKED3): Likewise.
2767 (CLASSTYPE_MARKED4): Likewise.
2768 (CLASSTYPE_MARKED5): Likewise.
2769 (CLASSTYPE_MARKED6): Likewise.
2770 (SET_CLASSTYPE_MARKED): Whitespace.
2771 (CLEAR_CLASSTYPE_MARKED): Likewise.
2772 (SET_CLASSTYPE_MARKED2): Likewise.
2773 (CLEAR_CLASSTYPE_MARKED2): Likewise.
2774 (SET_CLASSTYPE_MARKED3): Likewise.
2775 (CLEAR_CLASSTYPE_MARKED3): Likewise.
2776 (SET_CLASSTYPE_MARKED4): Likewise.
2777 (CLEAR_CLASSTYPE_MARKED4): Likewise.
2778 (SET_CLASSTYPE_MARKED5): Likewise.
2779 (CLEAR_CLASSTYPE_MARKED5): Likewise.
2780 (SET_CLASSTYPE_MARKED6): Likewise.
2781 (CLEAR_CLASSTYPE_MARKED6): Likewise.
2782 (CLASSTYPE_TAGS): Likewise.
2783 (CLASSTYPE_VSIZE): Likewise.
2784 (CLASSTYPE_VBASECLASSES): Likewise.
2785 (CANONICAL_BINFO): Add parenthesis.
2786 (CLASSTYPE_SIZE(NODE): Likewise.
2787 (CLASSTYPE_SIZE_UNIT): Likewise.
2788 (CLASSTYPE_ALIGN(NODE): Likewise.
2789 (CLASSTYPE_USER_ALIGN): Likewise.
2790 (TYPE_JAVA_INTERFACE): Likewise.
2791 (CLASSTYPE_PURE_VIRTUALS): Likewise.
2792 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
2793 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2794 (CLASSTYPE_HAS_MUTABLE): Likewise.
2795 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
2796 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
2797 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
2798 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
2799 (CLASSTYPE_INTERFACE_ONLY): Likewise.
2800 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2801 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2802 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2803 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2804 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2805 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
2806 (BINFO_UNSHARED_MARKED): Whitespace.
2807 (BINFO_MARKED): Whitespace and wrap.
2808 (SET_BINFO_MARKED): Likewise.
2809 (CLEAR_BINFO_MARKED): Likewise.
2810 (BINFO_VTABLE_PATH_MARKED): Likewise.
2811 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
2812 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
2813 (BINFO_SUBVTT_INDEX): Remove parenthesis.
2814 (BINFO_VPTR_INDEX): Likewise.
2815 (BINFO_PRIMARY_BASE_OF): Likewise,
2816 (CLASSTYPE_VFIELDS): Whitespace.
2817 (VF_DERIVED_VALUE): Wrap long line.
2818 (NAMESPACE_LEVEL): Whitespace.
2819 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
2820 (DEFARG_POINTER): Whitespace.
2821 (DECL_NEEDED_P): Remove parenthesis.
2822 (DECL_LANGUAGE): Whitespace.
2823 (SET_DECL_LANGUAGE): Add parenthesis.
2824 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
2825 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
2826 (DECL_IN_AGGR_P): Whitespace.
2827 (DECL_FRIEND_P): Likewise.
2828 (DECL_BEFRIENDING_CLASSES): Likewise.
2829 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
2830 (DECL_NONCONVERTING_P): Whitespace.
2831 (DECL_PURE_VIRTUAL_P): Likewise.
2832 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
2833 (DECL_PENDING_INLINE_INFO): Whitespace.
2834 (DECL_SORTED_FIELDS): Likewise.
2835 (DECL_DEFERRED_FN): Likewise.
2836 (DECL_TEMPLATE_INFO): Likewise.
2837 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
2838 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
2839 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
2840 (TMPL_ARGS_LEVEL): Likewise.
2841 (SET_TMPL_ARGS_LEVEL): Likewise.
2842 (INNERMOST_TEMPLATE_PARMS): Whitespace.
2843 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
2844 (INTEGRAL_CODE_P(CODE): Add parenthesis.
2845 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
2846 (TYPE_HAS_CONSTRUCTOR): Whitespace.
2847 (TREE_HAS_CONSTRUCTOR): Likewise.
2848 (TYPE_HAS_DESTRUCTOR): Likewise.
2849 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
2850 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
2851 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2852 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
2853 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2854 (TYPE_PTRMEMFUNC_P): Likewise.
2855 (TYPE_PTRMEMFUNC_FLAG): Likewise.
2856 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
2857 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2858 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
2859 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2860 (DECL_ACCESS): Whitespace.
2861 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
2862 (DECL_GLOBAL_DTOR_P): Likewise.
2863 (GLOBAL_INIT_PRIORITY): Likewise.
2864 (DECL_TEMPLATE_PARMS): Likewise.
2865 (DECL_TEMPLATE_RESULT): Likewise.
2866 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
2867 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
2868 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
2869 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2870 (PRIMARY_TEMPLATE_P): Add parenthesis.
2871 (DECL_USE_TEMPLATE): Whitespace.
2872 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2873 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2874 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2875 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2876 (CALL_DECLARATOR_PARMS): Remove parenthesis.
2877 (CALL_DECLARATOR_QUALS): Likewise.
2878 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2879 (TEMP_NAME_P): Wrap.
2880 (VFIELD_NAME_P): Likewise.
2881 (B_SET): Uppercase macro parameters and add parenthesis.
2882 (B_CLR): Likewise.
2883 (B_TST): Likewise.
2884 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
2885 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
2886 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
2887 (same_or_base_type_p): Likewise.
2888 (cp_deprecated): Likewise.
2889
2890 2002-01-05 Richard Henderson <rth@redhat.com>
2891
2892 * semantics.c (expand_body): Revert last change.
2893
2894 2002-01-04 Jason Merrill <jason@redhat.com>
2895
2896 PR c++/4122
2897 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
2898 lost primary.
2899
2900 * class.c (build_vtbl_initializer): Check for a lost primary
2901 before calculating the vtable entry to throw away.
2902
2903 2002-01-02 Jason Merrill <jason@redhat.com>
2904
2905 * semantics.c (expand_body): Call outlining_inline_function when
2906 emitting an inline function out of line.
2907
2908 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2909
2910 PR c++/5116, c++/764 reversion
2911 * call.c (build_new_op): Revert the instantiations. They are
2912 incorrect.
2913
2914 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2915
2916 PR c++/5089
2917 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2918
2919 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2920
2921 PR c++/3716
2922 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
2923 (tsubst, case POINTER_TYPE): Handle pmfs here.
2924 (tsubst, case OFFSET_TYPE): Check it is not an offset to
2925 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
2926
2927 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2928
2929 PR c++/35
2930 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
2931 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
2932 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
2933 PARM_DECL.
2934 (tsubst_template_parms): Break up loop statements.
2935 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
2936 parm PARM_DECLs don't get promoted.
2937
2938 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2939
2940 PR c++/5123
2941 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
2942 (build_x_function_call): Cope with a COMPONENT_REF containing a
2943 TEMPLATE_ID_EXPR.
2944
2945 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2946
2947 PR c++/5213
2948 * pt.c (convert_template_argument): Be more careful determining
2949 when RECORD_TYPE templates are or are not templates.
2950
2951 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2952
2953 PR c++/775
2954 * cp-tree.h (handle_class_head): Adjust prototype.
2955 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
2956 parameters. Use for all class heads.
2957 * parse.y (named_class_head_sans_basetype, named_class_head,
2958 named_complex_class_head_sans_basetype,
2959 named_class_head_sans_basetype_defn,
2960 unnamed_class_head): Remove.
2961 (class_head, class_head_apparent_template): Recognize class heads
2962 (class_head_decl, class_head_defn): New reductions. Process class
2963 heads.
2964 (structsp): Adjust class definition and class declaration
2965 reductions.
2966 (maybe_base_class_list): Give diagnostic on empty list.
2967
2968 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2969
2970 PR c++/4379
2971 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
2972 single non-static member.
2973 (unary_complex_lvalue): If it cannot be a pointer to member, don't
2974 make it so. Check it is not pointer to reference.
2975
2976 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2977
2978 PR c++/5132
2979 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
2980 are processing a template decl.
2981
2982 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2983
2984 PR c++/5116, c++/764
2985 * call.c (build_new_op): Make sure template class operands are
2986 instantiated. Simplify arglist construction.
2987
2988 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2989
2990 * call.c (build_user_type_conversion_1): Use my_friendly_assert
2991 rather than if ... abort.
2992 * cvt.c (convert_to_reference): Likewise.
2993 * semantics.c (setup_vtbl_ptr): Likewise.
2994 * pt.c (lookup_template_class): Comment typo.
2995
2996 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2997
2998 PR c++/5125
2999 * pt.c (push_template_decl_real): Make sure DECL has
3000 DECL_LANG_SPECIFIC.
3001
3002 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3003
3004 PR c++/335
3005 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
3006 for non-reference fields.
3007 * typeck.c (require_complete_type): Use resolve_offset_ref).
3008
3009 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
3010
3011 PR c++/196
3012 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
3013
3014 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
3015
3016 PR c++/160
3017 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
3018 up. Don't stabilize_references when initializing a reference.
3019
3020 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3021
3022 * decl2.c (lang_f_options): Const-ify.
3023
3024 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
3025
3026 * config-lang.in (diff_excludes): Remove.
3027
3028 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
3029
3030 PR c++/90
3031 * typeck.c (build_function_call_real): Use original function
3032 expression for errors.
3033
3034 2001-12-18 Jason Merrill <jason@redhat.com>
3035
3036 PR c++/3242
3037 * class.c (add_method): Do compare 'this' quals when trying to match a
3038 used function. Don't defer to another used function.
3039
3040 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3041
3042 * pt.c (instantiate_clone): Remove, fold into ...
3043 (instantiate_template): ... here. Simplify by removing mutual
3044 recursion.
3045 * typeck2.c (build_m_component_ref): Don't cv qualify the function
3046 pointed to by a pointer to function.
3047 * class.c (delete_duplicate_fields_1): Typo.
3048
3049 2001-12-18 Jason Merrill <jason@redhat.com>
3050
3051 C++ ABI change: destroy value arguments in caller.
3052 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
3053 create an extra binding level for the parameters.
3054 * decl.c (store_parm_decls): Don't do parameter cleanups.
3055
3056 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3057
3058 * call.c (build_new_method_call): Use '%#V'.
3059 * error.c (cv_to_string): Use V parameter to determine padding.
3060
3061 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3062
3063 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
3064 spellings in messages.
3065
3066 2001-12-17 Zack Weinberg <zack@codesourcery.com>
3067
3068 * cp-tree.h: Delete #defines for cp_error, cp_warning,
3069 cp_pedwarn, and cp_compiler_error.
3070 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
3071 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
3072 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3073 typeck2.c: Change calls to the above macros to use their
3074 language-independent equivalents: error, warning, pedwarn, and
3075 internal_error respectively.
3076
3077 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
3078
3079 * decl2.c (finish_file): Remove back_end_hook.
3080
3081 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
3082
3083 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
3084 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
3085 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
3086
3087 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
3088
3089 * lang-options.h: Use American spelling in messages.
3090
3091 2001-12-13 Jason Merrill <jason@redhat.com>
3092
3093 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
3094
3095 Use cleanups to run base and member destructors.
3096 * init.c (push_base_cleanups): New function, split out from...
3097 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
3098 * decl.c (finish_destructor_body): Move vbase destruction code to
3099 push_base_cleanups.
3100 (begin_function_body, finish_function_body): New fns.
3101 (finish_function): Move [cd]tor handling and call_poplevel to
3102 finish_function_body.
3103 (pushdecl): Skip the new level.
3104 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
3105 (setup_vtbl_ptr): Call push_base_cleanups.
3106 * method.c (synthesize_method): Call {begin,end}_function_body.
3107 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
3108 * cp-tree.h: Declare new fns.
3109 * parse.y (function_body, .begin_function_body): New nonterminals.
3110 (fndef, pending_inline, function_try_block): Use function_body.
3111 (ctor_initializer_opt, function_try_block): No longer has a value.
3112 (base_init): Remove .set_base_init token.
3113 (.set_base_init, compstmt_or_error): Remove.
3114 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
3115
3116 * optimize.c (maybe_clone_body): Fix parameter updating.
3117
3118 2001-12-12 Jason Merrill <jason@redhat.com>
3119
3120 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3121 * semantics.c (genrtl_start_function): Don't pass
3122 parms_have_cleanups or push an extra binding level.
3123 (genrtl_finish_function): Lose cleanup_label cruft.
3124
3125 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3126 (ctor_label): Remove.
3127 * semantics.c (finish_return_stmt): Lose ctor_label support.
3128 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
3129 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
3130 dtor_label.
3131
3132 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3133 check for [cd]tors.
3134 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3135
3136 * decl.c (finish_function): Check VMS_TARGET, not VMS.
3137
3138 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3139 (end_cleanup_fn): And poplevel.
3140
3141 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3142 if we're in a template.
3143
3144 2001-12-12 Jakub Jelinek <jakub@redhat.com>
3145
3146 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3147 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3148 THIS_NAME_P): Delete.
3149 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3150 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3151 with internal naming scheme.
3152 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3153
3154 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
3155
3156 * decl.c (grokdeclarator): Deprecated implicit typename use.
3157
3158 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
3159
3160 PR g++/51
3161 * parse.y (frob_specs): Indicate it is a language linkage which
3162 contained the extern.
3163 * decl.c (grokdeclarator): Allow extern language linkage with
3164 other specifiers.
3165
3166 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
3167
3168 PR g++/72
3169 * decl.c (add_binding): Don't reject duplicate typedefs involving
3170 template parameters.
3171
3172 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
3173
3174 * parse.y, semantics.c: Similarly.
3175
3176 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
3177
3178 PR g++/87
3179 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3180 (copy_args_p): Rename to ...
3181 (copy_fn_p): ... here.
3182 (grok_special_member_properties): New function.
3183 (grok_op_properties): Lose VIRTUALP parameter.
3184 (copy_assignment_arg_p): Remove.
3185 * call.c (build_over_call): Use copy_fn_p.
3186 * decl.c (grokfndecl): Reformat. Adjust call to
3187 grok_op_properties.
3188 (copy_args_p): Rename to ...
3189 (copy_fn_p): ... here. Reject template functions. Check for pass
3190 by value.
3191 (grok_special_member_properties): Remember special functions.
3192 (grok_ctor_properties): Don't remember them here, just check.
3193 (grok_op_properties): Likewise.
3194 (start_method): Call grok_special_member_properties.
3195 * decl2.c (grokfield): Likewise.
3196 (copy_assignment_arg_p): Remove.
3197 (grok_function_init): Don't remember abstract assignment here.
3198 * pt.c (instantiate_class_template): Call
3199 grok_special_member_properties.
3200 (tsubst_decl): Adjust grok_op_properties call.
3201
3202 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
3203
3204 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
3205 RID_TYPES_COMPATIBLE_P.
3206
3207 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
3208
3209 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
3210 call to build_aggr_init.
3211 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
3212
3213 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
3214
3215 * parse.y: Replace uses of the string non-terminal with STRING.
3216 Don't perform string concatentaion here.
3217 (string): Remove non-terminal.
3218 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
3219
3220 2001-12-05 Jason Merrill <jason@redhat.com>
3221
3222 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
3223 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
3224 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
3225 * pt.c (push_tinst_level): No longer static.
3226 * cp-tree.h: Declare them.
3227
3228 * init.c (resolve_offset_ref): Don't check access for the base
3229 conversion to access a FIELD_DECL.
3230
3231 * cp-tree.h (TYPE_REFFN_P): New macro.
3232 * decl.c (bad_specifiers): Check it, too.
3233
3234 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
3235 on the __*_type_info type if we haven't seen a definition.
3236
3237 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
3238
3239 * decl.c: Include c-common.h.
3240 (shadow_warning): Move to c-common.c.
3241
3242 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3243
3244 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
3245
3246 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3247
3248 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
3249
3250 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3251
3252 PR g++/164
3253 * init.c (sort_base_init): Allow binfos to be directly specified.
3254 * method.c (do_build_copy_constructor): Explicitly convert to the
3255 base instance.
3256 (do_build_assign_ref): Likewise.
3257
3258 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
3259
3260 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
3261 declaration and initialization.
3262
3263 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
3264
3265 * typeck2.c: Remove leading capital from diagnostic messages, as
3266 per GNU coding standards.
3267
3268 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
3269
3270 PR c++/3394
3271 * decl.c (xref_basetypes): Handle attributes between
3272 'class' and name.
3273
3274 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
3275
3276 PR g++/3381
3277 * parse.y (named_complex_class_head_sans_basetype): Add new
3278 reduction.
3279 * Make-lang.in (parse.c): Adjust expected conflict count.
3280
3281 2001-12-03 Jason Merrill <jason@redhat.com>
3282
3283 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
3284 immediate binfos for our virtual bases.
3285
3286 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
3287
3288 * call.c (build_java_interface_fn_ref): Similarly.
3289 * except.c (is_admissible_throw_operand): Similarly.
3290 * init.c (build_java_class_ref): Similarly.
3291 * xref.c (open_xref_file): Similarly.
3292
3293 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
3294
3295 * class.c (finish_struct): Remove trailing periods from messages.
3296 * decl.c (check_tag_decl): Similarly.
3297 * lex.c (cxx_set_yydebug): Similarly.
3298 * typeck2.c (friendly_abort): Similarly.
3299
3300 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3301
3302 PR c++/3048
3303 * cp-tree.h (ovl_member): Remove.
3304 * decl2.c (merge_functions): Handle extern "C" functions
3305 specially.
3306 * tree.c (ovl_member): Remove.
3307
3308 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3309
3310 PR c++/4842
3311 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
3312 FUNCTION_DECL, as input.
3313 (mark_overriders): Remove.
3314 (warn_hidden): Rework for the new ABI.
3315
3316 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3317
3318 PR c++/3471
3319 * call.c (convert_like_real): Do not build additional temporaries
3320 for rvalues of class type.
3321
3322 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
3323
3324 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
3325 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
3326 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
3327 (DERIVED_FROM_P): Likewise.
3328 (enum base_access): Renumber, add ba_quiet bit mask.
3329 (get_binfo): Remove.
3330 (get_base_distance): Remove.
3331 (binfo_value): Remove.
3332 (ACCESSIBLY_DERIVED_FROM_P): Remove.
3333 * call.c (standard_conversion): Use lookup_base.
3334 * class.c (strictly_overrides): Likewise.
3335 (layout_virtual_bases): Likewise.
3336 (warn_about_ambiguous_direct_bases): Likewise.
3337 (is_base_of_enclosing_class): Likewise.
3338 (add_vcall_offset_vtbl_entries_1): Likewise.
3339 * cvt.c (build_up_reference): Adjust comment.
3340 * init.c (build_member_call): Reformat.
3341 * search.c (get_binfo): Remove.
3342 (get_base_distance_recursive): Remove.
3343 (get_base_distance): Remove.
3344 (lookup_base_r): Tweak.
3345 (lookup_base): Add ba_quiet control. Complete the types here.
3346 (covariant_return_p): Use lookup_base.
3347 * tree.c (binfo_value): Remove.
3348 (maybe_dummy_object): Use lookup_base.
3349 * typeck.c (build_static_cast): Use lookup_base.
3350 (get_delta_difference): Likewise.
3351 * typeck2.c (binfo_or_else): Use lookup_base.
3352 (build_scoped_ref): Add back error_mark_check.
3353 (build_m_component_ref): Use lookup_base.
3354
3355 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
3356
3357 * Make-lang.in (c++.generated-manpages): New dummy target.
3358
3359 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3360
3361 * Make-lang.in (cp-lang.o): Depends on c-common.h.
3362 * cp-lang.c (c-common.h): Include.
3363 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
3364 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
3365 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
3366
3367 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
3368
3369 * decl2.c (c_language): Move to c-common.c.
3370 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
3371 functions.
3372 (cxx_init): Update.
3373
3374 2001-11-26 Jason Merrill <jason@redhat.com>
3375
3376 * call.c (joust): Remove COND_EXPR hack.
3377
3378 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
3379
3380 * search.c (lookup_base_r): Declare bk in variable declaration
3381 space.
3382
3383 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
3384
3385 PR g++/3145
3386 * class.c (build_vbase_pointer): Remove.
3387 (build_vbase_path): Remove.
3388 (build_base_path): New function.
3389 * cp-tree.h (base_access, base_kind): New enumerations.
3390 (build_base_path): Declare.
3391 (convert_pointer_to_real): Remove.
3392 (convert_pointer_to): Remove.
3393 (lookup_base): Declare.
3394 (convert_pointer_to_vbase): Remove.
3395 * call.c (build_scoped_method_call): Use lookup_base &
3396 build_base_path instead of convert_pointer_to_real,
3397 get_base_distance & get_binfo.
3398 (build_over_call): Likewise.
3399 * cvt.c (cp_convert_to_pointer): Likewise.
3400 (convert_to_pointer_force): Likewise.
3401 (build_up_reference): Likewise.
3402 (convert_pointer_to_real): Remove.
3403 (convert_pointer_to): Remove.
3404 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
3405 instead of convert_pointer_to_vbase & build_vbase_path.
3406 (emit_base_init): Use build_base_path instead of
3407 convert_pointer_to_real.
3408 (expand_virtual_init): Lose unrequired conversions.
3409 (resolve_offset_ref): Use lookup_base and build_base_path
3410 instead of convert_pointer_to.
3411 * rtti.c (build_dynamic_cast_1): Use lookup_base &
3412 build_base_path instead of get_base_distance & build_vbase_path.
3413 * search.c (get_vbase_1): Remove.
3414 (get_vbase): Remove.
3415 (convert_pointer_to_vbase): Remove.
3416 (lookup_base_r): New function.
3417 (lookup_base): New function.
3418 * typeck.c (require_complete_type): Use lookup_base &
3419 build_base_path instead of convert_pointer_to.
3420 (build_component_ref): Likewise.
3421 (build_x_function_call): Likewise.
3422 (get_member_function_from_ptrfunc): Likewise.
3423 (build_component_addr): Likewise.
3424 * typeck2.c (build_scoped_ref): Likewise.
3425
3426 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3427
3428 * cp-tree.h (CP_TYPE_QUALS): Removed.
3429 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
3430 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
3431 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
3432 * dump.c (cp_dump_tree): Use void* dump_info argument to match
3433 lang-hooks prototype.
3434 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
3435 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
3436 CP_TYPE_QUALS changed to cp_type_quals.
3437 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
3438 (CXX_C_OBJS): Remove c-dump.o.
3439
3440 2001-11-21 Mark Mitchell <mark@codesourcery.com>
3441
3442 PR c++/3637
3443 * pt.c (lookup_template_class): Ensure that all specializations
3444 are registered on the list corresponding to the most general
3445 template.
3446
3447 2001-11-20 Mark Mitchell <mark@codesourcery.com>
3448
3449 * call.c (non_reference): Add documentation.
3450 (convert_class_to_reference): Do not strip reference types
3451 from conversion operators.
3452 (maybe_handle_ref_bind): Simplify.
3453 (compare_ics): Correct handling of references.
3454
3455 2001-11-19 John Wilkinson <johnw@research.att.com>
3456
3457 * dump.c (dump_op): New function.
3458 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
3459 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
3460 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
3461
3462 2001-11-19 Mark Mitchell <mark@codesourcery.com>
3463
3464 PR4629
3465 * semantics.c (finish_sizeof): Make sure that expression created
3466 while processing a template do not have a type.
3467 (finish_alignof): Likewise.
3468 * typeck.c (c_sizeof): Likewise.
3469 (expr_sizeof): Likewise.
3470
3471 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
3472
3473 * lex.c (cxx_finish): Call c_common_finish.
3474 (finish_parse): Remove.
3475
3476 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3477
3478 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
3479 when displaying error message about missing array bounds.
3480
3481 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3482
3483 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
3484 CONST_CAST_EXPR.
3485 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
3486
3487 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
3488
3489 * cp-tree.h (print_class_statistics): Restore.
3490
3491 2001-11-15 Jason Merrill <jason@redhat.com>
3492
3493 * method.c (use_thunk): Don't emit debugging information for thunks.
3494
3495 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
3496 * decl.c (make_typename_type): Handle getting a class template.
3497 * search.c (lookup_field_r): A class template is good enough for
3498 want_type.
3499
3500 * call.c (convert_like_real): Only use cp_convert for the bad part.
3501 (standard_conversion): Also allow bad int->enum.
3502 * typeck.c (ptr_reasonably_similar): Also allow functions to
3503 interconvert. Pointers to same-size integers are reasonably
3504 similar.
3505
3506 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
3507 give it void type.
3508
3509 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
3510
3511 PR g++/3154
3512 * init.c (sort_base_init): Remove unreachable code.
3513 (expand_member_init): Adjust comment to reflect reality. Simplify
3514 and remove unreachable code.
3515
3516 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
3517
3518 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
3519 (cxx_init): Update prototype.
3520 * decl.c (init_decl_processing): Rename. Move null node init
3521 to its creation time.
3522 * lex.c (cxx_init_options): Update.
3523 (cxx_init): Combine with old init_parse; also call
3524 cxx_init_decl_processing.
3525
3526 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
3527
3528 * decl.c (check_initializer): Try to complete the type of an
3529 array element before checking whether it's complete. Don't
3530 complain about arrays with complete element types but an
3531 unknown size.
3532 (cp_finish_decl): Build the hierarchical constructor before
3533 calling maybe_deduce_size_from_array_init.
3534
3535 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
3536
3537 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
3538
3539 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
3540
3541 PR g++/4206
3542 * parse.y (already_scoped_stmt): Remove.
3543 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
3544
3545 2001-11-12 H.J. Lu <hjl@gnu.org>
3546
3547 * cvt.c (ocp_convert): Don't warn the address of a weak
3548 function is always `true'.
3549
3550 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3551
3552 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3553 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3554 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
3555 * cp-tree.h (print_class_statistics): Remove.
3556 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
3557 cxx_print_identifier, cxx_set_yydebug): New.
3558 * lex.c (set_yydebug): Rename c_set_yydebug.
3559 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
3560 lang_print_xnode): Rename.
3561 * tree.c (print_lang_statistics): Rename.
3562
3563 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3564
3565 * class.c (dump_array): Fix format specifier warning.
3566
3567 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3568
3569 * cp-lang.c (LANG_HOOKS_NAME): Override.
3570 (struct lang_hooks): Constify.
3571 * lex.c (cxx_init_options): Update.
3572 (lang_identify): Remove.
3573 * parse.y (language_string): Remove.
3574
3575 2001-11-08 Andreas Franck <afranck@gmx.de>
3576
3577 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
3578 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
3579 suggested by autoconf.
3580 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
3581 (c++.install-common): Use the transformed target alias names.
3582
3583 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
3584
3585 * Make-lang.in: Update.
3586 * cp-lang.c: Include langhooks-def.h.
3587
3588 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3589
3590 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
3591
3592 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3593
3594 * lex.c (copy_lang_type): Add static prototype.
3595
3596 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3597
3598 * pt.c (unify): Handle SCOPE_REF.
3599
3600 2001-11-01 Jakub Jelinek <jakub@redhat.com>
3601
3602 * tree.c (cp_copy_res_decl_for_inlining): Adjust
3603 DECL_ABSTRACT_ORIGIN for the return variable.
3604
3605 2001-10-31 Zack Weinberg <zack@codesourcery.com>
3606
3607 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3608
3609 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
3610
3611 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
3612 semantics.c, spew.c: Fix spelling errors.
3613
3614 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3615
3616 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
3617
3618 2001-10-25 Zack Weinberg <zack@codesourcery.com>
3619
3620 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
3621 pop_everything.
3622
3623 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3624
3625 * cp-lang.c (cxx_get_alias_set): New function.
3626 Point LANG_HOOKS_GET_ALIAS_SET to it.
3627
3628 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3629
3630 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
3631 * cp-tree.h (make_unbound_class_template): Prototype new function.
3632 * decl.c (make_unbound_class_template): New function.
3633 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
3634 * error.c (dump_type): Likewise.
3635 * mangle.c (write_type): Likewise.
3636 * parse.y (template_parm): Likewise.
3637 (template_argument): Use make_unbound_class_template.
3638 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
3639 (tsubst): Likewise.
3640 (tsubst_copy): Likewise.
3641 (unify): Likewise.
3642 * tree.c (walk_tree): Likewise.
3643 * typeck.c (comptypes): Likewise.
3644
3645 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3646
3647 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
3648 extra calls into fewer ones.
3649
3650 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
3651
3652 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
3653 Warn when merging inline with attribute noinline.
3654 (start_decl, start_function): Warn if inline and attribute
3655 noinline appear in the same declaration.
3656
3657 2001-10-16 H.J. Lu <hjl@gnu.org>
3658
3659 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
3660 for tree checking disabled.
3661
3662 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
3663
3664 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
3665 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
3666
3667 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
3668
3669 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
3670 (unify): Only handle MINUS_EXPR specially if the above flag is set
3671 and the subtracted constant is 1. Clear the flag on recursive calls.
3672 Set it when unifying the maximum value in an INTEGER_TYPE's range.
3673
3674 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
3675
3676 * decl.c (bad_specifiers): Don't allow exception specifications
3677 on any typedefs.
3678
3679 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
3680
3681 * cp/lex.c (init_cp_pragma): Similarly.
3682
3683 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3684
3685 * pt.c (lookup_template_class): Build complete template arguments
3686 for BOUND_TEMPLATE_TEMPLATE_PARM.
3687
3688 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3689
3690 * cp-tree.h (TYPE_BINFO): Update comment.
3691 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
3692 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
3693 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
3694 (copy_type): Prototype new function.
3695 * lex.c (copy_lang_decl): Gather tree node statistics.
3696 (copy_lang_type): New function.
3697 (copy_type): Likewise.
3698 (cp_make_lang_type): Create lang_type for
3699 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
3700 and BOUND_TEMPLATE_TEMPLATE_PARM.
3701 * pt.c (tsubst): Use copy_type instead of copy_node.
3702 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
3703
3704 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3705
3706 * pt.c (determine_specialization): Ignore functions without
3707 DECL_TEMPLATE_INFO.
3708
3709 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
3710
3711 PR g++/4476
3712 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
3713
3714 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
3715
3716 * typeck2.c (store_init_value): Don't re-digest a bracketed
3717 initializer.
3718
3719 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
3720 ANON_AGGR_TYPE_P.
3721
3722 2001-10-11 Richard Henderson <rth@redhat.com>
3723
3724 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
3725 of an asm statement.
3726 (build_vtbl_ref_1): Split out from build_vtbl_ref.
3727 (build_vfn_ref): Use it to handle vtable descriptors before
3728 calling build_vtable_entry_ref.
3729 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
3730
3731 2001-10-10 Richard Henderson <rth@redhat.com>
3732
3733 * parse.y (asm_operand): Allow named operands.
3734 * semantics.c (finish_asm_stmt): Tweek for changed location
3735 of the operand constrant.
3736
3737 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
3738
3739 * call.c (standard_conversion): Add bad conversion between
3740 integers and pointers.
3741 (convert_like_real): Don't use convert_for_initialization for bad
3742 conversions; complain here and use cp_convert.
3743 (build_over_call): Don't handle bad conversions specially.
3744 (perform_implicit_conversion): Allow bad conversions.
3745 (can_convert_arg_bad): New fn.
3746 * cp-tree.h: Declare it.
3747 * typeck.c (convert_for_assignment): Use it.
3748 (ptr_reasonably_similar): Any target type is similar to void.
3749
3750 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
3751
3752 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
3753 (cp/cp-lang.o): New rule.
3754 * cp-tree.h: Declare hooks.
3755 * tree.c: Make hooks non-static.
3756 (init_tree): Don't initialize hooks here.
3757 * lex.c: Likewise. Move definition of lang_hooks to...
3758 * cp-lang.c: ... new file.
3759
3760 2001-10-08 Richard Henderson <rth@redhat.com>
3761
3762 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
3763 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
3764
3765 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3766
3767 * class.c (build_vtable_entry_ref): Const-ify.
3768 * decl.c (predefined_identifier,
3769 initialize_predefined_identifiers): Likewise.
3770 * init.c (build_new_1): Likewise.
3771 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
3772 Likewise.
3773
3774 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
3775
3776 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
3777 (INSNS_PER_STMT): Likewise.
3778 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
3779 (copy_body, initialize_inlined_parameters): Likewise.
3780 (declare_return_variable, inlinable_function_p): Likewise.
3781 (expand_call_inline, expand_calls_inline): Likewise.
3782 (optimize_inline_calls, clone_body): Likewise.
3783 * tree.c (walk_tree): Moved to ../tree-inline.c.
3784 (walk_tree_without_duplicates): Likewise.
3785 (copy_tree_r, remap_save_expr): Likewise.
3786
3787 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
3788
3789 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
3790 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
3791 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
3792 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
3793 (flag_inline_trees): Moved declaration to ../tree-inline.h.
3794 (walk_tree): Moved declaration to ../tree-inline.h.
3795 (walk_tree_without_duplicates, copy_tree_r): Likewise.
3796 (remap_save_expr): Likewise.
3797 * decl.c: Include tree-inline.h.
3798 (lang_mark_tree): Don't mark inlined_fns.
3799 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
3800 * optimize.c: Include tree-inline.h.
3801 (optimize_inline_calls): Move declaration to ../tree.h, as
3802 non-static.
3803 (remap_decl): Use language-independent constructs and hooks.
3804 (remap_block, copy_body_r, declare_return_variable): Likewise.
3805 (inlinable_function_p): Likewise. Don't test for
3806 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
3807 no longer language-specific.
3808 (optimize_inline_calls): Likewise. Make it non-static. Moved
3809 call of dump_function to...
3810 (optimize_function): Here...
3811 (clone_body): New function, extracted from...
3812 (maybe_clone_body): ... here. Build decl_map locally and pass
3813 it on to clone_body.
3814 * pt.c, semantics.c: Include tree-inline.h.
3815 * tree.c: Likewise.
3816 (cp_walk_subtrees): New language-specific hook for tree inlining.
3817 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
3818 cp_is_overload_p, cp_auto_var_in_fn_p,
3819 cp_copy_res_decl_for_inlining): Likewise.
3820 (walk_tree): Move language-specific constructs into...
3821 (cp_walk_subtrees): this new function.
3822 (copy_tree_r): Use language-independent constructs and hooks.
3823 (init_tree): Initialize tree inlining hooks.
3824 (remap_save_expr): Adjust prototype so that the declaration
3825 does not require the definition of splay_tree.
3826
3827 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
3828
3829 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
3830 to build the declaration instead of the declaration itself.
3831
3832 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
3833
3834 * decl2.c (cxx_decode_option): Add 'else'.
3835
3836 * spew.c (end_input): No longer static.
3837 * cp-tree.h: Declare it.
3838 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
3839
3840 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
3841
3842 * call.c (build_over_call), typeck.c (build_function_call_real):
3843 Pass type attributes to check_function_format rather than name or
3844 assembler name. Don't require there to be a name or assembler
3845 name to check formats.
3846
3847 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
3848
3849 * decl.c (init_decl_processing): Don't call
3850 init_function_format_info. Initialize lang_attribute_table
3851 earlier.
3852 (builtin_function): Call decl_attributes.
3853 (insert_default_attributes): New.
3854
3855 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
3856
3857 * decl.c (grokdeclarator): Copy array typedef handling from C
3858 frontend.
3859
3860 * decl.c (grokdeclarator): Copy too-large array handling from C
3861 frontend.
3862
3863 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
3864
3865 * config-lang.in (target_libs): Added target-gperf, so that we
3866 don't try to build it if C++ is disabled.
3867
3868 2001-09-23 Zack Weinberg <zack@codesourcery.com>
3869
3870 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
3871 (cp/errfn.o): Delete rule.
3872 (cp/error.o): Depend on flags.h.
3873 * errfn.c: Delete file.
3874 * cp-tree.h: Declare warn_deprecated. Remove definitions of
3875 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
3876 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
3877 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
3878 internal_error respectively. Make cp_deprecated into a macro.
3879 Don't define cp_printer typedef or declare cp_printers.
3880 * error.c: Include flags.h.
3881 Delete: struct tree_formatting_info, print_function_argument_list,
3882 print_declaration, print_expression, print_function_declaration,
3883 print_function_parameter, print_type_id, print_cv_qualifier_seq,
3884 print_type_specifier_seq, print_simple_type_specifier,
3885 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
3886 print_parameter_declaration_clause, print_exception_specification,
3887 print_nested_name_specifier, and definition of cp_printers.
3888 (locate_error): New function.
3889 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
3890 rewritten in terms of locate_error and diagnostic.c.
3891 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
3892 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
3893 (init_error): Adjust to match.
3894
3895 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3896
3897 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
3898
3899 2001-09-21 Richard Henderson <rth@redhat.com>
3900
3901 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
3902 (build_vtbl_initializer): Likewise.
3903 (build_vfn_ref): New.
3904 * cp-tree.h: Declare it.
3905 * call.c (build_over_call): Use it.
3906 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
3907 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
3908
3909 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
3910
3911 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
3912
3913 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
3914
3915 Table-driven attributes.
3916 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
3917 * decl2.c (cplus_decl_attributes): Only take one attributes
3918 parameter.
3919 * cp-tree.c (cplus_decl_attributes): Update prototype.
3920 * class.c (finish_struct), decl.c (start_decl, start_function),
3921 decl2.c (grokfield), friend.c (do_friend), parse.y
3922 (parse_bitfield): Update calls to cplus_decl_attributes.
3923 * decl.c (grokdeclarator): Take a pointer to a single ordinary
3924 attribute list.
3925 * decl.h (grokdeclarator): Update prototype.
3926 * decl2.c (grokfield): Take a single ordinary attribute list.
3927 * friend.c (do_friend): Likewise.
3928 * decl.c (shadow_tag, groktypename, start_decl,
3929 start_handler_parms, grokdeclarator, grokparms, start_function,
3930 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
3931 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
3932 (process_template_parm, do_decl_instantiation): Pass single
3933 ordinary attribute lists around.
3934 * decl.c (grokdeclarator): Correct handling of nested attributes.
3935 Revert the patch
3936 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
3937 * decl.c (grokdeclarator): Embedded attrs bind to the right,
3938 not the left.
3939 .
3940 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
3941 (cp_attribute_table): Declare.
3942 * decl.c (valid_lang_attribute): Don't define.
3943 (lang_attribute_table): Define.
3944 (init_decl_processing): Initialize lang_attribute_table instead of
3945 valid_lang_attribute.
3946 * tree.c (cp_valid_lang_attribute): Remove.
3947 (handle_java_interface_attribute, handle_com_interface_attribute,
3948 handle_init_priority_attribute): New functions.
3949 (cp_attribute_table): New array.
3950 * decl2.c (import_export_class): Don't use
3951 targetm.valid_type_attribute.
3952
3953 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3954
3955 * Make-lang.in (cp/error.o): Depend on real.h
3956 * error.c: #include "real.h"
3957
3958 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3959
3960 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
3961 xmalloc/strcpy/strcat.
3962
3963 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3964
3965 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
3966 Const-ification.
3967 * pt.c (tsubst_decl): Likewise.
3968
3969 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3970
3971 * decl2.c (lang_f_options): Const-ification.
3972 * lex.c (cplus_tree_code_name): Likewise.
3973 * spew.c (yyerror): Likewise.
3974
3975 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
3976
3977 PR c++/3986
3978 * class.c (force_canonical_binfo_r): Check & move an indirect
3979 primary base first.
3980 (force_canonical_binfo): Check that it's not already
3981 canonical.
3982 (mark_primary_virtual_base): Remove BINFO parameter.
3983 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
3984
3985 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
3986
3987 Remove TYPE_NONCOPIED_PARTS.
3988 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
3989 CLASSTYPE_PURE_VIRTUALS.
3990 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
3991 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
3992 (layout_class_type): Don't call fixup_inline_methods here ...
3993 (finish_struct_1): ... call it here.
3994
3995 2001-09-04 Mark Mitchell <mark@codesourcery.com>
3996
3997 * decl.c (duplicate_decls): Remove code deadling with
3998 DECL_SAVED_INSNS.
3999 * decl2.c (finish_file): Likewise.
4000 * pt.c (instantiate_decl): Likewise.
4001 * semantics.c (expand_body): Don't defer local functions if
4002 they wouldn't be deferred for some other reason. Don't
4003 generate RTL for functions that will not be emitted.
4004 (genrtl_start_function): Remove code deadling with
4005 DECL_SAVED_INSNS.
4006 (genrtl_finish_function): Likewise.
4007
4008 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
4009
4010 PR c++/4203
4011 * call.c (build_over_call): Do not optimize any empty base
4012 construction.
4013
4014 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4015
4016 * error.c (dump_template_decl): Output template parameters
4017 together with their specifiers.
4018 Output `class' prefix for template template parameter.
4019 (dump_decl): Fix formatting.
4020
4021 2001-08-30 Kurt Garloff <garloff@suse.de>
4022
4023 * optimize.c (inlinable_function_p): Allow only smaller single
4024 functions. Halve inline limit after reaching recursive limit.
4025
4026 2001-08-30 Joern Rennecke <amylaar@redhat.com>
4027 Jason Merrill <jason_merrill@redhat.com>
4028
4029 * class.c (build_vtable_entry_ref): Subtract in char*, not
4030 ptrdiff_t.
4031
4032 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
4033
4034 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
4035 (build_cplus_array_type): Use cp_build_qualified_type, not
4036 TYPE_MAIN_VARIANT, to get an unqualified version.
4037
4038 * decl2.c (grok_alignof): Lose.
4039 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
4040 * typeck.c (c_alignof): Lose.
4041 * semantics.c (finish_sizeof, finish_alignof): New.
4042 * parse.y: Use them.
4043 * cp-tree.h: Declare them.
4044
4045 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
4046
4047 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
4048 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
4049 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
4050
4051 2001-08-19 Jakub Jelinek <jakub@redhat.com>
4052
4053 * typeck2.c (add_exception_specifier): Only require complete type if
4054 not in processing template declaration.
4055
4056 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4057
4058 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
4059 GNU_xref_start_scope and GNU_xref_end_scope.
4060
4061 * tree.c (TYPE_HASH): Moved to ../tree.h.
4062
4063 2001-08-16 Mark Mitchell <mark@codesourcery.com>
4064
4065 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
4066 on COMPOUND_EXPRs.
4067
4068 2001-08-14 Richard Henderson <rth@redhat.com>
4069
4070 * class.c, cp-tree.h (build_vfn_ref): Remove.
4071 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
4072
4073 2001-08-13 Mark Mitchell <mark@codesourcery.com>
4074
4075 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
4076 empty class assignment as having side-effects to avoid
4077 spurious warnings.
4078
4079 2001-08-13 Zack Weinberg <zackw@panix.com>
4080
4081 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
4082 * except.c: Include libfuncs.h.
4083
4084 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4085
4086 * decl.c (grokdeclarator): Clarify diagnostic message.
4087
4088 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4089
4090 * decl2.c (do_nonmember_using_decl): Replace using directive
4091 with using declaration in the error message.
4092
4093 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4094
4095 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
4096 criterion to avoid rebuilding expression tree instead of
4097 processing_template_decl.
4098
4099 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4100
4101 Support named return value optimization for inlines, too.
4102 * decl.c (finish_function): Nullify returns here.
4103 * semantics.c (genrtl_start_function): Not here.
4104 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
4105 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
4106 Also nullify the CLEANUP_STMT for the nrv.
4107 * cp-tree.h: Declare it.
4108 * optimize.c (declare_return_variable): Replace the nrv with the
4109 return variable.
4110 * typeck.c (check_return_expr): Be more flexible on alignment check.
4111 Ignore cv-quals when checking for a matching type.
4112
4113 2001-08-09 Richard Henderson <rth@redhat.com>
4114
4115 * decl2.c (finish_objects): Use target hooks instead of
4116 assemble_constructor and assemble_destructor.
4117
4118 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4119
4120 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
4121
4122 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
4123
4124 PR c++/3820
4125 Stop using TYPE_NONCOPIED_PARTS.
4126 * call.c (build_over_call): Be careful when copy constructing
4127 or assigning to an empty class.
4128 * class.c (check_bases_and_members): It has a
4129 COMPLEX_ASSIGN_REF if it has a vptr.
4130 (layout_class_type): Don't add empty class padding to
4131 TYPE_NONCOPIED_PARTS.
4132 (finish_struct_1): Don't add the VFIELD either.
4133 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
4134 initialization.
4135
4136 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4137
4138 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
4139
4140 2001-08-06 Richard Henderson <rth@redhat.com>
4141
4142 * decl2.c (finish_objects): Pass a symbol_ref and priority to
4143 assemble_{constructor,destructor}. Remove priority handling.
4144
4145 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4146
4147 Don't allow template-id in using-declaration.
4148 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
4149 (do_class_using_decl): Likewise.
4150
4151 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4152
4153 * cp/spew.c (read_token): No need to pop buffers.
4154
4155 2001-08-02 Stan Shebs <shebs@apple.com>
4156
4157 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
4158 (fnaddr_from_vtable_entry): Remove decl.
4159 * method.c (use_thunk): Update comment.
4160
4161 2001-08-01 Andrew Cagney <ac131313@redhat.com>
4162
4163 * repo.c (get_base_filename): Change return value to const char
4164 pointer.
4165
4166 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
4167
4168 Kill -fhonor-std.
4169 * NEWS: Document.
4170 * cp-tree.h (flag_honor_std): Remove.
4171 (CPTI_FAKE_STD): Remove.
4172 (std_node): Remove comment about it being NULL.
4173 (fake_std_node): Remove.
4174 * decl.c (in_fake_std): Remove.
4175 (walk_namespaces_r): Remove fake_std_node check.
4176 (push_namespace): Remove in_fake_std code.
4177 (pop_namespace): Likewise.
4178 (lookup_name_real): Remove fake_std_node check.
4179 (init_decl_processing): Always create std_node. Always add
4180 std:: things there.
4181 (builtin_function): Always put non '_' fns in std.
4182 * decl2.c (flag_honor_std): Remove.
4183 (lang_f_options): Remove honor-std.
4184 (unsupported_options): Add honor-std.
4185 (set_decl_namespace): Remove fake_std_node check.
4186 (validate_nonmember_using_decl): Likewise.
4187 (do_using_directive): Likewise.
4188 (handle_class_head): Likewise.
4189 * dump.c (cp_dump_tree): Likewise.
4190 * except.c (init_exception_processing): Adjust.
4191 * init.c (build_member_call): Remove fake_std_node check.
4192 (build_offset_ref): Likewise.
4193 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
4194 * rtti.c (init_rtti_processing): Adjust.
4195
4196 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
4197
4198 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
4199 operand while calling cp_tree_equal.
4200
4201 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4202
4203 The 3.0 ABI no longer has vbase pointer fields.
4204 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
4205 FORMAT_VBASE_NAME): Remove.
4206 * method.c (do_build_copy_constructor): Adjust.
4207 (do_build_assign_ref): Adjust.
4208 * search.c (lookup_field_r): Adjust.
4209 * typeck.c (build_component_ref): Adjust.
4210
4211 The 3.0 ABI always has a vtable pointer at the start of every
4212 polymorphic class.
4213 * rtti.c (build_headof_sub): Remove.
4214 (build_headof): Adjust.
4215 (get_tinfo_decl_dynamic): No need to check flag_rtti
4216 here. Adjust.
4217 (create_real_tinfo_var): Explain why we need a hidden name.
4218
4219 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4220
4221 PR c++/3631
4222 * class.c (update_vtable_entry_for_fn): The fixed adjustment
4223 of a virtual thunk should be from declaring base.
4224
4225 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4226
4227 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
4228 the shared virtual base, so preserving inheritance graph order.
4229
4230 2001-07-30 Andreas Jaeger <aj@suse.de>
4231
4232 * decl2.c: Remove unused var global_temp_name_counter.
4233
4234 2001-07-28 Richard Henderson <rth@redhat.com>
4235
4236 * method.c (pending_inlines): Remove.
4237
4238 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
4239
4240 * class.c (mark_primary_virtual_base): Don't adjust base
4241 offsets here.
4242 (dfs_unshared_virtual_bases): Adjust them here.
4243 (mark_primary_bases): Explain why we adjust at the end.
4244
4245 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
4246
4247 * class.c (finish_struct_1): When copying the primary base's
4248 VFIELD, make sure we find it is at offset zero.
4249
4250 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4251
4252 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
4253 tsubst_expr for default template arguments.
4254
4255 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4256
4257 PR c++/3621
4258 * spew.c (yylex): Only copy the token's lineno, if it is
4259 non-zero.
4260
4261 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4262
4263 PR c++/3624
4264 * call.c (resolve_args): Simplify, call
4265 convert_from_reference.
4266 (build_new_op): Resolve and convert from reference ARG1
4267 earlier. Adjust ARG2 & ARG3 resolve and conversion.
4268
4269 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
4270
4271 * decl.c (last_function_parm_tags): Remove.
4272 (current_function_parm_tags): Remove.
4273 (init_decl_processing): Adjust.
4274 (start_function): Adjust.
4275 (store_parm_decls): Adjust.
4276
4277 PR c++/3152
4278 * decl.c (grokdeclarator): Detect when a function typedef is
4279 declaring a function, and create last_function_parms correctly.
4280
4281 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
4282
4283 * call.c (joust): Only prefer a non-builtin candidate to a builtin
4284 one if they have the same signature.
4285
4286 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
4287 it rather than toplevel_bindings_p. Give it a mangled name if static.
4288 (convert_to_reference): Adjust.
4289 * decl2.c (get_temp_name): Lose.
4290 * mangle.c (mangle_ref_init_variable): New fn.
4291 (mangle_guard_variable): Strip the ref-init header.
4292 * cp-tree.h: Adjust.
4293 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
4294 initializer.
4295 (grok_reference_init): Always use DECL_INITIAL.
4296
4297 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4298
4299 PR c++/3416
4300 * call.c (build_conditional_expr): Recheck args after
4301 conversions.
4302 * cp-tree.h (build_conditional_expr): Move to correct file.
4303 * typeck.c (decay_conversion): Diagnose any unknown types
4304 reaching here.
4305 (build_binary_op): Don't do initial decay or default
4306 conversions on overloaded functions.
4307 (build_static_cast): Don't do a decay conversion here.
4308
4309 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4310
4311 PR c++/3543
4312 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
4313 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
4314
4315 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4316
4317 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
4318 (create_vtbl_ptr): ... here.
4319
4320 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
4321
4322 * class.c (build_vbase_offset_vbtl_entries): Look for
4323 non-primary base of which we are a sub vtable.
4324
4325 2001-07-24 Phil Edwards <pme@sources.redhat.com>
4326
4327 * semantics.c (finish_this_expr): Remove unused code.
4328
4329 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
4330
4331 Simplify rtti, now we've only one ABI.
4332 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
4333 CPTI_TINFO_VAR_ID.
4334 (tinfo_decl_id, tinfo_var_id): Remove.
4335 (get_typeid_1): Remove.
4336 * rtti.c
4337 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
4338 (typeid_ok_p): New function.
4339 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
4340 (get_tinfo_decl): Remove old abi documentation.
4341 (tinfo_from_decl): Remove.
4342 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
4343 (get_typeid_1): Remove.
4344 (get_base_offset): Remove.
4345 (synthesize_tinfo_var): Absorb get_base_offset.
4346 (create_real_tinfo_var): Don't use tinfo_decl_id.
4347
4348 2001-07-23 Graham Stott <grahams@redhat.com>
4349
4350 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
4351 variable has_two_argument_delete_p.
4352
4353 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
4354
4355 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
4356 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
4357 (CPTI_INDEX_IDENTIFIER): Remove.
4358 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
4359 (delta2_identifier): Remove.
4360 (index_identifier): Remove.
4361 (pfn_or_delta2_identifier): Remove.
4362 (flag_vtable_thunks): Remove.
4363 (VTABLE_DELTA2_NAME): Remove.
4364 (VTABLE_INDEX_NAME): Remove.
4365 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
4366 (vfunc_ptr_type_node): Adjust.
4367 (VTABLE_NAME_PREFIX): Adjust.
4368 (build_vfn_ref): Lose first parameter.
4369 (fixup_all_virtual_upcast_offsets): Remove.
4370 * decl.c (initialize_predefined_identifiers): Remove
4371 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
4372 (init_decl_processing): Remove no-vtable-thunk code.
4373 * decl2.c (flag_vtable_thunks): Remove.
4374 (mark_vtable_entries): Remove no-vtable-thunk code.
4375 * error.c (dump_decl): Remove no-vtable-thunk code.
4376 (dump_expr): Adjust ptr to member function code.
4377 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
4378 code.
4379 * rtti.c (build_headof): Remove no-vtable-thunk code.
4380 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
4381 * search.c (get_base_distance): Remove expand_upcast_fixups case.
4382 (virtual_context) Remove.
4383 (expand_upcast_fixups): Remove.
4384 (fixup_virtual_upcast_offsets): Remove.
4385 (fixup_all_virtual_upcast_offsets): Remove.
4386 * typeck.c (get_member_function_from_ptrfunc): Remove
4387 no-vtable-thunk code.
4388 * call.c (build_over_call): Adjust call to build_vfn_ref.
4389 * class.c (build_vfn_ref): Lose first parameter. Remove
4390 no-vtable-thunk code.
4391 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
4392 (build_vtable_entry): Remove no-vtable-thunk code.
4393
4394 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
4395
4396 Remove old-abi remnants. Remove comments about old abi
4397 behaviour. Remove references to 'new-abi' in comments.
4398 * cp-tree.h: Adjust comments.
4399 (vbase_offsets_in_vtable_p): Delete.
4400 (vcall_offsets_in_vtable_p): Delete.
4401 (vptrs_present_everywhere_p): Delete.
4402 (all_overridden_vfuns_in_vtables_p): Delete.
4403 (merge_primary_and_secondary_vtables_p): Delete.
4404 (TYPE_CONTAINS_VPTR_P): Adjust.
4405 (VTT_NAME_PREFIX): Remove.
4406 (CTOR_VTBL_NAME_PREFIX): Remove.
4407 (init_vbase_pointers): Remove.
4408 * class.c: Adjust coments.
4409 (build_vbase_pointer_fields): Delete.
4410 (build_vbase_pointer): Remove old-abi code.
4411 (build_secondary_vtable): Likewise.
4412 (modify_all_vtables): Likewise.
4413 (create_vtable_ptr): Likewise.
4414 (layout_class_type): Likewise.
4415 (finish_struct_1): Likewise.
4416 (finish_vtbls): Likewise.
4417 (dfs_finish_vtbls): Delete.
4418 (build_vbase_offset_vtbl_entries): Remove old-abi code.
4419 * cvt.c: Adjust comments.
4420 * decl.c: Adjust comments.
4421 * decl2.c: Adjust comments.
4422 * init.c: Adjust comments.
4423 (construct_virtual_bases): Remove old-abi code.
4424 * lang-specs.h: Remove -fno-new-abi.
4425 * mangle.c: Adjust comments.
4426 * rtti.c: Adjust comments.
4427 (get_base_offset): Remove old-abi-code.
4428 * search.c: Adjust comments.
4429 (dfs_init_vbase_pointers): Remove.
4430 (dfs_vtable_path_unmark): Remove.
4431 (init_vbase_pointers): Remove.
4432 * semantics.c: Adjust comments.
4433 (emit_associated_thunks): Remove old-abi code.
4434 * typeck.c: Adjust comments.
4435
4436 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
4437
4438 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
4439 params.h.
4440
4441 2001-07-19 Mark Mitchell <mark@codesourcery.com>
4442
4443 * class.c (finish_struct_anon): Forbid nested classes.
4444
4445 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
4446
4447 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
4448 * optimize.c: Include debug.h.
4449 (maybe_clone_body): Use debug hook.
4450 * semantics.c: Include debug.h.
4451 (expand_body): Use debug hook.
4452
4453 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
4454
4455 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
4456
4457 2001-07-18 Mark Mitchell <mark@codesourcery.com>
4458
4459 * class.c (type_requires_array_cookie): New function.
4460 (check_methods): Don't try to figure out whether the type needs a
4461 cookie here.
4462 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
4463 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
4464 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
4465 * pt.c (instantiate_class_template): Don't set
4466 TYPE_VEC_DELETE_TAKES_SIZE.
4467 * NEWS: Document ABI changes from GCC 3.0.
4468
4469 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
4470 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
4471
4472 * NEWS (Changes in GCC 3.0): Fix typo.
4473
4474 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
4475
4476 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
4477 which attributes are to be attached, and a flags argument. Update
4478 call to decl_attributes.
4479 (grokfield): Update call to decl_attributes.
4480 * class.c (finish_struct): Update call to cplus_decl_attributes.
4481 * cp-tree.h (cplus_decl_attributes): Update prototype.
4482 * decl.c (start_decl, grokdeclarator, start_function): Update
4483 calls to decl_attributes and cplus_decl_attributes.
4484 * friend.c (do_friend): Update call to cplus_decl_attributes.
4485 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
4486
4487 2001-07-12 Mark Mitchell <mark@codesourcery.com>
4488
4489 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
4490 for `register' variables with an asm-specification.
4491
4492 2001-07-11 Mark Mitchell <mark@codesourcery.com>
4493
4494 * semantics.c (finish_asm_stmt): Mark the output operands
4495 to an asm addressable, if necessary.
4496
4497 2001-07-11 Ben Elliston <bje@redhat.com>
4498
4499 * Revert this change -- there is a subtle bug.
4500
4501 PR c++/80
4502 * decl.c (finish_enum): New "attributes" argument; pass it to
4503 cplus_decl_attributes. Use a narrower type if the enum is packed.
4504 * cp-tree.h (finish_enum): Adjust prototype.
4505 * parse.y (enum_head): New non-terminal.
4506 (structsp): Use it. Enums now may be preceded or followed by
4507 optional attributes -- pass their chained tree to finish_enum().
4508 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
4509
4510 2001-07-10 Mark Mitchell <mark@codesourcery.com>
4511
4512 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
4513 variables.
4514
4515 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
4516
4517 * semantics.c (cp_expand_stmt): Fix for null
4518 current_function_return_value.
4519
4520 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
4521
4522 * call.c (build_op_delete_call): Initialize fn.
4523 (convert_like_real): Delete conditional.
4524 (joust): Initialize *w and *l.
4525 * class.c: Add prototype for binfo_ctor_vtable.
4526 (get_primary_binfo): Initialize result.
4527 * init.c (build_java_class_ref): Initialize name.
4528
4529 2001-07-09 Erik Rozendaal <dlr@acm.org>
4530
4531 * typeck.c (unary_complex_lvalue): Do not duplicate the
4532 argument to modify, pre-, or post-increment when used as an
4533 lvalue and when the argument has side-effects.
4534
4535 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
4536
4537 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4538 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
4539 cplus_decl_attributes even if attrs is NULL.
4540 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4541
4542 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
4543
4544 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
4545 calls to decl_attributes.
4546
4547 2001-07-06 Ira Ruben <ira@apple.com>
4548
4549 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
4550 be DECL_TEMPLATE_RESULT.
4551
4552 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4553
4554 * cp-tree.h (copy_template_template_parm): Rename to ...
4555 (bind_template_template_parm): ... here.
4556 * tree.c (copy_template_template_parm): Rename to ...
4557 (bind_template_template_parm): ... here. Remove the case when
4558 NEWARGS is NULL_TREE.
4559 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
4560 BOUND_TEMPLATE_TEMPLATE_PARM.
4561 * pt.c (lookup_template_class): Adjust.
4562
4563 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
4564
4565 * cvt.c (convert_lvalue): New fn.
4566 * cp-tree.h: Declare it.
4567 * method.c (do_build_assign_ref): Use it.
4568 (do_build_copy_constructor): Convert parm to base types
4569 before calling base constructors.
4570
4571 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
4572 DECL_USER_ALIGN. Check flag_elide_constructors instead of
4573 optimize.
4574 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
4575
4576 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
4577
4578 * optimize.c (optimize_inline_calls): New function, broken out
4579 of ...
4580 (optimize_function): ... here. Call it. Don't inline if it is
4581 a thunk.
4582 (dump_function): Print name of dump flag causing this dump.
4583 * semantics.c (expand_body): Move thunk inline check to
4584 optimize_function.
4585
4586 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
4587
4588 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
4589 (comptypes): Use target.comp_type_attributes.
4590
4591 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
4592
4593 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
4594
4595 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4596
4597 * error.c (lang_print_error_function): Add a `diagnostic_context *'
4598 parameter. Tweak.
4599
4600 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4601
4602 * decl2.c (import_export_class): Update.
4603
4604 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
4605
4606 * error.c (init_error): Adjust settings.
4607
4608 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
4609
4610 * error.c (init_error): Adjust settings.
4611
4612 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
4613
4614 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
4615 return pointers to data members by reference rather than by value.
4616
4617 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
4618
4619 Implement the Named Return Value optimization.
4620 * cp-tree.h (struct cp_language_function): Add x_return_value.
4621 (current_function_return_value): Now a macro.
4622 * decl.c: Don't define it.
4623 (define_label, finish_case_label): Don't clear it.
4624 (init_decl_processing): Don't register it with GC.
4625 * semantics.c (genrtl_finish_function): Don't check it for
4626 no_return_label. Copy the RTL from the return value to
4627 current_function_return_value and walk, calling...
4628 (nullify_returns_r): ...this new fn.
4629 * typeck.c (check_return_expr): Set current_function_return_value.
4630
4631 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
4632
4633 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
4634 sharing a ctor vtable with. Merge code for cases 1 and 2.
4635 (binfo_ctor_vtable): New fn.
4636 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
4637
4638 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
4639
4640 * class.c (dfs_find_final_overrider): Fix logic.
4641
4642 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
4643 virtual thunk instead of non-virtual.
4644 (get_matching_virtual): Uncomment.
4645
4646 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
4647 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
4648 PARM, not ARG.
4649
4650 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
4651
4652 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
4653 we've not emerged from the hierarchy of RTTI_BINFO on reaching
4654 a non-virtual base.
4655
4656 2001-06-13 Mark Mitchell <mark@codesourcery.com>
4657
4658 * NEWS: Update release number.
4659
4660 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
4661
4662 PR c++/3130, c++/3131, c++/3132
4663 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
4664 * class.c (force_canonical_binfo_r): Move
4665 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
4666 virtual bases unless they're primary and what they're primary
4667 too has been moved.
4668 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
4669 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
4670 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
4671 derived binfo.
4672 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
4673 (layout_nonempty_base_or_field): Add most derived type
4674 parameter. Adjust.
4675 (layout_empty_base): Likewise.
4676 (build_base_field): Likewise.
4677 (build_base_fields): Likewise.
4678 (propagate_binfo_offsets): Add most derived type
4679 parameter. Skip non canonical virtual bases too.
4680 (dfs_set_offset_for_unshared_vbases): Don't skip primary
4681 bases. Do skip canonical bases.
4682 (layout_virtual_bases): Adjust.
4683 (layout_class_type): Adjust.
4684 (dfs_get_primary_binfo): Build list of virtual primary base
4685 candidates.
4686 (get_primary_binfo): Check that the shared virtual primary
4687 base candidate was found first.
4688 (accumulate_vtbl_inits): Don't do anything for non-vptr
4689 containing binfos. For case 1 primary virtual bases, keep
4690 checking that we've not emerged from the hierarchy of RTTI_BINFO.
4691
4692 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
4693
4694 PR c++/3089
4695 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
4696 hierarchy looking for primary bases for a ctor
4697 vtable. Recursively call oneself, if we meet our primary via
4698 this route and haven't met it yet via inheritance graph order.
4699
4700 2001-06-11 Mark Mitchell <mark@codesourcery.com>
4701
4702 * lang-options.h: Emit documentation for -fno-honor-std, not
4703 -fhonor-std.
4704
4705 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
4706
4707 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
4708 Don't clobber delta.
4709 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
4710
4711 2001-06-10 Mark Mitchell <mark@codesourcery.com>
4712 Gabriel Dos Reis <gdr@codesourcery.com>
4713
4714 * Make-lang.in (cp/call.o): Depend on diagnostic.h
4715 (cp/typeck.o): Depend on diagnostic.h
4716 (cp/typeck2.o): Depend on diagnostic.h
4717 (cp/repo.o): Depend on dignostic.h
4718 * typeck.c: #include diagnostic.h
4719 (convert_for_initialization): Remove extern declaration for
4720 warningcount and errorcount.
4721
4722 * call.c: #include diagnostic.h
4723 (convert_like_real): Remove extern declaration for warnincount and
4724 errorcount.
4725
4726 * repo.c: #include diagnostic.h
4727 * typeck2.c: #include diagnostic.h
4728
4729 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4730
4731 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
4732 in previous change.
4733
4734 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4735
4736 PR c++/2929
4737 * friend.c (do_friend): Use push_decl_namespace for classes at
4738 namespace scope.
4739
4740 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
4741 Jason Merrill <jason_merrill@redhat.com>
4742
4743 PR c++/3061
4744 * class.c (build_secondary_vtable): Use assert, rather than an error
4745 message.
4746 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
4747 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
4748 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
4749 Don't set BINFO_VTABLE for a primary virtual base.
4750
4751 2001-06-07 Mark Mitchell <mark@codesourcery.com>
4752
4753 * decl.c (duplicate_decls): Update source position information
4754 when a template function is defined.
4755
4756 2001-06-07 Phil Edwards <pme@sources.redhat.com>
4757
4758 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
4759
4760 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
4761
4762 PR c++/2914
4763 * decl.c (pushtag): Don't push into a complete type's scope.
4764
4765 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
4766
4767 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
4768 (struct lang_decl_flags): Lose generate_with_vtable_p.
4769 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
4770 * class.c (copy_virtuals): Adjust.
4771 * decl2.c (mark_vtable_entries): Adjust.
4772 * method.c (make_thunk, build_vtable_entry): Adjust.
4773 * class.c (update_vtable_entry_for_fn): Only look as far as the
4774 first defining class.
4775 (build_vtbl_initializer): Put nothing in the slot for a function only
4776 defined in a lost primary virtual base.
4777 (add_vcall_offset_vtbl_entries_1): Use the same code for
4778 the lost primary case and the normal case.
4779 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
4780 (get_vfield_offset, get_derived_offset): Lose.
4781 (dfs_find_final_overrider): Use look_for_overrides_here.
4782 (get_matching_virtual): New fn.
4783 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
4784 not BV_VCALL_INDEX.
4785 * search.c (look_for_overrides_here): Split out from...
4786 (look_for_overrides_r): Here.
4787
4788 * class.c (find_final_overrider): Return error_mark_node on error.
4789
4790 * decl2.c (key_method): #if 0 accidental change.
4791
4792 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
4793
4794 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
4795 (build_over_call): Likewise.
4796 * decl.c (grokparms): Likewise.
4797 * pt.c (tsubst_decl): Likewise.
4798 * typeck.c (convert_arguments): Likewise.
4799
4800 2001-06-05 Mark Mitchell <mark@codesourcery.com>
4801
4802 * semantics.c (begin_class_definition): Robustify.
4803
4804 * pt.c (instantiate_decl): Tell the repository code about the
4805 clones, not the cloned functions.
4806 * repo.c (repo_template_used): Explicitly instantiate the cloned
4807 function, not the clones.
4808
4809 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4810
4811 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
4812 ICS_BAD_FLAG on created conversion.
4813 (compare_ics): Break out rank.
4814
4815 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4816
4817 * decl.c (xref_tag): Remove extraneous %s on dependent name
4818 lookup warning.
4819
4820 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4821
4822 * class.c (layout_vtable_decl): Fix off by one error on
4823 build_index_type.
4824 (build_vtt): Likewise.
4825 (build_ctor_vtbl_group): Likewise.
4826
4827 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
4828
4829 * class.c (maybe_indent_hierarchy): New function.
4830 (dump_class_hierarchy_r): Add flags. Dump extra binfo
4831 information, if enabled. Use maybe_indent_hierarchy. Adjust
4832 output format.
4833 (dump_class_hierarchy): Adjust prototype. Adjust output format.
4834 (dump_array, dump_vtable, dump_vtt): New functions.
4835 (finish_struct_1): Adjust hierarchy dumping.
4836 (initialize_vtable): Call dump_vtable.
4837 (build_vtt): Call dump_vtt.
4838 (build_ctor_vtbl_group): Call dump_vtable.
4839 * decl2.c (flag_dump_class_layout): Remove.
4840 (cxx_decode_option): Remove dump translation unit
4841 and dump class hierarchy check. Call dump_switch_p.
4842 (finish_file): Adjust dumping.
4843 (dump.c): Only dump base classes if not TDF_SLIM.
4844 Only dump namespace members if not TDF_SLIM.
4845 * optimize.c (dump_function): New function.
4846 (optimize_function): Call dump_function.
4847 * semantics.c (expand_body): Use dump_enabled_p.
4848
4849 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
4850
4851 PR g++/2936
4852 Part missed from first commit
4853 * decl2.c (finish_anon_union): Copy context.
4854
4855 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
4856
4857 PR g++/2936
4858 * optimize.c (remap_decl): Remap anonymous aggregate members too.
4859
4860 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
4861
4862 PR g++/2823
4863 * semantics.c (expand_body): Don't optimize thunks.
4864
4865 2001-05-25 Sam TH <sam@uchicago.edu>
4866
4867 * cp-tree.h lex.h: Fix header include guards.
4868
4869 2001-05-25 Mark Mitchell <mark@codesourcery.com>
4870
4871 * decl.c (init_decl_processing): Tweak.
4872
4873 2001-05-24 Mark Mitchell <mark@codesourcery.com>
4874
4875 * decl.c (duplicate_decls): Tidy.
4876 (init_decl_processing): Always set flag_no_builtin.
4877
4878 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
4879
4880 PR c++/2184
4881 * decl2.c (do_local_using_decl): Push the decls, even in a
4882 template.
4883
4884 2001-05-22 Mark Mitchell <mark@codesourcery.com>
4885
4886 * optimize.c (initialize_inlined_parameters): Don't set
4887 TREE_READONLY for a VAR_DECL taking the place of an inlined
4888 PARM_DECL.
4889
4890 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
4891
4892 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
4893 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
4894 attribute.
4895
4896 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
4897
4898 * parse.y: Refer to compound literals as such, not as
4899 constructor-expressions.
4900
4901 2001-05-21 Mark Mitchell <mark@codesourcery.com>
4902
4903 * call.c (build_op_delete_call): Ignore exception-specifications
4904 when looking for matching delete operators.
4905 * init.c (build_new_1): Compute whether or not the allocation
4906 function used is a placement allocation function or not, and
4907 communicate this information to build_op_delete_call.
4908
4909 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
4910
4911 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
4912 (build_vtbl_ref): Adjust.
4913 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
4914 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
4915 Re-add vtable-gc.
4916 (unsupported_options): Correspondingly.
4917
4918 * decl2.c (maybe_make_one_only): Check flag_weak, not
4919 supports_one_only().
4920
4921 * cp-tree.def (START_CATCH_STMT): Lose.
4922 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
4923 * tree.c (cp_statement_code_p): Don't case it.
4924 * semantics.c (cp_expand_stmt): Likewise.
4925 * cp-tree.h (START_CATCH_TYPE): Lose.
4926 (HANDLER_TYPE): New.
4927 * except.c (expand_start_catch_block): Don't start any blocks.
4928 Return the type.
4929 (expand_end_catch_block): Don't end any blocks.
4930 * parse.y (handler): Don't pass anything from finish_handler_parms
4931 to finish_handler.
4932 * pt.c (tsubst_expr): Likewise.
4933 * semantics.c (begin_handler): Call note_level_for_catch here.
4934 (finish_handler_parms): Don't return anything.
4935 (genrtl_catch_block, begin_catch_block): Lose.
4936 (genrtl_handler): Call expand_start_catch here.
4937
4938 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
4939
4940 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
4941 (get_vtable_decl, build_vtt): Not here.
4942
4943 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
4944
4945 PR c++/2781
4946 * optimize.c (update_cloned_parm): Copy addressability and other
4947 flags.
4948
4949 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4950
4951 * pt.c (determine_specialization): Ignore artificial functions.
4952
4953 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
4954
4955 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
4956 (C_RID_CODE): Remove.
4957 * lex.c (cxx_init_options): Call set_identifier_size. Update.
4958 (init_parse): Don't do it here.
4959
4960 2001-05-18 Diego Novillo <dnovillo@redhat.com>
4961
4962 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
4963 function declaration to avoid stripping the symbol's attributes.
4964
4965 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
4966
4967 * decl.c (pushdecl): Adjust error string.
4968 (xref_tag): Adjust friend class injection warning. Remove the
4969 inherited name from the class shadowed scope.
4970
4971 2001-05-17 Mark Mitchell <mark@codesourcery.com>
4972
4973 * except.c (cp_protect_cleanup_actions): New function.
4974 (init_exception_processing): Don't set protect_cleanup_actions
4975 here. Do set lang_protect_cleanup_actions.
4976
4977 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
4978
4979 * spew.c (read_token): Call yyerror on all unexpected tokens.
4980
4981 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
4982
4983 * init.c (member_init_ok_or_else): Take a tree rather than
4984 string for name.
4985 (expand_member_init): Adjust.
4986
4987 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
4988
4989 * decl.c (duplicate_decls): Suppress warning about duplicate
4990 decls if the first decl is a friend.
4991
4992 2001-05-12 Zack Weinberg <zackw@stanford.edu>
4993
4994 * except.c (choose_personality_routine): Export. Add
4995 explanatory comment. Take an enum languages, not a boolean.
4996 (initialize_handler_parm): Adjust to match.
4997 * cp-tree.h: Prototype choose_personality_routine.
4998 * lex.c (handle_pragma_java_exceptions): New function.
4999 (init_cp_pragma): Register #pragma GCC java_exceptions.
5000
5001 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5002
5003 * method.c (build_mangled_C99_name): Remove unused prototype.
5004
5005 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
5006
5007 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
5008 * typeck.c (get_member_function_from_ptrfunc,
5009 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
5010 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
5011
5012 Reverted Geoff Keating's 2001-05-03's patch.
5013
5014 2001-05-11 Ira Ruben <ira@apple.com>
5015
5016 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
5017
5018 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
5019
5020 * cp-tree.h (finish_label_expr, lookup_label): Delete.
5021 * parse.y: Update for '&&'; don't issue warning here.
5022 * semantics.c (finish_label_expr): Delete.
5023
5024 2001-05-07 Mark Mitchell <mark@codesourcery.com>
5025
5026 * splay-tree.h (splay_tree_max): New function.
5027 (splay_tree_min): Likewise.
5028
5029 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
5030
5031 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
5032 (pfn_vflag_identifier): Define.
5033 Update comment about layout of pointer functions.
5034 (build_ptrmemfunc1): Update prototype.
5035 (expand_ptrmemfunc_cst): Update prototype.
5036 * decl.c (initialize_predefined_identifiers): Initialize
5037 pfn_vflag_identifier.
5038 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
5039 an extra field to the type.
5040 * expr.c (cplus_expand_constant): Pass 'flag' between
5041 expand_ptrmemfunc_cst and build_ptrmemfunc1.
5042 * typeck.c (get_member_function_from_ptrfunc): When
5043 FUNCTION_BOUNDARY < 16, look at additional field to determine
5044 if a pointer-to-member is a real pointer or a vtable offset.
5045 (build_ptrmemfunc1): Add new parameter to contain extra field.
5046 (build_ptrmemfunc): Pass the extra field around.
5047 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
5048 (pfn_from_ptrmemfunc): Ignore the extra field.
5049
5050 2001-05-03 Mark Mitchell <mark@codesourcery.com>
5051
5052 * cp-tree.h (flag_inline_trees): Update documentation.
5053 * decl.c (init_decl_processing): Adjust handling of
5054 flag_inline_functions and flag_inline_trees to support -O3.
5055 (grokfndecl): Set DECL_INLINE on all functions if that's what
5056 the user requested.
5057 (save_function_data): Clear DECL_INLINE in
5058 current_function_cannot_inline is non-NULL.
5059 * decl2.c (flag_inline_trees): Update documentation.
5060
5061 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
5062
5063 * dump.c (cp_dump_tree, USING_STMT case): New case.
5064 * tree.c (cp_statement_code_p): Add USING_STMT.
5065 * decl2.c (do_using_directive): Add the using directive statement.
5066
5067 * tree.c (walk_tree): Reformat an if block.
5068
5069 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5070
5071 * decl.c (compute_array_index_type): Don't try to do anything with
5072 the indices when processing a template.
5073
5074 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5075
5076 * call.c: NULL_PTR -> NULL.
5077 * class.c: Likewise.
5078 * cvt.c: Likewise.
5079 * decl.c: Likewise.
5080 * decl2.c: Likewise.
5081 * except.c: Likewise.
5082 * init.c: Likewise.
5083 * rtti.c: Likewise.
5084 * search.c: Likewise.
5085 * tree.c: Likewise.
5086 * typeck.c: Likewise.
5087 * typeck2.c: Likewise.
5088
5089 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5090
5091 * decl2.c (do_using_directive): Revert previous patch.
5092
5093 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5094
5095 * cp-tree.def (USING_STMT): New statement node.
5096 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
5097 * decl2.c (do_using_directive): Add USING_STMT to statement
5098 tree. Don't emit errors when processing template decl.
5099 * pt.c (tsubst_expr, USING_STMT case): New case.
5100 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
5101
5102 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5103
5104 * call.c (build_new_op): Convert args from reference here.
5105 (build_conditional_expr): Don't convert here.
5106
5107 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5108
5109 * spew.c (last_token_id): New static variable.
5110 (read_token): Set it here.
5111 (yyerror): Use it here.
5112
5113 2001-04-30 Richard Henderson <rth@redhat.com>
5114
5115 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
5116 * decl.c: Likewise.
5117
5118 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5119
5120 * gxxint.texi: Remove.
5121 * Make-lang.in: Remove all traces of gxxint.texi.
5122
5123 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
5124
5125 * decl2.c (start_static_initialization_or_destruction): Correct
5126 logic to handle the -fno-use-cxa-atexit case.
5127
5128 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5129
5130 * optimize.c (update_cloned_parm): New function.
5131 (maybe_clone_body): Use it. Update the `this' parameter too.
5132
5133 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
5134
5135 * decl2.c (unsupported_options): Add new-abi.
5136 * lang-options.h: Remove no longer supported options.
5137
5138 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5139
5140 * except.c (can_convert_eh): Don't check template parms,
5141 typename types etc.
5142
5143 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5144
5145 * optimize.c (maybe_clone_body): Copy parameter names and locations.
5146
5147 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5148
5149 * cp-tree.h (adjust_clone_args): Prototype new function.
5150 * class.c (adjust_clone_args): New function.
5151 * decl.c (start_function): Call it for in charge ctors.
5152
5153 2001-04-26 Mark Mitchell <mark@codesourcery.com>
5154
5155 * method.c (use_thunk): Make sure that thunks really are emitted
5156 when requested.
5157
5158 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
5159
5160 * mangle.c (write_chars): New macro.
5161 (hwint_to_ascii): New function
5162 (write_number): Use it.
5163 (write_integer_cst): Deal with really big numbers.
5164
5165 2001-04-25 Mark Mitchell <mark@codesourcery.com>
5166
5167 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
5168 the clone.
5169
5170 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
5171
5172 * decl.c (grokdeclarator): Set context of namespace scope
5173 TYPE_DECLS.
5174
5175 2001-04-24 Zack Weinberg <zackw@stanford.edu>
5176
5177 * cp/optimize.c: Include hashtab.h.
5178 (struct inline_data): Add tree_pruner.
5179 (expand_call_inline, expand_calls_inline): Use it when calling
5180 walk_tree.
5181 (optimize_function): Initialize and free tree_pruner.
5182
5183 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5184
5185 Lazy __FUNCTION__ generation.
5186 * cp-tree.def (FUNCTION_NAME): Remove.
5187 * cp-tree.h (function_name_declared_p): Remove.
5188 (cp_fname_init): Prototype.
5189 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
5190 don't call declare_function_name. Call start_fname_decls.
5191 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
5192 clobber the line number.
5193 (cp_fname_init): New function.
5194 (start_function): Call start_fname_decls.
5195 (finish_function): Call finish_fname_decls.
5196 * lex.c (reswords): Add slots for __FUNCTION__ et al.
5197 (rid_to_yy): Add mappings for __FUNCTION__ et al.
5198 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
5199 * parse.y (VAR_FUNC_NAME): New token.
5200 (primary): Add VAR_FUNC_NAME.
5201 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
5202 generation.
5203 (tsubst, FUNCTION_NAME case): Remove.
5204 (tsubst_copy, FUNCTION_NAME case): Remove.
5205 (tsubst_expr, DECL_STMT case): Be careful with a
5206 DECL_PRETTY_FUNCTION_P.
5207 (instantiate_decl): Remove function_name_declared_p.
5208 * semantics.c (begin_compound_statement): Don't call
5209 declare_function_name here.
5210 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
5211 (finish_translation_unit): Call finish_fname_decls.
5212 (expand_body): Remove function_name_declared_p.
5213 * typeck2.c (digest_init): Allow any ERROR_MARK.
5214
5215 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5216
5217 * pt.c (tsubst_decl): Use VOID_TYPE_P.
5218 * semantics.c: Fix some typos.
5219
5220 2001-04-23 Phil Edwards <pme@sources.redhat.com>
5221
5222 * cp/decl2.c (flag_honor_std): Always initialize to 1.
5223
5224 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5225
5226 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
5227
5228 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
5229
5230 * except.c (build_throw): Wrap the initialization of the exception
5231 object in a MUST_NOT_THROW_EXPR.
5232 (do_free_exception): #if 0.
5233
5234 2001-04-20 Mark Mitchell <mark@codesourcery.com>
5235
5236 * cp-tree.h (finish_enum): Change prototype.
5237 * decl.c (finish_enum): Reorganize.
5238 * parse.y (structsp): Adjust calls to finish_enum.
5239
5240 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
5241
5242 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
5243 't' case.
5244
5245 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
5246
5247 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
5248 (layout_empty_base): Return at end flag.
5249 (build_base_field): Likewise.
5250 (build_base_fields): Likewise.
5251 (layout_virtual_bases): Don't add 1 to eoc value.
5252 (end_of_class): Use full size for empty bases.
5253 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
5254 empty bases. Don't add 1 to eoc value. Only add trailing padding
5255 if we're an empty class with no empty bases.
5256 (dump_class_hierarchy): Dump size and alignment.
5257
5258 2001-04-20 Jakub Jelinek <jakub@redhat.com>
5259
5260 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
5261 ICS_BAD_FLAG.
5262
5263 2001-04-20 Jakub Jelinek <jakub@redhat.com>
5264
5265 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
5266 is found, look first if name does not match the structure name.
5267
5268 2001-04-19 Mark Mitchell <mark@codesourcery.com>
5269
5270 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
5271 set.
5272 (SET_DECL_LANGUAGE): New macro.
5273 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
5274 (pushdecl): Likewise.
5275 (build_library_fn_1): Likewise.
5276 (build_cp_library_fn): Likewise.
5277 (grokfndecl): Likewise.
5278 (grokvardecl): Mark `extern "C"' variables as having C linkage.
5279 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
5280 * lex.c (retrofit_lang_decl): Likewise.
5281 * mangle.c (mangle_decl_string): Don't mangle the names of
5282 variables declared with C language linkage.
5283 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
5284
5285 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
5286
5287 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
5288 flag_access_control from uninitialized storage.
5289
5290 2001-04-15 Mark Mitchell <mark@codesourcery.com>
5291
5292 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
5293 * mangle.c (write_pointer_to_member_type): Fix mangling of
5294 pointers to cv-qualified member function types.
5295
5296 * init.c (build_delete): Create a SAVE_EXPR for the address if
5297 we're going to use it more than once.
5298
5299 2001-04-13 Mark Mitchell <mark@codesourcery.com>
5300
5301 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
5302 (expand_ptremfunc_cst): Change prototype.
5303 (delta2_from_ptrmemfunc): Remove.
5304 * expr.c (cplus_expand_constant): Adjust call to
5305 expand_ptrmemfunc_cst.
5306 * typeck.c (build_ptrmemfunc1): Simplify.
5307 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
5308 results in a constant.
5309 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
5310 (delta2_from_ptrmemfunc): Remove.
5311 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
5312
5313 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
5314
5315 * cp-tree.h (decl_namespace_list): New macro.
5316 (struct saved_scope): Add decl_ns_list.
5317 * decl.c (mark_saved_scope): Mark it.
5318 * decl2.c: Lose static decl_namespace_list.
5319 (init_decl2): Don't save it.
5320
5321 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5322
5323 * cp-tree.h (warn_return_type, yylex): Delete redundant
5324 declarations.
5325
5326 * decl.c (current_class_depth, global_namespace): Likewise.
5327
5328 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
5329
5330 * repo.c (flag_use_repository): Likewise.
5331
5332 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5333
5334 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
5335 set_block, pushdecl, getdecls, gettags, init_decl_processing,
5336 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
5337 lvalue_or_else, print_lang_statistics, comp_target_types,
5338 unsigned_type, signed_type, signed_or_unsigned_type,
5339 build_function_call, mark_addressable, incomplete_type_error):
5340 Delete redundant declarations.
5341
5342 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
5343
5344 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
5345 (TYPE_ANONYMOUS_P): New macro.
5346 (TAGGED_TYPE_P): New macro.
5347 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
5348 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
5349 * tree.c (no_linkage_helper): Likewise.
5350 * semantics.c (begin_class_definition): Likewise.
5351 * pt.c (convert_template_argument): Likewise.
5352 * lex.c (check_for_missing_semicolon): Likewise.
5353
5354 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
5355
5356 * class.c (dfs_unshared_virtual_bases): New function.
5357 (mark_primary_bases): Call it.
5358 (check_bases): Ignore virtual bases when determining
5359 nearly-emptiness.
5360
5361 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
5362
5363 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
5364
5365 2001-04-11 Mark Mitchell <mark@codesourcery.com>
5366
5367 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
5368 cloned function to the clone.
5369
5370 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5371
5372 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
5373
5374 * semantics.c: Include expr.h.
5375
5376 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
5377
5378 * method.c (implicitly_declare_fn): Commonize code for copy ctor
5379 and assignment op. Set TREE_USED for parameter.
5380
5381 2001-04-10 Mark Mitchell <mark@codesourcery.com>
5382
5383 * class.c (find_final_overrider_data): Add `candidates'.
5384 (dfs_find_final_overrider): Don't issue error messages
5385 prematurely.
5386 (find_final_overrider): Issue error messages here.
5387 (build_base_field): Don't warn about amgibuous direct bases here.
5388 (warn_about_ambiguous_direct_bases): New function.
5389 (layout_class_type): Use it.
5390
5391 2001-04-10 Richard Henderson <rth@redhat.com>
5392
5393 * typeck.c (build_array_ref): Push the array reference inside
5394 COMPOUND_EXPR and COND_EXPR.
5395
5396 2001-04-05 Mark Mitchell <mark@codesourcery.com>
5397
5398 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
5399 * decl.c (duplicate_decls): Adjust accordingly.
5400 (maybe_commonize_var): Likewise.
5401 (grokfndecl): Likewise.
5402 (start_function): Likewise.
5403 (start_method): Likewise.
5404 * decl2.c (key_method): Likewise.
5405 (import_export_decl): Likewise.
5406 * method.c (implicitly_declare_fn): Likewise.
5407 * optimize.c (maybe_clone_body): Likewise.
5408
5409 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
5410
5411 * lang-specs.h: Add __DEPRECATED.
5412
5413 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
5414
5415 * search.c (get_dynamic_cast_base_type): When building a new
5416 constant, set its type to ssizetype.
5417
5418 2001-04-04 Jakub Jelinek <jakub@redhat.com>
5419
5420 * optimize.c (expand_call_inline): Only add newly inlined statements
5421 into inlined_stmts.
5422
5423 2001-04-03 Mark Mitchell <mark@codesourcery.com>
5424
5425 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
5426 (OPERATOR_FORMAT): Likewise.
5427 (OPERATOR_TYPENAME_FORMAT): Likewise.
5428 * operators.def: Remove old name-mangling information.
5429 * decl.c (grok_op_properties): Adjust accordingly.
5430 * lex.c (init_operators): Likewise.
5431 * rtti.c (get_tinfo_decl): Issue error messages about types that
5432 have variable size.
5433
5434 2001-04-03 Mark Mitchell <mark@codesourcery.com>
5435
5436 * decl2.c (import_export_decl): Don't call import_export_class
5437 when processing an inline member function.
5438 * semantics.c (expand_body): Call import_export_decl before
5439 emitting inline functions.
5440
5441 2001-03-28 Richard Henderson <rth@redhat.com>
5442
5443 IA-64 ABI Exception Handling:
5444 * cp-tree.def (EH_SPEC_BLOCK): New.
5445 (MUST_NOT_THROW_EXPR): New.
5446 * cp-tree.h: Update changed function declarations.
5447 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
5448 (CPTI_CALL_UNEXPECTED): New.
5449 (struct cp_language_function): Rename x_eh_spec_try_block
5450 to x_eh_spec_block.
5451 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
5452 * decl.c (current_binding_level): If no current function
5453 bindings, revert to scope_chain.
5454 (initialize_predefined_identifiers): Remove __cp_push_exception.
5455 (store_parm_decls): Use begin_eh_spec_block.
5456 (finish_function): Use finish_eh_spec_block.
5457 (mark_lang_function): Update for name changes.
5458 * decl2.c (finish_file): No mark_all_runtime_matches.
5459 * dump.c (cp_dump_tree): Handle new tree codes.
5460 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
5461 * except.c (catch_language_init, catch_language): Remove.
5462 (init_exception_processing): Don't set language code.
5463 Initialize call_unexpected_node, protect_cleanup_actions,
5464 eh_personality_libfunc, lang_eh_runtime_type.
5465 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
5466 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
5467 (prepare_eh_type): Split out type canonicalizations ...
5468 (build_eh_type_type): ... from here.
5469 (build_eh_type_type_ref): Remove.
5470 (mark_all_runtime_matches): Remove.
5471 (build_exc_ptr): New.
5472 (do_begin_catch, do_end_catch): New.
5473 (do_pop_exception): Remove.
5474 (build_terminate_handler): Remove.
5475 (choose_personality_routine): Split out language choice from ...
5476 (initialize_handler_parm): ... here.
5477 Use MUST_NOT_THROW_EXPR.
5478 (expand_start_catch_block): Use do_begin_catch. Simplify Java
5479 exception object handling.
5480 (expand_start_eh_spec, expand_end_eh_spec): Remove.
5481 (expand_exception_blocks, alloc_eh_object): Remove.
5482 (begin_eh_spec_block, finish_eh_spec_block): New.
5483 (do_allocate_exception, do_free_exception): New.
5484 (expand_throw): Merge into ...
5485 (build_throw): ... here. Update for abi.
5486 * expr.c (cplus_expand_expr): No expand_internal_throw.
5487 Handle MUST_NOT_THROW_EXPR.
5488 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
5489 * semantics.c (*) Update for except.h name changes.
5490 (genrtl_try_block): No protect_with_terminate.
5491 (genrtl_eh_spec_block): New.
5492 (genrtl_handler): Don't emit the goto here.
5493 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
5494 (genrtl_finish_function): Don't expand_exception_blocks.
5495 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
5496
5497 2001-03-28 Richard Henderson <rth@redhat.com>
5498
5499 * decl.c (struct named_label_list): Rename eh_region to
5500 in_try_scope, add in_catch_scope.
5501 (struct binding_level): Rename eh_region to is_try_scope,
5502 add is_catch_scope.
5503 (note_level_for_try): Rename from note_level_for_eh.
5504 (note_level_for_catch): New.
5505 (poplevel): Copy both is_try_scope and is_catch_scope to
5506 the named_label_list struct.
5507 (check_previous_goto_1): Don't check for catch block via
5508 DECL_ARTIFICIAL; use in_try_scope instead.
5509 (check_goto): Likewise.
5510 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
5511 * except.c (expand_start_catch_block): Call note_level_for_catch.
5512 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
5513
5514 2001-03-27 Richard Henderson <rth@redhat.com>
5515
5516 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
5517 exceptions_via_longjmp.
5518
5519 2001-03-27 Phil Edwards <pme@sources.redhat.com>
5520
5521 * pt.c (check_default_tmpl_args): Make error messages clearer.
5522
5523 2001-03-26 Phil Edwards <pme@sources.redhat.com>
5524
5525 * error.c: Also undefine 'A' macro used for cp_printers definition.
5526
5527 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5528
5529 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5530
5531 2001-03-26 Mike Yang <yang@research.att.com>
5532 Mark Mitchell <mark@codesourcery.com>
5533
5534 * dump.c (dump_access): New function.
5535 (cp_dump_tree): Use it. Dump basetype information for class
5536 types.
5537
5538 2001-03-26 Mark Mitchell <mark@codesourcery.com>
5539
5540 * Makefile.in (optimize.o): Depend on params.h.
5541 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
5542 (init_decl_processing): Set flag_no_inline when doing
5543 inlining-on-trees.
5544 * optimize.c: Include params.h.
5545 (struct inline_data): Improve documentation of FNS. Add
5546 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
5547 (INSNS_PER_STMT): New macro.
5548 (remap_block): Use CLONING_P.
5549 (inlinable_function_p): Don't inline big functions.
5550 (expand_call_inline): Keep track of how much inlining we've done.
5551 (optimize_function): Set FIRST_INLINED_FN.
5552 (maybe_clone_body): Set CLONING_P.
5553 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
5554 tree nodes.
5555 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
5556 rest_of_compilation. Clear DECL_RTL for local variables
5557 afterwards.
5558 (clear_decl_rtl): New function.
5559
5560 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
5561
5562 Implement DR 209
5563 * cp-tree.h (skip_type_access_control,
5564 reset_type_access_control): Prototype.
5565 * decl.c (grokdeclarator): Access of friends is not checked.
5566 * parse.y (component_decl_list): Reset type access control.
5567 * semantics.c (decl_type_access_control): Clear
5568 current_type_lookups.
5569 (save_type_access_control): Don't save if not deferring.
5570 (skip_type_access_control, reset_type_access_control): New
5571 functions.
5572 (begin_class_definition): Do type access control for basetypes.
5573 Start deferred access control.
5574 (finish_class_definition): Resume immediate access control if
5575 this is a local class.
5576
5577 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5578
5579 * class.c (add_method): Use memcpy/memmove, not bcopy.
5580
5581 * decl.c (duplicate_decls): Likewise.
5582
5583 2001-03-23 Jakub Jelinek <jakub@redhat.com>
5584
5585 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
5586 not `_'.
5587
5588 2001-03-23 Jakub Jelinek <jakub@redhat.com>
5589
5590 * decl.c (local_names): Define.
5591 (push_local_name): New.
5592 (grok_reference_init): Return init if initializing static reference
5593 variable with non-constant instead of emitting it.
5594 Move expand_static_init call to cp_finish_decl.
5595 (layout_var_decl): Call push_local_name.
5596 (maybe_commonize_var): Allow inlining functions even if they have
5597 static local variables, use comdat_linkage for them if flag_weak.
5598 (check_initializer): Call obscure_complex_init if
5599 grok_reference_init returned non-zero.
5600 (save_function_data): Clear x_local_names.
5601 (pop_cp_function_context): Free x_local_names.
5602 (mark_inlined_fns): Remove.
5603 (mark_lang_function): Mark x_local_names.
5604 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
5605 Mark inlined_fns as tree, remove call to mark_inlined_fns.
5606 * class.c (alter_access): Ensure DECL_ACCESS is never set if
5607 DECL_DISCRIMINATOR_P.
5608 * cp-tree.h (cp_language_function): Add x_local_names.
5609 (lang_decl_flags): Add discriminator into u2.
5610 (lang_decl_inlined_fns): Remove.
5611 (lang_decl): inlined_fns is now a TREE_VEC.
5612 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
5613 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
5614 TREE_VEC, not a custom structure.
5615 (optimize_function): Likewise.
5616 * mangle.c (discriminator_for_local_entity): Discriminate among
5617 VAR_DECL local entities.
5618 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
5619 is not valid.
5620
5621 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
5622
5623 Add support for Java interface method calls.
5624 * cp-tree.h (struct lang_type): Add java_interface flag.
5625 (TYPE_JAVA_INTERFACE): New macro.
5626 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
5627 by setting TYPE_JAVA_INTERFACE.
5628 * call.c (java_iface_lookup_fn): New static.
5629 (build_over_call): If calling a method declared in a
5630 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
5631 expression which resolves the function address.
5632 (build_java_interface_fn_ref): New function.
5633
5634 2001-03-22 Richard Henderson <rth@redhat.com>
5635
5636 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
5637 * except.c: Don't include it.
5638
5639 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
5640 based on an idea from Joe Buck <jbuck@synopsys.com>
5641
5642 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
5643 New nonterminals.
5644 (data_def, component_decl): Add reductions to bad_decl.
5645
5646 2001-03-22 Jakub Jelinek <jakub@redhat.com>
5647
5648 * method.c (do_build_assign_ref): Don't use build_modify_expr for
5649 anonymous aggregates, since they don't have assignment operator
5650 method.
5651 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
5652 assignment operators for anonymous structure fields.
5653
5654 2001-03-21 Jason Merrill <jason@redhat.com>
5655
5656 * pt.c (instantiate_decl): Abort if we see a member constant
5657 instantiation that doesn't already have its initializer.
5658 Downgrade explicit instantiation without definition to pedwarn.
5659
5660 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
5661 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
5662 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
5663
5664 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
5665 (pending_vtables): Remove.
5666 * decl2.c (pending_vtables): Remove.
5667 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
5668 CLASSTYPE_VTABLE_NEEDS_WRITING.
5669 (import_export_class): Likewise.
5670 (init_decl2): Don't mark pending_vtables.
5671 * lex.c (handle_pragma_vtable): Just sorry.
5672 * pt.c (instantiate_class_template): Don't mess with
5673 CLASSTYPE_VTABLE_NEEDS_WRITING.
5674 (mark_class_instantiated): Likewise.
5675 * ptree.c (print_lang_type): Don't print it.
5676 * semantics.c (begin_class_definition): Don't set it.
5677
5678 * pt.c (template_tail): Replace with last_pending_template.
5679 (maybe_templates, maybe_template_tail): Remove.
5680 (add_pending_template): Adjust.
5681 (instantiate_pending_templates): Adjust.
5682
5683 * cp-tree.h (struct saved_scope): Remove lang_stack field.
5684 (current_lang_stack): Remove.
5685 * decl.c (maybe_push_to_top_level): Don't initialize it.
5686 (duplicate_decls): Use current_lang_depth.
5687 (xref_basetypes): Likewise.
5688 * class.c (current_lang_depth): New fn.
5689 (push_lang_context): Use more varray functionality.
5690 (pop_lang_context): Likewise.
5691
5692 * error.c (GLOBAL_THING): Always use '__'.
5693
5694 2001-03-21 Mark Mitchell <mark@codesourcery.com>
5695
5696 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
5697
5698 * mangle.c (mangle_decl_string): Mangle the names of overloaded
5699 operators, even when they have `extern "C"' linkage.
5700
5701 2001-03-19 Mark Mitchell <mark@codesourcery.com>
5702
5703 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
5704 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5705 where it's not necessary.
5706 (add_method): Remove optimization involving comparison of
5707 DECL_ASSEMBLER_NAME.
5708 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
5709 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5710 where it's not necessary.
5711 (check_methods): Likewise.
5712 (build_clone): Likewise.
5713 (built_vtt): Likewise.
5714 * cp-tree.h (DECL_NEEDED_P): Likewise.
5715 * decl.c (pushtag): Likewise.
5716 (duplicate_decls): Likewise.
5717 (pushdecl): Likewise.
5718 (builtin_function): Likewise.
5719 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
5720 (build_cp_library_fn): Likewise.
5721 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
5722 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5723 where it's not necessary.
5724 (make_rtl_for_nonlocal_decl): Likewise.
5725 (cp_finish_decl): Likewise.
5726 (grokfndecl): Likewise.
5727 (grokvardecl): Likewise.
5728 (grokdeclarator): Likewise.
5729 (start_function): Likewise.
5730 (cp_missing_return_ok_p): Likewise.
5731 * decl2.c (grokclassfn): Likewise.
5732 (check_classfn): Likewise.
5733 (finish_static_data_member_decl): Likewise.
5734 (grokfield): Likewise.
5735 * error.c (GLOBAL_IORD_P): Remove.
5736 (dump_global_iord): Improve output.
5737 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
5738 * except.c (nothrow_libfn_p): Summarily reject any function not in
5739 namespace-scope.
5740 * init.c (build_java_class_ref): Don't explicitly set
5741 DECL_ASSEMBLER_NAME after calling mangle_decl.
5742 * mangle.c (mangle_decl_string): Handle extern "C" functions.
5743 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
5744 * method.c (set_mangled_name_for_decl): Don't explicitly set
5745 DECL_ASSEMBLER_NAME after calling mangle_decl.
5746 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
5747 IDENTIFIER_GLOBAL_VALUE for the thunk.
5748 * pt.c (set_mangled_name_for_template_decl): Remove.
5749 (check_explicit_specialization): Don't use it.
5750 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
5751 (tsubst_friend_function): Likewise.
5752 (tsubst_decl): Likewise.
5753 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
5754 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
5755 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
5756 where it's not necessary.
5757 (tinfo_base_init): Likewise.
5758 (create_real_tinfo_var): Likewise.
5759 * search.c (looup_field_1): Likewise.
5760 * semantics.c (finish_named_return_value): Likewise.
5761 * tree.c (init_tree): Set lang_set_decl_assembler_name.
5762
5763 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
5764
5765 Correct semantics restrictions checking in throw-expression.
5766 * except.c (is_admissible_throw_operand): New function.
5767 (build_throw): Use it.
5768
5769 2001-03-14 Mark Mitchell <mark@codesourcery.com>
5770
5771 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
5772 and its ilk.
5773
5774 2001-03-14 Mark Mitchell <mark@codesourcery.com>
5775
5776 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5777 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
5778 * decl.c (duplicate_decls): Likewise.
5779 (builtin_function): Likewise.
5780 (build_library_fn): Likewise.
5781 (build_cp_library_fn): Likewise.
5782 (check_initializer): Likewise.
5783 (cp_finish_decl): Likewise.
5784 * decl2.c (grokfield): Likewise.
5785 (grok_function_init): Remove #if 0'd code.
5786 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5787 * friend.c (do_friend): Likewise.
5788 * init.c (get_temp_regvar): Likewise.
5789 * method.c (make_thunk): Likewise.
5790 * pt.c (tsubst_friend_function): Likewise.
5791 (tsubst_decl): Likewise.
5792 (regenerate_decl_from_template): Likewise.
5793 * semantics.c (genrtl_named_return_value): Likewise.
5794 (expand_body): Likewise.
5795 (genrtl_finish_function): Likewise.
5796 * tree.c (cp_tree_equal): Likewise.
5797
5798 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
5799
5800 * call.c (convert_like_real): Add extra semantics to INNER
5801 parameter. Don't convert to temporary if a user conversion
5802 gives us an lvalue that we're about to bind to a reference.
5803 Set INNER to indicate pending reference binding on recursive
5804 calls.
5805
5806 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
5807
5808 * cp/lex.c: Delete duplicate pending_lang_change.
5809
5810 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
5811
5812 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
5813 Similarly.
5814 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
5815 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
5816
5817 2001-03-09 Zack Weinberg <zackw@stanford.edu>
5818
5819 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
5820
5821 2001-03-08 Stan Shebs <shebs@apple.com>
5822
5823 * cp-tree.h (set_identifier_local_value): Remove unused decl.
5824
5825 2001-03-06 Zack Weinberg <zackw@stanford.edu>
5826
5827 * spew.c: Remove references to CPP_OSTRING.
5828
5829 2001-03-06 Andrew Haley <aph@redhat.com>
5830
5831 * typeck.c (convert_arguments): Check that we have an fndecl.
5832
5833 2001-03-05 Andrew Haley <aph@redhat.com>
5834
5835 * typeck.c (convert_arguments): Don't do ellipsis conversion for
5836 __built_in_constant_p.
5837
5838 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5839
5840 * typeck.c (build_static_cast): Allow enum to enum conversions
5841 as per DR 128.
5842
5843 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5844
5845 * class.c (check_field_decls): Pointers to member do not a
5846 non-pod struct make, as per DR 148.
5847
5848 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
5849
5850 * call.c (joust): cp_pedwarn when using gnu extension concerning
5851 worst conversion sequences.
5852
5853 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5854
5855 * decl.c: Replace all uses of 'boolean' with 'bool'.
5856
5857 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5858
5859 * lang-specs.h: Add zero initializer for cpp_spec field to
5860 all array elements that need one. Don't put an #ifdef inside
5861 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
5862 use it.
5863
5864 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
5865
5866 Implement using decls inside template functions.
5867 * decl2.c (validate_nonmember_using_decl): Don't special case
5868 fake_std_node in the global namespace. Don't reject early when
5869 processing a template.
5870 (do_local_using_decl): Add to statement tree. Don't do further
5871 processing when building a template.
5872 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
5873
5874 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
5875
5876 * decl2.c (do_nonmember_using_decl): Don't complain if we find
5877 same function. Do complain about ambiguating extern "C"
5878 declarations.
5879
5880 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
5881
5882 Remove floating point and complex type template constant parms.
5883 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
5884 COMPLEX_TYPE extensions.
5885 (invalid_nontype_parm_type_p): Likewise.
5886
5887 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
5888
5889 * except.c (call_eh_info): Revert "match_function"'s type.
5890
5891 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
5892
5893 Fix ctor vtable vcall offsets.
5894 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
5895 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
5896 (get_matching_base): Remove.
5897 (get_original_base): New function.
5898 (build_vtbl_initializer): Initialize vid.rtti_binfo.
5899 Use a virtual thunk for a ctor vtable with an index
5900 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
5901 primary base within a constructor vtable. Only set
5902 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
5903 when primary base has been lost.
5904 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
5905
5906 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
5907
5908 * call.c (joust): Ensure more_specialized()'s argument length
5909 parameter has correct value for constructors.
5910
5911 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
5912
5913 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
5914
5915 * decl.c (mark_inlined_fns): Prototype.
5916
5917 2001-02-22 Mark Mitchell <mark@codesourcery.com>
5918
5919 * spew.c (yylex): Correct handling of friends.
5920
5921 2001-02-22 Mark Mitchell <mark@codesourcery.com>
5922
5923 * mangle.c (write_encoding): Pass write_function_type the
5924 FUNCTION_DECL for the function being encoded.
5925 (write_function_type): Pass it along to write_bare_function_type.
5926 (write_bare_function_type): Pass it along to write_method_parms.
5927 (write_method_parms): Don't mangle the compiler-generated
5928 parameters to a constructor or destructor.
5929
5930 2001-02-22 Andreas Jaeger <aj@suse.de>
5931
5932 * optimize.c: Include toplev.h for
5933 note_deferral_of_defined_inline_function prototype.
5934
5935 2001-02-22 Jakub Jelinek <jakub@redhat.com>
5936
5937 * cp-tree.h (struct lang_decl_inlined_fns): New.
5938 (struct lang_decls): Add inlined_fns.
5939 (DECL_INLINED_FNS): New macro.
5940 * optimize.c (struct inline_data): Add inlined_fns.
5941 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
5942 (inlinable_function_p): Likewise, fix typo in comment,
5943 function is not inlinable if it already inlined function currently
5944 being optimized.
5945 (expand_call_inline): Add fn to inlined_fns if necessary.
5946 (optimize_function): Initialize inlined_fns.
5947 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
5948 * decl.c (mark_inlined_fns): New function.
5949 (lang_mark_tree): Call it.
5950
5951 2001-02-21 Jason Merrill <jason@redhat.com>
5952
5953 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
5954 (DECL_UNINLINABLE): Move to middle-end.
5955
5956 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
5957 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
5958 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
5959 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
5960 parms and outer BLOCK. note_deferral_of_defined_inline_function.
5961
5962 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
5963 second parm of op=.
5964
5965 2001-02-19 Mark Mitchell <mark@codesourcery.com>
5966
5967 * decl2.c (set_decl_namespace): Allow explicit instantiations in
5968 any namespace.
5969
5970 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5971
5972 * optimize.c (expand_call_inline): Don't walk subtrees of type
5973 nodes.
5974
5975 2001-02-18 Mark Mitchell <mark@codesourcery.com>
5976
5977 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
5978 for a destructor.
5979
5980 2001-02-18 Jason Merrill <jason@redhat.com>
5981
5982 Do put the VTT parameter in DECL_ARGUMENTS.
5983 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
5984 (current_vtt_parm): New macro.
5985 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
5986 (DECL_HAS_VTT_PARM_P): New macro.
5987 (DECL_VTT_PARM): Remove.
5988 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
5989 * decl.c (duplicate_decls): Only copy the operator code if
5990 appropriate.
5991 (start_function): Set current_vtt_parm.
5992 (lang_mark_tree): Don't mark vtt_parm.
5993 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
5994 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
5995 * class.c (build_clone): Maybe remove the VTT parm.
5996 * optimize.c (maybe_clone_body): Set up the VTT parm.
5997 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
5998 * call.c (build_over_call): Just allow the VTT arg.
5999 * method.c (make_thunk): Don't set DECL_VTT_PARM.
6000 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
6001 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
6002 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
6003 * error.c (dump_function_decl): Likewise.
6004 * call.c (build_user_type_conversion_1, convert_like_real): Abort
6005 if we try to call a constructor with in-charge or VTT parms.
6006 * method.c (skip_artificial_parms_for): New fn.
6007 * call.c (add_function_candidate, build_over_call): Call it.
6008 * call.c (build_new_method_call): Use current_vtt_parm.
6009 * init.c (expand_virtual_init): Likewise.
6010 * class.c (same_signature_p): No longer static.
6011 * cp-tree.h: Declare it.
6012 * search.c (look_for_overrides_r): Use it.
6013
6014 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6015
6016 * cp-tree.h (new_abi_rtti_p): Remove.
6017 (name_mangling_version): Likewise.
6018 (flag_do_squangling): Likewise.
6019 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
6020 * decl.c (grokfndecl): Likewise.
6021 * decl2.c (name_mangling_version): Remove.
6022 (flag_do_squangling): Likewise.
6023 (lang_f_options): Remove `squangle'.
6024 (unsupported_options): Add `squangle'.
6025 (cxx_decode_option): Issue a warning about uses of
6026 -fname-mangling-version.
6027 (finish_file): Remove old ABI support.
6028 * pt.c (check_explicit_specialization): Likewise.
6029 (tsubst_decl): Likewise.
6030 * rtti.c (init_rtti_processing): Likewise.
6031 (build_headof): Likewise.
6032 (get_tinfo_decl_dynamic): Likewise.
6033 (tinfo_from_decl): Likewise.
6034 (build_dynamic_cast_1): Likewise.
6035 (synthesize_tinfo_var): Likewise.
6036 * init.c (build_new): Allow enumeration types for the array-bounds
6037 in a direct-new-declarator.
6038
6039 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
6040
6041 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
6042 TREE_PROTECTED from the template being specialized.
6043
6044 2001-02-17 Jason Merrill <jason@redhat.com>
6045
6046 * decl2.c (build_artificial_parm): Set TREE_READONLY.
6047
6048 * decl.c (bad_specifiers): Allow throw specs on things with
6049 pointer-to-function or -member-function type.
6050 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
6051 a pmf.
6052
6053 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6054
6055 * call.c (check_dtor_name): Handle template names correctly.
6056
6057 2001-02-16 Jason Merrill <jason@redhat.com>
6058
6059 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
6060 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
6061 * optimize.c (maybe_clone_body): Don't substitute it.
6062 * call.c (build_new_method_call): Check in_chrg instead.
6063 * init.c (expand_virtual_init): Likewise.
6064
6065 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
6066
6067 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
6068 class-type introduces at least a type-name.
6069
6070 2001-02-16 Jakub Jelinek <jakub@redhat.com>
6071
6072 * call.c (convert_like_real): Create a temporary for non-lvalue.
6073
6074 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
6075
6076 * cp-tree.h: Fix typos in comments.
6077
6078 2001-02-16 Jason Merrill <jason@redhat.com>
6079
6080 * optimize.c (remap_block): If we're compiling a clone, pass the
6081 new block to insert_block.
6082
6083 2001-02-16 Mark Mitchell <mark@codesourcery.com>
6084
6085 * semantics.c (finish_asm_stmt): Robustify.
6086
6087 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6088
6089 * pt.c (push_template_decl_real): Don't remangle the name of a
6090 class template.
6091
6092 2001-02-15 Jim Meyering <meyering@lucent.com>
6093
6094 * Make-lang.in (c++.install-common): Depend on installdirs.
6095 (c++.install-info): Likewise.
6096 (c++.install-man): Likewise.
6097
6098 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6099
6100 * typeck2.c (build_m_component_ref): Robustify.
6101
6102 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
6103
6104 * friend.c (do_friend): Don't take the nested [template] class
6105 into account when deciding whether to warn about the friend
6106 function not referring to a template function.
6107
6108 2001-02-14 Jakub Jelinek <jakub@redhat.com>
6109
6110 * typeck.c (build_unary_op): Clarify error message.
6111
6112 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
6113
6114 * parse.y (component_constructor_declarator): allow optional
6115 parentheses around constructor class name.
6116
6117 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6118
6119 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
6120 section.
6121 * init.c (emit_base_init): Remove incorrect comment about
6122 virtual bases.
6123 * method.c (make_thunk): Fix comment alignment.
6124
6125 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6126
6127 Kill remnants of this is variable.
6128 * cp-tree.h (flag_this_is_variable): Remove.
6129 * decl2.c (flag_this_is_variable): Remove.
6130 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
6131 (build_vbase_path): The path is non-static, even in a cdtor.
6132 (resolves_to_fixed_type_p): Add additional return value.
6133 * search.c (init_vbase_pointers): Adjust.
6134 * tree.c (lvalue_p_1): Adjust.
6135 * typeck.c (mark_addressable): Adjust.
6136
6137 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6138
6139 * pt.c (unify): Don't check cv quals of array types.
6140
6141 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6142
6143 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
6144 check whether we already have the type.
6145
6146 2001-02-13 Mark Mitchell <mark@codesourcery.com>
6147
6148 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
6149 * call.c (build_op_delete_call): Simplify to remove duplicate
6150 code.
6151 * class.c (clone_function_decl): Don't build the deleting variant
6152 of a non-virtual destructor.
6153 * decl.c (finish_destructor_body): Don't call delete if this is a
6154 non-virtual destructor.
6155 * init.c (build_delete): Explicitly call `operator delete' when
6156 deleting an object with a non-virtual destructor.
6157
6158 2001-02-13 Jason Merrill <jason@redhat.com>
6159
6160 * lang-specs.h: Add more __EXCEPTIONS.
6161
6162 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6163
6164 * typeck2.c (process_init_constructor): Check
6165 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
6166
6167 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6168
6169 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
6170 Remove spurious information in comment. Allow further
6171 adjustments of REFERENCE_TYPE args.
6172
6173 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6174
6175 * errfn.c (cp_deprecated): Tweak diagnostic text.
6176 * parse.y (new_initializer): Deprecate initializer lists
6177 extension.
6178
6179 2001-02-12 Mark Mitchell <mark@codesourcery.com>
6180
6181 Remove old ABI support.
6182
6183 2001-02-11 Mark Mitchell <mark@codesourcery.com>
6184
6185 * decl2.c (flag_vtable_thunks): Always set it to 1.
6186 (flag_new_abi): Likewise.
6187 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
6188
6189 * Makefile.in (g++spec.o): Fix typo.
6190
6191 2001-02-09 Jason Merrill <jason@redhat.com>
6192
6193 * lang-specs.h: Restore definition of __EXCEPTIONS.
6194
6195 2001-02-08 Jason Merrill <jason@redhat.com>
6196
6197 * search.c (shared_member_p): New function.
6198 (lookup_field_r): Use it.
6199 * cp-tree.h (SHARED_MEMBER_P): Remove.
6200
6201 * method.c (process_overload_item): Handle template-dependent array
6202 bounds.
6203 * pt.c (type_unification_real): If we end up with undeduced nontype
6204 parms, try again.
6205
6206 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
6207 types.
6208
6209 * typeck2.c (friendly_abort): Don't say anything if we have
6210 earlier errors or sorries.
6211
6212 * decl.c (check_tag_decl): Notice attempts to redefine bool and
6213 wchar_t. Ignore if in_system_header.
6214
6215 * decl.c (maybe_push_cleanup_level): New fn...
6216 (start_decl_1): ...split out from here.
6217 * cvt.c (build_up_reference): Use it.
6218 * cp-tree.h: Declare it.
6219
6220 2001-02-07 Mark Mitchell <mark@codesourcery.com>
6221
6222 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
6223 spec.
6224
6225 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
6226
6227 * pt.c (lookup_template_class): Make sure it's a primary
6228 template or template_template_parm when called from the parser.
6229 (instantiate_template_class): Add assertion.
6230
6231 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
6232
6233 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
6234 from error_mark_node.
6235
6236 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
6237
6238 Fix specification and implementation bugs in V3 ABI
6239 construction vtables.
6240 * cp-tree.h (flag_dump_class_layout): New flag.
6241 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
6242 (BINFO_LOST_PRIMARY_P): New flag.
6243 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
6244 (BINFO_PRIMARY_MARKED_P): Rename to ...
6245 (BINFO_PRIMARY_P): ... here.
6246 (binfo_via_virtual): New prototype.
6247 * decl2.c (flag_dump_class_layout): New flag.
6248 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
6249 use `=' as a file name separator.
6250 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
6251 bases.
6252 (build_vtbl_address): If this is a virtual primary base, then
6253 get the vtbl of what it is ultimately primary for.
6254 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
6255 for BINFO_PRIMARY_P.
6256 (dfs_skip_nonprimary_vbases_markedp): Likewise.
6257 (get_shared_vbase_if_not_primary): Likewise.
6258 (dfs_get_pure_virtuals): Likewise.
6259 (expand_upcast_fixups): Likewise.
6260 (fixup_virtual_upcast_offsets): Likewise.
6261 (dfs_find_vbase_instance): Likewise.
6262 (find_vbase_instance): Likewise.
6263 (binfo_from_vbase): Adjust comment to reflect reality.
6264 (binfo_via_virtual): New function.
6265 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
6266 for binfo walking during VTT construction.
6267 (dfs_mark_primary_bases): Remove.
6268 (force_canonical_binfo_r): New function.
6269 (force_canonical_binfo): New function.
6270 (mark_primary_virtual_base): New function.
6271 (mark_primary_bases): Walk in inheritance graph order, use
6272 mark_primary_virtual_base.
6273 (determine_primary_base): Use some more intermediate variables.
6274 (dfs_find_final_overrider): Don't check for overriding along a
6275 virtual path.
6276 (dfs_modify_vtables): Walk into primary virtual bases too.
6277 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
6278 (build_base_fields): Likewise.
6279 (dfs_set_offset_for_unshared_vbases): Likewise.
6280 (layout_virtual_bases): Likewise.
6281 (end_of_class): Likewise.
6282 (finish_struct_1): Call dump_class_hierarchy, if requested.
6283 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
6284 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
6285 (dump_class_hierarchy): Add file parameter. Append to file, if
6286 required.
6287 (finish_vtbls): Adjust accumulate_vtbl_inits call.
6288 Use canonical base for virtual bases.
6289 (build_vtt): Add more comments. Adjust build_vtt_inits call.
6290 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
6291 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
6292 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
6293 virtual VTTs.
6294 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
6295 from DATA. We want virtual primary bases and all bases via virtual.
6296 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
6297 virtual base when not a construction vtable.
6298 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
6299 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
6300 Use canonical bases when processing virtual bases.
6301 (accumulate_vtbl_inits): We're interested in any base via a
6302 virtual path.
6303 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
6304 within a construction vtable, determine what is being overridden.
6305 (build_vtbl_initializer): Add more comments
6306 (add_vcall_offset_vtbl_entries_1): Adjust comment.
6307 (build_rtti_vtbl_entries): Check if the base has lost its
6308 primary.
6309
6310 2001-02-05 Mark Mitchell <mark@codesourcery.com>
6311
6312 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
6313
6314 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6315
6316 * decl.c (pushdecl): Call abort instead of fatal.
6317 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
6318 * init.c (build_new_1): Likewise.
6319 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
6320 * decl.c (build_typename_type): hash_table_init now returns void.
6321 decl.c (init_decl_processing): Make an error non-fatal.
6322
6323 2001-02-04 Mark Mitchell <mark@codesourcery.com>
6324
6325 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
6326 Document.
6327 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6328 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6329 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6330 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6331 * decl.c (maybe_commonize_var): Use the new name-mangling where
6332 appropriate.
6333 * decl2.c (comdat_linkage): Enhance comments. Make all
6334 compiler-generated things static, if COMDAT is not available.
6335 (get_tinfo_decl): Do not make typeinfo objects that belong in the
6336 library COMDAT.
6337 (tinfo_base_init): Use the correct mangled name for typeinfo
6338 strings, and push them into the global scope.
6339 (typeinfo_in_lib_p): New function.
6340 (synthesize_tinfo_var): Use it.
6341 (create_real_tinfo_var): Likewise.
6342
6343 2001-02-03 Jakub Jelinek <jakub@redhat.com>
6344
6345 * decl.c (push_class_binding): Use context_for_name_lookup instead
6346 of CP_DECL_CONTEXT.
6347 * search.c (context_for_name_lookup): Remove static. Check for NULL
6348 context in the loop.
6349 * cp-tree.h (context_for_name_lookup): Add prototype.
6350
6351 2001-02-02 Jakub Jelinek <jakub@redhat.com>
6352
6353 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
6354 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
6355 Remove.
6356 * call.c (convert_class_to_reference, build_user_type_conversion_1,
6357 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
6358
6359 2001-02-02 Mark Mitchell <mark@codesourcery.com>
6360
6361 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
6362 of macros used when compiling g++spec.c.
6363 * g++spec.c (lang_specific_driver): Link with the shared
6364 libgcc by default.
6365
6366 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
6367
6368 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
6369 make_reference_declarator, make_call_declarator), method.c
6370 (implicitly_declare_fn), parse.y (namespace_using_decl,
6371 notype_unqualified_id, expr_or_declarator, new_type_id,
6372 after_type_declarator, direct_after_type_declarator,
6373 notype_declarator, complex_notype_declarator,
6374 complex_direct_notype_declarator, qualified_id,
6375 notype_qualified_id, overqualified_id, direct_new_declarator,
6376 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
6377 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
6378 instead of build_parse_node.
6379
6380 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6381
6382 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
6383 (minus_one_node): Moved to top level gcc directory. Renamed
6384 to integer_minus_one_node.
6385
6386 * init.c (init_init_processing): Don't set minus_one_node.
6387 (build_vec_init): Use integer_minus_one_node.
6388
6389 * rtti.c (get_tinfo_decl_dynamic): Likewise.
6390
6391 2001-01-28 Jakub Jelinek <jakub@redhat.com>
6392
6393 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
6394 identical and they would be replaced with constant, remove
6395 MODIFY_EXPR from the tree.
6396
6397 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6398
6399 * Make-lang.in: Remove all dependencies on defaults.h.
6400 * call.c: Don't include defaults.h.
6401 * decl.c: Likewise.
6402 * decl2.c: Likewise.
6403 * except.c: Likewise.
6404 * pt.c: Likewise.
6405 * rtti.c: Likewise.
6406 * tree.c: Likewise.
6407 * typeck.c: Likewise.
6408
6409 2001-01-25 Jakub Jelinek <jakub@redhat.com>
6410
6411 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
6412 operators even in "C" linkage.
6413 * method.c (set_mangled_name_for_decl): Likewise.
6414 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
6415 overloaded operators in "C" linkage.
6416
6417 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
6418
6419 * pt.c (tsubst_decl): Remove IN_DECL parameter.
6420 (tsubst_arg_types): Check parameter is not void.
6421 (tsubst): Adjust tsubst_decl call.
6422
6423 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
6424
6425 * call.c (add_builtin_candidate): Quote std properly, from
6426 previous change.
6427
6428 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6429
6430 * pt.c (check_explicit_specialization): Clone constructors and
6431 destructors.
6432
6433 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
6434
6435 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
6436 indicates anything special about template depth. Make sure we
6437 only count the user visible template classes.
6438
6439 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
6440
6441 * call.c (build_conv): Typo in comment.
6442 (add_builtin_candidate): Add more explanation.
6443 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
6444 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
6445 when we have enumeral types.
6446 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
6447 candidates for relops and eqops.
6448 (joust): Simplify control flow. Allow a non-template user
6449 function to hide a builtin.
6450
6451 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
6452
6453 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
6454 (more_specialized): Add deduction parameter.
6455 * call.c (joust): Adjust more_specialized call.
6456 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
6457 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
6458 (get_bindings_order): Remove.
6459 (get_bindings_real): Add DEDUCE parameter.
6460 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
6461 REFERENCE_TYPE jig for DEDUCE_ORDER.
6462 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
6463 maybe_adjust_types_for_deduction.
6464 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
6465 directly.
6466 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
6467 (check_cv_quals_for_unify): Use new unify qualifier flags.
6468 (unify): Clear new unify qualifier flags.
6469 (get_bindings_real): Add DEDUCE parameter.
6470 (get_bindings): Adjust call to get_bindings_real.
6471 (get_bindings_overload): Likewise.
6472 (most_specialized_instantiation): Adjust call to
6473 more_specialized.
6474
6475 2001-01-19 Jason Merrill <jason@redhat.com>
6476
6477 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
6478
6479 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
6480 -fnew-abi.
6481
6482 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
6483
6484 * decl2.c (arg_assoc_class): Fix double iteration logic.
6485
6486 2001-01-19 Jason Merrill <jason@redhat.com>
6487
6488 * init.c (build_delete): Always call convert_force to strip cv-quals.
6489
6490 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
6491 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
6492 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
6493
6494 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6495
6496 * search.c (get_vbase_1): Count only virtual bases.
6497
6498 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6499
6500 * class.c (duplicate_tag_error): Robustify flag clearing.
6501
6502 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6503
6504 * cp-tree.h (lookup_template_class): Add complain parm.
6505 * decl.c (lookup_namespace_name): Adjust call to
6506 lookup_template_class.
6507 (make_typename_type): Likewise.
6508 * semantics.c (finish_template_type): Likewise.
6509 * pt.c (lookup_template_class): Add complain parm. Adjust.
6510 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
6511 (tsubst): Likewise.
6512
6513 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
6514
6515 * pt.c (copy_default_args_to_explicit_spec): Preserve
6516 object's CV quals. Reorganize.
6517
6518 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6519
6520 * typeck.c (build_modify_expr): Say `initialization' for
6521 INIT_EXPRs.
6522 * init.c (build_default_init): Convert to enumeral type, if
6523 needed.
6524
6525 2001-01-18 Jakub Jelinek <jakub@redhat.com>
6526
6527 * parse.y (nomods_initdcl0): Properly set things up for
6528 initdcl0_innards.
6529
6530 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6531
6532 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
6533 (type_unification_real): Set it.
6534 (unify): Use it.
6535
6536 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6537
6538 * decl.c (finish_destructor_body): Convert to vbase pointer here.
6539
6540 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6541
6542 * semantics.c (begin_class_definition): Check we're not inside a
6543 template parm list.
6544
6545 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
6546
6547 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
6548 BASELINK_P.
6549
6550 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6551
6552 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
6553 * call.c (build_over_call): Add comment.
6554
6555 2001-01-16 Daniel Berlin <dberlin@redhat.com>
6556
6557 * cvt.c (ocp_convert): Handle vector type conversion
6558 * typeck2.c (digest_init): Handle vector type initializations
6559
6560 2001-01-16 Phil Edwards <pme@sources.redhat.com>
6561
6562 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
6563 was given.
6564
6565 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
6566
6567 * pt.c (check_nontype_parm): Rename to ...
6568 (invalid_nontype_parm_type_p): ... here.
6569 (process_template_parm): Adjust.
6570 (convert_template_argument): Adjust.
6571
6572 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
6573
6574 * pt.c (check_nontype_parm): New function.
6575 (process_template_parm): Use it.
6576 (convert_template_argument): Use it.
6577 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
6578 member.
6579
6580 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
6581
6582 * tree.c: Add defaults.h
6583 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
6584 * Make-lang.in (cp/tree.o): Add defaults.h.
6585
6586 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6587
6588 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
6589
6590 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6591
6592 * g++.1: Change to be ".so man1/gcc.1".
6593
6594 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
6595
6596 * Make-lang.in (c++.info, c++.install-info): Build and install g++
6597 internals info.
6598 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
6599 ($(srcdir)/cp/g++int.info): New target.
6600 * gxxint.texi: Add info directory entry. Use @@ in email address.
6601 * .cvsignore: Update.
6602
6603 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
6604
6605 * typeck.c (build_c_cast): Do template processing earlier.
6606 Always pedwarn on array casts.
6607
6608 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
6609
6610 * friend.c (make_friend_class): Make sure a templated class is
6611 actually a template.
6612
6613 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6614
6615 * decl2.c (get_guard): Set linkage from guarded decl.
6616
6617 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6618
6619 * call.c (convert_default_arg): Check for unprocessed
6620 DEFAULT_ARG.
6621 * cp-tree.h (replace_defarg): Move to spew.c.
6622 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
6623 spew.c, which is where they really are.
6624 (done_pending_defargs): Declare.
6625 (unprocessed_defarg_fn): Declare.
6626 * decl.c (replace_defarg): Move to spew.c
6627 * parse.y (structsp): Call done_pending_defargs.
6628 * spew.c (defarg_fns): Rearrange list structure.
6629 (defarg_fnsdone): New static variable.
6630 (defarg_depfns): New static variable.
6631 (init_spew): Adjust.
6632 (add_defarg_fn): Store the type in TREE_TYPE.
6633 (do_pending_defargs): Detect and deal with ordering constraints
6634 and circularity.
6635 (done_pending_defargs): New function.
6636 (unprocessed_defarg_fn): New function.
6637 (replace_defarg): Moved from decl.c. Robustify. Don't save
6638 if circularity detected.
6639
6640 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6641
6642 * pt.c (unify): Check array has a domain, before checking
6643 whether it is variable sized.
6644
6645 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6646
6647 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
6648 parameters with pointers to arrays of unknown bound.
6649
6650 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
6651
6652 * parse.y (template_parm_header, template_spec_header): New
6653 reductions. Split out from ...
6654 (template_header): ... here. Use them.
6655 (template_template_parm): Use template_parm_header.
6656 * semantics.c (finish_template_template_parm): Add assert.
6657
6658 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6659
6660 * mangle.c (write_builtin_type): Fix thinko.
6661
6662 * pt.c (copy_default_args_to_explicit_spec_1): New function.
6663 (copy_default_args_to_explicit_spec): Likewise.
6664 (check_explicit_specialization): Use it.
6665
6666 * class.c (finish_struct_1): Remove last argument in call to
6667 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6668 * decl.c (builtin_function): Likewise.
6669 (build_cp_library_fn): Likewise.
6670 (check_initializer): Likewise.
6671 (make_rtl_for_nonlocal_decl): Likewise.
6672 (cp_finish_decl): Likewise.
6673 (start_function): Likewise.
6674 * decl2.c (finish_anon_union): Likewise.
6675 * friend.c (do_friend): Likewise.
6676 * init.c (build_java_class_ref): Likewise.
6677 * method.c (make_thunk): Likewise.
6678 * pt.c (tsubst_friend_function): Likewise.
6679 * semantics.c (expand_body): Likewise.
6680
6681 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6682
6683 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
6684 looking at DECL_CLONED_FUNCTION for non-functions.
6685
6686 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6687
6688 * error.c (dump_template_parameter): Use parm to determine how
6689 to print default value.
6690
6691 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6692
6693 * class.c (duplicate_tag_error): Clear more flags.
6694
6695 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
6696
6697 * call.c (build_new_method_call): Use binfo_for_vbase.
6698
6699 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
6700
6701 * cp-tree.h (flag_cond_mismatch): Don't declare.
6702 * decl2.c (flag_cond_mismatch): Don't define.
6703 (lang_f_options): Remove cond-mismatch.
6704 (unsupported_options): Add cond-mismatch.
6705
6706 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
6707
6708 * class.c (handle_using_decl): Reject using of constructor name
6709 of sourcing class. Allow injecting of a method with same name as
6710 nested class. Fixup error messages.
6711
6712 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
6713
6714 * decl2.c (lang_decode_option): Handle -Wformat=2.
6715
6716 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6717
6718 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
6719 initialized_in_class.
6720 (DECL_DEFINED_IN_CLASS_P): Rename to ...
6721 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
6722 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
6723 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
6724 * pt.c (check_default_tmpl_args): Adjust for
6725 DECL_INITIALIZED_IN_CLASS_P.
6726 (instantiate_class_template): Likewise.
6727 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
6728
6729 * class.c (finish_struct): Constify saved_filename.
6730
6731 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6732
6733 * class.c (duplicate_tag_error): Adjust diagnostic.
6734 (finish_struct): Locally set location to start of struct.
6735 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
6736
6737 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
6738
6739 * decl.c (struct binding_level): Adjust class_shadowed comments
6740 to reflect reality.
6741 (push_class_level_binding): Adjust comments to reflect reality.
6742 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
6743 Don't set TREE_VALUE on the class_shadowed list.
6744
6745 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6746
6747 * decl2.c (acceptable_java_type): Allow references too.
6748 * init.c (build_java_class_ref): When using the new ABI, search
6749 `class$' and have it mangled with `mangle_decl.'
6750 * mangle.c (write_java_integer_type_codes): New function.
6751 (write_builtin_type): Detect and mangle Java integer and real
6752 types.
6753
6754 2001-01-07 Mark Mitchell <mark@codesourcery.com>
6755
6756 * decl2.c (grokfield): Don't accept `asm' specifiers for
6757 non-static data members.
6758
6759 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6760
6761 * expr.c (cplus_expand_expr): Don't reset `target'.
6762
6763 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
6764
6765 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
6766
6767 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
6768
6769 * parse.y (template_datadef): Check for error_mark_node.
6770
6771 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
6772
6773 * cp-tree.def (DEFAULT_ARG): Make `x' class.
6774
6775 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
6776
6777 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
6778 (record_builtin_type): Make non-static.
6779 (flag_short_double): Don't declare.
6780 (init_decl_processing): Remove the creation of many tree nodes now
6781 in c_common_nodes_and_builtins.
6782 (build_void_list_node): New function.
6783 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
6784 * cp-tree.h (flag_short_wchar): Don't declare.
6785
6786 2001-01-04 Mark Mitchell <mark@codesourcery.com>
6787
6788 * call.c (build_conv): Don't use build1 for USER_CONV.
6789 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
6790
6791 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
6792
6793 * lex.c (lang_init): Call c_common_lang_init.
6794
6795 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
6796
6797 * search.c (lookup_fnfields_here): Remove.
6798 (look_for_overrides_r): Use lookup_fnfields_1.
6799 Ignore functions from using declarations.
6800
6801 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
6802
6803 Implement exceptions specifiers for implicit member functions.
6804 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
6805 * method.c (synthesize_exception_spec): New function.
6806 (locate_dtor, locate_ctor, locate_copy): New functions.
6807 (implicitly_declare_fn): Generate the exception spec too.
6808 * search.c (check_final_overrider): Check artificial functions
6809 too.
6810 * typeck2.c (merge_exception_specifiers): New function.
6811
6812 2001-01-03 Jason Merrill <jason@redhat.com>
6813
6814 * init.c (build_default_init): New fn.
6815 (perform_member_init): Split out from here.
6816 (build_new_1): Use it. Simplify initialization logic.
6817 (build_vec_init): Take an array, rather than a pointer and maxindex.
6818 Speed up simple initializations. Don't clean up if we're assigning.
6819 * cp-tree.h: Adjust.
6820 * decl2.c (do_static_initialization): Remove TREE_VEC case.
6821 * parse.y (new_initializer): Return void_zero_node for ().
6822 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
6823 * typeck2.c (digest_init): Only complain about user-written
6824 CONSTRUCTORs.
6825
6826 2000-12-22 Mike Stump <mrs@wrs.com>
6827
6828 * decl2.c: (max_tinst_depth): Increase to 50.
6829
6830 2001-01-02 Mark Mitchell <mark@codesourcery.com>
6831
6832 * class.c (invalidate_class_lookup_cache): Zero the
6833 previous_class_values.
6834 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
6835 TREE_INT_CST_HIGH.
6836 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
6837 * decl.c (free_bindings): New variable.
6838 (push_binding): Don't create a new binding if we have one on the
6839 free list.
6840 (pop_binding): Put old bindings on the free list.
6841 (init_decl_processing): Use size_int, not build_int_2.
6842 Register free_bindings as a GC root.
6843 (cp_make_fname_decl): Use size_int, not build_int_2.
6844 (push_inline_template_parms_recursive): Likewise.
6845 (end_template_parm_list): Likewise.
6846 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
6847 (tsubst_template_parms): Use size_int, not build_int_2.
6848 (tsubst): Likewise.
6849 * rtti.c (get_vmi_pseudo_type_info): Likewise.
6850
6851 2001-01-02 Richard Henderson <rth@redhat.com>
6852
6853 * parse.y (asm): Set ASM_INPUT_P.
6854
6855 2001-01-02 Jason Merrill <jason@redhat.com>
6856
6857 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
6858 for v3 ABI.
6859
6860 * typeck.c (cp_truthvalue_conversion): New fn.
6861 * cvt.c (ocp_convert): Use it.
6862
6863 * cp-tree.h: Lose c-common.c decls.
6864
6865 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
6866 * cvt.c (convert_to_void): Use type_unknown_p.
6867
6868 * typeck.c (strip_all_pointer_quals): Also strip quals from
6869 pointer-to-member types.
6870
6871 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
6872 parse.y as C.
6873
6874 * call.c (build_new_method_call): Do evaluate the object parameter
6875 when accessing a static member.
6876 * typeck.c (build_component_ref): Likewise.
6877
6878 2001-01-02 Andreas Jaeger <aj@suse.de>
6879
6880 * decl.c (cp_missing_noreturn_ok_p): New.
6881 (init_decl_processing): Set lang_missing_noreturn_ok_p.
6882
6883 2000-12-29 Jakub Jelinek <jakub@redhat.com>
6884
6885 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
6886
6887 2000-12-29 Mark Mitchell <mark@codesourcery.com>
6888
6889 * class.c (pushclass): Remove #if 0'd code.
6890 * cp-tree.h (overload_template_name): Remove.
6891 * decl.c (store_bindings): Simplify.
6892 (pop_from_top_level): Likewise.
6893 * pt.c (overload_template_name): Remove.
6894 (instantiate_decl): Don't call push_to_top_level if it's not
6895 needed.
6896
6897 2000-12-28 Mark Mitchell <mark@codesourcery.com>
6898
6899 * pt.c (register_local_specialization): Don't return a value.
6900 (lookup_template_class): Use move-to-front heuristic when looking
6901 up template instantiations.
6902 (instantiate_decl): Only push_to_top_level when we're actually
6903 going to instantiate the template.
6904
6905 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
6906
6907 * search.c (binfo_for_vtable): Return least derived class, not
6908 most. Handle secondary vtables.
6909
6910 2000-12-22 Jason Merrill <jason@redhat.com>
6911
6912 * pt.c (more_specialized): Don't optimize len==0.
6913 (fn_type_unification): If we're adding the return type, increase len.
6914
6915 * typeck.c (build_binary_op): Fix pmf comparison logic.
6916
6917 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
6918 DECL_STATIC_FUNCTION_P.
6919
6920 * semantics.c (genrtl_finish_function): Don't try to jump to
6921 return_label unless it exists.
6922
6923 In partial ordering for a call, ignore parms for which we don't have
6924 a real argument.
6925 * call.c (joust): Pass len to more_specialized.
6926 (add_template_candidate_real): Strip 'this', pass len.
6927 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
6928 (get_bindings_order): New fn. Pass len down.
6929 (get_bindings_real): Strip 'this', pass len.
6930 (fn_type_unification): Likewise.
6931 (type_unification_real): Succeed after checking 'len' args.
6932 (most_specialized_instantiation): Lose explicit_args parm.
6933 * class.c (resolve_address_of_overloaded_function): Strip 'this',
6934 pass len.
6935
6936 2000-12-21 Jason Merrill <jason@redhat.com>
6937
6938 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
6939 DECL_TEMPLATE_RESULT.
6940
6941 * search.c (lookup_field_r): Call lookup_fnfields_1, not
6942 lookup_fnfields_here.
6943
6944 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
6945
6946 * call.c (build_object_call): Also allow conversions that return
6947 reference to pointer to function.
6948 (add_conv_candidate): Handle totype being ref to ptr to fn.
6949 (build_field_call): Also allow members of type reference to function.
6950 Lose support for calling pointer to METHOD_TYPE fields.
6951
6952 * error.c (dump_expr): Handle *_CAST_EXPR.
6953
6954 * typeck2.c (build_scoped_ref): Always convert to the naming class.
6955
6956 * tree.c (break_out_cleanups): Lose.
6957 * cp-tree.h: Remove prototype.
6958 * typeck.c (build_component_ref): Don't break_out_cleanups.
6959 (build_compound_expr): Likewise.
6960 * semantics.c (finish_expr_stmt): Likewise.
6961
6962 2000-12-20 Richard Henderson <rth@redhat.com>
6963
6964 * cp-tree.h: Update declarations.
6965 * decl.c (finish_case_label): Return the new stmt node.
6966 * semantics.c (finish_goto_stmt): Likewise.
6967 (finish_expr_stmt, finish_return_stmt): Likewise.
6968 (finish_break_stmt, finish_continue_stmt): Likewise.
6969 (finish_asm_stmt): Likewise.
6970 * parse.y (already_scoped_stmt): Set STMT_LINENO.
6971 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
6972 (simple_if, simple_stmt): Return the new stmt node.
6973 (save_lineno): New.
6974
6975 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
6976
6977 * cp-tree.h: Don't declare warn_long_long.
6978
6979 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6980
6981 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
6982 IS_AGGR_TYPE.
6983
6984 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6985
6986 * pt.c (unify): Handle when both ARG and PARM are
6987 BOUND_TEMPLATE_TEMPLATE_PARM.
6988
6989 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6990
6991 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
6992 DECL_TEMPLATE_PARM_P.
6993
6994 2000-12-15 Jason Merrill <jason@redhat.com>
6995
6996 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
6997
6998 * init.c (build_new_1): Don't strip quals from type.
6999
7000 * decl.c (pushdecl): Don't check for linkage on a non-decl.
7001
7002 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
7003
7004 * call.c (build_new_function_call): Lose space before paren in
7005 error message.
7006 (build_new_method_call): Likewise.
7007
7008 * typeck2.c (build_m_component_ref): Propagate quals from datum.
7009
7010 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7011
7012 * pt.c (check_explicit_specialization): Propagate default
7013 function arguments to explicit specializations.
7014
7015 2000-12-13 DJ Delorie <dj@redhat.com>
7016
7017 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
7018 and <? operators.
7019
7020 2000-12-08 Jason Merrill <jason@redhat.com>
7021
7022 * error.c (dump_function_name): Don't let the user see __comp_ctor.
7023
7024 Clean up copy-initialization in overloading code.
7025 * call.c (build_user_type_conversion_1): Die if we are asked to
7026 convert to the same or a base type.
7027 (implicit_conversion): Avoid doing so. Lose reference binding code.
7028 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
7029 direct-initialization. Also do direct-init part of copy-init.
7030 (build_user_type_conversion): Don't provide context to convert_like.
7031 * cvt.c (ocp_convert): build_user_type_conversion will now provide
7032 the constructor call for copy-init.
7033
7034 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
7035 instantiation of a member template.
7036 (do_decl_instantiation): Not here.
7037
7038 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7039
7040 * class.c (check_field_decls): Don't special case anonymous
7041 fields in error messages.
7042 (note_name_declared_in_class): Use %D on diagnostic.
7043
7044 * tree.c (pod_type_p): Use strip_array_types.
7045 (cp_valid_lang_attribute): Likewise.
7046 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
7047 multiple evaluations.
7048 (cp_has_mutable_p): Use strip_array_types.
7049
7050 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7051
7052 * cp-tree.h (sufficient_parms_p): Declare new function.
7053 * call.c (sufficient_parms_p): New function, broken out of ...
7054 (add_function_candidate): ... here. Use it.
7055 (add_conv_candidate): Use it.
7056 * decl.c (grok_ctor_properties): Use it.
7057
7058 2000-12-07 Jakub Jelinek <jakub@redhat.com>
7059
7060 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
7061
7062 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
7063
7064 * decl2.c (lang_decode_option): Handle -Wformat-security.
7065
7066 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7067
7068 * pt.c (verify_class_unification): New function.
7069 (get_class_bindings): Use it.
7070 (try_class_unification): Tidy.
7071 (unify): Handle when argument of a template-id is not
7072 template parameter dependent.
7073 (template_args_equal): Handle when TREE_CODE's do not match.
7074
7075 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
7076
7077 * lang-specs.h (c++): When invoking the stand-alone preprocessor
7078 for -save-temps, pass all relevant -Defines to it, and then don't
7079 pass them to cc1plus.
7080
7081 2000-12-05 Will Cohen <wcohen@redhat.com>
7082
7083 * decl.c (finish_case_label): Cleared
7084 more_cleanups_ok in surrounding function scopes.
7085 (define_label): Likewise.
7086
7087 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7088
7089 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
7090 (get_matching_virtual): Remove.
7091 (look_for_overrides): Declare new function.
7092 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
7093 DECL_VINDEX here.
7094 * class.c (check_for_override): Move base class iteration code
7095 to look_for_overrides.
7096 * search.c (next_baselink): Remove.
7097 (get_virtuals_named_this): Remove.
7098 (get_virtual_destructor): Remove.
7099 (tree_has_any_destructors_p): Remove.
7100 (struct gvnt_info): Remove.
7101 (check_final_overrider): Remove `virtual' from error messages.
7102 (get_matching_virtuals): Remove. Move functionality to ...
7103 (look_for_overrides): ... here, and ...
7104 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
7105 to be overriding.
7106
7107 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7108
7109 * typeck.c (get_delta_difference): If via a virtual base,
7110 return zero.
7111 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
7112 adjustment.
7113
7114 2000-12-04 Richard Henderson <rth@redhat.com>
7115
7116 * error.c (dump_tree): Use output_add_string not OB_PUTS.
7117
7118 2000-12-04 Jason Merrill <jason@redhat.com>
7119
7120 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
7121 (write_builtin_type): Pass intSI_type_node and the like through
7122 type_for_mode.
7123 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
7124 Pass intSI_type_node and the like through type_for_mode.
7125 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
7126 * pt.c (tsubst, unify): Likewise.
7127 * tree.c (walk_tree): Likewise.
7128 * error.c (dump_type): Likewise.
7129 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
7130
7131 * Make-lang.in: Tweak top comment for emacs.
7132 (cp/TAGS): Restore.
7133
7134 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
7135
7136 * class.c (clone_function_decl): Robustify.
7137
7138 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
7139
7140 * decl.c (store_bindings): Only search in the non modified
7141 old_bindings for duplicates.
7142
7143 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
7144
7145 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
7146 TYPE_POLYMORPHIC_P.
7147
7148 * typeck.c (build_static_cast): Remove unused variable.
7149
7150 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7151
7152 * pt.c: Fix typo in comment.
7153
7154 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7155
7156 * decl2.c (warn_format): Remove definition.
7157 (lang_decode_option): Handle -Wformat-nonliteral,
7158 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
7159
7160 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7161
7162 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
7163 (init_decl_processing): Don't create string_type_node,
7164 const_string_type_node, wint_type_node, intmax_type_node,
7165 uintmax_type_node, default_function_type, ptrdiff_type_node and
7166 unsigned_ptrdiff_type_node. Adjust position of call to
7167 c_common_nodes_and_builtins.
7168 (identifier_global_value): New function.
7169
7170 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
7171
7172 * call.c (standard_conversion): Reject pointer to member
7173 conversions from ambiguous, inaccessible or virtual bases.
7174 * typeck.c (build_static_cast): Don't check pointers to members
7175 specially.
7176
7177 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7178
7179 * method.c (do_build_copy_constructor): Preserve cv
7180 qualifications when accessing source object members.
7181 (do_build_assign_ref): Likewise. Remove separate diagnostics for
7182 unnamed fields.
7183
7184 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7185
7186 * method.c (do_build_assign_ref): Construct appropriately
7187 CV-qualified base reference. Don't allow const casts in base
7188 conversion.
7189
7190 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7191
7192 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
7193 incomplete return type.
7194
7195 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7196
7197 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
7198 * semantics.c (finish_base_specifier): Accept a _TYPE not a
7199 _DECL.
7200
7201 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7202
7203 * spew.c (yyerror): Cope if yylval.ttype is NULL.
7204
7205 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7206
7207 * decl.c (grokdeclarator): Diagnose undefined template contexts.
7208
7209 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7210
7211 * decl.c (grokdeclarator): Do type access control on friend
7212 class.
7213
7214 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
7215
7216 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
7217 bison parser ickiness.
7218 * pt.c (tsubst_friend_function): Enter namespace scope when
7219 tsubsting the function name.
7220 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
7221
7222 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
7223
7224 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
7225 * cvt.c (cp_convert_to_pointer): Add force parameter.
7226 Allow conversions via virtual base if forced.
7227 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
7228 (ocp_convert): Likewise.
7229 * search.c (binfo_from_vbase): Return the virtual base's binfo.
7230 * typeck.c (get_delta_difference): Adjust handling of virtual
7231 bases.
7232
7233 2000-11-26 Mark Mitchell <mark@codesourcery.com>
7234
7235 * tree.c (struct list_hash): Remove.
7236 (list_hash_table): Make it be an htab.
7237 (struct list_proxy): New type.
7238 (list_hash_eq): New function.
7239 (list_hash_pieces): Renamed from ...
7240 (list_hash): ... this.
7241 (list_hash_lookup): Remove.
7242 (list_hash_add): Remove.
7243 (hash_tree_cons): Use the generic hashtable.
7244 (mark_list_hash): Remove.
7245 (init_tree): Create the hashtable.
7246
7247 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
7248
7249 * method.c (build_mangled_C9x_name): Rename to
7250 build_mangled_C99_name. Change C9X references in comments to
7251 refer to C99.
7252
7253 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
7254
7255 * parse.y (unary_expr): Move VA_ARG from here ...
7256 (primary): ... to here.
7257
7258 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
7259
7260 * semantics.c (finish_id_expr): If type is error_mark, return
7261 error_mark.
7262
7263 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
7264
7265 * pt.c (lookup_template_class): Simplify loop exit constructs.
7266 Cope when there is no partial instantiation of a template
7267 template member.
7268
7269 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
7270
7271 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
7272
7273 2000-11-22 Mark Mitchell <mark@codesourcery.com>
7274
7275 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
7276 prefix.
7277
7278 * pt.c (do_decl_instantiate): Explicitly clone constructors and
7279 destructors that haven't already been cloned.
7280
7281 2000-11-20 Richard Henderson <rth@redhat.com>
7282
7283 * parse.y (yyparse_1): Rename the parser entry point.
7284
7285 2000-11-20 Alex Samuel <samuel@codesourcery.com>
7286
7287 * mangle.c (write_name): Use <unscoped-name> for names directly in
7288 function scope.
7289 (write_unscoped_name): Accept names directly in function scope.
7290
7291 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
7292
7293 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
7294 * parse.y (extdef): Add EXPORT reduction.
7295 * spew.c (yylex): Don't skip export here.
7296
7297 2000-11-19 Mark Mitchell <mark@codesourcery.com>
7298
7299 * decl.c (init_decl_processing): Correct name of pure virtual
7300 function under the new ABI.
7301 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
7302 (throw_bad_typeid): Likewise for bad typeid function.
7303
7304 2000-11-18 Mark Mitchell <mark@codesourcery.com>
7305
7306 * decl.c (grokparms): Don't even function types of `void' type,
7307 either.
7308 * mangle.c (write_type): Don't crash when confronted with the
7309 error_mark_node.
7310
7311 * decl.c (grokparms): Don't create parameters of `void' type.
7312
7313 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
7314
7315 * lex.c (mark_impl_file_chain): Delete.
7316 (init_parse): Remove call to ggc_add_string_root. No need to
7317 ggc_strdup a string constant. Do not add impl_file_chain to GC
7318 roots.
7319 (handle_pragma_implementation): No need to ggc_strdup main_filename.
7320
7321 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7322
7323 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
7324
7325 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7326
7327 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
7328 * decl.c (grokdeclarator): Don't reject void parms here.
7329 (require_complete_types_for_parms): Simplify, use
7330 complete_type_or_else.
7331 (grokparms): Remove bitrot. Remove funcdef parm.
7332 Deal with ellipsis parm lists here.
7333 * semantics.c (finish_parmlist): Don't append void_list_node
7334 here. Set PARMLIST_ELLIPSIS_P.
7335
7336 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
7337
7338 * typeck2.c (incomplete_type_error): Reorganize to avoid
7339 excessive diagnostics.
7340
7341 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
7342
7343 * lex.c (struct impl_files, internal_filename): Constify a char *.
7344
7345 2000-11-16 Mark Mitchell <mark@codesourcery.com>
7346
7347 * mangle.c (write_special_name_constructor): Don't generate
7348 assembler junk when confronted with an old-style constructor.
7349 (write_special_name_destructor): Likewise.
7350 (mangle_decl_string): Do it here instead.
7351
7352 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
7353
7354 * call.c (op_error): Make error messages clearer.
7355
7356 2000-11-15 Mark Mitchell <mark@codesourcery.com>
7357
7358 * decl.c (wrapup_globals_for_namespace): Don't mark things
7359 TREE_ASM_WRITTEN when they're not.
7360
7361 2000-11-15 Jason Merrill <jason@redhat.com>
7362
7363 * typeck2.c (friendly_abort): Uncount the error before handing
7364 off to fancy_abort.
7365
7366 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
7367
7368 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
7369
7370 2000-11-14 Mark Mitchell <mark@codesourcery.com>
7371
7372 * class.c (build_vtbl_initializer): Fix typo in comment.
7373 * typeck.c (expr_sizeof): Don't crash on errors.
7374
7375 2000-11-14 Jim Wilson <wilson@redhat.com>
7376
7377 * lang-specs.h: Add %2 after %(cc1_options).
7378
7379 2000-11-14 Richard Henderson <rth@redhat.com>
7380
7381 * typeck.c (c_sizeof): Be strict about casting result value
7382 back to c_size_type_node.
7383 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
7384
7385 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
7386
7387 * typeck.c (build_unary_op): Use boolean_increment from
7388 c-common.c, moving the relevant code there.
7389
7390 2000-11-11 Jason Merrill <jason@redhat.com>
7391
7392 * typeck.c (mark_addressable): Don't call put_var_into_stack.
7393
7394 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
7395 in inlines.
7396
7397 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7398
7399 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
7400 * lex.c (copy_lang_decl): Likewise.
7401
7402 2000-11-09 Mark Mitchell <mark@codesourcery.com>
7403
7404 * dump.c (cp_dump_tree): Don't dump function bodies here.
7405
7406 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7407 (dump.o): Update dependency list.
7408 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
7409 (flag_dump_translation_unit): Likewise.
7410 (CP_TYPE_QUALS): Adjust definition.
7411 (DECL_C_BIT_FIELD): Remove.
7412 (SET_DECL_C_BIT_FIELD): Likewise.
7413 (CLEAR_DECL_C_BIT_FIELD): Likewise.
7414 (add_maybe_template): Likewise.
7415 (strip_array_types): Likewise.
7416 (dump_node_to_file): Likewise.
7417 (cp_dump_tree): New function.
7418 * decl.c (init_decl_processing): Set lang_dump_tree.
7419 * decl2.c (flag_dump_translation_unit): Remove.
7420 * dump.c: Move most of it to ../c-dump.c.
7421 (cp_dump_tree): New function.
7422 * pt.c (add_maybe_template): Remove.
7423 * typeck.c (strip_array_types): Likewise.
7424
7425 2000-11-07 Eric Christopher <echristo@redhat.com>
7426
7427 * decl.c (init_decl_processing): Change definition of
7428 __wchar_t to wchar_t. Remove artificial declaration of
7429 wchar_t.
7430 * lex.c: Change instances of __wchar_t to wchar_t.
7431
7432 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
7433
7434 * lex.c (do_identifier): Don't lookup_name for operators.
7435 * parse.y (operator): Save looking_for_typename.
7436 (unoperator): Restore it.
7437 * spew.c (frob_opname): Use nth_token for lookahead.
7438
7439 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
7440
7441 * decl.c (grok_op_properties): Always use coerce_new_type and
7442 coerce_delete_type.
7443 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
7444 exception specification. Tidy up.
7445 (coerce_delete_type): Preserve exception specification. Tidy up.
7446
7447 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
7448
7449 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
7450 (push_binding_level), error.c (cp_tree_printer), pt.c
7451 (process_partial_specialization, tsubst_template_arg_vector),
7452 search.c (lookup_member): Use memset () instead of bzero ().
7453
7454 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
7455
7456 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
7457
7458 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
7459
7460 * Make-lang.in (c++.distdir): Remove.
7461
7462 2000-11-04 Mark Mitchell <mark@codesourcery.com>
7463
7464 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
7465 declarations from different namespaces to be combined.
7466
7467 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
7468
7469 * decl.c: Include tm_p.h.
7470
7471 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
7472
7473 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
7474
7475 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
7476
7477 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
7478 (build_overload_value), repo.c (open_repo_file), xref.c
7479 (open_xref_file): Use strchr () and strrchr () instead of index ()
7480 and rindex ().
7481
7482 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
7483
7484 * call.c (build_over_call): Call fold on the CALL_EXPR.
7485
7486 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
7487
7488 * error.c (dump_template_decl): Separate template hearders with
7489 space not comma.
7490
7491 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
7492
7493 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
7494 TS_* flags with corresponding TFF_*. Adjust prototypes of
7495 functions (which used to take a tree_string_flags) to take an int.
7496
7497 * cp-tree.h (enum tree_string_flags): Remove
7498 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
7499 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
7500 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7501 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7502 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
7503 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
7504 (type_as_string, decl_as_string, expr_as_string,
7505 context_as_string): Adjust prototype.
7506
7507 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
7508 instead of TS_PLAIN.
7509
7510 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
7511 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
7512 plain `0'.
7513
7514 2000-10-30 Mark Mitchell <mark@codesourcery.com>
7515
7516 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
7517 (linkage_kind): New enumeration.
7518 (decl_linkage): New function.
7519 * decl2.c (comdat_linkage): Extend comment.
7520 * error.c (dump_function_decl): Print the arguments used to
7521 instantiate a template, even when not printing the type of the
7522 function.
7523 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
7524 not TREE_PUBLIC, to test for external linkage.
7525 * tree.c (decl_linkage): New function.
7526
7527 2000-10-28 Mark Mitchell <mark@codesourcery.com>
7528
7529 * pt.c (instantiate_decl): Always instantiate static data members
7530 initialized in-class.
7531
7532 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
7533
7534 * Make-lang.in: Move all build rules here from Makefile.in,
7535 adapt to new context. Wrap all rules that change the current
7536 directory in parentheses. Expunge all references to $(P).
7537 When one command depends on another and they're run all at
7538 once, use && to separate them, not ;. Add OUTPUT_OPTION to
7539 all object-file generation rules. Delete obsolete variables.
7540
7541 * Makefile.in: Delete.
7542 * config-lang.in: Delete outputs= line.
7543
7544 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
7545
7546 * error.c (dump_function_decl): Print no space between
7547 `ptr-operator' the `type-specifier' of the return type.
7548 (dump_type_prefix): Make sure we put space at the appropriate
7549 place.
7550
7551 2000-10-23 Jason Merrill <jason@redhat.com>
7552
7553 * call.c (equal_functions): Also call decls_match for extern "C" fns.
7554
7555 2000-10-22 Jason Merrill <jason@redhat.com>
7556
7557 * call.c (build_conditional_expr): Use ocp_convert to force
7558 rvalue conversion.
7559
7560 2000-10-22 Mark Mitchell <mark@codesourcery.com>
7561
7562 * call.c (standard_conversion): Use RVALUE_CONVs for all
7563 expressions that satisfy lvalue_p, not just those that satisfy
7564 real_lvalue_p.
7565
7566 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
7567
7568 * typeck.c (c_sizeof): Return an expression of `size_t' type,
7569 not one with TYPE_IS_SIZETYPE set.
7570 (dubious_conversion_warnings): Remove special-case code.
7571
7572 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
7573
7574 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
7575 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
7576 (dump_type_prefix): Print vector-of-int as 'int vector'.
7577 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
7578 * tree.c (walk_tree): Handle VECTOR_TYPE.
7579
7580 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
7581
7582 2000-10-21 Jason Merrill <jason@redhat.com>
7583
7584 * parse.y (operator): Set got_object from got_scope.
7585 Set looking_for_typename.
7586 * decl.c (lookup_name_real): Clear val after setting from_obj.
7587 Reorganize diagnostic.
7588
7589 2000-10-20 Jason Merrill <jason@redhat.com>
7590
7591 * tree.c (walk_tree): Don't walk into default args.
7592
7593 * error.c (dump_expr): Use host_integerp.
7594
7595 2000-10-20 David Edelsohn <edelsohn@gnu.org>
7596
7597 * typeck2.c (abstract_virtuals_error): Use "because" instead of
7598 "since" in error message.
7599
7600 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7601
7602 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
7603
7604 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
7605
7606 * decl.c (revert_static_member_fn): Fixed typo.
7607
7608 2000-10-19 Mark Mitchell <mark@codesourcery.com>
7609
7610 * class.c (subobject_offset_fn): New type.
7611 (dfs_record_base_offsets): Remove.
7612 (record_base_offsets): Likewise.
7613 (dfs_search_base_offsets): Likewise.
7614 (record_subobject_offset): New function.
7615 (check_subobject_offset): Likewise.
7616 (walk_subobject_offsets): Likewise.
7617 (record_subobject_offsets): Likewise.
7618 (layout_conflict_p): Reimplement.
7619 (layout_nonempty_base_or_field): Correct handling of type
7620 conflicts during layout.
7621 (layout_empty_base): Likewise.
7622 (build_base_field): Adjust to handle new representation of empty
7623 base offset table.
7624 (build_base_fields): Likewise.
7625 (layout_virtual_bases): Likewise.
7626 (splay_tree_compare_integer_csts): New function.
7627 (layout_class_type): Use a splay_tree, rather than a varray, to
7628 represent the offsets of empty bases.
7629
7630 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
7631 * decl.c (select_decl): Don't return declarations that are
7632 DECL_ANTICIPATED.
7633
7634 2000-10-18 Mark Mitchell <mark@codesourcery.com>
7635
7636 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
7637 (fake_std_node): New macro.
7638 * decl.c (in_std): Rename to ...
7639 (in_fake_std): ... this.
7640 (flag_no_builtin): Remove.
7641 (flag_no_nonansi_builtin): Likewise.
7642 (walk_namespaces_r): Use fake_std_node.
7643 (push_namespace): Use std_identifier.
7644 (pop_namespace): Use in_fake_std.
7645 (lookup_name_real): Use fake_std_node.
7646 (init_decl_processing): When -fhonor-std, create the `std'
7647 namespace. Don't create a dummy fake_std_node in that case.
7648 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
7649 (builtin_function): Put builtins whose names don't begin
7650 with `_' in the std namespace.
7651 * decl2.c (flag_no_builtin): Remove.
7652 (flag_no_nonansi_builtin): Likewise.
7653 (set_decl_namespace): Use fake_std_node.
7654 (validate_nonmember_using_decl): Likewise.
7655 (do_using_directive): Likewise.
7656 (handle_class_head): Likewise.
7657 * dump.c (dequeue_and_dump): Likewise.
7658 * except.c (init_exception_processing): Use std_identifier.
7659 * init.c (build_member_call): Use fake_std_node.
7660 * rtti.c (init_rtti_processing): Use std_identifier.
7661
7662 2000-10-17 Mark Mitchell <mark@codesourcery.com>
7663
7664 * cp-tree.h (back_end_hook): Remove declaration.
7665 * decl2.c (back_end_hook): Remove definition.
7666
7667 * dump.c (dequeue_and_dump): Dump TREE_USED.
7668
7669 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
7670
7671 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
7672
7673 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
7674
7675 * decl.c (WINT_TYPE): Define.
7676 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
7677 c_size_type_node, signed_size_type_node and wint_type_node.
7678
7679 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
7680
7681 * decl2.c (warn_missing_format_attribute): New variable.
7682 (lang_decode_option): Decode -Wmissing-format-attribute.
7683
7684 2000-10-16 Mark Mitchell <mark@codesourcery.com>
7685
7686 * typeck.c (qualify_type): Remove.
7687 (composite_pointer_type): Fix handling of conversions to `cv void*'.
7688
7689 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7690
7691 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
7692
7693 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7694
7695 * Makefile.in (parse.c, parse.h): Create atomically.
7696
7697 2000-10-12 Mark Mitchell <mark@codesourcery.com>
7698
7699 * class.c (current_obstack): Remove.
7700 * decl.c (ggc_p): Remove.
7701 (start_decl): Don't use decl_tree_cons.
7702 (grokdeclarator): Don't use build_decl_list.
7703 (start_function): Don't use decl_tree_cons.
7704 (finish_function): Don't mess with obstacks.
7705 * decl2.c (grok_x_components): Don't use build_decl_list.
7706 * lex.c (make_call_declarator): Don't call decl_tree_cons.
7707 (implicitly_declare_fn): Don't call build_decl_list.
7708 * parse.y (frob_specs): Don't call build_decl_list or
7709 decl_tree_cons.
7710 (expr_or_declarator_intern): Don't call decl_tree_cons.
7711 (primary): Don't call build_decl_list.
7712 (fcast_or_absdcl): Likewise.
7713 (typed_declspecs): Don't call decl_tree_cons.
7714 (reserved_declspecs): Don't call build_decl_list.
7715 (declmods): Likewise.
7716 (reserved_typespecquals): Likewise.
7717 (aggr): Likewise.
7718 (new_type_id): Likewise.
7719 (cv_qualifiers): Likewise.
7720 (after_type_declarator_intern): Likewise.
7721 (notype_declarator_intern): Likewise.
7722 (absdcl_intern): Likewise.
7723 (named_parm): Likewise.
7724 * pt.c (most_specialized_class): Likewise.
7725 * repo.c (temporary_obstack): Make it a structure, not a pointer.
7726 (init_repo): Initialize it.
7727 * search.c (current_obstack): Remove.
7728 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
7729
7730 2000-10-09 Richard Henderson <rth@cygnus.com>
7731
7732 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
7733 (c++ language support bits for libgcc): Remove.
7734 (c++.clean): Remove cplib2.txt cleanup.
7735 * config-lang.in (headers, lib2funcs): Remove.
7736
7737 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
7738 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
7739 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
7740 * inc/new.h, inc/typeinfo: Remove files.
7741
7742 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
7743
7744 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
7745 defined.
7746 (init_decl_processing): Initialize intmax_type_node and
7747 uintmax_type_node.
7748
7749 2000-10-06 Richard Henderson <rth@cygnus.com>
7750
7751 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
7752 (original_result_rtx): Remove.
7753 * decl.c (save_function_data): Don't clear x_result_rtx.
7754 (mark_lang_function): Don't mark it either.
7755 * expr.c (fixup_result_decl): Remove.
7756 * semantics.c (genrtl_named_return_value): Frob the return decl
7757 before calling emit_local_var.
7758 (genrtl_finish_function): Don't call fixup_result_decl.
7759 Always emit the jump to return_label.
7760
7761 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
7762
7763 * pt.c (lookup_template_class): Set current access for enum.
7764 (tsubst_enum): Set file & line for enum decl.
7765
7766 * spew.c (yylex): Remove unused variable.
7767
7768 2000-10-05 Richard Henderson <rth@cygnus.com>
7769
7770 * semantics.c (genrtl_finish_function): Don't init or check
7771 can_reach_end; remove noreturn and return value checks.
7772
7773 2000-10-05 Tom Tromey <tromey@cygnus.com>
7774
7775 * init.c (build_java_class_ref): Use `build_static_name' with a
7776 suffix, not a prefix, to build the class object's name.
7777
7778 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7779
7780 * cp-tree.h (access_kind): Fix comment typo.
7781 * decl2.c (grokfield): Fix diagnostic typo.
7782 * semantics.c (finish_template_type): Fix comment typo.
7783 (finish_qualified_object_call_expr): Likewise.
7784
7785 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7786
7787 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
7788 tsubsting fails.
7789
7790 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
7791
7792 * spew.c (frob_id): New static function.
7793 (frob_opname): Use it.
7794 (yylex): Use it.
7795
7796 2000-10-01 Mark Mitchell <mark@codesourcery.com>
7797
7798 * decl.c (lang_mark_false_label_stack): Remove.
7799 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
7800
7801 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
7802
7803 * gxxint.texi: Use @email for formatting email addresses.
7804
7805 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
7806
7807 * error.c: Remove direct obstack manipulation. Replace with
7808 output_buffer-based formatting. Adjust calls to removed macros.
7809 (obstack_chunk_alloc, obstack_chunk_free): Remove.
7810 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
7811 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
7812
7813 2000-09-24 Mark Mitchell <mark@codesourcery.com>
7814
7815 * ir.texi: Move to ../c-tree.texi.
7816
7817 2000-09-20 Jason Merrill <jason@redhat.com>
7818
7819 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
7820
7821 2000-09-21 Andreas Jaeger <aj@suse.de>
7822
7823 * errfn.c: Move declaration of cp_printer and cp_printers to ...
7824 * cp-tree.h: ... here.
7825
7826 * error.c: Remove declaration of cp_printer.
7827
7828 2000-09-20 Mark Mitchell <mark@codesourcery.com>
7829
7830 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
7831
7832 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
7833
7834 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
7835 users.
7836
7837 2000-09-18 Mark Mitchell <mark@codesourcery.com>
7838
7839 * decl.c (start_function): Robustify.
7840
7841 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7842
7843 * cp-tree.h (check_function_format): Accept a `status' parameter.
7844
7845 * call.c, typeck.c: Updates calls to `check_function_format'.
7846
7847 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
7848
7849 * decl2.c (handle_class_head): Always push some scope even
7850 in the error case.
7851
7852 2000-09-16 Mark Mitchell <mark@codesourcery.com>
7853
7854 * cp-tree.h (struct cp_language_function): Remove
7855 x_scope_stmt_stack and name_declared.
7856 (current_scope_stmt_stack): Remove.
7857 (function_name_declared_p): New macro.
7858 (struct lang_decl_flags): Use c_lang_decl as a base class.
7859 (context): Remove.
7860 (struct lang_decl): Replace saved_tree with context.
7861 (DECL_FRIEND_CONTEXT): Adjust accordingly.
7862 (SET_DECL_FRIEND_CONTEXT): Likewise.
7863 (DECL_VIRTUAL_CONTEXT): Likewise.
7864 (DECL_SAVED_TREE): Remove.
7865 (C_DECLARED_LABEL_FLAG): Likewise.
7866 (cplus_expand_expr_stmt): Don't declare.
7867 (add_decl_stmt): Likewise.
7868 (add_scope_stmt): Likewise.
7869 * decl.c (mark_stmt_tree): Remove.
7870 (case_compare): Likewise.
7871 (finish_case_label): Use c_add_case_label.
7872 (init_decl_processing): Set more language-specific hooks.
7873 (build_enumerator): Fix typo in comment.
7874 (cplus_expand_expr_stmt): Remove.
7875 (mark_lang_function): Use mark_c_language_function.
7876 (lang_mark_tree): Use c_mark_lang_decl.
7877 * decl2.c: Change order of inclusion.
7878 * except.c: Likewise.
7879 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
7880 back on c_expand_expr.
7881 * friend.c: Include expr.h.
7882 * init.c: Change order of inclusion.
7883 * Makefile.in: Update dependencies.
7884 * lex.h (free_lang_decl_chain): Remove.
7885 * optimize.c (maybe_clone_body): Use function_name_declared_p.
7886 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
7887 it doesn't exist.
7888 (instantiate_decl): Use function_name_declared_p.
7889 * semantics.c (lang_expand_expr_stmt): Remove.
7890 (set_current_function_name_declared): Likewise.
7891 (current_function_name_declared): Likewise.
7892 (begin_compound_stmt): Use function_name_declared_p.
7893 (add_decl_stmt): Remove.
7894 (setup_vtbl_ptr): Use function_name_declared_p.
7895 (add_scope_stmt): Remove.
7896 (current_scope_stmt_stack): New function.
7897 (cp_expand_stmt): Don't handle SCOPE_STMTs.
7898 (expand_body): Use function_name_declared_p.
7899 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
7900 * typeck.c: Change order of includes.
7901 (convert_sequence): Remove.
7902
7903 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
7904
7905 * lex.c (reswords): Add _Complex.
7906
7907 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7908
7909 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
7910
7911 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
7912
7913 * init.c (begin_init_stmts): Don't use // comments.
7914
7915 2000-09-12 Jason Merrill <jason@redhat.com>
7916
7917 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
7918 all non-extern arrays.
7919
7920 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
7921 typenames, too. Downgrade complaint to pedwarn.
7922 (xref_tag): Warn about surprising behavior of 'friend struct T'.
7923 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
7924 'class This::Inherited'.
7925
7926 2000-09-12 Mark Mitchell <mark@codesourcery.com>
7927
7928 * decl.c (finish_case_label): Given the LABEL_DECL a
7929 DECL_CONTEXT.
7930
7931 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
7932
7933 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
7934 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
7935 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7936 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7937 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
7938 New macros.
7939 (sorry_for_unsupported_tree, print_scope_operator,
7940 print_left_paren, print_right_paren, print_left_bracket,
7941 print_right_bracket, print_whitespace): Likewise.
7942 (aggr_variety): Rename to class_key_or_enum.
7943 (print_type): Rename to print_type_id.
7944 (print_type_specifier_seq, print_simple_type_specifier,
7945 print_elaborated_type_specifier,
7946 print_rest_of_abstract_declarator,
7947 print_parameter_declaration_clause, print_exception_specification,
7948 print_nested_name_specifier, print_template_id,
7949 typedef_original_name, print_template_argument_list_start,
7950 print_template_argument_list_end): New functions.
7951
7952 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
7953
7954 * ir.texi: Add more documentation.
7955
7956 2000-09-11 Mark Mitchell <mark@codesourcery.com>
7957
7958 * cp-tree.h (struct saved_scope): Remove x_function_parms.
7959 (current_function_parms): Don't define.
7960 (struct cp_language_function): Remove parms_stored.
7961 (current_function_just_assigned_this): Don't define.
7962 (current_function_parms_stored): Likewise.
7963 (static_ctors): Declare.
7964 (static_dtors): Likewise.
7965 (SF_EXPAND): Don't define.
7966 (expand_start_early_try_stmts): Remove declaration.
7967 (store_parm_decls): Likewise.
7968 * decl.c (static_ctors): Don't declare.
7969 (static_dtors): Likewise.
7970 (struct binding_level): Remove this_block.
7971 (poplevel): Remove dead code.
7972 (set_block): Likewise.
7973 (mark_binding_level): Don't mark this_block.
7974 (mark_saved_scope): Don't mark x_function_parms.
7975 (init_decl_processing): Don't add current_function_parms as a GC
7976 root.
7977 (check_function_type): Change prototype.
7978 (start_function): Remove RTL-generation code.
7979 (expand_start_early_try_stmts): Remove.
7980 (store_parm_decls): Give it internal linkage. Remove
7981 RTL-generation code.
7982 (finish_function): Remove RTL-generation code.
7983 * decl2.c (static_ctors): Fix formatting.
7984 (static_dtors): Likewise.
7985 * method.c (use_thunk): Don't call store_parm_decls.
7986 (synthesize_method): Likewise.
7987 * optimize.c (maybe_clone_body): Likewise.
7988 * parse.y (fn.def2): Likewise.
7989 (.set_base_init): Likewise.
7990 (nodecls): Likewise.
7991 * pt.c (instantiate_decl): Likewise.
7992 * rtti.c (synthesize_tinfo_fn): Likewise.
7993 * semantics.c (genrtl_try_block): Simplify.
7994 (expand_body): Use genrtl_start_function and
7995 genrtl_finish_function.
7996 (genrtl_start_function): New function.
7997 (genrtl_finish_function): Likewise.
7998
7999 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8000
8001 * error.c (cp_tree_printer, case 'P'): Append break.
8002
8003 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8004
8005 * cp-tree.h (frob_opname): Declare.
8006 * parse.y (saved_scopes): New static variable.
8007 (cp_parse_init): Adjust.
8008 (do_id): If lastiddecl is NULL, do do_identifier.
8009 (operator): Save scope information.
8010 (unoperator): New reduction. Restore scope information.
8011 (operator_name): Append unoperator. Call frob_opname.
8012 * spew.c (frob_opname): Define.
8013
8014 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8015
8016 * decl.c, rtti.c: Include defaults.h if not already included.
8017 Don't define the *_TYPE_SIZE macros.
8018
8019 2000-09-09 Mark Mitchell <mark@codesourcery.com>
8020
8021 * cp-tree.h (push_switch): Change prototype.
8022 (check_cp_case_value): Remove declaration.
8023 (decl_constant_value): Likewise.
8024 * decl.c (struct cp_switch): Add switch_stmt and cases.
8025 (case_compare): New function.
8026 (push_switch): Set switch_stmt. Initialize cases.
8027 (pop_switch): Clean up cases.
8028 (define_case_label): Rename to ...
8029 (finish_case_label): ... this. Do semantic analysis for case
8030 labels here.
8031 (start_function): Correct comment.
8032 * decl2.c (check_cp_case_value): Remove.
8033 * expr.c (do_case): Remove.
8034 * pt.c (tsubst_expr): Adjust call to finish_case_label.
8035 * semantics.c (genrtl_do_poplevel): Remove declaration.
8036 (RECHAIN_STMTS): Remove.
8037 (finish_break_stmt): Use build_break_stmt.
8038 (finish_continue_stmt): Use build_continue_stmt.
8039 (finish_switch_cond): Adjust condition here, rater than in
8040 c_expand_start_case.
8041 (finish_case_label): Remove.
8042 * typeck.c (c_expand_return): Remove.
8043 (c_expand_start_case): Likewise.
8044
8045 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
8046
8047 * ir.texi: Document type nodes.
8048
8049 2000-09-06 Mark Mitchell <mark@codesourcery.com>
8050
8051 * cp-tree.h (init_cp_semantics): Declare.
8052 (genrtl_try_block): Don't declare.
8053 (genrtl_handler): Likewise.
8054 (genrtl_catch_block): Likewise.
8055 (genrtl_ctor_stmt): Likewise.
8056 (genrtl_subobject): Likewise.
8057 (genrtl_do_poplevel): Likewise.
8058 (genrtl_named_return_value): Likewise.
8059 * lex.c (init_parse): Call init_cp_semantics.
8060 * semantics.c (genrtl_try_block): Give it internal linkage.
8061 (genrtl_handler): Likewise.
8062 (genrtl_catch_block): Likewise.
8063 (genrtl_ctor_stmt): Likewise.
8064 (genrtl_subobject): Likewise.
8065 (genrtl_do_poplevel): Likewise.
8066 (genrtl_named_return_value): Likewise.
8067 (lang_expand_stmt): Rename to ...
8068 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
8069 (init_cp_semantics): Define.
8070
8071 * decl.c (initialize_local_var): Remove RTL-generating code.
8072 * semantics.c (genrtl_try_block): Fix formatting.
8073
8074 Move statement-tree facilities from C++ to C front-end.
8075 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
8076 (void_zero_node): Remove.
8077 (stmt_tree): Likewise.
8078 (scope_chain): Adjust.
8079 (language_function): Rename to cp_language_function.
8080 (cp_function_chain): Adjust.
8081 (current_stmt_tree): Remove.
8082 (last_tree): Likewise.
8083 (last_expr_type): Likewise.
8084 (struct lang_decl): Adjust.
8085 (STMT_IS_FULL_EXPR_P): Remove.
8086 (add_tree): Remove.
8087 (begin_stmt_tree): Likewise.
8088 (finish_stmt_tree): Likewise.
8089 (walk_tree_fn): Likewise.
8090 (walk_stmt_tree): Likewise.
8091 * class.c (finish_struct): Replace use of add_tree with add_stmt.
8092 * decl.c (mark_stmt_tree): Adjust type.
8093 (init_decl_processing): Don't build void_zero_node.
8094 (initialize_local_var): Adjust usage of current_stmt_tree.
8095 (finish_enum): Use add_stmt, not add_tree.
8096 (save_function_data): Adjust use of language_function.
8097 (finish_constructor_body): Use add_stmt, not add_tree.
8098 (finish_destructor_body): Likewise.
8099 (push_cp_function_context): Adjust use of language_function.
8100 (pop_cp_function_context): Likewise.
8101 (mark_lang_function): Likewise.
8102 (mark_cp_function_context): Likewise.
8103 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
8104 (build_vec_init): Likewise.
8105 * semantics.c (SET_LAST_STMT): Remove.
8106 (RECHAIN_STMTS): Don't use it.
8107 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
8108 (current_stmt_tree): Define.
8109 (add_tree): Remove.
8110 (finish_goto_stmt): Use add_stmt, not add_tree.
8111 (finish_expr_stmt): Likewise.
8112 (begin_if_stmt): Likewise.
8113 (finish_then_clause): Likewise.
8114 (begin_while_stmt): Likewise.
8115 (begin_do_stmt): Likewise.
8116 (finish_return_stmt): Likewise.
8117 (begin_for_stmt): Likewise.
8118 (finish_break_stmt): Likewise.
8119 (finish_continue_stmt): Likewise.
8120 (begin_switch_stmt): Likewise.
8121 (finish_case_label): Likewise.
8122 (begin_try_block): Likewise.
8123 (begin_function_try_block): Likewise.
8124 (begin_handler): Likewise.
8125 (begin_catch_block): Likewise.
8126 (begin_compound_stmt): Likewise.
8127 (begin_asm_stmt): Likewise.
8128 (finish_asm_stmt): Likewise.
8129 (finish_label_stmt): Likewise.
8130 (add_decl_stmt): Likewise.
8131 (finish_subobject): Likewise.
8132 (finish_decl_cleanup): Likewise.
8133 (finish_named_return_value): Likewise.
8134 (setup_vtbl_ptr): Likewise.
8135 (add_scope_stmt): Likewise.
8136 (finish_stmt_expr): Likewise.
8137 (prune_unused_decls): Remove.
8138 (begin_stmt_tree): Likewise.
8139 (finish_stmt_tree): Likewise.
8140 (prep_stmt): Adjust use of current_stmt_tree.
8141 (lang_expand_stmt): Likewise.
8142 * tree.c (statement_code_p): Remove.
8143 (cp_statement_code_p): New function.
8144 (walk_stmt_tree): Remove.
8145 (init_tree): Set lang_statement_code_p.
8146
8147 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
8148
8149 Integrated preprocessor.
8150
8151 * Make-lang.in, Makefile.in: Remove all references to input.c,
8152 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
8153 * gxx.gperf, hash.h, input.c: Delete.
8154 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
8155 initialized properly.
8156
8157 * class.c (fixup_pending_inline): Take a tree, not a
8158 struct pending_inline *. All callers changed.
8159 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
8160 RID_PROTECTED entries in ridpointers[] array here.
8161 * decl.c (duplicate_decls): Do not refer to struct
8162 pending_inline.
8163 (record_builtin_type, init_decl_processing): Use RID_MAX not
8164 CP_RID_MAX.
8165 (grokdeclarator): Use C_IS_RESERVED_WORD.
8166 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
8167 cpplib.
8168 (grok_x_components): Do not inspect pending_inlines chain.
8169
8170 * cp-tree.h (struct lang_identifier): Add rid_code entry.
8171 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
8172 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
8173 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
8174 TIME_IDENTIFIER_FILEINFO): Kill.
8175 Update prototypes.
8176 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
8177 single 32-bit word.
8178 * parse.y: Call do_pending_inlines unconditionally.
8179 reinit_parse_for_method is now snarf_method. fn.defpen is no
8180 longer necessary. Remove unnecessary <itype> annotation on
8181 SCOPE. Do not refer to end_of_file or struct pending_inline.
8182 * semantics.c (begin_inline_definitions): Call
8183 do_pending_inlines unconditionally.
8184
8185 * lex.c: Remove all code now shared with C front end.
8186 Initialize cpplib properly if USE_CPPLIB. Put reserved words
8187 into the get_identifier table. Rewrite pragma handling to
8188 work with the registry. Move code to save tokens for later
8189 processing to spew.c.
8190
8191 * spew.c: Rewrite everything in terms of token streams instead
8192 of text. Move routines here from lex.c / input.c as
8193 appropriate. GC-mark trees hanging off the pending inlines
8194 chain.
8195
8196 2000-09-06 Mark Mitchell <mark@codesourcery.com>
8197
8198 * NEWS: Mention that the named return value extension has been
8199 deprecated.
8200 * cp-tree.h (original_result_rtx): Define.
8201 (TREE_REFERENCE_EXPR): Remove.
8202 (DECL_VPARENT): Likewise.
8203 (pushdecl_nonclass_level): Likewise.
8204 (store_return_init): Likewise.
8205 (reinit_lang_specific): Likewise.
8206 (genrtl_named_return_value): Change prototype.
8207 * decl.c (original_result_rtx): Remove.
8208 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
8209 Do not generate RTL for local variables here.
8210 (store_return_init): Remove.
8211 * semantics.c (genrtl_named_return_value): Simplify. Fold in
8212 store_return_init.
8213 (finish_named_return_value): Adjust accordingly. Warn that this
8214 extension is deprecated.
8215 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
8216
8217 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8218
8219 * pt.c (type_unification_real): Replace switch with if.
8220 (unify): Tsubst non-type parms before comparing.
8221
8222 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8223
8224 * error.c (dump_typename): New function, broken out of ...
8225 (dump_type): ... here. Use it.
8226 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
8227
8228 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8229
8230 * init.c (build_offset_ref): Deal with namespace scoped
8231 TEMPLATE_ID_EXPRs.
8232
8233 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
8234
8235 * class.c (resolve_address_of_overloaded_function): Add
8236 explanation message.
8237 * decl.c (define_case_label): Reformat explanation.
8238 * decl2.c (finish_static_data_member_decl): Likewise.
8239 (grokfield): Likewise.
8240 * friend.c (do_friend): Likewise.
8241
8242 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
8243
8244 * tree.c (walk_tree): Expose tail recursion.
8245 (walk_stmt_tree): New function.
8246 * cp-tree.h: Prototype walk_stmt_tree.
8247 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
8248 the BLOCKs directly. If a BLOCK has no variables after
8249 pruning, discard it.
8250 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
8251 restore the line number.
8252
8253 2000-09-05 Mark Mitchell <mark@codesourcery.com>
8254
8255 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
8256 (pt.o): Remove dependency on HTAB_H.
8257 * cp-tree.h: Include hashtab.h.
8258 (walk_tree): Change prototype.
8259 (walk_tree_without_duplicates): New function.
8260 * decl.c (check_default_argument): Use it.
8261 * optimize.c (remap_decl): Adjust calls to walk_tree.
8262 (copy_body): Likewise.
8263 (expand_calls_inline): Likewise.
8264 (calls_setjmp_p): Use walk_tree_without_duplicates.
8265 * pt.c: Don't include hashtab.h.
8266 (for_each_template_parm): Use walk_tree_without_duplicates.
8267 * semantics.c (finish-stmt_tree): Likewise.
8268 (expand_body): Likewise.
8269 * tree.c (walk_tree): Add additional parameter.
8270 (walk_tree_without_duplicates): New function.
8271 (count_trees): Use it.
8272 (verify_stmt_tree): Adjust call to walk_tree.
8273 (find_tree): Use walk_tree_without_duplicates.
8274 (no_linkage_check): Likewise.
8275 (break_out_target_exprs): Adjust call to walk_tree.
8276 (cp_unsave): Likewise.
8277
8278 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8279
8280 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
8281 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8282 * cp-tree.h (TYPE_BINFO): Adjust comment.
8283 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8284 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
8285 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8286 (TYPE_TEMPLATE_INFO): Likewise.
8287 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
8288 * class.c (push_nested_class): Likewise.
8289 * decl.c (lookup_name_real): Likewise.
8290 (grokdeclarator): Likewise.
8291 (grok_op_properties): Likewise.
8292 (xref_tag): Likewise.
8293 (xref_basetypes): Likewise.
8294 * decl2.c (constructor_name_full): Likewise.
8295 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
8296 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8297 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
8298 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8299 (dump_type_suffix): Likewise.
8300 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
8301 instead.
8302 (get_aggr_from_typedef): Likewise.
8303 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
8304 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8305 (write_template_parm): Likewise.
8306 (write_template_template_parm): Check tree code instead of
8307 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8308 * method.c (build_overload_nested_name): Add
8309 BOUND_TEMPLATE_TEMPLATE_PARM.
8310 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
8311 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8312 * pt.c (convert_template_argument): Check tree code instead of
8313 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8314 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
8315 (for_each_template_parm): Adjust comment.
8316 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
8317 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8318 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
8319 template_args_equal to compare template template parameter cases.
8320 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8321 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
8322 instead.
8323 * tree.c (copy_template_template_parm): Decide whether to create
8324 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
8325 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8326 (copy_tree_r): Likewise.
8327 * typeck.c (comptypes): Likewise. Check tree code instead of
8328 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8329
8330 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
8331
8332 * decl.c (finish_function): Move the code for handling functions
8333 marked with the constructor and destructor attributes inside the
8334 expand_p block.
8335
8336 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8337
8338 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
8339
8340 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8341
8342 * pt.c (lookup_template_class): Remove abort.
8343 * tree.c (get_type_decl): Allow error_mark_node.
8344
8345 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
8346
8347 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
8348 TEMPLATE_ID_EXPRs.
8349
8350 2000-09-03 Mark Mitchell <mark@codesourcery.com>
8351
8352 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
8353 new ABI mangling.
8354
8355 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
8356
8357 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
8358 union tag mismatch error reporting.
8359
8360 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
8361
8362 * call.c (build_scoped_method_call): Check it is not a namespace.
8363
8364 2000-08-30 Jason Merrill <jason@redhat.com>
8365
8366 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
8367
8368 * tree.c (bot_manip): Check TREE_CONSTANT rather than
8369 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
8370 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
8371
8372 * decl.c (start_function): Always call make_function_rtl.
8373
8374 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8375
8376 * semantics.c (prune_unused_decls): New function.
8377 (finish_stmt_tree): Call it via walk_tree.
8378
8379 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8380
8381 * class.c (build_secondary_vtable): Constify a char *.
8382 * decl.c (init_decl_processing): Initialize function_id_node,
8383 pretty_function_id_node, and func_id_node.
8384 * input.c (struct input_source): Constify 'str'.
8385 (feed_input): Constify first argument.
8386 * mangle.c (write_identifier): Constify argument.
8387 * pt.c (mangle_class_name_for_template): Constify argument.
8388
8389 2000-08-29 Mark Mitchell <mark@codesourcery.com>
8390
8391 * typeck.c (mark_addressable): Remove code that pokes around in
8392 RTL.
8393
8394 2000-08-28 Jason Merrill <jason@redhat.com>
8395
8396 * lex.c (file_name_nondirectory): Move to toplev.c.
8397
8398 * cp-tree.h (LOCAL_CLASS_P): New macro.
8399 * class.c (finish_struct_1): Use it.
8400
8401 2000-08-27 Alex Samuel <samuel@codesourcery.com>
8402
8403 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
8404 (write_encoding): Pass another argument to write_name.
8405 (write_name): Add ignore_local_scope parameter. Fix handling of
8406 local names.
8407 (write_nested_name): Use write_unqualified_name.
8408 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
8409 (write_template_prefix): Use write_unqualified_name.
8410 (write_component): Remove.
8411 (write_local_name): Add parameter. Use direct local entity to
8412 discriminator calculation.
8413 (write_class_enum_type): Pass another argument to write_name.
8414 (write_template_template_arg): Likewise.
8415 (make_guard_variable): Likewise.
8416
8417 2000-08-27 Jason Merrill <jason@redhat.com>
8418
8419 * decl.c (pushdecl): Matching decls for local externs are found in
8420 the current level. Propagate linkage information from previous
8421 declarations.
8422
8423 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
8424
8425 * ir.texi (Expressions): Fix typo.
8426
8427 2000-08-25 Greg McGary <greg@mcgary.org>
8428
8429 * tree.c (init_tree): Use ARRAY_SIZE.
8430
8431 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
8432
8433 * error.c (cp_tree_printer): Rework.
8434
8435 2000-08-25 Mark Mitchell <mark@codesourcery.com>
8436
8437 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
8438 dyn-string.o.
8439 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
8440 (cp-demangle.o): Remove target.
8441 (dyn-string.o): Likewise.
8442
8443 * decl.c (grokfndecl): Require that `main' return an `int'.
8444 * mangle.c (write_encoding): Don't mangle return types for
8445 conversion functions.
8446
8447 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
8448
8449 * error.c (tree_formatting_info): New data type.
8450 (tree_being_formatted): New macro.
8451 (tree_formatting_flags): Likewise.
8452 (put_whitespace): Likewise.
8453 (print_tree_identifier): Likewise.
8454 (print_identifier): Likewise.
8455 (cp_tree_printer, print_function_argument_list, print_declaration,
8456 print_expression, print_function_declaration,
8457 print_function_parameter, print_type, print_cv_qualifier): New
8458 functions.
8459 (init_error): Initialize lang_printer.
8460
8461 2000-08-24 Jason Merrill <jason@redhat.com>
8462
8463 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
8464 adjustment necessary.
8465
8466 2000-08-24 Greg McGary <greg@mcgary.org>
8467
8468 * cp-tree.h (MAIN_NAME_P): Remove macro.
8469
8470 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
8471
8472 * error.c (print_instantiation_context): Don't forget to flush the
8473 buffer.
8474
8475 2000-08-23 Jason Merrill <jason@redhat.com>
8476
8477 * typeck.c (build_ptrmemfunc): Save the input pmf.
8478
8479 * method.c (process_modifiers): Use same_type_p.
8480
8481 2000-08-23 Mark Mitchell <mark@codesourcery.com>
8482
8483 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
8484 * mangle.c (write_function_type): Change prototype.
8485 (write_encoding): Don't mangle return types for
8486 constructors or destructors.
8487 (write_type): Adjust call to write_function_type.
8488 * pt.c (instantiate_template): Instantiate alternate entry points
8489 when instantiating the main function.
8490
8491 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
8492
8493 * error.c (cp_print_error_function): Don't use embedded '\n' in
8494 output_printf.
8495
8496 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
8497
8498 * decl.c (init_decl_processing): Remove bogus initialization.
8499 * error.c (lang_print_error_function): Restore here.
8500 (init_error): Initialize print_error_function.
8501
8502 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8503
8504 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
8505
8506 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
8507
8508 * Makefile.in (error.o): Depends on diagnostic.h
8509
8510 * cp-tree.h (problematic_instantiation_changed,
8511 record_last_problematic_instantiation, current_instantiation,
8512 print_instantiation_context): Declare.
8513 (maybe_print_template_context): Remove.
8514
8515 * decl.c (init_decl_processing): Set print_error_function to NULL.
8516 (lang_print_error_function): Remove, since we're using a new
8517 machinery.
8518
8519 * error.c: #include diagnostic.h
8520 (function_category): New function.
8521 (cp_diagnostic_starter): Likewise.
8522 (cp_diagnostic_finalizer): Likewise.
8523 (cp_print_error_function): Likewise.
8524 (maybe_print_instantiation_context): Likewise.
8525 (print_instantiation_full_context): Likewise.
8526 (print_instantiation_partial_context): Likewise.
8527 (print_instantiation_context): Define.
8528 (init_error): Initialize diagnostic pager and finalizer.
8529
8530 * pt.c (problematic_instantiation_changed): Define.
8531 (record_last_problematic_instantiation): Likewise.
8532 (current_instantiation): Likewise.
8533 (maybe_print_template_context): Remove.
8534 (print_template_context): Likewise.
8535 (current_tinst_level): Make static to reflect Brendan Kehoe's
8536 change of 1995-04-13.
8537 (push_tinst_level): Call print_instantiation_context.
8538
8539 2000-08-21 Nix <nix@esperi.demon.co.uk>
8540
8541 * lang-specs.h: Do not process -o or run the assembler if
8542 -fsyntax-only.
8543
8544 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
8545
8546 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
8547 variables.
8548 * decl2.c (lang_decode_option): Disable gettext attributes for
8549 -ansi.
8550
8551 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
8552
8553 * lex.c (lang_init_options): Default diagnostic message maximum
8554 length to 80, when line-wrapping.
8555
8556 2000-08-20 Mark Mitchell <mark@codesourcery.com>
8557
8558 * class.c (build_vtbl_initializer): Clear the entire
8559 vtbl_init_data. Start keeping track of the functions for which we
8560 have created vcall offsets here.
8561 (dfs_build_vcall_offset_vtbl_entries): Remove.
8562 (build_vcall_offset_vtbl_entries): Reimplement.
8563 (add_vcall_offset_vtbl_entries_r): New function.
8564 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
8565 computing when vcall offsets are necessary.
8566
8567 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8568
8569 * decl.c (member_function_or_else): Use cp_error ... %T.
8570 (grokdeclarator): Likewise.
8571 (start_method): Likewise.
8572 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
8573
8574 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8575
8576 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
8577 TYPE_DECLs.
8578
8579 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8580
8581 * cp-tree.h (PTRMEM_OK_P): New macro.
8582 (itf_ptrmem_ok): New enumeration value.
8583 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
8584 argument. Diagnose implicit pointer to member.
8585 (instantiate_type): Don't diagnose implicit pointer to member
8586 here. Pass itf_ptrmem_ok if ok. Adjust calls to
8587 resolve_address_of_overloaded_function.
8588 * init.c (build_offset_ref): Set PTRMEM_OK_P.
8589 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
8590 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
8591 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
8592 (build_unary_op): Deal with single non-static member in
8593 microsoft-land.
8594
8595 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8596
8597 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
8598
8599 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
8600
8601 * cp-tree.h (enum_name_string): Remove prototype.
8602 (report_case_error): Remove prototype.
8603 * cp/typeck2.c (enum_name_string): Remove.
8604 (report_case_error): Remove.
8605 * error.c (dump_expr): Deal with enum values directly.
8606 Correctly negate integer constant.
8607
8608 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8609
8610 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
8611 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
8612 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
8613 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
8614 (__cxa_vec_new): Use __cxa_vec_new2.
8615 (__cxa_vec_delete): Use __cxa_vec_delete2.
8616
8617 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8618
8619 * vec.cc (__cxa_vec_new): Set "C" linkage.
8620 (__cxa_vec_ctor): Likewise.
8621 (__cxa_vec_cctor): Likewise.
8622 (__cxa_vec_dtor): Likewise.
8623 (__cxa_vec_delete): Likewise.
8624 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
8625 (__cxa_vec_ctor): Likewise.
8626 (__cxa_vec_cctor): Likewise.
8627 (__cxa_vec_dtor): Likewise.
8628 (__cxa_vec_delete): Likewise.
8629
8630 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8631
8632 * class.c (instantiate_type): Reinstate local variable
8633 deleted in previous change.
8634
8635 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
8636 itf_no_attributes.
8637
8638 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8639
8640 * cp-tree.h (instantiate_type_flags): New enumeration.
8641 (instantiate_type): Change parameter.
8642 * class.c (instantiate_type): Adjust prototype. Adjust.
8643 * call.c (standard_conversion): Adjust instantiate_type call.
8644 (reference_binding): Likewise.
8645 (build_op_delete_call): Likewise.
8646 (convert_like_real): Likewise.
8647 * cvt.c (cp_convert_to_pointer): Likewise.
8648 (convert_to_reference): Likewise.
8649 * pt.c (convert_nontype_argument): Likewise.
8650 * typeck.c (build_binary_op): Likewise.
8651 (build_ptrmemfunc): Likewise.
8652 (convert_for_assignment): Likewise.
8653
8654 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
8655
8656 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
8657 (current_aggr): Define.
8658 * decl.c (grokdeclarator): Make sure a friend class is an
8659 elaborated type specifier.
8660 * parse.y (current_aggr): Remove static definition.
8661 (cp_parse_init): Adjust.
8662 (structsp): Clear and restore current_aggr.
8663 (component_decl_list): Clear current_aggr.
8664
8665 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
8666 aggregate tag on the typename's context.
8667
8668 * pt.c (tsubst_friend_class): Return error_mark_node, if
8669 parms becomes NULL.
8670 (instantiate_class_template): Ignore error_mark_node friend types.
8671
8672 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
8673
8674 * cvt.c (warn_ref_binding): New static function, broken out of ...
8675 (convert_to_reference): ... here. Use it.
8676
8677 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8678
8679 * parse.y (template_arg): Add rule for template qualified with
8680 global scope.
8681
8682 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8683
8684 * decl2.c (add_function): Reorganize.
8685 (arg_assoc): Do not consider function template decls.
8686
8687 2000-08-11 Jason Merrill <jason@redhat.com>
8688
8689 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
8690 looking inside.
8691
8692 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8693
8694 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
8695 (lookup_nested_tag): Likewise.
8696
8697 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
8698 can be produced.
8699
8700 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8701
8702 * parse.y (named_complex_class_head_sans_basetype): Remove
8703 always true if.
8704
8705 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8706
8707 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
8708 explicit TEMPLATE_ID_EXPR args.
8709 (build_expr_from_tree, case CALL_EXPR): Likewise.
8710
8711 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
8712
8713 * decl.c (check_tag_decl): Diagnose typename's which don't
8714 declare anything.
8715
8716 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
8717
8718 * init.c (build_aggr_init): Reject bogus array initializers
8719 early.
8720
8721 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
8722
8723 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
8724 runtime.
8725 * cp/tinfo.cc (__dynamic_cast): Likewise.
8726 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
8727
8728 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
8729
8730 * cvt.c (convert_to_pointer_force): Fix error message when
8731 attempting to cast from ambiguous base.
8732
8733 2000-08-08 Jason Merrill <jason@redhat.com>
8734
8735 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
8736 (tsubst_template_arg_vector): Likewise.
8737
8738 * decl2.c (build_anon_union_vars): Choose the largest field; don't
8739 assume that one will be as large as the union.
8740
8741 2000-08-07 Kazu Hirata <kazu@hxi.com>
8742
8743 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
8744 * decl.c (pop_labels): Likewise.
8745
8746 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
8747
8748 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
8749 specifications.
8750 (__pointer_to_member_type_info): Likewise.
8751 (__base_class_info): Likewise.
8752 (__class_type_info): Likewise.
8753 (__si_class_type_info): Likewise.
8754 (__vmi_class_type_info): Likewise.
8755 * tinfo.cc (__si_class_type_info::__do_find_public_src):
8756 Changed member names to match specifications.
8757 (__vmi_class_type_info::__do_find_public_src): Likewise.
8758 (__si_class_type_info::__do_dyncast): Likewise.
8759 (__vmi_class_type_info::__do_dyncast): Likewise.
8760 (__si_class_type_info::__do_upcast): Likewise.
8761 (__vmi_class_type_info::__do_upcast): Likewise.
8762 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
8763 (__pbase_type_info::__pointer_catch): Likewise.
8764 (__pointer_type_info::__pointer_catch): Likewise.
8765 (__pointer_to_member_type_info::__pointer_catch): Likewise.
8766
8767 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
8768
8769 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
8770 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
8771 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
8772
8773 2000-08-04 Mark Mitchell <mark@codesourcery.com>
8774
8775 * cp-tree.h (add_method): Change prototype.
8776 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
8777 Don't double the size of the method vector in the error case.
8778 (handle_using_decl): Adjust call to add_method.
8779 (add_implicitly_declared_members): Likewise.
8780 (clone_function_decl): Likewise.
8781 * decl2.c (check_classfn): Likewise.
8782 * semantics.c (finish_member_declaration): Likewise.
8783
8784 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
8785
8786 * decl.c (flag_isoc94): New variable.
8787
8788 2000-08-02 Jason Merrill <jason@redhat.com>
8789
8790 * pt.c (do_type_instantiation): Add complain parm; don't complain
8791 if called recursively.
8792 * cp-tree.h, parse.y: Adjust.
8793
8794 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
8795
8796 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
8797 -Wno-strict-prototypes.
8798
8799 * g++spec.c: Adjust type of second argument to
8800 lang_specific_driver, and update code as necessary.
8801
8802 * cp-tree.h: Don't prototype min_precision here.
8803 (my_friendly_assert): Cast expression to void.
8804 * semantics.c (do_poplevel): Initialize scope_stmts.
8805
8806 2000-08-02 Mark Mitchell <mark@codesourcery.com>
8807
8808 * cp-tree.h (DECL_NEEDED_P): Tweak.
8809
8810 2000-07-28 Jason Merrill <jason@redhat.com>
8811
8812 * lang-specs.h: Use %i in rule for .ii files.
8813
8814 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
8815
8816 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
8817
8818 2000-07-30 Mark Mitchell <mark@codesourcery.com>
8819
8820 Allow indirect primary bases.
8821 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
8822 primary_base.
8823 (CLASSTYPE_VFIELD_PARENT): Remove.
8824 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
8825 (BINFO_PRIMARY_BINFO): Remove.
8826 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
8827 (BINFO_VBASE_PRIMARY_P): Likewise.
8828 (BINFO_PRIMARY_BASE_OF): New macro.
8829 (BINFO_INDIRECT_PRIMARY_P): Likewise.
8830 (get_primary_binfo): New function.
8831 * decl.c (lang_mark_tree): Make lang_type::primary_base.
8832 * class.c (vcall_offset_data_s): Rename to ...
8833 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
8834 and add ctor_vtbl_p.
8835 (get_derived_offset): Use get_primary_binfo.
8836 (dfs_mark_primary_bases): Adjust handling of virtual primary
8837 bases.
8838 (mark_primary_bases): Likewise.
8839 (set_primary_base): Take a binfo, not an integer, as a
8840 representation of the primary base.
8841 (indirect_primary_base_p): Remove.
8842 (determine_primary_base): Adjust for indirect primary bases.
8843 (dfs_find_final_overrider): Fix typo in coment.
8844 (update_vtable_entry_for_fn): Use get_primary_binfo.
8845 (layout_nonempty_base_or_field): Tweak.
8846 (build_base_fields): Adjust for new primary base semantics.
8847 (dfs_propagate_binfo_offsets): Remove.
8848 (propagate_binfo_offsets): Rewrite.
8849 (dfs_set_offset_for_shared_vbases): Remove.
8850 (layout_virtual_bases): Don't use it.
8851 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
8852 ABI.
8853 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
8854 CLASSTYPE_VFIELD_PARENT.
8855 (dfs_get_primary_binfo): New function.
8856 (get_primary_binfo): Likewise.
8857 (dump_class_hierarchy_r): Tweak printing of primary bases.
8858 (build_vtbl_initializer): Fix typo in comments. Use
8859 vtbl_init_data.
8860 (build_vcall_and_vbase_vtbl_entries): Likewise.
8861 (build_vbaes_offset_vtbl_entries): Likewise.
8862 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
8863 BV_VCALL_INDEX to handle indirect primary bases.
8864 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
8865 (build_rtti_vtbl_entries): Likewise.
8866 * search.c (get_shared_vbase_if_not_primary): Tweak.
8867 (find_vbase_instance): Likewise.
8868 (binfo_for_vtable): Simplify.
8869 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
8870 (make_binfo): Make it have 11 entries.
8871
8872 2000-07-30 Alex Samuel <samuel@codesourcery.com>
8873
8874 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
8875 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
8876 ascertaining primaryness.
8877 (G): Remove template_args.
8878 (decl_is_template_id): New function.
8879 (write_encoding): Use decl_is_template_id.
8880 (write_name): Likewise. Handle type_decls. Get main variant of
8881 type decls.
8882 (write_nested_name): Likewise.
8883 (write_prefix): Likewise.
8884 (write_template_prefix): Likewise.
8885 (write_special_name_constructor): Remove defunct production from
8886 comment.
8887 (write_bare_function_type): Remove comment about absent parameter.
8888 (write_template_template_arg): Add missing grammar production to
8889 comment.
8890
8891 2000-07-27 Jason Merrill <jason@redhat.com>
8892
8893 * decl.c (duplicate_decls): If common_type produces a non-typedef
8894 type for a typedef, just use the old type.
8895
8896 2000-07-27 Mark Mitchell <mark@codesourcery.com>
8897
8898 * cp-tree.h (function_depth): Declare.
8899 (verify_stmt_tree): Likewise.
8900 (find_tree): Likewise.
8901 * decl.c (function_depth): Give it external linkage.
8902 * optimize.c (optimize_function): Increment and decrement it.
8903 * tree.c (verify_stmt_tree_r): New function.
8904 (verify_stmt_tree): Likewise.
8905 (find_tree_r): Likewise.
8906 (find_tree): Likewise.
8907
8908 2000-07-27 Jason Merrill <jason@redhat.com>
8909
8910 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
8911 TYPE_PTRMEMFUNC_P.
8912 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
8913
8914 2000-07-26 Mark Mitchell <mark@codesourcery.com>
8915
8916 * decl.c (start_cleanup_fn): Mark the function as `inline'.
8917 * decl2.c (get_guard): Call cp_finish_decl, not
8918 rest_of_decl_compilation, for local guards.
8919 * lex.c (do_identifier): Remove unused variable.
8920
8921 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
8922
8923 * parse.y: Add missing ';'.
8924
8925 2000-07-26 Mark Mitchell <mark@codesourcery.com>
8926
8927 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
8928 of `extern "C++"'.
8929
8930 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
8931
8932 Kill strict_prototype. Backwards compatibility only for
8933 non NO_IMPLICIT_EXTERN_C systems.
8934 * cp-tree.h (flag_strict_prototype): Remove.
8935 (strict_prototype): Remove.
8936 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8937 * decl.c (maybe_push_to_top_level): Adjust.
8938 (pop_from_top_level): Adjust.
8939 (decls_match): Only allow sloppy parm matching for ancient
8940 system headers.
8941 (init_decl_processing): Adjust.
8942 (grokdeclarator): Adjust.
8943 * decl2.c (flag_strict_prototype): Remove.
8944 (strict_prototype): Remove.
8945 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8946 (lang_f_options): Remove "strict-prototype".
8947 (unsupported-options): Add "strict-prototype".
8948 * lex.c (do_identifier): Adjust.
8949 (do_scoped_id): Adjust.
8950 * parse.y (empty_parms): Adjust.
8951 * class.c (push_lang_context): Adjust.
8952 (pop_lang_context): Adjust.
8953 * typeck.c (comp_target_parms): Adjust.
8954
8955 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
8956
8957 * decl.c (poplevel): Deal with anonymous variables at for scope.
8958 (maybe_inject_for_scope_var): Likewise.
8959
8960 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
8961
8962 * decl.c: Remove all signal handling code, now done in toplev.c.
8963
8964 2000-07-23 Mark Mitchell <mark@codesourcery.com>
8965
8966 * decl.c (make_rtl_for_nonlocal_decl): Rework.
8967
8968 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
8969 correctly.
8970
8971 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
8972
8973 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
8974 Define my_friendly_assert and my_friendly_abort as macros
8975 which may call friendly_abort. Prototype friendly abort, not
8976 my_friendly_abort or my_friendly_assert.
8977 * decl.c (signal_catch): Report the signal caught in the error
8978 message. Call fatal directly.
8979 * typeck2.c (ack, my_friendly_assert): Delete.
8980 (my_friendly_abort): Rename to friendly_abort. Expect file,
8981 line, and function parameters. Report the abort code, then
8982 call fancy_abort. Do not mask an abort if errors have
8983 already occurred.
8984
8985 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
8986
8987 * typeck.c (comp_target_parms): Remove obsolete parameter.
8988 (comp_target_types): Adjust.
8989
8990 2000-07-17 Jason Merrill <jason@redhat.com>
8991
8992 * typeck.c (mark_addressable): Never set TREE_USED.
8993 * call.c (build_call): Don't abort on calls to library functions
8994 that have been declared normally.
8995
8996 * typeck.c (build_binary_op): Fix grammar in warning.
8997
8998 * exception.cc (__eh_free): Fix prototype.
8999
9000 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
9001
9002 * decl.c (pushdecl): Handle seeing an OVERLOAD in
9003 IDENTIFIER_NAMESPACE_VALUE.
9004
9005 2000-07-16 Mark Mitchell <mark@codesourcery.com>
9006
9007 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
9008 * method.c (use_thunk): Correct handling of vcall offsets.
9009
9010 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9011
9012 * .cvsignore: parse.h and parse.c have no cp- prefix.
9013
9014 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9015
9016 * .cvsignore: New file.
9017
9018 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9019
9020 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9021
9022 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9023
9024 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
9025 * parse.c: Remove.
9026 * parse.h: Likewise.
9027
9028 2000-07-11 Mark Mitchell <mark@codesourcery.com>
9029
9030 * class.c (layout_class_type): Add pointers to virtual bases after
9031 base classes under the old ABI.
9032
9033 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
9034
9035 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
9036 (finish_continue_stmt): Likewise.
9037 (begin_for_stmt): Remove call to note_level_for_for.
9038 (finish_goto_stmt): Change call from build_min_nt
9039 to build_stmt.
9040 (finish_expr_stmt): Likewise.
9041 (begin_if_stmt): Likewise.
9042 (begin_while_stmt): Likewise.
9043 (finish_while_stmt): Likewise.
9044 (finish_return_stmt): Likewise.
9045 (begin_for_stmt): Likewise.
9046 (finish_for_stmt): Likewise.
9047 (finish_break_stmt): Likewise.
9048 (begin_switch_stmt): Likewise.
9049 (finish_case_label): Likewise.
9050 (genrtl_try_block): Likewise.
9051 (begin_try_block): Likewise.
9052 (begin_handler): Likewise.
9053 (begin_compound_stmt): Likewise.
9054 (finish_asm_stmt): Likewise.
9055 (finish_label_stmt): Likewise.
9056 (add_decl_stmt): Likewise.
9057 (finish_subobject): Likewise.
9058 (finish_decl_cleanup): Likewise.
9059 (finish_named_return_value): Likewise.
9060 (setup_vtbl_ptr): Likewise.
9061 (add_scope_stmt): Likewise.
9062 * decl.c (finish_constructor_body): Likewise.
9063 (finish_destructor_body): Likewise.
9064 * optimize.c (copy_body_r): Likewise.
9065 (initialize_inlined_parameters): Likewise.
9066 (declare_return_variable): Likewise.
9067 (expand_call_inline): Likewise.
9068
9069 2000-07-10 Jakub Jelinek <jakub@redhat.com>
9070
9071 * semantics.c (expand_body): Sync interface information
9072 at the end of function body expansion.
9073
9074 2000-07-09 Jason Merrill <jason@redhat.com>
9075
9076 * init.c (build_new_1): Bail early if the call to new fails.
9077
9078 * decl.c (compute_array_index_type): Check specifically for
9079 an INTEGER_CST, not just TREE_CONSTANT.
9080
9081 * decl.c (duplicate_decls): Don't call duplicate_decls on
9082 the DECL_TEMPLATE_RESULT.
9083 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
9084 codes.
9085
9086 * error.c (dump_template_bindings): Don't crash if we had an
9087 invalid argument list.
9088
9089 * typeck.c (c_expand_start_case): Do narrowing here.
9090 * semantics.c (finish_switch_cond): Not here.
9091
9092 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
9093
9094 * parse.y (asm_clobbers): Do string concatenation.
9095
9096 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9097
9098 * decl.c (pushtag): Don't put local classes in template functions
9099 on the local_classes list.
9100
9101 2000-07-04 Scott Snyder <snyder@fnal.gov>
9102
9103 * decl2.c (get_guard): Add missing return for old ABI local
9104 variable case.
9105
9106 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9107
9108 * cp-tree.h (char_type_p): New function.
9109 * decl.c (init_decl_processing): Don't initialize
9110 signed_wchar_type_node or unsigned_wchar_type_node.
9111 (complete_array_type): Handle brace-enclosed string-constants.
9112 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
9113 * tree.c (char_type_p): New function.
9114 * typeck2.c (digest_init): Use char_type_p.
9115
9116 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9117
9118 * pt.c (tsubst): Don't layout type, if it's error_mark.
9119
9120 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9121
9122 * pt.c (instantiate_pending_templates): Reset template level.
9123
9124 2000-07-05 Jason Merrill <jason@redhat.com>
9125
9126 * call.c (joust): Don't complain about `operator char *()' beating
9127 `operator const char *() const'.
9128
9129 2000-07-04 scott snyder <snyder@fnal.gov>
9130 Jason Merrill <jason@redhat.com>
9131
9132 * repo.c (repo_get_id): Handle the case where a class with virtual
9133 bases has a null TYPE_BINFO_VTABLE.
9134
9135 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
9136 Jason Merrill <jason@redhat.com>
9137
9138 * parse.y (member_init): Just pass in the type.
9139 * init.c (expand_member_init): Handle getting a type.
9140
9141 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9142 Jason Merrill <jason@redhat.com>
9143
9144 * decl.c (finish_function): Warn if a function has no return
9145 statement.
9146 Suggested by Andrew Koenig.
9147 * typeck.c (check_return_expr): Do set current_function_returns_value
9148 if we got an error_mark_node.
9149
9150 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9151
9152 * decl2.c (push_decl_namespace): Push the original namespace.
9153
9154 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9155
9156 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
9157 * semantics.c (begin_class_definition): Clear it.
9158
9159 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
9160
9161 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
9162 (genrtl_expr_stmt): Likewise.
9163 (genrtl_decl_stmt): Likewise.
9164 (genrtl_if_stmt): Likewise.
9165 (genrtl_while_stmt): Likewise.
9166 (genrtl_do_stmt): Likewise.
9167 (genrtl_return_stmt): Likewise.
9168 (genrtl_for_stmt): Likewise.
9169 (genrtl_break_stmt): Likewise.
9170 (genrtl_continue_stmt): Likewise.
9171 (genrtl_scope_stmt): Likewise.
9172 (genrtl_switch_stmt): Likewise.
9173 (genrtl_case_label): Likewise.
9174 (genrtl_begin_compound_stmt): Likewise.
9175 (genrtl_finish_compound_stmt): Likewise.
9176 (genrtl_compound_stmt): Likewise.
9177 (genrtl_asm_stmt): Likewise.
9178
9179 * init.c (begin_init_stmts): Remove call to
9180 genrtl_begin_compound_stmt.
9181 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
9182
9183 * semantics.c (lang_expand_stmt): Changed call to
9184 genrtl_compound_stmt to ignore return value.
9185
9186 2000-07-02 Mark Mitchell <mark@codesourcery.com>
9187
9188 * mangle.c (canonicalize_for_substitution): Return the canonical
9189 variant of a type.
9190
9191 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
9192 TYPE_DECL.
9193 * typeck.c (commonparms): Remove obstack manipulations.
9194
9195 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
9196
9197 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
9198
9199 * Makefile.in (OBJS): Added ../c-semantics.o.
9200 (OBJDEPS): Likewise.
9201
9202 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
9203 ../c-common.h.
9204 (struct stmt_tree): Added comment.
9205 (current_function_name_declared): Removed.
9206 (stmts_are_full_exprs_p): Likewise.
9207 (genrtl_do_pushlevel): Likewise.
9208 (genrtl_clear_out_block): Likewise.
9209 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
9210 (DECL_ANON_UNION_ELEMS): Likewise.
9211 (emit_local_var): Likewise.
9212 (make_rtl_for_local_static): Likewise.
9213 (do_case): Likewise.
9214 (expand_stmt): Likewise.
9215 (genrtl_decl_cleanup): Likewise.
9216 (c_expand_asm_operands): Likewise.
9217 (c_expand_return): Likewise.
9218 (c_expand_start_case): Likewise.
9219
9220 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
9221 (emit_local_var): Likewise.
9222 (initialize_local_var): Change reference to
9223 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9224 Change reference to stmts_are_full_exprs_p to
9225 current_stmt_tree->stmts_are_full_exprs_p.
9226 (push_cp_function_context): Likewise.
9227
9228 * expect.c (expand_throw): Change reference to
9229 stmts_are_full_exprs_p.
9230
9231 * init.c (build_aggr_init): Change reference to
9232 stmts_are_full_exprs_p.
9233 (build_vec_init): Likewise.
9234
9235 * optimize.c (maybe_clone_body): Change reference to
9236 current_function_name_declared to
9237 cp_function_chain->name_declared.
9238
9239 * pt.c (instantiate_decl): Change reference to
9240 current_function_name_declared to
9241 cp_function_chain->name_declared.
9242
9243 * semantics.c (expand_cond): Moved declaration to c-common.h.
9244 (genrtl_do_pushlevel): Moved to c-semantics.c.
9245 (genrtl_clear_out_block): Likewise.
9246 (genrtl_goto_stmt): Likewise.
9247 (genrtl_expr_stmt): Likewise.
9248 (genrtl_decl_stmt): Likewise.
9249 (gerntl_if_stmt): Likewise.
9250 (genrtl_while_stmt): Likewise.
9251 (genrtl_do_stmt): Likewise.
9252 (genrtl_return_stmt): Likewise.
9253 (genrtl_for_stmt): Likewise.
9254 (genrtl_break_stmt): Likewise.
9255 (genrtl_continue_stmt): Likewise.
9256 (genrtl_scope_stmt): Likewise.
9257 (genrtl_switch_stmt): Likewise.
9258 (genrtl_case_label): Likewise.
9259 (genrtl_begin_compound_stmt): Likewise.
9260 (genrtl_finish_compound_stmt): Likewise.
9261 (genrtl_compound_stmt): Likewise.
9262 (genrtl_asm_stmt): Likewise.
9263 (genrtl_decl_cleanup): Likewise.
9264 (expand_cond): Likewise.
9265 (expand_stmt): Renamed to ...
9266 (lang_expand_stmt): ... this.
9267 (lang_expand_expr_stmt): Initialize.
9268 (set_current_function_name_declared): Likewise.
9269 (stmts_are_full_exprs_p): Likewise.
9270 (current_function_name_declared): Likewise.
9271 (anon_aggr_type_p): Likewise.
9272 (do_poplevel): Change reference to
9273 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9274 Change reference to stmts_are_full_exprs_p to
9275 current_stmt_tree->stmts_are_full_exprs_p.
9276 (add_tree): Likewise.
9277 (finish_expr_stmt): Likewise.
9278 (prep_stmt): Likewise.
9279 (lang_expand_stmt): Likewise.
9280 (begin_compound_stmt): Change reference to
9281 current_function_name_declared to
9282 cp_function_chain->name_declared and call to
9283 current_function_name_declared().
9284 (setup_vtbl_ptr): Likewise.
9285 (genrtl_do_poplevel): Removed.
9286
9287 2000-06-30 Jason Merrill <jason@redhat.com>
9288
9289 * init.c (init_init_processing): Go back to aligning like
9290 double_type_node for old ABI.
9291 (get_cookie_size): Make cookie larger if we get a type that needs
9292 more alignment.
9293 (build_vec_delete): Call it.
9294
9295 * typeck.c (qualify_type_recursive): New fn.
9296 (composite_pointer_type): Use it.
9297 (build_binary_op): Use composite_pointer_type.
9298
9299 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
9300 Jason Merrill <jason@redhat.com>
9301
9302 * typeck.c (check_return_expr): Don't complain about returning
9303 NULL from operator new if -fcheck-new.
9304 * cp-tree.h: Declare flag_check_new here.
9305 * init.c: Not here.
9306
9307 2000-06-28 Alex Samuel <samuel@codesourcery.com>
9308
9309 * mangle.c (find_substitution): Use same_type_p.
9310 (write_encoding): Don't check for substitutions.
9311
9312 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
9313
9314 * parse.y (expr_no_comma_rangle): New non-terminal.
9315 (template_parm): Use it for default parameter case.
9316 (template_arg): Use it.
9317 (expr_no_commas): Remove commented out undefined extensions.
9318 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9319 * parse.h, parse.c: Rebuilt.
9320
9321 2000-06-30 Mark Mitchell <mark@codesourcery.com>
9322
9323 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
9324 (finish_asm_stmt): Do it here, instead.
9325
9326 * cp-tree.h (ridpointers): Don't declare.
9327 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
9328 (record_builtin_java_type): Likewise.
9329 (init_decl_processing): Likewise.
9330 * lex.c: Move inclusion of lex.h.
9331 (ridpointers): Don't define.
9332 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
9333 RID_MAX.
9334 * lex.h (enum rid): Rename to ...
9335 (enum cp_rid): ... this.
9336 (ridpointers): Don't declare.
9337 * parse.y: Move inclusion of lex.h.
9338 * parse.c: Regenerated.
9339 * spew.c: Move inclusion of lex.h.
9340
9341 * cp-tree.h (struct language_function): Remove temp_name_counter.
9342 (temp_name_counter): Remove.
9343 (get_temp_name): Change prototype.
9344 (get_guard): New function.
9345 (get_guard_cond): Likewise.
9346 (set_guard): Likewise.
9347 * cvt.c (build_up_reference): Adjust call to get_temp_name.
9348 * decl.c (expand_static_init): Use get_guard and friends to
9349 implement guard variables.
9350 * decl2.c (get_temp_name): Assume that the variables created are
9351 always static.
9352 (get_sentry): Rename to ...
9353 (get_guard): ... this. Implement new ABI guard variables.
9354 (get_guard_bits): New function.
9355 (get_guard_cond): Likewise.
9356 (set_guard): Likewise.
9357 (start_static_initialization_or_destruction): Use them.
9358 (do_static_initialization): Replace sentry with guard throughout.
9359 (do_static_destruction): Likewise.
9360 * init.c (create_temporary_var): Add comment.
9361
9362 2000-06-28 Alex Samuel <samuel@codesourcery.com>
9363
9364 * mangle.c (find_substitution): Use same_type_p.
9365 (write_encoding): Don't check for substitutions.
9366
9367 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
9368
9369 * parse.y (expr_no_comma_rangle): New non-terminal.
9370 (template_parm): Use it for default parameter case.
9371 (template_arg): Use it.
9372 (expr_no_commas): Remove commented out undefined extensions.
9373 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9374 * parse.h, parse.c: Rebuilt.
9375
9376 2000-06-29 Mark Mitchell <mark@codesourcery.com>
9377
9378 * cp-tree.h (flag_const_strings): Remove.
9379 (warn_parentheses): Likewise.
9380 (warn_format): Likewise.
9381 (common_type): Likewise.
9382 (default_conversion): Likewise.
9383 (build_binary_op): Likewise.
9384 (cp_build_binary_op): New macro.
9385 * call.c (build_new_op): Use cp_build_binary_op instead of
9386 build_binary_op.
9387 * class.c (build_vtable_entry_ref): Likewise.
9388 * decl.c (expand_static_init): Likewise.
9389 (compute_array_index_type): Likewise.
9390 (build_enumerator): Likewise.
9391 * decl2.c (delete_sanity): Likewise.
9392 (start_static_initialization_or_destruction): Likewise.
9393 * error.c (dump_type_suffix): Likewise.
9394 * init.c (resolve_offset_ref): Likewise.
9395 (build_new): Likewise.
9396 (build_new_1): Likewise.
9397 (build_vec_delete_1): Likewise.
9398 (build_vec_init): Likewise.
9399 (build_delete): Likewise.
9400 * rtti.c (synthesize_tinfo_fn): Likewise.
9401 (synthesize_tinfo_var): Likewise.
9402 * search.c (expand_upcast_fixups): Likewise.
9403 (fixup_all_virtual_upcast_offsets): Likewise.
9404 * typeck.c (build_array_ref): Likewise.
9405 (get_member_function_from_ptrfunc): Likewise.
9406 (build_binary_op): Add parameter.
9407 (pointer_int_sum): Use cp_build_binary_op.
9408 (pointer_diff): Likewise.
9409 (build_modify_expr): Likewise.
9410 (get_delta_difference): Likewise.
9411 (build_ptrmemfunc): Likewise.
9412
9413 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
9414
9415 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
9416 * decl.c (create_implicit_typedef): Adjust.
9417 * decl2.c (build_artificial_parm): Adjust.
9418 * method.c (implicitly_declare_fn): Adjust.
9419 * pt.c (push_inline_template_parms_recursive): Adjust.
9420 (process_template_parm): Adjust.
9421 (overloaded_template_name): Adjust.
9422 * semantics.c (finish_template_template_parm): Adjust.
9423
9424 2000-06-28 Mark Mitchell <mark@codesourcery.com>
9425
9426 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
9427 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
9428 where to emit thunks.
9429 (build_vtt): Adjust call to build_vtt_inits.
9430 (build_vtt_inits): Add parameter to indicate whether or not
9431 sub-VTTs for virtual bases should be included. Adjust handling of
9432 construction vtables.
9433 (get_matching_base): New function.
9434 (dfs_build_vtt_inits): Rename to ...
9435 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
9436 construction vtables.
9437 (dfs_fixup_binfo_vtbls): Likewise.
9438 (build_ctor_vtbl_groups): Build construction vtables for virtual
9439 bases, too.
9440 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
9441 to build construction vtbls.
9442 (dfs_accumulate_vtbl_inits): Adjust handling of
9443 construction vtables.
9444
9445 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
9446 types correctly.
9447
9448 2000-06-27 Mark Mitchell <mark@codesourcery.com>
9449
9450 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
9451
9452 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
9453
9454 * search.c (hides): Remove.
9455 (is_subobject_of_p): Add most_derived parameter. Use
9456 CANONICAL_BINFO.
9457 (lookup_field_queue_p): Adjust.
9458 (lookup_field_r): Adjust.
9459
9460 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
9461
9462 * decl2.c (handle_class_head): Bash typedefs to the type's main
9463 decl.
9464
9465 2000-06-25 Mark Mitchell <mark@codesourcery.com>
9466
9467 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
9468 (begin_global_stmt_expr): ... this.
9469 (genrtl_finish_stmt_expr): Rename to ...
9470 (finish_global_stmt_expr): ... this.
9471 * init.c (begin_init_stmts): Adjust calls.
9472 (finish_init_stmts): Likewise.
9473 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
9474 (begin_global_stmt_expr): ... this.
9475 (genrtl_finish_stmt_expr): Rename to ...
9476 (finish_global_stmt_expr): ... this.
9477
9478 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9479
9480 * search.c (lookup_member): Fix typo in comment.
9481
9482 2000-06-24 Jason Merrill <jason@redhat.com>
9483
9484 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
9485 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
9486
9487 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9488
9489 * parse.y (complex_direct_notype_declarator): Support global_scope.
9490 * Makefile.in: Adjust conflict count.
9491
9492 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9493
9494 * parse.y (template_arg): Convert TEMPLATE_DECL
9495 that is a template template parameter to
9496 TEMPLATE_TEMPLATE_PARM here.
9497
9498 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9499 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
9500 (copy_template_template_parm): Adjust prototype.
9501 * decl.c (grokdeclarator): Remove dead code.
9502 * pt.c (process_template_parm): Tidy.
9503 (lookup_template_class): Construct nodes in
9504 copy_template_template_parm.
9505 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
9506 lookup_template_class. Use TYPE_TI_TEMPLATE.
9507 * tree.c (copy_template_template_parm): Add NEWARGS
9508 parameter.
9509 (mapcar): Adjust call to copy_template_template_parm.
9510 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
9511 * method.c (build_template_template_parm_names): Change error
9512 code to avoid compilation warning.
9513
9514 * gxxint.texi: Document template template parameter
9515 name mangling.
9516
9517 2000-06-21 Alex Samuel <samuel@codesourcery.com>
9518
9519 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
9520 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
9521 (cp-demangle.o): New rule.
9522 (dyn-string.o): Likewise.
9523 * inc/cxxabi.h (__cxa_demangle): New declaration.
9524
9525 2000-06-22 Mark Mitchell <mark@codesourcery.com>
9526
9527 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
9528 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
9529 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
9530 a tree, not an int.
9531 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
9532 (make_thunk): Change prototype.
9533 (emit_thunk): Rename to use_thunk.
9534 (mangle_thunk): Change prototype.
9535 * class.c (get_derived_offset): Simplify.
9536 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
9537 BV_GENERATE_THUNK_WITH_VTABLE_P.
9538 (build_primary_vtable): Simplify.
9539 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
9540 (dfs_find_base): Remove.
9541 (update_vtable_entry_for_fn): Correct bug in finding the base
9542 where a virtual function was first declared. Figure out whether
9543 or not to emit a vcall-thunk with the vtables in which it appears.
9544 Correct logic for deciding whether to use an ordinary thunk, or a
9545 vcall thunk.
9546 (finish_struct_1): Remove unnecssary code.
9547 (build_vtbl_initializer): Use ssize_int for the running counter of
9548 negative indices.
9549 (build_vtbl_initializer): Only use vcall thunks where necessary.
9550 Mark thunks as needing to be emitted with their vtables, or not.
9551 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
9552 indices. Use size_binop.
9553 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
9554 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
9555 size_binop.
9556 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
9557 (build_vtable_entry): Mark thunks as needing to be emitted with
9558 their vtables, or not.
9559 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
9560 * decl2.c (mark_vtable_entries): Use use_thunk instead of
9561 emit_thunk.
9562 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
9563 information.
9564 * error.c (dump_expr): Use BV_FN.
9565 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
9566 not an int.
9567 * method.c (make_thunk): Likewise.
9568 (emit_thunk): Rename to use_thunk. Allow callers to decide
9569 whether or not to actually emit the thunk. Adjust for changes in
9570 representation of vcall offsets.
9571 * search.c (dfs_get_pure_virtuals): Use BV_FN.
9572 * semantics.c (emit_associated_thunks): New function.
9573 (expand_body): Use it.
9574 * ir.texi: Adjust decriptions of thunks.
9575
9576 2000-06-22 Jason Merrill <jason@redhat.com>
9577
9578 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
9579 (tsubst_friend_function): Copy it here.
9580
9581 * decl.c (grok_op_properties): Fix typo.
9582
9583 * decl2.c (delete_sanity): Clarify warning, avoid failure on
9584 deleting void*.
9585
9586 * pt.c (check_explicit_specialization): Clarify error.
9587
9588 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
9589 an old OVERLOAD when we're declaring a non-function.
9590 (pushdecl, destroy_local_var): Check for error_mark_node.
9591 (warn_extern_redeclared_static): Also bail early if
9592 we're a CONST_DECL.
9593 (push_overloaded_decl): Ignore an old error_mark_node.
9594
9595 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
9596
9597 * call.c (build_x_va_arg): Check if in a template decl.
9598 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
9599
9600 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9601
9602 * class.c (push_lang_context): TYPE_NAME gets you to the Java
9603 types DECLs.
9604 * decl.c (check_goto): Computed gotos assumed OK.
9605
9606 2000-06-20 Jason Merrill <jason@redhat.com>
9607
9608 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
9609 for which we don't need to look for instantiations.
9610
9611 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
9612
9613 * parse.y (program): Always call finish_translation_unit.
9614 * parse.c, parse.h: Rebuilt.
9615
9616 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
9617
9618 * method.c: Don't include hard-reg-set.h.
9619
9620 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
9621
9622 * rtti.c (get_base_offset): Cope when vbase field is in a base.
9623
9624 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
9625
9626 * call.c (build_conditional_expr): Use VOID_TYPE_P.
9627 * cvt.c (cp_convert_to_pointer): Likewise.
9628 (convert_to_void): Likewise.
9629 * error.c (dump_expr): Likewise.
9630 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
9631 * init.c (build_delete): Likewise.
9632 * method.c (emit_thunk): Likewise.
9633 * optmize.c (declare_return_variable): Likewise.
9634 * rtti.c (get_tinfo_decl_dynamic): Likewise.
9635 (get_typeid): Likewise.
9636 (build_dynamic_cast_1): Likewise.
9637 * typeck.c (composite_pointer_type): Likewise.
9638 (common_type): Likewise.
9639 (build_indirect_ref): Likewise.
9640 (build_binary_op): Likewise.
9641 (build_x_compound_expr): Likewise.
9642 (check_return_expr): Likewise.
9643 * typeck2.c (add_exception_specifier): Likewise.
9644
9645 * mangle.c (write_method_parms): Use direct comparison for end
9646 of parmlist.
9647
9648 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
9649
9650 * cp-tree.h (genrtl_try_block): Declare function.
9651 (genrtl_handler): Likewise.
9652 (genrtl_catch_block): Likewise.
9653 (genrtl_ctor_stmt): Likewise.
9654 (genrtl_subobject): Likewise.
9655 (genrtl_decl_cleanup): Likewise.
9656 (genrtl_do_poplevel): Likewise.
9657 (genrtl_do_pushlevel): Likewise.
9658 (genrtl_clear_out_block): Likewise.
9659 (genrtl_goto_stmt): Likewise.
9660 (genrtl_expr_stmt): Likewise.
9661 (genrtl_decl_stmt): Likewise.
9662 (genrtl_if_stmt): Likewise.
9663 (genrtl_while_stmt): Likewise.
9664 (genrtl_do_stmt): Likewise.
9665 (genrtl_return_stmt): Likewise.
9666 (genrtl_for_stmt): Likewise.
9667 (genrtl_break_stmt): Likewise.
9668 (genrtl_continue_stmt): Likewise.
9669 (genrtl_scope_stmt): Likewise.
9670 (genrtl_switch_stmt): Likewise.
9671 (genrtl_case_label): Likewise.
9672 (genrtl_begin_compound_stmt): Likewise.
9673 (genrtl_finish_compound_stmt): Likewise.
9674 (genrtl_compound_stmt): Likewise.
9675 (genrtl_asm_stmt): Likewise.
9676 (genrtl_named_return_value): Likewise.
9677 (genrtl_begin_stmt_expr): Likewise.
9678 (genrtl_finish_stmt_expr): Likewise.
9679 (finish_for_stmt): Removed first argument.
9680 (finish_switch_stmt): Likewise.
9681
9682 * semantics.c (genrtl_try_block): Define function.
9683 (genrtl_handler): Likewise.
9684 (genrtl_catch_block): Likewise.
9685 (genrtl_ctor_stmt): Likewise.
9686 (genrtl_subobject): Likewise.
9687 (genrtl_decl_cleanup): Likewise.
9688 (genrtl_do_poplevel): Likewise.
9689 (genrtl_do_pushlevel): Likewise.
9690 (genrtl_clear_out_block): Likewise.
9691 (genrtl_goto_stmt): Likewise.
9692 (genrtl_expr_stmt): Likewise.
9693 (genrtl_decl_stmt): Likewise.
9694 (genrtl_if_stmt): Likewise.
9695 (genrtl_while_stmt): Likewise.
9696 (genrtl_do_stmt): Likewise.
9697 (genrtl_return_stmt): Likewise.
9698 (genrtl_for_stmt): Likewise.
9699 (genrtl_break_stmt): Likewise.
9700 (genrtl_continue_stmt): Likewise.
9701 (genrtl_scope_stmt): Likewise.
9702 (genrtl_switch_stmt): Likewise.
9703 (genrtl_case_label): Likewise.
9704 (genrtl_begin_compound_stmt): Likewise.
9705 (genrtl_finish_compound_stmt): Likewise.
9706 (genrtl_compound_stmt): Likewise.
9707 (genrtl_asm_stmt): Likewise.
9708 (genrtl_named_return_value): Likewise.
9709 (genrtl_begin_stmt_expr): Likewise.
9710 (genrtl_finish_stmt_expr): Likewise.
9711 (finish_for_stmt): Removed first argument and generate rtl
9712 specific code.
9713 (finish_switch_stmt): Likewise.
9714 (do_poplevel): Removed generate rtl specific code.
9715 (do_pushlevel): Likewise.
9716 (add_tree): Likewise.
9717 (finish_goto_stmt): Likewise.
9718 (finish_expr_stmt): Likewise.
9719 (begin_if_stmt): Likewise.
9720 (finish_if_stmt_cond): Likewise.
9721 (finish_then_clause): Likewise.
9722 (begin_else_clause): Likewise.
9723 (finish_else_clause): Likewise.
9724 (finish_if_stmt): Likewise.
9725 (clear_out_block): Likewise.
9726 (begin_while_stmt): Likewise.
9727 (finish_while_stmt_cond): Likewise.
9728 (finish_while_stmt): Likewise.
9729 (begin_do_stmt): Likewise.
9730 (finish_do_body): Likewise.
9731 (finish_do_stmt): Likewise.
9732 (finish_return_stmt): Likewise.
9733 (begin_for_stmt): Likewise.
9734 (finish_for_init_stmt): Likewise.
9735 (finish_for_cond): Likewise.
9736 (finish_for_expr): Likewise.
9737 (finish_break_stmt): Likewise.
9738 (finish_continue_stmt): Likewise.
9739 (begin_switch_stmt): Likewise.
9740 (finish_switch_cond): Likewise.
9741 (finish_case_label): Likewise.
9742 (begin_try_block): Likewise.
9743 (begin_function_try_block): Likewise.
9744 (finish_try_block): Likewise.
9745 (finish_cleanup_try_block): Likewise.
9746 (finish_cleanup): Likewise.
9747 (finish_function_try_block): Likewise.
9748 (finish_handler_sequence): Likewise.
9749 (finish_function_handler_sequence): Likewise.
9750 (begin_handler): Likewise.
9751 (finish_handler_parms): Likewise.
9752 (begin_catch_block): Likewise.
9753 (finish_handler): Likewise.
9754 (begin_compound_stmt): Likewise.
9755 (finish_compound_stmt): Likewise.
9756 (finish_asm_stmt): Likewise.
9757 (finish_label_stmt): Likewise.
9758 (finish_label_decl): Likewise.
9759 (finish_subobject): Likewise.
9760 (finish_decl_cleanup): Likewise.
9761 (finish_named_return_value): Likewise.
9762 (begin_stmt_expr): Likewise.
9763 (finish_stmt_expr): Likewise.
9764
9765 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
9766 to call genrtl_expr_stmt when appropriate.
9767
9768 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
9769 begin_compound_expr to call genrtl_begin_stmt_expr and
9770 genrtl_begin_compound_expr when appropriate.
9771 (finish_init_stmts): Changed calls to finish_compound_expr and
9772 finish_stmt_expr to call genrtl_finish_compound_expr and
9773 genrtl_finish_stmt_expr when appropriate.
9774 (expand_default_init): Changed call to finish_expr_stmt to call
9775 genrtl_expr_stmt when appropriate.
9776 (build_vec_init): Likewise.
9777
9778 * parse.y (simple_stmt): Removed first argument from call to
9779 finish_for_stmt. Removed first argument from call to
9780 finish_switch_stmt.
9781
9782 * parse.c: Regenerated.
9783
9784 * pt.c (tsubst_expr): Removed first argument from call to
9785 finish_for_stmt. Removed first argument from call to
9786 finish_switch_stmt.
9787
9788 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
9789
9790 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
9791 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
9792
9793 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
9794 (cplus_tree_code_length[]): Likewise.
9795 (cplus_tree_code_name[]): Likewise.
9796 (init_parse): Added call to add_c_tree_codes. Changed
9797 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
9798
9799 2000-06-16 Mark Mitchell <mark@codesourcery.com>
9800
9801 * cp-tree.h (finish_mem_initializers): Declare.
9802 (count_trees): Likewise.
9803 * parse.y (base_init): Use finish_mem_initializers.
9804 * semantics.c (finish_mem_initializers): New function.
9805
9806 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
9807 the number of trees.
9808 (n_trees): Remove.
9809 (count_trees): Don't use it.
9810
9811 2000-06-15 Jason Merrill <jason@redhat.com>
9812
9813 * tree.c (count_trees): New debugging function.
9814
9815 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
9816 * init.c (build_member_call): Pull out the name of a DECL.
9817
9818 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
9819 * semantics.c (expand_body): Push to TV_INTEGRATION here.
9820 * optimize.c (optimize_function): Not here.
9821 * pt.c (instantiate_decl): Push to TV_PARSE.
9822
9823 2000-06-15 Mark Mitchell <mark@codesourcery.com>
9824
9825 * cp-tree.h (struct language_function): Remove x_base_init_list
9826 and x_member_init_list.
9827 (current_base_init_list): Remove.
9828 (current_member_init_list): Likewise.
9829 (setup_vtbl_ptr): Change prototype.
9830 (emit_base_init): Likewise.
9831 (expand_member_init): Likewise.
9832 (reinit_parse_for_function): Remove.
9833 * decl.c (save_function_data): Don't clear x_base_init_list and
9834 x_member_init_list.
9835 (mark_language_function): Don't mark them.
9836 * init.c (perform_member_init): Tweak comment.
9837 (sort_member_init): Take the list of initializers as an argument.
9838 (sort_base_init): Likewise.
9839 (emit_base_init): Likewise.
9840 (expand_member_init): Return the initializer. Don't use global
9841 variables.
9842 * lex.c (reinit_parse_for_function): Remove.
9843 * method.c (build_template_parm_names): Correct substitution.
9844 (do_build_copy_constructor): Don't use current_member_init_list
9845 and current_base_init_list.
9846 (synthesize_method): Likewise.
9847 * parse.y (base_init): Split mem-initializers into
9848 base-initializers and field-initializers.
9849 (member_init_list): Build up the list here.
9850 (member_init): Return the initializer.
9851 (fn.depfn): Don't use reinit_parse_for_function.
9852 * parse.c: Regenerated.
9853 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
9854 ERROR_MARK.
9855 (tsubst_expr): Don't use current_member_init_list
9856 and current_base_init_list.
9857 (tsubst_expr_values): Rename to ...
9858 (tsubst_initializer_list): ... this. Use convert_from_reference.
9859 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
9860 and current_base_init_list.
9861 (begin_function_definition): Don't call reinit_parse_for_function.
9862
9863 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
9864
9865 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
9866 correctly.
9867
9868 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
9869
9870 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
9871
9872 * cp-tree.h (IF_COND): Move to c-common.h.
9873 (THEN_CLAUSE): Likewise.
9874 (ELSE_CLAUSE): Likewise.
9875 (WHILE_COND): Likewise.
9876 (WHILE_BODY): Likewise.
9877 (DO_COND): Likewise.
9878 (DO_BODY): Likewise.
9879 (RETURN_EXPR): Likewise.
9880 (EXPR_STMT_EXPR): Likewise.
9881 (FOR_INIT_STMT): Likewise.
9882 (FOR_COND): Likewise.
9883 (FOR_EXPR): Likewise.
9884 (FOR_BODY): Likewise.
9885 (SWITCH_COND): Likewise.
9886 (SWITCH_BODY): Likewise.
9887 (CASE_LOW): Likewise.
9888 (CASE_HIGH): Likewise.
9889 (GOTO_DESTINATION): Likewise.
9890 (COMPOUND_BODY): Likewise.
9891 (ASM_CV_QUAL): Likewise.
9892 (ASM_STRING): Likewise.
9893 (ASM_OUTPUTS): Likewise.
9894 (ASM_INPUTS): Likewise.
9895 (ASM_CLOBBERS): Likewise.
9896 (DECL_STMT_DECL): Likewise.
9897 (STMT_EXPR_STMT): Likewise.
9898 (LABEL_STMT_LABEL): Likewise.
9899 (SCOPE_BEGIN_P): Likewise.
9900 (SCOPE_END_P): Likewise.
9901 (SCOPE_STMT_BLOCK): Likewise.
9902 (SCOPE_NULLIFIED_P): Likewise.
9903 (SCOPE_NO_CLEANUPS_P): Likewise.
9904 (SCOPE_PARTIAL_P): Likewise.
9905 (ASM_VOLATILE_P): Likewise.
9906 (STMT_LINENO): Likewise.
9907 (STMT_LINENO_FOR_FN_P): Likewise.
9908
9909 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
9910 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
9911 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
9912 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
9913 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
9914
9915 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
9916
9917 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
9918 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
9919
9920 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
9921 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
9922 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
9923
9924 2000-06-14 Mark Mitchell <mark@codesourcery.com>
9925
9926 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
9927 * class.c (dfs_find_final_overrider): Set it appropriately.
9928 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
9929 avoid unneeded secondary vptrs.
9930
9931 2000-06-13 Jakub Jelinek <jakub@redhat.com>
9932
9933 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
9934 (check_bitfield_decl, check_field_decl): Likewise.
9935 (build_vtbl_or_vbase_field, build_base_field): Likewise.
9936 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
9937 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
9938 (xfer_tag, finish_enum): Likewise.
9939 * decl2.c (finish_builtin_type): Likewise.
9940 * init.c (init_init_processing): Likewise.
9941 * pt.c (instantiate_class_template): Likewise.
9942 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
9943 * cp-tree.h (struct lang_type): Add user_align member.
9944 (CLASSTYPE_USER_ALIGN): Define.
9945
9946 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9947
9948 * Make-lang.in (c++.install-common): Install g++-cross in
9949 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
9950 $(target_alias)-g++ and $(target_alias)-c++.
9951
9952 2000-06-12 Mark Mitchell <mark@codesourcery.com>
9953
9954 * class.c (vcall_offset_data_s): Add last_init and fns.
9955 (overrides): Rename to same_signature_p.
9956 (dfs_find_final_overrider): Adjust accordingly.
9957 (mark_overriders): Likewise.
9958 (warn_hidden): Likewise.
9959 (build_vtbl_initializer): Reorganize machinery for building things
9960 at negative offsets.
9961 (build_vcall_and_vbase_vtbl_entries): Likewise.
9962 (build_vbase_offset_vtbl_entries): Likewise.
9963 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
9964 offset entries. Do not create two entries for functions with the
9965 same signature.
9966 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
9967 (build_rtti_vtbl_entries): Reorganize machinery for building things
9968 at negative offsets.
9969
9970 * optimize.c (expand_call_inline): Don't recurse into the code
9971 used to initialize the parameters more than once.
9972
9973 2000-06-11 Mark Mitchell <mark@codesourcery.com>
9974
9975 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
9976 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
9977 (find_substitution): Only use the `Sa' substitution for
9978 std::allocator, not instantiations of it.
9979 (write_template_prefix): Move comment. Only use a TREE_LIST to
9980 represent substitutions for a member template.
9981 (write_array_type): Mangle array dimensions correctly.
9982 * optimize.c (maybe_clone_body): Copy more information from the
9983 cloned function.
9984 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
9985 on the regenerated declaration.
9986
9987 2000-06-11 Chip Salzenberg <chip@valinux.com>
9988 Mark Mitchell <mark@codesourcery.com>
9989
9990 * class.c (build_vtable): Clarify comment.
9991 (build_ctor_vtbl_group): Pass the most derived type to
9992 build_vtable.
9993
9994 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9995
9996 * decl2.c (compare_options): Don't needlessly cast away const-ness.
9997
9998 2000-06-10 Mark Mitchell <mark@codesourcery.com>
9999
10000 * decl.c (add_binding): Handle duplicate declarations of external
10001 variables.
10002
10003 2000-06-09 Chip Salzenberg <chip@valinux.com>
10004 Mark Mitchell <mark@codesourcery.com>
10005
10006 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
10007 argument.
10008 (write_signed_number): New macro.
10009 (write_unsigned_number): Likewise.
10010 (write_source_name): Use them.
10011 (write_number): Handle signed and unsigned values.
10012 (write_integer_cst): Use tree_int_cst_sgn, and use
10013 write_unsigned_number or write_signed_number as appropriate.
10014 (write_discriminator): Use write_unsigned_number or
10015 write_signed_number as appropriate.
10016 (write_template_arg_literal): Likewise.
10017 (write_array_type): Use tree_low_cst.
10018 (write_template_parm): Use write_unsigned_number or
10019 write_signed_number as appropriate.
10020 (write_substitution): Adjust call to write_number.
10021 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
10022 (write_expression): Handle non-type template arguments of
10023 reference type correctly.
10024 (mangle_thunk): Use write_signed_number.
10025
10026 2000-06-09 Chip Salzenberg <chip@valinux.com>
10027
10028 * mangle.c (find_substition): Don't mangle objects with typename
10029 substitutions (e.g. "cin" as "Si").
10030
10031 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
10032
10033 * call.c (add_candidate): Use ggc_alloc_cleared.
10034 * decl.c (lookup_label): Likewise.
10035 * lex.c (retrofit_lang_decl): Likewise.
10036
10037 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
10038
10039 * semantics.c (expand_body): Push to TV_EXPAND.
10040 * optimize.c (optimize_function): Push to TV_INTEGRATION.
10041 * decl.c (start_function): Always call announce_function.
10042
10043 * tinfo2.cc: Just declare abort.
10044
10045 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
10046
10047 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
10048 whenever @ is a symbolic name.
10049
10050 2000-06-08 Jakub Jelinek <jakub@redhat.com>
10051
10052 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
10053
10054 2000-06-07 Mark Mitchell <mark@codesourcery.com>
10055
10056 * decl.c (pushdecl): Look up functions by DECL_NAME, not
10057 DECL_ASSEMBLER_NAME.
10058
10059 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10060
10061 * decl2.c (c_language): Define.
10062
10063 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
10064
10065 * lex.c (lang_init_options): Tweak.
10066
10067 * decl2.c: Remove #inclusion of diagnostic.h
10068 (lang_decode_option): Move diagnostic formatting options to
10069 toplevel.
10070
10071 * lang-options.h: Remove documentation for diagnostic options.
10072
10073 * Makefile.in (lex.o): Depends upon diagnostic.h
10074
10075 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10076
10077 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
10078 the same DECL_RESULT, it's not a redefinition.
10079 * pt.c (tsubst_decl): Remove code to handle illegal
10080 specializations.
10081
10082 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
10083
10084 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
10085
10086 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
10087
10088 * search.c (maybe_suppress_debug_info): Don't check
10089 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
10090
10091 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
10092 here if extern_p.
10093
10094 Remember instantiation context in deferred instantiations.
10095 * cp-tree.h (struct tinst_level): Remove.
10096 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
10097 * pt.c (current_tinst_level): Now a tree.
10098 (print_template_context, push_tinst_level, pop_tinst_level,
10099 tinst_for_decl): Adjust.
10100 (reopen_tinst_level): New fn.
10101 (init_pt): Register current_tinst_level as a root.
10102 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
10103 of the pending templates list.
10104 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
10105 * lex.c (extract_interface_info): Adjust.
10106 * decl2.c (warn_if_unknown_interface): Adjust.
10107
10108 2000-06-05 Mark Mitchell <mark@codesourcery.com>
10109
10110 * class.c (indirect_primary_base_p): New function.
10111 (determine_primary_base): Use it.
10112
10113 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
10114
10115 Update new-abi dynamic cast algorithm.
10116 * tinfo.cc (__class_type_info::__dyncast_result): Add
10117 whole_details. Adjust constructor.
10118 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
10119 Avoid unnecessary searching.
10120 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
10121
10122 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10123
10124 * decl.c (init_decl_processing): Don't call record_component_aliases.
10125 * tree.c (build_cplus_array_type_1): Likewise.
10126
10127 2000-06-04 Mark Mitchell <mark@codesourcery.com>
10128
10129 * ir.texi: Correct typo.
10130 * mangle.c (write_expression): Handle non-type template arguments
10131 with reference type.
10132 * method.c (build_overload_value): Likewise.
10133 * pt.c (convert_nontype_argument): Explicitly represent conversion
10134 to a reference with an ADDR_EXPR.
10135 (unify): Always unify arguments in left-to-right order.
10136
10137 2000-06-03 Alex Samuel <samuel@codesourcery.com>
10138 Mark Mitchell <mark@codesourcery.com>
10139
10140 * Make-lang.in (CXX_SRCS): Add mangle.c.
10141 * Makefile.in (CXX_OBJS): Add mangle.o.
10142 (mangle.o): New rule.
10143
10144 * class.c (local_classes): New variable.
10145 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
10146 (get_vtt_name): Use mangle_vtt_name for new ABI.
10147 (init_class_processing): Initialize local_classes.
10148 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
10149 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
10150 (std_identifier): New macro.
10151 (DECL_VOLATILE_MEMFUNC_P): New macro.
10152 (DECL_NAMESPACE_STD_P): Likewise.
10153 (local_classes): Declare.
10154 (get_mostly_instantiated_function_type): Declare.
10155 (init_mangle): Declare.
10156 (mangle_decl): Likewise.
10157 (mangle_type_string): Likewise.
10158 (mangle_type): Likewise.
10159 (mangle_typeinfo_for_type): Likewise.
10160 (mangle_typeinfo_string_for_type): Likewise.
10161 (mangle_vtbl_for_type): Likewise.
10162 (mangle_vtt_for_type): Likewise.
10163 (mangle_ctor_vtbl_for_type): Likewise.
10164 (mangle_thunk): Likewise.
10165 (mangle_conv_op_name_for_type): Likewise.
10166 (mangle_guard_variable): Likewise.
10167 * decl.c (pushtag): Keep track of local classes.
10168 (initialize_predefined_identifiers): Initialize std_identifier.
10169 (init_decl_processing): Use std_identifier.
10170 (start_decl): Don't treat instantiations as specializations.
10171 (grokdeclarator): Likewise.
10172 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
10173 name for fully-instantiated templates.
10174 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
10175 destructors with the new ABI.
10176 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
10177 (grokfield): Use mangle_type for new ABI.
10178 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
10179 (get_sentry): Use mangle_guard_variable for new ABI.
10180 (start_static_initialization_or_destruction): Likewise.
10181 * expr.c (extract_aggr_init): Remove.
10182 (extract_scalar_init): Likewise.
10183 (extract_init): Remove #if 0'd code.
10184 * mangle.c: New function.
10185 * method.c (build_mangled_name): Assert not flag_new_abi.
10186 (build_static_name): Likewise.
10187 (build_decl_overload_real): Likewise.
10188 (build_typename_overload): Likewise.
10189 (build_overload_with_type): Likewise.
10190 (build_overload_name): Likewise.
10191 (get_ctor_vtbl_name): Likewise.
10192 (start_squangling): Likewise.
10193 (get_id_2): Likewise.
10194 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
10195 (init_method): Call init_mangle for new ABI.
10196 (make_thunk): Call mangle_thunk for new ABI.
10197 * operators.def: Correct new ABI manglings for the `%' operator.
10198 Add `::' operator.
10199 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
10200 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
10201 (lookup_template_class): Call mangle_decl for new ABI.
10202 (get_mostly_instantiated_function_type): New function.
10203 (set_mangled_name_for_template_decl): Use it.
10204 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
10205 the new ABI. Use mangle_conv_op_name_for_type for instantiated
10206 conversion op names.
10207 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
10208 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
10209 (tinfo_base_init): Likewise. Mangle typeinfo string name with
10210 mangle_typeinfo_string_for_type.
10211
10212 2000-06-03 Mark Mitchell <mark@codesourcery.com>
10213
10214 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
10215 (INNERMOST_TEMPLATE_ARGS): New macro.
10216 (innermost_args): Remove.
10217 (get_innermost_template_args): New function.
10218 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
10219 * error.c (dump_function_decl): Be caution when using
10220 most_general_template.
10221 * method.c (build_template_parm_names): Use
10222 INNERMOST_TEMPLATE_ARGS.
10223 * pt.c (add_to_template_args): Tidy comment
10224 (get_innermost_template_args): New function.
10225 (check_explicit_specialization): Clear DECL_INITIAL for a new
10226 specialization.
10227 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
10228 Tidy.
10229 (push_template_decl): Always register specializations of the most
10230 general template.
10231 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
10232 (coerce_template_parms): Likewise.
10233 (lookup_template_class): Likewise.
10234 (innermost_args): Remove.
10235 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
10236 (tsubst_decl): Handle tricky specializations. Use
10237 get_innermost_template_args.
10238 (instantiate_template): Simplify handling of partial
10239 instantiations.
10240 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
10241 (most_general_template): Reimplement, in a more straightforward
10242 manner.
10243 (regenerate_decl_from_template): Tweak formatting. Use
10244 TMPL_ARGS_DEPTH for clarity.
10245 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
10246
10247 * dump.c (dequeue_and_dump): Dump information about thunks.
10248
10249 2000-06-01 Richard Henderson <rth@cygnus.com>
10250
10251 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
10252
10253 2000-06-01 Richard Henderson <rth@cygnus.com>
10254
10255 * decl2.c (unsupported_options): Fix typo, make const.
10256 (lang_decode_option): Fix bsearch argument order.
10257
10258 2000-06-01 Mark Mitchell <mark@codesourcery.com>
10259
10260 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
10261 on FIELD_DECLs.
10262
10263 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10264
10265 * cp-tree.h (c_get_alias_set): Deleted.
10266 * Makefile.in (decl.o): Include ../expr.h.
10267 * decl.c (expr.h): Include.
10268 (init_decl_processing): Call record_component_aliases for arrays.
10269 (grokdeclarator): Likewise.
10270 Set TREE_ADDRESSABLE for fields that aren't bitfields.
10271 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
10272
10273 2000-05-31 Mark Mitchell <mark@codesourcery.com>
10274
10275 Remove guiding declaration support.
10276 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
10277 (flag_guiding_decls): Remove.
10278 * call.c (build_user_type_conversion_1): Remove support for
10279 guiding decls.
10280 (build_new_function_call): Likewise.
10281 (build_new_op): Likewise.
10282 (build_new_method_call): Likewise.
10283 * decl.c (start_function): Likewise.
10284 * friend.c (is_friend): Likewise.
10285 (do_friend): Likewise.
10286 * decl2.c ((flag_dump_translation_unit): Make it const.
10287 (flag_guiding_decls): Remove.
10288 (unsupported_options): New variable
10289 (compare_options): New function.
10290 (lang_decode_option): Use them.
10291
10292 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
10293
10294 * method.c (mangle_expression): Adjust test for legal expression
10295 operators.
10296
10297 * pt.c (instantiate_decl): Save and restore the local
10298 specializations list.
10299
10300 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
10301
10302 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
10303
10304 2000-05-30 Mark Mitchell <mark@codesourcery.com>
10305
10306 * call.c (add_template_candidate_real): Handle member template
10307 constructors for classes with virtual bases.
10308 (build_user_type_conversion_1): Use in_charge_arg_for_name.
10309 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
10310
10311 * ir.texi: Update thunk documentation.
10312
10313 * call.c (joust): Fix handling of overloaded builtin operators.
10314
10315 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
10316
10317 * cp-tree.h (DECL_ANTICIPATED): New macro.
10318 Document new use of DECL_LANG_FLAG_7.
10319 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
10320 in the user namespace.
10321 * lex.c (do_identifier): If the identifier's declaration has
10322 DECL_ANTICIPATED on, it has not yet been declared. But do not
10323 replace it with an ordinary implicit declaration.
10324
10325 * tinfo2.cc: Include stdlib.h.
10326
10327 2000-05-29 Mark Mitchell <mark@codesourcery.com>
10328
10329 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
10330 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
10331 CLASSTYPE_ALIGN.
10332
10333 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
10334
10335 * decl2.c (lang_decode_option): Use skip_leading_substring instead
10336 of plain strncmp.
10337
10338 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
10339
10340 * operators.def (<?): Duplicated, should have been...
10341 (>?): this. Fixed.
10342
10343 2000-05-27 Alex Samuel <samuel@codesourcery.com>
10344 Mark Mitchell <mark@codesourcery.com>
10345
10346 * cp-tree.h (ansi_opname): Make it a macro.
10347 (ansi_assopname): Likewise.
10348 (struct lang_decl_flags): Add assignment_operator_p.
10349 (struct lang_decl): Add operator_code.
10350 (DECL_VTT_PARM): Adjust.
10351 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
10352 overloaded operator.
10353 (SET_OVERLOADED_OPERATOR_CODE): New macro.
10354 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
10355 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
10356 (opname_tab): Remove.
10357 (assignop_tab): Likewise.
10358 (operator_name_info_t): New type.
10359 (operator_name_info): New variable.
10360 (assignment_operator_name_info): Likewise.
10361 (build_cp_library_fn): Remove declaration.
10362 (push_cp_library_fn): Likewise.
10363 (operator_name_string): Likewise.
10364 (build_decl_overload): Likewise.
10365 * call.c (print_z_candidates): Simplify.
10366 (build_object_call): Adjust usage of ansi_opname. Use
10367 DECL_OVERLOADED_OPERATOR_P.
10368 (op_error): Adjust operator name lookup.
10369 (build_conditional_expr): Adjust usage of ansi_opname.
10370 (build_new_op): Likewise.
10371 (build_op_delete_call): Likewise.
10372 (build_over_call): Likewise.
10373 (joust): Use DECL_OVERLOADED_OPERATOR_P.
10374 * decl.c (duplicate_decls): Copy operator_code.
10375 (init_decl_processing): Adjust parameters to push_cp_library_fn.
10376 (builtin_function): Adjust parameters to build_library_fn_1.
10377 (build_library_fn_1): Accept an overloaded operator code.
10378 (build_library_fn): Pass ERROR_MARK.
10379 (build_cp_library_fn): Accept an overloaded operator code.
10380 (push_cp_library_fn): Likewise.
10381 (grokfndecl): Tweak.
10382 (grokdeclarator): Simplify code to compute names of overloaded
10383 operators. Adjust use of ansi_opname.
10384 (ambi_op_p): Work on tree_codes, not identifiers.
10385 (unary_op_p): Likewise.
10386 (grok_op_properties): Likewise.
10387 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
10388 (lang_mark_tree): Don't try to mark the operator_code.
10389 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
10390 * error.c (dump_decl): Remove special handling for operator
10391 names.
10392 (dump_function_name): Likewise.
10393 (dump_expr): Adjust name lookup of operators.
10394 (op_to_string): Simplify.
10395 (assop_to_string): Likewise.
10396 * init.c (build_new_1): Adjust use of ansi_opname.
10397 * lex.c (opname_tab): Remove.
10398 (assignop_tab): Likewise.
10399 (ansi_opname): Likewise.
10400 (ansi_assopname): Likewise.
10401 (operator_name_string): Likewise.
10402 (reinit_lang_specific): Likewise.
10403 (operator_name_info): New variable.
10404 (assignment_operator_name_info): Likewise.
10405 (init_operators): New function.
10406 (init_parse): Use it.
10407 (do_identifier): Adjust use of ansi_opname.
10408 * method.c (mangle_expression): Don't use ansi_opname for
10409 mangling.
10410 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
10411 (build_decl_overload): Remove.
10412 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
10413 (do_build_assign_ref): Adjust use of ansi_opname.
10414 (synthesize_method): Likewise.
10415 (implicitly_declare_fn): Likewise.
10416 * operators.def: New file.
10417 * parse.y (operator): Adjust use of ansi_opname.
10418 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
10419 (set_mangled_name_for_template_decl): Don't play games with
10420 current_namespace.
10421 (special_function_p): Adjust use of ansi_opname.
10422 * typeck.c (check_return_expr): Likewise.
10423 * Make-lang.in (cc1plus): Depend on operators.def.
10424 * Makefile.in (lex.o): Likewise.
10425 (decl.o): Likewise.
10426
10427 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
10428
10429 * Make-lang.in (cplib2.ready): Eradicate.
10430
10431 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10432
10433 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
10434 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
10435 (built_min, cp_tree_equal): Likewise.
10436
10437 2000-05-26 Mark Mitchell <mark@codesourcery.com>
10438
10439 * class.c (layout_nonempty_base_or_field): Replace
10440 `record_layout_info' with `record_layout_info_s'.
10441
10442 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
10443
10444 Fix goto checking.
10445 * cp-tree.h (struct language_function): x_named_labels is now
10446 a struct named_label_list*.
10447 * decl.c (struct named_label_use_list): Renamed from...
10448 (struct named_label_list): ...this. New struct.
10449 (push_binding_level): Don't set eh_region.
10450 (note_level_for_eh): New fn.
10451 (pop_label): Take label and old value directly.
10452 (pop_labels): Adjust for new named_labels format.
10453 (lookup_label): Likewise.
10454 (poplevel): Note characteristics of a binding level containing a
10455 named label. Mess with named label lists earlier.
10456 (mark_named_label_lists): New fn.
10457 (mark_lang_function): Call it.
10458 (use_label): New fn, split out from...
10459 (make_label_decl): ...here. Don't call it.
10460 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
10461 check_previous_gotos): New fns, split out from...
10462 (define_label): ...here.
10463 (check_switch_goto): New fn.
10464 (define_case_label): Call it.
10465 (check_goto): New fn.
10466 * semantics.c (finish_goto_stmt): Call it and use_label.
10467 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
10468 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
10469
10470 2000-05-26 Mark Mitchell <mark@codesourcery.com>
10471
10472 * class.c (build_vtable_entry_ref): Correct usage of
10473 get_vtbl_decl_for_binfo.
10474
10475 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
10476 * method.c (implicitly_declare_fn): Not here.
10477
10478 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
10479
10480 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
10481 (CPTI_PTMD_DESC_TYPE): ... here.
10482 (ptmd_desc_type_node): Rename to ...
10483 (ptm_desc_type_node): ... here.
10484 * decl.c: Likewise.
10485 * rtti.c (ptmd_initializer): Rename to ...
10486 (ptm_initializer): ... here.
10487 (sythesize_tinfo_var): Adjust. Deal with pointer to member
10488 function.
10489 (create_tinfo_types): Adjust.
10490
10491 2000-05-25 Mark Mitchell <mark@codesourcery.com>
10492
10493 Finish implementation of VTTs.
10494 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
10495 CPTI_VTT_PARM_IDENTIFIER.
10496 (vtt_parm_identifier): New macro.
10497 (vtt_parm_type): Likewise.
10498 (BINFO_SUBVTT_INDEX): Likewise.
10499 (BINFO_VPTR_INDEX): Likewise.
10500 (struct lang_decl): Add vtt_parm.
10501 (DECL_VTT_PARM): New macro.
10502 (DECL_USE_VTT_PARM): Likewise.
10503 (DECL_NEEDS_VTT_PARM_P): Likewise.
10504 (get_vtt_name): Declare.
10505 (build_artificial_parm): Likewise.
10506 (fixup_all_virtual_upcast_offsets): Likewise.
10507 (expand_indirect_vtbls_init): Remove.
10508 * call.c (build_new_method_call): Pass the vtt to subobject
10509 constructors and destructors.
10510 * class.c (get_vtt_name): Give it external linkage.
10511 (build_clone): Handle the magic VTT parameters for clones.
10512 (clone_function_decl): Fix typo in comment.
10513 (build_vtt): Keep track of the indices in the VTTs where various
10514 entities are stored.
10515 (build_vtt_inits): Likewise.
10516 (dfs_build_vtt_inits): Likewise.
10517 (build_ctor_vtbl_group): Tweak type of construction vtables.
10518 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
10519 primary bases, when building construction vtables.
10520 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
10521 (initialize_predefined_identifiers): Add vtt_parm_identifier.
10522 (init_decl_processing): Initialize vtt_parm_type.
10523 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
10524 (lang_mark_tree): Make vtt_parm.
10525 * decl2.c (build_artificial_parm): New function.
10526 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
10527 (grokclassfn): Use build_artificial_parm.
10528 * init.c (initialize_vtbl_ptrs): Call
10529 fixup_all_virtual_upcast_offsets directly.
10530 (perform_member_init): Use the complete subobject destructor for
10531 member cleanups.
10532 (build_vtbl_address): New function.
10533 (expand_virtual_init): Handle VTTs.
10534 * optimize (maybe_clone_body): Likewise.
10535 * search.c (fixup_all_virtual_upcast_offsets): Give it external
10536 linkage.
10537 (expand_indirect_vtbls_init): Remove.
10538 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
10539 * tree.c (make_binfo): Make them bigger.
10540
10541 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
10542
10543 * inc/cxxabi.h (__pbase_type_info): Define, based on
10544 __pointer_type_info.
10545 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
10546 (__pointer_to_member_type_info): Likewise.
10547 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
10548 (__pointer_to_member_type_info::__is_pointer_p): Remove.
10549 (__pointer_type_info::__do_catch): Rename to ...
10550 (__pbase_type_info::__do_catch): ... here. Adjust.
10551 (__pbase_type_info::__pointer_catch): Implement.
10552 (__pointer_type_info::__pointer_catch): Adjust.
10553 (__pointer_to_member_type_info::__pointer_catch): Adjust.
10554
10555 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
10556
10557 * tinfo.h (__user_type_info::contained_virtual_p): New
10558 predicate.
10559 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
10560 shaped hierarchy.
10561 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
10562 diamond shaped hierarchy. Add early out for mixed diamond and
10563 duplicate shaped hierarchy.
10564
10565 2000-05-24 Mark Mitchell <mark@codesourcery.com>
10566
10567 * cp-tree.h (build_delete): Change prototype.
10568 (build_vec_delete): Likewise.
10569 * call.c (build_scoped_method_call): Use special_function_kind
10570 values to indicate the kind of destruction to be done.
10571 (build_method_call): Likewise.
10572 * decl.c (finish_destructor_body): Likewise.
10573 (maybe_build_cleanup_1): Likewise. Rename to ...
10574 (maybe_build_cleanup): ... this.
10575 * decl2.c (delete_sanity): Use special_function_kind
10576 values to indicate the kind of destruction to be done.
10577 (build_cleanup): Likewise.
10578 * init.c (perform_member_init): Likewise.
10579 (build_vec_delete_1): Likewise.
10580 (build_dtor_call): Simplify.
10581 (build_delete): Use special_function_kind
10582 values to indicate the kind of destruction to be done.
10583 (build_vbase_delete): Likewise.
10584 (build_vec_delete): Likewise.
10585
10586 * init.c (sort_member_init): Fix typo in error message generation
10587 code.
10588
10589 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
10590
10591 * semantics.c (begin_class_definition): make the packed
10592 attribute be sensitive to the "-fpack-struct" command line flag
10593
10594 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
10595
10596 Update new-abi upcast algorithm.
10597 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
10598 prototype and meaning of return value.
10599 (__si_class_type_info::__do_upcast): Likewise.
10600 (__vmi_class_type_info::__do_upcast): Likewise.
10601 * tinfo.cc (__class_type_info::__upcast_result): Replace
10602 whole2dst with part2dst. Adjust ctor.
10603 (__class_type_info::__do_upcast): Adjust call of worker function.
10604 (__class_type_info::__do_upcast): Adjust.
10605 (__si_class_type_info::__do_upcast): Adjust. Use parent's
10606 __do_upcast.
10607 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
10608 virtual base in diamond hierarchy bug.
10609
10610 2000-05-23 Mark Mitchell <mark@codesourcery.com>
10611
10612 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
10613 and bitfield to tinfo_fn_p.
10614 (DECL_TINFO_FN_P): Adjust.
10615 (SET_DECL_TINFO_FN_P): Likewise.
10616 (DECL_MUTABLE_P): Likewise.
10617 (DECL_C_BIT_FIELD): Likewise.
10618 (SET_DECL_C_BIT_FIELD): Likewise.
10619 (CLEAR_DECL_C_BIT_FIELD): Likewise.
10620 (DECL_UNINLINABLE): Likewise.
10621 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
10622 (handle_using_decl): Remove assertion.
10623 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
10624 to build FIELD_DECLs.
10625 (build_base_field): Likewise.
10626 (layout_class_type): Likewise.
10627 * decl.c (init_decl_processing): Likewise.
10628 (build_ptrmemfunc_type): Likewise.
10629 (grokdeclarator): Likewise.
10630 * decl2.c (grok_x_components): Likewise.
10631 * except.c (call_eh_info): Likewise.
10632 * init.c (init_init_processing): Likewise.
10633 * rtti.c (expand_class_desc): Likewise.
10634 (create_pseudo_type_info): Likewise.
10635 (get_vmi_pseudo_type_info): Likewise.
10636 (create_tinfo_types): Likewise.
10637 * ptree.c (print_lang_decl): Adjust.
10638 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
10639 before checking DECL_MUTABLE_P.
10640
10641 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
10642 parameters for template functions.
10643 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
10644 destructors as well as constructors.
10645
10646 2000-05-22 Mark Mitchell <mark@codesourcery.com>
10647
10648 * class.c (build_ctor_vtbl_group): Set inits.
10649 * optimize.c (maybe_clone_body): Set DECL_INLINE and
10650 DECL_THIS_INLINE appropriately for clones.
10651
10652 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
10653 (DECL_CONV_FN_P): Simplify.
10654 (DECL_OPERATOR): Remove.
10655 (language_to_string): Declare.
10656 * decl.c (duplicate_decls): Fix typo in comment.
10657 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
10658 (grok_op_properties): Use DECL_CONV_FN_P instead of
10659 IDENTIFIER_TYPENAME_P.
10660 * dump.c (dequeue_and_dump): Dump the language linkage of
10661 declarations.
10662 * error.c (language_to_string): Give it external linkage.
10663 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
10664 (implicitly_declare_fn): Set DECL_LANGUAGE.
10665 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
10666 IDENTIFIER_TYPENAME_P.
10667 (tsubst_decl): Likewise.
10668 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
10669 * semantics.c (finish_member_declaration): Don't mark members of
10670 classes declared in an extern "C" region as extern "C".
10671
10672 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10673
10674 * decl2.c (qualified_lookup_using_namespace): Look through
10675 namespace aliases.
10676
10677 * decl.c (push_using_decl): Return the old decl on namespace level.
10678
10679 2000-05-21 Mark Mitchell <mark@codesourcery.com>
10680
10681 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
10682 (VTT_NAME_PREFIX): New macro.
10683 (CTOR_VTBL_NAME_PREFIX): Likewise.
10684 (get_ctor_vtbl_name): New function.
10685 * class.c (get_vtable_name): Simplify.
10686 (get_vtt_name): New function.
10687 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
10688 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
10689 when a virtual base becomes primary.
10690 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
10691 VTTs.
10692 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
10693 additional parameters.
10694 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
10695 (initialize_array): New function.
10696 (build_vtt): Likewise.
10697 (build_vtt_inits): Likewise.
10698 (dfs_build_vtt_inits): Likewise.
10699 (dfs_fixup_binfo_vtbls): Likewise.
10700 (build_ctor_vtbl_group): Likewise.
10701 (initialize_vtable): Use initialize_array.
10702 (accumulate_vtbl_inits): Reimplement to handle construction
10703 vtables.
10704 (dfs_accumulate_vtbl_inits): Likewise.
10705 (bulid_vtbl_initializer): Adjust parameter name.
10706 * method.c (build_typename_overload): Remove #if 0'd code.
10707 (get_ctor_vtbl_name): New function.
10708 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
10709 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
10710
10711 * cp-tree.h (struct lang_type): Remove search_slot.
10712 (CLASSTYPE_SEARCH_SLOT): Remove.
10713 (emit_base_init): Change prototype.
10714 (initialize_vtbl_ptrs): Likewise.
10715 (expand_indirect_vtbls_init): Likewise.
10716 (clear_search_slots): Remove.
10717 * decl.c (lang_mark_tree): Don't mark search_slot.
10718 * init.c (initialize_vtbl_ptrs): Simplify.
10719 (emit_base_init): Likewise.
10720 * search.c (struct vbase_info): Document decl_ptr.
10721 (convert_pointer_to_single_level): Remove.
10722 (dfs_find_vbases): Remove.
10723 (dfs_init_base_pointers): Simplify.
10724 (dfs_clear_vbase_slots): Remove.
10725 (dfs_vtable_path_unmark): New function.
10726 (init_vbase_pointers): Simplify.
10727 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
10728 (expand_indirect_vtbls_init): Simplify. Don't call
10729 mark_all_temps_used.
10730 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
10731 initialize_vtbl_ptrs.
10732
10733 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
10734
10735 * except.c: Add static prototypes.
10736
10737 2000-05-20 H.J. Lu <hjl@gnu.org>
10738
10739 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
10740
10741 2000-05-19 Mark Mitchell <mark@codesourcery.com>
10742
10743 Don't create a separate copy of virtual bases for the
10744 CLASSTYPE_VBASECLASSES list.
10745 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
10746 (BINFO_FOR_VBASE): Remove.
10747 (CANONICAL_BINFO): Adjust.
10748 (binfo_for_vbase): New function.
10749 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
10750 instead of BINFO_FOR_VBASE.
10751 (build_vbase_pointer): Likewise.
10752 (build_secondary_vtable): Likewise.
10753 (dfs_mark_primary_bases): Likewise.
10754 (mark_primary_bases): Likewise.
10755 (layout_nonempty_base_or_field): Likewise.
10756 (dfs_set_offset_for_shared_vbases): Likewise.
10757 (dfs_set_offset_for_unshared_vbases): Likewise.
10758 (layout_virtual_bases): Likewise. Adjust for changes to the
10759 CLASSTYPE_VBASECLASSES list.
10760 (dump_class_hierarchy_r): Use binfo_for_vbase
10761 instead of BINFO_FOR_VBASE.
10762 (dump_class_hierarchy): Likewise.
10763 (finish_vtbls): Likewise.
10764 (build_vtbl_initializer): Adjust for changes to the
10765 CLASSTYPE_VBASECLASSES list.
10766 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
10767 * decl.c (finish_destructor_body): Adjust for changes to the
10768 CLASSTYPE_VBASECLASSES list.
10769 * init.c (sort_base_init): Use binfo_for_vbase.
10770 (construct_virtual_bases): Adjust for changes to the
10771 CLASSTYPE_VBASECLASSES list.
10772 (expand_member_init): Use binfo_for_vbase.
10773 (build_vbase_delete): Adjust for changes to the
10774 CLASSTYPE_VBASECLASSES list.
10775 * method.c (do_build_copy_constructor): Likewise.
10776 * rtti.c (get_base_offset): Use binfo_for_vbase.
10777 (expand_class_desc): Remove #if 0'd code.
10778 * search.c (struct vbase_info): Remove vbase_types.
10779 (get_base_distance): Use binfo_for_vbase.
10780 (lookup_field_queue_p): Use CANONICAL_BINFO.
10781 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
10782 (get_pure_virtuals): Adjust for changes to the
10783 CLASSTYPE_VBASECLASSES list.
10784 (dfs_find_vbases): Use binfo_for_vbase.
10785 (dfs_init_vbase_pointers): Likewise.
10786 (init_vbase_pointers): Don't initialize vi.vbase_types.
10787 (virtual_context): Use binfo_for_vbase.
10788 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
10789 CLASSTYPE_VBASECLASSES list.
10790 (expand_indirect_vtbls_init): Simplify.
10791 (dfs_get_vbase_types): Don't replicate virtual bases.
10792 (find_vbase_instance): Use binfo_for_vbase.
10793 (binfo_for_vbase): New function.
10794 * typeck.c (get_delta_difference): Use binfo_for_vbase.
10795
10796 2000-05-17 Mark Mitchell <mark@codesourcery.com>
10797
10798 * decl2.c (finish_anon_union): Generalize error messages to handle
10799 anonymous structures.
10800 * init.c (perform_member_init): Remove `name' parameter.
10801 (build_field_list): New function.
10802 (sort_member_init): Handle anonymous union initialization order
10803 correctly. Check for multiple initializations of the same union.
10804 (emit_base_init): Don't look up fields by name here.
10805 (expand_member_init): Record the result of name lookup for future
10806 reference.
10807 * typeck.c (build_component_ref): Fix formatting.
10808
10809 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
10810
10811 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
10812 * typeck.c (build_x_compound_expr): Replace warn_unused with
10813 warn_unused_value.
10814
10815 * decl2.c (lang_decode_option): Update -Wall unused flags by
10816 calling set_Wunused.
10817
10818 2000-05-16 Mark Mitchell <mark@codesourcery.com>
10819
10820 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
10821 * init.c (dfs_vtable_path_unmark): Remove.
10822 * search.c (marked_new_vtable_p): Likewise.
10823 (unmarked_new_vtable_p): Likewise.
10824 (dfs_search_slot_nonempty_p): Likewise.
10825 (dfs_mark): Likewise.
10826 (dfs_vtable_path_unmark): Likewise.
10827 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
10828 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
10829 (dfs_init_vbase_pointers): Remove special-case new ABI code.
10830 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
10831 (init_vbase_pointers): Simplify.
10832 (expand_indirect_vtbls_init): Likewise.
10833
10834 * class.c (copy_virtuals): New function.
10835 (build_primary_table): Use it.
10836 (build_secondary_vtable): Likewise.
10837 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
10838 indicate that no vcall offset is required.
10839 (add_virtual_function): Likewise.
10840 (modify_all_vtables): Likewise.
10841 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10842 (dfs_accumulate_vtbl_inits): Likewise.
10843 (build_vtbl_initializer): Make changes to handle construction
10844 vtables.
10845 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10846 (build_rtti_vtbl_entries): Likewise.
10847 (build_vtable_entries): Handle a NULL vcall_index.
10848
10849 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
10850
10851 * decl2.c (lang_decode_option): Fix thinko.
10852
10853 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
10854
10855 * except.c (check_handlers): New fn.
10856 * cp-tree.h: Declare it.
10857 * semantics.c (finish_handler_sequence): Call it.
10858 (finish_function_handler_sequence): Likewise.
10859 (finish_handler_parms): Set TREE_TYPE on the handler.
10860 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
10861 * search.c (get_base_distance_recursive): If protect>1, ignore
10862 special access.
10863 (get_base_distance): Don't reduce watch_access.
10864
10865 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
10866
10867 * lex.c: #include diagnostic.h.
10868 (lang_init_options): Set default prefixing rules.
10869
10870 * lang-options.h: Add -fdiagnostics-show-location=.
10871
10872 * decl2.c: #include diagnostic.h.
10873 (lang_decode_option): Handle -fdiagnostics-show-location=.
10874
10875 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
10876
10877 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
10878 * vec.cc: Revert my 2000-05-07 change.
10879
10880 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
10881
10882 * class.c (check_field_decls): Complain about non-static data
10883 members with same name as class in class with constructor.
10884
10885 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
10886
10887 * decl.c (grokdeclarator): Allow non-static data members with
10888 same name as class.
10889
10890 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
10891
10892 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
10893 and pending_inline.filename. Update prototypes.
10894 * decl.c (define_label): Constify filename parameter.
10895 * decl2.c (warn_if_unknown_interface): Constify local char *.
10896 * input.c Constify input_source.filename. Don't declare
10897 input_filename or lineno. Constify filename parameter to feed_input.
10898 * lex.c (init_parse): Constify parameter and return value.
10899 (cp_pragma_interface, cp_pragma_implementation): Constify
10900 filename argument.
10901 (reinit_parse_for_method, reinit_parse_for_block,
10902 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
10903 Constify local char *.
10904 * pt.c: Don't declare lineno or input_filename.
10905 (print_template_context, tsubst_friend_function, tsubst_decl,
10906 tsubst, instantiate_decl): Constify local char *.
10907 * semantics.c (expand_body): Constify local char *.
10908 * tree.c (build_srcloc): Constify filename parameter.
10909 * typeck.c (c_expand_asm_operands): Constify filename
10910 parameter.
10911
10912 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
10913
10914 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
10915 offsetof expansion.
10916
10917 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
10918
10919 * inc/cxxabi.h: Fix typos in comment.
10920 (__base_class_info::__offset): Use a static_cast.
10921
10922 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
10923
10924 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
10925 of std::size_t and std::ptrdiff_t respectively.
10926 * tinfo.cc: Likewise.
10927 * vec.cc: Likewise.
10928
10929 2000-05-06 Richard Henderson <rth@cygnus.com>
10930
10931 * typeck.c (build_c_cast): Don't warn integer->pointer size
10932 mismatch for constants.
10933
10934 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
10935
10936 * rtti.c (ptmd_initializer): Set non-public, if class is
10937 incomplete.
10938
10939 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
10940 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10941 __cxa_vec_delete): Likewise.
10942 * tinfo.cc (__dynamic_cast): Likewise.
10943 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10944 __cxa_vec_delete): Likewise.
10945
10946 2000-05-04 Mark Mitchell <mark@codesourcery.com>
10947
10948 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
10949 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
10950 (lang_decl_flags): Add vcall_offset.
10951 (THUNK_VCALL_OFFSET): Use it.
10952 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
10953 * method.c (make_thunk): Create the lang_decl here, not in
10954 emit_thunk.
10955 (emit_thunk): Make generic thunks into ordinary functions once
10956 they have been fed to expand_body.
10957 * semantics.c (expand_body): Set current_function_is_thunk here.
10958
10959 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10960
10961 * class.c (update_vtable_entry_for_fn): Prototype.
10962
10963 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
10964 and `tmpl'.
10965
10966 * search.c (dfs_build_inheritance_graph_order): Prototype.
10967
10968 2000-05-04 Mark Mitchell <mark@codesourcery.com>
10969
10970 * cp-tree.h (special_function_kind): Add various kinds of
10971 destructors.
10972 (special_function_p): New function.
10973 * class.c (overrides): Don't let one kind of destructor override
10974 another.
10975 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
10976 whether or not to instantiate a template.
10977 * tree.c (special_function_p): Define.
10978
10979 2000-05-03 Mark Mitchell <mark@codesourcery.com>
10980
10981 * cp-tree.def (THUNK_DECL): Remove.
10982 * cp-tree.h (DECL_THUNK_P): New macro.
10983 (DECL_NON_THUNK_FUNCTION_P): Likewise.
10984 (DECL_EXTERN_C_FUNCTION_P): Likewise.
10985 (SET_DECL_THUNK_P): Likewise.
10986 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
10987 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
10988 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
10989 * decl.c (decls_match): Use DECL_EXTERN_C_P.
10990 (duplicate_decls): Likewise.
10991 (pushdecl): Likewise. Adjust thunk handling.
10992 (grokfndecl): Use DECL_EXTERN_C_P.
10993 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
10994 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
10995 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
10996 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
10997 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
10998 DECL_NO_STATIC_CHAIN.
10999 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
11000 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
11001 * search.c (covariant_return_p): Remove THUNK_DECL handling.
11002 * ir.texi: Update.
11003
11004 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11005
11006 * tree.c (walk_tree): Set lineno.
11007
11008 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11009
11010 * exception.cc: Update license notice.
11011 * new.cc: Likewise.
11012 * new1.cc: Likewise.
11013 * new2.cc: Likewise.
11014 * tinfo.cc: Likewise.
11015 * tinfo2.cc: Likewise.
11016 * vec.cc: Likewise.
11017 * inc/cxxabi.h: Likewise.
11018 * inc/exception: Likewise.
11019 * inc/new: Likewise.
11020 * inc/new.h: Likewise.
11021 * inc/typeinfo: Likewise.
11022
11023 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11024
11025 * tree.c (build_target_expr_with_type): If we already have a
11026 TARGET_EXPR, just return it.
11027
11028 * optimize.c (initialize_inlined_parameters): Don't generate an
11029 EXPR_STMT if we can just use DECL_INITIAL.
11030 * decl.c (emit_local_var): Only make the initialization a
11031 full-expression if stmts_are_full_exprs_p.
11032
11033 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11034
11035 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
11036 macro.
11037 * call.c (standard_conversion): Use it.
11038 (direct_reference_binding): Likewise.
11039 (build_over_call): Likewise.
11040 (is_properly_derived_from): Likewise.
11041 (compare_ics): Likewise.
11042 * class.c (resolves_to_fixed_type_p): Likewise.
11043 * optimize.c (declare_return_variable): Likewise.
11044 * pt.c (is_specialization_of): Likewise.
11045 (unify): Likewise.
11046 * typeck.c (comp_target_parms): Likeiwse.
11047 (build_static_cast): Likewise.
11048 (build_reinterpret_cast): Likewise.
11049 (build_const_cast): Likewise.
11050 (comp_ptr_ttypes_real): Likewise.
11051 (comp_ptr_ttypes_const): Likewise.
11052 * typeck2.c (process_init_constructor): Likewise.
11053
11054 2000-04-30 Scott Snyder <snyder@fnal.gov>
11055
11056 * decl.c (finish_destructor_body): Use the base destructor when
11057 destroying virtual bases.
11058
11059 2000-04-30 Mark Mitchell <mark@codesourcery.com>
11060
11061 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
11062 STMT_EXPRs.
11063 * optimize.c (struct inline_data): Add target_exprs field.
11064 (declare_return_variable): When a function returns an aggregate,
11065 use the variable declared in the TARGET_EXPR as the remapped
11066 DECL_RESULT.
11067 (expand_call_inline): Update the pending target_exprs stack.
11068 (optimize_function): Initialize the stack.
11069
11070 * decl2.c (finish_file): Fix typo in comment.
11071
11072 * method.c (emit_thunk): Don't try to return a `void' value.
11073
11074 * optimize.c (initialize_inlined_parameters): If the parameter is
11075 addressable, we need to make a new VAR_DECL, even if the
11076 initializer is constant.
11077
11078 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
11079
11080 * decl.c (grok_op_properties): Add an extra check of argtypes.
11081
11082 2000-04-27 Mark Mitchell <mark@codesourcery.com>
11083
11084 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
11085 variables.
11086 (initialize_inlined_parameters): Try to avoid creating new
11087 VAR_DECLs.
11088
11089 2000-04-27 Alex Samuel <samuel@codesourcery.com>
11090
11091 * lex.c (my_get_run_time): Remove.
11092 (init_filename_times): Use get_run_time instead of my_get_run_time.
11093 (check_newline): Likewise.
11094 (dump_time_statistics): Likewise.
11095 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
11096 of computing elapsed time explicitly.
11097
11098 2000-04-26 Mark Mitchell <mark@codesourcery.com>
11099
11100 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
11101 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
11102 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
11103 before calling decl_constant_value.
11104 * class.c (check_bitfield_decl): Likewise.
11105 * cvt.c (ocp_convert): Likewise.
11106 (convert): Likewise.
11107 * decl.c (compute_array_index_type): Likewise.
11108 (build_enumerator): Likewise.
11109 * decl2.c (check_cp_case_value): Likewise.
11110 * pt.c (convert_nontype_argument): Likewise.
11111 (tsubst): Likewise.
11112 * typeck.c (decay_conversion): Likewise.
11113 (build_compound_expr): Likewise.
11114 (build_reinterpret_cast): Likewise.
11115 (build_c_cast): Likewise.
11116 (convert_for_assignment): Likewise.
11117
11118 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
11119
11120 * decl.c (finish_function): Don't play games with DECL_INLINE.
11121
11122 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
11123
11124 * ir.texi: Correct typo.
11125
11126 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11127
11128 * decl.c (grokdeclarator): Reject VLAs as members.
11129
11130 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
11131
11132 * call.c (standard_conversion): Accept conversion between
11133 COMPLEX_TYPEs.
11134
11135 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
11136
11137 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
11138
11139 * decl2.c (finish_file): Remove double setup for accounting
11140 compile time.
11141
11142 2000-04-24 Robert Lipe <robertlipe@usa.net>
11143
11144 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
11145
11146 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
11147
11148 * new.cc (set_new_handler): Needs to be in std::.
11149
11150 2000-04-23 Mark Mitchell <mark@codesourcery.com>
11151
11152 * cp-tree.h (lang_decl): Remove pretty_function_p.
11153 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
11154 language-specific node.
11155 * decl.c (cp_make_fname_decl): Use build_decl, not
11156 build_lang_decl, to build the variables.
11157 (grokvardecl): Don't call build_lang_decl for local variables in
11158 templates.
11159 (grokdeclarator): Don't call build_lang_decl for local type
11160 declarations in templates.
11161 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
11162 zero'd memory, rather than calling memset.
11163 * pt.c: Include hashtab.h.
11164 (local_specializations): New variable.
11165 (retrieve_local_specialization): Use it.
11166 (register_local_specialization): Likewise.
11167 (tsubst_decl): Don't assume local variables have
11168 DECL_LANG_SPECIFIC.
11169 (instantiate_decl): Set up local_specializations.
11170 * Makefile.in (HTAB_H): New variable.
11171
11172 2000-04-23 Richard Henderson <rth@cygnus.com>
11173
11174 * typeck.c (c_expand_asm_operands): Restore the original
11175 contents of the output list.
11176
11177 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
11178
11179 * ir.texi: Document complex number representation.
11180
11181 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
11182
11183 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
11184 (target_incomplete_p): New function.
11185 (tinfo_base_init): Create comdat NTBS name variable.
11186 (ptr_initializer): Add non_public parameter. Calculate it.
11187 (ptmd_initializer): Likewise.
11188 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
11189 (create_real_tinfo_var): Add non_public parameter. Use it.
11190 Push proxy into global namespace.
11191 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
11192 New enumeration.
11193 * inc/typeinfo (type_info::before, type_info::operator==):
11194 Compare __name addresses.
11195
11196 * tinfo2.cc: Remove new-abi builtins comment.
11197
11198 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
11199
11200 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
11201
11202 * call.c (joust): Exit early if we get the same function, too.
11203
11204 * decl2.c (key_method): Return NULL_TREE for template classes.
11205 (import_export_class): Don't need to check for template classes.
11206
11207 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
11208
11209 * lex.c: Remove references to cccp.c.
11210
11211 2000-04-18 Mark Mitchell <mark@codesourcery.com>
11212
11213 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
11214 volatile_memfunc. Add destructor_attr. Adjust dummy.
11215 (DECL_DESTRUCTOR_P): Use destructor_attr.
11216 (DECL_CONST_MEMFUNC_P): Reimplement.
11217 (DECL_VOLATILE_MEMFUNC_P): Remove.
11218 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
11219 (overrides): Use DECL_DESTRUCTOR_P.
11220 (check_for_override): Likewise.
11221 * decl.c (start_function): Likewise.
11222 * decl2.c (grokfclassfn): Likewise.
11223 (check_classfn): Likewise.
11224 (grok_function_init): Likewise.
11225
11226 2000-04-17 Mark Mitchell <mark@codesourcery.com>
11227
11228 * decl2.c (grokfield): Issue error on illegal data member
11229 declaration.
11230
11231 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
11232
11233 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
11234
11235 2000-04-16 Mark Mitchell <mark@codesourcery.com>
11236
11237 * class.c (build_vtable_entry): Don't build thunks for type-info
11238 functions.
11239
11240 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
11241
11242 * decl.c (decls_match): Allow a redeclaration of a builtin to
11243 specify args while the builtin did not.
11244
11245 2000-04-15 Mark Mitchell <mark@codesourcery.com>
11246
11247 * cp-tree.def (THUNK_DECL): Add to documentation.
11248 * cp-tree.h (flag_huge_objects): Declare.
11249 * class.c (modify_vtable_entry): Tidy.
11250 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
11251 Calculate delta appropriately for the new ABI.
11252 (dfs_modify_vtables): Use it.
11253 (modify_all_vtables): Fix thinko in code to add overriding copies
11254 of functions to primary vtables.
11255 (build_clone): Fix typo in comment.
11256 (clone_function_decl): Correct order of destructors in vtable.
11257 (build_vbase_offset_vtbl_entries): Adjust comment.
11258 (dfs_vcall_offset_queue_p): Remove.
11259 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
11260 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
11261 (build_vtable_entry): Correct check for pure virtual functions.
11262 Don't declare flag_huge_objects.
11263 * decl.c (flag_huge_objects): Remove declaration.
11264 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
11265 Use int_size_in_bytes.
11266 (emit_thunk): Handle vcall offset thunks.
11267
11268 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11269
11270 * decl2.c (parse_time, varconst_time): Delete declarations.
11271 (finish_file): Delete LINENO declaration.
11272 START_TIME and THIS_TIME now long.
11273
11274 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
11275
11276 * class.c (build_base_field): Reformat comment.
11277
11278 * inc/cxxabi.h (stddef.h): Comment inclusion.
11279 (__base_class_info::__offset): Comment shift.
11280
11281 2000-04-12 Mark Mitchell <mark@codesourcery.com>
11282
11283 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
11284 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
11285 (cp_push_exception_identifier): New macro.
11286 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
11287 (DECL_BASE_DESTRUCTOR_P): Likewise.
11288 (DECL_DELETING_DESTRUCTOR_P): Likewise.
11289 (get_vtbl_decl_for_binfo): Fix formatting.
11290 (in_charge_arg_for_name): New macro.
11291 (maybe_build_cleanup_and_delete): Remove declaration.
11292 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
11293 (in_charge_arg_for_name): New function.
11294 (build_new_method_call): Use it. Handle cloned destructors.
11295 (build_clone): Don't make the base constructor virtual.
11296 Automatically defer generated functions.
11297 (clone_function_decl): Handle destructors, too.
11298 (clone_constructors_and_destructors): Likewise.
11299 (create_vtable_ptr): Don't create a vtable entry for a cloned
11300 function.
11301 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
11302 (initialize_predefined_identifiers): Update appropriately.
11303 (finish_destructor_body): Simplify.
11304 (maybe_build_cleanup_and_delete): Remove.
11305 * except.c (expand_throw): Handle new-ABI destructors.
11306 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
11307 (build_dtor_call): New function.
11308 (build_delete): Use it. Simplify.
11309 * optimize.c (maybe_clone_body): Handle destructors.
11310 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
11311
11312 * exception.cc (cleanup_fn): New typedef.
11313 (CALL_CLEANUP): New macro.
11314 (cp_eh_info): Use them.
11315 (__cp_push_exception): Likewise.
11316 (__cp_pop_exception): Likewise.
11317
11318 2000-04-11 Mark Mitchell <mark@codesourcery.com>
11319
11320 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
11321 (complete_dtor_identifier): New macro.
11322 (CLASSTYPE_FIRST_CONVERSION): Remove.
11323 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
11324 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
11325 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
11326 (CLASSTYPE_CONSTRUCTORS): Likewise.
11327 (CLASSTYPE_DESTRUCTORS): Likewise.
11328 (lang_decl): Add cloned_function.
11329 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
11330 (DECL_BASE_CONSTRUCTOR_P): Likewise.
11331 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
11332 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
11333 (DECL_CLONED_FUNCTION_P): Likewise.
11334 (DECL_CLONED_FUNCTION): Likewise.
11335 (clone_function_decl): Declare.
11336 (maybe_clone_body): Likewise.
11337 * call.c (build_user_type_conversion_1): Call complete object
11338 constructors in the new ABI.
11339 (build_new_method_call): Don't add in-charge parameters under the
11340 new ABI.
11341 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
11342 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
11343 CLASSTYPE_DESTRUCTOR_SLOT.
11344 (build_clone): New function.
11345 (clone_function_decl): Likewise.
11346 (clone_constructors_and_destructors): Likewise.
11347 (check_bases_and_members): Use it.
11348 * decl.c (iniitialize_predefined_identifiers): Initialize
11349 complete_dtor_identifier.
11350 (finish_function): Don't add extra code to a clone.
11351 (lang_mark_tree): Mark cloned_function.
11352 * decl2.c (mark_used): Don't bother trying to instantiate things
11353 we synthesized.
11354 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
11355 * method.c (set_mangled_name_for_decl): Don't treat clones as
11356 constructors.
11357 (synthesize_method): Sythesize cloned functions, not the clones.
11358 * optimize.c (inline_data): Update comment on ret_label.
11359 (remap_block): Don't assume DECL_INITIAL exists.
11360 (copy_body_r): Allow ret_label to be NULL.
11361 (maybe_clone_body): Define.
11362 * pt.c (tsubst_decl): Handle clones.
11363 (instantiate_clone): New function.
11364 (instantiate_template): Use it.
11365 (set_mangled_name_for_template_decl): Don't treat clones as
11366 constructors.
11367 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
11368 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
11369 * semantics.c (expand_body): Clone function bodies as necessary.
11370
11371 * optimize.c (remap_decl): Avoid sharing structure for arrays
11372 whose size is only known at run-time.
11373 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
11374
11375 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
11376 to has_in_charge_parm_p.
11377 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
11378 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
11379 (DECL_COPY_CONSTRUCTOR_P): New macro.
11380 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
11381 (build_user_type_conversion_1): Likewise.
11382 (convert_like_real): Likewise.
11383 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
11384 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
11385 (copy_args_p): Likewise.
11386 (grok_ctor_properties): Likewise.
11387 (start_function): Likewise.
11388 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
11389 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
11390 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
11391 * method.c (do_build_copy_constructor): Use
11392 DECL_HAS_IN_CHARGE_PARM_P.
11393 (synthesize_method): Likewise.
11394 * pt.c (instantiate_template): Remove goto.
11395 * tree.c (build_cplus_method_type): Remove mention of obstacks in
11396 comment.
11397
11398 * cp-tre.h (finish_function): Change prototype.
11399 * decl.c (end_cleanup_fn): Adjust caller.
11400 (finish_function): Take only one parameter.
11401 * decl2.c (finish_objects): Adjust caller.
11402 (finish_static_storage_duration_function): Likewise.
11403 * method.c (emit_thunk): Likewise.
11404 * parse.y: Likewise.
11405 * parse.c: Regenerated.
11406 * pt.c (instantiate_decl): Likewise.
11407 * rtti.c (synthesize_tinfo_fn): Likewise.
11408 * semantics.c (expand_body): Likewise.
11409
11410 * cp-tree.h (copy_decl): New function.
11411 * class.c (finish_struct_1): Use it.
11412 * lex.c (copy_decl): Define it.
11413 * pt.c (tsubst_decl): Likewise.
11414 * tree.c (copy_template_template_parm): Likewise.
11415
11416 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
11417 has_nonpublic_assign_ref.
11418 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
11419 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
11420 * class.c (finish_struct_methods): Don't set
11421 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
11422 (interface_only): Don't declare.
11423 (interface_unknown): Likewise.
11424
11425 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11426
11427 * tree.h (HAVE_TEMPLATES): Remove definition.
11428 * lang-options.h (-fthis-is-variable): Remove documentation.
11429
11430 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
11431
11432 * class.c (instantiate_type): Handle object-relative template-id.
11433
11434 * semantics.c (finish_expr_stmt): Call convert_to_void here.
11435 * decl.c (cplus_expand_expr_stmt): Not here.
11436
11437 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
11438 Initialize exprtype earlier.
11439
11440 * parse.y (fn.def1): Check for defining types in return types.
11441
11442 * decl.c (check_tag_decl): Notice extra fundamental types.
11443 Diagnose empty decls in classes, too.
11444
11445 * decl.c (grokdeclarator): Don't override an anonymous name if no
11446 declarator was given.
11447
11448 * cvt.c (convert_to_void): Call resolve_offset_ref.
11449
11450 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
11451
11452 * decl2.c (decl_namespace): Handle getting a type.
11453
11454 * typeck.c (build_c_cast): Re-enable warning for cast between
11455 pointer and integer of different size.
11456
11457 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
11458
11459 * inc/cxxabi.h (__pointer_type_info): Add restrict and
11460 incomplete flags.
11461 (__pointer_type_info::__pointer_catch): New virtual function.
11462 (__pointer_to_member_type_info): Derive from
11463 __pointer_type_info. Adjust.
11464 (__pointer_to_member_type_info::__do_catch): Remove.
11465 (__pointer_to_member_type_info::__is_pointer_p): Declare.
11466 (__pointer_to_member_type_info::__pointer_catch): Declare.
11467 * rtti.c (qualifier_flags): Add restrict flag.
11468 (ptmd_initializer): Reorder members.
11469 (create_tinfo_types): Expand comments. Reorder
11470 ptmd_desc_type_node members.
11471 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
11472 Implement.
11473 (__pointer_type_info::__do_catch): Move specific code into
11474 __pointer_catch. Call it.
11475 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
11476 specific catch checking. Fix void conversion check.
11477 (__pointer_to_member_type_info::__do_catch): Remove.
11478 (__pointer_to_member_type_info::__pointer_catch): Implement.
11479
11480 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11481
11482 * lex.c (init_parse): Remove traces of classof and headof.
11483 * decl2.c (flag_operator_names): Default to 1.
11484 (lang_decode_option): Do not set it for -ansi.
11485
11486 2000-04-09 Mark Mitchell <mark@codesourcery.com>
11487
11488 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
11489 (DECL_MAIN_VARIANT): Remove.
11490 * decl.c (duplicate_decls): Don't set it.
11491 (start_function): Likewise.
11492 (lang_mark_tree): Don't mark it.
11493 * decl2.c (defer_fn): Don't use it.
11494 * lex.c (retrofit_lang_decl): Don't set it.
11495 * pt.c (tsubst_decl): Likewise.
11496 * ptree.c (print_lang_decl): Don't print it.
11497 * typeck.c (mark_addressable): Don't use it.
11498
11499 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
11500
11501 * vec.cc: Include <new> and <exception>.
11502 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
11503 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
11504 terminate.
11505 (__cxa_vec_delete): Catch dtor exceptions.
11506
11507 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
11508
11509 Prepend __ to implementation defined names.
11510 * inc/typeinfo (type_info): Rename _name to __name.
11511 (type_info::type_info): Rename parameter.
11512 (type_info::operator==, type_info::operator!=,
11513 type_info::before): Likewise.
11514 (type_info::is_pointer_p, type_info::is_function_p,
11515 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
11516 parameters.
11517 * inc/cxxabi.h
11518 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
11519 (__pointer_type_info::__pointer_type_info): Likewise.
11520 (__pointer_type_info::is_pointer_p,
11521 __pointer_type_info::do_catch): Prepend __. Rename parameters.
11522 (__array_type_info::__array_type_info): Rename parameters.
11523 (__function_type_info::__function_type_info): Likewise.
11524 (__function_type_info::is_function_p): Prepend __.
11525 (__enum_type_info::__enum_type_info): Rename parameters.
11526 (__pointer_to_member_type_info::__pointer_to_member_type_info):
11527 Likewise.
11528 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
11529 parameters.
11530 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
11531 (__class_type_info::__class_type_info): Rename parameters.
11532 (__class_type_info::sub_kind): Prepend __. Adjust member names.
11533 (__class_type_info::upcast_result,
11534 __class_type_info::dyncast_result): Prepend __. Move definition
11535 into tinfo.cc.
11536 (__class_type_info::do_upcast, __class_type_info::do_catch,
11537 __class_type_info::find_public_src,
11538 __class_type_info::do_dyncast,
11539 __class_type_info::do_find_public_src): Prepend __. Rename
11540 parameters.
11541 (__si_class_type_info::__si_class_type_info): Rename parameters.
11542 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
11543 __si_class_type_info::do_find_public_src): Prepent __. Rename
11544 parameters.
11545 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
11546 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
11547 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
11548 parameters.
11549 (__dynamic_cast): Rename parameters.
11550 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
11551 type_info::do_catch, type_info::do_upcast): Prepend __.
11552 (contained_p, public_p, virtual_p, contained_public_p,
11553 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
11554 (__class_type_info::do_catch,
11555 __class_type_info::do_upcast): Prepend __. Adjust.
11556 (__class_type_info::__upcast_result,
11557 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
11558 Adjust.
11559 (__class_type_info::find_public_src): Prepend __. Adjust.
11560 (__class_type_info::do_find_public_src,
11561 __si_class_type_info::do_find_public_src,
11562 __vmi_class_type_info::do_find_public_src): Likewise.
11563 (__class_type_info::do_dyncast,
11564 __si_class_type_info::do_dyncast,
11565 __vmi_class_type_info::do_dyncast): Likewise.
11566 (__class_type_info::do_upcast,
11567 __si_class_type_info::do_upcast,
11568 __vmi_class_type_info::do_upcast): Likewise.
11569 (__dynamic_cast): Adjust.
11570 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
11571 (__function_type_info::is_function_p): Likewise.
11572 (__pointer_type_info::do_catch): Likewise. Adjust.
11573 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
11574 (__throw_type_match_rtti_2): Adjust.
11575 (__is_pointer): Adjust.
11576
11577 2000-04-08 Mark Mitchell <mark@codesourcery.com>
11578
11579 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
11580 (complete_ctor_identifier): New macro.
11581 (special_function_kind): Add sfk_copy_constructor and
11582 sfk_assignment_operator.
11583 (LOOKUP_HAS_IN_CHARGE): Remove.
11584 (cons_up_default_function): Rename to ...
11585 (implicitly_declare_fn): ... this.
11586 * call.c (build_new_method_call): Add in-charge parameters for
11587 constructors here.
11588 * class.c (add_implicitly_declared_members): Change parameter name
11589 from cant_have_assignment to cant_have_const_assignment.
11590 Replace calls to cons_up_default_function to implicitly_declare_fn.
11591 * cvt.c (ocp_convert): Use complete_ctor_identifier.
11592 * decl.c (initialize_predefined_identifiers): Initialize it.
11593 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
11594 complex expression.
11595 * init.c (expand_default_init): Don't calculate the in-charge
11596 parameter here.
11597 (build_new_1): Likewise.
11598 * lex.c (cons_up_default_function): Move to method.c.
11599 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
11600 (implicitly_declare_fn): New function.
11601 * typeck.c (build_static_cast): Use complete_ctor_identifier.
11602 (build_modify_expr): Likewise.
11603 * typeck2.c (build_functional_cast): Likewise.
11604
11605 Under the new ABI, constructors don't return `this'.
11606 * cp-tree.h (warn_reorder): Declare.
11607 (special_function_kind): New enum.
11608 (global_base_init_list): Remove declaration.
11609 (emit_base_init): Don't return a value.
11610 (check_base_init): Don't declare.
11611 (is_aggr_typedef): Likewise.
11612 * decl.c (check_special_function_return_type): New function.
11613 (return_types): Remove.
11614 (grokdeclarator): Use check_special_function_return_type.
11615 (start_function): Don't initialize ctor_label under the new ABI.
11616 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
11617 * init.c (begin_init_stmts): Move to top of file.
11618 (finish_init_stmts): Likewise.
11619 (warn_reorder): Don't declare.
11620 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
11621 value.
11622 (check_base_init): Remove.
11623 (is_aggr_typedef): Likewise.
11624 (build_new_1): Don't use the return value of a constructor.
11625 * semantics.c (setup_vtbl_ptr): Don't use the return value
11626 of emit_base_init.
11627 * typeck.c (check_return_expr): Don't magically convert return
11628 statements into `return this' in constructors under the new ABI.
11629
11630 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
11631 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
11632 (base_ctor_identifier): New macro.
11633 (base_dtor_identifier): Likewise.
11634 (deleting_dtor_identifier): Likewise.
11635 * decl.c: Don't include obstack.h.
11636 (obstack_chunk_alloc): Don't define.
11637 (obstack_chunk_free): Likewise.
11638 (struct predefined_identifier): New type.
11639 (initialize_predefined_identifiers): New function.
11640 (init_decl_processing): Use it.
11641 (debug_temp_inits): Remove.
11642 (start_method): Don't call preserve_data.
11643 (hack_incomplete_structures): Update comment.
11644 * init.c (init_init_processing): Don't initialize
11645 nelts_identifier.
11646 (build_offset_rf): Remove dead code.
11647 (build_delete): Use CLASSTYPE_N_BASECLASSES.
11648 * search.c (init_search_processing): Don't initialize
11649 vptr_identifier.
11650
11651 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11652
11653 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
11654 some sign_compare warnings.
11655
11656 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
11657
11658 Rename abi::__vmi_class_type_info members.
11659 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
11660 base_list, detail_masks members to vmi_flags, vmi_base_count,
11661 vmi_bases and vmi_flags_masks respectively.
11662 (__vmi_class_type_info::vmi_flags_masks): Rename
11663 details_unknown_mask to flags_unknown_mask.
11664 * tinfo.cc (__class_type_info::do_upcast): Adjust.
11665 (__vmi_class_type_info::do_find_public_src): Adjust.
11666 (__vmi_class_type_info::do_dyncast): Adjust.
11667 (__vmi_class_type_info::do_upcast): Adjust.
11668
11669 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
11670
11671 * tinfo.cc (convert_to_base): New function.
11672 (get_vbase_offset): Remove. Move into convert_to_base.
11673 (__vmi_class_type_info::do_find_public_src): Adjust.
11674 (__vmi_class_type_info::do_dyncast): Adjust.
11675 (__vmi_class_type_info::do_upcast): Adjust.
11676
11677 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
11678
11679 * tinfo.cc (operator=): Use __builtin_strcmp.
11680 * tinfo2.cc (before): Likewise.
11681
11682 2000-04-06 Mark Mitchell <mark@codesourcery.com>
11683
11684 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
11685 (DECL_SAVED_INLINE): Rename to ...
11686 (DECL_DEFERRED_FN): ... this.
11687 (in_function_p): Remove declaration.
11688 (mark_inline_for_output): Rename to ...
11689 (defer_fn): ... this.
11690 * decl.c (finish_function): Adjust call to mark_inline_for_output.
11691 (in_function_p): Remove definition.
11692 * decl2.c (saved_inlines): Rename to ...
11693 (deferred_fns): ... this.
11694 (saved_inlines_used): Rename to ...
11695 (deferred_fns_used): ... this.
11696 (mark_inline_for_output): Rename to ...
11697 (defer_fn): ... this.
11698 (finish_file): Adjust accordingly.
11699 (init_decl2): Likewise.
11700 * lex.c (cons_up_default_function): Likewise.
11701 * pt.c (mark_decl_instantiated): Likewise.
11702 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
11703 circumstances.
11704 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
11705 * semantics.c (expand_body): Defer more functions.
11706
11707 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
11708
11709 * vec.cc: New file.
11710 * Make-lang.in (CXX_LIB2FUNCS): Add it.
11711 (vec.o): Build it.
11712 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11713 __cxa_vec_delete): Declare.
11714
11715 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
11716
11717 * rtti.c (dfs_class_hint_mark): New static function.
11718 (dfs_class_hint_unmark): New static function.
11719 (class_hint_flags): Use them.
11720
11721 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
11722
11723 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
11724
11725 2000-04-05 Mark Mitchell <mark@codesourcery.com>
11726
11727 * cp-tree.h (instantiate_decl): Change prototype.
11728 * decl2.c (mark_used): Adjust call.
11729 * optimize.c (inlinable_function_p): Adjust handling of templates.
11730 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
11731 (do_type_instantiation): Likewise.
11732 (instantiate_decl): Defer more templates.
11733 (instantiate_pending_templates): Adjust logic to handle inline
11734 friend functions.
11735
11736 * Makefile.in (GGC_H): New variable. Use it throughout in place
11737 of ggc.h.
11738
11739 * call.c: Don't include obstack.h. Include ggc.h.
11740 (obstack_chunk_alloc): Don't define.
11741 (obstack_chunk_free): Likewise.
11742 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
11743 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
11744 (pop_switch): Free it.
11745
11746 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
11747
11748 * dump.c (dequeue_and_dump): Don't try to print the bit_position
11749 if we don't have a DECL_FIELD_OFFSET.
11750
11751 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
11752
11753 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
11754 special_function_p.
11755
11756 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11757
11758 * cfns.gperf (hash, libc_name_p): Prototype.
11759
11760 * rtti.c (build_dynamic_cast_1): Constification.
11761
11762 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
11763
11764 * semantics.c (deferred_type_access_control): Prototype.
11765
11766 2000-04-04 Mark Mitchell <mark@codesourcery.com>
11767
11768 Correct many new ABI issues regarding vbase and vcall offset
11769 layout.
11770 * cp-tree.h (BINFO_VTABLE): Document.
11771 (struct lang_type): Tweak formatting.
11772 (BINFO_PRIMARY_BINFO): Add to documentation.
11773 (CLASSTYPE_VSIZE): Fix typo in comment.
11774 (CLASSTYPE_VBASECLASSES): Update documentation.
11775 (BINFO_VBASE_MARKED): Remove.
11776 (SET_BINFO_VBASE_MARKED): Likewise.
11777 (CLEAR_BINFO_VBASE_MARKED): Likewise.
11778 (BINFO_FIELDS_MARKED): Remove.
11779 (SET_BINFO_FIELDS_MARKED): Likewise.
11780 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
11781 (enum access_kind): New enumeration.
11782 (num_extra_vtbl_entries): Remove declaration.
11783 (size_extra_vtbl_entries): Likewise.
11784 (get_vtbl_decl_for_binfo): New function.
11785 (dfs_vbase_unmark): Remove declaration.
11786 (mark_primary_bases): Likewise.
11787 * class.c (SAME_FN): Remove.
11788 (struct vcall_offset_data_s): Move definition.
11789 (build_vbase_pointer): Use `build', not `build_binary_op', to
11790 access the vbase pointer under the new ABI.
11791 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
11792 (build_primary_vtable): Likewise.
11793 (dfs_mark_primary_bases): Move here from search.c.
11794 (mark_primary_bases): Likewise.
11795 (determine_primary_bases): Under the new ABI, don't make a base
11796 class a primary base just because we don't yet have any virtual
11797 functions.
11798 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
11799 (num_vfun_entries): Remove.
11800 (dfs_count_virtuals): Likewise.
11801 (num_extra_vtbl_entries): Likewise.
11802 (size_extra_vtbl_entries): Likewise.
11803 (layout_virtual_bases): Iterate in inheritance graph order under
11804 the new ABI.
11805 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
11806 indicate that a vfield is present.
11807 (init_class_processing): Initialize access_public_node, etc., from
11808 ak_public, etc.
11809 (get_vtbl_decl_for_binfo): New function.
11810 (dump_class_hierarchy_r): Likewise.
11811 (dump_class_hierarchy): Use it.
11812 (finish_vtbls): Build the vtbls in inheritance graph order.
11813 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11814 (initialize_vtable): Use get_vtbl_decl_for_binfo.
11815 (accumulate_vtbl_inits): Add comments explaining why a pre-order
11816 walk is required.
11817 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
11818 where the vptr points, even for primary vtables.
11819 (build_vtbl_initializer): Adjust handling of vbase and vcall
11820 offsets.
11821 (build_vcall_and_vbase_vtable_entries): New function.
11822 (dfs_build_vbase_offset_vtbl_entries): Remove.
11823 (build_vbase_offset_vtbl_entries): Reimplement.
11824 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
11825 were already handled in a primary base class vtable.
11826 (build_vcall_offset_vtbl_entries): Adjust.
11827 (build_rtti_vtbl_entries): Adjust.
11828 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
11829 * init.c (expand_virtual_init): Simplify.
11830 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
11831 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
11832 * search.c (BINFO_ACCESS): New macro.
11833 (SET_BINFO_ACCESS): Likewise.
11834 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
11835 (access_in_type): Likewise.
11836 (dfs_accessible_p): Likewise.
11837 (protected_accessible_p): Likewise.
11838 (lookup_fnfields_1): Adjust documentation.
11839 (dfs_mark_primary_bases): Move to class.c
11840 (mark_primary_bases): Likewise.
11841 (dfs_vbase_unmark): Remove.
11842 (virtual_context): Use BINFO_FOR_VBASE.
11843 (dfs_get_vbase_types): Simplify.
11844 (dfs_build_inheritance_graph_order): New function.
11845 (get_vbase_types): Use it.
11846 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
11847
11848 * tinfo.cc (get_vbase_offset): New function.
11849 (__vmi_class_type_info::do_find_public_src): Use it.
11850 (__vmi_class_type_info::do_dyncast): Likewise.
11851 (__vmi_class_type_info::do_upcast): Likewise.
11852
11853 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
11854
11855 * lang-specs.h: Pass -fno-show-column to the preprocessor.
11856
11857 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
11858
11859 * rtti.c (class_hint_flags): Rename flags.
11860 (class_initializer): Remove flags.
11861 (synthesize_tinfo_var): Combine offset and flags. Add flags
11862 for __vmi_class_type_info.
11863 (create_tinfo_types): Remove flags from __class_type_info and
11864 __si_class_type_info. Merge flags and offset from
11865 base_class_type_info.
11866 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
11867 (__base_class_info::is_virtual_p): Adjust.
11868 (__base_class_info::is_public_p): Adjust.
11869 (__base_class_info::offset): New accessor.
11870 (__class_type_info::details): Remove member.
11871 (__class_type_info::__class_type_info): Lose details.
11872 (__class_type_info::detail_masks): Remove.
11873 (__si_class_type_info::__si_class_type_info): Lose details.
11874 (__vmi_class_type_info::details): New member.
11875 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
11876 (__vmi_class_type_info::detail_masks): New member.
11877 * tinfo.cc (__class_type_info::do_upcast): Initialize result
11878 with unknown_details_mask.
11879 (__vmi_class_type_info::do_find_public_src): Adjust
11880 (__vmi_class_type_info::do_dyncast): Adjust.
11881 (__vmi_class_type_info::do_upcast): Set result details, if
11882 needed. Adjust.
11883 (__dynamic_cast): Temporarily #if out optimization.
11884
11885 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
11886
11887 * rtti.c (get_tinfo_decl): Mark used.
11888 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
11889 mark as dealt with, if we output it.
11890
11891 2000-03-28 Mark Mitchell <mark@codesourcery.com>
11892
11893 * class.c: Reorganize to put virtual function table initialization
11894 machinery at the end of the file.
11895
11896 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
11897
11898 * class.c (finish_struct): Use bitsize_zero_node.
11899 * pt.c (instantiate_class_template): Likewise.
11900
11901 2000-03-28 Mark Mitchell <mark@codesourcery.com>
11902
11903 Put RTTI entries at negative offsets in new ABI.
11904 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
11905 vbase offset at index -3, not -1.
11906 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
11907 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
11908 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
11909 (build_rtti_vtbl_entries): New function.
11910 (set_rtti_entry): Remove.
11911 (build_primary_vtable): Don't use it.
11912 (build_secondary_vtable): Likewise.
11913 (start_vtable): Remove.
11914 (first_vfun_index): New function.
11915 (set_vindex): Likewise.
11916 (add_virtual_function): Don't call start_vtable. Do call
11917 set_vindex.
11918 (set_primary_base): Rename parameter.
11919 (determine_primary_base): Likewise.
11920 (num_vfun_entries): Don't use skip_rtti_stuff.
11921 (num_extra_vtbl_entries): Include RTTI information.
11922 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
11923 (skip_rtti_stuff): Remove.
11924 (dfs_modify_vtables): Don't use it.
11925 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
11926 (layout_nonempty_base_or_field): Update size handling.
11927 (create_vtable_ptr): Tweak.
11928 (layout_class_type): Adjust parameter names.
11929 (finish_struct_1): Simplify.
11930 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
11931 (skip_rtti_stuff): Remove.
11932 (first_vfun_index): New function.
11933 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11934 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
11935 (marked_vtable_pathp): Declare.
11936 (unmarked_vtable_pathp): Likewise.
11937 * error.c (dump_expr): Use first_vfun_index to calculate vtable
11938 offsets.
11939 * rtti.c (build_headof): Look for RTTI at negative offsets.
11940 (get_tinfo_decl_dynamic): Likewise.
11941 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
11942 here.
11943 (create_pseudo_type_info): Do it here instead. Adjust so that
11944 vptr points at first virtual function.
11945 * search.c (marked_vtable_pathp): Make it global.
11946 (unmarked_vtable_pathp): Likewise.
11947 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11948 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11949 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
11950 (get_pure_virtuals): Likewise.
11951 (expand_upcast_fixups): Likewise.
11952 * tree.c (debug_binfo): Likewise.
11953 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
11954 negative offset.
11955
11956 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11957
11958 * class.c (check_field_decl): Fix typo.
11959 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
11960 (check_methods): Likewise.
11961 (check_field_decls): Likewise.
11962 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
11963 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
11964 Use DECL_RESULT_FLD, not DECL_RESULT.
11965 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
11966 * lex.c (identifier_type): Likewise.
11967 * pt.c (determine_specialization, lookup_template_class): Likewise.
11968 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
11969 (resolve_overloaded_unification, more_specialized): Likewise.
11970 * semantics.c (finish_member_declaration): Likewise.
11971 * typeck.c (build_x_function_call): Likewise.
11972
11973 2000-03-26 Mark Mitchell <mark@codesourcery.com>
11974
11975 * class.c (layout_empty_base): Handle empty bases with non-byte
11976 alignment.
11977 (build_base_field): Likewise.
11978 (layout_virtual_bases): Likewise.
11979
11980 * class.c (finish_struct_1): Fix typo in this change:
11981
11982 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11983
11984 2000-03-25 Mark Mitchell <mark@codesourcery.com>
11985
11986 * decl.c (grokdeclarator): Count partial specializations when
11987 keeping track of how many template classes have been seen.
11988
11989 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
11990
11991 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11992
11993 * class.c (build_vbase_pointer_fields): layout_field now place_field.
11994 (get_vfield_offset): Use byte_position.
11995 (set_rtti_entry): Set OFFSET to ssizetype zero.
11996 (get_binfo_offset_as_int): Deleted.
11997 (dfs_record_base_offsets): Use tree_low_cst.
11998 (dfs_search_base_offsets): Likewise.
11999 (layout_nonempty_base_or_field): Reflect changes in RLI format
12000 and call byte_position.
12001 (layout_empty_base): Convert offset to ssizetype.
12002 (build_base_field): use rli_size_unit_so_far.
12003 (dfs_propagate_binfo_offsets): Do computation in proper type.
12004 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
12005 (layout_class_type): Reflect changes in RLI names and fields.
12006 (finish_struct_1): Set DECL_FIELD_OFFSET.
12007 * dump.c (dequeue_and_dump): Call bit_position.
12008 * expr.c (cplus_expand_constant): Use byte_position.
12009 * rtti.c (expand_class_desc): Use bitsize_one_node.
12010 * typeck.c (build_component_addr): Use byte_position and don't
12011 special case for zero offset.
12012
12013 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
12014
12015 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
12016
12017 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
12018 tinfo object.
12019 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
12020 vtable.
12021
12022 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12023
12024 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
12025 DECL_P macros.
12026 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
12027 make_typename_type, check_initializer, cp_finish_decl,
12028 xref_tag): Likewise.
12029 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
12030 decl_namespace, arg_assoc_template_arg, arg_assoc,
12031 validate_nonmember_using_decl, do_class_using_decl): Likewise.
12032 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
12033 args_to_string): Likewise.
12034 * friend.c (is_friend): Likewise.
12035 * lex.c (note_got_semicolon, note_list_got_semicolon,
12036 is_global): Likewise.
12037 * method.c (build_overload_nested_name, build_overload_value,
12038 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
12039 * parse.y (typename_sub, typename_sub1): Likewise.
12040 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
12041 process_partial_specialization, convert_template_argument,
12042 template_args_equal, add_pending_template, lookup_template_class,
12043 for_each_template_parm_r, maybe_fold_nontype_arg,
12044 tsubst, instantiate_template, type_unification_real, unify,
12045 instantiate_pending_templates, set_mangled_name_for_template_decl):
12046 Likewise.
12047 * repo.c (repo_get_id, repo_template_used): Likewise.
12048 * search.c (lookup_field_1): Likewise.
12049 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
12050 * xref.c (classname): Likewise.
12051
12052 2000-03-22 Mark Mitchell <mark@codesourcery.com>
12053
12054 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
12055 (CANONICAL_BINFO): New macro.
12056 (BINFO_NEW_VTABLE_MARKED): Use it.
12057 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
12058 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
12059 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
12060 not TREE_TYPE.
12061 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12062 (build_secondary_vtable): Likewise.
12063 (dfs_finish_vtbls): Likewise.
12064 (dfs_accumulate_vtbl_inits): Likewise.
12065 (accumulate_vtbl_inits): New function.
12066 (finish_vtbls): Make sure that virtual bases come after
12067 non-virtual bases in the vtable group.
12068 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
12069 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12070 * search.c (struct vbase_info): Move definition.
12071 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12072 (unmarked_new_vtable_p): Likewise.
12073 (dfs_mark_vtable_path): Remove.
12074 (dfs_mark_new_vtable): Remove.
12075 (dfs_unmark_new_vtable): Likewise.
12076 (dfs_clear_search_slot): Likewise.
12077 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12078 (dfs_clear_vbase_slots): Likewise.
12079 (init_vbase_pointers): LIkewise.
12080
12081 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
12082
12083 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
12084 SIZETYPE to a non-SIZETYPE.
12085
12086 2000-03-21 Mark Mitchell <mark@codesourcery.com>
12087
12088 * class.c (layout_virtual_bases): Adjust names in conditionally
12089 compiled code.
12090
12091 * class.c (record_base_offsets): New function.
12092 (layout_conflict_p): Likewise.
12093 (layout_nonempty_base_or_field): Use it.
12094 (layout_empty_base): New function.
12095 (build_base_field): Use it.
12096 (build_base_fields): Update comment.
12097 (layout_virtual_bases): Fold in a little code form
12098 layout_basetypes. Use layout_empty_base.
12099 (layout_basetypes): Remove.
12100 (end_of_class): New function.
12101 (layout_class_type): Use it. Adjust.
12102
12103 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
12104 (fntype_p): Remove.
12105 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
12106 comment.
12107 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12108 * typeck.c (fntype_p): Remove.
12109
12110 * cp-tree.h (TI_SPEC_INFO): Remove.
12111 (CLASSTYPE_TI_SPEC_INFO): Likewise.
12112 * pt.c (process_partial_specialization): Likewise.
12113
12114 * class.c (build_base_field): Fix thinko in computation of binfo
12115 offsets.
12116
12117 * tree.c (mark_local_for_remap_p): Mark variables declared in
12118 TARGET_EXPRs as well.
12119
12120 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12121
12122 * typeck.c (require_complete_type, complete_type,
12123 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
12124 build_array_ref, convert_arguments, pointer_diff,
12125 build_x_unary_op, build_unary_op, build_c_cast,
12126 build_modify_expr): Use COMPLETE_TYPE_P etc.
12127 * call.c (is_complete, convert_like_real,
12128 build_new_method_call): Likewise.
12129 * class.c (build_vbase_pointer_fields, check_bases,
12130 build_base_field, finish_struct_1, pushclass): Likewise.
12131 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
12132 * decl.c (maybe_process_template_type_declaration, pushtag,
12133 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
12134 layout_var_decl, check_initializer, cp_finish_decl,
12135 grokdeclarator, require_complete_types_for_parms,
12136 grok_op_properties, xref_tag, xref_basetypes,
12137 check_function_type): Likewise.
12138 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
12139 * friend.c (do_friend): Likewise.
12140 * init.c (build_offset_ref): Likewise.
12141 * parse.y (structsp): Likewise.
12142 * pt.c (maybe_process_partial_specialization,
12143 tsubst_friend_function, instantiate_class_template, tsubst,
12144 do_type_instantiation, instantiate_pending_templates): Likewise.
12145 * repo.c (repo_get_id): Likewise.
12146 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
12147 synthesize_tinfo_var, emit_support_tinfos): Likewise.
12148 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
12149 * semantics.c (begin_class_definition): Likewise.
12150 * tree.c (build_cplus_method_type): Likewise.
12151 * typeck2.c (digest_init, build_functional_cast,
12152 add_exception_specifier): Likewise.
12153 * parse.h, parse.c: Regenerated.
12154
12155 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12156
12157 * inc/cxxabi.h: New header file. Define new-abi entry points.
12158 (__pointer_type_info::target): Rename member to ...
12159 (__pointer_type_info::type): ... here.
12160 (__base_class_info::type): Rename member to ...
12161 (__base_class_info::base): ... here.
12162 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
12163 * cp-tree.h (CPTI_ABI): New global tree enumeration.
12164 (abi_node): New global tree node.
12165 * decl.c (abi_node): Document.
12166 (init_decl_processing): Initialize abi_node.
12167 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
12168 (get_vmi_pseudo_type_info): Likewise.
12169 (create_tinfo_types): Likewise.
12170 (emit_support_tinfos): Likewise.
12171 * tinfo.h (cxxabi.h): Include for new-abi.
12172 Move rtti class definitions to new header file.
12173 * tinfo.cc (abi): Use the namespace.
12174 (std): Move new abi rtti classes from here ...
12175 (__cxxabiv1): ... to here.
12176 * tinfo2.cc (cxxabi.h): Include for new-abi.
12177 Move rtti class definitions to new header file.
12178 (std): Move new abi rtti classes from here ...
12179 (__cxxabiv1): ... to here.
12180 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
12181 namespace.
12182
12183 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
12184 Jason Merrill <jason@casey.cygnus.com>
12185
12186 * method.c (build_overload_int): Use host_integerp.
12187
12188 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12189
12190 * init.c (build_offset_ref): Handle the case of a templated member
12191 function.
12192
12193 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12194
12195 * except.c (expand_exception_blocks): Clear catch_clauses_last.
12196
12197 2000-03-18 Mark Mitchell <mark@codesourcery.com>
12198
12199 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
12200 * class.c (check_bitfield_decl): Turn illegal bitfields into
12201 non-bitfields.
12202 (dfs_propagate_binfo_offsets): Adjust for new size_binop
12203 semantics.
12204 (dfs_offset_for_unshared_vbases): Likewise.
12205 * cvt.c (cp_convert_to_pointer): Convert NULL to a
12206 pointer-to-member correctly under the new ABI.
12207 * expr.c (cplus_expand_constant): Don't use cp_convert when
12208 turning an offset into a pointer-to-member.
12209 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
12210 when dereferencing them under the new ABI.
12211 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
12212 of pointers-to-members under the new ABI.
12213
12214 * class.c (check_bitfield_decl): Remove restriction on really long
12215 bitfields.
12216 (layout_class_type): Implement new ABI handling of bitfields
12217 longer than their types.
12218
12219 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12220
12221 * parse.y (extdefs): Call ggc_collect.
12222 * parse.c: Regenerated.
12223
12224 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
12225
12226 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
12227 (note_name_declared_in_class): Use OVL_CURRENT to get at a
12228 potential overload.
12229
12230 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12231
12232 * class.c (build_vbase_path): Use integer_zerop.
12233 (build_vtable_entry): Use tree_low_cst.
12234 (get_vfield_offset): Use bit_position.
12235 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
12236 Use tree_low_cst.
12237 (check_bitfield_decl): Set DECL_SIZE using convert.
12238 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
12239 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
12240 Use tree_low_cst.
12241 (finish_struct_1): Use bit_position.
12242 (dump_class_hierarchy): Use tree_low_cst.
12243 * cp-tree.h (min_precision): Add declaration.
12244 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
12245 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
12246 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
12247 * expr.c (cplus_expand_constant): Use bit_position.
12248 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
12249 * rtti.c (get_base_offset): Use bit_position.
12250 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
12251 host_integerp, and tree_low_cst.
12252 (pointer_int_sum): Use integer_zerop.
12253 (build_component_addr): Use bit_position.
12254
12255 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
12256
12257 * typeck.c (require_complete_type): Don't assume size_zero_node.
12258 (complete_type_or_else): Likewise.
12259
12260 2000-03-16 Steven Grady <grady@digitaldeck.com>
12261 Jason Merrill <jason@casey.cygnus.com>
12262
12263 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
12264
12265 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
12266
12267 * decl2.c (grokfield): Bail out if type is error_mark_node.
12268
12269 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12270
12271 * tinfo2.cc (__ptr_to_member_data): Rename to ...
12272 (__pointer_to_member_data): ... here. Adjust.
12273 * rtti.c (create_tinfo_types): Adjust.
12274
12275 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12276
12277 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
12278 * decl.c (ref_desc_type_node): Undocument.
12279 * rtti.c (ptr_ref_initializer): Rename to ...
12280 (ptr_initializer): ... here. Adjust comments.
12281 (ptmd_initializer): Fix comment thinko.
12282 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
12283 (create_tinfo_types): Remove ref_desc_type_node init.
12284 * tinfo2.cc (__reference_type_info): Remove.
12285
12286 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
12287
12288 * decl.c (cp_finish_decl): Remove obsolete comment.
12289
12290 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
12291
12292 2000-03-14 Mark Mitchell <mark@codesourcery.com>
12293
12294 * cp-tree.h: Tweak documentation.
12295 * class.c (build_vbase_pointer_fields): Layout the fields, too.
12296 (avoid_overlap): Remove.
12297 (get_binfo_offset_as_int): New function.
12298 (dfs_serach_base_offsets): Likewise.
12299 (layout_nonempty_base_or_field): Likewise.
12300 (build_base_field): Layout fields here. Avoid placing two objects
12301 of the same type at the same address, under the new ABI.
12302 (build_base_fields): Adjust accordingly.
12303 (create_vtable_ptr): Return the new field, but don't attach it to
12304 TYPE_FIELDS.
12305 (remove_base_field): Remove.
12306 (remove_base_fields): Remove.
12307 (layout_basetypes): Adjust accordingly.
12308 (layout_class_type): Call layout_field for each field, rather than
12309 just making a wholesale call to layout_type.
12310
12311 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
12312
12313 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
12314
12315 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
12316
12317 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
12318
12319 * except.c (dtor_nothrow): New fn.
12320 (do_pop_exception): Use it. Take type parm.
12321 (push_eh_cleanup): Take type parm.
12322 (expand_start_catch_block): Pass it.
12323 (build_eh_type_type_ref): Accept null type.
12324
12325 2000-03-12 Mark Mitchell <mark@codesourcery.com>
12326
12327 * cp-tree.h (revert_static_member_fn): Change prototype.
12328 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
12329 (grok_op_properties): Likewise.
12330 (start_function): Likewise.
12331 (revert_static_member_fn): Simplify.
12332 * pt.c (check_explicit_specialization): Adjust call to
12333 revert_static_member_fn.
12334
12335 2000-03-11 Mark Mitchell <mark@codesourcery.com>
12336
12337 * cp-tree.h (scope_kind): New type.
12338 (tmpl_spec_kind): Likewise.
12339 (declare_pseudo_global_level): Remove.
12340 (pseudo_global_level_p): Rename to template_parm_scope_p.
12341 (pushlevel): Remove declaration.
12342 (begin_scope): New function.
12343 (finish_scope): Likewise.
12344 (current_tmpl_spec_kind): Likewise.
12345 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
12346 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
12347 Add template_spec_p.
12348 (toplevel_bindings_p): Adjust.
12349 (declare_pseudo_global_level): Remove.
12350 (pseudo_global_level_p): Rename to template_parm_scope_p.
12351 (current_tmpl_spec_kind): New function.
12352 (begin_scope): Likewise.
12353 (finish_scope): Likewise.
12354 (maybe_push_to_top_level): Adjust.
12355 (maybe_process_template_type_declaration): Likewise.
12356 (pushtag): Likewise.
12357 (pushdecl_nonclass_level): Likewise.
12358 (lookup_tag): Likewise.
12359 (grokfndecl): Handle member template specializations. Share
12360 constructor and non-constructor code.
12361 * decl2.c (check_classfn): Handle member template specializations.
12362 * pt.c (begin_template_parm_list): Use begin_scope.
12363 (begin_specialization): Likewise.
12364 (end_specialization): Likewise.
12365 (check_explicit_specialization): Use current_tmpl_spec_kind.
12366 Handle member template specializations.
12367 (end_template_decl): Use finish_scope. Remove call to
12368 get_pending_sizes.
12369 (push_template_decl_real): Remove bogus error message.
12370 (tsubst_decl): Fix typo in code contained in comment.
12371 (instantiate_template): Handle member template specializations.
12372 (most_general_template): Likewise.
12373
12374 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
12375
12376 * lex.c (whitespace_cr): Compress consecutive calls to warning().
12377 (do_identifier): Ditto for error().
12378
12379 * pt.c (convert_nontype_argument): Ditto for cp_error().
12380 (convert_template_argument): Ditto for cp_pedwarn().
12381
12382 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
12383
12384 * exception.cc (__check_null_eh_spec): New fn.
12385 * except.c (expand_end_eh_spec): Call it if the spec is throw().
12386
12387 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
12388
12389 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
12390 * except.c (expand_end_eh_spec): Add the return type.
12391 * rtti.c (throw_bad_cast): Add the parmtypes.
12392 (throw_bad_typeid): Likewise.
12393
12394 * semantics.c (expand_stmt): Only leave out rtl for unused
12395 artificials, and set DECL_IGNORED_P on them as well.
12396 * decl.c (wrapup_globals_for_namespace): Likewise.
12397
12398 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
12399
12400 * decl.c (maybe_commonize_var): Skip all artificial decls.
12401 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
12402
12403 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
12404
12405 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
12406 * cp-tree.h: Declare flag_enforce_eh_specs.
12407 * decl.c (store_parm_decls, finish_function): Check it.
12408
12409 C library functions don't throw.
12410 * Makefile.in (cfns.h): New target.
12411 (except.o): Depend on it.
12412 * Make-lang.in (cc1plus): Depend on cfns.gperf.
12413 * cfns.gperf: New file.
12414 * cfns.h: Generated.
12415 * except.c: Include it.
12416 (nothrow_libfn_p): New fn.
12417 * decl.c (grokfndecl): Use it.
12418 * cp-tree.h: Declare it.
12419
12420 * decl.c (push_overloaded_decl_1, auto_function,
12421 define_function): Lose.
12422 (build_library_fn_1): New static fn.
12423 (builtin_function): Use it.
12424 (get_atexit_node): Use build_library_fn_ptr.
12425 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
12426 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
12427 push_void_library_fn, push_throw_library_fn): New fns.
12428 * cp-tree.h: Declare them.
12429 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
12430 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
12431 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
12432 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
12433 * rtti.c (build_runtime_decl): Lose.
12434 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
12435 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
12436 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
12437
12438 * call.c (build_call): Remove result_type parm.
12439 Call mark_used on unused artificial fns.
12440 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
12441
12442 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
12443
12444 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
12445 appropriate.
12446 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
12447 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
12448 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
12449 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
12450 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
12451 expand_generic_desc): Likewise.
12452
12453 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12454
12455 * exception.cc (__cp_pop_exception): Cleanup the original object.
12456
12457 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12458
12459 * decl.c (grok_op_properties): Merge conversion to void warning
12460 with other silly op warnings.
12461
12462 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
12463
12464 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
12465 array CONSTRUCTOR elements. Don't use expr_tree_cons.
12466
12467 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12468
12469 * decl.c (cp_make_fname_decl): New function.
12470 (wrapup_globals_for_namespace): Don't emit unused static vars.
12471 (init_decl_processing): Remove comment about use of
12472 array_domain_type. Set make_fname_decl.
12473 (cp_finish_decl): Remove __FUNCTION__ nadgering.
12474 * semantics.c (begin_compound_stmt): Remove
12475 current_function_name_declared flagging.
12476 (expand_stmt): Don't emit unused local statics.
12477 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
12478 specially.
12479
12480 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
12481
12482 * typeck.c (convert_for_assignment): Don't look at array
12483 initializer.
12484 * call.c (convert_like_real): Likewise.
12485
12486 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
12487
12488 Add initial support for '\uNNNN' specifier.
12489 * lex.c (read_ucs): New fn.
12490 (readescape, skip_white_space): Call it.
12491 (is_extended_char, is_extended_char_1): New fns.
12492 (utf8_extend_token): New fn, #if 0'd out.
12493 (real_yylex): Treat extended chars like letters.
12494
12495 * search.c (note_debug_info_needed): Walk the bases even if we
12496 weren't deferring the type itself.
12497
12498 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12499
12500 * decl2.c (finish_objects): Constify a char*.
12501
12502 * method.c (emit_thunk): Likewise.
12503
12504 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
12505
12506 * typeck.c (dubious_conversion_warnings): Look through
12507 REFERENCE_TYPE.
12508
12509 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12510
12511 * class.c (dfs_modify_vtables): I is now unsigned.
12512 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
12513 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
12514 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
12515 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12516 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
12517 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
12518 Call integer_all_onesp.
12519 * typeck2.c (process_init_constructor): Use compare_tree_int.
12520
12521 * lang-specs.h (as): Don't call if -syntax-only.
12522
12523 2000-03-06 Mark Mitchell <mark@codesourcery.com>
12524
12525 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
12526 RTL_EXPR_HAS_NO_SCOPE after all.
12527
12528 2000-03-05 Mark Mitchell <mark@codesourcery.com>
12529
12530 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
12531 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
12532 RTL_EXPR_HAS_NO_SCOPE.
12533
12534 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
12535 later.
12536
12537 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
12538
12539 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
12540
12541 * call.c (convert_like): Macrofy.
12542 (convert_like_with_context): New macro.
12543 (convert_like_real): Renamed from convert_like. Add calling
12544 context parameters, for diagnostics. Add recursive flag. Call
12545 dubious_conversion_warnings for outer conversion.
12546 (build_user_type_conversion): Use convert_like_with_context.
12547 (build_over_call): Likewise. Don't warn about dubious
12548 conversions here. Adjust convert_default_arg calls.
12549 (convert_default_arg): Add context parameters for diagnostics.
12550 Pass through to convert_like_with_context.
12551 * cp-tree.h (convert_default_arg): Add context parameters.
12552 (dubious_conversion_warnings): Prototype new function.
12553 * typeck.c (convert_arguments): Adjust convert_default_arg call.
12554 (dubious_conversion_warnings): New function, broken
12555 out of convert_for_assignment.
12556 (convert_for_assignment): Adjust.
12557
12558 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
12559
12560 * decl2.c (key_method): Break out from...
12561 (import_export_vtable, import_export_class): ...here.
12562
12563 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
12564 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
12565
12566 * search.c (note_debug_info_needed, dfs_debug_mark,
12567 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
12568 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
12569
12570 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
12571
12572 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
12573 typos.
12574
12575 2000-03-02 Mark Mitchell <mark@codesourcery.com>
12576
12577 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
12578 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
12579 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
12580 (lang_type): Split gets_new into has_new and has_array_new.
12581 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12582 (TYPE_GETS_NEW): Split into ...
12583 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
12584 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
12585 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
12586 (build_op_new_call): Don't declare.
12587 (build_new_1): Likewise.
12588 * call.c (build_op_new_call): Remove.
12589 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12590 instead of TYPE_NEEDS_DESTRUCTOR.
12591 (finish_struct_bits): Likewise.
12592 (add_implicitly_declared_members): Likewise.
12593 (check_field_decl): Likewise.
12594 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
12595 correctly under the new ABI.
12596 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12597 instead of TYPE_NEEDS_DESTRUCTOR.
12598 (initialize_local_var): Likewise.
12599 (destroy_local_var): Likewise.
12600 (cp_finish_decl): Likewise.
12601 (register_dtor_fn): Likewise.
12602 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
12603 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
12604 TYPE_VEC_DELETE_TAKES_SIZE here.
12605 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
12606 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
12607 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12608 (finish_destructor_body): Likewise.
12609 (maybe_build_cleanup_1): Likewise.
12610 * decl2.c (do_static_destruction): Likewise.
12611 * init.c (build_new_1): Make it static.
12612 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12613 (expand_cleanup_for_base): Likewise.
12614 (get_cookie_size): New function.
12615 (build_new_1): Handle array-new cookies correctly under the new
12616 ABI.
12617 (build_vec_delete_1): Likewise.
12618 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12619 (build_delete): Likewise.
12620 (build_vec_delete): Handle array-new cookies correctly under the new
12621 ABI.
12622 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12623 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
12624 TYPE_HAS_ARRAY_NEW_OPERATOR.
12625 * ptree.c (print_lang_type): Check them.
12626 * search.c (context_for_name_lookup): Fix typo in comment.
12627 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12628 * tree.c (break_out_cleanups): Likewise.
12629 (build_cplus_array_test_1): Likewise.
12630 (cp_build_qualified_type_real): Likewise.
12631 * typeck.c (complete_type): Likewise.
12632
12633 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
12634 the command-line, not the end.
12635
12636 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
12637
12638 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
12639
12640 2000-03-02 Tom Tromey <tromey@cygnus.com>
12641
12642 * cp-tree.h (build_java_class_ref): Declare.
12643 * init.c (build_java_class_ref): No longer static.
12644 * except.c (expand_throw): Generate a Java-style `throw' if the
12645 thrown object is a "Java" object.
12646 (initialize_handler_parm): Generate a Java-style lookup of
12647 exception info if the caught object is a "Java" object.
12648 (catch_language, catch_language_init): New globals.
12649 (decl_is_java_type): New function.
12650 (expand_start_catch_block): Don't call push_eh_info() or
12651 push_eh_cleanup() when handling a Java-style "catch". Pass Java
12652 class reference to build_catch_block.
12653
12654 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12655
12656 * typeck.c (comptypes): Treat sizetype like its language equivalent.
12657
12658 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
12659
12660 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
12661 to merge reference/pointer code and fix incorrect warnings.
12662
12663 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
12664
12665 * search.c (protected_accessible_p): Use context_for_name_lookup.
12666
12667 * init.c (construct_virtual_bases): Fix thinko.
12668 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
12669
12670 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
12671
12672 * decl.c (current_function_decl): Move to toplev.c.
12673
12674 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
12675
12676 * pt.c (fn_type_unification): Unify return type, whenever
12677 provided.
12678 (get_bindings_real): Only pass return type when necessary.
12679 Remove explicit return type check.
12680 * class.c (resolve_address_of_overloaded_function): Pass desired
12681 return type to fn_type_unification.
12682
12683 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12684
12685 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
12686 DECL_FIELD_SIZE.
12687 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
12688 DECL_FIELD_SIZE.
12689 * rtti.c (expand_class_desc): Likewise.
12690 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
12691 (THUNK_VCALL_OFFSET): Likewise.
12692 (THUNK_DELTA): Reflect changes in ../tree.h.
12693
12694 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
12695
12696 * search.c (protected_accessible_p): Also allow the access if
12697 the member is public in DERIVED. Lose TYPE parm.
12698 (friend_accessible_p): Lose TYPE parm.
12699 (accessible_p): Adjust.
12700
12701 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12702
12703 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
12704 on things that are not sizes; ssize_binop deleted.
12705 Call size_diffop when appropriate.
12706 (dfs_build_vcall_offset_vtbl_entries): Likewise.
12707 (build_primary_vtable, build_secondary_vtable): Likewise.
12708 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
12709 Variable I is HOST_WIDE_INT.
12710 (get_vfield_offset): Pass proper types to size_binop.
12711 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
12712 (finish_struct_1): Likewise.
12713 (skip_rtti_stuff): Arg N is now pointer to signed.
12714 (layout_class_type): Use size_zero_node.
12715 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
12716 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
12717 * decl.c (complete_arry_type): Pass proper types to size_binop.
12718 (xref_basetypes): BINFO_OFFSET is sizetype.
12719 * error.c (dump_expr): Don't use size_binop non-sizes.
12720 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
12721 * init.c (construct_virtual_bases): Fix type error.
12722 (build_vec_delete_1): Pass proper type to size_binop and don't
12723 fold result.
12724 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
12725 * rtti.c (get_base_offset): Pass proper type to size_binop.
12726 * search.c (dfs_find_vbases): Fix type error.
12727 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
12728 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
12729 * tree.c (debug_binfo): Variable N is signed.
12730 Use HOST_WIDE_INT_PRINT_DEC.
12731 * typeck.c (comptypes): sizetype is same as equivalent integer type.
12732 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
12733 size_one_node and size_zero_node.
12734 (c_alignof): Use size_one_node.
12735 (build_component_addr): Pass proper types to size_binop.
12736 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
12737
12738 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
12739
12740 Implement class scope using-declarations for functions.
12741 * class.c (handle_using_decl): Call add_method for used functions.
12742 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
12743 (add_method): Used functions are hidden by local functions.
12744 (check_bases_and_members): Handle using-decls before finalizing
12745 CLASSTYPE_METHOD_VEC.
12746 * call.c (add_function_candidate): Add ctype parm; if non-zero,
12747 override the type of 'this' accordingly.
12748 (add_template_candidate, add_template_candidate_real): Add ctype parm.
12749 (convert_class_to_reference, build_user_type_conversion_1,
12750 build_new_function_call, build_object_call, build_new_op,
12751 build_new_method_call): Pass ctype parm.
12752
12753 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
12754 the baselink.
12755 * call.c (convert_class_to_reference, build_user_type_conversion_1,
12756 build_new_function_call, build_object_call, build_new_op,
12757 build_new_method_call, build_op_delete_call): Don't get basetype_path
12758 from a baselink.
12759 * typeck.c (build_component_ref): Likewise.
12760 * init.c (build_offset_ref): Likewise.
12761 (resolve_offset_ref): Don't call enforce_access.
12762 Call build_scoped_ref.
12763 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
12764 would cause an error or if -pedantic.
12765 * class.c (alter_access): Lose binfo parm.
12766
12767 2000-02-26 Mark Mitchell <mark@codesourcery.com>
12768
12769 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
12770 types.
12771
12772 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
12773
12774 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
12775 pseudo_type_info creation into the std namespace
12776
12777 2000-02-26 Mark Mitchell <mark@codesourcery.com>
12778
12779 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
12780 (import_export_class): Remove declaration.
12781 * decl2.c (import_export_class): Make it static.
12782 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
12783 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
12784 EXPR_WITH_FILE_LOCATION.
12785 * lex.c (check_newline): Tweak filename/lineno setting.
12786 * semantics.c (begin_while_stmt): Fix typo in comment.
12787
12788 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12789
12790 * lang-options.h (-fmessage-length=): Add missing option.
12791
12792 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
12793
12794 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
12795
12796 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
12797
12798 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
12799
12800 * optimize.c (expand_call_inline): Emit the return label before
12801 evaluating the return value.
12802
12803 2000-02-24 Mark Mitchell <mark@codesourcery.com>
12804
12805 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
12806 than duplicating functionality here.
12807 * optimize.c: Include input.h.
12808 (expand_call_inline): Use push_srcloc and pop_srcloc.
12809 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
12810 * parse.c: Regenerated.
12811 * Makefile.in (lex.o): Depend on input.h.
12812 (optimize.o): Likewise.
12813
12814 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
12815
12816 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
12817 function type, rather than ICE.
12818
12819 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
12820
12821 * decl.c (grokdeclarator): Call decl_type_access_control.
12822 * parse.y (parse_end_decl): Don't call decl_type_access_control if
12823 decl is null.
12824
12825 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
12826
12827 * decl.c (decls_match): Remove obsolete static member nadgering.
12828
12829 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12830
12831 * decl.c (grokdeclarator): Change ANSI to ISO.
12832 * lex.c (consume_string, readescape, do_identifier): Likewise.
12833 (parse_float, real_yylex): Likewise.
12834 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
12835 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
12836 new_type_id, maybe_label_decls, simple_stmt,
12837 for.init.statement): Likewise.
12838 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
12839 * semantics.c (finish_named_return_value): Likewise.
12840 * parse.c: Regenerate.
12841
12842 2000-02-21 Mark Mitchell <mark@codesourcery.com>
12843
12844 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
12845 (CPTI_CLASS_STAR_TYPE): Remove.
12846 (vtable_index_type): Likewise.
12847 (class_star_type_node): Remove.
12848 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
12849 (build_binary_op_nodefault): Remove.
12850 * call.c (build_new_op): Use build_binary_op instead of
12851 build_binary_op_nodefault.
12852 * decl.c (init_decl_processing): Remove class_star_type_node
12853 initialization. Make delta_type_node ptrdiff_type_node under the
12854 new ABI. Initialize vtable_index_type.
12855 (build_ptrmemfunc_type): Build different structures for the new
12856 ABI.
12857 (build_enumerator): Use build_binary_op instead of
12858 build_binary_op_nodefault.
12859 * method.c (build_overload_value): Mangle pointers-to-members
12860 appropriately under the new ABI.
12861 * typeck.c (build_array_ref): Use build_binary_op instead of
12862 build_binary_op_nodefault.
12863 (get_member_function_from_ptrfunc): Adjust for the new ABI.
12864 (build_binary_op_nodefault): Rename to ...
12865 (build_binary_op): ... this. Remove old version. Adjust for
12866 pointer-to-member comparisons under the new ABI.
12867 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
12868 (build_ptrmemfunc): Adjust for the new ABI.
12869 (expand_ptrmemfunc_cst): Likewise.
12870 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
12871 (pfn_from_ptrmemfunc): Adjust for the new ABI.
12872
12873 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
12874
12875 * call.c (build_object_call): Compress consecutive calls to
12876 cp_error.
12877 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
12878 (build_op_delete_call): Adjust message formatting.
12879
12880 * class.c (check_bases): Compress consecutive calls to
12881 cp_pedwarn.
12882 (finish_struct_anon): Say 'ISO C++'.
12883
12884 * decl.c (start_decl): Same here.
12885 (grok_reference_init): Likewise.
12886 (grokfndecl): Correct message formatting.
12887 (grokfndecl): Improve diagnostic.
12888 (check_static_variable_definition): Likewise. Say 'ISO C++'
12889 (compute_array_index_type): Say 'ISO C++'
12890 (create_array_type_for_decl): Compress consecutive calls to
12891 cp_error.
12892 (grokdeclarator): Say 'ISO C++'
12893 (grok_op_properties): Likewise.
12894
12895 * decl2.c (delete_sanity): Clairify diagnostic.
12896 (check_member_template): Same here.
12897 (grok_function_init): Use consistent terminology.
12898
12899 * expr.c (do_case): Say 'ISO C++'
12900
12901 * friend.c (do_friend): Compress consecutive calls to warning.
12902
12903 2000-02-20 Mark Mitchell <mark@codesourcery.com>
12904
12905 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
12906 * class.c (build_secondary_vtable): Reorganize. Don't create a
12907 new vtable under the new ABI.
12908 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
12909 computing the size.
12910 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
12911 the initializing elements.
12912 (initialize_vtable): New function.
12913 (dfs_finish_vtbls): Use it.
12914 (dfs_accumulate_vtbl_inits): New function.
12915 (finish_vtbls): Merge primary and secondary vtables under the new
12916 ABI.
12917 (finish_struct_1): Remove redundant call to layout_vtable_decl.
12918 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
12919 aren't VAR_DECLs.
12920
12921 * class.c (build_vtable): New function, split out from ...
12922 (get_vtable_decl): ... here, and ...
12923 (build_secondary_vtable): ... here.
12924
12925 * pt.c (tsubst_decl): Fix formatting.
12926
12927 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12928
12929 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
12930 (avoid_overlap, build_base_field): Likewise.
12931 (build_base_field, build_base_fields, is_empty_class):
12932 Test DECL_SIZE with integer_zero.
12933 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
12934 * cp-tree.h (struct lang_type): New field size_unit.
12935 (CLASSTYPE_SIZE_UNIT): New macro.
12936 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
12937 (cp_finish_decl): Delete -Wlarger-than processing.
12938 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
12939 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
12940 * tree.c (make_binfo): binfo vector is one entry longer.
12941 (walk_tree): Walk DECL_SIZE_UNIT.
12942
12943 2000-02-19 Mark Mitchell <mark@codesourcery.com>
12944
12945 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
12946 comment.
12947 (build_vtable_entry): Don't assume all vtable entries are
12948 functions.
12949 (build_vtbl_initializer): Adjust accordingly.
12950 (get_vtable_decl): Fix formatting.
12951
12952 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
12953
12954 * semantics.c (deferred_type_access_control): Walk the entire
12955 type_lookups list.
12956 (save_type_access_control): Rename from
12957 initial_deferred_type_access_control. Just remember the value.
12958 (decl_type_access_control): New fn.
12959 (begin_function_definition): Use deferred_type_access_control, after
12960 we've started the function. Set type_lookups to error_mark_node.
12961 * parse.y (frob_specs, fn.def1): Adjust.
12962 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
12963 (parse_end_decl, parse_bitfield0, parse_method): New fns.
12964 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
12965 (after_type_component_declarator0): Likewise.
12966 (after_type_component_declarator): Likewise.
12967 (notype_component_declarator): Likewise.
12968 * cp-tree.h: Adjust.
12969
12970 * decl.c (redeclaration_error_message): Allow redeclaration of
12971 namespace-scope decls.
12972
12973 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
12974
12975 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
12976
12977 2000-02-17 Mark Mitchell <mark@codesourcery.com>
12978
12979 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
12980 * decl2.c (grokclassfn): Likewise.
12981
12982 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
12983
12984 * decl2.c (lang_decode_option): Don't set default message length
12985 here.
12986 * lex.c (lang_init_options): Set it here.
12987
12988 2000-02-16 Mark Mitchell <mark@codesourcery.com>
12989
12990 Make DECL_CONTEXT mean the class in which a member function was
12991 declared, even for a virtual function.
12992 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
12993 (DECL_FRIEND_CONTEXT): New macro.
12994 (DECL_REAL_CONTEXT): Remove.
12995 (SET_DECL_FRIEND_CONTEXT): Likewise.
12996 (DECL_VIRTUAL_CONTEXT): Adjust.
12997 (DECL_CLASS_SCOPE_P): Use TYPE_P.
12998 (add_friends): Remove.
12999 (hack_decl_function_context): Likewise.
13000 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
13001 CP_DECL_CONTEXT.
13002 (build_over_call): Fix indentation. Use DECL_CONTEXT
13003 instead of DECL_CLASS_CONTEXT.
13004 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
13005 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13006 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13007 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
13008 (build_base_field): Likewise.
13009 (finish_struct_1): Likewise.
13010 (build_self_reference): Likewise.
13011 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
13012 DECL_REAL_CONTEXT.
13013 (pushtag): Use decl_function_context, not
13014 hack_decl_function_context.
13015 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13016 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
13017 (pushdecl): Remove bogus code.
13018 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
13019 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13020 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13021 Use decl_function_context, nothack_decl_function_context.
13022 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
13023 (grokdeclarator): Likewise. Use decl_function_context, not
13024 hack_decl_function_context.
13025 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
13026 (start_function): Use DECL_FRIEND_CONTEXT, not
13027 DECL_CLASS_CONTEXT. Use decl_function_context, not
13028 hack_decl_function_context.
13029 (finish_function): Use decl_function_context, not
13030 hack_decl_function_context.
13031 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
13032 DECL_CLASS_CONTEXT.
13033 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
13034 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
13035 (grokfield): Likewise.
13036 (finish_builtin_type): Likewise.
13037 (finish_vtable_vardec): Use decl_function_context, not
13038 hack_decl_function_context.
13039 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13040 (start_static_initialization_or_destruction): Likewise.
13041 (finish_static_initialization_or_destruction): Likewise.
13042 (mark_used): Adjust logic for deciding when to synthesize methods.
13043 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
13044 DECL_REAL_CONTEXT.
13045 * error.c (dump_function_decl): Use DECL_CONTEXT, not
13046 DECL_CLASS_CONTEXT.
13047 * friend.c (is_friend): Likewise.
13048 (add_friends): Remove.
13049 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
13050 * lex.c (begin_definition_of_inclass_inline): Use
13051 decl_function_context, not hack_decl_function_context.
13052 (process_next_inline): Likewise.
13053 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13054 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
13055 DECL_CLASSS_CONTEXT.
13056 (hack_identifier): Likewise.
13057 (synthesize_method): Use decl_function_context, not
13058 hack_decl_function_context.
13059 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
13060 DECL_REAL_CONTEXT.
13061 (is_member_template): Use decl_function_context, not
13062 hack_decl_function_context. Use DECL_CONTEXT, not
13063 DECL_CLASS_CONTEXT.
13064 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
13065 DECL_CLASS_CONTEXT.
13066 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
13067 DECL_REAL_CONTEXT.
13068 (push_template_decl_real): Likewise.
13069 (instantiate_class_template): Don't call add_friends.
13070 (tsubst_default_argument): Use DECL_CONTEXT, not
13071 DECL_REAL_CONTEXT.
13072 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13073 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13074 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
13075 DECL_CLASS_CONTEXT.
13076 * repo.c (repo_inline_used): Likewise.
13077 * search.c (current_scope): Adjust for new _CONTEXT macros.
13078 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
13079 DECL_REAL_CONTEXT.
13080 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13081 (lookup_fnfields_here):Likewise.
13082 (check_final_overrider): Likewise.
13083 (init_vbase_pointers): Likewise.
13084 (virtual_context): Likewise.
13085 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
13086 (expand_body): Use decl_function_context, not
13087 hack_decl_function_context.
13088 * tree.c (hack_decl_function_context): Remove.
13089 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
13090 DECL_CLASS_CONTEXT.
13091 * typeck2.c (error_not_base_type): Likewise.
13092
13093 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
13094
13095 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
13096
13097 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13098
13099 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
13100
13101 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
13102
13103 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
13104
13105 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
13106
13107 * decl2.c (lang_decode_option): Enable automatic line wrapping.
13108
13109 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
13110
13111 * parse.y (frob_specs): Split out...
13112 (parse_decl): From here.
13113 (fn.def2): Call initial_deferred_type_access_control.
13114 (after_type_component_declarator0): Call frob_specs.
13115 (notype_component_declarator0): Likewise.
13116 * search.c (friend_accessible_p): Nested classes are friends of their
13117 enclosing classes.
13118
13119 2000-02-10 Mark Mitchell <mark@codesourcery.com>
13120
13121 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
13122 used to create an implicit temporary.
13123
13124 * class.c (dfs_modify_vtables): Tweak calculation of functions to
13125 override.
13126
13127 2000-02-08 Nathan Sidwell <nathan@acm.org>
13128
13129 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
13130 strip array element qualifiers too.
13131
13132 2000-02-07 Mark Mitchell <mark@codesourcery.com>
13133
13134 * decl.c (store_parm_decls): Don't build cleanups for parameters
13135 while processing_template_decl.
13136
13137 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
13138
13139 * cp-tree.h (struct saved_scope): Add incomplete field.
13140 (namespace_scope_incomplete): New macro.
13141 * decl.c (pushdecl): Use it.
13142 (hack_incomplete_structures): Use it. See through artificial
13143 binding levels.
13144 (mark_saved_scope): Mark it.
13145
13146 Implement access control for nested types.
13147 * search.c (type_access_control): New fn.
13148 (accessible_p): Now we do perform access control for types.
13149 * semantics.c (deferred_type_access_control): New fn.
13150 (initial_deferred_type_access_control): New fn.
13151 (begin_function_definition): Call it. Add lookups parm.
13152 * decl.c (struct binding_level): Add this_class field.
13153 (pushlevel_class): Set it.
13154 (mark_binding_level): Mark it.
13155 (lookup_name_real): Use it. Call type_access_control.
13156 (mark_saved_scope): Mark lookups field.
13157 * cp-tree.h (flagged_type_tree): Add lookups field.
13158 (struct saved_scope): Add lookups field.
13159 (type_lookups): New macro.
13160 * parse.y (declmods): Now <ftype>.
13161 (parse_decl): Add lookups parm. Call
13162 initial_deferred_type_access_control.
13163 (lang_extdef): Clear type_lookups.
13164 (typed_declspecs, declmods, typespec): Set lookups field.
13165 (initdcl): Call deferred_type_access_control.
13166 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
13167 component_decl_1, named_parm): Adjust.
13168 * friend.c (is_friend): Nested classes are friends of their
13169 enclosing classes.
13170
13171 * class.c (currently_open_derived_class): New fn.
13172 * method.c (hack_identifier): Use it.
13173
13174 * lex.c (do_identifier): Remove obsolete code.
13175
13176 * parse.y (typed_typespecs): Propagate new_type_flag properly.
13177
13178 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
13179
13180 * tinfo.h: Remove apostrophes from C++ comment (xgettext
13181 thinks this file is plain C).
13182
13183 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13184
13185 * Makefile.in (call.o): Depend on $(EXPR_H).
13186
13187 * call.c: Include "expr.h".
13188
13189 * class.c (dump_class_hierarchy): Add prototype.
13190
13191 * search.c (dfs_get_pure_virtuals): Likewise.
13192
13193 2000-02-1 Ulrich Drepper <drepper@redhat.com>
13194
13195 * parse.y (simple_stmt): Allow :: token in asm parameter list.
13196 * parse.c: Rebuilt.
13197
13198 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
13199
13200 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
13201 Store it in DECL_FCONTEXT.
13202 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
13203
13204 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
13205
13206 * tinfo.h (old abi): #include "tconfig.h".
13207 * tinfo.cc (convert_to_base): Move into old abi section.
13208
13209 2000-01-31 Mark Mitchell <mark@codesourcery.com>
13210
13211 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
13212 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
13213 (BINFO_PRIMARY_BINFO): New macro.
13214 (BF_DELTA): Rename to ...
13215 (BV_DELTA): ... this.
13216 (BF_VCALL_INDEX): Rename to ...
13217 (BV_VCALL_INDEX): ... this.
13218 (BF_FN): Rename to ...
13219 (BV_FN): ... this.
13220 * class.c (build_vbase_path): Adjust for changes to reverse_path.
13221 (set_rtti_entry): Rename BF_ macros to BV_ variants.
13222 (modify_vtable_entry): Simplify.
13223 (add_virtual_function): Rename BF_ macros to BV_ variants.
13224 (build_vtable_initializer): Likewise.
13225 (get_class_offset_1): Remove.
13226 (dfs_get_class_offset): Likewise.
13227 (get_class_offset): Likewise.
13228 (dfs_find_final_overrider): New function.
13229 (find_final_overrider): Likewise.
13230 (modify_one_vtable): Remove.
13231 (dfs_find_base): New function.
13232 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
13233 find_final_overrider.
13234 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
13235 virtuals.
13236 (dfs_fixup_vtable_deltas): Remove.
13237 (override_one_vtable): Remove.
13238 (merge_overrides): Likewise.
13239 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
13240 unreal chilren of virtual bases.
13241 (finish_struct_1): Don't use merge_overrides. Don't use
13242 dfs_fixup_vtable_deltas.
13243 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
13244 BINFOs.
13245
13246 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
13247 Jason Merrill <jason@yorick.cygnus.com>
13248
13249 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
13250
13251 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
13252
13253 * exception.cc (__throw_bad_typeid): Add missing std::.
13254
13255 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13256
13257 * cp-tree.h (make_thunk): PROTO -> PARAMS.
13258
13259 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
13260
13261 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
13262
13263 Runtime support for new-abi rtti.
13264 * inc/typeinfo (type_info::operator!=): Define in class.
13265 (type_info::before, type_info::name, type_info::operator==,
13266 type_info::operator!=): Define new ABI implementations.
13267 (type_info::is_pointer_p, type_info::is_function_p): Declare
13268 new virtual functions.
13269 (type_info::do_catch, type_info::do_upcast): Likewise.
13270
13271 * tinfo.h (__base_class_info): Define new class.
13272 (__class_type_info): Likewise.
13273 (__si_class_type_info): Likewise.
13274 (__vmi_class_type_info): Likewise.
13275 (__dynamic_cast): Prototype.
13276
13277 * tinfo.cc: Conditionalize old and new rtti mechanisms.
13278 (type_info::is_pointer_p): Define new function.
13279 (type_info::is_function_p): Likewise.
13280 (type_info::do_catch): Likewise.
13281 (type_info::do_upcast): Likewise.
13282 (vtable_prefix): New structure for vtable access.
13283 (adjust_pointer): Define new template function.
13284 (contained_p, public_p, virtual_p, contained_public_p,
13285 contained_nonpublic_p, contained_nonvirtual_p): Define new
13286 functions.
13287 (nonvirtual_base_type): New local variable.
13288 (__class_type_info::~__class_type_info): Define.
13289 (__si_class_type_info::~__si_class_type_info): Likewise.
13290 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
13291 (__class_type_info::do_catch): Define new function.
13292 (__class_type_info::do_upcast): Likewise.
13293 (__class_type_info::find_public_src): Likewise.
13294 (__class_type_info::do_find_public_src): Likewise.
13295 (__si_class_type_info::do_find_public_src): Likewise.
13296 (__vmi_class_type_info::do_find_public_src): Likewise.
13297 (__class_type_info::do_dyncast): Likewise.
13298 (__si_class_type_info::do_dyncast): Likewise.
13299 (__vmi_class_type_info::do_dyncast): Likewise.
13300 (__class_type_info::do_upcast): Likewise.
13301 (__si_class_type_info::do_upcast): Likewise.
13302 (__vmi_class_type_info::do_upcast): Likewise.
13303 (__dynamic_cast): Likewise.
13304
13305 * tinfo2.cc (__fundamental_type_info): Define new class.
13306 (__pointer_type_info): Likewise.
13307 (__reference_type_info): Likewise.
13308 (__array_type_info): Likewise.
13309 (__function_type_info): Likewise.
13310 (__enum_type_info): Likewise.
13311 (__ptr_to_member_type_info): Likewise.
13312 (__fundamental_type_info::~__fundamental_type_info): Define.
13313 (__pointer_type_info::~__pointer_type_info): Likewise.
13314 (__reference_type_info::~__reference_type_info): Likewise.
13315 (__array_type_info::~__array_type_info): Likewise.
13316 (__function_type_info::~__function_type_info): Likewise.
13317 (__enum_type_info::~__enum_type_info): Likewise.
13318 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
13319 (__pointer_type_info::do_catch): Define new function.
13320 (__ptr_to_member_type_info::do_catch): Define new function.
13321
13322 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
13323 (__is_pointer): Likewise.
13324
13325 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
13326
13327 2000-01-30 Mark Mitchell <mark@codesourcery.com>
13328
13329 * cp/class.c (build_vtable): Rename to build_primary_vtable.
13330 (prepare_fresh_vtable): Rename to build_secondary_vtable.
13331 (make_new_vtable): New function.
13332 (modify_vtable_entry): Handle generation of new vtables correctly.
13333 (modify_one_vtable): Remove unused parameter.
13334 (dfs_fixup_vtable_deltas): Likewise.
13335 (override_one_vtable): Use build_secondary_vtable.
13336 (finish_struct_1): Use build_primary_vtable and
13337 build_secondary_vtable.
13338
13339 2000-01-28 Ulrich Drepper <drepper@redhat.com>
13340
13341 * cp/decl.c: Adjust variable names, comments, help strings.
13342
13343 2000-01-29 Nathan Sidwell <nathan@acm.org>
13344
13345 * new2.cc (operator delete[]): Use operator delete, don't assume
13346 implementation.
13347
13348 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
13349
13350 * class.c (build_vtbl_initializer): Add argument to
13351 build_vtable_entry call.
13352
13353 2000-01-27 Mark Mitchell <mark@codesourcery.com>
13354
13355 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
13356 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
13357 (BF_DELTA): New macro.
13358 (BF_VCALL_INDEX): Likewise.
13359 (BF_FN): Likewise.
13360 (THUNK_VCALL_OFFSET): Likewise.
13361 (make_thunk): Change prototype.
13362 * class.c (build_vtable_entry): Integrate
13363 build_vtable_entry_for_fn. Handle vcall indices.
13364 (build_vtable_entry_for_fn): Remove.
13365 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
13366 BF_VCALL_INDEX, BF_FN.
13367 (modify_vtable_entry): Integrate common code from
13368 modify_one_vtable and dfs_fixup_vtable_deltas.
13369 (add_virtual_function): Set BF_VCALL_INDEX.
13370 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
13371 and BF_FN.
13372 (modify_one_vtable): Simplify.
13373 (dfs_fixup_vtable_deltas): Likewise.
13374 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
13375 * method.c (make_thunk): Handle vcall indices.
13376
13377 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
13378
13379 Compiler side new abi rtti (not enabled).
13380 * cp-tree.h (new_abi_rtti_p): New macro.
13381 (emit_support_tinfos): Prototype new function.
13382 (tinfo_decl_p): Likewise.
13383 (emit_tinfo_decl): Likwise.
13384 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
13385 macros.
13386 (doing_runtime): New local static.
13387 (init_rtti_processing): Add new-abi initializer.
13388 (get_tinfo_decl): Add new-abi logic.
13389 (tinfo_from_decl): Likewise.
13390 (build_dynamic_cast_1): Likewise.
13391 (qualifier_flags): New static function.
13392 (tinfo_base_init): Likewise.
13393 (generic_initializer): Likewise.
13394 (ptr_ref_initializer): Likewise.
13395 (ptmd_initializer): Likewise.
13396 (class_hint_flags): Likewise.
13397 (class_initializer): Likewise.
13398 (synthesize_tinfo_var): Likewise.
13399 (create_real_tinfo_var): Likewise.
13400 (create_pseudo_type_info): Likewise.
13401 (get_vmi_pseudo_type_info): Likewise.
13402 (create_tinfo_types): Likewise.
13403 (emit_support_tinfos): New global function.
13404 (tinfo_decl_p): New global predicate.
13405 (emit_tinfo_decl): New global function.
13406 * class.c (set_rtti_entry): Generalize for old and new rtti.
13407 (build_vtbl_initializer): Likewise.
13408 * decl2.c (finish_file): Likewise.
13409
13410 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
13411
13412 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
13413 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
13414
13415 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
13416
13417 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
13418 for scopes.
13419
13420 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
13421
13422 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
13423
13424 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
13425
13426 * optimize.c (calls_setjmp_r): Supply new argument
13427 to special_function_p.
13428
13429 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13430
13431 * call.c: PROTO -> PARAMS.
13432 * class.c: Likewise.
13433 * cp-tree.h: Likewise.
13434 * cvt.c: Likewise.
13435 * decl.c: Likewise.
13436 * decl.h: Likewise.
13437 * decl2.c: Likewise.
13438 * dump.c: Likewise.
13439 * errfn.c: Likewise.
13440 * error.c: Likewise.
13441 * except.c: Likewise.
13442 * expr.c: Likewise.
13443 * init.c: Likewise.
13444 * input.c: Likewise.
13445 * lex.c: Likewise.
13446 * lex.h: Likewise.
13447 * method.c: Likewise.
13448 * optimize.c: Likewise.
13449 * parse.y: Likewise.
13450 * pt.c: Likewise.
13451 * repo.c: Likewise.
13452 * rtti.c: Likewise.
13453 * search.c: Likewise.
13454 * semantics.c: Likewise.
13455 * spew.c: Likewise.
13456 * tree.c: Likewise.
13457 * typeck.c: Likewise.
13458 * typeck2.c: Likewise.
13459 * xref.c: Likewise.
13460
13461 2000-01-25 Richard Henderson <rth@cygnus.com>
13462
13463 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
13464
13465 2000-01-25 Mark Mitchell <mark@codesourcery.com>
13466
13467 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
13468 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
13469 (struct vcall_offset_data_s): New type.
13470 (dfs_vcall_offset_queue_p): New function.
13471 (dfs_build_vcall_offset_vtbl_entries): Likewise.
13472 (build_vcall_offset_vtbl_entries): Likewise.
13473 (layout_vtable_decl): Likewise.
13474 (num_vfun_entries): Likewise.
13475 (num_extra_vtbl_entries): Add the entries for vcall offsets.
13476 (build_vtbl_initializer): Likewise.
13477 (dfs_finish_vtabls): Use layout_vtable_decl.
13478 (modify_one_vtables): Always duplicate vtables under the new ABI.
13479 (finish_struct_1): Use layout_vtable_decl.
13480
13481 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13482
13483 * decl.c (member_function_or_else): Change third arg from a format
13484 specifier to an `enum overload_flags'. Callers changed.
13485
13486 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
13487
13488 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
13489 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
13490 build_const_cast, get_delta_difference, check_return_expr): Avoid
13491 ANSI string concatenation usage.
13492
13493 2000-01-24 Mark Mitchell <mark@codesourcery.com>
13494
13495 * class.c (layout_class_type): Put the fields required to make a
13496 class non-empty at the end, not the beginning, of the TYPE_FIELDs
13497 list.
13498
13499 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
13500
13501 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
13502 template.
13503
13504 * decl2.c (mark_used): Do instantiate inlines that have been
13505 explicitly instantiated.
13506
13507 2000-01-24 Richard Henderson <rth@cygnus.com>
13508
13509 * call.c (build_over_call): Use expand_tree_builtin.
13510 * typeck.c (build_function_call_real): Likewise.
13511 (build_binary_op_nodefault): Handle unordered compares.
13512
13513 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13514
13515 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
13516 cp_tree_index values.
13517 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
13518 New global node #defines for them.
13519 * rtti.c (call_void_fn): Replace with ...
13520 (build_runtime_decl): ... new static function.
13521 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
13522 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
13523 (build_dynamic_cast_1): Always produce correctly typed result.
13524 Explicitly produce type_info addresses. Use dynamic_cast_node.
13525 * exception.cc (__throw_bad_cast): Return `void *'.
13526 (__throw_bad_typeid): Return `const type_info &'.
13527
13528 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13529
13530 * cp-tree.h (get_vtable_decl): Prototype new function.
13531 * class.c (get_vtable_decl): New function. Broken out from ...
13532 (build_vtable): ... here. Use it.
13533 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
13534 by get_vtable_decl.
13535
13536 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
13537
13538 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
13539 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
13540 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
13541 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
13542 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
13543 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
13544 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
13545 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
13546 (CPTI_TINFO_VAR_ID): New enumeration.
13547 (__tp_desc_type_node, __access_mode_type_node,
13548 __bltn_desc_type_node, __user_desc_type_node,
13549 __class_desc_type_node, __ptr_desc_type_node,
13550 __attr_desc_type_node, __func_desc_type_node,
13551 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
13552 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
13553 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
13554 enum_desc_type_node, class_desc_type_node,
13555 si_class_desc_type_node, vmi_class_desc_type_node,
13556 ptmd_desc_type_node, base_desc_type_node): New #defines.
13557 (tinfo_fn_id, tinfo_fn_type): Rename to ...
13558 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
13559 (tinfo_var_id): New enumeration.
13560 (DECL_TINFO_FN_P): Augment comment.
13561 * decl.c (cp_global_trees): Adjust documentation.
13562 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
13563 tinfo_decl_type and tinfo_var_id.
13564 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
13565 (build_typeid): Remove unused variable.
13566 (get_tinfo_var): Use tinfo_var_id.
13567 (tinfo_name): New static function.
13568 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
13569 (tinfo_from_decl): Likewise.
13570 (get_base_offset): New static function, broken out of
13571 expand_class_desc.
13572 (expand_si_desc): Use tinfo_name.
13573 (expand_class_desc): Likewise. Lose local static variable.
13574 Use base_desc_type_node. Use get_base_offset.
13575 (expand_ptr_desc): Use tinfo_name.
13576 (expand_attr_desc): Likewise.
13577 (expand_generic_desc): Likewise.
13578
13579 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
13580 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
13581
13582 2000-01-23 Mark Mitchell <mark@codesourcery.com>
13583
13584 * cp-tree.h (__eprintf): Remove declaration.
13585 * tree.c (__eprintf): Remove definition.
13586
13587 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
13588 Mark Mitchell <mark@codesourcery.com>
13589
13590 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
13591 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
13592
13593 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
13594
13595 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
13596
13597 2000-01-23 Mark Mitchell <mark@codesourcery.com>
13598
13599 * cp-tree.h (register_dtor_fn): New function.
13600 * decl.c (destroy_local_static): Rename to ...
13601 (register_dtor_fn): ... this. Give it external linkage.
13602 (expand_static_init): Use it.
13603 * decl2.c (do_static_initialization): Likewise, if using
13604 __cxa_atexit.
13605 (do_static_destruction): Check that __cxa_atexit is not in use.
13606 (finish_file): Don't call do_static_destruction if using
13607 __cxa_atexit.
13608
13609 * typeck.c (convert_arguments): Restore two-message error
13610 reporting.
13611
13612 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
13613
13614 Remap dynamic cast hint values to be consistent across ABIs.
13615 * search.c (dynamic_cast_base_recurse): Remap generated value.
13616 (get_dynamic_cast_base_type): Adjust documentation.
13617 * tinfo.h (__user_type_info::dyncast): Likewise.
13618 (__user_type_info::find_public_subobj): Remap BOFF meaning.
13619 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
13620 (__class_type_info::do_dyncast): Likewise.
13621 (__class_type_info::do_find_public_subobj): Likewise.
13622 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
13623
13624 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
13625
13626 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
13627
13628 * typeck2.c (incomplete_type_error): Restore previous
13629 cp_error and cp_error_at call sequence.
13630
13631 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
13632
13633 * class.c (dump_class_hierarchy): Make format agree with argument;
13634 cast pointer to unsigned long and print with %lx.
13635
13636 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
13637
13638 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
13639
13640 * typeck.c (composite_pointer_type, common_type,
13641 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
13642 build_function_call_real, convert_arguments,
13643 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
13644 build_unary_op, mark_addressable, build_compound_expr,
13645 build_static_cast, build_reinterpret_cast, build_const_cast,
13646 build_c_cast, build_modify_expr, get_delta_difference,
13647 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
13648 'ISO C++'. Fusion consecutive calls to diagnostic message routines
13649 into a single one.
13650 * typeck2.c (readonly_error, abstract_virtuals_error,
13651 process_init_constructor, check_for_new_type): Likewise.
13652
13653 2000-01-19 Mark Mitchell <mark@codesourcery.com>
13654
13655 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
13656 VAR_DECLs.
13657
13658 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
13659
13660 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
13661 (build_x_typeid): Likewise.
13662 (get_tinfo_fn): Likewise.
13663 (get_tinfo_fn_unused): Rename to ...
13664 (get_tinfo_decl): ... here.
13665 * rtti.c (build_headof): Replace logic error with assertion.
13666 (get_tinfo_fn_dynamic): Rename to ...
13667 (get_tinfo_decl_dynamic): ... here. Make static. Use
13668 complete_type_or_else.
13669 (build_x_typeid): Move into ...
13670 (build_typeid): ... here. Adjust call to
13671 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
13672 throw_bad_typeid expression.
13673 (get_tinfo_fn_unused): Rename to ...
13674 (get_tinfo_decl): ... here. Adjust comment.
13675 (get_tinfo_fn): Delete.
13676 (tinfo_from_decl): New static function.
13677 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
13678 (get_typeid): Use complete_type_or_else.
13679 (build_dynamic_cast_1): Adjust calls to
13680 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
13681 * parse.y (primary): Adjust call to build_typeid.
13682 * except.c (build_eh_type_type_ref): Adjust call to
13683 get_tinfo_decl. Mark as used.
13684 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
13685 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
13686 * parse.c: Regenerated.
13687
13688 2000-01-17 Mark Mitchell <mark@codesourcery.com>
13689
13690 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
13691 calling convention.
13692 (resolves_to_fixed_type_p): Document calling convention.
13693 * rtti.c (build_x_typeid): Initialize NONNULL.
13694
13695 * cp-tree.h (build_shared_int_cst): New function.
13696 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
13697 * class.c (modify_vtable_entry): Likewise.
13698 (add_virtual_function): Split out code to generated shared
13699 INTEGER_CSTs to build_share_int_cst.
13700 (modify_all_vtables): Handle all the overridden functions here.
13701 Add overridden functions from non-primary virtual bases to the
13702 primary vtable.
13703 (finish_struct_1): Adjust call to modify_all_vtables. Add
13704 overridden functions from non-primary bases to the vtable.
13705 * tree.c (build_shared_int_cst): New function.
13706
13707 * cp-tree.h (scratchalloc): Remove.
13708 (build_scratch_list): Likewise.
13709 * call.c (convert_class_to_reference): Replace build_scratch_list
13710 and build_expr_list with build_tree_list.
13711 (add_candidate): Replace scratchalloc with expralloc. Note memory
13712 leak.
13713 (build_user_type_conversion_1): Replace build_scratch_list
13714 and build_expr_list with build_tree_list.
13715 (build_new_op): Likewise.
13716 (build_op_delete_call): Likewise.
13717 (convert_like): Likewise.
13718 * cvt.c (ocp_convert): Likewise.
13719 * decl.c (start_decl): Likewise.
13720 (start_function): Likewise.
13721 (finish_destructor_body): Likewise.
13722 (maybe_build_cleanup_1): Likewise.
13723 * decl2.c (reparse_decl_as_expr): Likewise.
13724 * init.c (perform_member_init): Likewise.
13725 (expand_cleanup_for_base): Likewise.
13726 (build_builtin_delete_call): Likewise.
13727 (build_new_1): Likewise.
13728 (build_delete): Likewise.
13729 * method.c (do_build_assign_ref): Likewise.
13730 * parse.y (already_scoped_stmt): Likewise.
13731 (nontrivial_exprlist): Likewise.
13732 (net_initializer): Likewise.
13733 (initlist): Likewise.
13734 * parse.c: Regenerated.
13735 * rtti.c (build_x_typeid): Likewise.
13736 (build_dynamic_cast_1): Likewise.
13737 * typeck.c (build_x_compound_expr): Likewise.
13738 (build_static_cast): Likewise.
13739 (build_modify_expr): Likewise.
13740
13741 * cp-tree.h (DECL_VINDEX): Add documentation.
13742 * class.c (build_vtable_entry): Likewise.
13743 (start_vtable): Add comment.
13744 (add_virtual_function): Replace pending_hard_virtuals with
13745 overridden_virtuals and pending_virtuals with new_virtuals.
13746 Replace redundant assignments with assertions.
13747 (check_for_override): Add comment.
13748 (check_bases_and_members): Replace pending_hard_virtuals with
13749 overridden_virtuals and pending_virtuals with new_virtuals.
13750 (create_vtbl_ptr): Likewise.
13751 (layout_class_type): Likewise.
13752 (finish_struct_1): Likewise. Add comments.
13753
13754 2000-01-16 Mark Mitchell <mark@codesourcery.com>
13755
13756 * class.c (finish_struct_1): Replace redundant code with
13757 assertions.
13758
13759 * cp-tree.h (flag_new_abi): Move.
13760 (flag_use_cxa_atexit): Likewise.
13761 (flag_honor_std): Likewise.
13762 (flag_rtti): Likewise.
13763 (vbase_offsets_in_vtable_p): Define.
13764 (vptrs_present_everywhere_p): Likewise.
13765 (TYPE_CONTAINS_VPTR_P): Likewise.
13766 (dfs_walk_real): Declare.
13767 * class.c (build_vbase_pointer_fields): Check
13768 vbase_offsets_in_vtable_p.
13769 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
13770 BINFO_VPTR_FIELD.
13771 (build_vbase_offset_vtbl_entries): Simplify.
13772 (build_vbase_offset_vtbl_entries): Adjust.
13773 (build_vbase_pointer): Add ability to look up vbase offsets in
13774 vtable.
13775 (start_vtable): New function.
13776 (add_virtual_function): Use it.
13777 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
13778 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
13779 (build_vtbl_initializer): Take the type of the complete object as
13780 input. Use it to correctly calculate vbase offsets.
13781 (dfs_finish_vtbls): Pass the complete type to
13782 build_vtbl_initializer.
13783 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
13784 (create_vtable_ptr): Create a vtable even if there are no
13785 new virtual functions, under the new ABI.
13786 (finish_struct_1): Likewise.
13787 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
13788 * decl.c (exapnd_static_init): Remove call to
13789 preserve_initializer.
13790 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
13791 vtables.
13792 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
13793 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
13794 (construct_virtual_bases): Don't initialize virtual base pointers
13795 under the new ABI.
13796 (build_aggr_init): Clean up comment.
13797 (expand_aggr_init_1): Likewise.
13798 * rtti.c (expand_class_desc): Store the virtual function table
13799 index where the vbase offset lives in the offset field.
13800 * search.c (dfs_walk_real): Make it global.
13801 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
13802 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
13803
13804 * tinfo.h (USItype): Make it signed under the new ABI.
13805 * tinfo.cc (convert_to_base): New function. Encapsulate base
13806 conversion logic here.
13807 (__class_type_info::do_upcast): Use it.
13808 (__class_type_info::do_dyncast): Likewise.
13809 (__class_type_info::do_find_public_subobj): Likewise.
13810
13811 * init.c (construct_virtual_bases): Don't look up the addresses of
13812 virtual bases at run-time.
13813
13814 * class.c (build_vbase_pointer): Relocate.
13815 (build_vbase_pointer_fields): Likewise.
13816 (dfs_build_vbase_offset_vtbl_entries): Likewise.
13817 (build_vbase_offset_vtbl_entries): Likewise.
13818
13819 * decl.c (init_decl_processing): Complain if -fnew-abi
13820 -fno-vtable-thunks is used.
13821
13822 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
13823 flag_new_abi.
13824
13825 2000-01-15 Mark Mitchell <mark@codesourcery.com>
13826
13827 * cp-tree.h (num_extra_vtbl_entries): New function.
13828 (size_extra_vtbl_entries): Likewise.
13829 (dfs_vtable_path_unmark): Likewise.
13830 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
13831 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13832 * class.c (num_extra_vtbl_entries): New function.
13833 (size_extra_vtbl_entries): Likewise.
13834 (dfs_build_vbase_offset_vtbl_entries): New function.
13835 (build_vbase_offset_vtbl_entries): Likewise.
13836 (build_vtbl_initializer): Use it.
13837 (finish_struct_1): Adjust vtable sizes (using
13838 num_extra_vtbl_entries).
13839 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
13840 THUNK_DECL is non-NULL before expanding it.
13841 * init.c (expand_virtual_init): Adjust the vtable pointer by
13842 size_extra_vtbl_entries before storing it.
13843 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
13844 Handle TREE_LIST parameters here, not in the dfs_* functions.
13845 (dfs_unmarked_real_bases_queue_p): Adjust.
13846 (dfs_marked_real_bases_queue_p): Likewise.
13847 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
13848 (dfs_vtable_path_marked_real_bases_queue_p): New function.
13849 (dfs_vtable_path_unmark): Likewise.
13850
13851 2000-01-14 Mark Mitchell <mark@codesourcery.com>
13852
13853 * optimize.c (copy_body_r): Clear the operand three of a
13854 TARGET_EXPR when copying it.
13855
13856 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13857
13858 * method.c (build_decl_overload_real): Check whether we are in ::
13859 before returning __builtin_new/delete.
13860
13861 2000-01-13 Mark Mitchell <mark@codesourcery.com>
13862
13863 * pt.c (tsubst_friend_function): Improve comment.
13864 (instantiate_decl): Avoid crashing when a "nested" function is
13865 instantiated from the top level.
13866
13867 * dump.c (dqeueue_and_dump): Dump
13868 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
13869
13870 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13871
13872 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
13873
13874 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
13875
13876 * g++spec.c (lang_specific_driver): Add -fnew-abi if
13877 ENABLE_NEW_GXX_ABI defined.
13878 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
13879 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
13880 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
13881
13882 2000-01-12 Mark Mitchell <mark@codesourcery.com>
13883
13884 * decl.c (start_cleanup_fn): Call pushdecl.
13885
13886 * call.c (convert_class_to_reference): Fix typos.
13887 (build_conditional_expr): Handle errors gracefully.
13888 * class.c (push_nested_class): Likewise.
13889 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
13890 (DECL_THIS_EXTERN): Use it.
13891 (DECL_THIS_STATIC): Likewise.
13892 * cvt.c (convert_to_void): Handle errors gracefully.
13893 (build_expr_type_conversion): Likewise.
13894 * decl.c (maybe_push_decl): Likewise.
13895 (start_decl_1): Likewise.
13896 (require_complete_types_for_parms): Likewise.
13897 * parse.y (structsp): Likewise.
13898 (base_class): Likewise.
13899 * parse.c: Regenerated.
13900 * pt.c (finish_member_template_decl): Likewise.
13901 * typeck.c (decay_conversion): Likewise.
13902
13903 * cp-tree.h (dfs_skip_vbases): New function.
13904 (find_vbase_instance): Likewise.
13905 * class.c (determine_primary_base): Allow a nearly empty base to
13906 serve as a primary base class under the new ABI.
13907 (get_class_offset_1): Rename to ...
13908 (dfs_get_class_offset): ... this. Simplify. Don't issue error
13909 messages here.
13910 (get_class_offset): Use it. Issue error messages here.
13911 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
13912 find the right copies of virtual bases.
13913 (fixup_vtable_deltas1): Rename to ...
13914 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
13915 bases as primary bases.
13916 (fixup_vtable_deltas): Remove.
13917 (override_one_vtable): Handle virtual bases as primary bases.
13918 (merge_overrides): Likewise.
13919 (finish_struct_1): Likewise.
13920 (dump_class_hierarchy): Dump primary-ness of bases as well.
13921 * search.c (mark_primary_bases): Use a pre-order traversal to
13922 handle primary virtual bases.
13923 (dfs_skip_vbases): New fiunction.
13924 (expand_upcast_fixups): Adjust to handle primary virtual bases.
13925 (fixup_virtual_upcast_offsets): Likewise.
13926 (fixup_all_virtual_upcast_offsets): Likewise.
13927 (dfs_find_vbase_instances): New function.
13928 (find_vbase_instance): Likewise.
13929
13930 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
13931
13932 * lex.c (DIR_SEPARATOR): Delete macro.
13933
13934 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
13935
13936 * decl2.c (lang_decode_option): Handle automatic line wrapping
13937 option.
13938
13939 2000-01-11 Mark Mitchell <mark@codesourcery.com>
13940
13941 * friend.c (do_friend): Don't resolve scopes when processing
13942 template declarations, even if the qualifying scope doesn't
13943 involve template parameters.
13944
13945 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
13946
13947 * class.c (dfs_modify_vtables_queue_p): Remove.
13948 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
13949 and dfs_marked_real_bases_queue_p instead of
13950 dfs_modify_vtables_queue_p.
13951
13952 * class.c (build_vbase_path): Simplify.
13953 (dfs_propagate_binfo_offsets): New function.
13954 (propagate_binfo_offsets): Use it.
13955 (remove_base_field): Simplify.
13956 (dfs_set_offset_for_vbases): Remove.
13957 (dfs_set_offset_for_shared_vbases): New function.
13958 (dfs_set_offset_for_unshared_vbases): Likewise.
13959 (layout_virtual_bases): Use them.
13960 (layout_basetypes): Don't call propagate_binfo_offsets.
13961 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
13962 for the vbases.
13963
13964 * class.c (build_base_field): New function, split out from ...
13965 (build_base_fields): ... here. Use it. Allocate primary bases
13966 first, under the new ABI.
13967 (get_vtable_entry): Remove.
13968 (remove_base_field): New function, split out from ...
13969 (remove_base_fields): ... here. Adjust since primary bases come
13970 first under the new ABI.
13971
13972 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
13973 (initialize_vtbl_ptrs): New function.
13974 (expand_indirect_vtbls_init): Change prototype.
13975 (convert_pointer_to_vbase): Declare.
13976 * init.c (expand_direct_vtbls_init): Remove.
13977 (dfs_initialize_vtbl_ptrs): New function.
13978 (initialize_vtbl_ptrs): Likewise.
13979 (emit_base_init): Use initialize_vtbl_ptrs.
13980 * search.c (convert_pointer_to_vbase): Make it global.
13981 (expand_indirect_vtbls_init): Remove vtable initialization code.
13982 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
13983
13984 * class.c (dfs_finish_vtbls): New function.
13985 (finish_vtbls): Use it.
13986 (dump_class_hierarchy): New function.
13987
13988 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
13989 (BINFO_VBASE_PRIMARY_P): New macro.
13990 (BINFO_VIRTUALS): Add to documentation.
13991 (SET_BINFO_PRIMARY_MARKED_P): Remove.
13992 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13993 (dfs_mark_primary_bases_queue_p): Likewise.
13994 (dfs_unmarked_real_bases_queue_p): New function.
13995 (dfs_marked_real_bases_queue_p): Likewise.
13996 * search.c (dfs_mark_primary_bases): Adjust.
13997 (mark_primary_bases): Likewise.
13998 (get_shared_vbase_if_not_primary): New function.
13999 (dfs_unmarked_real_bases_queue_p): Likewise.
14000 (dfs_marked_real_bases_queue_p): Likewise.
14001 (dfs_get_pure_virtuals): Simplify.
14002 (get_pure_virtuals): Likewise.
14003
14004 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14005
14006 * lex.c: Include tm_p.h.
14007
14008 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
14009
14010 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
14011
14012 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
14013
14014 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
14015 * pt.c (instantiate_decl): Defer comdat templates that might not be
14016 needed.
14017
14018 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
14019 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
14020 (finish_file): Likewise.
14021
14022 * decl2.c (import_export_class): Undo 12/14 change.
14023
14024 * error.c (dump_decl): operator new, not operatornew.
14025
14026 * class.c (field_decl_cmp): A nontype is "greater" than a type.
14027 * search.c (lookup_field_1): Look for the last field with the
14028 desired name.
14029
14030 2000-01-05 Nathan Sidwell <nathan@acm.org>
14031
14032 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
14033 FUNCTION_DECL.
14034
14035 2000-01-05 Nathan Sidwell <nathan@acm.org>
14036
14037 * typeck.c (build_static_cast): Don't strip target qualifiers
14038 when casting from a class.
14039
14040 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14041
14042 * class.c (warn_hidden): Initialize variable `fndecl'.
14043
14044 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
14045
14046 * decl.c (flag_isoc9x): New variable to be able to use code in
14047 c-common.c. For now always zero.
14048
14049 2000-01-03 Mark Mitchell <mark@codesourcery.com>
14050
14051 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
14052 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
14053 or unshare_base_binfos for virtual bases here.
14054 * search.c (dfs_get_vbase_types): Do it here.
14055 (get_vbase_types): Adjust.
14056
14057 2000-01-02 Mark Mitchell <mark@codesourcery.com>
14058
14059 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
14060 (BINFO_PRIMARY_MARKED_P): Use flag 5.
14061 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14062 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14063 (unmark_primary_bases): Remove declaration.
14064 (unmarkedp): Declare.
14065 (dfs_vbase_unmark): Likewise.
14066 * class.c (determine_primary_base): Return immediately if there
14067 are no base classes. Call mark_primary_bases here.
14068 (modify_all_direct_vtables): Remove.
14069 (modify_all_indirect_vtables): Remove.
14070 (dfs_modify_vtables_queue_p): New function.
14071 (dfs_modify_vtables): New function.
14072 (modify_all_vtables): Use them.
14073 (build_base_fields): Build FIELD_DECLs for primary virtual base
14074 classes.
14075 (create_vtable_ptr): Don't call determine_primary_base here.
14076 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
14077 (dfs_set_offset_for_vbases): ... this.
14078 (layout_virtual_bases): Use it.
14079 (layout_class_type): Call determine_primary_base here.
14080 * search.c (unmarkedp): Make it global.
14081 (shared_marked_p): Simplify.
14082 (shared_unmarked_p): Likewise.
14083 (dfs_primary_bases_queue_p): Remove.
14084 (dfs_unmark_primary_bases): Likewise.
14085 (unmark_primary_bases): Likewise.
14086 (mark_primary_bases): Simplify.
14087 (get_pure_virtuals): Don't call mark_primary_bases here.
14088 (dfs_vbase_unmark): New function.
14089 (get_vbase_types): Simplify.
14090
14091 * class.c (struct base_info): Remove.
14092 (determine_primary_base): Take has_virtual_p rather than a
14093 base_info as input. Don't calculate max_has_virtual.
14094 (finish_struct_bits): Remove max_has_virtual argument.
14095 (create_vtable_ptr): Remove max_has_virtual_p argument.
14096 (layout_virtual_bases): Remove max argument.
14097 (layout_basetypes): Likewise.
14098 (layout_class_type): Remove max_has_virtual_p argument.
14099 (finish_struct_1): Remove max_has_virtual.
14100
14101 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
14102 (layout_basetypes): Remove.
14103 * class.c (propagate_binfo_offsets): Moved here from tree.c.
14104 Update to handle primary virtual bases.
14105 (remove_base_fields): New function, split out from
14106 layout_basetypes.
14107 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
14108 (layout_virtual_bases): New function, split out from
14109 layout_basetypes. Update to handle primary virtual bases.
14110 (layout_basetypes): Moved here from tree.c. Use
14111 remove_base_fields and layout_virtual_bases.
14112 * search.c (dfs_mark_primary_bases_queue_p): New function.
14113 (mark_primary_bases): Use it.
14114 * tree.c (CEIL): Remove.
14115 (propagate_binfo_offsets): Remove.
14116 (layout_basetypes): Remove.
14117
14118 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14119
14120 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
14121 (BINFO_PRIMARY_MARKED_P): New macro.
14122 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14123 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14124 (mark_primary_bases): New function.
14125 (unmark_primary_bases): Likewise.
14126 * search.c (get_abstract_virtuals_1): Remove.
14127 (dfs_mark_primary_bases): New function.
14128 (mark_primary_bases): Likewise.
14129 (dfs_unmark_primary_bases): Likewise.
14130 (unmark_primary_bases): Likewise.
14131 (dfs_get_pure_virtuals): Likewise.
14132
14133 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14134
14135 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
14136 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
14137 (modify_one_vtable): Adjust.
14138 (fixup_vtable_deltas1): Likewise.
14139 (override_one_vtable): Likewise.
14140 * search.c (get_abstract_virtuals_1): Likewise.
14141 (get_pure_virtuals): Likewise.
14142 (expand_upcast_fixups): Likewise.
14143 * tree.c (debug_binfo): Likewise.
14144
14145 * class.c (build_vtable): Don't return a value. Don't rebuild
14146 vtables for bases that have already been handled.
14147 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
14148 already been handled.
14149 (modify_one_vtable): Adjust accordingly.
14150 (fixup_vtable_deltas1): Likewise.
14151 (finish_struct_1): Likewise.
14152
14153 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14154
14155 * call.c (build_new_method_call): Also check destructors.
This page took 0.690413 seconds and 4 git commands to generate.