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