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