]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
c5b30b7dd94bba7f6e8ea04d6c684126f4f3758c
[gcc.git] / gcc / cp / ChangeLog
1 2002-03-18 Jason Merrill <jason@redhat.com>
2
3 PR c++/3870
4 * cp-tree.h (struct saved_scope): Add last_parms field.
5 * decl.c (maybe_push_to_top_level): Save last_function_parms.
6 (pop_from_top_level): Restore it.
7
8 PR c++/4377
9 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10 NON_LVALUE_EXPRs.
11
12 PR c++/4003
13 * pt.c (tsubst_friend_function): Use decl_namespace_context.
14
15 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
16 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
17 type with a nontrivial destructor.
18
19 2002-03-17 Jason Merrill <jason@redhat.com>
20
21 PR c++/4460
22 * class.c (build_base_path): Virtual base layout is fixed in
23 in-charge [cd]tors.
24
25 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
26
27 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
28 * parse.y (yyparse): Remove macro.
29
30 2002-03-17 Jason Merrill <jason@redhat.com>
31
32 PR c++/5757
33 * init.c (build_new_1): Pass the right pointer to op delete.
34
35 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
36
37 PR c++/4361
38 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
39 conversion operators go.
40 (struct lang_decl_flags): Add template_conv_p and unused
41 bitfields.
42 (DECL_TEMPLATE_CONV_FN_P): New macro.
43 * call.c (build_user_type_conversion_1): Don't check second type
44 conversion of overload set first.
45 * class.c (add_method): Make sure templated conversion operators
46 all end up on slot 2.
47 * lex.c (do_identifier): A conversion operator token might be
48 satisfied by a templated conversion operator.
49 * mangle.c (struct globals) Add internal_mangling_p member.
50 (write_template_param): Do internal mangling, if needed.
51 (mangle_conv_op_name_for_type): Request internal mangling.
52 * pt.c (check_explicit_specialization): Use
53 CLASSTYPE_FIRST_CONVERSION_SLOT.
54 (template_parm_this_level_p): New function.
55 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
56 * search.c (lookup_fn_fields_1): Template conversions will be on
57 the first slot.
58 * typeck.c (build_component_ref): Preserve the type of an
59 conversion operator name on the overload type.
60 (build_x_function_call): Retrieve the conversion operator name.
61
62 2002-03-15 Richard Henderson <rth@redhat.com>
63
64 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
65
66 2002-03-15 Mark Mitchell <mark@codesourcery.com>
67
68 * cp-tree.h (CLEANUP_DECL): Remove.
69 (CLEANUP_EXPR): Likewise.
70 * decl.c (destroy_local_var): Simplify.
71 (maybe_build_cleanup): Tidy.
72 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
73 * semantics.c (cp_expand_stmt): Likewise.
74 * cp/tree.c (cp_statement_code_p): Likewise.
75
76 2002-03-15 Jason Merrill <jason@redhat.com>
77
78 PR c++/5857
79 * decl.c (duplicate_decls): Use merge_types instead of common_type.
80 * typeck.c (common_type): Just hand off to
81 type_after_usual_arithmetic_conversions and
82 composite_pointer_type.
83 (merge_types): New fn.
84 (commonparms): Use it instead of common_type.
85 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
86 (composite_pointer_type): Also handle attributes.
87 * cp-tree.h: Declare merge_types.
88
89 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
90 variables.
91 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
92
93 2002-03-14 Richard Henderson <rth@redhat.com>
94
95 * decl.c: Include c-pragma.h.
96 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
97 * Make-lang.in: Update dependencies.
98
99 2002-03-14 Jakub Jelinek <jakub@redhat.com>
100
101 PR c++/5908
102 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
103 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
104
105 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
106
107 * mangle.c (write_builtin_type): Handle 128-bit integers even if
108 they are not a standard integer type.
109
110 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
111
112 * cp-tree.h (init_init_processing): Remove declaration.
113 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
114 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
115
116 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
117
118 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
119 Define.
120 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
121 tree_code_length.
122 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
123 cplus_tree_code_name): Delete.
124 (cxx_init): Don't call add_c_tree_codes, instead set
125 lang_unsafe_for_reeval. Don't try to copy into the various
126 tree_code arrays.
127
128 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
129
130 PR c++/5659
131 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
132 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
133 definitions.
134
135 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
136
137 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
138 DR209 is now not a defect.
139 * cp-tree.h (skip_type_access_control): Remove.
140 * decl.c (grokdeclarator): Do type access control for friend
141 declarations.
142 * semantics.c (decl_type_access_control): Don't reset
143 current_type_lookups.
144 (save_type_access_control): Always save the lookups.
145 (skip_type_access_control): Remove.
146 (finish_class_definition): Don't change type_lookups.
147
148 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
149
150 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
151 It is incorrect.
152 * typeck.c (build_static_cast): Compare non-qualified types
153 with pointer to member conversions.
154
155 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
156 Daniel Berlin <dan@dberlin.org>
157
158 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
159 (cxx_get_alias_set): Use it.
160
161 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
162
163 * cp-tree.h (stabilize_expr): Prototype.
164
165 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
166
167 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
168 conditional return void.
169
170 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
171
172 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
173 * cp-tree.h (cxx_unsave): New.
174 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
175 (init_tree): Update.
176
177 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
178
179 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
180 explicit sizeof/sizeof.
181 * decl2.c (cxx_decode_option): Likewise.
182 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
183
184 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
185
186 PR c++/775
187 * decl.c (lookup_tag): Only reject enum/class mismatch, not
188 class/union mismatch.
189 * parse.y (check_class_key): New function.
190 (structsp): Call it.
191
192 2002-03-01 Michael Matz <matz@suse.de>
193
194 * typeck.c (cp_pointer_int_sum): Complete inner type which is
195 used later by size_in_bytes().
196
197 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
198
199 * cp-tree.h: Require __GNUC__ to be #defined.
200 (build_init): Add missing prototype.
201
202 2002-03-01 Jason Merrill <jason@redhat.com>
203
204 * except.c: Don't include decl.h or obstack.h. Do include
205 tree-inline.h.
206 (build_throw): Destroy temporaries from the thrown
207 expression before calling __cxa_throw. Construct a thrown
208 temporary directly into the exception object.
209 (stabilize_throw_expr): New function.
210 (wrap_cleanups_r): New function.
211 * tree.c (stabilize_expr): New function.
212 * init.c (build_init): New function.
213 * Make-lang.in (cp/except.o): Adjust .h deps.
214
215 2002-02-28 Jason Merrill <jason@redhat.com>
216
217 * search.c (lookup_base_r): Don't clear is_non_public just because
218 we found a friendly scope.
219
220 * decl.c (finish_function): Only warn about missing return
221 statement with -Wreturn-type.
222
223 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
224
225 * class.c (build_clone): Update.
226 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
227 * cp-tree.h (cxx_dup_lang_specific_decl): New.
228 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
229 (copy_decl): Update.
230 * method.c (make_thunk): Update.
231
232 2002-02-27 Zack Weinberg <zack@codesourcery.com>
233
234 * decl2.c: Delete traditional-mode-related code copied from
235 the C front end but not used, or used only to permit the
236 compiler to link.
237
238 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
239
240 PR c++/4093
241 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
242 to void.
243
244 2002-02-22 Jakub Jelinek <jakub@redhat.com>
245
246 PR other/5746
247 * semantics.c (finish_switch_cond): Don't call get_unwidened
248 if error_mark_node.
249
250 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
251
252 PR c++/2645, DR 295
253 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
254 tf_keep_type_decl.
255 (make_typename_type): Use tsubst_flags_t.
256 * decl.c (make_typename_type): Adjust. Return non-artificial
257 TYPE_DECLs, if required.
258 (grokdeclarator): Simplify CVR qualification handling. Allow bad
259 qualifiers on typedef types.
260 * decl2.c (handle_class_head): Adjust make_typename_type call.
261 * parse.y (nested_name_specifier): Likewise.
262 (typename_sub0): Likewise.
263 (typename_sub1): Likewise.
264 * pt.c (convert_template_argument): Adjust make_typename_type
265 return value.
266 (tsubst): Adjust cp_build_qualified_type_real calls.
267 (check_cv_quals_for_unify): Cope with alowing bad qualifications
268 on template type parms.
269 (instantiate_decl): Recheck substitutions to give warnings on bad
270 qualifications.
271 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
272
273 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
274
275 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
276
277 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
278 unless DECL_ALWAYS_INLINE.
279
280 2002-02-20 Jakub Jelinek <jakub@redhat.com>
281
282 * typeck.c (cp_pointer_int_sum): Renamed from
283 pointer_int_sum, call pointer_int_sum.
284
285 2002-02-20 Jakub Jelinek <jakub@redhat.com>
286
287 * decl.c (duplicate_decls): Return 0 if issued error about
288 redeclaration.
289
290 2002-02-19 Jason Merrill <jason@redhat.com>
291
292 ABI change: Mangle `void (A::*)() const' as
293 M1AKFvvE, not MK1AFvvE.
294 * mangle.c (write_function_type): Write cv-quals for member
295 function type here.
296 (write_pointer_to_member_type): Not here.
297
298 2002-02-18 Jason Merrill <jason@redhat.com>
299
300 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
301 (do_decl_instantiation): Likewise.
302
303 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
304
305 PR c++/5685
306 * decl.c (duplicate_decls): Make warning unconditional
307 if duplicate default argument declarations are present.
308
309 2002-02-17 Jakub Jelinek <jakub@redhat.com>
310
311 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
312 shortening.
313
314 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
315
316 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
317 remove incorrect comment. Move #if 0'd code to common path. Use
318 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
319
320 2002-02-13 Jason Merrill <jason@redhat.com>
321
322 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
323 (finish_function): Don't warn if current_function_returns_null.
324
325 * typeck2.c (digest_init): Do handle values of vector type.
326
327 * typeck2.c (digest_init, process_init_constructor): Treat vectors
328 like arrays.
329
330 2002-02-11 Jason Merrill <jason@redhat.com>
331
332 * parse.y (reserved_declspecs): Don't handle attributes.
333 (reserved_typespecquals): Handle them here.
334 * Make-lang.in (parse.c): Adjust expected conflicts.
335
336 2002-02-08 Jakub Jelinek <jakub@redhat.com>
337
338 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
339 instead of compstmt.
340 (compstmt_or_stmtexpr): Renamed from compstmt.
341 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
342
343 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
344
345 Rename instantiate_type_flags to tsubst_flags_t & expand use.
346 * cp-tree.h (instantiate_type_flags): Rename to ...
347 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
348 add tf_warning flag.
349 (instantiate_type): Adjust prototype.
350 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
351 do_type_instantiation, cp_build_qualified_type_real): Likewise.
352 cp_build_qualified_type: Adjust.
353 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
354 tf_*.
355 * call.c (standard_conversion): Rename itf_* to tf_*.
356 (reference_binding): Likewise.
357 (convert_like_real): Likewise.
358 * cvt.c (cp_convert_to_pointer): Likewise.
359 (convert_to_reference): Likewise.
360 * decl.c (lookup_namespace_name): Use tf_* flags.
361 (make_typename_type): Likewise.
362 (grokdeclarator): Likewise.
363 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
364 (coerce_template_template_parms, convert_template_argument,
365 coerce_template_parms, maybe_get_template_decl_from_type_decl,
366 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
367 instantiate_class_template, tsubst_template_arg_vector,
368 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
369 tsubst_decl, tsubst_arg_types, tsubst_function_type,
370 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
371 instantiate_template, fn_type_unification,
372 resolve_overloaded_unification, verify_class_unification,
373 unify, get_bindings_real, do_type_instantiation,
374 regenerate_decl_from_template, instantiate_decl,
375 tsubst_initializer_list, tsubst_enum,
376 get_mostly_instantiated_function_type,
377 invalid_nontype_parm_type_p): Likewise.
378 * tree.c (cp_build_qualified_type_real): Likewise.
379 * typeck.c (build_binary_op): Rename itf_* to tf_*.
380 (build_ptrmemfunc): Likewise.
381 (convert_for_assignment): Likewise.
382
383 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
384
385 PR c++/109
386 * decl.c (grokdeclarator): Allow friend declarations from
387 dependent types.
388 * decl2.c (handle_class_head): Don't push into template parm contexts.
389 * pt.c (push_template_decl_real): Template parm contexts are never
390 being defined.
391
392 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
393
394 * class.c: Include target.h.
395 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
396 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
397 bit-field layout.
398 * Make-lang.in: Adjust deps.
399
400 2002-02-05 Jason Merrill <jason@redhat.com>
401
402 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
403
404 2002-02-04 Jakub Jelinek <jakub@redhat.com>
405
406 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
407 (finish_switch_cond): Set SWITCH_TYPE.
408
409 2002-02-04 Richard Henderson <rth@redhat.com>
410
411 * method.c (use_thunk): Always initialize the block tree. Reindent.
412 * semantics.c (expand_body): Emit thunks after function, not before.
413
414 2002-02-04 Jason Merrill <jason@redhat.com>
415
416 * decl.c (start_function): Call cplus_decl_attributes immediately
417 after grokdeclarator.
418
419 * decl.c (start_function): Combine DECL_RESULT handling code.
420
421 2002-02-03 Jason Merrill <jason@redhat.com>
422
423 * xref.c: Remove.
424 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
425 (cp/xref.o): Remove dependencies.
426 * class.c (finish_struct_1, check_methods): Don't call xref fns.
427 (finish_struct_1): Likewise.
428 * friend.c (make_friend_class): Likewise.
429 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
430 * spew.c (read_process_identifier): Likewise.
431
432 2002-02-01 Jason Merrill <jason@redhat.com>
433
434 PR c++/4872
435 * decl.c (finish_function): Warn about a non-void function with
436 no return statement and no abnormal exit.
437 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
438 (current_function_returns_abnormally): New macro.
439 * call.c (build_call): Set it.
440
441 * typeck.c (build_component_ref): Always complain about offsetof
442 constructs on non-PODs. Only make it an error for members of
443 virtual bases.
444
445 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
446 (dump_function_decl): Always dump parms.
447
448 * decl2.c (finish_static_data_member_decl): Complain about a local
449 class with a static data member.
450
451 PR c++/4286
452 * search.c (lookup_field_1): Don't xref a static data member
453 just because we looked it up.
454
455 2002-01-31 Jason Merrill <jason@redhat.com>
456
457 * Make-lang.in (parse.c): Handle .output file.
458
459 PR c++/3395
460 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
461 not TREE_TYPE.
462 * semantics.c (finish_class_definition): Adjust.
463
464 Allow attributes in parms and casts.
465 * parse.y (named_parm): Don't strip attrs.
466 (declmods): Remove 'attributes' production.
467 (nonempty_cv_qualifiers): Accept attributes.
468 (ATTRIBUTE): Give precedence.
469 * decl.c (groktypename): Handle attributes.
470 (grokparms): Likewise.
471
472 2002-01-29 Jakub Jelinek <jakub@redhat.com>
473
474 * decl2.c (cxx_decode_option): Pass 0 as last argument to
475 cpp_handle_option.
476 * lang-specs.h: Use cpp_unique_options instead of cpp_options
477 when used together with cc1_options.
478
479 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
480
481 PR c++/5132
482 * typeck2.c (digest_init): Make sure non-array core type is
483 instantiated.
484 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
485 constructor, rather than build a new one.
486 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
487 PURPOSE of constructor elts.
488
489 2002-01-23 Zack Weinberg <zack@codesourcery.com>
490
491 * Make-lang.in (parse.c): Adjust expected number of
492 shift-reduce conflicts.
493 (decl.o): Depend on diagnostic.h.
494 * decl.c: Include diagnostic.h.
495 (grokdeclarator): Check for null pointer.
496 (finish_function): Don't abort when
497 current_binding_level->parm_flag != 1, if errors have
498 occurred; throw away the statement tree and extra binding
499 levels, and continue.
500 * lex.c (note_list_got_semicolon): Check for null pointer.
501 * method.c (hack_identifier): Just return error_mark_node if
502 value is error_mark_node.
503 * parse.y (primary: TYPEID(type_id)): No need to use
504 TYPE_MAIN_VARIANT here.
505 (handler_seq): Accept an empty list of catch clauses and
506 generate a fake handler block to avoid later crashes.
507 (ansi_raise_identifier): Accept the error token too.
508 * semantics.c (begin_class_definition,
509 finish_class_definition): Check for error_mark_node.
510
511 2002-01-23 Zack Weinberg <zack@codesourcery.com>
512
513 * typeck2.c (friendly_abort): Delete definition.
514 * cp-tree.h (friendly_abort): Don't prototype.
515 (my_friendly_assert): Use fancy_abort.
516
517 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
518
519 * cp-tree.h (my_friendly_abort): Remove.
520
521 2002-01-23 Jakub Jelinek <jakub@redhat.com>
522
523 * spew.c (pending_inlines, pending_inlines_tail,
524 processing_these_inlines): Make static.
525 (mark_pending_inlines): Remove static.
526 (begin_parsing_inclass_inline): If in function, save pi
527 for GC to cp_function_chain->unparsed_inlines instead.
528 (process_next_inline): Likewise.
529 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
530 (mark_pending_inlines): Add prototype.
531 * decl.c (spew_debug): Remove unused extern.
532 (mark_lang_function): Call mark_pending_inlines.
533
534 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
535
536 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
537 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
538 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
539 Change my_fancy_abort() to abort().
540
541 2002-01-23 Jason Merrill <jason@redhat.com>
542
543 PR c++/5453
544 * class.c (fixed_type_or_null): Fix thinko.
545
546 PR c++/3331
547 * init.c (resolve_offset_ref): Use build_indirect_ref.
548
549 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
550
551 2002-01-22 Jason Merrill <jason@redhat.com>
552
553 * parse.y (function_body): Suppress the block for the outermost
554 curly braces.
555 * decl.c (pushdecl): Don't try to skip it.
556 (begin_function_body): Keep the block we create, not the next one.
557 * init.c (emit_base_init): Don't mess with keep_next_level.
558
559 * class.c (build_base_path): Tweak formatting.
560
561 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
562
563 Fix regression introduced with patch for c++/775
564 * parse.y (class_head_defn): Check for template specializations
565 with a different class-key.
566
567 2002-01-17 Jason Merrill <jason@redhat.com>
568
569 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
570 (begin_function_body): Call them and keep_next_level.
571 * init.c (emit_base_init): Call keep_next_level.
572 * semantics.c (setup_vtbl_ptr): Lose.
573 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
574 (vtbls_set_up_p): Lose.
575 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
576 * method.c (do_build_copy_constructor): Likewise.
577 (synthesize_method): Call finish_mem_initializers.
578 * parse.y (nodecls): Likewise.
579
580 * error.c (dump_type_suffix): Print the exception specs before
581 recursing.
582 (dump_function_decl): Here, too.
583
584 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
585
586 2002-01-10 Ira Ruben <ira@apple.com>
587
588 PR c++/907
589 * decl.c (start_method): Handle attrlist.
590
591 2002-01-10 Jakub Jelinek <jakub@redhat.com>
592
593 * decl2.c (max_tinst_depth): Increase default limit to 500.
594
595 2002-01-10 Graham Stott <grahams@redhat.com>
596
597 * spew.c (YYCHAR): Uppercase macro parameter and add
598 parenthesis.
599 (YYCODE): Likewise.
600 (NAME): Uppercase macro parameter.
601
602 2002-01-09 Graham Stott <grahams@redhat.com>
603
604 * decl.h (grokdeclarator): Wrap long line.
605
606 * semantics.c (FINISH_COND): Uppercase macro paramaters and
607 add parenthesis.
608
609 2002-01-08 Graham Stott <grahams@redhat.com>
610
611 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
612 (PALLOC): Uppercase macro parameter and whitespace.
613 (SALLOC): Uppercase macro parameter.
614 (SFREE): Uppercase macros parameter, add parenthese and
615 whitespace.
616 (STREQL): Uppercase macro parameter and whitespace.
617 (STRNEQ): Likewise.
618 (STRLSS): Likewise.
619 (STRLEQ): Likewise.
620 (STRGTR): Likewise.
621 (STRGEQ): Likewise.
622
623 * call.c (convert_like): Add parenthesis and wrap.
624 (convert_like_with_context): Likewise.
625 (ICS_RANK): Whitespace.
626 (NEED_TEMPORARY_P): Remove parenthesis.
627
628 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
629 whitespace.
630 (VTT_MARKED_BINFO_P): Likewise.
631
632 * decl.c (BINDING_LEVEL): Add parenthesis.
633 (DEF_OPERATOR): Likewise.
634
635 * mangle.c (MANGLE_TRACE): Add parenthesis.
636 (MANGLE_TRACE_TREE): Likewise.
637 (write_signed_number): Likewise.
638 (write_unsigned_number): Likewise.
639
640 * pt.c (ccat): Uppercase macro parameter.
641 (cat): Likewise
642
643 * search.c (SET_BINFO_ACCESS): Add parenthesis.
644
645 2002-01-07 Jason Merrill <jason@redhat.com>
646
647 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
648 to pedwarn.
649
650 PR c++/3536
651 * method.c (make_thunk): If !flag_weak, give the thunk the
652 function's linkage.
653 (use_thunk): Here, too.
654
655 2002-01-07 Graham Stott <grahams@redhat.com>
656
657 * error.c: Update copyright date.
658 (print_scope_operator): Add parenthesis.
659 (print_left_paren): Likewise.
660 (print_right_paren): Likewise.
661 (print_left_bracket): Likewise.
662 (print_right_bracket): Likewise.
663 (print_template_argument_list_start): Likewise.
664 (print_template_argument_list_end): Likewise.
665 (print_non_consecutive_character): Likewise.
666 (print_tree_identifier): Likewise.
667 (print_identifier): Likewise.
668 (NEXT_CODE): Uppercase macro parameter.
669 (ident_fndecl): Delete unused.
670 (GLOBAL_THING): Likewise.
671
672 2002-01-06 Graham Stott <grahams@redhat.com>
673
674 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
675 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
676 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
677 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
678 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
679 (C_IS_RESERVED_WORD): Uppercase macro parameter.
680 (C_RID_YYCODE) Likewise.
681 (ptrmem_cst): Use rtx.
682 (LOCAL_BINDING_P): Add whitespace.
683 (INHERITED_VALUE_BINDING_P): Likewise.
684 (BINDING_SCOPE): Wrap long line.
685 (BINDING_HAS_LEVEL_P): Remove parenthesis.
686 (BINDING_VALUE): Wrap long line.
687 (BINDING_TYPE): Whitespace.
688 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
689 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
690 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
691 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
692 (same_type_p): Uppercase macro parameters.
693 (same_type_ignoring_top_level_qualifiers_p): Likewise.
694 (OVL_FUNCTION): Wrap long line.
695 (OVL_CHAIN): Whitespace.
696 (OVL_CURRENT): Add parenthesis and whitespace.
697 (OVL_NEXT): Whitespace.
698 (OVL_USED): Likewise.
699 (IDENTIFIER_TYPE_VALUE): Likewise.
700 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
701 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
702 (LANG_ID_FIELD): Whitespace.
703 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
704 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
705 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
706 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
707 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
708 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
709 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
710 (IDENTIFIER_VIRTUAL_P): Likewise.
711 (IDENTIFIER_OPNAME_P): Likewise.
712 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
713 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
714 (C_SET_EXP_ORIGINAL_CODE): Likewise.
715 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
716 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
717 (IS_AGGR_TYPE): Uppercase macro parameter.
718 (CLASS_TYPE_P): Likewise.
719 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
720 (IS_AGGR_TYPE_2): Whitespace.
721 (TAGGED_TYPE_P): Uppercase macro parameter.
722 (TYPE_BUILT_IN): Whitespace.
723 (TYPE_FOR_JAVA): Likewise.
724 (FUNCTION_ARG_CHAIN): Remove parenthesis.
725 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
726 (FUNCTION_FIRST_USER_PARAM): Likewise.
727 (PROMOTES_TO_AGGR_TYPE): Whitespace.
728 (DERIVED_FROM_P): Add parenthesis and wrap.
729 (UNIQUELY_DERIVED_FROM_P): Likewise.
730 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
731 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
732 (CLASSTYPE_USE_TEMPLATE): Whitespace.
733 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
734 (TYPE_GETS_DELETE): Add parenthesis.
735 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
736 (TYPE_HAS_ASSIGN_REF): Likewise,
737 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
738 (TYPE_HAS_INIT_REF): Likewise.
739 (TYPE_HAS_CONST_INIT_REF): Likewise.
740 (TYPE_BEING_DEFINED): Likewise.
741 (TYPE_LANG_SPECIFIC): Likewise.
742 (CLASSTYPE_RTTI): Likewise.
743 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
744 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
745 (TYPE_OVERLOADS_ARROW): Likewise.
746 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
747 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
748 (CLASSTYPE_METHOD_VEC): Likewise.
749 (CLASSTYPE_MARKED_N): Likewise.
750 (CLASSTYPE_MARKED): Likewise.
751 (CLASSTYPE_MARKED2): Likewise.
752 (CLASSTYPE_MARKED3): Likewise.
753 (CLASSTYPE_MARKED4): Likewise.
754 (CLASSTYPE_MARKED5): Likewise.
755 (CLASSTYPE_MARKED6): Likewise.
756 (SET_CLASSTYPE_MARKED): Whitespace.
757 (CLEAR_CLASSTYPE_MARKED): Likewise.
758 (SET_CLASSTYPE_MARKED2): Likewise.
759 (CLEAR_CLASSTYPE_MARKED2): Likewise.
760 (SET_CLASSTYPE_MARKED3): Likewise.
761 (CLEAR_CLASSTYPE_MARKED3): Likewise.
762 (SET_CLASSTYPE_MARKED4): Likewise.
763 (CLEAR_CLASSTYPE_MARKED4): Likewise.
764 (SET_CLASSTYPE_MARKED5): Likewise.
765 (CLEAR_CLASSTYPE_MARKED5): Likewise.
766 (SET_CLASSTYPE_MARKED6): Likewise.
767 (CLEAR_CLASSTYPE_MARKED6): Likewise.
768 (CLASSTYPE_TAGS): Likewise.
769 (CLASSTYPE_VSIZE): Likewise.
770 (CLASSTYPE_VBASECLASSES): Likewise.
771 (CANONICAL_BINFO): Add parenthesis.
772 (CLASSTYPE_SIZE(NODE): Likewise.
773 (CLASSTYPE_SIZE_UNIT): Likewise.
774 (CLASSTYPE_ALIGN(NODE): Likewise.
775 (CLASSTYPE_USER_ALIGN): Likewise.
776 (TYPE_JAVA_INTERFACE): Likewise.
777 (CLASSTYPE_PURE_VIRTUALS): Likewise.
778 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
779 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
780 (CLASSTYPE_HAS_MUTABLE): Likewise.
781 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
782 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
783 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
784 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
785 (CLASSTYPE_INTERFACE_ONLY): Likewise.
786 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
787 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
788 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
789 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
790 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
791 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
792 (BINFO_UNSHARED_MARKED): Whitespace.
793 (BINFO_MARKED): Whitespace and wrap.
794 (SET_BINFO_MARKED): Likewise.
795 (CLEAR_BINFO_MARKED): Likewise.
796 (BINFO_VTABLE_PATH_MARKED): Likewise.
797 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
798 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
799 (BINFO_SUBVTT_INDEX): Remove parenthesis.
800 (BINFO_VPTR_INDEX): Likewise.
801 (BINFO_PRIMARY_BASE_OF): Likewise,
802 (CLASSTYPE_VFIELDS): Whitespace.
803 (VF_DERIVED_VALUE): Wrap long line.
804 (NAMESPACE_LEVEL): Whitespace.
805 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
806 (DEFARG_POINTER): Whitespace.
807 (DECL_NEEDED_P): Remove parenthesis.
808 (DECL_LANGUAGE): Whitespace.
809 (SET_DECL_LANGUAGE): Add parenthesis.
810 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
811 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
812 (DECL_IN_AGGR_P): Whitespace.
813 (DECL_FRIEND_P): Likewise.
814 (DECL_BEFRIENDING_CLASSES): Likewise.
815 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
816 (DECL_NONCONVERTING_P): Whitespace.
817 (DECL_PURE_VIRTUAL_P): Likewise.
818 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
819 (DECL_PENDING_INLINE_INFO): Whitespace.
820 (DECL_SORTED_FIELDS): Likewise.
821 (DECL_DEFERRED_FN): Likewise.
822 (DECL_TEMPLATE_INFO): Likewise.
823 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
824 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
825 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
826 (TMPL_ARGS_LEVEL): Likewise.
827 (SET_TMPL_ARGS_LEVEL): Likewise.
828 (INNERMOST_TEMPLATE_PARMS): Whitespace.
829 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
830 (INTEGRAL_CODE_P(CODE): Add parenthesis.
831 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
832 (TYPE_HAS_CONSTRUCTOR): Whitespace.
833 (TREE_HAS_CONSTRUCTOR): Likewise.
834 (TYPE_HAS_DESTRUCTOR): Likewise.
835 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
836 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
837 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
838 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
839 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
840 (TYPE_PTRMEMFUNC_P): Likewise.
841 (TYPE_PTRMEMFUNC_FLAG): Likewise.
842 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
843 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
844 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
845 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
846 (DECL_ACCESS): Whitespace.
847 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
848 (DECL_GLOBAL_DTOR_P): Likewise.
849 (GLOBAL_INIT_PRIORITY): Likewise.
850 (DECL_TEMPLATE_PARMS): Likewise.
851 (DECL_TEMPLATE_RESULT): Likewise.
852 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
853 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
854 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
855 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
856 (PRIMARY_TEMPLATE_P): Add parenthesis.
857 (DECL_USE_TEMPLATE): Whitespace.
858 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
859 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
860 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
861 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
862 (CALL_DECLARATOR_PARMS): Remove parenthesis.
863 (CALL_DECLARATOR_QUALS): Likewise.
864 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
865 (TEMP_NAME_P): Wrap.
866 (VFIELD_NAME_P): Likewise.
867 (B_SET): Uppercase macro parameters and add parenthesis.
868 (B_CLR): Likewise.
869 (B_TST): Likewise.
870 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
871 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
872 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
873 (same_or_base_type_p): Likewise.
874 (cp_deprecated): Likewise.
875
876 2002-01-05 Richard Henderson <rth@redhat.com>
877
878 * semantics.c (expand_body): Revert last change.
879
880 2002-01-04 Jason Merrill <jason@redhat.com>
881
882 PR c++/4122
883 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
884 lost primary.
885
886 * class.c (build_vtbl_initializer): Check for a lost primary
887 before calculating the vtable entry to throw away.
888
889 2002-01-02 Jason Merrill <jason@redhat.com>
890
891 * semantics.c (expand_body): Call outlining_inline_function when
892 emitting an inline function out of line.
893
894 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
895
896 PR c++/5116, c++/764 reversion
897 * call.c (build_new_op): Revert the instantiations. They are
898 incorrect.
899
900 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
901
902 PR c++/5089
903 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
904
905 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
906
907 PR c++/3716
908 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
909 (tsubst, case POINTER_TYPE): Handle pmfs here.
910 (tsubst, case OFFSET_TYPE): Check it is not an offset to
911 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
912
913 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
914
915 PR c++/35
916 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
917 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
918 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
919 PARM_DECL.
920 (tsubst_template_parms): Break up loop statements.
921 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
922 parm PARM_DECLs don't get promoted.
923
924 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
925
926 PR c++/5123
927 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
928 (build_x_function_call): Cope with a COMPONENT_REF containing a
929 TEMPLATE_ID_EXPR.
930
931 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
932
933 PR c++/5213
934 * pt.c (convert_template_argument): Be more careful determining
935 when RECORD_TYPE templates are or are not templates.
936
937 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
938
939 PR c++/775
940 * cp-tree.h (handle_class_head): Adjust prototype.
941 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
942 parameters. Use for all class heads.
943 * parse.y (named_class_head_sans_basetype, named_class_head,
944 named_complex_class_head_sans_basetype,
945 named_class_head_sans_basetype_defn,
946 unnamed_class_head): Remove.
947 (class_head, class_head_apparent_template): Recognize class heads
948 (class_head_decl, class_head_defn): New reductions. Process class
949 heads.
950 (structsp): Adjust class definition and class declaration
951 reductions.
952 (maybe_base_class_list): Give diagnostic on empty list.
953
954 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
955
956 PR c++/4379
957 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
958 single non-static member.
959 (unary_complex_lvalue): If it cannot be a pointer to member, don't
960 make it so. Check it is not pointer to reference.
961
962 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
963
964 PR c++/5132
965 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
966 are processing a template decl.
967
968 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
969
970 PR c++/5116, c++/764
971 * call.c (build_new_op): Make sure template class operands are
972 instantiated. Simplify arglist construction.
973
974 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
975
976 * call.c (build_user_type_conversion_1): Use my_friendly_assert
977 rather than if ... abort.
978 * cvt.c (convert_to_reference): Likewise.
979 * semantics.c (setup_vtbl_ptr): Likewise.
980 * pt.c (lookup_template_class): Comment typo.
981
982 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
983
984 PR c++/5125
985 * pt.c (push_template_decl_real): Make sure DECL has
986 DECL_LANG_SPECIFIC.
987
988 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
989
990 PR c++/335
991 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
992 for non-reference fields.
993 * typeck.c (require_complete_type): Use resolve_offset_ref).
994
995 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
996
997 PR c++/196
998 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
999
1000 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
1001
1002 PR c++/160
1003 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1004 up. Don't stabilize_references when initializing a reference.
1005
1006 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1007
1008 * decl2.c (lang_f_options): Const-ify.
1009
1010 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
1011
1012 * config-lang.in (diff_excludes): Remove.
1013
1014 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
1015
1016 PR c++/90
1017 * typeck.c (build_function_call_real): Use original function
1018 expression for errors.
1019
1020 2001-12-18 Jason Merrill <jason@redhat.com>
1021
1022 PR c++/3242
1023 * class.c (add_method): Do compare 'this' quals when trying to match a
1024 used function. Don't defer to another used function.
1025
1026 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
1027
1028 * pt.c (instantiate_clone): Remove, fold into ...
1029 (instantiate_template): ... here. Simplify by removing mutual
1030 recursion.
1031 * typeck2.c (build_m_component_ref): Don't cv qualify the function
1032 pointed to by a pointer to function.
1033 * class.c (delete_duplicate_fields_1): Typo.
1034
1035 2001-12-18 Jason Merrill <jason@redhat.com>
1036
1037 C++ ABI change: destroy value arguments in caller.
1038 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1039 create an extra binding level for the parameters.
1040 * decl.c (store_parm_decls): Don't do parameter cleanups.
1041
1042 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
1043
1044 * call.c (build_new_method_call): Use '%#V'.
1045 * error.c (cv_to_string): Use V parameter to determine padding.
1046
1047 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
1048
1049 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1050 spellings in messages.
1051
1052 2001-12-17 Zack Weinberg <zack@codesourcery.com>
1053
1054 * cp-tree.h: Delete #defines for cp_error, cp_warning,
1055 cp_pedwarn, and cp_compiler_error.
1056 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1057 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1058 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1059 typeck2.c: Change calls to the above macros to use their
1060 language-independent equivalents: error, warning, pedwarn, and
1061 internal_error respectively.
1062
1063 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
1064
1065 * decl2.c (finish_file): Remove back_end_hook.
1066
1067 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
1068
1069 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1070 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1071 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1072
1073 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
1074
1075 * lang-options.h: Use American spelling in messages.
1076
1077 2001-12-13 Jason Merrill <jason@redhat.com>
1078
1079 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1080
1081 Use cleanups to run base and member destructors.
1082 * init.c (push_base_cleanups): New function, split out from...
1083 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
1084 * decl.c (finish_destructor_body): Move vbase destruction code to
1085 push_base_cleanups.
1086 (begin_function_body, finish_function_body): New fns.
1087 (finish_function): Move [cd]tor handling and call_poplevel to
1088 finish_function_body.
1089 (pushdecl): Skip the new level.
1090 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1091 (setup_vtbl_ptr): Call push_base_cleanups.
1092 * method.c (synthesize_method): Call {begin,end}_function_body.
1093 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1094 * cp-tree.h: Declare new fns.
1095 * parse.y (function_body, .begin_function_body): New nonterminals.
1096 (fndef, pending_inline, function_try_block): Use function_body.
1097 (ctor_initializer_opt, function_try_block): No longer has a value.
1098 (base_init): Remove .set_base_init token.
1099 (.set_base_init, compstmt_or_error): Remove.
1100 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1101
1102 * optimize.c (maybe_clone_body): Fix parameter updating.
1103
1104 2001-12-12 Jason Merrill <jason@redhat.com>
1105
1106 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1107 * semantics.c (genrtl_start_function): Don't pass
1108 parms_have_cleanups or push an extra binding level.
1109 (genrtl_finish_function): Lose cleanup_label cruft.
1110
1111 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1112 (ctor_label): Remove.
1113 * semantics.c (finish_return_stmt): Lose ctor_label support.
1114 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1115 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1116 dtor_label.
1117
1118 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1119 check for [cd]tors.
1120 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1121
1122 * decl.c (finish_function): Check VMS_TARGET, not VMS.
1123
1124 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1125 (end_cleanup_fn): And poplevel.
1126
1127 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1128 if we're in a template.
1129
1130 2001-12-12 Jakub Jelinek <jakub@redhat.com>
1131
1132 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1133 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1134 THIS_NAME_P): Delete.
1135 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1136 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1137 with internal naming scheme.
1138 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1139
1140 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
1141
1142 * decl.c (grokdeclarator): Deprecated implicit typename use.
1143
1144 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
1145
1146 PR g++/51
1147 * parse.y (frob_specs): Indicate it is a language linkage which
1148 contained the extern.
1149 * decl.c (grokdeclarator): Allow extern language linkage with
1150 other specifiers.
1151
1152 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
1153
1154 PR g++/72
1155 * decl.c (add_binding): Don't reject duplicate typedefs involving
1156 template parameters.
1157
1158 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
1159
1160 * parse.y, semantics.c: Similarly.
1161
1162 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
1163
1164 PR g++/87
1165 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1166 (copy_args_p): Rename to ...
1167 (copy_fn_p): ... here.
1168 (grok_special_member_properties): New function.
1169 (grok_op_properties): Lose VIRTUALP parameter.
1170 (copy_assignment_arg_p): Remove.
1171 * call.c (build_over_call): Use copy_fn_p.
1172 * decl.c (grokfndecl): Reformat. Adjust call to
1173 grok_op_properties.
1174 (copy_args_p): Rename to ...
1175 (copy_fn_p): ... here. Reject template functions. Check for pass
1176 by value.
1177 (grok_special_member_properties): Remember special functions.
1178 (grok_ctor_properties): Don't remember them here, just check.
1179 (grok_op_properties): Likewise.
1180 (start_method): Call grok_special_member_properties.
1181 * decl2.c (grokfield): Likewise.
1182 (copy_assignment_arg_p): Remove.
1183 (grok_function_init): Don't remember abstract assignment here.
1184 * pt.c (instantiate_class_template): Call
1185 grok_special_member_properties.
1186 (tsubst_decl): Adjust grok_op_properties call.
1187
1188 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
1189
1190 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1191 RID_TYPES_COMPATIBLE_P.
1192
1193 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
1194
1195 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1196 call to build_aggr_init.
1197 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1198
1199 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
1200
1201 * parse.y: Replace uses of the string non-terminal with STRING.
1202 Don't perform string concatentaion here.
1203 (string): Remove non-terminal.
1204 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1205
1206 2001-12-05 Jason Merrill <jason@redhat.com>
1207
1208 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1209 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1210 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1211 * pt.c (push_tinst_level): No longer static.
1212 * cp-tree.h: Declare them.
1213
1214 * init.c (resolve_offset_ref): Don't check access for the base
1215 conversion to access a FIELD_DECL.
1216
1217 * cp-tree.h (TYPE_REFFN_P): New macro.
1218 * decl.c (bad_specifiers): Check it, too.
1219
1220 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1221 on the __*_type_info type if we haven't seen a definition.
1222
1223 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
1224
1225 * decl.c: Include c-common.h.
1226 (shadow_warning): Move to c-common.c.
1227
1228 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1229
1230 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1231
1232 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1233
1234 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1235
1236 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1237
1238 PR g++/164
1239 * init.c (sort_base_init): Allow binfos to be directly specified.
1240 * method.c (do_build_copy_constructor): Explicitly convert to the
1241 base instance.
1242 (do_build_assign_ref): Likewise.
1243
1244 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
1245
1246 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1247 declaration and initialization.
1248
1249 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
1250
1251 * typeck2.c: Remove leading capital from diagnostic messages, as
1252 per GNU coding standards.
1253
1254 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
1255
1256 PR c++/3394
1257 * decl.c (xref_basetypes): Handle attributes between
1258 'class' and name.
1259
1260 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
1261
1262 PR g++/3381
1263 * parse.y (named_complex_class_head_sans_basetype): Add new
1264 reduction.
1265 * Make-lang.in (parse.c): Adjust expected conflict count.
1266
1267 2001-12-03 Jason Merrill <jason@redhat.com>
1268
1269 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1270 immediate binfos for our virtual bases.
1271
1272 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
1273
1274 * call.c (build_java_interface_fn_ref): Similarly.
1275 * except.c (is_admissible_throw_operand): Similarly.
1276 * init.c (build_java_class_ref): Similarly.
1277 * xref.c (open_xref_file): Similarly.
1278
1279 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
1280
1281 * class.c (finish_struct): Remove trailing periods from messages.
1282 * decl.c (check_tag_decl): Similarly.
1283 * lex.c (cxx_set_yydebug): Similarly.
1284 * typeck2.c (friendly_abort): Similarly.
1285
1286 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1287
1288 PR c++/3048
1289 * cp-tree.h (ovl_member): Remove.
1290 * decl2.c (merge_functions): Handle extern "C" functions
1291 specially.
1292 * tree.c (ovl_member): Remove.
1293
1294 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1295
1296 PR c++/4842
1297 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1298 FUNCTION_DECL, as input.
1299 (mark_overriders): Remove.
1300 (warn_hidden): Rework for the new ABI.
1301
1302 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1303
1304 PR c++/3471
1305 * call.c (convert_like_real): Do not build additional temporaries
1306 for rvalues of class type.
1307
1308 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
1309
1310 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1311 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1312 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1313 (DERIVED_FROM_P): Likewise.
1314 (enum base_access): Renumber, add ba_quiet bit mask.
1315 (get_binfo): Remove.
1316 (get_base_distance): Remove.
1317 (binfo_value): Remove.
1318 (ACCESSIBLY_DERIVED_FROM_P): Remove.
1319 * call.c (standard_conversion): Use lookup_base.
1320 * class.c (strictly_overrides): Likewise.
1321 (layout_virtual_bases): Likewise.
1322 (warn_about_ambiguous_direct_bases): Likewise.
1323 (is_base_of_enclosing_class): Likewise.
1324 (add_vcall_offset_vtbl_entries_1): Likewise.
1325 * cvt.c (build_up_reference): Adjust comment.
1326 * init.c (build_member_call): Reformat.
1327 * search.c (get_binfo): Remove.
1328 (get_base_distance_recursive): Remove.
1329 (get_base_distance): Remove.
1330 (lookup_base_r): Tweak.
1331 (lookup_base): Add ba_quiet control. Complete the types here.
1332 (covariant_return_p): Use lookup_base.
1333 * tree.c (binfo_value): Remove.
1334 (maybe_dummy_object): Use lookup_base.
1335 * typeck.c (build_static_cast): Use lookup_base.
1336 (get_delta_difference): Likewise.
1337 * typeck2.c (binfo_or_else): Use lookup_base.
1338 (build_scoped_ref): Add back error_mark_check.
1339 (build_m_component_ref): Use lookup_base.
1340
1341 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
1342
1343 * Make-lang.in (c++.generated-manpages): New dummy target.
1344
1345 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1346
1347 * Make-lang.in (cp-lang.o): Depends on c-common.h.
1348 * cp-lang.c (c-common.h): Include.
1349 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1350 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1351 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1352
1353 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
1354
1355 * decl2.c (c_language): Move to c-common.c.
1356 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1357 functions.
1358 (cxx_init): Update.
1359
1360 2001-11-26 Jason Merrill <jason@redhat.com>
1361
1362 * call.c (joust): Remove COND_EXPR hack.
1363
1364 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
1365
1366 * search.c (lookup_base_r): Declare bk in variable declaration
1367 space.
1368
1369 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
1370
1371 PR g++/3145
1372 * class.c (build_vbase_pointer): Remove.
1373 (build_vbase_path): Remove.
1374 (build_base_path): New function.
1375 * cp-tree.h (base_access, base_kind): New enumerations.
1376 (build_base_path): Declare.
1377 (convert_pointer_to_real): Remove.
1378 (convert_pointer_to): Remove.
1379 (lookup_base): Declare.
1380 (convert_pointer_to_vbase): Remove.
1381 * call.c (build_scoped_method_call): Use lookup_base &
1382 build_base_path instead of convert_pointer_to_real,
1383 get_base_distance & get_binfo.
1384 (build_over_call): Likewise.
1385 * cvt.c (cp_convert_to_pointer): Likewise.
1386 (convert_to_pointer_force): Likewise.
1387 (build_up_reference): Likewise.
1388 (convert_pointer_to_real): Remove.
1389 (convert_pointer_to): Remove.
1390 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1391 instead of convert_pointer_to_vbase & build_vbase_path.
1392 (emit_base_init): Use build_base_path instead of
1393 convert_pointer_to_real.
1394 (expand_virtual_init): Lose unrequired conversions.
1395 (resolve_offset_ref): Use lookup_base and build_base_path
1396 instead of convert_pointer_to.
1397 * rtti.c (build_dynamic_cast_1): Use lookup_base &
1398 build_base_path instead of get_base_distance & build_vbase_path.
1399 * search.c (get_vbase_1): Remove.
1400 (get_vbase): Remove.
1401 (convert_pointer_to_vbase): Remove.
1402 (lookup_base_r): New function.
1403 (lookup_base): New function.
1404 * typeck.c (require_complete_type): Use lookup_base &
1405 build_base_path instead of convert_pointer_to.
1406 (build_component_ref): Likewise.
1407 (build_x_function_call): Likewise.
1408 (get_member_function_from_ptrfunc): Likewise.
1409 (build_component_addr): Likewise.
1410 * typeck2.c (build_scoped_ref): Likewise.
1411
1412 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1413
1414 * cp-tree.h (CP_TYPE_QUALS): Removed.
1415 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1416 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1417 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1418 * dump.c (cp_dump_tree): Use void* dump_info argument to match
1419 lang-hooks prototype.
1420 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1421 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1422 CP_TYPE_QUALS changed to cp_type_quals.
1423 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1424 (CXX_C_OBJS): Remove c-dump.o.
1425
1426 2001-11-21 Mark Mitchell <mark@codesourcery.com>
1427
1428 PR c++/3637
1429 * pt.c (lookup_template_class): Ensure that all specializations
1430 are registered on the list corresponding to the most general
1431 template.
1432
1433 2001-11-20 Mark Mitchell <mark@codesourcery.com>
1434
1435 * call.c (non_reference): Add documentation.
1436 (convert_class_to_reference): Do not strip reference types
1437 from conversion operators.
1438 (maybe_handle_ref_bind): Simplify.
1439 (compare_ics): Correct handling of references.
1440
1441 2001-11-19 John Wilkinson <johnw@research.att.com>
1442
1443 * dump.c (dump_op): New function.
1444 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
1445 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1446 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1447
1448 2001-11-19 Mark Mitchell <mark@codesourcery.com>
1449
1450 PR4629
1451 * semantics.c (finish_sizeof): Make sure that expression created
1452 while processing a template do not have a type.
1453 (finish_alignof): Likewise.
1454 * typeck.c (c_sizeof): Likewise.
1455 (expr_sizeof): Likewise.
1456
1457 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
1458
1459 * lex.c (cxx_finish): Call c_common_finish.
1460 (finish_parse): Remove.
1461
1462 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1463
1464 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1465 when displaying error message about missing array bounds.
1466
1467 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1468
1469 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1470 CONST_CAST_EXPR.
1471 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1472
1473 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
1474
1475 * cp-tree.h (print_class_statistics): Restore.
1476
1477 2001-11-15 Jason Merrill <jason@redhat.com>
1478
1479 * method.c (use_thunk): Don't emit debugging information for thunks.
1480
1481 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1482 * decl.c (make_typename_type): Handle getting a class template.
1483 * search.c (lookup_field_r): A class template is good enough for
1484 want_type.
1485
1486 * call.c (convert_like_real): Only use cp_convert for the bad part.
1487 (standard_conversion): Also allow bad int->enum.
1488 * typeck.c (ptr_reasonably_similar): Also allow functions to
1489 interconvert. Pointers to same-size integers are reasonably
1490 similar.
1491
1492 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1493 give it void type.
1494
1495 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
1496
1497 PR g++/3154
1498 * init.c (sort_base_init): Remove unreachable code.
1499 (expand_member_init): Adjust comment to reflect reality. Simplify
1500 and remove unreachable code.
1501
1502 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
1503
1504 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1505 (cxx_init): Update prototype.
1506 * decl.c (init_decl_processing): Rename. Move null node init
1507 to its creation time.
1508 * lex.c (cxx_init_options): Update.
1509 (cxx_init): Combine with old init_parse; also call
1510 cxx_init_decl_processing.
1511
1512 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
1513
1514 * decl.c (check_initializer): Try to complete the type of an
1515 array element before checking whether it's complete. Don't
1516 complain about arrays with complete element types but an
1517 unknown size.
1518 (cp_finish_decl): Build the hierarchical constructor before
1519 calling maybe_deduce_size_from_array_init.
1520
1521 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
1522
1523 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1524
1525 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
1526
1527 PR g++/4206
1528 * parse.y (already_scoped_stmt): Remove.
1529 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1530
1531 2001-11-12 H.J. Lu <hjl@gnu.org>
1532
1533 * cvt.c (ocp_convert): Don't warn the address of a weak
1534 function is always `true'.
1535
1536 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1537
1538 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1539 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1540 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1541 * cp-tree.h (print_class_statistics): Remove.
1542 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1543 cxx_print_identifier, cxx_set_yydebug): New.
1544 * lex.c (set_yydebug): Rename c_set_yydebug.
1545 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1546 lang_print_xnode): Rename.
1547 * tree.c (print_lang_statistics): Rename.
1548
1549 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1550
1551 * class.c (dump_array): Fix format specifier warning.
1552
1553 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1554
1555 * cp-lang.c (LANG_HOOKS_NAME): Override.
1556 (struct lang_hooks): Constify.
1557 * lex.c (cxx_init_options): Update.
1558 (lang_identify): Remove.
1559 * parse.y (language_string): Remove.
1560
1561 2001-11-08 Andreas Franck <afranck@gmx.de>
1562
1563 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
1564 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
1565 suggested by autoconf.
1566 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
1567 (c++.install-common): Use the transformed target alias names.
1568
1569 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1570
1571 * Make-lang.in: Update.
1572 * cp-lang.c: Include langhooks-def.h.
1573
1574 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1575
1576 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
1577
1578 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1579
1580 * lex.c (copy_lang_type): Add static prototype.
1581
1582 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1583
1584 * pt.c (unify): Handle SCOPE_REF.
1585
1586 2001-11-01 Jakub Jelinek <jakub@redhat.com>
1587
1588 * tree.c (cp_copy_res_decl_for_inlining): Adjust
1589 DECL_ABSTRACT_ORIGIN for the return variable.
1590
1591 2001-10-31 Zack Weinberg <zack@codesourcery.com>
1592
1593 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1594
1595 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
1596
1597 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
1598 semantics.c, spew.c: Fix spelling errors.
1599
1600 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1601
1602 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
1603
1604 2001-10-25 Zack Weinberg <zack@codesourcery.com>
1605
1606 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
1607 pop_everything.
1608
1609 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1610
1611 * cp-lang.c (cxx_get_alias_set): New function.
1612 Point LANG_HOOKS_GET_ALIAS_SET to it.
1613
1614 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1615
1616 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
1617 * cp-tree.h (make_unbound_class_template): Prototype new function.
1618 * decl.c (make_unbound_class_template): New function.
1619 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
1620 * error.c (dump_type): Likewise.
1621 * mangle.c (write_type): Likewise.
1622 * parse.y (template_parm): Likewise.
1623 (template_argument): Use make_unbound_class_template.
1624 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
1625 (tsubst): Likewise.
1626 (tsubst_copy): Likewise.
1627 (unify): Likewise.
1628 * tree.c (walk_tree): Likewise.
1629 * typeck.c (comptypes): Likewise.
1630
1631 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1632
1633 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
1634 extra calls into fewer ones.
1635
1636 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
1637
1638 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
1639 Warn when merging inline with attribute noinline.
1640 (start_decl, start_function): Warn if inline and attribute
1641 noinline appear in the same declaration.
1642
1643 2001-10-16 H.J. Lu <hjl@gnu.org>
1644
1645 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
1646 for tree checking disabled.
1647
1648 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
1649
1650 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
1651 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
1652
1653 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1654
1655 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
1656 (unify): Only handle MINUS_EXPR specially if the above flag is set
1657 and the subtracted constant is 1. Clear the flag on recursive calls.
1658 Set it when unifying the maximum value in an INTEGER_TYPE's range.
1659
1660 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1661
1662 * decl.c (bad_specifiers): Don't allow exception specifications
1663 on any typedefs.
1664
1665 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
1666
1667 * cp/lex.c (init_cp_pragma): Similarly.
1668
1669 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1670
1671 * pt.c (lookup_template_class): Build complete template arguments
1672 for BOUND_TEMPLATE_TEMPLATE_PARM.
1673
1674 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1675
1676 * cp-tree.h (TYPE_BINFO): Update comment.
1677 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
1678 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
1679 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
1680 (copy_type): Prototype new function.
1681 * lex.c (copy_lang_decl): Gather tree node statistics.
1682 (copy_lang_type): New function.
1683 (copy_type): Likewise.
1684 (cp_make_lang_type): Create lang_type for
1685 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
1686 and BOUND_TEMPLATE_TEMPLATE_PARM.
1687 * pt.c (tsubst): Use copy_type instead of copy_node.
1688 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
1689
1690 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1691
1692 * pt.c (determine_specialization): Ignore functions without
1693 DECL_TEMPLATE_INFO.
1694
1695 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
1696
1697 PR g++/4476
1698 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
1699
1700 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
1701
1702 * typeck2.c (store_init_value): Don't re-digest a bracketed
1703 initializer.
1704
1705 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
1706 ANON_AGGR_TYPE_P.
1707
1708 2001-10-11 Richard Henderson <rth@redhat.com>
1709
1710 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
1711 of an asm statement.
1712 (build_vtbl_ref_1): Split out from build_vtbl_ref.
1713 (build_vfn_ref): Use it to handle vtable descriptors before
1714 calling build_vtable_entry_ref.
1715 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
1716
1717 2001-10-10 Richard Henderson <rth@redhat.com>
1718
1719 * parse.y (asm_operand): Allow named operands.
1720 * semantics.c (finish_asm_stmt): Tweek for changed location
1721 of the operand constrant.
1722
1723 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
1724
1725 * call.c (standard_conversion): Add bad conversion between
1726 integers and pointers.
1727 (convert_like_real): Don't use convert_for_initialization for bad
1728 conversions; complain here and use cp_convert.
1729 (build_over_call): Don't handle bad conversions specially.
1730 (perform_implicit_conversion): Allow bad conversions.
1731 (can_convert_arg_bad): New fn.
1732 * cp-tree.h: Declare it.
1733 * typeck.c (convert_for_assignment): Use it.
1734 (ptr_reasonably_similar): Any target type is similar to void.
1735
1736 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
1737
1738 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
1739 (cp/cp-lang.o): New rule.
1740 * cp-tree.h: Declare hooks.
1741 * tree.c: Make hooks non-static.
1742 (init_tree): Don't initialize hooks here.
1743 * lex.c: Likewise. Move definition of lang_hooks to...
1744 * cp-lang.c: ... new file.
1745
1746 2001-10-08 Richard Henderson <rth@redhat.com>
1747
1748 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
1749 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
1750
1751 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1752
1753 * class.c (build_vtable_entry_ref): Const-ify.
1754 * decl.c (predefined_identifier,
1755 initialize_predefined_identifiers): Likewise.
1756 * init.c (build_new_1): Likewise.
1757 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
1758 Likewise.
1759
1760 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
1761
1762 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
1763 (INSNS_PER_STMT): Likewise.
1764 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
1765 (copy_body, initialize_inlined_parameters): Likewise.
1766 (declare_return_variable, inlinable_function_p): Likewise.
1767 (expand_call_inline, expand_calls_inline): Likewise.
1768 (optimize_inline_calls, clone_body): Likewise.
1769 * tree.c (walk_tree): Moved to ../tree-inline.c.
1770 (walk_tree_without_duplicates): Likewise.
1771 (copy_tree_r, remap_save_expr): Likewise.
1772
1773 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
1774
1775 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
1776 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
1777 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
1778 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
1779 (flag_inline_trees): Moved declaration to ../tree-inline.h.
1780 (walk_tree): Moved declaration to ../tree-inline.h.
1781 (walk_tree_without_duplicates, copy_tree_r): Likewise.
1782 (remap_save_expr): Likewise.
1783 * decl.c: Include tree-inline.h.
1784 (lang_mark_tree): Don't mark inlined_fns.
1785 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
1786 * optimize.c: Include tree-inline.h.
1787 (optimize_inline_calls): Move declaration to ../tree.h, as
1788 non-static.
1789 (remap_decl): Use language-independent constructs and hooks.
1790 (remap_block, copy_body_r, declare_return_variable): Likewise.
1791 (inlinable_function_p): Likewise. Don't test for
1792 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
1793 no longer language-specific.
1794 (optimize_inline_calls): Likewise. Make it non-static. Moved
1795 call of dump_function to...
1796 (optimize_function): Here...
1797 (clone_body): New function, extracted from...
1798 (maybe_clone_body): ... here. Build decl_map locally and pass
1799 it on to clone_body.
1800 * pt.c, semantics.c: Include tree-inline.h.
1801 * tree.c: Likewise.
1802 (cp_walk_subtrees): New language-specific hook for tree inlining.
1803 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
1804 cp_is_overload_p, cp_auto_var_in_fn_p,
1805 cp_copy_res_decl_for_inlining): Likewise.
1806 (walk_tree): Move language-specific constructs into...
1807 (cp_walk_subtrees): this new function.
1808 (copy_tree_r): Use language-independent constructs and hooks.
1809 (init_tree): Initialize tree inlining hooks.
1810 (remap_save_expr): Adjust prototype so that the declaration
1811 does not require the definition of splay_tree.
1812
1813 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
1814
1815 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
1816 to build the declaration instead of the declaration itself.
1817
1818 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
1819
1820 * decl2.c (cxx_decode_option): Add 'else'.
1821
1822 * spew.c (end_input): No longer static.
1823 * cp-tree.h: Declare it.
1824 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
1825
1826 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1827
1828 * call.c (build_over_call), typeck.c (build_function_call_real):
1829 Pass type attributes to check_function_format rather than name or
1830 assembler name. Don't require there to be a name or assembler
1831 name to check formats.
1832
1833 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1834
1835 * decl.c (init_decl_processing): Don't call
1836 init_function_format_info. Initialize lang_attribute_table
1837 earlier.
1838 (builtin_function): Call decl_attributes.
1839 (insert_default_attributes): New.
1840
1841 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
1842
1843 * decl.c (grokdeclarator): Copy array typedef handling from C
1844 frontend.
1845
1846 * decl.c (grokdeclarator): Copy too-large array handling from C
1847 frontend.
1848
1849 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
1850
1851 * config-lang.in (target_libs): Added target-gperf, so that we
1852 don't try to build it if C++ is disabled.
1853
1854 2001-09-23 Zack Weinberg <zack@codesourcery.com>
1855
1856 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
1857 (cp/errfn.o): Delete rule.
1858 (cp/error.o): Depend on flags.h.
1859 * errfn.c: Delete file.
1860 * cp-tree.h: Declare warn_deprecated. Remove definitions of
1861 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
1862 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
1863 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
1864 internal_error respectively. Make cp_deprecated into a macro.
1865 Don't define cp_printer typedef or declare cp_printers.
1866 * error.c: Include flags.h.
1867 Delete: struct tree_formatting_info, print_function_argument_list,
1868 print_declaration, print_expression, print_function_declaration,
1869 print_function_parameter, print_type_id, print_cv_qualifier_seq,
1870 print_type_specifier_seq, print_simple_type_specifier,
1871 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
1872 print_parameter_declaration_clause, print_exception_specification,
1873 print_nested_name_specifier, and definition of cp_printers.
1874 (locate_error): New function.
1875 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
1876 rewritten in terms of locate_error and diagnostic.c.
1877 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
1878 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
1879 (init_error): Adjust to match.
1880
1881 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1882
1883 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
1884
1885 2001-09-21 Richard Henderson <rth@redhat.com>
1886
1887 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
1888 (build_vtbl_initializer): Likewise.
1889 (build_vfn_ref): New.
1890 * cp-tree.h: Declare it.
1891 * call.c (build_over_call): Use it.
1892 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
1893 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
1894
1895 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
1896
1897 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
1898
1899 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
1900
1901 Table-driven attributes.
1902 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
1903 * decl2.c (cplus_decl_attributes): Only take one attributes
1904 parameter.
1905 * cp-tree.c (cplus_decl_attributes): Update prototype.
1906 * class.c (finish_struct), decl.c (start_decl, start_function),
1907 decl2.c (grokfield), friend.c (do_friend), parse.y
1908 (parse_bitfield): Update calls to cplus_decl_attributes.
1909 * decl.c (grokdeclarator): Take a pointer to a single ordinary
1910 attribute list.
1911 * decl.h (grokdeclarator): Update prototype.
1912 * decl2.c (grokfield): Take a single ordinary attribute list.
1913 * friend.c (do_friend): Likewise.
1914 * decl.c (shadow_tag, groktypename, start_decl,
1915 start_handler_parms, grokdeclarator, grokparms, start_function,
1916 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
1917 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
1918 (process_template_parm, do_decl_instantiation): Pass single
1919 ordinary attribute lists around.
1920 * decl.c (grokdeclarator): Correct handling of nested attributes.
1921 Revert the patch
1922 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1923 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1924 not the left.
1925 .
1926 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
1927 (cp_attribute_table): Declare.
1928 * decl.c (valid_lang_attribute): Don't define.
1929 (lang_attribute_table): Define.
1930 (init_decl_processing): Initialize lang_attribute_table instead of
1931 valid_lang_attribute.
1932 * tree.c (cp_valid_lang_attribute): Remove.
1933 (handle_java_interface_attribute, handle_com_interface_attribute,
1934 handle_init_priority_attribute): New functions.
1935 (cp_attribute_table): New array.
1936 * decl2.c (import_export_class): Don't use
1937 targetm.valid_type_attribute.
1938
1939 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1940
1941 * Make-lang.in (cp/error.o): Depend on real.h
1942 * error.c: #include "real.h"
1943
1944 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1945
1946 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
1947 xmalloc/strcpy/strcat.
1948
1949 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1950
1951 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
1952 Const-ification.
1953 * pt.c (tsubst_decl): Likewise.
1954
1955 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1956
1957 * decl2.c (lang_f_options): Const-ification.
1958 * lex.c (cplus_tree_code_name): Likewise.
1959 * spew.c (yyerror): Likewise.
1960
1961 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1962
1963 PR c++/3986
1964 * class.c (force_canonical_binfo_r): Check & move an indirect
1965 primary base first.
1966 (force_canonical_binfo): Check that it's not already
1967 canonical.
1968 (mark_primary_virtual_base): Remove BINFO parameter.
1969 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
1970
1971 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1972
1973 Remove TYPE_NONCOPIED_PARTS.
1974 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
1975 CLASSTYPE_PURE_VIRTUALS.
1976 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
1977 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
1978 (layout_class_type): Don't call fixup_inline_methods here ...
1979 (finish_struct_1): ... call it here.
1980
1981 2001-09-04 Mark Mitchell <mark@codesourcery.com>
1982
1983 * decl.c (duplicate_decls): Remove code deadling with
1984 DECL_SAVED_INSNS.
1985 * decl2.c (finish_file): Likewise.
1986 * pt.c (instantiate_decl): Likewise.
1987 * semantics.c (expand_body): Don't defer local functions if
1988 they wouldn't be deferred for some other reason. Don't
1989 generate RTL for functions that will not be emitted.
1990 (genrtl_start_function): Remove code deadling with
1991 DECL_SAVED_INSNS.
1992 (genrtl_finish_function): Likewise.
1993
1994 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
1995
1996 PR c++/4203
1997 * call.c (build_over_call): Do not optimize any empty base
1998 construction.
1999
2000 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2001
2002 * error.c (dump_template_decl): Output template parameters
2003 together with their specifiers.
2004 Output `class' prefix for template template parameter.
2005 (dump_decl): Fix formatting.
2006
2007 2001-08-30 Kurt Garloff <garloff@suse.de>
2008
2009 * optimize.c (inlinable_function_p): Allow only smaller single
2010 functions. Halve inline limit after reaching recursive limit.
2011
2012 2001-08-30 Joern Rennecke <amylaar@redhat.com>
2013 Jason Merrill <jason_merrill@redhat.com>
2014
2015 * class.c (build_vtable_entry_ref): Subtract in char*, not
2016 ptrdiff_t.
2017
2018 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
2019
2020 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2021 (build_cplus_array_type): Use cp_build_qualified_type, not
2022 TYPE_MAIN_VARIANT, to get an unqualified version.
2023
2024 * decl2.c (grok_alignof): Lose.
2025 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2026 * typeck.c (c_alignof): Lose.
2027 * semantics.c (finish_sizeof, finish_alignof): New.
2028 * parse.y: Use them.
2029 * cp-tree.h: Declare them.
2030
2031 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
2032
2033 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2034 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2035 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2036
2037 2001-08-19 Jakub Jelinek <jakub@redhat.com>
2038
2039 * typeck2.c (add_exception_specifier): Only require complete type if
2040 not in processing template declaration.
2041
2042 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2043
2044 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2045 GNU_xref_start_scope and GNU_xref_end_scope.
2046
2047 * tree.c (TYPE_HASH): Moved to ../tree.h.
2048
2049 2001-08-16 Mark Mitchell <mark@codesourcery.com>
2050
2051 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2052 on COMPOUND_EXPRs.
2053
2054 2001-08-14 Richard Henderson <rth@redhat.com>
2055
2056 * class.c, cp-tree.h (build_vfn_ref): Remove.
2057 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2058
2059 2001-08-13 Mark Mitchell <mark@codesourcery.com>
2060
2061 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2062 empty class assignment as having side-effects to avoid
2063 spurious warnings.
2064
2065 2001-08-13 Zack Weinberg <zackw@panix.com>
2066
2067 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2068 * except.c: Include libfuncs.h.
2069
2070 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2071
2072 * decl.c (grokdeclarator): Clarify diagnostic message.
2073
2074 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2075
2076 * decl2.c (do_nonmember_using_decl): Replace using directive
2077 with using declaration in the error message.
2078
2079 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2080
2081 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2082 criterion to avoid rebuilding expression tree instead of
2083 processing_template_decl.
2084
2085 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2086
2087 Support named return value optimization for inlines, too.
2088 * decl.c (finish_function): Nullify returns here.
2089 * semantics.c (genrtl_start_function): Not here.
2090 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2091 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
2092 Also nullify the CLEANUP_STMT for the nrv.
2093 * cp-tree.h: Declare it.
2094 * optimize.c (declare_return_variable): Replace the nrv with the
2095 return variable.
2096 * typeck.c (check_return_expr): Be more flexible on alignment check.
2097 Ignore cv-quals when checking for a matching type.
2098
2099 2001-08-09 Richard Henderson <rth@redhat.com>
2100
2101 * decl2.c (finish_objects): Use target hooks instead of
2102 assemble_constructor and assemble_destructor.
2103
2104 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
2105
2106 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2107
2108 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
2109
2110 PR c++/3820
2111 Stop using TYPE_NONCOPIED_PARTS.
2112 * call.c (build_over_call): Be careful when copy constructing
2113 or assigning to an empty class.
2114 * class.c (check_bases_and_members): It has a
2115 COMPLEX_ASSIGN_REF if it has a vptr.
2116 (layout_class_type): Don't add empty class padding to
2117 TYPE_NONCOPIED_PARTS.
2118 (finish_struct_1): Don't add the VFIELD either.
2119 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2120 initialization.
2121
2122 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2123
2124 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2125
2126 2001-08-06 Richard Henderson <rth@redhat.com>
2127
2128 * decl2.c (finish_objects): Pass a symbol_ref and priority to
2129 assemble_{constructor,destructor}. Remove priority handling.
2130
2131 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2132
2133 Don't allow template-id in using-declaration.
2134 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2135 (do_class_using_decl): Likewise.
2136
2137 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2138
2139 * cp/spew.c (read_token): No need to pop buffers.
2140
2141 2001-08-02 Stan Shebs <shebs@apple.com>
2142
2143 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2144 (fnaddr_from_vtable_entry): Remove decl.
2145 * method.c (use_thunk): Update comment.
2146
2147 2001-08-01 Andrew Cagney <ac131313@redhat.com>
2148
2149 * repo.c (get_base_filename): Change return value to const char
2150 pointer.
2151
2152 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
2153
2154 Kill -fhonor-std.
2155 * NEWS: Document.
2156 * cp-tree.h (flag_honor_std): Remove.
2157 (CPTI_FAKE_STD): Remove.
2158 (std_node): Remove comment about it being NULL.
2159 (fake_std_node): Remove.
2160 * decl.c (in_fake_std): Remove.
2161 (walk_namespaces_r): Remove fake_std_node check.
2162 (push_namespace): Remove in_fake_std code.
2163 (pop_namespace): Likewise.
2164 (lookup_name_real): Remove fake_std_node check.
2165 (init_decl_processing): Always create std_node. Always add
2166 std:: things there.
2167 (builtin_function): Always put non '_' fns in std.
2168 * decl2.c (flag_honor_std): Remove.
2169 (lang_f_options): Remove honor-std.
2170 (unsupported_options): Add honor-std.
2171 (set_decl_namespace): Remove fake_std_node check.
2172 (validate_nonmember_using_decl): Likewise.
2173 (do_using_directive): Likewise.
2174 (handle_class_head): Likewise.
2175 * dump.c (cp_dump_tree): Likewise.
2176 * except.c (init_exception_processing): Adjust.
2177 * init.c (build_member_call): Remove fake_std_node check.
2178 (build_offset_ref): Likewise.
2179 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2180 * rtti.c (init_rtti_processing): Adjust.
2181
2182 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
2183
2184 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2185 operand while calling cp_tree_equal.
2186
2187 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2188
2189 The 3.0 ABI no longer has vbase pointer fields.
2190 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2191 FORMAT_VBASE_NAME): Remove.
2192 * method.c (do_build_copy_constructor): Adjust.
2193 (do_build_assign_ref): Adjust.
2194 * search.c (lookup_field_r): Adjust.
2195 * typeck.c (build_component_ref): Adjust.
2196
2197 The 3.0 ABI always has a vtable pointer at the start of every
2198 polymorphic class.
2199 * rtti.c (build_headof_sub): Remove.
2200 (build_headof): Adjust.
2201 (get_tinfo_decl_dynamic): No need to check flag_rtti
2202 here. Adjust.
2203 (create_real_tinfo_var): Explain why we need a hidden name.
2204
2205 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2206
2207 PR c++/3631
2208 * class.c (update_vtable_entry_for_fn): The fixed adjustment
2209 of a virtual thunk should be from declaring base.
2210
2211 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2212
2213 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2214 the shared virtual base, so preserving inheritance graph order.
2215
2216 2001-07-30 Andreas Jaeger <aj@suse.de>
2217
2218 * decl2.c: Remove unused var global_temp_name_counter.
2219
2220 2001-07-28 Richard Henderson <rth@redhat.com>
2221
2222 * method.c (pending_inlines): Remove.
2223
2224 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2225
2226 * class.c (mark_primary_virtual_base): Don't adjust base
2227 offsets here.
2228 (dfs_unshared_virtual_bases): Adjust them here.
2229 (mark_primary_bases): Explain why we adjust at the end.
2230
2231 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2232
2233 * class.c (finish_struct_1): When copying the primary base's
2234 VFIELD, make sure we find it is at offset zero.
2235
2236 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2237
2238 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2239 tsubst_expr for default template arguments.
2240
2241 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2242
2243 PR c++/3621
2244 * spew.c (yylex): Only copy the token's lineno, if it is
2245 non-zero.
2246
2247 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2248
2249 PR c++/3624
2250 * call.c (resolve_args): Simplify, call
2251 convert_from_reference.
2252 (build_new_op): Resolve and convert from reference ARG1
2253 earlier. Adjust ARG2 & ARG3 resolve and conversion.
2254
2255 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2256
2257 * decl.c (last_function_parm_tags): Remove.
2258 (current_function_parm_tags): Remove.
2259 (init_decl_processing): Adjust.
2260 (start_function): Adjust.
2261 (store_parm_decls): Adjust.
2262
2263 PR c++/3152
2264 * decl.c (grokdeclarator): Detect when a function typedef is
2265 declaring a function, and create last_function_parms correctly.
2266
2267 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
2268
2269 * call.c (joust): Only prefer a non-builtin candidate to a builtin
2270 one if they have the same signature.
2271
2272 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
2273 it rather than toplevel_bindings_p. Give it a mangled name if static.
2274 (convert_to_reference): Adjust.
2275 * decl2.c (get_temp_name): Lose.
2276 * mangle.c (mangle_ref_init_variable): New fn.
2277 (mangle_guard_variable): Strip the ref-init header.
2278 * cp-tree.h: Adjust.
2279 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2280 initializer.
2281 (grok_reference_init): Always use DECL_INITIAL.
2282
2283 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2284
2285 PR c++/3416
2286 * call.c (build_conditional_expr): Recheck args after
2287 conversions.
2288 * cp-tree.h (build_conditional_expr): Move to correct file.
2289 * typeck.c (decay_conversion): Diagnose any unknown types
2290 reaching here.
2291 (build_binary_op): Don't do initial decay or default
2292 conversions on overloaded functions.
2293 (build_static_cast): Don't do a decay conversion here.
2294
2295 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2296
2297 PR c++/3543
2298 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2299 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2300
2301 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2302
2303 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2304 (create_vtbl_ptr): ... here.
2305
2306 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2307
2308 * class.c (build_vbase_offset_vbtl_entries): Look for
2309 non-primary base of which we are a sub vtable.
2310
2311 2001-07-24 Phil Edwards <pme@sources.redhat.com>
2312
2313 * semantics.c (finish_this_expr): Remove unused code.
2314
2315 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
2316
2317 Simplify rtti, now we've only one ABI.
2318 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2319 CPTI_TINFO_VAR_ID.
2320 (tinfo_decl_id, tinfo_var_id): Remove.
2321 (get_typeid_1): Remove.
2322 * rtti.c
2323 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2324 (typeid_ok_p): New function.
2325 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2326 (get_tinfo_decl): Remove old abi documentation.
2327 (tinfo_from_decl): Remove.
2328 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2329 (get_typeid_1): Remove.
2330 (get_base_offset): Remove.
2331 (synthesize_tinfo_var): Absorb get_base_offset.
2332 (create_real_tinfo_var): Don't use tinfo_decl_id.
2333
2334 2001-07-23 Graham Stott <grahams@redhat.com>
2335
2336 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2337 variable has_two_argument_delete_p.
2338
2339 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
2340
2341 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2342 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2343 (CPTI_INDEX_IDENTIFIER): Remove.
2344 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2345 (delta2_identifier): Remove.
2346 (index_identifier): Remove.
2347 (pfn_or_delta2_identifier): Remove.
2348 (flag_vtable_thunks): Remove.
2349 (VTABLE_DELTA2_NAME): Remove.
2350 (VTABLE_INDEX_NAME): Remove.
2351 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2352 (vfunc_ptr_type_node): Adjust.
2353 (VTABLE_NAME_PREFIX): Adjust.
2354 (build_vfn_ref): Lose first parameter.
2355 (fixup_all_virtual_upcast_offsets): Remove.
2356 * decl.c (initialize_predefined_identifiers): Remove
2357 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2358 (init_decl_processing): Remove no-vtable-thunk code.
2359 * decl2.c (flag_vtable_thunks): Remove.
2360 (mark_vtable_entries): Remove no-vtable-thunk code.
2361 * error.c (dump_decl): Remove no-vtable-thunk code.
2362 (dump_expr): Adjust ptr to member function code.
2363 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2364 code.
2365 * rtti.c (build_headof): Remove no-vtable-thunk code.
2366 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2367 * search.c (get_base_distance): Remove expand_upcast_fixups case.
2368 (virtual_context) Remove.
2369 (expand_upcast_fixups): Remove.
2370 (fixup_virtual_upcast_offsets): Remove.
2371 (fixup_all_virtual_upcast_offsets): Remove.
2372 * typeck.c (get_member_function_from_ptrfunc): Remove
2373 no-vtable-thunk code.
2374 * call.c (build_over_call): Adjust call to build_vfn_ref.
2375 * class.c (build_vfn_ref): Lose first parameter. Remove
2376 no-vtable-thunk code.
2377 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2378 (build_vtable_entry): Remove no-vtable-thunk code.
2379
2380 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
2381
2382 Remove old-abi remnants. Remove comments about old abi
2383 behaviour. Remove references to 'new-abi' in comments.
2384 * cp-tree.h: Adjust comments.
2385 (vbase_offsets_in_vtable_p): Delete.
2386 (vcall_offsets_in_vtable_p): Delete.
2387 (vptrs_present_everywhere_p): Delete.
2388 (all_overridden_vfuns_in_vtables_p): Delete.
2389 (merge_primary_and_secondary_vtables_p): Delete.
2390 (TYPE_CONTAINS_VPTR_P): Adjust.
2391 (VTT_NAME_PREFIX): Remove.
2392 (CTOR_VTBL_NAME_PREFIX): Remove.
2393 (init_vbase_pointers): Remove.
2394 * class.c: Adjust coments.
2395 (build_vbase_pointer_fields): Delete.
2396 (build_vbase_pointer): Remove old-abi code.
2397 (build_secondary_vtable): Likewise.
2398 (modify_all_vtables): Likewise.
2399 (create_vtable_ptr): Likewise.
2400 (layout_class_type): Likewise.
2401 (finish_struct_1): Likewise.
2402 (finish_vtbls): Likewise.
2403 (dfs_finish_vtbls): Delete.
2404 (build_vbase_offset_vtbl_entries): Remove old-abi code.
2405 * cvt.c: Adjust comments.
2406 * decl.c: Adjust comments.
2407 * decl2.c: Adjust comments.
2408 * init.c: Adjust comments.
2409 (construct_virtual_bases): Remove old-abi code.
2410 * lang-specs.h: Remove -fno-new-abi.
2411 * mangle.c: Adjust comments.
2412 * rtti.c: Adjust comments.
2413 (get_base_offset): Remove old-abi-code.
2414 * search.c: Adjust comments.
2415 (dfs_init_vbase_pointers): Remove.
2416 (dfs_vtable_path_unmark): Remove.
2417 (init_vbase_pointers): Remove.
2418 * semantics.c: Adjust comments.
2419 (emit_associated_thunks): Remove old-abi code.
2420 * typeck.c: Adjust comments.
2421
2422 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
2423
2424 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2425 params.h.
2426
2427 2001-07-19 Mark Mitchell <mark@codesourcery.com>
2428
2429 * class.c (finish_struct_anon): Forbid nested classes.
2430
2431 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2432
2433 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2434 * optimize.c: Include debug.h.
2435 (maybe_clone_body): Use debug hook.
2436 * semantics.c: Include debug.h.
2437 (expand_body): Use debug hook.
2438
2439 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2440
2441 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2442
2443 2001-07-18 Mark Mitchell <mark@codesourcery.com>
2444
2445 * class.c (type_requires_array_cookie): New function.
2446 (check_methods): Don't try to figure out whether the type needs a
2447 cookie here.
2448 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2449 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2450 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2451 * pt.c (instantiate_class_template): Don't set
2452 TYPE_VEC_DELETE_TAKES_SIZE.
2453 * NEWS: Document ABI changes from GCC 3.0.
2454
2455 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
2456 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2457
2458 * NEWS (Changes in GCC 3.0): Fix typo.
2459
2460 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
2461
2462 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2463 which attributes are to be attached, and a flags argument. Update
2464 call to decl_attributes.
2465 (grokfield): Update call to decl_attributes.
2466 * class.c (finish_struct): Update call to cplus_decl_attributes.
2467 * cp-tree.h (cplus_decl_attributes): Update prototype.
2468 * decl.c (start_decl, grokdeclarator, start_function): Update
2469 calls to decl_attributes and cplus_decl_attributes.
2470 * friend.c (do_friend): Update call to cplus_decl_attributes.
2471 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2472
2473 2001-07-12 Mark Mitchell <mark@codesourcery.com>
2474
2475 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2476 for `register' variables with an asm-specification.
2477
2478 2001-07-11 Mark Mitchell <mark@codesourcery.com>
2479
2480 * semantics.c (finish_asm_stmt): Mark the output operands
2481 to an asm addressable, if necessary.
2482
2483 2001-07-11 Ben Elliston <bje@redhat.com>
2484
2485 * Revert this change -- there is a subtle bug.
2486
2487 PR c++/80
2488 * decl.c (finish_enum): New "attributes" argument; pass it to
2489 cplus_decl_attributes. Use a narrower type if the enum is packed.
2490 * cp-tree.h (finish_enum): Adjust prototype.
2491 * parse.y (enum_head): New non-terminal.
2492 (structsp): Use it. Enums now may be preceded or followed by
2493 optional attributes -- pass their chained tree to finish_enum().
2494 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2495
2496 2001-07-10 Mark Mitchell <mark@codesourcery.com>
2497
2498 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2499 variables.
2500
2501 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
2502
2503 * semantics.c (cp_expand_stmt): Fix for null
2504 current_function_return_value.
2505
2506 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
2507
2508 * call.c (build_op_delete_call): Initialize fn.
2509 (convert_like_real): Delete conditional.
2510 (joust): Initialize *w and *l.
2511 * class.c: Add prototype for binfo_ctor_vtable.
2512 (get_primary_binfo): Initialize result.
2513 * init.c (build_java_class_ref): Initialize name.
2514
2515 2001-07-09 Erik Rozendaal <dlr@acm.org>
2516
2517 * typeck.c (unary_complex_lvalue): Do not duplicate the
2518 argument to modify, pre-, or post-increment when used as an
2519 lvalue and when the argument has side-effects.
2520
2521 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2522
2523 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2524 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
2525 cplus_decl_attributes even if attrs is NULL.
2526 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2527
2528 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2529
2530 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2531 calls to decl_attributes.
2532
2533 2001-07-06 Ira Ruben <ira@apple.com>
2534
2535 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2536 be DECL_TEMPLATE_RESULT.
2537
2538 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2539
2540 * cp-tree.h (copy_template_template_parm): Rename to ...
2541 (bind_template_template_parm): ... here.
2542 * tree.c (copy_template_template_parm): Rename to ...
2543 (bind_template_template_parm): ... here. Remove the case when
2544 NEWARGS is NULL_TREE.
2545 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2546 BOUND_TEMPLATE_TEMPLATE_PARM.
2547 * pt.c (lookup_template_class): Adjust.
2548
2549 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
2550
2551 * cvt.c (convert_lvalue): New fn.
2552 * cp-tree.h: Declare it.
2553 * method.c (do_build_assign_ref): Use it.
2554 (do_build_copy_constructor): Convert parm to base types
2555 before calling base constructors.
2556
2557 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
2558 DECL_USER_ALIGN. Check flag_elide_constructors instead of
2559 optimize.
2560 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
2561
2562 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
2563
2564 * optimize.c (optimize_inline_calls): New function, broken out
2565 of ...
2566 (optimize_function): ... here. Call it. Don't inline if it is
2567 a thunk.
2568 (dump_function): Print name of dump flag causing this dump.
2569 * semantics.c (expand_body): Move thunk inline check to
2570 optimize_function.
2571
2572 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
2573
2574 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
2575 (comptypes): Use target.comp_type_attributes.
2576
2577 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
2578
2579 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2580
2581 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2582
2583 * error.c (lang_print_error_function): Add a `diagnostic_context *'
2584 parameter. Tweak.
2585
2586 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2587
2588 * decl2.c (import_export_class): Update.
2589
2590 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2591
2592 * error.c (init_error): Adjust settings.
2593
2594 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2595
2596 * error.c (init_error): Adjust settings.
2597
2598 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
2599
2600 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
2601 return pointers to data members by reference rather than by value.
2602
2603 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
2604
2605 Implement the Named Return Value optimization.
2606 * cp-tree.h (struct cp_language_function): Add x_return_value.
2607 (current_function_return_value): Now a macro.
2608 * decl.c: Don't define it.
2609 (define_label, finish_case_label): Don't clear it.
2610 (init_decl_processing): Don't register it with GC.
2611 * semantics.c (genrtl_finish_function): Don't check it for
2612 no_return_label. Copy the RTL from the return value to
2613 current_function_return_value and walk, calling...
2614 (nullify_returns_r): ...this new fn.
2615 * typeck.c (check_return_expr): Set current_function_return_value.
2616
2617 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
2618
2619 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
2620 sharing a ctor vtable with. Merge code for cases 1 and 2.
2621 (binfo_ctor_vtable): New fn.
2622 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2623
2624 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
2625
2626 * class.c (dfs_find_final_overrider): Fix logic.
2627
2628 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
2629 virtual thunk instead of non-virtual.
2630 (get_matching_virtual): Uncomment.
2631
2632 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
2633 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
2634 PARM, not ARG.
2635
2636 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
2637
2638 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
2639 we've not emerged from the hierarchy of RTTI_BINFO on reaching
2640 a non-virtual base.
2641
2642 2001-06-13 Mark Mitchell <mark@codesourcery.com>
2643
2644 * NEWS: Update release number.
2645
2646 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2647
2648 PR c++/3130, c++/3131, c++/3132
2649 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
2650 * class.c (force_canonical_binfo_r): Move
2651 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
2652 virtual bases unless they're primary and what they're primary
2653 too has been moved.
2654 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
2655 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
2656 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
2657 derived binfo.
2658 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
2659 (layout_nonempty_base_or_field): Add most derived type
2660 parameter. Adjust.
2661 (layout_empty_base): Likewise.
2662 (build_base_field): Likewise.
2663 (build_base_fields): Likewise.
2664 (propagate_binfo_offsets): Add most derived type
2665 parameter. Skip non canonical virtual bases too.
2666 (dfs_set_offset_for_unshared_vbases): Don't skip primary
2667 bases. Do skip canonical bases.
2668 (layout_virtual_bases): Adjust.
2669 (layout_class_type): Adjust.
2670 (dfs_get_primary_binfo): Build list of virtual primary base
2671 candidates.
2672 (get_primary_binfo): Check that the shared virtual primary
2673 base candidate was found first.
2674 (accumulate_vtbl_inits): Don't do anything for non-vptr
2675 containing binfos. For case 1 primary virtual bases, keep
2676 checking that we've not emerged from the hierarchy of RTTI_BINFO.
2677
2678 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2679
2680 PR c++/3089
2681 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
2682 hierarchy looking for primary bases for a ctor
2683 vtable. Recursively call oneself, if we meet our primary via
2684 this route and haven't met it yet via inheritance graph order.
2685
2686 2001-06-11 Mark Mitchell <mark@codesourcery.com>
2687
2688 * lang-options.h: Emit documentation for -fno-honor-std, not
2689 -fhonor-std.
2690
2691 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
2692
2693 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
2694 Don't clobber delta.
2695 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
2696
2697 2001-06-10 Mark Mitchell <mark@codesourcery.com>
2698 Gabriel Dos Reis <gdr@codesourcery.com>
2699
2700 * Make-lang.in (cp/call.o): Depend on diagnostic.h
2701 (cp/typeck.o): Depend on diagnostic.h
2702 (cp/typeck2.o): Depend on diagnostic.h
2703 (cp/repo.o): Depend on dignostic.h
2704 * typeck.c: #include diagnostic.h
2705 (convert_for_initialization): Remove extern declaration for
2706 warningcount and errorcount.
2707
2708 * call.c: #include diagnostic.h
2709 (convert_like_real): Remove extern declaration for warnincount and
2710 errorcount.
2711
2712 * repo.c: #include diagnostic.h
2713 * typeck2.c: #include diagnostic.h
2714
2715 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2716
2717 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
2718 in previous change.
2719
2720 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2721
2722 PR c++/2929
2723 * friend.c (do_friend): Use push_decl_namespace for classes at
2724 namespace scope.
2725
2726 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2727 Jason Merrill <jason_merrill@redhat.com>
2728
2729 PR c++/3061
2730 * class.c (build_secondary_vtable): Use assert, rather than an error
2731 message.
2732 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
2733 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
2734 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
2735 Don't set BINFO_VTABLE for a primary virtual base.
2736
2737 2001-06-07 Mark Mitchell <mark@codesourcery.com>
2738
2739 * decl.c (duplicate_decls): Update source position information
2740 when a template function is defined.
2741
2742 2001-06-07 Phil Edwards <pme@sources.redhat.com>
2743
2744 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
2745
2746 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
2747
2748 PR c++/2914
2749 * decl.c (pushtag): Don't push into a complete type's scope.
2750
2751 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
2752
2753 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
2754 (struct lang_decl_flags): Lose generate_with_vtable_p.
2755 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
2756 * class.c (copy_virtuals): Adjust.
2757 * decl2.c (mark_vtable_entries): Adjust.
2758 * method.c (make_thunk, build_vtable_entry): Adjust.
2759 * class.c (update_vtable_entry_for_fn): Only look as far as the
2760 first defining class.
2761 (build_vtbl_initializer): Put nothing in the slot for a function only
2762 defined in a lost primary virtual base.
2763 (add_vcall_offset_vtbl_entries_1): Use the same code for
2764 the lost primary case and the normal case.
2765 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
2766 (get_vfield_offset, get_derived_offset): Lose.
2767 (dfs_find_final_overrider): Use look_for_overrides_here.
2768 (get_matching_virtual): New fn.
2769 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
2770 not BV_VCALL_INDEX.
2771 * search.c (look_for_overrides_here): Split out from...
2772 (look_for_overrides_r): Here.
2773
2774 * class.c (find_final_overrider): Return error_mark_node on error.
2775
2776 * decl2.c (key_method): #if 0 accidental change.
2777
2778 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
2779
2780 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
2781 (build_over_call): Likewise.
2782 * decl.c (grokparms): Likewise.
2783 * pt.c (tsubst_decl): Likewise.
2784 * typeck.c (convert_arguments): Likewise.
2785
2786 2001-06-05 Mark Mitchell <mark@codesourcery.com>
2787
2788 * semantics.c (begin_class_definition): Robustify.
2789
2790 * pt.c (instantiate_decl): Tell the repository code about the
2791 clones, not the cloned functions.
2792 * repo.c (repo_template_used): Explicitly instantiate the cloned
2793 function, not the clones.
2794
2795 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2796
2797 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
2798 ICS_BAD_FLAG on created conversion.
2799 (compare_ics): Break out rank.
2800
2801 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2802
2803 * decl.c (xref_tag): Remove extraneous %s on dependent name
2804 lookup warning.
2805
2806 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2807
2808 * class.c (layout_vtable_decl): Fix off by one error on
2809 build_index_type.
2810 (build_vtt): Likewise.
2811 (build_ctor_vtbl_group): Likewise.
2812
2813 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2814
2815 * class.c (maybe_indent_hierarchy): New function.
2816 (dump_class_hierarchy_r): Add flags. Dump extra binfo
2817 information, if enabled. Use maybe_indent_hierarchy. Adjust
2818 output format.
2819 (dump_class_hierarchy): Adjust prototype. Adjust output format.
2820 (dump_array, dump_vtable, dump_vtt): New functions.
2821 (finish_struct_1): Adjust hierarchy dumping.
2822 (initialize_vtable): Call dump_vtable.
2823 (build_vtt): Call dump_vtt.
2824 (build_ctor_vtbl_group): Call dump_vtable.
2825 * decl2.c (flag_dump_class_layout): Remove.
2826 (cxx_decode_option): Remove dump translation unit
2827 and dump class hierarchy check. Call dump_switch_p.
2828 (finish_file): Adjust dumping.
2829 (dump.c): Only dump base classes if not TDF_SLIM.
2830 Only dump namespace members if not TDF_SLIM.
2831 * optimize.c (dump_function): New function.
2832 (optimize_function): Call dump_function.
2833 * semantics.c (expand_body): Use dump_enabled_p.
2834
2835 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
2836
2837 PR g++/2936
2838 Part missed from first commit
2839 * decl2.c (finish_anon_union): Copy context.
2840
2841 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
2842
2843 PR g++/2936
2844 * optimize.c (remap_decl): Remap anonymous aggregate members too.
2845
2846 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
2847
2848 PR g++/2823
2849 * semantics.c (expand_body): Don't optimize thunks.
2850
2851 2001-05-25 Sam TH <sam@uchicago.edu>
2852
2853 * cp-tree.h lex.h: Fix header include guards.
2854
2855 2001-05-25 Mark Mitchell <mark@codesourcery.com>
2856
2857 * decl.c (init_decl_processing): Tweak.
2858
2859 2001-05-24 Mark Mitchell <mark@codesourcery.com>
2860
2861 * decl.c (duplicate_decls): Tidy.
2862 (init_decl_processing): Always set flag_no_builtin.
2863
2864 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
2865
2866 PR c++/2184
2867 * decl2.c (do_local_using_decl): Push the decls, even in a
2868 template.
2869
2870 2001-05-22 Mark Mitchell <mark@codesourcery.com>
2871
2872 * optimize.c (initialize_inlined_parameters): Don't set
2873 TREE_READONLY for a VAR_DECL taking the place of an inlined
2874 PARM_DECL.
2875
2876 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
2877
2878 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
2879 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
2880 attribute.
2881
2882 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
2883
2884 * parse.y: Refer to compound literals as such, not as
2885 constructor-expressions.
2886
2887 2001-05-21 Mark Mitchell <mark@codesourcery.com>
2888
2889 * call.c (build_op_delete_call): Ignore exception-specifications
2890 when looking for matching delete operators.
2891 * init.c (build_new_1): Compute whether or not the allocation
2892 function used is a placement allocation function or not, and
2893 communicate this information to build_op_delete_call.
2894
2895 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
2896
2897 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
2898 (build_vtbl_ref): Adjust.
2899 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
2900 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
2901 Re-add vtable-gc.
2902 (unsupported_options): Correspondingly.
2903
2904 * decl2.c (maybe_make_one_only): Check flag_weak, not
2905 supports_one_only().
2906
2907 * cp-tree.def (START_CATCH_STMT): Lose.
2908 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
2909 * tree.c (cp_statement_code_p): Don't case it.
2910 * semantics.c (cp_expand_stmt): Likewise.
2911 * cp-tree.h (START_CATCH_TYPE): Lose.
2912 (HANDLER_TYPE): New.
2913 * except.c (expand_start_catch_block): Don't start any blocks.
2914 Return the type.
2915 (expand_end_catch_block): Don't end any blocks.
2916 * parse.y (handler): Don't pass anything from finish_handler_parms
2917 to finish_handler.
2918 * pt.c (tsubst_expr): Likewise.
2919 * semantics.c (begin_handler): Call note_level_for_catch here.
2920 (finish_handler_parms): Don't return anything.
2921 (genrtl_catch_block, begin_catch_block): Lose.
2922 (genrtl_handler): Call expand_start_catch here.
2923
2924 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
2925
2926 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
2927 (get_vtable_decl, build_vtt): Not here.
2928
2929 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
2930
2931 PR c++/2781
2932 * optimize.c (update_cloned_parm): Copy addressability and other
2933 flags.
2934
2935 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2936
2937 * pt.c (determine_specialization): Ignore artificial functions.
2938
2939 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
2940
2941 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
2942 (C_RID_CODE): Remove.
2943 * lex.c (cxx_init_options): Call set_identifier_size. Update.
2944 (init_parse): Don't do it here.
2945
2946 2001-05-18 Diego Novillo <dnovillo@redhat.com>
2947
2948 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
2949 function declaration to avoid stripping the symbol's attributes.
2950
2951 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
2952
2953 * decl.c (pushdecl): Adjust error string.
2954 (xref_tag): Adjust friend class injection warning. Remove the
2955 inherited name from the class shadowed scope.
2956
2957 2001-05-17 Mark Mitchell <mark@codesourcery.com>
2958
2959 * except.c (cp_protect_cleanup_actions): New function.
2960 (init_exception_processing): Don't set protect_cleanup_actions
2961 here. Do set lang_protect_cleanup_actions.
2962
2963 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2964
2965 * spew.c (read_token): Call yyerror on all unexpected tokens.
2966
2967 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2968
2969 * init.c (member_init_ok_or_else): Take a tree rather than
2970 string for name.
2971 (expand_member_init): Adjust.
2972
2973 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
2974
2975 * decl.c (duplicate_decls): Suppress warning about duplicate
2976 decls if the first decl is a friend.
2977
2978 2001-05-12 Zack Weinberg <zackw@stanford.edu>
2979
2980 * except.c (choose_personality_routine): Export. Add
2981 explanatory comment. Take an enum languages, not a boolean.
2982 (initialize_handler_parm): Adjust to match.
2983 * cp-tree.h: Prototype choose_personality_routine.
2984 * lex.c (handle_pragma_java_exceptions): New function.
2985 (init_cp_pragma): Register #pragma GCC java_exceptions.
2986
2987 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2988
2989 * method.c (build_mangled_C99_name): Remove unused prototype.
2990
2991 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
2992
2993 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
2994 * typeck.c (get_member_function_from_ptrfunc,
2995 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
2996 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
2997
2998 Reverted Geoff Keating's 2001-05-03's patch.
2999
3000 2001-05-11 Ira Ruben <ira@apple.com>
3001
3002 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3003
3004 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
3005
3006 * cp-tree.h (finish_label_expr, lookup_label): Delete.
3007 * parse.y: Update for '&&'; don't issue warning here.
3008 * semantics.c (finish_label_expr): Delete.
3009
3010 2001-05-07 Mark Mitchell <mark@codesourcery.com>
3011
3012 * splay-tree.h (splay_tree_max): New function.
3013 (splay_tree_min): Likewise.
3014
3015 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
3016
3017 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3018 (pfn_vflag_identifier): Define.
3019 Update comment about layout of pointer functions.
3020 (build_ptrmemfunc1): Update prototype.
3021 (expand_ptrmemfunc_cst): Update prototype.
3022 * decl.c (initialize_predefined_identifiers): Initialize
3023 pfn_vflag_identifier.
3024 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3025 an extra field to the type.
3026 * expr.c (cplus_expand_constant): Pass 'flag' between
3027 expand_ptrmemfunc_cst and build_ptrmemfunc1.
3028 * typeck.c (get_member_function_from_ptrfunc): When
3029 FUNCTION_BOUNDARY < 16, look at additional field to determine
3030 if a pointer-to-member is a real pointer or a vtable offset.
3031 (build_ptrmemfunc1): Add new parameter to contain extra field.
3032 (build_ptrmemfunc): Pass the extra field around.
3033 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3034 (pfn_from_ptrmemfunc): Ignore the extra field.
3035
3036 2001-05-03 Mark Mitchell <mark@codesourcery.com>
3037
3038 * cp-tree.h (flag_inline_trees): Update documentation.
3039 * decl.c (init_decl_processing): Adjust handling of
3040 flag_inline_functions and flag_inline_trees to support -O3.
3041 (grokfndecl): Set DECL_INLINE on all functions if that's what
3042 the user requested.
3043 (save_function_data): Clear DECL_INLINE in
3044 current_function_cannot_inline is non-NULL.
3045 * decl2.c (flag_inline_trees): Update documentation.
3046
3047 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
3048
3049 * dump.c (cp_dump_tree, USING_STMT case): New case.
3050 * tree.c (cp_statement_code_p): Add USING_STMT.
3051 * decl2.c (do_using_directive): Add the using directive statement.
3052
3053 * tree.c (walk_tree): Reformat an if block.
3054
3055 2001-05-02 Mark Mitchell <mark@codesourcery.com>
3056
3057 * decl.c (compute_array_index_type): Don't try to do anything with
3058 the indices when processing a template.
3059
3060 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3061
3062 * call.c: NULL_PTR -> NULL.
3063 * class.c: Likewise.
3064 * cvt.c: Likewise.
3065 * decl.c: Likewise.
3066 * decl2.c: Likewise.
3067 * except.c: Likewise.
3068 * init.c: Likewise.
3069 * rtti.c: Likewise.
3070 * search.c: Likewise.
3071 * tree.c: Likewise.
3072 * typeck.c: Likewise.
3073 * typeck2.c: Likewise.
3074
3075 2001-05-02 Mark Mitchell <mark@codesourcery.com>
3076
3077 * decl2.c (do_using_directive): Revert previous patch.
3078
3079 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3080
3081 * cp-tree.def (USING_STMT): New statement node.
3082 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3083 * decl2.c (do_using_directive): Add USING_STMT to statement
3084 tree. Don't emit errors when processing template decl.
3085 * pt.c (tsubst_expr, USING_STMT case): New case.
3086 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3087
3088 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3089
3090 * call.c (build_new_op): Convert args from reference here.
3091 (build_conditional_expr): Don't convert here.
3092
3093 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3094
3095 * spew.c (last_token_id): New static variable.
3096 (read_token): Set it here.
3097 (yyerror): Use it here.
3098
3099 2001-04-30 Richard Henderson <rth@redhat.com>
3100
3101 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3102 * decl.c: Likewise.
3103
3104 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3105
3106 * gxxint.texi: Remove.
3107 * Make-lang.in: Remove all traces of gxxint.texi.
3108
3109 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
3110
3111 * decl2.c (start_static_initialization_or_destruction): Correct
3112 logic to handle the -fno-use-cxa-atexit case.
3113
3114 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3115
3116 * optimize.c (update_cloned_parm): New function.
3117 (maybe_clone_body): Use it. Update the `this' parameter too.
3118
3119 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
3120
3121 * decl2.c (unsupported_options): Add new-abi.
3122 * lang-options.h: Remove no longer supported options.
3123
3124 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3125
3126 * except.c (can_convert_eh): Don't check template parms,
3127 typename types etc.
3128
3129 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3130
3131 * optimize.c (maybe_clone_body): Copy parameter names and locations.
3132
3133 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3134
3135 * cp-tree.h (adjust_clone_args): Prototype new function.
3136 * class.c (adjust_clone_args): New function.
3137 * decl.c (start_function): Call it for in charge ctors.
3138
3139 2001-04-26 Mark Mitchell <mark@codesourcery.com>
3140
3141 * method.c (use_thunk): Make sure that thunks really are emitted
3142 when requested.
3143
3144 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
3145
3146 * mangle.c (write_chars): New macro.
3147 (hwint_to_ascii): New function
3148 (write_number): Use it.
3149 (write_integer_cst): Deal with really big numbers.
3150
3151 2001-04-25 Mark Mitchell <mark@codesourcery.com>
3152
3153 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3154 the clone.
3155
3156 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
3157
3158 * decl.c (grokdeclarator): Set context of namespace scope
3159 TYPE_DECLS.
3160
3161 2001-04-24 Zack Weinberg <zackw@stanford.edu>
3162
3163 * cp/optimize.c: Include hashtab.h.
3164 (struct inline_data): Add tree_pruner.
3165 (expand_call_inline, expand_calls_inline): Use it when calling
3166 walk_tree.
3167 (optimize_function): Initialize and free tree_pruner.
3168
3169 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3170
3171 Lazy __FUNCTION__ generation.
3172 * cp-tree.def (FUNCTION_NAME): Remove.
3173 * cp-tree.h (function_name_declared_p): Remove.
3174 (cp_fname_init): Prototype.
3175 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3176 don't call declare_function_name. Call start_fname_decls.
3177 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3178 clobber the line number.
3179 (cp_fname_init): New function.
3180 (start_function): Call start_fname_decls.
3181 (finish_function): Call finish_fname_decls.
3182 * lex.c (reswords): Add slots for __FUNCTION__ et al.
3183 (rid_to_yy): Add mappings for __FUNCTION__ et al.
3184 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3185 * parse.y (VAR_FUNC_NAME): New token.
3186 (primary): Add VAR_FUNC_NAME.
3187 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3188 generation.
3189 (tsubst, FUNCTION_NAME case): Remove.
3190 (tsubst_copy, FUNCTION_NAME case): Remove.
3191 (tsubst_expr, DECL_STMT case): Be careful with a
3192 DECL_PRETTY_FUNCTION_P.
3193 (instantiate_decl): Remove function_name_declared_p.
3194 * semantics.c (begin_compound_statement): Don't call
3195 declare_function_name here.
3196 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3197 (finish_translation_unit): Call finish_fname_decls.
3198 (expand_body): Remove function_name_declared_p.
3199 * typeck2.c (digest_init): Allow any ERROR_MARK.
3200
3201 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3202
3203 * pt.c (tsubst_decl): Use VOID_TYPE_P.
3204 * semantics.c: Fix some typos.
3205
3206 2001-04-23 Phil Edwards <pme@sources.redhat.com>
3207
3208 * cp/decl2.c (flag_honor_std): Always initialize to 1.
3209
3210 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3211
3212 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3213
3214 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
3215
3216 * except.c (build_throw): Wrap the initialization of the exception
3217 object in a MUST_NOT_THROW_EXPR.
3218 (do_free_exception): #if 0.
3219
3220 2001-04-20 Mark Mitchell <mark@codesourcery.com>
3221
3222 * cp-tree.h (finish_enum): Change prototype.
3223 * decl.c (finish_enum): Reorganize.
3224 * parse.y (structsp): Adjust calls to finish_enum.
3225
3226 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3227
3228 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3229 't' case.
3230
3231 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3232
3233 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3234 (layout_empty_base): Return at end flag.
3235 (build_base_field): Likewise.
3236 (build_base_fields): Likewise.
3237 (layout_virtual_bases): Don't add 1 to eoc value.
3238 (end_of_class): Use full size for empty bases.
3239 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3240 empty bases. Don't add 1 to eoc value. Only add trailing padding
3241 if we're an empty class with no empty bases.
3242 (dump_class_hierarchy): Dump size and alignment.
3243
3244 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3245
3246 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3247 ICS_BAD_FLAG.
3248
3249 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3250
3251 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3252 is found, look first if name does not match the structure name.
3253
3254 2001-04-19 Mark Mitchell <mark@codesourcery.com>
3255
3256 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3257 set.
3258 (SET_DECL_LANGUAGE): New macro.
3259 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3260 (pushdecl): Likewise.
3261 (build_library_fn_1): Likewise.
3262 (build_cp_library_fn): Likewise.
3263 (grokfndecl): Likewise.
3264 (grokvardecl): Mark `extern "C"' variables as having C linkage.
3265 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3266 * lex.c (retrofit_lang_decl): Likewise.
3267 * mangle.c (mangle_decl_string): Don't mangle the names of
3268 variables declared with C language linkage.
3269 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3270
3271 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
3272
3273 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3274 flag_access_control from uninitialized storage.
3275
3276 2001-04-15 Mark Mitchell <mark@codesourcery.com>
3277
3278 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3279 * mangle.c (write_pointer_to_member_type): Fix mangling of
3280 pointers to cv-qualified member function types.
3281
3282 * init.c (build_delete): Create a SAVE_EXPR for the address if
3283 we're going to use it more than once.
3284
3285 2001-04-13 Mark Mitchell <mark@codesourcery.com>
3286
3287 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3288 (expand_ptremfunc_cst): Change prototype.
3289 (delta2_from_ptrmemfunc): Remove.
3290 * expr.c (cplus_expand_constant): Adjust call to
3291 expand_ptrmemfunc_cst.
3292 * typeck.c (build_ptrmemfunc1): Simplify.
3293 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3294 results in a constant.
3295 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3296 (delta2_from_ptrmemfunc): Remove.
3297 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3298
3299 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
3300
3301 * cp-tree.h (decl_namespace_list): New macro.
3302 (struct saved_scope): Add decl_ns_list.
3303 * decl.c (mark_saved_scope): Mark it.
3304 * decl2.c: Lose static decl_namespace_list.
3305 (init_decl2): Don't save it.
3306
3307 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3308
3309 * cp-tree.h (warn_return_type, yylex): Delete redundant
3310 declarations.
3311
3312 * decl.c (current_class_depth, global_namespace): Likewise.
3313
3314 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3315
3316 * repo.c (flag_use_repository): Likewise.
3317
3318 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3319
3320 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3321 set_block, pushdecl, getdecls, gettags, init_decl_processing,
3322 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3323 lvalue_or_else, print_lang_statistics, comp_target_types,
3324 unsigned_type, signed_type, signed_or_unsigned_type,
3325 build_function_call, mark_addressable, incomplete_type_error):
3326 Delete redundant declarations.
3327
3328 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
3329
3330 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3331 (TYPE_ANONYMOUS_P): New macro.
3332 (TAGGED_TYPE_P): New macro.
3333 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3334 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3335 * tree.c (no_linkage_helper): Likewise.
3336 * semantics.c (begin_class_definition): Likewise.
3337 * pt.c (convert_template_argument): Likewise.
3338 * lex.c (check_for_missing_semicolon): Likewise.
3339
3340 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3341
3342 * class.c (dfs_unshared_virtual_bases): New function.
3343 (mark_primary_bases): Call it.
3344 (check_bases): Ignore virtual bases when determining
3345 nearly-emptiness.
3346
3347 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3348
3349 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3350
3351 2001-04-11 Mark Mitchell <mark@codesourcery.com>
3352
3353 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3354 cloned function to the clone.
3355
3356 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3357
3358 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3359
3360 * semantics.c: Include expr.h.
3361
3362 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
3363
3364 * method.c (implicitly_declare_fn): Commonize code for copy ctor
3365 and assignment op. Set TREE_USED for parameter.
3366
3367 2001-04-10 Mark Mitchell <mark@codesourcery.com>
3368
3369 * class.c (find_final_overrider_data): Add `candidates'.
3370 (dfs_find_final_overrider): Don't issue error messages
3371 prematurely.
3372 (find_final_overrider): Issue error messages here.
3373 (build_base_field): Don't warn about amgibuous direct bases here.
3374 (warn_about_ambiguous_direct_bases): New function.
3375 (layout_class_type): Use it.
3376
3377 2001-04-10 Richard Henderson <rth@redhat.com>
3378
3379 * typeck.c (build_array_ref): Push the array reference inside
3380 COMPOUND_EXPR and COND_EXPR.
3381
3382 2001-04-05 Mark Mitchell <mark@codesourcery.com>
3383
3384 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3385 * decl.c (duplicate_decls): Adjust accordingly.
3386 (maybe_commonize_var): Likewise.
3387 (grokfndecl): Likewise.
3388 (start_function): Likewise.
3389 (start_method): Likewise.
3390 * decl2.c (key_method): Likewise.
3391 (import_export_decl): Likewise.
3392 * method.c (implicitly_declare_fn): Likewise.
3393 * optimize.c (maybe_clone_body): Likewise.
3394
3395 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
3396
3397 * lang-specs.h: Add __DEPRECATED.
3398
3399 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
3400
3401 * search.c (get_dynamic_cast_base_type): When building a new
3402 constant, set its type to ssizetype.
3403
3404 2001-04-04 Jakub Jelinek <jakub@redhat.com>
3405
3406 * optimize.c (expand_call_inline): Only add newly inlined statements
3407 into inlined_stmts.
3408
3409 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3410
3411 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3412 (OPERATOR_FORMAT): Likewise.
3413 (OPERATOR_TYPENAME_FORMAT): Likewise.
3414 * operators.def: Remove old name-mangling information.
3415 * decl.c (grok_op_properties): Adjust accordingly.
3416 * lex.c (init_operators): Likewise.
3417 * rtti.c (get_tinfo_decl): Issue error messages about types that
3418 have variable size.
3419
3420 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3421
3422 * decl2.c (import_export_decl): Don't call import_export_class
3423 when processing an inline member function.
3424 * semantics.c (expand_body): Call import_export_decl before
3425 emitting inline functions.
3426
3427 2001-03-28 Richard Henderson <rth@redhat.com>
3428
3429 IA-64 ABI Exception Handling:
3430 * cp-tree.def (EH_SPEC_BLOCK): New.
3431 (MUST_NOT_THROW_EXPR): New.
3432 * cp-tree.h: Update changed function declarations.
3433 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3434 (CPTI_CALL_UNEXPECTED): New.
3435 (struct cp_language_function): Rename x_eh_spec_try_block
3436 to x_eh_spec_block.
3437 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3438 * decl.c (current_binding_level): If no current function
3439 bindings, revert to scope_chain.
3440 (initialize_predefined_identifiers): Remove __cp_push_exception.
3441 (store_parm_decls): Use begin_eh_spec_block.
3442 (finish_function): Use finish_eh_spec_block.
3443 (mark_lang_function): Update for name changes.
3444 * decl2.c (finish_file): No mark_all_runtime_matches.
3445 * dump.c (cp_dump_tree): Handle new tree codes.
3446 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3447 * except.c (catch_language_init, catch_language): Remove.
3448 (init_exception_processing): Don't set language code.
3449 Initialize call_unexpected_node, protect_cleanup_actions,
3450 eh_personality_libfunc, lang_eh_runtime_type.
3451 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3452 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3453 (prepare_eh_type): Split out type canonicalizations ...
3454 (build_eh_type_type): ... from here.
3455 (build_eh_type_type_ref): Remove.
3456 (mark_all_runtime_matches): Remove.
3457 (build_exc_ptr): New.
3458 (do_begin_catch, do_end_catch): New.
3459 (do_pop_exception): Remove.
3460 (build_terminate_handler): Remove.
3461 (choose_personality_routine): Split out language choice from ...
3462 (initialize_handler_parm): ... here.
3463 Use MUST_NOT_THROW_EXPR.
3464 (expand_start_catch_block): Use do_begin_catch. Simplify Java
3465 exception object handling.
3466 (expand_start_eh_spec, expand_end_eh_spec): Remove.
3467 (expand_exception_blocks, alloc_eh_object): Remove.
3468 (begin_eh_spec_block, finish_eh_spec_block): New.
3469 (do_allocate_exception, do_free_exception): New.
3470 (expand_throw): Merge into ...
3471 (build_throw): ... here. Update for abi.
3472 * expr.c (cplus_expand_expr): No expand_internal_throw.
3473 Handle MUST_NOT_THROW_EXPR.
3474 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3475 * semantics.c (*) Update for except.h name changes.
3476 (genrtl_try_block): No protect_with_terminate.
3477 (genrtl_eh_spec_block): New.
3478 (genrtl_handler): Don't emit the goto here.
3479 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3480 (genrtl_finish_function): Don't expand_exception_blocks.
3481 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3482
3483 2001-03-28 Richard Henderson <rth@redhat.com>
3484
3485 * decl.c (struct named_label_list): Rename eh_region to
3486 in_try_scope, add in_catch_scope.
3487 (struct binding_level): Rename eh_region to is_try_scope,
3488 add is_catch_scope.
3489 (note_level_for_try): Rename from note_level_for_eh.
3490 (note_level_for_catch): New.
3491 (poplevel): Copy both is_try_scope and is_catch_scope to
3492 the named_label_list struct.
3493 (check_previous_goto_1): Don't check for catch block via
3494 DECL_ARTIFICIAL; use in_try_scope instead.
3495 (check_goto): Likewise.
3496 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3497 * except.c (expand_start_catch_block): Call note_level_for_catch.
3498 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3499
3500 2001-03-27 Richard Henderson <rth@redhat.com>
3501
3502 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3503 exceptions_via_longjmp.
3504
3505 2001-03-27 Phil Edwards <pme@sources.redhat.com>
3506
3507 * pt.c (check_default_tmpl_args): Make error messages clearer.
3508
3509 2001-03-26 Phil Edwards <pme@sources.redhat.com>
3510
3511 * error.c: Also undefine 'A' macro used for cp_printers definition.
3512
3513 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3514
3515 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3516
3517 2001-03-26 Mike Yang <yang@research.att.com>
3518 Mark Mitchell <mark@codesourcery.com>
3519
3520 * dump.c (dump_access): New function.
3521 (cp_dump_tree): Use it. Dump basetype information for class
3522 types.
3523
3524 2001-03-26 Mark Mitchell <mark@codesourcery.com>
3525
3526 * Makefile.in (optimize.o): Depend on params.h.
3527 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3528 (init_decl_processing): Set flag_no_inline when doing
3529 inlining-on-trees.
3530 * optimize.c: Include params.h.
3531 (struct inline_data): Improve documentation of FNS. Add
3532 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3533 (INSNS_PER_STMT): New macro.
3534 (remap_block): Use CLONING_P.
3535 (inlinable_function_p): Don't inline big functions.
3536 (expand_call_inline): Keep track of how much inlining we've done.
3537 (optimize_function): Set FIRST_INLINED_FN.
3538 (maybe_clone_body): Set CLONING_P.
3539 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3540 tree nodes.
3541 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3542 rest_of_compilation. Clear DECL_RTL for local variables
3543 afterwards.
3544 (clear_decl_rtl): New function.
3545
3546 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
3547
3548 Implement DR 209
3549 * cp-tree.h (skip_type_access_control,
3550 reset_type_access_control): Prototype.
3551 * decl.c (grokdeclarator): Access of friends is not checked.
3552 * parse.y (component_decl_list): Reset type access control.
3553 * semantics.c (decl_type_access_control): Clear
3554 current_type_lookups.
3555 (save_type_access_control): Don't save if not deferring.
3556 (skip_type_access_control, reset_type_access_control): New
3557 functions.
3558 (begin_class_definition): Do type access control for basetypes.
3559 Start deferred access control.
3560 (finish_class_definition): Resume immediate access control if
3561 this is a local class.
3562
3563 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3564
3565 * class.c (add_method): Use memcpy/memmove, not bcopy.
3566
3567 * decl.c (duplicate_decls): Likewise.
3568
3569 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3570
3571 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
3572 not `_'.
3573
3574 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3575
3576 * decl.c (local_names): Define.
3577 (push_local_name): New.
3578 (grok_reference_init): Return init if initializing static reference
3579 variable with non-constant instead of emitting it.
3580 Move expand_static_init call to cp_finish_decl.
3581 (layout_var_decl): Call push_local_name.
3582 (maybe_commonize_var): Allow inlining functions even if they have
3583 static local variables, use comdat_linkage for them if flag_weak.
3584 (check_initializer): Call obscure_complex_init if
3585 grok_reference_init returned non-zero.
3586 (save_function_data): Clear x_local_names.
3587 (pop_cp_function_context): Free x_local_names.
3588 (mark_inlined_fns): Remove.
3589 (mark_lang_function): Mark x_local_names.
3590 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
3591 Mark inlined_fns as tree, remove call to mark_inlined_fns.
3592 * class.c (alter_access): Ensure DECL_ACCESS is never set if
3593 DECL_DISCRIMINATOR_P.
3594 * cp-tree.h (cp_language_function): Add x_local_names.
3595 (lang_decl_flags): Add discriminator into u2.
3596 (lang_decl_inlined_fns): Remove.
3597 (lang_decl): inlined_fns is now a TREE_VEC.
3598 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
3599 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
3600 TREE_VEC, not a custom structure.
3601 (optimize_function): Likewise.
3602 * mangle.c (discriminator_for_local_entity): Discriminate among
3603 VAR_DECL local entities.
3604 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
3605 is not valid.
3606
3607 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
3608
3609 Add support for Java interface method calls.
3610 * cp-tree.h (struct lang_type): Add java_interface flag.
3611 (TYPE_JAVA_INTERFACE): New macro.
3612 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
3613 by setting TYPE_JAVA_INTERFACE.
3614 * call.c (java_iface_lookup_fn): New static.
3615 (build_over_call): If calling a method declared in a
3616 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
3617 expression which resolves the function address.
3618 (build_java_interface_fn_ref): New function.
3619
3620 2001-03-22 Richard Henderson <rth@redhat.com>
3621
3622 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
3623 * except.c: Don't include it.
3624
3625 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
3626 based on an idea from Joe Buck <jbuck@synopsys.com>
3627
3628 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
3629 New nonterminals.
3630 (data_def, component_decl): Add reductions to bad_decl.
3631
3632 2001-03-22 Jakub Jelinek <jakub@redhat.com>
3633
3634 * method.c (do_build_assign_ref): Don't use build_modify_expr for
3635 anonymous aggregates, since they don't have assignment operator
3636 method.
3637 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
3638 assignment operators for anonymous structure fields.
3639
3640 2001-03-21 Jason Merrill <jason@redhat.com>
3641
3642 * pt.c (instantiate_decl): Abort if we see a member constant
3643 instantiation that doesn't already have its initializer.
3644 Downgrade explicit instantiation without definition to pedwarn.
3645
3646 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
3647 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
3648 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
3649
3650 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
3651 (pending_vtables): Remove.
3652 * decl2.c (pending_vtables): Remove.
3653 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
3654 CLASSTYPE_VTABLE_NEEDS_WRITING.
3655 (import_export_class): Likewise.
3656 (init_decl2): Don't mark pending_vtables.
3657 * lex.c (handle_pragma_vtable): Just sorry.
3658 * pt.c (instantiate_class_template): Don't mess with
3659 CLASSTYPE_VTABLE_NEEDS_WRITING.
3660 (mark_class_instantiated): Likewise.
3661 * ptree.c (print_lang_type): Don't print it.
3662 * semantics.c (begin_class_definition): Don't set it.
3663
3664 * pt.c (template_tail): Replace with last_pending_template.
3665 (maybe_templates, maybe_template_tail): Remove.
3666 (add_pending_template): Adjust.
3667 (instantiate_pending_templates): Adjust.
3668
3669 * cp-tree.h (struct saved_scope): Remove lang_stack field.
3670 (current_lang_stack): Remove.
3671 * decl.c (maybe_push_to_top_level): Don't initialize it.
3672 (duplicate_decls): Use current_lang_depth.
3673 (xref_basetypes): Likewise.
3674 * class.c (current_lang_depth): New fn.
3675 (push_lang_context): Use more varray functionality.
3676 (pop_lang_context): Likewise.
3677
3678 * error.c (GLOBAL_THING): Always use '__'.
3679
3680 2001-03-21 Mark Mitchell <mark@codesourcery.com>
3681
3682 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
3683
3684 * mangle.c (mangle_decl_string): Mangle the names of overloaded
3685 operators, even when they have `extern "C"' linkage.
3686
3687 2001-03-19 Mark Mitchell <mark@codesourcery.com>
3688
3689 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
3690 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3691 where it's not necessary.
3692 (add_method): Remove optimization involving comparison of
3693 DECL_ASSEMBLER_NAME.
3694 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
3695 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3696 where it's not necessary.
3697 (check_methods): Likewise.
3698 (build_clone): Likewise.
3699 (built_vtt): Likewise.
3700 * cp-tree.h (DECL_NEEDED_P): Likewise.
3701 * decl.c (pushtag): Likewise.
3702 (duplicate_decls): Likewise.
3703 (pushdecl): Likewise.
3704 (builtin_function): Likewise.
3705 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
3706 (build_cp_library_fn): Likewise.
3707 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
3708 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3709 where it's not necessary.
3710 (make_rtl_for_nonlocal_decl): Likewise.
3711 (cp_finish_decl): Likewise.
3712 (grokfndecl): Likewise.
3713 (grokvardecl): Likewise.
3714 (grokdeclarator): Likewise.
3715 (start_function): Likewise.
3716 (cp_missing_return_ok_p): Likewise.
3717 * decl2.c (grokclassfn): Likewise.
3718 (check_classfn): Likewise.
3719 (finish_static_data_member_decl): Likewise.
3720 (grokfield): Likewise.
3721 * error.c (GLOBAL_IORD_P): Remove.
3722 (dump_global_iord): Improve output.
3723 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
3724 * except.c (nothrow_libfn_p): Summarily reject any function not in
3725 namespace-scope.
3726 * init.c (build_java_class_ref): Don't explicitly set
3727 DECL_ASSEMBLER_NAME after calling mangle_decl.
3728 * mangle.c (mangle_decl_string): Handle extern "C" functions.
3729 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
3730 * method.c (set_mangled_name_for_decl): Don't explicitly set
3731 DECL_ASSEMBLER_NAME after calling mangle_decl.
3732 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
3733 IDENTIFIER_GLOBAL_VALUE for the thunk.
3734 * pt.c (set_mangled_name_for_template_decl): Remove.
3735 (check_explicit_specialization): Don't use it.
3736 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
3737 (tsubst_friend_function): Likewise.
3738 (tsubst_decl): Likewise.
3739 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
3740 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
3741 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3742 where it's not necessary.
3743 (tinfo_base_init): Likewise.
3744 (create_real_tinfo_var): Likewise.
3745 * search.c (looup_field_1): Likewise.
3746 * semantics.c (finish_named_return_value): Likewise.
3747 * tree.c (init_tree): Set lang_set_decl_assembler_name.
3748
3749 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
3750
3751 Correct semantics restrictions checking in throw-expression.
3752 * except.c (is_admissible_throw_operand): New function.
3753 (build_throw): Use it.
3754
3755 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3756
3757 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
3758 and its ilk.
3759
3760 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3761
3762 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3763 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
3764 * decl.c (duplicate_decls): Likewise.
3765 (builtin_function): Likewise.
3766 (build_library_fn): Likewise.
3767 (build_cp_library_fn): Likewise.
3768 (check_initializer): Likewise.
3769 (cp_finish_decl): Likewise.
3770 * decl2.c (grokfield): Likewise.
3771 (grok_function_init): Remove #if 0'd code.
3772 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3773 * friend.c (do_friend): Likewise.
3774 * init.c (get_temp_regvar): Likewise.
3775 * method.c (make_thunk): Likewise.
3776 * pt.c (tsubst_friend_function): Likewise.
3777 (tsubst_decl): Likewise.
3778 (regenerate_decl_from_template): Likewise.
3779 * semantics.c (genrtl_named_return_value): Likewise.
3780 (expand_body): Likewise.
3781 (genrtl_finish_function): Likewise.
3782 * tree.c (cp_tree_equal): Likewise.
3783
3784 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
3785
3786 * call.c (convert_like_real): Add extra semantics to INNER
3787 parameter. Don't convert to temporary if a user conversion
3788 gives us an lvalue that we're about to bind to a reference.
3789 Set INNER to indicate pending reference binding on recursive
3790 calls.
3791
3792 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3793
3794 * cp/lex.c: Delete duplicate pending_lang_change.
3795
3796 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3797
3798 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
3799 Similarly.
3800 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
3801 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
3802
3803 2001-03-09 Zack Weinberg <zackw@stanford.edu>
3804
3805 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
3806
3807 2001-03-08 Stan Shebs <shebs@apple.com>
3808
3809 * cp-tree.h (set_identifier_local_value): Remove unused decl.
3810
3811 2001-03-06 Zack Weinberg <zackw@stanford.edu>
3812
3813 * spew.c: Remove references to CPP_OSTRING.
3814
3815 2001-03-06 Andrew Haley <aph@redhat.com>
3816
3817 * typeck.c (convert_arguments): Check that we have an fndecl.
3818
3819 2001-03-05 Andrew Haley <aph@redhat.com>
3820
3821 * typeck.c (convert_arguments): Don't do ellipsis conversion for
3822 __built_in_constant_p.
3823
3824 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3825
3826 * typeck.c (build_static_cast): Allow enum to enum conversions
3827 as per DR 128.
3828
3829 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3830
3831 * class.c (check_field_decls): Pointers to member do not a
3832 non-pod struct make, as per DR 148.
3833
3834 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3835
3836 * call.c (joust): cp_pedwarn when using gnu extension concerning
3837 worst conversion sequences.
3838
3839 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3840
3841 * decl.c: Replace all uses of 'boolean' with 'bool'.
3842
3843 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3844
3845 * lang-specs.h: Add zero initializer for cpp_spec field to
3846 all array elements that need one. Don't put an #ifdef inside
3847 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
3848 use it.
3849
3850 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3851
3852 Implement using decls inside template functions.
3853 * decl2.c (validate_nonmember_using_decl): Don't special case
3854 fake_std_node in the global namespace. Don't reject early when
3855 processing a template.
3856 (do_local_using_decl): Add to statement tree. Don't do further
3857 processing when building a template.
3858 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
3859
3860 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3861
3862 * decl2.c (do_nonmember_using_decl): Don't complain if we find
3863 same function. Do complain about ambiguating extern "C"
3864 declarations.
3865
3866 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
3867
3868 Remove floating point and complex type template constant parms.
3869 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
3870 COMPLEX_TYPE extensions.
3871 (invalid_nontype_parm_type_p): Likewise.
3872
3873 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
3874
3875 * except.c (call_eh_info): Revert "match_function"'s type.
3876
3877 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
3878
3879 Fix ctor vtable vcall offsets.
3880 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
3881 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
3882 (get_matching_base): Remove.
3883 (get_original_base): New function.
3884 (build_vtbl_initializer): Initialize vid.rtti_binfo.
3885 Use a virtual thunk for a ctor vtable with an index
3886 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
3887 primary base within a constructor vtable. Only set
3888 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
3889 when primary base has been lost.
3890 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
3891
3892 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
3893
3894 * call.c (joust): Ensure more_specialized()'s argument length
3895 parameter has correct value for constructors.
3896
3897 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
3898
3899 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
3900
3901 * decl.c (mark_inlined_fns): Prototype.
3902
3903 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3904
3905 * spew.c (yylex): Correct handling of friends.
3906
3907 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3908
3909 * mangle.c (write_encoding): Pass write_function_type the
3910 FUNCTION_DECL for the function being encoded.
3911 (write_function_type): Pass it along to write_bare_function_type.
3912 (write_bare_function_type): Pass it along to write_method_parms.
3913 (write_method_parms): Don't mangle the compiler-generated
3914 parameters to a constructor or destructor.
3915
3916 2001-02-22 Andreas Jaeger <aj@suse.de>
3917
3918 * optimize.c: Include toplev.h for
3919 note_deferral_of_defined_inline_function prototype.
3920
3921 2001-02-22 Jakub Jelinek <jakub@redhat.com>
3922
3923 * cp-tree.h (struct lang_decl_inlined_fns): New.
3924 (struct lang_decls): Add inlined_fns.
3925 (DECL_INLINED_FNS): New macro.
3926 * optimize.c (struct inline_data): Add inlined_fns.
3927 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
3928 (inlinable_function_p): Likewise, fix typo in comment,
3929 function is not inlinable if it already inlined function currently
3930 being optimized.
3931 (expand_call_inline): Add fn to inlined_fns if necessary.
3932 (optimize_function): Initialize inlined_fns.
3933 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
3934 * decl.c (mark_inlined_fns): New function.
3935 (lang_mark_tree): Call it.
3936
3937 2001-02-21 Jason Merrill <jason@redhat.com>
3938
3939 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
3940 (DECL_UNINLINABLE): Move to middle-end.
3941
3942 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
3943 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
3944 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
3945 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
3946 parms and outer BLOCK. note_deferral_of_defined_inline_function.
3947
3948 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
3949 second parm of op=.
3950
3951 2001-02-19 Mark Mitchell <mark@codesourcery.com>
3952
3953 * decl2.c (set_decl_namespace): Allow explicit instantiations in
3954 any namespace.
3955
3956 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3957
3958 * optimize.c (expand_call_inline): Don't walk subtrees of type
3959 nodes.
3960
3961 2001-02-18 Mark Mitchell <mark@codesourcery.com>
3962
3963 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
3964 for a destructor.
3965
3966 2001-02-18 Jason Merrill <jason@redhat.com>
3967
3968 Do put the VTT parameter in DECL_ARGUMENTS.
3969 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
3970 (current_vtt_parm): New macro.
3971 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
3972 (DECL_HAS_VTT_PARM_P): New macro.
3973 (DECL_VTT_PARM): Remove.
3974 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
3975 * decl.c (duplicate_decls): Only copy the operator code if
3976 appropriate.
3977 (start_function): Set current_vtt_parm.
3978 (lang_mark_tree): Don't mark vtt_parm.
3979 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
3980 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
3981 * class.c (build_clone): Maybe remove the VTT parm.
3982 * optimize.c (maybe_clone_body): Set up the VTT parm.
3983 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
3984 * call.c (build_over_call): Just allow the VTT arg.
3985 * method.c (make_thunk): Don't set DECL_VTT_PARM.
3986 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
3987 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
3988 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
3989 * error.c (dump_function_decl): Likewise.
3990 * call.c (build_user_type_conversion_1, convert_like_real): Abort
3991 if we try to call a constructor with in-charge or VTT parms.
3992 * method.c (skip_artificial_parms_for): New fn.
3993 * call.c (add_function_candidate, build_over_call): Call it.
3994 * call.c (build_new_method_call): Use current_vtt_parm.
3995 * init.c (expand_virtual_init): Likewise.
3996 * class.c (same_signature_p): No longer static.
3997 * cp-tree.h: Declare it.
3998 * search.c (look_for_overrides_r): Use it.
3999
4000 2001-02-17 Mark Mitchell <mark@codesourcery.com>
4001
4002 * cp-tree.h (new_abi_rtti_p): Remove.
4003 (name_mangling_version): Likewise.
4004 (flag_do_squangling): Likewise.
4005 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4006 * decl.c (grokfndecl): Likewise.
4007 * decl2.c (name_mangling_version): Remove.
4008 (flag_do_squangling): Likewise.
4009 (lang_f_options): Remove `squangle'.
4010 (unsupported_options): Add `squangle'.
4011 (cxx_decode_option): Issue a warning about uses of
4012 -fname-mangling-version.
4013 (finish_file): Remove old ABI support.
4014 * pt.c (check_explicit_specialization): Likewise.
4015 (tsubst_decl): Likewise.
4016 * rtti.c (init_rtti_processing): Likewise.
4017 (build_headof): Likewise.
4018 (get_tinfo_decl_dynamic): Likewise.
4019 (tinfo_from_decl): Likewise.
4020 (build_dynamic_cast_1): Likewise.
4021 (synthesize_tinfo_var): Likewise.
4022 * init.c (build_new): Allow enumeration types for the array-bounds
4023 in a direct-new-declarator.
4024
4025 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4026
4027 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4028 TREE_PROTECTED from the template being specialized.
4029
4030 2001-02-17 Jason Merrill <jason@redhat.com>
4031
4032 * decl2.c (build_artificial_parm): Set TREE_READONLY.
4033
4034 * decl.c (bad_specifiers): Allow throw specs on things with
4035 pointer-to-function or -member-function type.
4036 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4037 a pmf.
4038
4039 2001-02-17 Mark Mitchell <mark@codesourcery.com>
4040
4041 * call.c (check_dtor_name): Handle template names correctly.
4042
4043 2001-02-16 Jason Merrill <jason@redhat.com>
4044
4045 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4046 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4047 * optimize.c (maybe_clone_body): Don't substitute it.
4048 * call.c (build_new_method_call): Check in_chrg instead.
4049 * init.c (expand_virtual_init): Likewise.
4050
4051 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
4052
4053 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4054 class-type introduces at least a type-name.
4055
4056 2001-02-16 Jakub Jelinek <jakub@redhat.com>
4057
4058 * call.c (convert_like_real): Create a temporary for non-lvalue.
4059
4060 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
4061
4062 * cp-tree.h: Fix typos in comments.
4063
4064 2001-02-16 Jason Merrill <jason@redhat.com>
4065
4066 * optimize.c (remap_block): If we're compiling a clone, pass the
4067 new block to insert_block.
4068
4069 2001-02-16 Mark Mitchell <mark@codesourcery.com>
4070
4071 * semantics.c (finish_asm_stmt): Robustify.
4072
4073 2001-02-15 Mark Mitchell <mark@codesourcery.com>
4074
4075 * pt.c (push_template_decl_real): Don't remangle the name of a
4076 class template.
4077
4078 2001-02-15 Jim Meyering <meyering@lucent.com>
4079
4080 * Make-lang.in (c++.install-common): Depend on installdirs.
4081 (c++.install-info): Likewise.
4082 (c++.install-man): Likewise.
4083
4084 2001-02-15 Mark Mitchell <mark@codesourcery.com>
4085
4086 * typeck2.c (build_m_component_ref): Robustify.
4087
4088 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
4089
4090 * friend.c (do_friend): Don't take the nested [template] class
4091 into account when deciding whether to warn about the friend
4092 function not referring to a template function.
4093
4094 2001-02-14 Jakub Jelinek <jakub@redhat.com>
4095
4096 * typeck.c (build_unary_op): Clarify error message.
4097
4098 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
4099
4100 * parse.y (component_constructor_declarator): allow optional
4101 parentheses around constructor class name.
4102
4103 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4104
4105 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4106 section.
4107 * init.c (emit_base_init): Remove incorrect comment about
4108 virtual bases.
4109 * method.c (make_thunk): Fix comment alignment.
4110
4111 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4112
4113 Kill remnants of this is variable.
4114 * cp-tree.h (flag_this_is_variable): Remove.
4115 * decl2.c (flag_this_is_variable): Remove.
4116 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4117 (build_vbase_path): The path is non-static, even in a cdtor.
4118 (resolves_to_fixed_type_p): Add additional return value.
4119 * search.c (init_vbase_pointers): Adjust.
4120 * tree.c (lvalue_p_1): Adjust.
4121 * typeck.c (mark_addressable): Adjust.
4122
4123 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4124
4125 * pt.c (unify): Don't check cv quals of array types.
4126
4127 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4128
4129 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4130 check whether we already have the type.
4131
4132 2001-02-13 Mark Mitchell <mark@codesourcery.com>
4133
4134 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4135 * call.c (build_op_delete_call): Simplify to remove duplicate
4136 code.
4137 * class.c (clone_function_decl): Don't build the deleting variant
4138 of a non-virtual destructor.
4139 * decl.c (finish_destructor_body): Don't call delete if this is a
4140 non-virtual destructor.
4141 * init.c (build_delete): Explicitly call `operator delete' when
4142 deleting an object with a non-virtual destructor.
4143
4144 2001-02-13 Jason Merrill <jason@redhat.com>
4145
4146 * lang-specs.h: Add more __EXCEPTIONS.
4147
4148 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4149
4150 * typeck2.c (process_init_constructor): Check
4151 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4152
4153 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4154
4155 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4156 Remove spurious information in comment. Allow further
4157 adjustments of REFERENCE_TYPE args.
4158
4159 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4160
4161 * errfn.c (cp_deprecated): Tweak diagnostic text.
4162 * parse.y (new_initializer): Deprecate initializer lists
4163 extension.
4164
4165 2001-02-12 Mark Mitchell <mark@codesourcery.com>
4166
4167 Remove old ABI support.
4168
4169 2001-02-11 Mark Mitchell <mark@codesourcery.com>
4170
4171 * decl2.c (flag_vtable_thunks): Always set it to 1.
4172 (flag_new_abi): Likewise.
4173 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4174
4175 * Makefile.in (g++spec.o): Fix typo.
4176
4177 2001-02-09 Jason Merrill <jason@redhat.com>
4178
4179 * lang-specs.h: Restore definition of __EXCEPTIONS.
4180
4181 2001-02-08 Jason Merrill <jason@redhat.com>
4182
4183 * search.c (shared_member_p): New function.
4184 (lookup_field_r): Use it.
4185 * cp-tree.h (SHARED_MEMBER_P): Remove.
4186
4187 * method.c (process_overload_item): Handle template-dependent array
4188 bounds.
4189 * pt.c (type_unification_real): If we end up with undeduced nontype
4190 parms, try again.
4191
4192 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4193 types.
4194
4195 * typeck2.c (friendly_abort): Don't say anything if we have
4196 earlier errors or sorries.
4197
4198 * decl.c (check_tag_decl): Notice attempts to redefine bool and
4199 wchar_t. Ignore if in_system_header.
4200
4201 * decl.c (maybe_push_cleanup_level): New fn...
4202 (start_decl_1): ...split out from here.
4203 * cvt.c (build_up_reference): Use it.
4204 * cp-tree.h: Declare it.
4205
4206 2001-02-07 Mark Mitchell <mark@codesourcery.com>
4207
4208 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4209 spec.
4210
4211 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
4212
4213 * pt.c (lookup_template_class): Make sure it's a primary
4214 template or template_template_parm when called from the parser.
4215 (instantiate_template_class): Add assertion.
4216
4217 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
4218
4219 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4220 from error_mark_node.
4221
4222 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
4223
4224 Fix specification and implementation bugs in V3 ABI
4225 construction vtables.
4226 * cp-tree.h (flag_dump_class_layout): New flag.
4227 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4228 (BINFO_LOST_PRIMARY_P): New flag.
4229 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4230 (BINFO_PRIMARY_MARKED_P): Rename to ...
4231 (BINFO_PRIMARY_P): ... here.
4232 (binfo_via_virtual): New prototype.
4233 * decl2.c (flag_dump_class_layout): New flag.
4234 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4235 use `=' as a file name separator.
4236 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4237 bases.
4238 (build_vtbl_address): If this is a virtual primary base, then
4239 get the vtbl of what it is ultimately primary for.
4240 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4241 for BINFO_PRIMARY_P.
4242 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4243 (get_shared_vbase_if_not_primary): Likewise.
4244 (dfs_get_pure_virtuals): Likewise.
4245 (expand_upcast_fixups): Likewise.
4246 (fixup_virtual_upcast_offsets): Likewise.
4247 (dfs_find_vbase_instance): Likewise.
4248 (find_vbase_instance): Likewise.
4249 (binfo_from_vbase): Adjust comment to reflect reality.
4250 (binfo_via_virtual): New function.
4251 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4252 for binfo walking during VTT construction.
4253 (dfs_mark_primary_bases): Remove.
4254 (force_canonical_binfo_r): New function.
4255 (force_canonical_binfo): New function.
4256 (mark_primary_virtual_base): New function.
4257 (mark_primary_bases): Walk in inheritance graph order, use
4258 mark_primary_virtual_base.
4259 (determine_primary_base): Use some more intermediate variables.
4260 (dfs_find_final_overrider): Don't check for overriding along a
4261 virtual path.
4262 (dfs_modify_vtables): Walk into primary virtual bases too.
4263 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4264 (build_base_fields): Likewise.
4265 (dfs_set_offset_for_unshared_vbases): Likewise.
4266 (layout_virtual_bases): Likewise.
4267 (end_of_class): Likewise.
4268 (finish_struct_1): Call dump_class_hierarchy, if requested.
4269 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4270 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4271 (dump_class_hierarchy): Add file parameter. Append to file, if
4272 required.
4273 (finish_vtbls): Adjust accumulate_vtbl_inits call.
4274 Use canonical base for virtual bases.
4275 (build_vtt): Add more comments. Adjust build_vtt_inits call.
4276 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4277 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4278 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4279 virtual VTTs.
4280 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4281 from DATA. We want virtual primary bases and all bases via virtual.
4282 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4283 virtual base when not a construction vtable.
4284 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4285 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4286 Use canonical bases when processing virtual bases.
4287 (accumulate_vtbl_inits): We're interested in any base via a
4288 virtual path.
4289 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4290 within a construction vtable, determine what is being overridden.
4291 (build_vtbl_initializer): Add more comments
4292 (add_vcall_offset_vtbl_entries_1): Adjust comment.
4293 (build_rtti_vtbl_entries): Check if the base has lost its
4294 primary.
4295
4296 2001-02-05 Mark Mitchell <mark@codesourcery.com>
4297
4298 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4299
4300 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4301
4302 * decl.c (pushdecl): Call abort instead of fatal.
4303 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4304 * init.c (build_new_1): Likewise.
4305 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4306 * decl.c (build_typename_type): hash_table_init now returns void.
4307 decl.c (init_decl_processing): Make an error non-fatal.
4308
4309 2001-02-04 Mark Mitchell <mark@codesourcery.com>
4310
4311 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4312 Document.
4313 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4314 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4315 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4316 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4317 * decl.c (maybe_commonize_var): Use the new name-mangling where
4318 appropriate.
4319 * decl2.c (comdat_linkage): Enhance comments. Make all
4320 compiler-generated things static, if COMDAT is not available.
4321 (get_tinfo_decl): Do not make typeinfo objects that belong in the
4322 library COMDAT.
4323 (tinfo_base_init): Use the correct mangled name for typeinfo
4324 strings, and push them into the global scope.
4325 (typeinfo_in_lib_p): New function.
4326 (synthesize_tinfo_var): Use it.
4327 (create_real_tinfo_var): Likewise.
4328
4329 2001-02-03 Jakub Jelinek <jakub@redhat.com>
4330
4331 * decl.c (push_class_binding): Use context_for_name_lookup instead
4332 of CP_DECL_CONTEXT.
4333 * search.c (context_for_name_lookup): Remove static. Check for NULL
4334 context in the loop.
4335 * cp-tree.h (context_for_name_lookup): Add prototype.
4336
4337 2001-02-02 Jakub Jelinek <jakub@redhat.com>
4338
4339 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4340 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4341 Remove.
4342 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4343 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4344
4345 2001-02-02 Mark Mitchell <mark@codesourcery.com>
4346
4347 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4348 of macros used when compiling g++spec.c.
4349 * g++spec.c (lang_specific_driver): Link with the shared
4350 libgcc by default.
4351
4352 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
4353
4354 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4355 make_reference_declarator, make_call_declarator), method.c
4356 (implicitly_declare_fn), parse.y (namespace_using_decl,
4357 notype_unqualified_id, expr_or_declarator, new_type_id,
4358 after_type_declarator, direct_after_type_declarator,
4359 notype_declarator, complex_notype_declarator,
4360 complex_direct_notype_declarator, qualified_id,
4361 notype_qualified_id, overqualified_id, direct_new_declarator,
4362 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4363 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4364 instead of build_parse_node.
4365
4366 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4367
4368 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4369 (minus_one_node): Moved to top level gcc directory. Renamed
4370 to integer_minus_one_node.
4371
4372 * init.c (init_init_processing): Don't set minus_one_node.
4373 (build_vec_init): Use integer_minus_one_node.
4374
4375 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4376
4377 2001-01-28 Jakub Jelinek <jakub@redhat.com>
4378
4379 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4380 identical and they would be replaced with constant, remove
4381 MODIFY_EXPR from the tree.
4382
4383 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4384
4385 * Make-lang.in: Remove all dependencies on defaults.h.
4386 * call.c: Don't include defaults.h.
4387 * decl.c: Likewise.
4388 * decl2.c: Likewise.
4389 * except.c: Likewise.
4390 * pt.c: Likewise.
4391 * rtti.c: Likewise.
4392 * tree.c: Likewise.
4393 * typeck.c: Likewise.
4394
4395 2001-01-25 Jakub Jelinek <jakub@redhat.com>
4396
4397 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4398 operators even in "C" linkage.
4399 * method.c (set_mangled_name_for_decl): Likewise.
4400 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4401 overloaded operators in "C" linkage.
4402
4403 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4404
4405 * pt.c (tsubst_decl): Remove IN_DECL parameter.
4406 (tsubst_arg_types): Check parameter is not void.
4407 (tsubst): Adjust tsubst_decl call.
4408
4409 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4410
4411 * call.c (add_builtin_candidate): Quote std properly, from
4412 previous change.
4413
4414 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4415
4416 * pt.c (check_explicit_specialization): Clone constructors and
4417 destructors.
4418
4419 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4420
4421 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4422 indicates anything special about template depth. Make sure we
4423 only count the user visible template classes.
4424
4425 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4426
4427 * call.c (build_conv): Typo in comment.
4428 (add_builtin_candidate): Add more explanation.
4429 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4430 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4431 when we have enumeral types.
4432 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4433 candidates for relops and eqops.
4434 (joust): Simplify control flow. Allow a non-template user
4435 function to hide a builtin.
4436
4437 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
4438
4439 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4440 (more_specialized): Add deduction parameter.
4441 * call.c (joust): Adjust more_specialized call.
4442 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4443 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4444 (get_bindings_order): Remove.
4445 (get_bindings_real): Add DEDUCE parameter.
4446 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4447 REFERENCE_TYPE jig for DEDUCE_ORDER.
4448 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4449 maybe_adjust_types_for_deduction.
4450 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4451 directly.
4452 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4453 (check_cv_quals_for_unify): Use new unify qualifier flags.
4454 (unify): Clear new unify qualifier flags.
4455 (get_bindings_real): Add DEDUCE parameter.
4456 (get_bindings): Adjust call to get_bindings_real.
4457 (get_bindings_overload): Likewise.
4458 (most_specialized_instantiation): Adjust call to
4459 more_specialized.
4460
4461 2001-01-19 Jason Merrill <jason@redhat.com>
4462
4463 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4464
4465 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4466 -fnew-abi.
4467
4468 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
4469
4470 * decl2.c (arg_assoc_class): Fix double iteration logic.
4471
4472 2001-01-19 Jason Merrill <jason@redhat.com>
4473
4474 * init.c (build_delete): Always call convert_force to strip cv-quals.
4475
4476 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4477 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4478 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4479
4480 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4481
4482 * search.c (get_vbase_1): Count only virtual bases.
4483
4484 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4485
4486 * class.c (duplicate_tag_error): Robustify flag clearing.
4487
4488 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4489
4490 * cp-tree.h (lookup_template_class): Add complain parm.
4491 * decl.c (lookup_namespace_name): Adjust call to
4492 lookup_template_class.
4493 (make_typename_type): Likewise.
4494 * semantics.c (finish_template_type): Likewise.
4495 * pt.c (lookup_template_class): Add complain parm. Adjust.
4496 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4497 (tsubst): Likewise.
4498
4499 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4500
4501 * pt.c (copy_default_args_to_explicit_spec): Preserve
4502 object's CV quals. Reorganize.
4503
4504 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4505
4506 * typeck.c (build_modify_expr): Say `initialization' for
4507 INIT_EXPRs.
4508 * init.c (build_default_init): Convert to enumeral type, if
4509 needed.
4510
4511 2001-01-18 Jakub Jelinek <jakub@redhat.com>
4512
4513 * parse.y (nomods_initdcl0): Properly set things up for
4514 initdcl0_innards.
4515
4516 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4517
4518 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4519 (type_unification_real): Set it.
4520 (unify): Use it.
4521
4522 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4523
4524 * decl.c (finish_destructor_body): Convert to vbase pointer here.
4525
4526 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4527
4528 * semantics.c (begin_class_definition): Check we're not inside a
4529 template parm list.
4530
4531 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4532
4533 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4534 BASELINK_P.
4535
4536 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4537
4538 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4539 * call.c (build_over_call): Add comment.
4540
4541 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4542
4543 * cvt.c (ocp_convert): Handle vector type conversion
4544 * typeck2.c (digest_init): Handle vector type initializations
4545
4546 2001-01-16 Phil Edwards <pme@sources.redhat.com>
4547
4548 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
4549 was given.
4550
4551 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4552
4553 * pt.c (check_nontype_parm): Rename to ...
4554 (invalid_nontype_parm_type_p): ... here.
4555 (process_template_parm): Adjust.
4556 (convert_template_argument): Adjust.
4557
4558 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4559
4560 * pt.c (check_nontype_parm): New function.
4561 (process_template_parm): Use it.
4562 (convert_template_argument): Use it.
4563 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
4564 member.
4565
4566 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
4567
4568 * tree.c: Add defaults.h
4569 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
4570 * Make-lang.in (cp/tree.o): Add defaults.h.
4571
4572 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4573
4574 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
4575
4576 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4577
4578 * g++.1: Change to be ".so man1/gcc.1".
4579
4580 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4581
4582 * Make-lang.in (c++.info, c++.install-info): Build and install g++
4583 internals info.
4584 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
4585 ($(srcdir)/cp/g++int.info): New target.
4586 * gxxint.texi: Add info directory entry. Use @@ in email address.
4587 * .cvsignore: Update.
4588
4589 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4590
4591 * typeck.c (build_c_cast): Do template processing earlier.
4592 Always pedwarn on array casts.
4593
4594 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4595
4596 * friend.c (make_friend_class): Make sure a templated class is
4597 actually a template.
4598
4599 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4600
4601 * decl2.c (get_guard): Set linkage from guarded decl.
4602
4603 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4604
4605 * call.c (convert_default_arg): Check for unprocessed
4606 DEFAULT_ARG.
4607 * cp-tree.h (replace_defarg): Move to spew.c.
4608 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
4609 spew.c, which is where they really are.
4610 (done_pending_defargs): Declare.
4611 (unprocessed_defarg_fn): Declare.
4612 * decl.c (replace_defarg): Move to spew.c
4613 * parse.y (structsp): Call done_pending_defargs.
4614 * spew.c (defarg_fns): Rearrange list structure.
4615 (defarg_fnsdone): New static variable.
4616 (defarg_depfns): New static variable.
4617 (init_spew): Adjust.
4618 (add_defarg_fn): Store the type in TREE_TYPE.
4619 (do_pending_defargs): Detect and deal with ordering constraints
4620 and circularity.
4621 (done_pending_defargs): New function.
4622 (unprocessed_defarg_fn): New function.
4623 (replace_defarg): Moved from decl.c. Robustify. Don't save
4624 if circularity detected.
4625
4626 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4627
4628 * pt.c (unify): Check array has a domain, before checking
4629 whether it is variable sized.
4630
4631 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4632
4633 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
4634 parameters with pointers to arrays of unknown bound.
4635
4636 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4637
4638 * parse.y (template_parm_header, template_spec_header): New
4639 reductions. Split out from ...
4640 (template_header): ... here. Use them.
4641 (template_template_parm): Use template_parm_header.
4642 * semantics.c (finish_template_template_parm): Add assert.
4643
4644 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4645
4646 * mangle.c (write_builtin_type): Fix thinko.
4647
4648 * pt.c (copy_default_args_to_explicit_spec_1): New function.
4649 (copy_default_args_to_explicit_spec): Likewise.
4650 (check_explicit_specialization): Use it.
4651
4652 * class.c (finish_struct_1): Remove last argument in call to
4653 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4654 * decl.c (builtin_function): Likewise.
4655 (build_cp_library_fn): Likewise.
4656 (check_initializer): Likewise.
4657 (make_rtl_for_nonlocal_decl): Likewise.
4658 (cp_finish_decl): Likewise.
4659 (start_function): Likewise.
4660 * decl2.c (finish_anon_union): Likewise.
4661 * friend.c (do_friend): Likewise.
4662 * init.c (build_java_class_ref): Likewise.
4663 * method.c (make_thunk): Likewise.
4664 * pt.c (tsubst_friend_function): Likewise.
4665 * semantics.c (expand_body): Likewise.
4666
4667 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4668
4669 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
4670 looking at DECL_CLONED_FUNCTION for non-functions.
4671
4672 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4673
4674 * error.c (dump_template_parameter): Use parm to determine how
4675 to print default value.
4676
4677 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4678
4679 * class.c (duplicate_tag_error): Clear more flags.
4680
4681 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4682
4683 * call.c (build_new_method_call): Use binfo_for_vbase.
4684
4685 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
4686
4687 * cp-tree.h (flag_cond_mismatch): Don't declare.
4688 * decl2.c (flag_cond_mismatch): Don't define.
4689 (lang_f_options): Remove cond-mismatch.
4690 (unsupported_options): Add cond-mismatch.
4691
4692 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
4693
4694 * class.c (handle_using_decl): Reject using of constructor name
4695 of sourcing class. Allow injecting of a method with same name as
4696 nested class. Fixup error messages.
4697
4698 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
4699
4700 * decl2.c (lang_decode_option): Handle -Wformat=2.
4701
4702 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4703
4704 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
4705 initialized_in_class.
4706 (DECL_DEFINED_IN_CLASS_P): Rename to ...
4707 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
4708 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
4709 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
4710 * pt.c (check_default_tmpl_args): Adjust for
4711 DECL_INITIALIZED_IN_CLASS_P.
4712 (instantiate_class_template): Likewise.
4713 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
4714
4715 * class.c (finish_struct): Constify saved_filename.
4716
4717 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4718
4719 * class.c (duplicate_tag_error): Adjust diagnostic.
4720 (finish_struct): Locally set location to start of struct.
4721 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
4722
4723 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4724
4725 * decl.c (struct binding_level): Adjust class_shadowed comments
4726 to reflect reality.
4727 (push_class_level_binding): Adjust comments to reflect reality.
4728 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
4729 Don't set TREE_VALUE on the class_shadowed list.
4730
4731 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4732
4733 * decl2.c (acceptable_java_type): Allow references too.
4734 * init.c (build_java_class_ref): When using the new ABI, search
4735 `class$' and have it mangled with `mangle_decl.'
4736 * mangle.c (write_java_integer_type_codes): New function.
4737 (write_builtin_type): Detect and mangle Java integer and real
4738 types.
4739
4740 2001-01-07 Mark Mitchell <mark@codesourcery.com>
4741
4742 * decl2.c (grokfield): Don't accept `asm' specifiers for
4743 non-static data members.
4744
4745 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4746
4747 * expr.c (cplus_expand_expr): Don't reset `target'.
4748
4749 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
4750
4751 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
4752
4753 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4754
4755 * parse.y (template_datadef): Check for error_mark_node.
4756
4757 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4758
4759 * cp-tree.def (DEFAULT_ARG): Make `x' class.
4760
4761 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
4762
4763 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
4764 (record_builtin_type): Make non-static.
4765 (flag_short_double): Don't declare.
4766 (init_decl_processing): Remove the creation of many tree nodes now
4767 in c_common_nodes_and_builtins.
4768 (build_void_list_node): New function.
4769 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
4770 * cp-tree.h (flag_short_wchar): Don't declare.
4771
4772 2001-01-04 Mark Mitchell <mark@codesourcery.com>
4773
4774 * call.c (build_conv): Don't use build1 for USER_CONV.
4775 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
4776
4777 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
4778
4779 * lex.c (lang_init): Call c_common_lang_init.
4780
4781 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4782
4783 * search.c (lookup_fnfields_here): Remove.
4784 (look_for_overrides_r): Use lookup_fnfields_1.
4785 Ignore functions from using declarations.
4786
4787 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4788
4789 Implement exceptions specifiers for implicit member functions.
4790 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
4791 * method.c (synthesize_exception_spec): New function.
4792 (locate_dtor, locate_ctor, locate_copy): New functions.
4793 (implicitly_declare_fn): Generate the exception spec too.
4794 * search.c (check_final_overrider): Check artificial functions
4795 too.
4796 * typeck2.c (merge_exception_specifiers): New function.
4797
4798 2001-01-03 Jason Merrill <jason@redhat.com>
4799
4800 * init.c (build_default_init): New fn.
4801 (perform_member_init): Split out from here.
4802 (build_new_1): Use it. Simplify initialization logic.
4803 (build_vec_init): Take an array, rather than a pointer and maxindex.
4804 Speed up simple initializations. Don't clean up if we're assigning.
4805 * cp-tree.h: Adjust.
4806 * decl2.c (do_static_initialization): Remove TREE_VEC case.
4807 * parse.y (new_initializer): Return void_zero_node for ().
4808 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
4809 * typeck2.c (digest_init): Only complain about user-written
4810 CONSTRUCTORs.
4811
4812 2000-12-22 Mike Stump <mrs@wrs.com>
4813
4814 * decl2.c: (max_tinst_depth): Increase to 50.
4815
4816 2001-01-02 Mark Mitchell <mark@codesourcery.com>
4817
4818 * class.c (invalidate_class_lookup_cache): Zero the
4819 previous_class_values.
4820 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
4821 TREE_INT_CST_HIGH.
4822 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
4823 * decl.c (free_bindings): New variable.
4824 (push_binding): Don't create a new binding if we have one on the
4825 free list.
4826 (pop_binding): Put old bindings on the free list.
4827 (init_decl_processing): Use size_int, not build_int_2.
4828 Register free_bindings as a GC root.
4829 (cp_make_fname_decl): Use size_int, not build_int_2.
4830 (push_inline_template_parms_recursive): Likewise.
4831 (end_template_parm_list): Likewise.
4832 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
4833 (tsubst_template_parms): Use size_int, not build_int_2.
4834 (tsubst): Likewise.
4835 * rtti.c (get_vmi_pseudo_type_info): Likewise.
4836
4837 2001-01-02 Richard Henderson <rth@redhat.com>
4838
4839 * parse.y (asm): Set ASM_INPUT_P.
4840
4841 2001-01-02 Jason Merrill <jason@redhat.com>
4842
4843 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
4844 for v3 ABI.
4845
4846 * typeck.c (cp_truthvalue_conversion): New fn.
4847 * cvt.c (ocp_convert): Use it.
4848
4849 * cp-tree.h: Lose c-common.c decls.
4850
4851 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
4852 * cvt.c (convert_to_void): Use type_unknown_p.
4853
4854 * typeck.c (strip_all_pointer_quals): Also strip quals from
4855 pointer-to-member types.
4856
4857 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
4858 parse.y as C.
4859
4860 * call.c (build_new_method_call): Do evaluate the object parameter
4861 when accessing a static member.
4862 * typeck.c (build_component_ref): Likewise.
4863
4864 2001-01-02 Andreas Jaeger <aj@suse.de>
4865
4866 * decl.c (cp_missing_noreturn_ok_p): New.
4867 (init_decl_processing): Set lang_missing_noreturn_ok_p.
4868
4869 2000-12-29 Jakub Jelinek <jakub@redhat.com>
4870
4871 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
4872
4873 2000-12-29 Mark Mitchell <mark@codesourcery.com>
4874
4875 * class.c (pushclass): Remove #if 0'd code.
4876 * cp-tree.h (overload_template_name): Remove.
4877 * decl.c (store_bindings): Simplify.
4878 (pop_from_top_level): Likewise.
4879 * pt.c (overload_template_name): Remove.
4880 (instantiate_decl): Don't call push_to_top_level if it's not
4881 needed.
4882
4883 2000-12-28 Mark Mitchell <mark@codesourcery.com>
4884
4885 * pt.c (register_local_specialization): Don't return a value.
4886 (lookup_template_class): Use move-to-front heuristic when looking
4887 up template instantiations.
4888 (instantiate_decl): Only push_to_top_level when we're actually
4889 going to instantiate the template.
4890
4891 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4892
4893 * search.c (binfo_for_vtable): Return least derived class, not
4894 most. Handle secondary vtables.
4895
4896 2000-12-22 Jason Merrill <jason@redhat.com>
4897
4898 * pt.c (more_specialized): Don't optimize len==0.
4899 (fn_type_unification): If we're adding the return type, increase len.
4900
4901 * typeck.c (build_binary_op): Fix pmf comparison logic.
4902
4903 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
4904 DECL_STATIC_FUNCTION_P.
4905
4906 * semantics.c (genrtl_finish_function): Don't try to jump to
4907 return_label unless it exists.
4908
4909 In partial ordering for a call, ignore parms for which we don't have
4910 a real argument.
4911 * call.c (joust): Pass len to more_specialized.
4912 (add_template_candidate_real): Strip 'this', pass len.
4913 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
4914 (get_bindings_order): New fn. Pass len down.
4915 (get_bindings_real): Strip 'this', pass len.
4916 (fn_type_unification): Likewise.
4917 (type_unification_real): Succeed after checking 'len' args.
4918 (most_specialized_instantiation): Lose explicit_args parm.
4919 * class.c (resolve_address_of_overloaded_function): Strip 'this',
4920 pass len.
4921
4922 2000-12-21 Jason Merrill <jason@redhat.com>
4923
4924 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
4925 DECL_TEMPLATE_RESULT.
4926
4927 * search.c (lookup_field_r): Call lookup_fnfields_1, not
4928 lookup_fnfields_here.
4929
4930 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
4931
4932 * call.c (build_object_call): Also allow conversions that return
4933 reference to pointer to function.
4934 (add_conv_candidate): Handle totype being ref to ptr to fn.
4935 (build_field_call): Also allow members of type reference to function.
4936 Lose support for calling pointer to METHOD_TYPE fields.
4937
4938 * error.c (dump_expr): Handle *_CAST_EXPR.
4939
4940 * typeck2.c (build_scoped_ref): Always convert to the naming class.
4941
4942 * tree.c (break_out_cleanups): Lose.
4943 * cp-tree.h: Remove prototype.
4944 * typeck.c (build_component_ref): Don't break_out_cleanups.
4945 (build_compound_expr): Likewise.
4946 * semantics.c (finish_expr_stmt): Likewise.
4947
4948 2000-12-20 Richard Henderson <rth@redhat.com>
4949
4950 * cp-tree.h: Update declarations.
4951 * decl.c (finish_case_label): Return the new stmt node.
4952 * semantics.c (finish_goto_stmt): Likewise.
4953 (finish_expr_stmt, finish_return_stmt): Likewise.
4954 (finish_break_stmt, finish_continue_stmt): Likewise.
4955 (finish_asm_stmt): Likewise.
4956 * parse.y (already_scoped_stmt): Set STMT_LINENO.
4957 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
4958 (simple_if, simple_stmt): Return the new stmt node.
4959 (save_lineno): New.
4960
4961 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
4962
4963 * cp-tree.h: Don't declare warn_long_long.
4964
4965 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4966
4967 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
4968 IS_AGGR_TYPE.
4969
4970 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4971
4972 * pt.c (unify): Handle when both ARG and PARM are
4973 BOUND_TEMPLATE_TEMPLATE_PARM.
4974
4975 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4976
4977 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
4978 DECL_TEMPLATE_PARM_P.
4979
4980 2000-12-15 Jason Merrill <jason@redhat.com>
4981
4982 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
4983
4984 * init.c (build_new_1): Don't strip quals from type.
4985
4986 * decl.c (pushdecl): Don't check for linkage on a non-decl.
4987
4988 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
4989
4990 * call.c (build_new_function_call): Lose space before paren in
4991 error message.
4992 (build_new_method_call): Likewise.
4993
4994 * typeck2.c (build_m_component_ref): Propagate quals from datum.
4995
4996 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4997
4998 * pt.c (check_explicit_specialization): Propagate default
4999 function arguments to explicit specializations.
5000
5001 2000-12-13 DJ Delorie <dj@redhat.com>
5002
5003 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5004 and <? operators.
5005
5006 2000-12-08 Jason Merrill <jason@redhat.com>
5007
5008 * error.c (dump_function_name): Don't let the user see __comp_ctor.
5009
5010 Clean up copy-initialization in overloading code.
5011 * call.c (build_user_type_conversion_1): Die if we are asked to
5012 convert to the same or a base type.
5013 (implicit_conversion): Avoid doing so. Lose reference binding code.
5014 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5015 direct-initialization. Also do direct-init part of copy-init.
5016 (build_user_type_conversion): Don't provide context to convert_like.
5017 * cvt.c (ocp_convert): build_user_type_conversion will now provide
5018 the constructor call for copy-init.
5019
5020 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5021 instantiation of a member template.
5022 (do_decl_instantiation): Not here.
5023
5024 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
5025
5026 * class.c (check_field_decls): Don't special case anonymous
5027 fields in error messages.
5028 (note_name_declared_in_class): Use %D on diagnostic.
5029
5030 * tree.c (pod_type_p): Use strip_array_types.
5031 (cp_valid_lang_attribute): Likewise.
5032 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5033 multiple evaluations.
5034 (cp_has_mutable_p): Use strip_array_types.
5035
5036 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
5037
5038 * cp-tree.h (sufficient_parms_p): Declare new function.
5039 * call.c (sufficient_parms_p): New function, broken out of ...
5040 (add_function_candidate): ... here. Use it.
5041 (add_conv_candidate): Use it.
5042 * decl.c (grok_ctor_properties): Use it.
5043
5044 2000-12-07 Jakub Jelinek <jakub@redhat.com>
5045
5046 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5047
5048 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
5049
5050 * decl2.c (lang_decode_option): Handle -Wformat-security.
5051
5052 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5053
5054 * pt.c (verify_class_unification): New function.
5055 (get_class_bindings): Use it.
5056 (try_class_unification): Tidy.
5057 (unify): Handle when argument of a template-id is not
5058 template parameter dependent.
5059 (template_args_equal): Handle when TREE_CODE's do not match.
5060
5061 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
5062
5063 * lang-specs.h (c++): When invoking the stand-alone preprocessor
5064 for -save-temps, pass all relevant -Defines to it, and then don't
5065 pass them to cc1plus.
5066
5067 2000-12-05 Will Cohen <wcohen@redhat.com>
5068
5069 * decl.c (finish_case_label): Cleared
5070 more_cleanups_ok in surrounding function scopes.
5071 (define_label): Likewise.
5072
5073 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
5074
5075 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5076 (get_matching_virtual): Remove.
5077 (look_for_overrides): Declare new function.
5078 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5079 DECL_VINDEX here.
5080 * class.c (check_for_override): Move base class iteration code
5081 to look_for_overrides.
5082 * search.c (next_baselink): Remove.
5083 (get_virtuals_named_this): Remove.
5084 (get_virtual_destructor): Remove.
5085 (tree_has_any_destructors_p): Remove.
5086 (struct gvnt_info): Remove.
5087 (check_final_overrider): Remove `virtual' from error messages.
5088 (get_matching_virtuals): Remove. Move functionality to ...
5089 (look_for_overrides): ... here, and ...
5090 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5091 to be overriding.
5092
5093 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
5094
5095 * typeck.c (get_delta_difference): If via a virtual base,
5096 return zero.
5097 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5098 adjustment.
5099
5100 2000-12-04 Richard Henderson <rth@redhat.com>
5101
5102 * error.c (dump_tree): Use output_add_string not OB_PUTS.
5103
5104 2000-12-04 Jason Merrill <jason@redhat.com>
5105
5106 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5107 (write_builtin_type): Pass intSI_type_node and the like through
5108 type_for_mode.
5109 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5110 Pass intSI_type_node and the like through type_for_mode.
5111 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5112 * pt.c (tsubst, unify): Likewise.
5113 * tree.c (walk_tree): Likewise.
5114 * error.c (dump_type): Likewise.
5115 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5116
5117 * Make-lang.in: Tweak top comment for emacs.
5118 (cp/TAGS): Restore.
5119
5120 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5121
5122 * class.c (clone_function_decl): Robustify.
5123
5124 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
5125
5126 * decl.c (store_bindings): Only search in the non modified
5127 old_bindings for duplicates.
5128
5129 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
5130
5131 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5132 TYPE_POLYMORPHIC_P.
5133
5134 * typeck.c (build_static_cast): Remove unused variable.
5135
5136 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5137
5138 * pt.c: Fix typo in comment.
5139
5140 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5141
5142 * decl2.c (warn_format): Remove definition.
5143 (lang_decode_option): Handle -Wformat-nonliteral,
5144 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
5145
5146 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5147
5148 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5149 (init_decl_processing): Don't create string_type_node,
5150 const_string_type_node, wint_type_node, intmax_type_node,
5151 uintmax_type_node, default_function_type, ptrdiff_type_node and
5152 unsigned_ptrdiff_type_node. Adjust position of call to
5153 c_common_nodes_and_builtins.
5154 (identifier_global_value): New function.
5155
5156 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
5157
5158 * call.c (standard_conversion): Reject pointer to member
5159 conversions from ambiguous, inaccessible or virtual bases.
5160 * typeck.c (build_static_cast): Don't check pointers to members
5161 specially.
5162
5163 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5164
5165 * method.c (do_build_copy_constructor): Preserve cv
5166 qualifications when accessing source object members.
5167 (do_build_assign_ref): Likewise. Remove separate diagnostics for
5168 unnamed fields.
5169
5170 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5171
5172 * method.c (do_build_assign_ref): Construct appropriately
5173 CV-qualified base reference. Don't allow const casts in base
5174 conversion.
5175
5176 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5177
5178 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5179 incomplete return type.
5180
5181 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5182
5183 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5184 * semantics.c (finish_base_specifier): Accept a _TYPE not a
5185 _DECL.
5186
5187 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5188
5189 * spew.c (yyerror): Cope if yylval.ttype is NULL.
5190
5191 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5192
5193 * decl.c (grokdeclarator): Diagnose undefined template contexts.
5194
5195 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5196
5197 * decl.c (grokdeclarator): Do type access control on friend
5198 class.
5199
5200 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5201
5202 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5203 bison parser ickiness.
5204 * pt.c (tsubst_friend_function): Enter namespace scope when
5205 tsubsting the function name.
5206 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5207
5208 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5209
5210 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5211 * cvt.c (cp_convert_to_pointer): Add force parameter.
5212 Allow conversions via virtual base if forced.
5213 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5214 (ocp_convert): Likewise.
5215 * search.c (binfo_from_vbase): Return the virtual base's binfo.
5216 * typeck.c (get_delta_difference): Adjust handling of virtual
5217 bases.
5218
5219 2000-11-26 Mark Mitchell <mark@codesourcery.com>
5220
5221 * tree.c (struct list_hash): Remove.
5222 (list_hash_table): Make it be an htab.
5223 (struct list_proxy): New type.
5224 (list_hash_eq): New function.
5225 (list_hash_pieces): Renamed from ...
5226 (list_hash): ... this.
5227 (list_hash_lookup): Remove.
5228 (list_hash_add): Remove.
5229 (hash_tree_cons): Use the generic hashtable.
5230 (mark_list_hash): Remove.
5231 (init_tree): Create the hashtable.
5232
5233 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
5234
5235 * method.c (build_mangled_C9x_name): Rename to
5236 build_mangled_C99_name. Change C9X references in comments to
5237 refer to C99.
5238
5239 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5240
5241 * parse.y (unary_expr): Move VA_ARG from here ...
5242 (primary): ... to here.
5243
5244 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5245
5246 * semantics.c (finish_id_expr): If type is error_mark, return
5247 error_mark.
5248
5249 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
5250
5251 * pt.c (lookup_template_class): Simplify loop exit constructs.
5252 Cope when there is no partial instantiation of a template
5253 template member.
5254
5255 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
5256
5257 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5258
5259 2000-11-22 Mark Mitchell <mark@codesourcery.com>
5260
5261 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5262 prefix.
5263
5264 * pt.c (do_decl_instantiate): Explicitly clone constructors and
5265 destructors that haven't already been cloned.
5266
5267 2000-11-20 Richard Henderson <rth@redhat.com>
5268
5269 * parse.y (yyparse_1): Rename the parser entry point.
5270
5271 2000-11-20 Alex Samuel <samuel@codesourcery.com>
5272
5273 * mangle.c (write_name): Use <unscoped-name> for names directly in
5274 function scope.
5275 (write_unscoped_name): Accept names directly in function scope.
5276
5277 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
5278
5279 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5280 * parse.y (extdef): Add EXPORT reduction.
5281 * spew.c (yylex): Don't skip export here.
5282
5283 2000-11-19 Mark Mitchell <mark@codesourcery.com>
5284
5285 * decl.c (init_decl_processing): Correct name of pure virtual
5286 function under the new ABI.
5287 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5288 (throw_bad_typeid): Likewise for bad typeid function.
5289
5290 2000-11-18 Mark Mitchell <mark@codesourcery.com>
5291
5292 * decl.c (grokparms): Don't even function types of `void' type,
5293 either.
5294 * mangle.c (write_type): Don't crash when confronted with the
5295 error_mark_node.
5296
5297 * decl.c (grokparms): Don't create parameters of `void' type.
5298
5299 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
5300
5301 * lex.c (mark_impl_file_chain): Delete.
5302 (init_parse): Remove call to ggc_add_string_root. No need to
5303 ggc_strdup a string constant. Do not add impl_file_chain to GC
5304 roots.
5305 (handle_pragma_implementation): No need to ggc_strdup main_filename.
5306
5307 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5308
5309 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5310
5311 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5312
5313 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5314 * decl.c (grokdeclarator): Don't reject void parms here.
5315 (require_complete_types_for_parms): Simplify, use
5316 complete_type_or_else.
5317 (grokparms): Remove bitrot. Remove funcdef parm.
5318 Deal with ellipsis parm lists here.
5319 * semantics.c (finish_parmlist): Don't append void_list_node
5320 here. Set PARMLIST_ELLIPSIS_P.
5321
5322 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5323
5324 * typeck2.c (incomplete_type_error): Reorganise to avoid
5325 excessive diagnostics.
5326
5327 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
5328
5329 * lex.c (struct impl_files, internal_filename): Constify a char *.
5330
5331 2000-11-16 Mark Mitchell <mark@codesourcery.com>
5332
5333 * mangle.c (write_special_name_constructor): Don't generate
5334 assembler junk when confronted with an old-style constructor.
5335 (write_special_name_destructor): Likewise.
5336 (mangle_decl_string): Do it here instead.
5337
5338 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
5339
5340 * call.c (op_error): Make error messages clearer.
5341
5342 2000-11-15 Mark Mitchell <mark@codesourcery.com>
5343
5344 * decl.c (wrapup_globals_for_namespace): Don't mark things
5345 TREE_ASM_WRITTEN when they're not.
5346
5347 2000-11-15 Jason Merrill <jason@redhat.com>
5348
5349 * typeck2.c (friendly_abort): Uncount the error before handing
5350 off to fancy_abort.
5351
5352 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
5353
5354 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5355
5356 2000-11-14 Mark Mitchell <mark@codesourcery.com>
5357
5358 * class.c (build_vtbl_initializer): Fix typo in comment.
5359 * typeck.c (expr_sizeof): Don't crash on errors.
5360
5361 2000-11-14 Jim Wilson <wilson@redhat.com>
5362
5363 * lang-specs.h: Add %2 after %(cc1_options).
5364
5365 2000-11-14 Richard Henderson <rth@redhat.com>
5366
5367 * typeck.c (c_sizeof): Be strict about casting result value
5368 back to c_size_type_node.
5369 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5370
5371 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
5372
5373 * typeck.c (build_unary_op): Use boolean_increment from
5374 c-common.c, moving the relevant code there.
5375
5376 2000-11-11 Jason Merrill <jason@redhat.com>
5377
5378 * typeck.c (mark_addressable): Don't call put_var_into_stack.
5379
5380 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5381 in inlines.
5382
5383 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5384
5385 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5386 * lex.c (copy_lang_decl): Likewise.
5387
5388 2000-11-09 Mark Mitchell <mark@codesourcery.com>
5389
5390 * dump.c (cp_dump_tree): Don't dump function bodies here.
5391
5392 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5393 (dump.o): Update dependency list.
5394 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5395 (flag_dump_translation_unit): Likewise.
5396 (CP_TYPE_QUALS): Adjust definition.
5397 (DECL_C_BIT_FIELD): Remove.
5398 (SET_DECL_C_BIT_FIELD): Likewise.
5399 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5400 (add_maybe_template): Likewise.
5401 (strip_array_types): Likewise.
5402 (dump_node_to_file): Likewise.
5403 (cp_dump_tree): New function.
5404 * decl.c (init_decl_processing): Set lang_dump_tree.
5405 * decl2.c (flag_dump_translation_unit): Remove.
5406 * dump.c: Move most of it to ../c-dump.c.
5407 (cp_dump_tree): New function.
5408 * pt.c (add_maybe_template): Remove.
5409 * typeck.c (strip_array_types): Likewise.
5410
5411 2000-11-07 Eric Christopher <echristo@redhat.com>
5412
5413 * decl.c (init_decl_processing): Change definition of
5414 __wchar_t to wchar_t. Remove artificial declaration of
5415 wchar_t.
5416 * lex.c: Change instances of __wchar_t to wchar_t.
5417
5418 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
5419
5420 * lex.c (do_identifier): Don't lookup_name for operators.
5421 * parse.y (operator): Save looking_for_typename.
5422 (unoperator): Restore it.
5423 * spew.c (frob_opname): Use nth_token for lookahead.
5424
5425 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
5426
5427 * decl.c (grok_op_properties): Always use coerce_new_type and
5428 coerce_delete_type.
5429 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5430 exception specification. Tidy up.
5431 (coerce_delete_type): Preserve exception specification. Tidy up.
5432
5433 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
5434
5435 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5436 (push_binding_level), error.c (cp_tree_printer), pt.c
5437 (process_partial_specialization, tsubst_template_arg_vector),
5438 search.c (lookup_member): Use memset () instead of bzero ().
5439
5440 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
5441
5442 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5443
5444 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
5445
5446 * Make-lang.in (c++.distdir): Remove.
5447
5448 2000-11-04 Mark Mitchell <mark@codesourcery.com>
5449
5450 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5451 declarations from different namespaces to be combined.
5452
5453 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
5454
5455 * decl.c: Include tm_p.h.
5456
5457 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
5458
5459 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5460
5461 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
5462
5463 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5464 (build_overload_value), repo.c (open_repo_file), xref.c
5465 (open_xref_file): Use strchr () and strrchr () instead of index ()
5466 and rindex ().
5467
5468 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
5469
5470 * call.c (build_over_call): Call fold on the CALL_EXPR.
5471
5472 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
5473
5474 * error.c (dump_template_decl): Separate template hearders with
5475 space not comma.
5476
5477 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
5478
5479 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
5480 TS_* flags with corresponding TFF_*. Adjust prototypes of
5481 functions (which used to take a tree_string_flags) to take an int.
5482
5483 * cp-tree.h (enum tree_string_flags): Remove
5484 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5485 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5486 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5487 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5488 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5489 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5490 (type_as_string, decl_as_string, expr_as_string,
5491 context_as_string): Adjust prototype.
5492
5493 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5494 instead of TS_PLAIN.
5495
5496 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5497 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5498 plain `0'.
5499
5500 2000-10-30 Mark Mitchell <mark@codesourcery.com>
5501
5502 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5503 (linkage_kind): New enumeration.
5504 (decl_linkage): New function.
5505 * decl2.c (comdat_linkage): Extend comment.
5506 * error.c (dump_function_decl): Print the arguments used to
5507 instantiate a template, even when not printing the type of the
5508 function.
5509 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5510 not TREE_PUBLIC, to test for external linkage.
5511 * tree.c (decl_linkage): New function.
5512
5513 2000-10-28 Mark Mitchell <mark@codesourcery.com>
5514
5515 * pt.c (instantiate_decl): Always instantiate static data members
5516 initialized in-class.
5517
5518 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
5519
5520 * Make-lang.in: Move all build rules here from Makefile.in,
5521 adapt to new context. Wrap all rules that change the current
5522 directory in parentheses. Expunge all references to $(P).
5523 When one command depends on another and they're run all at
5524 once, use && to separate them, not ;. Add OUTPUT_OPTION to
5525 all object-file generation rules. Delete obsolete variables.
5526
5527 * Makefile.in: Delete.
5528 * config-lang.in: Delete outputs= line.
5529
5530 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
5531
5532 * error.c (dump_function_decl): Print no space between
5533 `ptr-operator' the `type-specifier' of the return type.
5534 (dump_type_prefix): Make sure we put space at the appropriate
5535 place.
5536
5537 2000-10-23 Jason Merrill <jason@redhat.com>
5538
5539 * call.c (equal_functions): Also call decls_match for extern "C" fns.
5540
5541 2000-10-22 Jason Merrill <jason@redhat.com>
5542
5543 * call.c (build_conditional_expr): Use ocp_convert to force
5544 rvalue conversion.
5545
5546 2000-10-22 Mark Mitchell <mark@codesourcery.com>
5547
5548 * call.c (standard_conversion): Use RVALUE_CONVs for all
5549 expressions that satisfy lvalue_p, not just those that satisfy
5550 real_lvalue_p.
5551
5552 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5553
5554 * typeck.c (c_sizeof): Return an expression of `size_t' type,
5555 not one with TYPE_IS_SIZETYPE set.
5556 (dubious_conversion_warnings): Remove special-case code.
5557
5558 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
5559
5560 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
5561 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
5562 (dump_type_prefix): Print vector-of-int as 'int vector'.
5563 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
5564 * tree.c (walk_tree): Handle VECTOR_TYPE.
5565
5566 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5567
5568 2000-10-21 Jason Merrill <jason@redhat.com>
5569
5570 * parse.y (operator): Set got_object from got_scope.
5571 Set looking_for_typename.
5572 * decl.c (lookup_name_real): Clear val after setting from_obj.
5573 Reorganize diagnostic.
5574
5575 2000-10-20 Jason Merrill <jason@redhat.com>
5576
5577 * tree.c (walk_tree): Don't walk into default args.
5578
5579 * error.c (dump_expr): Use host_integerp.
5580
5581 2000-10-20 David Edelsohn <edelsohn@gnu.org>
5582
5583 * typeck2.c (abstract_virtuals_error): Use "because" instead of
5584 "since" in error message.
5585
5586 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5587
5588 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
5589
5590 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
5591
5592 * decl.c (revert_static_member_fn): Fixed typo.
5593
5594 2000-10-19 Mark Mitchell <mark@codesourcery.com>
5595
5596 * class.c (subobject_offset_fn): New type.
5597 (dfs_record_base_offsets): Remove.
5598 (record_base_offsets): Likewise.
5599 (dfs_search_base_offsets): Likewise.
5600 (record_subobject_offset): New function.
5601 (check_subobject_offset): Likewise.
5602 (walk_subobject_offsets): Likewise.
5603 (record_subobject_offsets): Likewise.
5604 (layout_conflict_p): Reimplement.
5605 (layout_nonempty_base_or_field): Correct handling of type
5606 conflicts during layout.
5607 (layout_empty_base): Likewise.
5608 (build_base_field): Adjust to handle new representation of empty
5609 base offset table.
5610 (build_base_fields): Likewise.
5611 (layout_virtual_bases): Likewise.
5612 (splay_tree_compare_integer_csts): New function.
5613 (layout_class_type): Use a splay_tree, rather than a varray, to
5614 represent the offsets of empty bases.
5615
5616 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
5617 * decl.c (select_decl): Don't return declarations that are
5618 DECL_ANTICIPATED.
5619
5620 2000-10-18 Mark Mitchell <mark@codesourcery.com>
5621
5622 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
5623 (fake_std_node): New macro.
5624 * decl.c (in_std): Rename to ...
5625 (in_fake_std): ... this.
5626 (flag_no_builtin): Remove.
5627 (flag_no_nonansi_builtin): Likewise.
5628 (walk_namespaces_r): Use fake_std_node.
5629 (push_namespace): Use std_identifier.
5630 (pop_namespace): Use in_fake_std.
5631 (lookup_name_real): Use fake_std_node.
5632 (init_decl_processing): When -fhonor-std, create the `std'
5633 namespace. Don't create a dummy fake_std_node in that case.
5634 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
5635 (builtin_function): Put builtins whose names don't begin
5636 with `_' in the std namespace.
5637 * decl2.c (flag_no_builtin): Remove.
5638 (flag_no_nonansi_builtin): Likewise.
5639 (set_decl_namespace): Use fake_std_node.
5640 (validate_nonmember_using_decl): Likewise.
5641 (do_using_directive): Likewise.
5642 (handle_class_head): Likewise.
5643 * dump.c (dequeue_and_dump): Likewise.
5644 * except.c (init_exception_processing): Use std_identifier.
5645 * init.c (build_member_call): Use fake_std_node.
5646 * rtti.c (init_rtti_processing): Use std_identifier.
5647
5648 2000-10-17 Mark Mitchell <mark@codesourcery.com>
5649
5650 * cp-tree.h (back_end_hook): Remove declaration.
5651 * decl2.c (back_end_hook): Remove definition.
5652
5653 * dump.c (dequeue_and_dump): Dump TREE_USED.
5654
5655 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
5656
5657 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
5658
5659 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5660
5661 * decl.c (WINT_TYPE): Define.
5662 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
5663 c_size_type_node, signed_size_type_node and wint_type_node.
5664
5665 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5666
5667 * decl2.c (warn_missing_format_attribute): New variable.
5668 (lang_decode_option): Decode -Wmissing-format-attribute.
5669
5670 2000-10-16 Mark Mitchell <mark@codesourcery.com>
5671
5672 * typeck.c (qualify_type): Remove.
5673 (composite_pointer_type): Fix handling of conversions to `cv void*'.
5674
5675 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5676
5677 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
5678
5679 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5680
5681 * Makefile.in (parse.c, parse.h): Create atomically.
5682
5683 2000-10-12 Mark Mitchell <mark@codesourcery.com>
5684
5685 * class.c (current_obstack): Remove.
5686 * decl.c (ggc_p): Remove.
5687 (start_decl): Don't use decl_tree_cons.
5688 (grokdeclarator): Don't use build_decl_list.
5689 (start_function): Don't use decl_tree_cons.
5690 (finish_function): Don't mess with obstacks.
5691 * decl2.c (grok_x_components): Don't use build_decl_list.
5692 * lex.c (make_call_declarator): Don't call decl_tree_cons.
5693 (implicitly_declare_fn): Don't call build_decl_list.
5694 * parse.y (frob_specs): Don't call build_decl_list or
5695 decl_tree_cons.
5696 (expr_or_declarator_intern): Don't call decl_tree_cons.
5697 (primary): Don't call build_decl_list.
5698 (fcast_or_absdcl): Likewise.
5699 (typed_declspecs): Don't call decl_tree_cons.
5700 (reserved_declspecs): Don't call build_decl_list.
5701 (declmods): Likewise.
5702 (reserved_typespecquals): Likewise.
5703 (aggr): Likewise.
5704 (new_type_id): Likewise.
5705 (cv_qualifiers): Likewise.
5706 (after_type_declarator_intern): Likewise.
5707 (notype_declarator_intern): Likewise.
5708 (absdcl_intern): Likewise.
5709 (named_parm): Likewise.
5710 * pt.c (most_specialized_class): Likewise.
5711 * repo.c (temporary_obstack): Make it a structure, not a pointer.
5712 (init_repo): Initialize it.
5713 * search.c (current_obstack): Remove.
5714 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5715
5716 2000-10-09 Richard Henderson <rth@cygnus.com>
5717
5718 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
5719 (c++ language support bits for libgcc): Remove.
5720 (c++.clean): Remove cplib2.txt cleanup.
5721 * config-lang.in (headers, lib2funcs): Remove.
5722
5723 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
5724 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
5725 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
5726 * inc/new.h, inc/typeinfo: Remove files.
5727
5728 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
5729
5730 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
5731 defined.
5732 (init_decl_processing): Initialize intmax_type_node and
5733 uintmax_type_node.
5734
5735 2000-10-06 Richard Henderson <rth@cygnus.com>
5736
5737 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
5738 (original_result_rtx): Remove.
5739 * decl.c (save_function_data): Don't clear x_result_rtx.
5740 (mark_lang_function): Don't mark it either.
5741 * expr.c (fixup_result_decl): Remove.
5742 * semantics.c (genrtl_named_return_value): Frob the return decl
5743 before calling emit_local_var.
5744 (genrtl_finish_function): Don't call fixup_result_decl.
5745 Always emit the jump to return_label.
5746
5747 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
5748
5749 * pt.c (lookup_template_class): Set current access for enum.
5750 (tsubst_enum): Set file & line for enum decl.
5751
5752 * spew.c (yylex): Remove unused variable.
5753
5754 2000-10-05 Richard Henderson <rth@cygnus.com>
5755
5756 * semantics.c (genrtl_finish_function): Don't init or check
5757 can_reach_end; remove noreturn and return value checks.
5758
5759 2000-10-05 Tom Tromey <tromey@cygnus.com>
5760
5761 * init.c (build_java_class_ref): Use `build_static_name' with a
5762 suffix, not a prefix, to build the class object's name.
5763
5764 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5765
5766 * cp-tree.h (access_kind): Fix comment typo.
5767 * decl2.c (grokfield): Fix diagnostic typo.
5768 * semantics.c (finish_template_type): Fix comment typo.
5769 (finish_qualified_object_call_expr): Likewise.
5770
5771 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5772
5773 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5774 tsubsting fails.
5775
5776 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5777
5778 * spew.c (frob_id): New static function.
5779 (frob_opname): Use it.
5780 (yylex): Use it.
5781
5782 2000-10-01 Mark Mitchell <mark@codesourcery.com>
5783
5784 * decl.c (lang_mark_false_label_stack): Remove.
5785 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5786
5787 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
5788
5789 * gxxint.texi: Use @email for formatting email addresses.
5790
5791 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
5792
5793 * error.c: Remove direct obstack manipulation. Replace with
5794 output_buffer-based formatting. Adjust calls to removed macros.
5795 (obstack_chunk_alloc, obstack_chunk_free): Remove.
5796 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
5797 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
5798
5799 2000-09-24 Mark Mitchell <mark@codesourcery.com>
5800
5801 * ir.texi: Move to ../c-tree.texi.
5802
5803 2000-09-20 Jason Merrill <jason@redhat.com>
5804
5805 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
5806
5807 2000-09-21 Andreas Jaeger <aj@suse.de>
5808
5809 * errfn.c: Move declaration of cp_printer and cp_printers to ...
5810 * cp-tree.h: ... here.
5811
5812 * error.c: Remove declaration of cp_printer.
5813
5814 2000-09-20 Mark Mitchell <mark@codesourcery.com>
5815
5816 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
5817
5818 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
5819
5820 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
5821 users.
5822
5823 2000-09-18 Mark Mitchell <mark@codesourcery.com>
5824
5825 * decl.c (start_function): Robustify.
5826
5827 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5828
5829 * cp-tree.h (check_function_format): Accept a `status' parameter.
5830
5831 * call.c, typeck.c: Updates calls to `check_function_format'.
5832
5833 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
5834
5835 * decl2.c (handle_class_head): Always push some scope even
5836 in the error case.
5837
5838 2000-09-16 Mark Mitchell <mark@codesourcery.com>
5839
5840 * cp-tree.h (struct cp_language_function): Remove
5841 x_scope_stmt_stack and name_declared.
5842 (current_scope_stmt_stack): Remove.
5843 (function_name_declared_p): New macro.
5844 (struct lang_decl_flags): Use c_lang_decl as a base class.
5845 (context): Remove.
5846 (struct lang_decl): Replace saved_tree with context.
5847 (DECL_FRIEND_CONTEXT): Adjust accordingly.
5848 (SET_DECL_FRIEND_CONTEXT): Likewise.
5849 (DECL_VIRTUAL_CONTEXT): Likewise.
5850 (DECL_SAVED_TREE): Remove.
5851 (C_DECLARED_LABEL_FLAG): Likewise.
5852 (cplus_expand_expr_stmt): Don't declare.
5853 (add_decl_stmt): Likewise.
5854 (add_scope_stmt): Likewise.
5855 * decl.c (mark_stmt_tree): Remove.
5856 (case_compare): Likewise.
5857 (finish_case_label): Use c_add_case_label.
5858 (init_decl_processing): Set more language-specific hooks.
5859 (build_enumerator): Fix typo in comment.
5860 (cplus_expand_expr_stmt): Remove.
5861 (mark_lang_function): Use mark_c_language_function.
5862 (lang_mark_tree): Use c_mark_lang_decl.
5863 * decl2.c: Change order of inclusion.
5864 * except.c: Likewise.
5865 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
5866 back on c_expand_expr.
5867 * friend.c: Include expr.h.
5868 * init.c: Change order of inclusion.
5869 * Makefile.in: Update dependencies.
5870 * lex.h (free_lang_decl_chain): Remove.
5871 * optimize.c (maybe_clone_body): Use function_name_declared_p.
5872 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
5873 it doesn't exist.
5874 (instantiate_decl): Use function_name_declared_p.
5875 * semantics.c (lang_expand_expr_stmt): Remove.
5876 (set_current_function_name_declared): Likewise.
5877 (current_function_name_declared): Likewise.
5878 (begin_compound_stmt): Use function_name_declared_p.
5879 (add_decl_stmt): Remove.
5880 (setup_vtbl_ptr): Use function_name_declared_p.
5881 (add_scope_stmt): Remove.
5882 (current_scope_stmt_stack): New function.
5883 (cp_expand_stmt): Don't handle SCOPE_STMTs.
5884 (expand_body): Use function_name_declared_p.
5885 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
5886 * typeck.c: Change order of includes.
5887 (convert_sequence): Remove.
5888
5889 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
5890
5891 * lex.c (reswords): Add _Complex.
5892
5893 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5894
5895 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
5896
5897 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
5898
5899 * init.c (begin_init_stmts): Don't use // comments.
5900
5901 2000-09-12 Jason Merrill <jason@redhat.com>
5902
5903 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
5904 all non-extern arrays.
5905
5906 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
5907 typenames, too. Downgrade complaint to pedwarn.
5908 (xref_tag): Warn about surprising behavior of 'friend struct T'.
5909 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
5910 'class This::Inherited'.
5911
5912 2000-09-12 Mark Mitchell <mark@codesourcery.com>
5913
5914 * decl.c (finish_case_label): Given the LABEL_DECL a
5915 DECL_CONTEXT.
5916
5917 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
5918
5919 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
5920 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
5921 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5922 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5923 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
5924 New macros.
5925 (sorry_for_unsupported_tree, print_scope_operator,
5926 print_left_paren, print_right_paren, print_left_bracket,
5927 print_right_bracket, print_whitespace): Likewise.
5928 (aggr_variety): Rename to class_key_or_enum.
5929 (print_type): Rename to print_type_id.
5930 (print_type_specifier_seq, print_simple_type_specifier,
5931 print_elaborated_type_specifier,
5932 print_rest_of_abstract_declarator,
5933 print_parameter_declaration_clause, print_exception_specification,
5934 print_nested_name_specifier, print_template_id,
5935 typedef_original_name, print_template_argument_list_start,
5936 print_template_argument_list_end): New functions.
5937
5938 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
5939
5940 * ir.texi: Add more documentation.
5941
5942 2000-09-11 Mark Mitchell <mark@codesourcery.com>
5943
5944 * cp-tree.h (struct saved_scope): Remove x_function_parms.
5945 (current_function_parms): Don't define.
5946 (struct cp_language_function): Remove parms_stored.
5947 (current_function_just_assigned_this): Don't define.
5948 (current_function_parms_stored): Likewise.
5949 (static_ctors): Declare.
5950 (static_dtors): Likewise.
5951 (SF_EXPAND): Don't define.
5952 (expand_start_early_try_stmts): Remove declaration.
5953 (store_parm_decls): Likewise.
5954 * decl.c (static_ctors): Don't declare.
5955 (static_dtors): Likewise.
5956 (struct binding_level): Remove this_block.
5957 (poplevel): Remove dead code.
5958 (set_block): Likewise.
5959 (mark_binding_level): Don't mark this_block.
5960 (mark_saved_scope): Don't mark x_function_parms.
5961 (init_decl_processing): Don't add current_function_parms as a GC
5962 root.
5963 (check_function_type): Change prototype.
5964 (start_function): Remove RTL-generation code.
5965 (expand_start_early_try_stmts): Remove.
5966 (store_parm_decls): Give it internal linkage. Remove
5967 RTL-generation code.
5968 (finish_function): Remove RTL-generation code.
5969 * decl2.c (static_ctors): Fix formatting.
5970 (static_dtors): Likewise.
5971 * method.c (use_thunk): Don't call store_parm_decls.
5972 (synthesize_method): Likewise.
5973 * optimize.c (maybe_clone_body): Likewise.
5974 * parse.y (fn.def2): Likewise.
5975 (.set_base_init): Likewise.
5976 (nodecls): Likewise.
5977 * pt.c (instantiate_decl): Likewise.
5978 * rtti.c (synthesize_tinfo_fn): Likewise.
5979 * semantics.c (genrtl_try_block): Simplify.
5980 (expand_body): Use genrtl_start_function and
5981 genrtl_finish_function.
5982 (genrtl_start_function): New function.
5983 (genrtl_finish_function): Likewise.
5984
5985 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5986
5987 * error.c (cp_tree_printer, case 'P'): Append break.
5988
5989 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5990
5991 * cp-tree.h (frob_opname): Declare.
5992 * parse.y (saved_scopes): New static variable.
5993 (cp_parse_init): Adjust.
5994 (do_id): If lastiddecl is NULL, do do_identifier.
5995 (operator): Save scope information.
5996 (unoperator): New reduction. Restore scope information.
5997 (operator_name): Append unoperator. Call frob_opname.
5998 * spew.c (frob_opname): Define.
5999
6000 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
6001
6002 * decl.c, rtti.c: Include defaults.h if not already included.
6003 Don't define the *_TYPE_SIZE macros.
6004
6005 2000-09-09 Mark Mitchell <mark@codesourcery.com>
6006
6007 * cp-tree.h (push_switch): Change prototype.
6008 (check_cp_case_value): Remove declaration.
6009 (decl_constant_value): Likewise.
6010 * decl.c (struct cp_switch): Add switch_stmt and cases.
6011 (case_compare): New function.
6012 (push_switch): Set switch_stmt. Initialize cases.
6013 (pop_switch): Clean up cases.
6014 (define_case_label): Rename to ...
6015 (finish_case_label): ... this. Do semantic analysis for case
6016 labels here.
6017 (start_function): Correct comment.
6018 * decl2.c (check_cp_case_value): Remove.
6019 * expr.c (do_case): Remove.
6020 * pt.c (tsubst_expr): Adjust call to finish_case_label.
6021 * semantics.c (genrtl_do_poplevel): Remove declaration.
6022 (RECHAIN_STMTS): Remove.
6023 (finish_break_stmt): Use build_break_stmt.
6024 (finish_continue_stmt): Use build_continue_stmt.
6025 (finish_switch_cond): Adjust condition here, rater than in
6026 c_expand_start_case.
6027 (finish_case_label): Remove.
6028 * typeck.c (c_expand_return): Remove.
6029 (c_expand_start_case): Likewise.
6030
6031 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
6032
6033 * ir.texi: Document type nodes.
6034
6035 2000-09-06 Mark Mitchell <mark@codesourcery.com>
6036
6037 * cp-tree.h (init_cp_semantics): Declare.
6038 (genrtl_try_block): Don't declare.
6039 (genrtl_handler): Likewise.
6040 (genrtl_catch_block): Likewise.
6041 (genrtl_ctor_stmt): Likewise.
6042 (genrtl_subobject): Likewise.
6043 (genrtl_do_poplevel): Likewise.
6044 (genrtl_named_return_value): Likewise.
6045 * lex.c (init_parse): Call init_cp_semantics.
6046 * semantics.c (genrtl_try_block): Give it internal linkage.
6047 (genrtl_handler): Likewise.
6048 (genrtl_catch_block): Likewise.
6049 (genrtl_ctor_stmt): Likewise.
6050 (genrtl_subobject): Likewise.
6051 (genrtl_do_poplevel): Likewise.
6052 (genrtl_named_return_value): Likewise.
6053 (lang_expand_stmt): Rename to ...
6054 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
6055 (init_cp_semantics): Define.
6056
6057 * decl.c (initialize_local_var): Remove RTL-generating code.
6058 * semantics.c (genrtl_try_block): Fix formatting.
6059
6060 Move statement-tree facilities from C++ to C front-end.
6061 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6062 (void_zero_node): Remove.
6063 (stmt_tree): Likewise.
6064 (scope_chain): Adjust.
6065 (language_function): Rename to cp_language_function.
6066 (cp_function_chain): Adjust.
6067 (current_stmt_tree): Remove.
6068 (last_tree): Likewise.
6069 (last_expr_type): Likewise.
6070 (struct lang_decl): Adjust.
6071 (STMT_IS_FULL_EXPR_P): Remove.
6072 (add_tree): Remove.
6073 (begin_stmt_tree): Likewise.
6074 (finish_stmt_tree): Likewise.
6075 (walk_tree_fn): Likewise.
6076 (walk_stmt_tree): Likewise.
6077 * class.c (finish_struct): Replace use of add_tree with add_stmt.
6078 * decl.c (mark_stmt_tree): Adjust type.
6079 (init_decl_processing): Don't build void_zero_node.
6080 (initialize_local_var): Adjust usage of current_stmt_tree.
6081 (finish_enum): Use add_stmt, not add_tree.
6082 (save_function_data): Adjust use of language_function.
6083 (finish_constructor_body): Use add_stmt, not add_tree.
6084 (finish_destructor_body): Likewise.
6085 (push_cp_function_context): Adjust use of language_function.
6086 (pop_cp_function_context): Likewise.
6087 (mark_lang_function): Likewise.
6088 (mark_cp_function_context): Likewise.
6089 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6090 (build_vec_init): Likewise.
6091 * semantics.c (SET_LAST_STMT): Remove.
6092 (RECHAIN_STMTS): Don't use it.
6093 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6094 (current_stmt_tree): Define.
6095 (add_tree): Remove.
6096 (finish_goto_stmt): Use add_stmt, not add_tree.
6097 (finish_expr_stmt): Likewise.
6098 (begin_if_stmt): Likewise.
6099 (finish_then_clause): Likewise.
6100 (begin_while_stmt): Likewise.
6101 (begin_do_stmt): Likewise.
6102 (finish_return_stmt): Likewise.
6103 (begin_for_stmt): Likewise.
6104 (finish_break_stmt): Likewise.
6105 (finish_continue_stmt): Likewise.
6106 (begin_switch_stmt): Likewise.
6107 (finish_case_label): Likewise.
6108 (begin_try_block): Likewise.
6109 (begin_function_try_block): Likewise.
6110 (begin_handler): Likewise.
6111 (begin_catch_block): Likewise.
6112 (begin_compound_stmt): Likewise.
6113 (begin_asm_stmt): Likewise.
6114 (finish_asm_stmt): Likewise.
6115 (finish_label_stmt): Likewise.
6116 (add_decl_stmt): Likewise.
6117 (finish_subobject): Likewise.
6118 (finish_decl_cleanup): Likewise.
6119 (finish_named_return_value): Likewise.
6120 (setup_vtbl_ptr): Likewise.
6121 (add_scope_stmt): Likewise.
6122 (finish_stmt_expr): Likewise.
6123 (prune_unused_decls): Remove.
6124 (begin_stmt_tree): Likewise.
6125 (finish_stmt_tree): Likewise.
6126 (prep_stmt): Adjust use of current_stmt_tree.
6127 (lang_expand_stmt): Likewise.
6128 * tree.c (statement_code_p): Remove.
6129 (cp_statement_code_p): New function.
6130 (walk_stmt_tree): Remove.
6131 (init_tree): Set lang_statement_code_p.
6132
6133 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
6134
6135 Integrated preprocessor.
6136
6137 * Make-lang.in, Makefile.in: Remove all references to input.c,
6138 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
6139 * gxx.gperf, hash.h, input.c: Delete.
6140 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6141 initialized properly.
6142
6143 * class.c (fixup_pending_inline): Take a tree, not a
6144 struct pending_inline *. All callers changed.
6145 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6146 RID_PROTECTED entries in ridpointers[] array here.
6147 * decl.c (duplicate_decls): Do not refer to struct
6148 pending_inline.
6149 (record_builtin_type, init_decl_processing): Use RID_MAX not
6150 CP_RID_MAX.
6151 (grokdeclarator): Use C_IS_RESERVED_WORD.
6152 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6153 cpplib.
6154 (grok_x_components): Do not inspect pending_inlines chain.
6155
6156 * cp-tree.h (struct lang_identifier): Add rid_code entry.
6157 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6158 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6159 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6160 TIME_IDENTIFIER_FILEINFO): Kill.
6161 Update prototypes.
6162 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
6163 single 32-bit word.
6164 * parse.y: Call do_pending_inlines unconditionally.
6165 reinit_parse_for_method is now snarf_method. fn.defpen is no
6166 longer necessary. Remove unnecessary <itype> annotation on
6167 SCOPE. Do not refer to end_of_file or struct pending_inline.
6168 * semantics.c (begin_inline_definitions): Call
6169 do_pending_inlines unconditionally.
6170
6171 * lex.c: Remove all code now shared with C front end.
6172 Initialize cpplib properly if USE_CPPLIB. Put reserved words
6173 into the get_identifier table. Rewrite pragma handling to
6174 work with the registry. Move code to save tokens for later
6175 processing to spew.c.
6176
6177 * spew.c: Rewrite everything in terms of token streams instead
6178 of text. Move routines here from lex.c / input.c as
6179 appropriate. GC-mark trees hanging off the pending inlines
6180 chain.
6181
6182 2000-09-06 Mark Mitchell <mark@codesourcery.com>
6183
6184 * NEWS: Mention that the named return value extension has been
6185 deprecated.
6186 * cp-tree.h (original_result_rtx): Define.
6187 (TREE_REFERENCE_EXPR): Remove.
6188 (DECL_VPARENT): Likewise.
6189 (pushdecl_nonclass_level): Likewise.
6190 (store_return_init): Likewise.
6191 (reinit_lang_specific): Likewise.
6192 (genrtl_named_return_value): Change prototype.
6193 * decl.c (original_result_rtx): Remove.
6194 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6195 Do not generate RTL for local variables here.
6196 (store_return_init): Remove.
6197 * semantics.c (genrtl_named_return_value): Simplify. Fold in
6198 store_return_init.
6199 (finish_named_return_value): Adjust accordingly. Warn that this
6200 extension is deprecated.
6201 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6202
6203 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6204
6205 * pt.c (type_unification_real): Replace switch with if.
6206 (unify): Tsubst non-type parms before comparing.
6207
6208 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6209
6210 * error.c (dump_typename): New function, broken out of ...
6211 (dump_type): ... here. Use it.
6212 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6213
6214 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6215
6216 * init.c (build_offset_ref): Deal with namespace scoped
6217 TEMPLATE_ID_EXPRs.
6218
6219 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6220
6221 * class.c (resolve_address_of_overloaded_function): Add
6222 explanation message.
6223 * decl.c (define_case_label): Reformat explanation.
6224 * decl2.c (finish_static_data_member_decl): Likewise.
6225 (grokfield): Likewise.
6226 * friend.c (do_friend): Likewise.
6227
6228 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
6229
6230 * tree.c (walk_tree): Expose tail recursion.
6231 (walk_stmt_tree): New function.
6232 * cp-tree.h: Prototype walk_stmt_tree.
6233 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6234 the BLOCKs directly. If a BLOCK has no variables after
6235 pruning, discard it.
6236 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
6237 restore the line number.
6238
6239 2000-09-05 Mark Mitchell <mark@codesourcery.com>
6240
6241 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6242 (pt.o): Remove dependency on HTAB_H.
6243 * cp-tree.h: Include hashtab.h.
6244 (walk_tree): Change prototype.
6245 (walk_tree_without_duplicates): New function.
6246 * decl.c (check_default_argument): Use it.
6247 * optimize.c (remap_decl): Adjust calls to walk_tree.
6248 (copy_body): Likewise.
6249 (expand_calls_inline): Likewise.
6250 (calls_setjmp_p): Use walk_tree_without_duplicates.
6251 * pt.c: Don't include hashtab.h.
6252 (for_each_template_parm): Use walk_tree_without_duplicates.
6253 * semantics.c (finish-stmt_tree): Likewise.
6254 (expand_body): Likewise.
6255 * tree.c (walk_tree): Add additional parameter.
6256 (walk_tree_without_duplicates): New function.
6257 (count_trees): Use it.
6258 (verify_stmt_tree): Adjust call to walk_tree.
6259 (find_tree): Use walk_tree_without_duplicates.
6260 (no_linkage_check): Likewise.
6261 (break_out_target_exprs): Adjust call to walk_tree.
6262 (cp_unsave): Likewise.
6263
6264 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6265
6266 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6267 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6268 * cp-tree.h (TYPE_BINFO): Adjust comment.
6269 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6270 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6271 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6272 (TYPE_TEMPLATE_INFO): Likewise.
6273 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6274 * class.c (push_nested_class): Likewise.
6275 * decl.c (lookup_name_real): Likewise.
6276 (grokdeclarator): Likewise.
6277 (grok_op_properties): Likewise.
6278 (xref_tag): Likewise.
6279 (xref_basetypes): Likewise.
6280 * decl2.c (constructor_name_full): Likewise.
6281 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6282 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6283 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6284 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6285 (dump_type_suffix): Likewise.
6286 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6287 instead.
6288 (get_aggr_from_typedef): Likewise.
6289 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6290 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6291 (write_template_parm): Likewise.
6292 (write_template_template_parm): Check tree code instead of
6293 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6294 * method.c (build_overload_nested_name): Add
6295 BOUND_TEMPLATE_TEMPLATE_PARM.
6296 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6297 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6298 * pt.c (convert_template_argument): Check tree code instead of
6299 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6300 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6301 (for_each_template_parm): Adjust comment.
6302 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
6303 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6304 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
6305 template_args_equal to compare template template parameter cases.
6306 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6307 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6308 instead.
6309 * tree.c (copy_template_template_parm): Decide whether to create
6310 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6311 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6312 (copy_tree_r): Likewise.
6313 * typeck.c (comptypes): Likewise. Check tree code instead of
6314 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6315
6316 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
6317
6318 * decl.c (finish_function): Move the code for handling functions
6319 marked with the constructor and destructor attributes inside the
6320 expand_p block.
6321
6322 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6323
6324 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6325
6326 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6327
6328 * pt.c (lookup_template_class): Remove abort.
6329 * tree.c (get_type_decl): Allow error_mark_node.
6330
6331 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6332
6333 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6334 TEMPLATE_ID_EXPRs.
6335
6336 2000-09-03 Mark Mitchell <mark@codesourcery.com>
6337
6338 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6339 new ABI mangling.
6340
6341 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6342
6343 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6344 union tag mismatch error reporting.
6345
6346 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6347
6348 * call.c (build_scoped_method_call): Check it is not a namespace.
6349
6350 2000-08-30 Jason Merrill <jason@redhat.com>
6351
6352 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6353
6354 * tree.c (bot_manip): Check TREE_CONSTANT rather than
6355 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
6356 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6357
6358 * decl.c (start_function): Always call make_function_rtl.
6359
6360 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6361
6362 * semantics.c (prune_unused_decls): New function.
6363 (finish_stmt_tree): Call it via walk_tree.
6364
6365 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6366
6367 * class.c (build_secondary_vtable): Constify a char *.
6368 * decl.c (init_decl_processing): Initialize function_id_node,
6369 pretty_function_id_node, and func_id_node.
6370 * input.c (struct input_source): Constify 'str'.
6371 (feed_input): Constify first argument.
6372 * mangle.c (write_identifier): Constify argument.
6373 * pt.c (mangle_class_name_for_template): Constify argument.
6374
6375 2000-08-29 Mark Mitchell <mark@codesourcery.com>
6376
6377 * typeck.c (mark_addressable): Remove code that pokes around in
6378 RTL.
6379
6380 2000-08-28 Jason Merrill <jason@redhat.com>
6381
6382 * lex.c (file_name_nondirectory): Move to toplev.c.
6383
6384 * cp-tree.h (LOCAL_CLASS_P): New macro.
6385 * class.c (finish_struct_1): Use it.
6386
6387 2000-08-27 Alex Samuel <samuel@codesourcery.com>
6388
6389 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6390 (write_encoding): Pass another argument to write_name.
6391 (write_name): Add ignore_local_scope parameter. Fix handling of
6392 local names.
6393 (write_nested_name): Use write_unqualified_name.
6394 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
6395 (write_template_prefix): Use write_unqualified_name.
6396 (write_component): Remove.
6397 (write_local_name): Add parameter. Use direct local entity to
6398 discriminator calculation.
6399 (write_class_enum_type): Pass another argument to write_name.
6400 (write_template_template_arg): Likewise.
6401 (make_guard_variable): Likewise.
6402
6403 2000-08-27 Jason Merrill <jason@redhat.com>
6404
6405 * decl.c (pushdecl): Matching decls for local externs are found in
6406 the current level. Propagate linkage information from previous
6407 declarations.
6408
6409 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
6410
6411 * ir.texi (Expressions): Fix typo.
6412
6413 2000-08-25 Greg McGary <greg@mcgary.org>
6414
6415 * tree.c (init_tree): Use ARRAY_SIZE.
6416
6417 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6418
6419 * error.c (cp_tree_printer): Rework.
6420
6421 2000-08-25 Mark Mitchell <mark@codesourcery.com>
6422
6423 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6424 dyn-string.o.
6425 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6426 (cp-demangle.o): Remove target.
6427 (dyn-string.o): Likewise.
6428
6429 * decl.c (grokfndecl): Require that `main' return an `int'.
6430 * mangle.c (write_encoding): Don't mangle return types for
6431 conversion functions.
6432
6433 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6434
6435 * error.c (tree_formatting_info): New data type.
6436 (tree_being_formatted): New macro.
6437 (tree_formatting_flags): Likewise.
6438 (put_whitespace): Likewise.
6439 (print_tree_identifier): Likewise.
6440 (print_identifier): Likewise.
6441 (cp_tree_printer, print_function_argument_list, print_declaration,
6442 print_expression, print_function_declaration,
6443 print_function_parameter, print_type, print_cv_qualifier): New
6444 functions.
6445 (init_error): Initialize lang_printer.
6446
6447 2000-08-24 Jason Merrill <jason@redhat.com>
6448
6449 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6450 adjustment necessary.
6451
6452 2000-08-24 Greg McGary <greg@mcgary.org>
6453
6454 * cp-tree.h (MAIN_NAME_P): Remove macro.
6455
6456 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
6457
6458 * error.c (print_instantiation_context): Don't forget to flush the
6459 buffer.
6460
6461 2000-08-23 Jason Merrill <jason@redhat.com>
6462
6463 * typeck.c (build_ptrmemfunc): Save the input pmf.
6464
6465 * method.c (process_modifiers): Use same_type_p.
6466
6467 2000-08-23 Mark Mitchell <mark@codesourcery.com>
6468
6469 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6470 * mangle.c (write_function_type): Change prototype.
6471 (write_encoding): Don't mangle return types for
6472 constructors or destructors.
6473 (write_type): Adjust call to write_function_type.
6474 * pt.c (instantiate_template): Instantiate alternate entry points
6475 when instantiating the main function.
6476
6477 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6478
6479 * error.c (cp_print_error_function): Don't use embedded '\n' in
6480 output_printf.
6481
6482 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6483
6484 * decl.c (init_decl_processing): Remove bogus initialization.
6485 * error.c (lang_print_error_function): Restore here.
6486 (init_error): Initialize print_error_function.
6487
6488 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6489
6490 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6491
6492 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
6493
6494 * Makefile.in (error.o): Depends on diagnostic.h
6495
6496 * cp-tree.h (problematic_instantiation_changed,
6497 record_last_problematic_instantiation, current_instantiation,
6498 print_instantiation_context): Declare.
6499 (maybe_print_template_context): Remove.
6500
6501 * decl.c (init_decl_processing): Set print_error_function to NULL.
6502 (lang_print_error_function): Remove, since we're using a new
6503 machinery.
6504
6505 * error.c: #include diagnostic.h
6506 (function_category): New function.
6507 (cp_diagnostic_starter): Likewise.
6508 (cp_diagnostic_finalizer): Likewise.
6509 (cp_print_error_function): Likewise.
6510 (maybe_print_instantiation_context): Likewise.
6511 (print_instantiation_full_context): Likewise.
6512 (print_instantiation_partial_context): Likewise.
6513 (print_instantiation_context): Define.
6514 (init_error): Initialize diagnostic pager and finalizer.
6515
6516 * pt.c (problematic_instantiation_changed): Define.
6517 (record_last_problematic_instantiation): Likewise.
6518 (current_instantiation): Likewise.
6519 (maybe_print_template_context): Remove.
6520 (print_template_context): Likewise.
6521 (current_tinst_level): Make static to reflect Brendan Kehoe's
6522 change of 1995-04-13.
6523 (push_tinst_level): Call print_instantiation_context.
6524
6525 2000-08-21 Nix <nix@esperi.demon.co.uk>
6526
6527 * lang-specs.h: Do not process -o or run the assembler if
6528 -fsyntax-only.
6529
6530 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
6531
6532 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6533 variables.
6534 * decl2.c (lang_decode_option): Disable gettext attributes for
6535 -ansi.
6536
6537 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
6538
6539 * lex.c (lang_init_options): Default diagnostic message maximum
6540 length to 80, when line-wrapping.
6541
6542 2000-08-20 Mark Mitchell <mark@codesourcery.com>
6543
6544 * class.c (build_vtbl_initializer): Clear the entire
6545 vtbl_init_data. Start keeping track of the functions for which we
6546 have created vcall offsets here.
6547 (dfs_build_vcall_offset_vtbl_entries): Remove.
6548 (build_vcall_offset_vtbl_entries): Reimplement.
6549 (add_vcall_offset_vtbl_entries_r): New function.
6550 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
6551 computing when vcall offsets are necessary.
6552
6553 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6554
6555 * decl.c (member_function_or_else): Use cp_error ... %T.
6556 (grokdeclarator): Likewise.
6557 (start_method): Likewise.
6558 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
6559
6560 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6561
6562 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
6563 TYPE_DECLs.
6564
6565 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6566
6567 * cp-tree.h (PTRMEM_OK_P): New macro.
6568 (itf_ptrmem_ok): New enumeration value.
6569 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
6570 argument. Diagnose implicit pointer to member.
6571 (instantiate_type): Don't diagnose implicit pointer to member
6572 here. Pass itf_ptrmem_ok if ok. Adjust calls to
6573 resolve_address_of_overloaded_function.
6574 * init.c (build_offset_ref): Set PTRMEM_OK_P.
6575 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
6576 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
6577 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
6578 (build_unary_op): Deal with single non-static member in
6579 microsoft-land.
6580
6581 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6582
6583 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
6584
6585 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6586
6587 * cp-tree.h (enum_name_string): Remove prototype.
6588 (report_case_error): Remove prototype.
6589 * cp/typeck2.c (enum_name_string): Remove.
6590 (report_case_error): Remove.
6591 * error.c (dump_expr): Deal with enum values directly.
6592 Correctly negate integer constant.
6593
6594 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6595
6596 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
6597 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
6598 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
6599 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
6600 (__cxa_vec_new): Use __cxa_vec_new2.
6601 (__cxa_vec_delete): Use __cxa_vec_delete2.
6602
6603 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6604
6605 * vec.cc (__cxa_vec_new): Set "C" linkage.
6606 (__cxa_vec_ctor): Likewise.
6607 (__cxa_vec_cctor): Likewise.
6608 (__cxa_vec_dtor): Likewise.
6609 (__cxa_vec_delete): Likewise.
6610 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
6611 (__cxa_vec_ctor): Likewise.
6612 (__cxa_vec_cctor): Likewise.
6613 (__cxa_vec_dtor): Likewise.
6614 (__cxa_vec_delete): Likewise.
6615
6616 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6617
6618 * class.c (instantiate_type): Reinstate local variable
6619 deleted in previous change.
6620
6621 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
6622 itf_no_attributes.
6623
6624 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6625
6626 * cp-tree.h (instantiate_type_flags): New enumeration.
6627 (instantiate_type): Change parameter.
6628 * class.c (instantiate_type): Adjust prototype. Adjust.
6629 * call.c (standard_conversion): Adjust instantiate_type call.
6630 (reference_binding): Likewise.
6631 (build_op_delete_call): Likewise.
6632 (convert_like_real): Likewise.
6633 * cvt.c (cp_convert_to_pointer): Likewise.
6634 (convert_to_reference): Likewise.
6635 * pt.c (convert_nontype_argument): Likewise.
6636 * typeck.c (build_binary_op): Likewise.
6637 (build_ptrmemfunc): Likewise.
6638 (convert_for_assignment): Likewise.
6639
6640 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6641
6642 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
6643 (current_aggr): Define.
6644 * decl.c (grokdeclarator): Make sure a friend class is an
6645 elaborated type specifier.
6646 * parse.y (current_aggr): Remove static definition.
6647 (cp_parse_init): Adjust.
6648 (structsp): Clear and restore current_aggr.
6649 (component_decl_list): Clear current_aggr.
6650
6651 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
6652 aggregate tag on the typename's context.
6653
6654 * pt.c (tsubst_friend_class): Return error_mark_node, if
6655 parms becomes NULL.
6656 (instantiate_class_template): Ignore error_mark_node friend types.
6657
6658 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
6659
6660 * cvt.c (warn_ref_binding): New static function, broken out of ...
6661 (convert_to_reference): ... here. Use it.
6662
6663 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6664
6665 * parse.y (template_arg): Add rule for template qualified with
6666 global scope.
6667
6668 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6669
6670 * decl2.c (add_function): Reorganize.
6671 (arg_assoc): Do not consider function template decls.
6672
6673 2000-08-11 Jason Merrill <jason@redhat.com>
6674
6675 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
6676 looking inside.
6677
6678 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6679
6680 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
6681 (lookup_nested_tag): Likewise.
6682
6683 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
6684 can be produced.
6685
6686 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6687
6688 * parse.y (named_complex_class_head_sans_basetype): Remove
6689 always true if.
6690
6691 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6692
6693 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
6694 explicit TEMPLATE_ID_EXPR args.
6695 (build_expr_from_tree, case CALL_EXPR): Likewise.
6696
6697 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6698
6699 * decl.c (check_tag_decl): Diagnose typename's which don't
6700 declare anything.
6701
6702 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
6703
6704 * init.c (build_aggr_init): Reject bogus array initializers
6705 early.
6706
6707 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6708
6709 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
6710 runtime.
6711 * cp/tinfo.cc (__dynamic_cast): Likewise.
6712 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
6713
6714 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6715
6716 * cvt.c (convert_to_pointer_force): Fix error message when
6717 attempting to cast from ambiguous base.
6718
6719 2000-08-08 Jason Merrill <jason@redhat.com>
6720
6721 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
6722 (tsubst_template_arg_vector): Likewise.
6723
6724 * decl2.c (build_anon_union_vars): Choose the largest field; don't
6725 assume that one will be as large as the union.
6726
6727 2000-08-07 Kazu Hirata <kazu@hxi.com>
6728
6729 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
6730 * decl.c (pop_labels): Likewise.
6731
6732 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
6733
6734 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
6735 specifications.
6736 (__pointer_to_member_type_info): Likewise.
6737 (__base_class_info): Likewise.
6738 (__class_type_info): Likewise.
6739 (__si_class_type_info): Likewise.
6740 (__vmi_class_type_info): Likewise.
6741 * tinfo.cc (__si_class_type_info::__do_find_public_src):
6742 Changed member names to match specifications.
6743 (__vmi_class_type_info::__do_find_public_src): Likewise.
6744 (__si_class_type_info::__do_dyncast): Likewise.
6745 (__vmi_class_type_info::__do_dyncast): Likewise.
6746 (__si_class_type_info::__do_upcast): Likewise.
6747 (__vmi_class_type_info::__do_upcast): Likewise.
6748 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
6749 (__pbase_type_info::__pointer_catch): Likewise.
6750 (__pointer_type_info::__pointer_catch): Likewise.
6751 (__pointer_to_member_type_info::__pointer_catch): Likewise.
6752
6753 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
6754
6755 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
6756 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
6757 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
6758
6759 2000-08-04 Mark Mitchell <mark@codesourcery.com>
6760
6761 * cp-tree.h (add_method): Change prototype.
6762 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
6763 Don't double the size of the method vector in the error case.
6764 (handle_using_decl): Adjust call to add_method.
6765 (add_implicitly_declared_members): Likewise.
6766 (clone_function_decl): Likewise.
6767 * decl2.c (check_classfn): Likewise.
6768 * semantics.c (finish_member_declaration): Likewise.
6769
6770 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
6771
6772 * decl.c (flag_isoc94): New variable.
6773
6774 2000-08-02 Jason Merrill <jason@redhat.com>
6775
6776 * pt.c (do_type_instantiation): Add complain parm; don't complain
6777 if called recursively.
6778 * cp-tree.h, parse.y: Adjust.
6779
6780 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
6781
6782 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
6783 -Wno-strict-prototypes.
6784
6785 * g++spec.c: Adjust type of second argument to
6786 lang_specific_driver, and update code as necessary.
6787
6788 * cp-tree.h: Don't prototype min_precision here.
6789 (my_friendly_assert): Cast expression to void.
6790 * semantics.c (do_poplevel): Initialize scope_stmts.
6791
6792 2000-08-02 Mark Mitchell <mark@codesourcery.com>
6793
6794 * cp-tree.h (DECL_NEEDED_P): Tweak.
6795
6796 2000-07-28 Jason Merrill <jason@redhat.com>
6797
6798 * lang-specs.h: Use %i in rule for .ii files.
6799
6800 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
6801
6802 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
6803
6804 2000-07-30 Mark Mitchell <mark@codesourcery.com>
6805
6806 Allow indirect primary bases.
6807 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
6808 primary_base.
6809 (CLASSTYPE_VFIELD_PARENT): Remove.
6810 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
6811 (BINFO_PRIMARY_BINFO): Remove.
6812 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
6813 (BINFO_VBASE_PRIMARY_P): Likewise.
6814 (BINFO_PRIMARY_BASE_OF): New macro.
6815 (BINFO_INDIRECT_PRIMARY_P): Likewise.
6816 (get_primary_binfo): New function.
6817 * decl.c (lang_mark_tree): Make lang_type::primary_base.
6818 * class.c (vcall_offset_data_s): Rename to ...
6819 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
6820 and add ctor_vtbl_p.
6821 (get_derived_offset): Use get_primary_binfo.
6822 (dfs_mark_primary_bases): Adjust handling of virtual primary
6823 bases.
6824 (mark_primary_bases): Likewise.
6825 (set_primary_base): Take a binfo, not an integer, as a
6826 representation of the primary base.
6827 (indirect_primary_base_p): Remove.
6828 (determine_primary_base): Adjust for indirect primary bases.
6829 (dfs_find_final_overrider): Fix typo in coment.
6830 (update_vtable_entry_for_fn): Use get_primary_binfo.
6831 (layout_nonempty_base_or_field): Tweak.
6832 (build_base_fields): Adjust for new primary base semantics.
6833 (dfs_propagate_binfo_offsets): Remove.
6834 (propagate_binfo_offsets): Rewrite.
6835 (dfs_set_offset_for_shared_vbases): Remove.
6836 (layout_virtual_bases): Don't use it.
6837 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
6838 ABI.
6839 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
6840 CLASSTYPE_VFIELD_PARENT.
6841 (dfs_get_primary_binfo): New function.
6842 (get_primary_binfo): Likewise.
6843 (dump_class_hierarchy_r): Tweak printing of primary bases.
6844 (build_vtbl_initializer): Fix typo in comments. Use
6845 vtbl_init_data.
6846 (build_vcall_and_vbase_vtbl_entries): Likewise.
6847 (build_vbaes_offset_vtbl_entries): Likewise.
6848 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
6849 BV_VCALL_INDEX to handle indirect primary bases.
6850 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
6851 (build_rtti_vtbl_entries): Likewise.
6852 * search.c (get_shared_vbase_if_not_primary): Tweak.
6853 (find_vbase_instance): Likewise.
6854 (binfo_for_vtable): Simplify.
6855 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
6856 (make_binfo): Make it have 11 entries.
6857
6858 2000-07-30 Alex Samuel <samuel@codesourcery.com>
6859
6860 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
6861 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
6862 ascertaining primaryness.
6863 (G): Remove template_args.
6864 (decl_is_template_id): New function.
6865 (write_encoding): Use decl_is_template_id.
6866 (write_name): Likewise. Handle type_decls. Get main variant of
6867 type decls.
6868 (write_nested_name): Likewise.
6869 (write_prefix): Likewise.
6870 (write_template_prefix): Likewise.
6871 (write_special_name_constructor): Remove defunct production from
6872 comment.
6873 (write_bare_function_type): Remove comment about absent parameter.
6874 (write_template_template_arg): Add missing grammar production to
6875 comment.
6876
6877 2000-07-27 Jason Merrill <jason@redhat.com>
6878
6879 * decl.c (duplicate_decls): If common_type produces a non-typedef
6880 type for a typedef, just use the old type.
6881
6882 2000-07-27 Mark Mitchell <mark@codesourcery.com>
6883
6884 * cp-tree.h (function_depth): Declare.
6885 (verify_stmt_tree): Likewise.
6886 (find_tree): Likewise.
6887 * decl.c (function_depth): Give it external linkage.
6888 * optimize.c (optimize_function): Increment and decrement it.
6889 * tree.c (verify_stmt_tree_r): New function.
6890 (verify_stmt_tree): Likewise.
6891 (find_tree_r): Likewise.
6892 (find_tree): Likewise.
6893
6894 2000-07-27 Jason Merrill <jason@redhat.com>
6895
6896 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
6897 TYPE_PTRMEMFUNC_P.
6898 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
6899
6900 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6901
6902 * decl.c (start_cleanup_fn): Mark the function as `inline'.
6903 * decl2.c (get_guard): Call cp_finish_decl, not
6904 rest_of_decl_compilation, for local guards.
6905 * lex.c (do_identifier): Remove unused variable.
6906
6907 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
6908
6909 * parse.y: Add missing ';'.
6910
6911 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6912
6913 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
6914 of `extern "C++"'.
6915
6916 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6917
6918 Kill strict_prototype. Backwards compatibility only for
6919 non NO_IMPLICIT_EXTERN_C systems.
6920 * cp-tree.h (flag_strict_prototype): Remove.
6921 (strict_prototype): Remove.
6922 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6923 * decl.c (maybe_push_to_top_level): Adjust.
6924 (pop_from_top_level): Adjust.
6925 (decls_match): Only allow sloppy parm matching for ancient
6926 system headers.
6927 (init_decl_processing): Adjust.
6928 (grokdeclarator): Adjust.
6929 * decl2.c (flag_strict_prototype): Remove.
6930 (strict_prototype): Remove.
6931 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6932 (lang_f_options): Remove "strict-prototype".
6933 (unsupported-options): Add "strict-prototype".
6934 * lex.c (do_identifier): Adjust.
6935 (do_scoped_id): Adjust.
6936 * parse.y (empty_parms): Adjust.
6937 * class.c (push_lang_context): Adjust.
6938 (pop_lang_context): Adjust.
6939 * typeck.c (comp_target_parms): Adjust.
6940
6941 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6942
6943 * decl.c (poplevel): Deal with anonymous variables at for scope.
6944 (maybe_inject_for_scope_var): Likewise.
6945
6946 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
6947
6948 * decl.c: Remove all signal handling code, now done in toplev.c.
6949
6950 2000-07-23 Mark Mitchell <mark@codesourcery.com>
6951
6952 * decl.c (make_rtl_for_nonlocal_decl): Rework.
6953
6954 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
6955 correctly.
6956
6957 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
6958
6959 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
6960 Define my_friendly_assert and my_friendly_abort as macros
6961 which may call friendly_abort. Prototype friendly abort, not
6962 my_friendly_abort or my_friendly_assert.
6963 * decl.c (signal_catch): Report the signal caught in the error
6964 message. Call fatal directly.
6965 * typeck2.c (ack, my_friendly_assert): Delete.
6966 (my_friendly_abort): Rename to friendly_abort. Expect file,
6967 line, and function parameters. Report the abort code, then
6968 call fancy_abort. Do not mask an abort if errors have
6969 already occurred.
6970
6971 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
6972
6973 * typeck.c (comp_target_parms): Remove obsolete parameter.
6974 (comp_target_types): Adjust.
6975
6976 2000-07-17 Jason Merrill <jason@redhat.com>
6977
6978 * typeck.c (mark_addressable): Never set TREE_USED.
6979 * call.c (build_call): Don't abort on calls to library functions
6980 that have been declared normally.
6981
6982 * typeck.c (build_binary_op): Fix grammar in warning.
6983
6984 * exception.cc (__eh_free): Fix prototype.
6985
6986 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
6987
6988 * decl.c (pushdecl): Handle seeing an OVERLOAD in
6989 IDENTIFIER_NAMESPACE_VALUE.
6990
6991 2000-07-16 Mark Mitchell <mark@codesourcery.com>
6992
6993 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
6994 * method.c (use_thunk): Correct handling of vcall offsets.
6995
6996 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
6997
6998 * .cvsignore: parse.h and parse.c have no cp- prefix.
6999
7000 2000-07-13 Mark Mitchell <mark@codesourcery.com>
7001
7002 * .cvsignore: New file.
7003
7004 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
7005
7006 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
7007
7008 2000-07-12 Mark Mitchell <mark@codesourcery.com>
7009
7010 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7011 * parse.c: Remove.
7012 * parse.h: Likewise.
7013
7014 2000-07-11 Mark Mitchell <mark@codesourcery.com>
7015
7016 * class.c (layout_class_type): Add pointers to virtual bases after
7017 base classes under the old ABI.
7018
7019 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
7020
7021 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7022 (finish_continue_stmt): Likewise.
7023 (begin_for_stmt): Remove call to note_level_for_for.
7024 (finish_goto_stmt): Change call from build_min_nt
7025 to build_stmt.
7026 (finish_expr_stmt): Likewise.
7027 (begin_if_stmt): Likewise.
7028 (begin_while_stmt): Likewise.
7029 (finish_while_stmt): Likewise.
7030 (finish_return_stmt): Likewise.
7031 (begin_for_stmt): Likewise.
7032 (finish_for_stmt): Likewise.
7033 (finish_break_stmt): Likewise.
7034 (begin_switch_stmt): Likewise.
7035 (finish_case_label): Likewise.
7036 (genrtl_try_block): Likewise.
7037 (begin_try_block): Likewise.
7038 (begin_handler): Likewise.
7039 (begin_compound_stmt): Likewise.
7040 (finish_asm_stmt): Likewise.
7041 (finish_label_stmt): Likewise.
7042 (add_decl_stmt): Likewise.
7043 (finish_subobject): Likewise.
7044 (finish_decl_cleanup): Likewise.
7045 (finish_named_return_value): Likewise.
7046 (setup_vtbl_ptr): Likewise.
7047 (add_scope_stmt): Likewise.
7048 * decl.c (finish_constructor_body): Likewise.
7049 (finish_destructor_body): Likewise.
7050 * optimize.c (copy_body_r): Likewise.
7051 (initialize_inlined_parameters): Likewise.
7052 (declare_return_variable): Likewise.
7053 (expand_call_inline): Likewise.
7054
7055 2000-07-10 Jakub Jelinek <jakub@redhat.com>
7056
7057 * semantics.c (expand_body): Sync interface information
7058 at the end of function body expansion.
7059
7060 2000-07-09 Jason Merrill <jason@redhat.com>
7061
7062 * init.c (build_new_1): Bail early if the call to new fails.
7063
7064 * decl.c (compute_array_index_type): Check specifically for
7065 an INTEGER_CST, not just TREE_CONSTANT.
7066
7067 * decl.c (duplicate_decls): Don't call duplicate_decls on
7068 the DECL_TEMPLATE_RESULT.
7069 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7070 codes.
7071
7072 * error.c (dump_template_bindings): Don't crash if we had an
7073 invalid argument list.
7074
7075 * typeck.c (c_expand_start_case): Do narrowing here.
7076 * semantics.c (finish_switch_cond): Not here.
7077
7078 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
7079
7080 * parse.y (asm_clobbers): Do string concatenation.
7081
7082 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7083
7084 * decl.c (pushtag): Don't put local classes in template functions
7085 on the local_classes list.
7086
7087 2000-07-04 Scott Snyder <snyder@fnal.gov>
7088
7089 * decl2.c (get_guard): Add missing return for old ABI local
7090 variable case.
7091
7092 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7093
7094 * cp-tree.h (char_type_p): New function.
7095 * decl.c (init_decl_processing): Don't initialize
7096 signed_wchar_type_node or unsigned_wchar_type_node.
7097 (complete_array_type): Handle brace-enclosed string-constants.
7098 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7099 * tree.c (char_type_p): New function.
7100 * typeck2.c (digest_init): Use char_type_p.
7101
7102 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7103
7104 * pt.c (tsubst): Don't layout type, if it's error_mark.
7105
7106 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7107
7108 * pt.c (instantiate_pending_templates): Reset template level.
7109
7110 2000-07-05 Jason Merrill <jason@redhat.com>
7111
7112 * call.c (joust): Don't complain about `operator char *()' beating
7113 `operator const char *() const'.
7114
7115 2000-07-04 scott snyder <snyder@fnal.gov>
7116 Jason Merrill <jason@redhat.com>
7117
7118 * repo.c (repo_get_id): Handle the case where a class with virtual
7119 bases has a null TYPE_BINFO_VTABLE.
7120
7121 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
7122 Jason Merrill <jason@redhat.com>
7123
7124 * parse.y (member_init): Just pass in the type.
7125 * init.c (expand_member_init): Handle getting a type.
7126
7127 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7128 Jason Merrill <jason@redhat.com>
7129
7130 * decl.c (finish_function): Warn if a function has no return
7131 statement.
7132 Suggested by Andrew Koenig.
7133 * typeck.c (check_return_expr): Do set current_function_returns_value
7134 if we got an error_mark_node.
7135
7136 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7137
7138 * decl2.c (push_decl_namespace): Push the original namespace.
7139
7140 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7141
7142 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7143 * semantics.c (begin_class_definition): Clear it.
7144
7145 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
7146
7147 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7148 (genrtl_expr_stmt): Likewise.
7149 (genrtl_decl_stmt): Likewise.
7150 (genrtl_if_stmt): Likewise.
7151 (genrtl_while_stmt): Likewise.
7152 (genrtl_do_stmt): Likewise.
7153 (genrtl_return_stmt): Likewise.
7154 (genrtl_for_stmt): Likewise.
7155 (genrtl_break_stmt): Likewise.
7156 (genrtl_continue_stmt): Likewise.
7157 (genrtl_scope_stmt): Likewise.
7158 (genrtl_switch_stmt): Likewise.
7159 (genrtl_case_label): Likewise.
7160 (genrtl_begin_compound_stmt): Likewise.
7161 (genrtl_finish_compound_stmt): Likewise.
7162 (genrtl_compound_stmt): Likewise.
7163 (genrtl_asm_stmt): Likewise.
7164
7165 * init.c (begin_init_stmts): Remove call to
7166 genrtl_begin_compound_stmt.
7167 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7168
7169 * semantics.c (lang_expand_stmt): Changed call to
7170 genrtl_compound_stmt to ignore return value.
7171
7172 2000-07-02 Mark Mitchell <mark@codesourcery.com>
7173
7174 * mangle.c (canonicalize_for_substitution): Return the canonical
7175 variant of a type.
7176
7177 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7178 TYPE_DECL.
7179 * typeck.c (commonparms): Remove obstack manipulations.
7180
7181 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
7182
7183 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7184
7185 * Makefile.in (OBJS): Added ../c-semantics.o.
7186 (OBJDEPS): Likewise.
7187
7188 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7189 ../c-common.h.
7190 (struct stmt_tree): Added comment.
7191 (current_function_name_declared): Removed.
7192 (stmts_are_full_exprs_p): Likewise.
7193 (genrtl_do_pushlevel): Likewise.
7194 (genrtl_clear_out_block): Likewise.
7195 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7196 (DECL_ANON_UNION_ELEMS): Likewise.
7197 (emit_local_var): Likewise.
7198 (make_rtl_for_local_static): Likewise.
7199 (do_case): Likewise.
7200 (expand_stmt): Likewise.
7201 (genrtl_decl_cleanup): Likewise.
7202 (c_expand_asm_operands): Likewise.
7203 (c_expand_return): Likewise.
7204 (c_expand_start_case): Likewise.
7205
7206 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7207 (emit_local_var): Likewise.
7208 (initialize_local_var): Change reference to
7209 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7210 Change reference to stmts_are_full_exprs_p to
7211 current_stmt_tree->stmts_are_full_exprs_p.
7212 (push_cp_function_context): Likewise.
7213
7214 * expect.c (expand_throw): Change reference to
7215 stmts_are_full_exprs_p.
7216
7217 * init.c (build_aggr_init): Change reference to
7218 stmts_are_full_exprs_p.
7219 (build_vec_init): Likewise.
7220
7221 * optimize.c (maybe_clone_body): Change reference to
7222 current_function_name_declared to
7223 cp_function_chain->name_declared.
7224
7225 * pt.c (instantiate_decl): Change reference to
7226 current_function_name_declared to
7227 cp_function_chain->name_declared.
7228
7229 * semantics.c (expand_cond): Moved declaration to c-common.h.
7230 (genrtl_do_pushlevel): Moved to c-semantics.c.
7231 (genrtl_clear_out_block): Likewise.
7232 (genrtl_goto_stmt): Likewise.
7233 (genrtl_expr_stmt): Likewise.
7234 (genrtl_decl_stmt): Likewise.
7235 (gerntl_if_stmt): Likewise.
7236 (genrtl_while_stmt): Likewise.
7237 (genrtl_do_stmt): Likewise.
7238 (genrtl_return_stmt): Likewise.
7239 (genrtl_for_stmt): Likewise.
7240 (genrtl_break_stmt): Likewise.
7241 (genrtl_continue_stmt): Likewise.
7242 (genrtl_scope_stmt): Likewise.
7243 (genrtl_switch_stmt): Likewise.
7244 (genrtl_case_label): Likewise.
7245 (genrtl_begin_compound_stmt): Likewise.
7246 (genrtl_finish_compound_stmt): Likewise.
7247 (genrtl_compound_stmt): Likewise.
7248 (genrtl_asm_stmt): Likewise.
7249 (genrtl_decl_cleanup): Likewise.
7250 (expand_cond): Likewise.
7251 (expand_stmt): Renamed to ...
7252 (lang_expand_stmt): ... this.
7253 (lang_expand_expr_stmt): Initialize.
7254 (set_current_function_name_declared): Likewise.
7255 (stmts_are_full_exprs_p): Likewise.
7256 (current_function_name_declared): Likewise.
7257 (anon_aggr_type_p): Likewise.
7258 (do_poplevel): Change reference to
7259 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7260 Change reference to stmts_are_full_exprs_p to
7261 current_stmt_tree->stmts_are_full_exprs_p.
7262 (add_tree): Likewise.
7263 (finish_expr_stmt): Likewise.
7264 (prep_stmt): Likewise.
7265 (lang_expand_stmt): Likewise.
7266 (begin_compound_stmt): Change reference to
7267 current_function_name_declared to
7268 cp_function_chain->name_declared and call to
7269 current_function_name_declared().
7270 (setup_vtbl_ptr): Likewise.
7271 (genrtl_do_poplevel): Removed.
7272
7273 2000-06-30 Jason Merrill <jason@redhat.com>
7274
7275 * init.c (init_init_processing): Go back to aligning like
7276 double_type_node for old ABI.
7277 (get_cookie_size): Make cookie larger if we get a type that needs
7278 more alignment.
7279 (build_vec_delete): Call it.
7280
7281 * typeck.c (qualify_type_recursive): New fn.
7282 (composite_pointer_type): Use it.
7283 (build_binary_op): Use composite_pointer_type.
7284
7285 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
7286 Jason Merrill <jason@redhat.com>
7287
7288 * typeck.c (check_return_expr): Don't complain about returning
7289 NULL from operator new if -fcheck-new.
7290 * cp-tree.h: Declare flag_check_new here.
7291 * init.c: Not here.
7292
7293 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7294
7295 * mangle.c (find_substitution): Use same_type_p.
7296 (write_encoding): Don't check for substitutions.
7297
7298 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7299
7300 * parse.y (expr_no_comma_rangle): New non-terminal.
7301 (template_parm): Use it for default parameter case.
7302 (template_arg): Use it.
7303 (expr_no_commas): Remove commented out undefined extensions.
7304 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7305 * parse.h, parse.c: Rebuilt.
7306
7307 2000-06-30 Mark Mitchell <mark@codesourcery.com>
7308
7309 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7310 (finish_asm_stmt): Do it here, instead.
7311
7312 * cp-tree.h (ridpointers): Don't declare.
7313 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7314 (record_builtin_java_type): Likewise.
7315 (init_decl_processing): Likewise.
7316 * lex.c: Move inclusion of lex.h.
7317 (ridpointers): Don't define.
7318 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
7319 RID_MAX.
7320 * lex.h (enum rid): Rename to ...
7321 (enum cp_rid): ... this.
7322 (ridpointers): Don't declare.
7323 * parse.y: Move inclusion of lex.h.
7324 * parse.c: Regenerated.
7325 * spew.c: Move inclusion of lex.h.
7326
7327 * cp-tree.h (struct language_function): Remove temp_name_counter.
7328 (temp_name_counter): Remove.
7329 (get_temp_name): Change prototype.
7330 (get_guard): New function.
7331 (get_guard_cond): Likewise.
7332 (set_guard): Likewise.
7333 * cvt.c (build_up_reference): Adjust call to get_temp_name.
7334 * decl.c (expand_static_init): Use get_guard and friends to
7335 implement guard variables.
7336 * decl2.c (get_temp_name): Assume that the variables created are
7337 always static.
7338 (get_sentry): Rename to ...
7339 (get_guard): ... this. Implement new ABI guard variables.
7340 (get_guard_bits): New function.
7341 (get_guard_cond): Likewise.
7342 (set_guard): Likewise.
7343 (start_static_initialization_or_destruction): Use them.
7344 (do_static_initialization): Replace sentry with guard throughout.
7345 (do_static_destruction): Likewise.
7346 * init.c (create_temporary_var): Add comment.
7347
7348 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7349
7350 * mangle.c (find_substitution): Use same_type_p.
7351 (write_encoding): Don't check for substitutions.
7352
7353 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7354
7355 * parse.y (expr_no_comma_rangle): New non-terminal.
7356 (template_parm): Use it for default parameter case.
7357 (template_arg): Use it.
7358 (expr_no_commas): Remove commented out undefined extensions.
7359 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7360 * parse.h, parse.c: Rebuilt.
7361
7362 2000-06-29 Mark Mitchell <mark@codesourcery.com>
7363
7364 * cp-tree.h (flag_const_strings): Remove.
7365 (warn_parentheses): Likewise.
7366 (warn_format): Likewise.
7367 (common_type): Likewise.
7368 (default_conversion): Likewise.
7369 (build_binary_op): Likewise.
7370 (cp_build_binary_op): New macro.
7371 * call.c (build_new_op): Use cp_build_binary_op instead of
7372 build_binary_op.
7373 * class.c (build_vtable_entry_ref): Likewise.
7374 * decl.c (expand_static_init): Likewise.
7375 (compute_array_index_type): Likewise.
7376 (build_enumerator): Likewise.
7377 * decl2.c (delete_sanity): Likewise.
7378 (start_static_initialization_or_destruction): Likewise.
7379 * error.c (dump_type_suffix): Likewise.
7380 * init.c (resolve_offset_ref): Likewise.
7381 (build_new): Likewise.
7382 (build_new_1): Likewise.
7383 (build_vec_delete_1): Likewise.
7384 (build_vec_init): Likewise.
7385 (build_delete): Likewise.
7386 * rtti.c (synthesize_tinfo_fn): Likewise.
7387 (synthesize_tinfo_var): Likewise.
7388 * search.c (expand_upcast_fixups): Likewise.
7389 (fixup_all_virtual_upcast_offsets): Likewise.
7390 * typeck.c (build_array_ref): Likewise.
7391 (get_member_function_from_ptrfunc): Likewise.
7392 (build_binary_op): Add parameter.
7393 (pointer_int_sum): Use cp_build_binary_op.
7394 (pointer_diff): Likewise.
7395 (build_modify_expr): Likewise.
7396 (get_delta_difference): Likewise.
7397 (build_ptrmemfunc): Likewise.
7398
7399 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
7400
7401 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7402 * decl.c (create_implicit_typedef): Adjust.
7403 * decl2.c (build_artificial_parm): Adjust.
7404 * method.c (implicitly_declare_fn): Adjust.
7405 * pt.c (push_inline_template_parms_recursive): Adjust.
7406 (process_template_parm): Adjust.
7407 (overloaded_template_name): Adjust.
7408 * semantics.c (finish_template_template_parm): Adjust.
7409
7410 2000-06-28 Mark Mitchell <mark@codesourcery.com>
7411
7412 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7413 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7414 where to emit thunks.
7415 (build_vtt): Adjust call to build_vtt_inits.
7416 (build_vtt_inits): Add parameter to indicate whether or not
7417 sub-VTTs for virtual bases should be included. Adjust handling of
7418 construction vtables.
7419 (get_matching_base): New function.
7420 (dfs_build_vtt_inits): Rename to ...
7421 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7422 construction vtables.
7423 (dfs_fixup_binfo_vtbls): Likewise.
7424 (build_ctor_vtbl_groups): Build construction vtables for virtual
7425 bases, too.
7426 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7427 to build construction vtbls.
7428 (dfs_accumulate_vtbl_inits): Adjust handling of
7429 construction vtables.
7430
7431 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7432 types correctly.
7433
7434 2000-06-27 Mark Mitchell <mark@codesourcery.com>
7435
7436 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7437
7438 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7439
7440 * search.c (hides): Remove.
7441 (is_subobject_of_p): Add most_derived parameter. Use
7442 CANONICAL_BINFO.
7443 (lookup_field_queue_p): Adjust.
7444 (lookup_field_r): Adjust.
7445
7446 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7447
7448 * decl2.c (handle_class_head): Bash typedefs to the type's main
7449 decl.
7450
7451 2000-06-25 Mark Mitchell <mark@codesourcery.com>
7452
7453 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7454 (begin_global_stmt_expr): ... this.
7455 (genrtl_finish_stmt_expr): Rename to ...
7456 (finish_global_stmt_expr): ... this.
7457 * init.c (begin_init_stmts): Adjust calls.
7458 (finish_init_stmts): Likewise.
7459 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7460 (begin_global_stmt_expr): ... this.
7461 (genrtl_finish_stmt_expr): Rename to ...
7462 (finish_global_stmt_expr): ... this.
7463
7464 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7465
7466 * search.c (lookup_member): Fix typo in comment.
7467
7468 2000-06-24 Jason Merrill <jason@redhat.com>
7469
7470 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7471 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7472
7473 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7474
7475 * parse.y (complex_direct_notype_declarator): Support global_scope.
7476 * Makefile.in: Adjust conflict count.
7477
7478 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7479
7480 * parse.y (template_arg): Convert TEMPLATE_DECL
7481 that is a template template parameter to
7482 TEMPLATE_TEMPLATE_PARM here.
7483
7484 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7485 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7486 (copy_template_template_parm): Adjust prototype.
7487 * decl.c (grokdeclarator): Remove dead code.
7488 * pt.c (process_template_parm): Tidy.
7489 (lookup_template_class): Construct nodes in
7490 copy_template_template_parm.
7491 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7492 lookup_template_class. Use TYPE_TI_TEMPLATE.
7493 * tree.c (copy_template_template_parm): Add NEWARGS
7494 parameter.
7495 (mapcar): Adjust call to copy_template_template_parm.
7496 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7497 * method.c (build_template_template_parm_names): Change error
7498 code to avoid compilation warning.
7499
7500 * gxxint.texi: Document template template parameter
7501 name mangling.
7502
7503 2000-06-21 Alex Samuel <samuel@codesourcery.com>
7504
7505 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7506 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7507 (cp-demangle.o): New rule.
7508 (dyn-string.o): Likewise.
7509 * inc/cxxabi.h (__cxa_demangle): New declaration.
7510
7511 2000-06-22 Mark Mitchell <mark@codesourcery.com>
7512
7513 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7514 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7515 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
7516 a tree, not an int.
7517 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7518 (make_thunk): Change prototype.
7519 (emit_thunk): Rename to use_thunk.
7520 (mangle_thunk): Change prototype.
7521 * class.c (get_derived_offset): Simplify.
7522 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7523 BV_GENERATE_THUNK_WITH_VTABLE_P.
7524 (build_primary_vtable): Simplify.
7525 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7526 (dfs_find_base): Remove.
7527 (update_vtable_entry_for_fn): Correct bug in finding the base
7528 where a virtual function was first declared. Figure out whether
7529 or not to emit a vcall-thunk with the vtables in which it appears.
7530 Correct logic for deciding whether to use an ordinary thunk, or a
7531 vcall thunk.
7532 (finish_struct_1): Remove unnecssary code.
7533 (build_vtbl_initializer): Use ssize_int for the running counter of
7534 negative indices.
7535 (build_vtbl_initializer): Only use vcall thunks where necessary.
7536 Mark thunks as needing to be emitted with their vtables, or not.
7537 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7538 indices. Use size_binop.
7539 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7540 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
7541 size_binop.
7542 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7543 (build_vtable_entry): Mark thunks as needing to be emitted with
7544 their vtables, or not.
7545 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7546 * decl2.c (mark_vtable_entries): Use use_thunk instead of
7547 emit_thunk.
7548 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
7549 information.
7550 * error.c (dump_expr): Use BV_FN.
7551 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7552 not an int.
7553 * method.c (make_thunk): Likewise.
7554 (emit_thunk): Rename to use_thunk. Allow callers to decide
7555 whether or not to actually emit the thunk. Adjust for changes in
7556 representation of vcall offsets.
7557 * search.c (dfs_get_pure_virtuals): Use BV_FN.
7558 * semantics.c (emit_associated_thunks): New function.
7559 (expand_body): Use it.
7560 * ir.texi: Adjust decriptions of thunks.
7561
7562 2000-06-22 Jason Merrill <jason@redhat.com>
7563
7564 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
7565 (tsubst_friend_function): Copy it here.
7566
7567 * decl.c (grok_op_properties): Fix typo.
7568
7569 * decl2.c (delete_sanity): Clarify warning, avoid failure on
7570 deleting void*.
7571
7572 * pt.c (check_explicit_specialization): Clarify error.
7573
7574 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
7575 an old OVERLOAD when we're declaring a non-function.
7576 (pushdecl, destroy_local_var): Check for error_mark_node.
7577 (warn_extern_redeclared_static): Also bail early if
7578 we're a CONST_DECL.
7579 (push_overloaded_decl): Ignore an old error_mark_node.
7580
7581 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
7582
7583 * call.c (build_x_va_arg): Check if in a template decl.
7584 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
7585
7586 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7587
7588 * class.c (push_lang_context): TYPE_NAME gets you to the Java
7589 types DECLs.
7590 * decl.c (check_goto): Computed gotos assumed OK.
7591
7592 2000-06-20 Jason Merrill <jason@redhat.com>
7593
7594 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
7595 for which we don't need to look for instantiations.
7596
7597 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
7598
7599 * parse.y (program): Always call finish_translation_unit.
7600 * parse.c, parse.h: Rebuilt.
7601
7602 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
7603
7604 * method.c: Don't include hard-reg-set.h.
7605
7606 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7607
7608 * rtti.c (get_base_offset): Cope when vbase field is in a base.
7609
7610 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7611
7612 * call.c (build_conditional_expr): Use VOID_TYPE_P.
7613 * cvt.c (cp_convert_to_pointer): Likewise.
7614 (convert_to_void): Likewise.
7615 * error.c (dump_expr): Likewise.
7616 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
7617 * init.c (build_delete): Likewise.
7618 * method.c (emit_thunk): Likewise.
7619 * optmize.c (declare_return_variable): Likewise.
7620 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7621 (get_typeid): Likewise.
7622 (build_dynamic_cast_1): Likewise.
7623 * typeck.c (composite_pointer_type): Likewise.
7624 (common_type): Likewise.
7625 (build_indirect_ref): Likewise.
7626 (build_binary_op): Likewise.
7627 (build_x_compound_expr): Likewise.
7628 (check_return_expr): Likewise.
7629 * typeck2.c (add_exception_specifier): Likewise.
7630
7631 * mangle.c (write_method_parms): Use direct comparison for end
7632 of parmlist.
7633
7634 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
7635
7636 * cp-tree.h (genrtl_try_block): Declare function.
7637 (genrtl_handler): Likewise.
7638 (genrtl_catch_block): Likewise.
7639 (genrtl_ctor_stmt): Likewise.
7640 (genrtl_subobject): Likewise.
7641 (genrtl_decl_cleanup): Likewise.
7642 (genrtl_do_poplevel): Likewise.
7643 (genrtl_do_pushlevel): Likewise.
7644 (genrtl_clear_out_block): Likewise.
7645 (genrtl_goto_stmt): Likewise.
7646 (genrtl_expr_stmt): Likewise.
7647 (genrtl_decl_stmt): Likewise.
7648 (genrtl_if_stmt): Likewise.
7649 (genrtl_while_stmt): Likewise.
7650 (genrtl_do_stmt): Likewise.
7651 (genrtl_return_stmt): Likewise.
7652 (genrtl_for_stmt): Likewise.
7653 (genrtl_break_stmt): Likewise.
7654 (genrtl_continue_stmt): Likewise.
7655 (genrtl_scope_stmt): Likewise.
7656 (genrtl_switch_stmt): Likewise.
7657 (genrtl_case_label): Likewise.
7658 (genrtl_begin_compound_stmt): Likewise.
7659 (genrtl_finish_compound_stmt): Likewise.
7660 (genrtl_compound_stmt): Likewise.
7661 (genrtl_asm_stmt): Likewise.
7662 (genrtl_named_return_value): Likewise.
7663 (genrtl_begin_stmt_expr): Likewise.
7664 (genrtl_finish_stmt_expr): Likewise.
7665 (finish_for_stmt): Removed first argument.
7666 (finish_switch_stmt): Likewise.
7667
7668 * semantics.c (genrtl_try_block): Define function.
7669 (genrtl_handler): Likewise.
7670 (genrtl_catch_block): Likewise.
7671 (genrtl_ctor_stmt): Likewise.
7672 (genrtl_subobject): Likewise.
7673 (genrtl_decl_cleanup): Likewise.
7674 (genrtl_do_poplevel): Likewise.
7675 (genrtl_do_pushlevel): Likewise.
7676 (genrtl_clear_out_block): Likewise.
7677 (genrtl_goto_stmt): Likewise.
7678 (genrtl_expr_stmt): Likewise.
7679 (genrtl_decl_stmt): Likewise.
7680 (genrtl_if_stmt): Likewise.
7681 (genrtl_while_stmt): Likewise.
7682 (genrtl_do_stmt): Likewise.
7683 (genrtl_return_stmt): Likewise.
7684 (genrtl_for_stmt): Likewise.
7685 (genrtl_break_stmt): Likewise.
7686 (genrtl_continue_stmt): Likewise.
7687 (genrtl_scope_stmt): Likewise.
7688 (genrtl_switch_stmt): Likewise.
7689 (genrtl_case_label): Likewise.
7690 (genrtl_begin_compound_stmt): Likewise.
7691 (genrtl_finish_compound_stmt): Likewise.
7692 (genrtl_compound_stmt): Likewise.
7693 (genrtl_asm_stmt): Likewise.
7694 (genrtl_named_return_value): Likewise.
7695 (genrtl_begin_stmt_expr): Likewise.
7696 (genrtl_finish_stmt_expr): Likewise.
7697 (finish_for_stmt): Removed first argument and generate rtl
7698 specific code.
7699 (finish_switch_stmt): Likewise.
7700 (do_poplevel): Removed generate rtl specific code.
7701 (do_pushlevel): Likewise.
7702 (add_tree): Likewise.
7703 (finish_goto_stmt): Likewise.
7704 (finish_expr_stmt): Likewise.
7705 (begin_if_stmt): Likewise.
7706 (finish_if_stmt_cond): Likewise.
7707 (finish_then_clause): Likewise.
7708 (begin_else_clause): Likewise.
7709 (finish_else_clause): Likewise.
7710 (finish_if_stmt): Likewise.
7711 (clear_out_block): Likewise.
7712 (begin_while_stmt): Likewise.
7713 (finish_while_stmt_cond): Likewise.
7714 (finish_while_stmt): Likewise.
7715 (begin_do_stmt): Likewise.
7716 (finish_do_body): Likewise.
7717 (finish_do_stmt): Likewise.
7718 (finish_return_stmt): Likewise.
7719 (begin_for_stmt): Likewise.
7720 (finish_for_init_stmt): Likewise.
7721 (finish_for_cond): Likewise.
7722 (finish_for_expr): Likewise.
7723 (finish_break_stmt): Likewise.
7724 (finish_continue_stmt): Likewise.
7725 (begin_switch_stmt): Likewise.
7726 (finish_switch_cond): Likewise.
7727 (finish_case_label): Likewise.
7728 (begin_try_block): Likewise.
7729 (begin_function_try_block): Likewise.
7730 (finish_try_block): Likewise.
7731 (finish_cleanup_try_block): Likewise.
7732 (finish_cleanup): Likewise.
7733 (finish_function_try_block): Likewise.
7734 (finish_handler_sequence): Likewise.
7735 (finish_function_handler_sequence): Likewise.
7736 (begin_handler): Likewise.
7737 (finish_handler_parms): Likewise.
7738 (begin_catch_block): Likewise.
7739 (finish_handler): Likewise.
7740 (begin_compound_stmt): Likewise.
7741 (finish_compound_stmt): Likewise.
7742 (finish_asm_stmt): Likewise.
7743 (finish_label_stmt): Likewise.
7744 (finish_label_decl): Likewise.
7745 (finish_subobject): Likewise.
7746 (finish_decl_cleanup): Likewise.
7747 (finish_named_return_value): Likewise.
7748 (begin_stmt_expr): Likewise.
7749 (finish_stmt_expr): Likewise.
7750
7751 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
7752 to call genrtl_expr_stmt when appropriate.
7753
7754 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
7755 begin_compound_expr to call genrtl_begin_stmt_expr and
7756 genrtl_begin_compound_expr when appropriate.
7757 (finish_init_stmts): Changed calls to finish_compound_expr and
7758 finish_stmt_expr to call genrtl_finish_compound_expr and
7759 genrtl_finish_stmt_expr when appropriate.
7760 (expand_default_init): Changed call to finish_expr_stmt to call
7761 genrtl_expr_stmt when appropriate.
7762 (build_vec_init): Likewise.
7763
7764 * parse.y (simple_stmt): Removed first argument from call to
7765 finish_for_stmt. Removed first argument from call to
7766 finish_switch_stmt.
7767
7768 * parse.c: Regenerated.
7769
7770 * pt.c (tsubst_expr): Removed first argument from call to
7771 finish_for_stmt. Removed first argument from call to
7772 finish_switch_stmt.
7773
7774 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
7775
7776 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
7777 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
7778
7779 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
7780 (cplus_tree_code_length[]): Likewise.
7781 (cplus_tree_code_name[]): Likewise.
7782 (init_parse): Added call to add_c_tree_codes. Changed
7783 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
7784
7785 2000-06-16 Mark Mitchell <mark@codesourcery.com>
7786
7787 * cp-tree.h (finish_mem_initializers): Declare.
7788 (count_trees): Likewise.
7789 * parse.y (base_init): Use finish_mem_initializers.
7790 * semantics.c (finish_mem_initializers): New function.
7791
7792 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
7793 the number of trees.
7794 (n_trees): Remove.
7795 (count_trees): Don't use it.
7796
7797 2000-06-15 Jason Merrill <jason@redhat.com>
7798
7799 * tree.c (count_trees): New debugging function.
7800
7801 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
7802 * init.c (build_member_call): Pull out the name of a DECL.
7803
7804 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
7805 * semantics.c (expand_body): Push to TV_INTEGRATION here.
7806 * optimize.c (optimize_function): Not here.
7807 * pt.c (instantiate_decl): Push to TV_PARSE.
7808
7809 2000-06-15 Mark Mitchell <mark@codesourcery.com>
7810
7811 * cp-tree.h (struct language_function): Remove x_base_init_list
7812 and x_member_init_list.
7813 (current_base_init_list): Remove.
7814 (current_member_init_list): Likewise.
7815 (setup_vtbl_ptr): Change prototype.
7816 (emit_base_init): Likewise.
7817 (expand_member_init): Likewise.
7818 (reinit_parse_for_function): Remove.
7819 * decl.c (save_function_data): Don't clear x_base_init_list and
7820 x_member_init_list.
7821 (mark_language_function): Don't mark them.
7822 * init.c (perform_member_init): Tweak comment.
7823 (sort_member_init): Take the list of initializers as an argument.
7824 (sort_base_init): Likewise.
7825 (emit_base_init): Likewise.
7826 (expand_member_init): Return the initializer. Don't use global
7827 variables.
7828 * lex.c (reinit_parse_for_function): Remove.
7829 * method.c (build_template_parm_names): Correct substitution.
7830 (do_build_copy_constructor): Don't use current_member_init_list
7831 and current_base_init_list.
7832 (synthesize_method): Likewise.
7833 * parse.y (base_init): Split mem-initializers into
7834 base-initializers and field-initializers.
7835 (member_init_list): Build up the list here.
7836 (member_init): Return the initializer.
7837 (fn.depfn): Don't use reinit_parse_for_function.
7838 * parse.c: Regenerated.
7839 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
7840 ERROR_MARK.
7841 (tsubst_expr): Don't use current_member_init_list
7842 and current_base_init_list.
7843 (tsubst_expr_values): Rename to ...
7844 (tsubst_initializer_list): ... this. Use convert_from_reference.
7845 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
7846 and current_base_init_list.
7847 (begin_function_definition): Don't call reinit_parse_for_function.
7848
7849 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
7850
7851 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
7852 correctly.
7853
7854 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
7855
7856 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
7857
7858 * cp-tree.h (IF_COND): Move to c-common.h.
7859 (THEN_CLAUSE): Likewise.
7860 (ELSE_CLAUSE): Likewise.
7861 (WHILE_COND): Likewise.
7862 (WHILE_BODY): Likewise.
7863 (DO_COND): Likewise.
7864 (DO_BODY): Likewise.
7865 (RETURN_EXPR): Likewise.
7866 (EXPR_STMT_EXPR): Likewise.
7867 (FOR_INIT_STMT): Likewise.
7868 (FOR_COND): Likewise.
7869 (FOR_EXPR): Likewise.
7870 (FOR_BODY): Likewise.
7871 (SWITCH_COND): Likewise.
7872 (SWITCH_BODY): Likewise.
7873 (CASE_LOW): Likewise.
7874 (CASE_HIGH): Likewise.
7875 (GOTO_DESTINATION): Likewise.
7876 (COMPOUND_BODY): Likewise.
7877 (ASM_CV_QUAL): Likewise.
7878 (ASM_STRING): Likewise.
7879 (ASM_OUTPUTS): Likewise.
7880 (ASM_INPUTS): Likewise.
7881 (ASM_CLOBBERS): Likewise.
7882 (DECL_STMT_DECL): Likewise.
7883 (STMT_EXPR_STMT): Likewise.
7884 (LABEL_STMT_LABEL): Likewise.
7885 (SCOPE_BEGIN_P): Likewise.
7886 (SCOPE_END_P): Likewise.
7887 (SCOPE_STMT_BLOCK): Likewise.
7888 (SCOPE_NULLIFIED_P): Likewise.
7889 (SCOPE_NO_CLEANUPS_P): Likewise.
7890 (SCOPE_PARTIAL_P): Likewise.
7891 (ASM_VOLATILE_P): Likewise.
7892 (STMT_LINENO): Likewise.
7893 (STMT_LINENO_FOR_FN_P): Likewise.
7894
7895 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
7896 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
7897 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
7898 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
7899 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
7900
7901 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
7902
7903 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
7904 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
7905
7906 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
7907 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
7908 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
7909
7910 2000-06-14 Mark Mitchell <mark@codesourcery.com>
7911
7912 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
7913 * class.c (dfs_find_final_overrider): Set it appropriately.
7914 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
7915 avoid unneeded secondary vptrs.
7916
7917 2000-06-13 Jakub Jelinek <jakub@redhat.com>
7918
7919 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
7920 (check_bitfield_decl, check_field_decl): Likewise.
7921 (build_vtbl_or_vbase_field, build_base_field): Likewise.
7922 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
7923 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
7924 (xfer_tag, finish_enum): Likewise.
7925 * decl2.c (finish_builtin_type): Likewise.
7926 * init.c (init_init_processing): Likewise.
7927 * pt.c (instantiate_class_template): Likewise.
7928 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
7929 * cp-tree.h (struct lang_type): Add user_align member.
7930 (CLASSTYPE_USER_ALIGN): Define.
7931
7932 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7933
7934 * Make-lang.in (c++.install-common): Install g++-cross in
7935 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
7936 $(target_alias)-g++ and $(target_alias)-c++.
7937
7938 2000-06-12 Mark Mitchell <mark@codesourcery.com>
7939
7940 * class.c (vcall_offset_data_s): Add last_init and fns.
7941 (overrides): Rename to same_signature_p.
7942 (dfs_find_final_overrider): Adjust accordingly.
7943 (mark_overriders): Likewise.
7944 (warn_hidden): Likewise.
7945 (build_vtbl_initializer): Reorganize machinery for building things
7946 at negative offsets.
7947 (build_vcall_and_vbase_vtbl_entries): Likewise.
7948 (build_vbase_offset_vtbl_entries): Likewise.
7949 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
7950 offset entries. Do not create two entries for functions with the
7951 same signature.
7952 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
7953 (build_rtti_vtbl_entries): Reorganize machinery for building things
7954 at negative offsets.
7955
7956 * optimize.c (expand_call_inline): Don't recurse into the code
7957 used to initialize the parameters more than once.
7958
7959 2000-06-11 Mark Mitchell <mark@codesourcery.com>
7960
7961 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
7962 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
7963 (find_substitution): Only use the `Sa' substitution for
7964 std::allocator, not instantiations of it.
7965 (write_template_prefix): Move comment. Only use a TREE_LIST to
7966 represent substitutions for a member template.
7967 (write_array_type): Mangle array dimensions correctly.
7968 * optimize.c (maybe_clone_body): Copy more information from the
7969 cloned function.
7970 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
7971 on the regenerated declaration.
7972
7973 2000-06-11 Chip Salzenberg <chip@valinux.com>
7974 Mark Mitchell <mark@codesourcery.com>
7975
7976 * class.c (build_vtable): Clarify comment.
7977 (build_ctor_vtbl_group): Pass the most derived type to
7978 build_vtable.
7979
7980 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7981
7982 * decl2.c (compare_options): Don't needlessly cast away const-ness.
7983
7984 2000-06-10 Mark Mitchell <mark@codesourcery.com>
7985
7986 * decl.c (add_binding): Handle duplicate declarations of external
7987 variables.
7988
7989 2000-06-09 Chip Salzenberg <chip@valinux.com>
7990 Mark Mitchell <mark@codesourcery.com>
7991
7992 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
7993 argument.
7994 (write_signed_number): New macro.
7995 (write_unsigned_number): Likewise.
7996 (write_source_name): Use them.
7997 (write_number): Handle signed and unsigned values.
7998 (write_integer_cst): Use tree_int_cst_sgn, and use
7999 write_unsigned_number or write_signed_number as appropriate.
8000 (write_discriminator): Use write_unsigned_number or
8001 write_signed_number as appropriate.
8002 (write_template_arg_literal): Likewise.
8003 (write_array_type): Use tree_low_cst.
8004 (write_template_parm): Use write_unsigned_number or
8005 write_signed_number as appropriate.
8006 (write_substitution): Adjust call to write_number.
8007 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8008 (write_expression): Handle non-type template arguments of
8009 reference type correctly.
8010 (mangle_thunk): Use write_signed_number.
8011
8012 2000-06-09 Chip Salzenberg <chip@valinux.com>
8013
8014 * mangle.c (find_substition): Don't mangle objects with typename
8015 substitutions (e.g. "cin" as "Si").
8016
8017 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
8018
8019 * call.c (add_candidate): Use ggc_alloc_cleared.
8020 * decl.c (lookup_label): Likewise.
8021 * lex.c (retrofit_lang_decl): Likewise.
8022
8023 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
8024
8025 * semantics.c (expand_body): Push to TV_EXPAND.
8026 * optimize.c (optimize_function): Push to TV_INTEGRATION.
8027 * decl.c (start_function): Always call announce_function.
8028
8029 * tinfo2.cc: Just declare abort.
8030
8031 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
8032
8033 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8034 whenever @ is a symbolic name.
8035
8036 2000-06-08 Jakub Jelinek <jakub@redhat.com>
8037
8038 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8039
8040 2000-06-07 Mark Mitchell <mark@codesourcery.com>
8041
8042 * decl.c (pushdecl): Look up functions by DECL_NAME, not
8043 DECL_ASSEMBLER_NAME.
8044
8045 2000-06-06 Mark Mitchell <mark@codesourcery.com>
8046
8047 * decl2.c (c_language): Define.
8048
8049 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8050
8051 * lex.c (lang_init_options): Tweak.
8052
8053 * decl2.c: Remove #inclusion of diagnostic.h
8054 (lang_decode_option): Move diagnostic formatting options to
8055 toplevel.
8056
8057 * lang-options.h: Remove documentation for diagnostic options.
8058
8059 * Makefile.in (lex.o): Depends upon diagnostic.h
8060
8061 2000-06-06 Mark Mitchell <mark@codesourcery.com>
8062
8063 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8064 the same DECL_RESULT, it's not a redefinition.
8065 * pt.c (tsubst_decl): Remove code to handle illegal
8066 specializations.
8067
8068 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
8069
8070 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8071
8072 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
8073
8074 * search.c (maybe_suppress_debug_info): Don't check
8075 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8076
8077 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8078 here if extern_p.
8079
8080 Remember instantiation context in deferred instantiations.
8081 * cp-tree.h (struct tinst_level): Remove.
8082 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8083 * pt.c (current_tinst_level): Now a tree.
8084 (print_template_context, push_tinst_level, pop_tinst_level,
8085 tinst_for_decl): Adjust.
8086 (reopen_tinst_level): New fn.
8087 (init_pt): Register current_tinst_level as a root.
8088 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8089 of the pending templates list.
8090 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
8091 * lex.c (extract_interface_info): Adjust.
8092 * decl2.c (warn_if_unknown_interface): Adjust.
8093
8094 2000-06-05 Mark Mitchell <mark@codesourcery.com>
8095
8096 * class.c (indirect_primary_base_p): New function.
8097 (determine_primary_base): Use it.
8098
8099 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
8100
8101 Update new-abi dynamic cast algorithm.
8102 * tinfo.cc (__class_type_info::__dyncast_result): Add
8103 whole_details. Adjust constructor.
8104 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8105 Avoid unnecessary searching.
8106 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8107
8108 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8109
8110 * decl.c (init_decl_processing): Don't call record_component_aliases.
8111 * tree.c (build_cplus_array_type_1): Likewise.
8112
8113 2000-06-04 Mark Mitchell <mark@codesourcery.com>
8114
8115 * ir.texi: Correct typo.
8116 * mangle.c (write_expression): Handle non-type template arguments
8117 with reference type.
8118 * method.c (build_overload_value): Likewise.
8119 * pt.c (convert_nontype_argument): Explicitly represent conversion
8120 to a reference with an ADDR_EXPR.
8121 (unify): Always unify arguments in left-to-right order.
8122
8123 2000-06-03 Alex Samuel <samuel@codesourcery.com>
8124 Mark Mitchell <mark@codesourcery.com>
8125
8126 * Make-lang.in (CXX_SRCS): Add mangle.c.
8127 * Makefile.in (CXX_OBJS): Add mangle.o.
8128 (mangle.o): New rule.
8129
8130 * class.c (local_classes): New variable.
8131 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8132 (get_vtt_name): Use mangle_vtt_name for new ABI.
8133 (init_class_processing): Initialize local_classes.
8134 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8135 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8136 (std_identifier): New macro.
8137 (DECL_VOLATILE_MEMFUNC_P): New macro.
8138 (DECL_NAMESPACE_STD_P): Likewise.
8139 (local_classes): Declare.
8140 (get_mostly_instantiated_function_type): Declare.
8141 (init_mangle): Declare.
8142 (mangle_decl): Likewise.
8143 (mangle_type_string): Likewise.
8144 (mangle_type): Likewise.
8145 (mangle_typeinfo_for_type): Likewise.
8146 (mangle_typeinfo_string_for_type): Likewise.
8147 (mangle_vtbl_for_type): Likewise.
8148 (mangle_vtt_for_type): Likewise.
8149 (mangle_ctor_vtbl_for_type): Likewise.
8150 (mangle_thunk): Likewise.
8151 (mangle_conv_op_name_for_type): Likewise.
8152 (mangle_guard_variable): Likewise.
8153 * decl.c (pushtag): Keep track of local classes.
8154 (initialize_predefined_identifiers): Initialize std_identifier.
8155 (init_decl_processing): Use std_identifier.
8156 (start_decl): Don't treat instantiations as specializations.
8157 (grokdeclarator): Likewise.
8158 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
8159 name for fully-instantiated templates.
8160 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8161 destructors with the new ABI.
8162 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8163 (grokfield): Use mangle_type for new ABI.
8164 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8165 (get_sentry): Use mangle_guard_variable for new ABI.
8166 (start_static_initialization_or_destruction): Likewise.
8167 * expr.c (extract_aggr_init): Remove.
8168 (extract_scalar_init): Likewise.
8169 (extract_init): Remove #if 0'd code.
8170 * mangle.c: New function.
8171 * method.c (build_mangled_name): Assert not flag_new_abi.
8172 (build_static_name): Likewise.
8173 (build_decl_overload_real): Likewise.
8174 (build_typename_overload): Likewise.
8175 (build_overload_with_type): Likewise.
8176 (build_overload_name): Likewise.
8177 (get_ctor_vtbl_name): Likewise.
8178 (start_squangling): Likewise.
8179 (get_id_2): Likewise.
8180 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8181 (init_method): Call init_mangle for new ABI.
8182 (make_thunk): Call mangle_thunk for new ABI.
8183 * operators.def: Correct new ABI manglings for the `%' operator.
8184 Add `::' operator.
8185 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8186 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8187 (lookup_template_class): Call mangle_decl for new ABI.
8188 (get_mostly_instantiated_function_type): New function.
8189 (set_mangled_name_for_template_decl): Use it.
8190 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8191 the new ABI. Use mangle_conv_op_name_for_type for instantiated
8192 conversion op names.
8193 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8194 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8195 (tinfo_base_init): Likewise. Mangle typeinfo string name with
8196 mangle_typeinfo_string_for_type.
8197
8198 2000-06-03 Mark Mitchell <mark@codesourcery.com>
8199
8200 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8201 (INNERMOST_TEMPLATE_ARGS): New macro.
8202 (innermost_args): Remove.
8203 (get_innermost_template_args): New function.
8204 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8205 * error.c (dump_function_decl): Be caution when using
8206 most_general_template.
8207 * method.c (build_template_parm_names): Use
8208 INNERMOST_TEMPLATE_ARGS.
8209 * pt.c (add_to_template_args): Tidy comment
8210 (get_innermost_template_args): New function.
8211 (check_explicit_specialization): Clear DECL_INITIAL for a new
8212 specialization.
8213 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8214 Tidy.
8215 (push_template_decl): Always register specializations of the most
8216 general template.
8217 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8218 (coerce_template_parms): Likewise.
8219 (lookup_template_class): Likewise.
8220 (innermost_args): Remove.
8221 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8222 (tsubst_decl): Handle tricky specializations. Use
8223 get_innermost_template_args.
8224 (instantiate_template): Simplify handling of partial
8225 instantiations.
8226 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8227 (most_general_template): Reimplement, in a more straightforward
8228 manner.
8229 (regenerate_decl_from_template): Tweak formatting. Use
8230 TMPL_ARGS_DEPTH for clarity.
8231 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8232
8233 * dump.c (dequeue_and_dump): Dump information about thunks.
8234
8235 2000-06-01 Richard Henderson <rth@cygnus.com>
8236
8237 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8238
8239 2000-06-01 Richard Henderson <rth@cygnus.com>
8240
8241 * decl2.c (unsupported_options): Fix typo, make const.
8242 (lang_decode_option): Fix bsearch argument order.
8243
8244 2000-06-01 Mark Mitchell <mark@codesourcery.com>
8245
8246 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8247 on FIELD_DECLs.
8248
8249 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8250
8251 * cp-tree.h (c_get_alias_set): Deleted.
8252 * Makefile.in (decl.o): Include ../expr.h.
8253 * decl.c (expr.h): Include.
8254 (init_decl_processing): Call record_component_aliases for arrays.
8255 (grokdeclarator): Likewise.
8256 Set TREE_ADDRESSABLE for fields that aren't bitfields.
8257 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8258
8259 2000-05-31 Mark Mitchell <mark@codesourcery.com>
8260
8261 Remove guiding declaration support.
8262 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8263 (flag_guiding_decls): Remove.
8264 * call.c (build_user_type_conversion_1): Remove support for
8265 guiding decls.
8266 (build_new_function_call): Likewise.
8267 (build_new_op): Likewise.
8268 (build_new_method_call): Likewise.
8269 * decl.c (start_function): Likewise.
8270 * friend.c (is_friend): Likewise.
8271 (do_friend): Likewise.
8272 * decl2.c ((flag_dump_translation_unit): Make it const.
8273 (flag_guiding_decls): Remove.
8274 (unsupported_options): New variable
8275 (compare_options): New function.
8276 (lang_decode_option): Use them.
8277
8278 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8279
8280 * method.c (mangle_expression): Adjust test for legal expression
8281 operators.
8282
8283 * pt.c (instantiate_decl): Save and restore the local
8284 specializations list.
8285
8286 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
8287
8288 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8289
8290 2000-05-30 Mark Mitchell <mark@codesourcery.com>
8291
8292 * call.c (add_template_candidate_real): Handle member template
8293 constructors for classes with virtual bases.
8294 (build_user_type_conversion_1): Use in_charge_arg_for_name.
8295 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8296
8297 * ir.texi: Update thunk documentation.
8298
8299 * call.c (joust): Fix handling of overloaded builtin operators.
8300
8301 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
8302
8303 * cp-tree.h (DECL_ANTICIPATED): New macro.
8304 Document new use of DECL_LANG_FLAG_7.
8305 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8306 in the user namespace.
8307 * lex.c (do_identifier): If the identifier's declaration has
8308 DECL_ANTICIPATED on, it has not yet been declared. But do not
8309 replace it with an ordinary implicit declaration.
8310
8311 * tinfo2.cc: Include stdlib.h.
8312
8313 2000-05-29 Mark Mitchell <mark@codesourcery.com>
8314
8315 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8316 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8317 CLASSTYPE_ALIGN.
8318
8319 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
8320
8321 * decl2.c (lang_decode_option): Use skip_leading_substring instead
8322 of plain strncmp.
8323
8324 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
8325
8326 * operators.def (<?): Duplicated, should have been...
8327 (>?): this. Fixed.
8328
8329 2000-05-27 Alex Samuel <samuel@codesourcery.com>
8330 Mark Mitchell <mark@codesourcery.com>
8331
8332 * cp-tree.h (ansi_opname): Make it a macro.
8333 (ansi_assopname): Likewise.
8334 (struct lang_decl_flags): Add assignment_operator_p.
8335 (struct lang_decl): Add operator_code.
8336 (DECL_VTT_PARM): Adjust.
8337 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8338 overloaded operator.
8339 (SET_OVERLOADED_OPERATOR_CODE): New macro.
8340 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8341 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8342 (opname_tab): Remove.
8343 (assignop_tab): Likewise.
8344 (operator_name_info_t): New type.
8345 (operator_name_info): New variable.
8346 (assignment_operator_name_info): Likewise.
8347 (build_cp_library_fn): Remove declaration.
8348 (push_cp_library_fn): Likewise.
8349 (operator_name_string): Likewise.
8350 (build_decl_overload): Likewise.
8351 * call.c (print_z_candidates): Simplify.
8352 (build_object_call): Adjust usage of ansi_opname. Use
8353 DECL_OVERLOADED_OPERATOR_P.
8354 (op_error): Adjust operator name lookup.
8355 (build_conditional_expr): Adjust usage of ansi_opname.
8356 (build_new_op): Likewise.
8357 (build_op_delete_call): Likewise.
8358 (build_over_call): Likewise.
8359 (joust): Use DECL_OVERLOADED_OPERATOR_P.
8360 * decl.c (duplicate_decls): Copy operator_code.
8361 (init_decl_processing): Adjust parameters to push_cp_library_fn.
8362 (builtin_function): Adjust parameters to build_library_fn_1.
8363 (build_library_fn_1): Accept an overloaded operator code.
8364 (build_library_fn): Pass ERROR_MARK.
8365 (build_cp_library_fn): Accept an overloaded operator code.
8366 (push_cp_library_fn): Likewise.
8367 (grokfndecl): Tweak.
8368 (grokdeclarator): Simplify code to compute names of overloaded
8369 operators. Adjust use of ansi_opname.
8370 (ambi_op_p): Work on tree_codes, not identifiers.
8371 (unary_op_p): Likewise.
8372 (grok_op_properties): Likewise.
8373 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8374 (lang_mark_tree): Don't try to mark the operator_code.
8375 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8376 * error.c (dump_decl): Remove special handling for operator
8377 names.
8378 (dump_function_name): Likewise.
8379 (dump_expr): Adjust name lookup of operators.
8380 (op_to_string): Simplify.
8381 (assop_to_string): Likewise.
8382 * init.c (build_new_1): Adjust use of ansi_opname.
8383 * lex.c (opname_tab): Remove.
8384 (assignop_tab): Likewise.
8385 (ansi_opname): Likewise.
8386 (ansi_assopname): Likewise.
8387 (operator_name_string): Likewise.
8388 (reinit_lang_specific): Likewise.
8389 (operator_name_info): New variable.
8390 (assignment_operator_name_info): Likewise.
8391 (init_operators): New function.
8392 (init_parse): Use it.
8393 (do_identifier): Adjust use of ansi_opname.
8394 * method.c (mangle_expression): Don't use ansi_opname for
8395 mangling.
8396 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8397 (build_decl_overload): Remove.
8398 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8399 (do_build_assign_ref): Adjust use of ansi_opname.
8400 (synthesize_method): Likewise.
8401 (implicitly_declare_fn): Likewise.
8402 * operators.def: New file.
8403 * parse.y (operator): Adjust use of ansi_opname.
8404 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8405 (set_mangled_name_for_template_decl): Don't play games with
8406 current_namespace.
8407 (special_function_p): Adjust use of ansi_opname.
8408 * typeck.c (check_return_expr): Likewise.
8409 * Make-lang.in (cc1plus): Depend on operators.def.
8410 * Makefile.in (lex.o): Likewise.
8411 (decl.o): Likewise.
8412
8413 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
8414
8415 * Make-lang.in (cplib2.ready): Eradicate.
8416
8417 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8418
8419 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8420 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8421 (built_min, cp_tree_equal): Likewise.
8422
8423 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8424
8425 * class.c (layout_nonempty_base_or_field): Replace
8426 `record_layout_info' with `record_layout_info_s'.
8427
8428 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
8429
8430 Fix goto checking.
8431 * cp-tree.h (struct language_function): x_named_labels is now
8432 a struct named_label_list*.
8433 * decl.c (struct named_label_use_list): Renamed from...
8434 (struct named_label_list): ...this. New struct.
8435 (push_binding_level): Don't set eh_region.
8436 (note_level_for_eh): New fn.
8437 (pop_label): Take label and old value directly.
8438 (pop_labels): Adjust for new named_labels format.
8439 (lookup_label): Likewise.
8440 (poplevel): Note characteristics of a binding level containing a
8441 named label. Mess with named label lists earlier.
8442 (mark_named_label_lists): New fn.
8443 (mark_lang_function): Call it.
8444 (use_label): New fn, split out from...
8445 (make_label_decl): ...here. Don't call it.
8446 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8447 check_previous_gotos): New fns, split out from...
8448 (define_label): ...here.
8449 (check_switch_goto): New fn.
8450 (define_case_label): Call it.
8451 (check_goto): New fn.
8452 * semantics.c (finish_goto_stmt): Call it and use_label.
8453 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8454 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8455
8456 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8457
8458 * class.c (build_vtable_entry_ref): Correct usage of
8459 get_vtbl_decl_for_binfo.
8460
8461 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8462 * method.c (implicitly_declare_fn): Not here.
8463
8464 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
8465
8466 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8467 (CPTI_PTMD_DESC_TYPE): ... here.
8468 (ptmd_desc_type_node): Rename to ...
8469 (ptm_desc_type_node): ... here.
8470 * decl.c: Likewise.
8471 * rtti.c (ptmd_initializer): Rename to ...
8472 (ptm_initializer): ... here.
8473 (sythesize_tinfo_var): Adjust. Deal with pointer to member
8474 function.
8475 (create_tinfo_types): Adjust.
8476
8477 2000-05-25 Mark Mitchell <mark@codesourcery.com>
8478
8479 Finish implementation of VTTs.
8480 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8481 CPTI_VTT_PARM_IDENTIFIER.
8482 (vtt_parm_identifier): New macro.
8483 (vtt_parm_type): Likewise.
8484 (BINFO_SUBVTT_INDEX): Likewise.
8485 (BINFO_VPTR_INDEX): Likewise.
8486 (struct lang_decl): Add vtt_parm.
8487 (DECL_VTT_PARM): New macro.
8488 (DECL_USE_VTT_PARM): Likewise.
8489 (DECL_NEEDS_VTT_PARM_P): Likewise.
8490 (get_vtt_name): Declare.
8491 (build_artificial_parm): Likewise.
8492 (fixup_all_virtual_upcast_offsets): Likewise.
8493 (expand_indirect_vtbls_init): Remove.
8494 * call.c (build_new_method_call): Pass the vtt to subobject
8495 constructors and destructors.
8496 * class.c (get_vtt_name): Give it external linkage.
8497 (build_clone): Handle the magic VTT parameters for clones.
8498 (clone_function_decl): Fix typo in comment.
8499 (build_vtt): Keep track of the indices in the VTTs where various
8500 entities are stored.
8501 (build_vtt_inits): Likewise.
8502 (dfs_build_vtt_inits): Likewise.
8503 (build_ctor_vtbl_group): Tweak type of construction vtables.
8504 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8505 primary bases, when building construction vtables.
8506 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8507 (initialize_predefined_identifiers): Add vtt_parm_identifier.
8508 (init_decl_processing): Initialize vtt_parm_type.
8509 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8510 (lang_mark_tree): Make vtt_parm.
8511 * decl2.c (build_artificial_parm): New function.
8512 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
8513 (grokclassfn): Use build_artificial_parm.
8514 * init.c (initialize_vtbl_ptrs): Call
8515 fixup_all_virtual_upcast_offsets directly.
8516 (perform_member_init): Use the complete subobject destructor for
8517 member cleanups.
8518 (build_vtbl_address): New function.
8519 (expand_virtual_init): Handle VTTs.
8520 * optimize (maybe_clone_body): Likewise.
8521 * search.c (fixup_all_virtual_upcast_offsets): Give it external
8522 linkage.
8523 (expand_indirect_vtbls_init): Remove.
8524 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8525 * tree.c (make_binfo): Make them bigger.
8526
8527 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8528
8529 * inc/cxxabi.h (__pbase_type_info): Define, based on
8530 __pointer_type_info.
8531 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8532 (__pointer_to_member_type_info): Likewise.
8533 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8534 (__pointer_to_member_type_info::__is_pointer_p): Remove.
8535 (__pointer_type_info::__do_catch): Rename to ...
8536 (__pbase_type_info::__do_catch): ... here. Adjust.
8537 (__pbase_type_info::__pointer_catch): Implement.
8538 (__pointer_type_info::__pointer_catch): Adjust.
8539 (__pointer_to_member_type_info::__pointer_catch): Adjust.
8540
8541 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8542
8543 * tinfo.h (__user_type_info::contained_virtual_p): New
8544 predicate.
8545 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8546 shaped hierarchy.
8547 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8548 diamond shaped hierarchy. Add early out for mixed diamond and
8549 duplicate shaped hierarchy.
8550
8551 2000-05-24 Mark Mitchell <mark@codesourcery.com>
8552
8553 * cp-tree.h (build_delete): Change prototype.
8554 (build_vec_delete): Likewise.
8555 * call.c (build_scoped_method_call): Use special_function_kind
8556 values to indicate the kind of destruction to be done.
8557 (build_method_call): Likewise.
8558 * decl.c (finish_destructor_body): Likewise.
8559 (maybe_build_cleanup_1): Likewise. Rename to ...
8560 (maybe_build_cleanup): ... this.
8561 * decl2.c (delete_sanity): Use special_function_kind
8562 values to indicate the kind of destruction to be done.
8563 (build_cleanup): Likewise.
8564 * init.c (perform_member_init): Likewise.
8565 (build_vec_delete_1): Likewise.
8566 (build_dtor_call): Simplify.
8567 (build_delete): Use special_function_kind
8568 values to indicate the kind of destruction to be done.
8569 (build_vbase_delete): Likewise.
8570 (build_vec_delete): Likewise.
8571
8572 * init.c (sort_member_init): Fix typo in error message generation
8573 code.
8574
8575 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
8576
8577 * semantics.c (begin_class_definition): make the packed
8578 attribute be sensitive to the "-fpack-struct" command line flag
8579
8580 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
8581
8582 Update new-abi upcast algorithm.
8583 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
8584 prototype and meaning of return value.
8585 (__si_class_type_info::__do_upcast): Likewise.
8586 (__vmi_class_type_info::__do_upcast): Likewise.
8587 * tinfo.cc (__class_type_info::__upcast_result): Replace
8588 whole2dst with part2dst. Adjust ctor.
8589 (__class_type_info::__do_upcast): Adjust call of worker function.
8590 (__class_type_info::__do_upcast): Adjust.
8591 (__si_class_type_info::__do_upcast): Adjust. Use parent's
8592 __do_upcast.
8593 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
8594 virtual base in diamond hierarchy bug.
8595
8596 2000-05-23 Mark Mitchell <mark@codesourcery.com>
8597
8598 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
8599 and bitfield to tinfo_fn_p.
8600 (DECL_TINFO_FN_P): Adjust.
8601 (SET_DECL_TINFO_FN_P): Likewise.
8602 (DECL_MUTABLE_P): Likewise.
8603 (DECL_C_BIT_FIELD): Likewise.
8604 (SET_DECL_C_BIT_FIELD): Likewise.
8605 (CLEAR_DECL_C_BIT_FIELD): Likewise.
8606 (DECL_UNINLINABLE): Likewise.
8607 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
8608 (handle_using_decl): Remove assertion.
8609 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
8610 to build FIELD_DECLs.
8611 (build_base_field): Likewise.
8612 (layout_class_type): Likewise.
8613 * decl.c (init_decl_processing): Likewise.
8614 (build_ptrmemfunc_type): Likewise.
8615 (grokdeclarator): Likewise.
8616 * decl2.c (grok_x_components): Likewise.
8617 * except.c (call_eh_info): Likewise.
8618 * init.c (init_init_processing): Likewise.
8619 * rtti.c (expand_class_desc): Likewise.
8620 (create_pseudo_type_info): Likewise.
8621 (get_vmi_pseudo_type_info): Likewise.
8622 (create_tinfo_types): Likewise.
8623 * ptree.c (print_lang_decl): Adjust.
8624 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
8625 before checking DECL_MUTABLE_P.
8626
8627 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
8628 parameters for template functions.
8629 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
8630 destructors as well as constructors.
8631
8632 2000-05-22 Mark Mitchell <mark@codesourcery.com>
8633
8634 * class.c (build_ctor_vtbl_group): Set inits.
8635 * optimize.c (maybe_clone_body): Set DECL_INLINE and
8636 DECL_THIS_INLINE appropriately for clones.
8637
8638 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
8639 (DECL_CONV_FN_P): Simplify.
8640 (DECL_OPERATOR): Remove.
8641 (language_to_string): Declare.
8642 * decl.c (duplicate_decls): Fix typo in comment.
8643 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
8644 (grok_op_properties): Use DECL_CONV_FN_P instead of
8645 IDENTIFIER_TYPENAME_P.
8646 * dump.c (dequeue_and_dump): Dump the language linkage of
8647 declarations.
8648 * error.c (language_to_string): Give it external linkage.
8649 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
8650 (implicitly_declare_fn): Set DECL_LANGUAGE.
8651 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
8652 IDENTIFIER_TYPENAME_P.
8653 (tsubst_decl): Likewise.
8654 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
8655 * semantics.c (finish_member_declaration): Don't mark members of
8656 classes declared in an extern "C" region as extern "C".
8657
8658 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8659
8660 * decl2.c (qualified_lookup_using_namespace): Look through
8661 namespace aliases.
8662
8663 * decl.c (push_using_decl): Return the old decl on namespace level.
8664
8665 2000-05-21 Mark Mitchell <mark@codesourcery.com>
8666
8667 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
8668 (VTT_NAME_PREFIX): New macro.
8669 (CTOR_VTBL_NAME_PREFIX): Likewise.
8670 (get_ctor_vtbl_name): New function.
8671 * class.c (get_vtable_name): Simplify.
8672 (get_vtt_name): New function.
8673 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
8674 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
8675 when a virtual base becomes primary.
8676 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
8677 VTTs.
8678 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
8679 additional parameters.
8680 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
8681 (initialize_array): New function.
8682 (build_vtt): Likewise.
8683 (build_vtt_inits): Likewise.
8684 (dfs_build_vtt_inits): Likewise.
8685 (dfs_fixup_binfo_vtbls): Likewise.
8686 (build_ctor_vtbl_group): Likewise.
8687 (initialize_vtable): Use initialize_array.
8688 (accumulate_vtbl_inits): Reimplement to handle construction
8689 vtables.
8690 (dfs_accumulate_vtbl_inits): Likewise.
8691 (bulid_vtbl_initializer): Adjust parameter name.
8692 * method.c (build_typename_overload): Remove #if 0'd code.
8693 (get_ctor_vtbl_name): New function.
8694 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
8695 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
8696
8697 * cp-tree.h (struct lang_type): Remove search_slot.
8698 (CLASSTYPE_SEARCH_SLOT): Remove.
8699 (emit_base_init): Change prototype.
8700 (initialize_vtbl_ptrs): Likewise.
8701 (expand_indirect_vtbls_init): Likewise.
8702 (clear_search_slots): Remove.
8703 * decl.c (lang_mark_tree): Don't mark search_slot.
8704 * init.c (initialize_vtbl_ptrs): Simplify.
8705 (emit_base_init): Likewise.
8706 * search.c (struct vbase_info): Document decl_ptr.
8707 (convert_pointer_to_single_level): Remove.
8708 (dfs_find_vbases): Remove.
8709 (dfs_init_base_pointers): Simplify.
8710 (dfs_clear_vbase_slots): Remove.
8711 (dfs_vtable_path_unmark): New function.
8712 (init_vbase_pointers): Simplify.
8713 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
8714 (expand_indirect_vtbls_init): Simplify. Don't call
8715 mark_all_temps_used.
8716 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
8717 initialize_vtbl_ptrs.
8718
8719 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
8720
8721 * except.c: Add static prototypes.
8722
8723 2000-05-20 H.J. Lu <hjl@gnu.org>
8724
8725 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
8726
8727 2000-05-19 Mark Mitchell <mark@codesourcery.com>
8728
8729 Don't create a separate copy of virtual bases for the
8730 CLASSTYPE_VBASECLASSES list.
8731 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
8732 (BINFO_FOR_VBASE): Remove.
8733 (CANONICAL_BINFO): Adjust.
8734 (binfo_for_vbase): New function.
8735 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
8736 instead of BINFO_FOR_VBASE.
8737 (build_vbase_pointer): Likewise.
8738 (build_secondary_vtable): Likewise.
8739 (dfs_mark_primary_bases): Likewise.
8740 (mark_primary_bases): Likewise.
8741 (layout_nonempty_base_or_field): Likewise.
8742 (dfs_set_offset_for_shared_vbases): Likewise.
8743 (dfs_set_offset_for_unshared_vbases): Likewise.
8744 (layout_virtual_bases): Likewise. Adjust for changes to the
8745 CLASSTYPE_VBASECLASSES list.
8746 (dump_class_hierarchy_r): Use binfo_for_vbase
8747 instead of BINFO_FOR_VBASE.
8748 (dump_class_hierarchy): Likewise.
8749 (finish_vtbls): Likewise.
8750 (build_vtbl_initializer): Adjust for changes to the
8751 CLASSTYPE_VBASECLASSES list.
8752 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
8753 * decl.c (finish_destructor_body): Adjust for changes to the
8754 CLASSTYPE_VBASECLASSES list.
8755 * init.c (sort_base_init): Use binfo_for_vbase.
8756 (construct_virtual_bases): Adjust for changes to the
8757 CLASSTYPE_VBASECLASSES list.
8758 (expand_member_init): Use binfo_for_vbase.
8759 (build_vbase_delete): Adjust for changes to the
8760 CLASSTYPE_VBASECLASSES list.
8761 * method.c (do_build_copy_constructor): Likewise.
8762 * rtti.c (get_base_offset): Use binfo_for_vbase.
8763 (expand_class_desc): Remove #if 0'd code.
8764 * search.c (struct vbase_info): Remove vbase_types.
8765 (get_base_distance): Use binfo_for_vbase.
8766 (lookup_field_queue_p): Use CANONICAL_BINFO.
8767 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
8768 (get_pure_virtuals): Adjust for changes to the
8769 CLASSTYPE_VBASECLASSES list.
8770 (dfs_find_vbases): Use binfo_for_vbase.
8771 (dfs_init_vbase_pointers): Likewise.
8772 (init_vbase_pointers): Don't initialize vi.vbase_types.
8773 (virtual_context): Use binfo_for_vbase.
8774 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
8775 CLASSTYPE_VBASECLASSES list.
8776 (expand_indirect_vtbls_init): Simplify.
8777 (dfs_get_vbase_types): Don't replicate virtual bases.
8778 (find_vbase_instance): Use binfo_for_vbase.
8779 (binfo_for_vbase): New function.
8780 * typeck.c (get_delta_difference): Use binfo_for_vbase.
8781
8782 2000-05-17 Mark Mitchell <mark@codesourcery.com>
8783
8784 * decl2.c (finish_anon_union): Generalize error messages to handle
8785 anonymous structures.
8786 * init.c (perform_member_init): Remove `name' parameter.
8787 (build_field_list): New function.
8788 (sort_member_init): Handle anonymous union initialization order
8789 correctly. Check for multiple initializations of the same union.
8790 (emit_base_init): Don't look up fields by name here.
8791 (expand_member_init): Record the result of name lookup for future
8792 reference.
8793 * typeck.c (build_component_ref): Fix formatting.
8794
8795 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
8796
8797 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
8798 * typeck.c (build_x_compound_expr): Replace warn_unused with
8799 warn_unused_value.
8800
8801 * decl2.c (lang_decode_option): Update -Wall unused flags by
8802 calling set_Wunused.
8803
8804 2000-05-16 Mark Mitchell <mark@codesourcery.com>
8805
8806 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
8807 * init.c (dfs_vtable_path_unmark): Remove.
8808 * search.c (marked_new_vtable_p): Likewise.
8809 (unmarked_new_vtable_p): Likewise.
8810 (dfs_search_slot_nonempty_p): Likewise.
8811 (dfs_mark): Likewise.
8812 (dfs_vtable_path_unmark): Likewise.
8813 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
8814 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
8815 (dfs_init_vbase_pointers): Remove special-case new ABI code.
8816 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
8817 (init_vbase_pointers): Simplify.
8818 (expand_indirect_vtbls_init): Likewise.
8819
8820 * class.c (copy_virtuals): New function.
8821 (build_primary_table): Use it.
8822 (build_secondary_vtable): Likewise.
8823 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
8824 indicate that no vcall offset is required.
8825 (add_virtual_function): Likewise.
8826 (modify_all_vtables): Likewise.
8827 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8828 (dfs_accumulate_vtbl_inits): Likewise.
8829 (build_vtbl_initializer): Make changes to handle construction
8830 vtables.
8831 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8832 (build_rtti_vtbl_entries): Likewise.
8833 (build_vtable_entries): Handle a NULL vcall_index.
8834
8835 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
8836
8837 * decl2.c (lang_decode_option): Fix thinko.
8838
8839 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
8840
8841 * except.c (check_handlers): New fn.
8842 * cp-tree.h: Declare it.
8843 * semantics.c (finish_handler_sequence): Call it.
8844 (finish_function_handler_sequence): Likewise.
8845 (finish_handler_parms): Set TREE_TYPE on the handler.
8846 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
8847 * search.c (get_base_distance_recursive): If protect>1, ignore
8848 special access.
8849 (get_base_distance): Don't reduce watch_access.
8850
8851 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
8852
8853 * lex.c: #include diagnostic.h.
8854 (lang_init_options): Set default prefixing rules.
8855
8856 * lang-options.h: Add -fdiagnostics-show-location=.
8857
8858 * decl2.c: #include diagnostic.h.
8859 (lang_decode_option): Handle -fdiagnostics-show-location=.
8860
8861 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
8862
8863 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
8864 * vec.cc: Revert my 2000-05-07 change.
8865
8866 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
8867
8868 * class.c (check_field_decls): Complain about non-static data
8869 members with same name as class in class with constructor.
8870
8871 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
8872
8873 * decl.c (grokdeclarator): Allow non-static data members with
8874 same name as class.
8875
8876 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8877
8878 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
8879 and pending_inline.filename. Update prototypes.
8880 * decl.c (define_label): Constify filename parameter.
8881 * decl2.c (warn_if_unknown_interface): Constify local char *.
8882 * input.c Constify input_source.filename. Don't declare
8883 input_filename or lineno. Constify filename parameter to feed_input.
8884 * lex.c (init_parse): Constify parameter and return value.
8885 (cp_pragma_interface, cp_pragma_implementation): Constify
8886 filename argument.
8887 (reinit_parse_for_method, reinit_parse_for_block,
8888 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
8889 Constify local char *.
8890 * pt.c: Don't declare lineno or input_filename.
8891 (print_template_context, tsubst_friend_function, tsubst_decl,
8892 tsubst, instantiate_decl): Constify local char *.
8893 * semantics.c (expand_body): Constify local char *.
8894 * tree.c (build_srcloc): Constify filename parameter.
8895 * typeck.c (c_expand_asm_operands): Constify filename
8896 parameter.
8897
8898 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
8899
8900 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
8901 offsetof expansion.
8902
8903 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
8904
8905 * inc/cxxabi.h: Fix typos in comment.
8906 (__base_class_info::__offset): Use a static_cast.
8907
8908 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
8909
8910 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
8911 of std::size_t and std::ptrdiff_t respectively.
8912 * tinfo.cc: Likewise.
8913 * vec.cc: Likewise.
8914
8915 2000-05-06 Richard Henderson <rth@cygnus.com>
8916
8917 * typeck.c (build_c_cast): Don't warn integer->pointer size
8918 mismatch for constants.
8919
8920 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
8921
8922 * rtti.c (ptmd_initializer): Set non-public, if class is
8923 incomplete.
8924
8925 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
8926 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8927 __cxa_vec_delete): Likewise.
8928 * tinfo.cc (__dynamic_cast): Likewise.
8929 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8930 __cxa_vec_delete): Likewise.
8931
8932 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8933
8934 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
8935 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
8936 (lang_decl_flags): Add vcall_offset.
8937 (THUNK_VCALL_OFFSET): Use it.
8938 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
8939 * method.c (make_thunk): Create the lang_decl here, not in
8940 emit_thunk.
8941 (emit_thunk): Make generic thunks into ordinary functions once
8942 they have been fed to expand_body.
8943 * semantics.c (expand_body): Set current_function_is_thunk here.
8944
8945 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8946
8947 * class.c (update_vtable_entry_for_fn): Prototype.
8948
8949 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
8950 and `tmpl'.
8951
8952 * search.c (dfs_build_inheritance_graph_order): Prototype.
8953
8954 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8955
8956 * cp-tree.h (special_function_kind): Add various kinds of
8957 destructors.
8958 (special_function_p): New function.
8959 * class.c (overrides): Don't let one kind of destructor override
8960 another.
8961 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
8962 whether or not to instantiate a template.
8963 * tree.c (special_function_p): Define.
8964
8965 2000-05-03 Mark Mitchell <mark@codesourcery.com>
8966
8967 * cp-tree.def (THUNK_DECL): Remove.
8968 * cp-tree.h (DECL_THUNK_P): New macro.
8969 (DECL_NON_THUNK_FUNCTION_P): Likewise.
8970 (DECL_EXTERN_C_FUNCTION_P): Likewise.
8971 (SET_DECL_THUNK_P): Likewise.
8972 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
8973 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
8974 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
8975 * decl.c (decls_match): Use DECL_EXTERN_C_P.
8976 (duplicate_decls): Likewise.
8977 (pushdecl): Likewise. Adjust thunk handling.
8978 (grokfndecl): Use DECL_EXTERN_C_P.
8979 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
8980 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
8981 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
8982 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
8983 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
8984 DECL_NO_STATIC_CHAIN.
8985 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
8986 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
8987 * search.c (covariant_return_p): Remove THUNK_DECL handling.
8988 * ir.texi: Update.
8989
8990 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
8991
8992 * tree.c (walk_tree): Set lineno.
8993
8994 2000-05-01 Mark Mitchell <mark@codesourcery.com>
8995
8996 * exception.cc: Update license notice.
8997 * new.cc: Likewise.
8998 * new1.cc: Likewise.
8999 * new2.cc: Likewise.
9000 * tinfo.cc: Likewise.
9001 * tinfo2.cc: Likewise.
9002 * vec.cc: Likewise.
9003 * inc/cxxabi.h: Likewise.
9004 * inc/exception: Likewise.
9005 * inc/new: Likewise.
9006 * inc/new.h: Likewise.
9007 * inc/typeinfo: Likewise.
9008
9009 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
9010
9011 * tree.c (build_target_expr_with_type): If we already have a
9012 TARGET_EXPR, just return it.
9013
9014 * optimize.c (initialize_inlined_parameters): Don't generate an
9015 EXPR_STMT if we can just use DECL_INITIAL.
9016 * decl.c (emit_local_var): Only make the initialization a
9017 full-expression if stmts_are_full_exprs_p.
9018
9019 2000-05-01 Mark Mitchell <mark@codesourcery.com>
9020
9021 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9022 macro.
9023 * call.c (standard_conversion): Use it.
9024 (direct_reference_binding): Likewise.
9025 (build_over_call): Likewise.
9026 (is_properly_derived_from): Likewise.
9027 (compare_ics): Likewise.
9028 * class.c (resolves_to_fixed_type_p): Likewise.
9029 * optimize.c (declare_return_variable): Likewise.
9030 * pt.c (is_specialization_of): Likewise.
9031 (unify): Likewise.
9032 * typeck.c (comp_target_parms): Likeiwse.
9033 (build_static_cast): Likewise.
9034 (build_reinterpret_cast): Likewise.
9035 (build_const_cast): Likewise.
9036 (comp_ptr_ttypes_real): Likewise.
9037 (comp_ptr_ttypes_const): Likewise.
9038 * typeck2.c (process_init_constructor): Likewise.
9039
9040 2000-04-30 Scott Snyder <snyder@fnal.gov>
9041
9042 * decl.c (finish_destructor_body): Use the base destructor when
9043 destroying virtual bases.
9044
9045 2000-04-30 Mark Mitchell <mark@codesourcery.com>
9046
9047 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9048 STMT_EXPRs.
9049 * optimize.c (struct inline_data): Add target_exprs field.
9050 (declare_return_variable): When a function returns an aggregate,
9051 use the variable declared in the TARGET_EXPR as the remapped
9052 DECL_RESULT.
9053 (expand_call_inline): Update the pending target_exprs stack.
9054 (optimize_function): Initialize the stack.
9055
9056 * decl2.c (finish_file): Fix typo in comment.
9057
9058 * method.c (emit_thunk): Don't try to return a `void' value.
9059
9060 * optimize.c (initialize_inlined_parameters): If the parameter is
9061 addressable, we need to make a new VAR_DECL, even if the
9062 initializer is constant.
9063
9064 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
9065
9066 * decl.c (grok_op_properties): Add an extra check of argtypes.
9067
9068 2000-04-27 Mark Mitchell <mark@codesourcery.com>
9069
9070 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9071 variables.
9072 (initialize_inlined_parameters): Try to avoid creating new
9073 VAR_DECLs.
9074
9075 2000-04-27 Alex Samuel <samuel@codesourcery.com>
9076
9077 * lex.c (my_get_run_time): Remove.
9078 (init_filename_times): Use get_run_time instead of my_get_run_time.
9079 (check_newline): Likewise.
9080 (dump_time_statistics): Likewise.
9081 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9082 of computing elapsed time explicitly.
9083
9084 2000-04-26 Mark Mitchell <mark@codesourcery.com>
9085
9086 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9087 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9088 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9089 before calling decl_constant_value.
9090 * class.c (check_bitfield_decl): Likewise.
9091 * cvt.c (ocp_convert): Likewise.
9092 (convert): Likewise.
9093 * decl.c (compute_array_index_type): Likewise.
9094 (build_enumerator): Likewise.
9095 * decl2.c (check_cp_case_value): Likewise.
9096 * pt.c (convert_nontype_argument): Likewise.
9097 (tsubst): Likewise.
9098 * typeck.c (decay_conversion): Likewise.
9099 (build_compound_expr): Likewise.
9100 (build_reinterpret_cast): Likewise.
9101 (build_c_cast): Likewise.
9102 (convert_for_assignment): Likewise.
9103
9104 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
9105
9106 * decl.c (finish_function): Don't play games with DECL_INLINE.
9107
9108 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
9109
9110 * ir.texi: Correct typo.
9111
9112 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9113
9114 * decl.c (grokdeclarator): Reject VLAs as members.
9115
9116 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
9117
9118 * call.c (standard_conversion): Accept conversion between
9119 COMPLEX_TYPEs.
9120
9121 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9122
9123 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
9124
9125 * decl2.c (finish_file): Remove double setup for accounting
9126 compile time.
9127
9128 2000-04-24 Robert Lipe <robertlipe@usa.net>
9129
9130 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9131
9132 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
9133
9134 * new.cc (set_new_handler): Needs to be in std::.
9135
9136 2000-04-23 Mark Mitchell <mark@codesourcery.com>
9137
9138 * cp-tree.h (lang_decl): Remove pretty_function_p.
9139 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9140 language-specific node.
9141 * decl.c (cp_make_fname_decl): Use build_decl, not
9142 build_lang_decl, to build the variables.
9143 (grokvardecl): Don't call build_lang_decl for local variables in
9144 templates.
9145 (grokdeclarator): Don't call build_lang_decl for local type
9146 declarations in templates.
9147 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9148 zero'd memory, rather than calling memset.
9149 * pt.c: Include hashtab.h.
9150 (local_specializations): New variable.
9151 (retrieve_local_specialization): Use it.
9152 (register_local_specialization): Likewise.
9153 (tsubst_decl): Don't assume local variables have
9154 DECL_LANG_SPECIFIC.
9155 (instantiate_decl): Set up local_specializations.
9156 * Makefile.in (HTAB_H): New variable.
9157
9158 2000-04-23 Richard Henderson <rth@cygnus.com>
9159
9160 * typeck.c (c_expand_asm_operands): Restore the original
9161 contents of the output list.
9162
9163 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
9164
9165 * ir.texi: Document complex number representation.
9166
9167 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
9168
9169 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9170 (target_incomplete_p): New function.
9171 (tinfo_base_init): Create comdat NTBS name variable.
9172 (ptr_initializer): Add non_public parameter. Calculate it.
9173 (ptmd_initializer): Likewise.
9174 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9175 (create_real_tinfo_var): Add non_public parameter. Use it.
9176 Push proxy into global namespace.
9177 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9178 New enumeration.
9179 * inc/typeinfo (type_info::before, type_info::operator==):
9180 Compare __name addresses.
9181
9182 * tinfo2.cc: Remove new-abi builtins comment.
9183
9184 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
9185
9186 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9187
9188 * call.c (joust): Exit early if we get the same function, too.
9189
9190 * decl2.c (key_method): Return NULL_TREE for template classes.
9191 (import_export_class): Don't need to check for template classes.
9192
9193 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
9194
9195 * lex.c: Remove references to cccp.c.
9196
9197 2000-04-18 Mark Mitchell <mark@codesourcery.com>
9198
9199 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9200 volatile_memfunc. Add destructor_attr. Adjust dummy.
9201 (DECL_DESTRUCTOR_P): Use destructor_attr.
9202 (DECL_CONST_MEMFUNC_P): Reimplement.
9203 (DECL_VOLATILE_MEMFUNC_P): Remove.
9204 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9205 (overrides): Use DECL_DESTRUCTOR_P.
9206 (check_for_override): Likewise.
9207 * decl.c (start_function): Likewise.
9208 * decl2.c (grokfclassfn): Likewise.
9209 (check_classfn): Likewise.
9210 (grok_function_init): Likewise.
9211
9212 2000-04-17 Mark Mitchell <mark@codesourcery.com>
9213
9214 * decl2.c (grokfield): Issue error on illegal data member
9215 declaration.
9216
9217 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
9218
9219 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9220
9221 2000-04-16 Mark Mitchell <mark@codesourcery.com>
9222
9223 * class.c (build_vtable_entry): Don't build thunks for type-info
9224 functions.
9225
9226 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
9227
9228 * decl.c (decls_match): Allow a redeclaration of a builtin to
9229 specify args while the builtin did not.
9230
9231 2000-04-15 Mark Mitchell <mark@codesourcery.com>
9232
9233 * cp-tree.def (THUNK_DECL): Add to documentation.
9234 * cp-tree.h (flag_huge_objects): Declare.
9235 * class.c (modify_vtable_entry): Tidy.
9236 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9237 Calculate delta appropriately for the new ABI.
9238 (dfs_modify_vtables): Use it.
9239 (modify_all_vtables): Fix thinko in code to add overriding copies
9240 of functions to primary vtables.
9241 (build_clone): Fix typo in comment.
9242 (clone_function_decl): Correct order of destructors in vtable.
9243 (build_vbase_offset_vtbl_entries): Adjust comment.
9244 (dfs_vcall_offset_queue_p): Remove.
9245 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9246 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9247 (build_vtable_entry): Correct check for pure virtual functions.
9248 Don't declare flag_huge_objects.
9249 * decl.c (flag_huge_objects): Remove declaration.
9250 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9251 Use int_size_in_bytes.
9252 (emit_thunk): Handle vcall offset thunks.
9253
9254 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9255
9256 * decl2.c (parse_time, varconst_time): Delete declarations.
9257 (finish_file): Delete LINENO declaration.
9258 START_TIME and THIS_TIME now long.
9259
9260 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
9261
9262 * class.c (build_base_field): Reformat comment.
9263
9264 * inc/cxxabi.h (stddef.h): Comment inclusion.
9265 (__base_class_info::__offset): Comment shift.
9266
9267 2000-04-12 Mark Mitchell <mark@codesourcery.com>
9268
9269 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9270 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9271 (cp_push_exception_identifier): New macro.
9272 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9273 (DECL_BASE_DESTRUCTOR_P): Likewise.
9274 (DECL_DELETING_DESTRUCTOR_P): Likewise.
9275 (get_vtbl_decl_for_binfo): Fix formatting.
9276 (in_charge_arg_for_name): New macro.
9277 (maybe_build_cleanup_and_delete): Remove declaration.
9278 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9279 (in_charge_arg_for_name): New function.
9280 (build_new_method_call): Use it. Handle cloned destructors.
9281 (build_clone): Don't make the base constructor virtual.
9282 Automatically defer generated functions.
9283 (clone_function_decl): Handle destructors, too.
9284 (clone_constructors_and_destructors): Likewise.
9285 (create_vtable_ptr): Don't create a vtable entry for a cloned
9286 function.
9287 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9288 (initialize_predefined_identifiers): Update appropriately.
9289 (finish_destructor_body): Simplify.
9290 (maybe_build_cleanup_and_delete): Remove.
9291 * except.c (expand_throw): Handle new-ABI destructors.
9292 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9293 (build_dtor_call): New function.
9294 (build_delete): Use it. Simplify.
9295 * optimize.c (maybe_clone_body): Handle destructors.
9296 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9297
9298 * exception.cc (cleanup_fn): New typedef.
9299 (CALL_CLEANUP): New macro.
9300 (cp_eh_info): Use them.
9301 (__cp_push_exception): Likewise.
9302 (__cp_pop_exception): Likewise.
9303
9304 2000-04-11 Mark Mitchell <mark@codesourcery.com>
9305
9306 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9307 (complete_dtor_identifier): New macro.
9308 (CLASSTYPE_FIRST_CONVERSION): Remove.
9309 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9310 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9311 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9312 (CLASSTYPE_CONSTRUCTORS): Likewise.
9313 (CLASSTYPE_DESTRUCTORS): Likewise.
9314 (lang_decl): Add cloned_function.
9315 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9316 (DECL_BASE_CONSTRUCTOR_P): Likewise.
9317 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9318 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9319 (DECL_CLONED_FUNCTION_P): Likewise.
9320 (DECL_CLONED_FUNCTION): Likewise.
9321 (clone_function_decl): Declare.
9322 (maybe_clone_body): Likewise.
9323 * call.c (build_user_type_conversion_1): Call complete object
9324 constructors in the new ABI.
9325 (build_new_method_call): Don't add in-charge parameters under the
9326 new ABI.
9327 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9328 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9329 CLASSTYPE_DESTRUCTOR_SLOT.
9330 (build_clone): New function.
9331 (clone_function_decl): Likewise.
9332 (clone_constructors_and_destructors): Likewise.
9333 (check_bases_and_members): Use it.
9334 * decl.c (iniitialize_predefined_identifiers): Initialize
9335 complete_dtor_identifier.
9336 (finish_function): Don't add extra code to a clone.
9337 (lang_mark_tree): Mark cloned_function.
9338 * decl2.c (mark_used): Don't bother trying to instantiate things
9339 we synthesized.
9340 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9341 * method.c (set_mangled_name_for_decl): Don't treat clones as
9342 constructors.
9343 (synthesize_method): Sythesize cloned functions, not the clones.
9344 * optimize.c (inline_data): Update comment on ret_label.
9345 (remap_block): Don't assume DECL_INITIAL exists.
9346 (copy_body_r): Allow ret_label to be NULL.
9347 (maybe_clone_body): Define.
9348 * pt.c (tsubst_decl): Handle clones.
9349 (instantiate_clone): New function.
9350 (instantiate_template): Use it.
9351 (set_mangled_name_for_template_decl): Don't treat clones as
9352 constructors.
9353 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9354 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9355 * semantics.c (expand_body): Clone function bodies as necessary.
9356
9357 * optimize.c (remap_decl): Avoid sharing structure for arrays
9358 whose size is only known at run-time.
9359 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9360
9361 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9362 to has_in_charge_parm_p.
9363 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9364 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9365 (DECL_COPY_CONSTRUCTOR_P): New macro.
9366 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9367 (build_user_type_conversion_1): Likewise.
9368 (convert_like_real): Likewise.
9369 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
9370 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9371 (copy_args_p): Likewise.
9372 (grok_ctor_properties): Likewise.
9373 (start_function): Likewise.
9374 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
9375 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9376 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9377 * method.c (do_build_copy_constructor): Use
9378 DECL_HAS_IN_CHARGE_PARM_P.
9379 (synthesize_method): Likewise.
9380 * pt.c (instantiate_template): Remove goto.
9381 * tree.c (build_cplus_method_type): Remove mention of obstacks in
9382 comment.
9383
9384 * cp-tre.h (finish_function): Change prototype.
9385 * decl.c (end_cleanup_fn): Adjust caller.
9386 (finish_function): Take only one parameter.
9387 * decl2.c (finish_objects): Adjust caller.
9388 (finish_static_storage_duration_function): Likewise.
9389 * method.c (emit_thunk): Likewise.
9390 * parse.y: Likewise.
9391 * parse.c: Regenerated.
9392 * pt.c (instantiate_decl): Likewise.
9393 * rtti.c (synthesize_tinfo_fn): Likewise.
9394 * semantics.c (expand_body): Likewise.
9395
9396 * cp-tree.h (copy_decl): New function.
9397 * class.c (finish_struct_1): Use it.
9398 * lex.c (copy_decl): Define it.
9399 * pt.c (tsubst_decl): Likewise.
9400 * tree.c (copy_template_template_parm): Likewise.
9401
9402 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9403 has_nonpublic_assign_ref.
9404 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9405 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9406 * class.c (finish_struct_methods): Don't set
9407 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9408 (interface_only): Don't declare.
9409 (interface_unknown): Likewise.
9410
9411 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9412
9413 * tree.h (HAVE_TEMPLATES): Remove definition.
9414 * lang-options.h (-fthis-is-variable): Remove documentation.
9415
9416 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
9417
9418 * class.c (instantiate_type): Handle object-relative template-id.
9419
9420 * semantics.c (finish_expr_stmt): Call convert_to_void here.
9421 * decl.c (cplus_expand_expr_stmt): Not here.
9422
9423 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9424 Initialize exprtype earlier.
9425
9426 * parse.y (fn.def1): Check for defining types in return types.
9427
9428 * decl.c (check_tag_decl): Notice extra fundamental types.
9429 Diagnose empty decls in classes, too.
9430
9431 * decl.c (grokdeclarator): Don't override an anonymous name if no
9432 declarator was given.
9433
9434 * cvt.c (convert_to_void): Call resolve_offset_ref.
9435
9436 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9437
9438 * decl2.c (decl_namespace): Handle getting a type.
9439
9440 * typeck.c (build_c_cast): Re-enable warning for cast between
9441 pointer and integer of different size.
9442
9443 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
9444
9445 * inc/cxxabi.h (__pointer_type_info): Add restrict and
9446 incomplete flags.
9447 (__pointer_type_info::__pointer_catch): New virtual function.
9448 (__pointer_to_member_type_info): Derive from
9449 __pointer_type_info. Adjust.
9450 (__pointer_to_member_type_info::__do_catch): Remove.
9451 (__pointer_to_member_type_info::__is_pointer_p): Declare.
9452 (__pointer_to_member_type_info::__pointer_catch): Declare.
9453 * rtti.c (qualifier_flags): Add restrict flag.
9454 (ptmd_initializer): Reorder members.
9455 (create_tinfo_types): Expand comments. Reorder
9456 ptmd_desc_type_node members.
9457 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9458 Implement.
9459 (__pointer_type_info::__do_catch): Move specific code into
9460 __pointer_catch. Call it.
9461 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9462 specific catch checking. Fix void conversion check.
9463 (__pointer_to_member_type_info::__do_catch): Remove.
9464 (__pointer_to_member_type_info::__pointer_catch): Implement.
9465
9466 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9467
9468 * lex.c (init_parse): Remove traces of classof and headof.
9469 * decl2.c (flag_operator_names): Default to 1.
9470 (lang_decode_option): Do not set it for -ansi.
9471
9472 2000-04-09 Mark Mitchell <mark@codesourcery.com>
9473
9474 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9475 (DECL_MAIN_VARIANT): Remove.
9476 * decl.c (duplicate_decls): Don't set it.
9477 (start_function): Likewise.
9478 (lang_mark_tree): Don't mark it.
9479 * decl2.c (defer_fn): Don't use it.
9480 * lex.c (retrofit_lang_decl): Don't set it.
9481 * pt.c (tsubst_decl): Likewise.
9482 * ptree.c (print_lang_decl): Don't print it.
9483 * typeck.c (mark_addressable): Don't use it.
9484
9485 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9486
9487 * vec.cc: Include <new> and <exception>.
9488 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9489 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9490 terminate.
9491 (__cxa_vec_delete): Catch dtor exceptions.
9492
9493 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9494
9495 Prepend __ to implementation defined names.
9496 * inc/typeinfo (type_info): Rename _name to __name.
9497 (type_info::type_info): Rename parameter.
9498 (type_info::operator==, type_info::operator!=,
9499 type_info::before): Likewise.
9500 (type_info::is_pointer_p, type_info::is_function_p,
9501 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9502 parameters.
9503 * inc/cxxabi.h
9504 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9505 (__pointer_type_info::__pointer_type_info): Likewise.
9506 (__pointer_type_info::is_pointer_p,
9507 __pointer_type_info::do_catch): Prepend __. Rename parameters.
9508 (__array_type_info::__array_type_info): Rename parameters.
9509 (__function_type_info::__function_type_info): Likewise.
9510 (__function_type_info::is_function_p): Prepend __.
9511 (__enum_type_info::__enum_type_info): Rename parameters.
9512 (__pointer_to_member_type_info::__pointer_to_member_type_info):
9513 Likewise.
9514 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9515 parameters.
9516 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9517 (__class_type_info::__class_type_info): Rename parameters.
9518 (__class_type_info::sub_kind): Prepend __. Adjust member names.
9519 (__class_type_info::upcast_result,
9520 __class_type_info::dyncast_result): Prepend __. Move definition
9521 into tinfo.cc.
9522 (__class_type_info::do_upcast, __class_type_info::do_catch,
9523 __class_type_info::find_public_src,
9524 __class_type_info::do_dyncast,
9525 __class_type_info::do_find_public_src): Prepend __. Rename
9526 parameters.
9527 (__si_class_type_info::__si_class_type_info): Rename parameters.
9528 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9529 __si_class_type_info::do_find_public_src): Prepent __. Rename
9530 parameters.
9531 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9532 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9533 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9534 parameters.
9535 (__dynamic_cast): Rename parameters.
9536 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9537 type_info::do_catch, type_info::do_upcast): Prepend __.
9538 (contained_p, public_p, virtual_p, contained_public_p,
9539 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9540 (__class_type_info::do_catch,
9541 __class_type_info::do_upcast): Prepend __. Adjust.
9542 (__class_type_info::__upcast_result,
9543 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9544 Adjust.
9545 (__class_type_info::find_public_src): Prepend __. Adjust.
9546 (__class_type_info::do_find_public_src,
9547 __si_class_type_info::do_find_public_src,
9548 __vmi_class_type_info::do_find_public_src): Likewise.
9549 (__class_type_info::do_dyncast,
9550 __si_class_type_info::do_dyncast,
9551 __vmi_class_type_info::do_dyncast): Likewise.
9552 (__class_type_info::do_upcast,
9553 __si_class_type_info::do_upcast,
9554 __vmi_class_type_info::do_upcast): Likewise.
9555 (__dynamic_cast): Adjust.
9556 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
9557 (__function_type_info::is_function_p): Likewise.
9558 (__pointer_type_info::do_catch): Likewise. Adjust.
9559 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
9560 (__throw_type_match_rtti_2): Adjust.
9561 (__is_pointer): Adjust.
9562
9563 2000-04-08 Mark Mitchell <mark@codesourcery.com>
9564
9565 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
9566 (complete_ctor_identifier): New macro.
9567 (special_function_kind): Add sfk_copy_constructor and
9568 sfk_assignment_operator.
9569 (LOOKUP_HAS_IN_CHARGE): Remove.
9570 (cons_up_default_function): Rename to ...
9571 (implicitly_declare_fn): ... this.
9572 * call.c (build_new_method_call): Add in-charge parameters for
9573 constructors here.
9574 * class.c (add_implicitly_declared_members): Change parameter name
9575 from cant_have_assignment to cant_have_const_assignment.
9576 Replace calls to cons_up_default_function to implicitly_declare_fn.
9577 * cvt.c (ocp_convert): Use complete_ctor_identifier.
9578 * decl.c (initialize_predefined_identifiers): Initialize it.
9579 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
9580 complex expression.
9581 * init.c (expand_default_init): Don't calculate the in-charge
9582 parameter here.
9583 (build_new_1): Likewise.
9584 * lex.c (cons_up_default_function): Move to method.c.
9585 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
9586 (implicitly_declare_fn): New function.
9587 * typeck.c (build_static_cast): Use complete_ctor_identifier.
9588 (build_modify_expr): Likewise.
9589 * typeck2.c (build_functional_cast): Likewise.
9590
9591 Under the new ABI, constructors don't return `this'.
9592 * cp-tree.h (warn_reorder): Declare.
9593 (special_function_kind): New enum.
9594 (global_base_init_list): Remove declaration.
9595 (emit_base_init): Don't return a value.
9596 (check_base_init): Don't declare.
9597 (is_aggr_typedef): Likewise.
9598 * decl.c (check_special_function_return_type): New function.
9599 (return_types): Remove.
9600 (grokdeclarator): Use check_special_function_return_type.
9601 (start_function): Don't initialize ctor_label under the new ABI.
9602 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
9603 * init.c (begin_init_stmts): Move to top of file.
9604 (finish_init_stmts): Likewise.
9605 (warn_reorder): Don't declare.
9606 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
9607 value.
9608 (check_base_init): Remove.
9609 (is_aggr_typedef): Likewise.
9610 (build_new_1): Don't use the return value of a constructor.
9611 * semantics.c (setup_vtbl_ptr): Don't use the return value
9612 of emit_base_init.
9613 * typeck.c (check_return_expr): Don't magically convert return
9614 statements into `return this' in constructors under the new ABI.
9615
9616 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
9617 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
9618 (base_ctor_identifier): New macro.
9619 (base_dtor_identifier): Likewise.
9620 (deleting_dtor_identifier): Likewise.
9621 * decl.c: Don't include obstack.h.
9622 (obstack_chunk_alloc): Don't define.
9623 (obstack_chunk_free): Likewise.
9624 (struct predefined_identifier): New type.
9625 (initialize_predefined_identifiers): New function.
9626 (init_decl_processing): Use it.
9627 (debug_temp_inits): Remove.
9628 (start_method): Don't call preserve_data.
9629 (hack_incomplete_structures): Update comment.
9630 * init.c (init_init_processing): Don't initialize
9631 nelts_identifier.
9632 (build_offset_rf): Remove dead code.
9633 (build_delete): Use CLASSTYPE_N_BASECLASSES.
9634 * search.c (init_search_processing): Don't initialize
9635 vptr_identifier.
9636
9637 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9638
9639 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
9640 some sign_compare warnings.
9641
9642 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9643
9644 Rename abi::__vmi_class_type_info members.
9645 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
9646 base_list, detail_masks members to vmi_flags, vmi_base_count,
9647 vmi_bases and vmi_flags_masks respectively.
9648 (__vmi_class_type_info::vmi_flags_masks): Rename
9649 details_unknown_mask to flags_unknown_mask.
9650 * tinfo.cc (__class_type_info::do_upcast): Adjust.
9651 (__vmi_class_type_info::do_find_public_src): Adjust.
9652 (__vmi_class_type_info::do_dyncast): Adjust.
9653 (__vmi_class_type_info::do_upcast): Adjust.
9654
9655 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9656
9657 * tinfo.cc (convert_to_base): New function.
9658 (get_vbase_offset): Remove. Move into convert_to_base.
9659 (__vmi_class_type_info::do_find_public_src): Adjust.
9660 (__vmi_class_type_info::do_dyncast): Adjust.
9661 (__vmi_class_type_info::do_upcast): Adjust.
9662
9663 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
9664
9665 * tinfo.cc (operator=): Use __builtin_strcmp.
9666 * tinfo2.cc (before): Likewise.
9667
9668 2000-04-06 Mark Mitchell <mark@codesourcery.com>
9669
9670 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
9671 (DECL_SAVED_INLINE): Rename to ...
9672 (DECL_DEFERRED_FN): ... this.
9673 (in_function_p): Remove declaration.
9674 (mark_inline_for_output): Rename to ...
9675 (defer_fn): ... this.
9676 * decl.c (finish_function): Adjust call to mark_inline_for_output.
9677 (in_function_p): Remove definition.
9678 * decl2.c (saved_inlines): Rename to ...
9679 (deferred_fns): ... this.
9680 (saved_inlines_used): Rename to ...
9681 (deferred_fns_used): ... this.
9682 (mark_inline_for_output): Rename to ...
9683 (defer_fn): ... this.
9684 (finish_file): Adjust accordingly.
9685 (init_decl2): Likewise.
9686 * lex.c (cons_up_default_function): Likewise.
9687 * pt.c (mark_decl_instantiated): Likewise.
9688 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
9689 circumstances.
9690 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
9691 * semantics.c (expand_body): Defer more functions.
9692
9693 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9694
9695 * vec.cc: New file.
9696 * Make-lang.in (CXX_LIB2FUNCS): Add it.
9697 (vec.o): Build it.
9698 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9699 __cxa_vec_delete): Declare.
9700
9701 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9702
9703 * rtti.c (dfs_class_hint_mark): New static function.
9704 (dfs_class_hint_unmark): New static function.
9705 (class_hint_flags): Use them.
9706
9707 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
9708
9709 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
9710
9711 2000-04-05 Mark Mitchell <mark@codesourcery.com>
9712
9713 * cp-tree.h (instantiate_decl): Change prototype.
9714 * decl2.c (mark_used): Adjust call.
9715 * optimize.c (inlinable_function_p): Adjust handling of templates.
9716 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
9717 (do_type_instantiation): Likewise.
9718 (instantiate_decl): Defer more templates.
9719 (instantiate_pending_templates): Adjust logic to handle inline
9720 friend functions.
9721
9722 * Makefile.in (GGC_H): New variable. Use it throughout in place
9723 of ggc.h.
9724
9725 * call.c: Don't include obstack.h. Include ggc.h.
9726 (obstack_chunk_alloc): Don't define.
9727 (obstack_chunk_free): Likewise.
9728 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
9729 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
9730 (pop_switch): Free it.
9731
9732 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
9733
9734 * dump.c (dequeue_and_dump): Don't try to print the bit_position
9735 if we don't have a DECL_FIELD_OFFSET.
9736
9737 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
9738
9739 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
9740 special_function_p.
9741
9742 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9743
9744 * cfns.gperf (hash, libc_name_p): Prototype.
9745
9746 * rtti.c (build_dynamic_cast_1): Constification.
9747
9748 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
9749
9750 * semantics.c (deferred_type_access_control): Prototype.
9751
9752 2000-04-04 Mark Mitchell <mark@codesourcery.com>
9753
9754 Correct many new ABI issues regarding vbase and vcall offset
9755 layout.
9756 * cp-tree.h (BINFO_VTABLE): Document.
9757 (struct lang_type): Tweak formatting.
9758 (BINFO_PRIMARY_BINFO): Add to documentation.
9759 (CLASSTYPE_VSIZE): Fix typo in comment.
9760 (CLASSTYPE_VBASECLASSES): Update documentation.
9761 (BINFO_VBASE_MARKED): Remove.
9762 (SET_BINFO_VBASE_MARKED): Likewise.
9763 (CLEAR_BINFO_VBASE_MARKED): Likewise.
9764 (BINFO_FIELDS_MARKED): Remove.
9765 (SET_BINFO_FIELDS_MARKED): Likewise.
9766 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
9767 (enum access_kind): New enumeration.
9768 (num_extra_vtbl_entries): Remove declaration.
9769 (size_extra_vtbl_entries): Likewise.
9770 (get_vtbl_decl_for_binfo): New function.
9771 (dfs_vbase_unmark): Remove declaration.
9772 (mark_primary_bases): Likewise.
9773 * class.c (SAME_FN): Remove.
9774 (struct vcall_offset_data_s): Move definition.
9775 (build_vbase_pointer): Use `build', not `build_binary_op', to
9776 access the vbase pointer under the new ABI.
9777 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
9778 (build_primary_vtable): Likewise.
9779 (dfs_mark_primary_bases): Move here from search.c.
9780 (mark_primary_bases): Likewise.
9781 (determine_primary_bases): Under the new ABI, don't make a base
9782 class a primary base just because we don't yet have any virtual
9783 functions.
9784 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
9785 (num_vfun_entries): Remove.
9786 (dfs_count_virtuals): Likewise.
9787 (num_extra_vtbl_entries): Likewise.
9788 (size_extra_vtbl_entries): Likewise.
9789 (layout_virtual_bases): Iterate in inheritance graph order under
9790 the new ABI.
9791 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
9792 indicate that a vfield is present.
9793 (init_class_processing): Initialize access_public_node, etc., from
9794 ak_public, etc.
9795 (get_vtbl_decl_for_binfo): New function.
9796 (dump_class_hierarchy_r): Likewise.
9797 (dump_class_hierarchy): Use it.
9798 (finish_vtbls): Build the vtbls in inheritance graph order.
9799 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9800 (initialize_vtable): Use get_vtbl_decl_for_binfo.
9801 (accumulate_vtbl_inits): Add comments explaining why a pre-order
9802 walk is required.
9803 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
9804 where the vptr points, even for primary vtables.
9805 (build_vtbl_initializer): Adjust handling of vbase and vcall
9806 offsets.
9807 (build_vcall_and_vbase_vtable_entries): New function.
9808 (dfs_build_vbase_offset_vtbl_entries): Remove.
9809 (build_vbase_offset_vtbl_entries): Reimplement.
9810 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
9811 were already handled in a primary base class vtable.
9812 (build_vcall_offset_vtbl_entries): Adjust.
9813 (build_rtti_vtbl_entries): Adjust.
9814 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
9815 * init.c (expand_virtual_init): Simplify.
9816 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
9817 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
9818 * search.c (BINFO_ACCESS): New macro.
9819 (SET_BINFO_ACCESS): Likewise.
9820 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
9821 (access_in_type): Likewise.
9822 (dfs_accessible_p): Likewise.
9823 (protected_accessible_p): Likewise.
9824 (lookup_fnfields_1): Adjust documentation.
9825 (dfs_mark_primary_bases): Move to class.c
9826 (mark_primary_bases): Likewise.
9827 (dfs_vbase_unmark): Remove.
9828 (virtual_context): Use BINFO_FOR_VBASE.
9829 (dfs_get_vbase_types): Simplify.
9830 (dfs_build_inheritance_graph_order): New function.
9831 (get_vbase_types): Use it.
9832 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
9833
9834 * tinfo.cc (get_vbase_offset): New function.
9835 (__vmi_class_type_info::do_find_public_src): Use it.
9836 (__vmi_class_type_info::do_dyncast): Likewise.
9837 (__vmi_class_type_info::do_upcast): Likewise.
9838
9839 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
9840
9841 * lang-specs.h: Pass -fno-show-column to the preprocessor.
9842
9843 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
9844
9845 * rtti.c (class_hint_flags): Rename flags.
9846 (class_initializer): Remove flags.
9847 (synthesize_tinfo_var): Combine offset and flags. Add flags
9848 for __vmi_class_type_info.
9849 (create_tinfo_types): Remove flags from __class_type_info and
9850 __si_class_type_info. Merge flags and offset from
9851 base_class_type_info.
9852 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
9853 (__base_class_info::is_virtual_p): Adjust.
9854 (__base_class_info::is_public_p): Adjust.
9855 (__base_class_info::offset): New accessor.
9856 (__class_type_info::details): Remove member.
9857 (__class_type_info::__class_type_info): Lose details.
9858 (__class_type_info::detail_masks): Remove.
9859 (__si_class_type_info::__si_class_type_info): Lose details.
9860 (__vmi_class_type_info::details): New member.
9861 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
9862 (__vmi_class_type_info::detail_masks): New member.
9863 * tinfo.cc (__class_type_info::do_upcast): Initialize result
9864 with unknown_details_mask.
9865 (__vmi_class_type_info::do_find_public_src): Adjust
9866 (__vmi_class_type_info::do_dyncast): Adjust.
9867 (__vmi_class_type_info::do_upcast): Set result details, if
9868 needed. Adjust.
9869 (__dynamic_cast): Temporarily #if out optimization.
9870
9871 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
9872
9873 * rtti.c (get_tinfo_decl): Mark used.
9874 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
9875 mark as dealt with, if we output it.
9876
9877 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9878
9879 * class.c: Reorganize to put virtual function table initialization
9880 machinery at the end of the file.
9881
9882 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
9883
9884 * class.c (finish_struct): Use bitsize_zero_node.
9885 * pt.c (instantiate_class_template): Likewise.
9886
9887 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9888
9889 Put RTTI entries at negative offsets in new ABI.
9890 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
9891 vbase offset at index -3, not -1.
9892 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
9893 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
9894 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
9895 (build_rtti_vtbl_entries): New function.
9896 (set_rtti_entry): Remove.
9897 (build_primary_vtable): Don't use it.
9898 (build_secondary_vtable): Likewise.
9899 (start_vtable): Remove.
9900 (first_vfun_index): New function.
9901 (set_vindex): Likewise.
9902 (add_virtual_function): Don't call start_vtable. Do call
9903 set_vindex.
9904 (set_primary_base): Rename parameter.
9905 (determine_primary_base): Likewise.
9906 (num_vfun_entries): Don't use skip_rtti_stuff.
9907 (num_extra_vtbl_entries): Include RTTI information.
9908 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
9909 (skip_rtti_stuff): Remove.
9910 (dfs_modify_vtables): Don't use it.
9911 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
9912 (layout_nonempty_base_or_field): Update size handling.
9913 (create_vtable_ptr): Tweak.
9914 (layout_class_type): Adjust parameter names.
9915 (finish_struct_1): Simplify.
9916 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
9917 (skip_rtti_stuff): Remove.
9918 (first_vfun_index): New function.
9919 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9920 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
9921 (marked_vtable_pathp): Declare.
9922 (unmarked_vtable_pathp): Likewise.
9923 * error.c (dump_expr): Use first_vfun_index to calculate vtable
9924 offsets.
9925 * rtti.c (build_headof): Look for RTTI at negative offsets.
9926 (get_tinfo_decl_dynamic): Likewise.
9927 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
9928 here.
9929 (create_pseudo_type_info): Do it here instead. Adjust so that
9930 vptr points at first virtual function.
9931 * search.c (marked_vtable_pathp): Make it global.
9932 (unmarked_vtable_pathp): Likewise.
9933 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9934 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9935 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
9936 (get_pure_virtuals): Likewise.
9937 (expand_upcast_fixups): Likewise.
9938 * tree.c (debug_binfo): Likewise.
9939 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
9940 negative offset.
9941
9942 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9943
9944 * class.c (check_field_decl): Fix typo.
9945 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
9946 (check_methods): Likewise.
9947 (check_field_decls): Likewise.
9948 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
9949 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
9950 Use DECL_RESULT_FLD, not DECL_RESULT.
9951 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
9952 * lex.c (identifier_type): Likewise.
9953 * pt.c (determine_specialization, lookup_template_class): Likewise.
9954 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
9955 (resolve_overloaded_unification, more_specialized): Likewise.
9956 * semantics.c (finish_member_declaration): Likewise.
9957 * typeck.c (build_x_function_call): Likewise.
9958
9959 2000-03-26 Mark Mitchell <mark@codesourcery.com>
9960
9961 * class.c (layout_empty_base): Handle empty bases with non-byte
9962 alignment.
9963 (build_base_field): Likewise.
9964 (layout_virtual_bases): Likewise.
9965
9966 * class.c (finish_struct_1): Fix typo in this change:
9967
9968 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9969
9970 2000-03-25 Mark Mitchell <mark@codesourcery.com>
9971
9972 * decl.c (grokdeclarator): Count partial specializations when
9973 keeping track of how many template classes have been seen.
9974
9975 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
9976
9977 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9978
9979 * class.c (build_vbase_pointer_fields): layout_field now place_field.
9980 (get_vfield_offset): Use byte_position.
9981 (set_rtti_entry): Set OFFSET to ssizetype zero.
9982 (get_binfo_offset_as_int): Deleted.
9983 (dfs_record_base_offsets): Use tree_low_cst.
9984 (dfs_search_base_offsets): Likewise.
9985 (layout_nonempty_base_or_field): Reflect changes in RLI format
9986 and call byte_position.
9987 (layout_empty_base): Convert offset to ssizetype.
9988 (build_base_field): use rli_size_unit_so_far.
9989 (dfs_propagate_binfo_offsets): Do computation in proper type.
9990 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
9991 (layout_class_type): Reflect changes in RLI names and fields.
9992 (finish_struct_1): Set DECL_FIELD_OFFSET.
9993 * dump.c (dequeue_and_dump): Call bit_position.
9994 * expr.c (cplus_expand_constant): Use byte_position.
9995 * rtti.c (expand_class_desc): Use bitsize_one_node.
9996 * typeck.c (build_component_addr): Use byte_position and don't
9997 special case for zero offset.
9998
9999 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
10000
10001 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10002
10003 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10004 tinfo object.
10005 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10006 vtable.
10007
10008 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10009
10010 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10011 DECL_P macros.
10012 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10013 make_typename_type, check_initializer, cp_finish_decl,
10014 xref_tag): Likewise.
10015 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10016 decl_namespace, arg_assoc_template_arg, arg_assoc,
10017 validate_nonmember_using_decl, do_class_using_decl): Likewise.
10018 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10019 args_to_string): Likewise.
10020 * friend.c (is_friend): Likewise.
10021 * lex.c (note_got_semicolon, note_list_got_semicolon,
10022 is_global): Likewise.
10023 * method.c (build_overload_nested_name, build_overload_value,
10024 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10025 * parse.y (typename_sub, typename_sub1): Likewise.
10026 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10027 process_partial_specialization, convert_template_argument,
10028 template_args_equal, add_pending_template, lookup_template_class,
10029 for_each_template_parm_r, maybe_fold_nontype_arg,
10030 tsubst, instantiate_template, type_unification_real, unify,
10031 instantiate_pending_templates, set_mangled_name_for_template_decl):
10032 Likewise.
10033 * repo.c (repo_get_id, repo_template_used): Likewise.
10034 * search.c (lookup_field_1): Likewise.
10035 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10036 * xref.c (classname): Likewise.
10037
10038 2000-03-22 Mark Mitchell <mark@codesourcery.com>
10039
10040 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10041 (CANONICAL_BINFO): New macro.
10042 (BINFO_NEW_VTABLE_MARKED): Use it.
10043 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10044 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10045 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10046 not TREE_TYPE.
10047 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10048 (build_secondary_vtable): Likewise.
10049 (dfs_finish_vtbls): Likewise.
10050 (dfs_accumulate_vtbl_inits): Likewise.
10051 (accumulate_vtbl_inits): New function.
10052 (finish_vtbls): Make sure that virtual bases come after
10053 non-virtual bases in the vtable group.
10054 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10055 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10056 * search.c (struct vbase_info): Move definition.
10057 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10058 (unmarked_new_vtable_p): Likewise.
10059 (dfs_mark_vtable_path): Remove.
10060 (dfs_mark_new_vtable): Remove.
10061 (dfs_unmark_new_vtable): Likewise.
10062 (dfs_clear_search_slot): Likewise.
10063 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10064 (dfs_clear_vbase_slots): Likewise.
10065 (init_vbase_pointers): LIkewise.
10066
10067 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
10068
10069 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10070 SIZETYPE to a non-SIZETYPE.
10071
10072 2000-03-21 Mark Mitchell <mark@codesourcery.com>
10073
10074 * class.c (layout_virtual_bases): Adjust names in conditionally
10075 compiled code.
10076
10077 * class.c (record_base_offsets): New function.
10078 (layout_conflict_p): Likewise.
10079 (layout_nonempty_base_or_field): Use it.
10080 (layout_empty_base): New function.
10081 (build_base_field): Use it.
10082 (build_base_fields): Update comment.
10083 (layout_virtual_bases): Fold in a little code form
10084 layout_basetypes. Use layout_empty_base.
10085 (layout_basetypes): Remove.
10086 (end_of_class): New function.
10087 (layout_class_type): Use it. Adjust.
10088
10089 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10090 (fntype_p): Remove.
10091 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10092 comment.
10093 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10094 * typeck.c (fntype_p): Remove.
10095
10096 * cp-tree.h (TI_SPEC_INFO): Remove.
10097 (CLASSTYPE_TI_SPEC_INFO): Likewise.
10098 * pt.c (process_partial_specialization): Likewise.
10099
10100 * class.c (build_base_field): Fix thinko in computation of binfo
10101 offsets.
10102
10103 * tree.c (mark_local_for_remap_p): Mark variables declared in
10104 TARGET_EXPRs as well.
10105
10106 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10107
10108 * typeck.c (require_complete_type, complete_type,
10109 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10110 build_array_ref, convert_arguments, pointer_diff,
10111 build_x_unary_op, build_unary_op, build_c_cast,
10112 build_modify_expr): Use COMPLETE_TYPE_P etc.
10113 * call.c (is_complete, convert_like_real,
10114 build_new_method_call): Likewise.
10115 * class.c (build_vbase_pointer_fields, check_bases,
10116 build_base_field, finish_struct_1, pushclass): Likewise.
10117 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10118 * decl.c (maybe_process_template_type_declaration, pushtag,
10119 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10120 layout_var_decl, check_initializer, cp_finish_decl,
10121 grokdeclarator, require_complete_types_for_parms,
10122 grok_op_properties, xref_tag, xref_basetypes,
10123 check_function_type): Likewise.
10124 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10125 * friend.c (do_friend): Likewise.
10126 * init.c (build_offset_ref): Likewise.
10127 * parse.y (structsp): Likewise.
10128 * pt.c (maybe_process_partial_specialization,
10129 tsubst_friend_function, instantiate_class_template, tsubst,
10130 do_type_instantiation, instantiate_pending_templates): Likewise.
10131 * repo.c (repo_get_id): Likewise.
10132 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10133 synthesize_tinfo_var, emit_support_tinfos): Likewise.
10134 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10135 * semantics.c (begin_class_definition): Likewise.
10136 * tree.c (build_cplus_method_type): Likewise.
10137 * typeck2.c (digest_init, build_functional_cast,
10138 add_exception_specifier): Likewise.
10139 * parse.h, parse.c: Regenerated.
10140
10141 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10142
10143 * inc/cxxabi.h: New header file. Define new-abi entry points.
10144 (__pointer_type_info::target): Rename member to ...
10145 (__pointer_type_info::type): ... here.
10146 (__base_class_info::type): Rename member to ...
10147 (__base_class_info::base): ... here.
10148 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10149 * cp-tree.h (CPTI_ABI): New global tree enumeration.
10150 (abi_node): New global tree node.
10151 * decl.c (abi_node): Document.
10152 (init_decl_processing): Initialize abi_node.
10153 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10154 (get_vmi_pseudo_type_info): Likewise.
10155 (create_tinfo_types): Likewise.
10156 (emit_support_tinfos): Likewise.
10157 * tinfo.h (cxxabi.h): Include for new-abi.
10158 Move rtti class definitions to new header file.
10159 * tinfo.cc (abi): Use the namespace.
10160 (std): Move new abi rtti classes from here ...
10161 (__cxxabiv1): ... to here.
10162 * tinfo2.cc (cxxabi.h): Include for new-abi.
10163 Move rtti class definitions to new header file.
10164 (std): Move new abi rtti classes from here ...
10165 (__cxxabiv1): ... to here.
10166 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10167 namespace.
10168
10169 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10170 Jason Merrill <jason@casey.cygnus.com>
10171
10172 * method.c (build_overload_int): Use host_integerp.
10173
10174 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10175
10176 * init.c (build_offset_ref): Handle the case of a templated member
10177 function.
10178
10179 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10180
10181 * except.c (expand_exception_blocks): Clear catch_clauses_last.
10182
10183 2000-03-18 Mark Mitchell <mark@codesourcery.com>
10184
10185 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10186 * class.c (check_bitfield_decl): Turn illegal bitfields into
10187 non-bitfields.
10188 (dfs_propagate_binfo_offsets): Adjust for new size_binop
10189 semantics.
10190 (dfs_offset_for_unshared_vbases): Likewise.
10191 * cvt.c (cp_convert_to_pointer): Convert NULL to a
10192 pointer-to-member correctly under the new ABI.
10193 * expr.c (cplus_expand_constant): Don't use cp_convert when
10194 turning an offset into a pointer-to-member.
10195 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10196 when dereferencing them under the new ABI.
10197 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10198 of pointers-to-members under the new ABI.
10199
10200 * class.c (check_bitfield_decl): Remove restriction on really long
10201 bitfields.
10202 (layout_class_type): Implement new ABI handling of bitfields
10203 longer than their types.
10204
10205 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10206
10207 * parse.y (extdefs): Call ggc_collect.
10208 * parse.c: Regenerated.
10209
10210 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
10211
10212 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10213 (note_name_declared_in_class): Use OVL_CURRENT to get at a
10214 potential overload.
10215
10216 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10217
10218 * class.c (build_vbase_path): Use integer_zerop.
10219 (build_vtable_entry): Use tree_low_cst.
10220 (get_vfield_offset): Use bit_position.
10221 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10222 Use tree_low_cst.
10223 (check_bitfield_decl): Set DECL_SIZE using convert.
10224 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10225 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10226 Use tree_low_cst.
10227 (finish_struct_1): Use bit_position.
10228 (dump_class_hierarchy): Use tree_low_cst.
10229 * cp-tree.h (min_precision): Add declaration.
10230 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10231 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10232 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10233 * expr.c (cplus_expand_constant): Use bit_position.
10234 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10235 * rtti.c (get_base_offset): Use bit_position.
10236 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10237 host_integerp, and tree_low_cst.
10238 (pointer_int_sum): Use integer_zerop.
10239 (build_component_addr): Use bit_position.
10240
10241 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
10242
10243 * typeck.c (require_complete_type): Don't assume size_zero_node.
10244 (complete_type_or_else): Likewise.
10245
10246 2000-03-16 Steven Grady <grady@digitaldeck.com>
10247 Jason Merrill <jason@casey.cygnus.com>
10248
10249 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10250
10251 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
10252
10253 * decl2.c (grokfield): Bail out if type is error_mark_node.
10254
10255 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10256
10257 * tinfo2.cc (__ptr_to_member_data): Rename to ...
10258 (__pointer_to_member_data): ... here. Adjust.
10259 * rtti.c (create_tinfo_types): Adjust.
10260
10261 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10262
10263 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10264 * decl.c (ref_desc_type_node): Undocument.
10265 * rtti.c (ptr_ref_initializer): Rename to ...
10266 (ptr_initializer): ... here. Adjust comments.
10267 (ptmd_initializer): Fix comment thinko.
10268 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10269 (create_tinfo_types): Remove ref_desc_type_node init.
10270 * tinfo2.cc (__reference_type_info): Remove.
10271
10272 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10273
10274 * decl.c (cp_finish_decl): Remove obsolete comment.
10275
10276 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10277
10278 2000-03-14 Mark Mitchell <mark@codesourcery.com>
10279
10280 * cp-tree.h: Tweak documentation.
10281 * class.c (build_vbase_pointer_fields): Layout the fields, too.
10282 (avoid_overlap): Remove.
10283 (get_binfo_offset_as_int): New function.
10284 (dfs_serach_base_offsets): Likewise.
10285 (layout_nonempty_base_or_field): Likewise.
10286 (build_base_field): Layout fields here. Avoid placing two objects
10287 of the same type at the same address, under the new ABI.
10288 (build_base_fields): Adjust accordingly.
10289 (create_vtable_ptr): Return the new field, but don't attach it to
10290 TYPE_FIELDS.
10291 (remove_base_field): Remove.
10292 (remove_base_fields): Remove.
10293 (layout_basetypes): Adjust accordingly.
10294 (layout_class_type): Call layout_field for each field, rather than
10295 just making a wholesale call to layout_type.
10296
10297 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
10298
10299 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10300
10301 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
10302
10303 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10304
10305 * except.c (dtor_nothrow): New fn.
10306 (do_pop_exception): Use it. Take type parm.
10307 (push_eh_cleanup): Take type parm.
10308 (expand_start_catch_block): Pass it.
10309 (build_eh_type_type_ref): Accept null type.
10310
10311 2000-03-12 Mark Mitchell <mark@codesourcery.com>
10312
10313 * cp-tree.h (revert_static_member_fn): Change prototype.
10314 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10315 (grok_op_properties): Likewise.
10316 (start_function): Likewise.
10317 (revert_static_member_fn): Simplify.
10318 * pt.c (check_explicit_specialization): Adjust call to
10319 revert_static_member_fn.
10320
10321 2000-03-11 Mark Mitchell <mark@codesourcery.com>
10322
10323 * cp-tree.h (scope_kind): New type.
10324 (tmpl_spec_kind): Likewise.
10325 (declare_pseudo_global_level): Remove.
10326 (pseudo_global_level_p): Rename to template_parm_scope_p.
10327 (pushlevel): Remove declaration.
10328 (begin_scope): New function.
10329 (finish_scope): Likewise.
10330 (current_tmpl_spec_kind): Likewise.
10331 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10332 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
10333 Add template_spec_p.
10334 (toplevel_bindings_p): Adjust.
10335 (declare_pseudo_global_level): Remove.
10336 (pseudo_global_level_p): Rename to template_parm_scope_p.
10337 (current_tmpl_spec_kind): New function.
10338 (begin_scope): Likewise.
10339 (finish_scope): Likewise.
10340 (maybe_push_to_top_level): Adjust.
10341 (maybe_process_template_type_declaration): Likewise.
10342 (pushtag): Likewise.
10343 (pushdecl_nonclass_level): Likewise.
10344 (lookup_tag): Likewise.
10345 (grokfndecl): Handle member template specializations. Share
10346 constructor and non-constructor code.
10347 * decl2.c (check_classfn): Handle member template specializations.
10348 * pt.c (begin_template_parm_list): Use begin_scope.
10349 (begin_specialization): Likewise.
10350 (end_specialization): Likewise.
10351 (check_explicit_specialization): Use current_tmpl_spec_kind.
10352 Handle member template specializations.
10353 (end_template_decl): Use finish_scope. Remove call to
10354 get_pending_sizes.
10355 (push_template_decl_real): Remove bogus error message.
10356 (tsubst_decl): Fix typo in code contained in comment.
10357 (instantiate_template): Handle member template specializations.
10358 (most_general_template): Likewise.
10359
10360 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
10361
10362 * lex.c (whitespace_cr): Compress consecutive calls to warning().
10363 (do_identifier): Ditto for error().
10364
10365 * pt.c (convert_nontype_argument): Ditto for cp_error().
10366 (convert_template_argument): Ditto for cp_pedwarn().
10367
10368 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
10369
10370 * exception.cc (__check_null_eh_spec): New fn.
10371 * except.c (expand_end_eh_spec): Call it if the spec is throw().
10372
10373 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10374
10375 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10376 * except.c (expand_end_eh_spec): Add the return type.
10377 * rtti.c (throw_bad_cast): Add the parmtypes.
10378 (throw_bad_typeid): Likewise.
10379
10380 * semantics.c (expand_stmt): Only leave out rtl for unused
10381 artificials, and set DECL_IGNORED_P on them as well.
10382 * decl.c (wrapup_globals_for_namespace): Likewise.
10383
10384 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
10385
10386 * decl.c (maybe_commonize_var): Skip all artificial decls.
10387 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10388
10389 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10390
10391 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10392 * cp-tree.h: Declare flag_enforce_eh_specs.
10393 * decl.c (store_parm_decls, finish_function): Check it.
10394
10395 C library functions don't throw.
10396 * Makefile.in (cfns.h): New target.
10397 (except.o): Depend on it.
10398 * Make-lang.in (cc1plus): Depend on cfns.gperf.
10399 * cfns.gperf: New file.
10400 * cfns.h: Generated.
10401 * except.c: Include it.
10402 (nothrow_libfn_p): New fn.
10403 * decl.c (grokfndecl): Use it.
10404 * cp-tree.h: Declare it.
10405
10406 * decl.c (push_overloaded_decl_1, auto_function,
10407 define_function): Lose.
10408 (build_library_fn_1): New static fn.
10409 (builtin_function): Use it.
10410 (get_atexit_node): Use build_library_fn_ptr.
10411 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10412 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10413 push_void_library_fn, push_throw_library_fn): New fns.
10414 * cp-tree.h: Declare them.
10415 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10416 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10417 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10418 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10419 * rtti.c (build_runtime_decl): Lose.
10420 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10421 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10422 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10423
10424 * call.c (build_call): Remove result_type parm.
10425 Call mark_used on unused artificial fns.
10426 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10427
10428 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
10429
10430 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10431 appropriate.
10432 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10433 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10434 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10435 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10436 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10437 expand_generic_desc): Likewise.
10438
10439 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10440
10441 * exception.cc (__cp_pop_exception): Cleanup the original object.
10442
10443 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10444
10445 * decl.c (grok_op_properties): Merge conversion to void warning
10446 with other silly op warnings.
10447
10448 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
10449
10450 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10451 array CONSTRUCTOR elements. Don't use expr_tree_cons.
10452
10453 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10454
10455 * decl.c (cp_make_fname_decl): New function.
10456 (wrapup_globals_for_namespace): Don't emit unused static vars.
10457 (init_decl_processing): Remove comment about use of
10458 array_domain_type. Set make_fname_decl.
10459 (cp_finish_decl): Remove __FUNCTION__ nadgering.
10460 * semantics.c (begin_compound_stmt): Remove
10461 current_function_name_declared flagging.
10462 (expand_stmt): Don't emit unused local statics.
10463 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10464 specially.
10465
10466 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10467
10468 * typeck.c (convert_for_assignment): Don't look at array
10469 initializer.
10470 * call.c (convert_like_real): Likewise.
10471
10472 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
10473
10474 Add initial support for '\uNNNN' specifier.
10475 * lex.c (read_ucs): New fn.
10476 (readescape, skip_white_space): Call it.
10477 (is_extended_char, is_extended_char_1): New fns.
10478 (utf8_extend_token): New fn, #if 0'd out.
10479 (real_yylex): Treat extended chars like letters.
10480
10481 * search.c (note_debug_info_needed): Walk the bases even if we
10482 weren't deferring the type itself.
10483
10484 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10485
10486 * decl2.c (finish_objects): Constify a char*.
10487
10488 * method.c (emit_thunk): Likewise.
10489
10490 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
10491
10492 * typeck.c (dubious_conversion_warnings): Look through
10493 REFERENCE_TYPE.
10494
10495 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10496
10497 * class.c (dfs_modify_vtables): I is now unsigned.
10498 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10499 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10500 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10501 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10502 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10503 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10504 Call integer_all_onesp.
10505 * typeck2.c (process_init_constructor): Use compare_tree_int.
10506
10507 * lang-specs.h (as): Don't call if -syntax-only.
10508
10509 2000-03-06 Mark Mitchell <mark@codesourcery.com>
10510
10511 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10512 RTL_EXPR_HAS_NO_SCOPE after all.
10513
10514 2000-03-05 Mark Mitchell <mark@codesourcery.com>
10515
10516 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10517 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
10518 RTL_EXPR_HAS_NO_SCOPE.
10519
10520 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10521 later.
10522
10523 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10524
10525 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
10526
10527 * call.c (convert_like): Macrofy.
10528 (convert_like_with_context): New macro.
10529 (convert_like_real): Renamed from convert_like. Add calling
10530 context parameters, for diagnostics. Add recursive flag. Call
10531 dubious_conversion_warnings for outer conversion.
10532 (build_user_type_conversion): Use convert_like_with_context.
10533 (build_over_call): Likewise. Don't warn about dubious
10534 conversions here. Adjust convert_default_arg calls.
10535 (convert_default_arg): Add context parameters for diagnostics.
10536 Pass through to convert_like_with_context.
10537 * cp-tree.h (convert_default_arg): Add context parameters.
10538 (dubious_conversion_warnings): Prototype new function.
10539 * typeck.c (convert_arguments): Adjust convert_default_arg call.
10540 (dubious_conversion_warnings): New function, broken
10541 out of convert_for_assignment.
10542 (convert_for_assignment): Adjust.
10543
10544 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
10545
10546 * decl2.c (key_method): Break out from...
10547 (import_export_vtable, import_export_class): ...here.
10548
10549 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10550 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10551
10552 * search.c (note_debug_info_needed, dfs_debug_mark,
10553 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
10554 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
10555
10556 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
10557
10558 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
10559 typos.
10560
10561 2000-03-02 Mark Mitchell <mark@codesourcery.com>
10562
10563 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
10564 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
10565 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
10566 (lang_type): Split gets_new into has_new and has_array_new.
10567 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10568 (TYPE_GETS_NEW): Split into ...
10569 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
10570 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
10571 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
10572 (build_op_new_call): Don't declare.
10573 (build_new_1): Likewise.
10574 * call.c (build_op_new_call): Remove.
10575 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10576 instead of TYPE_NEEDS_DESTRUCTOR.
10577 (finish_struct_bits): Likewise.
10578 (add_implicitly_declared_members): Likewise.
10579 (check_field_decl): Likewise.
10580 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
10581 correctly under the new ABI.
10582 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10583 instead of TYPE_NEEDS_DESTRUCTOR.
10584 (initialize_local_var): Likewise.
10585 (destroy_local_var): Likewise.
10586 (cp_finish_decl): Likewise.
10587 (register_dtor_fn): Likewise.
10588 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
10589 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
10590 TYPE_VEC_DELETE_TAKES_SIZE here.
10591 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
10592 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
10593 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10594 (finish_destructor_body): Likewise.
10595 (maybe_build_cleanup_1): Likewise.
10596 * decl2.c (do_static_destruction): Likewise.
10597 * init.c (build_new_1): Make it static.
10598 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10599 (expand_cleanup_for_base): Likewise.
10600 (get_cookie_size): New function.
10601 (build_new_1): Handle array-new cookies correctly under the new
10602 ABI.
10603 (build_vec_delete_1): Likewise.
10604 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10605 (build_delete): Likewise.
10606 (build_vec_delete): Handle array-new cookies correctly under the new
10607 ABI.
10608 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10609 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
10610 TYPE_HAS_ARRAY_NEW_OPERATOR.
10611 * ptree.c (print_lang_type): Check them.
10612 * search.c (context_for_name_lookup): Fix typo in comment.
10613 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10614 * tree.c (break_out_cleanups): Likewise.
10615 (build_cplus_array_test_1): Likewise.
10616 (cp_build_qualified_type_real): Likewise.
10617 * typeck.c (complete_type): Likewise.
10618
10619 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
10620 the command-line, not the end.
10621
10622 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
10623
10624 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
10625
10626 2000-03-02 Tom Tromey <tromey@cygnus.com>
10627
10628 * cp-tree.h (build_java_class_ref): Declare.
10629 * init.c (build_java_class_ref): No longer static.
10630 * except.c (expand_throw): Generate a Java-style `throw' if the
10631 thrown object is a "Java" object.
10632 (initialize_handler_parm): Generate a Java-style lookup of
10633 exception info if the caught object is a "Java" object.
10634 (catch_language, catch_language_init): New globals.
10635 (decl_is_java_type): New function.
10636 (expand_start_catch_block): Don't call push_eh_info() or
10637 push_eh_cleanup() when handling a Java-style "catch". Pass Java
10638 class reference to build_catch_block.
10639
10640 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10641
10642 * typeck.c (comptypes): Treat sizetype like its language equivalent.
10643
10644 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
10645
10646 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
10647 to merge reference/pointer code and fix incorrect warnings.
10648
10649 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
10650
10651 * search.c (protected_accessible_p): Use context_for_name_lookup.
10652
10653 * init.c (construct_virtual_bases): Fix thinko.
10654 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
10655
10656 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10657
10658 * decl.c (current_function_decl): Move to toplev.c.
10659
10660 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
10661
10662 * pt.c (fn_type_unification): Unify return type, whenever
10663 provided.
10664 (get_bindings_real): Only pass return type when necessary.
10665 Remove explicit return type check.
10666 * class.c (resolve_address_of_overloaded_function): Pass desired
10667 return type to fn_type_unification.
10668
10669 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10670
10671 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
10672 DECL_FIELD_SIZE.
10673 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
10674 DECL_FIELD_SIZE.
10675 * rtti.c (expand_class_desc): Likewise.
10676 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
10677 (THUNK_VCALL_OFFSET): Likewise.
10678 (THUNK_DELTA): Reflect changes in ../tree.h.
10679
10680 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
10681
10682 * search.c (protected_accessible_p): Also allow the access if
10683 the member is public in DERIVED. Lose TYPE parm.
10684 (friend_accessible_p): Lose TYPE parm.
10685 (accessible_p): Adjust.
10686
10687 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10688
10689 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
10690 on things that are not sizes; ssize_binop deleted.
10691 Call size_diffop when appropriate.
10692 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10693 (build_primary_vtable, build_secondary_vtable): Likewise.
10694 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
10695 Variable I is HOST_WIDE_INT.
10696 (get_vfield_offset): Pass proper types to size_binop.
10697 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
10698 (finish_struct_1): Likewise.
10699 (skip_rtti_stuff): Arg N is now pointer to signed.
10700 (layout_class_type): Use size_zero_node.
10701 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
10702 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
10703 * decl.c (complete_arry_type): Pass proper types to size_binop.
10704 (xref_basetypes): BINFO_OFFSET is sizetype.
10705 * error.c (dump_expr): Don't use size_binop non-sizes.
10706 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
10707 * init.c (construct_virtual_bases): Fix type error.
10708 (build_vec_delete_1): Pass proper type to size_binop and don't
10709 fold result.
10710 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
10711 * rtti.c (get_base_offset): Pass proper type to size_binop.
10712 * search.c (dfs_find_vbases): Fix type error.
10713 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
10714 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
10715 * tree.c (debug_binfo): Variable N is signed.
10716 Use HOST_WIDE_INT_PRINT_DEC.
10717 * typeck.c (comptypes): sizetype is same as equivalent integer type.
10718 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
10719 size_one_node and size_zero_node.
10720 (c_alignof): Use size_one_node.
10721 (build_component_addr): Pass proper types to size_binop.
10722 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
10723
10724 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
10725
10726 Implement class scope using-declarations for functions.
10727 * class.c (handle_using_decl): Call add_method for used functions.
10728 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
10729 (add_method): Used functions are hidden by local functions.
10730 (check_bases_and_members): Handle using-decls before finalizing
10731 CLASSTYPE_METHOD_VEC.
10732 * call.c (add_function_candidate): Add ctype parm; if non-zero,
10733 override the type of 'this' accordingly.
10734 (add_template_candidate, add_template_candidate_real): Add ctype parm.
10735 (convert_class_to_reference, build_user_type_conversion_1,
10736 build_new_function_call, build_object_call, build_new_op,
10737 build_new_method_call): Pass ctype parm.
10738
10739 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
10740 the baselink.
10741 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10742 build_new_function_call, build_object_call, build_new_op,
10743 build_new_method_call, build_op_delete_call): Don't get basetype_path
10744 from a baselink.
10745 * typeck.c (build_component_ref): Likewise.
10746 * init.c (build_offset_ref): Likewise.
10747 (resolve_offset_ref): Don't call enforce_access.
10748 Call build_scoped_ref.
10749 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
10750 would cause an error or if -pedantic.
10751 * class.c (alter_access): Lose binfo parm.
10752
10753 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10754
10755 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
10756 types.
10757
10758 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
10759
10760 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
10761 pseudo_type_info creation into the std namespace
10762
10763 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10764
10765 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
10766 (import_export_class): Remove declaration.
10767 * decl2.c (import_export_class): Make it static.
10768 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
10769 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
10770 EXPR_WITH_FILE_LOCATION.
10771 * lex.c (check_newline): Tweak filename/lineno setting.
10772 * semantics.c (begin_while_stmt): Fix typo in comment.
10773
10774 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10775
10776 * lang-options.h (-fmessage-length=): Add missing option.
10777
10778 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
10779
10780 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
10781
10782 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
10783
10784 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
10785
10786 * optimize.c (expand_call_inline): Emit the return label before
10787 evaluating the return value.
10788
10789 2000-02-24 Mark Mitchell <mark@codesourcery.com>
10790
10791 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
10792 than duplicating functionality here.
10793 * optimize.c: Include input.h.
10794 (expand_call_inline): Use push_srcloc and pop_srcloc.
10795 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
10796 * parse.c: Regenerated.
10797 * Makefile.in (lex.o): Depend on input.h.
10798 (optimize.o): Likewise.
10799
10800 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
10801
10802 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
10803 function type, rather than ICE.
10804
10805 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
10806
10807 * decl.c (grokdeclarator): Call decl_type_access_control.
10808 * parse.y (parse_end_decl): Don't call decl_type_access_control if
10809 decl is null.
10810
10811 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
10812
10813 * decl.c (decls_match): Remove obsolete static member nadgering.
10814
10815 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10816
10817 * decl.c (grokdeclarator): Change ANSI to ISO.
10818 * lex.c (consume_string, readescape, do_identifier): Likewise.
10819 (parse_float, real_yylex): Likewise.
10820 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
10821 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
10822 new_type_id, maybe_label_decls, simple_stmt,
10823 for.init.statement): Likewise.
10824 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
10825 * semantics.c (finish_named_return_value): Likewise.
10826 * parse.c: Regenerate.
10827
10828 2000-02-21 Mark Mitchell <mark@codesourcery.com>
10829
10830 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
10831 (CPTI_CLASS_STAR_TYPE): Remove.
10832 (vtable_index_type): Likewise.
10833 (class_star_type_node): Remove.
10834 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
10835 (build_binary_op_nodefault): Remove.
10836 * call.c (build_new_op): Use build_binary_op instead of
10837 build_binary_op_nodefault.
10838 * decl.c (init_decl_processing): Remove class_star_type_node
10839 initialization. Make delta_type_node ptrdiff_type_node under the
10840 new ABI. Initialize vtable_index_type.
10841 (build_ptrmemfunc_type): Build different structures for the new
10842 ABI.
10843 (build_enumerator): Use build_binary_op instead of
10844 build_binary_op_nodefault.
10845 * method.c (build_overload_value): Mangle pointers-to-members
10846 appropriately under the new ABI.
10847 * typeck.c (build_array_ref): Use build_binary_op instead of
10848 build_binary_op_nodefault.
10849 (get_member_function_from_ptrfunc): Adjust for the new ABI.
10850 (build_binary_op_nodefault): Rename to ...
10851 (build_binary_op): ... this. Remove old version. Adjust for
10852 pointer-to-member comparisons under the new ABI.
10853 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
10854 (build_ptrmemfunc): Adjust for the new ABI.
10855 (expand_ptrmemfunc_cst): Likewise.
10856 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
10857 (pfn_from_ptrmemfunc): Adjust for the new ABI.
10858
10859 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
10860
10861 * call.c (build_object_call): Compress consecutive calls to
10862 cp_error.
10863 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
10864 (build_op_delete_call): Adjust message formatting.
10865
10866 * class.c (check_bases): Compress consecutive calls to
10867 cp_pedwarn.
10868 (finish_struct_anon): Say 'ISO C++'.
10869
10870 * decl.c (start_decl): Same here.
10871 (grok_reference_init): Likewise.
10872 (grokfndecl): Correct message formatting.
10873 (grokfndecl): Improve diagnostic.
10874 (check_static_variable_definition): Likewise. Say 'ISO C++'
10875 (compute_array_index_type): Say 'ISO C++'
10876 (create_array_type_for_decl): Compress consecutive calls to
10877 cp_error.
10878 (grokdeclarator): Say 'ISO C++'
10879 (grok_op_properties): Likewise.
10880
10881 * decl2.c (delete_sanity): Clairify diagnostic.
10882 (check_member_template): Same here.
10883 (grok_function_init): Use consistent terminology.
10884
10885 * expr.c (do_case): Say 'ISO C++'
10886
10887 * friend.c (do_friend): Compress consecutive calls to warning.
10888
10889 2000-02-20 Mark Mitchell <mark@codesourcery.com>
10890
10891 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
10892 * class.c (build_secondary_vtable): Reorganize. Don't create a
10893 new vtable under the new ABI.
10894 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
10895 computing the size.
10896 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
10897 the initializing elements.
10898 (initialize_vtable): New function.
10899 (dfs_finish_vtbls): Use it.
10900 (dfs_accumulate_vtbl_inits): New function.
10901 (finish_vtbls): Merge primary and secondary vtables under the new
10902 ABI.
10903 (finish_struct_1): Remove redundant call to layout_vtable_decl.
10904 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
10905 aren't VAR_DECLs.
10906
10907 * class.c (build_vtable): New function, split out from ...
10908 (get_vtable_decl): ... here, and ...
10909 (build_secondary_vtable): ... here.
10910
10911 * pt.c (tsubst_decl): Fix formatting.
10912
10913 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10914
10915 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
10916 (avoid_overlap, build_base_field): Likewise.
10917 (build_base_field, build_base_fields, is_empty_class):
10918 Test DECL_SIZE with integer_zero.
10919 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
10920 * cp-tree.h (struct lang_type): New field size_unit.
10921 (CLASSTYPE_SIZE_UNIT): New macro.
10922 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
10923 (cp_finish_decl): Delete -Wlarger-than processing.
10924 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
10925 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
10926 * tree.c (make_binfo): binfo vector is one entry longer.
10927 (walk_tree): Walk DECL_SIZE_UNIT.
10928
10929 2000-02-19 Mark Mitchell <mark@codesourcery.com>
10930
10931 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
10932 comment.
10933 (build_vtable_entry): Don't assume all vtable entries are
10934 functions.
10935 (build_vtbl_initializer): Adjust accordingly.
10936 (get_vtable_decl): Fix formatting.
10937
10938 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
10939
10940 * semantics.c (deferred_type_access_control): Walk the entire
10941 type_lookups list.
10942 (save_type_access_control): Rename from
10943 initial_deferred_type_access_control. Just remember the value.
10944 (decl_type_access_control): New fn.
10945 (begin_function_definition): Use deferred_type_access_control, after
10946 we've started the function. Set type_lookups to error_mark_node.
10947 * parse.y (frob_specs, fn.def1): Adjust.
10948 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
10949 (parse_end_decl, parse_bitfield0, parse_method): New fns.
10950 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
10951 (after_type_component_declarator0): Likewise.
10952 (after_type_component_declarator): Likewise.
10953 (notype_component_declarator): Likewise.
10954 * cp-tree.h: Adjust.
10955
10956 * decl.c (redeclaration_error_message): Allow redeclaration of
10957 namespace-scope decls.
10958
10959 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10960
10961 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
10962
10963 2000-02-17 Mark Mitchell <mark@codesourcery.com>
10964
10965 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
10966 * decl2.c (grokclassfn): Likewise.
10967
10968 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
10969
10970 * decl2.c (lang_decode_option): Don't set default message length
10971 here.
10972 * lex.c (lang_init_options): Set it here.
10973
10974 2000-02-16 Mark Mitchell <mark@codesourcery.com>
10975
10976 Make DECL_CONTEXT mean the class in which a member function was
10977 declared, even for a virtual function.
10978 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
10979 (DECL_FRIEND_CONTEXT): New macro.
10980 (DECL_REAL_CONTEXT): Remove.
10981 (SET_DECL_FRIEND_CONTEXT): Likewise.
10982 (DECL_VIRTUAL_CONTEXT): Adjust.
10983 (DECL_CLASS_SCOPE_P): Use TYPE_P.
10984 (add_friends): Remove.
10985 (hack_decl_function_context): Likewise.
10986 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
10987 CP_DECL_CONTEXT.
10988 (build_over_call): Fix indentation. Use DECL_CONTEXT
10989 instead of DECL_CLASS_CONTEXT.
10990 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
10991 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10992 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10993 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
10994 (build_base_field): Likewise.
10995 (finish_struct_1): Likewise.
10996 (build_self_reference): Likewise.
10997 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
10998 DECL_REAL_CONTEXT.
10999 (pushtag): Use decl_function_context, not
11000 hack_decl_function_context.
11001 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11002 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11003 (pushdecl): Remove bogus code.
11004 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11005 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11006 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11007 Use decl_function_context, nothack_decl_function_context.
11008 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11009 (grokdeclarator): Likewise. Use decl_function_context, not
11010 hack_decl_function_context.
11011 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
11012 (start_function): Use DECL_FRIEND_CONTEXT, not
11013 DECL_CLASS_CONTEXT. Use decl_function_context, not
11014 hack_decl_function_context.
11015 (finish_function): Use decl_function_context, not
11016 hack_decl_function_context.
11017 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11018 DECL_CLASS_CONTEXT.
11019 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11020 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11021 (grokfield): Likewise.
11022 (finish_builtin_type): Likewise.
11023 (finish_vtable_vardec): Use decl_function_context, not
11024 hack_decl_function_context.
11025 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11026 (start_static_initialization_or_destruction): Likewise.
11027 (finish_static_initialization_or_destruction): Likewise.
11028 (mark_used): Adjust logic for deciding when to synthesize methods.
11029 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11030 DECL_REAL_CONTEXT.
11031 * error.c (dump_function_decl): Use DECL_CONTEXT, not
11032 DECL_CLASS_CONTEXT.
11033 * friend.c (is_friend): Likewise.
11034 (add_friends): Remove.
11035 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11036 * lex.c (begin_definition_of_inclass_inline): Use
11037 decl_function_context, not hack_decl_function_context.
11038 (process_next_inline): Likewise.
11039 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11040 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11041 DECL_CLASSS_CONTEXT.
11042 (hack_identifier): Likewise.
11043 (synthesize_method): Use decl_function_context, not
11044 hack_decl_function_context.
11045 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11046 DECL_REAL_CONTEXT.
11047 (is_member_template): Use decl_function_context, not
11048 hack_decl_function_context. Use DECL_CONTEXT, not
11049 DECL_CLASS_CONTEXT.
11050 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11051 DECL_CLASS_CONTEXT.
11052 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11053 DECL_REAL_CONTEXT.
11054 (push_template_decl_real): Likewise.
11055 (instantiate_class_template): Don't call add_friends.
11056 (tsubst_default_argument): Use DECL_CONTEXT, not
11057 DECL_REAL_CONTEXT.
11058 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11059 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11060 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11061 DECL_CLASS_CONTEXT.
11062 * repo.c (repo_inline_used): Likewise.
11063 * search.c (current_scope): Adjust for new _CONTEXT macros.
11064 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11065 DECL_REAL_CONTEXT.
11066 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11067 (lookup_fnfields_here):Likewise.
11068 (check_final_overrider): Likewise.
11069 (init_vbase_pointers): Likewise.
11070 (virtual_context): Likewise.
11071 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11072 (expand_body): Use decl_function_context, not
11073 hack_decl_function_context.
11074 * tree.c (hack_decl_function_context): Remove.
11075 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11076 DECL_CLASS_CONTEXT.
11077 * typeck2.c (error_not_base_type): Likewise.
11078
11079 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
11080
11081 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11082
11083 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11084
11085 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11086
11087 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
11088
11089 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11090
11091 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
11092
11093 * decl2.c (lang_decode_option): Enable automatic line wrapping.
11094
11095 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
11096
11097 * parse.y (frob_specs): Split out...
11098 (parse_decl): From here.
11099 (fn.def2): Call initial_deferred_type_access_control.
11100 (after_type_component_declarator0): Call frob_specs.
11101 (notype_component_declarator0): Likewise.
11102 * search.c (friend_accessible_p): Nested classes are friends of their
11103 enclosing classes.
11104
11105 2000-02-10 Mark Mitchell <mark@codesourcery.com>
11106
11107 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11108 used to create an implicit temporary.
11109
11110 * class.c (dfs_modify_vtables): Tweak calculation of functions to
11111 override.
11112
11113 2000-02-08 Nathan Sidwell <nathan@acm.org>
11114
11115 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11116 strip array element qualifiers too.
11117
11118 2000-02-07 Mark Mitchell <mark@codesourcery.com>
11119
11120 * decl.c (store_parm_decls): Don't build cleanups for parameters
11121 while processing_template_decl.
11122
11123 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
11124
11125 * cp-tree.h (struct saved_scope): Add incomplete field.
11126 (namespace_scope_incomplete): New macro.
11127 * decl.c (pushdecl): Use it.
11128 (hack_incomplete_structures): Use it. See through artificial
11129 binding levels.
11130 (mark_saved_scope): Mark it.
11131
11132 Implement access control for nested types.
11133 * search.c (type_access_control): New fn.
11134 (accessible_p): Now we do perform access control for types.
11135 * semantics.c (deferred_type_access_control): New fn.
11136 (initial_deferred_type_access_control): New fn.
11137 (begin_function_definition): Call it. Add lookups parm.
11138 * decl.c (struct binding_level): Add this_class field.
11139 (pushlevel_class): Set it.
11140 (mark_binding_level): Mark it.
11141 (lookup_name_real): Use it. Call type_access_control.
11142 (mark_saved_scope): Mark lookups field.
11143 * cp-tree.h (flagged_type_tree): Add lookups field.
11144 (struct saved_scope): Add lookups field.
11145 (type_lookups): New macro.
11146 * parse.y (declmods): Now <ftype>.
11147 (parse_decl): Add lookups parm. Call
11148 initial_deferred_type_access_control.
11149 (lang_extdef): Clear type_lookups.
11150 (typed_declspecs, declmods, typespec): Set lookups field.
11151 (initdcl): Call deferred_type_access_control.
11152 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11153 component_decl_1, named_parm): Adjust.
11154 * friend.c (is_friend): Nested classes are friends of their
11155 enclosing classes.
11156
11157 * class.c (currently_open_derived_class): New fn.
11158 * method.c (hack_identifier): Use it.
11159
11160 * lex.c (do_identifier): Remove obsolete code.
11161
11162 * parse.y (typed_typespecs): Propagate new_type_flag properly.
11163
11164 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
11165
11166 * tinfo.h: Remove apostrophes from C++ comment (xgettext
11167 thinks this file is plain C).
11168
11169 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11170
11171 * Makefile.in (call.o): Depend on $(EXPR_H).
11172
11173 * call.c: Include "expr.h".
11174
11175 * class.c (dump_class_hierarchy): Add prototype.
11176
11177 * search.c (dfs_get_pure_virtuals): Likewise.
11178
11179 2000-02-1 Ulrich Drepper <drepper@redhat.com>
11180
11181 * parse.y (simple_stmt): Allow :: token in asm parameter list.
11182 * parse.c: Rebuilt.
11183
11184 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
11185
11186 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11187 Store it in DECL_FCONTEXT.
11188 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11189
11190 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
11191
11192 * tinfo.h (old abi): #include "tconfig.h".
11193 * tinfo.cc (convert_to_base): Move into old abi section.
11194
11195 2000-01-31 Mark Mitchell <mark@codesourcery.com>
11196
11197 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11198 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11199 (BINFO_PRIMARY_BINFO): New macro.
11200 (BF_DELTA): Rename to ...
11201 (BV_DELTA): ... this.
11202 (BF_VCALL_INDEX): Rename to ...
11203 (BV_VCALL_INDEX): ... this.
11204 (BF_FN): Rename to ...
11205 (BV_FN): ... this.
11206 * class.c (build_vbase_path): Adjust for changes to reverse_path.
11207 (set_rtti_entry): Rename BF_ macros to BV_ variants.
11208 (modify_vtable_entry): Simplify.
11209 (add_virtual_function): Rename BF_ macros to BV_ variants.
11210 (build_vtable_initializer): Likewise.
11211 (get_class_offset_1): Remove.
11212 (dfs_get_class_offset): Likewise.
11213 (get_class_offset): Likewise.
11214 (dfs_find_final_overrider): New function.
11215 (find_final_overrider): Likewise.
11216 (modify_one_vtable): Remove.
11217 (dfs_find_base): New function.
11218 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
11219 find_final_overrider.
11220 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
11221 virtuals.
11222 (dfs_fixup_vtable_deltas): Remove.
11223 (override_one_vtable): Remove.
11224 (merge_overrides): Likewise.
11225 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11226 unreal chilren of virtual bases.
11227 (finish_struct_1): Don't use merge_overrides. Don't use
11228 dfs_fixup_vtable_deltas.
11229 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11230 BINFOs.
11231
11232 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11233 Jason Merrill <jason@yorick.cygnus.com>
11234
11235 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11236
11237 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
11238
11239 * exception.cc (__throw_bad_typeid): Add missing std::.
11240
11241 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11242
11243 * cp-tree.h (make_thunk): PROTO -> PARAMS.
11244
11245 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
11246
11247 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11248
11249 Runtime support for new-abi rtti.
11250 * inc/typeinfo (type_info::operator!=): Define in class.
11251 (type_info::before, type_info::name, type_info::operator==,
11252 type_info::operator!=): Define new ABI implementations.
11253 (type_info::is_pointer_p, type_info::is_function_p): Declare
11254 new virtual functions.
11255 (type_info::do_catch, type_info::do_upcast): Likewise.
11256
11257 * tinfo.h (__base_class_info): Define new class.
11258 (__class_type_info): Likewise.
11259 (__si_class_type_info): Likewise.
11260 (__vmi_class_type_info): Likewise.
11261 (__dynamic_cast): Prototype.
11262
11263 * tinfo.cc: Conditionalize old and new rtti mechanisms.
11264 (type_info::is_pointer_p): Define new function.
11265 (type_info::is_function_p): Likewise.
11266 (type_info::do_catch): Likewise.
11267 (type_info::do_upcast): Likewise.
11268 (vtable_prefix): New structure for vtable access.
11269 (adjust_pointer): Define new template function.
11270 (contained_p, public_p, virtual_p, contained_public_p,
11271 contained_nonpublic_p, contained_nonvirtual_p): Define new
11272 functions.
11273 (nonvirtual_base_type): New local variable.
11274 (__class_type_info::~__class_type_info): Define.
11275 (__si_class_type_info::~__si_class_type_info): Likewise.
11276 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11277 (__class_type_info::do_catch): Define new function.
11278 (__class_type_info::do_upcast): Likewise.
11279 (__class_type_info::find_public_src): Likewise.
11280 (__class_type_info::do_find_public_src): Likewise.
11281 (__si_class_type_info::do_find_public_src): Likewise.
11282 (__vmi_class_type_info::do_find_public_src): Likewise.
11283 (__class_type_info::do_dyncast): Likewise.
11284 (__si_class_type_info::do_dyncast): Likewise.
11285 (__vmi_class_type_info::do_dyncast): Likewise.
11286 (__class_type_info::do_upcast): Likewise.
11287 (__si_class_type_info::do_upcast): Likewise.
11288 (__vmi_class_type_info::do_upcast): Likewise.
11289 (__dynamic_cast): Likewise.
11290
11291 * tinfo2.cc (__fundamental_type_info): Define new class.
11292 (__pointer_type_info): Likewise.
11293 (__reference_type_info): Likewise.
11294 (__array_type_info): Likewise.
11295 (__function_type_info): Likewise.
11296 (__enum_type_info): Likewise.
11297 (__ptr_to_member_type_info): Likewise.
11298 (__fundamental_type_info::~__fundamental_type_info): Define.
11299 (__pointer_type_info::~__pointer_type_info): Likewise.
11300 (__reference_type_info::~__reference_type_info): Likewise.
11301 (__array_type_info::~__array_type_info): Likewise.
11302 (__function_type_info::~__function_type_info): Likewise.
11303 (__enum_type_info::~__enum_type_info): Likewise.
11304 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11305 (__pointer_type_info::do_catch): Define new function.
11306 (__ptr_to_member_type_info::do_catch): Define new function.
11307
11308 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11309 (__is_pointer): Likewise.
11310
11311 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11312
11313 2000-01-30 Mark Mitchell <mark@codesourcery.com>
11314
11315 * cp/class.c (build_vtable): Rename to build_primary_vtable.
11316 (prepare_fresh_vtable): Rename to build_secondary_vtable.
11317 (make_new_vtable): New function.
11318 (modify_vtable_entry): Handle generation of new vtables correctly.
11319 (modify_one_vtable): Remove unused parameter.
11320 (dfs_fixup_vtable_deltas): Likewise.
11321 (override_one_vtable): Use build_secondary_vtable.
11322 (finish_struct_1): Use build_primary_vtable and
11323 build_secondary_vtable.
11324
11325 2000-01-28 Ulrich Drepper <drepper@redhat.com>
11326
11327 * cp/decl.c: Adjust variable names, comments, help strings.
11328
11329 2000-01-29 Nathan Sidwell <nathan@acm.org>
11330
11331 * new2.cc (operator delete[]): Use operator delete, don't assume
11332 implementation.
11333
11334 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
11335
11336 * class.c (build_vtbl_initializer): Add argument to
11337 build_vtable_entry call.
11338
11339 2000-01-27 Mark Mitchell <mark@codesourcery.com>
11340
11341 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11342 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11343 (BF_DELTA): New macro.
11344 (BF_VCALL_INDEX): Likewise.
11345 (BF_FN): Likewise.
11346 (THUNK_VCALL_OFFSET): Likewise.
11347 (make_thunk): Change prototype.
11348 * class.c (build_vtable_entry): Integrate
11349 build_vtable_entry_for_fn. Handle vcall indices.
11350 (build_vtable_entry_for_fn): Remove.
11351 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
11352 BF_VCALL_INDEX, BF_FN.
11353 (modify_vtable_entry): Integrate common code from
11354 modify_one_vtable and dfs_fixup_vtable_deltas.
11355 (add_virtual_function): Set BF_VCALL_INDEX.
11356 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
11357 and BF_FN.
11358 (modify_one_vtable): Simplify.
11359 (dfs_fixup_vtable_deltas): Likewise.
11360 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11361 * method.c (make_thunk): Handle vcall indices.
11362
11363 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
11364
11365 Compiler side new abi rtti (not enabled).
11366 * cp-tree.h (new_abi_rtti_p): New macro.
11367 (emit_support_tinfos): Prototype new function.
11368 (tinfo_decl_p): Likewise.
11369 (emit_tinfo_decl): Likwise.
11370 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11371 macros.
11372 (doing_runtime): New local static.
11373 (init_rtti_processing): Add new-abi initializer.
11374 (get_tinfo_decl): Add new-abi logic.
11375 (tinfo_from_decl): Likewise.
11376 (build_dynamic_cast_1): Likewise.
11377 (qualifier_flags): New static function.
11378 (tinfo_base_init): Likewise.
11379 (generic_initializer): Likewise.
11380 (ptr_ref_initializer): Likewise.
11381 (ptmd_initializer): Likewise.
11382 (class_hint_flags): Likewise.
11383 (class_initializer): Likewise.
11384 (synthesize_tinfo_var): Likewise.
11385 (create_real_tinfo_var): Likewise.
11386 (create_pseudo_type_info): Likewise.
11387 (get_vmi_pseudo_type_info): Likewise.
11388 (create_tinfo_types): Likewise.
11389 (emit_support_tinfos): New global function.
11390 (tinfo_decl_p): New global predicate.
11391 (emit_tinfo_decl): New global function.
11392 * class.c (set_rtti_entry): Generalize for old and new rtti.
11393 (build_vtbl_initializer): Likewise.
11394 * decl2.c (finish_file): Likewise.
11395
11396 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
11397
11398 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11399 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11400
11401 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
11402
11403 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11404 for scopes.
11405
11406 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
11407
11408 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11409
11410 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
11411
11412 * optimize.c (calls_setjmp_r): Supply new argument
11413 to special_function_p.
11414
11415 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11416
11417 * call.c: PROTO -> PARAMS.
11418 * class.c: Likewise.
11419 * cp-tree.h: Likewise.
11420 * cvt.c: Likewise.
11421 * decl.c: Likewise.
11422 * decl.h: Likewise.
11423 * decl2.c: Likewise.
11424 * dump.c: Likewise.
11425 * errfn.c: Likewise.
11426 * error.c: Likewise.
11427 * except.c: Likewise.
11428 * expr.c: Likewise.
11429 * init.c: Likewise.
11430 * input.c: Likewise.
11431 * lex.c: Likewise.
11432 * lex.h: Likewise.
11433 * method.c: Likewise.
11434 * optimize.c: Likewise.
11435 * parse.y: Likewise.
11436 * pt.c: Likewise.
11437 * repo.c: Likewise.
11438 * rtti.c: Likewise.
11439 * search.c: Likewise.
11440 * semantics.c: Likewise.
11441 * spew.c: Likewise.
11442 * tree.c: Likewise.
11443 * typeck.c: Likewise.
11444 * typeck2.c: Likewise.
11445 * xref.c: Likewise.
11446
11447 2000-01-25 Richard Henderson <rth@cygnus.com>
11448
11449 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11450
11451 2000-01-25 Mark Mitchell <mark@codesourcery.com>
11452
11453 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11454 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11455 (struct vcall_offset_data_s): New type.
11456 (dfs_vcall_offset_queue_p): New function.
11457 (dfs_build_vcall_offset_vtbl_entries): Likewise.
11458 (build_vcall_offset_vtbl_entries): Likewise.
11459 (layout_vtable_decl): Likewise.
11460 (num_vfun_entries): Likewise.
11461 (num_extra_vtbl_entries): Add the entries for vcall offsets.
11462 (build_vtbl_initializer): Likewise.
11463 (dfs_finish_vtabls): Use layout_vtable_decl.
11464 (modify_one_vtables): Always duplicate vtables under the new ABI.
11465 (finish_struct_1): Use layout_vtable_decl.
11466
11467 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11468
11469 * decl.c (member_function_or_else): Change third arg from a format
11470 specifier to an `enum overload_flags'. Callers changed.
11471
11472 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
11473
11474 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11475 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11476 build_const_cast, get_delta_difference, check_return_expr): Avoid
11477 ANSI string concatenation usage.
11478
11479 2000-01-24 Mark Mitchell <mark@codesourcery.com>
11480
11481 * class.c (layout_class_type): Put the fields required to make a
11482 class non-empty at the end, not the beginning, of the TYPE_FIELDs
11483 list.
11484
11485 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
11486
11487 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11488 template.
11489
11490 * decl2.c (mark_used): Do instantiate inlines that have been
11491 explicitly instantiated.
11492
11493 2000-01-24 Richard Henderson <rth@cygnus.com>
11494
11495 * call.c (build_over_call): Use expand_tree_builtin.
11496 * typeck.c (build_function_call_real): Likewise.
11497 (build_binary_op_nodefault): Handle unordered compares.
11498
11499 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11500
11501 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11502 cp_tree_index values.
11503 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11504 New global node #defines for them.
11505 * rtti.c (call_void_fn): Replace with ...
11506 (build_runtime_decl): ... new static function.
11507 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11508 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11509 (build_dynamic_cast_1): Always produce correctly typed result.
11510 Explicitly produce type_info addresses. Use dynamic_cast_node.
11511 * exception.cc (__throw_bad_cast): Return `void *'.
11512 (__throw_bad_typeid): Return `const type_info &'.
11513
11514 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11515
11516 * cp-tree.h (get_vtable_decl): Prototype new function.
11517 * class.c (get_vtable_decl): New function. Broken out from ...
11518 (build_vtable): ... here. Use it.
11519 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11520 by get_vtable_decl.
11521
11522 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11523
11524 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11525 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11526 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11527 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11528 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11529 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11530 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11531 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11532 (CPTI_TINFO_VAR_ID): New enumeration.
11533 (__tp_desc_type_node, __access_mode_type_node,
11534 __bltn_desc_type_node, __user_desc_type_node,
11535 __class_desc_type_node, __ptr_desc_type_node,
11536 __attr_desc_type_node, __func_desc_type_node,
11537 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11538 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11539 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11540 enum_desc_type_node, class_desc_type_node,
11541 si_class_desc_type_node, vmi_class_desc_type_node,
11542 ptmd_desc_type_node, base_desc_type_node): New #defines.
11543 (tinfo_fn_id, tinfo_fn_type): Rename to ...
11544 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11545 (tinfo_var_id): New enumeration.
11546 (DECL_TINFO_FN_P): Augment comment.
11547 * decl.c (cp_global_trees): Adjust documentation.
11548 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11549 tinfo_decl_type and tinfo_var_id.
11550 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11551 (build_typeid): Remove unused variable.
11552 (get_tinfo_var): Use tinfo_var_id.
11553 (tinfo_name): New static function.
11554 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
11555 (tinfo_from_decl): Likewise.
11556 (get_base_offset): New static function, broken out of
11557 expand_class_desc.
11558 (expand_si_desc): Use tinfo_name.
11559 (expand_class_desc): Likewise. Lose local static variable.
11560 Use base_desc_type_node. Use get_base_offset.
11561 (expand_ptr_desc): Use tinfo_name.
11562 (expand_attr_desc): Likewise.
11563 (expand_generic_desc): Likewise.
11564
11565 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
11566 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
11567
11568 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11569
11570 * cp-tree.h (__eprintf): Remove declaration.
11571 * tree.c (__eprintf): Remove definition.
11572
11573 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
11574 Mark Mitchell <mark@codesourcery.com>
11575
11576 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
11577 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
11578
11579 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
11580
11581 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
11582
11583 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11584
11585 * cp-tree.h (register_dtor_fn): New function.
11586 * decl.c (destroy_local_static): Rename to ...
11587 (register_dtor_fn): ... this. Give it external linkage.
11588 (expand_static_init): Use it.
11589 * decl2.c (do_static_initialization): Likewise, if using
11590 __cxa_atexit.
11591 (do_static_destruction): Check that __cxa_atexit is not in use.
11592 (finish_file): Don't call do_static_destruction if using
11593 __cxa_atexit.
11594
11595 * typeck.c (convert_arguments): Restore two-message error
11596 reporting.
11597
11598 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
11599
11600 Remap dynamic cast hint values to be consistent across ABIs.
11601 * search.c (dynamic_cast_base_recurse): Remap generated value.
11602 (get_dynamic_cast_base_type): Adjust documentation.
11603 * tinfo.h (__user_type_info::dyncast): Likewise.
11604 (__user_type_info::find_public_subobj): Remap BOFF meaning.
11605 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
11606 (__class_type_info::do_dyncast): Likewise.
11607 (__class_type_info::do_find_public_subobj): Likewise.
11608 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
11609
11610 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11611
11612 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
11613
11614 * typeck2.c (incomplete_type_error): Restore previous
11615 cp_error and cp_error_at call sequence.
11616
11617 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
11618
11619 * class.c (dump_class_hierarchy): Make format agree with argument;
11620 cast pointer to unsigned long and print with %lx.
11621
11622 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11623
11624 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
11625
11626 * typeck.c (composite_pointer_type, common_type,
11627 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
11628 build_function_call_real, convert_arguments,
11629 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
11630 build_unary_op, mark_addressable, build_compound_expr,
11631 build_static_cast, build_reinterpret_cast, build_const_cast,
11632 build_c_cast, build_modify_expr, get_delta_difference,
11633 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
11634 'ISO C++'. Fusion consecutive calls to diagnostic message routines
11635 into a single one.
11636 * typeck2.c (readonly_error, abstract_virtuals_error,
11637 process_init_constructor, check_for_new_type): Likewise.
11638
11639 2000-01-19 Mark Mitchell <mark@codesourcery.com>
11640
11641 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
11642 VAR_DECLs.
11643
11644 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
11645
11646 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
11647 (build_x_typeid): Likewise.
11648 (get_tinfo_fn): Likewise.
11649 (get_tinfo_fn_unused): Rename to ...
11650 (get_tinfo_decl): ... here.
11651 * rtti.c (build_headof): Replace logic error with assertion.
11652 (get_tinfo_fn_dynamic): Rename to ...
11653 (get_tinfo_decl_dynamic): ... here. Make static. Use
11654 complete_type_or_else.
11655 (build_x_typeid): Move into ...
11656 (build_typeid): ... here. Adjust call to
11657 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
11658 throw_bad_typeid expression.
11659 (get_tinfo_fn_unused): Rename to ...
11660 (get_tinfo_decl): ... here. Adjust comment.
11661 (get_tinfo_fn): Delete.
11662 (tinfo_from_decl): New static function.
11663 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
11664 (get_typeid): Use complete_type_or_else.
11665 (build_dynamic_cast_1): Adjust calls to
11666 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
11667 * parse.y (primary): Adjust call to build_typeid.
11668 * except.c (build_eh_type_type_ref): Adjust call to
11669 get_tinfo_decl. Mark as used.
11670 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
11671 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
11672 * parse.c: Regenerated.
11673
11674 2000-01-17 Mark Mitchell <mark@codesourcery.com>
11675
11676 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
11677 calling convention.
11678 (resolves_to_fixed_type_p): Document calling convention.
11679 * rtti.c (build_x_typeid): Initialize NONNULL.
11680
11681 * cp-tree.h (build_shared_int_cst): New function.
11682 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
11683 * class.c (modify_vtable_entry): Likewise.
11684 (add_virtual_function): Split out code to generated shared
11685 INTEGER_CSTs to build_share_int_cst.
11686 (modify_all_vtables): Handle all the overridden functions here.
11687 Add overridden functions from non-primary virtual bases to the
11688 primary vtable.
11689 (finish_struct_1): Adjust call to modify_all_vtables. Add
11690 overridden functions from non-primary bases to the vtable.
11691 * tree.c (build_shared_int_cst): New function.
11692
11693 * cp-tree.h (scratchalloc): Remove.
11694 (build_scratch_list): Likewise.
11695 * call.c (convert_class_to_reference): Replace build_scratch_list
11696 and build_expr_list with build_tree_list.
11697 (add_candidate): Replace scratchalloc with expralloc. Note memory
11698 leak.
11699 (build_user_type_conversion_1): Replace build_scratch_list
11700 and build_expr_list with build_tree_list.
11701 (build_new_op): Likewise.
11702 (build_op_delete_call): Likewise.
11703 (convert_like): Likewise.
11704 * cvt.c (ocp_convert): Likewise.
11705 * decl.c (start_decl): Likewise.
11706 (start_function): Likewise.
11707 (finish_destructor_body): Likewise.
11708 (maybe_build_cleanup_1): Likewise.
11709 * decl2.c (reparse_decl_as_expr): Likewise.
11710 * init.c (perform_member_init): Likewise.
11711 (expand_cleanup_for_base): Likewise.
11712 (build_builtin_delete_call): Likewise.
11713 (build_new_1): Likewise.
11714 (build_delete): Likewise.
11715 * method.c (do_build_assign_ref): Likewise.
11716 * parse.y (already_scoped_stmt): Likewise.
11717 (nontrivial_exprlist): Likewise.
11718 (net_initializer): Likewise.
11719 (initlist): Likewise.
11720 * parse.c: Regenerated.
11721 * rtti.c (build_x_typeid): Likewise.
11722 (build_dynamic_cast_1): Likewise.
11723 * typeck.c (build_x_compound_expr): Likewise.
11724 (build_static_cast): Likewise.
11725 (build_modify_expr): Likewise.
11726
11727 * cp-tree.h (DECL_VINDEX): Add documentation.
11728 * class.c (build_vtable_entry): Likewise.
11729 (start_vtable): Add comment.
11730 (add_virtual_function): Replace pending_hard_virtuals with
11731 overridden_virtuals and pending_virtuals with new_virtuals.
11732 Replace redundant assignments with assertions.
11733 (check_for_override): Add comment.
11734 (check_bases_and_members): Replace pending_hard_virtuals with
11735 overridden_virtuals and pending_virtuals with new_virtuals.
11736 (create_vtbl_ptr): Likewise.
11737 (layout_class_type): Likewise.
11738 (finish_struct_1): Likewise. Add comments.
11739
11740 2000-01-16 Mark Mitchell <mark@codesourcery.com>
11741
11742 * class.c (finish_struct_1): Replace redundant code with
11743 assertions.
11744
11745 * cp-tree.h (flag_new_abi): Move.
11746 (flag_use_cxa_atexit): Likewise.
11747 (flag_honor_std): Likewise.
11748 (flag_rtti): Likewise.
11749 (vbase_offsets_in_vtable_p): Define.
11750 (vptrs_present_everywhere_p): Likewise.
11751 (TYPE_CONTAINS_VPTR_P): Likewise.
11752 (dfs_walk_real): Declare.
11753 * class.c (build_vbase_pointer_fields): Check
11754 vbase_offsets_in_vtable_p.
11755 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
11756 BINFO_VPTR_FIELD.
11757 (build_vbase_offset_vtbl_entries): Simplify.
11758 (build_vbase_offset_vtbl_entries): Adjust.
11759 (build_vbase_pointer): Add ability to look up vbase offsets in
11760 vtable.
11761 (start_vtable): New function.
11762 (add_virtual_function): Use it.
11763 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
11764 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
11765 (build_vtbl_initializer): Take the type of the complete object as
11766 input. Use it to correctly calculate vbase offsets.
11767 (dfs_finish_vtbls): Pass the complete type to
11768 build_vtbl_initializer.
11769 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
11770 (create_vtable_ptr): Create a vtable even if there are no
11771 new virtual functions, under the new ABI.
11772 (finish_struct_1): Likewise.
11773 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
11774 * decl.c (exapnd_static_init): Remove call to
11775 preserve_initializer.
11776 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
11777 vtables.
11778 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
11779 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
11780 (construct_virtual_bases): Don't initialize virtual base pointers
11781 under the new ABI.
11782 (build_aggr_init): Clean up comment.
11783 (expand_aggr_init_1): Likewise.
11784 * rtti.c (expand_class_desc): Store the virtual function table
11785 index where the vbase offset lives in the offset field.
11786 * search.c (dfs_walk_real): Make it global.
11787 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
11788 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
11789
11790 * tinfo.h (USItype): Make it signed under the new ABI.
11791 * tinfo.cc (convert_to_base): New function. Encapsulate base
11792 conversion logic here.
11793 (__class_type_info::do_upcast): Use it.
11794 (__class_type_info::do_dyncast): Likewise.
11795 (__class_type_info::do_find_public_subobj): Likewise.
11796
11797 * init.c (construct_virtual_bases): Don't look up the addresses of
11798 virtual bases at run-time.
11799
11800 * class.c (build_vbase_pointer): Relocate.
11801 (build_vbase_pointer_fields): Likewise.
11802 (dfs_build_vbase_offset_vtbl_entries): Likewise.
11803 (build_vbase_offset_vtbl_entries): Likewise.
11804
11805 * decl.c (init_decl_processing): Complain if -fnew-abi
11806 -fno-vtable-thunks is used.
11807
11808 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
11809 flag_new_abi.
11810
11811 2000-01-15 Mark Mitchell <mark@codesourcery.com>
11812
11813 * cp-tree.h (num_extra_vtbl_entries): New function.
11814 (size_extra_vtbl_entries): Likewise.
11815 (dfs_vtable_path_unmark): Likewise.
11816 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
11817 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11818 * class.c (num_extra_vtbl_entries): New function.
11819 (size_extra_vtbl_entries): Likewise.
11820 (dfs_build_vbase_offset_vtbl_entries): New function.
11821 (build_vbase_offset_vtbl_entries): Likewise.
11822 (build_vtbl_initializer): Use it.
11823 (finish_struct_1): Adjust vtable sizes (using
11824 num_extra_vtbl_entries).
11825 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
11826 THUNK_DECL is non-NULL before expanding it.
11827 * init.c (expand_virtual_init): Adjust the vtable pointer by
11828 size_extra_vtbl_entries before storing it.
11829 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
11830 Handle TREE_LIST parameters here, not in the dfs_* functions.
11831 (dfs_unmarked_real_bases_queue_p): Adjust.
11832 (dfs_marked_real_bases_queue_p): Likewise.
11833 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
11834 (dfs_vtable_path_marked_real_bases_queue_p): New function.
11835 (dfs_vtable_path_unmark): Likewise.
11836
11837 2000-01-14 Mark Mitchell <mark@codesourcery.com>
11838
11839 * optimize.c (copy_body_r): Clear the operand three of a
11840 TARGET_EXPR when copying it.
11841
11842 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11843
11844 * method.c (build_decl_overload_real): Check whether we are in ::
11845 before returning __builtin_new/delete.
11846
11847 2000-01-13 Mark Mitchell <mark@codesourcery.com>
11848
11849 * pt.c (tsubst_friend_function): Improve comment.
11850 (instantiate_decl): Avoid crashing when a "nested" function is
11851 instantiated from the top level.
11852
11853 * dump.c (dqeueue_and_dump): Dump
11854 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
11855
11856 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11857
11858 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
11859
11860 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
11861
11862 * g++spec.c (lang_specific_driver): Add -fnew-abi if
11863 ENABLE_NEW_GXX_ABI defined.
11864 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
11865 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
11866 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
11867
11868 2000-01-12 Mark Mitchell <mark@codesourcery.com>
11869
11870 * decl.c (start_cleanup_fn): Call pushdecl.
11871
11872 * call.c (convert_class_to_reference): Fix typos.
11873 (build_conditional_expr): Handle errors gracefully.
11874 * class.c (push_nested_class): Likewise.
11875 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
11876 (DECL_THIS_EXTERN): Use it.
11877 (DECL_THIS_STATIC): Likewise.
11878 * cvt.c (convert_to_void): Handle errors gracefully.
11879 (build_expr_type_conversion): Likewise.
11880 * decl.c (maybe_push_decl): Likewise.
11881 (start_decl_1): Likewise.
11882 (require_complete_types_for_parms): Likewise.
11883 * parse.y (structsp): Likewise.
11884 (base_class): Likewise.
11885 * parse.c: Regenerated.
11886 * pt.c (finish_member_template_decl): Likewise.
11887 * typeck.c (decay_conversion): Likewise.
11888
11889 * cp-tree.h (dfs_skip_vbases): New function.
11890 (find_vbase_instance): Likewise.
11891 * class.c (determine_primary_base): Allow a nearly empty base to
11892 serve as a primary base class under the new ABI.
11893 (get_class_offset_1): Rename to ...
11894 (dfs_get_class_offset): ... this. Simplify. Don't issue error
11895 messages here.
11896 (get_class_offset): Use it. Issue error messages here.
11897 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
11898 find the right copies of virtual bases.
11899 (fixup_vtable_deltas1): Rename to ...
11900 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
11901 bases as primary bases.
11902 (fixup_vtable_deltas): Remove.
11903 (override_one_vtable): Handle virtual bases as primary bases.
11904 (merge_overrides): Likewise.
11905 (finish_struct_1): Likewise.
11906 (dump_class_hierarchy): Dump primary-ness of bases as well.
11907 * search.c (mark_primary_bases): Use a pre-order traversal to
11908 handle primary virtual bases.
11909 (dfs_skip_vbases): New fiunction.
11910 (expand_upcast_fixups): Adjust to handle primary virtual bases.
11911 (fixup_virtual_upcast_offsets): Likewise.
11912 (fixup_all_virtual_upcast_offsets): Likewise.
11913 (dfs_find_vbase_instances): New function.
11914 (find_vbase_instance): Likewise.
11915
11916 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11917
11918 * lex.c (DIR_SEPARATOR): Delete macro.
11919
11920 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
11921
11922 * decl2.c (lang_decode_option): Handle automatic line wrapping
11923 option.
11924
11925 2000-01-11 Mark Mitchell <mark@codesourcery.com>
11926
11927 * friend.c (do_friend): Don't resolve scopes when processing
11928 template declarations, even if the qualifying scope doesn't
11929 involve template parameters.
11930
11931 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
11932
11933 * class.c (dfs_modify_vtables_queue_p): Remove.
11934 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
11935 and dfs_marked_real_bases_queue_p instead of
11936 dfs_modify_vtables_queue_p.
11937
11938 * class.c (build_vbase_path): Simplify.
11939 (dfs_propagate_binfo_offsets): New function.
11940 (propagate_binfo_offsets): Use it.
11941 (remove_base_field): Simplify.
11942 (dfs_set_offset_for_vbases): Remove.
11943 (dfs_set_offset_for_shared_vbases): New function.
11944 (dfs_set_offset_for_unshared_vbases): Likewise.
11945 (layout_virtual_bases): Use them.
11946 (layout_basetypes): Don't call propagate_binfo_offsets.
11947 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
11948 for the vbases.
11949
11950 * class.c (build_base_field): New function, split out from ...
11951 (build_base_fields): ... here. Use it. Allocate primary bases
11952 first, under the new ABI.
11953 (get_vtable_entry): Remove.
11954 (remove_base_field): New function, split out from ...
11955 (remove_base_fields): ... here. Adjust since primary bases come
11956 first under the new ABI.
11957
11958 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
11959 (initialize_vtbl_ptrs): New function.
11960 (expand_indirect_vtbls_init): Change prototype.
11961 (convert_pointer_to_vbase): Declare.
11962 * init.c (expand_direct_vtbls_init): Remove.
11963 (dfs_initialize_vtbl_ptrs): New function.
11964 (initialize_vtbl_ptrs): Likewise.
11965 (emit_base_init): Use initialize_vtbl_ptrs.
11966 * search.c (convert_pointer_to_vbase): Make it global.
11967 (expand_indirect_vtbls_init): Remove vtable initialization code.
11968 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
11969
11970 * class.c (dfs_finish_vtbls): New function.
11971 (finish_vtbls): Use it.
11972 (dump_class_hierarchy): New function.
11973
11974 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
11975 (BINFO_VBASE_PRIMARY_P): New macro.
11976 (BINFO_VIRTUALS): Add to documentation.
11977 (SET_BINFO_PRIMARY_MARKED_P): Remove.
11978 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11979 (dfs_mark_primary_bases_queue_p): Likewise.
11980 (dfs_unmarked_real_bases_queue_p): New function.
11981 (dfs_marked_real_bases_queue_p): Likewise.
11982 * search.c (dfs_mark_primary_bases): Adjust.
11983 (mark_primary_bases): Likewise.
11984 (get_shared_vbase_if_not_primary): New function.
11985 (dfs_unmarked_real_bases_queue_p): Likewise.
11986 (dfs_marked_real_bases_queue_p): Likewise.
11987 (dfs_get_pure_virtuals): Simplify.
11988 (get_pure_virtuals): Likewise.
11989
11990 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11991
11992 * lex.c: Include tm_p.h.
11993
11994 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
11995
11996 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
11997
11998 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
11999
12000 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12001 * pt.c (instantiate_decl): Defer comdat templates that might not be
12002 needed.
12003
12004 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12005 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12006 (finish_file): Likewise.
12007
12008 * decl2.c (import_export_class): Undo 12/14 change.
12009
12010 * error.c (dump_decl): operator new, not operatornew.
12011
12012 * class.c (field_decl_cmp): A nontype is "greater" than a type.
12013 * search.c (lookup_field_1): Look for the last field with the
12014 desired name.
12015
12016 2000-01-05 Nathan Sidwell <nathan@acm.org>
12017
12018 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12019 FUNCTION_DECL.
12020
12021 2000-01-05 Nathan Sidwell <nathan@acm.org>
12022
12023 * typeck.c (build_static_cast): Don't strip target qualifiers
12024 when casting from a class.
12025
12026 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12027
12028 * class.c (warn_hidden): Initialize variable `fndecl'.
12029
12030 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
12031
12032 * decl.c (flag_isoc9x): New variable to be able to use code in
12033 c-common.c. For now always zero.
12034
12035 2000-01-03 Mark Mitchell <mark@codesourcery.com>
12036
12037 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12038 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12039 or unshare_base_binfos for virtual bases here.
12040 * search.c (dfs_get_vbase_types): Do it here.
12041 (get_vbase_types): Adjust.
12042
12043 2000-01-02 Mark Mitchell <mark@codesourcery.com>
12044
12045 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12046 (BINFO_PRIMARY_MARKED_P): Use flag 5.
12047 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12048 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12049 (unmark_primary_bases): Remove declaration.
12050 (unmarkedp): Declare.
12051 (dfs_vbase_unmark): Likewise.
12052 * class.c (determine_primary_base): Return immediately if there
12053 are no base classes. Call mark_primary_bases here.
12054 (modify_all_direct_vtables): Remove.
12055 (modify_all_indirect_vtables): Remove.
12056 (dfs_modify_vtables_queue_p): New function.
12057 (dfs_modify_vtables): New function.
12058 (modify_all_vtables): Use them.
12059 (build_base_fields): Build FIELD_DECLs for primary virtual base
12060 classes.
12061 (create_vtable_ptr): Don't call determine_primary_base here.
12062 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12063 (dfs_set_offset_for_vbases): ... this.
12064 (layout_virtual_bases): Use it.
12065 (layout_class_type): Call determine_primary_base here.
12066 * search.c (unmarkedp): Make it global.
12067 (shared_marked_p): Simplify.
12068 (shared_unmarked_p): Likewise.
12069 (dfs_primary_bases_queue_p): Remove.
12070 (dfs_unmark_primary_bases): Likewise.
12071 (unmark_primary_bases): Likewise.
12072 (mark_primary_bases): Simplify.
12073 (get_pure_virtuals): Don't call mark_primary_bases here.
12074 (dfs_vbase_unmark): New function.
12075 (get_vbase_types): Simplify.
12076
12077 * class.c (struct base_info): Remove.
12078 (determine_primary_base): Take has_virtual_p rather than a
12079 base_info as input. Don't calculate max_has_virtual.
12080 (finish_struct_bits): Remove max_has_virtual argument.
12081 (create_vtable_ptr): Remove max_has_virtual_p argument.
12082 (layout_virtual_bases): Remove max argument.
12083 (layout_basetypes): Likewise.
12084 (layout_class_type): Remove max_has_virtual_p argument.
12085 (finish_struct_1): Remove max_has_virtual.
12086
12087 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12088 (layout_basetypes): Remove.
12089 * class.c (propagate_binfo_offsets): Moved here from tree.c.
12090 Update to handle primary virtual bases.
12091 (remove_base_fields): New function, split out from
12092 layout_basetypes.
12093 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12094 (layout_virtual_bases): New function, split out from
12095 layout_basetypes. Update to handle primary virtual bases.
12096 (layout_basetypes): Moved here from tree.c. Use
12097 remove_base_fields and layout_virtual_bases.
12098 * search.c (dfs_mark_primary_bases_queue_p): New function.
12099 (mark_primary_bases): Use it.
12100 * tree.c (CEIL): Remove.
12101 (propagate_binfo_offsets): Remove.
12102 (layout_basetypes): Remove.
12103
12104 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12105
12106 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12107 (BINFO_PRIMARY_MARKED_P): New macro.
12108 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12109 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12110 (mark_primary_bases): New function.
12111 (unmark_primary_bases): Likewise.
12112 * search.c (get_abstract_virtuals_1): Remove.
12113 (dfs_mark_primary_bases): New function.
12114 (mark_primary_bases): Likewise.
12115 (dfs_unmark_primary_bases): Likewise.
12116 (unmark_primary_bases): Likewise.
12117 (dfs_get_pure_virtuals): Likewise.
12118
12119 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12120
12121 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12122 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12123 (modify_one_vtable): Adjust.
12124 (fixup_vtable_deltas1): Likewise.
12125 (override_one_vtable): Likewise.
12126 * search.c (get_abstract_virtuals_1): Likewise.
12127 (get_pure_virtuals): Likewise.
12128 (expand_upcast_fixups): Likewise.
12129 * tree.c (debug_binfo): Likewise.
12130
12131 * class.c (build_vtable): Don't return a value. Don't rebuild
12132 vtables for bases that have already been handled.
12133 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12134 already been handled.
12135 (modify_one_vtable): Adjust accordingly.
12136 (fixup_vtable_deltas1): Likewise.
12137 (finish_struct_1): Likewise.
12138
12139 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12140
12141 * call.c (build_new_method_call): Also check destructors.
This page took 0.544989 seconds and 4 git commands to generate.