For PR java/5902:
[gcc.git] / gcc / cp / ChangeLog
1 2002-03-15 Jason Merrill <jason@redhat.com>
2
3 PR c++/5857
4 * decl.c (duplicate_decls): Use merge_types instead of common_type.
5 * typeck.c (common_type): Just hand off to
6 type_after_usual_arithmetic_conversions and
7 composite_pointer_type.
8 (merge_types): New fn.
9 (commonparms): Use it instead of common_type.
10 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
11 (composite_pointer_type): Also handle attributes.
12 * cp-tree.h: Declare merge_types.
13
14 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
15 variables.
16 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
17
18 2002-03-14 Richard Henderson <rth@redhat.com>
19
20 * decl.c: Include c-pragma.h.
21 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
22 * Make-lang.in: Update dependencies.
23
24 2002-03-14 Jakub Jelinek <jakub@redhat.com>
25
26 PR c++/5908
27 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
28 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
29
30 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
31
32 * mangle.c (write_builtin_type): Handle 128-bit integers even if
33 they are not a standard integer type.
34
35 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
36
37 * cp-tree.h (init_init_processing): Remove declaration.
38 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
39 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
40
41 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
42
43 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
44 Define.
45 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
46 tree_code_length.
47 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
48 cplus_tree_code_name): Delete.
49 (cxx_init): Don't call add_c_tree_codes, instead set
50 lang_unsafe_for_reeval. Don't try to copy into the various
51 tree_code arrays.
52
53 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
54
55 PR c++/5659
56 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
57 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
58 definitions.
59
60 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
61
62 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
63 DR209 is now not a defect.
64 * cp-tree.h (skip_type_access_control): Remove.
65 * decl.c (grokdeclarator): Do type access control for friend
66 declarations.
67 * semantics.c (decl_type_access_control): Don't reset
68 current_type_lookups.
69 (save_type_access_control): Always save the lookups.
70 (skip_type_access_control): Remove.
71 (finish_class_definition): Don't change type_lookups.
72
73 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
74
75 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
76 It is incorrect.
77 * typeck.c (build_static_cast): Compare non-qualified types
78 with pointer to member conversions.
79
80 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
81 Daniel Berlin <dan@dberlin.org>
82
83 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
84 (cxx_get_alias_set): Use it.
85
86 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
87
88 * cp-tree.h (stabilize_expr): Prototype.
89
90 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
91
92 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
93 conditional return void.
94
95 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
96
97 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
98 * cp-tree.h (cxx_unsave): New.
99 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
100 (init_tree): Update.
101
102 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
103
104 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
105 explicit sizeof/sizeof.
106 * decl2.c (cxx_decode_option): Likewise.
107 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
108
109 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
110
111 PR c++/775
112 * decl.c (lookup_tag): Only reject enum/class mismatch, not
113 class/union mismatch.
114 * parse.y (check_class_key): New function.
115 (structsp): Call it.
116
117 2002-03-01 Michael Matz <matz@suse.de>
118
119 * typeck.c (cp_pointer_int_sum): Complete inner type which is
120 used later by size_in_bytes().
121
122 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
123
124 * cp-tree.h: Require __GNUC__ to be #defined.
125 (build_init): Add missing prototype.
126
127 2002-03-01 Jason Merrill <jason@redhat.com>
128
129 * except.c: Don't include decl.h or obstack.h. Do include
130 tree-inline.h.
131 (build_throw): Destroy temporaries from the thrown
132 expression before calling __cxa_throw. Construct a thrown
133 temporary directly into the exception object.
134 (stabilize_throw_expr): New function.
135 (wrap_cleanups_r): New function.
136 * tree.c (stabilize_expr): New function.
137 * init.c (build_init): New function.
138 * Make-lang.in (cp/except.o): Adjust .h deps.
139
140 2002-02-28 Jason Merrill <jason@redhat.com>
141
142 * search.c (lookup_base_r): Don't clear is_non_public just because
143 we found a friendly scope.
144
145 * decl.c (finish_function): Only warn about missing return
146 statement with -Wreturn-type.
147
148 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
149
150 * class.c (build_clone): Update.
151 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
152 * cp-tree.h (cxx_dup_lang_specific_decl): New.
153 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
154 (copy_decl): Update.
155 * method.c (make_thunk): Update.
156
157 2002-02-27 Zack Weinberg <zack@codesourcery.com>
158
159 * decl2.c: Delete traditional-mode-related code copied from
160 the C front end but not used, or used only to permit the
161 compiler to link.
162
163 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
164
165 PR c++/4093
166 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
167 to void.
168
169 2002-02-22 Jakub Jelinek <jakub@redhat.com>
170
171 PR other/5746
172 * semantics.c (finish_switch_cond): Don't call get_unwidened
173 if error_mark_node.
174
175 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
176
177 PR c++/2645, DR 295
178 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
179 tf_keep_type_decl.
180 (make_typename_type): Use tsubst_flags_t.
181 * decl.c (make_typename_type): Adjust. Return non-artificial
182 TYPE_DECLs, if required.
183 (grokdeclarator): Simplify CVR qualification handling. Allow bad
184 qualifiers on typedef types.
185 * decl2.c (handle_class_head): Adjust make_typename_type call.
186 * parse.y (nested_name_specifier): Likewise.
187 (typename_sub0): Likewise.
188 (typename_sub1): Likewise.
189 * pt.c (convert_template_argument): Adjust make_typename_type
190 return value.
191 (tsubst): Adjust cp_build_qualified_type_real calls.
192 (check_cv_quals_for_unify): Cope with alowing bad qualifications
193 on template type parms.
194 (instantiate_decl): Recheck substitutions to give warnings on bad
195 qualifications.
196 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
197
198 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
199
200 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
201
202 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
203 unless DECL_ALWAYS_INLINE.
204
205 2002-02-20 Jakub Jelinek <jakub@redhat.com>
206
207 * typeck.c (cp_pointer_int_sum): Renamed from
208 pointer_int_sum, call pointer_int_sum.
209
210 2002-02-20 Jakub Jelinek <jakub@redhat.com>
211
212 * decl.c (duplicate_decls): Return 0 if issued error about
213 redeclaration.
214
215 2002-02-19 Jason Merrill <jason@redhat.com>
216
217 ABI change: Mangle `void (A::*)() const' as
218 M1AKFvvE, not MK1AFvvE.
219 * mangle.c (write_function_type): Write cv-quals for member
220 function type here.
221 (write_pointer_to_member_type): Not here.
222
223 2002-02-18 Jason Merrill <jason@redhat.com>
224
225 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
226 (do_decl_instantiation): Likewise.
227
228 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
229
230 PR c++/5685
231 * decl.c (duplicate_decls): Make warning unconditional
232 if duplicate default argument declarations are present.
233
234 2002-02-17 Jakub Jelinek <jakub@redhat.com>
235
236 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
237 shortening.
238
239 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
240
241 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
242 remove incorrect comment. Move #if 0'd code to common path. Use
243 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
244
245 2002-02-13 Jason Merrill <jason@redhat.com>
246
247 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
248 (finish_function): Don't warn if current_function_returns_null.
249
250 * typeck2.c (digest_init): Do handle values of vector type.
251
252 * typeck2.c (digest_init, process_init_constructor): Treat vectors
253 like arrays.
254
255 2002-02-11 Jason Merrill <jason@redhat.com>
256
257 * parse.y (reserved_declspecs): Don't handle attributes.
258 (reserved_typespecquals): Handle them here.
259 * Make-lang.in (parse.c): Adjust expected conflicts.
260
261 2002-02-08 Jakub Jelinek <jakub@redhat.com>
262
263 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
264 instead of compstmt.
265 (compstmt_or_stmtexpr): Renamed from compstmt.
266 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
267
268 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
269
270 Rename instantiate_type_flags to tsubst_flags_t & expand use.
271 * cp-tree.h (instantiate_type_flags): Rename to ...
272 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
273 add tf_warning flag.
274 (instantiate_type): Adjust prototype.
275 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
276 do_type_instantiation, cp_build_qualified_type_real): Likewise.
277 cp_build_qualified_type: Adjust.
278 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
279 tf_*.
280 * call.c (standard_conversion): Rename itf_* to tf_*.
281 (reference_binding): Likewise.
282 (convert_like_real): Likewise.
283 * cvt.c (cp_convert_to_pointer): Likewise.
284 (convert_to_reference): Likewise.
285 * decl.c (lookup_namespace_name): Use tf_* flags.
286 (make_typename_type): Likewise.
287 (grokdeclarator): Likewise.
288 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
289 (coerce_template_template_parms, convert_template_argument,
290 coerce_template_parms, maybe_get_template_decl_from_type_decl,
291 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
292 instantiate_class_template, tsubst_template_arg_vector,
293 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
294 tsubst_decl, tsubst_arg_types, tsubst_function_type,
295 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
296 instantiate_template, fn_type_unification,
297 resolve_overloaded_unification, verify_class_unification,
298 unify, get_bindings_real, do_type_instantiation,
299 regenerate_decl_from_template, instantiate_decl,
300 tsubst_initializer_list, tsubst_enum,
301 get_mostly_instantiated_function_type,
302 invalid_nontype_parm_type_p): Likewise.
303 * tree.c (cp_build_qualified_type_real): Likewise.
304 * typeck.c (build_binary_op): Rename itf_* to tf_*.
305 (build_ptrmemfunc): Likewise.
306 (convert_for_assignment): Likewise.
307
308 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
309
310 PR c++/109
311 * decl.c (grokdeclarator): Allow friend declarations from
312 dependent types.
313 * decl2.c (handle_class_head): Don't push into template parm contexts.
314 * pt.c (push_template_decl_real): Template parm contexts are never
315 being defined.
316
317 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
318
319 * class.c: Include target.h.
320 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
321 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
322 bit-field layout.
323 * Make-lang.in: Adjust deps.
324
325 2002-02-05 Jason Merrill <jason@redhat.com>
326
327 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
328
329 2002-02-04 Jakub Jelinek <jakub@redhat.com>
330
331 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
332 (finish_switch_cond): Set SWITCH_TYPE.
333
334 2002-02-04 Richard Henderson <rth@redhat.com>
335
336 * method.c (use_thunk): Always initialize the block tree. Reindent.
337 * semantics.c (expand_body): Emit thunks after function, not before.
338
339 2002-02-04 Jason Merrill <jason@redhat.com>
340
341 * decl.c (start_function): Call cplus_decl_attributes immediately
342 after grokdeclarator.
343
344 * decl.c (start_function): Combine DECL_RESULT handling code.
345
346 2002-02-03 Jason Merrill <jason@redhat.com>
347
348 * xref.c: Remove.
349 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
350 (cp/xref.o): Remove dependencies.
351 * class.c (finish_struct_1, check_methods): Don't call xref fns.
352 (finish_struct_1): Likewise.
353 * friend.c (make_friend_class): Likewise.
354 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
355 * spew.c (read_process_identifier): Likewise.
356
357 2002-02-01 Jason Merrill <jason@redhat.com>
358
359 PR c++/4872
360 * decl.c (finish_function): Warn about a non-void function with
361 no return statement and no abnormal exit.
362 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
363 (current_function_returns_abnormally): New macro.
364 * call.c (build_call): Set it.
365
366 * typeck.c (build_component_ref): Always complain about offsetof
367 constructs on non-PODs. Only make it an error for members of
368 virtual bases.
369
370 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
371 (dump_function_decl): Always dump parms.
372
373 * decl2.c (finish_static_data_member_decl): Complain about a local
374 class with a static data member.
375
376 PR c++/4286
377 * search.c (lookup_field_1): Don't xref a static data member
378 just because we looked it up.
379
380 2002-01-31 Jason Merrill <jason@redhat.com>
381
382 * Make-lang.in (parse.c): Handle .output file.
383
384 PR c++/3395
385 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
386 not TREE_TYPE.
387 * semantics.c (finish_class_definition): Adjust.
388
389 Allow attributes in parms and casts.
390 * parse.y (named_parm): Don't strip attrs.
391 (declmods): Remove 'attributes' production.
392 (nonempty_cv_qualifiers): Accept attributes.
393 (ATTRIBUTE): Give precedence.
394 * decl.c (groktypename): Handle attributes.
395 (grokparms): Likewise.
396
397 2002-01-29 Jakub Jelinek <jakub@redhat.com>
398
399 * decl2.c (cxx_decode_option): Pass 0 as last argument to
400 cpp_handle_option.
401 * lang-specs.h: Use cpp_unique_options instead of cpp_options
402 when used together with cc1_options.
403
404 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
405
406 PR c++/5132
407 * typeck2.c (digest_init): Make sure non-array core type is
408 instantiated.
409 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
410 constructor, rather than build a new one.
411 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
412 PURPOSE of constructor elts.
413
414 2002-01-23 Zack Weinberg <zack@codesourcery.com>
415
416 * Make-lang.in (parse.c): Adjust expected number of
417 shift-reduce conflicts.
418 (decl.o): Depend on diagnostic.h.
419 * decl.c: Include diagnostic.h.
420 (grokdeclarator): Check for null pointer.
421 (finish_function): Don't abort when
422 current_binding_level->parm_flag != 1, if errors have
423 occurred; throw away the statement tree and extra binding
424 levels, and continue.
425 * lex.c (note_list_got_semicolon): Check for null pointer.
426 * method.c (hack_identifier): Just return error_mark_node if
427 value is error_mark_node.
428 * parse.y (primary: TYPEID(type_id)): No need to use
429 TYPE_MAIN_VARIANT here.
430 (handler_seq): Accept an empty list of catch clauses and
431 generate a fake handler block to avoid later crashes.
432 (ansi_raise_identifier): Accept the error token too.
433 * semantics.c (begin_class_definition,
434 finish_class_definition): Check for error_mark_node.
435
436 2002-01-23 Zack Weinberg <zack@codesourcery.com>
437
438 * typeck2.c (friendly_abort): Delete definition.
439 * cp-tree.h (friendly_abort): Don't prototype.
440 (my_friendly_assert): Use fancy_abort.
441
442 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
443
444 * cp-tree.h (my_friendly_abort): Remove.
445
446 2002-01-23 Jakub Jelinek <jakub@redhat.com>
447
448 * spew.c (pending_inlines, pending_inlines_tail,
449 processing_these_inlines): Make static.
450 (mark_pending_inlines): Remove static.
451 (begin_parsing_inclass_inline): If in function, save pi
452 for GC to cp_function_chain->unparsed_inlines instead.
453 (process_next_inline): Likewise.
454 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
455 (mark_pending_inlines): Add prototype.
456 * decl.c (spew_debug): Remove unused extern.
457 (mark_lang_function): Call mark_pending_inlines.
458
459 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
460
461 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
462 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
463 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
464 Change my_fancy_abort() to abort().
465
466 2002-01-23 Jason Merrill <jason@redhat.com>
467
468 PR c++/5453
469 * class.c (fixed_type_or_null): Fix thinko.
470
471 PR c++/3331
472 * init.c (resolve_offset_ref): Use build_indirect_ref.
473
474 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
475
476 2002-01-22 Jason Merrill <jason@redhat.com>
477
478 * parse.y (function_body): Suppress the block for the outermost
479 curly braces.
480 * decl.c (pushdecl): Don't try to skip it.
481 (begin_function_body): Keep the block we create, not the next one.
482 * init.c (emit_base_init): Don't mess with keep_next_level.
483
484 * class.c (build_base_path): Tweak formatting.
485
486 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
487
488 Fix regression introduced with patch for c++/775
489 * parse.y (class_head_defn): Check for template specializations
490 with a different class-key.
491
492 2002-01-17 Jason Merrill <jason@redhat.com>
493
494 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
495 (begin_function_body): Call them and keep_next_level.
496 * init.c (emit_base_init): Call keep_next_level.
497 * semantics.c (setup_vtbl_ptr): Lose.
498 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
499 (vtbls_set_up_p): Lose.
500 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
501 * method.c (do_build_copy_constructor): Likewise.
502 (synthesize_method): Call finish_mem_initializers.
503 * parse.y (nodecls): Likewise.
504
505 * error.c (dump_type_suffix): Print the exception specs before
506 recursing.
507 (dump_function_decl): Here, too.
508
509 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
510
511 2002-01-10 Ira Ruben <ira@apple.com>
512
513 PR c++/907
514 * decl.c (start_method): Handle attrlist.
515
516 2002-01-10 Jakub Jelinek <jakub@redhat.com>
517
518 * decl2.c (max_tinst_depth): Increase default limit to 500.
519
520 2002-01-10 Graham Stott <grahams@redhat.com>
521
522 * spew.c (YYCHAR): Uppercase macro parameter and add
523 parenthesis.
524 (YYCODE): Likewise.
525 (NAME): Uppercase macro parameter.
526
527 2002-01-09 Graham Stott <grahams@redhat.com>
528
529 * decl.h (grokdeclarator): Wrap long line.
530
531 * semantics.c (FINISH_COND): Uppercase macro paramaters and
532 add parenthesis.
533
534 2002-01-08 Graham Stott <grahams@redhat.com>
535
536 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
537 (PALLOC): Uppercase macro parameter and whitespace.
538 (SALLOC): Uppercase macro parameter.
539 (SFREE): Uppercase macros parameter, add parenthese and
540 whitespace.
541 (STREQL): Uppercase macro parameter and whitespace.
542 (STRNEQ): Likewise.
543 (STRLSS): Likewise.
544 (STRLEQ): Likewise.
545 (STRGTR): Likewise.
546 (STRGEQ): Likewise.
547
548 * call.c (convert_like): Add parenthesis and wrap.
549 (convert_like_with_context): Likewise.
550 (ICS_RANK): Whitespace.
551 (NEED_TEMPORARY_P): Remove parenthesis.
552
553 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
554 whitespace.
555 (VTT_MARKED_BINFO_P): Likewise.
556
557 * decl.c (BINDING_LEVEL): Add parenthesis.
558 (DEF_OPERATOR): Likewise.
559
560 * mangle.c (MANGLE_TRACE): Add parenthesis.
561 (MANGLE_TRACE_TREE): Likewise.
562 (write_signed_number): Likewise.
563 (write_unsigned_number): Likewise.
564
565 * pt.c (ccat): Uppercase macro parameter.
566 (cat): Likewise
567
568 * search.c (SET_BINFO_ACCESS): Add parenthesis.
569
570 2002-01-07 Jason Merrill <jason@redhat.com>
571
572 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
573 to pedwarn.
574
575 PR c++/3536
576 * method.c (make_thunk): If !flag_weak, give the thunk the
577 function's linkage.
578 (use_thunk): Here, too.
579
580 2002-01-07 Graham Stott <grahams@redhat.com>
581
582 * error.c: Update copyright date.
583 (print_scope_operator): Add parenthesis.
584 (print_left_paren): Likewise.
585 (print_right_paren): Likewise.
586 (print_left_bracket): Likewise.
587 (print_right_bracket): Likewise.
588 (print_template_argument_list_start): Likewise.
589 (print_template_argument_list_end): Likewise.
590 (print_non_consecutive_character): Likewise.
591 (print_tree_identifier): Likewise.
592 (print_identifier): Likewise.
593 (NEXT_CODE): Uppercase macro parameter.
594 (ident_fndecl): Delete unused.
595 (GLOBAL_THING): Likewise.
596
597 2002-01-06 Graham Stott <grahams@redhat.com>
598
599 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
600 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
601 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
602 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
603 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
604 (C_IS_RESERVED_WORD): Uppercase macro parameter.
605 (C_RID_YYCODE) Likewise.
606 (ptrmem_cst): Use rtx.
607 (LOCAL_BINDING_P): Add whitespace.
608 (INHERITED_VALUE_BINDING_P): Likewise.
609 (BINDING_SCOPE): Wrap long line.
610 (BINDING_HAS_LEVEL_P): Remove parenthesis.
611 (BINDING_VALUE): Wrap long line.
612 (BINDING_TYPE): Whitespace.
613 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
614 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
615 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
616 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
617 (same_type_p): Uppercase macro parameters.
618 (same_type_ignoring_top_level_qualifiers_p): Likewise.
619 (OVL_FUNCTION): Wrap long line.
620 (OVL_CHAIN): Whitespace.
621 (OVL_CURRENT): Add parenthesis and whitespace.
622 (OVL_NEXT): Whitespace.
623 (OVL_USED): Likewise.
624 (IDENTIFIER_TYPE_VALUE): Likewise.
625 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
626 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
627 (LANG_ID_FIELD): Whitespace.
628 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
629 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
630 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
631 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
632 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
633 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
634 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
635 (IDENTIFIER_VIRTUAL_P): Likewise.
636 (IDENTIFIER_OPNAME_P): Likewise.
637 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
638 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
639 (C_SET_EXP_ORIGINAL_CODE): Likewise.
640 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
641 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
642 (IS_AGGR_TYPE): Uppercase macro parameter.
643 (CLASS_TYPE_P): Likewise.
644 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
645 (IS_AGGR_TYPE_2): Whitespace.
646 (TAGGED_TYPE_P): Uppercase macro parameter.
647 (TYPE_BUILT_IN): Whitespace.
648 (TYPE_FOR_JAVA): Likewise.
649 (FUNCTION_ARG_CHAIN): Remove parenthesis.
650 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
651 (FUNCTION_FIRST_USER_PARAM): Likewise.
652 (PROMOTES_TO_AGGR_TYPE): Whitespace.
653 (DERIVED_FROM_P): Add parenthesis and wrap.
654 (UNIQUELY_DERIVED_FROM_P): Likewise.
655 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
656 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
657 (CLASSTYPE_USE_TEMPLATE): Whitespace.
658 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
659 (TYPE_GETS_DELETE): Add parenthesis.
660 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
661 (TYPE_HAS_ASSIGN_REF): Likewise,
662 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
663 (TYPE_HAS_INIT_REF): Likewise.
664 (TYPE_HAS_CONST_INIT_REF): Likewise.
665 (TYPE_BEING_DEFINED): Likewise.
666 (TYPE_LANG_SPECIFIC): Likewise.
667 (CLASSTYPE_RTTI): Likewise.
668 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
669 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
670 (TYPE_OVERLOADS_ARROW): Likewise.
671 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
672 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
673 (CLASSTYPE_METHOD_VEC): Likewise.
674 (CLASSTYPE_MARKED_N): Likewise.
675 (CLASSTYPE_MARKED): Likewise.
676 (CLASSTYPE_MARKED2): Likewise.
677 (CLASSTYPE_MARKED3): Likewise.
678 (CLASSTYPE_MARKED4): Likewise.
679 (CLASSTYPE_MARKED5): Likewise.
680 (CLASSTYPE_MARKED6): Likewise.
681 (SET_CLASSTYPE_MARKED): Whitespace.
682 (CLEAR_CLASSTYPE_MARKED): Likewise.
683 (SET_CLASSTYPE_MARKED2): Likewise.
684 (CLEAR_CLASSTYPE_MARKED2): Likewise.
685 (SET_CLASSTYPE_MARKED3): Likewise.
686 (CLEAR_CLASSTYPE_MARKED3): Likewise.
687 (SET_CLASSTYPE_MARKED4): Likewise.
688 (CLEAR_CLASSTYPE_MARKED4): Likewise.
689 (SET_CLASSTYPE_MARKED5): Likewise.
690 (CLEAR_CLASSTYPE_MARKED5): Likewise.
691 (SET_CLASSTYPE_MARKED6): Likewise.
692 (CLEAR_CLASSTYPE_MARKED6): Likewise.
693 (CLASSTYPE_TAGS): Likewise.
694 (CLASSTYPE_VSIZE): Likewise.
695 (CLASSTYPE_VBASECLASSES): Likewise.
696 (CANONICAL_BINFO): Add parenthesis.
697 (CLASSTYPE_SIZE(NODE): Likewise.
698 (CLASSTYPE_SIZE_UNIT): Likewise.
699 (CLASSTYPE_ALIGN(NODE): Likewise.
700 (CLASSTYPE_USER_ALIGN): Likewise.
701 (TYPE_JAVA_INTERFACE): Likewise.
702 (CLASSTYPE_PURE_VIRTUALS): Likewise.
703 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
704 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
705 (CLASSTYPE_HAS_MUTABLE): Likewise.
706 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
707 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
708 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
709 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
710 (CLASSTYPE_INTERFACE_ONLY): Likewise.
711 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
712 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
713 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
714 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
715 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
716 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
717 (BINFO_UNSHARED_MARKED): Whitespace.
718 (BINFO_MARKED): Whitespace and wrap.
719 (SET_BINFO_MARKED): Likewise.
720 (CLEAR_BINFO_MARKED): Likewise.
721 (BINFO_VTABLE_PATH_MARKED): Likewise.
722 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
723 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
724 (BINFO_SUBVTT_INDEX): Remove parenthesis.
725 (BINFO_VPTR_INDEX): Likewise.
726 (BINFO_PRIMARY_BASE_OF): Likewise,
727 (CLASSTYPE_VFIELDS): Whitespace.
728 (VF_DERIVED_VALUE): Wrap long line.
729 (NAMESPACE_LEVEL): Whitespace.
730 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
731 (DEFARG_POINTER): Whitespace.
732 (DECL_NEEDED_P): Remove parenthesis.
733 (DECL_LANGUAGE): Whitespace.
734 (SET_DECL_LANGUAGE): Add parenthesis.
735 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
736 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
737 (DECL_IN_AGGR_P): Whitespace.
738 (DECL_FRIEND_P): Likewise.
739 (DECL_BEFRIENDING_CLASSES): Likewise.
740 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
741 (DECL_NONCONVERTING_P): Whitespace.
742 (DECL_PURE_VIRTUAL_P): Likewise.
743 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
744 (DECL_PENDING_INLINE_INFO): Whitespace.
745 (DECL_SORTED_FIELDS): Likewise.
746 (DECL_DEFERRED_FN): Likewise.
747 (DECL_TEMPLATE_INFO): Likewise.
748 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
749 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
750 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
751 (TMPL_ARGS_LEVEL): Likewise.
752 (SET_TMPL_ARGS_LEVEL): Likewise.
753 (INNERMOST_TEMPLATE_PARMS): Whitespace.
754 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
755 (INTEGRAL_CODE_P(CODE): Add parenthesis.
756 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
757 (TYPE_HAS_CONSTRUCTOR): Whitespace.
758 (TREE_HAS_CONSTRUCTOR): Likewise.
759 (TYPE_HAS_DESTRUCTOR): Likewise.
760 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
761 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
762 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
763 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
764 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
765 (TYPE_PTRMEMFUNC_P): Likewise.
766 (TYPE_PTRMEMFUNC_FLAG): Likewise.
767 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
768 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
769 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
770 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
771 (DECL_ACCESS): Whitespace.
772 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
773 (DECL_GLOBAL_DTOR_P): Likewise.
774 (GLOBAL_INIT_PRIORITY): Likewise.
775 (DECL_TEMPLATE_PARMS): Likewise.
776 (DECL_TEMPLATE_RESULT): Likewise.
777 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
778 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
779 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
780 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
781 (PRIMARY_TEMPLATE_P): Add parenthesis.
782 (DECL_USE_TEMPLATE): Whitespace.
783 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
784 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
785 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
786 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
787 (CALL_DECLARATOR_PARMS): Remove parenthesis.
788 (CALL_DECLARATOR_QUALS): Likewise.
789 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
790 (TEMP_NAME_P): Wrap.
791 (VFIELD_NAME_P): Likewise.
792 (B_SET): Uppercase macro parameters and add parenthesis.
793 (B_CLR): Likewise.
794 (B_TST): Likewise.
795 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
796 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
797 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
798 (same_or_base_type_p): Likewise.
799 (cp_deprecated): Likewise.
800
801 2002-01-05 Richard Henderson <rth@redhat.com>
802
803 * semantics.c (expand_body): Revert last change.
804
805 2002-01-04 Jason Merrill <jason@redhat.com>
806
807 PR c++/4122
808 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
809 lost primary.
810
811 * class.c (build_vtbl_initializer): Check for a lost primary
812 before calculating the vtable entry to throw away.
813
814 2002-01-02 Jason Merrill <jason@redhat.com>
815
816 * semantics.c (expand_body): Call outlining_inline_function when
817 emitting an inline function out of line.
818
819 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
820
821 PR c++/5116, c++/764 reversion
822 * call.c (build_new_op): Revert the instantiations. They are
823 incorrect.
824
825 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
826
827 PR c++/5089
828 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
829
830 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
831
832 PR c++/3716
833 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
834 (tsubst, case POINTER_TYPE): Handle pmfs here.
835 (tsubst, case OFFSET_TYPE): Check it is not an offset to
836 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
837
838 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
839
840 PR c++/35
841 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
842 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
843 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
844 PARM_DECL.
845 (tsubst_template_parms): Break up loop statements.
846 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
847 parm PARM_DECLs don't get promoted.
848
849 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
850
851 PR c++/5123
852 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
853 (build_x_function_call): Cope with a COMPONENT_REF containing a
854 TEMPLATE_ID_EXPR.
855
856 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
857
858 PR c++/5213
859 * pt.c (convert_template_argument): Be more careful determining
860 when RECORD_TYPE templates are or are not templates.
861
862 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
863
864 PR c++/775
865 * cp-tree.h (handle_class_head): Adjust prototype.
866 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
867 parameters. Use for all class heads.
868 * parse.y (named_class_head_sans_basetype, named_class_head,
869 named_complex_class_head_sans_basetype,
870 named_class_head_sans_basetype_defn,
871 unnamed_class_head): Remove.
872 (class_head, class_head_apparent_template): Recognize class heads
873 (class_head_decl, class_head_defn): New reductions. Process class
874 heads.
875 (structsp): Adjust class definition and class declaration
876 reductions.
877 (maybe_base_class_list): Give diagnostic on empty list.
878
879 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
880
881 PR c++/4379
882 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
883 single non-static member.
884 (unary_complex_lvalue): If it cannot be a pointer to member, don't
885 make it so. Check it is not pointer to reference.
886
887 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
888
889 PR c++/5132
890 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
891 are processing a template decl.
892
893 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
894
895 PR c++/5116, c++/764
896 * call.c (build_new_op): Make sure template class operands are
897 instantiated. Simplify arglist construction.
898
899 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
900
901 * call.c (build_user_type_conversion_1): Use my_friendly_assert
902 rather than if ... abort.
903 * cvt.c (convert_to_reference): Likewise.
904 * semantics.c (setup_vtbl_ptr): Likewise.
905 * pt.c (lookup_template_class): Comment typo.
906
907 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
908
909 PR c++/5125
910 * pt.c (push_template_decl_real): Make sure DECL has
911 DECL_LANG_SPECIFIC.
912
913 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
914
915 PR c++/335
916 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
917 for non-reference fields.
918 * typeck.c (require_complete_type): Use resolve_offset_ref).
919
920 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
921
922 PR c++/196
923 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
924
925 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
926
927 PR c++/160
928 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
929 up. Don't stabilize_references when initializing a reference.
930
931 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
932
933 * decl2.c (lang_f_options): Const-ify.
934
935 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
936
937 * config-lang.in (diff_excludes): Remove.
938
939 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
940
941 PR c++/90
942 * typeck.c (build_function_call_real): Use original function
943 expression for errors.
944
945 2001-12-18 Jason Merrill <jason@redhat.com>
946
947 PR c++/3242
948 * class.c (add_method): Do compare 'this' quals when trying to match a
949 used function. Don't defer to another used function.
950
951 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
952
953 * pt.c (instantiate_clone): Remove, fold into ...
954 (instantiate_template): ... here. Simplify by removing mutual
955 recursion.
956 * typeck2.c (build_m_component_ref): Don't cv qualify the function
957 pointed to by a pointer to function.
958 * class.c (delete_duplicate_fields_1): Typo.
959
960 2001-12-18 Jason Merrill <jason@redhat.com>
961
962 C++ ABI change: destroy value arguments in caller.
963 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
964 create an extra binding level for the parameters.
965 * decl.c (store_parm_decls): Don't do parameter cleanups.
966
967 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
968
969 * call.c (build_new_method_call): Use '%#V'.
970 * error.c (cv_to_string): Use V parameter to determine padding.
971
972 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
973
974 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
975 spellings in messages.
976
977 2001-12-17 Zack Weinberg <zack@codesourcery.com>
978
979 * cp-tree.h: Delete #defines for cp_error, cp_warning,
980 cp_pedwarn, and cp_compiler_error.
981 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
982 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
983 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
984 typeck2.c: Change calls to the above macros to use their
985 language-independent equivalents: error, warning, pedwarn, and
986 internal_error respectively.
987
988 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
989
990 * decl2.c (finish_file): Remove back_end_hook.
991
992 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
993
994 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
995 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
996 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
997
998 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
999
1000 * lang-options.h: Use American spelling in messages.
1001
1002 2001-12-13 Jason Merrill <jason@redhat.com>
1003
1004 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1005
1006 Use cleanups to run base and member destructors.
1007 * init.c (push_base_cleanups): New function, split out from...
1008 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
1009 * decl.c (finish_destructor_body): Move vbase destruction code to
1010 push_base_cleanups.
1011 (begin_function_body, finish_function_body): New fns.
1012 (finish_function): Move [cd]tor handling and call_poplevel to
1013 finish_function_body.
1014 (pushdecl): Skip the new level.
1015 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1016 (setup_vtbl_ptr): Call push_base_cleanups.
1017 * method.c (synthesize_method): Call {begin,end}_function_body.
1018 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1019 * cp-tree.h: Declare new fns.
1020 * parse.y (function_body, .begin_function_body): New nonterminals.
1021 (fndef, pending_inline, function_try_block): Use function_body.
1022 (ctor_initializer_opt, function_try_block): No longer has a value.
1023 (base_init): Remove .set_base_init token.
1024 (.set_base_init, compstmt_or_error): Remove.
1025 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1026
1027 * optimize.c (maybe_clone_body): Fix parameter updating.
1028
1029 2001-12-12 Jason Merrill <jason@redhat.com>
1030
1031 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1032 * semantics.c (genrtl_start_function): Don't pass
1033 parms_have_cleanups or push an extra binding level.
1034 (genrtl_finish_function): Lose cleanup_label cruft.
1035
1036 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1037 (ctor_label): Remove.
1038 * semantics.c (finish_return_stmt): Lose ctor_label support.
1039 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1040 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1041 dtor_label.
1042
1043 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1044 check for [cd]tors.
1045 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1046
1047 * decl.c (finish_function): Check VMS_TARGET, not VMS.
1048
1049 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1050 (end_cleanup_fn): And poplevel.
1051
1052 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1053 if we're in a template.
1054
1055 2001-12-12 Jakub Jelinek <jakub@redhat.com>
1056
1057 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1058 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1059 THIS_NAME_P): Delete.
1060 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1061 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1062 with internal naming scheme.
1063 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1064
1065 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
1066
1067 * decl.c (grokdeclarator): Deprecated implicit typename use.
1068
1069 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
1070
1071 PR g++/51
1072 * parse.y (frob_specs): Indicate it is a language linkage which
1073 contained the extern.
1074 * decl.c (grokdeclarator): Allow extern language linkage with
1075 other specifiers.
1076
1077 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
1078
1079 PR g++/72
1080 * decl.c (add_binding): Don't reject duplicate typedefs involving
1081 template parameters.
1082
1083 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
1084
1085 * parse.y, semantics.c: Similarly.
1086
1087 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
1088
1089 PR g++/87
1090 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1091 (copy_args_p): Rename to ...
1092 (copy_fn_p): ... here.
1093 (grok_special_member_properties): New function.
1094 (grok_op_properties): Lose VIRTUALP parameter.
1095 (copy_assignment_arg_p): Remove.
1096 * call.c (build_over_call): Use copy_fn_p.
1097 * decl.c (grokfndecl): Reformat. Adjust call to
1098 grok_op_properties.
1099 (copy_args_p): Rename to ...
1100 (copy_fn_p): ... here. Reject template functions. Check for pass
1101 by value.
1102 (grok_special_member_properties): Remember special functions.
1103 (grok_ctor_properties): Don't remember them here, just check.
1104 (grok_op_properties): Likewise.
1105 (start_method): Call grok_special_member_properties.
1106 * decl2.c (grokfield): Likewise.
1107 (copy_assignment_arg_p): Remove.
1108 (grok_function_init): Don't remember abstract assignment here.
1109 * pt.c (instantiate_class_template): Call
1110 grok_special_member_properties.
1111 (tsubst_decl): Adjust grok_op_properties call.
1112
1113 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
1114
1115 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1116 RID_TYPES_COMPATIBLE_P.
1117
1118 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
1119
1120 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1121 call to build_aggr_init.
1122 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1123
1124 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
1125
1126 * parse.y: Replace uses of the string non-terminal with STRING.
1127 Don't perform string concatentaion here.
1128 (string): Remove non-terminal.
1129 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1130
1131 2001-12-05 Jason Merrill <jason@redhat.com>
1132
1133 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1134 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1135 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1136 * pt.c (push_tinst_level): No longer static.
1137 * cp-tree.h: Declare them.
1138
1139 * init.c (resolve_offset_ref): Don't check access for the base
1140 conversion to access a FIELD_DECL.
1141
1142 * cp-tree.h (TYPE_REFFN_P): New macro.
1143 * decl.c (bad_specifiers): Check it, too.
1144
1145 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1146 on the __*_type_info type if we haven't seen a definition.
1147
1148 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
1149
1150 * decl.c: Include c-common.h.
1151 (shadow_warning): Move to c-common.c.
1152
1153 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1154
1155 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1156
1157 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1158
1159 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1160
1161 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1162
1163 PR g++/164
1164 * init.c (sort_base_init): Allow binfos to be directly specified.
1165 * method.c (do_build_copy_constructor): Explicitly convert to the
1166 base instance.
1167 (do_build_assign_ref): Likewise.
1168
1169 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
1170
1171 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1172 declaration and initialization.
1173
1174 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
1175
1176 * typeck2.c: Remove leading capital from diagnostic messages, as
1177 per GNU coding standards.
1178
1179 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
1180
1181 PR c++/3394
1182 * decl.c (xref_basetypes): Handle attributes between
1183 'class' and name.
1184
1185 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
1186
1187 PR g++/3381
1188 * parse.y (named_complex_class_head_sans_basetype): Add new
1189 reduction.
1190 * Make-lang.in (parse.c): Adjust expected conflict count.
1191
1192 2001-12-03 Jason Merrill <jason@redhat.com>
1193
1194 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1195 immediate binfos for our virtual bases.
1196
1197 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
1198
1199 * call.c (build_java_interface_fn_ref): Similarly.
1200 * except.c (is_admissible_throw_operand): Similarly.
1201 * init.c (build_java_class_ref): Similarly.
1202 * xref.c (open_xref_file): Similarly.
1203
1204 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
1205
1206 * class.c (finish_struct): Remove trailing periods from messages.
1207 * decl.c (check_tag_decl): Similarly.
1208 * lex.c (cxx_set_yydebug): Similarly.
1209 * typeck2.c (friendly_abort): Similarly.
1210
1211 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1212
1213 PR c++/3048
1214 * cp-tree.h (ovl_member): Remove.
1215 * decl2.c (merge_functions): Handle extern "C" functions
1216 specially.
1217 * tree.c (ovl_member): Remove.
1218
1219 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1220
1221 PR c++/4842
1222 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1223 FUNCTION_DECL, as input.
1224 (mark_overriders): Remove.
1225 (warn_hidden): Rework for the new ABI.
1226
1227 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1228
1229 PR c++/3471
1230 * call.c (convert_like_real): Do not build additional temporaries
1231 for rvalues of class type.
1232
1233 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
1234
1235 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1236 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1237 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1238 (DERIVED_FROM_P): Likewise.
1239 (enum base_access): Renumber, add ba_quiet bit mask.
1240 (get_binfo): Remove.
1241 (get_base_distance): Remove.
1242 (binfo_value): Remove.
1243 (ACCESSIBLY_DERIVED_FROM_P): Remove.
1244 * call.c (standard_conversion): Use lookup_base.
1245 * class.c (strictly_overrides): Likewise.
1246 (layout_virtual_bases): Likewise.
1247 (warn_about_ambiguous_direct_bases): Likewise.
1248 (is_base_of_enclosing_class): Likewise.
1249 (add_vcall_offset_vtbl_entries_1): Likewise.
1250 * cvt.c (build_up_reference): Adjust comment.
1251 * init.c (build_member_call): Reformat.
1252 * search.c (get_binfo): Remove.
1253 (get_base_distance_recursive): Remove.
1254 (get_base_distance): Remove.
1255 (lookup_base_r): Tweak.
1256 (lookup_base): Add ba_quiet control. Complete the types here.
1257 (covariant_return_p): Use lookup_base.
1258 * tree.c (binfo_value): Remove.
1259 (maybe_dummy_object): Use lookup_base.
1260 * typeck.c (build_static_cast): Use lookup_base.
1261 (get_delta_difference): Likewise.
1262 * typeck2.c (binfo_or_else): Use lookup_base.
1263 (build_scoped_ref): Add back error_mark_check.
1264 (build_m_component_ref): Use lookup_base.
1265
1266 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
1267
1268 * Make-lang.in (c++.generated-manpages): New dummy target.
1269
1270 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1271
1272 * Make-lang.in (cp-lang.o): Depends on c-common.h.
1273 * cp-lang.c (c-common.h): Include.
1274 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1275 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1276 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1277
1278 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
1279
1280 * decl2.c (c_language): Move to c-common.c.
1281 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1282 functions.
1283 (cxx_init): Update.
1284
1285 2001-11-26 Jason Merrill <jason@redhat.com>
1286
1287 * call.c (joust): Remove COND_EXPR hack.
1288
1289 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
1290
1291 * search.c (lookup_base_r): Declare bk in variable declaration
1292 space.
1293
1294 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
1295
1296 PR g++/3145
1297 * class.c (build_vbase_pointer): Remove.
1298 (build_vbase_path): Remove.
1299 (build_base_path): New function.
1300 * cp-tree.h (base_access, base_kind): New enumerations.
1301 (build_base_path): Declare.
1302 (convert_pointer_to_real): Remove.
1303 (convert_pointer_to): Remove.
1304 (lookup_base): Declare.
1305 (convert_pointer_to_vbase): Remove.
1306 * call.c (build_scoped_method_call): Use lookup_base &
1307 build_base_path instead of convert_pointer_to_real,
1308 get_base_distance & get_binfo.
1309 (build_over_call): Likewise.
1310 * cvt.c (cp_convert_to_pointer): Likewise.
1311 (convert_to_pointer_force): Likewise.
1312 (build_up_reference): Likewise.
1313 (convert_pointer_to_real): Remove.
1314 (convert_pointer_to): Remove.
1315 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1316 instead of convert_pointer_to_vbase & build_vbase_path.
1317 (emit_base_init): Use build_base_path instead of
1318 convert_pointer_to_real.
1319 (expand_virtual_init): Lose unrequired conversions.
1320 (resolve_offset_ref): Use lookup_base and build_base_path
1321 instead of convert_pointer_to.
1322 * rtti.c (build_dynamic_cast_1): Use lookup_base &
1323 build_base_path instead of get_base_distance & build_vbase_path.
1324 * search.c (get_vbase_1): Remove.
1325 (get_vbase): Remove.
1326 (convert_pointer_to_vbase): Remove.
1327 (lookup_base_r): New function.
1328 (lookup_base): New function.
1329 * typeck.c (require_complete_type): Use lookup_base &
1330 build_base_path instead of convert_pointer_to.
1331 (build_component_ref): Likewise.
1332 (build_x_function_call): Likewise.
1333 (get_member_function_from_ptrfunc): Likewise.
1334 (build_component_addr): Likewise.
1335 * typeck2.c (build_scoped_ref): Likewise.
1336
1337 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1338
1339 * cp-tree.h (CP_TYPE_QUALS): Removed.
1340 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1341 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1342 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1343 * dump.c (cp_dump_tree): Use void* dump_info argument to match
1344 lang-hooks prototype.
1345 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1346 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1347 CP_TYPE_QUALS changed to cp_type_quals.
1348 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1349 (CXX_C_OBJS): Remove c-dump.o.
1350
1351 2001-11-21 Mark Mitchell <mark@codesourcery.com>
1352
1353 PR c++/3637
1354 * pt.c (lookup_template_class): Ensure that all specializations
1355 are registered on the list corresponding to the most general
1356 template.
1357
1358 2001-11-20 Mark Mitchell <mark@codesourcery.com>
1359
1360 * call.c (non_reference): Add documentation.
1361 (convert_class_to_reference): Do not strip reference types
1362 from conversion operators.
1363 (maybe_handle_ref_bind): Simplify.
1364 (compare_ics): Correct handling of references.
1365
1366 2001-11-19 John Wilkinson <johnw@research.att.com>
1367
1368 * dump.c (dump_op): New function.
1369 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
1370 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1371 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1372
1373 2001-11-19 Mark Mitchell <mark@codesourcery.com>
1374
1375 PR4629
1376 * semantics.c (finish_sizeof): Make sure that expression created
1377 while processing a template do not have a type.
1378 (finish_alignof): Likewise.
1379 * typeck.c (c_sizeof): Likewise.
1380 (expr_sizeof): Likewise.
1381
1382 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
1383
1384 * lex.c (cxx_finish): Call c_common_finish.
1385 (finish_parse): Remove.
1386
1387 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1388
1389 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1390 when displaying error message about missing array bounds.
1391
1392 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1393
1394 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1395 CONST_CAST_EXPR.
1396 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1397
1398 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
1399
1400 * cp-tree.h (print_class_statistics): Restore.
1401
1402 2001-11-15 Jason Merrill <jason@redhat.com>
1403
1404 * method.c (use_thunk): Don't emit debugging information for thunks.
1405
1406 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1407 * decl.c (make_typename_type): Handle getting a class template.
1408 * search.c (lookup_field_r): A class template is good enough for
1409 want_type.
1410
1411 * call.c (convert_like_real): Only use cp_convert for the bad part.
1412 (standard_conversion): Also allow bad int->enum.
1413 * typeck.c (ptr_reasonably_similar): Also allow functions to
1414 interconvert. Pointers to same-size integers are reasonably
1415 similar.
1416
1417 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1418 give it void type.
1419
1420 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
1421
1422 PR g++/3154
1423 * init.c (sort_base_init): Remove unreachable code.
1424 (expand_member_init): Adjust comment to reflect reality. Simplify
1425 and remove unreachable code.
1426
1427 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
1428
1429 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1430 (cxx_init): Update prototype.
1431 * decl.c (init_decl_processing): Rename. Move null node init
1432 to its creation time.
1433 * lex.c (cxx_init_options): Update.
1434 (cxx_init): Combine with old init_parse; also call
1435 cxx_init_decl_processing.
1436
1437 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
1438
1439 * decl.c (check_initializer): Try to complete the type of an
1440 array element before checking whether it's complete. Don't
1441 complain about arrays with complete element types but an
1442 unknown size.
1443 (cp_finish_decl): Build the hierarchical constructor before
1444 calling maybe_deduce_size_from_array_init.
1445
1446 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
1447
1448 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1449
1450 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
1451
1452 PR g++/4206
1453 * parse.y (already_scoped_stmt): Remove.
1454 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1455
1456 2001-11-12 H.J. Lu <hjl@gnu.org>
1457
1458 * cvt.c (ocp_convert): Don't warn the address of a weak
1459 function is always `true'.
1460
1461 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1462
1463 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1464 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1465 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1466 * cp-tree.h (print_class_statistics): Remove.
1467 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1468 cxx_print_identifier, cxx_set_yydebug): New.
1469 * lex.c (set_yydebug): Rename c_set_yydebug.
1470 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1471 lang_print_xnode): Rename.
1472 * tree.c (print_lang_statistics): Rename.
1473
1474 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1475
1476 * class.c (dump_array): Fix format specifier warning.
1477
1478 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1479
1480 * cp-lang.c (LANG_HOOKS_NAME): Override.
1481 (struct lang_hooks): Constify.
1482 * lex.c (cxx_init_options): Update.
1483 (lang_identify): Remove.
1484 * parse.y (language_string): Remove.
1485
1486 2001-11-08 Andreas Franck <afranck@gmx.de>
1487
1488 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
1489 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
1490 suggested by autoconf.
1491 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
1492 (c++.install-common): Use the transformed target alias names.
1493
1494 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1495
1496 * Make-lang.in: Update.
1497 * cp-lang.c: Include langhooks-def.h.
1498
1499 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1500
1501 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
1502
1503 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1504
1505 * lex.c (copy_lang_type): Add static prototype.
1506
1507 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1508
1509 * pt.c (unify): Handle SCOPE_REF.
1510
1511 2001-11-01 Jakub Jelinek <jakub@redhat.com>
1512
1513 * tree.c (cp_copy_res_decl_for_inlining): Adjust
1514 DECL_ABSTRACT_ORIGIN for the return variable.
1515
1516 2001-10-31 Zack Weinberg <zack@codesourcery.com>
1517
1518 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1519
1520 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
1521
1522 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
1523 semantics.c, spew.c: Fix spelling errors.
1524
1525 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1526
1527 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
1528
1529 2001-10-25 Zack Weinberg <zack@codesourcery.com>
1530
1531 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
1532 pop_everything.
1533
1534 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1535
1536 * cp-lang.c (cxx_get_alias_set): New function.
1537 Point LANG_HOOKS_GET_ALIAS_SET to it.
1538
1539 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1540
1541 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
1542 * cp-tree.h (make_unbound_class_template): Prototype new function.
1543 * decl.c (make_unbound_class_template): New function.
1544 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
1545 * error.c (dump_type): Likewise.
1546 * mangle.c (write_type): Likewise.
1547 * parse.y (template_parm): Likewise.
1548 (template_argument): Use make_unbound_class_template.
1549 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
1550 (tsubst): Likewise.
1551 (tsubst_copy): Likewise.
1552 (unify): Likewise.
1553 * tree.c (walk_tree): Likewise.
1554 * typeck.c (comptypes): Likewise.
1555
1556 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1557
1558 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
1559 extra calls into fewer ones.
1560
1561 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
1562
1563 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
1564 Warn when merging inline with attribute noinline.
1565 (start_decl, start_function): Warn if inline and attribute
1566 noinline appear in the same declaration.
1567
1568 2001-10-16 H.J. Lu <hjl@gnu.org>
1569
1570 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
1571 for tree checking disabled.
1572
1573 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
1574
1575 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
1576 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
1577
1578 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1579
1580 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
1581 (unify): Only handle MINUS_EXPR specially if the above flag is set
1582 and the subtracted constant is 1. Clear the flag on recursive calls.
1583 Set it when unifying the maximum value in an INTEGER_TYPE's range.
1584
1585 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1586
1587 * decl.c (bad_specifiers): Don't allow exception specifications
1588 on any typedefs.
1589
1590 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
1591
1592 * cp/lex.c (init_cp_pragma): Similarly.
1593
1594 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1595
1596 * pt.c (lookup_template_class): Build complete template arguments
1597 for BOUND_TEMPLATE_TEMPLATE_PARM.
1598
1599 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1600
1601 * cp-tree.h (TYPE_BINFO): Update comment.
1602 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
1603 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
1604 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
1605 (copy_type): Prototype new function.
1606 * lex.c (copy_lang_decl): Gather tree node statistics.
1607 (copy_lang_type): New function.
1608 (copy_type): Likewise.
1609 (cp_make_lang_type): Create lang_type for
1610 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
1611 and BOUND_TEMPLATE_TEMPLATE_PARM.
1612 * pt.c (tsubst): Use copy_type instead of copy_node.
1613 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
1614
1615 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1616
1617 * pt.c (determine_specialization): Ignore functions without
1618 DECL_TEMPLATE_INFO.
1619
1620 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
1621
1622 PR g++/4476
1623 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
1624
1625 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
1626
1627 * typeck2.c (store_init_value): Don't re-digest a bracketed
1628 initializer.
1629
1630 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
1631 ANON_AGGR_TYPE_P.
1632
1633 2001-10-11 Richard Henderson <rth@redhat.com>
1634
1635 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
1636 of an asm statement.
1637 (build_vtbl_ref_1): Split out from build_vtbl_ref.
1638 (build_vfn_ref): Use it to handle vtable descriptors before
1639 calling build_vtable_entry_ref.
1640 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
1641
1642 2001-10-10 Richard Henderson <rth@redhat.com>
1643
1644 * parse.y (asm_operand): Allow named operands.
1645 * semantics.c (finish_asm_stmt): Tweek for changed location
1646 of the operand constrant.
1647
1648 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
1649
1650 * call.c (standard_conversion): Add bad conversion between
1651 integers and pointers.
1652 (convert_like_real): Don't use convert_for_initialization for bad
1653 conversions; complain here and use cp_convert.
1654 (build_over_call): Don't handle bad conversions specially.
1655 (perform_implicit_conversion): Allow bad conversions.
1656 (can_convert_arg_bad): New fn.
1657 * cp-tree.h: Declare it.
1658 * typeck.c (convert_for_assignment): Use it.
1659 (ptr_reasonably_similar): Any target type is similar to void.
1660
1661 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
1662
1663 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
1664 (cp/cp-lang.o): New rule.
1665 * cp-tree.h: Declare hooks.
1666 * tree.c: Make hooks non-static.
1667 (init_tree): Don't initialize hooks here.
1668 * lex.c: Likewise. Move definition of lang_hooks to...
1669 * cp-lang.c: ... new file.
1670
1671 2001-10-08 Richard Henderson <rth@redhat.com>
1672
1673 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
1674 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
1675
1676 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1677
1678 * class.c (build_vtable_entry_ref): Const-ify.
1679 * decl.c (predefined_identifier,
1680 initialize_predefined_identifiers): Likewise.
1681 * init.c (build_new_1): Likewise.
1682 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
1683 Likewise.
1684
1685 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
1686
1687 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
1688 (INSNS_PER_STMT): Likewise.
1689 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
1690 (copy_body, initialize_inlined_parameters): Likewise.
1691 (declare_return_variable, inlinable_function_p): Likewise.
1692 (expand_call_inline, expand_calls_inline): Likewise.
1693 (optimize_inline_calls, clone_body): Likewise.
1694 * tree.c (walk_tree): Moved to ../tree-inline.c.
1695 (walk_tree_without_duplicates): Likewise.
1696 (copy_tree_r, remap_save_expr): Likewise.
1697
1698 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
1699
1700 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
1701 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
1702 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
1703 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
1704 (flag_inline_trees): Moved declaration to ../tree-inline.h.
1705 (walk_tree): Moved declaration to ../tree-inline.h.
1706 (walk_tree_without_duplicates, copy_tree_r): Likewise.
1707 (remap_save_expr): Likewise.
1708 * decl.c: Include tree-inline.h.
1709 (lang_mark_tree): Don't mark inlined_fns.
1710 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
1711 * optimize.c: Include tree-inline.h.
1712 (optimize_inline_calls): Move declaration to ../tree.h, as
1713 non-static.
1714 (remap_decl): Use language-independent constructs and hooks.
1715 (remap_block, copy_body_r, declare_return_variable): Likewise.
1716 (inlinable_function_p): Likewise. Don't test for
1717 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
1718 no longer language-specific.
1719 (optimize_inline_calls): Likewise. Make it non-static. Moved
1720 call of dump_function to...
1721 (optimize_function): Here...
1722 (clone_body): New function, extracted from...
1723 (maybe_clone_body): ... here. Build decl_map locally and pass
1724 it on to clone_body.
1725 * pt.c, semantics.c: Include tree-inline.h.
1726 * tree.c: Likewise.
1727 (cp_walk_subtrees): New language-specific hook for tree inlining.
1728 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
1729 cp_is_overload_p, cp_auto_var_in_fn_p,
1730 cp_copy_res_decl_for_inlining): Likewise.
1731 (walk_tree): Move language-specific constructs into...
1732 (cp_walk_subtrees): this new function.
1733 (copy_tree_r): Use language-independent constructs and hooks.
1734 (init_tree): Initialize tree inlining hooks.
1735 (remap_save_expr): Adjust prototype so that the declaration
1736 does not require the definition of splay_tree.
1737
1738 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
1739
1740 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
1741 to build the declaration instead of the declaration itself.
1742
1743 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
1744
1745 * decl2.c (cxx_decode_option): Add 'else'.
1746
1747 * spew.c (end_input): No longer static.
1748 * cp-tree.h: Declare it.
1749 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
1750
1751 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1752
1753 * call.c (build_over_call), typeck.c (build_function_call_real):
1754 Pass type attributes to check_function_format rather than name or
1755 assembler name. Don't require there to be a name or assembler
1756 name to check formats.
1757
1758 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1759
1760 * decl.c (init_decl_processing): Don't call
1761 init_function_format_info. Initialize lang_attribute_table
1762 earlier.
1763 (builtin_function): Call decl_attributes.
1764 (insert_default_attributes): New.
1765
1766 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
1767
1768 * decl.c (grokdeclarator): Copy array typedef handling from C
1769 frontend.
1770
1771 * decl.c (grokdeclarator): Copy too-large array handling from C
1772 frontend.
1773
1774 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
1775
1776 * config-lang.in (target_libs): Added target-gperf, so that we
1777 don't try to build it if C++ is disabled.
1778
1779 2001-09-23 Zack Weinberg <zack@codesourcery.com>
1780
1781 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
1782 (cp/errfn.o): Delete rule.
1783 (cp/error.o): Depend on flags.h.
1784 * errfn.c: Delete file.
1785 * cp-tree.h: Declare warn_deprecated. Remove definitions of
1786 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
1787 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
1788 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
1789 internal_error respectively. Make cp_deprecated into a macro.
1790 Don't define cp_printer typedef or declare cp_printers.
1791 * error.c: Include flags.h.
1792 Delete: struct tree_formatting_info, print_function_argument_list,
1793 print_declaration, print_expression, print_function_declaration,
1794 print_function_parameter, print_type_id, print_cv_qualifier_seq,
1795 print_type_specifier_seq, print_simple_type_specifier,
1796 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
1797 print_parameter_declaration_clause, print_exception_specification,
1798 print_nested_name_specifier, and definition of cp_printers.
1799 (locate_error): New function.
1800 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
1801 rewritten in terms of locate_error and diagnostic.c.
1802 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
1803 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
1804 (init_error): Adjust to match.
1805
1806 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1807
1808 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
1809
1810 2001-09-21 Richard Henderson <rth@redhat.com>
1811
1812 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
1813 (build_vtbl_initializer): Likewise.
1814 (build_vfn_ref): New.
1815 * cp-tree.h: Declare it.
1816 * call.c (build_over_call): Use it.
1817 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
1818 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
1819
1820 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
1821
1822 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
1823
1824 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
1825
1826 Table-driven attributes.
1827 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
1828 * decl2.c (cplus_decl_attributes): Only take one attributes
1829 parameter.
1830 * cp-tree.c (cplus_decl_attributes): Update prototype.
1831 * class.c (finish_struct), decl.c (start_decl, start_function),
1832 decl2.c (grokfield), friend.c (do_friend), parse.y
1833 (parse_bitfield): Update calls to cplus_decl_attributes.
1834 * decl.c (grokdeclarator): Take a pointer to a single ordinary
1835 attribute list.
1836 * decl.h (grokdeclarator): Update prototype.
1837 * decl2.c (grokfield): Take a single ordinary attribute list.
1838 * friend.c (do_friend): Likewise.
1839 * decl.c (shadow_tag, groktypename, start_decl,
1840 start_handler_parms, grokdeclarator, grokparms, start_function,
1841 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
1842 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
1843 (process_template_parm, do_decl_instantiation): Pass single
1844 ordinary attribute lists around.
1845 * decl.c (grokdeclarator): Correct handling of nested attributes.
1846 Revert the patch
1847 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1848 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1849 not the left.
1850 .
1851 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
1852 (cp_attribute_table): Declare.
1853 * decl.c (valid_lang_attribute): Don't define.
1854 (lang_attribute_table): Define.
1855 (init_decl_processing): Initialize lang_attribute_table instead of
1856 valid_lang_attribute.
1857 * tree.c (cp_valid_lang_attribute): Remove.
1858 (handle_java_interface_attribute, handle_com_interface_attribute,
1859 handle_init_priority_attribute): New functions.
1860 (cp_attribute_table): New array.
1861 * decl2.c (import_export_class): Don't use
1862 targetm.valid_type_attribute.
1863
1864 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1865
1866 * Make-lang.in (cp/error.o): Depend on real.h
1867 * error.c: #include "real.h"
1868
1869 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1870
1871 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
1872 xmalloc/strcpy/strcat.
1873
1874 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1875
1876 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
1877 Const-ification.
1878 * pt.c (tsubst_decl): Likewise.
1879
1880 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1881
1882 * decl2.c (lang_f_options): Const-ification.
1883 * lex.c (cplus_tree_code_name): Likewise.
1884 * spew.c (yyerror): Likewise.
1885
1886 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1887
1888 PR c++/3986
1889 * class.c (force_canonical_binfo_r): Check & move an indirect
1890 primary base first.
1891 (force_canonical_binfo): Check that it's not already
1892 canonical.
1893 (mark_primary_virtual_base): Remove BINFO parameter.
1894 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
1895
1896 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1897
1898 Remove TYPE_NONCOPIED_PARTS.
1899 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
1900 CLASSTYPE_PURE_VIRTUALS.
1901 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
1902 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
1903 (layout_class_type): Don't call fixup_inline_methods here ...
1904 (finish_struct_1): ... call it here.
1905
1906 2001-09-04 Mark Mitchell <mark@codesourcery.com>
1907
1908 * decl.c (duplicate_decls): Remove code deadling with
1909 DECL_SAVED_INSNS.
1910 * decl2.c (finish_file): Likewise.
1911 * pt.c (instantiate_decl): Likewise.
1912 * semantics.c (expand_body): Don't defer local functions if
1913 they wouldn't be deferred for some other reason. Don't
1914 generate RTL for functions that will not be emitted.
1915 (genrtl_start_function): Remove code deadling with
1916 DECL_SAVED_INSNS.
1917 (genrtl_finish_function): Likewise.
1918
1919 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
1920
1921 PR c++/4203
1922 * call.c (build_over_call): Do not optimize any empty base
1923 construction.
1924
1925 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1926
1927 * error.c (dump_template_decl): Output template parameters
1928 together with their specifiers.
1929 Output `class' prefix for template template parameter.
1930 (dump_decl): Fix formatting.
1931
1932 2001-08-30 Kurt Garloff <garloff@suse.de>
1933
1934 * optimize.c (inlinable_function_p): Allow only smaller single
1935 functions. Halve inline limit after reaching recursive limit.
1936
1937 2001-08-30 Joern Rennecke <amylaar@redhat.com>
1938 Jason Merrill <jason_merrill@redhat.com>
1939
1940 * class.c (build_vtable_entry_ref): Subtract in char*, not
1941 ptrdiff_t.
1942
1943 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
1944
1945 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
1946 (build_cplus_array_type): Use cp_build_qualified_type, not
1947 TYPE_MAIN_VARIANT, to get an unqualified version.
1948
1949 * decl2.c (grok_alignof): Lose.
1950 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
1951 * typeck.c (c_alignof): Lose.
1952 * semantics.c (finish_sizeof, finish_alignof): New.
1953 * parse.y: Use them.
1954 * cp-tree.h: Declare them.
1955
1956 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
1957
1958 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
1959 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
1960 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
1961
1962 2001-08-19 Jakub Jelinek <jakub@redhat.com>
1963
1964 * typeck2.c (add_exception_specifier): Only require complete type if
1965 not in processing template declaration.
1966
1967 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1968
1969 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
1970 GNU_xref_start_scope and GNU_xref_end_scope.
1971
1972 * tree.c (TYPE_HASH): Moved to ../tree.h.
1973
1974 2001-08-16 Mark Mitchell <mark@codesourcery.com>
1975
1976 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
1977 on COMPOUND_EXPRs.
1978
1979 2001-08-14 Richard Henderson <rth@redhat.com>
1980
1981 * class.c, cp-tree.h (build_vfn_ref): Remove.
1982 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
1983
1984 2001-08-13 Mark Mitchell <mark@codesourcery.com>
1985
1986 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
1987 empty class assignment as having side-effects to avoid
1988 spurious warnings.
1989
1990 2001-08-13 Zack Weinberg <zackw@panix.com>
1991
1992 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
1993 * except.c: Include libfuncs.h.
1994
1995 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1996
1997 * decl.c (grokdeclarator): Clarify diagnostic message.
1998
1999 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2000
2001 * decl2.c (do_nonmember_using_decl): Replace using directive
2002 with using declaration in the error message.
2003
2004 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2005
2006 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2007 criterion to avoid rebuilding expression tree instead of
2008 processing_template_decl.
2009
2010 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2011
2012 Support named return value optimization for inlines, too.
2013 * decl.c (finish_function): Nullify returns here.
2014 * semantics.c (genrtl_start_function): Not here.
2015 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2016 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
2017 Also nullify the CLEANUP_STMT for the nrv.
2018 * cp-tree.h: Declare it.
2019 * optimize.c (declare_return_variable): Replace the nrv with the
2020 return variable.
2021 * typeck.c (check_return_expr): Be more flexible on alignment check.
2022 Ignore cv-quals when checking for a matching type.
2023
2024 2001-08-09 Richard Henderson <rth@redhat.com>
2025
2026 * decl2.c (finish_objects): Use target hooks instead of
2027 assemble_constructor and assemble_destructor.
2028
2029 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
2030
2031 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2032
2033 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
2034
2035 PR c++/3820
2036 Stop using TYPE_NONCOPIED_PARTS.
2037 * call.c (build_over_call): Be careful when copy constructing
2038 or assigning to an empty class.
2039 * class.c (check_bases_and_members): It has a
2040 COMPLEX_ASSIGN_REF if it has a vptr.
2041 (layout_class_type): Don't add empty class padding to
2042 TYPE_NONCOPIED_PARTS.
2043 (finish_struct_1): Don't add the VFIELD either.
2044 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2045 initialization.
2046
2047 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2048
2049 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2050
2051 2001-08-06 Richard Henderson <rth@redhat.com>
2052
2053 * decl2.c (finish_objects): Pass a symbol_ref and priority to
2054 assemble_{constructor,destructor}. Remove priority handling.
2055
2056 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2057
2058 Don't allow template-id in using-declaration.
2059 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2060 (do_class_using_decl): Likewise.
2061
2062 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2063
2064 * cp/spew.c (read_token): No need to pop buffers.
2065
2066 2001-08-02 Stan Shebs <shebs@apple.com>
2067
2068 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2069 (fnaddr_from_vtable_entry): Remove decl.
2070 * method.c (use_thunk): Update comment.
2071
2072 2001-08-01 Andrew Cagney <ac131313@redhat.com>
2073
2074 * repo.c (get_base_filename): Change return value to const char
2075 pointer.
2076
2077 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
2078
2079 Kill -fhonor-std.
2080 * NEWS: Document.
2081 * cp-tree.h (flag_honor_std): Remove.
2082 (CPTI_FAKE_STD): Remove.
2083 (std_node): Remove comment about it being NULL.
2084 (fake_std_node): Remove.
2085 * decl.c (in_fake_std): Remove.
2086 (walk_namespaces_r): Remove fake_std_node check.
2087 (push_namespace): Remove in_fake_std code.
2088 (pop_namespace): Likewise.
2089 (lookup_name_real): Remove fake_std_node check.
2090 (init_decl_processing): Always create std_node. Always add
2091 std:: things there.
2092 (builtin_function): Always put non '_' fns in std.
2093 * decl2.c (flag_honor_std): Remove.
2094 (lang_f_options): Remove honor-std.
2095 (unsupported_options): Add honor-std.
2096 (set_decl_namespace): Remove fake_std_node check.
2097 (validate_nonmember_using_decl): Likewise.
2098 (do_using_directive): Likewise.
2099 (handle_class_head): Likewise.
2100 * dump.c (cp_dump_tree): Likewise.
2101 * except.c (init_exception_processing): Adjust.
2102 * init.c (build_member_call): Remove fake_std_node check.
2103 (build_offset_ref): Likewise.
2104 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2105 * rtti.c (init_rtti_processing): Adjust.
2106
2107 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
2108
2109 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2110 operand while calling cp_tree_equal.
2111
2112 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2113
2114 The 3.0 ABI no longer has vbase pointer fields.
2115 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2116 FORMAT_VBASE_NAME): Remove.
2117 * method.c (do_build_copy_constructor): Adjust.
2118 (do_build_assign_ref): Adjust.
2119 * search.c (lookup_field_r): Adjust.
2120 * typeck.c (build_component_ref): Adjust.
2121
2122 The 3.0 ABI always has a vtable pointer at the start of every
2123 polymorphic class.
2124 * rtti.c (build_headof_sub): Remove.
2125 (build_headof): Adjust.
2126 (get_tinfo_decl_dynamic): No need to check flag_rtti
2127 here. Adjust.
2128 (create_real_tinfo_var): Explain why we need a hidden name.
2129
2130 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2131
2132 PR c++/3631
2133 * class.c (update_vtable_entry_for_fn): The fixed adjustment
2134 of a virtual thunk should be from declaring base.
2135
2136 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2137
2138 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2139 the shared virtual base, so preserving inheritance graph order.
2140
2141 2001-07-30 Andreas Jaeger <aj@suse.de>
2142
2143 * decl2.c: Remove unused var global_temp_name_counter.
2144
2145 2001-07-28 Richard Henderson <rth@redhat.com>
2146
2147 * method.c (pending_inlines): Remove.
2148
2149 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2150
2151 * class.c (mark_primary_virtual_base): Don't adjust base
2152 offsets here.
2153 (dfs_unshared_virtual_bases): Adjust them here.
2154 (mark_primary_bases): Explain why we adjust at the end.
2155
2156 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2157
2158 * class.c (finish_struct_1): When copying the primary base's
2159 VFIELD, make sure we find it is at offset zero.
2160
2161 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2162
2163 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2164 tsubst_expr for default template arguments.
2165
2166 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2167
2168 PR c++/3621
2169 * spew.c (yylex): Only copy the token's lineno, if it is
2170 non-zero.
2171
2172 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2173
2174 PR c++/3624
2175 * call.c (resolve_args): Simplify, call
2176 convert_from_reference.
2177 (build_new_op): Resolve and convert from reference ARG1
2178 earlier. Adjust ARG2 & ARG3 resolve and conversion.
2179
2180 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2181
2182 * decl.c (last_function_parm_tags): Remove.
2183 (current_function_parm_tags): Remove.
2184 (init_decl_processing): Adjust.
2185 (start_function): Adjust.
2186 (store_parm_decls): Adjust.
2187
2188 PR c++/3152
2189 * decl.c (grokdeclarator): Detect when a function typedef is
2190 declaring a function, and create last_function_parms correctly.
2191
2192 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
2193
2194 * call.c (joust): Only prefer a non-builtin candidate to a builtin
2195 one if they have the same signature.
2196
2197 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
2198 it rather than toplevel_bindings_p. Give it a mangled name if static.
2199 (convert_to_reference): Adjust.
2200 * decl2.c (get_temp_name): Lose.
2201 * mangle.c (mangle_ref_init_variable): New fn.
2202 (mangle_guard_variable): Strip the ref-init header.
2203 * cp-tree.h: Adjust.
2204 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2205 initializer.
2206 (grok_reference_init): Always use DECL_INITIAL.
2207
2208 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2209
2210 PR c++/3416
2211 * call.c (build_conditional_expr): Recheck args after
2212 conversions.
2213 * cp-tree.h (build_conditional_expr): Move to correct file.
2214 * typeck.c (decay_conversion): Diagnose any unknown types
2215 reaching here.
2216 (build_binary_op): Don't do initial decay or default
2217 conversions on overloaded functions.
2218 (build_static_cast): Don't do a decay conversion here.
2219
2220 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2221
2222 PR c++/3543
2223 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2224 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2225
2226 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2227
2228 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2229 (create_vtbl_ptr): ... here.
2230
2231 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2232
2233 * class.c (build_vbase_offset_vbtl_entries): Look for
2234 non-primary base of which we are a sub vtable.
2235
2236 2001-07-24 Phil Edwards <pme@sources.redhat.com>
2237
2238 * semantics.c (finish_this_expr): Remove unused code.
2239
2240 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
2241
2242 Simplify rtti, now we've only one ABI.
2243 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2244 CPTI_TINFO_VAR_ID.
2245 (tinfo_decl_id, tinfo_var_id): Remove.
2246 (get_typeid_1): Remove.
2247 * rtti.c
2248 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2249 (typeid_ok_p): New function.
2250 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2251 (get_tinfo_decl): Remove old abi documentation.
2252 (tinfo_from_decl): Remove.
2253 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2254 (get_typeid_1): Remove.
2255 (get_base_offset): Remove.
2256 (synthesize_tinfo_var): Absorb get_base_offset.
2257 (create_real_tinfo_var): Don't use tinfo_decl_id.
2258
2259 2001-07-23 Graham Stott <grahams@redhat.com>
2260
2261 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2262 variable has_two_argument_delete_p.
2263
2264 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
2265
2266 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2267 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2268 (CPTI_INDEX_IDENTIFIER): Remove.
2269 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2270 (delta2_identifier): Remove.
2271 (index_identifier): Remove.
2272 (pfn_or_delta2_identifier): Remove.
2273 (flag_vtable_thunks): Remove.
2274 (VTABLE_DELTA2_NAME): Remove.
2275 (VTABLE_INDEX_NAME): Remove.
2276 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2277 (vfunc_ptr_type_node): Adjust.
2278 (VTABLE_NAME_PREFIX): Adjust.
2279 (build_vfn_ref): Lose first parameter.
2280 (fixup_all_virtual_upcast_offsets): Remove.
2281 * decl.c (initialize_predefined_identifiers): Remove
2282 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2283 (init_decl_processing): Remove no-vtable-thunk code.
2284 * decl2.c (flag_vtable_thunks): Remove.
2285 (mark_vtable_entries): Remove no-vtable-thunk code.
2286 * error.c (dump_decl): Remove no-vtable-thunk code.
2287 (dump_expr): Adjust ptr to member function code.
2288 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2289 code.
2290 * rtti.c (build_headof): Remove no-vtable-thunk code.
2291 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2292 * search.c (get_base_distance): Remove expand_upcast_fixups case.
2293 (virtual_context) Remove.
2294 (expand_upcast_fixups): Remove.
2295 (fixup_virtual_upcast_offsets): Remove.
2296 (fixup_all_virtual_upcast_offsets): Remove.
2297 * typeck.c (get_member_function_from_ptrfunc): Remove
2298 no-vtable-thunk code.
2299 * call.c (build_over_call): Adjust call to build_vfn_ref.
2300 * class.c (build_vfn_ref): Lose first parameter. Remove
2301 no-vtable-thunk code.
2302 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2303 (build_vtable_entry): Remove no-vtable-thunk code.
2304
2305 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
2306
2307 Remove old-abi remnants. Remove comments about old abi
2308 behaviour. Remove references to 'new-abi' in comments.
2309 * cp-tree.h: Adjust comments.
2310 (vbase_offsets_in_vtable_p): Delete.
2311 (vcall_offsets_in_vtable_p): Delete.
2312 (vptrs_present_everywhere_p): Delete.
2313 (all_overridden_vfuns_in_vtables_p): Delete.
2314 (merge_primary_and_secondary_vtables_p): Delete.
2315 (TYPE_CONTAINS_VPTR_P): Adjust.
2316 (VTT_NAME_PREFIX): Remove.
2317 (CTOR_VTBL_NAME_PREFIX): Remove.
2318 (init_vbase_pointers): Remove.
2319 * class.c: Adjust coments.
2320 (build_vbase_pointer_fields): Delete.
2321 (build_vbase_pointer): Remove old-abi code.
2322 (build_secondary_vtable): Likewise.
2323 (modify_all_vtables): Likewise.
2324 (create_vtable_ptr): Likewise.
2325 (layout_class_type): Likewise.
2326 (finish_struct_1): Likewise.
2327 (finish_vtbls): Likewise.
2328 (dfs_finish_vtbls): Delete.
2329 (build_vbase_offset_vtbl_entries): Remove old-abi code.
2330 * cvt.c: Adjust comments.
2331 * decl.c: Adjust comments.
2332 * decl2.c: Adjust comments.
2333 * init.c: Adjust comments.
2334 (construct_virtual_bases): Remove old-abi code.
2335 * lang-specs.h: Remove -fno-new-abi.
2336 * mangle.c: Adjust comments.
2337 * rtti.c: Adjust comments.
2338 (get_base_offset): Remove old-abi-code.
2339 * search.c: Adjust comments.
2340 (dfs_init_vbase_pointers): Remove.
2341 (dfs_vtable_path_unmark): Remove.
2342 (init_vbase_pointers): Remove.
2343 * semantics.c: Adjust comments.
2344 (emit_associated_thunks): Remove old-abi code.
2345 * typeck.c: Adjust comments.
2346
2347 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
2348
2349 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2350 params.h.
2351
2352 2001-07-19 Mark Mitchell <mark@codesourcery.com>
2353
2354 * class.c (finish_struct_anon): Forbid nested classes.
2355
2356 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2357
2358 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2359 * optimize.c: Include debug.h.
2360 (maybe_clone_body): Use debug hook.
2361 * semantics.c: Include debug.h.
2362 (expand_body): Use debug hook.
2363
2364 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2365
2366 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2367
2368 2001-07-18 Mark Mitchell <mark@codesourcery.com>
2369
2370 * class.c (type_requires_array_cookie): New function.
2371 (check_methods): Don't try to figure out whether the type needs a
2372 cookie here.
2373 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2374 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2375 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2376 * pt.c (instantiate_class_template): Don't set
2377 TYPE_VEC_DELETE_TAKES_SIZE.
2378 * NEWS: Document ABI changes from GCC 3.0.
2379
2380 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
2381 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2382
2383 * NEWS (Changes in GCC 3.0): Fix typo.
2384
2385 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
2386
2387 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2388 which attributes are to be attached, and a flags argument. Update
2389 call to decl_attributes.
2390 (grokfield): Update call to decl_attributes.
2391 * class.c (finish_struct): Update call to cplus_decl_attributes.
2392 * cp-tree.h (cplus_decl_attributes): Update prototype.
2393 * decl.c (start_decl, grokdeclarator, start_function): Update
2394 calls to decl_attributes and cplus_decl_attributes.
2395 * friend.c (do_friend): Update call to cplus_decl_attributes.
2396 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2397
2398 2001-07-12 Mark Mitchell <mark@codesourcery.com>
2399
2400 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2401 for `register' variables with an asm-specification.
2402
2403 2001-07-11 Mark Mitchell <mark@codesourcery.com>
2404
2405 * semantics.c (finish_asm_stmt): Mark the output operands
2406 to an asm addressable, if necessary.
2407
2408 2001-07-11 Ben Elliston <bje@redhat.com>
2409
2410 * Revert this change -- there is a subtle bug.
2411
2412 PR c++/80
2413 * decl.c (finish_enum): New "attributes" argument; pass it to
2414 cplus_decl_attributes. Use a narrower type if the enum is packed.
2415 * cp-tree.h (finish_enum): Adjust prototype.
2416 * parse.y (enum_head): New non-terminal.
2417 (structsp): Use it. Enums now may be preceded or followed by
2418 optional attributes -- pass their chained tree to finish_enum().
2419 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2420
2421 2001-07-10 Mark Mitchell <mark@codesourcery.com>
2422
2423 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2424 variables.
2425
2426 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
2427
2428 * semantics.c (cp_expand_stmt): Fix for null
2429 current_function_return_value.
2430
2431 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
2432
2433 * call.c (build_op_delete_call): Initialize fn.
2434 (convert_like_real): Delete conditional.
2435 (joust): Initialize *w and *l.
2436 * class.c: Add prototype for binfo_ctor_vtable.
2437 (get_primary_binfo): Initialize result.
2438 * init.c (build_java_class_ref): Initialize name.
2439
2440 2001-07-09 Erik Rozendaal <dlr@acm.org>
2441
2442 * typeck.c (unary_complex_lvalue): Do not duplicate the
2443 argument to modify, pre-, or post-increment when used as an
2444 lvalue and when the argument has side-effects.
2445
2446 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2447
2448 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2449 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
2450 cplus_decl_attributes even if attrs is NULL.
2451 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2452
2453 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2454
2455 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2456 calls to decl_attributes.
2457
2458 2001-07-06 Ira Ruben <ira@apple.com>
2459
2460 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2461 be DECL_TEMPLATE_RESULT.
2462
2463 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2464
2465 * cp-tree.h (copy_template_template_parm): Rename to ...
2466 (bind_template_template_parm): ... here.
2467 * tree.c (copy_template_template_parm): Rename to ...
2468 (bind_template_template_parm): ... here. Remove the case when
2469 NEWARGS is NULL_TREE.
2470 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2471 BOUND_TEMPLATE_TEMPLATE_PARM.
2472 * pt.c (lookup_template_class): Adjust.
2473
2474 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
2475
2476 * cvt.c (convert_lvalue): New fn.
2477 * cp-tree.h: Declare it.
2478 * method.c (do_build_assign_ref): Use it.
2479 (do_build_copy_constructor): Convert parm to base types
2480 before calling base constructors.
2481
2482 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
2483 DECL_USER_ALIGN. Check flag_elide_constructors instead of
2484 optimize.
2485 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
2486
2487 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
2488
2489 * optimize.c (optimize_inline_calls): New function, broken out
2490 of ...
2491 (optimize_function): ... here. Call it. Don't inline if it is
2492 a thunk.
2493 (dump_function): Print name of dump flag causing this dump.
2494 * semantics.c (expand_body): Move thunk inline check to
2495 optimize_function.
2496
2497 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
2498
2499 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
2500 (comptypes): Use target.comp_type_attributes.
2501
2502 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
2503
2504 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2505
2506 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2507
2508 * error.c (lang_print_error_function): Add a `diagnostic_context *'
2509 parameter. Tweak.
2510
2511 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2512
2513 * decl2.c (import_export_class): Update.
2514
2515 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2516
2517 * error.c (init_error): Adjust settings.
2518
2519 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2520
2521 * error.c (init_error): Adjust settings.
2522
2523 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
2524
2525 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
2526 return pointers to data members by reference rather than by value.
2527
2528 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
2529
2530 Implement the Named Return Value optimization.
2531 * cp-tree.h (struct cp_language_function): Add x_return_value.
2532 (current_function_return_value): Now a macro.
2533 * decl.c: Don't define it.
2534 (define_label, finish_case_label): Don't clear it.
2535 (init_decl_processing): Don't register it with GC.
2536 * semantics.c (genrtl_finish_function): Don't check it for
2537 no_return_label. Copy the RTL from the return value to
2538 current_function_return_value and walk, calling...
2539 (nullify_returns_r): ...this new fn.
2540 * typeck.c (check_return_expr): Set current_function_return_value.
2541
2542 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
2543
2544 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
2545 sharing a ctor vtable with. Merge code for cases 1 and 2.
2546 (binfo_ctor_vtable): New fn.
2547 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2548
2549 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
2550
2551 * class.c (dfs_find_final_overrider): Fix logic.
2552
2553 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
2554 virtual thunk instead of non-virtual.
2555 (get_matching_virtual): Uncomment.
2556
2557 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
2558 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
2559 PARM, not ARG.
2560
2561 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
2562
2563 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
2564 we've not emerged from the hierarchy of RTTI_BINFO on reaching
2565 a non-virtual base.
2566
2567 2001-06-13 Mark Mitchell <mark@codesourcery.com>
2568
2569 * NEWS: Update release number.
2570
2571 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2572
2573 PR c++/3130, c++/3131, c++/3132
2574 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
2575 * class.c (force_canonical_binfo_r): Move
2576 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
2577 virtual bases unless they're primary and what they're primary
2578 too has been moved.
2579 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
2580 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
2581 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
2582 derived binfo.
2583 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
2584 (layout_nonempty_base_or_field): Add most derived type
2585 parameter. Adjust.
2586 (layout_empty_base): Likewise.
2587 (build_base_field): Likewise.
2588 (build_base_fields): Likewise.
2589 (propagate_binfo_offsets): Add most derived type
2590 parameter. Skip non canonical virtual bases too.
2591 (dfs_set_offset_for_unshared_vbases): Don't skip primary
2592 bases. Do skip canonical bases.
2593 (layout_virtual_bases): Adjust.
2594 (layout_class_type): Adjust.
2595 (dfs_get_primary_binfo): Build list of virtual primary base
2596 candidates.
2597 (get_primary_binfo): Check that the shared virtual primary
2598 base candidate was found first.
2599 (accumulate_vtbl_inits): Don't do anything for non-vptr
2600 containing binfos. For case 1 primary virtual bases, keep
2601 checking that we've not emerged from the hierarchy of RTTI_BINFO.
2602
2603 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2604
2605 PR c++/3089
2606 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
2607 hierarchy looking for primary bases for a ctor
2608 vtable. Recursively call oneself, if we meet our primary via
2609 this route and haven't met it yet via inheritance graph order.
2610
2611 2001-06-11 Mark Mitchell <mark@codesourcery.com>
2612
2613 * lang-options.h: Emit documentation for -fno-honor-std, not
2614 -fhonor-std.
2615
2616 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
2617
2618 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
2619 Don't clobber delta.
2620 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
2621
2622 2001-06-10 Mark Mitchell <mark@codesourcery.com>
2623 Gabriel Dos Reis <gdr@codesourcery.com>
2624
2625 * Make-lang.in (cp/call.o): Depend on diagnostic.h
2626 (cp/typeck.o): Depend on diagnostic.h
2627 (cp/typeck2.o): Depend on diagnostic.h
2628 (cp/repo.o): Depend on dignostic.h
2629 * typeck.c: #include diagnostic.h
2630 (convert_for_initialization): Remove extern declaration for
2631 warningcount and errorcount.
2632
2633 * call.c: #include diagnostic.h
2634 (convert_like_real): Remove extern declaration for warnincount and
2635 errorcount.
2636
2637 * repo.c: #include diagnostic.h
2638 * typeck2.c: #include diagnostic.h
2639
2640 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2641
2642 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
2643 in previous change.
2644
2645 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2646
2647 PR c++/2929
2648 * friend.c (do_friend): Use push_decl_namespace for classes at
2649 namespace scope.
2650
2651 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2652 Jason Merrill <jason_merrill@redhat.com>
2653
2654 PR c++/3061
2655 * class.c (build_secondary_vtable): Use assert, rather than an error
2656 message.
2657 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
2658 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
2659 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
2660 Don't set BINFO_VTABLE for a primary virtual base.
2661
2662 2001-06-07 Mark Mitchell <mark@codesourcery.com>
2663
2664 * decl.c (duplicate_decls): Update source position information
2665 when a template function is defined.
2666
2667 2001-06-07 Phil Edwards <pme@sources.redhat.com>
2668
2669 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
2670
2671 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
2672
2673 PR c++/2914
2674 * decl.c (pushtag): Don't push into a complete type's scope.
2675
2676 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
2677
2678 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
2679 (struct lang_decl_flags): Lose generate_with_vtable_p.
2680 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
2681 * class.c (copy_virtuals): Adjust.
2682 * decl2.c (mark_vtable_entries): Adjust.
2683 * method.c (make_thunk, build_vtable_entry): Adjust.
2684 * class.c (update_vtable_entry_for_fn): Only look as far as the
2685 first defining class.
2686 (build_vtbl_initializer): Put nothing in the slot for a function only
2687 defined in a lost primary virtual base.
2688 (add_vcall_offset_vtbl_entries_1): Use the same code for
2689 the lost primary case and the normal case.
2690 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
2691 (get_vfield_offset, get_derived_offset): Lose.
2692 (dfs_find_final_overrider): Use look_for_overrides_here.
2693 (get_matching_virtual): New fn.
2694 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
2695 not BV_VCALL_INDEX.
2696 * search.c (look_for_overrides_here): Split out from...
2697 (look_for_overrides_r): Here.
2698
2699 * class.c (find_final_overrider): Return error_mark_node on error.
2700
2701 * decl2.c (key_method): #if 0 accidental change.
2702
2703 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
2704
2705 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
2706 (build_over_call): Likewise.
2707 * decl.c (grokparms): Likewise.
2708 * pt.c (tsubst_decl): Likewise.
2709 * typeck.c (convert_arguments): Likewise.
2710
2711 2001-06-05 Mark Mitchell <mark@codesourcery.com>
2712
2713 * semantics.c (begin_class_definition): Robustify.
2714
2715 * pt.c (instantiate_decl): Tell the repository code about the
2716 clones, not the cloned functions.
2717 * repo.c (repo_template_used): Explicitly instantiate the cloned
2718 function, not the clones.
2719
2720 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2721
2722 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
2723 ICS_BAD_FLAG on created conversion.
2724 (compare_ics): Break out rank.
2725
2726 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2727
2728 * decl.c (xref_tag): Remove extraneous %s on dependent name
2729 lookup warning.
2730
2731 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2732
2733 * class.c (layout_vtable_decl): Fix off by one error on
2734 build_index_type.
2735 (build_vtt): Likewise.
2736 (build_ctor_vtbl_group): Likewise.
2737
2738 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2739
2740 * class.c (maybe_indent_hierarchy): New function.
2741 (dump_class_hierarchy_r): Add flags. Dump extra binfo
2742 information, if enabled. Use maybe_indent_hierarchy. Adjust
2743 output format.
2744 (dump_class_hierarchy): Adjust prototype. Adjust output format.
2745 (dump_array, dump_vtable, dump_vtt): New functions.
2746 (finish_struct_1): Adjust hierarchy dumping.
2747 (initialize_vtable): Call dump_vtable.
2748 (build_vtt): Call dump_vtt.
2749 (build_ctor_vtbl_group): Call dump_vtable.
2750 * decl2.c (flag_dump_class_layout): Remove.
2751 (cxx_decode_option): Remove dump translation unit
2752 and dump class hierarchy check. Call dump_switch_p.
2753 (finish_file): Adjust dumping.
2754 (dump.c): Only dump base classes if not TDF_SLIM.
2755 Only dump namespace members if not TDF_SLIM.
2756 * optimize.c (dump_function): New function.
2757 (optimize_function): Call dump_function.
2758 * semantics.c (expand_body): Use dump_enabled_p.
2759
2760 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
2761
2762 PR g++/2936
2763 Part missed from first commit
2764 * decl2.c (finish_anon_union): Copy context.
2765
2766 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
2767
2768 PR g++/2936
2769 * optimize.c (remap_decl): Remap anonymous aggregate members too.
2770
2771 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
2772
2773 PR g++/2823
2774 * semantics.c (expand_body): Don't optimize thunks.
2775
2776 2001-05-25 Sam TH <sam@uchicago.edu>
2777
2778 * cp-tree.h lex.h: Fix header include guards.
2779
2780 2001-05-25 Mark Mitchell <mark@codesourcery.com>
2781
2782 * decl.c (init_decl_processing): Tweak.
2783
2784 2001-05-24 Mark Mitchell <mark@codesourcery.com>
2785
2786 * decl.c (duplicate_decls): Tidy.
2787 (init_decl_processing): Always set flag_no_builtin.
2788
2789 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
2790
2791 PR c++/2184
2792 * decl2.c (do_local_using_decl): Push the decls, even in a
2793 template.
2794
2795 2001-05-22 Mark Mitchell <mark@codesourcery.com>
2796
2797 * optimize.c (initialize_inlined_parameters): Don't set
2798 TREE_READONLY for a VAR_DECL taking the place of an inlined
2799 PARM_DECL.
2800
2801 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
2802
2803 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
2804 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
2805 attribute.
2806
2807 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
2808
2809 * parse.y: Refer to compound literals as such, not as
2810 constructor-expressions.
2811
2812 2001-05-21 Mark Mitchell <mark@codesourcery.com>
2813
2814 * call.c (build_op_delete_call): Ignore exception-specifications
2815 when looking for matching delete operators.
2816 * init.c (build_new_1): Compute whether or not the allocation
2817 function used is a placement allocation function or not, and
2818 communicate this information to build_op_delete_call.
2819
2820 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
2821
2822 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
2823 (build_vtbl_ref): Adjust.
2824 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
2825 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
2826 Re-add vtable-gc.
2827 (unsupported_options): Correspondingly.
2828
2829 * decl2.c (maybe_make_one_only): Check flag_weak, not
2830 supports_one_only().
2831
2832 * cp-tree.def (START_CATCH_STMT): Lose.
2833 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
2834 * tree.c (cp_statement_code_p): Don't case it.
2835 * semantics.c (cp_expand_stmt): Likewise.
2836 * cp-tree.h (START_CATCH_TYPE): Lose.
2837 (HANDLER_TYPE): New.
2838 * except.c (expand_start_catch_block): Don't start any blocks.
2839 Return the type.
2840 (expand_end_catch_block): Don't end any blocks.
2841 * parse.y (handler): Don't pass anything from finish_handler_parms
2842 to finish_handler.
2843 * pt.c (tsubst_expr): Likewise.
2844 * semantics.c (begin_handler): Call note_level_for_catch here.
2845 (finish_handler_parms): Don't return anything.
2846 (genrtl_catch_block, begin_catch_block): Lose.
2847 (genrtl_handler): Call expand_start_catch here.
2848
2849 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
2850
2851 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
2852 (get_vtable_decl, build_vtt): Not here.
2853
2854 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
2855
2856 PR c++/2781
2857 * optimize.c (update_cloned_parm): Copy addressability and other
2858 flags.
2859
2860 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2861
2862 * pt.c (determine_specialization): Ignore artificial functions.
2863
2864 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
2865
2866 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
2867 (C_RID_CODE): Remove.
2868 * lex.c (cxx_init_options): Call set_identifier_size. Update.
2869 (init_parse): Don't do it here.
2870
2871 2001-05-18 Diego Novillo <dnovillo@redhat.com>
2872
2873 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
2874 function declaration to avoid stripping the symbol's attributes.
2875
2876 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
2877
2878 * decl.c (pushdecl): Adjust error string.
2879 (xref_tag): Adjust friend class injection warning. Remove the
2880 inherited name from the class shadowed scope.
2881
2882 2001-05-17 Mark Mitchell <mark@codesourcery.com>
2883
2884 * except.c (cp_protect_cleanup_actions): New function.
2885 (init_exception_processing): Don't set protect_cleanup_actions
2886 here. Do set lang_protect_cleanup_actions.
2887
2888 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2889
2890 * spew.c (read_token): Call yyerror on all unexpected tokens.
2891
2892 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2893
2894 * init.c (member_init_ok_or_else): Take a tree rather than
2895 string for name.
2896 (expand_member_init): Adjust.
2897
2898 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
2899
2900 * decl.c (duplicate_decls): Suppress warning about duplicate
2901 decls if the first decl is a friend.
2902
2903 2001-05-12 Zack Weinberg <zackw@stanford.edu>
2904
2905 * except.c (choose_personality_routine): Export. Add
2906 explanatory comment. Take an enum languages, not a boolean.
2907 (initialize_handler_parm): Adjust to match.
2908 * cp-tree.h: Prototype choose_personality_routine.
2909 * lex.c (handle_pragma_java_exceptions): New function.
2910 (init_cp_pragma): Register #pragma GCC java_exceptions.
2911
2912 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2913
2914 * method.c (build_mangled_C99_name): Remove unused prototype.
2915
2916 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
2917
2918 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
2919 * typeck.c (get_member_function_from_ptrfunc,
2920 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
2921 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
2922
2923 Reverted Geoff Keating's 2001-05-03's patch.
2924
2925 2001-05-11 Ira Ruben <ira@apple.com>
2926
2927 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
2928
2929 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
2930
2931 * cp-tree.h (finish_label_expr, lookup_label): Delete.
2932 * parse.y: Update for '&&'; don't issue warning here.
2933 * semantics.c (finish_label_expr): Delete.
2934
2935 2001-05-07 Mark Mitchell <mark@codesourcery.com>
2936
2937 * splay-tree.h (splay_tree_max): New function.
2938 (splay_tree_min): Likewise.
2939
2940 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
2941
2942 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
2943 (pfn_vflag_identifier): Define.
2944 Update comment about layout of pointer functions.
2945 (build_ptrmemfunc1): Update prototype.
2946 (expand_ptrmemfunc_cst): Update prototype.
2947 * decl.c (initialize_predefined_identifiers): Initialize
2948 pfn_vflag_identifier.
2949 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
2950 an extra field to the type.
2951 * expr.c (cplus_expand_constant): Pass 'flag' between
2952 expand_ptrmemfunc_cst and build_ptrmemfunc1.
2953 * typeck.c (get_member_function_from_ptrfunc): When
2954 FUNCTION_BOUNDARY < 16, look at additional field to determine
2955 if a pointer-to-member is a real pointer or a vtable offset.
2956 (build_ptrmemfunc1): Add new parameter to contain extra field.
2957 (build_ptrmemfunc): Pass the extra field around.
2958 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
2959 (pfn_from_ptrmemfunc): Ignore the extra field.
2960
2961 2001-05-03 Mark Mitchell <mark@codesourcery.com>
2962
2963 * cp-tree.h (flag_inline_trees): Update documentation.
2964 * decl.c (init_decl_processing): Adjust handling of
2965 flag_inline_functions and flag_inline_trees to support -O3.
2966 (grokfndecl): Set DECL_INLINE on all functions if that's what
2967 the user requested.
2968 (save_function_data): Clear DECL_INLINE in
2969 current_function_cannot_inline is non-NULL.
2970 * decl2.c (flag_inline_trees): Update documentation.
2971
2972 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
2973
2974 * dump.c (cp_dump_tree, USING_STMT case): New case.
2975 * tree.c (cp_statement_code_p): Add USING_STMT.
2976 * decl2.c (do_using_directive): Add the using directive statement.
2977
2978 * tree.c (walk_tree): Reformat an if block.
2979
2980 2001-05-02 Mark Mitchell <mark@codesourcery.com>
2981
2982 * decl.c (compute_array_index_type): Don't try to do anything with
2983 the indices when processing a template.
2984
2985 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2986
2987 * call.c: NULL_PTR -> NULL.
2988 * class.c: Likewise.
2989 * cvt.c: Likewise.
2990 * decl.c: Likewise.
2991 * decl2.c: Likewise.
2992 * except.c: Likewise.
2993 * init.c: Likewise.
2994 * rtti.c: Likewise.
2995 * search.c: Likewise.
2996 * tree.c: Likewise.
2997 * typeck.c: Likewise.
2998 * typeck2.c: Likewise.
2999
3000 2001-05-02 Mark Mitchell <mark@codesourcery.com>
3001
3002 * decl2.c (do_using_directive): Revert previous patch.
3003
3004 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3005
3006 * cp-tree.def (USING_STMT): New statement node.
3007 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3008 * decl2.c (do_using_directive): Add USING_STMT to statement
3009 tree. Don't emit errors when processing template decl.
3010 * pt.c (tsubst_expr, USING_STMT case): New case.
3011 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3012
3013 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3014
3015 * call.c (build_new_op): Convert args from reference here.
3016 (build_conditional_expr): Don't convert here.
3017
3018 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3019
3020 * spew.c (last_token_id): New static variable.
3021 (read_token): Set it here.
3022 (yyerror): Use it here.
3023
3024 2001-04-30 Richard Henderson <rth@redhat.com>
3025
3026 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3027 * decl.c: Likewise.
3028
3029 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3030
3031 * gxxint.texi: Remove.
3032 * Make-lang.in: Remove all traces of gxxint.texi.
3033
3034 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
3035
3036 * decl2.c (start_static_initialization_or_destruction): Correct
3037 logic to handle the -fno-use-cxa-atexit case.
3038
3039 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3040
3041 * optimize.c (update_cloned_parm): New function.
3042 (maybe_clone_body): Use it. Update the `this' parameter too.
3043
3044 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
3045
3046 * decl2.c (unsupported_options): Add new-abi.
3047 * lang-options.h: Remove no longer supported options.
3048
3049 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3050
3051 * except.c (can_convert_eh): Don't check template parms,
3052 typename types etc.
3053
3054 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3055
3056 * optimize.c (maybe_clone_body): Copy parameter names and locations.
3057
3058 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3059
3060 * cp-tree.h (adjust_clone_args): Prototype new function.
3061 * class.c (adjust_clone_args): New function.
3062 * decl.c (start_function): Call it for in charge ctors.
3063
3064 2001-04-26 Mark Mitchell <mark@codesourcery.com>
3065
3066 * method.c (use_thunk): Make sure that thunks really are emitted
3067 when requested.
3068
3069 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
3070
3071 * mangle.c (write_chars): New macro.
3072 (hwint_to_ascii): New function
3073 (write_number): Use it.
3074 (write_integer_cst): Deal with really big numbers.
3075
3076 2001-04-25 Mark Mitchell <mark@codesourcery.com>
3077
3078 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3079 the clone.
3080
3081 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
3082
3083 * decl.c (grokdeclarator): Set context of namespace scope
3084 TYPE_DECLS.
3085
3086 2001-04-24 Zack Weinberg <zackw@stanford.edu>
3087
3088 * cp/optimize.c: Include hashtab.h.
3089 (struct inline_data): Add tree_pruner.
3090 (expand_call_inline, expand_calls_inline): Use it when calling
3091 walk_tree.
3092 (optimize_function): Initialize and free tree_pruner.
3093
3094 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3095
3096 Lazy __FUNCTION__ generation.
3097 * cp-tree.def (FUNCTION_NAME): Remove.
3098 * cp-tree.h (function_name_declared_p): Remove.
3099 (cp_fname_init): Prototype.
3100 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3101 don't call declare_function_name. Call start_fname_decls.
3102 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3103 clobber the line number.
3104 (cp_fname_init): New function.
3105 (start_function): Call start_fname_decls.
3106 (finish_function): Call finish_fname_decls.
3107 * lex.c (reswords): Add slots for __FUNCTION__ et al.
3108 (rid_to_yy): Add mappings for __FUNCTION__ et al.
3109 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3110 * parse.y (VAR_FUNC_NAME): New token.
3111 (primary): Add VAR_FUNC_NAME.
3112 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3113 generation.
3114 (tsubst, FUNCTION_NAME case): Remove.
3115 (tsubst_copy, FUNCTION_NAME case): Remove.
3116 (tsubst_expr, DECL_STMT case): Be careful with a
3117 DECL_PRETTY_FUNCTION_P.
3118 (instantiate_decl): Remove function_name_declared_p.
3119 * semantics.c (begin_compound_statement): Don't call
3120 declare_function_name here.
3121 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3122 (finish_translation_unit): Call finish_fname_decls.
3123 (expand_body): Remove function_name_declared_p.
3124 * typeck2.c (digest_init): Allow any ERROR_MARK.
3125
3126 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3127
3128 * pt.c (tsubst_decl): Use VOID_TYPE_P.
3129 * semantics.c: Fix some typos.
3130
3131 2001-04-23 Phil Edwards <pme@sources.redhat.com>
3132
3133 * cp/decl2.c (flag_honor_std): Always initialize to 1.
3134
3135 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3136
3137 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3138
3139 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
3140
3141 * except.c (build_throw): Wrap the initialization of the exception
3142 object in a MUST_NOT_THROW_EXPR.
3143 (do_free_exception): #if 0.
3144
3145 2001-04-20 Mark Mitchell <mark@codesourcery.com>
3146
3147 * cp-tree.h (finish_enum): Change prototype.
3148 * decl.c (finish_enum): Reorganize.
3149 * parse.y (structsp): Adjust calls to finish_enum.
3150
3151 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3152
3153 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3154 't' case.
3155
3156 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3157
3158 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3159 (layout_empty_base): Return at end flag.
3160 (build_base_field): Likewise.
3161 (build_base_fields): Likewise.
3162 (layout_virtual_bases): Don't add 1 to eoc value.
3163 (end_of_class): Use full size for empty bases.
3164 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3165 empty bases. Don't add 1 to eoc value. Only add trailing padding
3166 if we're an empty class with no empty bases.
3167 (dump_class_hierarchy): Dump size and alignment.
3168
3169 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3170
3171 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3172 ICS_BAD_FLAG.
3173
3174 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3175
3176 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3177 is found, look first if name does not match the structure name.
3178
3179 2001-04-19 Mark Mitchell <mark@codesourcery.com>
3180
3181 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3182 set.
3183 (SET_DECL_LANGUAGE): New macro.
3184 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3185 (pushdecl): Likewise.
3186 (build_library_fn_1): Likewise.
3187 (build_cp_library_fn): Likewise.
3188 (grokfndecl): Likewise.
3189 (grokvardecl): Mark `extern "C"' variables as having C linkage.
3190 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3191 * lex.c (retrofit_lang_decl): Likewise.
3192 * mangle.c (mangle_decl_string): Don't mangle the names of
3193 variables declared with C language linkage.
3194 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3195
3196 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
3197
3198 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3199 flag_access_control from uninitialized storage.
3200
3201 2001-04-15 Mark Mitchell <mark@codesourcery.com>
3202
3203 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3204 * mangle.c (write_pointer_to_member_type): Fix mangling of
3205 pointers to cv-qualified member function types.
3206
3207 * init.c (build_delete): Create a SAVE_EXPR for the address if
3208 we're going to use it more than once.
3209
3210 2001-04-13 Mark Mitchell <mark@codesourcery.com>
3211
3212 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3213 (expand_ptremfunc_cst): Change prototype.
3214 (delta2_from_ptrmemfunc): Remove.
3215 * expr.c (cplus_expand_constant): Adjust call to
3216 expand_ptrmemfunc_cst.
3217 * typeck.c (build_ptrmemfunc1): Simplify.
3218 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3219 results in a constant.
3220 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3221 (delta2_from_ptrmemfunc): Remove.
3222 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3223
3224 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
3225
3226 * cp-tree.h (decl_namespace_list): New macro.
3227 (struct saved_scope): Add decl_ns_list.
3228 * decl.c (mark_saved_scope): Mark it.
3229 * decl2.c: Lose static decl_namespace_list.
3230 (init_decl2): Don't save it.
3231
3232 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3233
3234 * cp-tree.h (warn_return_type, yylex): Delete redundant
3235 declarations.
3236
3237 * decl.c (current_class_depth, global_namespace): Likewise.
3238
3239 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3240
3241 * repo.c (flag_use_repository): Likewise.
3242
3243 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3244
3245 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3246 set_block, pushdecl, getdecls, gettags, init_decl_processing,
3247 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3248 lvalue_or_else, print_lang_statistics, comp_target_types,
3249 unsigned_type, signed_type, signed_or_unsigned_type,
3250 build_function_call, mark_addressable, incomplete_type_error):
3251 Delete redundant declarations.
3252
3253 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
3254
3255 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3256 (TYPE_ANONYMOUS_P): New macro.
3257 (TAGGED_TYPE_P): New macro.
3258 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3259 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3260 * tree.c (no_linkage_helper): Likewise.
3261 * semantics.c (begin_class_definition): Likewise.
3262 * pt.c (convert_template_argument): Likewise.
3263 * lex.c (check_for_missing_semicolon): Likewise.
3264
3265 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3266
3267 * class.c (dfs_unshared_virtual_bases): New function.
3268 (mark_primary_bases): Call it.
3269 (check_bases): Ignore virtual bases when determining
3270 nearly-emptiness.
3271
3272 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3273
3274 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3275
3276 2001-04-11 Mark Mitchell <mark@codesourcery.com>
3277
3278 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3279 cloned function to the clone.
3280
3281 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3282
3283 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3284
3285 * semantics.c: Include expr.h.
3286
3287 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
3288
3289 * method.c (implicitly_declare_fn): Commonize code for copy ctor
3290 and assignment op. Set TREE_USED for parameter.
3291
3292 2001-04-10 Mark Mitchell <mark@codesourcery.com>
3293
3294 * class.c (find_final_overrider_data): Add `candidates'.
3295 (dfs_find_final_overrider): Don't issue error messages
3296 prematurely.
3297 (find_final_overrider): Issue error messages here.
3298 (build_base_field): Don't warn about amgibuous direct bases here.
3299 (warn_about_ambiguous_direct_bases): New function.
3300 (layout_class_type): Use it.
3301
3302 2001-04-10 Richard Henderson <rth@redhat.com>
3303
3304 * typeck.c (build_array_ref): Push the array reference inside
3305 COMPOUND_EXPR and COND_EXPR.
3306
3307 2001-04-05 Mark Mitchell <mark@codesourcery.com>
3308
3309 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3310 * decl.c (duplicate_decls): Adjust accordingly.
3311 (maybe_commonize_var): Likewise.
3312 (grokfndecl): Likewise.
3313 (start_function): Likewise.
3314 (start_method): Likewise.
3315 * decl2.c (key_method): Likewise.
3316 (import_export_decl): Likewise.
3317 * method.c (implicitly_declare_fn): Likewise.
3318 * optimize.c (maybe_clone_body): Likewise.
3319
3320 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
3321
3322 * lang-specs.h: Add __DEPRECATED.
3323
3324 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
3325
3326 * search.c (get_dynamic_cast_base_type): When building a new
3327 constant, set its type to ssizetype.
3328
3329 2001-04-04 Jakub Jelinek <jakub@redhat.com>
3330
3331 * optimize.c (expand_call_inline): Only add newly inlined statements
3332 into inlined_stmts.
3333
3334 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3335
3336 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3337 (OPERATOR_FORMAT): Likewise.
3338 (OPERATOR_TYPENAME_FORMAT): Likewise.
3339 * operators.def: Remove old name-mangling information.
3340 * decl.c (grok_op_properties): Adjust accordingly.
3341 * lex.c (init_operators): Likewise.
3342 * rtti.c (get_tinfo_decl): Issue error messages about types that
3343 have variable size.
3344
3345 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3346
3347 * decl2.c (import_export_decl): Don't call import_export_class
3348 when processing an inline member function.
3349 * semantics.c (expand_body): Call import_export_decl before
3350 emitting inline functions.
3351
3352 2001-03-28 Richard Henderson <rth@redhat.com>
3353
3354 IA-64 ABI Exception Handling:
3355 * cp-tree.def (EH_SPEC_BLOCK): New.
3356 (MUST_NOT_THROW_EXPR): New.
3357 * cp-tree.h: Update changed function declarations.
3358 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3359 (CPTI_CALL_UNEXPECTED): New.
3360 (struct cp_language_function): Rename x_eh_spec_try_block
3361 to x_eh_spec_block.
3362 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3363 * decl.c (current_binding_level): If no current function
3364 bindings, revert to scope_chain.
3365 (initialize_predefined_identifiers): Remove __cp_push_exception.
3366 (store_parm_decls): Use begin_eh_spec_block.
3367 (finish_function): Use finish_eh_spec_block.
3368 (mark_lang_function): Update for name changes.
3369 * decl2.c (finish_file): No mark_all_runtime_matches.
3370 * dump.c (cp_dump_tree): Handle new tree codes.
3371 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3372 * except.c (catch_language_init, catch_language): Remove.
3373 (init_exception_processing): Don't set language code.
3374 Initialize call_unexpected_node, protect_cleanup_actions,
3375 eh_personality_libfunc, lang_eh_runtime_type.
3376 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3377 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3378 (prepare_eh_type): Split out type canonicalizations ...
3379 (build_eh_type_type): ... from here.
3380 (build_eh_type_type_ref): Remove.
3381 (mark_all_runtime_matches): Remove.
3382 (build_exc_ptr): New.
3383 (do_begin_catch, do_end_catch): New.
3384 (do_pop_exception): Remove.
3385 (build_terminate_handler): Remove.
3386 (choose_personality_routine): Split out language choice from ...
3387 (initialize_handler_parm): ... here.
3388 Use MUST_NOT_THROW_EXPR.
3389 (expand_start_catch_block): Use do_begin_catch. Simplify Java
3390 exception object handling.
3391 (expand_start_eh_spec, expand_end_eh_spec): Remove.
3392 (expand_exception_blocks, alloc_eh_object): Remove.
3393 (begin_eh_spec_block, finish_eh_spec_block): New.
3394 (do_allocate_exception, do_free_exception): New.
3395 (expand_throw): Merge into ...
3396 (build_throw): ... here. Update for abi.
3397 * expr.c (cplus_expand_expr): No expand_internal_throw.
3398 Handle MUST_NOT_THROW_EXPR.
3399 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3400 * semantics.c (*) Update for except.h name changes.
3401 (genrtl_try_block): No protect_with_terminate.
3402 (genrtl_eh_spec_block): New.
3403 (genrtl_handler): Don't emit the goto here.
3404 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3405 (genrtl_finish_function): Don't expand_exception_blocks.
3406 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3407
3408 2001-03-28 Richard Henderson <rth@redhat.com>
3409
3410 * decl.c (struct named_label_list): Rename eh_region to
3411 in_try_scope, add in_catch_scope.
3412 (struct binding_level): Rename eh_region to is_try_scope,
3413 add is_catch_scope.
3414 (note_level_for_try): Rename from note_level_for_eh.
3415 (note_level_for_catch): New.
3416 (poplevel): Copy both is_try_scope and is_catch_scope to
3417 the named_label_list struct.
3418 (check_previous_goto_1): Don't check for catch block via
3419 DECL_ARTIFICIAL; use in_try_scope instead.
3420 (check_goto): Likewise.
3421 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3422 * except.c (expand_start_catch_block): Call note_level_for_catch.
3423 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3424
3425 2001-03-27 Richard Henderson <rth@redhat.com>
3426
3427 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3428 exceptions_via_longjmp.
3429
3430 2001-03-27 Phil Edwards <pme@sources.redhat.com>
3431
3432 * pt.c (check_default_tmpl_args): Make error messages clearer.
3433
3434 2001-03-26 Phil Edwards <pme@sources.redhat.com>
3435
3436 * error.c: Also undefine 'A' macro used for cp_printers definition.
3437
3438 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3439
3440 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3441
3442 2001-03-26 Mike Yang <yang@research.att.com>
3443 Mark Mitchell <mark@codesourcery.com>
3444
3445 * dump.c (dump_access): New function.
3446 (cp_dump_tree): Use it. Dump basetype information for class
3447 types.
3448
3449 2001-03-26 Mark Mitchell <mark@codesourcery.com>
3450
3451 * Makefile.in (optimize.o): Depend on params.h.
3452 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3453 (init_decl_processing): Set flag_no_inline when doing
3454 inlining-on-trees.
3455 * optimize.c: Include params.h.
3456 (struct inline_data): Improve documentation of FNS. Add
3457 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3458 (INSNS_PER_STMT): New macro.
3459 (remap_block): Use CLONING_P.
3460 (inlinable_function_p): Don't inline big functions.
3461 (expand_call_inline): Keep track of how much inlining we've done.
3462 (optimize_function): Set FIRST_INLINED_FN.
3463 (maybe_clone_body): Set CLONING_P.
3464 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3465 tree nodes.
3466 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3467 rest_of_compilation. Clear DECL_RTL for local variables
3468 afterwards.
3469 (clear_decl_rtl): New function.
3470
3471 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
3472
3473 Implement DR 209
3474 * cp-tree.h (skip_type_access_control,
3475 reset_type_access_control): Prototype.
3476 * decl.c (grokdeclarator): Access of friends is not checked.
3477 * parse.y (component_decl_list): Reset type access control.
3478 * semantics.c (decl_type_access_control): Clear
3479 current_type_lookups.
3480 (save_type_access_control): Don't save if not deferring.
3481 (skip_type_access_control, reset_type_access_control): New
3482 functions.
3483 (begin_class_definition): Do type access control for basetypes.
3484 Start deferred access control.
3485 (finish_class_definition): Resume immediate access control if
3486 this is a local class.
3487
3488 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3489
3490 * class.c (add_method): Use memcpy/memmove, not bcopy.
3491
3492 * decl.c (duplicate_decls): Likewise.
3493
3494 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3495
3496 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
3497 not `_'.
3498
3499 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3500
3501 * decl.c (local_names): Define.
3502 (push_local_name): New.
3503 (grok_reference_init): Return init if initializing static reference
3504 variable with non-constant instead of emitting it.
3505 Move expand_static_init call to cp_finish_decl.
3506 (layout_var_decl): Call push_local_name.
3507 (maybe_commonize_var): Allow inlining functions even if they have
3508 static local variables, use comdat_linkage for them if flag_weak.
3509 (check_initializer): Call obscure_complex_init if
3510 grok_reference_init returned non-zero.
3511 (save_function_data): Clear x_local_names.
3512 (pop_cp_function_context): Free x_local_names.
3513 (mark_inlined_fns): Remove.
3514 (mark_lang_function): Mark x_local_names.
3515 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
3516 Mark inlined_fns as tree, remove call to mark_inlined_fns.
3517 * class.c (alter_access): Ensure DECL_ACCESS is never set if
3518 DECL_DISCRIMINATOR_P.
3519 * cp-tree.h (cp_language_function): Add x_local_names.
3520 (lang_decl_flags): Add discriminator into u2.
3521 (lang_decl_inlined_fns): Remove.
3522 (lang_decl): inlined_fns is now a TREE_VEC.
3523 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
3524 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
3525 TREE_VEC, not a custom structure.
3526 (optimize_function): Likewise.
3527 * mangle.c (discriminator_for_local_entity): Discriminate among
3528 VAR_DECL local entities.
3529 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
3530 is not valid.
3531
3532 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
3533
3534 Add support for Java interface method calls.
3535 * cp-tree.h (struct lang_type): Add java_interface flag.
3536 (TYPE_JAVA_INTERFACE): New macro.
3537 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
3538 by setting TYPE_JAVA_INTERFACE.
3539 * call.c (java_iface_lookup_fn): New static.
3540 (build_over_call): If calling a method declared in a
3541 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
3542 expression which resolves the function address.
3543 (build_java_interface_fn_ref): New function.
3544
3545 2001-03-22 Richard Henderson <rth@redhat.com>
3546
3547 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
3548 * except.c: Don't include it.
3549
3550 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
3551 based on an idea from Joe Buck <jbuck@synopsys.com>
3552
3553 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
3554 New nonterminals.
3555 (data_def, component_decl): Add reductions to bad_decl.
3556
3557 2001-03-22 Jakub Jelinek <jakub@redhat.com>
3558
3559 * method.c (do_build_assign_ref): Don't use build_modify_expr for
3560 anonymous aggregates, since they don't have assignment operator
3561 method.
3562 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
3563 assignment operators for anonymous structure fields.
3564
3565 2001-03-21 Jason Merrill <jason@redhat.com>
3566
3567 * pt.c (instantiate_decl): Abort if we see a member constant
3568 instantiation that doesn't already have its initializer.
3569 Downgrade explicit instantiation without definition to pedwarn.
3570
3571 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
3572 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
3573 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
3574
3575 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
3576 (pending_vtables): Remove.
3577 * decl2.c (pending_vtables): Remove.
3578 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
3579 CLASSTYPE_VTABLE_NEEDS_WRITING.
3580 (import_export_class): Likewise.
3581 (init_decl2): Don't mark pending_vtables.
3582 * lex.c (handle_pragma_vtable): Just sorry.
3583 * pt.c (instantiate_class_template): Don't mess with
3584 CLASSTYPE_VTABLE_NEEDS_WRITING.
3585 (mark_class_instantiated): Likewise.
3586 * ptree.c (print_lang_type): Don't print it.
3587 * semantics.c (begin_class_definition): Don't set it.
3588
3589 * pt.c (template_tail): Replace with last_pending_template.
3590 (maybe_templates, maybe_template_tail): Remove.
3591 (add_pending_template): Adjust.
3592 (instantiate_pending_templates): Adjust.
3593
3594 * cp-tree.h (struct saved_scope): Remove lang_stack field.
3595 (current_lang_stack): Remove.
3596 * decl.c (maybe_push_to_top_level): Don't initialize it.
3597 (duplicate_decls): Use current_lang_depth.
3598 (xref_basetypes): Likewise.
3599 * class.c (current_lang_depth): New fn.
3600 (push_lang_context): Use more varray functionality.
3601 (pop_lang_context): Likewise.
3602
3603 * error.c (GLOBAL_THING): Always use '__'.
3604
3605 2001-03-21 Mark Mitchell <mark@codesourcery.com>
3606
3607 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
3608
3609 * mangle.c (mangle_decl_string): Mangle the names of overloaded
3610 operators, even when they have `extern "C"' linkage.
3611
3612 2001-03-19 Mark Mitchell <mark@codesourcery.com>
3613
3614 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
3615 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3616 where it's not necessary.
3617 (add_method): Remove optimization involving comparison of
3618 DECL_ASSEMBLER_NAME.
3619 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
3620 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3621 where it's not necessary.
3622 (check_methods): Likewise.
3623 (build_clone): Likewise.
3624 (built_vtt): Likewise.
3625 * cp-tree.h (DECL_NEEDED_P): Likewise.
3626 * decl.c (pushtag): Likewise.
3627 (duplicate_decls): Likewise.
3628 (pushdecl): Likewise.
3629 (builtin_function): Likewise.
3630 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
3631 (build_cp_library_fn): Likewise.
3632 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
3633 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3634 where it's not necessary.
3635 (make_rtl_for_nonlocal_decl): Likewise.
3636 (cp_finish_decl): Likewise.
3637 (grokfndecl): Likewise.
3638 (grokvardecl): Likewise.
3639 (grokdeclarator): Likewise.
3640 (start_function): Likewise.
3641 (cp_missing_return_ok_p): Likewise.
3642 * decl2.c (grokclassfn): Likewise.
3643 (check_classfn): Likewise.
3644 (finish_static_data_member_decl): Likewise.
3645 (grokfield): Likewise.
3646 * error.c (GLOBAL_IORD_P): Remove.
3647 (dump_global_iord): Improve output.
3648 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
3649 * except.c (nothrow_libfn_p): Summarily reject any function not in
3650 namespace-scope.
3651 * init.c (build_java_class_ref): Don't explicitly set
3652 DECL_ASSEMBLER_NAME after calling mangle_decl.
3653 * mangle.c (mangle_decl_string): Handle extern "C" functions.
3654 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
3655 * method.c (set_mangled_name_for_decl): Don't explicitly set
3656 DECL_ASSEMBLER_NAME after calling mangle_decl.
3657 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
3658 IDENTIFIER_GLOBAL_VALUE for the thunk.
3659 * pt.c (set_mangled_name_for_template_decl): Remove.
3660 (check_explicit_specialization): Don't use it.
3661 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
3662 (tsubst_friend_function): Likewise.
3663 (tsubst_decl): Likewise.
3664 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
3665 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
3666 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3667 where it's not necessary.
3668 (tinfo_base_init): Likewise.
3669 (create_real_tinfo_var): Likewise.
3670 * search.c (looup_field_1): Likewise.
3671 * semantics.c (finish_named_return_value): Likewise.
3672 * tree.c (init_tree): Set lang_set_decl_assembler_name.
3673
3674 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
3675
3676 Correct semantics restrictions checking in throw-expression.
3677 * except.c (is_admissible_throw_operand): New function.
3678 (build_throw): Use it.
3679
3680 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3681
3682 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
3683 and its ilk.
3684
3685 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3686
3687 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3688 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
3689 * decl.c (duplicate_decls): Likewise.
3690 (builtin_function): Likewise.
3691 (build_library_fn): Likewise.
3692 (build_cp_library_fn): Likewise.
3693 (check_initializer): Likewise.
3694 (cp_finish_decl): Likewise.
3695 * decl2.c (grokfield): Likewise.
3696 (grok_function_init): Remove #if 0'd code.
3697 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3698 * friend.c (do_friend): Likewise.
3699 * init.c (get_temp_regvar): Likewise.
3700 * method.c (make_thunk): Likewise.
3701 * pt.c (tsubst_friend_function): Likewise.
3702 (tsubst_decl): Likewise.
3703 (regenerate_decl_from_template): Likewise.
3704 * semantics.c (genrtl_named_return_value): Likewise.
3705 (expand_body): Likewise.
3706 (genrtl_finish_function): Likewise.
3707 * tree.c (cp_tree_equal): Likewise.
3708
3709 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
3710
3711 * call.c (convert_like_real): Add extra semantics to INNER
3712 parameter. Don't convert to temporary if a user conversion
3713 gives us an lvalue that we're about to bind to a reference.
3714 Set INNER to indicate pending reference binding on recursive
3715 calls.
3716
3717 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3718
3719 * cp/lex.c: Delete duplicate pending_lang_change.
3720
3721 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3722
3723 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
3724 Similarly.
3725 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
3726 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
3727
3728 2001-03-09 Zack Weinberg <zackw@stanford.edu>
3729
3730 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
3731
3732 2001-03-08 Stan Shebs <shebs@apple.com>
3733
3734 * cp-tree.h (set_identifier_local_value): Remove unused decl.
3735
3736 2001-03-06 Zack Weinberg <zackw@stanford.edu>
3737
3738 * spew.c: Remove references to CPP_OSTRING.
3739
3740 2001-03-06 Andrew Haley <aph@redhat.com>
3741
3742 * typeck.c (convert_arguments): Check that we have an fndecl.
3743
3744 2001-03-05 Andrew Haley <aph@redhat.com>
3745
3746 * typeck.c (convert_arguments): Don't do ellipsis conversion for
3747 __built_in_constant_p.
3748
3749 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3750
3751 * typeck.c (build_static_cast): Allow enum to enum conversions
3752 as per DR 128.
3753
3754 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3755
3756 * class.c (check_field_decls): Pointers to member do not a
3757 non-pod struct make, as per DR 148.
3758
3759 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3760
3761 * call.c (joust): cp_pedwarn when using gnu extension concerning
3762 worst conversion sequences.
3763
3764 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3765
3766 * decl.c: Replace all uses of 'boolean' with 'bool'.
3767
3768 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3769
3770 * lang-specs.h: Add zero initializer for cpp_spec field to
3771 all array elements that need one. Don't put an #ifdef inside
3772 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
3773 use it.
3774
3775 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3776
3777 Implement using decls inside template functions.
3778 * decl2.c (validate_nonmember_using_decl): Don't special case
3779 fake_std_node in the global namespace. Don't reject early when
3780 processing a template.
3781 (do_local_using_decl): Add to statement tree. Don't do further
3782 processing when building a template.
3783 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
3784
3785 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3786
3787 * decl2.c (do_nonmember_using_decl): Don't complain if we find
3788 same function. Do complain about ambiguating extern "C"
3789 declarations.
3790
3791 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
3792
3793 Remove floating point and complex type template constant parms.
3794 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
3795 COMPLEX_TYPE extensions.
3796 (invalid_nontype_parm_type_p): Likewise.
3797
3798 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
3799
3800 * except.c (call_eh_info): Revert "match_function"'s type.
3801
3802 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
3803
3804 Fix ctor vtable vcall offsets.
3805 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
3806 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
3807 (get_matching_base): Remove.
3808 (get_original_base): New function.
3809 (build_vtbl_initializer): Initialize vid.rtti_binfo.
3810 Use a virtual thunk for a ctor vtable with an index
3811 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
3812 primary base within a constructor vtable. Only set
3813 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
3814 when primary base has been lost.
3815 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
3816
3817 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
3818
3819 * call.c (joust): Ensure more_specialized()'s argument length
3820 parameter has correct value for constructors.
3821
3822 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
3823
3824 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
3825
3826 * decl.c (mark_inlined_fns): Prototype.
3827
3828 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3829
3830 * spew.c (yylex): Correct handling of friends.
3831
3832 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3833
3834 * mangle.c (write_encoding): Pass write_function_type the
3835 FUNCTION_DECL for the function being encoded.
3836 (write_function_type): Pass it along to write_bare_function_type.
3837 (write_bare_function_type): Pass it along to write_method_parms.
3838 (write_method_parms): Don't mangle the compiler-generated
3839 parameters to a constructor or destructor.
3840
3841 2001-02-22 Andreas Jaeger <aj@suse.de>
3842
3843 * optimize.c: Include toplev.h for
3844 note_deferral_of_defined_inline_function prototype.
3845
3846 2001-02-22 Jakub Jelinek <jakub@redhat.com>
3847
3848 * cp-tree.h (struct lang_decl_inlined_fns): New.
3849 (struct lang_decls): Add inlined_fns.
3850 (DECL_INLINED_FNS): New macro.
3851 * optimize.c (struct inline_data): Add inlined_fns.
3852 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
3853 (inlinable_function_p): Likewise, fix typo in comment,
3854 function is not inlinable if it already inlined function currently
3855 being optimized.
3856 (expand_call_inline): Add fn to inlined_fns if necessary.
3857 (optimize_function): Initialize inlined_fns.
3858 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
3859 * decl.c (mark_inlined_fns): New function.
3860 (lang_mark_tree): Call it.
3861
3862 2001-02-21 Jason Merrill <jason@redhat.com>
3863
3864 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
3865 (DECL_UNINLINABLE): Move to middle-end.
3866
3867 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
3868 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
3869 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
3870 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
3871 parms and outer BLOCK. note_deferral_of_defined_inline_function.
3872
3873 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
3874 second parm of op=.
3875
3876 2001-02-19 Mark Mitchell <mark@codesourcery.com>
3877
3878 * decl2.c (set_decl_namespace): Allow explicit instantiations in
3879 any namespace.
3880
3881 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3882
3883 * optimize.c (expand_call_inline): Don't walk subtrees of type
3884 nodes.
3885
3886 2001-02-18 Mark Mitchell <mark@codesourcery.com>
3887
3888 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
3889 for a destructor.
3890
3891 2001-02-18 Jason Merrill <jason@redhat.com>
3892
3893 Do put the VTT parameter in DECL_ARGUMENTS.
3894 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
3895 (current_vtt_parm): New macro.
3896 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
3897 (DECL_HAS_VTT_PARM_P): New macro.
3898 (DECL_VTT_PARM): Remove.
3899 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
3900 * decl.c (duplicate_decls): Only copy the operator code if
3901 appropriate.
3902 (start_function): Set current_vtt_parm.
3903 (lang_mark_tree): Don't mark vtt_parm.
3904 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
3905 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
3906 * class.c (build_clone): Maybe remove the VTT parm.
3907 * optimize.c (maybe_clone_body): Set up the VTT parm.
3908 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
3909 * call.c (build_over_call): Just allow the VTT arg.
3910 * method.c (make_thunk): Don't set DECL_VTT_PARM.
3911 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
3912 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
3913 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
3914 * error.c (dump_function_decl): Likewise.
3915 * call.c (build_user_type_conversion_1, convert_like_real): Abort
3916 if we try to call a constructor with in-charge or VTT parms.
3917 * method.c (skip_artificial_parms_for): New fn.
3918 * call.c (add_function_candidate, build_over_call): Call it.
3919 * call.c (build_new_method_call): Use current_vtt_parm.
3920 * init.c (expand_virtual_init): Likewise.
3921 * class.c (same_signature_p): No longer static.
3922 * cp-tree.h: Declare it.
3923 * search.c (look_for_overrides_r): Use it.
3924
3925 2001-02-17 Mark Mitchell <mark@codesourcery.com>
3926
3927 * cp-tree.h (new_abi_rtti_p): Remove.
3928 (name_mangling_version): Likewise.
3929 (flag_do_squangling): Likewise.
3930 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
3931 * decl.c (grokfndecl): Likewise.
3932 * decl2.c (name_mangling_version): Remove.
3933 (flag_do_squangling): Likewise.
3934 (lang_f_options): Remove `squangle'.
3935 (unsupported_options): Add `squangle'.
3936 (cxx_decode_option): Issue a warning about uses of
3937 -fname-mangling-version.
3938 (finish_file): Remove old ABI support.
3939 * pt.c (check_explicit_specialization): Likewise.
3940 (tsubst_decl): Likewise.
3941 * rtti.c (init_rtti_processing): Likewise.
3942 (build_headof): Likewise.
3943 (get_tinfo_decl_dynamic): Likewise.
3944 (tinfo_from_decl): Likewise.
3945 (build_dynamic_cast_1): Likewise.
3946 (synthesize_tinfo_var): Likewise.
3947 * init.c (build_new): Allow enumeration types for the array-bounds
3948 in a direct-new-declarator.
3949
3950 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
3951
3952 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
3953 TREE_PROTECTED from the template being specialized.
3954
3955 2001-02-17 Jason Merrill <jason@redhat.com>
3956
3957 * decl2.c (build_artificial_parm): Set TREE_READONLY.
3958
3959 * decl.c (bad_specifiers): Allow throw specs on things with
3960 pointer-to-function or -member-function type.
3961 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
3962 a pmf.
3963
3964 2001-02-17 Mark Mitchell <mark@codesourcery.com>
3965
3966 * call.c (check_dtor_name): Handle template names correctly.
3967
3968 2001-02-16 Jason Merrill <jason@redhat.com>
3969
3970 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
3971 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
3972 * optimize.c (maybe_clone_body): Don't substitute it.
3973 * call.c (build_new_method_call): Check in_chrg instead.
3974 * init.c (expand_virtual_init): Likewise.
3975
3976 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
3977
3978 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
3979 class-type introduces at least a type-name.
3980
3981 2001-02-16 Jakub Jelinek <jakub@redhat.com>
3982
3983 * call.c (convert_like_real): Create a temporary for non-lvalue.
3984
3985 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
3986
3987 * cp-tree.h: Fix typos in comments.
3988
3989 2001-02-16 Jason Merrill <jason@redhat.com>
3990
3991 * optimize.c (remap_block): If we're compiling a clone, pass the
3992 new block to insert_block.
3993
3994 2001-02-16 Mark Mitchell <mark@codesourcery.com>
3995
3996 * semantics.c (finish_asm_stmt): Robustify.
3997
3998 2001-02-15 Mark Mitchell <mark@codesourcery.com>
3999
4000 * pt.c (push_template_decl_real): Don't remangle the name of a
4001 class template.
4002
4003 2001-02-15 Jim Meyering <meyering@lucent.com>
4004
4005 * Make-lang.in (c++.install-common): Depend on installdirs.
4006 (c++.install-info): Likewise.
4007 (c++.install-man): Likewise.
4008
4009 2001-02-15 Mark Mitchell <mark@codesourcery.com>
4010
4011 * typeck2.c (build_m_component_ref): Robustify.
4012
4013 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
4014
4015 * friend.c (do_friend): Don't take the nested [template] class
4016 into account when deciding whether to warn about the friend
4017 function not referring to a template function.
4018
4019 2001-02-14 Jakub Jelinek <jakub@redhat.com>
4020
4021 * typeck.c (build_unary_op): Clarify error message.
4022
4023 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
4024
4025 * parse.y (component_constructor_declarator): allow optional
4026 parentheses around constructor class name.
4027
4028 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4029
4030 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4031 section.
4032 * init.c (emit_base_init): Remove incorrect comment about
4033 virtual bases.
4034 * method.c (make_thunk): Fix comment alignment.
4035
4036 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4037
4038 Kill remnants of this is variable.
4039 * cp-tree.h (flag_this_is_variable): Remove.
4040 * decl2.c (flag_this_is_variable): Remove.
4041 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4042 (build_vbase_path): The path is non-static, even in a cdtor.
4043 (resolves_to_fixed_type_p): Add additional return value.
4044 * search.c (init_vbase_pointers): Adjust.
4045 * tree.c (lvalue_p_1): Adjust.
4046 * typeck.c (mark_addressable): Adjust.
4047
4048 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4049
4050 * pt.c (unify): Don't check cv quals of array types.
4051
4052 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4053
4054 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4055 check whether we already have the type.
4056
4057 2001-02-13 Mark Mitchell <mark@codesourcery.com>
4058
4059 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4060 * call.c (build_op_delete_call): Simplify to remove duplicate
4061 code.
4062 * class.c (clone_function_decl): Don't build the deleting variant
4063 of a non-virtual destructor.
4064 * decl.c (finish_destructor_body): Don't call delete if this is a
4065 non-virtual destructor.
4066 * init.c (build_delete): Explicitly call `operator delete' when
4067 deleting an object with a non-virtual destructor.
4068
4069 2001-02-13 Jason Merrill <jason@redhat.com>
4070
4071 * lang-specs.h: Add more __EXCEPTIONS.
4072
4073 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4074
4075 * typeck2.c (process_init_constructor): Check
4076 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4077
4078 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4079
4080 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4081 Remove spurious information in comment. Allow further
4082 adjustments of REFERENCE_TYPE args.
4083
4084 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4085
4086 * errfn.c (cp_deprecated): Tweak diagnostic text.
4087 * parse.y (new_initializer): Deprecate initializer lists
4088 extension.
4089
4090 2001-02-12 Mark Mitchell <mark@codesourcery.com>
4091
4092 Remove old ABI support.
4093
4094 2001-02-11 Mark Mitchell <mark@codesourcery.com>
4095
4096 * decl2.c (flag_vtable_thunks): Always set it to 1.
4097 (flag_new_abi): Likewise.
4098 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4099
4100 * Makefile.in (g++spec.o): Fix typo.
4101
4102 2001-02-09 Jason Merrill <jason@redhat.com>
4103
4104 * lang-specs.h: Restore definition of __EXCEPTIONS.
4105
4106 2001-02-08 Jason Merrill <jason@redhat.com>
4107
4108 * search.c (shared_member_p): New function.
4109 (lookup_field_r): Use it.
4110 * cp-tree.h (SHARED_MEMBER_P): Remove.
4111
4112 * method.c (process_overload_item): Handle template-dependent array
4113 bounds.
4114 * pt.c (type_unification_real): If we end up with undeduced nontype
4115 parms, try again.
4116
4117 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4118 types.
4119
4120 * typeck2.c (friendly_abort): Don't say anything if we have
4121 earlier errors or sorries.
4122
4123 * decl.c (check_tag_decl): Notice attempts to redefine bool and
4124 wchar_t. Ignore if in_system_header.
4125
4126 * decl.c (maybe_push_cleanup_level): New fn...
4127 (start_decl_1): ...split out from here.
4128 * cvt.c (build_up_reference): Use it.
4129 * cp-tree.h: Declare it.
4130
4131 2001-02-07 Mark Mitchell <mark@codesourcery.com>
4132
4133 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4134 spec.
4135
4136 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
4137
4138 * pt.c (lookup_template_class): Make sure it's a primary
4139 template or template_template_parm when called from the parser.
4140 (instantiate_template_class): Add assertion.
4141
4142 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
4143
4144 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4145 from error_mark_node.
4146
4147 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
4148
4149 Fix specification and implementation bugs in V3 ABI
4150 construction vtables.
4151 * cp-tree.h (flag_dump_class_layout): New flag.
4152 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4153 (BINFO_LOST_PRIMARY_P): New flag.
4154 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4155 (BINFO_PRIMARY_MARKED_P): Rename to ...
4156 (BINFO_PRIMARY_P): ... here.
4157 (binfo_via_virtual): New prototype.
4158 * decl2.c (flag_dump_class_layout): New flag.
4159 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4160 use `=' as a file name separator.
4161 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4162 bases.
4163 (build_vtbl_address): If this is a virtual primary base, then
4164 get the vtbl of what it is ultimately primary for.
4165 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4166 for BINFO_PRIMARY_P.
4167 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4168 (get_shared_vbase_if_not_primary): Likewise.
4169 (dfs_get_pure_virtuals): Likewise.
4170 (expand_upcast_fixups): Likewise.
4171 (fixup_virtual_upcast_offsets): Likewise.
4172 (dfs_find_vbase_instance): Likewise.
4173 (find_vbase_instance): Likewise.
4174 (binfo_from_vbase): Adjust comment to reflect reality.
4175 (binfo_via_virtual): New function.
4176 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4177 for binfo walking during VTT construction.
4178 (dfs_mark_primary_bases): Remove.
4179 (force_canonical_binfo_r): New function.
4180 (force_canonical_binfo): New function.
4181 (mark_primary_virtual_base): New function.
4182 (mark_primary_bases): Walk in inheritance graph order, use
4183 mark_primary_virtual_base.
4184 (determine_primary_base): Use some more intermediate variables.
4185 (dfs_find_final_overrider): Don't check for overriding along a
4186 virtual path.
4187 (dfs_modify_vtables): Walk into primary virtual bases too.
4188 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4189 (build_base_fields): Likewise.
4190 (dfs_set_offset_for_unshared_vbases): Likewise.
4191 (layout_virtual_bases): Likewise.
4192 (end_of_class): Likewise.
4193 (finish_struct_1): Call dump_class_hierarchy, if requested.
4194 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4195 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4196 (dump_class_hierarchy): Add file parameter. Append to file, if
4197 required.
4198 (finish_vtbls): Adjust accumulate_vtbl_inits call.
4199 Use canonical base for virtual bases.
4200 (build_vtt): Add more comments. Adjust build_vtt_inits call.
4201 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4202 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4203 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4204 virtual VTTs.
4205 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4206 from DATA. We want virtual primary bases and all bases via virtual.
4207 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4208 virtual base when not a construction vtable.
4209 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4210 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4211 Use canonical bases when processing virtual bases.
4212 (accumulate_vtbl_inits): We're interested in any base via a
4213 virtual path.
4214 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4215 within a construction vtable, determine what is being overridden.
4216 (build_vtbl_initializer): Add more comments
4217 (add_vcall_offset_vtbl_entries_1): Adjust comment.
4218 (build_rtti_vtbl_entries): Check if the base has lost its
4219 primary.
4220
4221 2001-02-05 Mark Mitchell <mark@codesourcery.com>
4222
4223 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4224
4225 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4226
4227 * decl.c (pushdecl): Call abort instead of fatal.
4228 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4229 * init.c (build_new_1): Likewise.
4230 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4231 * decl.c (build_typename_type): hash_table_init now returns void.
4232 decl.c (init_decl_processing): Make an error non-fatal.
4233
4234 2001-02-04 Mark Mitchell <mark@codesourcery.com>
4235
4236 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4237 Document.
4238 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4239 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4240 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4241 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4242 * decl.c (maybe_commonize_var): Use the new name-mangling where
4243 appropriate.
4244 * decl2.c (comdat_linkage): Enhance comments. Make all
4245 compiler-generated things static, if COMDAT is not available.
4246 (get_tinfo_decl): Do not make typeinfo objects that belong in the
4247 library COMDAT.
4248 (tinfo_base_init): Use the correct mangled name for typeinfo
4249 strings, and push them into the global scope.
4250 (typeinfo_in_lib_p): New function.
4251 (synthesize_tinfo_var): Use it.
4252 (create_real_tinfo_var): Likewise.
4253
4254 2001-02-03 Jakub Jelinek <jakub@redhat.com>
4255
4256 * decl.c (push_class_binding): Use context_for_name_lookup instead
4257 of CP_DECL_CONTEXT.
4258 * search.c (context_for_name_lookup): Remove static. Check for NULL
4259 context in the loop.
4260 * cp-tree.h (context_for_name_lookup): Add prototype.
4261
4262 2001-02-02 Jakub Jelinek <jakub@redhat.com>
4263
4264 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4265 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4266 Remove.
4267 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4268 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4269
4270 2001-02-02 Mark Mitchell <mark@codesourcery.com>
4271
4272 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4273 of macros used when compiling g++spec.c.
4274 * g++spec.c (lang_specific_driver): Link with the shared
4275 libgcc by default.
4276
4277 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
4278
4279 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4280 make_reference_declarator, make_call_declarator), method.c
4281 (implicitly_declare_fn), parse.y (namespace_using_decl,
4282 notype_unqualified_id, expr_or_declarator, new_type_id,
4283 after_type_declarator, direct_after_type_declarator,
4284 notype_declarator, complex_notype_declarator,
4285 complex_direct_notype_declarator, qualified_id,
4286 notype_qualified_id, overqualified_id, direct_new_declarator,
4287 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4288 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4289 instead of build_parse_node.
4290
4291 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4292
4293 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4294 (minus_one_node): Moved to top level gcc directory. Renamed
4295 to integer_minus_one_node.
4296
4297 * init.c (init_init_processing): Don't set minus_one_node.
4298 (build_vec_init): Use integer_minus_one_node.
4299
4300 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4301
4302 2001-01-28 Jakub Jelinek <jakub@redhat.com>
4303
4304 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4305 identical and they would be replaced with constant, remove
4306 MODIFY_EXPR from the tree.
4307
4308 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4309
4310 * Make-lang.in: Remove all dependencies on defaults.h.
4311 * call.c: Don't include defaults.h.
4312 * decl.c: Likewise.
4313 * decl2.c: Likewise.
4314 * except.c: Likewise.
4315 * pt.c: Likewise.
4316 * rtti.c: Likewise.
4317 * tree.c: Likewise.
4318 * typeck.c: Likewise.
4319
4320 2001-01-25 Jakub Jelinek <jakub@redhat.com>
4321
4322 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4323 operators even in "C" linkage.
4324 * method.c (set_mangled_name_for_decl): Likewise.
4325 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4326 overloaded operators in "C" linkage.
4327
4328 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4329
4330 * pt.c (tsubst_decl): Remove IN_DECL parameter.
4331 (tsubst_arg_types): Check parameter is not void.
4332 (tsubst): Adjust tsubst_decl call.
4333
4334 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4335
4336 * call.c (add_builtin_candidate): Quote std properly, from
4337 previous change.
4338
4339 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4340
4341 * pt.c (check_explicit_specialization): Clone constructors and
4342 destructors.
4343
4344 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4345
4346 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4347 indicates anything special about template depth. Make sure we
4348 only count the user visible template classes.
4349
4350 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4351
4352 * call.c (build_conv): Typo in comment.
4353 (add_builtin_candidate): Add more explanation.
4354 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4355 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4356 when we have enumeral types.
4357 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4358 candidates for relops and eqops.
4359 (joust): Simplify control flow. Allow a non-template user
4360 function to hide a builtin.
4361
4362 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
4363
4364 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4365 (more_specialized): Add deduction parameter.
4366 * call.c (joust): Adjust more_specialized call.
4367 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4368 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4369 (get_bindings_order): Remove.
4370 (get_bindings_real): Add DEDUCE parameter.
4371 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4372 REFERENCE_TYPE jig for DEDUCE_ORDER.
4373 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4374 maybe_adjust_types_for_deduction.
4375 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4376 directly.
4377 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4378 (check_cv_quals_for_unify): Use new unify qualifier flags.
4379 (unify): Clear new unify qualifier flags.
4380 (get_bindings_real): Add DEDUCE parameter.
4381 (get_bindings): Adjust call to get_bindings_real.
4382 (get_bindings_overload): Likewise.
4383 (most_specialized_instantiation): Adjust call to
4384 more_specialized.
4385
4386 2001-01-19 Jason Merrill <jason@redhat.com>
4387
4388 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4389
4390 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4391 -fnew-abi.
4392
4393 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
4394
4395 * decl2.c (arg_assoc_class): Fix double iteration logic.
4396
4397 2001-01-19 Jason Merrill <jason@redhat.com>
4398
4399 * init.c (build_delete): Always call convert_force to strip cv-quals.
4400
4401 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4402 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4403 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4404
4405 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4406
4407 * search.c (get_vbase_1): Count only virtual bases.
4408
4409 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4410
4411 * class.c (duplicate_tag_error): Robustify flag clearing.
4412
4413 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4414
4415 * cp-tree.h (lookup_template_class): Add complain parm.
4416 * decl.c (lookup_namespace_name): Adjust call to
4417 lookup_template_class.
4418 (make_typename_type): Likewise.
4419 * semantics.c (finish_template_type): Likewise.
4420 * pt.c (lookup_template_class): Add complain parm. Adjust.
4421 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4422 (tsubst): Likewise.
4423
4424 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4425
4426 * pt.c (copy_default_args_to_explicit_spec): Preserve
4427 object's CV quals. Reorganize.
4428
4429 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4430
4431 * typeck.c (build_modify_expr): Say `initialization' for
4432 INIT_EXPRs.
4433 * init.c (build_default_init): Convert to enumeral type, if
4434 needed.
4435
4436 2001-01-18 Jakub Jelinek <jakub@redhat.com>
4437
4438 * parse.y (nomods_initdcl0): Properly set things up for
4439 initdcl0_innards.
4440
4441 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4442
4443 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4444 (type_unification_real): Set it.
4445 (unify): Use it.
4446
4447 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4448
4449 * decl.c (finish_destructor_body): Convert to vbase pointer here.
4450
4451 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4452
4453 * semantics.c (begin_class_definition): Check we're not inside a
4454 template parm list.
4455
4456 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4457
4458 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4459 BASELINK_P.
4460
4461 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4462
4463 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4464 * call.c (build_over_call): Add comment.
4465
4466 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4467
4468 * cvt.c (ocp_convert): Handle vector type conversion
4469 * typeck2.c (digest_init): Handle vector type initializations
4470
4471 2001-01-16 Phil Edwards <pme@sources.redhat.com>
4472
4473 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
4474 was given.
4475
4476 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4477
4478 * pt.c (check_nontype_parm): Rename to ...
4479 (invalid_nontype_parm_type_p): ... here.
4480 (process_template_parm): Adjust.
4481 (convert_template_argument): Adjust.
4482
4483 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4484
4485 * pt.c (check_nontype_parm): New function.
4486 (process_template_parm): Use it.
4487 (convert_template_argument): Use it.
4488 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
4489 member.
4490
4491 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
4492
4493 * tree.c: Add defaults.h
4494 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
4495 * Make-lang.in (cp/tree.o): Add defaults.h.
4496
4497 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4498
4499 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
4500
4501 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4502
4503 * g++.1: Change to be ".so man1/gcc.1".
4504
4505 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4506
4507 * Make-lang.in (c++.info, c++.install-info): Build and install g++
4508 internals info.
4509 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
4510 ($(srcdir)/cp/g++int.info): New target.
4511 * gxxint.texi: Add info directory entry. Use @@ in email address.
4512 * .cvsignore: Update.
4513
4514 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4515
4516 * typeck.c (build_c_cast): Do template processing earlier.
4517 Always pedwarn on array casts.
4518
4519 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4520
4521 * friend.c (make_friend_class): Make sure a templated class is
4522 actually a template.
4523
4524 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4525
4526 * decl2.c (get_guard): Set linkage from guarded decl.
4527
4528 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4529
4530 * call.c (convert_default_arg): Check for unprocessed
4531 DEFAULT_ARG.
4532 * cp-tree.h (replace_defarg): Move to spew.c.
4533 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
4534 spew.c, which is where they really are.
4535 (done_pending_defargs): Declare.
4536 (unprocessed_defarg_fn): Declare.
4537 * decl.c (replace_defarg): Move to spew.c
4538 * parse.y (structsp): Call done_pending_defargs.
4539 * spew.c (defarg_fns): Rearrange list structure.
4540 (defarg_fnsdone): New static variable.
4541 (defarg_depfns): New static variable.
4542 (init_spew): Adjust.
4543 (add_defarg_fn): Store the type in TREE_TYPE.
4544 (do_pending_defargs): Detect and deal with ordering constraints
4545 and circularity.
4546 (done_pending_defargs): New function.
4547 (unprocessed_defarg_fn): New function.
4548 (replace_defarg): Moved from decl.c. Robustify. Don't save
4549 if circularity detected.
4550
4551 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4552
4553 * pt.c (unify): Check array has a domain, before checking
4554 whether it is variable sized.
4555
4556 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4557
4558 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
4559 parameters with pointers to arrays of unknown bound.
4560
4561 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4562
4563 * parse.y (template_parm_header, template_spec_header): New
4564 reductions. Split out from ...
4565 (template_header): ... here. Use them.
4566 (template_template_parm): Use template_parm_header.
4567 * semantics.c (finish_template_template_parm): Add assert.
4568
4569 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4570
4571 * mangle.c (write_builtin_type): Fix thinko.
4572
4573 * pt.c (copy_default_args_to_explicit_spec_1): New function.
4574 (copy_default_args_to_explicit_spec): Likewise.
4575 (check_explicit_specialization): Use it.
4576
4577 * class.c (finish_struct_1): Remove last argument in call to
4578 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4579 * decl.c (builtin_function): Likewise.
4580 (build_cp_library_fn): Likewise.
4581 (check_initializer): Likewise.
4582 (make_rtl_for_nonlocal_decl): Likewise.
4583 (cp_finish_decl): Likewise.
4584 (start_function): Likewise.
4585 * decl2.c (finish_anon_union): Likewise.
4586 * friend.c (do_friend): Likewise.
4587 * init.c (build_java_class_ref): Likewise.
4588 * method.c (make_thunk): Likewise.
4589 * pt.c (tsubst_friend_function): Likewise.
4590 * semantics.c (expand_body): Likewise.
4591
4592 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4593
4594 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
4595 looking at DECL_CLONED_FUNCTION for non-functions.
4596
4597 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4598
4599 * error.c (dump_template_parameter): Use parm to determine how
4600 to print default value.
4601
4602 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4603
4604 * class.c (duplicate_tag_error): Clear more flags.
4605
4606 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4607
4608 * call.c (build_new_method_call): Use binfo_for_vbase.
4609
4610 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
4611
4612 * cp-tree.h (flag_cond_mismatch): Don't declare.
4613 * decl2.c (flag_cond_mismatch): Don't define.
4614 (lang_f_options): Remove cond-mismatch.
4615 (unsupported_options): Add cond-mismatch.
4616
4617 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
4618
4619 * class.c (handle_using_decl): Reject using of constructor name
4620 of sourcing class. Allow injecting of a method with same name as
4621 nested class. Fixup error messages.
4622
4623 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
4624
4625 * decl2.c (lang_decode_option): Handle -Wformat=2.
4626
4627 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4628
4629 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
4630 initialized_in_class.
4631 (DECL_DEFINED_IN_CLASS_P): Rename to ...
4632 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
4633 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
4634 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
4635 * pt.c (check_default_tmpl_args): Adjust for
4636 DECL_INITIALIZED_IN_CLASS_P.
4637 (instantiate_class_template): Likewise.
4638 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
4639
4640 * class.c (finish_struct): Constify saved_filename.
4641
4642 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4643
4644 * class.c (duplicate_tag_error): Adjust diagnostic.
4645 (finish_struct): Locally set location to start of struct.
4646 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
4647
4648 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4649
4650 * decl.c (struct binding_level): Adjust class_shadowed comments
4651 to reflect reality.
4652 (push_class_level_binding): Adjust comments to reflect reality.
4653 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
4654 Don't set TREE_VALUE on the class_shadowed list.
4655
4656 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4657
4658 * decl2.c (acceptable_java_type): Allow references too.
4659 * init.c (build_java_class_ref): When using the new ABI, search
4660 `class$' and have it mangled with `mangle_decl.'
4661 * mangle.c (write_java_integer_type_codes): New function.
4662 (write_builtin_type): Detect and mangle Java integer and real
4663 types.
4664
4665 2001-01-07 Mark Mitchell <mark@codesourcery.com>
4666
4667 * decl2.c (grokfield): Don't accept `asm' specifiers for
4668 non-static data members.
4669
4670 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4671
4672 * expr.c (cplus_expand_expr): Don't reset `target'.
4673
4674 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
4675
4676 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
4677
4678 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4679
4680 * parse.y (template_datadef): Check for error_mark_node.
4681
4682 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4683
4684 * cp-tree.def (DEFAULT_ARG): Make `x' class.
4685
4686 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
4687
4688 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
4689 (record_builtin_type): Make non-static.
4690 (flag_short_double): Don't declare.
4691 (init_decl_processing): Remove the creation of many tree nodes now
4692 in c_common_nodes_and_builtins.
4693 (build_void_list_node): New function.
4694 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
4695 * cp-tree.h (flag_short_wchar): Don't declare.
4696
4697 2001-01-04 Mark Mitchell <mark@codesourcery.com>
4698
4699 * call.c (build_conv): Don't use build1 for USER_CONV.
4700 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
4701
4702 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
4703
4704 * lex.c (lang_init): Call c_common_lang_init.
4705
4706 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4707
4708 * search.c (lookup_fnfields_here): Remove.
4709 (look_for_overrides_r): Use lookup_fnfields_1.
4710 Ignore functions from using declarations.
4711
4712 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4713
4714 Implement exceptions specifiers for implicit member functions.
4715 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
4716 * method.c (synthesize_exception_spec): New function.
4717 (locate_dtor, locate_ctor, locate_copy): New functions.
4718 (implicitly_declare_fn): Generate the exception spec too.
4719 * search.c (check_final_overrider): Check artificial functions
4720 too.
4721 * typeck2.c (merge_exception_specifiers): New function.
4722
4723 2001-01-03 Jason Merrill <jason@redhat.com>
4724
4725 * init.c (build_default_init): New fn.
4726 (perform_member_init): Split out from here.
4727 (build_new_1): Use it. Simplify initialization logic.
4728 (build_vec_init): Take an array, rather than a pointer and maxindex.
4729 Speed up simple initializations. Don't clean up if we're assigning.
4730 * cp-tree.h: Adjust.
4731 * decl2.c (do_static_initialization): Remove TREE_VEC case.
4732 * parse.y (new_initializer): Return void_zero_node for ().
4733 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
4734 * typeck2.c (digest_init): Only complain about user-written
4735 CONSTRUCTORs.
4736
4737 2000-12-22 Mike Stump <mrs@wrs.com>
4738
4739 * decl2.c: (max_tinst_depth): Increase to 50.
4740
4741 2001-01-02 Mark Mitchell <mark@codesourcery.com>
4742
4743 * class.c (invalidate_class_lookup_cache): Zero the
4744 previous_class_values.
4745 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
4746 TREE_INT_CST_HIGH.
4747 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
4748 * decl.c (free_bindings): New variable.
4749 (push_binding): Don't create a new binding if we have one on the
4750 free list.
4751 (pop_binding): Put old bindings on the free list.
4752 (init_decl_processing): Use size_int, not build_int_2.
4753 Register free_bindings as a GC root.
4754 (cp_make_fname_decl): Use size_int, not build_int_2.
4755 (push_inline_template_parms_recursive): Likewise.
4756 (end_template_parm_list): Likewise.
4757 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
4758 (tsubst_template_parms): Use size_int, not build_int_2.
4759 (tsubst): Likewise.
4760 * rtti.c (get_vmi_pseudo_type_info): Likewise.
4761
4762 2001-01-02 Richard Henderson <rth@redhat.com>
4763
4764 * parse.y (asm): Set ASM_INPUT_P.
4765
4766 2001-01-02 Jason Merrill <jason@redhat.com>
4767
4768 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
4769 for v3 ABI.
4770
4771 * typeck.c (cp_truthvalue_conversion): New fn.
4772 * cvt.c (ocp_convert): Use it.
4773
4774 * cp-tree.h: Lose c-common.c decls.
4775
4776 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
4777 * cvt.c (convert_to_void): Use type_unknown_p.
4778
4779 * typeck.c (strip_all_pointer_quals): Also strip quals from
4780 pointer-to-member types.
4781
4782 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
4783 parse.y as C.
4784
4785 * call.c (build_new_method_call): Do evaluate the object parameter
4786 when accessing a static member.
4787 * typeck.c (build_component_ref): Likewise.
4788
4789 2001-01-02 Andreas Jaeger <aj@suse.de>
4790
4791 * decl.c (cp_missing_noreturn_ok_p): New.
4792 (init_decl_processing): Set lang_missing_noreturn_ok_p.
4793
4794 2000-12-29 Jakub Jelinek <jakub@redhat.com>
4795
4796 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
4797
4798 2000-12-29 Mark Mitchell <mark@codesourcery.com>
4799
4800 * class.c (pushclass): Remove #if 0'd code.
4801 * cp-tree.h (overload_template_name): Remove.
4802 * decl.c (store_bindings): Simplify.
4803 (pop_from_top_level): Likewise.
4804 * pt.c (overload_template_name): Remove.
4805 (instantiate_decl): Don't call push_to_top_level if it's not
4806 needed.
4807
4808 2000-12-28 Mark Mitchell <mark@codesourcery.com>
4809
4810 * pt.c (register_local_specialization): Don't return a value.
4811 (lookup_template_class): Use move-to-front heuristic when looking
4812 up template instantiations.
4813 (instantiate_decl): Only push_to_top_level when we're actually
4814 going to instantiate the template.
4815
4816 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4817
4818 * search.c (binfo_for_vtable): Return least derived class, not
4819 most. Handle secondary vtables.
4820
4821 2000-12-22 Jason Merrill <jason@redhat.com>
4822
4823 * pt.c (more_specialized): Don't optimize len==0.
4824 (fn_type_unification): If we're adding the return type, increase len.
4825
4826 * typeck.c (build_binary_op): Fix pmf comparison logic.
4827
4828 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
4829 DECL_STATIC_FUNCTION_P.
4830
4831 * semantics.c (genrtl_finish_function): Don't try to jump to
4832 return_label unless it exists.
4833
4834 In partial ordering for a call, ignore parms for which we don't have
4835 a real argument.
4836 * call.c (joust): Pass len to more_specialized.
4837 (add_template_candidate_real): Strip 'this', pass len.
4838 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
4839 (get_bindings_order): New fn. Pass len down.
4840 (get_bindings_real): Strip 'this', pass len.
4841 (fn_type_unification): Likewise.
4842 (type_unification_real): Succeed after checking 'len' args.
4843 (most_specialized_instantiation): Lose explicit_args parm.
4844 * class.c (resolve_address_of_overloaded_function): Strip 'this',
4845 pass len.
4846
4847 2000-12-21 Jason Merrill <jason@redhat.com>
4848
4849 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
4850 DECL_TEMPLATE_RESULT.
4851
4852 * search.c (lookup_field_r): Call lookup_fnfields_1, not
4853 lookup_fnfields_here.
4854
4855 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
4856
4857 * call.c (build_object_call): Also allow conversions that return
4858 reference to pointer to function.
4859 (add_conv_candidate): Handle totype being ref to ptr to fn.
4860 (build_field_call): Also allow members of type reference to function.
4861 Lose support for calling pointer to METHOD_TYPE fields.
4862
4863 * error.c (dump_expr): Handle *_CAST_EXPR.
4864
4865 * typeck2.c (build_scoped_ref): Always convert to the naming class.
4866
4867 * tree.c (break_out_cleanups): Lose.
4868 * cp-tree.h: Remove prototype.
4869 * typeck.c (build_component_ref): Don't break_out_cleanups.
4870 (build_compound_expr): Likewise.
4871 * semantics.c (finish_expr_stmt): Likewise.
4872
4873 2000-12-20 Richard Henderson <rth@redhat.com>
4874
4875 * cp-tree.h: Update declarations.
4876 * decl.c (finish_case_label): Return the new stmt node.
4877 * semantics.c (finish_goto_stmt): Likewise.
4878 (finish_expr_stmt, finish_return_stmt): Likewise.
4879 (finish_break_stmt, finish_continue_stmt): Likewise.
4880 (finish_asm_stmt): Likewise.
4881 * parse.y (already_scoped_stmt): Set STMT_LINENO.
4882 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
4883 (simple_if, simple_stmt): Return the new stmt node.
4884 (save_lineno): New.
4885
4886 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
4887
4888 * cp-tree.h: Don't declare warn_long_long.
4889
4890 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4891
4892 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
4893 IS_AGGR_TYPE.
4894
4895 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4896
4897 * pt.c (unify): Handle when both ARG and PARM are
4898 BOUND_TEMPLATE_TEMPLATE_PARM.
4899
4900 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4901
4902 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
4903 DECL_TEMPLATE_PARM_P.
4904
4905 2000-12-15 Jason Merrill <jason@redhat.com>
4906
4907 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
4908
4909 * init.c (build_new_1): Don't strip quals from type.
4910
4911 * decl.c (pushdecl): Don't check for linkage on a non-decl.
4912
4913 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
4914
4915 * call.c (build_new_function_call): Lose space before paren in
4916 error message.
4917 (build_new_method_call): Likewise.
4918
4919 * typeck2.c (build_m_component_ref): Propagate quals from datum.
4920
4921 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4922
4923 * pt.c (check_explicit_specialization): Propagate default
4924 function arguments to explicit specializations.
4925
4926 2000-12-13 DJ Delorie <dj@redhat.com>
4927
4928 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
4929 and <? operators.
4930
4931 2000-12-08 Jason Merrill <jason@redhat.com>
4932
4933 * error.c (dump_function_name): Don't let the user see __comp_ctor.
4934
4935 Clean up copy-initialization in overloading code.
4936 * call.c (build_user_type_conversion_1): Die if we are asked to
4937 convert to the same or a base type.
4938 (implicit_conversion): Avoid doing so. Lose reference binding code.
4939 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
4940 direct-initialization. Also do direct-init part of copy-init.
4941 (build_user_type_conversion): Don't provide context to convert_like.
4942 * cvt.c (ocp_convert): build_user_type_conversion will now provide
4943 the constructor call for copy-init.
4944
4945 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
4946 instantiation of a member template.
4947 (do_decl_instantiation): Not here.
4948
4949 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
4950
4951 * class.c (check_field_decls): Don't special case anonymous
4952 fields in error messages.
4953 (note_name_declared_in_class): Use %D on diagnostic.
4954
4955 * tree.c (pod_type_p): Use strip_array_types.
4956 (cp_valid_lang_attribute): Likewise.
4957 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
4958 multiple evaluations.
4959 (cp_has_mutable_p): Use strip_array_types.
4960
4961 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
4962
4963 * cp-tree.h (sufficient_parms_p): Declare new function.
4964 * call.c (sufficient_parms_p): New function, broken out of ...
4965 (add_function_candidate): ... here. Use it.
4966 (add_conv_candidate): Use it.
4967 * decl.c (grok_ctor_properties): Use it.
4968
4969 2000-12-07 Jakub Jelinek <jakub@redhat.com>
4970
4971 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
4972
4973 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
4974
4975 * decl2.c (lang_decode_option): Handle -Wformat-security.
4976
4977 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4978
4979 * pt.c (verify_class_unification): New function.
4980 (get_class_bindings): Use it.
4981 (try_class_unification): Tidy.
4982 (unify): Handle when argument of a template-id is not
4983 template parameter dependent.
4984 (template_args_equal): Handle when TREE_CODE's do not match.
4985
4986 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
4987
4988 * lang-specs.h (c++): When invoking the stand-alone preprocessor
4989 for -save-temps, pass all relevant -Defines to it, and then don't
4990 pass them to cc1plus.
4991
4992 2000-12-05 Will Cohen <wcohen@redhat.com>
4993
4994 * decl.c (finish_case_label): Cleared
4995 more_cleanups_ok in surrounding function scopes.
4996 (define_label): Likewise.
4997
4998 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
4999
5000 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5001 (get_matching_virtual): Remove.
5002 (look_for_overrides): Declare new function.
5003 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5004 DECL_VINDEX here.
5005 * class.c (check_for_override): Move base class iteration code
5006 to look_for_overrides.
5007 * search.c (next_baselink): Remove.
5008 (get_virtuals_named_this): Remove.
5009 (get_virtual_destructor): Remove.
5010 (tree_has_any_destructors_p): Remove.
5011 (struct gvnt_info): Remove.
5012 (check_final_overrider): Remove `virtual' from error messages.
5013 (get_matching_virtuals): Remove. Move functionality to ...
5014 (look_for_overrides): ... here, and ...
5015 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5016 to be overriding.
5017
5018 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
5019
5020 * typeck.c (get_delta_difference): If via a virtual base,
5021 return zero.
5022 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5023 adjustment.
5024
5025 2000-12-04 Richard Henderson <rth@redhat.com>
5026
5027 * error.c (dump_tree): Use output_add_string not OB_PUTS.
5028
5029 2000-12-04 Jason Merrill <jason@redhat.com>
5030
5031 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5032 (write_builtin_type): Pass intSI_type_node and the like through
5033 type_for_mode.
5034 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5035 Pass intSI_type_node and the like through type_for_mode.
5036 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5037 * pt.c (tsubst, unify): Likewise.
5038 * tree.c (walk_tree): Likewise.
5039 * error.c (dump_type): Likewise.
5040 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5041
5042 * Make-lang.in: Tweak top comment for emacs.
5043 (cp/TAGS): Restore.
5044
5045 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5046
5047 * class.c (clone_function_decl): Robustify.
5048
5049 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
5050
5051 * decl.c (store_bindings): Only search in the non modified
5052 old_bindings for duplicates.
5053
5054 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
5055
5056 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5057 TYPE_POLYMORPHIC_P.
5058
5059 * typeck.c (build_static_cast): Remove unused variable.
5060
5061 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5062
5063 * pt.c: Fix typo in comment.
5064
5065 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5066
5067 * decl2.c (warn_format): Remove definition.
5068 (lang_decode_option): Handle -Wformat-nonliteral,
5069 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
5070
5071 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5072
5073 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5074 (init_decl_processing): Don't create string_type_node,
5075 const_string_type_node, wint_type_node, intmax_type_node,
5076 uintmax_type_node, default_function_type, ptrdiff_type_node and
5077 unsigned_ptrdiff_type_node. Adjust position of call to
5078 c_common_nodes_and_builtins.
5079 (identifier_global_value): New function.
5080
5081 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
5082
5083 * call.c (standard_conversion): Reject pointer to member
5084 conversions from ambiguous, inaccessible or virtual bases.
5085 * typeck.c (build_static_cast): Don't check pointers to members
5086 specially.
5087
5088 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5089
5090 * method.c (do_build_copy_constructor): Preserve cv
5091 qualifications when accessing source object members.
5092 (do_build_assign_ref): Likewise. Remove separate diagnostics for
5093 unnamed fields.
5094
5095 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5096
5097 * method.c (do_build_assign_ref): Construct appropriately
5098 CV-qualified base reference. Don't allow const casts in base
5099 conversion.
5100
5101 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5102
5103 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5104 incomplete return type.
5105
5106 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5107
5108 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5109 * semantics.c (finish_base_specifier): Accept a _TYPE not a
5110 _DECL.
5111
5112 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5113
5114 * spew.c (yyerror): Cope if yylval.ttype is NULL.
5115
5116 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5117
5118 * decl.c (grokdeclarator): Diagnose undefined template contexts.
5119
5120 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5121
5122 * decl.c (grokdeclarator): Do type access control on friend
5123 class.
5124
5125 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5126
5127 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5128 bison parser ickiness.
5129 * pt.c (tsubst_friend_function): Enter namespace scope when
5130 tsubsting the function name.
5131 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5132
5133 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5134
5135 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5136 * cvt.c (cp_convert_to_pointer): Add force parameter.
5137 Allow conversions via virtual base if forced.
5138 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5139 (ocp_convert): Likewise.
5140 * search.c (binfo_from_vbase): Return the virtual base's binfo.
5141 * typeck.c (get_delta_difference): Adjust handling of virtual
5142 bases.
5143
5144 2000-11-26 Mark Mitchell <mark@codesourcery.com>
5145
5146 * tree.c (struct list_hash): Remove.
5147 (list_hash_table): Make it be an htab.
5148 (struct list_proxy): New type.
5149 (list_hash_eq): New function.
5150 (list_hash_pieces): Renamed from ...
5151 (list_hash): ... this.
5152 (list_hash_lookup): Remove.
5153 (list_hash_add): Remove.
5154 (hash_tree_cons): Use the generic hashtable.
5155 (mark_list_hash): Remove.
5156 (init_tree): Create the hashtable.
5157
5158 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
5159
5160 * method.c (build_mangled_C9x_name): Rename to
5161 build_mangled_C99_name. Change C9X references in comments to
5162 refer to C99.
5163
5164 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5165
5166 * parse.y (unary_expr): Move VA_ARG from here ...
5167 (primary): ... to here.
5168
5169 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5170
5171 * semantics.c (finish_id_expr): If type is error_mark, return
5172 error_mark.
5173
5174 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
5175
5176 * pt.c (lookup_template_class): Simplify loop exit constructs.
5177 Cope when there is no partial instantiation of a template
5178 template member.
5179
5180 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
5181
5182 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5183
5184 2000-11-22 Mark Mitchell <mark@codesourcery.com>
5185
5186 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5187 prefix.
5188
5189 * pt.c (do_decl_instantiate): Explicitly clone constructors and
5190 destructors that haven't already been cloned.
5191
5192 2000-11-20 Richard Henderson <rth@redhat.com>
5193
5194 * parse.y (yyparse_1): Rename the parser entry point.
5195
5196 2000-11-20 Alex Samuel <samuel@codesourcery.com>
5197
5198 * mangle.c (write_name): Use <unscoped-name> for names directly in
5199 function scope.
5200 (write_unscoped_name): Accept names directly in function scope.
5201
5202 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
5203
5204 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5205 * parse.y (extdef): Add EXPORT reduction.
5206 * spew.c (yylex): Don't skip export here.
5207
5208 2000-11-19 Mark Mitchell <mark@codesourcery.com>
5209
5210 * decl.c (init_decl_processing): Correct name of pure virtual
5211 function under the new ABI.
5212 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5213 (throw_bad_typeid): Likewise for bad typeid function.
5214
5215 2000-11-18 Mark Mitchell <mark@codesourcery.com>
5216
5217 * decl.c (grokparms): Don't even function types of `void' type,
5218 either.
5219 * mangle.c (write_type): Don't crash when confronted with the
5220 error_mark_node.
5221
5222 * decl.c (grokparms): Don't create parameters of `void' type.
5223
5224 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
5225
5226 * lex.c (mark_impl_file_chain): Delete.
5227 (init_parse): Remove call to ggc_add_string_root. No need to
5228 ggc_strdup a string constant. Do not add impl_file_chain to GC
5229 roots.
5230 (handle_pragma_implementation): No need to ggc_strdup main_filename.
5231
5232 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5233
5234 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5235
5236 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5237
5238 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5239 * decl.c (grokdeclarator): Don't reject void parms here.
5240 (require_complete_types_for_parms): Simplify, use
5241 complete_type_or_else.
5242 (grokparms): Remove bitrot. Remove funcdef parm.
5243 Deal with ellipsis parm lists here.
5244 * semantics.c (finish_parmlist): Don't append void_list_node
5245 here. Set PARMLIST_ELLIPSIS_P.
5246
5247 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5248
5249 * typeck2.c (incomplete_type_error): Reorganise to avoid
5250 excessive diagnostics.
5251
5252 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
5253
5254 * lex.c (struct impl_files, internal_filename): Constify a char *.
5255
5256 2000-11-16 Mark Mitchell <mark@codesourcery.com>
5257
5258 * mangle.c (write_special_name_constructor): Don't generate
5259 assembler junk when confronted with an old-style constructor.
5260 (write_special_name_destructor): Likewise.
5261 (mangle_decl_string): Do it here instead.
5262
5263 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
5264
5265 * call.c (op_error): Make error messages clearer.
5266
5267 2000-11-15 Mark Mitchell <mark@codesourcery.com>
5268
5269 * decl.c (wrapup_globals_for_namespace): Don't mark things
5270 TREE_ASM_WRITTEN when they're not.
5271
5272 2000-11-15 Jason Merrill <jason@redhat.com>
5273
5274 * typeck2.c (friendly_abort): Uncount the error before handing
5275 off to fancy_abort.
5276
5277 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
5278
5279 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5280
5281 2000-11-14 Mark Mitchell <mark@codesourcery.com>
5282
5283 * class.c (build_vtbl_initializer): Fix typo in comment.
5284 * typeck.c (expr_sizeof): Don't crash on errors.
5285
5286 2000-11-14 Jim Wilson <wilson@redhat.com>
5287
5288 * lang-specs.h: Add %2 after %(cc1_options).
5289
5290 2000-11-14 Richard Henderson <rth@redhat.com>
5291
5292 * typeck.c (c_sizeof): Be strict about casting result value
5293 back to c_size_type_node.
5294 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5295
5296 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
5297
5298 * typeck.c (build_unary_op): Use boolean_increment from
5299 c-common.c, moving the relevant code there.
5300
5301 2000-11-11 Jason Merrill <jason@redhat.com>
5302
5303 * typeck.c (mark_addressable): Don't call put_var_into_stack.
5304
5305 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5306 in inlines.
5307
5308 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5309
5310 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5311 * lex.c (copy_lang_decl): Likewise.
5312
5313 2000-11-09 Mark Mitchell <mark@codesourcery.com>
5314
5315 * dump.c (cp_dump_tree): Don't dump function bodies here.
5316
5317 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5318 (dump.o): Update dependency list.
5319 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5320 (flag_dump_translation_unit): Likewise.
5321 (CP_TYPE_QUALS): Adjust definition.
5322 (DECL_C_BIT_FIELD): Remove.
5323 (SET_DECL_C_BIT_FIELD): Likewise.
5324 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5325 (add_maybe_template): Likewise.
5326 (strip_array_types): Likewise.
5327 (dump_node_to_file): Likewise.
5328 (cp_dump_tree): New function.
5329 * decl.c (init_decl_processing): Set lang_dump_tree.
5330 * decl2.c (flag_dump_translation_unit): Remove.
5331 * dump.c: Move most of it to ../c-dump.c.
5332 (cp_dump_tree): New function.
5333 * pt.c (add_maybe_template): Remove.
5334 * typeck.c (strip_array_types): Likewise.
5335
5336 2000-11-07 Eric Christopher <echristo@redhat.com>
5337
5338 * decl.c (init_decl_processing): Change definition of
5339 __wchar_t to wchar_t. Remove artificial declaration of
5340 wchar_t.
5341 * lex.c: Change instances of __wchar_t to wchar_t.
5342
5343 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
5344
5345 * lex.c (do_identifier): Don't lookup_name for operators.
5346 * parse.y (operator): Save looking_for_typename.
5347 (unoperator): Restore it.
5348 * spew.c (frob_opname): Use nth_token for lookahead.
5349
5350 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
5351
5352 * decl.c (grok_op_properties): Always use coerce_new_type and
5353 coerce_delete_type.
5354 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5355 exception specification. Tidy up.
5356 (coerce_delete_type): Preserve exception specification. Tidy up.
5357
5358 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
5359
5360 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5361 (push_binding_level), error.c (cp_tree_printer), pt.c
5362 (process_partial_specialization, tsubst_template_arg_vector),
5363 search.c (lookup_member): Use memset () instead of bzero ().
5364
5365 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
5366
5367 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5368
5369 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
5370
5371 * Make-lang.in (c++.distdir): Remove.
5372
5373 2000-11-04 Mark Mitchell <mark@codesourcery.com>
5374
5375 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5376 declarations from different namespaces to be combined.
5377
5378 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
5379
5380 * decl.c: Include tm_p.h.
5381
5382 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
5383
5384 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5385
5386 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
5387
5388 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5389 (build_overload_value), repo.c (open_repo_file), xref.c
5390 (open_xref_file): Use strchr () and strrchr () instead of index ()
5391 and rindex ().
5392
5393 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
5394
5395 * call.c (build_over_call): Call fold on the CALL_EXPR.
5396
5397 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
5398
5399 * error.c (dump_template_decl): Separate template hearders with
5400 space not comma.
5401
5402 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
5403
5404 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
5405 TS_* flags with corresponding TFF_*. Adjust prototypes of
5406 functions (which used to take a tree_string_flags) to take an int.
5407
5408 * cp-tree.h (enum tree_string_flags): Remove
5409 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5410 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5411 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5412 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5413 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5414 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5415 (type_as_string, decl_as_string, expr_as_string,
5416 context_as_string): Adjust prototype.
5417
5418 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5419 instead of TS_PLAIN.
5420
5421 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5422 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5423 plain `0'.
5424
5425 2000-10-30 Mark Mitchell <mark@codesourcery.com>
5426
5427 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5428 (linkage_kind): New enumeration.
5429 (decl_linkage): New function.
5430 * decl2.c (comdat_linkage): Extend comment.
5431 * error.c (dump_function_decl): Print the arguments used to
5432 instantiate a template, even when not printing the type of the
5433 function.
5434 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5435 not TREE_PUBLIC, to test for external linkage.
5436 * tree.c (decl_linkage): New function.
5437
5438 2000-10-28 Mark Mitchell <mark@codesourcery.com>
5439
5440 * pt.c (instantiate_decl): Always instantiate static data members
5441 initialized in-class.
5442
5443 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
5444
5445 * Make-lang.in: Move all build rules here from Makefile.in,
5446 adapt to new context. Wrap all rules that change the current
5447 directory in parentheses. Expunge all references to $(P).
5448 When one command depends on another and they're run all at
5449 once, use && to separate them, not ;. Add OUTPUT_OPTION to
5450 all object-file generation rules. Delete obsolete variables.
5451
5452 * Makefile.in: Delete.
5453 * config-lang.in: Delete outputs= line.
5454
5455 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
5456
5457 * error.c (dump_function_decl): Print no space between
5458 `ptr-operator' the `type-specifier' of the return type.
5459 (dump_type_prefix): Make sure we put space at the appropriate
5460 place.
5461
5462 2000-10-23 Jason Merrill <jason@redhat.com>
5463
5464 * call.c (equal_functions): Also call decls_match for extern "C" fns.
5465
5466 2000-10-22 Jason Merrill <jason@redhat.com>
5467
5468 * call.c (build_conditional_expr): Use ocp_convert to force
5469 rvalue conversion.
5470
5471 2000-10-22 Mark Mitchell <mark@codesourcery.com>
5472
5473 * call.c (standard_conversion): Use RVALUE_CONVs for all
5474 expressions that satisfy lvalue_p, not just those that satisfy
5475 real_lvalue_p.
5476
5477 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5478
5479 * typeck.c (c_sizeof): Return an expression of `size_t' type,
5480 not one with TYPE_IS_SIZETYPE set.
5481 (dubious_conversion_warnings): Remove special-case code.
5482
5483 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
5484
5485 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
5486 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
5487 (dump_type_prefix): Print vector-of-int as 'int vector'.
5488 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
5489 * tree.c (walk_tree): Handle VECTOR_TYPE.
5490
5491 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5492
5493 2000-10-21 Jason Merrill <jason@redhat.com>
5494
5495 * parse.y (operator): Set got_object from got_scope.
5496 Set looking_for_typename.
5497 * decl.c (lookup_name_real): Clear val after setting from_obj.
5498 Reorganize diagnostic.
5499
5500 2000-10-20 Jason Merrill <jason@redhat.com>
5501
5502 * tree.c (walk_tree): Don't walk into default args.
5503
5504 * error.c (dump_expr): Use host_integerp.
5505
5506 2000-10-20 David Edelsohn <edelsohn@gnu.org>
5507
5508 * typeck2.c (abstract_virtuals_error): Use "because" instead of
5509 "since" in error message.
5510
5511 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5512
5513 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
5514
5515 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
5516
5517 * decl.c (revert_static_member_fn): Fixed typo.
5518
5519 2000-10-19 Mark Mitchell <mark@codesourcery.com>
5520
5521 * class.c (subobject_offset_fn): New type.
5522 (dfs_record_base_offsets): Remove.
5523 (record_base_offsets): Likewise.
5524 (dfs_search_base_offsets): Likewise.
5525 (record_subobject_offset): New function.
5526 (check_subobject_offset): Likewise.
5527 (walk_subobject_offsets): Likewise.
5528 (record_subobject_offsets): Likewise.
5529 (layout_conflict_p): Reimplement.
5530 (layout_nonempty_base_or_field): Correct handling of type
5531 conflicts during layout.
5532 (layout_empty_base): Likewise.
5533 (build_base_field): Adjust to handle new representation of empty
5534 base offset table.
5535 (build_base_fields): Likewise.
5536 (layout_virtual_bases): Likewise.
5537 (splay_tree_compare_integer_csts): New function.
5538 (layout_class_type): Use a splay_tree, rather than a varray, to
5539 represent the offsets of empty bases.
5540
5541 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
5542 * decl.c (select_decl): Don't return declarations that are
5543 DECL_ANTICIPATED.
5544
5545 2000-10-18 Mark Mitchell <mark@codesourcery.com>
5546
5547 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
5548 (fake_std_node): New macro.
5549 * decl.c (in_std): Rename to ...
5550 (in_fake_std): ... this.
5551 (flag_no_builtin): Remove.
5552 (flag_no_nonansi_builtin): Likewise.
5553 (walk_namespaces_r): Use fake_std_node.
5554 (push_namespace): Use std_identifier.
5555 (pop_namespace): Use in_fake_std.
5556 (lookup_name_real): Use fake_std_node.
5557 (init_decl_processing): When -fhonor-std, create the `std'
5558 namespace. Don't create a dummy fake_std_node in that case.
5559 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
5560 (builtin_function): Put builtins whose names don't begin
5561 with `_' in the std namespace.
5562 * decl2.c (flag_no_builtin): Remove.
5563 (flag_no_nonansi_builtin): Likewise.
5564 (set_decl_namespace): Use fake_std_node.
5565 (validate_nonmember_using_decl): Likewise.
5566 (do_using_directive): Likewise.
5567 (handle_class_head): Likewise.
5568 * dump.c (dequeue_and_dump): Likewise.
5569 * except.c (init_exception_processing): Use std_identifier.
5570 * init.c (build_member_call): Use fake_std_node.
5571 * rtti.c (init_rtti_processing): Use std_identifier.
5572
5573 2000-10-17 Mark Mitchell <mark@codesourcery.com>
5574
5575 * cp-tree.h (back_end_hook): Remove declaration.
5576 * decl2.c (back_end_hook): Remove definition.
5577
5578 * dump.c (dequeue_and_dump): Dump TREE_USED.
5579
5580 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
5581
5582 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
5583
5584 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5585
5586 * decl.c (WINT_TYPE): Define.
5587 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
5588 c_size_type_node, signed_size_type_node and wint_type_node.
5589
5590 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5591
5592 * decl2.c (warn_missing_format_attribute): New variable.
5593 (lang_decode_option): Decode -Wmissing-format-attribute.
5594
5595 2000-10-16 Mark Mitchell <mark@codesourcery.com>
5596
5597 * typeck.c (qualify_type): Remove.
5598 (composite_pointer_type): Fix handling of conversions to `cv void*'.
5599
5600 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5601
5602 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
5603
5604 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5605
5606 * Makefile.in (parse.c, parse.h): Create atomically.
5607
5608 2000-10-12 Mark Mitchell <mark@codesourcery.com>
5609
5610 * class.c (current_obstack): Remove.
5611 * decl.c (ggc_p): Remove.
5612 (start_decl): Don't use decl_tree_cons.
5613 (grokdeclarator): Don't use build_decl_list.
5614 (start_function): Don't use decl_tree_cons.
5615 (finish_function): Don't mess with obstacks.
5616 * decl2.c (grok_x_components): Don't use build_decl_list.
5617 * lex.c (make_call_declarator): Don't call decl_tree_cons.
5618 (implicitly_declare_fn): Don't call build_decl_list.
5619 * parse.y (frob_specs): Don't call build_decl_list or
5620 decl_tree_cons.
5621 (expr_or_declarator_intern): Don't call decl_tree_cons.
5622 (primary): Don't call build_decl_list.
5623 (fcast_or_absdcl): Likewise.
5624 (typed_declspecs): Don't call decl_tree_cons.
5625 (reserved_declspecs): Don't call build_decl_list.
5626 (declmods): Likewise.
5627 (reserved_typespecquals): Likewise.
5628 (aggr): Likewise.
5629 (new_type_id): Likewise.
5630 (cv_qualifiers): Likewise.
5631 (after_type_declarator_intern): Likewise.
5632 (notype_declarator_intern): Likewise.
5633 (absdcl_intern): Likewise.
5634 (named_parm): Likewise.
5635 * pt.c (most_specialized_class): Likewise.
5636 * repo.c (temporary_obstack): Make it a structure, not a pointer.
5637 (init_repo): Initialize it.
5638 * search.c (current_obstack): Remove.
5639 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5640
5641 2000-10-09 Richard Henderson <rth@cygnus.com>
5642
5643 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
5644 (c++ language support bits for libgcc): Remove.
5645 (c++.clean): Remove cplib2.txt cleanup.
5646 * config-lang.in (headers, lib2funcs): Remove.
5647
5648 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
5649 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
5650 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
5651 * inc/new.h, inc/typeinfo: Remove files.
5652
5653 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
5654
5655 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
5656 defined.
5657 (init_decl_processing): Initialize intmax_type_node and
5658 uintmax_type_node.
5659
5660 2000-10-06 Richard Henderson <rth@cygnus.com>
5661
5662 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
5663 (original_result_rtx): Remove.
5664 * decl.c (save_function_data): Don't clear x_result_rtx.
5665 (mark_lang_function): Don't mark it either.
5666 * expr.c (fixup_result_decl): Remove.
5667 * semantics.c (genrtl_named_return_value): Frob the return decl
5668 before calling emit_local_var.
5669 (genrtl_finish_function): Don't call fixup_result_decl.
5670 Always emit the jump to return_label.
5671
5672 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
5673
5674 * pt.c (lookup_template_class): Set current access for enum.
5675 (tsubst_enum): Set file & line for enum decl.
5676
5677 * spew.c (yylex): Remove unused variable.
5678
5679 2000-10-05 Richard Henderson <rth@cygnus.com>
5680
5681 * semantics.c (genrtl_finish_function): Don't init or check
5682 can_reach_end; remove noreturn and return value checks.
5683
5684 2000-10-05 Tom Tromey <tromey@cygnus.com>
5685
5686 * init.c (build_java_class_ref): Use `build_static_name' with a
5687 suffix, not a prefix, to build the class object's name.
5688
5689 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5690
5691 * cp-tree.h (access_kind): Fix comment typo.
5692 * decl2.c (grokfield): Fix diagnostic typo.
5693 * semantics.c (finish_template_type): Fix comment typo.
5694 (finish_qualified_object_call_expr): Likewise.
5695
5696 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5697
5698 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5699 tsubsting fails.
5700
5701 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5702
5703 * spew.c (frob_id): New static function.
5704 (frob_opname): Use it.
5705 (yylex): Use it.
5706
5707 2000-10-01 Mark Mitchell <mark@codesourcery.com>
5708
5709 * decl.c (lang_mark_false_label_stack): Remove.
5710 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5711
5712 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
5713
5714 * gxxint.texi: Use @email for formatting email addresses.
5715
5716 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
5717
5718 * error.c: Remove direct obstack manipulation. Replace with
5719 output_buffer-based formatting. Adjust calls to removed macros.
5720 (obstack_chunk_alloc, obstack_chunk_free): Remove.
5721 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
5722 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
5723
5724 2000-09-24 Mark Mitchell <mark@codesourcery.com>
5725
5726 * ir.texi: Move to ../c-tree.texi.
5727
5728 2000-09-20 Jason Merrill <jason@redhat.com>
5729
5730 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
5731
5732 2000-09-21 Andreas Jaeger <aj@suse.de>
5733
5734 * errfn.c: Move declaration of cp_printer and cp_printers to ...
5735 * cp-tree.h: ... here.
5736
5737 * error.c: Remove declaration of cp_printer.
5738
5739 2000-09-20 Mark Mitchell <mark@codesourcery.com>
5740
5741 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
5742
5743 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
5744
5745 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
5746 users.
5747
5748 2000-09-18 Mark Mitchell <mark@codesourcery.com>
5749
5750 * decl.c (start_function): Robustify.
5751
5752 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5753
5754 * cp-tree.h (check_function_format): Accept a `status' parameter.
5755
5756 * call.c, typeck.c: Updates calls to `check_function_format'.
5757
5758 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
5759
5760 * decl2.c (handle_class_head): Always push some scope even
5761 in the error case.
5762
5763 2000-09-16 Mark Mitchell <mark@codesourcery.com>
5764
5765 * cp-tree.h (struct cp_language_function): Remove
5766 x_scope_stmt_stack and name_declared.
5767 (current_scope_stmt_stack): Remove.
5768 (function_name_declared_p): New macro.
5769 (struct lang_decl_flags): Use c_lang_decl as a base class.
5770 (context): Remove.
5771 (struct lang_decl): Replace saved_tree with context.
5772 (DECL_FRIEND_CONTEXT): Adjust accordingly.
5773 (SET_DECL_FRIEND_CONTEXT): Likewise.
5774 (DECL_VIRTUAL_CONTEXT): Likewise.
5775 (DECL_SAVED_TREE): Remove.
5776 (C_DECLARED_LABEL_FLAG): Likewise.
5777 (cplus_expand_expr_stmt): Don't declare.
5778 (add_decl_stmt): Likewise.
5779 (add_scope_stmt): Likewise.
5780 * decl.c (mark_stmt_tree): Remove.
5781 (case_compare): Likewise.
5782 (finish_case_label): Use c_add_case_label.
5783 (init_decl_processing): Set more language-specific hooks.
5784 (build_enumerator): Fix typo in comment.
5785 (cplus_expand_expr_stmt): Remove.
5786 (mark_lang_function): Use mark_c_language_function.
5787 (lang_mark_tree): Use c_mark_lang_decl.
5788 * decl2.c: Change order of inclusion.
5789 * except.c: Likewise.
5790 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
5791 back on c_expand_expr.
5792 * friend.c: Include expr.h.
5793 * init.c: Change order of inclusion.
5794 * Makefile.in: Update dependencies.
5795 * lex.h (free_lang_decl_chain): Remove.
5796 * optimize.c (maybe_clone_body): Use function_name_declared_p.
5797 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
5798 it doesn't exist.
5799 (instantiate_decl): Use function_name_declared_p.
5800 * semantics.c (lang_expand_expr_stmt): Remove.
5801 (set_current_function_name_declared): Likewise.
5802 (current_function_name_declared): Likewise.
5803 (begin_compound_stmt): Use function_name_declared_p.
5804 (add_decl_stmt): Remove.
5805 (setup_vtbl_ptr): Use function_name_declared_p.
5806 (add_scope_stmt): Remove.
5807 (current_scope_stmt_stack): New function.
5808 (cp_expand_stmt): Don't handle SCOPE_STMTs.
5809 (expand_body): Use function_name_declared_p.
5810 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
5811 * typeck.c: Change order of includes.
5812 (convert_sequence): Remove.
5813
5814 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
5815
5816 * lex.c (reswords): Add _Complex.
5817
5818 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5819
5820 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
5821
5822 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
5823
5824 * init.c (begin_init_stmts): Don't use // comments.
5825
5826 2000-09-12 Jason Merrill <jason@redhat.com>
5827
5828 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
5829 all non-extern arrays.
5830
5831 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
5832 typenames, too. Downgrade complaint to pedwarn.
5833 (xref_tag): Warn about surprising behavior of 'friend struct T'.
5834 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
5835 'class This::Inherited'.
5836
5837 2000-09-12 Mark Mitchell <mark@codesourcery.com>
5838
5839 * decl.c (finish_case_label): Given the LABEL_DECL a
5840 DECL_CONTEXT.
5841
5842 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
5843
5844 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
5845 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
5846 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5847 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5848 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
5849 New macros.
5850 (sorry_for_unsupported_tree, print_scope_operator,
5851 print_left_paren, print_right_paren, print_left_bracket,
5852 print_right_bracket, print_whitespace): Likewise.
5853 (aggr_variety): Rename to class_key_or_enum.
5854 (print_type): Rename to print_type_id.
5855 (print_type_specifier_seq, print_simple_type_specifier,
5856 print_elaborated_type_specifier,
5857 print_rest_of_abstract_declarator,
5858 print_parameter_declaration_clause, print_exception_specification,
5859 print_nested_name_specifier, print_template_id,
5860 typedef_original_name, print_template_argument_list_start,
5861 print_template_argument_list_end): New functions.
5862
5863 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
5864
5865 * ir.texi: Add more documentation.
5866
5867 2000-09-11 Mark Mitchell <mark@codesourcery.com>
5868
5869 * cp-tree.h (struct saved_scope): Remove x_function_parms.
5870 (current_function_parms): Don't define.
5871 (struct cp_language_function): Remove parms_stored.
5872 (current_function_just_assigned_this): Don't define.
5873 (current_function_parms_stored): Likewise.
5874 (static_ctors): Declare.
5875 (static_dtors): Likewise.
5876 (SF_EXPAND): Don't define.
5877 (expand_start_early_try_stmts): Remove declaration.
5878 (store_parm_decls): Likewise.
5879 * decl.c (static_ctors): Don't declare.
5880 (static_dtors): Likewise.
5881 (struct binding_level): Remove this_block.
5882 (poplevel): Remove dead code.
5883 (set_block): Likewise.
5884 (mark_binding_level): Don't mark this_block.
5885 (mark_saved_scope): Don't mark x_function_parms.
5886 (init_decl_processing): Don't add current_function_parms as a GC
5887 root.
5888 (check_function_type): Change prototype.
5889 (start_function): Remove RTL-generation code.
5890 (expand_start_early_try_stmts): Remove.
5891 (store_parm_decls): Give it internal linkage. Remove
5892 RTL-generation code.
5893 (finish_function): Remove RTL-generation code.
5894 * decl2.c (static_ctors): Fix formatting.
5895 (static_dtors): Likewise.
5896 * method.c (use_thunk): Don't call store_parm_decls.
5897 (synthesize_method): Likewise.
5898 * optimize.c (maybe_clone_body): Likewise.
5899 * parse.y (fn.def2): Likewise.
5900 (.set_base_init): Likewise.
5901 (nodecls): Likewise.
5902 * pt.c (instantiate_decl): Likewise.
5903 * rtti.c (synthesize_tinfo_fn): Likewise.
5904 * semantics.c (genrtl_try_block): Simplify.
5905 (expand_body): Use genrtl_start_function and
5906 genrtl_finish_function.
5907 (genrtl_start_function): New function.
5908 (genrtl_finish_function): Likewise.
5909
5910 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5911
5912 * error.c (cp_tree_printer, case 'P'): Append break.
5913
5914 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5915
5916 * cp-tree.h (frob_opname): Declare.
5917 * parse.y (saved_scopes): New static variable.
5918 (cp_parse_init): Adjust.
5919 (do_id): If lastiddecl is NULL, do do_identifier.
5920 (operator): Save scope information.
5921 (unoperator): New reduction. Restore scope information.
5922 (operator_name): Append unoperator. Call frob_opname.
5923 * spew.c (frob_opname): Define.
5924
5925 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
5926
5927 * decl.c, rtti.c: Include defaults.h if not already included.
5928 Don't define the *_TYPE_SIZE macros.
5929
5930 2000-09-09 Mark Mitchell <mark@codesourcery.com>
5931
5932 * cp-tree.h (push_switch): Change prototype.
5933 (check_cp_case_value): Remove declaration.
5934 (decl_constant_value): Likewise.
5935 * decl.c (struct cp_switch): Add switch_stmt and cases.
5936 (case_compare): New function.
5937 (push_switch): Set switch_stmt. Initialize cases.
5938 (pop_switch): Clean up cases.
5939 (define_case_label): Rename to ...
5940 (finish_case_label): ... this. Do semantic analysis for case
5941 labels here.
5942 (start_function): Correct comment.
5943 * decl2.c (check_cp_case_value): Remove.
5944 * expr.c (do_case): Remove.
5945 * pt.c (tsubst_expr): Adjust call to finish_case_label.
5946 * semantics.c (genrtl_do_poplevel): Remove declaration.
5947 (RECHAIN_STMTS): Remove.
5948 (finish_break_stmt): Use build_break_stmt.
5949 (finish_continue_stmt): Use build_continue_stmt.
5950 (finish_switch_cond): Adjust condition here, rater than in
5951 c_expand_start_case.
5952 (finish_case_label): Remove.
5953 * typeck.c (c_expand_return): Remove.
5954 (c_expand_start_case): Likewise.
5955
5956 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
5957
5958 * ir.texi: Document type nodes.
5959
5960 2000-09-06 Mark Mitchell <mark@codesourcery.com>
5961
5962 * cp-tree.h (init_cp_semantics): Declare.
5963 (genrtl_try_block): Don't declare.
5964 (genrtl_handler): Likewise.
5965 (genrtl_catch_block): Likewise.
5966 (genrtl_ctor_stmt): Likewise.
5967 (genrtl_subobject): Likewise.
5968 (genrtl_do_poplevel): Likewise.
5969 (genrtl_named_return_value): Likewise.
5970 * lex.c (init_parse): Call init_cp_semantics.
5971 * semantics.c (genrtl_try_block): Give it internal linkage.
5972 (genrtl_handler): Likewise.
5973 (genrtl_catch_block): Likewise.
5974 (genrtl_ctor_stmt): Likewise.
5975 (genrtl_subobject): Likewise.
5976 (genrtl_do_poplevel): Likewise.
5977 (genrtl_named_return_value): Likewise.
5978 (lang_expand_stmt): Rename to ...
5979 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
5980 (init_cp_semantics): Define.
5981
5982 * decl.c (initialize_local_var): Remove RTL-generating code.
5983 * semantics.c (genrtl_try_block): Fix formatting.
5984
5985 Move statement-tree facilities from C++ to C front-end.
5986 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
5987 (void_zero_node): Remove.
5988 (stmt_tree): Likewise.
5989 (scope_chain): Adjust.
5990 (language_function): Rename to cp_language_function.
5991 (cp_function_chain): Adjust.
5992 (current_stmt_tree): Remove.
5993 (last_tree): Likewise.
5994 (last_expr_type): Likewise.
5995 (struct lang_decl): Adjust.
5996 (STMT_IS_FULL_EXPR_P): Remove.
5997 (add_tree): Remove.
5998 (begin_stmt_tree): Likewise.
5999 (finish_stmt_tree): Likewise.
6000 (walk_tree_fn): Likewise.
6001 (walk_stmt_tree): Likewise.
6002 * class.c (finish_struct): Replace use of add_tree with add_stmt.
6003 * decl.c (mark_stmt_tree): Adjust type.
6004 (init_decl_processing): Don't build void_zero_node.
6005 (initialize_local_var): Adjust usage of current_stmt_tree.
6006 (finish_enum): Use add_stmt, not add_tree.
6007 (save_function_data): Adjust use of language_function.
6008 (finish_constructor_body): Use add_stmt, not add_tree.
6009 (finish_destructor_body): Likewise.
6010 (push_cp_function_context): Adjust use of language_function.
6011 (pop_cp_function_context): Likewise.
6012 (mark_lang_function): Likewise.
6013 (mark_cp_function_context): Likewise.
6014 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6015 (build_vec_init): Likewise.
6016 * semantics.c (SET_LAST_STMT): Remove.
6017 (RECHAIN_STMTS): Don't use it.
6018 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6019 (current_stmt_tree): Define.
6020 (add_tree): Remove.
6021 (finish_goto_stmt): Use add_stmt, not add_tree.
6022 (finish_expr_stmt): Likewise.
6023 (begin_if_stmt): Likewise.
6024 (finish_then_clause): Likewise.
6025 (begin_while_stmt): Likewise.
6026 (begin_do_stmt): Likewise.
6027 (finish_return_stmt): Likewise.
6028 (begin_for_stmt): Likewise.
6029 (finish_break_stmt): Likewise.
6030 (finish_continue_stmt): Likewise.
6031 (begin_switch_stmt): Likewise.
6032 (finish_case_label): Likewise.
6033 (begin_try_block): Likewise.
6034 (begin_function_try_block): Likewise.
6035 (begin_handler): Likewise.
6036 (begin_catch_block): Likewise.
6037 (begin_compound_stmt): Likewise.
6038 (begin_asm_stmt): Likewise.
6039 (finish_asm_stmt): Likewise.
6040 (finish_label_stmt): Likewise.
6041 (add_decl_stmt): Likewise.
6042 (finish_subobject): Likewise.
6043 (finish_decl_cleanup): Likewise.
6044 (finish_named_return_value): Likewise.
6045 (setup_vtbl_ptr): Likewise.
6046 (add_scope_stmt): Likewise.
6047 (finish_stmt_expr): Likewise.
6048 (prune_unused_decls): Remove.
6049 (begin_stmt_tree): Likewise.
6050 (finish_stmt_tree): Likewise.
6051 (prep_stmt): Adjust use of current_stmt_tree.
6052 (lang_expand_stmt): Likewise.
6053 * tree.c (statement_code_p): Remove.
6054 (cp_statement_code_p): New function.
6055 (walk_stmt_tree): Remove.
6056 (init_tree): Set lang_statement_code_p.
6057
6058 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
6059
6060 Integrated preprocessor.
6061
6062 * Make-lang.in, Makefile.in: Remove all references to input.c,
6063 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
6064 * gxx.gperf, hash.h, input.c: Delete.
6065 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6066 initialized properly.
6067
6068 * class.c (fixup_pending_inline): Take a tree, not a
6069 struct pending_inline *. All callers changed.
6070 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6071 RID_PROTECTED entries in ridpointers[] array here.
6072 * decl.c (duplicate_decls): Do not refer to struct
6073 pending_inline.
6074 (record_builtin_type, init_decl_processing): Use RID_MAX not
6075 CP_RID_MAX.
6076 (grokdeclarator): Use C_IS_RESERVED_WORD.
6077 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6078 cpplib.
6079 (grok_x_components): Do not inspect pending_inlines chain.
6080
6081 * cp-tree.h (struct lang_identifier): Add rid_code entry.
6082 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6083 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6084 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6085 TIME_IDENTIFIER_FILEINFO): Kill.
6086 Update prototypes.
6087 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
6088 single 32-bit word.
6089 * parse.y: Call do_pending_inlines unconditionally.
6090 reinit_parse_for_method is now snarf_method. fn.defpen is no
6091 longer necessary. Remove unnecessary <itype> annotation on
6092 SCOPE. Do not refer to end_of_file or struct pending_inline.
6093 * semantics.c (begin_inline_definitions): Call
6094 do_pending_inlines unconditionally.
6095
6096 * lex.c: Remove all code now shared with C front end.
6097 Initialize cpplib properly if USE_CPPLIB. Put reserved words
6098 into the get_identifier table. Rewrite pragma handling to
6099 work with the registry. Move code to save tokens for later
6100 processing to spew.c.
6101
6102 * spew.c: Rewrite everything in terms of token streams instead
6103 of text. Move routines here from lex.c / input.c as
6104 appropriate. GC-mark trees hanging off the pending inlines
6105 chain.
6106
6107 2000-09-06 Mark Mitchell <mark@codesourcery.com>
6108
6109 * NEWS: Mention that the named return value extension has been
6110 deprecated.
6111 * cp-tree.h (original_result_rtx): Define.
6112 (TREE_REFERENCE_EXPR): Remove.
6113 (DECL_VPARENT): Likewise.
6114 (pushdecl_nonclass_level): Likewise.
6115 (store_return_init): Likewise.
6116 (reinit_lang_specific): Likewise.
6117 (genrtl_named_return_value): Change prototype.
6118 * decl.c (original_result_rtx): Remove.
6119 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6120 Do not generate RTL for local variables here.
6121 (store_return_init): Remove.
6122 * semantics.c (genrtl_named_return_value): Simplify. Fold in
6123 store_return_init.
6124 (finish_named_return_value): Adjust accordingly. Warn that this
6125 extension is deprecated.
6126 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6127
6128 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6129
6130 * pt.c (type_unification_real): Replace switch with if.
6131 (unify): Tsubst non-type parms before comparing.
6132
6133 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6134
6135 * error.c (dump_typename): New function, broken out of ...
6136 (dump_type): ... here. Use it.
6137 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6138
6139 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6140
6141 * init.c (build_offset_ref): Deal with namespace scoped
6142 TEMPLATE_ID_EXPRs.
6143
6144 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6145
6146 * class.c (resolve_address_of_overloaded_function): Add
6147 explanation message.
6148 * decl.c (define_case_label): Reformat explanation.
6149 * decl2.c (finish_static_data_member_decl): Likewise.
6150 (grokfield): Likewise.
6151 * friend.c (do_friend): Likewise.
6152
6153 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
6154
6155 * tree.c (walk_tree): Expose tail recursion.
6156 (walk_stmt_tree): New function.
6157 * cp-tree.h: Prototype walk_stmt_tree.
6158 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6159 the BLOCKs directly. If a BLOCK has no variables after
6160 pruning, discard it.
6161 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
6162 restore the line number.
6163
6164 2000-09-05 Mark Mitchell <mark@codesourcery.com>
6165
6166 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6167 (pt.o): Remove dependency on HTAB_H.
6168 * cp-tree.h: Include hashtab.h.
6169 (walk_tree): Change prototype.
6170 (walk_tree_without_duplicates): New function.
6171 * decl.c (check_default_argument): Use it.
6172 * optimize.c (remap_decl): Adjust calls to walk_tree.
6173 (copy_body): Likewise.
6174 (expand_calls_inline): Likewise.
6175 (calls_setjmp_p): Use walk_tree_without_duplicates.
6176 * pt.c: Don't include hashtab.h.
6177 (for_each_template_parm): Use walk_tree_without_duplicates.
6178 * semantics.c (finish-stmt_tree): Likewise.
6179 (expand_body): Likewise.
6180 * tree.c (walk_tree): Add additional parameter.
6181 (walk_tree_without_duplicates): New function.
6182 (count_trees): Use it.
6183 (verify_stmt_tree): Adjust call to walk_tree.
6184 (find_tree): Use walk_tree_without_duplicates.
6185 (no_linkage_check): Likewise.
6186 (break_out_target_exprs): Adjust call to walk_tree.
6187 (cp_unsave): Likewise.
6188
6189 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6190
6191 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6192 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6193 * cp-tree.h (TYPE_BINFO): Adjust comment.
6194 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6195 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6196 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6197 (TYPE_TEMPLATE_INFO): Likewise.
6198 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6199 * class.c (push_nested_class): Likewise.
6200 * decl.c (lookup_name_real): Likewise.
6201 (grokdeclarator): Likewise.
6202 (grok_op_properties): Likewise.
6203 (xref_tag): Likewise.
6204 (xref_basetypes): Likewise.
6205 * decl2.c (constructor_name_full): Likewise.
6206 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6207 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6208 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6209 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6210 (dump_type_suffix): Likewise.
6211 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6212 instead.
6213 (get_aggr_from_typedef): Likewise.
6214 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6215 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6216 (write_template_parm): Likewise.
6217 (write_template_template_parm): Check tree code instead of
6218 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6219 * method.c (build_overload_nested_name): Add
6220 BOUND_TEMPLATE_TEMPLATE_PARM.
6221 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6222 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6223 * pt.c (convert_template_argument): Check tree code instead of
6224 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6225 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6226 (for_each_template_parm): Adjust comment.
6227 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
6228 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6229 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
6230 template_args_equal to compare template template parameter cases.
6231 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6232 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6233 instead.
6234 * tree.c (copy_template_template_parm): Decide whether to create
6235 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6236 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6237 (copy_tree_r): Likewise.
6238 * typeck.c (comptypes): Likewise. Check tree code instead of
6239 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6240
6241 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
6242
6243 * decl.c (finish_function): Move the code for handling functions
6244 marked with the constructor and destructor attributes inside the
6245 expand_p block.
6246
6247 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6248
6249 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6250
6251 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6252
6253 * pt.c (lookup_template_class): Remove abort.
6254 * tree.c (get_type_decl): Allow error_mark_node.
6255
6256 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6257
6258 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6259 TEMPLATE_ID_EXPRs.
6260
6261 2000-09-03 Mark Mitchell <mark@codesourcery.com>
6262
6263 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6264 new ABI mangling.
6265
6266 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6267
6268 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6269 union tag mismatch error reporting.
6270
6271 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6272
6273 * call.c (build_scoped_method_call): Check it is not a namespace.
6274
6275 2000-08-30 Jason Merrill <jason@redhat.com>
6276
6277 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6278
6279 * tree.c (bot_manip): Check TREE_CONSTANT rather than
6280 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
6281 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6282
6283 * decl.c (start_function): Always call make_function_rtl.
6284
6285 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6286
6287 * semantics.c (prune_unused_decls): New function.
6288 (finish_stmt_tree): Call it via walk_tree.
6289
6290 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6291
6292 * class.c (build_secondary_vtable): Constify a char *.
6293 * decl.c (init_decl_processing): Initialize function_id_node,
6294 pretty_function_id_node, and func_id_node.
6295 * input.c (struct input_source): Constify 'str'.
6296 (feed_input): Constify first argument.
6297 * mangle.c (write_identifier): Constify argument.
6298 * pt.c (mangle_class_name_for_template): Constify argument.
6299
6300 2000-08-29 Mark Mitchell <mark@codesourcery.com>
6301
6302 * typeck.c (mark_addressable): Remove code that pokes around in
6303 RTL.
6304
6305 2000-08-28 Jason Merrill <jason@redhat.com>
6306
6307 * lex.c (file_name_nondirectory): Move to toplev.c.
6308
6309 * cp-tree.h (LOCAL_CLASS_P): New macro.
6310 * class.c (finish_struct_1): Use it.
6311
6312 2000-08-27 Alex Samuel <samuel@codesourcery.com>
6313
6314 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6315 (write_encoding): Pass another argument to write_name.
6316 (write_name): Add ignore_local_scope parameter. Fix handling of
6317 local names.
6318 (write_nested_name): Use write_unqualified_name.
6319 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
6320 (write_template_prefix): Use write_unqualified_name.
6321 (write_component): Remove.
6322 (write_local_name): Add parameter. Use direct local entity to
6323 discriminator calculation.
6324 (write_class_enum_type): Pass another argument to write_name.
6325 (write_template_template_arg): Likewise.
6326 (make_guard_variable): Likewise.
6327
6328 2000-08-27 Jason Merrill <jason@redhat.com>
6329
6330 * decl.c (pushdecl): Matching decls for local externs are found in
6331 the current level. Propagate linkage information from previous
6332 declarations.
6333
6334 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
6335
6336 * ir.texi (Expressions): Fix typo.
6337
6338 2000-08-25 Greg McGary <greg@mcgary.org>
6339
6340 * tree.c (init_tree): Use ARRAY_SIZE.
6341
6342 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6343
6344 * error.c (cp_tree_printer): Rework.
6345
6346 2000-08-25 Mark Mitchell <mark@codesourcery.com>
6347
6348 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6349 dyn-string.o.
6350 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6351 (cp-demangle.o): Remove target.
6352 (dyn-string.o): Likewise.
6353
6354 * decl.c (grokfndecl): Require that `main' return an `int'.
6355 * mangle.c (write_encoding): Don't mangle return types for
6356 conversion functions.
6357
6358 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6359
6360 * error.c (tree_formatting_info): New data type.
6361 (tree_being_formatted): New macro.
6362 (tree_formatting_flags): Likewise.
6363 (put_whitespace): Likewise.
6364 (print_tree_identifier): Likewise.
6365 (print_identifier): Likewise.
6366 (cp_tree_printer, print_function_argument_list, print_declaration,
6367 print_expression, print_function_declaration,
6368 print_function_parameter, print_type, print_cv_qualifier): New
6369 functions.
6370 (init_error): Initialize lang_printer.
6371
6372 2000-08-24 Jason Merrill <jason@redhat.com>
6373
6374 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6375 adjustment necessary.
6376
6377 2000-08-24 Greg McGary <greg@mcgary.org>
6378
6379 * cp-tree.h (MAIN_NAME_P): Remove macro.
6380
6381 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
6382
6383 * error.c (print_instantiation_context): Don't forget to flush the
6384 buffer.
6385
6386 2000-08-23 Jason Merrill <jason@redhat.com>
6387
6388 * typeck.c (build_ptrmemfunc): Save the input pmf.
6389
6390 * method.c (process_modifiers): Use same_type_p.
6391
6392 2000-08-23 Mark Mitchell <mark@codesourcery.com>
6393
6394 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6395 * mangle.c (write_function_type): Change prototype.
6396 (write_encoding): Don't mangle return types for
6397 constructors or destructors.
6398 (write_type): Adjust call to write_function_type.
6399 * pt.c (instantiate_template): Instantiate alternate entry points
6400 when instantiating the main function.
6401
6402 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6403
6404 * error.c (cp_print_error_function): Don't use embedded '\n' in
6405 output_printf.
6406
6407 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6408
6409 * decl.c (init_decl_processing): Remove bogus initialization.
6410 * error.c (lang_print_error_function): Restore here.
6411 (init_error): Initialize print_error_function.
6412
6413 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6414
6415 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6416
6417 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
6418
6419 * Makefile.in (error.o): Depends on diagnostic.h
6420
6421 * cp-tree.h (problematic_instantiation_changed,
6422 record_last_problematic_instantiation, current_instantiation,
6423 print_instantiation_context): Declare.
6424 (maybe_print_template_context): Remove.
6425
6426 * decl.c (init_decl_processing): Set print_error_function to NULL.
6427 (lang_print_error_function): Remove, since we're using a new
6428 machinery.
6429
6430 * error.c: #include diagnostic.h
6431 (function_category): New function.
6432 (cp_diagnostic_starter): Likewise.
6433 (cp_diagnostic_finalizer): Likewise.
6434 (cp_print_error_function): Likewise.
6435 (maybe_print_instantiation_context): Likewise.
6436 (print_instantiation_full_context): Likewise.
6437 (print_instantiation_partial_context): Likewise.
6438 (print_instantiation_context): Define.
6439 (init_error): Initialize diagnostic pager and finalizer.
6440
6441 * pt.c (problematic_instantiation_changed): Define.
6442 (record_last_problematic_instantiation): Likewise.
6443 (current_instantiation): Likewise.
6444 (maybe_print_template_context): Remove.
6445 (print_template_context): Likewise.
6446 (current_tinst_level): Make static to reflect Brendan Kehoe's
6447 change of 1995-04-13.
6448 (push_tinst_level): Call print_instantiation_context.
6449
6450 2000-08-21 Nix <nix@esperi.demon.co.uk>
6451
6452 * lang-specs.h: Do not process -o or run the assembler if
6453 -fsyntax-only.
6454
6455 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
6456
6457 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6458 variables.
6459 * decl2.c (lang_decode_option): Disable gettext attributes for
6460 -ansi.
6461
6462 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
6463
6464 * lex.c (lang_init_options): Default diagnostic message maximum
6465 length to 80, when line-wrapping.
6466
6467 2000-08-20 Mark Mitchell <mark@codesourcery.com>
6468
6469 * class.c (build_vtbl_initializer): Clear the entire
6470 vtbl_init_data. Start keeping track of the functions for which we
6471 have created vcall offsets here.
6472 (dfs_build_vcall_offset_vtbl_entries): Remove.
6473 (build_vcall_offset_vtbl_entries): Reimplement.
6474 (add_vcall_offset_vtbl_entries_r): New function.
6475 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
6476 computing when vcall offsets are necessary.
6477
6478 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6479
6480 * decl.c (member_function_or_else): Use cp_error ... %T.
6481 (grokdeclarator): Likewise.
6482 (start_method): Likewise.
6483 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
6484
6485 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6486
6487 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
6488 TYPE_DECLs.
6489
6490 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6491
6492 * cp-tree.h (PTRMEM_OK_P): New macro.
6493 (itf_ptrmem_ok): New enumeration value.
6494 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
6495 argument. Diagnose implicit pointer to member.
6496 (instantiate_type): Don't diagnose implicit pointer to member
6497 here. Pass itf_ptrmem_ok if ok. Adjust calls to
6498 resolve_address_of_overloaded_function.
6499 * init.c (build_offset_ref): Set PTRMEM_OK_P.
6500 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
6501 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
6502 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
6503 (build_unary_op): Deal with single non-static member in
6504 microsoft-land.
6505
6506 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6507
6508 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
6509
6510 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6511
6512 * cp-tree.h (enum_name_string): Remove prototype.
6513 (report_case_error): Remove prototype.
6514 * cp/typeck2.c (enum_name_string): Remove.
6515 (report_case_error): Remove.
6516 * error.c (dump_expr): Deal with enum values directly.
6517 Correctly negate integer constant.
6518
6519 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6520
6521 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
6522 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
6523 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
6524 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
6525 (__cxa_vec_new): Use __cxa_vec_new2.
6526 (__cxa_vec_delete): Use __cxa_vec_delete2.
6527
6528 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6529
6530 * vec.cc (__cxa_vec_new): Set "C" linkage.
6531 (__cxa_vec_ctor): Likewise.
6532 (__cxa_vec_cctor): Likewise.
6533 (__cxa_vec_dtor): Likewise.
6534 (__cxa_vec_delete): Likewise.
6535 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
6536 (__cxa_vec_ctor): Likewise.
6537 (__cxa_vec_cctor): Likewise.
6538 (__cxa_vec_dtor): Likewise.
6539 (__cxa_vec_delete): Likewise.
6540
6541 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6542
6543 * class.c (instantiate_type): Reinstate local variable
6544 deleted in previous change.
6545
6546 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
6547 itf_no_attributes.
6548
6549 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6550
6551 * cp-tree.h (instantiate_type_flags): New enumeration.
6552 (instantiate_type): Change parameter.
6553 * class.c (instantiate_type): Adjust prototype. Adjust.
6554 * call.c (standard_conversion): Adjust instantiate_type call.
6555 (reference_binding): Likewise.
6556 (build_op_delete_call): Likewise.
6557 (convert_like_real): Likewise.
6558 * cvt.c (cp_convert_to_pointer): Likewise.
6559 (convert_to_reference): Likewise.
6560 * pt.c (convert_nontype_argument): Likewise.
6561 * typeck.c (build_binary_op): Likewise.
6562 (build_ptrmemfunc): Likewise.
6563 (convert_for_assignment): Likewise.
6564
6565 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6566
6567 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
6568 (current_aggr): Define.
6569 * decl.c (grokdeclarator): Make sure a friend class is an
6570 elaborated type specifier.
6571 * parse.y (current_aggr): Remove static definition.
6572 (cp_parse_init): Adjust.
6573 (structsp): Clear and restore current_aggr.
6574 (component_decl_list): Clear current_aggr.
6575
6576 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
6577 aggregate tag on the typename's context.
6578
6579 * pt.c (tsubst_friend_class): Return error_mark_node, if
6580 parms becomes NULL.
6581 (instantiate_class_template): Ignore error_mark_node friend types.
6582
6583 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
6584
6585 * cvt.c (warn_ref_binding): New static function, broken out of ...
6586 (convert_to_reference): ... here. Use it.
6587
6588 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6589
6590 * parse.y (template_arg): Add rule for template qualified with
6591 global scope.
6592
6593 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6594
6595 * decl2.c (add_function): Reorganize.
6596 (arg_assoc): Do not consider function template decls.
6597
6598 2000-08-11 Jason Merrill <jason@redhat.com>
6599
6600 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
6601 looking inside.
6602
6603 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6604
6605 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
6606 (lookup_nested_tag): Likewise.
6607
6608 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
6609 can be produced.
6610
6611 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6612
6613 * parse.y (named_complex_class_head_sans_basetype): Remove
6614 always true if.
6615
6616 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6617
6618 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
6619 explicit TEMPLATE_ID_EXPR args.
6620 (build_expr_from_tree, case CALL_EXPR): Likewise.
6621
6622 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6623
6624 * decl.c (check_tag_decl): Diagnose typename's which don't
6625 declare anything.
6626
6627 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
6628
6629 * init.c (build_aggr_init): Reject bogus array initializers
6630 early.
6631
6632 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6633
6634 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
6635 runtime.
6636 * cp/tinfo.cc (__dynamic_cast): Likewise.
6637 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
6638
6639 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6640
6641 * cvt.c (convert_to_pointer_force): Fix error message when
6642 attempting to cast from ambiguous base.
6643
6644 2000-08-08 Jason Merrill <jason@redhat.com>
6645
6646 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
6647 (tsubst_template_arg_vector): Likewise.
6648
6649 * decl2.c (build_anon_union_vars): Choose the largest field; don't
6650 assume that one will be as large as the union.
6651
6652 2000-08-07 Kazu Hirata <kazu@hxi.com>
6653
6654 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
6655 * decl.c (pop_labels): Likewise.
6656
6657 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
6658
6659 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
6660 specifications.
6661 (__pointer_to_member_type_info): Likewise.
6662 (__base_class_info): Likewise.
6663 (__class_type_info): Likewise.
6664 (__si_class_type_info): Likewise.
6665 (__vmi_class_type_info): Likewise.
6666 * tinfo.cc (__si_class_type_info::__do_find_public_src):
6667 Changed member names to match specifications.
6668 (__vmi_class_type_info::__do_find_public_src): Likewise.
6669 (__si_class_type_info::__do_dyncast): Likewise.
6670 (__vmi_class_type_info::__do_dyncast): Likewise.
6671 (__si_class_type_info::__do_upcast): Likewise.
6672 (__vmi_class_type_info::__do_upcast): Likewise.
6673 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
6674 (__pbase_type_info::__pointer_catch): Likewise.
6675 (__pointer_type_info::__pointer_catch): Likewise.
6676 (__pointer_to_member_type_info::__pointer_catch): Likewise.
6677
6678 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
6679
6680 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
6681 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
6682 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
6683
6684 2000-08-04 Mark Mitchell <mark@codesourcery.com>
6685
6686 * cp-tree.h (add_method): Change prototype.
6687 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
6688 Don't double the size of the method vector in the error case.
6689 (handle_using_decl): Adjust call to add_method.
6690 (add_implicitly_declared_members): Likewise.
6691 (clone_function_decl): Likewise.
6692 * decl2.c (check_classfn): Likewise.
6693 * semantics.c (finish_member_declaration): Likewise.
6694
6695 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
6696
6697 * decl.c (flag_isoc94): New variable.
6698
6699 2000-08-02 Jason Merrill <jason@redhat.com>
6700
6701 * pt.c (do_type_instantiation): Add complain parm; don't complain
6702 if called recursively.
6703 * cp-tree.h, parse.y: Adjust.
6704
6705 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
6706
6707 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
6708 -Wno-strict-prototypes.
6709
6710 * g++spec.c: Adjust type of second argument to
6711 lang_specific_driver, and update code as necessary.
6712
6713 * cp-tree.h: Don't prototype min_precision here.
6714 (my_friendly_assert): Cast expression to void.
6715 * semantics.c (do_poplevel): Initialize scope_stmts.
6716
6717 2000-08-02 Mark Mitchell <mark@codesourcery.com>
6718
6719 * cp-tree.h (DECL_NEEDED_P): Tweak.
6720
6721 2000-07-28 Jason Merrill <jason@redhat.com>
6722
6723 * lang-specs.h: Use %i in rule for .ii files.
6724
6725 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
6726
6727 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
6728
6729 2000-07-30 Mark Mitchell <mark@codesourcery.com>
6730
6731 Allow indirect primary bases.
6732 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
6733 primary_base.
6734 (CLASSTYPE_VFIELD_PARENT): Remove.
6735 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
6736 (BINFO_PRIMARY_BINFO): Remove.
6737 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
6738 (BINFO_VBASE_PRIMARY_P): Likewise.
6739 (BINFO_PRIMARY_BASE_OF): New macro.
6740 (BINFO_INDIRECT_PRIMARY_P): Likewise.
6741 (get_primary_binfo): New function.
6742 * decl.c (lang_mark_tree): Make lang_type::primary_base.
6743 * class.c (vcall_offset_data_s): Rename to ...
6744 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
6745 and add ctor_vtbl_p.
6746 (get_derived_offset): Use get_primary_binfo.
6747 (dfs_mark_primary_bases): Adjust handling of virtual primary
6748 bases.
6749 (mark_primary_bases): Likewise.
6750 (set_primary_base): Take a binfo, not an integer, as a
6751 representation of the primary base.
6752 (indirect_primary_base_p): Remove.
6753 (determine_primary_base): Adjust for indirect primary bases.
6754 (dfs_find_final_overrider): Fix typo in coment.
6755 (update_vtable_entry_for_fn): Use get_primary_binfo.
6756 (layout_nonempty_base_or_field): Tweak.
6757 (build_base_fields): Adjust for new primary base semantics.
6758 (dfs_propagate_binfo_offsets): Remove.
6759 (propagate_binfo_offsets): Rewrite.
6760 (dfs_set_offset_for_shared_vbases): Remove.
6761 (layout_virtual_bases): Don't use it.
6762 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
6763 ABI.
6764 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
6765 CLASSTYPE_VFIELD_PARENT.
6766 (dfs_get_primary_binfo): New function.
6767 (get_primary_binfo): Likewise.
6768 (dump_class_hierarchy_r): Tweak printing of primary bases.
6769 (build_vtbl_initializer): Fix typo in comments. Use
6770 vtbl_init_data.
6771 (build_vcall_and_vbase_vtbl_entries): Likewise.
6772 (build_vbaes_offset_vtbl_entries): Likewise.
6773 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
6774 BV_VCALL_INDEX to handle indirect primary bases.
6775 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
6776 (build_rtti_vtbl_entries): Likewise.
6777 * search.c (get_shared_vbase_if_not_primary): Tweak.
6778 (find_vbase_instance): Likewise.
6779 (binfo_for_vtable): Simplify.
6780 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
6781 (make_binfo): Make it have 11 entries.
6782
6783 2000-07-30 Alex Samuel <samuel@codesourcery.com>
6784
6785 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
6786 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
6787 ascertaining primaryness.
6788 (G): Remove template_args.
6789 (decl_is_template_id): New function.
6790 (write_encoding): Use decl_is_template_id.
6791 (write_name): Likewise. Handle type_decls. Get main variant of
6792 type decls.
6793 (write_nested_name): Likewise.
6794 (write_prefix): Likewise.
6795 (write_template_prefix): Likewise.
6796 (write_special_name_constructor): Remove defunct production from
6797 comment.
6798 (write_bare_function_type): Remove comment about absent parameter.
6799 (write_template_template_arg): Add missing grammar production to
6800 comment.
6801
6802 2000-07-27 Jason Merrill <jason@redhat.com>
6803
6804 * decl.c (duplicate_decls): If common_type produces a non-typedef
6805 type for a typedef, just use the old type.
6806
6807 2000-07-27 Mark Mitchell <mark@codesourcery.com>
6808
6809 * cp-tree.h (function_depth): Declare.
6810 (verify_stmt_tree): Likewise.
6811 (find_tree): Likewise.
6812 * decl.c (function_depth): Give it external linkage.
6813 * optimize.c (optimize_function): Increment and decrement it.
6814 * tree.c (verify_stmt_tree_r): New function.
6815 (verify_stmt_tree): Likewise.
6816 (find_tree_r): Likewise.
6817 (find_tree): Likewise.
6818
6819 2000-07-27 Jason Merrill <jason@redhat.com>
6820
6821 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
6822 TYPE_PTRMEMFUNC_P.
6823 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
6824
6825 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6826
6827 * decl.c (start_cleanup_fn): Mark the function as `inline'.
6828 * decl2.c (get_guard): Call cp_finish_decl, not
6829 rest_of_decl_compilation, for local guards.
6830 * lex.c (do_identifier): Remove unused variable.
6831
6832 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
6833
6834 * parse.y: Add missing ';'.
6835
6836 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6837
6838 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
6839 of `extern "C++"'.
6840
6841 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6842
6843 Kill strict_prototype. Backwards compatibility only for
6844 non NO_IMPLICIT_EXTERN_C systems.
6845 * cp-tree.h (flag_strict_prototype): Remove.
6846 (strict_prototype): Remove.
6847 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6848 * decl.c (maybe_push_to_top_level): Adjust.
6849 (pop_from_top_level): Adjust.
6850 (decls_match): Only allow sloppy parm matching for ancient
6851 system headers.
6852 (init_decl_processing): Adjust.
6853 (grokdeclarator): Adjust.
6854 * decl2.c (flag_strict_prototype): Remove.
6855 (strict_prototype): Remove.
6856 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6857 (lang_f_options): Remove "strict-prototype".
6858 (unsupported-options): Add "strict-prototype".
6859 * lex.c (do_identifier): Adjust.
6860 (do_scoped_id): Adjust.
6861 * parse.y (empty_parms): Adjust.
6862 * class.c (push_lang_context): Adjust.
6863 (pop_lang_context): Adjust.
6864 * typeck.c (comp_target_parms): Adjust.
6865
6866 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6867
6868 * decl.c (poplevel): Deal with anonymous variables at for scope.
6869 (maybe_inject_for_scope_var): Likewise.
6870
6871 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
6872
6873 * decl.c: Remove all signal handling code, now done in toplev.c.
6874
6875 2000-07-23 Mark Mitchell <mark@codesourcery.com>
6876
6877 * decl.c (make_rtl_for_nonlocal_decl): Rework.
6878
6879 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
6880 correctly.
6881
6882 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
6883
6884 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
6885 Define my_friendly_assert and my_friendly_abort as macros
6886 which may call friendly_abort. Prototype friendly abort, not
6887 my_friendly_abort or my_friendly_assert.
6888 * decl.c (signal_catch): Report the signal caught in the error
6889 message. Call fatal directly.
6890 * typeck2.c (ack, my_friendly_assert): Delete.
6891 (my_friendly_abort): Rename to friendly_abort. Expect file,
6892 line, and function parameters. Report the abort code, then
6893 call fancy_abort. Do not mask an abort if errors have
6894 already occurred.
6895
6896 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
6897
6898 * typeck.c (comp_target_parms): Remove obsolete parameter.
6899 (comp_target_types): Adjust.
6900
6901 2000-07-17 Jason Merrill <jason@redhat.com>
6902
6903 * typeck.c (mark_addressable): Never set TREE_USED.
6904 * call.c (build_call): Don't abort on calls to library functions
6905 that have been declared normally.
6906
6907 * typeck.c (build_binary_op): Fix grammar in warning.
6908
6909 * exception.cc (__eh_free): Fix prototype.
6910
6911 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
6912
6913 * decl.c (pushdecl): Handle seeing an OVERLOAD in
6914 IDENTIFIER_NAMESPACE_VALUE.
6915
6916 2000-07-16 Mark Mitchell <mark@codesourcery.com>
6917
6918 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
6919 * method.c (use_thunk): Correct handling of vcall offsets.
6920
6921 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
6922
6923 * .cvsignore: parse.h and parse.c have no cp- prefix.
6924
6925 2000-07-13 Mark Mitchell <mark@codesourcery.com>
6926
6927 * .cvsignore: New file.
6928
6929 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
6930
6931 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
6932
6933 2000-07-12 Mark Mitchell <mark@codesourcery.com>
6934
6935 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
6936 * parse.c: Remove.
6937 * parse.h: Likewise.
6938
6939 2000-07-11 Mark Mitchell <mark@codesourcery.com>
6940
6941 * class.c (layout_class_type): Add pointers to virtual bases after
6942 base classes under the old ABI.
6943
6944 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
6945
6946 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
6947 (finish_continue_stmt): Likewise.
6948 (begin_for_stmt): Remove call to note_level_for_for.
6949 (finish_goto_stmt): Change call from build_min_nt
6950 to build_stmt.
6951 (finish_expr_stmt): Likewise.
6952 (begin_if_stmt): Likewise.
6953 (begin_while_stmt): Likewise.
6954 (finish_while_stmt): Likewise.
6955 (finish_return_stmt): Likewise.
6956 (begin_for_stmt): Likewise.
6957 (finish_for_stmt): Likewise.
6958 (finish_break_stmt): Likewise.
6959 (begin_switch_stmt): Likewise.
6960 (finish_case_label): Likewise.
6961 (genrtl_try_block): Likewise.
6962 (begin_try_block): Likewise.
6963 (begin_handler): Likewise.
6964 (begin_compound_stmt): Likewise.
6965 (finish_asm_stmt): Likewise.
6966 (finish_label_stmt): Likewise.
6967 (add_decl_stmt): Likewise.
6968 (finish_subobject): Likewise.
6969 (finish_decl_cleanup): Likewise.
6970 (finish_named_return_value): Likewise.
6971 (setup_vtbl_ptr): Likewise.
6972 (add_scope_stmt): Likewise.
6973 * decl.c (finish_constructor_body): Likewise.
6974 (finish_destructor_body): Likewise.
6975 * optimize.c (copy_body_r): Likewise.
6976 (initialize_inlined_parameters): Likewise.
6977 (declare_return_variable): Likewise.
6978 (expand_call_inline): Likewise.
6979
6980 2000-07-10 Jakub Jelinek <jakub@redhat.com>
6981
6982 * semantics.c (expand_body): Sync interface information
6983 at the end of function body expansion.
6984
6985 2000-07-09 Jason Merrill <jason@redhat.com>
6986
6987 * init.c (build_new_1): Bail early if the call to new fails.
6988
6989 * decl.c (compute_array_index_type): Check specifically for
6990 an INTEGER_CST, not just TREE_CONSTANT.
6991
6992 * decl.c (duplicate_decls): Don't call duplicate_decls on
6993 the DECL_TEMPLATE_RESULT.
6994 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
6995 codes.
6996
6997 * error.c (dump_template_bindings): Don't crash if we had an
6998 invalid argument list.
6999
7000 * typeck.c (c_expand_start_case): Do narrowing here.
7001 * semantics.c (finish_switch_cond): Not here.
7002
7003 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
7004
7005 * parse.y (asm_clobbers): Do string concatenation.
7006
7007 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7008
7009 * decl.c (pushtag): Don't put local classes in template functions
7010 on the local_classes list.
7011
7012 2000-07-04 Scott Snyder <snyder@fnal.gov>
7013
7014 * decl2.c (get_guard): Add missing return for old ABI local
7015 variable case.
7016
7017 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7018
7019 * cp-tree.h (char_type_p): New function.
7020 * decl.c (init_decl_processing): Don't initialize
7021 signed_wchar_type_node or unsigned_wchar_type_node.
7022 (complete_array_type): Handle brace-enclosed string-constants.
7023 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7024 * tree.c (char_type_p): New function.
7025 * typeck2.c (digest_init): Use char_type_p.
7026
7027 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7028
7029 * pt.c (tsubst): Don't layout type, if it's error_mark.
7030
7031 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7032
7033 * pt.c (instantiate_pending_templates): Reset template level.
7034
7035 2000-07-05 Jason Merrill <jason@redhat.com>
7036
7037 * call.c (joust): Don't complain about `operator char *()' beating
7038 `operator const char *() const'.
7039
7040 2000-07-04 scott snyder <snyder@fnal.gov>
7041 Jason Merrill <jason@redhat.com>
7042
7043 * repo.c (repo_get_id): Handle the case where a class with virtual
7044 bases has a null TYPE_BINFO_VTABLE.
7045
7046 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
7047 Jason Merrill <jason@redhat.com>
7048
7049 * parse.y (member_init): Just pass in the type.
7050 * init.c (expand_member_init): Handle getting a type.
7051
7052 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7053 Jason Merrill <jason@redhat.com>
7054
7055 * decl.c (finish_function): Warn if a function has no return
7056 statement.
7057 Suggested by Andrew Koenig.
7058 * typeck.c (check_return_expr): Do set current_function_returns_value
7059 if we got an error_mark_node.
7060
7061 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7062
7063 * decl2.c (push_decl_namespace): Push the original namespace.
7064
7065 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7066
7067 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7068 * semantics.c (begin_class_definition): Clear it.
7069
7070 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
7071
7072 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7073 (genrtl_expr_stmt): Likewise.
7074 (genrtl_decl_stmt): Likewise.
7075 (genrtl_if_stmt): Likewise.
7076 (genrtl_while_stmt): Likewise.
7077 (genrtl_do_stmt): Likewise.
7078 (genrtl_return_stmt): Likewise.
7079 (genrtl_for_stmt): Likewise.
7080 (genrtl_break_stmt): Likewise.
7081 (genrtl_continue_stmt): Likewise.
7082 (genrtl_scope_stmt): Likewise.
7083 (genrtl_switch_stmt): Likewise.
7084 (genrtl_case_label): Likewise.
7085 (genrtl_begin_compound_stmt): Likewise.
7086 (genrtl_finish_compound_stmt): Likewise.
7087 (genrtl_compound_stmt): Likewise.
7088 (genrtl_asm_stmt): Likewise.
7089
7090 * init.c (begin_init_stmts): Remove call to
7091 genrtl_begin_compound_stmt.
7092 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7093
7094 * semantics.c (lang_expand_stmt): Changed call to
7095 genrtl_compound_stmt to ignore return value.
7096
7097 2000-07-02 Mark Mitchell <mark@codesourcery.com>
7098
7099 * mangle.c (canonicalize_for_substitution): Return the canonical
7100 variant of a type.
7101
7102 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7103 TYPE_DECL.
7104 * typeck.c (commonparms): Remove obstack manipulations.
7105
7106 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
7107
7108 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7109
7110 * Makefile.in (OBJS): Added ../c-semantics.o.
7111 (OBJDEPS): Likewise.
7112
7113 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7114 ../c-common.h.
7115 (struct stmt_tree): Added comment.
7116 (current_function_name_declared): Removed.
7117 (stmts_are_full_exprs_p): Likewise.
7118 (genrtl_do_pushlevel): Likewise.
7119 (genrtl_clear_out_block): Likewise.
7120 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7121 (DECL_ANON_UNION_ELEMS): Likewise.
7122 (emit_local_var): Likewise.
7123 (make_rtl_for_local_static): Likewise.
7124 (do_case): Likewise.
7125 (expand_stmt): Likewise.
7126 (genrtl_decl_cleanup): Likewise.
7127 (c_expand_asm_operands): Likewise.
7128 (c_expand_return): Likewise.
7129 (c_expand_start_case): Likewise.
7130
7131 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7132 (emit_local_var): Likewise.
7133 (initialize_local_var): Change reference to
7134 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7135 Change reference to stmts_are_full_exprs_p to
7136 current_stmt_tree->stmts_are_full_exprs_p.
7137 (push_cp_function_context): Likewise.
7138
7139 * expect.c (expand_throw): Change reference to
7140 stmts_are_full_exprs_p.
7141
7142 * init.c (build_aggr_init): Change reference to
7143 stmts_are_full_exprs_p.
7144 (build_vec_init): Likewise.
7145
7146 * optimize.c (maybe_clone_body): Change reference to
7147 current_function_name_declared to
7148 cp_function_chain->name_declared.
7149
7150 * pt.c (instantiate_decl): Change reference to
7151 current_function_name_declared to
7152 cp_function_chain->name_declared.
7153
7154 * semantics.c (expand_cond): Moved declaration to c-common.h.
7155 (genrtl_do_pushlevel): Moved to c-semantics.c.
7156 (genrtl_clear_out_block): Likewise.
7157 (genrtl_goto_stmt): Likewise.
7158 (genrtl_expr_stmt): Likewise.
7159 (genrtl_decl_stmt): Likewise.
7160 (gerntl_if_stmt): Likewise.
7161 (genrtl_while_stmt): Likewise.
7162 (genrtl_do_stmt): Likewise.
7163 (genrtl_return_stmt): Likewise.
7164 (genrtl_for_stmt): Likewise.
7165 (genrtl_break_stmt): Likewise.
7166 (genrtl_continue_stmt): Likewise.
7167 (genrtl_scope_stmt): Likewise.
7168 (genrtl_switch_stmt): Likewise.
7169 (genrtl_case_label): Likewise.
7170 (genrtl_begin_compound_stmt): Likewise.
7171 (genrtl_finish_compound_stmt): Likewise.
7172 (genrtl_compound_stmt): Likewise.
7173 (genrtl_asm_stmt): Likewise.
7174 (genrtl_decl_cleanup): Likewise.
7175 (expand_cond): Likewise.
7176 (expand_stmt): Renamed to ...
7177 (lang_expand_stmt): ... this.
7178 (lang_expand_expr_stmt): Initialize.
7179 (set_current_function_name_declared): Likewise.
7180 (stmts_are_full_exprs_p): Likewise.
7181 (current_function_name_declared): Likewise.
7182 (anon_aggr_type_p): Likewise.
7183 (do_poplevel): Change reference to
7184 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7185 Change reference to stmts_are_full_exprs_p to
7186 current_stmt_tree->stmts_are_full_exprs_p.
7187 (add_tree): Likewise.
7188 (finish_expr_stmt): Likewise.
7189 (prep_stmt): Likewise.
7190 (lang_expand_stmt): Likewise.
7191 (begin_compound_stmt): Change reference to
7192 current_function_name_declared to
7193 cp_function_chain->name_declared and call to
7194 current_function_name_declared().
7195 (setup_vtbl_ptr): Likewise.
7196 (genrtl_do_poplevel): Removed.
7197
7198 2000-06-30 Jason Merrill <jason@redhat.com>
7199
7200 * init.c (init_init_processing): Go back to aligning like
7201 double_type_node for old ABI.
7202 (get_cookie_size): Make cookie larger if we get a type that needs
7203 more alignment.
7204 (build_vec_delete): Call it.
7205
7206 * typeck.c (qualify_type_recursive): New fn.
7207 (composite_pointer_type): Use it.
7208 (build_binary_op): Use composite_pointer_type.
7209
7210 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
7211 Jason Merrill <jason@redhat.com>
7212
7213 * typeck.c (check_return_expr): Don't complain about returning
7214 NULL from operator new if -fcheck-new.
7215 * cp-tree.h: Declare flag_check_new here.
7216 * init.c: Not here.
7217
7218 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7219
7220 * mangle.c (find_substitution): Use same_type_p.
7221 (write_encoding): Don't check for substitutions.
7222
7223 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7224
7225 * parse.y (expr_no_comma_rangle): New non-terminal.
7226 (template_parm): Use it for default parameter case.
7227 (template_arg): Use it.
7228 (expr_no_commas): Remove commented out undefined extensions.
7229 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7230 * parse.h, parse.c: Rebuilt.
7231
7232 2000-06-30 Mark Mitchell <mark@codesourcery.com>
7233
7234 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7235 (finish_asm_stmt): Do it here, instead.
7236
7237 * cp-tree.h (ridpointers): Don't declare.
7238 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7239 (record_builtin_java_type): Likewise.
7240 (init_decl_processing): Likewise.
7241 * lex.c: Move inclusion of lex.h.
7242 (ridpointers): Don't define.
7243 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
7244 RID_MAX.
7245 * lex.h (enum rid): Rename to ...
7246 (enum cp_rid): ... this.
7247 (ridpointers): Don't declare.
7248 * parse.y: Move inclusion of lex.h.
7249 * parse.c: Regenerated.
7250 * spew.c: Move inclusion of lex.h.
7251
7252 * cp-tree.h (struct language_function): Remove temp_name_counter.
7253 (temp_name_counter): Remove.
7254 (get_temp_name): Change prototype.
7255 (get_guard): New function.
7256 (get_guard_cond): Likewise.
7257 (set_guard): Likewise.
7258 * cvt.c (build_up_reference): Adjust call to get_temp_name.
7259 * decl.c (expand_static_init): Use get_guard and friends to
7260 implement guard variables.
7261 * decl2.c (get_temp_name): Assume that the variables created are
7262 always static.
7263 (get_sentry): Rename to ...
7264 (get_guard): ... this. Implement new ABI guard variables.
7265 (get_guard_bits): New function.
7266 (get_guard_cond): Likewise.
7267 (set_guard): Likewise.
7268 (start_static_initialization_or_destruction): Use them.
7269 (do_static_initialization): Replace sentry with guard throughout.
7270 (do_static_destruction): Likewise.
7271 * init.c (create_temporary_var): Add comment.
7272
7273 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7274
7275 * mangle.c (find_substitution): Use same_type_p.
7276 (write_encoding): Don't check for substitutions.
7277
7278 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7279
7280 * parse.y (expr_no_comma_rangle): New non-terminal.
7281 (template_parm): Use it for default parameter case.
7282 (template_arg): Use it.
7283 (expr_no_commas): Remove commented out undefined extensions.
7284 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7285 * parse.h, parse.c: Rebuilt.
7286
7287 2000-06-29 Mark Mitchell <mark@codesourcery.com>
7288
7289 * cp-tree.h (flag_const_strings): Remove.
7290 (warn_parentheses): Likewise.
7291 (warn_format): Likewise.
7292 (common_type): Likewise.
7293 (default_conversion): Likewise.
7294 (build_binary_op): Likewise.
7295 (cp_build_binary_op): New macro.
7296 * call.c (build_new_op): Use cp_build_binary_op instead of
7297 build_binary_op.
7298 * class.c (build_vtable_entry_ref): Likewise.
7299 * decl.c (expand_static_init): Likewise.
7300 (compute_array_index_type): Likewise.
7301 (build_enumerator): Likewise.
7302 * decl2.c (delete_sanity): Likewise.
7303 (start_static_initialization_or_destruction): Likewise.
7304 * error.c (dump_type_suffix): Likewise.
7305 * init.c (resolve_offset_ref): Likewise.
7306 (build_new): Likewise.
7307 (build_new_1): Likewise.
7308 (build_vec_delete_1): Likewise.
7309 (build_vec_init): Likewise.
7310 (build_delete): Likewise.
7311 * rtti.c (synthesize_tinfo_fn): Likewise.
7312 (synthesize_tinfo_var): Likewise.
7313 * search.c (expand_upcast_fixups): Likewise.
7314 (fixup_all_virtual_upcast_offsets): Likewise.
7315 * typeck.c (build_array_ref): Likewise.
7316 (get_member_function_from_ptrfunc): Likewise.
7317 (build_binary_op): Add parameter.
7318 (pointer_int_sum): Use cp_build_binary_op.
7319 (pointer_diff): Likewise.
7320 (build_modify_expr): Likewise.
7321 (get_delta_difference): Likewise.
7322 (build_ptrmemfunc): Likewise.
7323
7324 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
7325
7326 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7327 * decl.c (create_implicit_typedef): Adjust.
7328 * decl2.c (build_artificial_parm): Adjust.
7329 * method.c (implicitly_declare_fn): Adjust.
7330 * pt.c (push_inline_template_parms_recursive): Adjust.
7331 (process_template_parm): Adjust.
7332 (overloaded_template_name): Adjust.
7333 * semantics.c (finish_template_template_parm): Adjust.
7334
7335 2000-06-28 Mark Mitchell <mark@codesourcery.com>
7336
7337 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7338 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7339 where to emit thunks.
7340 (build_vtt): Adjust call to build_vtt_inits.
7341 (build_vtt_inits): Add parameter to indicate whether or not
7342 sub-VTTs for virtual bases should be included. Adjust handling of
7343 construction vtables.
7344 (get_matching_base): New function.
7345 (dfs_build_vtt_inits): Rename to ...
7346 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7347 construction vtables.
7348 (dfs_fixup_binfo_vtbls): Likewise.
7349 (build_ctor_vtbl_groups): Build construction vtables for virtual
7350 bases, too.
7351 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7352 to build construction vtbls.
7353 (dfs_accumulate_vtbl_inits): Adjust handling of
7354 construction vtables.
7355
7356 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7357 types correctly.
7358
7359 2000-06-27 Mark Mitchell <mark@codesourcery.com>
7360
7361 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7362
7363 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7364
7365 * search.c (hides): Remove.
7366 (is_subobject_of_p): Add most_derived parameter. Use
7367 CANONICAL_BINFO.
7368 (lookup_field_queue_p): Adjust.
7369 (lookup_field_r): Adjust.
7370
7371 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7372
7373 * decl2.c (handle_class_head): Bash typedefs to the type's main
7374 decl.
7375
7376 2000-06-25 Mark Mitchell <mark@codesourcery.com>
7377
7378 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7379 (begin_global_stmt_expr): ... this.
7380 (genrtl_finish_stmt_expr): Rename to ...
7381 (finish_global_stmt_expr): ... this.
7382 * init.c (begin_init_stmts): Adjust calls.
7383 (finish_init_stmts): Likewise.
7384 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7385 (begin_global_stmt_expr): ... this.
7386 (genrtl_finish_stmt_expr): Rename to ...
7387 (finish_global_stmt_expr): ... this.
7388
7389 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7390
7391 * search.c (lookup_member): Fix typo in comment.
7392
7393 2000-06-24 Jason Merrill <jason@redhat.com>
7394
7395 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7396 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7397
7398 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7399
7400 * parse.y (complex_direct_notype_declarator): Support global_scope.
7401 * Makefile.in: Adjust conflict count.
7402
7403 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7404
7405 * parse.y (template_arg): Convert TEMPLATE_DECL
7406 that is a template template parameter to
7407 TEMPLATE_TEMPLATE_PARM here.
7408
7409 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7410 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7411 (copy_template_template_parm): Adjust prototype.
7412 * decl.c (grokdeclarator): Remove dead code.
7413 * pt.c (process_template_parm): Tidy.
7414 (lookup_template_class): Construct nodes in
7415 copy_template_template_parm.
7416 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7417 lookup_template_class. Use TYPE_TI_TEMPLATE.
7418 * tree.c (copy_template_template_parm): Add NEWARGS
7419 parameter.
7420 (mapcar): Adjust call to copy_template_template_parm.
7421 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7422 * method.c (build_template_template_parm_names): Change error
7423 code to avoid compilation warning.
7424
7425 * gxxint.texi: Document template template parameter
7426 name mangling.
7427
7428 2000-06-21 Alex Samuel <samuel@codesourcery.com>
7429
7430 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7431 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7432 (cp-demangle.o): New rule.
7433 (dyn-string.o): Likewise.
7434 * inc/cxxabi.h (__cxa_demangle): New declaration.
7435
7436 2000-06-22 Mark Mitchell <mark@codesourcery.com>
7437
7438 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7439 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7440 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
7441 a tree, not an int.
7442 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7443 (make_thunk): Change prototype.
7444 (emit_thunk): Rename to use_thunk.
7445 (mangle_thunk): Change prototype.
7446 * class.c (get_derived_offset): Simplify.
7447 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7448 BV_GENERATE_THUNK_WITH_VTABLE_P.
7449 (build_primary_vtable): Simplify.
7450 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7451 (dfs_find_base): Remove.
7452 (update_vtable_entry_for_fn): Correct bug in finding the base
7453 where a virtual function was first declared. Figure out whether
7454 or not to emit a vcall-thunk with the vtables in which it appears.
7455 Correct logic for deciding whether to use an ordinary thunk, or a
7456 vcall thunk.
7457 (finish_struct_1): Remove unnecssary code.
7458 (build_vtbl_initializer): Use ssize_int for the running counter of
7459 negative indices.
7460 (build_vtbl_initializer): Only use vcall thunks where necessary.
7461 Mark thunks as needing to be emitted with their vtables, or not.
7462 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7463 indices. Use size_binop.
7464 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7465 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
7466 size_binop.
7467 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7468 (build_vtable_entry): Mark thunks as needing to be emitted with
7469 their vtables, or not.
7470 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7471 * decl2.c (mark_vtable_entries): Use use_thunk instead of
7472 emit_thunk.
7473 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
7474 information.
7475 * error.c (dump_expr): Use BV_FN.
7476 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7477 not an int.
7478 * method.c (make_thunk): Likewise.
7479 (emit_thunk): Rename to use_thunk. Allow callers to decide
7480 whether or not to actually emit the thunk. Adjust for changes in
7481 representation of vcall offsets.
7482 * search.c (dfs_get_pure_virtuals): Use BV_FN.
7483 * semantics.c (emit_associated_thunks): New function.
7484 (expand_body): Use it.
7485 * ir.texi: Adjust decriptions of thunks.
7486
7487 2000-06-22 Jason Merrill <jason@redhat.com>
7488
7489 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
7490 (tsubst_friend_function): Copy it here.
7491
7492 * decl.c (grok_op_properties): Fix typo.
7493
7494 * decl2.c (delete_sanity): Clarify warning, avoid failure on
7495 deleting void*.
7496
7497 * pt.c (check_explicit_specialization): Clarify error.
7498
7499 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
7500 an old OVERLOAD when we're declaring a non-function.
7501 (pushdecl, destroy_local_var): Check for error_mark_node.
7502 (warn_extern_redeclared_static): Also bail early if
7503 we're a CONST_DECL.
7504 (push_overloaded_decl): Ignore an old error_mark_node.
7505
7506 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
7507
7508 * call.c (build_x_va_arg): Check if in a template decl.
7509 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
7510
7511 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7512
7513 * class.c (push_lang_context): TYPE_NAME gets you to the Java
7514 types DECLs.
7515 * decl.c (check_goto): Computed gotos assumed OK.
7516
7517 2000-06-20 Jason Merrill <jason@redhat.com>
7518
7519 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
7520 for which we don't need to look for instantiations.
7521
7522 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
7523
7524 * parse.y (program): Always call finish_translation_unit.
7525 * parse.c, parse.h: Rebuilt.
7526
7527 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
7528
7529 * method.c: Don't include hard-reg-set.h.
7530
7531 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7532
7533 * rtti.c (get_base_offset): Cope when vbase field is in a base.
7534
7535 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7536
7537 * call.c (build_conditional_expr): Use VOID_TYPE_P.
7538 * cvt.c (cp_convert_to_pointer): Likewise.
7539 (convert_to_void): Likewise.
7540 * error.c (dump_expr): Likewise.
7541 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
7542 * init.c (build_delete): Likewise.
7543 * method.c (emit_thunk): Likewise.
7544 * optmize.c (declare_return_variable): Likewise.
7545 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7546 (get_typeid): Likewise.
7547 (build_dynamic_cast_1): Likewise.
7548 * typeck.c (composite_pointer_type): Likewise.
7549 (common_type): Likewise.
7550 (build_indirect_ref): Likewise.
7551 (build_binary_op): Likewise.
7552 (build_x_compound_expr): Likewise.
7553 (check_return_expr): Likewise.
7554 * typeck2.c (add_exception_specifier): Likewise.
7555
7556 * mangle.c (write_method_parms): Use direct comparison for end
7557 of parmlist.
7558
7559 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
7560
7561 * cp-tree.h (genrtl_try_block): Declare function.
7562 (genrtl_handler): Likewise.
7563 (genrtl_catch_block): Likewise.
7564 (genrtl_ctor_stmt): Likewise.
7565 (genrtl_subobject): Likewise.
7566 (genrtl_decl_cleanup): Likewise.
7567 (genrtl_do_poplevel): Likewise.
7568 (genrtl_do_pushlevel): Likewise.
7569 (genrtl_clear_out_block): Likewise.
7570 (genrtl_goto_stmt): Likewise.
7571 (genrtl_expr_stmt): Likewise.
7572 (genrtl_decl_stmt): Likewise.
7573 (genrtl_if_stmt): Likewise.
7574 (genrtl_while_stmt): Likewise.
7575 (genrtl_do_stmt): Likewise.
7576 (genrtl_return_stmt): Likewise.
7577 (genrtl_for_stmt): Likewise.
7578 (genrtl_break_stmt): Likewise.
7579 (genrtl_continue_stmt): Likewise.
7580 (genrtl_scope_stmt): Likewise.
7581 (genrtl_switch_stmt): Likewise.
7582 (genrtl_case_label): Likewise.
7583 (genrtl_begin_compound_stmt): Likewise.
7584 (genrtl_finish_compound_stmt): Likewise.
7585 (genrtl_compound_stmt): Likewise.
7586 (genrtl_asm_stmt): Likewise.
7587 (genrtl_named_return_value): Likewise.
7588 (genrtl_begin_stmt_expr): Likewise.
7589 (genrtl_finish_stmt_expr): Likewise.
7590 (finish_for_stmt): Removed first argument.
7591 (finish_switch_stmt): Likewise.
7592
7593 * semantics.c (genrtl_try_block): Define function.
7594 (genrtl_handler): Likewise.
7595 (genrtl_catch_block): Likewise.
7596 (genrtl_ctor_stmt): Likewise.
7597 (genrtl_subobject): Likewise.
7598 (genrtl_decl_cleanup): Likewise.
7599 (genrtl_do_poplevel): Likewise.
7600 (genrtl_do_pushlevel): Likewise.
7601 (genrtl_clear_out_block): Likewise.
7602 (genrtl_goto_stmt): Likewise.
7603 (genrtl_expr_stmt): Likewise.
7604 (genrtl_decl_stmt): Likewise.
7605 (genrtl_if_stmt): Likewise.
7606 (genrtl_while_stmt): Likewise.
7607 (genrtl_do_stmt): Likewise.
7608 (genrtl_return_stmt): Likewise.
7609 (genrtl_for_stmt): Likewise.
7610 (genrtl_break_stmt): Likewise.
7611 (genrtl_continue_stmt): Likewise.
7612 (genrtl_scope_stmt): Likewise.
7613 (genrtl_switch_stmt): Likewise.
7614 (genrtl_case_label): Likewise.
7615 (genrtl_begin_compound_stmt): Likewise.
7616 (genrtl_finish_compound_stmt): Likewise.
7617 (genrtl_compound_stmt): Likewise.
7618 (genrtl_asm_stmt): Likewise.
7619 (genrtl_named_return_value): Likewise.
7620 (genrtl_begin_stmt_expr): Likewise.
7621 (genrtl_finish_stmt_expr): Likewise.
7622 (finish_for_stmt): Removed first argument and generate rtl
7623 specific code.
7624 (finish_switch_stmt): Likewise.
7625 (do_poplevel): Removed generate rtl specific code.
7626 (do_pushlevel): Likewise.
7627 (add_tree): Likewise.
7628 (finish_goto_stmt): Likewise.
7629 (finish_expr_stmt): Likewise.
7630 (begin_if_stmt): Likewise.
7631 (finish_if_stmt_cond): Likewise.
7632 (finish_then_clause): Likewise.
7633 (begin_else_clause): Likewise.
7634 (finish_else_clause): Likewise.
7635 (finish_if_stmt): Likewise.
7636 (clear_out_block): Likewise.
7637 (begin_while_stmt): Likewise.
7638 (finish_while_stmt_cond): Likewise.
7639 (finish_while_stmt): Likewise.
7640 (begin_do_stmt): Likewise.
7641 (finish_do_body): Likewise.
7642 (finish_do_stmt): Likewise.
7643 (finish_return_stmt): Likewise.
7644 (begin_for_stmt): Likewise.
7645 (finish_for_init_stmt): Likewise.
7646 (finish_for_cond): Likewise.
7647 (finish_for_expr): Likewise.
7648 (finish_break_stmt): Likewise.
7649 (finish_continue_stmt): Likewise.
7650 (begin_switch_stmt): Likewise.
7651 (finish_switch_cond): Likewise.
7652 (finish_case_label): Likewise.
7653 (begin_try_block): Likewise.
7654 (begin_function_try_block): Likewise.
7655 (finish_try_block): Likewise.
7656 (finish_cleanup_try_block): Likewise.
7657 (finish_cleanup): Likewise.
7658 (finish_function_try_block): Likewise.
7659 (finish_handler_sequence): Likewise.
7660 (finish_function_handler_sequence): Likewise.
7661 (begin_handler): Likewise.
7662 (finish_handler_parms): Likewise.
7663 (begin_catch_block): Likewise.
7664 (finish_handler): Likewise.
7665 (begin_compound_stmt): Likewise.
7666 (finish_compound_stmt): Likewise.
7667 (finish_asm_stmt): Likewise.
7668 (finish_label_stmt): Likewise.
7669 (finish_label_decl): Likewise.
7670 (finish_subobject): Likewise.
7671 (finish_decl_cleanup): Likewise.
7672 (finish_named_return_value): Likewise.
7673 (begin_stmt_expr): Likewise.
7674 (finish_stmt_expr): Likewise.
7675
7676 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
7677 to call genrtl_expr_stmt when appropriate.
7678
7679 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
7680 begin_compound_expr to call genrtl_begin_stmt_expr and
7681 genrtl_begin_compound_expr when appropriate.
7682 (finish_init_stmts): Changed calls to finish_compound_expr and
7683 finish_stmt_expr to call genrtl_finish_compound_expr and
7684 genrtl_finish_stmt_expr when appropriate.
7685 (expand_default_init): Changed call to finish_expr_stmt to call
7686 genrtl_expr_stmt when appropriate.
7687 (build_vec_init): Likewise.
7688
7689 * parse.y (simple_stmt): Removed first argument from call to
7690 finish_for_stmt. Removed first argument from call to
7691 finish_switch_stmt.
7692
7693 * parse.c: Regenerated.
7694
7695 * pt.c (tsubst_expr): Removed first argument from call to
7696 finish_for_stmt. Removed first argument from call to
7697 finish_switch_stmt.
7698
7699 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
7700
7701 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
7702 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
7703
7704 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
7705 (cplus_tree_code_length[]): Likewise.
7706 (cplus_tree_code_name[]): Likewise.
7707 (init_parse): Added call to add_c_tree_codes. Changed
7708 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
7709
7710 2000-06-16 Mark Mitchell <mark@codesourcery.com>
7711
7712 * cp-tree.h (finish_mem_initializers): Declare.
7713 (count_trees): Likewise.
7714 * parse.y (base_init): Use finish_mem_initializers.
7715 * semantics.c (finish_mem_initializers): New function.
7716
7717 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
7718 the number of trees.
7719 (n_trees): Remove.
7720 (count_trees): Don't use it.
7721
7722 2000-06-15 Jason Merrill <jason@redhat.com>
7723
7724 * tree.c (count_trees): New debugging function.
7725
7726 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
7727 * init.c (build_member_call): Pull out the name of a DECL.
7728
7729 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
7730 * semantics.c (expand_body): Push to TV_INTEGRATION here.
7731 * optimize.c (optimize_function): Not here.
7732 * pt.c (instantiate_decl): Push to TV_PARSE.
7733
7734 2000-06-15 Mark Mitchell <mark@codesourcery.com>
7735
7736 * cp-tree.h (struct language_function): Remove x_base_init_list
7737 and x_member_init_list.
7738 (current_base_init_list): Remove.
7739 (current_member_init_list): Likewise.
7740 (setup_vtbl_ptr): Change prototype.
7741 (emit_base_init): Likewise.
7742 (expand_member_init): Likewise.
7743 (reinit_parse_for_function): Remove.
7744 * decl.c (save_function_data): Don't clear x_base_init_list and
7745 x_member_init_list.
7746 (mark_language_function): Don't mark them.
7747 * init.c (perform_member_init): Tweak comment.
7748 (sort_member_init): Take the list of initializers as an argument.
7749 (sort_base_init): Likewise.
7750 (emit_base_init): Likewise.
7751 (expand_member_init): Return the initializer. Don't use global
7752 variables.
7753 * lex.c (reinit_parse_for_function): Remove.
7754 * method.c (build_template_parm_names): Correct substitution.
7755 (do_build_copy_constructor): Don't use current_member_init_list
7756 and current_base_init_list.
7757 (synthesize_method): Likewise.
7758 * parse.y (base_init): Split mem-initializers into
7759 base-initializers and field-initializers.
7760 (member_init_list): Build up the list here.
7761 (member_init): Return the initializer.
7762 (fn.depfn): Don't use reinit_parse_for_function.
7763 * parse.c: Regenerated.
7764 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
7765 ERROR_MARK.
7766 (tsubst_expr): Don't use current_member_init_list
7767 and current_base_init_list.
7768 (tsubst_expr_values): Rename to ...
7769 (tsubst_initializer_list): ... this. Use convert_from_reference.
7770 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
7771 and current_base_init_list.
7772 (begin_function_definition): Don't call reinit_parse_for_function.
7773
7774 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
7775
7776 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
7777 correctly.
7778
7779 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
7780
7781 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
7782
7783 * cp-tree.h (IF_COND): Move to c-common.h.
7784 (THEN_CLAUSE): Likewise.
7785 (ELSE_CLAUSE): Likewise.
7786 (WHILE_COND): Likewise.
7787 (WHILE_BODY): Likewise.
7788 (DO_COND): Likewise.
7789 (DO_BODY): Likewise.
7790 (RETURN_EXPR): Likewise.
7791 (EXPR_STMT_EXPR): Likewise.
7792 (FOR_INIT_STMT): Likewise.
7793 (FOR_COND): Likewise.
7794 (FOR_EXPR): Likewise.
7795 (FOR_BODY): Likewise.
7796 (SWITCH_COND): Likewise.
7797 (SWITCH_BODY): Likewise.
7798 (CASE_LOW): Likewise.
7799 (CASE_HIGH): Likewise.
7800 (GOTO_DESTINATION): Likewise.
7801 (COMPOUND_BODY): Likewise.
7802 (ASM_CV_QUAL): Likewise.
7803 (ASM_STRING): Likewise.
7804 (ASM_OUTPUTS): Likewise.
7805 (ASM_INPUTS): Likewise.
7806 (ASM_CLOBBERS): Likewise.
7807 (DECL_STMT_DECL): Likewise.
7808 (STMT_EXPR_STMT): Likewise.
7809 (LABEL_STMT_LABEL): Likewise.
7810 (SCOPE_BEGIN_P): Likewise.
7811 (SCOPE_END_P): Likewise.
7812 (SCOPE_STMT_BLOCK): Likewise.
7813 (SCOPE_NULLIFIED_P): Likewise.
7814 (SCOPE_NO_CLEANUPS_P): Likewise.
7815 (SCOPE_PARTIAL_P): Likewise.
7816 (ASM_VOLATILE_P): Likewise.
7817 (STMT_LINENO): Likewise.
7818 (STMT_LINENO_FOR_FN_P): Likewise.
7819
7820 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
7821 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
7822 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
7823 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
7824 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
7825
7826 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
7827
7828 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
7829 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
7830
7831 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
7832 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
7833 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
7834
7835 2000-06-14 Mark Mitchell <mark@codesourcery.com>
7836
7837 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
7838 * class.c (dfs_find_final_overrider): Set it appropriately.
7839 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
7840 avoid unneeded secondary vptrs.
7841
7842 2000-06-13 Jakub Jelinek <jakub@redhat.com>
7843
7844 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
7845 (check_bitfield_decl, check_field_decl): Likewise.
7846 (build_vtbl_or_vbase_field, build_base_field): Likewise.
7847 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
7848 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
7849 (xfer_tag, finish_enum): Likewise.
7850 * decl2.c (finish_builtin_type): Likewise.
7851 * init.c (init_init_processing): Likewise.
7852 * pt.c (instantiate_class_template): Likewise.
7853 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
7854 * cp-tree.h (struct lang_type): Add user_align member.
7855 (CLASSTYPE_USER_ALIGN): Define.
7856
7857 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7858
7859 * Make-lang.in (c++.install-common): Install g++-cross in
7860 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
7861 $(target_alias)-g++ and $(target_alias)-c++.
7862
7863 2000-06-12 Mark Mitchell <mark@codesourcery.com>
7864
7865 * class.c (vcall_offset_data_s): Add last_init and fns.
7866 (overrides): Rename to same_signature_p.
7867 (dfs_find_final_overrider): Adjust accordingly.
7868 (mark_overriders): Likewise.
7869 (warn_hidden): Likewise.
7870 (build_vtbl_initializer): Reorganize machinery for building things
7871 at negative offsets.
7872 (build_vcall_and_vbase_vtbl_entries): Likewise.
7873 (build_vbase_offset_vtbl_entries): Likewise.
7874 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
7875 offset entries. Do not create two entries for functions with the
7876 same signature.
7877 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
7878 (build_rtti_vtbl_entries): Reorganize machinery for building things
7879 at negative offsets.
7880
7881 * optimize.c (expand_call_inline): Don't recurse into the code
7882 used to initialize the parameters more than once.
7883
7884 2000-06-11 Mark Mitchell <mark@codesourcery.com>
7885
7886 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
7887 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
7888 (find_substitution): Only use the `Sa' substitution for
7889 std::allocator, not instantiations of it.
7890 (write_template_prefix): Move comment. Only use a TREE_LIST to
7891 represent substitutions for a member template.
7892 (write_array_type): Mangle array dimensions correctly.
7893 * optimize.c (maybe_clone_body): Copy more information from the
7894 cloned function.
7895 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
7896 on the regenerated declaration.
7897
7898 2000-06-11 Chip Salzenberg <chip@valinux.com>
7899 Mark Mitchell <mark@codesourcery.com>
7900
7901 * class.c (build_vtable): Clarify comment.
7902 (build_ctor_vtbl_group): Pass the most derived type to
7903 build_vtable.
7904
7905 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7906
7907 * decl2.c (compare_options): Don't needlessly cast away const-ness.
7908
7909 2000-06-10 Mark Mitchell <mark@codesourcery.com>
7910
7911 * decl.c (add_binding): Handle duplicate declarations of external
7912 variables.
7913
7914 2000-06-09 Chip Salzenberg <chip@valinux.com>
7915 Mark Mitchell <mark@codesourcery.com>
7916
7917 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
7918 argument.
7919 (write_signed_number): New macro.
7920 (write_unsigned_number): Likewise.
7921 (write_source_name): Use them.
7922 (write_number): Handle signed and unsigned values.
7923 (write_integer_cst): Use tree_int_cst_sgn, and use
7924 write_unsigned_number or write_signed_number as appropriate.
7925 (write_discriminator): Use write_unsigned_number or
7926 write_signed_number as appropriate.
7927 (write_template_arg_literal): Likewise.
7928 (write_array_type): Use tree_low_cst.
7929 (write_template_parm): Use write_unsigned_number or
7930 write_signed_number as appropriate.
7931 (write_substitution): Adjust call to write_number.
7932 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
7933 (write_expression): Handle non-type template arguments of
7934 reference type correctly.
7935 (mangle_thunk): Use write_signed_number.
7936
7937 2000-06-09 Chip Salzenberg <chip@valinux.com>
7938
7939 * mangle.c (find_substition): Don't mangle objects with typename
7940 substitutions (e.g. "cin" as "Si").
7941
7942 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
7943
7944 * call.c (add_candidate): Use ggc_alloc_cleared.
7945 * decl.c (lookup_label): Likewise.
7946 * lex.c (retrofit_lang_decl): Likewise.
7947
7948 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
7949
7950 * semantics.c (expand_body): Push to TV_EXPAND.
7951 * optimize.c (optimize_function): Push to TV_INTEGRATION.
7952 * decl.c (start_function): Always call announce_function.
7953
7954 * tinfo2.cc: Just declare abort.
7955
7956 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
7957
7958 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
7959 whenever @ is a symbolic name.
7960
7961 2000-06-08 Jakub Jelinek <jakub@redhat.com>
7962
7963 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
7964
7965 2000-06-07 Mark Mitchell <mark@codesourcery.com>
7966
7967 * decl.c (pushdecl): Look up functions by DECL_NAME, not
7968 DECL_ASSEMBLER_NAME.
7969
7970 2000-06-06 Mark Mitchell <mark@codesourcery.com>
7971
7972 * decl2.c (c_language): Define.
7973
7974 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7975
7976 * lex.c (lang_init_options): Tweak.
7977
7978 * decl2.c: Remove #inclusion of diagnostic.h
7979 (lang_decode_option): Move diagnostic formatting options to
7980 toplevel.
7981
7982 * lang-options.h: Remove documentation for diagnostic options.
7983
7984 * Makefile.in (lex.o): Depends upon diagnostic.h
7985
7986 2000-06-06 Mark Mitchell <mark@codesourcery.com>
7987
7988 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
7989 the same DECL_RESULT, it's not a redefinition.
7990 * pt.c (tsubst_decl): Remove code to handle illegal
7991 specializations.
7992
7993 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
7994
7995 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
7996
7997 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
7998
7999 * search.c (maybe_suppress_debug_info): Don't check
8000 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8001
8002 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8003 here if extern_p.
8004
8005 Remember instantiation context in deferred instantiations.
8006 * cp-tree.h (struct tinst_level): Remove.
8007 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8008 * pt.c (current_tinst_level): Now a tree.
8009 (print_template_context, push_tinst_level, pop_tinst_level,
8010 tinst_for_decl): Adjust.
8011 (reopen_tinst_level): New fn.
8012 (init_pt): Register current_tinst_level as a root.
8013 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8014 of the pending templates list.
8015 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
8016 * lex.c (extract_interface_info): Adjust.
8017 * decl2.c (warn_if_unknown_interface): Adjust.
8018
8019 2000-06-05 Mark Mitchell <mark@codesourcery.com>
8020
8021 * class.c (indirect_primary_base_p): New function.
8022 (determine_primary_base): Use it.
8023
8024 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
8025
8026 Update new-abi dynamic cast algorithm.
8027 * tinfo.cc (__class_type_info::__dyncast_result): Add
8028 whole_details. Adjust constructor.
8029 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8030 Avoid unnecessary searching.
8031 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8032
8033 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8034
8035 * decl.c (init_decl_processing): Don't call record_component_aliases.
8036 * tree.c (build_cplus_array_type_1): Likewise.
8037
8038 2000-06-04 Mark Mitchell <mark@codesourcery.com>
8039
8040 * ir.texi: Correct typo.
8041 * mangle.c (write_expression): Handle non-type template arguments
8042 with reference type.
8043 * method.c (build_overload_value): Likewise.
8044 * pt.c (convert_nontype_argument): Explicitly represent conversion
8045 to a reference with an ADDR_EXPR.
8046 (unify): Always unify arguments in left-to-right order.
8047
8048 2000-06-03 Alex Samuel <samuel@codesourcery.com>
8049 Mark Mitchell <mark@codesourcery.com>
8050
8051 * Make-lang.in (CXX_SRCS): Add mangle.c.
8052 * Makefile.in (CXX_OBJS): Add mangle.o.
8053 (mangle.o): New rule.
8054
8055 * class.c (local_classes): New variable.
8056 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8057 (get_vtt_name): Use mangle_vtt_name for new ABI.
8058 (init_class_processing): Initialize local_classes.
8059 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8060 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8061 (std_identifier): New macro.
8062 (DECL_VOLATILE_MEMFUNC_P): New macro.
8063 (DECL_NAMESPACE_STD_P): Likewise.
8064 (local_classes): Declare.
8065 (get_mostly_instantiated_function_type): Declare.
8066 (init_mangle): Declare.
8067 (mangle_decl): Likewise.
8068 (mangle_type_string): Likewise.
8069 (mangle_type): Likewise.
8070 (mangle_typeinfo_for_type): Likewise.
8071 (mangle_typeinfo_string_for_type): Likewise.
8072 (mangle_vtbl_for_type): Likewise.
8073 (mangle_vtt_for_type): Likewise.
8074 (mangle_ctor_vtbl_for_type): Likewise.
8075 (mangle_thunk): Likewise.
8076 (mangle_conv_op_name_for_type): Likewise.
8077 (mangle_guard_variable): Likewise.
8078 * decl.c (pushtag): Keep track of local classes.
8079 (initialize_predefined_identifiers): Initialize std_identifier.
8080 (init_decl_processing): Use std_identifier.
8081 (start_decl): Don't treat instantiations as specializations.
8082 (grokdeclarator): Likewise.
8083 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
8084 name for fully-instantiated templates.
8085 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8086 destructors with the new ABI.
8087 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8088 (grokfield): Use mangle_type for new ABI.
8089 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8090 (get_sentry): Use mangle_guard_variable for new ABI.
8091 (start_static_initialization_or_destruction): Likewise.
8092 * expr.c (extract_aggr_init): Remove.
8093 (extract_scalar_init): Likewise.
8094 (extract_init): Remove #if 0'd code.
8095 * mangle.c: New function.
8096 * method.c (build_mangled_name): Assert not flag_new_abi.
8097 (build_static_name): Likewise.
8098 (build_decl_overload_real): Likewise.
8099 (build_typename_overload): Likewise.
8100 (build_overload_with_type): Likewise.
8101 (build_overload_name): Likewise.
8102 (get_ctor_vtbl_name): Likewise.
8103 (start_squangling): Likewise.
8104 (get_id_2): Likewise.
8105 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8106 (init_method): Call init_mangle for new ABI.
8107 (make_thunk): Call mangle_thunk for new ABI.
8108 * operators.def: Correct new ABI manglings for the `%' operator.
8109 Add `::' operator.
8110 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8111 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8112 (lookup_template_class): Call mangle_decl for new ABI.
8113 (get_mostly_instantiated_function_type): New function.
8114 (set_mangled_name_for_template_decl): Use it.
8115 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8116 the new ABI. Use mangle_conv_op_name_for_type for instantiated
8117 conversion op names.
8118 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8119 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8120 (tinfo_base_init): Likewise. Mangle typeinfo string name with
8121 mangle_typeinfo_string_for_type.
8122
8123 2000-06-03 Mark Mitchell <mark@codesourcery.com>
8124
8125 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8126 (INNERMOST_TEMPLATE_ARGS): New macro.
8127 (innermost_args): Remove.
8128 (get_innermost_template_args): New function.
8129 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8130 * error.c (dump_function_decl): Be caution when using
8131 most_general_template.
8132 * method.c (build_template_parm_names): Use
8133 INNERMOST_TEMPLATE_ARGS.
8134 * pt.c (add_to_template_args): Tidy comment
8135 (get_innermost_template_args): New function.
8136 (check_explicit_specialization): Clear DECL_INITIAL for a new
8137 specialization.
8138 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8139 Tidy.
8140 (push_template_decl): Always register specializations of the most
8141 general template.
8142 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8143 (coerce_template_parms): Likewise.
8144 (lookup_template_class): Likewise.
8145 (innermost_args): Remove.
8146 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8147 (tsubst_decl): Handle tricky specializations. Use
8148 get_innermost_template_args.
8149 (instantiate_template): Simplify handling of partial
8150 instantiations.
8151 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8152 (most_general_template): Reimplement, in a more straightforward
8153 manner.
8154 (regenerate_decl_from_template): Tweak formatting. Use
8155 TMPL_ARGS_DEPTH for clarity.
8156 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8157
8158 * dump.c (dequeue_and_dump): Dump information about thunks.
8159
8160 2000-06-01 Richard Henderson <rth@cygnus.com>
8161
8162 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8163
8164 2000-06-01 Richard Henderson <rth@cygnus.com>
8165
8166 * decl2.c (unsupported_options): Fix typo, make const.
8167 (lang_decode_option): Fix bsearch argument order.
8168
8169 2000-06-01 Mark Mitchell <mark@codesourcery.com>
8170
8171 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8172 on FIELD_DECLs.
8173
8174 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8175
8176 * cp-tree.h (c_get_alias_set): Deleted.
8177 * Makefile.in (decl.o): Include ../expr.h.
8178 * decl.c (expr.h): Include.
8179 (init_decl_processing): Call record_component_aliases for arrays.
8180 (grokdeclarator): Likewise.
8181 Set TREE_ADDRESSABLE for fields that aren't bitfields.
8182 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8183
8184 2000-05-31 Mark Mitchell <mark@codesourcery.com>
8185
8186 Remove guiding declaration support.
8187 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8188 (flag_guiding_decls): Remove.
8189 * call.c (build_user_type_conversion_1): Remove support for
8190 guiding decls.
8191 (build_new_function_call): Likewise.
8192 (build_new_op): Likewise.
8193 (build_new_method_call): Likewise.
8194 * decl.c (start_function): Likewise.
8195 * friend.c (is_friend): Likewise.
8196 (do_friend): Likewise.
8197 * decl2.c ((flag_dump_translation_unit): Make it const.
8198 (flag_guiding_decls): Remove.
8199 (unsupported_options): New variable
8200 (compare_options): New function.
8201 (lang_decode_option): Use them.
8202
8203 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8204
8205 * method.c (mangle_expression): Adjust test for legal expression
8206 operators.
8207
8208 * pt.c (instantiate_decl): Save and restore the local
8209 specializations list.
8210
8211 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
8212
8213 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8214
8215 2000-05-30 Mark Mitchell <mark@codesourcery.com>
8216
8217 * call.c (add_template_candidate_real): Handle member template
8218 constructors for classes with virtual bases.
8219 (build_user_type_conversion_1): Use in_charge_arg_for_name.
8220 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8221
8222 * ir.texi: Update thunk documentation.
8223
8224 * call.c (joust): Fix handling of overloaded builtin operators.
8225
8226 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
8227
8228 * cp-tree.h (DECL_ANTICIPATED): New macro.
8229 Document new use of DECL_LANG_FLAG_7.
8230 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8231 in the user namespace.
8232 * lex.c (do_identifier): If the identifier's declaration has
8233 DECL_ANTICIPATED on, it has not yet been declared. But do not
8234 replace it with an ordinary implicit declaration.
8235
8236 * tinfo2.cc: Include stdlib.h.
8237
8238 2000-05-29 Mark Mitchell <mark@codesourcery.com>
8239
8240 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8241 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8242 CLASSTYPE_ALIGN.
8243
8244 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
8245
8246 * decl2.c (lang_decode_option): Use skip_leading_substring instead
8247 of plain strncmp.
8248
8249 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
8250
8251 * operators.def (<?): Duplicated, should have been...
8252 (>?): this. Fixed.
8253
8254 2000-05-27 Alex Samuel <samuel@codesourcery.com>
8255 Mark Mitchell <mark@codesourcery.com>
8256
8257 * cp-tree.h (ansi_opname): Make it a macro.
8258 (ansi_assopname): Likewise.
8259 (struct lang_decl_flags): Add assignment_operator_p.
8260 (struct lang_decl): Add operator_code.
8261 (DECL_VTT_PARM): Adjust.
8262 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8263 overloaded operator.
8264 (SET_OVERLOADED_OPERATOR_CODE): New macro.
8265 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8266 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8267 (opname_tab): Remove.
8268 (assignop_tab): Likewise.
8269 (operator_name_info_t): New type.
8270 (operator_name_info): New variable.
8271 (assignment_operator_name_info): Likewise.
8272 (build_cp_library_fn): Remove declaration.
8273 (push_cp_library_fn): Likewise.
8274 (operator_name_string): Likewise.
8275 (build_decl_overload): Likewise.
8276 * call.c (print_z_candidates): Simplify.
8277 (build_object_call): Adjust usage of ansi_opname. Use
8278 DECL_OVERLOADED_OPERATOR_P.
8279 (op_error): Adjust operator name lookup.
8280 (build_conditional_expr): Adjust usage of ansi_opname.
8281 (build_new_op): Likewise.
8282 (build_op_delete_call): Likewise.
8283 (build_over_call): Likewise.
8284 (joust): Use DECL_OVERLOADED_OPERATOR_P.
8285 * decl.c (duplicate_decls): Copy operator_code.
8286 (init_decl_processing): Adjust parameters to push_cp_library_fn.
8287 (builtin_function): Adjust parameters to build_library_fn_1.
8288 (build_library_fn_1): Accept an overloaded operator code.
8289 (build_library_fn): Pass ERROR_MARK.
8290 (build_cp_library_fn): Accept an overloaded operator code.
8291 (push_cp_library_fn): Likewise.
8292 (grokfndecl): Tweak.
8293 (grokdeclarator): Simplify code to compute names of overloaded
8294 operators. Adjust use of ansi_opname.
8295 (ambi_op_p): Work on tree_codes, not identifiers.
8296 (unary_op_p): Likewise.
8297 (grok_op_properties): Likewise.
8298 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8299 (lang_mark_tree): Don't try to mark the operator_code.
8300 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8301 * error.c (dump_decl): Remove special handling for operator
8302 names.
8303 (dump_function_name): Likewise.
8304 (dump_expr): Adjust name lookup of operators.
8305 (op_to_string): Simplify.
8306 (assop_to_string): Likewise.
8307 * init.c (build_new_1): Adjust use of ansi_opname.
8308 * lex.c (opname_tab): Remove.
8309 (assignop_tab): Likewise.
8310 (ansi_opname): Likewise.
8311 (ansi_assopname): Likewise.
8312 (operator_name_string): Likewise.
8313 (reinit_lang_specific): Likewise.
8314 (operator_name_info): New variable.
8315 (assignment_operator_name_info): Likewise.
8316 (init_operators): New function.
8317 (init_parse): Use it.
8318 (do_identifier): Adjust use of ansi_opname.
8319 * method.c (mangle_expression): Don't use ansi_opname for
8320 mangling.
8321 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8322 (build_decl_overload): Remove.
8323 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8324 (do_build_assign_ref): Adjust use of ansi_opname.
8325 (synthesize_method): Likewise.
8326 (implicitly_declare_fn): Likewise.
8327 * operators.def: New file.
8328 * parse.y (operator): Adjust use of ansi_opname.
8329 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8330 (set_mangled_name_for_template_decl): Don't play games with
8331 current_namespace.
8332 (special_function_p): Adjust use of ansi_opname.
8333 * typeck.c (check_return_expr): Likewise.
8334 * Make-lang.in (cc1plus): Depend on operators.def.
8335 * Makefile.in (lex.o): Likewise.
8336 (decl.o): Likewise.
8337
8338 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
8339
8340 * Make-lang.in (cplib2.ready): Eradicate.
8341
8342 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8343
8344 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8345 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8346 (built_min, cp_tree_equal): Likewise.
8347
8348 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8349
8350 * class.c (layout_nonempty_base_or_field): Replace
8351 `record_layout_info' with `record_layout_info_s'.
8352
8353 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
8354
8355 Fix goto checking.
8356 * cp-tree.h (struct language_function): x_named_labels is now
8357 a struct named_label_list*.
8358 * decl.c (struct named_label_use_list): Renamed from...
8359 (struct named_label_list): ...this. New struct.
8360 (push_binding_level): Don't set eh_region.
8361 (note_level_for_eh): New fn.
8362 (pop_label): Take label and old value directly.
8363 (pop_labels): Adjust for new named_labels format.
8364 (lookup_label): Likewise.
8365 (poplevel): Note characteristics of a binding level containing a
8366 named label. Mess with named label lists earlier.
8367 (mark_named_label_lists): New fn.
8368 (mark_lang_function): Call it.
8369 (use_label): New fn, split out from...
8370 (make_label_decl): ...here. Don't call it.
8371 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8372 check_previous_gotos): New fns, split out from...
8373 (define_label): ...here.
8374 (check_switch_goto): New fn.
8375 (define_case_label): Call it.
8376 (check_goto): New fn.
8377 * semantics.c (finish_goto_stmt): Call it and use_label.
8378 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8379 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8380
8381 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8382
8383 * class.c (build_vtable_entry_ref): Correct usage of
8384 get_vtbl_decl_for_binfo.
8385
8386 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8387 * method.c (implicitly_declare_fn): Not here.
8388
8389 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
8390
8391 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8392 (CPTI_PTMD_DESC_TYPE): ... here.
8393 (ptmd_desc_type_node): Rename to ...
8394 (ptm_desc_type_node): ... here.
8395 * decl.c: Likewise.
8396 * rtti.c (ptmd_initializer): Rename to ...
8397 (ptm_initializer): ... here.
8398 (sythesize_tinfo_var): Adjust. Deal with pointer to member
8399 function.
8400 (create_tinfo_types): Adjust.
8401
8402 2000-05-25 Mark Mitchell <mark@codesourcery.com>
8403
8404 Finish implementation of VTTs.
8405 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8406 CPTI_VTT_PARM_IDENTIFIER.
8407 (vtt_parm_identifier): New macro.
8408 (vtt_parm_type): Likewise.
8409 (BINFO_SUBVTT_INDEX): Likewise.
8410 (BINFO_VPTR_INDEX): Likewise.
8411 (struct lang_decl): Add vtt_parm.
8412 (DECL_VTT_PARM): New macro.
8413 (DECL_USE_VTT_PARM): Likewise.
8414 (DECL_NEEDS_VTT_PARM_P): Likewise.
8415 (get_vtt_name): Declare.
8416 (build_artificial_parm): Likewise.
8417 (fixup_all_virtual_upcast_offsets): Likewise.
8418 (expand_indirect_vtbls_init): Remove.
8419 * call.c (build_new_method_call): Pass the vtt to subobject
8420 constructors and destructors.
8421 * class.c (get_vtt_name): Give it external linkage.
8422 (build_clone): Handle the magic VTT parameters for clones.
8423 (clone_function_decl): Fix typo in comment.
8424 (build_vtt): Keep track of the indices in the VTTs where various
8425 entities are stored.
8426 (build_vtt_inits): Likewise.
8427 (dfs_build_vtt_inits): Likewise.
8428 (build_ctor_vtbl_group): Tweak type of construction vtables.
8429 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8430 primary bases, when building construction vtables.
8431 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8432 (initialize_predefined_identifiers): Add vtt_parm_identifier.
8433 (init_decl_processing): Initialize vtt_parm_type.
8434 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8435 (lang_mark_tree): Make vtt_parm.
8436 * decl2.c (build_artificial_parm): New function.
8437 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
8438 (grokclassfn): Use build_artificial_parm.
8439 * init.c (initialize_vtbl_ptrs): Call
8440 fixup_all_virtual_upcast_offsets directly.
8441 (perform_member_init): Use the complete subobject destructor for
8442 member cleanups.
8443 (build_vtbl_address): New function.
8444 (expand_virtual_init): Handle VTTs.
8445 * optimize (maybe_clone_body): Likewise.
8446 * search.c (fixup_all_virtual_upcast_offsets): Give it external
8447 linkage.
8448 (expand_indirect_vtbls_init): Remove.
8449 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8450 * tree.c (make_binfo): Make them bigger.
8451
8452 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8453
8454 * inc/cxxabi.h (__pbase_type_info): Define, based on
8455 __pointer_type_info.
8456 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8457 (__pointer_to_member_type_info): Likewise.
8458 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8459 (__pointer_to_member_type_info::__is_pointer_p): Remove.
8460 (__pointer_type_info::__do_catch): Rename to ...
8461 (__pbase_type_info::__do_catch): ... here. Adjust.
8462 (__pbase_type_info::__pointer_catch): Implement.
8463 (__pointer_type_info::__pointer_catch): Adjust.
8464 (__pointer_to_member_type_info::__pointer_catch): Adjust.
8465
8466 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8467
8468 * tinfo.h (__user_type_info::contained_virtual_p): New
8469 predicate.
8470 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8471 shaped hierarchy.
8472 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8473 diamond shaped hierarchy. Add early out for mixed diamond and
8474 duplicate shaped hierarchy.
8475
8476 2000-05-24 Mark Mitchell <mark@codesourcery.com>
8477
8478 * cp-tree.h (build_delete): Change prototype.
8479 (build_vec_delete): Likewise.
8480 * call.c (build_scoped_method_call): Use special_function_kind
8481 values to indicate the kind of destruction to be done.
8482 (build_method_call): Likewise.
8483 * decl.c (finish_destructor_body): Likewise.
8484 (maybe_build_cleanup_1): Likewise. Rename to ...
8485 (maybe_build_cleanup): ... this.
8486 * decl2.c (delete_sanity): Use special_function_kind
8487 values to indicate the kind of destruction to be done.
8488 (build_cleanup): Likewise.
8489 * init.c (perform_member_init): Likewise.
8490 (build_vec_delete_1): Likewise.
8491 (build_dtor_call): Simplify.
8492 (build_delete): Use special_function_kind
8493 values to indicate the kind of destruction to be done.
8494 (build_vbase_delete): Likewise.
8495 (build_vec_delete): Likewise.
8496
8497 * init.c (sort_member_init): Fix typo in error message generation
8498 code.
8499
8500 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
8501
8502 * semantics.c (begin_class_definition): make the packed
8503 attribute be sensitive to the "-fpack-struct" command line flag
8504
8505 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
8506
8507 Update new-abi upcast algorithm.
8508 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
8509 prototype and meaning of return value.
8510 (__si_class_type_info::__do_upcast): Likewise.
8511 (__vmi_class_type_info::__do_upcast): Likewise.
8512 * tinfo.cc (__class_type_info::__upcast_result): Replace
8513 whole2dst with part2dst. Adjust ctor.
8514 (__class_type_info::__do_upcast): Adjust call of worker function.
8515 (__class_type_info::__do_upcast): Adjust.
8516 (__si_class_type_info::__do_upcast): Adjust. Use parent's
8517 __do_upcast.
8518 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
8519 virtual base in diamond hierarchy bug.
8520
8521 2000-05-23 Mark Mitchell <mark@codesourcery.com>
8522
8523 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
8524 and bitfield to tinfo_fn_p.
8525 (DECL_TINFO_FN_P): Adjust.
8526 (SET_DECL_TINFO_FN_P): Likewise.
8527 (DECL_MUTABLE_P): Likewise.
8528 (DECL_C_BIT_FIELD): Likewise.
8529 (SET_DECL_C_BIT_FIELD): Likewise.
8530 (CLEAR_DECL_C_BIT_FIELD): Likewise.
8531 (DECL_UNINLINABLE): Likewise.
8532 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
8533 (handle_using_decl): Remove assertion.
8534 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
8535 to build FIELD_DECLs.
8536 (build_base_field): Likewise.
8537 (layout_class_type): Likewise.
8538 * decl.c (init_decl_processing): Likewise.
8539 (build_ptrmemfunc_type): Likewise.
8540 (grokdeclarator): Likewise.
8541 * decl2.c (grok_x_components): Likewise.
8542 * except.c (call_eh_info): Likewise.
8543 * init.c (init_init_processing): Likewise.
8544 * rtti.c (expand_class_desc): Likewise.
8545 (create_pseudo_type_info): Likewise.
8546 (get_vmi_pseudo_type_info): Likewise.
8547 (create_tinfo_types): Likewise.
8548 * ptree.c (print_lang_decl): Adjust.
8549 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
8550 before checking DECL_MUTABLE_P.
8551
8552 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
8553 parameters for template functions.
8554 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
8555 destructors as well as constructors.
8556
8557 2000-05-22 Mark Mitchell <mark@codesourcery.com>
8558
8559 * class.c (build_ctor_vtbl_group): Set inits.
8560 * optimize.c (maybe_clone_body): Set DECL_INLINE and
8561 DECL_THIS_INLINE appropriately for clones.
8562
8563 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
8564 (DECL_CONV_FN_P): Simplify.
8565 (DECL_OPERATOR): Remove.
8566 (language_to_string): Declare.
8567 * decl.c (duplicate_decls): Fix typo in comment.
8568 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
8569 (grok_op_properties): Use DECL_CONV_FN_P instead of
8570 IDENTIFIER_TYPENAME_P.
8571 * dump.c (dequeue_and_dump): Dump the language linkage of
8572 declarations.
8573 * error.c (language_to_string): Give it external linkage.
8574 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
8575 (implicitly_declare_fn): Set DECL_LANGUAGE.
8576 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
8577 IDENTIFIER_TYPENAME_P.
8578 (tsubst_decl): Likewise.
8579 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
8580 * semantics.c (finish_member_declaration): Don't mark members of
8581 classes declared in an extern "C" region as extern "C".
8582
8583 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8584
8585 * decl2.c (qualified_lookup_using_namespace): Look through
8586 namespace aliases.
8587
8588 * decl.c (push_using_decl): Return the old decl on namespace level.
8589
8590 2000-05-21 Mark Mitchell <mark@codesourcery.com>
8591
8592 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
8593 (VTT_NAME_PREFIX): New macro.
8594 (CTOR_VTBL_NAME_PREFIX): Likewise.
8595 (get_ctor_vtbl_name): New function.
8596 * class.c (get_vtable_name): Simplify.
8597 (get_vtt_name): New function.
8598 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
8599 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
8600 when a virtual base becomes primary.
8601 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
8602 VTTs.
8603 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
8604 additional parameters.
8605 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
8606 (initialize_array): New function.
8607 (build_vtt): Likewise.
8608 (build_vtt_inits): Likewise.
8609 (dfs_build_vtt_inits): Likewise.
8610 (dfs_fixup_binfo_vtbls): Likewise.
8611 (build_ctor_vtbl_group): Likewise.
8612 (initialize_vtable): Use initialize_array.
8613 (accumulate_vtbl_inits): Reimplement to handle construction
8614 vtables.
8615 (dfs_accumulate_vtbl_inits): Likewise.
8616 (bulid_vtbl_initializer): Adjust parameter name.
8617 * method.c (build_typename_overload): Remove #if 0'd code.
8618 (get_ctor_vtbl_name): New function.
8619 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
8620 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
8621
8622 * cp-tree.h (struct lang_type): Remove search_slot.
8623 (CLASSTYPE_SEARCH_SLOT): Remove.
8624 (emit_base_init): Change prototype.
8625 (initialize_vtbl_ptrs): Likewise.
8626 (expand_indirect_vtbls_init): Likewise.
8627 (clear_search_slots): Remove.
8628 * decl.c (lang_mark_tree): Don't mark search_slot.
8629 * init.c (initialize_vtbl_ptrs): Simplify.
8630 (emit_base_init): Likewise.
8631 * search.c (struct vbase_info): Document decl_ptr.
8632 (convert_pointer_to_single_level): Remove.
8633 (dfs_find_vbases): Remove.
8634 (dfs_init_base_pointers): Simplify.
8635 (dfs_clear_vbase_slots): Remove.
8636 (dfs_vtable_path_unmark): New function.
8637 (init_vbase_pointers): Simplify.
8638 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
8639 (expand_indirect_vtbls_init): Simplify. Don't call
8640 mark_all_temps_used.
8641 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
8642 initialize_vtbl_ptrs.
8643
8644 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
8645
8646 * except.c: Add static prototypes.
8647
8648 2000-05-20 H.J. Lu <hjl@gnu.org>
8649
8650 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
8651
8652 2000-05-19 Mark Mitchell <mark@codesourcery.com>
8653
8654 Don't create a separate copy of virtual bases for the
8655 CLASSTYPE_VBASECLASSES list.
8656 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
8657 (BINFO_FOR_VBASE): Remove.
8658 (CANONICAL_BINFO): Adjust.
8659 (binfo_for_vbase): New function.
8660 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
8661 instead of BINFO_FOR_VBASE.
8662 (build_vbase_pointer): Likewise.
8663 (build_secondary_vtable): Likewise.
8664 (dfs_mark_primary_bases): Likewise.
8665 (mark_primary_bases): Likewise.
8666 (layout_nonempty_base_or_field): Likewise.
8667 (dfs_set_offset_for_shared_vbases): Likewise.
8668 (dfs_set_offset_for_unshared_vbases): Likewise.
8669 (layout_virtual_bases): Likewise. Adjust for changes to the
8670 CLASSTYPE_VBASECLASSES list.
8671 (dump_class_hierarchy_r): Use binfo_for_vbase
8672 instead of BINFO_FOR_VBASE.
8673 (dump_class_hierarchy): Likewise.
8674 (finish_vtbls): Likewise.
8675 (build_vtbl_initializer): Adjust for changes to the
8676 CLASSTYPE_VBASECLASSES list.
8677 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
8678 * decl.c (finish_destructor_body): Adjust for changes to the
8679 CLASSTYPE_VBASECLASSES list.
8680 * init.c (sort_base_init): Use binfo_for_vbase.
8681 (construct_virtual_bases): Adjust for changes to the
8682 CLASSTYPE_VBASECLASSES list.
8683 (expand_member_init): Use binfo_for_vbase.
8684 (build_vbase_delete): Adjust for changes to the
8685 CLASSTYPE_VBASECLASSES list.
8686 * method.c (do_build_copy_constructor): Likewise.
8687 * rtti.c (get_base_offset): Use binfo_for_vbase.
8688 (expand_class_desc): Remove #if 0'd code.
8689 * search.c (struct vbase_info): Remove vbase_types.
8690 (get_base_distance): Use binfo_for_vbase.
8691 (lookup_field_queue_p): Use CANONICAL_BINFO.
8692 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
8693 (get_pure_virtuals): Adjust for changes to the
8694 CLASSTYPE_VBASECLASSES list.
8695 (dfs_find_vbases): Use binfo_for_vbase.
8696 (dfs_init_vbase_pointers): Likewise.
8697 (init_vbase_pointers): Don't initialize vi.vbase_types.
8698 (virtual_context): Use binfo_for_vbase.
8699 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
8700 CLASSTYPE_VBASECLASSES list.
8701 (expand_indirect_vtbls_init): Simplify.
8702 (dfs_get_vbase_types): Don't replicate virtual bases.
8703 (find_vbase_instance): Use binfo_for_vbase.
8704 (binfo_for_vbase): New function.
8705 * typeck.c (get_delta_difference): Use binfo_for_vbase.
8706
8707 2000-05-17 Mark Mitchell <mark@codesourcery.com>
8708
8709 * decl2.c (finish_anon_union): Generalize error messages to handle
8710 anonymous structures.
8711 * init.c (perform_member_init): Remove `name' parameter.
8712 (build_field_list): New function.
8713 (sort_member_init): Handle anonymous union initialization order
8714 correctly. Check for multiple initializations of the same union.
8715 (emit_base_init): Don't look up fields by name here.
8716 (expand_member_init): Record the result of name lookup for future
8717 reference.
8718 * typeck.c (build_component_ref): Fix formatting.
8719
8720 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
8721
8722 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
8723 * typeck.c (build_x_compound_expr): Replace warn_unused with
8724 warn_unused_value.
8725
8726 * decl2.c (lang_decode_option): Update -Wall unused flags by
8727 calling set_Wunused.
8728
8729 2000-05-16 Mark Mitchell <mark@codesourcery.com>
8730
8731 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
8732 * init.c (dfs_vtable_path_unmark): Remove.
8733 * search.c (marked_new_vtable_p): Likewise.
8734 (unmarked_new_vtable_p): Likewise.
8735 (dfs_search_slot_nonempty_p): Likewise.
8736 (dfs_mark): Likewise.
8737 (dfs_vtable_path_unmark): Likewise.
8738 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
8739 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
8740 (dfs_init_vbase_pointers): Remove special-case new ABI code.
8741 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
8742 (init_vbase_pointers): Simplify.
8743 (expand_indirect_vtbls_init): Likewise.
8744
8745 * class.c (copy_virtuals): New function.
8746 (build_primary_table): Use it.
8747 (build_secondary_vtable): Likewise.
8748 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
8749 indicate that no vcall offset is required.
8750 (add_virtual_function): Likewise.
8751 (modify_all_vtables): Likewise.
8752 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8753 (dfs_accumulate_vtbl_inits): Likewise.
8754 (build_vtbl_initializer): Make changes to handle construction
8755 vtables.
8756 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8757 (build_rtti_vtbl_entries): Likewise.
8758 (build_vtable_entries): Handle a NULL vcall_index.
8759
8760 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
8761
8762 * decl2.c (lang_decode_option): Fix thinko.
8763
8764 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
8765
8766 * except.c (check_handlers): New fn.
8767 * cp-tree.h: Declare it.
8768 * semantics.c (finish_handler_sequence): Call it.
8769 (finish_function_handler_sequence): Likewise.
8770 (finish_handler_parms): Set TREE_TYPE on the handler.
8771 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
8772 * search.c (get_base_distance_recursive): If protect>1, ignore
8773 special access.
8774 (get_base_distance): Don't reduce watch_access.
8775
8776 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
8777
8778 * lex.c: #include diagnostic.h.
8779 (lang_init_options): Set default prefixing rules.
8780
8781 * lang-options.h: Add -fdiagnostics-show-location=.
8782
8783 * decl2.c: #include diagnostic.h.
8784 (lang_decode_option): Handle -fdiagnostics-show-location=.
8785
8786 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
8787
8788 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
8789 * vec.cc: Revert my 2000-05-07 change.
8790
8791 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
8792
8793 * class.c (check_field_decls): Complain about non-static data
8794 members with same name as class in class with constructor.
8795
8796 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
8797
8798 * decl.c (grokdeclarator): Allow non-static data members with
8799 same name as class.
8800
8801 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8802
8803 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
8804 and pending_inline.filename. Update prototypes.
8805 * decl.c (define_label): Constify filename parameter.
8806 * decl2.c (warn_if_unknown_interface): Constify local char *.
8807 * input.c Constify input_source.filename. Don't declare
8808 input_filename or lineno. Constify filename parameter to feed_input.
8809 * lex.c (init_parse): Constify parameter and return value.
8810 (cp_pragma_interface, cp_pragma_implementation): Constify
8811 filename argument.
8812 (reinit_parse_for_method, reinit_parse_for_block,
8813 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
8814 Constify local char *.
8815 * pt.c: Don't declare lineno or input_filename.
8816 (print_template_context, tsubst_friend_function, tsubst_decl,
8817 tsubst, instantiate_decl): Constify local char *.
8818 * semantics.c (expand_body): Constify local char *.
8819 * tree.c (build_srcloc): Constify filename parameter.
8820 * typeck.c (c_expand_asm_operands): Constify filename
8821 parameter.
8822
8823 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
8824
8825 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
8826 offsetof expansion.
8827
8828 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
8829
8830 * inc/cxxabi.h: Fix typos in comment.
8831 (__base_class_info::__offset): Use a static_cast.
8832
8833 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
8834
8835 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
8836 of std::size_t and std::ptrdiff_t respectively.
8837 * tinfo.cc: Likewise.
8838 * vec.cc: Likewise.
8839
8840 2000-05-06 Richard Henderson <rth@cygnus.com>
8841
8842 * typeck.c (build_c_cast): Don't warn integer->pointer size
8843 mismatch for constants.
8844
8845 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
8846
8847 * rtti.c (ptmd_initializer): Set non-public, if class is
8848 incomplete.
8849
8850 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
8851 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8852 __cxa_vec_delete): Likewise.
8853 * tinfo.cc (__dynamic_cast): Likewise.
8854 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8855 __cxa_vec_delete): Likewise.
8856
8857 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8858
8859 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
8860 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
8861 (lang_decl_flags): Add vcall_offset.
8862 (THUNK_VCALL_OFFSET): Use it.
8863 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
8864 * method.c (make_thunk): Create the lang_decl here, not in
8865 emit_thunk.
8866 (emit_thunk): Make generic thunks into ordinary functions once
8867 they have been fed to expand_body.
8868 * semantics.c (expand_body): Set current_function_is_thunk here.
8869
8870 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8871
8872 * class.c (update_vtable_entry_for_fn): Prototype.
8873
8874 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
8875 and `tmpl'.
8876
8877 * search.c (dfs_build_inheritance_graph_order): Prototype.
8878
8879 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8880
8881 * cp-tree.h (special_function_kind): Add various kinds of
8882 destructors.
8883 (special_function_p): New function.
8884 * class.c (overrides): Don't let one kind of destructor override
8885 another.
8886 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
8887 whether or not to instantiate a template.
8888 * tree.c (special_function_p): Define.
8889
8890 2000-05-03 Mark Mitchell <mark@codesourcery.com>
8891
8892 * cp-tree.def (THUNK_DECL): Remove.
8893 * cp-tree.h (DECL_THUNK_P): New macro.
8894 (DECL_NON_THUNK_FUNCTION_P): Likewise.
8895 (DECL_EXTERN_C_FUNCTION_P): Likewise.
8896 (SET_DECL_THUNK_P): Likewise.
8897 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
8898 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
8899 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
8900 * decl.c (decls_match): Use DECL_EXTERN_C_P.
8901 (duplicate_decls): Likewise.
8902 (pushdecl): Likewise. Adjust thunk handling.
8903 (grokfndecl): Use DECL_EXTERN_C_P.
8904 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
8905 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
8906 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
8907 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
8908 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
8909 DECL_NO_STATIC_CHAIN.
8910 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
8911 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
8912 * search.c (covariant_return_p): Remove THUNK_DECL handling.
8913 * ir.texi: Update.
8914
8915 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
8916
8917 * tree.c (walk_tree): Set lineno.
8918
8919 2000-05-01 Mark Mitchell <mark@codesourcery.com>
8920
8921 * exception.cc: Update license notice.
8922 * new.cc: Likewise.
8923 * new1.cc: Likewise.
8924 * new2.cc: Likewise.
8925 * tinfo.cc: Likewise.
8926 * tinfo2.cc: Likewise.
8927 * vec.cc: Likewise.
8928 * inc/cxxabi.h: Likewise.
8929 * inc/exception: Likewise.
8930 * inc/new: Likewise.
8931 * inc/new.h: Likewise.
8932 * inc/typeinfo: Likewise.
8933
8934 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
8935
8936 * tree.c (build_target_expr_with_type): If we already have a
8937 TARGET_EXPR, just return it.
8938
8939 * optimize.c (initialize_inlined_parameters): Don't generate an
8940 EXPR_STMT if we can just use DECL_INITIAL.
8941 * decl.c (emit_local_var): Only make the initialization a
8942 full-expression if stmts_are_full_exprs_p.
8943
8944 2000-05-01 Mark Mitchell <mark@codesourcery.com>
8945
8946 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
8947 macro.
8948 * call.c (standard_conversion): Use it.
8949 (direct_reference_binding): Likewise.
8950 (build_over_call): Likewise.
8951 (is_properly_derived_from): Likewise.
8952 (compare_ics): Likewise.
8953 * class.c (resolves_to_fixed_type_p): Likewise.
8954 * optimize.c (declare_return_variable): Likewise.
8955 * pt.c (is_specialization_of): Likewise.
8956 (unify): Likewise.
8957 * typeck.c (comp_target_parms): Likeiwse.
8958 (build_static_cast): Likewise.
8959 (build_reinterpret_cast): Likewise.
8960 (build_const_cast): Likewise.
8961 (comp_ptr_ttypes_real): Likewise.
8962 (comp_ptr_ttypes_const): Likewise.
8963 * typeck2.c (process_init_constructor): Likewise.
8964
8965 2000-04-30 Scott Snyder <snyder@fnal.gov>
8966
8967 * decl.c (finish_destructor_body): Use the base destructor when
8968 destroying virtual bases.
8969
8970 2000-04-30 Mark Mitchell <mark@codesourcery.com>
8971
8972 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
8973 STMT_EXPRs.
8974 * optimize.c (struct inline_data): Add target_exprs field.
8975 (declare_return_variable): When a function returns an aggregate,
8976 use the variable declared in the TARGET_EXPR as the remapped
8977 DECL_RESULT.
8978 (expand_call_inline): Update the pending target_exprs stack.
8979 (optimize_function): Initialize the stack.
8980
8981 * decl2.c (finish_file): Fix typo in comment.
8982
8983 * method.c (emit_thunk): Don't try to return a `void' value.
8984
8985 * optimize.c (initialize_inlined_parameters): If the parameter is
8986 addressable, we need to make a new VAR_DECL, even if the
8987 initializer is constant.
8988
8989 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
8990
8991 * decl.c (grok_op_properties): Add an extra check of argtypes.
8992
8993 2000-04-27 Mark Mitchell <mark@codesourcery.com>
8994
8995 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
8996 variables.
8997 (initialize_inlined_parameters): Try to avoid creating new
8998 VAR_DECLs.
8999
9000 2000-04-27 Alex Samuel <samuel@codesourcery.com>
9001
9002 * lex.c (my_get_run_time): Remove.
9003 (init_filename_times): Use get_run_time instead of my_get_run_time.
9004 (check_newline): Likewise.
9005 (dump_time_statistics): Likewise.
9006 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9007 of computing elapsed time explicitly.
9008
9009 2000-04-26 Mark Mitchell <mark@codesourcery.com>
9010
9011 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9012 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9013 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9014 before calling decl_constant_value.
9015 * class.c (check_bitfield_decl): Likewise.
9016 * cvt.c (ocp_convert): Likewise.
9017 (convert): Likewise.
9018 * decl.c (compute_array_index_type): Likewise.
9019 (build_enumerator): Likewise.
9020 * decl2.c (check_cp_case_value): Likewise.
9021 * pt.c (convert_nontype_argument): Likewise.
9022 (tsubst): Likewise.
9023 * typeck.c (decay_conversion): Likewise.
9024 (build_compound_expr): Likewise.
9025 (build_reinterpret_cast): Likewise.
9026 (build_c_cast): Likewise.
9027 (convert_for_assignment): Likewise.
9028
9029 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
9030
9031 * decl.c (finish_function): Don't play games with DECL_INLINE.
9032
9033 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
9034
9035 * ir.texi: Correct typo.
9036
9037 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9038
9039 * decl.c (grokdeclarator): Reject VLAs as members.
9040
9041 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
9042
9043 * call.c (standard_conversion): Accept conversion between
9044 COMPLEX_TYPEs.
9045
9046 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9047
9048 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
9049
9050 * decl2.c (finish_file): Remove double setup for accounting
9051 compile time.
9052
9053 2000-04-24 Robert Lipe <robertlipe@usa.net>
9054
9055 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9056
9057 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
9058
9059 * new.cc (set_new_handler): Needs to be in std::.
9060
9061 2000-04-23 Mark Mitchell <mark@codesourcery.com>
9062
9063 * cp-tree.h (lang_decl): Remove pretty_function_p.
9064 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9065 language-specific node.
9066 * decl.c (cp_make_fname_decl): Use build_decl, not
9067 build_lang_decl, to build the variables.
9068 (grokvardecl): Don't call build_lang_decl for local variables in
9069 templates.
9070 (grokdeclarator): Don't call build_lang_decl for local type
9071 declarations in templates.
9072 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9073 zero'd memory, rather than calling memset.
9074 * pt.c: Include hashtab.h.
9075 (local_specializations): New variable.
9076 (retrieve_local_specialization): Use it.
9077 (register_local_specialization): Likewise.
9078 (tsubst_decl): Don't assume local variables have
9079 DECL_LANG_SPECIFIC.
9080 (instantiate_decl): Set up local_specializations.
9081 * Makefile.in (HTAB_H): New variable.
9082
9083 2000-04-23 Richard Henderson <rth@cygnus.com>
9084
9085 * typeck.c (c_expand_asm_operands): Restore the original
9086 contents of the output list.
9087
9088 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
9089
9090 * ir.texi: Document complex number representation.
9091
9092 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
9093
9094 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9095 (target_incomplete_p): New function.
9096 (tinfo_base_init): Create comdat NTBS name variable.
9097 (ptr_initializer): Add non_public parameter. Calculate it.
9098 (ptmd_initializer): Likewise.
9099 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9100 (create_real_tinfo_var): Add non_public parameter. Use it.
9101 Push proxy into global namespace.
9102 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9103 New enumeration.
9104 * inc/typeinfo (type_info::before, type_info::operator==):
9105 Compare __name addresses.
9106
9107 * tinfo2.cc: Remove new-abi builtins comment.
9108
9109 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
9110
9111 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9112
9113 * call.c (joust): Exit early if we get the same function, too.
9114
9115 * decl2.c (key_method): Return NULL_TREE for template classes.
9116 (import_export_class): Don't need to check for template classes.
9117
9118 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
9119
9120 * lex.c: Remove references to cccp.c.
9121
9122 2000-04-18 Mark Mitchell <mark@codesourcery.com>
9123
9124 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9125 volatile_memfunc. Add destructor_attr. Adjust dummy.
9126 (DECL_DESTRUCTOR_P): Use destructor_attr.
9127 (DECL_CONST_MEMFUNC_P): Reimplement.
9128 (DECL_VOLATILE_MEMFUNC_P): Remove.
9129 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9130 (overrides): Use DECL_DESTRUCTOR_P.
9131 (check_for_override): Likewise.
9132 * decl.c (start_function): Likewise.
9133 * decl2.c (grokfclassfn): Likewise.
9134 (check_classfn): Likewise.
9135 (grok_function_init): Likewise.
9136
9137 2000-04-17 Mark Mitchell <mark@codesourcery.com>
9138
9139 * decl2.c (grokfield): Issue error on illegal data member
9140 declaration.
9141
9142 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
9143
9144 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9145
9146 2000-04-16 Mark Mitchell <mark@codesourcery.com>
9147
9148 * class.c (build_vtable_entry): Don't build thunks for type-info
9149 functions.
9150
9151 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
9152
9153 * decl.c (decls_match): Allow a redeclaration of a builtin to
9154 specify args while the builtin did not.
9155
9156 2000-04-15 Mark Mitchell <mark@codesourcery.com>
9157
9158 * cp-tree.def (THUNK_DECL): Add to documentation.
9159 * cp-tree.h (flag_huge_objects): Declare.
9160 * class.c (modify_vtable_entry): Tidy.
9161 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9162 Calculate delta appropriately for the new ABI.
9163 (dfs_modify_vtables): Use it.
9164 (modify_all_vtables): Fix thinko in code to add overriding copies
9165 of functions to primary vtables.
9166 (build_clone): Fix typo in comment.
9167 (clone_function_decl): Correct order of destructors in vtable.
9168 (build_vbase_offset_vtbl_entries): Adjust comment.
9169 (dfs_vcall_offset_queue_p): Remove.
9170 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9171 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9172 (build_vtable_entry): Correct check for pure virtual functions.
9173 Don't declare flag_huge_objects.
9174 * decl.c (flag_huge_objects): Remove declaration.
9175 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9176 Use int_size_in_bytes.
9177 (emit_thunk): Handle vcall offset thunks.
9178
9179 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9180
9181 * decl2.c (parse_time, varconst_time): Delete declarations.
9182 (finish_file): Delete LINENO declaration.
9183 START_TIME and THIS_TIME now long.
9184
9185 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
9186
9187 * class.c (build_base_field): Reformat comment.
9188
9189 * inc/cxxabi.h (stddef.h): Comment inclusion.
9190 (__base_class_info::__offset): Comment shift.
9191
9192 2000-04-12 Mark Mitchell <mark@codesourcery.com>
9193
9194 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9195 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9196 (cp_push_exception_identifier): New macro.
9197 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9198 (DECL_BASE_DESTRUCTOR_P): Likewise.
9199 (DECL_DELETING_DESTRUCTOR_P): Likewise.
9200 (get_vtbl_decl_for_binfo): Fix formatting.
9201 (in_charge_arg_for_name): New macro.
9202 (maybe_build_cleanup_and_delete): Remove declaration.
9203 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9204 (in_charge_arg_for_name): New function.
9205 (build_new_method_call): Use it. Handle cloned destructors.
9206 (build_clone): Don't make the base constructor virtual.
9207 Automatically defer generated functions.
9208 (clone_function_decl): Handle destructors, too.
9209 (clone_constructors_and_destructors): Likewise.
9210 (create_vtable_ptr): Don't create a vtable entry for a cloned
9211 function.
9212 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9213 (initialize_predefined_identifiers): Update appropriately.
9214 (finish_destructor_body): Simplify.
9215 (maybe_build_cleanup_and_delete): Remove.
9216 * except.c (expand_throw): Handle new-ABI destructors.
9217 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9218 (build_dtor_call): New function.
9219 (build_delete): Use it. Simplify.
9220 * optimize.c (maybe_clone_body): Handle destructors.
9221 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9222
9223 * exception.cc (cleanup_fn): New typedef.
9224 (CALL_CLEANUP): New macro.
9225 (cp_eh_info): Use them.
9226 (__cp_push_exception): Likewise.
9227 (__cp_pop_exception): Likewise.
9228
9229 2000-04-11 Mark Mitchell <mark@codesourcery.com>
9230
9231 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9232 (complete_dtor_identifier): New macro.
9233 (CLASSTYPE_FIRST_CONVERSION): Remove.
9234 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9235 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9236 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9237 (CLASSTYPE_CONSTRUCTORS): Likewise.
9238 (CLASSTYPE_DESTRUCTORS): Likewise.
9239 (lang_decl): Add cloned_function.
9240 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9241 (DECL_BASE_CONSTRUCTOR_P): Likewise.
9242 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9243 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9244 (DECL_CLONED_FUNCTION_P): Likewise.
9245 (DECL_CLONED_FUNCTION): Likewise.
9246 (clone_function_decl): Declare.
9247 (maybe_clone_body): Likewise.
9248 * call.c (build_user_type_conversion_1): Call complete object
9249 constructors in the new ABI.
9250 (build_new_method_call): Don't add in-charge parameters under the
9251 new ABI.
9252 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9253 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9254 CLASSTYPE_DESTRUCTOR_SLOT.
9255 (build_clone): New function.
9256 (clone_function_decl): Likewise.
9257 (clone_constructors_and_destructors): Likewise.
9258 (check_bases_and_members): Use it.
9259 * decl.c (iniitialize_predefined_identifiers): Initialize
9260 complete_dtor_identifier.
9261 (finish_function): Don't add extra code to a clone.
9262 (lang_mark_tree): Mark cloned_function.
9263 * decl2.c (mark_used): Don't bother trying to instantiate things
9264 we synthesized.
9265 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9266 * method.c (set_mangled_name_for_decl): Don't treat clones as
9267 constructors.
9268 (synthesize_method): Sythesize cloned functions, not the clones.
9269 * optimize.c (inline_data): Update comment on ret_label.
9270 (remap_block): Don't assume DECL_INITIAL exists.
9271 (copy_body_r): Allow ret_label to be NULL.
9272 (maybe_clone_body): Define.
9273 * pt.c (tsubst_decl): Handle clones.
9274 (instantiate_clone): New function.
9275 (instantiate_template): Use it.
9276 (set_mangled_name_for_template_decl): Don't treat clones as
9277 constructors.
9278 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9279 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9280 * semantics.c (expand_body): Clone function bodies as necessary.
9281
9282 * optimize.c (remap_decl): Avoid sharing structure for arrays
9283 whose size is only known at run-time.
9284 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9285
9286 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9287 to has_in_charge_parm_p.
9288 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9289 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9290 (DECL_COPY_CONSTRUCTOR_P): New macro.
9291 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9292 (build_user_type_conversion_1): Likewise.
9293 (convert_like_real): Likewise.
9294 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
9295 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9296 (copy_args_p): Likewise.
9297 (grok_ctor_properties): Likewise.
9298 (start_function): Likewise.
9299 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
9300 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9301 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9302 * method.c (do_build_copy_constructor): Use
9303 DECL_HAS_IN_CHARGE_PARM_P.
9304 (synthesize_method): Likewise.
9305 * pt.c (instantiate_template): Remove goto.
9306 * tree.c (build_cplus_method_type): Remove mention of obstacks in
9307 comment.
9308
9309 * cp-tre.h (finish_function): Change prototype.
9310 * decl.c (end_cleanup_fn): Adjust caller.
9311 (finish_function): Take only one parameter.
9312 * decl2.c (finish_objects): Adjust caller.
9313 (finish_static_storage_duration_function): Likewise.
9314 * method.c (emit_thunk): Likewise.
9315 * parse.y: Likewise.
9316 * parse.c: Regenerated.
9317 * pt.c (instantiate_decl): Likewise.
9318 * rtti.c (synthesize_tinfo_fn): Likewise.
9319 * semantics.c (expand_body): Likewise.
9320
9321 * cp-tree.h (copy_decl): New function.
9322 * class.c (finish_struct_1): Use it.
9323 * lex.c (copy_decl): Define it.
9324 * pt.c (tsubst_decl): Likewise.
9325 * tree.c (copy_template_template_parm): Likewise.
9326
9327 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9328 has_nonpublic_assign_ref.
9329 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9330 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9331 * class.c (finish_struct_methods): Don't set
9332 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9333 (interface_only): Don't declare.
9334 (interface_unknown): Likewise.
9335
9336 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9337
9338 * tree.h (HAVE_TEMPLATES): Remove definition.
9339 * lang-options.h (-fthis-is-variable): Remove documentation.
9340
9341 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
9342
9343 * class.c (instantiate_type): Handle object-relative template-id.
9344
9345 * semantics.c (finish_expr_stmt): Call convert_to_void here.
9346 * decl.c (cplus_expand_expr_stmt): Not here.
9347
9348 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9349 Initialize exprtype earlier.
9350
9351 * parse.y (fn.def1): Check for defining types in return types.
9352
9353 * decl.c (check_tag_decl): Notice extra fundamental types.
9354 Diagnose empty decls in classes, too.
9355
9356 * decl.c (grokdeclarator): Don't override an anonymous name if no
9357 declarator was given.
9358
9359 * cvt.c (convert_to_void): Call resolve_offset_ref.
9360
9361 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9362
9363 * decl2.c (decl_namespace): Handle getting a type.
9364
9365 * typeck.c (build_c_cast): Re-enable warning for cast between
9366 pointer and integer of different size.
9367
9368 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
9369
9370 * inc/cxxabi.h (__pointer_type_info): Add restrict and
9371 incomplete flags.
9372 (__pointer_type_info::__pointer_catch): New virtual function.
9373 (__pointer_to_member_type_info): Derive from
9374 __pointer_type_info. Adjust.
9375 (__pointer_to_member_type_info::__do_catch): Remove.
9376 (__pointer_to_member_type_info::__is_pointer_p): Declare.
9377 (__pointer_to_member_type_info::__pointer_catch): Declare.
9378 * rtti.c (qualifier_flags): Add restrict flag.
9379 (ptmd_initializer): Reorder members.
9380 (create_tinfo_types): Expand comments. Reorder
9381 ptmd_desc_type_node members.
9382 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9383 Implement.
9384 (__pointer_type_info::__do_catch): Move specific code into
9385 __pointer_catch. Call it.
9386 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9387 specific catch checking. Fix void conversion check.
9388 (__pointer_to_member_type_info::__do_catch): Remove.
9389 (__pointer_to_member_type_info::__pointer_catch): Implement.
9390
9391 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9392
9393 * lex.c (init_parse): Remove traces of classof and headof.
9394 * decl2.c (flag_operator_names): Default to 1.
9395 (lang_decode_option): Do not set it for -ansi.
9396
9397 2000-04-09 Mark Mitchell <mark@codesourcery.com>
9398
9399 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9400 (DECL_MAIN_VARIANT): Remove.
9401 * decl.c (duplicate_decls): Don't set it.
9402 (start_function): Likewise.
9403 (lang_mark_tree): Don't mark it.
9404 * decl2.c (defer_fn): Don't use it.
9405 * lex.c (retrofit_lang_decl): Don't set it.
9406 * pt.c (tsubst_decl): Likewise.
9407 * ptree.c (print_lang_decl): Don't print it.
9408 * typeck.c (mark_addressable): Don't use it.
9409
9410 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9411
9412 * vec.cc: Include <new> and <exception>.
9413 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9414 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9415 terminate.
9416 (__cxa_vec_delete): Catch dtor exceptions.
9417
9418 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9419
9420 Prepend __ to implementation defined names.
9421 * inc/typeinfo (type_info): Rename _name to __name.
9422 (type_info::type_info): Rename parameter.
9423 (type_info::operator==, type_info::operator!=,
9424 type_info::before): Likewise.
9425 (type_info::is_pointer_p, type_info::is_function_p,
9426 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9427 parameters.
9428 * inc/cxxabi.h
9429 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9430 (__pointer_type_info::__pointer_type_info): Likewise.
9431 (__pointer_type_info::is_pointer_p,
9432 __pointer_type_info::do_catch): Prepend __. Rename parameters.
9433 (__array_type_info::__array_type_info): Rename parameters.
9434 (__function_type_info::__function_type_info): Likewise.
9435 (__function_type_info::is_function_p): Prepend __.
9436 (__enum_type_info::__enum_type_info): Rename parameters.
9437 (__pointer_to_member_type_info::__pointer_to_member_type_info):
9438 Likewise.
9439 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9440 parameters.
9441 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9442 (__class_type_info::__class_type_info): Rename parameters.
9443 (__class_type_info::sub_kind): Prepend __. Adjust member names.
9444 (__class_type_info::upcast_result,
9445 __class_type_info::dyncast_result): Prepend __. Move definition
9446 into tinfo.cc.
9447 (__class_type_info::do_upcast, __class_type_info::do_catch,
9448 __class_type_info::find_public_src,
9449 __class_type_info::do_dyncast,
9450 __class_type_info::do_find_public_src): Prepend __. Rename
9451 parameters.
9452 (__si_class_type_info::__si_class_type_info): Rename parameters.
9453 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9454 __si_class_type_info::do_find_public_src): Prepent __. Rename
9455 parameters.
9456 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9457 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9458 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9459 parameters.
9460 (__dynamic_cast): Rename parameters.
9461 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9462 type_info::do_catch, type_info::do_upcast): Prepend __.
9463 (contained_p, public_p, virtual_p, contained_public_p,
9464 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9465 (__class_type_info::do_catch,
9466 __class_type_info::do_upcast): Prepend __. Adjust.
9467 (__class_type_info::__upcast_result,
9468 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9469 Adjust.
9470 (__class_type_info::find_public_src): Prepend __. Adjust.
9471 (__class_type_info::do_find_public_src,
9472 __si_class_type_info::do_find_public_src,
9473 __vmi_class_type_info::do_find_public_src): Likewise.
9474 (__class_type_info::do_dyncast,
9475 __si_class_type_info::do_dyncast,
9476 __vmi_class_type_info::do_dyncast): Likewise.
9477 (__class_type_info::do_upcast,
9478 __si_class_type_info::do_upcast,
9479 __vmi_class_type_info::do_upcast): Likewise.
9480 (__dynamic_cast): Adjust.
9481 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
9482 (__function_type_info::is_function_p): Likewise.
9483 (__pointer_type_info::do_catch): Likewise. Adjust.
9484 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
9485 (__throw_type_match_rtti_2): Adjust.
9486 (__is_pointer): Adjust.
9487
9488 2000-04-08 Mark Mitchell <mark@codesourcery.com>
9489
9490 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
9491 (complete_ctor_identifier): New macro.
9492 (special_function_kind): Add sfk_copy_constructor and
9493 sfk_assignment_operator.
9494 (LOOKUP_HAS_IN_CHARGE): Remove.
9495 (cons_up_default_function): Rename to ...
9496 (implicitly_declare_fn): ... this.
9497 * call.c (build_new_method_call): Add in-charge parameters for
9498 constructors here.
9499 * class.c (add_implicitly_declared_members): Change parameter name
9500 from cant_have_assignment to cant_have_const_assignment.
9501 Replace calls to cons_up_default_function to implicitly_declare_fn.
9502 * cvt.c (ocp_convert): Use complete_ctor_identifier.
9503 * decl.c (initialize_predefined_identifiers): Initialize it.
9504 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
9505 complex expression.
9506 * init.c (expand_default_init): Don't calculate the in-charge
9507 parameter here.
9508 (build_new_1): Likewise.
9509 * lex.c (cons_up_default_function): Move to method.c.
9510 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
9511 (implicitly_declare_fn): New function.
9512 * typeck.c (build_static_cast): Use complete_ctor_identifier.
9513 (build_modify_expr): Likewise.
9514 * typeck2.c (build_functional_cast): Likewise.
9515
9516 Under the new ABI, constructors don't return `this'.
9517 * cp-tree.h (warn_reorder): Declare.
9518 (special_function_kind): New enum.
9519 (global_base_init_list): Remove declaration.
9520 (emit_base_init): Don't return a value.
9521 (check_base_init): Don't declare.
9522 (is_aggr_typedef): Likewise.
9523 * decl.c (check_special_function_return_type): New function.
9524 (return_types): Remove.
9525 (grokdeclarator): Use check_special_function_return_type.
9526 (start_function): Don't initialize ctor_label under the new ABI.
9527 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
9528 * init.c (begin_init_stmts): Move to top of file.
9529 (finish_init_stmts): Likewise.
9530 (warn_reorder): Don't declare.
9531 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
9532 value.
9533 (check_base_init): Remove.
9534 (is_aggr_typedef): Likewise.
9535 (build_new_1): Don't use the return value of a constructor.
9536 * semantics.c (setup_vtbl_ptr): Don't use the return value
9537 of emit_base_init.
9538 * typeck.c (check_return_expr): Don't magically convert return
9539 statements into `return this' in constructors under the new ABI.
9540
9541 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
9542 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
9543 (base_ctor_identifier): New macro.
9544 (base_dtor_identifier): Likewise.
9545 (deleting_dtor_identifier): Likewise.
9546 * decl.c: Don't include obstack.h.
9547 (obstack_chunk_alloc): Don't define.
9548 (obstack_chunk_free): Likewise.
9549 (struct predefined_identifier): New type.
9550 (initialize_predefined_identifiers): New function.
9551 (init_decl_processing): Use it.
9552 (debug_temp_inits): Remove.
9553 (start_method): Don't call preserve_data.
9554 (hack_incomplete_structures): Update comment.
9555 * init.c (init_init_processing): Don't initialize
9556 nelts_identifier.
9557 (build_offset_rf): Remove dead code.
9558 (build_delete): Use CLASSTYPE_N_BASECLASSES.
9559 * search.c (init_search_processing): Don't initialize
9560 vptr_identifier.
9561
9562 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9563
9564 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
9565 some sign_compare warnings.
9566
9567 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9568
9569 Rename abi::__vmi_class_type_info members.
9570 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
9571 base_list, detail_masks members to vmi_flags, vmi_base_count,
9572 vmi_bases and vmi_flags_masks respectively.
9573 (__vmi_class_type_info::vmi_flags_masks): Rename
9574 details_unknown_mask to flags_unknown_mask.
9575 * tinfo.cc (__class_type_info::do_upcast): Adjust.
9576 (__vmi_class_type_info::do_find_public_src): Adjust.
9577 (__vmi_class_type_info::do_dyncast): Adjust.
9578 (__vmi_class_type_info::do_upcast): Adjust.
9579
9580 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9581
9582 * tinfo.cc (convert_to_base): New function.
9583 (get_vbase_offset): Remove. Move into convert_to_base.
9584 (__vmi_class_type_info::do_find_public_src): Adjust.
9585 (__vmi_class_type_info::do_dyncast): Adjust.
9586 (__vmi_class_type_info::do_upcast): Adjust.
9587
9588 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
9589
9590 * tinfo.cc (operator=): Use __builtin_strcmp.
9591 * tinfo2.cc (before): Likewise.
9592
9593 2000-04-06 Mark Mitchell <mark@codesourcery.com>
9594
9595 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
9596 (DECL_SAVED_INLINE): Rename to ...
9597 (DECL_DEFERRED_FN): ... this.
9598 (in_function_p): Remove declaration.
9599 (mark_inline_for_output): Rename to ...
9600 (defer_fn): ... this.
9601 * decl.c (finish_function): Adjust call to mark_inline_for_output.
9602 (in_function_p): Remove definition.
9603 * decl2.c (saved_inlines): Rename to ...
9604 (deferred_fns): ... this.
9605 (saved_inlines_used): Rename to ...
9606 (deferred_fns_used): ... this.
9607 (mark_inline_for_output): Rename to ...
9608 (defer_fn): ... this.
9609 (finish_file): Adjust accordingly.
9610 (init_decl2): Likewise.
9611 * lex.c (cons_up_default_function): Likewise.
9612 * pt.c (mark_decl_instantiated): Likewise.
9613 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
9614 circumstances.
9615 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
9616 * semantics.c (expand_body): Defer more functions.
9617
9618 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9619
9620 * vec.cc: New file.
9621 * Make-lang.in (CXX_LIB2FUNCS): Add it.
9622 (vec.o): Build it.
9623 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9624 __cxa_vec_delete): Declare.
9625
9626 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9627
9628 * rtti.c (dfs_class_hint_mark): New static function.
9629 (dfs_class_hint_unmark): New static function.
9630 (class_hint_flags): Use them.
9631
9632 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
9633
9634 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
9635
9636 2000-04-05 Mark Mitchell <mark@codesourcery.com>
9637
9638 * cp-tree.h (instantiate_decl): Change prototype.
9639 * decl2.c (mark_used): Adjust call.
9640 * optimize.c (inlinable_function_p): Adjust handling of templates.
9641 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
9642 (do_type_instantiation): Likewise.
9643 (instantiate_decl): Defer more templates.
9644 (instantiate_pending_templates): Adjust logic to handle inline
9645 friend functions.
9646
9647 * Makefile.in (GGC_H): New variable. Use it throughout in place
9648 of ggc.h.
9649
9650 * call.c: Don't include obstack.h. Include ggc.h.
9651 (obstack_chunk_alloc): Don't define.
9652 (obstack_chunk_free): Likewise.
9653 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
9654 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
9655 (pop_switch): Free it.
9656
9657 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
9658
9659 * dump.c (dequeue_and_dump): Don't try to print the bit_position
9660 if we don't have a DECL_FIELD_OFFSET.
9661
9662 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
9663
9664 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
9665 special_function_p.
9666
9667 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9668
9669 * cfns.gperf (hash, libc_name_p): Prototype.
9670
9671 * rtti.c (build_dynamic_cast_1): Constification.
9672
9673 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
9674
9675 * semantics.c (deferred_type_access_control): Prototype.
9676
9677 2000-04-04 Mark Mitchell <mark@codesourcery.com>
9678
9679 Correct many new ABI issues regarding vbase and vcall offset
9680 layout.
9681 * cp-tree.h (BINFO_VTABLE): Document.
9682 (struct lang_type): Tweak formatting.
9683 (BINFO_PRIMARY_BINFO): Add to documentation.
9684 (CLASSTYPE_VSIZE): Fix typo in comment.
9685 (CLASSTYPE_VBASECLASSES): Update documentation.
9686 (BINFO_VBASE_MARKED): Remove.
9687 (SET_BINFO_VBASE_MARKED): Likewise.
9688 (CLEAR_BINFO_VBASE_MARKED): Likewise.
9689 (BINFO_FIELDS_MARKED): Remove.
9690 (SET_BINFO_FIELDS_MARKED): Likewise.
9691 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
9692 (enum access_kind): New enumeration.
9693 (num_extra_vtbl_entries): Remove declaration.
9694 (size_extra_vtbl_entries): Likewise.
9695 (get_vtbl_decl_for_binfo): New function.
9696 (dfs_vbase_unmark): Remove declaration.
9697 (mark_primary_bases): Likewise.
9698 * class.c (SAME_FN): Remove.
9699 (struct vcall_offset_data_s): Move definition.
9700 (build_vbase_pointer): Use `build', not `build_binary_op', to
9701 access the vbase pointer under the new ABI.
9702 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
9703 (build_primary_vtable): Likewise.
9704 (dfs_mark_primary_bases): Move here from search.c.
9705 (mark_primary_bases): Likewise.
9706 (determine_primary_bases): Under the new ABI, don't make a base
9707 class a primary base just because we don't yet have any virtual
9708 functions.
9709 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
9710 (num_vfun_entries): Remove.
9711 (dfs_count_virtuals): Likewise.
9712 (num_extra_vtbl_entries): Likewise.
9713 (size_extra_vtbl_entries): Likewise.
9714 (layout_virtual_bases): Iterate in inheritance graph order under
9715 the new ABI.
9716 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
9717 indicate that a vfield is present.
9718 (init_class_processing): Initialize access_public_node, etc., from
9719 ak_public, etc.
9720 (get_vtbl_decl_for_binfo): New function.
9721 (dump_class_hierarchy_r): Likewise.
9722 (dump_class_hierarchy): Use it.
9723 (finish_vtbls): Build the vtbls in inheritance graph order.
9724 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9725 (initialize_vtable): Use get_vtbl_decl_for_binfo.
9726 (accumulate_vtbl_inits): Add comments explaining why a pre-order
9727 walk is required.
9728 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
9729 where the vptr points, even for primary vtables.
9730 (build_vtbl_initializer): Adjust handling of vbase and vcall
9731 offsets.
9732 (build_vcall_and_vbase_vtable_entries): New function.
9733 (dfs_build_vbase_offset_vtbl_entries): Remove.
9734 (build_vbase_offset_vtbl_entries): Reimplement.
9735 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
9736 were already handled in a primary base class vtable.
9737 (build_vcall_offset_vtbl_entries): Adjust.
9738 (build_rtti_vtbl_entries): Adjust.
9739 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
9740 * init.c (expand_virtual_init): Simplify.
9741 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
9742 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
9743 * search.c (BINFO_ACCESS): New macro.
9744 (SET_BINFO_ACCESS): Likewise.
9745 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
9746 (access_in_type): Likewise.
9747 (dfs_accessible_p): Likewise.
9748 (protected_accessible_p): Likewise.
9749 (lookup_fnfields_1): Adjust documentation.
9750 (dfs_mark_primary_bases): Move to class.c
9751 (mark_primary_bases): Likewise.
9752 (dfs_vbase_unmark): Remove.
9753 (virtual_context): Use BINFO_FOR_VBASE.
9754 (dfs_get_vbase_types): Simplify.
9755 (dfs_build_inheritance_graph_order): New function.
9756 (get_vbase_types): Use it.
9757 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
9758
9759 * tinfo.cc (get_vbase_offset): New function.
9760 (__vmi_class_type_info::do_find_public_src): Use it.
9761 (__vmi_class_type_info::do_dyncast): Likewise.
9762 (__vmi_class_type_info::do_upcast): Likewise.
9763
9764 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
9765
9766 * lang-specs.h: Pass -fno-show-column to the preprocessor.
9767
9768 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
9769
9770 * rtti.c (class_hint_flags): Rename flags.
9771 (class_initializer): Remove flags.
9772 (synthesize_tinfo_var): Combine offset and flags. Add flags
9773 for __vmi_class_type_info.
9774 (create_tinfo_types): Remove flags from __class_type_info and
9775 __si_class_type_info. Merge flags and offset from
9776 base_class_type_info.
9777 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
9778 (__base_class_info::is_virtual_p): Adjust.
9779 (__base_class_info::is_public_p): Adjust.
9780 (__base_class_info::offset): New accessor.
9781 (__class_type_info::details): Remove member.
9782 (__class_type_info::__class_type_info): Lose details.
9783 (__class_type_info::detail_masks): Remove.
9784 (__si_class_type_info::__si_class_type_info): Lose details.
9785 (__vmi_class_type_info::details): New member.
9786 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
9787 (__vmi_class_type_info::detail_masks): New member.
9788 * tinfo.cc (__class_type_info::do_upcast): Initialize result
9789 with unknown_details_mask.
9790 (__vmi_class_type_info::do_find_public_src): Adjust
9791 (__vmi_class_type_info::do_dyncast): Adjust.
9792 (__vmi_class_type_info::do_upcast): Set result details, if
9793 needed. Adjust.
9794 (__dynamic_cast): Temporarily #if out optimization.
9795
9796 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
9797
9798 * rtti.c (get_tinfo_decl): Mark used.
9799 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
9800 mark as dealt with, if we output it.
9801
9802 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9803
9804 * class.c: Reorganize to put virtual function table initialization
9805 machinery at the end of the file.
9806
9807 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
9808
9809 * class.c (finish_struct): Use bitsize_zero_node.
9810 * pt.c (instantiate_class_template): Likewise.
9811
9812 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9813
9814 Put RTTI entries at negative offsets in new ABI.
9815 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
9816 vbase offset at index -3, not -1.
9817 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
9818 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
9819 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
9820 (build_rtti_vtbl_entries): New function.
9821 (set_rtti_entry): Remove.
9822 (build_primary_vtable): Don't use it.
9823 (build_secondary_vtable): Likewise.
9824 (start_vtable): Remove.
9825 (first_vfun_index): New function.
9826 (set_vindex): Likewise.
9827 (add_virtual_function): Don't call start_vtable. Do call
9828 set_vindex.
9829 (set_primary_base): Rename parameter.
9830 (determine_primary_base): Likewise.
9831 (num_vfun_entries): Don't use skip_rtti_stuff.
9832 (num_extra_vtbl_entries): Include RTTI information.
9833 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
9834 (skip_rtti_stuff): Remove.
9835 (dfs_modify_vtables): Don't use it.
9836 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
9837 (layout_nonempty_base_or_field): Update size handling.
9838 (create_vtable_ptr): Tweak.
9839 (layout_class_type): Adjust parameter names.
9840 (finish_struct_1): Simplify.
9841 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
9842 (skip_rtti_stuff): Remove.
9843 (first_vfun_index): New function.
9844 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9845 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
9846 (marked_vtable_pathp): Declare.
9847 (unmarked_vtable_pathp): Likewise.
9848 * error.c (dump_expr): Use first_vfun_index to calculate vtable
9849 offsets.
9850 * rtti.c (build_headof): Look for RTTI at negative offsets.
9851 (get_tinfo_decl_dynamic): Likewise.
9852 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
9853 here.
9854 (create_pseudo_type_info): Do it here instead. Adjust so that
9855 vptr points at first virtual function.
9856 * search.c (marked_vtable_pathp): Make it global.
9857 (unmarked_vtable_pathp): Likewise.
9858 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9859 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9860 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
9861 (get_pure_virtuals): Likewise.
9862 (expand_upcast_fixups): Likewise.
9863 * tree.c (debug_binfo): Likewise.
9864 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
9865 negative offset.
9866
9867 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9868
9869 * class.c (check_field_decl): Fix typo.
9870 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
9871 (check_methods): Likewise.
9872 (check_field_decls): Likewise.
9873 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
9874 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
9875 Use DECL_RESULT_FLD, not DECL_RESULT.
9876 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
9877 * lex.c (identifier_type): Likewise.
9878 * pt.c (determine_specialization, lookup_template_class): Likewise.
9879 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
9880 (resolve_overloaded_unification, more_specialized): Likewise.
9881 * semantics.c (finish_member_declaration): Likewise.
9882 * typeck.c (build_x_function_call): Likewise.
9883
9884 2000-03-26 Mark Mitchell <mark@codesourcery.com>
9885
9886 * class.c (layout_empty_base): Handle empty bases with non-byte
9887 alignment.
9888 (build_base_field): Likewise.
9889 (layout_virtual_bases): Likewise.
9890
9891 * class.c (finish_struct_1): Fix typo in this change:
9892
9893 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9894
9895 2000-03-25 Mark Mitchell <mark@codesourcery.com>
9896
9897 * decl.c (grokdeclarator): Count partial specializations when
9898 keeping track of how many template classes have been seen.
9899
9900 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
9901
9902 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9903
9904 * class.c (build_vbase_pointer_fields): layout_field now place_field.
9905 (get_vfield_offset): Use byte_position.
9906 (set_rtti_entry): Set OFFSET to ssizetype zero.
9907 (get_binfo_offset_as_int): Deleted.
9908 (dfs_record_base_offsets): Use tree_low_cst.
9909 (dfs_search_base_offsets): Likewise.
9910 (layout_nonempty_base_or_field): Reflect changes in RLI format
9911 and call byte_position.
9912 (layout_empty_base): Convert offset to ssizetype.
9913 (build_base_field): use rli_size_unit_so_far.
9914 (dfs_propagate_binfo_offsets): Do computation in proper type.
9915 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
9916 (layout_class_type): Reflect changes in RLI names and fields.
9917 (finish_struct_1): Set DECL_FIELD_OFFSET.
9918 * dump.c (dequeue_and_dump): Call bit_position.
9919 * expr.c (cplus_expand_constant): Use byte_position.
9920 * rtti.c (expand_class_desc): Use bitsize_one_node.
9921 * typeck.c (build_component_addr): Use byte_position and don't
9922 special case for zero offset.
9923
9924 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
9925
9926 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
9927
9928 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
9929 tinfo object.
9930 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
9931 vtable.
9932
9933 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9934
9935 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
9936 DECL_P macros.
9937 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
9938 make_typename_type, check_initializer, cp_finish_decl,
9939 xref_tag): Likewise.
9940 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
9941 decl_namespace, arg_assoc_template_arg, arg_assoc,
9942 validate_nonmember_using_decl, do_class_using_decl): Likewise.
9943 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
9944 args_to_string): Likewise.
9945 * friend.c (is_friend): Likewise.
9946 * lex.c (note_got_semicolon, note_list_got_semicolon,
9947 is_global): Likewise.
9948 * method.c (build_overload_nested_name, build_overload_value,
9949 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
9950 * parse.y (typename_sub, typename_sub1): Likewise.
9951 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
9952 process_partial_specialization, convert_template_argument,
9953 template_args_equal, add_pending_template, lookup_template_class,
9954 for_each_template_parm_r, maybe_fold_nontype_arg,
9955 tsubst, instantiate_template, type_unification_real, unify,
9956 instantiate_pending_templates, set_mangled_name_for_template_decl):
9957 Likewise.
9958 * repo.c (repo_get_id, repo_template_used): Likewise.
9959 * search.c (lookup_field_1): Likewise.
9960 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
9961 * xref.c (classname): Likewise.
9962
9963 2000-03-22 Mark Mitchell <mark@codesourcery.com>
9964
9965 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
9966 (CANONICAL_BINFO): New macro.
9967 (BINFO_NEW_VTABLE_MARKED): Use it.
9968 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
9969 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
9970 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
9971 not TREE_TYPE.
9972 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9973 (build_secondary_vtable): Likewise.
9974 (dfs_finish_vtbls): Likewise.
9975 (dfs_accumulate_vtbl_inits): Likewise.
9976 (accumulate_vtbl_inits): New function.
9977 (finish_vtbls): Make sure that virtual bases come after
9978 non-virtual bases in the vtable group.
9979 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
9980 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9981 * search.c (struct vbase_info): Move definition.
9982 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9983 (unmarked_new_vtable_p): Likewise.
9984 (dfs_mark_vtable_path): Remove.
9985 (dfs_mark_new_vtable): Remove.
9986 (dfs_unmark_new_vtable): Likewise.
9987 (dfs_clear_search_slot): Likewise.
9988 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9989 (dfs_clear_vbase_slots): Likewise.
9990 (init_vbase_pointers): LIkewise.
9991
9992 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
9993
9994 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
9995 SIZETYPE to a non-SIZETYPE.
9996
9997 2000-03-21 Mark Mitchell <mark@codesourcery.com>
9998
9999 * class.c (layout_virtual_bases): Adjust names in conditionally
10000 compiled code.
10001
10002 * class.c (record_base_offsets): New function.
10003 (layout_conflict_p): Likewise.
10004 (layout_nonempty_base_or_field): Use it.
10005 (layout_empty_base): New function.
10006 (build_base_field): Use it.
10007 (build_base_fields): Update comment.
10008 (layout_virtual_bases): Fold in a little code form
10009 layout_basetypes. Use layout_empty_base.
10010 (layout_basetypes): Remove.
10011 (end_of_class): New function.
10012 (layout_class_type): Use it. Adjust.
10013
10014 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10015 (fntype_p): Remove.
10016 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10017 comment.
10018 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10019 * typeck.c (fntype_p): Remove.
10020
10021 * cp-tree.h (TI_SPEC_INFO): Remove.
10022 (CLASSTYPE_TI_SPEC_INFO): Likewise.
10023 * pt.c (process_partial_specialization): Likewise.
10024
10025 * class.c (build_base_field): Fix thinko in computation of binfo
10026 offsets.
10027
10028 * tree.c (mark_local_for_remap_p): Mark variables declared in
10029 TARGET_EXPRs as well.
10030
10031 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10032
10033 * typeck.c (require_complete_type, complete_type,
10034 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10035 build_array_ref, convert_arguments, pointer_diff,
10036 build_x_unary_op, build_unary_op, build_c_cast,
10037 build_modify_expr): Use COMPLETE_TYPE_P etc.
10038 * call.c (is_complete, convert_like_real,
10039 build_new_method_call): Likewise.
10040 * class.c (build_vbase_pointer_fields, check_bases,
10041 build_base_field, finish_struct_1, pushclass): Likewise.
10042 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10043 * decl.c (maybe_process_template_type_declaration, pushtag,
10044 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10045 layout_var_decl, check_initializer, cp_finish_decl,
10046 grokdeclarator, require_complete_types_for_parms,
10047 grok_op_properties, xref_tag, xref_basetypes,
10048 check_function_type): Likewise.
10049 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10050 * friend.c (do_friend): Likewise.
10051 * init.c (build_offset_ref): Likewise.
10052 * parse.y (structsp): Likewise.
10053 * pt.c (maybe_process_partial_specialization,
10054 tsubst_friend_function, instantiate_class_template, tsubst,
10055 do_type_instantiation, instantiate_pending_templates): Likewise.
10056 * repo.c (repo_get_id): Likewise.
10057 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10058 synthesize_tinfo_var, emit_support_tinfos): Likewise.
10059 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10060 * semantics.c (begin_class_definition): Likewise.
10061 * tree.c (build_cplus_method_type): Likewise.
10062 * typeck2.c (digest_init, build_functional_cast,
10063 add_exception_specifier): Likewise.
10064 * parse.h, parse.c: Regenerated.
10065
10066 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10067
10068 * inc/cxxabi.h: New header file. Define new-abi entry points.
10069 (__pointer_type_info::target): Rename member to ...
10070 (__pointer_type_info::type): ... here.
10071 (__base_class_info::type): Rename member to ...
10072 (__base_class_info::base): ... here.
10073 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10074 * cp-tree.h (CPTI_ABI): New global tree enumeration.
10075 (abi_node): New global tree node.
10076 * decl.c (abi_node): Document.
10077 (init_decl_processing): Initialize abi_node.
10078 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10079 (get_vmi_pseudo_type_info): Likewise.
10080 (create_tinfo_types): Likewise.
10081 (emit_support_tinfos): Likewise.
10082 * tinfo.h (cxxabi.h): Include for new-abi.
10083 Move rtti class definitions to new header file.
10084 * tinfo.cc (abi): Use the namespace.
10085 (std): Move new abi rtti classes from here ...
10086 (__cxxabiv1): ... to here.
10087 * tinfo2.cc (cxxabi.h): Include for new-abi.
10088 Move rtti class definitions to new header file.
10089 (std): Move new abi rtti classes from here ...
10090 (__cxxabiv1): ... to here.
10091 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10092 namespace.
10093
10094 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10095 Jason Merrill <jason@casey.cygnus.com>
10096
10097 * method.c (build_overload_int): Use host_integerp.
10098
10099 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10100
10101 * init.c (build_offset_ref): Handle the case of a templated member
10102 function.
10103
10104 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10105
10106 * except.c (expand_exception_blocks): Clear catch_clauses_last.
10107
10108 2000-03-18 Mark Mitchell <mark@codesourcery.com>
10109
10110 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10111 * class.c (check_bitfield_decl): Turn illegal bitfields into
10112 non-bitfields.
10113 (dfs_propagate_binfo_offsets): Adjust for new size_binop
10114 semantics.
10115 (dfs_offset_for_unshared_vbases): Likewise.
10116 * cvt.c (cp_convert_to_pointer): Convert NULL to a
10117 pointer-to-member correctly under the new ABI.
10118 * expr.c (cplus_expand_constant): Don't use cp_convert when
10119 turning an offset into a pointer-to-member.
10120 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10121 when dereferencing them under the new ABI.
10122 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10123 of pointers-to-members under the new ABI.
10124
10125 * class.c (check_bitfield_decl): Remove restriction on really long
10126 bitfields.
10127 (layout_class_type): Implement new ABI handling of bitfields
10128 longer than their types.
10129
10130 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10131
10132 * parse.y (extdefs): Call ggc_collect.
10133 * parse.c: Regenerated.
10134
10135 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
10136
10137 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10138 (note_name_declared_in_class): Use OVL_CURRENT to get at a
10139 potential overload.
10140
10141 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10142
10143 * class.c (build_vbase_path): Use integer_zerop.
10144 (build_vtable_entry): Use tree_low_cst.
10145 (get_vfield_offset): Use bit_position.
10146 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10147 Use tree_low_cst.
10148 (check_bitfield_decl): Set DECL_SIZE using convert.
10149 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10150 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10151 Use tree_low_cst.
10152 (finish_struct_1): Use bit_position.
10153 (dump_class_hierarchy): Use tree_low_cst.
10154 * cp-tree.h (min_precision): Add declaration.
10155 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10156 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10157 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10158 * expr.c (cplus_expand_constant): Use bit_position.
10159 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10160 * rtti.c (get_base_offset): Use bit_position.
10161 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10162 host_integerp, and tree_low_cst.
10163 (pointer_int_sum): Use integer_zerop.
10164 (build_component_addr): Use bit_position.
10165
10166 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
10167
10168 * typeck.c (require_complete_type): Don't assume size_zero_node.
10169 (complete_type_or_else): Likewise.
10170
10171 2000-03-16 Steven Grady <grady@digitaldeck.com>
10172 Jason Merrill <jason@casey.cygnus.com>
10173
10174 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10175
10176 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
10177
10178 * decl2.c (grokfield): Bail out if type is error_mark_node.
10179
10180 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10181
10182 * tinfo2.cc (__ptr_to_member_data): Rename to ...
10183 (__pointer_to_member_data): ... here. Adjust.
10184 * rtti.c (create_tinfo_types): Adjust.
10185
10186 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10187
10188 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10189 * decl.c (ref_desc_type_node): Undocument.
10190 * rtti.c (ptr_ref_initializer): Rename to ...
10191 (ptr_initializer): ... here. Adjust comments.
10192 (ptmd_initializer): Fix comment thinko.
10193 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10194 (create_tinfo_types): Remove ref_desc_type_node init.
10195 * tinfo2.cc (__reference_type_info): Remove.
10196
10197 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10198
10199 * decl.c (cp_finish_decl): Remove obsolete comment.
10200
10201 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10202
10203 2000-03-14 Mark Mitchell <mark@codesourcery.com>
10204
10205 * cp-tree.h: Tweak documentation.
10206 * class.c (build_vbase_pointer_fields): Layout the fields, too.
10207 (avoid_overlap): Remove.
10208 (get_binfo_offset_as_int): New function.
10209 (dfs_serach_base_offsets): Likewise.
10210 (layout_nonempty_base_or_field): Likewise.
10211 (build_base_field): Layout fields here. Avoid placing two objects
10212 of the same type at the same address, under the new ABI.
10213 (build_base_fields): Adjust accordingly.
10214 (create_vtable_ptr): Return the new field, but don't attach it to
10215 TYPE_FIELDS.
10216 (remove_base_field): Remove.
10217 (remove_base_fields): Remove.
10218 (layout_basetypes): Adjust accordingly.
10219 (layout_class_type): Call layout_field for each field, rather than
10220 just making a wholesale call to layout_type.
10221
10222 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
10223
10224 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10225
10226 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
10227
10228 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10229
10230 * except.c (dtor_nothrow): New fn.
10231 (do_pop_exception): Use it. Take type parm.
10232 (push_eh_cleanup): Take type parm.
10233 (expand_start_catch_block): Pass it.
10234 (build_eh_type_type_ref): Accept null type.
10235
10236 2000-03-12 Mark Mitchell <mark@codesourcery.com>
10237
10238 * cp-tree.h (revert_static_member_fn): Change prototype.
10239 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10240 (grok_op_properties): Likewise.
10241 (start_function): Likewise.
10242 (revert_static_member_fn): Simplify.
10243 * pt.c (check_explicit_specialization): Adjust call to
10244 revert_static_member_fn.
10245
10246 2000-03-11 Mark Mitchell <mark@codesourcery.com>
10247
10248 * cp-tree.h (scope_kind): New type.
10249 (tmpl_spec_kind): Likewise.
10250 (declare_pseudo_global_level): Remove.
10251 (pseudo_global_level_p): Rename to template_parm_scope_p.
10252 (pushlevel): Remove declaration.
10253 (begin_scope): New function.
10254 (finish_scope): Likewise.
10255 (current_tmpl_spec_kind): Likewise.
10256 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10257 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
10258 Add template_spec_p.
10259 (toplevel_bindings_p): Adjust.
10260 (declare_pseudo_global_level): Remove.
10261 (pseudo_global_level_p): Rename to template_parm_scope_p.
10262 (current_tmpl_spec_kind): New function.
10263 (begin_scope): Likewise.
10264 (finish_scope): Likewise.
10265 (maybe_push_to_top_level): Adjust.
10266 (maybe_process_template_type_declaration): Likewise.
10267 (pushtag): Likewise.
10268 (pushdecl_nonclass_level): Likewise.
10269 (lookup_tag): Likewise.
10270 (grokfndecl): Handle member template specializations. Share
10271 constructor and non-constructor code.
10272 * decl2.c (check_classfn): Handle member template specializations.
10273 * pt.c (begin_template_parm_list): Use begin_scope.
10274 (begin_specialization): Likewise.
10275 (end_specialization): Likewise.
10276 (check_explicit_specialization): Use current_tmpl_spec_kind.
10277 Handle member template specializations.
10278 (end_template_decl): Use finish_scope. Remove call to
10279 get_pending_sizes.
10280 (push_template_decl_real): Remove bogus error message.
10281 (tsubst_decl): Fix typo in code contained in comment.
10282 (instantiate_template): Handle member template specializations.
10283 (most_general_template): Likewise.
10284
10285 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
10286
10287 * lex.c (whitespace_cr): Compress consecutive calls to warning().
10288 (do_identifier): Ditto for error().
10289
10290 * pt.c (convert_nontype_argument): Ditto for cp_error().
10291 (convert_template_argument): Ditto for cp_pedwarn().
10292
10293 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
10294
10295 * exception.cc (__check_null_eh_spec): New fn.
10296 * except.c (expand_end_eh_spec): Call it if the spec is throw().
10297
10298 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10299
10300 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10301 * except.c (expand_end_eh_spec): Add the return type.
10302 * rtti.c (throw_bad_cast): Add the parmtypes.
10303 (throw_bad_typeid): Likewise.
10304
10305 * semantics.c (expand_stmt): Only leave out rtl for unused
10306 artificials, and set DECL_IGNORED_P on them as well.
10307 * decl.c (wrapup_globals_for_namespace): Likewise.
10308
10309 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
10310
10311 * decl.c (maybe_commonize_var): Skip all artificial decls.
10312 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10313
10314 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10315
10316 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10317 * cp-tree.h: Declare flag_enforce_eh_specs.
10318 * decl.c (store_parm_decls, finish_function): Check it.
10319
10320 C library functions don't throw.
10321 * Makefile.in (cfns.h): New target.
10322 (except.o): Depend on it.
10323 * Make-lang.in (cc1plus): Depend on cfns.gperf.
10324 * cfns.gperf: New file.
10325 * cfns.h: Generated.
10326 * except.c: Include it.
10327 (nothrow_libfn_p): New fn.
10328 * decl.c (grokfndecl): Use it.
10329 * cp-tree.h: Declare it.
10330
10331 * decl.c (push_overloaded_decl_1, auto_function,
10332 define_function): Lose.
10333 (build_library_fn_1): New static fn.
10334 (builtin_function): Use it.
10335 (get_atexit_node): Use build_library_fn_ptr.
10336 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10337 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10338 push_void_library_fn, push_throw_library_fn): New fns.
10339 * cp-tree.h: Declare them.
10340 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10341 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10342 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10343 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10344 * rtti.c (build_runtime_decl): Lose.
10345 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10346 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10347 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10348
10349 * call.c (build_call): Remove result_type parm.
10350 Call mark_used on unused artificial fns.
10351 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10352
10353 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
10354
10355 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10356 appropriate.
10357 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10358 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10359 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10360 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10361 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10362 expand_generic_desc): Likewise.
10363
10364 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10365
10366 * exception.cc (__cp_pop_exception): Cleanup the original object.
10367
10368 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10369
10370 * decl.c (grok_op_properties): Merge conversion to void warning
10371 with other silly op warnings.
10372
10373 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
10374
10375 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10376 array CONSTRUCTOR elements. Don't use expr_tree_cons.
10377
10378 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10379
10380 * decl.c (cp_make_fname_decl): New function.
10381 (wrapup_globals_for_namespace): Don't emit unused static vars.
10382 (init_decl_processing): Remove comment about use of
10383 array_domain_type. Set make_fname_decl.
10384 (cp_finish_decl): Remove __FUNCTION__ nadgering.
10385 * semantics.c (begin_compound_stmt): Remove
10386 current_function_name_declared flagging.
10387 (expand_stmt): Don't emit unused local statics.
10388 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10389 specially.
10390
10391 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10392
10393 * typeck.c (convert_for_assignment): Don't look at array
10394 initializer.
10395 * call.c (convert_like_real): Likewise.
10396
10397 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
10398
10399 Add initial support for '\uNNNN' specifier.
10400 * lex.c (read_ucs): New fn.
10401 (readescape, skip_white_space): Call it.
10402 (is_extended_char, is_extended_char_1): New fns.
10403 (utf8_extend_token): New fn, #if 0'd out.
10404 (real_yylex): Treat extended chars like letters.
10405
10406 * search.c (note_debug_info_needed): Walk the bases even if we
10407 weren't deferring the type itself.
10408
10409 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10410
10411 * decl2.c (finish_objects): Constify a char*.
10412
10413 * method.c (emit_thunk): Likewise.
10414
10415 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
10416
10417 * typeck.c (dubious_conversion_warnings): Look through
10418 REFERENCE_TYPE.
10419
10420 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10421
10422 * class.c (dfs_modify_vtables): I is now unsigned.
10423 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10424 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10425 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10426 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10427 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10428 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10429 Call integer_all_onesp.
10430 * typeck2.c (process_init_constructor): Use compare_tree_int.
10431
10432 * lang-specs.h (as): Don't call if -syntax-only.
10433
10434 2000-03-06 Mark Mitchell <mark@codesourcery.com>
10435
10436 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10437 RTL_EXPR_HAS_NO_SCOPE after all.
10438
10439 2000-03-05 Mark Mitchell <mark@codesourcery.com>
10440
10441 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10442 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
10443 RTL_EXPR_HAS_NO_SCOPE.
10444
10445 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10446 later.
10447
10448 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10449
10450 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
10451
10452 * call.c (convert_like): Macrofy.
10453 (convert_like_with_context): New macro.
10454 (convert_like_real): Renamed from convert_like. Add calling
10455 context parameters, for diagnostics. Add recursive flag. Call
10456 dubious_conversion_warnings for outer conversion.
10457 (build_user_type_conversion): Use convert_like_with_context.
10458 (build_over_call): Likewise. Don't warn about dubious
10459 conversions here. Adjust convert_default_arg calls.
10460 (convert_default_arg): Add context parameters for diagnostics.
10461 Pass through to convert_like_with_context.
10462 * cp-tree.h (convert_default_arg): Add context parameters.
10463 (dubious_conversion_warnings): Prototype new function.
10464 * typeck.c (convert_arguments): Adjust convert_default_arg call.
10465 (dubious_conversion_warnings): New function, broken
10466 out of convert_for_assignment.
10467 (convert_for_assignment): Adjust.
10468
10469 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
10470
10471 * decl2.c (key_method): Break out from...
10472 (import_export_vtable, import_export_class): ...here.
10473
10474 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10475 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10476
10477 * search.c (note_debug_info_needed, dfs_debug_mark,
10478 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
10479 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
10480
10481 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
10482
10483 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
10484 typos.
10485
10486 2000-03-02 Mark Mitchell <mark@codesourcery.com>
10487
10488 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
10489 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
10490 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
10491 (lang_type): Split gets_new into has_new and has_array_new.
10492 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10493 (TYPE_GETS_NEW): Split into ...
10494 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
10495 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
10496 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
10497 (build_op_new_call): Don't declare.
10498 (build_new_1): Likewise.
10499 * call.c (build_op_new_call): Remove.
10500 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10501 instead of TYPE_NEEDS_DESTRUCTOR.
10502 (finish_struct_bits): Likewise.
10503 (add_implicitly_declared_members): Likewise.
10504 (check_field_decl): Likewise.
10505 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
10506 correctly under the new ABI.
10507 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10508 instead of TYPE_NEEDS_DESTRUCTOR.
10509 (initialize_local_var): Likewise.
10510 (destroy_local_var): Likewise.
10511 (cp_finish_decl): Likewise.
10512 (register_dtor_fn): Likewise.
10513 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
10514 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
10515 TYPE_VEC_DELETE_TAKES_SIZE here.
10516 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
10517 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
10518 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10519 (finish_destructor_body): Likewise.
10520 (maybe_build_cleanup_1): Likewise.
10521 * decl2.c (do_static_destruction): Likewise.
10522 * init.c (build_new_1): Make it static.
10523 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10524 (expand_cleanup_for_base): Likewise.
10525 (get_cookie_size): New function.
10526 (build_new_1): Handle array-new cookies correctly under the new
10527 ABI.
10528 (build_vec_delete_1): Likewise.
10529 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10530 (build_delete): Likewise.
10531 (build_vec_delete): Handle array-new cookies correctly under the new
10532 ABI.
10533 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10534 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
10535 TYPE_HAS_ARRAY_NEW_OPERATOR.
10536 * ptree.c (print_lang_type): Check them.
10537 * search.c (context_for_name_lookup): Fix typo in comment.
10538 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10539 * tree.c (break_out_cleanups): Likewise.
10540 (build_cplus_array_test_1): Likewise.
10541 (cp_build_qualified_type_real): Likewise.
10542 * typeck.c (complete_type): Likewise.
10543
10544 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
10545 the command-line, not the end.
10546
10547 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
10548
10549 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
10550
10551 2000-03-02 Tom Tromey <tromey@cygnus.com>
10552
10553 * cp-tree.h (build_java_class_ref): Declare.
10554 * init.c (build_java_class_ref): No longer static.
10555 * except.c (expand_throw): Generate a Java-style `throw' if the
10556 thrown object is a "Java" object.
10557 (initialize_handler_parm): Generate a Java-style lookup of
10558 exception info if the caught object is a "Java" object.
10559 (catch_language, catch_language_init): New globals.
10560 (decl_is_java_type): New function.
10561 (expand_start_catch_block): Don't call push_eh_info() or
10562 push_eh_cleanup() when handling a Java-style "catch". Pass Java
10563 class reference to build_catch_block.
10564
10565 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10566
10567 * typeck.c (comptypes): Treat sizetype like its language equivalent.
10568
10569 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
10570
10571 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
10572 to merge reference/pointer code and fix incorrect warnings.
10573
10574 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
10575
10576 * search.c (protected_accessible_p): Use context_for_name_lookup.
10577
10578 * init.c (construct_virtual_bases): Fix thinko.
10579 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
10580
10581 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10582
10583 * decl.c (current_function_decl): Move to toplev.c.
10584
10585 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
10586
10587 * pt.c (fn_type_unification): Unify return type, whenever
10588 provided.
10589 (get_bindings_real): Only pass return type when necessary.
10590 Remove explicit return type check.
10591 * class.c (resolve_address_of_overloaded_function): Pass desired
10592 return type to fn_type_unification.
10593
10594 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10595
10596 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
10597 DECL_FIELD_SIZE.
10598 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
10599 DECL_FIELD_SIZE.
10600 * rtti.c (expand_class_desc): Likewise.
10601 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
10602 (THUNK_VCALL_OFFSET): Likewise.
10603 (THUNK_DELTA): Reflect changes in ../tree.h.
10604
10605 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
10606
10607 * search.c (protected_accessible_p): Also allow the access if
10608 the member is public in DERIVED. Lose TYPE parm.
10609 (friend_accessible_p): Lose TYPE parm.
10610 (accessible_p): Adjust.
10611
10612 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10613
10614 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
10615 on things that are not sizes; ssize_binop deleted.
10616 Call size_diffop when appropriate.
10617 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10618 (build_primary_vtable, build_secondary_vtable): Likewise.
10619 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
10620 Variable I is HOST_WIDE_INT.
10621 (get_vfield_offset): Pass proper types to size_binop.
10622 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
10623 (finish_struct_1): Likewise.
10624 (skip_rtti_stuff): Arg N is now pointer to signed.
10625 (layout_class_type): Use size_zero_node.
10626 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
10627 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
10628 * decl.c (complete_arry_type): Pass proper types to size_binop.
10629 (xref_basetypes): BINFO_OFFSET is sizetype.
10630 * error.c (dump_expr): Don't use size_binop non-sizes.
10631 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
10632 * init.c (construct_virtual_bases): Fix type error.
10633 (build_vec_delete_1): Pass proper type to size_binop and don't
10634 fold result.
10635 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
10636 * rtti.c (get_base_offset): Pass proper type to size_binop.
10637 * search.c (dfs_find_vbases): Fix type error.
10638 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
10639 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
10640 * tree.c (debug_binfo): Variable N is signed.
10641 Use HOST_WIDE_INT_PRINT_DEC.
10642 * typeck.c (comptypes): sizetype is same as equivalent integer type.
10643 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
10644 size_one_node and size_zero_node.
10645 (c_alignof): Use size_one_node.
10646 (build_component_addr): Pass proper types to size_binop.
10647 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
10648
10649 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
10650
10651 Implement class scope using-declarations for functions.
10652 * class.c (handle_using_decl): Call add_method for used functions.
10653 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
10654 (add_method): Used functions are hidden by local functions.
10655 (check_bases_and_members): Handle using-decls before finalizing
10656 CLASSTYPE_METHOD_VEC.
10657 * call.c (add_function_candidate): Add ctype parm; if non-zero,
10658 override the type of 'this' accordingly.
10659 (add_template_candidate, add_template_candidate_real): Add ctype parm.
10660 (convert_class_to_reference, build_user_type_conversion_1,
10661 build_new_function_call, build_object_call, build_new_op,
10662 build_new_method_call): Pass ctype parm.
10663
10664 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
10665 the baselink.
10666 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10667 build_new_function_call, build_object_call, build_new_op,
10668 build_new_method_call, build_op_delete_call): Don't get basetype_path
10669 from a baselink.
10670 * typeck.c (build_component_ref): Likewise.
10671 * init.c (build_offset_ref): Likewise.
10672 (resolve_offset_ref): Don't call enforce_access.
10673 Call build_scoped_ref.
10674 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
10675 would cause an error or if -pedantic.
10676 * class.c (alter_access): Lose binfo parm.
10677
10678 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10679
10680 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
10681 types.
10682
10683 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
10684
10685 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
10686 pseudo_type_info creation into the std namespace
10687
10688 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10689
10690 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
10691 (import_export_class): Remove declaration.
10692 * decl2.c (import_export_class): Make it static.
10693 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
10694 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
10695 EXPR_WITH_FILE_LOCATION.
10696 * lex.c (check_newline): Tweak filename/lineno setting.
10697 * semantics.c (begin_while_stmt): Fix typo in comment.
10698
10699 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10700
10701 * lang-options.h (-fmessage-length=): Add missing option.
10702
10703 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
10704
10705 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
10706
10707 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
10708
10709 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
10710
10711 * optimize.c (expand_call_inline): Emit the return label before
10712 evaluating the return value.
10713
10714 2000-02-24 Mark Mitchell <mark@codesourcery.com>
10715
10716 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
10717 than duplicating functionality here.
10718 * optimize.c: Include input.h.
10719 (expand_call_inline): Use push_srcloc and pop_srcloc.
10720 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
10721 * parse.c: Regenerated.
10722 * Makefile.in (lex.o): Depend on input.h.
10723 (optimize.o): Likewise.
10724
10725 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
10726
10727 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
10728 function type, rather than ICE.
10729
10730 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
10731
10732 * decl.c (grokdeclarator): Call decl_type_access_control.
10733 * parse.y (parse_end_decl): Don't call decl_type_access_control if
10734 decl is null.
10735
10736 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
10737
10738 * decl.c (decls_match): Remove obsolete static member nadgering.
10739
10740 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10741
10742 * decl.c (grokdeclarator): Change ANSI to ISO.
10743 * lex.c (consume_string, readescape, do_identifier): Likewise.
10744 (parse_float, real_yylex): Likewise.
10745 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
10746 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
10747 new_type_id, maybe_label_decls, simple_stmt,
10748 for.init.statement): Likewise.
10749 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
10750 * semantics.c (finish_named_return_value): Likewise.
10751 * parse.c: Regenerate.
10752
10753 2000-02-21 Mark Mitchell <mark@codesourcery.com>
10754
10755 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
10756 (CPTI_CLASS_STAR_TYPE): Remove.
10757 (vtable_index_type): Likewise.
10758 (class_star_type_node): Remove.
10759 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
10760 (build_binary_op_nodefault): Remove.
10761 * call.c (build_new_op): Use build_binary_op instead of
10762 build_binary_op_nodefault.
10763 * decl.c (init_decl_processing): Remove class_star_type_node
10764 initialization. Make delta_type_node ptrdiff_type_node under the
10765 new ABI. Initialize vtable_index_type.
10766 (build_ptrmemfunc_type): Build different structures for the new
10767 ABI.
10768 (build_enumerator): Use build_binary_op instead of
10769 build_binary_op_nodefault.
10770 * method.c (build_overload_value): Mangle pointers-to-members
10771 appropriately under the new ABI.
10772 * typeck.c (build_array_ref): Use build_binary_op instead of
10773 build_binary_op_nodefault.
10774 (get_member_function_from_ptrfunc): Adjust for the new ABI.
10775 (build_binary_op_nodefault): Rename to ...
10776 (build_binary_op): ... this. Remove old version. Adjust for
10777 pointer-to-member comparisons under the new ABI.
10778 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
10779 (build_ptrmemfunc): Adjust for the new ABI.
10780 (expand_ptrmemfunc_cst): Likewise.
10781 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
10782 (pfn_from_ptrmemfunc): Adjust for the new ABI.
10783
10784 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
10785
10786 * call.c (build_object_call): Compress consecutive calls to
10787 cp_error.
10788 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
10789 (build_op_delete_call): Adjust message formatting.
10790
10791 * class.c (check_bases): Compress consecutive calls to
10792 cp_pedwarn.
10793 (finish_struct_anon): Say 'ISO C++'.
10794
10795 * decl.c (start_decl): Same here.
10796 (grok_reference_init): Likewise.
10797 (grokfndecl): Correct message formatting.
10798 (grokfndecl): Improve diagnostic.
10799 (check_static_variable_definition): Likewise. Say 'ISO C++'
10800 (compute_array_index_type): Say 'ISO C++'
10801 (create_array_type_for_decl): Compress consecutive calls to
10802 cp_error.
10803 (grokdeclarator): Say 'ISO C++'
10804 (grok_op_properties): Likewise.
10805
10806 * decl2.c (delete_sanity): Clairify diagnostic.
10807 (check_member_template): Same here.
10808 (grok_function_init): Use consistent terminology.
10809
10810 * expr.c (do_case): Say 'ISO C++'
10811
10812 * friend.c (do_friend): Compress consecutive calls to warning.
10813
10814 2000-02-20 Mark Mitchell <mark@codesourcery.com>
10815
10816 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
10817 * class.c (build_secondary_vtable): Reorganize. Don't create a
10818 new vtable under the new ABI.
10819 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
10820 computing the size.
10821 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
10822 the initializing elements.
10823 (initialize_vtable): New function.
10824 (dfs_finish_vtbls): Use it.
10825 (dfs_accumulate_vtbl_inits): New function.
10826 (finish_vtbls): Merge primary and secondary vtables under the new
10827 ABI.
10828 (finish_struct_1): Remove redundant call to layout_vtable_decl.
10829 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
10830 aren't VAR_DECLs.
10831
10832 * class.c (build_vtable): New function, split out from ...
10833 (get_vtable_decl): ... here, and ...
10834 (build_secondary_vtable): ... here.
10835
10836 * pt.c (tsubst_decl): Fix formatting.
10837
10838 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10839
10840 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
10841 (avoid_overlap, build_base_field): Likewise.
10842 (build_base_field, build_base_fields, is_empty_class):
10843 Test DECL_SIZE with integer_zero.
10844 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
10845 * cp-tree.h (struct lang_type): New field size_unit.
10846 (CLASSTYPE_SIZE_UNIT): New macro.
10847 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
10848 (cp_finish_decl): Delete -Wlarger-than processing.
10849 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
10850 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
10851 * tree.c (make_binfo): binfo vector is one entry longer.
10852 (walk_tree): Walk DECL_SIZE_UNIT.
10853
10854 2000-02-19 Mark Mitchell <mark@codesourcery.com>
10855
10856 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
10857 comment.
10858 (build_vtable_entry): Don't assume all vtable entries are
10859 functions.
10860 (build_vtbl_initializer): Adjust accordingly.
10861 (get_vtable_decl): Fix formatting.
10862
10863 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
10864
10865 * semantics.c (deferred_type_access_control): Walk the entire
10866 type_lookups list.
10867 (save_type_access_control): Rename from
10868 initial_deferred_type_access_control. Just remember the value.
10869 (decl_type_access_control): New fn.
10870 (begin_function_definition): Use deferred_type_access_control, after
10871 we've started the function. Set type_lookups to error_mark_node.
10872 * parse.y (frob_specs, fn.def1): Adjust.
10873 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
10874 (parse_end_decl, parse_bitfield0, parse_method): New fns.
10875 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
10876 (after_type_component_declarator0): Likewise.
10877 (after_type_component_declarator): Likewise.
10878 (notype_component_declarator): Likewise.
10879 * cp-tree.h: Adjust.
10880
10881 * decl.c (redeclaration_error_message): Allow redeclaration of
10882 namespace-scope decls.
10883
10884 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10885
10886 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
10887
10888 2000-02-17 Mark Mitchell <mark@codesourcery.com>
10889
10890 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
10891 * decl2.c (grokclassfn): Likewise.
10892
10893 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
10894
10895 * decl2.c (lang_decode_option): Don't set default message length
10896 here.
10897 * lex.c (lang_init_options): Set it here.
10898
10899 2000-02-16 Mark Mitchell <mark@codesourcery.com>
10900
10901 Make DECL_CONTEXT mean the class in which a member function was
10902 declared, even for a virtual function.
10903 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
10904 (DECL_FRIEND_CONTEXT): New macro.
10905 (DECL_REAL_CONTEXT): Remove.
10906 (SET_DECL_FRIEND_CONTEXT): Likewise.
10907 (DECL_VIRTUAL_CONTEXT): Adjust.
10908 (DECL_CLASS_SCOPE_P): Use TYPE_P.
10909 (add_friends): Remove.
10910 (hack_decl_function_context): Likewise.
10911 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
10912 CP_DECL_CONTEXT.
10913 (build_over_call): Fix indentation. Use DECL_CONTEXT
10914 instead of DECL_CLASS_CONTEXT.
10915 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
10916 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10917 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10918 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
10919 (build_base_field): Likewise.
10920 (finish_struct_1): Likewise.
10921 (build_self_reference): Likewise.
10922 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
10923 DECL_REAL_CONTEXT.
10924 (pushtag): Use decl_function_context, not
10925 hack_decl_function_context.
10926 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10927 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
10928 (pushdecl): Remove bogus code.
10929 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
10930 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10931 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10932 Use decl_function_context, nothack_decl_function_context.
10933 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
10934 (grokdeclarator): Likewise. Use decl_function_context, not
10935 hack_decl_function_context.
10936 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
10937 (start_function): Use DECL_FRIEND_CONTEXT, not
10938 DECL_CLASS_CONTEXT. Use decl_function_context, not
10939 hack_decl_function_context.
10940 (finish_function): Use decl_function_context, not
10941 hack_decl_function_context.
10942 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
10943 DECL_CLASS_CONTEXT.
10944 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
10945 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
10946 (grokfield): Likewise.
10947 (finish_builtin_type): Likewise.
10948 (finish_vtable_vardec): Use decl_function_context, not
10949 hack_decl_function_context.
10950 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10951 (start_static_initialization_or_destruction): Likewise.
10952 (finish_static_initialization_or_destruction): Likewise.
10953 (mark_used): Adjust logic for deciding when to synthesize methods.
10954 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
10955 DECL_REAL_CONTEXT.
10956 * error.c (dump_function_decl): Use DECL_CONTEXT, not
10957 DECL_CLASS_CONTEXT.
10958 * friend.c (is_friend): Likewise.
10959 (add_friends): Remove.
10960 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
10961 * lex.c (begin_definition_of_inclass_inline): Use
10962 decl_function_context, not hack_decl_function_context.
10963 (process_next_inline): Likewise.
10964 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10965 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
10966 DECL_CLASSS_CONTEXT.
10967 (hack_identifier): Likewise.
10968 (synthesize_method): Use decl_function_context, not
10969 hack_decl_function_context.
10970 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
10971 DECL_REAL_CONTEXT.
10972 (is_member_template): Use decl_function_context, not
10973 hack_decl_function_context. Use DECL_CONTEXT, not
10974 DECL_CLASS_CONTEXT.
10975 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
10976 DECL_CLASS_CONTEXT.
10977 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
10978 DECL_REAL_CONTEXT.
10979 (push_template_decl_real): Likewise.
10980 (instantiate_class_template): Don't call add_friends.
10981 (tsubst_default_argument): Use DECL_CONTEXT, not
10982 DECL_REAL_CONTEXT.
10983 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10984 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10985 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
10986 DECL_CLASS_CONTEXT.
10987 * repo.c (repo_inline_used): Likewise.
10988 * search.c (current_scope): Adjust for new _CONTEXT macros.
10989 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
10990 DECL_REAL_CONTEXT.
10991 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10992 (lookup_fnfields_here):Likewise.
10993 (check_final_overrider): Likewise.
10994 (init_vbase_pointers): Likewise.
10995 (virtual_context): Likewise.
10996 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
10997 (expand_body): Use decl_function_context, not
10998 hack_decl_function_context.
10999 * tree.c (hack_decl_function_context): Remove.
11000 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11001 DECL_CLASS_CONTEXT.
11002 * typeck2.c (error_not_base_type): Likewise.
11003
11004 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
11005
11006 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11007
11008 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11009
11010 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11011
11012 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
11013
11014 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11015
11016 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
11017
11018 * decl2.c (lang_decode_option): Enable automatic line wrapping.
11019
11020 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
11021
11022 * parse.y (frob_specs): Split out...
11023 (parse_decl): From here.
11024 (fn.def2): Call initial_deferred_type_access_control.
11025 (after_type_component_declarator0): Call frob_specs.
11026 (notype_component_declarator0): Likewise.
11027 * search.c (friend_accessible_p): Nested classes are friends of their
11028 enclosing classes.
11029
11030 2000-02-10 Mark Mitchell <mark@codesourcery.com>
11031
11032 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11033 used to create an implicit temporary.
11034
11035 * class.c (dfs_modify_vtables): Tweak calculation of functions to
11036 override.
11037
11038 2000-02-08 Nathan Sidwell <nathan@acm.org>
11039
11040 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11041 strip array element qualifiers too.
11042
11043 2000-02-07 Mark Mitchell <mark@codesourcery.com>
11044
11045 * decl.c (store_parm_decls): Don't build cleanups for parameters
11046 while processing_template_decl.
11047
11048 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
11049
11050 * cp-tree.h (struct saved_scope): Add incomplete field.
11051 (namespace_scope_incomplete): New macro.
11052 * decl.c (pushdecl): Use it.
11053 (hack_incomplete_structures): Use it. See through artificial
11054 binding levels.
11055 (mark_saved_scope): Mark it.
11056
11057 Implement access control for nested types.
11058 * search.c (type_access_control): New fn.
11059 (accessible_p): Now we do perform access control for types.
11060 * semantics.c (deferred_type_access_control): New fn.
11061 (initial_deferred_type_access_control): New fn.
11062 (begin_function_definition): Call it. Add lookups parm.
11063 * decl.c (struct binding_level): Add this_class field.
11064 (pushlevel_class): Set it.
11065 (mark_binding_level): Mark it.
11066 (lookup_name_real): Use it. Call type_access_control.
11067 (mark_saved_scope): Mark lookups field.
11068 * cp-tree.h (flagged_type_tree): Add lookups field.
11069 (struct saved_scope): Add lookups field.
11070 (type_lookups): New macro.
11071 * parse.y (declmods): Now <ftype>.
11072 (parse_decl): Add lookups parm. Call
11073 initial_deferred_type_access_control.
11074 (lang_extdef): Clear type_lookups.
11075 (typed_declspecs, declmods, typespec): Set lookups field.
11076 (initdcl): Call deferred_type_access_control.
11077 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11078 component_decl_1, named_parm): Adjust.
11079 * friend.c (is_friend): Nested classes are friends of their
11080 enclosing classes.
11081
11082 * class.c (currently_open_derived_class): New fn.
11083 * method.c (hack_identifier): Use it.
11084
11085 * lex.c (do_identifier): Remove obsolete code.
11086
11087 * parse.y (typed_typespecs): Propagate new_type_flag properly.
11088
11089 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
11090
11091 * tinfo.h: Remove apostrophes from C++ comment (xgettext
11092 thinks this file is plain C).
11093
11094 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11095
11096 * Makefile.in (call.o): Depend on $(EXPR_H).
11097
11098 * call.c: Include "expr.h".
11099
11100 * class.c (dump_class_hierarchy): Add prototype.
11101
11102 * search.c (dfs_get_pure_virtuals): Likewise.
11103
11104 2000-02-1 Ulrich Drepper <drepper@redhat.com>
11105
11106 * parse.y (simple_stmt): Allow :: token in asm parameter list.
11107 * parse.c: Rebuilt.
11108
11109 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
11110
11111 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11112 Store it in DECL_FCONTEXT.
11113 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11114
11115 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
11116
11117 * tinfo.h (old abi): #include "tconfig.h".
11118 * tinfo.cc (convert_to_base): Move into old abi section.
11119
11120 2000-01-31 Mark Mitchell <mark@codesourcery.com>
11121
11122 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11123 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11124 (BINFO_PRIMARY_BINFO): New macro.
11125 (BF_DELTA): Rename to ...
11126 (BV_DELTA): ... this.
11127 (BF_VCALL_INDEX): Rename to ...
11128 (BV_VCALL_INDEX): ... this.
11129 (BF_FN): Rename to ...
11130 (BV_FN): ... this.
11131 * class.c (build_vbase_path): Adjust for changes to reverse_path.
11132 (set_rtti_entry): Rename BF_ macros to BV_ variants.
11133 (modify_vtable_entry): Simplify.
11134 (add_virtual_function): Rename BF_ macros to BV_ variants.
11135 (build_vtable_initializer): Likewise.
11136 (get_class_offset_1): Remove.
11137 (dfs_get_class_offset): Likewise.
11138 (get_class_offset): Likewise.
11139 (dfs_find_final_overrider): New function.
11140 (find_final_overrider): Likewise.
11141 (modify_one_vtable): Remove.
11142 (dfs_find_base): New function.
11143 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
11144 find_final_overrider.
11145 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
11146 virtuals.
11147 (dfs_fixup_vtable_deltas): Remove.
11148 (override_one_vtable): Remove.
11149 (merge_overrides): Likewise.
11150 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11151 unreal chilren of virtual bases.
11152 (finish_struct_1): Don't use merge_overrides. Don't use
11153 dfs_fixup_vtable_deltas.
11154 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11155 BINFOs.
11156
11157 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11158 Jason Merrill <jason@yorick.cygnus.com>
11159
11160 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11161
11162 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
11163
11164 * exception.cc (__throw_bad_typeid): Add missing std::.
11165
11166 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11167
11168 * cp-tree.h (make_thunk): PROTO -> PARAMS.
11169
11170 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
11171
11172 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11173
11174 Runtime support for new-abi rtti.
11175 * inc/typeinfo (type_info::operator!=): Define in class.
11176 (type_info::before, type_info::name, type_info::operator==,
11177 type_info::operator!=): Define new ABI implementations.
11178 (type_info::is_pointer_p, type_info::is_function_p): Declare
11179 new virtual functions.
11180 (type_info::do_catch, type_info::do_upcast): Likewise.
11181
11182 * tinfo.h (__base_class_info): Define new class.
11183 (__class_type_info): Likewise.
11184 (__si_class_type_info): Likewise.
11185 (__vmi_class_type_info): Likewise.
11186 (__dynamic_cast): Prototype.
11187
11188 * tinfo.cc: Conditionalize old and new rtti mechanisms.
11189 (type_info::is_pointer_p): Define new function.
11190 (type_info::is_function_p): Likewise.
11191 (type_info::do_catch): Likewise.
11192 (type_info::do_upcast): Likewise.
11193 (vtable_prefix): New structure for vtable access.
11194 (adjust_pointer): Define new template function.
11195 (contained_p, public_p, virtual_p, contained_public_p,
11196 contained_nonpublic_p, contained_nonvirtual_p): Define new
11197 functions.
11198 (nonvirtual_base_type): New local variable.
11199 (__class_type_info::~__class_type_info): Define.
11200 (__si_class_type_info::~__si_class_type_info): Likewise.
11201 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11202 (__class_type_info::do_catch): Define new function.
11203 (__class_type_info::do_upcast): Likewise.
11204 (__class_type_info::find_public_src): Likewise.
11205 (__class_type_info::do_find_public_src): Likewise.
11206 (__si_class_type_info::do_find_public_src): Likewise.
11207 (__vmi_class_type_info::do_find_public_src): Likewise.
11208 (__class_type_info::do_dyncast): Likewise.
11209 (__si_class_type_info::do_dyncast): Likewise.
11210 (__vmi_class_type_info::do_dyncast): Likewise.
11211 (__class_type_info::do_upcast): Likewise.
11212 (__si_class_type_info::do_upcast): Likewise.
11213 (__vmi_class_type_info::do_upcast): Likewise.
11214 (__dynamic_cast): Likewise.
11215
11216 * tinfo2.cc (__fundamental_type_info): Define new class.
11217 (__pointer_type_info): Likewise.
11218 (__reference_type_info): Likewise.
11219 (__array_type_info): Likewise.
11220 (__function_type_info): Likewise.
11221 (__enum_type_info): Likewise.
11222 (__ptr_to_member_type_info): Likewise.
11223 (__fundamental_type_info::~__fundamental_type_info): Define.
11224 (__pointer_type_info::~__pointer_type_info): Likewise.
11225 (__reference_type_info::~__reference_type_info): Likewise.
11226 (__array_type_info::~__array_type_info): Likewise.
11227 (__function_type_info::~__function_type_info): Likewise.
11228 (__enum_type_info::~__enum_type_info): Likewise.
11229 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11230 (__pointer_type_info::do_catch): Define new function.
11231 (__ptr_to_member_type_info::do_catch): Define new function.
11232
11233 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11234 (__is_pointer): Likewise.
11235
11236 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11237
11238 2000-01-30 Mark Mitchell <mark@codesourcery.com>
11239
11240 * cp/class.c (build_vtable): Rename to build_primary_vtable.
11241 (prepare_fresh_vtable): Rename to build_secondary_vtable.
11242 (make_new_vtable): New function.
11243 (modify_vtable_entry): Handle generation of new vtables correctly.
11244 (modify_one_vtable): Remove unused parameter.
11245 (dfs_fixup_vtable_deltas): Likewise.
11246 (override_one_vtable): Use build_secondary_vtable.
11247 (finish_struct_1): Use build_primary_vtable and
11248 build_secondary_vtable.
11249
11250 2000-01-28 Ulrich Drepper <drepper@redhat.com>
11251
11252 * cp/decl.c: Adjust variable names, comments, help strings.
11253
11254 2000-01-29 Nathan Sidwell <nathan@acm.org>
11255
11256 * new2.cc (operator delete[]): Use operator delete, don't assume
11257 implementation.
11258
11259 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
11260
11261 * class.c (build_vtbl_initializer): Add argument to
11262 build_vtable_entry call.
11263
11264 2000-01-27 Mark Mitchell <mark@codesourcery.com>
11265
11266 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11267 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11268 (BF_DELTA): New macro.
11269 (BF_VCALL_INDEX): Likewise.
11270 (BF_FN): Likewise.
11271 (THUNK_VCALL_OFFSET): Likewise.
11272 (make_thunk): Change prototype.
11273 * class.c (build_vtable_entry): Integrate
11274 build_vtable_entry_for_fn. Handle vcall indices.
11275 (build_vtable_entry_for_fn): Remove.
11276 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
11277 BF_VCALL_INDEX, BF_FN.
11278 (modify_vtable_entry): Integrate common code from
11279 modify_one_vtable and dfs_fixup_vtable_deltas.
11280 (add_virtual_function): Set BF_VCALL_INDEX.
11281 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
11282 and BF_FN.
11283 (modify_one_vtable): Simplify.
11284 (dfs_fixup_vtable_deltas): Likewise.
11285 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11286 * method.c (make_thunk): Handle vcall indices.
11287
11288 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
11289
11290 Compiler side new abi rtti (not enabled).
11291 * cp-tree.h (new_abi_rtti_p): New macro.
11292 (emit_support_tinfos): Prototype new function.
11293 (tinfo_decl_p): Likewise.
11294 (emit_tinfo_decl): Likwise.
11295 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11296 macros.
11297 (doing_runtime): New local static.
11298 (init_rtti_processing): Add new-abi initializer.
11299 (get_tinfo_decl): Add new-abi logic.
11300 (tinfo_from_decl): Likewise.
11301 (build_dynamic_cast_1): Likewise.
11302 (qualifier_flags): New static function.
11303 (tinfo_base_init): Likewise.
11304 (generic_initializer): Likewise.
11305 (ptr_ref_initializer): Likewise.
11306 (ptmd_initializer): Likewise.
11307 (class_hint_flags): Likewise.
11308 (class_initializer): Likewise.
11309 (synthesize_tinfo_var): Likewise.
11310 (create_real_tinfo_var): Likewise.
11311 (create_pseudo_type_info): Likewise.
11312 (get_vmi_pseudo_type_info): Likewise.
11313 (create_tinfo_types): Likewise.
11314 (emit_support_tinfos): New global function.
11315 (tinfo_decl_p): New global predicate.
11316 (emit_tinfo_decl): New global function.
11317 * class.c (set_rtti_entry): Generalize for old and new rtti.
11318 (build_vtbl_initializer): Likewise.
11319 * decl2.c (finish_file): Likewise.
11320
11321 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
11322
11323 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11324 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11325
11326 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
11327
11328 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11329 for scopes.
11330
11331 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
11332
11333 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11334
11335 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
11336
11337 * optimize.c (calls_setjmp_r): Supply new argument
11338 to special_function_p.
11339
11340 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11341
11342 * call.c: PROTO -> PARAMS.
11343 * class.c: Likewise.
11344 * cp-tree.h: Likewise.
11345 * cvt.c: Likewise.
11346 * decl.c: Likewise.
11347 * decl.h: Likewise.
11348 * decl2.c: Likewise.
11349 * dump.c: Likewise.
11350 * errfn.c: Likewise.
11351 * error.c: Likewise.
11352 * except.c: Likewise.
11353 * expr.c: Likewise.
11354 * init.c: Likewise.
11355 * input.c: Likewise.
11356 * lex.c: Likewise.
11357 * lex.h: Likewise.
11358 * method.c: Likewise.
11359 * optimize.c: Likewise.
11360 * parse.y: Likewise.
11361 * pt.c: Likewise.
11362 * repo.c: Likewise.
11363 * rtti.c: Likewise.
11364 * search.c: Likewise.
11365 * semantics.c: Likewise.
11366 * spew.c: Likewise.
11367 * tree.c: Likewise.
11368 * typeck.c: Likewise.
11369 * typeck2.c: Likewise.
11370 * xref.c: Likewise.
11371
11372 2000-01-25 Richard Henderson <rth@cygnus.com>
11373
11374 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11375
11376 2000-01-25 Mark Mitchell <mark@codesourcery.com>
11377
11378 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11379 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11380 (struct vcall_offset_data_s): New type.
11381 (dfs_vcall_offset_queue_p): New function.
11382 (dfs_build_vcall_offset_vtbl_entries): Likewise.
11383 (build_vcall_offset_vtbl_entries): Likewise.
11384 (layout_vtable_decl): Likewise.
11385 (num_vfun_entries): Likewise.
11386 (num_extra_vtbl_entries): Add the entries for vcall offsets.
11387 (build_vtbl_initializer): Likewise.
11388 (dfs_finish_vtabls): Use layout_vtable_decl.
11389 (modify_one_vtables): Always duplicate vtables under the new ABI.
11390 (finish_struct_1): Use layout_vtable_decl.
11391
11392 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11393
11394 * decl.c (member_function_or_else): Change third arg from a format
11395 specifier to an `enum overload_flags'. Callers changed.
11396
11397 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
11398
11399 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11400 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11401 build_const_cast, get_delta_difference, check_return_expr): Avoid
11402 ANSI string concatenation usage.
11403
11404 2000-01-24 Mark Mitchell <mark@codesourcery.com>
11405
11406 * class.c (layout_class_type): Put the fields required to make a
11407 class non-empty at the end, not the beginning, of the TYPE_FIELDs
11408 list.
11409
11410 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
11411
11412 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11413 template.
11414
11415 * decl2.c (mark_used): Do instantiate inlines that have been
11416 explicitly instantiated.
11417
11418 2000-01-24 Richard Henderson <rth@cygnus.com>
11419
11420 * call.c (build_over_call): Use expand_tree_builtin.
11421 * typeck.c (build_function_call_real): Likewise.
11422 (build_binary_op_nodefault): Handle unordered compares.
11423
11424 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11425
11426 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11427 cp_tree_index values.
11428 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11429 New global node #defines for them.
11430 * rtti.c (call_void_fn): Replace with ...
11431 (build_runtime_decl): ... new static function.
11432 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11433 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11434 (build_dynamic_cast_1): Always produce correctly typed result.
11435 Explicitly produce type_info addresses. Use dynamic_cast_node.
11436 * exception.cc (__throw_bad_cast): Return `void *'.
11437 (__throw_bad_typeid): Return `const type_info &'.
11438
11439 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11440
11441 * cp-tree.h (get_vtable_decl): Prototype new function.
11442 * class.c (get_vtable_decl): New function. Broken out from ...
11443 (build_vtable): ... here. Use it.
11444 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11445 by get_vtable_decl.
11446
11447 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11448
11449 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11450 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11451 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11452 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11453 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11454 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11455 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11456 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11457 (CPTI_TINFO_VAR_ID): New enumeration.
11458 (__tp_desc_type_node, __access_mode_type_node,
11459 __bltn_desc_type_node, __user_desc_type_node,
11460 __class_desc_type_node, __ptr_desc_type_node,
11461 __attr_desc_type_node, __func_desc_type_node,
11462 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11463 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11464 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11465 enum_desc_type_node, class_desc_type_node,
11466 si_class_desc_type_node, vmi_class_desc_type_node,
11467 ptmd_desc_type_node, base_desc_type_node): New #defines.
11468 (tinfo_fn_id, tinfo_fn_type): Rename to ...
11469 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11470 (tinfo_var_id): New enumeration.
11471 (DECL_TINFO_FN_P): Augment comment.
11472 * decl.c (cp_global_trees): Adjust documentation.
11473 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11474 tinfo_decl_type and tinfo_var_id.
11475 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11476 (build_typeid): Remove unused variable.
11477 (get_tinfo_var): Use tinfo_var_id.
11478 (tinfo_name): New static function.
11479 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
11480 (tinfo_from_decl): Likewise.
11481 (get_base_offset): New static function, broken out of
11482 expand_class_desc.
11483 (expand_si_desc): Use tinfo_name.
11484 (expand_class_desc): Likewise. Lose local static variable.
11485 Use base_desc_type_node. Use get_base_offset.
11486 (expand_ptr_desc): Use tinfo_name.
11487 (expand_attr_desc): Likewise.
11488 (expand_generic_desc): Likewise.
11489
11490 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
11491 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
11492
11493 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11494
11495 * cp-tree.h (__eprintf): Remove declaration.
11496 * tree.c (__eprintf): Remove definition.
11497
11498 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
11499 Mark Mitchell <mark@codesourcery.com>
11500
11501 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
11502 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
11503
11504 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
11505
11506 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
11507
11508 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11509
11510 * cp-tree.h (register_dtor_fn): New function.
11511 * decl.c (destroy_local_static): Rename to ...
11512 (register_dtor_fn): ... this. Give it external linkage.
11513 (expand_static_init): Use it.
11514 * decl2.c (do_static_initialization): Likewise, if using
11515 __cxa_atexit.
11516 (do_static_destruction): Check that __cxa_atexit is not in use.
11517 (finish_file): Don't call do_static_destruction if using
11518 __cxa_atexit.
11519
11520 * typeck.c (convert_arguments): Restore two-message error
11521 reporting.
11522
11523 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
11524
11525 Remap dynamic cast hint values to be consistent across ABIs.
11526 * search.c (dynamic_cast_base_recurse): Remap generated value.
11527 (get_dynamic_cast_base_type): Adjust documentation.
11528 * tinfo.h (__user_type_info::dyncast): Likewise.
11529 (__user_type_info::find_public_subobj): Remap BOFF meaning.
11530 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
11531 (__class_type_info::do_dyncast): Likewise.
11532 (__class_type_info::do_find_public_subobj): Likewise.
11533 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
11534
11535 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11536
11537 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
11538
11539 * typeck2.c (incomplete_type_error): Restore previous
11540 cp_error and cp_error_at call sequence.
11541
11542 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
11543
11544 * class.c (dump_class_hierarchy): Make format agree with argument;
11545 cast pointer to unsigned long and print with %lx.
11546
11547 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11548
11549 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
11550
11551 * typeck.c (composite_pointer_type, common_type,
11552 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
11553 build_function_call_real, convert_arguments,
11554 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
11555 build_unary_op, mark_addressable, build_compound_expr,
11556 build_static_cast, build_reinterpret_cast, build_const_cast,
11557 build_c_cast, build_modify_expr, get_delta_difference,
11558 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
11559 'ISO C++'. Fusion consecutive calls to diagnostic message routines
11560 into a single one.
11561 * typeck2.c (readonly_error, abstract_virtuals_error,
11562 process_init_constructor, check_for_new_type): Likewise.
11563
11564 2000-01-19 Mark Mitchell <mark@codesourcery.com>
11565
11566 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
11567 VAR_DECLs.
11568
11569 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
11570
11571 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
11572 (build_x_typeid): Likewise.
11573 (get_tinfo_fn): Likewise.
11574 (get_tinfo_fn_unused): Rename to ...
11575 (get_tinfo_decl): ... here.
11576 * rtti.c (build_headof): Replace logic error with assertion.
11577 (get_tinfo_fn_dynamic): Rename to ...
11578 (get_tinfo_decl_dynamic): ... here. Make static. Use
11579 complete_type_or_else.
11580 (build_x_typeid): Move into ...
11581 (build_typeid): ... here. Adjust call to
11582 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
11583 throw_bad_typeid expression.
11584 (get_tinfo_fn_unused): Rename to ...
11585 (get_tinfo_decl): ... here. Adjust comment.
11586 (get_tinfo_fn): Delete.
11587 (tinfo_from_decl): New static function.
11588 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
11589 (get_typeid): Use complete_type_or_else.
11590 (build_dynamic_cast_1): Adjust calls to
11591 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
11592 * parse.y (primary): Adjust call to build_typeid.
11593 * except.c (build_eh_type_type_ref): Adjust call to
11594 get_tinfo_decl. Mark as used.
11595 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
11596 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
11597 * parse.c: Regenerated.
11598
11599 2000-01-17 Mark Mitchell <mark@codesourcery.com>
11600
11601 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
11602 calling convention.
11603 (resolves_to_fixed_type_p): Document calling convention.
11604 * rtti.c (build_x_typeid): Initialize NONNULL.
11605
11606 * cp-tree.h (build_shared_int_cst): New function.
11607 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
11608 * class.c (modify_vtable_entry): Likewise.
11609 (add_virtual_function): Split out code to generated shared
11610 INTEGER_CSTs to build_share_int_cst.
11611 (modify_all_vtables): Handle all the overridden functions here.
11612 Add overridden functions from non-primary virtual bases to the
11613 primary vtable.
11614 (finish_struct_1): Adjust call to modify_all_vtables. Add
11615 overridden functions from non-primary bases to the vtable.
11616 * tree.c (build_shared_int_cst): New function.
11617
11618 * cp-tree.h (scratchalloc): Remove.
11619 (build_scratch_list): Likewise.
11620 * call.c (convert_class_to_reference): Replace build_scratch_list
11621 and build_expr_list with build_tree_list.
11622 (add_candidate): Replace scratchalloc with expralloc. Note memory
11623 leak.
11624 (build_user_type_conversion_1): Replace build_scratch_list
11625 and build_expr_list with build_tree_list.
11626 (build_new_op): Likewise.
11627 (build_op_delete_call): Likewise.
11628 (convert_like): Likewise.
11629 * cvt.c (ocp_convert): Likewise.
11630 * decl.c (start_decl): Likewise.
11631 (start_function): Likewise.
11632 (finish_destructor_body): Likewise.
11633 (maybe_build_cleanup_1): Likewise.
11634 * decl2.c (reparse_decl_as_expr): Likewise.
11635 * init.c (perform_member_init): Likewise.
11636 (expand_cleanup_for_base): Likewise.
11637 (build_builtin_delete_call): Likewise.
11638 (build_new_1): Likewise.
11639 (build_delete): Likewise.
11640 * method.c (do_build_assign_ref): Likewise.
11641 * parse.y (already_scoped_stmt): Likewise.
11642 (nontrivial_exprlist): Likewise.
11643 (net_initializer): Likewise.
11644 (initlist): Likewise.
11645 * parse.c: Regenerated.
11646 * rtti.c (build_x_typeid): Likewise.
11647 (build_dynamic_cast_1): Likewise.
11648 * typeck.c (build_x_compound_expr): Likewise.
11649 (build_static_cast): Likewise.
11650 (build_modify_expr): Likewise.
11651
11652 * cp-tree.h (DECL_VINDEX): Add documentation.
11653 * class.c (build_vtable_entry): Likewise.
11654 (start_vtable): Add comment.
11655 (add_virtual_function): Replace pending_hard_virtuals with
11656 overridden_virtuals and pending_virtuals with new_virtuals.
11657 Replace redundant assignments with assertions.
11658 (check_for_override): Add comment.
11659 (check_bases_and_members): Replace pending_hard_virtuals with
11660 overridden_virtuals and pending_virtuals with new_virtuals.
11661 (create_vtbl_ptr): Likewise.
11662 (layout_class_type): Likewise.
11663 (finish_struct_1): Likewise. Add comments.
11664
11665 2000-01-16 Mark Mitchell <mark@codesourcery.com>
11666
11667 * class.c (finish_struct_1): Replace redundant code with
11668 assertions.
11669
11670 * cp-tree.h (flag_new_abi): Move.
11671 (flag_use_cxa_atexit): Likewise.
11672 (flag_honor_std): Likewise.
11673 (flag_rtti): Likewise.
11674 (vbase_offsets_in_vtable_p): Define.
11675 (vptrs_present_everywhere_p): Likewise.
11676 (TYPE_CONTAINS_VPTR_P): Likewise.
11677 (dfs_walk_real): Declare.
11678 * class.c (build_vbase_pointer_fields): Check
11679 vbase_offsets_in_vtable_p.
11680 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
11681 BINFO_VPTR_FIELD.
11682 (build_vbase_offset_vtbl_entries): Simplify.
11683 (build_vbase_offset_vtbl_entries): Adjust.
11684 (build_vbase_pointer): Add ability to look up vbase offsets in
11685 vtable.
11686 (start_vtable): New function.
11687 (add_virtual_function): Use it.
11688 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
11689 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
11690 (build_vtbl_initializer): Take the type of the complete object as
11691 input. Use it to correctly calculate vbase offsets.
11692 (dfs_finish_vtbls): Pass the complete type to
11693 build_vtbl_initializer.
11694 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
11695 (create_vtable_ptr): Create a vtable even if there are no
11696 new virtual functions, under the new ABI.
11697 (finish_struct_1): Likewise.
11698 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
11699 * decl.c (exapnd_static_init): Remove call to
11700 preserve_initializer.
11701 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
11702 vtables.
11703 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
11704 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
11705 (construct_virtual_bases): Don't initialize virtual base pointers
11706 under the new ABI.
11707 (build_aggr_init): Clean up comment.
11708 (expand_aggr_init_1): Likewise.
11709 * rtti.c (expand_class_desc): Store the virtual function table
11710 index where the vbase offset lives in the offset field.
11711 * search.c (dfs_walk_real): Make it global.
11712 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
11713 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
11714
11715 * tinfo.h (USItype): Make it signed under the new ABI.
11716 * tinfo.cc (convert_to_base): New function. Encapsulate base
11717 conversion logic here.
11718 (__class_type_info::do_upcast): Use it.
11719 (__class_type_info::do_dyncast): Likewise.
11720 (__class_type_info::do_find_public_subobj): Likewise.
11721
11722 * init.c (construct_virtual_bases): Don't look up the addresses of
11723 virtual bases at run-time.
11724
11725 * class.c (build_vbase_pointer): Relocate.
11726 (build_vbase_pointer_fields): Likewise.
11727 (dfs_build_vbase_offset_vtbl_entries): Likewise.
11728 (build_vbase_offset_vtbl_entries): Likewise.
11729
11730 * decl.c (init_decl_processing): Complain if -fnew-abi
11731 -fno-vtable-thunks is used.
11732
11733 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
11734 flag_new_abi.
11735
11736 2000-01-15 Mark Mitchell <mark@codesourcery.com>
11737
11738 * cp-tree.h (num_extra_vtbl_entries): New function.
11739 (size_extra_vtbl_entries): Likewise.
11740 (dfs_vtable_path_unmark): Likewise.
11741 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
11742 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11743 * class.c (num_extra_vtbl_entries): New function.
11744 (size_extra_vtbl_entries): Likewise.
11745 (dfs_build_vbase_offset_vtbl_entries): New function.
11746 (build_vbase_offset_vtbl_entries): Likewise.
11747 (build_vtbl_initializer): Use it.
11748 (finish_struct_1): Adjust vtable sizes (using
11749 num_extra_vtbl_entries).
11750 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
11751 THUNK_DECL is non-NULL before expanding it.
11752 * init.c (expand_virtual_init): Adjust the vtable pointer by
11753 size_extra_vtbl_entries before storing it.
11754 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
11755 Handle TREE_LIST parameters here, not in the dfs_* functions.
11756 (dfs_unmarked_real_bases_queue_p): Adjust.
11757 (dfs_marked_real_bases_queue_p): Likewise.
11758 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
11759 (dfs_vtable_path_marked_real_bases_queue_p): New function.
11760 (dfs_vtable_path_unmark): Likewise.
11761
11762 2000-01-14 Mark Mitchell <mark@codesourcery.com>
11763
11764 * optimize.c (copy_body_r): Clear the operand three of a
11765 TARGET_EXPR when copying it.
11766
11767 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11768
11769 * method.c (build_decl_overload_real): Check whether we are in ::
11770 before returning __builtin_new/delete.
11771
11772 2000-01-13 Mark Mitchell <mark@codesourcery.com>
11773
11774 * pt.c (tsubst_friend_function): Improve comment.
11775 (instantiate_decl): Avoid crashing when a "nested" function is
11776 instantiated from the top level.
11777
11778 * dump.c (dqeueue_and_dump): Dump
11779 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
11780
11781 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11782
11783 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
11784
11785 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
11786
11787 * g++spec.c (lang_specific_driver): Add -fnew-abi if
11788 ENABLE_NEW_GXX_ABI defined.
11789 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
11790 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
11791 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
11792
11793 2000-01-12 Mark Mitchell <mark@codesourcery.com>
11794
11795 * decl.c (start_cleanup_fn): Call pushdecl.
11796
11797 * call.c (convert_class_to_reference): Fix typos.
11798 (build_conditional_expr): Handle errors gracefully.
11799 * class.c (push_nested_class): Likewise.
11800 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
11801 (DECL_THIS_EXTERN): Use it.
11802 (DECL_THIS_STATIC): Likewise.
11803 * cvt.c (convert_to_void): Handle errors gracefully.
11804 (build_expr_type_conversion): Likewise.
11805 * decl.c (maybe_push_decl): Likewise.
11806 (start_decl_1): Likewise.
11807 (require_complete_types_for_parms): Likewise.
11808 * parse.y (structsp): Likewise.
11809 (base_class): Likewise.
11810 * parse.c: Regenerated.
11811 * pt.c (finish_member_template_decl): Likewise.
11812 * typeck.c (decay_conversion): Likewise.
11813
11814 * cp-tree.h (dfs_skip_vbases): New function.
11815 (find_vbase_instance): Likewise.
11816 * class.c (determine_primary_base): Allow a nearly empty base to
11817 serve as a primary base class under the new ABI.
11818 (get_class_offset_1): Rename to ...
11819 (dfs_get_class_offset): ... this. Simplify. Don't issue error
11820 messages here.
11821 (get_class_offset): Use it. Issue error messages here.
11822 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
11823 find the right copies of virtual bases.
11824 (fixup_vtable_deltas1): Rename to ...
11825 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
11826 bases as primary bases.
11827 (fixup_vtable_deltas): Remove.
11828 (override_one_vtable): Handle virtual bases as primary bases.
11829 (merge_overrides): Likewise.
11830 (finish_struct_1): Likewise.
11831 (dump_class_hierarchy): Dump primary-ness of bases as well.
11832 * search.c (mark_primary_bases): Use a pre-order traversal to
11833 handle primary virtual bases.
11834 (dfs_skip_vbases): New fiunction.
11835 (expand_upcast_fixups): Adjust to handle primary virtual bases.
11836 (fixup_virtual_upcast_offsets): Likewise.
11837 (fixup_all_virtual_upcast_offsets): Likewise.
11838 (dfs_find_vbase_instances): New function.
11839 (find_vbase_instance): Likewise.
11840
11841 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11842
11843 * lex.c (DIR_SEPARATOR): Delete macro.
11844
11845 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
11846
11847 * decl2.c (lang_decode_option): Handle automatic line wrapping
11848 option.
11849
11850 2000-01-11 Mark Mitchell <mark@codesourcery.com>
11851
11852 * friend.c (do_friend): Don't resolve scopes when processing
11853 template declarations, even if the qualifying scope doesn't
11854 involve template parameters.
11855
11856 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
11857
11858 * class.c (dfs_modify_vtables_queue_p): Remove.
11859 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
11860 and dfs_marked_real_bases_queue_p instead of
11861 dfs_modify_vtables_queue_p.
11862
11863 * class.c (build_vbase_path): Simplify.
11864 (dfs_propagate_binfo_offsets): New function.
11865 (propagate_binfo_offsets): Use it.
11866 (remove_base_field): Simplify.
11867 (dfs_set_offset_for_vbases): Remove.
11868 (dfs_set_offset_for_shared_vbases): New function.
11869 (dfs_set_offset_for_unshared_vbases): Likewise.
11870 (layout_virtual_bases): Use them.
11871 (layout_basetypes): Don't call propagate_binfo_offsets.
11872 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
11873 for the vbases.
11874
11875 * class.c (build_base_field): New function, split out from ...
11876 (build_base_fields): ... here. Use it. Allocate primary bases
11877 first, under the new ABI.
11878 (get_vtable_entry): Remove.
11879 (remove_base_field): New function, split out from ...
11880 (remove_base_fields): ... here. Adjust since primary bases come
11881 first under the new ABI.
11882
11883 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
11884 (initialize_vtbl_ptrs): New function.
11885 (expand_indirect_vtbls_init): Change prototype.
11886 (convert_pointer_to_vbase): Declare.
11887 * init.c (expand_direct_vtbls_init): Remove.
11888 (dfs_initialize_vtbl_ptrs): New function.
11889 (initialize_vtbl_ptrs): Likewise.
11890 (emit_base_init): Use initialize_vtbl_ptrs.
11891 * search.c (convert_pointer_to_vbase): Make it global.
11892 (expand_indirect_vtbls_init): Remove vtable initialization code.
11893 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
11894
11895 * class.c (dfs_finish_vtbls): New function.
11896 (finish_vtbls): Use it.
11897 (dump_class_hierarchy): New function.
11898
11899 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
11900 (BINFO_VBASE_PRIMARY_P): New macro.
11901 (BINFO_VIRTUALS): Add to documentation.
11902 (SET_BINFO_PRIMARY_MARKED_P): Remove.
11903 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11904 (dfs_mark_primary_bases_queue_p): Likewise.
11905 (dfs_unmarked_real_bases_queue_p): New function.
11906 (dfs_marked_real_bases_queue_p): Likewise.
11907 * search.c (dfs_mark_primary_bases): Adjust.
11908 (mark_primary_bases): Likewise.
11909 (get_shared_vbase_if_not_primary): New function.
11910 (dfs_unmarked_real_bases_queue_p): Likewise.
11911 (dfs_marked_real_bases_queue_p): Likewise.
11912 (dfs_get_pure_virtuals): Simplify.
11913 (get_pure_virtuals): Likewise.
11914
11915 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11916
11917 * lex.c: Include tm_p.h.
11918
11919 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
11920
11921 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
11922
11923 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
11924
11925 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
11926 * pt.c (instantiate_decl): Defer comdat templates that might not be
11927 needed.
11928
11929 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
11930 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
11931 (finish_file): Likewise.
11932
11933 * decl2.c (import_export_class): Undo 12/14 change.
11934
11935 * error.c (dump_decl): operator new, not operatornew.
11936
11937 * class.c (field_decl_cmp): A nontype is "greater" than a type.
11938 * search.c (lookup_field_1): Look for the last field with the
11939 desired name.
11940
11941 2000-01-05 Nathan Sidwell <nathan@acm.org>
11942
11943 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
11944 FUNCTION_DECL.
11945
11946 2000-01-05 Nathan Sidwell <nathan@acm.org>
11947
11948 * typeck.c (build_static_cast): Don't strip target qualifiers
11949 when casting from a class.
11950
11951 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11952
11953 * class.c (warn_hidden): Initialize variable `fndecl'.
11954
11955 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
11956
11957 * decl.c (flag_isoc9x): New variable to be able to use code in
11958 c-common.c. For now always zero.
11959
11960 2000-01-03 Mark Mitchell <mark@codesourcery.com>
11961
11962 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
11963 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
11964 or unshare_base_binfos for virtual bases here.
11965 * search.c (dfs_get_vbase_types): Do it here.
11966 (get_vbase_types): Adjust.
11967
11968 2000-01-02 Mark Mitchell <mark@codesourcery.com>
11969
11970 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
11971 (BINFO_PRIMARY_MARKED_P): Use flag 5.
11972 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
11973 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11974 (unmark_primary_bases): Remove declaration.
11975 (unmarkedp): Declare.
11976 (dfs_vbase_unmark): Likewise.
11977 * class.c (determine_primary_base): Return immediately if there
11978 are no base classes. Call mark_primary_bases here.
11979 (modify_all_direct_vtables): Remove.
11980 (modify_all_indirect_vtables): Remove.
11981 (dfs_modify_vtables_queue_p): New function.
11982 (dfs_modify_vtables): New function.
11983 (modify_all_vtables): Use them.
11984 (build_base_fields): Build FIELD_DECLs for primary virtual base
11985 classes.
11986 (create_vtable_ptr): Don't call determine_primary_base here.
11987 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
11988 (dfs_set_offset_for_vbases): ... this.
11989 (layout_virtual_bases): Use it.
11990 (layout_class_type): Call determine_primary_base here.
11991 * search.c (unmarkedp): Make it global.
11992 (shared_marked_p): Simplify.
11993 (shared_unmarked_p): Likewise.
11994 (dfs_primary_bases_queue_p): Remove.
11995 (dfs_unmark_primary_bases): Likewise.
11996 (unmark_primary_bases): Likewise.
11997 (mark_primary_bases): Simplify.
11998 (get_pure_virtuals): Don't call mark_primary_bases here.
11999 (dfs_vbase_unmark): New function.
12000 (get_vbase_types): Simplify.
12001
12002 * class.c (struct base_info): Remove.
12003 (determine_primary_base): Take has_virtual_p rather than a
12004 base_info as input. Don't calculate max_has_virtual.
12005 (finish_struct_bits): Remove max_has_virtual argument.
12006 (create_vtable_ptr): Remove max_has_virtual_p argument.
12007 (layout_virtual_bases): Remove max argument.
12008 (layout_basetypes): Likewise.
12009 (layout_class_type): Remove max_has_virtual_p argument.
12010 (finish_struct_1): Remove max_has_virtual.
12011
12012 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12013 (layout_basetypes): Remove.
12014 * class.c (propagate_binfo_offsets): Moved here from tree.c.
12015 Update to handle primary virtual bases.
12016 (remove_base_fields): New function, split out from
12017 layout_basetypes.
12018 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12019 (layout_virtual_bases): New function, split out from
12020 layout_basetypes. Update to handle primary virtual bases.
12021 (layout_basetypes): Moved here from tree.c. Use
12022 remove_base_fields and layout_virtual_bases.
12023 * search.c (dfs_mark_primary_bases_queue_p): New function.
12024 (mark_primary_bases): Use it.
12025 * tree.c (CEIL): Remove.
12026 (propagate_binfo_offsets): Remove.
12027 (layout_basetypes): Remove.
12028
12029 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12030
12031 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12032 (BINFO_PRIMARY_MARKED_P): New macro.
12033 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12034 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12035 (mark_primary_bases): New function.
12036 (unmark_primary_bases): Likewise.
12037 * search.c (get_abstract_virtuals_1): Remove.
12038 (dfs_mark_primary_bases): New function.
12039 (mark_primary_bases): Likewise.
12040 (dfs_unmark_primary_bases): Likewise.
12041 (unmark_primary_bases): Likewise.
12042 (dfs_get_pure_virtuals): Likewise.
12043
12044 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12045
12046 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12047 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12048 (modify_one_vtable): Adjust.
12049 (fixup_vtable_deltas1): Likewise.
12050 (override_one_vtable): Likewise.
12051 * search.c (get_abstract_virtuals_1): Likewise.
12052 (get_pure_virtuals): Likewise.
12053 (expand_upcast_fixups): Likewise.
12054 * tree.c (debug_binfo): Likewise.
12055
12056 * class.c (build_vtable): Don't return a value. Don't rebuild
12057 vtables for bases that have already been handled.
12058 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12059 already been handled.
12060 (modify_one_vtable): Adjust accordingly.
12061 (fixup_vtable_deltas1): Likewise.
12062 (finish_struct_1): Likewise.
12063
12064 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12065
12066 * call.c (build_new_method_call): Also check destructors.