]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
[gcc.git] / gcc / cp / ChangeLog
1 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2
3 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4 * cp-tree.h: Declare flag_enforce_eh_specs.
5 * decl.c (store_parm_decls, finish_function): Check it.
6
7 C library functions don't throw.
8 * Makefile.in (cfns.h): New target.
9 (except.o): Depend on it.
10 * Make-lang.in (cc1plus): Depend on cfns.gperf.
11 * cfns.gperf: New file.
12 * cfns.h: Generated.
13 * except.c: Include it.
14 (nothrow_libfn_p): New fn.
15 * decl.c (grokfndecl): Use it.
16 * cp-tree.h: Declare it.
17
18 * decl.c (push_overloaded_decl_1, auto_function,
19 define_function): Lose.
20 (build_library_fn_1): New static fn.
21 (builtin_function): Use it.
22 (get_atexit_node): Use build_library_fn_ptr.
23 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
24 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
25 push_void_library_fn, push_throw_library_fn): New fns.
26 * cp-tree.h: Declare them.
27 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
28 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
29 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
30 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
31 * rtti.c (build_runtime_decl): Lose.
32 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
33 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
34 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
35
36 * call.c (build_call): Remove result_type parm.
37 Call mark_used on unused artificial fns.
38 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
39
40 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
41
42 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
43 appropriate.
44 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
45 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
46 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
47 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
48 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
49 expand_generic_desc): Likewise.
50
51 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
52
53 * exception.cc (__cp_pop_exception): Cleanup the original object.
54
55 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
56
57 * decl.c (grok_op_properties): Merge conversion to void warning
58 with other silly op warnings.
59
60 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
61
62 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
63 array CONSTRUCTOR elements. Don't use expr_tree_cons.
64
65 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
66
67 * decl.c (cp_make_fname_decl): New function.
68 (wrapup_globals_for_namespace): Don't emit unused static vars.
69 (init_decl_processing): Remove comment about use of
70 array_domain_type. Set make_fname_decl.
71 (cp_finish_decl): Remove __FUNCTION__ nadgering.
72 * semantics.c (begin_compound_stmt): Remove
73 current_function_name_declared flagging.
74 (expand_stmt): Don't emit unused local statics.
75 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
76 specially.
77
78 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
79
80 * typeck.c (convert_for_assignment): Don't look at array
81 initializer.
82 * call.c (convert_like_real): Likewise.
83
84 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
85
86 Add initial support for '\uNNNN' specifier.
87 * lex.c (read_ucs): New fn.
88 (readescape, skip_white_space): Call it.
89 (is_extended_char, is_extended_char_1): New fns.
90 (utf8_extend_token): New fn, #if 0'd out.
91 (real_yylex): Treat extended chars like letters.
92
93 * search.c (note_debug_info_needed): Walk the bases even if we
94 weren't deferring the type itself.
95
96 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
97
98 * decl2.c (finish_objects): Constify a char*.
99
100 * method.c (emit_thunk): Likewise.
101
102 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
103
104 * typeck.c (dubious_conversion_warnings): Look through
105 REFERENCE_TYPE.
106
107 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
108
109 * class.c (dfs_modify_vtables): I is now unsigned.
110 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
111 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
112 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
113 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
114 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
115 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
116 Call integer_all_onesp.
117 * typeck2.c (process_init_constructor): Use compare_tree_int.
118
119 * lang-specs.h (as): Don't call if -syntax-only.
120
121 2000-03-06 Mark Mitchell <mark@codesourcery.com>
122
123 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
124 RTL_EXPR_HAS_NO_SCOPE after all.
125
126 2000-03-05 Mark Mitchell <mark@codesourcery.com>
127
128 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
129 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
130 RTL_EXPR_HAS_NO_SCOPE.
131
132 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
133 later.
134
135 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
136
137 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
138
139 * call.c (convert_like): Macrofy.
140 (convert_like_with_context): New macro.
141 (convert_like_real): Renamed from convert_like. Add calling
142 context parameters, for diagnostics. Add recursive flag. Call
143 dubious_conversion_warnings for outer conversion.
144 (build_user_type_conversion): Use convert_like_with_context.
145 (build_over_call): Likewise. Don't warn about dubious
146 conversions here. Adjust convert_default_arg calls.
147 (convert_default_arg): Add context parameters for diagnostics.
148 Pass throught to convert_like_with_context.
149 * cp-tree.h (convert_default_arg): Add context parameters.
150 (dubious_conversion_warnings): Prototype new function.
151 * typeck.c (convert_arguments): Adjust convert_default_arg call.
152 (dubious_conversion_warnings): New function, broken
153 out of convert_for_assignment.
154 (convert_for_assignment): Adjust.
155
156 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
157
158 * decl2.c (key_method): Break out from...
159 (import_export_vtable, import_export_class): ...here.
160
161 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
162 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
163
164 * search.c (note_debug_info_needed, dfs_debug_mark,
165 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
166 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
167
168 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
169
170 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
171 typos.
172
173 2000-03-02 Mark Mitchell <mark@codesourcery.com>
174
175 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
176 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
177 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
178 (lang_type): Split gets_new into has_new and has_array_new.
179 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
180 (TYPE_GETS_NEW): Split into ...
181 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
182 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
183 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
184 (build_op_new_call): Don't declare.
185 (build_new_1): Likewise.
186 * call.c (build_op_new_call): Remove.
187 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
188 instead of TYPE_NEEDS_DESTRUCTOR.
189 (finish_struct_bits): Likewise.
190 (add_implicitly_declared_members): Likewise.
191 (check_field_decl): Likewise.
192 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
193 correctly under the new ABI.
194 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
195 instead of TYPE_NEEDS_DESTRUCTOR.
196 (initialize_local_var): Likewise.
197 (destroy_local_var): Likewise.
198 (cp_finish_decl): Likewise.
199 (register_dtor_fn): Likewise.
200 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
201 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
202 TYPE_VEC_DELETE_TAKES_SIZE here.
203 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
204 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
205 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
206 (finish_destructor_body): Likewise.
207 (maybe_build_cleanup_1): Likewise.
208 * decl2.c (do_static_destruction): Likewise.
209 * init.c (build_new_1): Make it static.
210 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
211 (expand_cleanup_for_base): Likewise.
212 (get_cookie_size): New function.
213 (build_new_1): Handle array-new cookies correctly under the new
214 ABI.
215 (build_vec_delete_1): Likewise.
216 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
217 (build_delete): Likewise.
218 (build_vec_delete): Handle array-new cookies correctly under the new
219 ABI.
220 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
221 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
222 TYPE_HAS_ARRAY_NEW_OPERATOR.
223 * ptree.c (print_lang_type): Check them.
224 * search.c (context_for_name_lookup): Fix typo in comment.
225 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
226 * tree.c (break_out_cleanups): Likewise.
227 (build_cplus_array_test_1): Likewise.
228 (cp_build_qualified_type_real): Likewise.
229 * typeck.c (complete_type): Likewise.
230
231 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
232 the command-line, not the end.
233
234 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
235
236 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
237
238 2000-03-02 Tom Tromey <tromey@cygnus.com>
239
240 * cp-tree.h (build_java_class_ref): Declare.
241 * init.c (build_java_class_ref): No longer static.
242 * except.c (expand_throw): Generate a Java-style `throw' if the
243 thrown object is a "Java" object.
244 (initialize_handler_parm): Generate a Java-style lookup of
245 exception info if the caught object is a "Java" object.
246 (catch_language, catch_language_init): New globals.
247 (decl_is_java_type): New function.
248 (expand_start_catch_block): Don't call push_eh_info() or
249 push_eh_cleanup() when handling a Java-style "catch". Pass Java
250 class reference to build_catch_block.
251
252 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
253
254 * typeck.c (comptypes): Treat sizetype like its language equivalent.
255
256 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
257
258 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
259 to merge reference/pointer code and fix incorrect warnings.
260
261 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
262
263 * search.c (protected_accessible_p): Use context_for_name_lookup.
264
265 * init.c (construct_virtual_bases): Fix thinko.
266 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
267
268 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
269
270 * decl.c (current_function_decl): Move to toplev.c.
271
272 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
273
274 * pt.c (fn_type_unification): Unify return type, whenever
275 provided.
276 (get_bindings_real): Only pass return type when necessary.
277 Remove explicit return type check.
278 * class.c (resolve_address_of_overloaded_function): Pass desired
279 return type to fn_type_unification.
280
281 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
282
283 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
284 DECL_FIELD_SIZE.
285 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
286 DECL_FIELD_SIZE.
287 * rtti.c (expand_class_desc): Likewise.
288 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
289 (THUNK_VCALL_OFFSET): Likewise.
290 (THUNK_DELTA): Reflect changes in ../tree.h.
291
292 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
293
294 * search.c (protected_accessible_p): Also allow the access if
295 the member is public in DERIVED. Lose TYPE parm.
296 (friend_accessible_p): Lose TYPE parm.
297 (accessible_p): Adjust.
298
299 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
300
301 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
302 on things that are not sizes; ssize_binop deleted.
303 Call size_diffop when appropriate.
304 (dfs_build_vcall_offset_vtbl_entries): Likewise.
305 (build_primary_vtable, build_secondary_vtable): Likewise.
306 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
307 Variable I is HOST_WIDE_INT.
308 (get_vfield_offset): Pass proper types to size_binop.
309 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
310 (finish_struct_1): Likewise.
311 (skip_rtti_stuff): Arg N is now pointer to signed.
312 (layout_class_type): Use size_zero_node.
313 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
314 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
315 * decl.c (complete_arry_type): Pass proper types to size_binop.
316 (xref_basetypes): BINFO_OFFSET is sizetype.
317 * error.c (dump_expr): Don't use size_binop non-sizes.
318 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
319 * init.c (construct_virtual_bases): Fix type error.
320 (build_vec_delete_1): Pass proper type to size_binop and don't
321 fold result.
322 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
323 * rtti.c (get_base_offset): Pass proper type to size_binop.
324 * search.c (dfs_find_vbases): Fix type error.
325 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
326 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
327 * tree.c (debug_binfo): Variable N is signed.
328 Use HOST_WIDE_INT_PRINT_DEC.
329 * typeck.c (comptypes): sizetype is same as equivalent integer type.
330 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
331 size_one_node and size_zero_node.
332 (c_alignof): Use size_one_node.
333 (build_component_addr): Pass proper types to size_binop.
334 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
335
336 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
337
338 Implement class scope using-declarations for functions.
339 * class.c (handle_using_decl): Call add_method for used functions.
340 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
341 (add_method): Used functions are hidden by local functions.
342 (check_bases_and_members): Handle using-decls before finalizing
343 CLASSTYPE_METHOD_VEC.
344 * call.c (add_function_candidate): Add ctype parm; if non-zero,
345 override the type of 'this' accordingly.
346 (add_template_candidate, add_template_candidate_real): Add ctype parm.
347 (convert_class_to_reference, build_user_type_conversion_1,
348 build_new_function_call, build_object_call, build_new_op,
349 build_new_method_call): Pass ctype parm.
350
351 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
352 the baselink.
353 * call.c (convert_class_to_reference, build_user_type_conversion_1,
354 build_new_function_call, build_object_call, build_new_op,
355 build_new_method_call, build_op_delete_call): Don't get basetype_path
356 from a baselink.
357 * typeck.c (build_component_ref): Likewise.
358 * init.c (build_offset_ref): Likewise.
359 (resolve_offset_ref): Don't call enforce_access.
360 Call build_scoped_ref.
361 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
362 would cause an error or if -pedantic.
363 * class.c (alter_access): Lose binfo parm.
364
365 2000-02-26 Mark Mitchell <mark@codesourcery.com>
366
367 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
368 types.
369
370 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
371
372 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
373 pseudo_type_info creation into the std namespace
374
375 2000-02-26 Mark Mitchell <mark@codesourcery.com>
376
377 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
378 (import_export_class): Remove declaration.
379 * decl2.c (import_export_class): Make it static.
380 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
381 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
382 EXPR_WITH_FILE_LOCATION.
383 * lex.c (check_newline): Tweak filename/lineno setting.
384 * semantics.c (begin_while_stmt): Fix typo in comment.
385
386 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
387
388 * lang-options.h (-fmessage-length=): Add missing option.
389
390 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
391
392 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
393
394 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
395
396 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
397
398 * optimize.c (expand_call_inline): Emit the return label before
399 evaluating the return value.
400
401 2000-02-24 Mark Mitchell <mark@codesourcery.com>
402
403 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
404 than duplicating functionality here.
405 * optimize.c: Include input.h.
406 (expand_call_inline): Use push_srcloc and pop_srcloc.
407 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
408 * parse.c: Regenerated.
409 * Makefile.in (lex.o): Depend on input.h.
410 (optimize.o): Likewise.
411
412 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
413
414 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
415 function type, rather than ICE.
416
417 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
418
419 * decl.c (grokdeclarator): Call decl_type_access_control.
420 * parse.y (parse_end_decl): Don't call decl_type_access_control if
421 decl is null.
422
423 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
424
425 * decl.c (decls_match): Remove obsolete static member nadgering.
426
427 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
428
429 * decl.c (grokdeclarator): Change ANSI to ISO.
430 * lex.c (consume_string, readescape, do_identifier): Likewise.
431 (parse_float, real_yylex): Likewise.
432 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
433 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
434 new_type_id, maybe_label_decls, simple_stmt,
435 for.init.statement): Likewise.
436 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
437 * semantics.c (finish_named_return_value): Likewise.
438 * parse.c: Regenerate.
439
440 2000-02-21 Mark Mitchell <mark@codesourcery.com>
441
442 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
443 (CPTI_CLASS_STAR_TYPE): Remove.
444 (vtable_index_type): Likewise.
445 (class_star_type_node): Remove.
446 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
447 (build_binary_op_nodefault): Remove.
448 * call.c (build_new_op): Use build_binary_op instead of
449 build_binary_op_nodefault.
450 * decl.c (init_decl_processing): Remove class_star_type_node
451 initialization. Make delta_type_node ptrdiff_type_node under the
452 new ABI. Initialize vtable_index_type.
453 (build_ptrmemfunc_type): Build different structures for the new
454 ABI.
455 (build_enumerator): Use build_binary_op instead of
456 build_binary_op_nodefault.
457 * method.c (build_overload_value): Mangle pointers-to-members
458 appropriately under the new ABI.
459 * typeck.c (build_array_ref): Use build_binary_op instead of
460 build_binary_op_nodefault.
461 (get_member_function_from_ptrfunc): Adjust for the new ABI.
462 (build_binary_op_nodefault): Rename to ...
463 (build_binary_op): ... this. Remove old version. Adjust for
464 pointer-to-member comparisons under the new ABI.
465 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
466 (build_ptrmemfunc): Adjust for the new ABI.
467 (expand_ptrmemfunc_cst): Likewise.
468 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
469 (pfn_from_ptrmemfunc): Adjust for the new ABI.
470
471 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
472
473 * call.c (build_object_call): Compress consecutive calls to
474 cp_error.
475 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
476 (build_op_delete_call): Adjust message formatting.
477
478 * class.c (check_bases): Compress consecutive calls to
479 cp_pedwarn.
480 (finish_struct_anon): Say 'ISO C++'.
481
482 * decl.c (start_decl): Same here.
483 (grok_reference_init): Likewise.
484 (grokfndecl): Correct message formatting.
485 (grokfndecl): Improve diagnostic.
486 (check_static_variable_definition): Likewise. Say 'ISO C++'
487 (compute_array_index_type): Say 'ISO C++'
488 (create_array_type_for_decl): Compress consecutive calls to
489 cp_error.
490 (grokdeclarator): Say 'ISO C++'
491 (grok_op_properties): Likewise.
492
493 * decl2.c (delete_sanity): Clairify diagnostic.
494 (check_member_template): Same here.
495 (grok_function_init): Use consistent terminology.
496
497 * expr.c (do_case): Say 'ISO C++'
498
499 * friend.c (do_friend): Compress consecutive calls to warning.
500
501 2000-02-20 Mark Mitchell <mark@codesourcery.com>
502
503 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
504 * class.c (build_secondary_vtable): Reorganize. Don't create a
505 new vtable under the new ABI.
506 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
507 computing the size.
508 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
509 the initializing elements.
510 (initialize_vtable): New function.
511 (dfs_finish_vtbls): Use it.
512 (dfs_accumulate_vtbl_inits): New function.
513 (finish_vtbls): Merge primary and secondary vtables under the new
514 ABI.
515 (finish_struct_1): Remove redundant call to layout_vtable_decl.
516 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
517 aren't VAR_DECLs.
518
519 * class.c (build_vtable): New function, split out from ...
520 (get_vtable_decl): ... here, and ...
521 (build_secondary_vtable): ... here.
522
523 * pt.c (tsubst_decl): Fix formatting.
524
525 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
526
527 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
528 (avoid_overlap, build_base_field): Likewise.
529 (build_base_field, build_base_fields, is_empty_class):
530 Test DECL_SIZE with integer_zero.
531 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
532 * cp-tree.h (struct lang_type): New field size_unit.
533 (CLASSTYPE_SIZE_UNIT): New macro.
534 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
535 (cp_finish_decl): Delete -Wlarger-than processing.
536 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
537 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
538 * tree.c (make_binfo): binfo vector is one entry longer.
539 (walk_tree): Walk DECL_SIZE_UNIT.
540
541 2000-02-19 Mark Mitchell <mark@codesourcery.com>
542
543 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
544 comment.
545 (build_vtable_entry): Don't assume all vtable entries are
546 functions.
547 (build_vtbl_initializer): Adjust accordingly.
548 (get_vtable_decl): Fix formatting.
549
550 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
551
552 * semantics.c (deferred_type_access_control): Walk the entire
553 type_lookups list.
554 (save_type_access_control): Rename from
555 initial_deferred_type_access_control. Just remember the value.
556 (decl_type_access_control): New fn.
557 (begin_function_definition): Use deferred_type_access_control, after
558 we've started the function. Set type_lookups to error_mark_node.
559 * parse.y (frob_specs, fn.def1): Adjust.
560 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
561 (parse_end_decl, parse_bitfield0, parse_method): New fns.
562 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
563 (after_type_component_declarator0): Likewise.
564 (after_type_component_declarator): Likewise.
565 (notype_component_declarator): Likewise.
566 * cp-tree.h: Adjust.
567
568 * decl.c (redeclaration_error_message): Allow redeclaration of
569 namespace-scope decls.
570
571 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
572
573 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
574
575 2000-02-17 Mark Mitchell <mark@codesourcery.com>
576
577 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
578 * decl2.c (grokclassfn): Likewise.
579
580 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
581
582 * decl2.c (lang_decode_option): Don't set default message length
583 here.
584 * lex.c (lang_init_options): Set it here.
585
586 2000-02-16 Mark Mitchell <mark@codesourcery.com>
587
588 Make DECL_CONTEXT mean the class in which a member function was
589 declared, even for a virtual function.
590 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
591 (DECL_FRIEND_CONTEXT): New macro.
592 (DECL_REAL_CONTEXT): Remove.
593 (SET_DECL_FRIEND_CONTEXT): Likewise.
594 (DECL_VIRTUAL_CONTEXT): Adjust.
595 (DECL_CLASS_SCOPE_P): Use TYPE_P.
596 (add_friends): Remove.
597 (hack_decl_function_context): Likewise.
598 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
599 CP_DECL_CONTEXT.
600 (build_over_call): Fix indentation. Use DECL_CONTEXT
601 instead of DECL_CLASS_CONTEXT.
602 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
603 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
604 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
605 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
606 (build_base_field): Likewise.
607 (finish_struct_1): Likewise.
608 (build_self_reference): Likewise.
609 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
610 DECL_REAL_CONTEXT.
611 (pushtag): Use decl_function_context, not
612 hack_decl_function_context.
613 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
614 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
615 (pushdecl): Remove bogus code.
616 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
617 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
618 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
619 Use decl_function_context, nothack_decl_function_context.
620 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
621 (grokdeclarator): Likewise. Use decl_function_context, not
622 hack_decl_function_context.
623 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
624 (start_function): Use DECL_FRIEND_CONTEXT, not
625 DECL_CLASS_CONTEXT. Use decl_function_context, not
626 hack_decl_function_context.
627 (finish_function): Use decl_function_context, not
628 hack_decl_function_context.
629 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
630 DECL_CLASS_CONTEXT.
631 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
632 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
633 (grokfield): Likewise.
634 (finish_builtin_type): Likewise.
635 (finish_vtable_vardec): Use decl_function_context, not
636 hack_decl_function_context.
637 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
638 (start_static_initialization_or_destruction): Likewise.
639 (finish_static_initialization_or_destruction): Likewise.
640 (mark_used): Adjust logic for deciding when to synthesize methods.
641 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
642 DECL_REAL_CONTEXT.
643 * error.c (dump_function_decl): Use DECL_CONTEXT, not
644 DECL_CLASS_CONTEXT.
645 * friend.c (is_friend): Likewise.
646 (add_friends): Remove.
647 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
648 * lex.c (begin_definition_of_inclass_inline): Use
649 decl_function_context, not hack_decl_function_context.
650 (process_next_inline): Likewise.
651 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
652 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
653 DECL_CLASSS_CONTEXT.
654 (hack_identifier): Likewise.
655 (synthesize_method): Use decl_function_context, not
656 hack_decl_function_context.
657 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
658 DECL_REAL_CONTEXT.
659 (is_member_template): Use decl_function_context, not
660 hack_decl_function_context. Use DECL_CONTEXT, not
661 DECL_CLASS_CONTEXT.
662 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
663 DECL_CLASS_CONTEXT.
664 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
665 DECL_REAL_CONTEXT.
666 (push_template_decl_real): Likewise.
667 (instantiate_class_template): Don't call add_friends.
668 (tsubst_default_argument): Use DECL_CONTEXT, not
669 DECL_REAL_CONTEXT.
670 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
671 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
672 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
673 DECL_CLASS_CONTEXT.
674 * repo.c (repo_inline_used): Likewise.
675 * search.c (current_scope): Adjust for new _CONTEXT macros.
676 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
677 DECL_REAL_CONTEXT.
678 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
679 (lookup_fnfields_here):Likewise.
680 (check_final_overrider): Likewise.
681 (init_vbase_pointers): Likewise.
682 (virtual_context): Likewise.
683 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
684 (expand_body): Use decl_function_context, not
685 hack_decl_function_context.
686 * tree.c (hack_decl_function_context): Remove.
687 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
688 DECL_CLASS_CONTEXT.
689 * typeck2.c (error_not_base_type): Likewise.
690
691 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
692
693 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
694
695 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
696
697 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
698
699 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
700
701 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
702
703 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
704
705 * decl2.c (lang_decode_option): Enable automatic line wrapping.
706
707 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
708
709 * parse.y (frob_specs): Split out...
710 (parse_decl): From here.
711 (fn.def2): Call initial_deferred_type_access_control.
712 (after_type_component_declarator0): Call frob_specs.
713 (notype_component_declarator0): Likewise.
714 * search.c (friend_accessible_p): Nested classes are friends of their
715 enclosing classes.
716
717 2000-02-10 Mark Mitchell <mark@codesourcery.com>
718
719 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
720 used to create an implicit temporary.
721
722 * class.c (dfs_modify_vtables): Tweak calculation of functions to
723 override.
724
725 2000-02-08 Nathan Sidwell <nathan@acm.org>
726
727 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
728 strip array element qualifiers too.
729
730 2000-02-07 Mark Mitchell <mark@codesourcery.com>
731
732 * decl.c (store_parm_decls): Don't build cleanups for parameters
733 while processing_template_decl.
734
735 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
736
737 * cp-tree.h (struct saved_scope): Add incomplete field.
738 (namespace_scope_incomplete): New macro.
739 * decl.c (pushdecl): Use it.
740 (hack_incomplete_structures): Use it. See through artificial
741 binding levels.
742 (mark_saved_scope): Mark it.
743
744 Implement access control for nested types.
745 * search.c (type_access_control): New fn.
746 (accessible_p): Now we do perform access control for types.
747 * semantics.c (deferred_type_access_control): New fn.
748 (initial_deferred_type_access_control): New fn.
749 (begin_function_definition): Call it. Add lookups parm.
750 * decl.c (struct binding_level): Add this_class field.
751 (pushlevel_class): Set it.
752 (mark_binding_level): Mark it.
753 (lookup_name_real): Use it. Call type_access_control.
754 (mark_saved_scope): Mark lookups field.
755 * cp-tree.h (flagged_type_tree): Add lookups field.
756 (struct saved_scope): Add lookups field.
757 (type_lookups): New macro.
758 * parse.y (declmods): Now <ftype>.
759 (parse_decl): Add lookups parm. Call
760 initial_deferred_type_access_control.
761 (lang_extdef): Clear type_lookups.
762 (typed_declspecs, declmods, typespec): Set lookups field.
763 (initdcl): Call deferred_type_access_control.
764 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
765 component_decl_1, named_parm): Adjust.
766 * friend.c (is_friend): Nested classes are friends of their
767 enclosing classes.
768
769 * class.c (currently_open_derived_class): New fn.
770 * method.c (hack_identifier): Use it.
771
772 * lex.c (do_identifier): Remove obsolete code.
773
774 * parse.y (typed_typespecs): Propagate new_type_flag properly.
775
776 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
777
778 * tinfo.h: Remove apostrophes from C++ comment (xgettext
779 thinks this file is plain C).
780
781 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
782
783 * Makefile.in (call.o): Depend on $(EXPR_H).
784
785 * call.c: Include "expr.h".
786
787 * class.c (dump_class_hierarchy): Add prototype.
788
789 * search.c (dfs_get_pure_virtuals): Likewise.
790
791 2000-02-1 Ulrich Drepper <drepper@redhat.com>
792
793 * parse.y (simple_stmt): Allow :: token in asm parameter list.
794 * parse.c: Rebuilt.
795
796 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
797
798 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
799 Store it in DECL_FCONTEXT.
800 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
801
802 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
803
804 * tinfo.h (old abi): #include "tconfig.h".
805 * tinfo.cc (convert_to_base): Move into old abi section.
806
807 2000-01-31 Mark Mitchell <mark@codesourcery.com>
808
809 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
810 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
811 (BINFO_PRIMARY_BINFO): New macro.
812 (BF_DELTA): Rename to ...
813 (BV_DELTA): ... this.
814 (BF_VCALL_INDEX): Rename to ...
815 (BV_VCALL_INDEX): ... this.
816 (BF_FN): Rename to ...
817 (BV_FN): ... this.
818 * class.c (build_vbase_path): Adjust for changes to reverse_path.
819 (set_rtti_entry): Rename BF_ macros to BV_ variants.
820 (modify_vtable_entry): Simplify.
821 (add_virtual_function): Rename BF_ macros to BV_ variants.
822 (build_vtable_initializer): Likewise.
823 (get_class_offset_1): Remove.
824 (dfs_get_class_offset): Likewise.
825 (get_class_offset): Likewise.
826 (dfs_find_final_overrider): New function.
827 (find_final_overrider): Likewise.
828 (modify_one_vtable): Remove.
829 (dfs_find_base): New function.
830 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
831 find_final_overrider.
832 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
833 virtuals.
834 (dfs_fixup_vtable_deltas): Remove.
835 (override_one_vtable): Remove.
836 (merge_overrides): Likewise.
837 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
838 unreal chilren of virtual bases.
839 (finish_struct_1): Don't use merge_overrides. Don't use
840 dfs_fixup_vtable_deltas.
841 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
842 BINFOs.
843
844 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
845 Jason Merrill <jason@yorick.cygnus.com>
846
847 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
848
849 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
850
851 * exception.cc (__throw_bad_typeid): Add missing std::.
852
853 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
854
855 * cp-tree.h (make_thunk): PROTO -> PARAMS.
856
857 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
858
859 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
860
861 Runtime support for new-abi rtti.
862 * inc/typeinfo (type_info::operator!=): Define in class.
863 (type_info::before, type_info::name, type_info::operator==,
864 type_info::operator!=): Define new ABI implementations.
865 (type_info::is_pointer_p, type_info::is_function_p): Declare
866 new virtual functions.
867 (type_info::do_catch, type_info::do_upcast): Likewise.
868
869 * tinfo.h (__base_class_info): Define new class.
870 (__class_type_info): Likewise.
871 (__si_class_type_info): Likewise.
872 (__vmi_class_type_info): Likewise.
873 (__dynamic_cast): Prototype.
874
875 * tinfo.cc: Conditionalize old and new rtti mechanisms.
876 (type_info::is_pointer_p): Define new function.
877 (type_info::is_function_p): Likewise.
878 (type_info::do_catch): Likewise.
879 (type_info::do_upcast): Likewise.
880 (vtable_prefix): New structure for vtable access.
881 (adjust_pointer): Define new template function.
882 (contained_p, public_p, virtual_p, contained_public_p,
883 contained_nonpublic_p, contained_nonvirtual_p): Define new
884 functions.
885 (nonvirtual_base_type): New local variable.
886 (__class_type_info::~__class_type_info): Define.
887 (__si_class_type_info::~__si_class_type_info): Likewise.
888 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
889 (__class_type_info::do_catch): Define new function.
890 (__class_type_info::do_upcast): Likewise.
891 (__class_type_info::find_public_src): Likewise.
892 (__class_type_info::do_find_public_src): Likewise.
893 (__si_class_type_info::do_find_public_src): Likewise.
894 (__vmi_class_type_info::do_find_public_src): Likewise.
895 (__class_type_info::do_dyncast): Likewise.
896 (__si_class_type_info::do_dyncast): Likewise.
897 (__vmi_class_type_info::do_dyncast): Likewise.
898 (__class_type_info::do_upcast): Likewise.
899 (__si_class_type_info::do_upcast): Likewise.
900 (__vmi_class_type_info::do_upcast): Likewise.
901 (__dynamic_cast): Likewise.
902
903 * tinfo2.cc (__fundamental_type_info): Define new class.
904 (__pointer_type_info): Likewise.
905 (__reference_type_info): Likewise.
906 (__array_type_info): Likewise.
907 (__function_type_info): Likewise.
908 (__enum_type_info): Likewise.
909 (__ptr_to_member_type_info): Likewise.
910 (__fundamental_type_info::~__fundamental_type_info): Define.
911 (__pointer_type_info::~__pointer_type_info): Likewise.
912 (__reference_type_info::~__reference_type_info): Likewise.
913 (__array_type_info::~__array_type_info): Likewise.
914 (__function_type_info::~__function_type_info): Likewise.
915 (__enum_type_info::~__enum_type_info): Likewise.
916 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
917 (__pointer_type_info::do_catch): Define new function.
918 (__ptr_to_member_type_info::do_catch): Define new function.
919
920 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
921 (__is_pointer): Likewise.
922
923 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
924
925 2000-01-30 Mark Mitchell <mark@codesourcery.com>
926
927 * cp/class.c (build_vtable): Rename to build_primary_vtable.
928 (prepare_fresh_vtable): Rename to build_secondary_vtable.
929 (make_new_vtable): New function.
930 (modify_vtable_entry): Handle generation of new vtables correctly.
931 (modify_one_vtable): Remove unused parameter.
932 (dfs_fixup_vtable_deltas): Likewise.
933 (override_one_vtable): Use build_secondary_vtable.
934 (finish_struct_1): Use build_primary_vtable and
935 build_secondary_vtable.
936
937 2000-01-28 Ulrich Drepper <drepper@redhat.com>
938
939 * cp/decl.c: Adjust variable names, comments, help strings.
940
941 2000-01-29 Nathan Sidwell <nathan@acm.org>
942
943 * new2.cc (operator delete[]): Use operator delete, don't assume
944 implementation.
945
946 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
947
948 * class.c (build_vtbl_initializer): Add argument to
949 build_vtable_entry call.
950
951 2000-01-27 Mark Mitchell <mark@codesourcery.com>
952
953 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
954 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
955 (BF_DELTA): New macro.
956 (BF_VCALL_INDEX): Likewise.
957 (BF_FN): Likewise.
958 (THUNK_VCALL_OFFSET): Likewise.
959 (make_thunk): Change prototype.
960 * class.c (build_vtable_entry): Integrate
961 build_vtable_entry_for_fn. Handle vcall indices.
962 (build_vtable_entry_for_fn): Remove.
963 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
964 BF_VCALL_INDEX, BF_FN.
965 (modify_vtable_entry): Integrate common code from
966 modify_one_vtable and dfs_fixup_vtable_deltas.
967 (add_virtual_function): Set BF_VCALL_INDEX.
968 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
969 and BF_FN.
970 (modify_one_vtable): Simplify.
971 (dfs_fixup_vtable_deltas): Likewise.
972 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
973 * method.c (make_thunk): Handle vcall indices.
974
975 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
976
977 Compiler side new abi rtti (not enabled).
978 * cp-tree.h (new_abi_rtti_p): New macro.
979 (emit_support_tinfos): Prototype new function.
980 (tinfo_decl_p): Likewise.
981 (emit_tinfo_decl): Likwise.
982 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
983 macros.
984 (doing_runtime): New local static.
985 (init_rtti_processing): Add new-abi initializer.
986 (get_tinfo_decl): Add new-abi logic.
987 (tinfo_from_decl): Likewise.
988 (build_dynamic_cast_1): Likewise.
989 (qualifier_flags): New static function.
990 (tinfo_base_init): Likewise.
991 (generic_initializer): Likewise.
992 (ptr_ref_initializer): Likewise.
993 (ptmd_initializer): Likewise.
994 (class_hint_flags): Likewise.
995 (class_initializer): Likewise.
996 (synthesize_tinfo_var): Likewise.
997 (create_real_tinfo_var): Likewise.
998 (create_pseudo_type_info): Likewise.
999 (get_vmi_pseudo_type_info): Likewise.
1000 (create_tinfo_types): Likewise.
1001 (emit_support_tinfos): New global function.
1002 (tinfo_decl_p): New global predicate.
1003 (emit_tinfo_decl): New global function.
1004 * class.c (set_rtti_entry): Generalize for old and new rtti.
1005 (build_vtbl_initializer): Likewise.
1006 * decl2.c (finish_file): Likewise.
1007
1008 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
1009
1010 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
1011 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
1012
1013 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
1014
1015 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
1016 for scopes.
1017
1018 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
1019
1020 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
1021
1022 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
1023
1024 * optimize.c (calls_setjmp_r): Supply new argument
1025 to special_function_p.
1026
1027 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1028
1029 * call.c: PROTO -> PARAMS.
1030 * class.c: Likewise.
1031 * cp-tree.h: Likewise.
1032 * cvt.c: Likewise.
1033 * decl.c: Likewise.
1034 * decl.h: Likewise.
1035 * decl2.c: Likewise.
1036 * dump.c: Likewise.
1037 * errfn.c: Likewise.
1038 * error.c: Likewise.
1039 * except.c: Likewise.
1040 * expr.c: Likewise.
1041 * init.c: Likewise.
1042 * input.c: Likewise.
1043 * lex.c: Likewise.
1044 * lex.h: Likewise.
1045 * method.c: Likewise.
1046 * optimize.c: Likewise.
1047 * parse.y: Likewise.
1048 * pt.c: Likewise.
1049 * repo.c: Likewise.
1050 * rtti.c: Likewise.
1051 * search.c: Likewise.
1052 * semantics.c: Likewise.
1053 * spew.c: Likewise.
1054 * tree.c: Likewise.
1055 * typeck.c: Likewise.
1056 * typeck2.c: Likewise.
1057 * xref.c: Likewise.
1058
1059 2000-01-25 Richard Henderson <rth@cygnus.com>
1060
1061 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
1062
1063 2000-01-25 Mark Mitchell <mark@codesourcery.com>
1064
1065 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
1066 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
1067 (struct vcall_offset_data_s): New type.
1068 (dfs_vcall_offset_queue_p): New function.
1069 (dfs_build_vcall_offset_vtbl_entries): Likewise.
1070 (build_vcall_offset_vtbl_entries): Likewise.
1071 (layout_vtable_decl): Likewise.
1072 (num_vfun_entries): Likewise.
1073 (num_extra_vtbl_entries): Add the entries for vcall offsets.
1074 (build_vtbl_initializer): Likewise.
1075 (dfs_finish_vtabls): Use layout_vtable_decl.
1076 (modify_one_vtables): Always duplicate vtables under the new ABI.
1077 (finish_struct_1): Use layout_vtable_decl.
1078
1079 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1080
1081 * decl.c (member_function_or_else): Change third arg from a format
1082 specifier to an `enum overload_flags'. Callers changed.
1083
1084 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
1085
1086 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
1087 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
1088 build_const_cast, get_delta_difference, check_return_expr): Avoid
1089 ANSI string concatenation usage.
1090
1091 2000-01-24 Mark Mitchell <mark@codesourcery.com>
1092
1093 * class.c (layout_class_type): Put the fields required to make a
1094 class non-empty at the end, not the beginning, of the TYPE_FIELDs
1095 list.
1096
1097 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
1098
1099 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1100 template.
1101
1102 * decl2.c (mark_used): Do instantiate inlines that have been
1103 explicitly instantiated.
1104
1105 2000-01-24 Richard Henderson <rth@cygnus.com>
1106
1107 * call.c (build_over_call): Use expand_tree_builtin.
1108 * typeck.c (build_function_call_real): Likewise.
1109 (build_binary_op_nodefault): Handle unordered compares.
1110
1111 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1112
1113 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1114 cp_tree_index values.
1115 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1116 New global node #defines for them.
1117 * rtti.c (call_void_fn): Replace with ...
1118 (build_runtime_decl): ... new static function.
1119 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1120 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1121 (build_dynamic_cast_1): Always produce correctly typed result.
1122 Explicitly produce type_info addresses. Use dynamic_cast_node.
1123 * exception.cc (__throw_bad_cast): Return `void *'.
1124 (__throw_bad_typeid): Return `const type_info &'.
1125
1126 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1127
1128 * cp-tree.h (get_vtable_decl): Prototype new function.
1129 * class.c (get_vtable_decl): New function. Broken out from ...
1130 (build_vtable): ... here. Use it.
1131 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1132 by get_vtable_decl.
1133
1134 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
1135
1136 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1137 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1138 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1139 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1140 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1141 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1142 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1143 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1144 (CPTI_TINFO_VAR_ID): New enumeration.
1145 (__tp_desc_type_node, __access_mode_type_node,
1146 __bltn_desc_type_node, __user_desc_type_node,
1147 __class_desc_type_node, __ptr_desc_type_node,
1148 __attr_desc_type_node, __func_desc_type_node,
1149 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1150 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1151 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1152 enum_desc_type_node, class_desc_type_node,
1153 si_class_desc_type_node, vmi_class_desc_type_node,
1154 ptmd_desc_type_node, base_desc_type_node): New #defines.
1155 (tinfo_fn_id, tinfo_fn_type): Rename to ...
1156 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1157 (tinfo_var_id): New enumeration.
1158 (DECL_TINFO_FN_P): Augment comment.
1159 * decl.c (cp_global_trees): Adjust documentation.
1160 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1161 tinfo_decl_type and tinfo_var_id.
1162 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1163 (build_typeid): Remove unused variable.
1164 (get_tinfo_var): Use tinfo_var_id.
1165 (tinfo_name): New static function.
1166 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1167 (tinfo_from_decl): Likewise.
1168 (get_base_offset): New static function, broken out of
1169 expand_class_desc.
1170 (expand_si_desc): Use tinfo_name.
1171 (expand_class_desc): Likewise. Lose local static variable.
1172 Use base_desc_type_node. Use get_base_offset.
1173 (expand_ptr_desc): Use tinfo_name.
1174 (expand_attr_desc): Likewise.
1175 (expand_generic_desc): Likewise.
1176
1177 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1178 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1179
1180 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1181
1182 * cp-tree.h (__eprintf): Remove declaration.
1183 * tree.c (__eprintf): Remove definition.
1184
1185 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
1186 Mark Mitchell <mark@codesourcery.com>
1187
1188 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1189 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1190
1191 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
1192
1193 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1194
1195 2000-01-23 Mark Mitchell <mark@codesourcery.com>
1196
1197 * cp-tree.h (register_dtor_fn): New function.
1198 * decl.c (destroy_local_static): Rename to ...
1199 (register_dtor_fn): ... this. Give it external linkage.
1200 (expand_static_init): Use it.
1201 * decl2.c (do_static_initialization): Likewise, if using
1202 __cxa_atexit.
1203 (do_static_destruction): Check that __cxa_atexit is not in use.
1204 (finish_file): Don't call do_static_destruction if using
1205 __cxa_atexit.
1206
1207 * typeck.c (convert_arguments): Restore two-message error
1208 reporting.
1209
1210 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
1211
1212 Remap dynamic cast hint values to be consistent across ABIs.
1213 * search.c (dynamic_cast_base_recurse): Remap generated value.
1214 (get_dynamic_cast_base_type): Adjust documentation.
1215 * tinfo.h (__user_type_info::dyncast): Likewise.
1216 (__user_type_info::find_public_subobj): Remap BOFF meaning.
1217 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1218 (__class_type_info::do_dyncast): Likewise.
1219 (__class_type_info::do_find_public_subobj): Likewise.
1220 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
1221
1222 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom>
1223
1224 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1225
1226 * typeck2.c (incomplete_type_error): Restore previous
1227 cp_error and cp_error_at call sequence.
1228
1229 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
1230
1231 * class.c (dump_class_hierarchy): Make format agree with argument;
1232 cast pointer to unsigned long and print with %lx.
1233
1234 2000-01-19 Gabriel Dos Reis <gdr@codesourcery>
1235
1236 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1237
1238 * typeck.c (composite_pointer_type, common_type,
1239 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1240 build_function_call_real, convert_arguments,
1241 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1242 build_unary_op, mark_addressable, build_compound_expr,
1243 build_static_cast, build_reinterpret_cast, build_const_cast,
1244 build_c_cast, build_modify_expr, get_delta_difference,
1245 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
1246 'ISO C++'. Fusion consecutive calls to diagnotic message routines
1247 into a single one.
1248 * typeck2.c (readonly_error, abstract_virtuals_error,
1249 process_init_constructor, check_for_new_type): Likewise.
1250
1251 2000-01-19 Mark Mitchell <mark@codesourcery.com>
1252
1253 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1254 VAR_DECLs.
1255
1256 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
1257
1258 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1259 (build_x_typeid): Likewise.
1260 (get_tinfo_fn): Likewise.
1261 (get_tinfo_fn_unused): Rename to ...
1262 (get_tinfo_decl): ... here.
1263 * rtti.c (build_headof): Replace logic error with assertion.
1264 (get_tinfo_fn_dynamic): Rename to ...
1265 (get_tinfo_decl_dynamic): ... here. Make static. Use
1266 complete_type_or_else.
1267 (build_x_typeid): Move into ...
1268 (build_typeid): ... here. Adjust call to
1269 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1270 throw_bad_typeid expression.
1271 (get_tinfo_fn_unused): Rename to ...
1272 (get_tinfo_decl): ... here. Adjust comment.
1273 (get_tinfo_fn): Delete.
1274 (tinfo_from_decl): New static function.
1275 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1276 (get_typeid): Use complete_type_or_else.
1277 (build_dynamic_cast_1): Adjust calls to
1278 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1279 * parse.y (primary): Adjust call to build_typeid.
1280 * except.c (build_eh_type_type_ref): Adjust call to
1281 get_tinfo_decl. Mark as used.
1282 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1283 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1284 * parse.c: Regenerated.
1285
1286 2000-01-17 Mark Mitchell <mark@codesourcery.com>
1287
1288 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
1289 calling convention.
1290 (resolves_to_fixed_type_p): Document calling convention.
1291 * rtti.c (build_x_typeid): Initialize NONNULL.
1292
1293 * cp-tree.h (build_shared_int_cst): New function.
1294 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1295 * class.c (modify_vtable_entry): Likewise.
1296 (add_virtual_function): Split out code to generated shared
1297 INTEGER_CSTs to build_share_int_cst.
1298 (modify_all_vtables): Handle all the overridden functions here.
1299 Add overridden functions from non-primary virtual bases to the
1300 primary vtable.
1301 (finish_struct_1): Adjust call to modify_all_vtables. Add
1302 overridden functions from non-primary bases to the vtable.
1303 * tree.c (build_shared_int_cst): New function.
1304
1305 * cp-tree.h (scratchalloc): Remove.
1306 (build_scratch_list): Likewise.
1307 * call.c (convert_class_to_reference): Replace build_scratch_list
1308 and build_expr_list with build_tree_list.
1309 (add_candidate): Replace scratchalloc with expralloc. Note memory
1310 leak.
1311 (build_user_type_conversion_1): Replace build_scratch_list
1312 and build_expr_list with build_tree_list.
1313 (build_new_op): Likewise.
1314 (build_op_delete_call): Likewise.
1315 (convert_like): Likewise.
1316 * cvt.c (ocp_convert): Likewise.
1317 * decl.c (start_decl): Likewise.
1318 (start_function): Likewise.
1319 (finish_destructor_body): Likewise.
1320 (maybe_build_cleanup_1): Likewise.
1321 * decl2.c (reparse_decl_as_expr): Likewise.
1322 * init.c (perform_member_init): Likewise.
1323 (expand_cleanup_for_base): Likewise.
1324 (build_builtin_delete_call): Likewise.
1325 (build_new_1): Likewise.
1326 (build_delete): Likewise.
1327 * method.c (do_build_assign_ref): Likewise.
1328 * parse.y (already_scoped_stmt): Likewise.
1329 (nontrivial_exprlist): Likewise.
1330 (net_initializer): Likewise.
1331 (initlist): Likewise.
1332 * parse.c: Regenerated.
1333 * rtti.c (build_x_typeid): Likewise.
1334 (build_dynamic_cast_1): Likewise.
1335 * typeck.c (build_x_compound_expr): Likewise.
1336 (build_static_cast): Likewise.
1337 (build_modify_expr): Likewise.
1338
1339 * cp-tree.h (DECL_VINDEX): Add documentation.
1340 * class.c (build_vtable_entry): Likewise.
1341 (start_vtable): Add comment.
1342 (add_virtual_function): Replace pending_hard_virtuals with
1343 overridden_virtuals and pending_virtuals with new_virtuals.
1344 Replace redundant assignments with assertions.
1345 (check_for_override): Add comment.
1346 (check_bases_and_members): Replace pending_hard_virtuals with
1347 overridden_virtuals and pending_virtuals with new_virtuals.
1348 (create_vtbl_ptr): Likewise.
1349 (layout_class_type): Likewise.
1350 (finish_struct_1): Likewise. Add comments.
1351
1352 2000-01-16 Mark Mitchell <mark@codesourcery.com>
1353
1354 * class.c (finish_struct_1): Replace redundant code with
1355 assertions.
1356
1357 * cp-tree.h (flag_new_abi): Move.
1358 (flag_use_cxa_atexit): Likewise.
1359 (flag_honor_std): Likewise.
1360 (flag_rtti): Likewise.
1361 (vbase_offsets_in_vtable_p): Define.
1362 (vptrs_present_everywhere_p): Likewise.
1363 (TYPE_CONTAINS_VPTR_P): Likewise.
1364 (dfs_walk_real): Declare.
1365 * class.c (build_vbase_pointer_fields): Check
1366 vbase_offsets_in_vtable_p.
1367 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1368 BINFO_VPTR_FIELD.
1369 (build_vbase_offset_vtbl_entries): Simplify.
1370 (build_vbase_offset_vtbl_entries): Adjust.
1371 (build_vbase_pointer): Add ability to look up vbase offsets in
1372 vtable.
1373 (start_vtable): New function.
1374 (add_virtual_function): Use it.
1375 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1376 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1377 (build_vtbl_initializer): Take the type of the complete object as
1378 input. Use it to correctly calculate vbase offsets.
1379 (dfs_finish_vtbls): Pass the complete type to
1380 build_vtbl_initializer.
1381 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1382 (create_vtable_ptr): Create a vtable even if there are no
1383 new virtual functions, under the new ABI.
1384 (finish_struct_1): Likewise.
1385 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1386 * decl.c (exapnd_static_init): Remove call to
1387 preserve_initializer.
1388 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1389 vtables.
1390 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1391 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1392 (construct_virtual_bases): Don't initialize virtual base pointers
1393 under the new ABI.
1394 (build_aggr_init): Clean up comment.
1395 (expand_aggr_init_1): Likewise.
1396 * rtti.c (expand_class_desc): Store the virtual function table
1397 index where the vbase offset lives in the offset field.
1398 * search.c (dfs_walk_real): Make it global.
1399 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1400 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1401
1402 * tinfo.h (USItype): Make it signed under the new ABI.
1403 * tinfo.cc (convert_to_base): New function. Encapsulate base
1404 conversion logic here.
1405 (__class_type_info::do_upcast): Use it.
1406 (__class_type_info::do_dyncast): Likewise.
1407 (__class_type_info::do_find_public_subobj): Likewise.
1408
1409 * init.c (construct_virtual_bases): Don't look up the addresses of
1410 virtual bases at run-time.
1411
1412 * class.c (build_vbase_pointer): Relocate.
1413 (build_vbase_pointer_fields): Likewise.
1414 (dfs_build_vbase_offset_vtbl_entries): Likewise.
1415 (build_vbase_offset_vtbl_entries): Likewise.
1416
1417 * decl.c (init_decl_processing): Complain if -fnew-abi
1418 -fno-vtable-thunks is used.
1419
1420 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1421 flag_new_abi.
1422
1423 2000-01-15 Mark Mitchell <mark@codesourcery.com>
1424
1425 * cp-tree.h (num_extra_vtbl_entries): New function.
1426 (size_extra_vtbl_entries): Likewise.
1427 (dfs_vtable_path_unmark): Likewise.
1428 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1429 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1430 * class.c (num_extra_vtbl_entries): New function.
1431 (size_extra_vtbl_entries): Likewise.
1432 (dfs_build_vbase_offset_vtbl_entries): New function.
1433 (build_vbase_offset_vtbl_entries): Likewise.
1434 (build_vtbl_initializer): Use it.
1435 (finish_struct_1): Adjust vtable sizes (using
1436 num_extra_vtbl_entries).
1437 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1438 THUNK_DECL is non-NULL before expanding it.
1439 * init.c (expand_virtual_init): Adjust the vtable pointer by
1440 size_extra_vtbl_entries before storing it.
1441 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1442 Handle TREE_LIST parameters here, not in the dfs_* functions.
1443 (dfs_unmarked_real_bases_queue_p): Adjust.
1444 (dfs_marked_real_bases_queue_p): Likewise.
1445 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1446 (dfs_vtable_path_marked_real_bases_queue_p): New function.
1447 (dfs_vtable_path_unmark): Likewise.
1448
1449 2000-01-14 Mark Mitchell <mark@codesourcery.com>
1450
1451 * optimize.c (copy_body_r): Clear the operand three of a
1452 TARGET_EXPR when copying it.
1453
1454 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1455
1456 * method.c (build_decl_overload_real): Check whether we are in ::
1457 before returning __builtin_new/delete.
1458
1459 2000-01-13 Mark Mitchell <mark@codesourcery.com>
1460
1461 * pt.c (tsubst_friend_function): Improve comment.
1462 (instantiate_decl): Avoid crashing when a "nested" function is
1463 instantiated from the top level.
1464
1465 * dump.c (dqeueue_and_dump): Dump
1466 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1467
1468 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1469
1470 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1471
1472 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
1473
1474 * g++spec.c (lang_specific_driver): Add -fnew-abi if
1475 ENABLE_NEW_GXX_ABI defined.
1476 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1477 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1478 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1479
1480 2000-01-12 Mark Mitchell <mark@codesourcery.com>
1481
1482 * decl.c (start_cleanup_fn): Call pushdecl.
1483
1484 * call.c (convert_class_to_reference): Fix typos.
1485 (build_conditional_expr): Handle errors gracefully.
1486 * class.c (push_nested_class): Likewise.
1487 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1488 (DECL_THIS_EXTERN): Use it.
1489 (DECL_THIS_STATIC): Likewise.
1490 * cvt.c (convert_to_void): Handle errors gracefully.
1491 (build_expr_type_conversion): Likewise.
1492 * decl.c (maybe_push_decl): Likewise.
1493 (start_decl_1): Likewise.
1494 (require_complete_types_for_parms): Likewise.
1495 * parse.y (structsp): Likewise.
1496 (base_class): Likewise.
1497 * parse.c: Regenerated.
1498 * pt.c (finish_member_template_decl): Likewise.
1499 * typeck.c (decay_conversion): Likewise.
1500
1501 * cp-tree.h (dfs_skip_vbases): New function.
1502 (find_vbase_instance): Likewise.
1503 * class.c (determine_primary_base): Allow a nearly empty base to
1504 serve as a primary base class under the new ABI.
1505 (get_class_offset_1): Rename to ...
1506 (dfs_get_class_offset): ... this. Simplify. Don't issue error
1507 messages here.
1508 (get_class_offset): Use it. Issue error messages here.
1509 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1510 find the right copies of virtual bases.
1511 (fixup_vtable_deltas1): Rename to ...
1512 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
1513 bases as primary bases.
1514 (fixup_vtable_deltas): Remove.
1515 (override_one_vtable): Handle virtual bases as primary bases.
1516 (merge_overrides): Likewise.
1517 (finish_struct_1): Likewise.
1518 (dump_class_hierarchy): Dump primary-ness of bases as well.
1519 * search.c (mark_primary_bases): Use a pre-order traversal to
1520 handle primary virtual bases.
1521 (dfs_skip_vbases): New fiunction.
1522 (expand_upcast_fixups): Adjust to handle primary virtual bases.
1523 (fixup_virtual_upcast_offsets): Likewise.
1524 (fixup_all_virtual_upcast_offsets): Likewise.
1525 (dfs_find_vbase_instances): New function.
1526 (find_vbase_instance): Likewise.
1527
1528 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
1529
1530 * lex.c (DIR_SEPARATOR): Delete macro.
1531
1532 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
1533
1534 * decl2.c (lang_decode_option): Handle automatic line wrapping
1535 option.
1536
1537 2000-01-11 Mark Mitchell <mark@codesourcery.com>
1538
1539 * friend.c (do_friend): Don't resolve scopes when processing
1540 template declarations, even if the qualifying scope doesn't
1541 involve template parameters.
1542
1543 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
1544
1545 * class.c (dfs_modify_vtables_queue_p): Remove.
1546 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1547 and dfs_marked_real_bases_queue_p instead of
1548 dfs_modify_vtables_queue_p.
1549
1550 * class.c (build_vbase_path): Simplify.
1551 (dfs_propagate_binfo_offsets): New function.
1552 (propagate_binfo_offsets): Use it.
1553 (remove_base_field): Simplify.
1554 (dfs_set_offset_for_vbases): Remove.
1555 (dfs_set_offset_for_shared_vbases): New function.
1556 (dfs_set_offset_for_unshared_vbases): Likewise.
1557 (layout_virtual_bases): Use them.
1558 (layout_basetypes): Don't call propagate_binfo_offsets.
1559 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1560 for the vbases.
1561
1562 * class.c (build_base_field): New function, split out from ...
1563 (build_base_fields): ... here. Use it. Allocate primary bases
1564 first, under the new ABI.
1565 (get_vtable_entry): Remove.
1566 (remove_base_field): New function, split out from ...
1567 (remove_base_fields): ... here. Adjust since primary bases come
1568 first under the new ABI.
1569
1570 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1571 (initialize_vtbl_ptrs): New function.
1572 (expand_indirect_vtbls_init): Change prototype.
1573 (convert_pointer_to_vbase): Declare.
1574 * init.c (expand_direct_vtbls_init): Remove.
1575 (dfs_initialize_vtbl_ptrs): New function.
1576 (initialize_vtbl_ptrs): Likewise.
1577 (emit_base_init): Use initialize_vtbl_ptrs.
1578 * search.c (convert_pointer_to_vbase): Make it global.
1579 (expand_indirect_vtbls_init): Remove vtable initialization code.
1580 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1581
1582 * class.c (dfs_finish_vtbls): New function.
1583 (finish_vtbls): Use it.
1584 (dump_class_hierarchy): New function.
1585
1586 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1587 (BINFO_VBASE_PRIMARY_P): New macro.
1588 (BINFO_VIRTUALS): Add to documentation.
1589 (SET_BINFO_PRIMARY_MARKED_P): Remove.
1590 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1591 (dfs_mark_primary_bases_queue_p): Likewise.
1592 (dfs_unmarked_real_bases_queue_p): New function.
1593 (dfs_marked_real_bases_queue_p): Likewise.
1594 * search.c (dfs_mark_primary_bases): Adjust.
1595 (mark_primary_bases): Likewise.
1596 (get_shared_vbase_if_not_primary): New function.
1597 (dfs_unmarked_real_bases_queue_p): Likewise.
1598 (dfs_marked_real_bases_queue_p): Likewise.
1599 (dfs_get_pure_virtuals): Simplify.
1600 (get_pure_virtuals): Likewise.
1601
1602 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1603
1604 * lex.c: Include tm_p.h.
1605
1606 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
1607
1608 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1609
1610 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
1611
1612 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1613 * pt.c (instantiate_decl): Defer comdat templates that might not be
1614 needed.
1615
1616 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1617 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1618 (finish_file): Likewise.
1619
1620 * decl2.c (import_export_class): Undo 12/14 change.
1621
1622 * error.c (dump_decl): operator new, not operatornew.
1623
1624 * class.c (field_decl_cmp): A nontype is "greater" than a type.
1625 * search.c (lookup_field_1): Look for the last field with the
1626 desired name.
1627
1628 2000-01-05 Nathan Sidwell <nathan@acm.org>
1629
1630 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1631 FUNCTION_DECL.
1632
1633 2000-01-05 Nathan Sidwell <nathan@acm.org>
1634
1635 * typeck.c (build_static_cast): Don't strip target qualifiers
1636 when casting from a class.
1637
1638 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1639
1640 * class.c (warn_hidden): Initialize variable `fndecl'.
1641
1642 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
1643
1644 * decl.c (flag_isoc9x): New variable to be able to use code in
1645 c-common.c. For now always zero.
1646
1647 2000-01-03 Mark Mitchell <mark@codesourcery.com>
1648
1649 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1650 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1651 or unshare_base_binfos for virtual bases here.
1652 * search.c (dfs_get_vbase_types): Do it here.
1653 (get_vbase_types): Adjust.
1654
1655 2000-01-02 Mark Mitchell <mark@codesourcery.com>
1656
1657 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1658 (BINFO_PRIMARY_MARKED_P): Use flag 5.
1659 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1660 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1661 (unmark_primary_bases): Remove declaration.
1662 (unmarkedp): Declare.
1663 (dfs_vbase_unmark): Likewise.
1664 * class.c (determine_primary_base): Return immediately if there
1665 are no base classes. Call mark_primary_bases here.
1666 (modify_all_direct_vtables): Remove.
1667 (modify_all_indirect_vtables): Remove.
1668 (dfs_modify_vtables_queue_p): New function.
1669 (dfs_modify_vtables): New function.
1670 (modify_all_vtables): Use them.
1671 (build_base_fields): Build FIELD_DECLs for primary virtual base
1672 classes.
1673 (create_vtable_ptr): Don't call determine_primary_base here.
1674 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1675 (dfs_set_offset_for_vbases): ... this.
1676 (layout_virtual_bases): Use it.
1677 (layout_class_type): Call determine_primary_base here.
1678 * search.c (unmarkedp): Make it global.
1679 (shared_marked_p): Simplify.
1680 (shared_unmarked_p): Likewise.
1681 (dfs_primary_bases_queue_p): Remove.
1682 (dfs_unmark_primary_bases): Likewise.
1683 (unmark_primary_bases): Likewise.
1684 (mark_primary_bases): Simplify.
1685 (get_pure_virtuals): Don't call mark_primary_bases here.
1686 (dfs_vbase_unmark): New function.
1687 (get_vbase_types): Simplify.
1688
1689 * class.c (struct base_info): Remove.
1690 (determine_primary_base): Take has_virtual_p rather than a
1691 base_info as input. Don't calculate max_has_virtual.
1692 (finish_struct_bits): Remove max_has_virtual argument.
1693 (create_vtable_ptr): Remove max_has_virtual_p argument.
1694 (layout_virtual_bases): Remove max argument.
1695 (layout_basetypes): Likewise.
1696 (layout_class_type): Remove max_has_virtual_p argument.
1697 (finish_struct_1): Remove max_has_virtual.
1698
1699 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1700 (layout_basetypes): Remove.
1701 * class.c (propagate_binfo_offsets): Moved here from tree.c.
1702 Update to handle primary virtual bases.
1703 (remove_base_fields): New function, split out from
1704 layout_basetypes.
1705 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1706 (layout_virtual_bases): New function, split out from
1707 layout_basetypes. Update to handle primary virtual bases.
1708 (layout_basetypes): Moved here from tree.c. Use
1709 remove_base_fields and layout_virtual_bases.
1710 * search.c (dfs_mark_primary_bases_queue_p): New function.
1711 (mark_primary_bases): Use it.
1712 * tree.c (CEIL): Remove.
1713 (propagate_binfo_offsets): Remove.
1714 (layout_basetypes): Remove.
1715
1716 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1717
1718 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1719 (BINFO_PRIMARY_MARKED_P): New macro.
1720 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1721 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1722 (mark_primary_bases): New function.
1723 (unmark_primary_bases): Likewise.
1724 * search.c (get_abstract_virtuals_1): Remove.
1725 (dfs_mark_primary_bases): New function.
1726 (mark_primary_bases): Likewise.
1727 (dfs_unmark_primary_bases): Likewise.
1728 (unmark_primary_bases): Likewise.
1729 (dfs_get_pure_virtuals): Likewise.
1730
1731 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1732
1733 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1734 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1735 (modify_one_vtable): Adjust.
1736 (fixup_vtable_deltas1): Likewise.
1737 (override_one_vtable): Likewise.
1738 * search.c (get_abstract_virtuals_1): Likewise.
1739 (get_pure_virtuals): Likewise.
1740 (expand_upcast_fixups): Likewise.
1741 * tree.c (debug_binfo): Likewise.
1742
1743 * class.c (build_vtable): Don't return a value. Don't rebuild
1744 vtables for bases that have already been handled.
1745 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1746 already been handled.
1747 (modify_one_vtable): Adjust accordingly.
1748 (fixup_vtable_deltas1): Likewise.
1749 (finish_struct_1): Likewise.
1750
1751 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1752
1753 * call.c (build_new_method_call): Also check destructors.
1754
1755 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1756
1757 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1758 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1759 (set_primary_base): New function, split out from ...
1760 (finish_base_struct): ... here. Rename to ...
1761 (determine_primary_base): ... this. Simplify.
1762 (create_vtable_ptr): Tweak accordingly.
1763 (finish_struct_1): Simplify.
1764
1765 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1766 (CLASSTYPE_N_BASECLASSES): Likewise.
1767 (BINFO_FOR_VBASE): New macro.
1768 (get_vbase_types): Change prototype.
1769 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1770 (prepare_fresh_vtable): Likewise.
1771 (finish_vtbls): Likewise.
1772 (get_class_offset_1): Likewise.
1773 (modify_all_indirect_vtables): Likewise.
1774 (build_vbase_pointer_fields): Likewise.
1775 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1776 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1777 (expand_member_init): Likewise.
1778 * search.c (get_base_distance): Likewise.
1779 (lookup_field_queue_p): Likewise.
1780 (virtual_context): Likewise.
1781 (get_vbase_types): Don't return a value. Set
1782 CLASSTYPE_VBASECLASSES here.
1783 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1784
1785 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1786
1787 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1788
1789 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1790
1791 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1792 the class, not the end, in the new ABI.
1793 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1794 ABI.
1795
1796 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1797
1798 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1799 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1800 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1801 (check_field_decls): Likewise.
1802 (check_bases_and_members): Likewise.
1803
1804 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1805
1806 * cp-tree.h (do_inline_function_hair): Remove.
1807 * class.c (layout_class_type): New function, split out from
1808 finish_struct_1.
1809 (fixup_pending_inline): Likewise.
1810 (fixup_inline_methods): New function.
1811 * method.c (fixup_pending_inline): Remove.
1812 (do_inline_function_hair): Likewise.
1813
1814 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1815 new ABI.
1816
1817 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1818 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1819 (CLASSTYPE_PURE_VIRTUALS): ... this.
1820 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1821 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1822 (DECL_PURE_VIRTUAL_P): ... this.
1823 (get_abstract_virtuals): Rename to ...
1824 (get_pure_virtuals): ... this.
1825 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1826 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1827 CLASSTYPE_PURE_VIRTUALS.
1828 * class.c (build_vtable_entry): Likewise.
1829 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1830 get_abstract_virtuals.
1831 (build_vtbl_initializer): Likewise.
1832 (override_one_vtable): Likewise.
1833 (check_methods): Likewise.
1834 * decl.c (duplicate_decls): Likewise.
1835 (redeclaration_error_message): Likewise.
1836 (lang_mark_tree): Likewise.
1837 * decl2.c (grok_function_init): Likewise.
1838 (import_export_vtable): Likewise.
1839 (import_expor_class): Likewise.
1840 * typeck2.c (abstract_virtuals_error): Likewise.
1841 * xref.c (GNU_xref_member): Likewise.
1842 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1843
1844 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1845
1846 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1847 throughout.
1848
1849 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1850
1851 * decl.c (store_return_init): Use mode of old RTL generated for
1852 DECL_RESULT, not the mode of DECL_RESULT itself.
1853 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1854 for functions that used named return values.
1855
1856 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1857
1858 * semantics.c (expand_body): Use
1859 note_deferral_of_defined_inline_function.
1860
1861 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1862
1863 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1864
1865 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1866
1867 * error.c (dump_decl): Support named return values.
1868
1869 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1870
1871 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1872 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1873 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1874 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1875 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1876 (check_bases_and_members): Set them here instead.
1877 (create_vtable_ptr): New function, split out from ...
1878 (finish_struct_1): ... here. Use it. Tidy. Use
1879 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1880 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1881 the first field in the class.
1882 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1883 seeing TYPE_VFIELD as the first field in the class.
1884
1885 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1886 (TYPE_POLYMORPHIC_P): ... this.
1887 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1888 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1889 (TREE_CALLS_NEW): Remove.
1890 (TREE_MANGLED): Likewise.
1891 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1892 and TYPE_POLYMORPHIC_P.
1893 * class.c (check_bases): Likewise.
1894 (finish_base_struct): Likewise.
1895 (finish_struct_bits): Likewise.
1896 (check_for_override): Likewise.
1897 (finish_struct_1): Likewise.
1898 (get_vfield_name): Likewise.
1899 * decl.c (xref_basetypes): Likewise.
1900 * decl2.c (import_export_class): Likewise.
1901 (import_export_decl): Likewise.
1902 * error.c (dump_function_decl): Likewise.
1903 * pt.c (instantiate_class_template): Likewise.
1904 * repo.c (repo_inline_used): Likewise.
1905 * rtti.c (build_headof): Likewise.
1906 (get_tinfo_fn_dynamic): Likewise.
1907 (build_x_typeid): Likewise.
1908 (get_tinfo_var): Likewise.
1909 (build_dynamic_cast_1): Likewise.
1910 (synthesize_tinfo_fn): Likewise.
1911 * search.c (lookup_field_1): Likewise.
1912 (dfs_debug_mark): Likewise.
1913 (maybe_suppress_debug_info): Likewise.
1914 * typeck.c (build_component_ref): Likewise.
1915 (build_component_addr): Likewise.
1916 * typeck2.c (process_init_constructor): Likewise.
1917
1918 1999-12-20 Nathan Sidwell <nathan@acm.org>
1919
1920 * typeck.c (strip_all_pointer_quals): New static function.
1921 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1922
1923 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1924
1925 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1926 (dso_handle_node): New macro.
1927 (flag_use_cxa_atexit): New variable.
1928 (declare_global_var): New function.
1929 (start_anon_func): Remove declaration.
1930 (end_anon_func): Likewise.
1931 * decl.c (get_atexit_node): New function, split out from
1932 destroy_local_static. Handle flag_use_cxa_atexit.
1933 (get_dso_handle_node): Likewise.
1934 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
1935 except.c. Handle flag_use_cxa_atexit.
1936 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
1937 except.c.
1938 (declare_global_var): New variable.
1939 (destroy_local_static): Handle flag_use_cxa_atexit.
1940 * decl2.c (flag_use_cxa_atexit): New variable.
1941 (lang_f_options): Likewise.
1942 * except.c (start_anon_func): Remove.
1943 (end_anon_func): Liekwise.
1944 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1945 * rtti.c (get_tinfo_var): Use declare_global_var.
1946
1947 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1948
1949 * class.c (check_field_decls): Don't return a value.
1950 (avoid_overlap): Moved here from tree.c.
1951 (build_base_fields): Likewise.
1952 (check_bases): New function, split out from finish_base_struct.
1953 (check_bases_and_members): New function, split out from
1954 finish_struct_1.
1955 (struct base_info): Remove cant_have_default_ctor,
1956 cant_have_const_ctor, cant_have_asn_ref.
1957 (finish_base_struct): Split semantic analysis into check_bases.
1958 (finish_struct_methods): Fix bogus assertion.
1959 (check_field_decls): Call finish_struct_anon here.
1960 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1961 (finish_struct_1): Use check_bases_and_members. Reorganize.
1962 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1963 (build_base_fields): Don't declare.
1964 * tree.c (avoid_overlap): Remove.
1965 (build_base_fields): Likewise.
1966
1967 * optimize.c (struct inline_data): Remove scope_stmt.
1968 (remap_block): Don't use insert_block_after_note. Don't update
1969 scope_stmt.
1970 (expand_call_inline): Don't update scope_stmt.
1971 (optimize_function): Don't initialize scope_stmt.
1972 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1973 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1974
1975 1999-12-15 Mark Mitchell <mark@codesourcery.com>
1976
1977 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1978 out of the class, rather than taking them as parameters.
1979 (build_vbase_pointer_fields): Move here from tree.c.
1980 (build_vtbl_or_vbase_field): New function.
1981 (check_methods): Likewise.
1982 (remove_zero_width_bitfields): Likewise.
1983 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1984 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
1985 USING_DECLs here.
1986 (finish_struct_methods): Handle the case where there are no
1987 methods here.
1988 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1989 (check_field_decls): Call delete_duplicate_fields here.
1990 (finish_struct_1): Tidy. Use check_methods and
1991 remove_zero_width_bitfields.
1992 * cp-tree.h (build_vbase_pointer_fields): Remove.
1993 * decl.c (grokdeclarator): Use tree_cons instead of
1994 temp_tree_cons.
1995 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1996 instead of temp_tree_cons.
1997 * lex.c (cons_up_default_function): Remove dead code.
1998 * method.c (fixup_pending_inline): New function, split out from ...
1999 (do_inline_function_hair): ... here.
2000 * tree.c (build_vbase_pointer_fields): Remove.
2001
2002 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
2003
2004 * tree.c (walk_tree): Walk operand subtrees in forward order.
2005 * optimize.c (expand_call_inline): Likewise.
2006 (optimize_function): Initialize id->scope_stmt to something useful.
2007 (remap_block): Assume id->scope_stmt has a useful value.
2008
2009 1999-12-15 Nathan Sidwell <nathan@acm.org>
2010
2011 * typeck.c (build_c_cast): Expand warning message. Move pointer
2012 alignment warning to after the cast. Don't warn about pointer
2013 alignment when given a pointer to incomplete.
2014
2015 1999-12-15 Richard Henderson <rth@cygnus.com>
2016
2017 * cp-tree.h (make_aggr_type): Declare.
2018 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
2019 (make_aggr_type): New.
2020
2021 * decl.c (build_typename_type, init_decl_processing): Use it.
2022 (build_ptrmemfunc_type, xref_tag): Likewise.
2023 * except.c (call_eh_info): Likewise.
2024 * init.c (init_init_processing): Likewise.
2025 * pt.c (process_template_parm, lookup_template_class): Likewise.
2026 * rtti.c (expand_class_desc): Likewise.
2027 * semantics.c (begin_class_definition, finish_typeof): Likewise.
2028 * tree.c (copy_template_template_parm): Likewise.
2029
2030 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
2031
2032 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
2033 sizeof (struct tree_common).
2034
2035 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
2036
2037 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
2038 outermost block to point to the inlined function decl.
2039
2040 * error.c (dump_decl): operator==, not operator ==.
2041 (op_to_string): Likewise.
2042
2043 * decl.c (compute_array_index_type): Handle null name.
2044
2045 * decl2.c (ambiguous_decl): Fix to match comment.
2046 (lookup_using_namespace): Adjust.
2047
2048 * decl2.c (import_export_class): Don't ignore dllimport.
2049
2050 1999-12-14 Mark Mitchell <mark@codesourcery.com>
2051
2052 * class.c (check_field_decls): Split out from ...
2053 (finish_struct_1): ... here. Use it. Tidy.
2054
2055 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
2056 * optimize.c (copy_body_r): Pass it.
2057 * tree.c (remap_save_expr): Clear walk_subtrees for an
2058 already-handled SAVE_EXPR.
2059 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
2060
2061 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
2062 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
2063
2064 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
2065
2066 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
2067
2068 * class.c (finish_base_struct): Allow multiple COM base classes
2069 as well as non-COM bases as long as it's not the leftmost.
2070
2071 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
2072
2073 * lex.c (saving_parse_to_obstack): New global.
2074 (reinit_parse_for_block): Use.
2075 (reinit_parse_for_expr): Use.
2076 (check_newline): Use.
2077
2078 1999-12-13 Mark Mitchell <mark@codesourcery.com>
2079
2080 * optimize.c (initialize_inlined_parameters): Take FN to which the
2081 parameters belong as an argument.
2082 (expand_call_inline): Expand calls into the parameter
2083 initializations before pushing the function onto the list of
2084 functions we are presently expanding.
2085
2086 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2087
2088 * class.c (get_vtable_name): Use a literal format string and
2089 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
2090 (prepare_fresh_vtable): Likewise.
2091
2092 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2093 VTABLE_NAME_FORMAT.
2094
2095 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2096
2097 * init.c (build_vec_init): Initialize variable `try_body'.
2098
2099 * lex.c (yyerror): Don't call a variadic function with a
2100 non-literal format string.
2101
2102 * optimize.c (optimize_function): Call memset, not bzero.
2103
2104 * pt.c (for_each_template_parm_r): Add static prototype.
2105
2106 1999-12-09 Andreas Jaeger <aj@suse.de>
2107
2108 * except.c (expand_throw): Add static attribute to match
2109 prototype.
2110
2111 * Makefile.in (semantics.o): Add dependency on output.h.
2112 * semantics.c: Include output.h for declaration of
2113 make_function_rtl.
2114
2115 1999-12-09 Mark Mitchell <mark@codesourcery.com>
2116
2117 * decl.c (init_decl_processing): Reenable inlining on trees.
2118 (finish_function): Likewise.
2119 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2120 * semantics.c (simplify_aggr_init_exprs): New function.
2121 (expand_body): Use it.
2122 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2123 sometimes present the same sub-tree twice.
2124
2125 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2126 `csl'.
2127
2128 * semantics.c (finish_switch_cond): Do conversions here, not ...
2129 * typeck.c (c_expand_start_case): Here.
2130
2131 * semantics.c (do_poplevel): Remove unused variable.
2132
2133 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2134
2135 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2136 unless we're declaring the variable in question.
2137
2138 1999-12-06 Mark Mitchell <mark@codesourcery.com>
2139
2140 * decl.c (init_decl_processing): #if 0 last patch.
2141 (finish_function): Likewise.
2142
2143 1999-12-05 Mark Mitchell <mark@codesourcery.com>
2144
2145 * decl.c (init_decl_processing): Set flag_inline_trees if
2146 !flag_no_inline.
2147
2148 * cp-tree.h (calls_setjmp_p): Declare.
2149 * decl.c (finish_function): Mark functions that call setjmp as
2150 uninlinable.
2151 * optimize.c (calls_setjmp_r): New function.
2152 (calls_setjmp_p): Likewise.
2153
2154 1999-12-04 Mark Mitchell <mark@codesourcery.com>
2155
2156 * optimize.c (expand_call_inline): Wrap the expanded call in an
2157 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2158 inlined functions.
2159
2160 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
2161 in_target_cleanup_p.
2162 (remap_decl): New function.
2163 (remap_block): Likewise.
2164 (copy_scope_stmt): Likewise.
2165 (copy_body_r): Use remap_decl and copy_scope_stmt.
2166 (copy_body): Use VARRAY_TOP_TREE.
2167 (initialize_inlined_parameters): Likewise.
2168 (declare_return_variable): Likewise.
2169 (inlinable_function_p): Check flag_inline_trees.
2170 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2171 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
2172 parameters of the inlined function.
2173 (optimize_function): Prevent recursion into partially complete
2174 functions.
2175
2176 * cp-tree.def (SCOPE_STMT): Take one operand.
2177 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2178 (SCOPE_NULLIFIED_P): Redefine.
2179 (SCOPE_NO_CLEANUPS_P): New macro.
2180 (add_scope_stmt): Change prototype.
2181 * decl.c (poplevel): Tidy. Warn about unused variables here.
2182 Record SCOPE_STMT_BLOCKs.
2183 (finish_function): Keep DECL_INITIAL for functions that might be
2184 inlined.
2185 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2186 * semantics.c: Include rtl.h.
2187 (add_scope_stmt): Return the new scope statement and, for an
2188 end-of-scope statement, its matching begin statement. Don't set
2189 SCOPE_NULLIFIED_P.
2190 (do_pushlevel): Simplify, now that we are always
2191 function-at-a-time.
2192 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
2193 (expand_stmt): Don't call expand_start_bindings or
2194 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2195 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2196 SCOPE_NULLIFIED_P.
2197 * Makefile.in (semantics.o): Depend on RTL_H.
2198
2199 * decl2.c (pending_statics_used): Make it a macro.
2200 (saved_inlines_used): Likewise.
2201 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2202 (mark_inline_for_output): Likewise.
2203 (ssdf_decls_used): Remove.
2204 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2205 (generate_ctor_or_dtor_function): Adjust accordingly.
2206
2207 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
2208 Greg McGary <gkm@gnu.org>
2209
2210 * decl.c (duplicate_decls): Merge
2211 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2212 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2213
2214 1999-12-02 Mike Stump <mrs@wrs.com>
2215
2216 * init.c (perform_member_init): Handle parse errors better.
2217
2218 1999-12-01 Mark Mitchell <mark@codesourcery.com>
2219
2220 * cp-tree.h (min_tree_cons): Remove.
2221 (scratch_ovl_cons): Likewise.
2222 * decl.c (saveable_obstack): Don't declare.
2223 (duplicate_decls): Tweak error-message.
2224 (initialize_local_var): Explicitly mark the definition as static.
2225 (finish_function): Call permanent_allocation, just so
2226 that the middle-end sees the obstacks it expects.
2227 (mark_cp_function_context): Likewise.
2228 * init.c (build_new): Don't use min_tree_cons.
2229 * lex.c (permanent_obstack): Don't declare.
2230 (current_obstack, saveable_obstack): Likewise.
2231 * spew.c (current_obstack, saveable_obstack): Likewise.
2232 * tree.c (current_obstack, saveable_obstack): Likewise.
2233 (scratch_ovl_cons): Remove.
2234 (build_min_nt): Don't mess with obstacks.
2235 (build_min): Likewise.
2236 (min_tree_cons): Remove
2237 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2238 (build_x_function_call): Likewise.
2239 (build_c_cast): Don't use min_tree_cons.
2240
2241 1999-11-29 Mark Mitchell <mark@codesourcery.com>
2242
2243 * pt.c (tsubst_decl): Robustify.
2244
2245 1999-11-27 Mark Mitchell <mark@codesourcery.com>
2246
2247 * decl2.c (finish_file): Call expand_body for inline functions
2248 that will be written out but that do not yet have RTL.
2249 * semantics.c (expand_body): Do not generate RTL For inline
2250 functions that do not yet need to be written out.
2251
2252 1999-11-25 Mark Mitchell <mark@codesourcery.com>
2253
2254 * Make-lang.in (CXX_SRCS): Add optimize.c.
2255 * Makefile.in (CXX_OBJS): Add optimize.o.
2256 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2257 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2258 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2259 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2260 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2261 (dump.o): Likewise.
2262 (optimize.o): New target.
2263 * class.c: Don't include splay-tree.h.
2264 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
2265 * cp-tree.h: Include splay-tree.h.
2266 (DECL_UNINLINABLE): New macro.
2267 (CTOR_BEGIN_P, CTOR_END_P): New macros.
2268 (flag_inline_trees): New variable.
2269 (local_variable_p): New function.
2270 (nonstatic_local_decl_p): Likewise.
2271 (optimize_function): Likewise.
2272 (cplus_unsave_expr_now): Remove.
2273 (copy_tree_r): Declare.
2274 (remap_save_expr): Likewise.
2275 * decl.c (local_variable_p): Don't
2276 make it static.
2277 (local_variable_p_walkfn): New function.
2278 (make_rtl_for_local_static): Remove code to try to avoid writing
2279 out static constants.
2280 (emit_local_var): Fix indentation.
2281 (nonstatic_local_decl_p): New function.
2282 (check_default_argument): Use local_variable_p_walkfn, not
2283 local_variable_p, when walking the tree.
2284 (start_function): Set the DECL_CONTEXT for automatically generated
2285 labels.
2286 (finish_constructor_body): Use CTOR_STMT to mark the end of a
2287 constructor.
2288 * decl2.c: Don't include splay-tree.h.
2289 (flag_inline_trees): Define.
2290 * dump.c: Don't include
2291 splay-tree.h.
2292 * except.c (expand_end_catch_block): Fix comment formatting.
2293 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2294 (expand_throw): Tidy comment.
2295 * init.c (build_vec_delete_1): Use create_temporary_var.
2296 * lex.c (cplus_tree_code_type): Make it static.
2297 (cplus_tree_code_length): Likewise.
2298 (cplus_tree_code_name): Likewise.
2299 * optimize.c: New file.
2300 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2301 with computed gotos.
2302 (setup_vtbl_ptr): Mark the beginnings of constructors with
2303 CTOR_STMT.
2304 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2305 (expand_body): Call optimize_function. Save bodies if we're doing
2306 inlining on trees.
2307 * tree.c: Don't include splay-tree.h. Include insn-config.h and
2308 integrate.h.
2309 (copy_tree_r): Make it public.
2310 (statement_code_p): New function.
2311 (mark_local_for_remap_r): Likewise.
2312 (cp_usave_r): Likewise.
2313 (cp_unsave): Likewise.
2314 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2315 (walk_tree): Walk into `s' class nodes. Walk statement chains.
2316 (copy_tree_r): Handle 's' class nodes. Restore chains for
2317 statements. Nullify scopes. Don't copy types.
2318 (init_tree): Set lang_unsave to cp_unsave.
2319 (remap_save_expr): Define.
2320 * ir.texi: Document CTOR_STMT.
2321
2322 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
2323
2324 * search.c (note_debug_info_needed): Do perform this optimization
2325 for dwarf2.
2326 (maybe_suppress_debug_info): Likewise. Start by clearing
2327 TYPE_DECL_SUPPRESS_DEBUG.
2328
2329 1999-11-24 Mark Mitchell <mark@codesourcery.com>
2330
2331 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2332
2333 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2334
2335 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2336
2337 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2338 function with a non-literal format string.
2339
2340 * lex.c (do_identifier): Likewise.
2341
2342 * typeck.c (build_unary_op): Likewise.
2343
2344 1999-11-23 Mark Mitchell <mark@codesourcery.com>
2345
2346 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2347
2348 1999-11-22 Mark Mitchell <mark@codesourcery.com>
2349
2350 * cp-tree.def (CTOR_COMPLETE): New tree node.
2351 * decl.c (finish_constructor_body): Add it, to mark the end of the
2352 constructor.
2353 (finish_function): Don't call end_protect_partials here.
2354 * ir.texi (CTOR_COMPLETE): Document it.
2355 * semantics.c (expand_stmt): Handle it.
2356
2357 * cp-tree.def (FUNCTION_NAME): New tree node.
2358 * cp-tree.h (current_function_name_declared): Tweak documentation.
2359 (lang_decl_flags): Add pretty_function_p, adjust dummy.
2360 (DECL_PRETTY_FUNCTION_P): New macro.
2361 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2362 etc., in a template function. Use at_function_scope_p instead of
2363 expanding it inline.
2364 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2365 specially.
2366 (tsubst): Handle FUNCTION_NAME.
2367 (tsubst_copy): Likewise.
2368 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2369 etc. in instantiation.
2370 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2371 even in template functions.
2372 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2373 conditional scope at the top of a destructor.
2374
2375 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2376 specializations too.
2377
2378 1999-11-22 Nathan Sidwell <nathan@acm.org>
2379
2380 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2381 when actually negative.
2382
2383 * typeck.c (convert_for_assignment): Expand comment about
2384 strange NULL check, moved from ...
2385 (convert_for_initialization): ... here. Remove unneeded
2386 code.
2387
2388 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2389
2390 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2391 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2392 Always destruct virtual bases of array components, but never
2393 delete them.
2394 (build_vec_init): Adjust invocations.
2395 (build_delete): Likewise.
2396 * decl2.c (delete_sanity): Likewise.
2397
2398 1999-11-19 Nathan Sidwell <nathan@acm.org>
2399
2400 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2401 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2402 * decl2.c (grok_method_quals): Accept `restrict' as applying to
2403 the object pointer. Return such qualifiers.
2404 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2405 variables.
2406
2407 1999-11-18 Mark Mitchell <mark@codesourcery.com>
2408
2409 * except.c (expand_end_catch_block): Fix typo.
2410 (expand_exception_blocks): Simplify. Don't call
2411 expand_leftover_cleanups.
2412
2413 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
2414
2415 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2416 * pt.c (tsubst, case INTEGER_TYPE): Call it.
2417 Check uses_template_parms.
2418
2419 * class.c (finish_struct): If we're a local class in a template
2420 function, add a TAG_DEFN.
2421 * pt.c (lookup_template_class): If this is a local class in a
2422 template function, call pushtag.
2423 (tsubst_expr, case TAG_DEFN): Handle classes, too.
2424
2425 Emit debug info with the vtable.
2426 * search.c (maybe_suppress_debug_info): New function...
2427 * class.c (finish_struct_1): ...split out from here.
2428 * cp-tree.h: Declare it.
2429 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2430 if we're writing out the vtable.
2431 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
2432 note_debug_info_needed): #if 0 out.
2433
2434 1999-11-14 Mark Mitchell <mark@codesourcery.com>
2435
2436 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2437 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2438 TREE_PERMANENT.
2439 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2440 * decl2.c (lookup_arg_dependent): Use it.
2441
2442 * cp-tree.h (cp_finish_decl): Change prototype.
2443 (finish_static_data_member_decl): Likewise.
2444 (push_permanent_obstack): Remove declaration.
2445 (push_expression_obstack): Likewise.
2446 (push_scratch_obstack): Likewise.
2447 (DECL_TEMPLATE_PARM_P): Robustify.
2448 (SET_DECL_TEMPLATE_PARM_P): New macro.
2449 * class.c (add_method): Don't manipulate obstacks.
2450 (finish_vtbls): Likewise.
2451 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2452 * decl.c (binding_for_name): Don't manipulate obstacks.
2453 (maybe_push_to_top_level): Likewise.
2454 (pop_from_top_level): Likewise.
2455 (duplicate_decls): Likewise.
2456 (pushdecl): Likewise.
2457 (implicitly_declare): Likewise.
2458 (build_typename_type): Likewise.
2459 (start_decl): Likewise.
2460 (cp_finish_decl): Likewise.
2461 (finish_decl): Likewise.
2462 (destroy_local_static): Likewise.
2463 (expand_static_init): Likewise.
2464 (complete_array_type): Likewise.
2465 (grokvardecl): Likewise.
2466 (build_ptrmemfnc_type): Likewise.
2467 (grokdeclarator): Likewise.
2468 (xref_tag): Likewise.
2469 (xref_basetypes): Likewise.
2470 (start_enum): Likewise.
2471 (finish_enum): Likewise.
2472 (start_function): Likewise.
2473 (finish_function): Likewise.
2474 (start_method): Adjust call to cp_finish_decl.
2475 * decl2.c (finish_static_data_member_decl): Don't manipulate
2476 obstacks.
2477 (grokfield): Likewise.
2478 (grokbitfield): Likewise.
2479 (get_temp_name): Likewise.
2480 (get_sentry): Likewise.
2481 (fnish_file): Likewise.
2482 (lookup_arg_dependent): Likewise.
2483 * except.c (call_eh_info): Likewise.
2484 (push_eh_info): Likewise.
2485 (do_pop_exception): Likewise.
2486 (initialize_handler_parm): Likewise.
2487 (expand_end_eh_spec): Likewise.
2488 (alloc_eh_object): Likewise.
2489 (expand_throw): Likewise.
2490 * expr.c (extract_scalar_init): Likewise.
2491 * init.c (build_java_class_ref): Likewise.
2492 * lex.c (get_time_identifier): Likewise.
2493 (snarf_defarg): Likewise.
2494 (add_defarg_fn): Likewise.
2495 (is_global): Simplify.
2496 (do_identifier): Don't check TREE_PERMANENT.
2497 * method.c (emit_thunk): Don't manipulate obstacks.
2498 * parse.y (condition): Adjust call to cp_finish_decl.
2499 (primary): Likewise.
2500 (initdcl): Likewise.
2501 (initdcl0_innards): Likewise.
2502 (nomods_initdcl0): Likewise.
2503 * pt.c (push_inline_template_parms_recursive): Use
2504 SET_DECL_TEMPLATE_PARM_P.
2505 (process_template_parm): Likewise.
2506 (lookup_template_class): Don't manipulate obstacks.
2507 (instantiate_class_template): Adjust call to
2508 finish_static_data_member_decl.
2509 (tsubst_decl): Don't manipulate obstacks.
2510 (tsubst_expr): Likewise.
2511 (instantiate_template): Likewise.
2512 (instantiate_decl): Adjust calls to cp_finish_decl.
2513 * rtti.c (call_void_fn): Don't manipulate obstacks.
2514 (get_tinfo_var): Likewise.
2515 (get_tinfo_fn_unused): Likewise.
2516 (build_dynamic_cast_1): Likewise.
2517 (expand_si_desc): Likewise.
2518 (expand_class_desc): Likewise.
2519 (expand_ptr_desc): Likewise.
2520 (expand_attr_desc): Likewise.
2521 (expand_generic_desc): Likewise.
2522 (synthesize_tinfo_fn): Likewise.
2523 * search.c (expand_upcast_fixups): Likewise.
2524 * semantics.c (finish_asm_stmt): Likewise.
2525 (finish_named_return_value): Likewise.
2526 (begin_class_definition): Likewise.
2527 (finish_class_definition): Likewise.
2528 (finish_typeof): Likewise.
2529 * tree.c (build_cplus_method_type): Likewise.
2530 (reverse_path): Likewise.
2531 (copy_template_template_parm): Likewise.
2532 (build_expr_ptr_wrapper): Likewise.
2533 (push_expression_obstack): Remove.
2534 (push_permanent_obstack): Likewise.
2535 * typeck.c (mark_addressable): Likewise.
2536
2537 1999-11-13 Mark Mitchell <mark@codesourcery.com>
2538
2539 * call.c (build_conditional_expr): Use build_target_expr_with_type.
2540 (convert_like): Likewise.
2541 (build_over_call): Likewise.
2542 * cp-tree.h (build_target_expr): Remove.
2543 (build_target_expr_with_type): New function.
2544 * cvt.c (build_up_reference): Use get_target_expr.
2545 * decl.c (build_target_expr): Move to ...
2546 * tree.c (build_target_expr): Here. Make it static.
2547 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
2548 the temporary VAR_DECLs.
2549 (get_target_expr): Use it.
2550
2551 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
2552
2553 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2554 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2555 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2556 * class.c (set_rtti_entry): Use it.
2557
2558 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2559
2560 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2561 here.
2562 * semantics.c (finish_expr_stmt): Call it here instead. Move
2563 default_conversion logic to semantic-analysis time.
2564
2565 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
2566
2567 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2568
2569 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2570
2571 * init.c (init_init_processing): Re-instated Nov 11 patch after
2572 approval.
2573
2574 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2575
2576 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2577 Patch had not been approved yet.
2578
2579 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2580
2581 * decl.c (compute_array_index_type): New function, split out from
2582 grokdeclarator.
2583 (create_array_type_for_decl): Likewise.
2584 (grokdeclarator): Use them.
2585
2586 * semantics.c (expand_stmt): Don't suspend_momentary or
2587 resume_momentary.
2588
2589 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2590
2591 * init.c (init_init_processing): Header information for
2592 arrays allocated via `new' should have the same alignment used by
2593 malloc.
2594
2595 1999-11-10 Mark Mitchell <mark@codesourcery.com>
2596
2597 * error.c (dump_function_name): Don't crash if given a friend
2598 pseudo-instantiation.
2599
2600 * cp-tree.h (build_enumerator): Change prototype.
2601 * decl.c (enum_next_value): Remove.
2602 (enum_overflow): Likewise.
2603 (init_decl_processing): Don't register enum_next_value as a root.
2604 (start_enum): Clear TYPE_VALUES for a redefined enum.
2605 (finish_enum): Reset the type of enumeration constants.
2606 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
2607 we don't need to. Maintain the TYPE_VALUES list and look there
2608 for the previously defined enumeration constant. Let enumeration
2609 constants have the type of their values until the enumeration type
2610 is complete.
2611 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2612 (structsp): Adjust.
2613 * parse.c: Regenerated.
2614 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2615
2616 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
2617 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2618
2619 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2620
2621 1999-11-09 Mark Mitchell <mark@codesourcery.com>
2622
2623 * cp-tree.h (language_function): Remove x_last_dtor_insn and
2624 x_last_parm_cleanup_insn.
2625 * decl.c (last_dtor_insn): Remove.
2626 (last_parm_cleanup_insn): Likewise.
2627 (expand_start_early_try_stmts): Don't set them.
2628 (store_parm_decls): Likewise.
2629 (save_function_data): Or save them.
2630 (mark_lang_function): Or mark them.
2631
2632 1999-11-08 Mark Mitchell <mark@codesourcery.com>
2633
2634 * decl.c (store_parm_decls): Generate cleanup code at
2635 semantic-analysis time. Destroy objects in the correct order.
2636
2637 1999-11-07 Mark Mitchell <mark@codesourcery.com>
2638
2639 * cp-tree.h (begin_new_placement): Remove.
2640 (finish_new_placement): Likewise.
2641 * class.c (finish_struct_1): Don't suspend_momentary or
2642 resume_momentary.
2643 * decl.c (grokdeclarator): Likewise.
2644 (maybe_build_cleanup_1): Likewise.
2645 * except.c (push_eh_cleanup): Likewise.
2646 (build_terminate_handler): Likewise.
2647 * init.c (build_new_1): Likewise.
2648 * parse.y (parse_decl): Change prototype.
2649 (initdecls, notype_initdecls, initdcl): Don't return int.
2650 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2651 (.begin_new_placement): Remove.
2652 (.finish_new_placement): Likewise.
2653 (nonmomentary_expr): Likewise.
2654 (suspend_mom): Likewise.
2655 (condition): Don't suspend_momentary, resume_momentary, or keep
2656 track of need to resume.
2657 (unary_expr): Likewise.
2658 (new_placement): Likewise.
2659 (decl): Likewise.
2660 (structsp): Likewise.
2661 (new_type_id): Likewise.
2662 (maybe_parmlist): Likewise.
2663 (direct_after_type_declaration): Likewise.
2664 (direct_new_declarator): Likewise.
2665 (direct_abstract_declaration): Likewise.
2666 * parse.c: Regenerated.
2667 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2668 * semantics.c (begin_new_placement): Remove.
2669 (finish_new_placement): Likewise.
2670
2671 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2672
2673 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2674 (DECL_TEMPLATE_INFO): Use it.
2675 * decl.c (warn_extern_redeclared_static): Do nothing for
2676 TEMPLATE_DECLs.
2677 * decl2.c (mark_used): Explicitly check for function or variable.
2678 * semantics.c (finish_unary_op_expr): Check whether result is also
2679 an INTEGER_CST.
2680
2681 1999-11-05 Mark Mitchell <mark@codesourcery.com>
2682
2683 * Makefile.in (typeck2.o): Depend on output.h.
2684 * typeck2.c: Include output.h.
2685
2686 * decl.c (flag_ansi): Remove declaration.
2687
2688 * pt.c (tinst_level_tick): Make it static.
2689 (last_template_error_tick): Likewise.
2690
2691 * cp-tree.h (mapcar): Remove declaration.
2692 (search_tree): Likewise.
2693 (walk_tree_fn): New typedef.
2694 (walk_tree): New function.
2695 * tree.c (bot_manip): Change prototype. Adjust to be called via
2696 walk_tree.
2697 (bot_replace): Likewise.
2698 (no_linkage_helper): Likewise.
2699 (copy_tree_r): New function.
2700 (search_tree): Rename, and adjust, to become ...
2701 (walk_tree): New function.
2702 (mapcar): Remove.
2703 (target_remap): Remove.
2704 (target_remap_count): Likewise.
2705 (break_out_target_exprs): Use walk_tree.
2706 * decl.c (local_variable_p): Change prototype.
2707 (check_default_argument): Use walk_tree.
2708 * pt.c (for_each_template_parm_r): New function, split out from ...
2709 (for_each_template_parm): Here. Use it, via walk_tree.
2710
2711 1999-11-03 Mark Mitchell <mark@codesourcery.com>
2712
2713 * class.c (check_bitfield_decl): New function, split out from
2714 finish_stuct_1.
2715 (check_field_decl): Likewise. Recursively examine members of
2716 anonymous structs.
2717 (finish_struct_1): Use them.
2718 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2719
2720 1999-11-02 Mark Mitchell <mark@codesourcery.com>
2721
2722 * decl.c (grokfndecl): Remove dead code.
2723
2724 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2725
2726 1999-11-02 Scott Snyder <snyder@fnal.gov>
2727
2728 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2729 IMAGPART_EXPR.
2730 * pt.c (tsubst_copy): Likewise.
2731
2732 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2733
2734 * decl2.c (maybe_make_one_only): Always make things comdat on
2735 ELF targets, too.
2736
2737 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2738
2739 * decl.c (finish_function): Call free_after_parsing for functions
2740 we are not immediately turning into RTL.
2741
2742 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2743
2744 * cp-tree.h (flag_dump_translation_unit): Add decl.
2745
2746 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2747
2748 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2749
2750 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2751
2752 * decl.c (pop_cp_function_context): Don't call free on a NULL
2753 pointer.
2754 * semantics.c: Include ggc.h.
2755 (expand_body): Do garbage-collection after processing a template
2756 function. Clear DECL_SAVED_TREE after generating RTL for a
2757 function.
2758 * Makefile.in (semantics.o): Depend on ggc.h.
2759
2760 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2761
2762 * cp-tree.h (make_typename_type): Change prototype.
2763 * decl.c (make_typename_type): Only complain if so requested.
2764 * parse.y (nested_name_specifier): Adjust calls.
2765 (typename_sub0): Likewise.
2766 (typename_sub1): Likewise.
2767 * parse.c: Regenerated.
2768 * pt.c (convert_template_argument): Pass complain to
2769 make_typename_type.
2770 (tsubst): Likewise.
2771
2772 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2773
2774 * semantics.c (finish_handler): End the scope of the handler
2775 before attaching it to the statement-tree.
2776
2777 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2778
2779 * rtti.c (build_dynamic_cast_1): Give a better error message for
2780 an attempt to dynamic_cast from a non-polymorphic type.
2781
2782 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2783
2784 * cp-tree.h (make_temp_vec): Remove.
2785 (make_scratch_vec): Likewise.
2786 * call.c (add_function_candidate): Use make_tree_vec.
2787 (add_conv_candidate): Likewise.
2788 (build_builtin_candidate): Likewise.
2789 (add_template_candidate_real): Likewise.
2790 * class.c (resolve_address_of_overloaded_function): Likewise.
2791 * decl.c (start_function): Don't fool with the momentary obstack.
2792 (finish_function): Likewise.
2793 * init.c (expand_direct_vtbls_init): Likewise.
2794 (begin_init_stmts): Likewise.
2795 (finish_init_stmts): Likewise.
2796 * pt.c (add_to_template_args): Use make_tree_vec.
2797 (check_explicit_specialization): Likewise.
2798 (coerce_template_parms): Likewise.
2799 (lookup_template_class): Don't fool with the momentary obstack.
2800 (instantiate_class_template): Likewise.
2801 (tsubst_template_arg_vector): Use make_tree_vec.
2802 (tsubst_aggr_type): Don't fool with the momentary obstack.
2803 (tsubst_decl): Likewise. Use make_tree_vec.
2804 (try_one_overload): Likewise.
2805 (try_class_unification): Don't fool with the momentary obstack.
2806 (get_bindings_real): Use make_tree_vec.
2807 (set_mangled_name_for_template_decl): Likewise.
2808 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2809 * semantics.c (finish_expr_stmt): Likewise.
2810 (finish_do_stmt): Likewise.
2811 (finish_for_expr): Likewise.
2812 (finish_switch_cond): Likewise.
2813 (do_pushlevel): Likewise.
2814 (do_poplevel): Likewise.
2815 * tree.c (make_temp_vec): Remove.
2816
2817 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2818 CLEANUP_P for a TRY_BLOCK.
2819 * ir.texi: Document SAVE_EXPR.
2820
2821 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2822
2823 * call.c (build_over_call): Check that the built-in function is
2824 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2825 * typeck.c (build_function_call_real): Similarly.
2826
2827 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2828
2829 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2830 remember_end_note.
2831
2832 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2833
2834 * decl.c (push_overloaded_decl_1): Use pushdecl.
2835
2836 * decl.c (auto_function): Replace #ifdef'd __inline with just
2837 plain inline.
2838 * lex.c (my_get_run_time): Likeise.
2839 (yyprint): Likewise.
2840 (identifier_type): Likewise.
2841 * method.c (start_squangling): Likewise.
2842 (end_squangling): Likewise.
2843 (icat): Likewise.
2844 (old_backref_index): Likewise.
2845 (flush_repeats): Likewise.
2846 (issue_ktype): Likewise.
2847 * parse.y (empty_parms): Likewise.
2848 * parse.c: Regenerated.
2849
2850 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2851
2852 * dump.c (dequeue_and_dump): Replace several uses of
2853 queue_and_dump_index with dump_child.
2854
2855 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2856
2857 * expr.c: Include tm_p.h.
2858
2859 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2860
2861 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2862 (pushlevel_temporary): Remove.
2863 (add_scope_stmt): New function.
2864 * decl.c (pushlevel_temporary): Remove.
2865 (poplevel): Use add_scope_stmt.
2866 (start_decl_1): Likewise.
2867 * semantics.c (add_scope_stmt): New function.
2868 (do_pushlevel): Use it.
2869 (do_poplevel): Use it.
2870 (expand_stmt): Check SCOPE_PARTIAL_P.
2871
2872 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2873 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2874 * expr.c (cplus_expand_expr): Expand it.
2875 * ir.texi: Document EMPTY_CLASS_EXPR.
2876
2877 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2878
2879 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2880 parameters as having namespace scope.
2881
2882 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2883
2884 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2885 (mangling_flags): New type.
2886 (build_overload_int): Change prototype.
2887 (build_overload_value): Likewise.
2888 (numeric_output_need_bar): Improve comment.
2889 (mangle_expression): New function, broken out from ...
2890 (build_overload_int): Here.
2891 (build_overload_value): Adjust for use of mangling flags. Don't
2892 warn about real-valued template parameters here. Do handle
2893 complex expressions involving real-valued template parameters.
2894 (build_template_parm_names): Encase non-type template parameters
2895 in underscores, if necessary.
2896 (process_overload_item): Remove conditional on
2897 PARM_CAN_BE_ARRAY_TYPE.
2898
2899 1999-10-17 Mark Mitchell <mark@codesourcery.com>
2900
2901 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2902
2903 * ir.texi: Clean up documentation of RETURN_INIT.
2904
2905 1999-10-15 Greg McGary <gkm@gnu.org>
2906
2907 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2908 (lang_init): Set default for flag_bounds_check if still "unspecified".
2909
2910 1999-10-13 Andrew Haley <aph@cygnus.com>
2911
2912 * class.c (finish_struct_1): Force alignment of non-bitfields to
2913 BITS_PER_UNIT.
2914
2915 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
2916
2917 * typeck2.c (process_init_constructor): Handle empty constructors.
2918
2919 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
2920
2921 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2922
2923 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2924 array error.
2925
2926 1999-10-13 Mark Mitchell <mark@codesourcery.com>
2927
2928 * decl.c (make_rtl_for_local_static): Don't create register RTL
2929 for addressable constants.
2930
2931 1999-10-13 Nathan Sidwell <nathan@acm.org>
2932
2933 * cp-tree.h (build_x_va_arg): Prototype new function.
2934 * call.c (build_x_va_arg): Define it.
2935 * parse.y (unary_expr): Call build_x_va_arg.
2936
2937 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2938 * call.c (convert_type_from_ellipsis): Define it.
2939 * decl.c (init_decl_processing): Set lang_type_promotes_to.
2940
2941 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2942
2943 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
2944
2945 * class.c (fixed_type_or_null): Always set *nonnull.
2946
2947 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2948
2949 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2950 __GNUC__ and __GNUC_MINOR__.
2951
2952 1999-10-09 Mark Mitchell <mark@codesourcery.com>
2953
2954 * cp-tree.h (make_rtl_for_local_static): New function.
2955 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2956 local statics ...
2957 (make_rtl_for_local_static): Here.
2958 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2959
2960 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2961
2962 * method.c: Include tm_p.h.
2963
2964 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2965
2966 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2967 * lex.c (cp_make_lake_type): Likewise.
2968 * tree.c (init_tree): Init make_lang_type_fn.
2969
2970 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2971
2972 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2973 paramter.
2974
2975 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2976 local statics if we don't really have them.
2977
2978 * ir.texi: Improve documentation for STMT_EXPR. Describe
2979 CLEANUP_POINT_EXPR.
2980
2981 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
2982
2983 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2984
2985 1999-10-07 Greg McGary <gkm@gnu.org>
2986
2987 * class.c (finish_struct_1): Use simpler method of
2988 removing elements of a singly-linked list which doesn't
2989 lose for classes without data members.
2990
2991 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2992
2993 * friend.c (make_friend_class): Robustify.
2994
2995 * semantics.c (finish_object_call_expr): Reject calls to template
2996 types.
2997
2998 1999-10-06 Mark Mitchell <mark@codesourcery.com>
2999
3000 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
3001
3002 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
3003 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
3004 CLASSTYPE_VFIELD.
3005 * class.c (get_vfield_offset): Likewise.
3006 (finish_base_struct): Likewise.
3007 (modify_one_vtable): Likewise.
3008 (fixup_vtable_deltas): Likewise.
3009 (finish_struct_1): Likewise.
3010 * init.c (expand_virtual_init): Likewise.
3011 * search.c (lookup_field_1): Likewise.
3012 (expand_upcast_fixups): Likewise.
3013 * typeck.c (build_component_ref): Likewise.
3014 (build_binary_op_nodefault): Likewise.
3015
3016 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
3017 * ir.texi: Document TYPE_VFIELD.
3018
3019 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
3020
3021 * decl.c (grokdeclarator): Only warn about non-zero arrays if
3022 !in_system_header (linux socketbits.h can give this for
3023 __cmsg_data, which is using a GNU extension).
3024
3025 1999-10-05 Mark Mitchell <mark@codesourcery.com>
3026
3027 * decl2.c (start_static_storage_duration_function): Push the
3028 function declaration so it ends up in namespace scope.
3029
3030 * dump.c (DUMP_CHILDREN): Remove.
3031 (DUMP_BINFO): Adjust.
3032 (struct dump_node_info): Remove dump_children_p.
3033 (queue_and_dump_type): Remove dump_children_p parameter.
3034 (queue): Don't set dump_children_p.
3035 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
3036 queue_and_dump_index.
3037 (dequeue_and_dump): Unconditionally print children. Adjust calls
3038 to functions mentioned above.
3039 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
3040
3041 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
3042 * dump.c (dequeue_and_dump): Dump them.
3043
3044 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
3045
3046 * decl.c (start_function): Set current_in_charge_parm for
3047 constructors, too, where appropriate.
3048 * search.c (fixup_all_virtual_upcast_offsets): New function.
3049 (expand_indirect_vtbls_init): Use it.
3050
3051 1999-10-04 Nathan Sidwell <nathan@acm.org>
3052
3053 * decl2.c (grok_alignof): Don't decay lvalues.
3054
3055 * init.c (build_new): Remove unused variable.
3056
3057 1999-10-04 Mark Mitchell <mark@codesourcery.com>
3058
3059 * cp-tree.h (struct language_function): Remove static_labelno.
3060 (static_labelno): Remove macro.
3061 * method.c (build_overload_nested_name): Make static_labelno
3062 static here.
3063
3064 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
3065 to decide whether or not a function is defined.
3066
3067 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
3068 situations where make_node will do it automatically.
3069 * decl.c (grok_reference_init): Likewise.
3070 (expand_static_init): Likewise.
3071 (do_static_initialization): Likewise.
3072 * init.c (perform_member_init): Likewise.
3073 (expand_aggr_init_1): Likewise.
3074 (build_new_1): Likewise.
3075 * method.c (do_build_copy_constructor): Likewise.
3076 (do_build_assign_ref): Likewise.
3077 * search.c (expand_upcast_fixups): Likewise.
3078 * semantics.c (finish_stmt_expr): Likewise.
3079 * typeck.c (build_unary_op): Likewise.
3080 (check_return_expr): Likewise.
3081
3082 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
3083
3084 * init.c (build_vec_delete_1): Fold COND_EXPRs.
3085
3086 1999-10-03 Mark Mitchell <mark@codesourcery.com>
3087
3088 * cp-tree.def (VEC_INIT_EXPR): Remove.
3089 * cp-tree.h (struct stmt_tree): New type.
3090 (struct saved_scope): Remove firstobj. Add x_saved_tree,
3091 x_stmt_tree.
3092 (class_cache_firstobj): Remove.
3093 (struct language_function): Remove stmts_are_full_exprs_p,
3094 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
3095 (current_stmt_tree): New macro.
3096 (last_tree): Adjust.
3097 (last_expr_type): Likewise.
3098 (doing_semantic_analysis_p): Simplify.
3099 (stmts_are_full_exprs_p): Adjust.
3100 (begin_tree): Remove prototype.
3101 (end_tree): Likewise.
3102 (begin_stmt_tree): Change prototype.
3103 (finish_stmt_tree): Likewise.
3104 (building_stmt_tree): Simplify.
3105 * decl.c (mark_stmt_tree): New function.
3106 (mark_saved_scope): Use it.
3107 (start_function): Rearrange slightly to call begin_stmt_tree
3108 earlier.
3109 (save_function_data): Tweak.
3110 (finish_function): Adjust call to finish_stmt_tree.
3111 (mark_lang_function): Use mark_stmt_tree.
3112 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3113 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3114 (build_vec_init): Remove creation of stand-in intializer.
3115 * pt.c (begin_tree): Remove.
3116 (end_tree): Likewise.
3117 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
3118 (begin_compound_stmt): Handle a compound-statement outside of a
3119 function.
3120 (begin_stmt_expr): Handle a statement-expression outsidef of a
3121 function.
3122 (finish_stmt_expr): Likewise.
3123 (begin_class_definition): Don't call begin_tree.
3124 (finish_inline_definitions): Don't call end_tree.
3125 (begin_stmt_tree): Take a pointer to tree, not a function as input.
3126 (finish_stmt_tree): Likewise.
3127 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3128 (mapcar): Likewise.
3129
3130 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3131 * parse.c: Regenerated.
3132
3133 * dump.c (dqueue_and_dump): Dump bitfieldness.
3134
3135 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3136 bitfields, rather than DECL_BIT_FIELD.
3137 * ir.texi: Document how to tell whether or not a field is a
3138 bitfield.
3139
3140 * lex.c (make_lang_type): Fix typo in comment.
3141
3142 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
3143
3144 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3145
3146 1999-10-01 Mark Mitchell <mark@codesourcery.com>
3147
3148 * pt.c (tsubst_decl): If the type of a template instantiation is
3149 bogus, so is the whole instantiation.
3150
3151 1999-09-30 Mark Mitchell <mark@codesourcery.com>
3152
3153 * decl.c (initialize_local_var): Handle static variables here.
3154 (cp_finish_decl): Tweak handling of function-scope static
3155 variables.
3156 * semantics.c (expand_stmt): Handle DECL_STMTs for static
3157 variables.
3158
3159 * method.c (emit_thunk): Don't crash when -fsyntax-only.
3160
3161 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3162 global_dtor_p. Add init_priority.
3163 (DECL_ACCESS): Adjust accordingly.
3164 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3165 (GLOBAL_INIT_PRIORITY): Likewise.
3166 * decl.c (lang_mark_tree): Adjust accordingly.
3167 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
3168 and GLOBAL_INIT_PRIORITY.
3169 * dump.c (dequeue_and_dump): Print them.
3170 * ir.texi: Document them.
3171
3172 * decl2.c (struct priority_info_s): Remove initialization_sequence
3173 and destruction_sequence.
3174 (start_static_storage_duration_function): Return the body of the
3175 function. Convert for function-at-a-time mode.
3176 (generate_inits_for_priority): Remove.
3177 (finish_static_storage_duration_function): Change prototype.
3178 Adjust for function-at-a-time mode.
3179 (do_static_initialization): Likewise.
3180 (do_static_destruction): Likewise.
3181 (do_static_initialization_and_destruction): Remove.
3182 (start_static_initialization_or_destruction): New function.
3183 (finish_static_initialization_or_destruction): Likewise.
3184 (get_priority_info): Don't manipulation initialization_sequence or
3185 destruction_sequence.
3186 (prune_vars_needing_no_initialization): New function.
3187 (write_out_vars): Likewise.
3188 (finish_file): Use the various new functions instead of the old.
3189
3190 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
3191
3192 * cp-tree.h (warn_float_equal): Declare.
3193 * decl2.c (warn_float_equal): Define.
3194 (lang_decode_option): Recognize -W[no-]float-equal.
3195 * typeck.c (build_binary_op_nodefault): Conditionally warn
3196 about equality tests of floating point types.
3197
3198 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
3199
3200 Support normal type_info-based EH mechanisms with -fno-rtti.
3201 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3202 (build_eh_type_type_ref): Likewise.
3203 (build_eh_type): Remove.
3204 (expand_throw): Call build_eh_type_type, not build_eh_type.
3205 * decl2.c (import_export_decl): Don't associate the tinfo fn with
3206 the vtable if -fno-rtti.
3207 * decl.c (init_decl_processing): Always init_rtti_processing.
3208
3209 * rtti.c (get_typeid): Don't complain about -fno-rtti.
3210
3211 * class.c (class_cache_obstack, class_obstack): Remove.
3212 (init_class_processing): Don't initialize class_obstack.
3213 (push_cache_obstack): Remove.
3214 (pushclass): Don't call it.
3215 * cp-tree.h: Remove prototype for push_cache_obstack.
3216 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3217 (pushlevel_class): Don't push_decl_level.
3218 (poplevel_class): Don't pop_stack_level.
3219 (push_class_level_binding): Don't push_cache_obstack.
3220 (init_decl_processing): Don't intialize decl_obstack.
3221 * search.c (push_class_decls): Don't push_cache_obstack.
3222 * tree.c (list_hash_add): Put hash node on permanent_obstack.
3223 (hash_tree_cons): Don't mess with obstacks.
3224 (print_lang_statistics): Don't print stats for class_obstack and
3225 decl_obstack.
3226
3227 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3228
3229 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3230 * ir.texi: Document DECL_EXTERNAL.
3231
3232 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3233 * ir.texi: Document THUNK_DECLs.
3234
3235 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3236 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3237 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3238 * error.c (dump_template_bindings): Remove unused parameter.
3239 Handle multiple levels of template parameters.
3240 (dump_template_decl): Use `parms', not `args', for template
3241 parameters. Fix thinko.
3242 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
3243 flags to dump_template_bindings.
3244 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3245 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3246 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3247 (tsubst_copy): Clarify variable name.
3248 (most_general_template): Robustify.
3249
3250 1999-09-29 Nathan Sidwell <nathan@acm.org>
3251
3252 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3253 to change primary template rendering.
3254
3255 1999-09-29 Mark Mitchell <mark@codesourcery.com>
3256
3257 * cp-tree.h (UPT_TEMPLATE): Remove.
3258 (UPT_PARMS): Likewise.
3259 (DECL_NEEDED_P): New macro.
3260 * decl2.c (finish_vtable_vardecl): Use it.
3261 (finish_objects): Don't crash with -fsyntax-only.
3262 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
3263 -fsyntax-only.
3264 * pt.c (tsubst_friend_function): Remove FIXME that talks about
3265 obstacks.
3266 (tsubst_expr): Correct handling of function try-blocks.
3267 * semantics.c: Include flags.h.
3268 (expand_body): Don't do RTL generation if -fsyntax-only.
3269 * Makefile.in (semantics.o): Depends on flags.h.
3270
3271 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
3272
3273 * pt.c (most_general_template): Adjust declaration.
3274
3275 * cp-tree.h: (most_general_template): Declare.
3276
3277 * error.c (dump_template_value): Rename to ...
3278 (dump_template_argument): This.
3279 (dump_template_argument_list): New function.
3280 (dump_type): Use it.
3281 (dump_template_parameter): New function.
3282 (dump_template_decl): Use it.
3283 (dump_template_bindings): New function.
3284 (dump_function_decl): Use it. Pretty print function template
3285 instantiations.
3286
3287 1999-09-28 Nathan Sidwell <nathan@acm.org>
3288
3289 * decl.c (grokdeclarator): Distinguish parameter context for
3290 diagnostics. Tidy up missing type diagnostic.
3291 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3292
3293 1999-09-28 Mark Mitchell <mark@codesourcery.com>
3294
3295 * ir.texi: Improve documentation for TARGET_EXPR.
3296
3297 1999-09-27 Nathan Sidwell <nathan@acm.org>
3298
3299 Augment stringification of trees.
3300 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3301 (fndecl_as_string, type_as_string_real, args_as_string,
3302 code_as_string, language_as_string, parm_as_string,
3303 op_as_string, assop_as_string, cv_as_string): Remove.
3304 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3305 (context_as_string): Declare new function.
3306 * error.c (cp_printers): Move definition.
3307 (OB_UNPUT): Remove.
3308 (OB_END_TEMPLATE_ID): Adjust.
3309 (interesting_scope_p): Remove.
3310 (dump_scope): New static function.
3311 (dump_qualifiers): Adjust prototype, reimplement.
3312 (dump_template_value): Use tree_string_flags.
3313 (dump_type_real): Move back to dump_type.
3314 (dump_type): Adjust prototype. Use tree_string_flags.
3315 (dump_aggr_type): Likewise. Use dump_template_parms.
3316 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3317 Return pad flag.
3318 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3319 (dump_simple_decl): Likewise.
3320 (dump_decl): Likewise. Use dump_template_decl.
3321 (dump_template_decl): New static function broken out of dump_decl.
3322 (dump_function_decl): Adjust prototype. Use tree_string_flags.
3323 (dump_parameters): Likewise. Prefix space.
3324 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3325 (dump_function_name): Likewise. Use dump_template_parms.
3326 (dump_template_parms): New static function broken out of
3327 dump_function_name.
3328 (dump_expr_list): Adjust prototype. Use tree_string_flags.
3329 (dump_expr): Likewise.
3330 (fndecl_as_string): Removed
3331 (type_as_string_real): Removed
3332 (dump_binary_op): Adjust prototype. Use tree_string_flags.
3333 (dump_unary_op): Likewise.
3334 (type_as_string): Likewise.
3335 (expr_as_string): Likewise.
3336 (decl_as_string): Likewise.
3337 (context_as_string): New function.
3338 (lang_decl_name): Adjust.
3339 (decl_to_string): New static print callback.
3340 (expr_to_string): Likewise.
3341 (fndecl_to_string): Likewise.
3342 (code_as_string): Renamed to ...
3343 (code_to_string): ... here. Adjust.
3344 (language_as_string): Renamed to ...
3345 (language_to_string): ... here. Adjust.
3346 (parm_as_string): Renamed to ...
3347 (parm_to_string): ... here.
3348 (op_as_string): Renamed to ...
3349 (op_to_string): ... here.
3350 (assop_as_string): Renamed to ...
3351 (assop_to_string): ... here.
3352 (type_to_string): New static print callback.
3353 (args_as_string): Renamed to ...
3354 (args_to_string): ... here. Adjust.
3355 (cv_as_string): Renamed to ...
3356 (cv_to_string): ... here. Adjust.
3357 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3358 (print_template_context): Likewise.
3359
3360 1999-09-26 Mark Mitchell <mark@codesourcery.com>
3361
3362 * cp-tree.h (expand_throw): Remove prototype.
3363 * except.c (expand_throw): Make it static. Use tree-generation
3364 functions, rather than RTL-generation functions.
3365 (build_throw): Use it.
3366 * expr.c: Include except.h.
3367 (cplus_expand_expr): Don't call expand_throw here.
3368 * Makefile.in (expr.o): Depend on except.h.
3369 * ir.texi: Update documentation for THROW_EXPR.
3370
3371 * decl.c (start_function): Set x_dont_save_pending_sizes rather
3372 than calling get_pending_sizes.
3373 * init.c (build_new): Don't save and restore
3374 immediate_size_expand; instead, assert that it has the expected
3375 value already.
3376
3377 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3378
3379 * lex.c (compiler_error): Add missing call to va_end().
3380
3381 1999-09-25 Mark Mitchell <mark@codesourcery.com>
3382
3383 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3384 * ir.texi: Document RESULT_DECL and DECL_RESULT.
3385
3386 * cp-tree.h (check_return_expr): New function.
3387 * decl.c (finish_constructor_body): New function.
3388 (pushdecl): Put global friend functions in namespace binding
3389 level, not the class binding level.
3390 (finish_destructor_body): Make sure the dtor_label is always
3391 defined. Fix typo in comment.
3392 (finish_function): Move generation of constructor-termination code
3393 to semantic-analysis time. Move generation of implicit `main'
3394 return value to semantic-analysis time.
3395 * semantics.c (finish_return_stmt): Generate goto's to
3396 ctor_label/dtor_label here. Use check_return_expr to do semantic
3397 analysis on the returned expression.
3398 * typeck.c (maybe_warn_about_returning_address_of_local): New
3399 function split out from c_expand_return.
3400 (check_return_expr): Likewise.
3401 (c_expand_return): Just generate the RTL for the return.
3402
3403 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3404
3405 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3406 (cleanup_type): Likewise.
3407 (search_tree): Change prototype.
3408 * decl.c (local_variable_p): Adjust for new interface to
3409 search_tree.
3410 (check_default_argument): Likewise.
3411 * error.c (dump_expr): Handle INIT_EXPR.
3412 * except.c (expand_throw): Don't make cleanup_type a local static.
3413 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3414 * init.c (build_new): Call build_new_1 directly, rather than
3415 building a NEW_EXPR.
3416 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
3417 processing file-scope initializers.
3418 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3419 * tree.c: Include splay-tree.h
3420 (no_linkage_helper): Adjust for new interface to search_tree.
3421 (search_tree): Pass around pointers to tree nodes, rather than the
3422 nodes themselves. Handle VEC_INIT_EXPR.
3423 (no_linkage_check): Adjust for new interface to search_tree.
3424 (mapcar): Handle VEC_INIT_EXPR.
3425 (target_remap): New variable.
3426 (bot_manip): Use it.
3427 (bot_replace): New function.
3428 (break_out_target_exprs): Use it to remap all variables used in a
3429 default argument expression.
3430 * typeck.c (build_modify_expr): Don't crash when outside a
3431 function and presented with an INIT_EXPR assignment
3432 * Makefile.in (tree.o): Depend on splay-tree.h.
3433
3434 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3435
3436 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3437 DECL_BUILT_IN.
3438 (builtin_function): New arg CLASS. Arg CODE now of type int. All
3439 callers changed.
3440 Set the builtin's DECL_BUILT_IN_CLASS.
3441
3442 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3443
3444 * decl.c (pushdecl): Don't make local declarations of extern
3445 variables give the variable a DECL_CONTEXT for the function.
3446 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
3447 Don't accidentally make RTL for local declarations.
3448 (emit_local_var): Handle declarations with asm-specifiers here.
3449
3450 1999-09-23 Mark Mitchell <mark@codesourcery.com>
3451
3452 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
3453 STMT_IS_FULL_EXPR_P.
3454
3455 * cp-tree.h (language_function): Add cannot_inline.
3456 * decl.c (start_function): Restore current_function_cannot_inline
3457 from the saved value.
3458 (save_function_data): Save current_function_cannot_inline.
3459 * decl2.c (start_objects): Change prototype. Build the function
3460 in function-at-a-time mode.
3461 (finish_objects): Likewise.
3462 (generate_ctor_or_dtor_function): Adjust accordingly.
3463
3464 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3465 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3466 Don't call expand_anon_union_decl here
3467 * semantics.c (exapnd_stmt): Call it here, instead.
3468 * typeck.c (mark_addressable): Addressed variables are implicitly
3469 used.
3470
3471 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3472
3473 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3474 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3475 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3476 * cp-tree.h: Add tree checking macros to various tree access
3477 macros.
3478 * ptree.c (print_lang_decl): Test for function or variable
3479 before accessing template info.
3480
3481 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
3482
3483 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3484 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3485 * decl2.c (lang_f_options): Add -fshort-wchar.
3486 * cp-tree.h: Declare flag_short_wchar.
3487 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
3488 int' for wchar_t.
3489
3490 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3491
3492 * ir.texi: Fix formatting errors and typos.
3493
3494 1999-09-22 Mark Mitchell <mark@codesourcery.com>
3495
3496 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3497
3498 * decl.c (pushdecl): Do create a binding for extern "C" functions,
3499 but not for their DECL_ASSEMBLER_NAMEs.
3500 (lookup_name_current_level): Fix formatting.
3501 (xref_tag): Likewise.
3502 * decl2.c (start_objects): Mark static constructors and
3503 destructors as used.
3504
3505 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
3506
3507 * decl.c (define_case_label): Don't crash if we're not in a switch.
3508
3509 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3510 * lang-options.h: Restore -fthis-is-variable. Remove help strings
3511 for unsupported flags.
3512
3513 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
3514
3515 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3516 Accept and warn about -fthis-is-variable.
3517
3518 1999-09-21 Mark Mitchell <mark@codesourcery.com>
3519
3520 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3521 CLEANUP_STMT, and SCOPE_STMT.
3522
3523 * decl2.c (lang_decode_option): Adjust, in the wake of recent
3524 changes to option processing.
3525
3526 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3527
3528 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3529 function pointer from pmfs with no object given.
3530 (convert_for_assignment): Do not return error when converting
3531 pmfs.
3532
3533 1999-09-21 Alex Samuel <samuel@codesourcery.com>
3534
3535 * lex.c (internal_filename): New variable.
3536 (INTERNAL_FILENAME): New macro.
3537 (init_parse): Allocate internal_filename and mark as root. Use it
3538 instead of a string constant.
3539
3540 1999-09-21 Nathan Sidwell <nathan@acm.org>
3541
3542 Reimplement dynamic cast and catch matching.
3543 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3544 * search.c (dynamic_cast_base_recurse): New function.
3545 (get_dynamic_cast_base_type): New function for dynamic cast.
3546 * rtti.c (build_dynamic_cast_1): Determine source and target
3547 class relationship. Call __dynamic_cast_2.
3548 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3549 (__user_type_info::dyncast): New dynamic cast dispatcher.
3550 (__user_type_info::sub_kind): New nested enumeration.
3551 (__user_type_info::contained_p): sub_kind predicate.
3552 (__user_type_info::contained_public_p): Likewise.
3553 (__user_type_info::contained_nonpublic_p): Likewise.
3554 (__user_type_info::contained_nonvirtual_p: Likewise.
3555 (__user_type_info::upcast_result): New nested struct.
3556 (__user_type_info::dyncast_result): New nested struct.
3557 (*::do_upcast): New catch function.
3558 (*::do_dyncast): New dynamic cast function.
3559 (__user_type_info::find_public_subobj): New dynamic cast
3560 helper dispatcher.
3561 (*::do_find_public_subobj): New dynamic cast helper function.
3562 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3563 (__user_type_info::dyncast): Define dynamic cast dispatcher.
3564 (*::do_upcast): Define catch function.
3565 (*::do_dyncast): Define dynamic cast function.
3566 (*::do_find_public_subobj): Define dynamic cast helper function.
3567 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3568 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3569 (__dynamic_cast_2): New dynamic cast runtime.
3570
3571 1999-09-20 Mark Mitchell <mark@codesourcery.com>
3572
3573 * cp-tree.h (finish_stmt_expr): Change prototype.
3574 * expr.c (cplus_expand_expr): Adjust call accordingly.
3575 * init.c (finish_init_stmts): Likewise.
3576 * parse.y (primary): Likewise.
3577 * pt.c (tsubst_copy): Likewise.
3578 * semantics.c (finish_stmt_expr): Don't take two parameters.
3579 Don't remove generated BLOCKs from the block-tree.
3580
3581 Remove support for assigning to `this'.
3582 * NEWS: Note that fact.
3583 * class.c (build_vbase_path): Don't check flag_this_is_variable.
3584 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3585 (language_function): Remove assigns_this, just_assigned_this, and
3586 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
3587 (base_init_expr): Remove.
3588 (current_vcalls_possible_p): New macro.
3589 (vtbls_set_up_p): Likewise.
3590 (emit_base_init): Change prototype.
3591 * decl.c (finish_destructor_body): New function, split out from
3592 finish_function.
3593 (current_function_assigns_this): Remove.
3594 (current_function_just_assigned_this): Likewise.
3595 (start_function): Don't set them.
3596 (finish_function): Don't check them. Don't emit
3597 base-initialization code here. Generate code for destructors when
3598 doing semantic analysis.
3599 (finish_stmt): Don't check current_function_just_assigned_this.
3600 * decl2.c (lang_f_options): Remove this-is-variable.
3601 (lang_decode_option): Likewise.
3602 (grokclassfn): Don't check flag_this_is_variable.
3603 * init.c (emit_base_init): Return the expression generated.
3604 (construct_virtual_bases): Don't push/pop obstacks. Fix
3605 typo.
3606 (build_new_1): Don't check flag_this_is_variable.
3607 (get_temp_regvar): Don't set DECL_REGISTER.
3608 (build_vec_init): Don't call use_variable.
3609 * lang-options.h: Remove "-fthis-is-variable" and
3610 "-fno-this-is-variable".
3611 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3612 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3613 expand_expr_stmt.
3614 * semantics.c (finish_expr_stmt_real): Rename to ...
3615 (finish_expr_stmt): This. Remove assigned_this parameter.
3616 (begin_if_stmt): Call do_pushlevel before starting the statement.
3617 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3618 blocks.
3619 (setup_vtbl_ptr): Emit initialization code for bases and members
3620 at semantic-analysis time. Emit code to initialize vtables in
3621 destructors here.
3622 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3623 Don't handle CTOR_INITIALIZER any more.
3624 * typeck.c (build_modify_expr): Don't check for assignments to
3625 this.
3626 (c_expand_return): Don't suggest assigning to `this'.
3627
3628 * Makefile.in (decl.o): Depend on RTL_H.
3629 (decl2.o): Likewise.
3630 (class.o): Likewise.
3631 (call.o): Likewise.
3632 (method.o): Likewise.
3633 (search.o): Likewise.
3634 (tree.o): Likewise.
3635 (pt.o): Likewise.
3636
3637 * decl.c (duplicate_decls): When a builtin function is redeclared
3638 as static, make sure it is mangled correctly.
3639
3640 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
3641 detail about the statement-tree.
3642
3643 1999-09-20 Nathan Sidwell <nathan@acm.org>
3644
3645 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3646
3647 1999-09-20 Nick Clifton <nickc@cygnus.com>
3648
3649 * decl2.c (lang_decode_option): Extend comment.
3650
3651 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3652
3653 * typeck.c: Include "tm_p.h".
3654
3655 1999-09-19 Mark Mitchell <mark@codesourcery.com>
3656
3657 * ir.texi: New file.
3658
3659 1999-09-19 Paul Burchard <burchard@pobox.com>
3660
3661 * semantics.c (expand_stmt): Initialize return value.
3662
3663 1999-09-18 Paul Burchard <burchard@pobox.com>
3664
3665 * gxxint.texi: G++ now implements namespaces.
3666
3667 1999-09-18 Mark Mitchell <mark@codesourcery.com>
3668
3669 * decl.c (pop_label): Don't warn about unused labels more than
3670 once.
3671 * semantics.c (finish_goto_stmt): Always marked used labels as
3672 used.
3673
3674 * decl.c (layout_var_decl): Change prototype. Call layout_decl
3675 even when the declaration is external.
3676 (cp_finish_decl): Adjust call to layout_var_decl.
3677 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3678
3679 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3680
3681 * typeck.c (get_member_function_from_ptrfunc): Always consider
3682 virtuality inside member pointer.
3683
3684 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3685
3686 Turn on function-at-a-time processing.
3687 * cp-tree.h (doing_semantic_analysis_p): New macro.
3688 (SF_DEFAULT): Define to zero, not SF_EXPAND.
3689 (start_handler_parms): Change prototype.
3690 (expand_start_catch_block): Likewise.
3691 (expand_end_catch_block): Likewise.
3692 (expand_start_eh_spec): Likewise.
3693 (expand_end_eh_spec): Declare.
3694 (finish_handler_parms): Change prototype.
3695 (begin_catch_block): Declare.
3696 (finish_handler): Change prototype.
3697 (do_pushlevel): Declare.
3698 (do_poplevel): Likewise.
3699 * decl.c (pushlevel): Don't create
3700 binding levels when not doing semantic analysis.
3701 (poplevel): Don't pop them.
3702 (pushdecl): Assert that we are never called when not doing
3703 semantic analysis.
3704 (pushdecl_top_level): Use push_to_top_level.
3705 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
3706 label when expanding.
3707 (cp_finish_decl): Only inject for-scope variables when doing
3708 semantic analysis. Add comments.
3709 (start_handler_parms): Return the handler parm.
3710 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
3711 already set. Reinitialize from saved function data if available.
3712 Don't pushlevel when not doing semantic analysis.
3713 (store_parm_decls): Only generate RTL when expanding. Only
3714 pushdecl when doing semantic analysis. Set
3715 current_eh_spec_try_block if appropriate.
3716 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
3717 Combine common code. Don't poplevel when not doing semantic
3718 analysis.
3719 (push_cp_function_context): Don't expand functions without an
3720 explicit call to expand_body.
3721 (mark_lang_function): Make eh_spec_try_block and
3722 x_scope_stmt_stack.
3723 * except.c (expand_end_eh_spec): Don't
3724 declare.
3725 (process_start_catch_block): Likewise.
3726 (push_eh_cleanup): Use finish_decl_cleanup.
3727 (initialize_handler_parm): New function.
3728 (expand_start_catch_block): Use it.
3729 (expand_end_catch_block): Use tree-generation functions, not
3730 RTL-generation functions.
3731 (expand_start_eh_spec): Likewise.
3732 (expand_end_eh_spec): Likewise.
3733 (expand_exception_blocks): Simplify.
3734 (start_anon_func): Use do_pushlevel.
3735 (end_anon_func): Use do_poplvel. Call expand_body for the
3736 function.
3737 * expr.c (do_case): Don't call define_case_label.
3738 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3739 variables.
3740 * method.c (emit_thunk): Call expand_body for the
3741 thunk.
3742 (sythesize_method): Likewise.
3743 * parse.y (handler_args): Give it ttype.
3744 (eat_saved_input): Call expand_body.
3745 (base_init): Use do_pushlevel.
3746 (pending_inline): Call expand_body.
3747 (handler): Adjust calls to finish_handler_parms and
3748 finish_handler.
3749 (handler_args): Don't call expand_start_catch_block. Return the
3750 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3751 * parse.c: Regenerated.
3752 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3753 * semantics.c (do_pushlevel): Give it external linkage. Build
3754 SCOPE_STMTs.
3755 (do_poplevel): Likewise.
3756 (finish_case_label): Call define_case_label when doing semantic
3757 analysis.
3758 (finish_goto_stmt): Create RTL for labels.
3759 (finish_function_try_block): Set in_function_try_handler
3760 unconditionally.
3761 (finish_function_handler_sequence): Unset it.
3762 (finish_handler_parms): Use expand_start_catch_block even when
3763 building a statement-tree.
3764 (begin_catch_block): New function.
3765 (finish_handler): Move a little RTL-generation logic here.
3766 (finish_decl_cleanup): Allow cleanups for empty declarations.
3767 (finish_named_return_value): Don't pushdecl when not doing
3768 semantic analysis.
3769 (expand_stmt): Don't do semantic analysis for variable
3770 declarations. Handle START_CATCH_STMT. Call expand_label
3771 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3772 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3773 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3774 RETURN_INIT and function try blocks.
3775
3776 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3777 x_scope_stmt_stack. Add x_in_charge_parm.
3778 (current_eh_spec_try_block): New macro.
3779 (current_scope_stmt_stack): Likewise.
3780 (current_in_charge_parm): Likewise.
3781 * decl.c (start_function): Initialize current_in_charge_parm.
3782 (finish_function): Use current_in_charge_parm rather than looking
3783 up __in_chrg.
3784 * search.c (expand_indirect_vtbls_init): Likewise.
3785
3786 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3787 (TRY_BLOCK): Likewise.
3788 (HANDLER): Likewise.
3789 (START_CATCH_STMT): New tree node.
3790 (SCOPE_STMT): Likewise.
3791 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3792 (SCOPE_NULLIFIED_P): Likewise.
3793 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3794 (struct lang_decl): Add saved_language_function.
3795 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3796 (DECL_PENDING_INLINE_P): New macro.
3797 (TYPE_TI_ARGS): Fix typo in comment.
3798 (DECL_SAVED_TREE): Add to documentation.
3799 (DECL_SAVED_FUNCTION_DATA): New macro.
3800 (START_CATCH_TYPE): Likewise.
3801 (SCOPE_END_P): New macro.
3802 (declare_parm_level): Don't declare.
3803 * decl.c (mark_lang_function): New function, split out from
3804 mark_cp_function_context.
3805 (save_function_data): New function.
3806 (declare_parm_level): Remove.
3807 (finish_function): Use save_function_data to squirrel away
3808 important stuff for later use.
3809 (mark_cp_function_context): Use mark_function_data.
3810 (lang_mark_tree): Likewise.
3811 * lex.c (begin_definition_of_inclass_inline): Set
3812 DECL_PENDING_INLINE_P.
3813 (store_pending_inline): Clear it.
3814 * pt.c (tsubst_decl): Likewise.
3815
3816 1999-09-17 Nathan Sidwell <nathan@acm.org>
3817
3818 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3819
3820 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3821
3822 * decl.c (warn_extern_redeclared_static): Don't get confused by
3823 static member functions.
3824 (duplicate_decls): Merge DECL_THIS_STATIC.
3825
3826 * decl.c (expand_static_init): Make sure assignments to local
3827 statics actually occur.
3828
3829 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3830
3831 * cp-tree.h (poplevel_class): Declare.
3832 * class.c (popclass): Use poplevel_class, not poplevel.
3833 * decl.c (poplevel_class): Don't make it static. Don't return a
3834 value.
3835 (poplevel): Don't call poplevel_class; abort in a class
3836 binding level is seen.
3837 * semantics.c (finish_translation_unit): Use pop_everything.
3838 * parse.y (member_init): Allow errors.
3839 (pending_inline): Call finish_function.
3840 * parse.c: Regenerated.
3841 * Makefile.in (CONFLICTS): Adjust.
3842
3843 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3844
3845 * error.c: Reduce code duplication.
3846 (dump_template_value): New function.
3847 (dump_type_real): Use it.
3848 (dump_decl): Likewise.
3849 (dump_function_name): Likewise.
3850 (dump_function_decl): Don't be too talkative about function return
3851 type variety.
3852
3853 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3854
3855 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3856
3857 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3858
3859 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3860
3861 * decl2.c (finish_file): Also call check_global_declarations for
3862 the pending_statics list.
3863
3864 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3865
3866 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3867 in header files.
3868
3869 1999-09-15 Richard Henderson <rth@cygnus.com>
3870
3871 * lex.c (mark_impl_file_chain): Follow the next chain.
3872
3873 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3874
3875 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3876 problems with extern "C" functions redeclared as static.
3877 (duplicate_decls): When a builtin is redeclared static, make the
3878 new function have internal linkage.
3879
3880 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3881
3882 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3883 * pt.c (tsubst_copy): Likewise.
3884 * tree.c (search_tree): Likewise.
3885 (mapcar): Likewise.
3886
3887 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3888
3889 * typeck2.c (ack): Don't declare progname.
3890
3891 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3892
3893 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3894 filenames with ggc_alloc_string.
3895
3896 1999-09-14 Mark Mitchell <mark@codesourcery.com>
3897
3898 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
3899 TARGET_EXPR.
3900 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3901 the TARGET_EXPR.
3902 * cvt.c (build_up_reference): Likewise.
3903 * tree.c (build_cplus_new): Likewise.
3904 (get_target_expr): Likewise.
3905
3906 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
3907
3908 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
3909
3910 1999-09-13 Mark Mitchell <mark@codesourcery.com>
3911
3912 * cp-tree.h (build_target_expr): New function.
3913 * call.c (build_conditional_expr): Use build_target_expr.
3914 (convert_like): Likewise.
3915 (build_over_call): Likewise.
3916 * cvt.c (build_up_reference): Likewise.
3917 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3918 (destroy_local_var): Here.
3919 (build_target_expr): New function.
3920 * tree.c (build_cplus_new): Use it.
3921 (get_target_expr): Likewise.
3922
3923 1999-09-13 Nathan Sidwell <nathan@acm.org>
3924
3925 * typeck.c (expr_sizeof): Don't decay arrays and functions.
3926 Remove misleading comment.
3927 (build_compound_expr): Don't decay arrays.
3928
3929 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
3930
3931 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3932 class rvalues again.
3933
3934 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3935
3936 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3937
3938 * g++spec.c: Include gcc.h.
3939 (lang_specific_driver): Constify a char*. Call xcalloc, not
3940 xmalloc/bzero. All calls to the function pointer parameter now
3941 explicitly call `fatal'.
3942
3943 1999-09-12 Mark Mitchell <mark@codesourcery.com>
3944
3945 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
3946 * cvt.c (ocp_convert): Complete the from and destination types.
3947 Adjust warning about functions always being `true' in conditionals.
3948 * decl.c (duplicate_decls): Don't play funny games with abort.
3949 * error.c (dump_expr): Handle OVERLOADs.
3950 * spew.c (probe_obstack): Remove.
3951 * typeck.c (condition_conversion): Use perform_implicit_conversion.
3952
3953 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
3954
3955 * cp-tree.h (auto_function, define_function): Adjust prototypes.
3956 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
3957 changed.
3958 (auto_function): Likewise, for CODE arg.
3959 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3960 (builtin_function): ... here.
3961
3962 1999-09-11 Mark Mitchell <mark@codesourcery.com>
3963
3964 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3965 (init_decl_processing): Don't set TREE_PERMANENT for the
3966 error_mark_node.
3967 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3968 (grokdeclarator): Likewise.
3969 (grokparms): Don't check TREE_PERMANENT when building up lists.
3970 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3971 (mark_inline_for_output): Likewise.
3972 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3973 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3974 * lex.c (check_newline): Don't check ggc_p; it is always one.
3975 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3976 * spew.c (yylex): Don't copy_node or probe_obstacks for
3977 non-permanent CONSTANTs and STRINGs.
3978 * tree.c (build_cplus_array_type_1): Don't fuss with
3979 TREE_PERMANENT on ARRAY_TYPEs.
3980
3981 * cp-tree.def (CLEANUP_STMT): New node.
3982 * cp-tree.h (language_function): Add name_declared.
3983 (current_function_name_declared): New macro.
3984 (CLEANUP_DECL): New macro.
3985 (CLEANUP_EXPR): Likewise.
3986 (emit_local_var): Likewise.
3987 (finish_decl_cleanup): New function.
3988 * cvt.c (build_up_reference): Simplify.
3989 (ocp_convert): Remove dead code.
3990 * decl.c (start_decl): Remove call to add_decl_stmt.
3991 (grok_reference_init): Adjust, to handle bindings temporaries to
3992 references. Remove dead code.
3993 (initialize_local_var): Don't generate RTL for
3994 declarations here, or build cleanups here. Don't fuss with
3995 obstacks. Replace expand_start_target_temps calls with explicit
3996 setting of stms_are_full_exprs_p.
3997 (destroy_local_var): New function.
3998 (emit_local_var): Likewise.
3999 (cp_finish_decl): Use them, as appropriate.
4000 (start_function): Announce template functions.
4001 (store_parm_decls): Don't call declare_function_name here.
4002 (finish_stmt): Don't start emit base-initialization code when just
4003 building the statement-tree.
4004 * init.c (create_temporary_var): Move add_decl_stmt call ...
4005 (get_temp_regvar): Here.
4006 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
4007 cp_finish_decl would expect. Don't call add_decl_stmt.
4008 * semantics.c (begin_compound_stmt): Call declare_function_name,
4009 if appropriate.
4010 (finish_decl_cleanup): New function.
4011 (expand_stmt): Use emit_local_var to output variables.
4012 (expand_body): Set current_funtion_name_declared.
4013
4014 1999-09-10 Mark Mitchell <mark@codesourcery.com>
4015
4016 * cp-tree.h (finish_cleanup_try_block): New function.
4017 * semantics.c (finish_cleanup_try_block): Add comment.
4018
4019 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
4020
4021 * cp-tree.h: Delete declarations for all tree nodes now moved to
4022 global_trees.
4023 * decl.c: Delete their definitions.
4024 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
4025 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
4026 provide defaults.
4027 (init_decl_processing): Call build_common_tree_nodes and
4028 build_common_tree_nodes_2 instead of building their nodes here.
4029 Don't add gc roots for them.
4030
4031 1999-09-10 Mark Mitchell <mark@codesourcery.com>
4032
4033 * cp-tree.h (language_function): Rename expanding_p to
4034 x_expanding_p. Rename named_label_uses to x_named_label_uses.
4035 (expanding_p): Adjust accordingly.
4036 (TREE_VIA_PRIVATE): Fix typo in comment.
4037 (DECL_REFERENCE_SLOT): Remove.
4038 (SET_DECL_REFERENCE_SLOT): Likewise.
4039 * decl.c (named_label_uses): Adjust. Remove chicken comment.
4040 (push_overloaded_decl): Don't truncate the chain of bindings when
4041 adding an overloaded function.
4042 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
4043 (initialize_local_var): Fix typo in comment.
4044 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
4045 * decl2.c (start_objects): Make the fact that we are expanding
4046 the generated function right away explicit.
4047 (start_static_storage_duration_function): Likewise.
4048 (finish_file): Fix typo in comment.
4049 * init.c (build_vec_init): Correct bugs in handling cleanups.
4050 * semantics.c (maybe_convert_cond): New function.
4051 (FINISH_COND): Always store the condition, even if there's
4052 a declaration.
4053 (finish_if_stmt_cond): Use maybe_convert_cond.
4054 (finish_while_stmt_cond): Likewise.
4055 (finish_do_stmt): Likewise.
4056 (finish_for_cond): Likewise.
4057 (expand_cond): Adjust.
4058
4059 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
4060 * init.c (perform_member_init): Remove obstack machinations.
4061 (expand_cleanup_for_base): Likewise.
4062 (finish_init_stmts): Mark the statement-expression as used.
4063 * method.c (emit_thunk): Use tree-generating functions, not
4064 RTL.
4065 (do_build_copy_constructor): Likewise.
4066 (do_build_assign_ref): Likewise.
4067 (synthesize_method): Likewise. Keep track of line numbers.
4068 * pt.c (tsubst_expr): Handle various kinds of try blocks.
4069 * semantics.c (expand_stmts): Remove.
4070 (begin_function_try_block): Set FN_TRY_BLOCK_P.
4071 (finish_function_try_block): Be careful rechaining
4072 function try blocks.
4073 (expand_stmt): Loop through all the statements at a given level.
4074 (exapnd_body): Be careful with line-numbers here too. Prepare for
4075 being called directly from the parser.
4076
4077 * cp-tree.h (finish_function): Adjust prototype.
4078 * decl.c (finish_function): Return the function compiled.
4079 * pt.c (instantiate_decl): Don't play games with obstacks.
4080 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
4081 (search_tree): Likewise.
4082 * typeck.c: Fix typo in comment.
4083 * typeck2.c (store_init_value): Add comment.
4084
4085 * cp-tree.h (CPTI_ATEXIT): New macro.
4086 (atexit_node): Likewise.
4087 * decl.c (destroy_local_static): New function, broken out from ...
4088 (expand_static_init): Here.
4089
4090 * rtti.c (get_tinfo_var): These should always be global
4091 (expand_si_desc): Use tree, not RTL, functions to generate code.
4092 (expand_class_desc): Likewise.
4093 (expand_ptr_desc): Likewise.
4094 (expand_attr_desc): Likewise.
4095 (expand_generic_desc): Likewise.
4096 (synthesize_tinfo_fn): Likewise.
4097
4098 1999-09-09 Mark Mitchell <mark@codesourcery.com>
4099
4100 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4101 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
4102 RECHAIN_STMTS.
4103 (RECHAIN_STMST_FROM_CHAIN): Likewise.
4104
4105 * parse.y (simple_stmt): Fix typo in last change.
4106
4107 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4108 (STMT_IS_FULL_EXPR_P): Likewise.
4109 (STMT_LINENO_FOR_FN_P): Likewise.
4110 (prep_stmt): New function.
4111 (building_stmt_tree): Tweak for safety.
4112 * pt.c (tsubst_expr): Use prep_stmt throughout.
4113 (add_tree): Move it to semantics.c
4114 * semantics.c (add_tree): Move it here.
4115 (finish_expr_stmt_real): New function.
4116 (finish_expr_stmt): Use it.
4117 (finish_if_stmt_cond): Use FINISH_COND.
4118 (finish_while_stmt_cond): Likewise.
4119 (finish_for_cond): Likewise.
4120 (finish_stmt_tree): Tweak line-number handling.
4121 (prep_stmt): New function.
4122 (expand_stmt): Use it.
4123
4124 * cp-tree.h (begin_switch_stmt): Adjust prototype.
4125 (finish_switch_cond): Likewise.
4126 * parse.y (simple_stmt): Adjust accordingly.
4127 * parse.c: Regenerated.
4128 * pt.c (tsubst_expr): Adjust accordingly.
4129 * semantics.c (expand_cond): New function.
4130 (FINISH_COND): New macro.
4131 (begin_switch_stmt): Build the SWITCH_STMT here.
4132 (finish_switch_stmt_cond): Not here.
4133 (expand_stmt): Adjust calls to begin_switch_stmt and
4134 finish_switch_cond. Use expand_cond throughout.
4135
4136 * dump.c (dequeue_and_dump): Dump types for constants.
4137 Describe DECL_ARG_TYPE more intuitively.
4138 Handle ARRAY_REF.
4139
4140 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4141 (lang_cleanup_tree): Remove.
4142 * lex.c (make_lang_type): Use ggc_alloc to allocate
4143 TYPE_LANG_SPECIFIC.
4144
4145 Reorganize per-function data.
4146 * cp-tree.h (saved_scope): Add function_decl, bindings.
4147 (language_function): Rename binding_level to bindings.
4148 (cp_function_chain): Use the current_function, not the
4149 outer_function_chain.
4150 (current_class_ptr): Make it work, even when there's no
4151 current function.
4152 (current_class_ref): Likewise.
4153 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
4154 macros.
4155 (clear_temp_name): Remove.
4156 * decl.c (check_function_type): New function, broken out from
4157 start_function.
4158 (current_binding_level): Adjust definition.
4159 (pushlevel): Simplify.
4160 (poplevel): Don't use named_label_uses when we're outside
4161 a function scope.
4162 (mark_saved_scope): Mark function_decl and bindings.
4163 (maybe_push_to_top_level): Don't unconditionally push a new
4164 function context. Save bindings and the current_function_decl.
4165 Don't clear named_labels.
4166 (pop_from_top_level): Pop function context if appropriate.
4167 (init_decl_processing): Set init_lang_status and free_lang_status,
4168 rather than save_lang_status and restore_lang_status.
4169 (start_function): Take SF_* flags. Don't clear per-function data.
4170 Reorder and simplify to use new per-function data code. Add
4171 asserts.
4172 (store_parm_decls): Don't call init_function_start here.
4173 (finish_function): Adjust for new handling of per-function data.
4174 (push_cp_function_context): Simplify.
4175 (mark_cp_function_context): Change binding_level to bindings.
4176 * decl2.c (clear_temp_name): Remove.
4177 (start_objects): Use SF flags to start_function.
4178 (start_static_storage_duration_function): Likewise.
4179 * except.c (start_anon_func): Remove redundant calls to
4180 push_function_context_to. Use SF flags to start function.
4181 (end_anon_func): Remove redundant call to pop_function_context
4182 from.
4183 * lex.c (reinit_parse_for_function): Don't initialize per-function
4184 data.
4185 * method.c (emit_thunk): Clear current_function after calling
4186 assemble_end_function. Use SF flags for start_function.
4187 (synthesize_method): Use SF flags for start_function.
4188 * parse.c: Regenerated.
4189 * parse.y (fn.defpen): Likewise.
4190 (pending_inline): Clear current_function, even if something goes
4191 wrong.
4192 * pt.c (instantiate_decl): Use SF flags to start_function.
4193 Don't save and restore expanding_p.
4194 (add_tree): Handle the case where we are outside any function.
4195 (end_tree): Likewise.
4196 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4197 * semantics.c (begin_function_definition): Likewise.
4198 (expand_body): Likewise.
4199
4200 1999-09-09 Nathan Sidwell <nathan@acm.org>
4201
4202 * cp-tree.h (convert_to_void): Prototype new function.
4203 (require_complete_type_in_void): Remove prototype.
4204 * cvt.c (convert_to_void): New function.
4205 (ocp_convert): Use convert_to_void.
4206 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4207 expressions.
4208 * typeck.c (require_complete_type_in_void): Remove function.
4209 (build_compound_expr): Use convert_to_void.
4210 (build_static_cast): Likewise.
4211 (build_c_cast): Likewise.
4212 * semantics.c (finish_expr_stmt): Do not decay full expressions.
4213
4214 * typeck.c (build_x_compound_expr): Add FIXME.
4215
4216 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4217
4218 * cp-tree.h (scratch_tree_cons): Remove.
4219 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4220 and perm_tree_cons with plain tree_cons.
4221 * class.c: Likewise.
4222 * decl.c: Likewise.
4223 * decl2.c: Likewise.
4224 * except.c: Likewise.
4225 * expr.c: Likewise.
4226 * init.c: Likewise.
4227 * lex.c: Likewise.
4228 * method.c: Likewise.
4229 * parse.y: Likewise.
4230 * pt.c: Likewise.
4231 * repo.c: Likewise.
4232 * rtti.c: Likewise.
4233 * search.c: Likewise.
4234 * typeck.c: Likewise.
4235 * parse.c: Regenerated.
4236 * tree.c (build_srcloc): Simplify.
4237
4238 1999-09-08 Bruce Korb autogen@linuxbox.com
4239
4240 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4241
4242 1999-09-08 Mark Mitchell <mark@codesourcery.com>
4243
4244 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4245 Remove next.
4246 (LANG_DECL_PERMANENT): Remove.
4247 * decl.c (duplicate_decls): Don't mess about with obstacks trying
4248 to free memory.
4249 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4250 * lex.c (free_lang_decl_chain): Remove.
4251 (build_lang_decl): Don't use obstacks.
4252 (retrofit_lang_decl): Likewise.
4253 (copy_lang_decl): Likewise.
4254
4255 * cp-tree.h (saved_scope): Remove old_binding_level and
4256 function_decl. Tidy up.
4257 * decl.c (mark_saved_scope): Don't set them.
4258 (maybe_push_to_top_level): Clear memory.
4259
4260 * decl.c (layout_var_decl): Change prototype. Don't complete
4261 types for external objects.
4262 (check_initializer): Likewise. Tidy.
4263 (initialize_local_var): Complete types here.
4264 (cp_finish_decl): Not here. Reorganize a little.
4265 (grokvardecl): Don't complete types here.
4266
4267 * decl.c (start_function): Clear last_dtor_insn and
4268 last_parm_cleanup_insn.
4269 (push_cp_function_context): Just copy over a little of
4270 the old context, not all of it.
4271
4272 * cp-tree.h (copy_to_permanent): Remove.
4273 (permanent_p): Likewise.
4274 * decl.c (building_typename_type): Don't use copy_to_permanent.
4275 (start_decl): Likewise.
4276 (grok_reference_init): Likewise.
4277 (cp_finish_decl): Likewise.
4278 * init.c (build_new_1): Don't use mapcar.
4279 (build_vec_delete_1): Don't use copy_to_permanent.
4280 (build_vec_init): Likewise.
4281 * parse.y (primary): Likewise.
4282 * parse.c: Regenerated.
4283 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4284 (lookup_template_class): Likewise.
4285 (tsubst_friend_function): Likewise.
4286 (instantiate_class_template): Likewise.
4287 (tsubst_decl): Likewise.
4288 (tsubst): Likewise.
4289 (instantiate_template): Likewise.
4290 (unify): Likewise.
4291 * rtti.c (get_tinfo_fn): Likewise.
4292 (build_dynamic_cast): Likewise.
4293 * semantics.c (finish_if_stmt_cond): Likewise.
4294 (finish_while_stmt_cond): Likewise.
4295 (finish_do_stmt): Likewise.
4296 (finish_for_cond): Likewise.
4297 (finish_for_expr): Likewise.
4298 (finish_cleanup): Likewise.
4299 (add_decl_stmt): Likewise.
4300 (finish_named_return_value): Likewise.
4301 (finish_qualified_call_expr): Likewise.
4302 * tree.c (perm_manip): Remove.
4303 (build_exception_variant): Don't use copy_to_permanent.
4304 (permanent_p): Remove.
4305 (copy_to_permament): Remove.
4306 (build_min_nt): Don't use copy_to_permanent.
4307 (build_min): Likewise.
4308 (min_tree_cons): Likewise.
4309 * typeckc.c (build_static_cast): Likewise.
4310 (build_reinterpret_cast): Likewise.
4311 (build_const_cast): Likewise.
4312
4313 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4314
4315 * decl.c (ggc_p): Set it to 1.
4316 (mark_saved_scope): Add prototype.
4317
4318 1999-09-07 Richard Henderson <rth@cygnus.com>
4319
4320 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4321 * typeck.c (self_promoting_args_p): Delete.
4322
4323 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
4324
4325 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4326 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4327
4328 1999-09-07 Mark Mitchell <mark@codesourcery.com>
4329
4330 * Makefile.in (tree.o): Depend on ggc.h.
4331 * class.c (make_method_vec): Remove.
4332 (free_method_vec): Likewise.
4333 (free_method_vecs): Remove.
4334 (add_method): Don't use them.
4335 * cp-tree.def (PTRMEM_CST): Make it longer.
4336 (TEMPLATE_PARM_INDEX): Make it shorter.
4337 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4338 (template_parm_index): Remove RTL field.
4339 (ptrmem_cst): Add RTL field.
4340 (finish_function): Removed parameter.
4341 (process_next_inline): Change prototype.
4342 (init_cplus_unsave): Rename to init_tree.
4343 (binding_init): Remove.
4344 * decl.c (free_binding_nodes): Remove.
4345 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
4346 (pop_binding): Don't use free_binding_nodes.
4347 (free_binding_vecs): Remove.
4348 (store_bindings): Don't use them.
4349 (pop_from_top_level): Likewise.
4350 (lookup_namespace_name): Simplify.
4351 (build_typename_type): Don't use obstack_free.
4352 (unqualified_namespace_lookup): Simplify.
4353 (lookup_name_real): Simplify.
4354 (start_function): Remove comment about leaks.
4355 (finish_function): Removed nested parameter. Call
4356 expand_end_bindings even when building_stmt_tree.
4357 Call ggc_push_context and ggc_pop_context around
4358 rest_of_compilation, if necessary.
4359 (mark_cp_function_context): Handle a NULL language-context.
4360 (lang_mark_false_label_stack): Fix typo.
4361 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4362 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
4363 pointer to method types.
4364 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4365 * decl2.c (finish_objects): Adjust call to finish_function.
4366 (finish_static_store_duration_function): Likewise.
4367 (do_nonmember_using_decl): Remove call to binding_init.
4368 * except.c (end_anon_func): Adjust call to finish_function.
4369 * lex.c (mark_impl_file_chain): New function.
4370 (init_parse): Call init_tree, not init_cplus_unsave.
4371 Add GC roots.
4372 (cp_pramga_interface): Use xmalloc, not permalloc.
4373 (cp_pragma_implementation): Likewise.
4374 (begin_definition_of_inclass_inline): Simplify.
4375 (process_next_inline): Adjust prototype.
4376 (do_scoped_id): Don't call binding_init.
4377 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4378 * method.c (emit_thunk): Adjust call to finish_function.
4379 (synthesize_method): Likewise.
4380 * parse.y (%union): Add a new `pi' variant.
4381 (PRE_PARSED_FUNCTION_DECL): Use it.
4382 (fn.defpen): Likewise.
4383 (fndef): Adjust call to finish_function.
4384 * pt.c (instantiate_decl): Likewise.
4385 * rtti.c (syntheisze_tinfo_fn): Likewise.
4386 * semantics.c (expand_body): Likewise.
4387 * tree.c: Include ggc.h.
4388 (mark_list_hash): New function.
4389 (binding_init): Remove.
4390 (init_cplus_unsave): Rename to ...
4391 (init_tree): This. Add GC roots.
4392
4393 1999-09-05 Mark Mitchell <mark@codesourcery.com>
4394
4395 Get ready for garbage collection.
4396 * Makefile.in (CXX_TREE_H): Add varray.h
4397 (lex.o): Depend on ggc.h.
4398 (decl.o): Likewise.
4399 (decl2.o): Likewise.
4400 (method.o): Likewise.
4401 (search.o): Likewise.
4402 (pt.o): Likewise.
4403 (repo.o): Likewise.
4404 * class.c: Include ggc.h.
4405 (current_class_name): Remove.
4406 (current_class_type): Likewise.
4407 (current_access_specifier): Likewise.
4408 (previous_class_type): Likewise.
4409 (previous_class_values): Likewise.
4410 (class_cache_firstobj): Likewise.
4411 (current_lang_base): Likewise.
4412 (current_lang_stack): Likewise.
4413 (current_lang_stacksize): Likewise.
4414 (lang_name_c): Likewise.
4415 (lang_name_cplusplus): Likewise.
4416 (lang_name_java): Likewise.
4417 (current_lang_name): Likewise.
4418 (base_layout_decl): Likewise.
4419 (access_default_node): Likewise.
4420 (access_public_node): Likewise.
4421 (access_protected_node): Likewise.
4422 (access_private_node): Likewise.
4423 (access_default_virtual_node): Likewise.
4424 (access_public_virtual_node): Likewise.
4425 (access_protected_virtual_node): Likewise.
4426 (access_private_virtual_node): Likewise.
4427 (signed_zero_node): Likewise.
4428 (init_class_processing): Don't build base_layout_decl.
4429 (push_lang_context): Adjust now that current_lang_base is a varray.
4430 (pop_lang_context): Likewise.
4431 * cp-tree.h: Include varray.h.
4432 (cp_global_trees): Add access_default, access_public,
4433 access_protected, access_private, access_default_virtual,
4434 access_public_virtual, access_protected_virtual,
4435 access_private_virtual, ctor_identifier, delta2_identifier,
4436 delta_identifier, dtor_identifier, in_charge_identifier,
4437 index_identifier, nelts_identifier, this_identifier,
4438 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4439 lang_name_c, lang_name_cplusplus, lang_name_java,
4440 empty_except_spec, null, jclass, minus_one, terminate.
4441 (saved_scope): Move here from decl.c. Define globals in terms of
4442 saved_scope: current_namespace, current_class_name,
4443 current_class_type, current_access_specifier, current_lang_stack,
4444 current_lang_base, current_lang_name, current_function_parms,
4445 current_template_parms, processing_template_decl,
4446 processing_specialization, processing_explicit_instantiation,
4447 previous_class_type, previous_class_values, class_cache_firstobj.
4448 (scope_chain): New variable.
4449 (init_pt): New function.
4450 * decl.c (current_namespace): Remove.
4451 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4452 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4453 (delta_identifier, delta2_identifier): Likewise.
4454 (pfn_or_delta2_identifier, tag_identifier): Likewise
4455 (vt_off_identifier, empty_except_spec, null_node): Likewise.
4456 (current_function_parms, current_lang_base): Remove.
4457 (current_lang_stack, previous_class_values): Remove.
4458 (class_binding_level): Macroize.
4459 (saved_scope): Remove.
4460 (current_saved_scope): Rename to scope_chain.
4461 (mark_saved_scope): Adjust for new scope structure.
4462 (maybe_push_to_top_level): Likewise.
4463 (pop_from_top_level): Likewise.
4464 (duplicate_decls): Adjust now that current_lang_base is a varray.
4465 (build_typename_type): Call ggc_add_tree_hash_table_root.
4466 (init_decl_processing): Call init_pt. Call push_to_top_level to
4467 set up globals. Add GC roots.
4468 (xref_basetypes): Adjust now that current_lang_base is a varray.
4469 * decl.h (this_identifier): Remove.
4470 (in_charge_identifier): Likewise.
4471 * decl2.c: Don't include varray.h.
4472 (current_namespace): Remove.
4473 (init_decl2): Add GC roots.
4474 * except.c (Terminate): Remove.
4475 (init_exception_processing): Use terminate_node instead.
4476 (build_terminate_handler): Likewise.
4477 * init.c (nc_nelts_field_id): Remove.
4478 (minus_one): Likewise.
4479 (init_init_processing): Use minus_one_node and nelts_identifier
4480 instead. Add GC roots.
4481 (jclass_node): Remove.
4482 (build_new_1): Use nelts_identifier.
4483 (build_vec_init): Likewise.
4484 (build_vec_delete): Likewise.
4485 * lex.c: Include ggc.h.
4486 (defarg_fn): Move declaration early.
4487 (defarg_parms): Likewise.
4488 (init_parse): Add GC roots.
4489 (handle_cp_pragma): Remove redundant declaration of
4490 pending_vtables.
4491 * method.c: Include ggc.h.
4492 (btypelist): Make it a varray. All uses changed.
4493 (ktypelist): Likewise.
4494 (init_method): Add GC roots.
4495 * pt.c: Don't include varray.h. Include ggc.h.
4496 (current_template_parms): Remove.
4497 (processing_template_decl): Likewise.
4498 (processing_specialization): Likewise.
4499 (processing_explicit_instantiation): Likewise.
4500 (init_pt): New function.
4501 * repo.c: Include ggc.h.
4502 (init_repo): Add GC roots.
4503 * search.c: Don't include varray.h.
4504 (_vptr_name): Remove.
4505 (lookup_field_1): Use vtpr_identifier instead.
4506 (expand_indirect_vtbls_init): Remove redundant declaration of
4507 in_charge_identifier.
4508 (init_search_processing): Use vptr_identifier.
4509
4510 1999-09-05 Richard Henderson <rth@cygnus.com>
4511 Bernd Schmidt <bernds@cygnus.co.uk>
4512 Mark Mitchell <mark@codesourcery.com>
4513
4514 * Makefile.in (parse.o): Depend on ggc.h.
4515 (decl2.o): Depend on ggc.h.
4516 (init.o): Depend on ggc.h.
4517 * cp-tree.h (init_decl2): Declare.
4518 (cp_parse_init): Likewise.
4519 * decl.c (ggc_p): Define to zero.
4520 (mark_saved_scope): New function.
4521 (init_decl_processing): Call cp_parse_init, and cp_decl2.
4522 Register GC roots.
4523 (expand_static_init): Add GC roots.
4524 * decl2.c: Include ggc.h.
4525 (init_decl2): New function.
4526 * init.c: Include ggc.h.
4527 (init_init_processing): Add GC roots.
4528 * parse.y: Include ggc.h.
4529 (cp_parse_init): New function.
4530
4531 1999-09-04 Mark Mitchell <mark@codesourcery.com>
4532
4533 * decl.c (init_decl_processing): Set mark_lang_status.
4534 (lang_mark_false_label_stack): Adjust prototype.
4535 * decl2.c (grok_function_init): Remove extraneous declaration of
4536 abort_fndecl.
4537
4538 * Make-lang.in (cc1plus): Remove dependency on GGC.
4539 * Makefile.in (OBJS): Don't mention ggc-simple.o.
4540 (OBJDEPS): Don't mention ggc-simple.o.
4541
4542 * Make-lang.in (cc1plus): Depend on $(GGC).
4543 * Makefile.in (OBJS): Add ggc-simple.o.
4544 (OBJDEPS): Likewise.
4545 * cp-tree.h (language_function): Rename members to `x_' versions;
4546 we now have x_named_labels, x_ctor_label, x_dtor_label,
4547 x_base_init_list, x_member_init_list, x_base_init_expr,
4548 x_current_class_ptr, x_current_class_ref, x_last_tree,
4549 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4550 x_result_rtx.
4551 (dtor_label, ctor_label, current_base_init_list,
4552 current_member_init_list, base_init_expr, current_class_ptr,
4553 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4554 * decl.c: Include ggc.h.
4555 (last_dtor_insn): Adjust to use x_ names.
4556 (last_parm_cleanup_insn): Likewise.
4557 (original_result_rtx): Likewise.
4558 (named_labels): Likewise.
4559 (mark_binding_level): New function.
4560 (mark_cp_function_context): Likewise.
4561 (mark_false_label_stack): Likewise.
4562 (lang_mark_tree): Likewise.
4563 (lang_cleanup_tree): Likewise.
4564
4565 1999-09-03 Mark Mitchell <mark@codesourcery.com>
4566
4567 * Makefile.in (CXX_TREE_H): Include function.h.
4568 (decl.o): Don't depend on function.h.
4569 (decl2.o): Likewise.
4570 (typeck.o): Likewise.
4571 (init.o): Likewise.
4572 (method.o): Likewise.
4573 * cp-tree.h: Include function.h.
4574 (cp_function): Rename to language_function. Remove next.
4575 (cp_function_chain): Make it a macro, not a variable.
4576 (push_cp_function_context): Don't declare.
4577 (pop_cp_function_context): Likewise.
4578 * decl.c: Don't include function.h.
4579 (push_cp_function_context): Make it static. Make it suitable for
4580 a save_lang_status callback.
4581 (pop_cp_function_context): Likewise.
4582 (maybe_push_to_top_level): Call push_function_context_to, not
4583 push_cp_function_context.
4584 (pop_from_top_level): Call pop_function_context_from, not
4585 pop_cp_function_context.
4586 (init_decl_processing): Set save_lang_status and
4587 restore_lang_status. Call push_function_context_to, not
4588 push_cp_function_context.
4589 (cp_function_chain): Remove.
4590 * decl2.c: Don't include function.h.
4591 * except.c: Don't include function.h.
4592 (start_anon_func): Call push_function_context_to, not
4593 push_cp_function_context.
4594 (end_anon_func): Call pop_function_context_from, not
4595 pop_cp_function_context.
4596 * init.c: Don't include function.h.
4597 * lex.c (begin_definition_of_inclass_inline): Call
4598 push_function_context_to, not push_cp_function_context.
4599 (process_next_inline): Call pop_function_context_from, not
4600 pop_cp_function_context.
4601 * method.c: Don't include function.h.
4602 (synthesize_method): Call push_function_context_to, not
4603 push_cp_function_context. Call pop_function_context_from, not
4604 pop_cp_function_context.
4605 * typeck.c: Don't include function.h.
4606
4607 * decl.c (expand_static_init): Tweak handling of static
4608 initializations for objects without constructors.
4609
4610 1999-09-03 Nathan Sidwell <nathan@acm.org>
4611
4612 * typeck.c (build_indirect_ref): Reject dereference of pointer to
4613 void.
4614
4615 1999-09-02 Mark Mitchell <mark@codesourcery.com>
4616
4617 * cp-tree.h (cp_function): Move here, from decl.c.
4618 (cp_function_chain): Declare.
4619 (dtor_label): New macro, instead of variable.
4620 (ctor_label): Likewise.
4621 (current_base_init_list): Likewise.
4622 (current_member_init_list): Likewise.
4623 (base_init_expr): Likewise.
4624 (current_class_ptr): Likewise.
4625 (current_class_ref): Likewise.
4626 (last_tree): Likewise.
4627 (last_expr_type): Likewise.
4628 (current_function_returns_value): Likewise.
4629 (current_function_returns_null): Likewise.
4630 (current_function_just_assigned_this): Likewise.
4631 (current_function_parms_stored): Likewise.
4632 (temp_name_counter): Likewise.
4633 (static_labelno): Likewise.
4634 (expanding_p): Likewise.
4635 (stmts_are_full_exprs_p): Likewise.
4636 (in_function_try_handler): Likewise.
4637 (lang_type): Remove nested type_flags. All uses changed.
4638 * call.c (ctor_label): Remove.
4639 (dtor_label): Likewise.
4640 * class.c (current_class_ptr): Remove.
4641 (current_class_ref): Likewise.
4642 * decl.c (static_labelno): Remove.
4643 (dtor_label): Likewise.
4644 (last_dtor_insn): New macro, instead of variable.
4645 (last_parm_cleanup_insn): Likewise.
4646 (original_result_rtx): Likewise.
4647 (in_function_try_handler): Remove.
4648 (named_label_uses): New macro, instead of variable.
4649 (named_labels): Likewise.
4650 (current_function_returns_value): Remove.
4651 (current_function_returns_null): Likewise.
4652 (current_function_assigns_this): New macro, instead of variable.
4653 (current_function_just_assigned_this): Likewise.
4654 (current_binding_level): Likewise.
4655 (init_decl_processing): Call push_cp_function_context.
4656 (cp_function): Move to cp-tree.h
4657 (cp_function_chain): Make it global.
4658 (temp_name_counter): Remove.
4659 (push_cp_function_context): Simplify.
4660 (pop_cp_function_context): Likewise.
4661 * decl2.c (temp_name_counter): Remove.
4662 * init_c (current_base_init_list): Likewise.
4663 (current_member_init_list): Likewise.
4664 (base_init_expr): Likewise.
4665 * method.c (static_labelno): Likewise.
4666 * pt.c (last_tree): Likewise.
4667 * semantics.c (expanding_p): Likewise.
4668 (stmts_are_full_exprs_p): Likewise.
4669 (last_expr_type): Likewise.
4670 * typeck.c (dtor_label): Likewise.
4671 (ctor_label): Likewise.
4672
4673 1999-09-01 Alex Samuel <samuel@codesourcery.com>
4674
4675 * decl2.c (arg_assoc_template_arg): New prototype. New function.
4676 (arg_assoc_class): Use arg_assoc_template_arg for template
4677 arguments.
4678 (arg_assoc): Likewise.
4679 * pt.c (mangle_class_name_for_template): Allow member template
4680 template arguments.
4681
4682 1999-09-02 Nathan Sidwell <nathan@acm.org>
4683
4684 * call.c (build_conditional_expr): Warn on enum mismatches.
4685 (convert_arg_to_ellipsis): Move non-pod check to after
4686 conversion.
4687
4688 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4689
4690 * gxx.gperf (hash, is_reserved_word): Add prototypes.
4691
4692 * init.c (build_vec_init): Initialize variable `try_block'.
4693
4694 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4695 Likewise for bzero/memset.
4696 (token_getch, token_put_back): Add static prototypes. Remove
4697 `inline' from the definitions.
4698 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4699
4700 1999-09-01 Mark Mitchell <mark@codesourcery.com>
4701
4702 * cp-tree.h (lang_type): Move align into type_flags.
4703 (CLASSTYPE_ALIGN): Adjust accordingly.
4704 * call.c (direct_reference_binding): Remove misleading comment.
4705
4706 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4707
4708 * parse.y (language_string): Constify.
4709
4710 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4711
4712 * repo.c (getpwd): Don't prototype.
4713 * xref.c (getpwd): Likewise
4714
4715 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4716
4717 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4718 Remove hacks for stuff which now comes from libiberty.
4719
4720 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
4721
4722 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4723
4724 1999-08-30 Mark Mitchell <mark@codesourcery.com>
4725
4726 * cp-tree.h (begin_init_stmts): Declare.
4727 (finish_init_stmts): Likewise.
4728 * cvt.c (build_up_reference): Wrap the declaration of a temporary
4729 in a statement-expression so that we will see it when expanding
4730 tree structure later.
4731 * init.c (begin_init_stmts): Don't make it static.
4732 (finish_init_stmts): Likewise.
4733
4734 * cp-tree.h (start_handler_parms): New function.
4735 (expand_start_catch_block): Take only one parameter.
4736 (start_handler_parms): New function.
4737 * decl.c (start_handler_parms): Define it.
4738 * except.c (process_start_catch_block): Take only one parameter.
4739 Don't call grokdeclarator here.
4740 (expand_start_catch_block): Don't call grokdeclarator here,
4741 either.
4742 * parse.y (handler_args): Adjust call to
4743 expand_start_catch_block. Use start_handler_parms.
4744 * pt.c (push_template_decl_real): Make permanent lists have
4745 permanent elements.
4746 (tsubst_expr): Adjust calls to expand_start_catch_block
4747 appropriately.
4748 * semantics.c (expand_stmt): Likewise.
4749
4750 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4751
4752 * pt.c (push_template_decl_real): Use template declaration from
4753 class type if it exists.
4754
4755 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4756
4757 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4758 (maybe_inject_for_scope_var): Declare it.
4759 (initialize_local_var): Likewise.
4760 * decl.c (maybe_inject_for_scope_var): Make it global.
4761 (initialize_local_var): Likewise. Move cleanup handling here,
4762 from cp_finish_decl.
4763 (make_rtl_for_nonlocal_decl): Use
4764 push_obstacks_nochange/pop_obstacks, rather than
4765 end_temporary_allocation/resume_temporary_allocation.
4766 (cp_finish_decl): Try to complete the type of a variable when it
4767 is declared. Move cleanup-handling to initialize_local_var.
4768 (expand_static_init): Use tree-building code, rather than
4769 RTL-building code.
4770 * decl2.c (get_temp_name): Assert non-initializedness of
4771 temporaries.
4772 * init.c (create_temporary_var): Move RTL-assigning code to ...
4773 (get_temp_regvar): Here.
4774 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4775 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4776 call initialize_local_var to generate initialization code.
4777
4778 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4779
4780 * cp-tree.h (fndecl_as_string, type_as_string,
4781 type_as_string_real, args_as_string, decl_as_string,
4782 expr_as_string, code_as_string, language_as_string,
4783 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4784 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4785
4786 * errfn.c (cp_printer): Likewise.
4787
4788 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4789 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4790 cp_file_of, code_as_string, language_as_string, parm_as_string,
4791 op_as_string, assop_as_string, args_as_string, cv_as_string):
4792 Likewise.
4793
4794 * tree.c (lang_printable_name): Likewise.
4795
4796 1999-08-28 Richard Henderson <rth@cygnus.com>
4797
4798 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4799
4800 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4801
4802 * cp-tree.h (strip_array_types): New function.
4803 * decl.c (maybe_deduce_size_from_array_init): New function, split
4804 out from cp_finish_decl.
4805 (layout_var_decl): Likewise.
4806 (maybe_commonize_var): Likewise.
4807 (maybe_inject_for_scope_var): Likewise.
4808 (initialize_local_var): Likewise.
4809 (build_cleanup_on_safe_obstack): Likewise.
4810 (check_initializer): Likewise.
4811 (make_rtl_for_nonlocal_decl): Likewise.
4812 (cp_finish_decl): Use them.
4813 * typeck.c (strip_array_types): New function.
4814
4815 * cp-tree.def (LABEL_STMT): New tree node.
4816 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4817 (shadow_label): Remove.
4818 (declare_local_label): New function.
4819 (finish_label_decl): Likewise.
4820 * decl.c (make_label_decl): New function, split out from
4821 lookup_label.
4822 (shadowed_labels): Remove.
4823 (binding_level): Add shadowed_labels.
4824 (clear_binding_level): Remove.
4825 (push_binding_level): Just bzero the new binding level.
4826 (pushlevel): Fix indentation.
4827 (pop_label): New function.
4828 (pop_labels): Likewise, split out from poplevel.
4829 (poplevel): Pop local labels. Use pop_labels.
4830 (maybe_push_to_top_level): Don't clear shadowed_labels.
4831 (lookup_label): Use make_label_decl.
4832 (shadow_label): Remove.
4833 (declare_local_label): New function.
4834 (define_label): Simplify.
4835 (start_function): Don't clear shadowed_labels.
4836 (cp_function): Remove shadowed_labels.
4837 (push_cp_function_context): Don't save shadowed_labels.
4838 (pop_cp_function_context): Don't restore it.
4839 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4840 * parse.y (label_decl): Use finish_label_decl.
4841 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4842 declarations.
4843 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4844 building_stmt_tree.
4845 (finish_label_decl): New function.
4846 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4847
4848 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4849
4850 * decl.c (lookup_label): Build labels on the permanent obstack
4851 when building statement trees. Don't build RTL for labels when
4852 building statement trees.
4853 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4854 building statement trees.
4855 (finish_label_stmt): Likewise.
4856 (expand_stmt): Adjust accordingly.
4857 * pt.c (tsubst_expr); Likewise.
4858 (do_decl_instantiation): Robustify.
4859
4860 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4861 * tree.c (build_cplus_new): Set it.
4862 * expr.c (cplus_expand_expr): Use it.
4863 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4864
4865 * decl.c (store_parm_decls): Reset immediate_size_expand.
4866 (finish_function): Likewise.
4867
4868 * tree.c (cplus_unsave_expr_now): Don't return a value.
4869
4870 * semantics.c (do_poplevel): Always initialize the return value.
4871
4872 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4873
4874 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4875 * tree.h (cplus_unsave_expr_now) : Same.
4876
4877 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4878
4879 * decl.c (grokdeclarator): Amend comment.
4880 * except.c (expand_start_catch_block): Call push_template_decl for
4881 catch-block parameters.
4882 * method.c (synthesize_method): Build an empty compound statement
4883 for the body of a constructor.
4884
4885 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4886
4887 * tree.c (cp_build_qualified_type_real): If we're asking for the
4888 same quals we already have, just return.
4889
4890 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4891
4892 * cp-tree.def (SUBOBJECT): New tree node.
4893 * cp-tree.h (CLEANUP_P): New macro.
4894 (SUBOBJECT_CLEANUP): Likewise.
4895 (keep_next_level): Add parameter.
4896 (get_temp_regvar): Don't declare.
4897 (emit_base_init): Remove parameter.
4898 (expand_aggr_init): Rename to build_aggr_init.
4899 (expand_vec_init): Rename to build_vec_init.
4900 (do_pushlevel): Remove.
4901 (do_poplevel): Likewise.
4902 (finish_cleanup): New function.
4903 (finish_subobject): Likewise.
4904 (stmts_are_full_exprs_p): New variable.
4905 * decl.c (keep_next_level): Add parameter.
4906 (cp_finish_decl): Use build_aggr_init, not
4907 expand_aggr_init. Use finish_expr_stmt to expand the code.
4908 (expand_static_init): Use tree-generating, not RTL-generating,
4909 functions to handle the initialization.
4910 (start_function): Remove dead code. Always have a momentary
4911 obstack inside the function, even before hitting the first curly
4912 brace.
4913 (cplus_expand_expr_stmt): Move calls to
4914 expand_{start,end}_target_temps into semantics.c.
4915 (cp_function): Add stmts_are_full_exprs_p.
4916 (push_cp_function_context): Save it.
4917 (pop_cp_function_context): Restore it.
4918 * decl2.c (get_temp_regvar): Move to init.c.
4919 (do_static_initialization): Use build_{aggr,vec}_init.
4920 (do_static_destruction): Fix typo in comment.
4921 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4922 * except.c (expand_throw): Use create_temporary_var.
4923 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4924 * init.c (expand_vec_init_try_block): Remove.
4925 (expand_vec_init_catch_clause): Likewise.
4926 (get_temp_regvar): New function.
4927 (begin_init_stmts): Likewise.
4928 (finish_init_stmts): Likewise.
4929 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
4930 structure here.
4931 (emit_base_init): Likewise. Remove unused parameter.
4932 (expand_virtual_init): Likewise.
4933 (expand_cleanup_for_base): Use finish_subobject.
4934 (expand_aggr_vbase_init_1): Simplify.
4935 (construct_virtual_bases): Use tree-generating functions to build
4936 up initialization.
4937 (expand_aggr_init): Likewise. Rename to build_aggr_init.
4938 (expand_default_init): Likewise.
4939 (expand_aggr_init_1): Likewise.
4940 (expand_vec_init): Rename to build_vec_init.
4941 * method.c (do_build_copy_constructor): Use tree-generating
4942 functions. Don't call clear_last_expr.
4943 (do_build_assign_ref): Likewise.
4944 (synthesize_method): Call clear_last_expr here.
4945 * parse.y (base_init): Don't call clear_last_expr here.
4946 (nodecls): Likewise.
4947 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4948 * semantics.c (do_pushlevel): Move to here.
4949 (do_poplevel): Likewise.
4950 (stmts_are_full_exprs_p): New variable.
4951 (finish_expr_stmt): Handle logic for temoprary cleanup here.
4952 (finish_for_stmt): Use finish_expr_stmt.
4953 (finish_cleanup): New function.
4954 (finish_function_try_block): Fix indentation.
4955 (finish_subobject): New function.
4956 (setup_vtbl_ptr): Call keep_next_level here.
4957 (finish_stmt_expr): Handle a block with no scope inside the
4958 statement-expression.
4959 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
4960 SUBOBJECT.
4961 * tree.c (search_tree): Handle INIT_EXPR.
4962 (mapcar): Likewise.
4963 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4964 * typeck2.c (store_init_value): Change expand_aggr_init to
4965 build_aggr_init in comment.
4966
4967 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4968
4969 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4970
4971 1999-08-25 Nathan Sidwell <nathan@acm.org>
4972
4973 * decl2.c (handle_class_head): Be graceful about additional
4974 scope qualifiers. Adjust comments to reflect reality.
4975
4976 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
4977
4978 * call.c (build_conditional_expr): Fix typo.
4979 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4980 lvalue before trying to mess with the sides.
4981
4982 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4983
4984 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
4985
4986 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4987
4988 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
4989
4990 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4991 Return arbitrary pointer or NULL.
4992 (check_eh_spec): Call __throw_type_match_rtti_2.
4993 * tinfo.h (*::dcast): Return int. Add valp parm.
4994 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
4995 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4996 (__throw_type_match_rtti): Now just a wrapper.
4997
4998 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4999 (init_exception_processing): Don't initialize them.
5000
5001 1999-08-23 Paul Burchard <burchard@pobox.com>
5002
5003 * decl.c (check_default_argument): Fix typo.
5004
5005 1999-08-22 Mark Mitchell <mark@codesourcery.com>
5006
5007 * cp-tree.def (STMT_EXPR): Fix typo in node name.
5008
5009 * dump.c (dump_next_stmt): New function.
5010 (dequeue_and_dump): Use it.
5011
5012 * pt.c (tsubst_copy): Make sure to initialize return value for a
5013 STMT_EXPR, even when processing_template_decl.
5014 * semantics.c (finish_stmt_expr): A statement-expression whose
5015 last statement is not an expression-statement has type `void'.
5016
5017 1999-08-20 Mark Mitchell <mark@codesourcery.com>
5018
5019 * semantics.c (finish_stmt_expr): Fix typo in comment.
5020 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
5021 (mapcar): Likewise.
5022 * init.c (build_vec_delete_1): Make the children of a permanent
5023 BIND_EXPR permanent.
5024 * pt.c (register_specialization): Don't register a specialization
5025 more than once.
5026
5027 1999-08-18 Andrew Haley <aph@cygnus.com>
5028
5029 * method.c (process_overload_item): Call build_mangled_C9x_name ()
5030 for all integer parameter types larger than long long.
5031
5032 1999-08-19 Mark Mitchell <mark@codesourcery.com>
5033
5034 * pt.c (redeclare_class_template): Merge default template
5035 arguments in both directions.
5036
5037 * typeck.c (common_type): Undo 1999-08-18 change. Remove
5038 compiler_error message.
5039
5040 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
5041
5042 * cp-tree.h: Declare flag_use_repository.
5043 * pt.c (do_decl_instantiation): Don't complain about duplicate
5044 instantiation with -frepo.
5045 (do_type_instantiation): Likewise.
5046
5047 * pt.c (push_template_decl_real): Complain about everything
5048 that isn't a valid template.
5049
5050 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
5051 affect inlines.
5052
5053 1999-08-19 Mark Mitchell <mark@codesourcery.com>
5054
5055 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
5056 * decl2.c (build_expr_from_tree): Handle it.
5057 * error.c (dump_expr): Likewise.
5058 * pt.c (for_each_template_parm): Likewise.
5059 (tsubst_copy): Likewise.
5060 * tree.c (search_tree): Likewise.
5061 * semantics.c (finish_pseudo_destructor_call): Create it.
5062
5063 1999-08-18 Mark Mitchell <mark@codesourcery.com>
5064
5065 * search.c (setup_class_bindings): Robustify.
5066 * typeck.c (common_type): Use same_type_p, not pointer equality,
5067 to compare types.
5068
5069 * cp-tree.h (build_lang_field_decl): Remove.
5070 * class.c (build_vtable): Replace calls to build_lang_field_decl
5071 with build_lang_decl.
5072 (prepare_fresh_vtable): Likewise.
5073 (finish_struct_1): Likewise.
5074 (init_class_processing): Likewise.
5075 * decl.c (push_using_decl): Likewise.
5076 (init_decl_processsing): Likewise.
5077 (grokvardecl): Likewise.
5078 (build_ptrmemfunc_type): Likewise.
5079 (grokdeclarator): Likewise.
5080 (build_enumerator): Likewise.
5081 * decl2.c (grok_x_components): Likewise.
5082 (do_class_using_decl): Likewise.
5083 * except.c (call_eh_info): Likewise.
5084 * init.c (init_init_processing): Likewise.
5085 * rtti.c (expand_class_decl): Likewise.
5086 * tree.c (build_base_fields): Likewise.
5087 (build_vbase_pointer_fields): Likewise.
5088 * lex.c (build_lang_decl): Build declarations on the permanent
5089 obstack if we're building statmeent trees.
5090 (retrofit_lang_decl): Handle both the full lang_decl and also the
5091 smaller lang_decl_flags here.
5092 (build_lang_field_decl): Remove.
5093 * pt.c (push_template_decl_real): Issue errors for variable
5094 declarations that are not static members.
5095
5096 1999-08-18 Richard Henderson <rth@cygnus.com>
5097
5098 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5099 (mapcar): Likewise.
5100
5101 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5102
5103 * cp-tree.h (back_end_hook): New variable.
5104 * decl2.c (back_end_hook): Define it.
5105 (finish_file): If it's non-NULL, call it.
5106
5107 * decl.c (add_decl_to_level): New function.
5108 (push_local_binding): Use it.
5109 (find_binding): Fix typo in comment.
5110 (pushdecl): Use add_decl_to_level. Put templates on the
5111 corresponding namespace-scope binding levels.
5112 * dump.c (dequeue_and_dump): Print the specializations of a
5113 template.
5114 * pt.c (push_template_decl_real): Don't push a template multiple
5115 times.
5116
5117 1999-08-17 Mark Mitchell <mark@codesourcery.com>
5118
5119 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5120 (CALL_DECLARATOR_QUALS): Likewise.
5121 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5122 * decl.c (grokdeclarator): Adjust to use them.
5123 * decl2.c (grokfield): Likewise.
5124 (reparse_absdcl_as_casts): Likewise.
5125 * lex.c (make_call_declarator): Likewise.
5126 (set_quals_and_spec): Likewise.
5127 * pt.c (tsubst): Likewise.
5128 * tree.c (mapcar): Remove special hack to handle third operand of
5129 a CALL_EXPR.
5130
5131 1999-08-16 Mark Mitchell <mark@codesourcery.com>
5132
5133 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5134 * class.c (build_vtable): Use build_lang_field_decl to build the
5135 VAR_DECLs for vtables.
5136 (prepare_fresh_vtable): Likewise.
5137 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5138 CAN_HAVE_FULL_LANG_DECL_P.
5139 (push_using_decl): Use build_lang_decl to build USING_DECLs.
5140 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5141 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5142 (build_lang_field_decl): Likewise.
5143 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5144 to copy.
5145
5146 * cp-tree.def (STMT_EXPR): New tree node.
5147 * cp-tree.h (STMT_EXPR_STMT): New macro.
5148 (store_return_init): Change prototype.
5149 (finish_named_return_value): New function.
5150 (expand_stmt): Likewise.
5151 (expand_body): Likewise.
5152 (begin_stmt_tree): Likewise.
5153 (finish_stmt_tree): Likewise.
5154 (expanding_p): New variable.
5155 (last_expr_type): Likewise.
5156 (building_stmt_tree): New macro.
5157 * decl.c (start_function): Use building_stmt_tree, not
5158 processing_template_decl, where appropriate.
5159 (store_parm_decls): Likewise.
5160 (store_return_init): Move most of the body to semantics.c.
5161 (finish_function): Use building_stmt_tree.
5162 (finish_stmt): Clear last_expr_type here.
5163 (cp_function): Add expanding_p, last_tree, last_expr_type.
5164 (push_cp_function_context): Save them.
5165 (pop_cp_function_context): Restore them.
5166 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5167 * error.c (dump_expr): Handle STMT_EXPR.
5168 * except.c (expand_start_catch_block): Use building_stmt_tree.
5169 Use add_decl_stmt.
5170 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5171 (do_case): Move add_tree call to semantics.c.
5172 * parse.y (return_init): Use finish_named_return_value.
5173 (for.init.statement): Use finish_expr_stmt.
5174 * parse.c: Regenerated.
5175 * pt.c (do_pushlevel): Move to semantics.c.
5176 (do_poplevel): Likewise.
5177 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5178 (tsubst_expr): Don't expand all the way to RTL here. Handle
5179 RETURN_INIT and CTOR_INITIALIZER.
5180 (instantiate_decl): Call expand_body after tsubst'ing into
5181 DECL_SAVED_TREE.
5182 * semantics.c (expand_stmts): New function.
5183 (expanding_p): New variable.
5184 (last_expr_type): Likewise.
5185 (finish_expr_stmt): Use building_stmt_tree.
5186 (begin_if_stmt): Likewise.
5187 (finish_if_stmt_cond): Likewise.
5188 (finish_then_clause): Likewise.
5189 (begin_else_clause): Likewise.
5190 (finish_else_clause): Likewise.
5191 (begin_while_stmt): Likewise.
5192 (finish_while_stmt_cond): Likewise.
5193 (finish_while_stmt): Likewise.
5194 (finish_do_body): Likewise.
5195 (finish_do_stmt): Likewise.
5196 (finish_return_stmt): Likewise.
5197 (begin_for_stmt): Likewise.
5198 (fnish_for_init_stmt): Likewise.
5199 (finish_for_cond): Likewise.
5200 (finish_for_expr): Likewise.
5201 (finish_for_stmt): Likewise.
5202 (finish_break_stmt): Likewise.
5203 (finish_continue_stmt): Likewise.
5204 (finish_switch_cond): Likewise.
5205 (finish_switch_stmt): Likewise.
5206 (finish_case_label): Call add_tree here if necessary.
5207 (finish_goto_statement): Use building_stmt_tree.
5208 (begin_try_block): Likewise.
5209 (begin_function_try_block): Likewise.
5210 (finish_try_block): Likewise.
5211 (finish_function_try_block): Likewise.
5212 (finish_handler_sequence): Likewise.
5213 (finish_function_handler_sequence): Likewise.
5214 (begin_handler): Likewise.
5215 (finish_handler_parms): Likewise.
5216 (finish_handler): Likewise.
5217 (begin_compound_stmt): Likewise.
5218 (finish_compound_stmt): Likewise.
5219 (finish_asm_stmt): Likewise.
5220 (finish_label_stmt): Likewise.
5221 (finish_named_return_value): New function.
5222 (setup_vtbl_ptr): Moved here from decl2.c.
5223 (do_pushlevel): Moved here from pt.c.
5224 (do_poplevel): Likewise.
5225 (begin_stmt_expr): Use building_stmt_tree.
5226 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
5227 when building_stmt_tree.
5228 (begin_stmt_tree): New function.
5229 (finish_stmt_tree): Likewise.
5230 (expand_stmt): Likewise.
5231 (expand_body): Likewise.
5232 * tree.c (build_cplus_method_type): Make sure the argument types
5233 end up on the same obstack as the METHOD_TYPE.
5234 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5235 THROW_EXPR, STMT_EXPR.
5236 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
5237 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
5238 sorry, if an unsupported node is encountered.
5239 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5240 (c_expand_return): Don't call add_tree here.
5241
5242 1999-08-15 Mark Mitchell <mark@codesourcery.com>
5243
5244 * pt.c (check_default_tmpl_args): Don't check in local scopes.
5245 (tsubst_decl): Make sure the declaration is on a saveable
5246 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5247 variable.
5248 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5249
5250 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
5251
5252 Speed up Koenig lookup.
5253 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
5254 to return namespaces we've looked at.
5255 * decl2.c (lookup_using_namespace): Likewise.
5256 (add_function): Don't call ovl_member.
5257 (lookup_arg_dependent): Initialize k.namespaces to the list of
5258 namespaces seen in unqualified lookup.
5259 * call.c (equal_functions): Move here from tree.c.
5260 (joust): Use it to handle duplicate candidates.
5261 * tree.c (ovl_member): Use ==.
5262
5263 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5264
5265 * cp-tree.def (DECL_STMT): Make it smaller.
5266 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5267 (lang_decl): ... here. Add next.
5268 (DECL_SAVED_TREE): Adjust accordingly.
5269 (DECL_IMPLICIT_TYPEDEF_P): New macro.
5270 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5271 (DECL_STMT_DECL): Likewise.
5272 (create_implicit_typedef): New function.
5273 (maybe_push_decl): Likewise.
5274 (tsubst_default_argument): New function.
5275 (at_function_scope_p): Likewise.
5276 (add_decl_stmt): Likewise.
5277 (push_permanent_obstack): Likewise.
5278 * call.c (convert_default_arg): Use tsubst_default_argument.
5279 * class.c (add_method): Use push_permanent_obstack.
5280 (build_self_reference): Create a TEMPLATE_DECL for the
5281 self-reference, if necessary.
5282 * decl.c (pseudo_global_level_p): Only look at the current binding
5283 level.
5284 (push_binding): Use push_permanent_obstack.
5285 (create_implicit_typedef): New function.
5286 (pushtag): Use it.
5287 (duplicate_decls): Use push_permanent_obstack.
5288 (maybe_push_decl): New function.
5289 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
5290 (start_decl_1): Remove dead code.
5291 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
5292 pseudo_global_level_p.
5293 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5294 template.
5295 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
5296 pseudo_global_level_p.
5297 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5298 a template.
5299 (get_sentry): Use push_permanent_obstack.
5300 * dump.c (dequeue_and_dump): Enable DECL_STMT.
5301 * except.c (call_eh_info): Use push_permanent_obstack.
5302 (build_eh_type_ref): Likewise.
5303 (do_pop_exception): Likewise.
5304 (expand_eh_spec): Likewise.
5305 (alloc_eh_object): Likewise.
5306 (expand_throw): Likewise.
5307 * init.c (build_java_class_ref): Likewise.
5308 * lex.c (get_time_identifier): Likewise.
5309 (free_lang_decl_chain): Correct type.
5310 (retrofit_lang_decl): Adjust accordingly.
5311 (build_lang_field_decl): Likewise.
5312 * lex.h (free_lang_decl_chain): Likewise.
5313 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5314 * parse.c: Regenerated.
5315 * pt.c (tsubst_default_arguments): New function.
5316 (retrieve_local_specialization): Likewise.
5317 (register_local_specialization): Likewise.
5318 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
5319 pseudo_global_level_p to determine whether or not a template is
5320 primary.
5321 (lookup_template_class): Likewise. Use create_implicit_typedef.
5322 (instantiate_class_template): Call tsubst_default_arguments for
5323 member functions, if appropriate.
5324 (tsubst_default_argument): New function.
5325 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
5326 * search.c (at_function_scope_p): New function.
5327 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5328 (finish_label_stmt): Likewise.
5329 (add_decl_stmt): New function.
5330 (begin_class_definition): Likewise.
5331 (finish_typeof): Likewise.
5332 * tree.c (copy_template_template_parm): Likewise.
5333 (copy_to_permanent): Likewise.
5334 (push_permanent_obstack): Define.
5335 (mark_addressable): Use it.
5336 * typeck.c (mark_addressable): Likewise.
5337
5338 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
5339
5340 * cp-tree.h (init_cplus_unsave): New.
5341 (cplus_unsave_expr_now): New.
5342 * lex.c (init_parse): Call init_cplus_unsave.
5343 * tree.c (init_cplus_unsave): New.
5344 (cplus_unsave_expr_now): New.
5345
5346 1999-08-13 Mark Mitchell <mark@codesourcery.com>
5347
5348 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
5349 decl_constant_value to simplify array bounds.
5350
5351 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
5352
5353 * lang-options.h: Add -fms-extensions.
5354 * cp-tree.h: Declare flag_ms_extensions.
5355 * decl2.c: Define it.
5356 * class.c (instantiate_type): Don't complain about taking the address
5357 of a bound member function if -fms-extensions.
5358 * typeck.c (build_unary_op): Likewise.
5359 * decl.c (grokdeclarator): Or about implicit int.
5360 * init.c (resolve_offset_ref): Or about implicit '&'.
5361
5362 1999-08-11 Mark Mitchell <mark@codesourcery.com>
5363
5364 * cp-tree.h (minimal_parse_mode): Remove.
5365 (finish_label_stmt): New function.
5366 * decl.c (saved_scope): Remove minimal parse mode.
5367 (maybe_push_to_top_level): Don't save it.
5368 (pop_from_top_level): Don't restore it.
5369 (define_label): Split out template-handling code to semantics.c.
5370 (start_decl): Don't use minimal_parse_mode.
5371 (cp_finish_decl): Likewise.
5372 (start_function): Don't increment it.
5373 (store_return_init): Don't use it.
5374 (finish_function): Don't decrement it.
5375 * parse.y (label_colon): Use finish_label_stmt throughout.
5376 * parse.c: Regenerated.
5377 * pt.c (minimal_parse_mode): Don't define it.
5378 (tsubst_expr): Use finish_label_stmt.
5379 * semantics.c (finish_label_stmt): New function.
5380
5381 * dump.c (queue): Be careful when computing bitmasks.
5382 (dequeue_and_dump): Describe binfos as binfos, not as
5383 vectors.
5384
5385 * parse.y (pedantic): Give it itype. Adjust usage accordingly
5386 throughout.
5387 * parse.c: Regenerated.
5388
5389 * Make-lang.in (CXX_SRCS): Remove sig.c.
5390 * Makefile.in (CXX_OBJS): Remove sig.o.
5391 (sig.o): Remove.
5392 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5393 (CPTI_SIGNATURE_TYPE): Likewise.
5394 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5395 (opaque_type_node): Likewise.
5396 (signature_type_node): Likewise.
5397 (sigtable_entry_type): Likewise.
5398 (flag_handle_signatures): Likewise.
5399 (lang_type): Remove is_signature, is_signature_pointer,
5400 is_signature_reference, has_opaque_typedecls,
5401 sigtables_has_been_generated. Adjust dummy. Remove signature,
5402 signature_pointer_to, signature_reference_to.
5403 (IS_SIGNATURE): Remove.
5404 (SET_SIGNATURE): Remove.
5405 (CLEAR_SIGNATURE): Remove.
5406 (IS_SIGNATURE_POINTER): Remove.
5407 (IS_SIGNATURE_REFERENCE): Remove.
5408 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5409 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5410 (CLASSTYPE_SIGNATURE): Remove.
5411 (SIGNATURE_TYPE): Remove.
5412 (SIGNATURE_METHOD_VEC): Remove.
5413 (SIGNATURE_POINTER_TO): Remove.
5414 (SIGNATURE_REFERENCE_TO): Remove.
5415 (lang_decl_flags): Remove is_default_implementation. Rename
5416 memfunc_pointer_to to saved_tree.
5417 (IS_DEFAULT_IMPLEMENTATION): Remove.
5418 (DECL_MEMFUNC_POINTER_TO): Remove.
5419 (DECL_MEMFUNC_POINTING_TO): Remove.
5420 (DECL_SAVED_TREE): Adjust definition.
5421 (tag_types): Remove signature_type_node.
5422 (SIGNATURE_FIELD_NAME): Remove.
5423 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5424 (SIGNATURE_OPTR_NAME): Likewise.
5425 (SIGNATURE_SPTR_NAME): Likewise.
5426 (SIGNATURE_POINTER_NAME): Likewise.
5427 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5428 (SIGNATURE_REFERENCE_NAME): Likewise.
5429 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5430 (SIGTABLE_PTR_TYPE): Likewise.
5431 (SIGTABLE_NAME_FORMAT): Likewise.
5432 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5433 (SIGTABLE_TAG_NAME): Likewise.
5434 (SIGTABLE_VB_OFF_NAME): Likewise.
5435 (SIGTABLE_VT_OFF_NAME): Likewise.
5436 (finish_base_specifiers): Change prototype.
5437 (build_signature_pointer_type): Remove.
5438 (build_signature_reference_type): Remove.
5439 (build_signature_pointer_constructor): Remove.
5440 (build_signature_method_call): Remove.
5441 (build_optr_ref): Likewise.
5442 (append_signature_fields): Likewise.
5443 (signature_error): Likewise.
5444 * call.c (build_this): Remove signature support.
5445 (build_over_call): Likewise.
5446 (build_new_method_call): Likewise.
5447 * class.c (add_implicitly_declared_members): Likewise.
5448 (finish_struct_1): Likewise.
5449 (finish_struct): Likewise.
5450 * cvt.c (cp_convert_to_pointer): Likewise.
5451 (convert_to_pointer_force): Likewise.
5452 (ocp_convert): Likewise.
5453 * decl.c (sigtable_decl_p): Remove.
5454 (init_decl_processing): Remove support for signatures.
5455 (cp_finish_decl): Likewise.
5456 (grokdeclarator): Likewise.
5457 (grokparms): Likewise.
5458 (xref_tag): Likewise.
5459 (start_function): Likewise.
5460 (start_method): Likewise.
5461 * decl2.c (finish_sigtable_vardecl): Remove.
5462 (flag_handle_signatures): Remove.
5463 (lang_f_options): Remove handle-signatures.
5464 (grokfield): Remove support for signatures.
5465 (grokbitfield): Likewise.
5466 (finish_file): Likewise.
5467 (reparse_absdcl_as_casts): Likewise.
5468 * error.c (dump_type_real): Likewise.
5469 (dump_function_decl): Likewise.
5470 * friend.c (make_friend_class): Likewise.
5471 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5472 * hash.h: Regenerated.
5473 * init.c (build_new_1): Remove support for signatures.
5474 * lang-options.h: Remove -fhandle-signatures,
5475 -fno-handle-signatures.
5476 * lex.c (init_parse): Remove support for signatures.
5477 (yyprint): Likewise.
5478 * lex.h (rid): Remove RID_SIGNATURE.
5479 * method.c (build_decl_overload_real): Remove support for
5480 signatures.
5481 (hack_identifier): Likewise.
5482 * parse.y (base_class): Likewise.
5483 (base_class.1): Likewise.
5484 (access_specifier): Likewise.
5485 * search.c (lookup_member): Likewise.
5486 * semantics.c (finish_qualified_object_call_expr): Likewise.
5487 (finish_template_type_parm): Likewise.
5488 (begin_class_definition): Likewise.
5489 (finish_base_specifier): Likewise.
5490 * sig.c: Remove.
5491 * tree.c (build_cplus_method_type): Remove support for signatures.
5492 * typeck.c (require_complete_type): Likewise.
5493 (c_sizeof): Likewise.
5494 (c_alignof): Likewise.
5495 (build_object_ref): Likewise.
5496 (build_component_ref): Likewise.
5497 (build_indirect_ref): Likewise.
5498 (build_c_cast): Likewise.
5499 (build_modify_expr): Likewise.
5500 (convert_for_initialization): Likewise.
5501 * typeck2.c (signature_error): Remove.
5502 (store_init_value): Remove support for signatures.
5503 (digest_init): Likewise.
5504 (build_x_arrow): Likewise.
5505 (build_functional_cast): Likewise.
5506 * xref.c (GNU_xref_decl): Likewise.
5507
5508 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5509
5510 * lex.c (do_identifier): Remove unnecessary lookup of class field.
5511
5512 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5513
5514 * decl2.c (set_decl_namespace): Do not complain about non-matching
5515 decls if processing a template.
5516
5517 1999-08-09 Mark Mitchell <mark@codesourcery.com>
5518
5519 * decl.c (build_ptrmemfunc_type): Handle qualified
5520 pointer-to-member types here.
5521 * tree.c (cp_build_qualified_type_real): Simplify handling here.
5522
5523 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5524
5525 * lex.c (lang_identify): Likewise.
5526
5527 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
5528
5529 * Makefile.in: Update dependencies.
5530 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5531 NULL_RTX.
5532 * decl.c: Include "function.h"
5533 (cleanup_label, return_label): Delete declarations.
5534 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5535 (finish_function): Rename last_parm_insn variable to
5536 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
5537 * decl2.c: Include "function.h".
5538 (rtl_expr_chain): Delete declaration.
5539 * method.c: Include "function.h"
5540 * tree.c (build_vbase_pointer_fields): Don't initialize
5541 DECL_SAVED_INSNS with NULL_RTX.
5542 * typeck.c: Include "function.h"
5543
5544 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
5545
5546 * semantics.c (begin_function_try_block, finish_function_try_block,
5547 finish_function_handler_sequence): New fns.
5548 * parse.y (function_try_block): Use them.
5549 * pt.c (instantiate_decl): Likewise.
5550
5551 * cp-tree.h: Declare in_function_try_handler.
5552 * decl.c: Define it.
5553 (start_function): Clear it.
5554 (struct cp_function, push_cp_function_context): Save it.
5555 (pop_cp_function_context): Restore it.
5556 * parse.y (function_try_block): Set and clear it.
5557 * except.c (expand_end_catch_block): Rethrow if we reach the end
5558 of a function-try-block handler in a ctor or dtor.
5559 * typeck.c (c_expand_return): Complain about returning from a
5560 function-try-block handler of a ctor.
5561
5562 * parse.y (function_try_block): Call end_protect_partials
5563 before expand_start_all_catch.
5564
5565 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
5566
5567 * decl.c (struct binding_level): Add eh_region field.
5568 (push_binding_level): Set it.
5569 (define_label): Complain about jumping into an EH block.
5570
5571 * ptree.c (print_lang_type): Print the real type of a PMF.
5572 Print what exceptions a fn type throws.
5573
5574 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5575
5576 * class.c (count_fields, add_fields_to_vec): Add static prototype.
5577
5578 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5579 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5580 char*.
5581
5582 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5583 Constify a char*.
5584
5585 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5586 char*.
5587
5588 * dump.c (queue_and_dump_index, dump_int, dump_string,
5589 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5590 a char*.
5591 (dump_stmt): Add static prototype.
5592
5593 * errfn.c (cp_thing): Constify a char*.
5594
5595 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5596 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5597 dump_expr): Constify a char*.
5598
5599 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5600 read_line_number): Add static prototype.
5601 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5602 (real_yylex): Move label `letter' into the scope where it is used.
5603
5604 * method.c (build_mangled_template_parm_index, build_overload_int,
5605 build_decl_overload_real, get_id_2): Constify a char*.
5606
5607 * search.c (check_final_overrider): Make static.
5608
5609 * typeck.c (composite_pointer_type): Constify a char*.
5610
5611 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5612
5613 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5614 we're looking at a class.
5615
5616 * decl.c (lookup_name_real): Set the complain flag if we're
5617 looking for a namespace member.
5618
5619 * lex.c (real_yylex): We can have a number with no digits.
5620
5621 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5622
5623 * search.c (binfo_from_vbase): New fn.
5624 * cp-tree.h: Declare it.
5625 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5626 from pointer to member of virtual base.
5627 * typeck.c (get_delta_difference): Likewise.
5628
5629 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
5630
5631 * pt.c (tsubst): Use build_index_type to build in-template array
5632 index type. Fixes g++.oliva/dwarf1.C.
5633 * decl.c (grokdeclarator): Likewise, just for consistency, as it
5634 doesn't seem to trigger the bug without it.
5635
5636 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5637
5638 * typeck2.c (add_exception_specifier): Use complete_type.
5639
5640 1999-08-06 Mark Mitchell <mark@codesourcery.com>
5641
5642 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5643 (dump_binary_op): Bulletproof.
5644 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5645 * tree.c (search_tree): Don't enumerate all the nodes of classes
5646 `1', `2', and `<'; handle them generically. Don't be sorry about
5647 "unrecognized tree codes"; just abort.
5648 (no_linkage_check): Don't do linkage checks for templates.
5649
5650 * tree.c (cp_build_qualified_type_real): Handle
5651 pointer-to-member-function types correctly.
5652
5653 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
5654
5655 * decl.c (pushdecl): Only give an error for shadowing a parm
5656 from *this* function.
5657
5658 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
5659
5660 * typeck2.c: Update URLs and mail addresses.
5661
5662 1999-08-04 Nathan Sidwell <nathan@acm.org>
5663
5664 * cp-tree.h (empty_except_spec): New global var.
5665 (compexcepttypes): Remove prototype.
5666 (comp_except_specs): Prototype new global function.
5667 (add_exception_specifier): Prototype new global function.
5668 * decl.c (empty_except_spec): Define new global var.
5669 (duplicate_decls): Use comp_except_specs, reword error message.
5670 (init_decl_processing): Initialize empty_except_spec.
5671 Adjust build_exception_variant calls.
5672 * parse.y (exception_specification_opt): Use empty_except_spec.
5673 (ansi_raise_identifier): Call check_for_new_type.
5674 (ansi_raise_identifiers): Use add_exception_specifier.
5675 * pt.c (tsubst): Use add_exception_specifier to build exception
5676 specifier.
5677 * search.c (check_final_overrider): New static function, broken
5678 out of get_matching_virtual. Check throw specifiers, reword
5679 diagnostics.
5680 (get_matching_virtual): Use check_final_overrider.
5681 * tree.c (build_exception_variant): Use comp_except_specs.
5682 * typeck.c (compexcepttypes): Remove.
5683 (comp_except_types): New static function, helper for
5684 comp_except_specs. Compare two types as exception specifiers.
5685 (comp_except_specs): New global function, compare two exception
5686 specifiers.
5687 (comptypes): Adjust for comp_except_specs.
5688 * typeck2.c (add_exception_specifier): New global function.
5689
5690 * class.c (check_for_override): Reword error message.
5691
5692 1999-08-03 Nathan Sidwell <nathan@acm.org>
5693
5694 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5695 * cp-tree.h (struct lang_type): Added non_pod_class flag.
5696 (CLASSTYPE_NON_POD_P): New macro to access it.
5697 * class.c (finish_struct_1): Determine non-PODness.
5698 Check for arrays of pointers (-Weffc++).
5699 Remove array inspection duplicated code.
5700 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5701 Use CLASSTYPE_NON_POD_P.
5702
5703 1999-08-03 Nathan Sidwell <nathan@acm.org>
5704
5705 * class.c (duplicate_tag_error): Preserve template information.
5706
5707 1999-08-03 Nathan Sidwell <nathan@acm.org>
5708
5709 * decl.c (start_enum): Show location of previous definition.
5710 * parse.y (enumlist_opt): New reduction.
5711 (structsp): Simplify enum rules to use enumlist_opt.
5712
5713 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
5714
5715 * lex.c (yyprint): Handle PFUNCNAME.
5716
5717 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5718 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5719
5720 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
5721
5722 * decl.c (start_decl): Set attributes before duplicate_decls call.
5723
5724 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5725
5726 * Make-lang.in (CXX_SRCS): Add dump.c.
5727 * Makefile.in (CXX_OBJS): Add dump.o.
5728 (dump.o): New target.
5729 * cp-tree.h (DECL_CONV_FN_P): Document.
5730 (DECL_OVERLOADED_OPERATOR_P): New function.
5731 (TYPE_PTRMEM_CLASS_TYPE): New macro.
5732 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5733 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5734 (ASM_VOLATILE_P): New macro.
5735 (STMT_LINENO): Likewise.
5736 (cp_namespace_decls): New function.
5737 (dump_node_to_file): New function.
5738 * decl.c (cp_namespace_decls): New function.
5739 (walk_namespaces_r): Use it.
5740 (wrapup_globals_for_namespace): Likewise.
5741 * decl2.c (flag_dump_translation_unit): New variable.
5742 (lang_decode_option): Handle -fdump-translation-unit.
5743 (finish_file): If flag_dump_translation_unit is set, dump the
5744 translation unit.
5745 * dump.c: New file.
5746 * lang-options.h: Add -fdump-translation-unit.
5747 * pt.c (tsubst_template_parms): Robustify.
5748 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5749 (tsubst_expr): Use STMT_LINENO.
5750 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5751 for invalid cv-qualifiers even while building templates.
5752
5753 1999-08-02 Richard Henderson <rth@cygnus.com>
5754
5755 * call.c: Include defaults.h instead of expr.h.
5756 * decl.c: Likewise.
5757 * pt.c: Likewise.
5758 * typeck.c: Include defaults.h.
5759
5760 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5761
5762 * lex.c (errorcount, sorrycount): Don't declare.
5763 * repo.c (errorcount, sorrycount): Likewise.
5764 * typeck2.c (errorcount, sorrycount): Likewise.
5765
5766 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5767
5768 * call.c (convert_default_arg, build_over_call): Change all uses of
5769 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5770 Ensure expr.h is included.
5771 * decl.c (grokparams): Ditto.
5772 * pt.c (tsubst_decl): Ditto.
5773 * typeck.c (convert_arguments): Ditto.
5774
5775 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5776
5777 * class.c (mark_overriders): Fix order of args to overrides.
5778 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5779 functions with the same name.
5780
5781 1999-08-02 Richard Henderson <rth@cygnus.com>
5782
5783 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5784
5785 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5786
5787 * call.c (build_conditional_expr): Fix typo in comment.
5788
5789 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5790
5791 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5792 case_stack; use in_control_zone_p.
5793 * typeck.c (c_expand_return): Likewise.
5794
5795 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5796
5797 * except.c (catch_clauses): Delete declaration.
5798
5799 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5800
5801 * call.c (build_conditional_expr): Call convert_from_reference to
5802 avoid reference/non-reference type confusion. Fix typo.
5803
5804 1999-07-30 Richard Henderson <rth@cygnus.com>
5805
5806 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5807 * cp-tree.h (initializer_constant_valid_p): Remove.
5808
5809 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5810
5811 * call.c (conditional_conversion): Don't build BASE_CONVs for
5812 conversions between things that have the same type.
5813 (build_conditional_expr): Tweak.
5814 (convert_like): Some BASE_CONVs really do require the generation
5815 of code.
5816
5817 * init.c (perform_member_init): Don't go through build_modify_expr
5818 for simple initializations.
5819
5820 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5821
5822 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5823 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5824 virtual functions and MI. Simplify.
5825
5826 * method.c: Remove prototype for largest_union_member.
5827 * pt.c (determine_specialization): Fix uninitialized warning.
5828 * lex.c (real_yylex): Likewise.
5829
5830 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5831
5832 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5833 here too.
5834
5835 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5836 * class.c (modify_one_vtable): Change prototype accordingly.
5837 (modify_all_vtables): Likewise.
5838 (modify_all_direct_vtables): Likewise.
5839 (modify_all_indirect_vtables): Likewise.
5840 (build_vtable_entry_for_fn): New function.
5841 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5842 (modify_vtable_entry): Likewise.
5843 (add_virtual_function): Likewise.
5844 (build_vtbl_initializer): New function.
5845 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5846 (fixup_vtable_deltas1): Likewise.
5847 (fixup_vtable_deltas): Likewise.
5848 (override_one_vtable): Likewise.
5849 (finish_struct_1): Likewise.
5850
5851 * error.c (dump_expr): Likewise.
5852 * search.c (get_abstract_virtuals_1): Likewise.
5853 (get_abstract_virtuals): Likewise.
5854 (expand_upcast_fixups): Likewise.
5855 * tree.c (debug_binfo): Likewise.
5856 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5857 __pure_virtual here.
5858
5859 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5860
5861 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5862 as per 1999-07-26 change.
5863
5864 * typeck.c (c_sizeof): Don't allow non-static data members.
5865 (expr_sizeof): Likewise.
5866
5867 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5868
5869 * input.c (feed_input): Only touch lineno and input_filename
5870 if !USE_CPPLIB. Save the old values before setting the new ones.
5871
5872 * input.c (feed_input): Add file, line parms.
5873 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5874 (real_yylex): Check linemode before input_redirected().
5875
5876 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5877 from op new to warning.
5878
5879 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5880
5881 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5882 * call.c: All uses changed.
5883 * typeck.c: Likewise.
5884
5885 1999-07-26 Nathan Sidwell <nathan@acm.org>
5886
5887 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5888 prototype.
5889
5890 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5891
5892 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5893 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5894 (strip_top_quals): Declare.
5895 (ncp_convert): Likewise.
5896 (type_after_usual_arithmetic_converions): Likewise.
5897 (composite_pointer_type): Likewise.
5898 * call.c (strip_top_quals): Don't make it static.
5899 (promoted_arithmetic_type_p): New function.
5900 (conditional_conversion): Likewise.
5901 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5902 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
5903 for converting a type to itself.
5904 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5905 (implicit_conversion): Make sure the from and to types are
5906 complete.
5907 (add_builtin_candidate): Correct handling of ?: operator.
5908 (add_builtin_candidates): Improve documentation.
5909 (build_conditional_expr): New function.
5910 (can_convert): Implement in terms of can_convert_arg.
5911 (ncp_convert): New function.
5912 * typeck.c (type_after_usual_arithmetic_conversions): New
5913 function, split out from common_type.
5914 (composite_pointer_type): New function, split out from
5915 build_conditional_expr.
5916 (common_type): Use type_after_usual_arithmetic_conversions.
5917 Remove redundant attribute merging.
5918 (comptypes): Tidy. Handle COMPLEX_TYPE.
5919 (build_binary_op_nodefault): Use null_ptr_cst_p.
5920 (build_conditional_expr): Remove.
5921 (convert_for_assignment): Use new conversion functions.
5922
5923 * cp-tree.h (abstract_virtuals_error): Change declaration.
5924 * typeck2.c (abstract_virtuals_error): Check to see if an error
5925 ocurred, and return a boolean value accordingly.
5926 (build_functional_cast): Adjust accordingly.
5927 * class.c (finish_struct_1): Likewise.
5928 * cvt.c (ocp_convert): Likewise.
5929 * decl.c (cp_finish_decl): Likewise.
5930 (grokparams): Likewise.
5931 (grok_op_properties): Likewise.
5932 (start_function): Likewise.
5933 * init.c (build_new_1): Likewise.
5934
5935 * pt.c (unify): Don't get confused by pointers-to-member functions.
5936
5937 * search.c (build_cplus_new): Robustify.
5938
5939 1999-07-24 Richard Henderson <rth@cygnus.com>
5940
5941 * gxx.gperf (__builtin_va_arg): New.
5942 * parse.y (VA_ARG): New token.
5943 (unary_expr): Recognize it.
5944
5945 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
5946
5947 * g++FAQ.texi: Deleted per Joe Buck's request.
5948 * Makefile.in: Corresponding changes.
5949
5950 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
5951
5952 * lex.c: Sync with C frontend.
5953 (whitespace_cr): New fn.
5954 (skip_white_space): Use it.
5955 (init_parse): Reorder.
5956 (yyprint): Support CONSTANT.
5957 (pragma_getc, pragma_ungetc): Bring back.
5958 (read_line_number): Change in_system_header directly.
5959 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5960 (parse_float): Update to C version.
5961 (yylex): Handle '$' under the letter case.
5962 Remove looking_for_typename handling.
5963 Support hex floating point constants.
5964 Follow C's lead for choosing type of integer constants.
5965 Rearrange stuff to match C frontend.
5966 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5967 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5968
5969 1999-07-23 Mark Mitchell <mark@codesourcery.com>
5970
5971 * call.c (reference_binding): Tweak.
5972 (mayble_handle_implicit_object): Use direct_reference_binding to
5973 create the right implicit conversion sequence.
5974
5975 1999-07-22 Mark Mitchell <mark@codesourcery.com>
5976
5977 * pt.c (convert_nontype_argument): Don't call decl_constant_value
5978 if we're converting to a reference type.
5979
5980 * call.c (NEED_TEMPORARY_P): New macro.
5981 (standard_conversion): Set it, for derived-to-base conversions.
5982 (reference_related_p): New function.
5983 (reference_compatible_p): Likewise.
5984 (convert_class_to_reference): Likewise.
5985 (direct_reference_binding): Likewise.
5986 (reference_binding): Rework for standards-compliance.
5987 (convert_like): Adjust accordingly.
5988 (maybe_handle_ref_bind): Simplify; the right conversion sequences
5989 are now built up in reference_binding.
5990 (initialize_reference): New function.
5991 * cp-tree.h (ICS_USER_FLAG): Document.
5992 (ICS_THIS_FLAG): Likewise.
5993 (ICS_BAD_FLAG): Likewise.
5994 (NEED_TEMPORARY_P): Likewise.
5995 (cp_lvalue_kind): New type.
5996 (real_lvalue_p): Return it.
5997 * error.c (dump_expr): Provide more accurate representation for
5998 AGGR_INIT_EXPRs.
5999 * init.c (expand_default_init): Do not try to perform implicit
6000 conversions for a brace-enclosed initializer.
6001 * search.c (lookup_conversions): Document.
6002 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
6003 appropriately.
6004 (real_lvalue_p): Adjust accordingly.
6005 (lvalue_p): Likewise.
6006 (build_cplus_new): Don't allow the creation of an abstract class.
6007 * typeck.c (convert_for_initialization): Use initialize_reference.
6008
6009 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
6010
6011 * lex.c (real_yylex) : Correct the test for overflow when lexing
6012 integer literals.
6013
6014 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
6015
6016 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
6017 not DECL_BUILT_IN, to determine if a function is internally declared.
6018 (duplicate_decls): Likewise. Improve handling of builtins.
6019 (push_overloaded_decl): Remove special handling of builtins.
6020
6021 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
6022
6023 * decl.c (grokdeclarator): Pull out decl_constant_value in
6024 templates, too.
6025
6026 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
6027 * cp-tree.h, pt.c, semantics.c: Adjust.
6028 * method.c (largest_union_member): Remove.
6029
6030 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
6031
6032 * lex.c (token_getch, token_put_back): New fns.
6033 (real_yylex): Use them.
6034
6035 * lex.c (lang_init): Generalize.
6036 (lang_init_options): Tell cpplib this is C++.
6037 (nextchar): Remove. Replace uses with put_back.
6038 (skip_white_space): Handle linemode here. Optimize for cpplib.
6039 (extend_token_buffer_to): New fn.
6040 (extend_token_buffer): Use it.
6041 (read_line_number, check_newline): Just deal with tokens.
6042 (real_yylex): More cpplib optimizations. Simplify. Don't produce
6043 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
6044 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
6045 * parse.y (PAREN_STAR_PAREN): Remove.
6046 * input.c: Don't use the putback machinery with cpplib.
6047 (sub_getch): Fold back into getch.
6048 (getch): Don't handle linemode here.
6049 (feed_input): Unget any text in the token buffer.
6050
6051 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
6052 nextyychar, nextyylval): Remove.
6053
6054 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
6055 Jason Merrill <jason@yorick.cygnus.com>
6056
6057 * lex.c (indent_level): New variable.
6058 (init_parse): Set cpp_token to CPP_DIRECTIVE.
6059 (consume_string): Make this smart about USE_CPPLIB.
6060 (yyungetc): Use put_back function.
6061 (pragma_getc, pragma_ungetc): Functions deleted.
6062 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
6063 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
6064 pragma_ungetc.
6065 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
6066 Also, clean up cases where we redundantly set token_buffer[0].
6067 (read_line_number): New fn.
6068 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
6069 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
6070 (sub_getch): Conditionalize out code that's not appropriate if
6071 USE_CPPLIB.
6072 (put_back): Rewrite in case USE_CPPLIB is defined.
6073 (input_redirected): Ditto.
6074
6075 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6076
6077 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
6078 c_global_trees and accessor macros defined in c-common.h.
6079 (cp_tree_index): New enumeration.
6080 (cp_global_trees): Declare new array. Add accessor macros for it, and
6081 delete declarations of tree nodes replaced by it.
6082 (builtin_function): Delete macro, add declaration for new function.
6083 Include c-common.h.
6084 * decl.c: Delete definitions for tree nodes that were replaced by
6085 cp_global_trees and c_global_trees.
6086 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
6087 to generate the common builtins here.
6088 (builtin_function): New function.
6089 * decl2.c (abort_fndecl): Delete declaration.
6090 * except.c (expand_builtin_return_address): Delete declaration.
6091 (builtin_return_address_fndecl): Delete variable.
6092 (const_ptr_type_node): Delete declaration.
6093 * lex.c (cons_up_default_function): Delete declaration of
6094 void_list_node.
6095 * parse.y (void_list_node): Delete declaration.
6096 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6097 Delete variables.
6098 (const_string_type_node): Delete declaration.
6099 * search.c (abort_fndecl): Delete declaration.
6100 * Makefile.in: Update dependencies.
6101
6102 1999-07-19 Mark Mitchell <mark@codesourcery.com>
6103
6104 * pt.c (check_default_tmpl_args): Move test for missing default
6105 arguments here, from ...
6106 (end_template_parm_list): Here.
6107
6108 1999-07-18 Mark Mitchell <mark@codesourcery.com>
6109
6110 * decl.c (lookup_nested_type): Remove.
6111 (pushtag): Don't call it.
6112
6113 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
6114
6115 * Makefile.in (INTERFACE): Bump to 2.
6116
6117 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
6118
6119 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6120 instructions to gcc.gnu.org. Removed e-mail address.
6121
6122 1999-07-17 Mark Mitchell <mark@codesourcery.com>
6123
6124 * pt.c (determine_specialization): Tighten error-checking.
6125 (end_template_parm_list): Likewise.
6126
6127 1999-07-14 Mark Mitchell <mark@codesourcery.com>
6128
6129 * pt.c (check_default_tmpl_args): Handle friends defined in the
6130 class just like member functions defined in the class.
6131
6132 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6133 Jason Merrill <jason@yorick.cygnus.com>
6134
6135 * cp-tree.h (struct lang_decl): Added field for storing sorted
6136 FIELD_DECLs (used in TYPE_DECLs).
6137 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6138 (DECL_SORTED_FIELDS): New macro.
6139 * class.c (method_name_cmp): New function.
6140 (finish_struct_methods): Modified to support sorting and searching
6141 methods.
6142 (finish_struct_anon): Changed code in inner loop to use ELT rather
6143 than UELT (which required an extra indirection for every reference).
6144 (field_decl_cmp): New function to support sorting FIELD_DECLs.
6145 (finish_struct_1): Sort fields.
6146 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6147 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6148 Also, switch to using array indexing rather than a changing pointer.
6149 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6150 DECL_SORTED_FIELDS.
6151
6152 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
6153
6154 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6155 casts in system headers or extern "C" blocks.
6156
6157 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6158 errors to pedwarn.
6159
6160 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
6161
6162 * decl2.c (write_virtuals): Deleted declaration.
6163 * cp-tree.h (write_virtuals): Deleted extern declaration.
6164 * class.c (finish_struct_1): Removed #if 0'd code that mentions
6165 write_virtuals.
6166 * semantics.c (begin_class_definition): Rewrite code to not depend
6167 on write_virtuals.
6168
6169 * lex.c (cp_pragma_interface): New function.
6170 (cp_pragma_implementation): Likewise.
6171 (handle_cp_pragma): Call them.
6172
6173 * typeck.c (comptypes): Simplify C code in look_hard.
6174
6175 * xref.c (PALLOC): Use xcalloc, not calloc.
6176 (SALLOC): Use xmalloc, not malloc.
6177
6178 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6179
6180 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6181 is NO_DEBUG.
6182
6183 * decl.c (duplicate_decls): If a redeclaration doesn't match the
6184 initial declaration, then don't save the inline info and by all
6185 means don't mark the function as a builtin function.
6186
6187 * decl.c (lookup_name_real): Set NONCLASS to 1 if
6188 CURRENT_CLASS_TYPE is 0.
6189
6190 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6191 NULL_TREE.
6192
6193 * ptree.c (print_lang_type): Added vtable-needs-writing.
6194
6195 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
6196
6197 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6198
6199 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
6200
6201 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6202 Merged into c-common.
6203
6204 1999-07-05 Dave Brolley <brolley@cygnus.com>
6205
6206 * lex.c (errorcount): Declare it.
6207 (finish_parse): Update errorcount for when using CPPLIB.
6208
6209 1999-07-05 Mark Mitchell <mark@codesourcery.com>
6210
6211 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6212 parameters.
6213 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6214 * decl.c (push_class_binding): Use it.
6215 (lookup_name_real): Likewise.
6216
6217 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
6218
6219 * cp-tree.h (widest_integer_literal_type_node,
6220 widest_unsigned_literal_type) : New.
6221 * decl.c (widest_integer_literal_type_node,
6222 widest_unsigned_literal_type) : New.
6223 (init_decl_processing): Handle/use the two new types.
6224 * lex.c (real_yylex): Same.
6225 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6226 Same.
6227
6228 1999-07-01 Mark Mitchell <mark@codesourcery.com>
6229
6230 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6231 to anonymous cv-qualified types.
6232
6233 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
6234
6235 * lex.c (real_yylex) : Change integer literal overflow handling to
6236 be like c-lex.c.
6237
6238 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6239
6240 1999-06-28 Richard Henderson <rth@cygnus.com>
6241
6242 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6243
6244 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
6245
6246 * error.c (dump_type_real): Handle TREE_LIST again.
6247
6248 * typeck.c (comp_target_parms): Don't complain about
6249 converting from () to (...) if !flag_strict_prototype.
6250
6251 * decl.c (grokdeclarator): Update the names of all variants when
6252 de-anonymizing.
6253
6254 1999-06-21 Mark Mitchell <mark@codesourcery.com>
6255
6256 * init.c (expand_aggr_vbase_init): Rename to
6257 construct_virtual_bases. Conditionalize construction here,
6258 rather than ...
6259 (emit_base_init): Here.
6260
6261 1999-06-19 Mark Mitchell <mark@codesourcery.com>
6262
6263 * semantics.c (finish_asm_stmt): Apply decay conversions to
6264 input operands.
6265
6266 * decl.c (expand_static_init): When building an anonymous function
6267 for use with atexit, compute its body before and after entering
6268 the function.
6269
6270 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6271 EXIT_EXPR.
6272
6273 1999-06-18 Mark Mitchell <mark@codesourcery.com>
6274
6275 * init.c (expand_aggr_vbase_init): Add flag parameter.
6276 (build_partial_cleanup_for): Remove, inlining into ..
6277 (expand_cleanup_for_base): ... here. Take flag parameter.
6278 (emit_base_init): Pass the in_chrg parameter to
6279 emit_aggr_vbase_init.
6280 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6281
6282 1999-06-16 Mark Mitchell <mark@codesourcery.com>
6283
6284 * decl2.c (import_export_decl): Use same_type_p, rather than
6285 relying on pointer-equality for types.
6286
6287 * method.c (do_build_copy_constructor): Simplify.
6288
6289 * call.c (build_method_call): Remove bogus code for two-argument
6290 delete.
6291 * init.c (build_new_1): Expand on comment, and remove dead code.
6292
6293 * init.c (expand_cleanup_for_base): New function, split out
6294 from ...
6295 (emit_base_init): Here.
6296 (expand_aggr_vbase_init): Use it.
6297
6298 1999-06-15 Mark Mitchell <mark@codesourcery.com>
6299
6300 * cp-tree.h (class_cache_firstobj): Declare.
6301 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6302 * class.c (permanent_obstack): Remove declaration.
6303 (class_cache_firstobj): Make it global.
6304 (add_method): Don't use permanent_obstack directly.
6305 (pushclass): Only free the class_cache_obstack if we know how far
6306 back to free it.
6307 (maybe_push_cache_obstack): Rename to push_cache_obstack.
6308 * decl.c: Remove dead comment.
6309 (saved_scope): Add class_cache_firstobj.
6310 (push_to_top_level): Save it.
6311 (pop_from_top_level): Restore it.
6312 (push_class_level_binding): Use push_cache_obstack, not
6313 maybe_push_cache_obstack.
6314 * search.c (push_class_decls): Likewise.
6315
6316 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
6317
6318 * pt.c (tsubst_friend_function): Push into namespace of friend
6319 function before pushdecl'ing it.
6320
6321 1999-06-14 Nathan Sidwell <nathan@acm.org>
6322
6323 * call.c (build_new_op): Remove REF_BIND from all operands.
6324
6325 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
6326
6327 * init.c (build_new_1): Look up operator delete even if there was
6328 no explicit new placement.
6329
6330 1999-06-08 Nathan Sidwell <nathan@acm.org>
6331
6332 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6333 of ...
6334 (build_throw): ... here. Call it.
6335 (process_start_catch_block): Call it.
6336
6337 1999-06-07 Mark Mitchell <mark@codesourcery.com>
6338
6339 * search.c (convert_pointer_to_single_level): Reimplement without
6340 using get_binfo.
6341
6342 1999-06-06 Mark Mitchell <mark@codesourcery.com>
6343
6344 * method.c (is_back_referenceable_type): Back-reference bools when
6345 not squangling.
6346
6347 1999-06-07 Dave Brolley <brolley@cygnus.com>
6348
6349 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6350 * input.c (putback_buffer): New structure type.
6351 (putback): Replaces putback_char member.
6352 (putback): Replaces putback_char static variable.
6353 (feed_input): Use putback.
6354 (end_input): Use putback.
6355 (sub_getch): Use putback.
6356 (put_back): Use putback.
6357
6358 1999-06-05 Mark Mitchell <mark@codesourcery.com>
6359
6360 * decl.c (grokdeclarator): Fix typo in last change.
6361
6362 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
6363
6364 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6365 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6366
6367 1999-06-04 Nathan Sidwell <nathan@acm.org>
6368
6369 * except.c (build_throw): Check throw expression validity.
6370
6371 1999-06-03 Mark Mitchell <mark@codesourcery.com>
6372
6373 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6374 just because flag_signed_bitfields is false.
6375
6376 1999-06-03 Nathan Sidwell <nathan@acm.org>
6377
6378 * semantics.c (begin_class_definition): Update the struct's
6379 location here ...
6380 * class.c (finish_struct): ... rather than here.
6381
6382 * decl.c (make_typename_type): Don't rely on uninitialized
6383 variable.
6384
6385 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6386
6387 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6388
6389 1999-05-31 Mark Mitchell <mark@codesourcery.com>
6390
6391 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6392 and friends rather than messing with current_obstack directly.
6393 (cp_build_qualified_type_real): Rework ARRAY_TYPE
6394 allocation to match practice throughout the rest of the
6395 compiler.
6396
6397 1999-05-30 Mark Mitchell <mark@codesourcery.com>
6398
6399 * lex.c (make_lang_type): Create TYPE_BINFO for
6400 TEMPLATE_TYPE_PARMs just like for non-template types.
6401
6402 * decl.c (start_decl): Move checks on initialization to ...
6403 (cp_finish_decl): Here. Tidy formatting slightly.
6404
6405 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6406
6407 * decl.c (add_binding): Don't complain about a redeclaration of a
6408 semantically identical typedef in a local scope.
6409
6410 1999-05-28 Nathan Sidwell <nathan@acm.org>
6411
6412 * decl.c (complete_array_type): Allocate off same obstack. Fix
6413 DO_DEFAULT comment to match reality.
6414
6415 * friend.c (make_friend_class): Fix diagnostic typo.
6416
6417 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6418
6419 * decl.c (lookup_namespace_name): Handle getting a
6420 TEMPLATE_ID_EXPR.
6421 (expand_static_init): Don't call pushdecl for implicitly declared
6422 `atexit' used to register destructors.
6423
6424 1999-05-25 Mark Mitchell <mark@codesourcery.com>
6425
6426 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6427 intialize a vtable.
6428
6429 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6430 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
6431 by combining TEMPLATE_INFO and LEVEL into a single union.
6432 (DECL_TEMPLATE_INFO): Reformat.
6433 (DECL_SAVED_TREE): Document.
6434 (DECL_TEMPLATE_INJECT): Remove.
6435 * class.c (finish_struct): Remove code to deal with
6436 DECL_TEMPLATE_INJECT.
6437
6438 * decl.c (maybe_process_template_type_declaration): Handle all new
6439 types in templates uniformly.
6440 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6441 DECL_CONTEXT.
6442 * pt.c (lookup_template_class): Inject template instantiations of
6443 forward-declarations.
6444 (instantiate_class_template): Remove code processing
6445 DECL_TEMPLATE_INJECT.
6446
6447 * pt.c (lookup_template_class): Tweak lookup to find member
6448 templates.
6449
6450 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6451 ASM_CV_QUAL.
6452 * semantics.c (finish_asm_stmt): Make strings permanent if they're
6453 used in a template.
6454
6455 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
6456
6457 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6458 parts of pointer to data member types.
6459
6460 1999-05-24 Mark Mitchell <mark@codesourcery.com>
6461
6462 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6463 and then make it look like `abort'. Just use `abort' instead.
6464
6465 * typeck.c (build_static_cast): Don't allow static_casts that cast
6466 away constness.
6467 (casts_away_constness_r): New function.
6468 (casts_away_constness): Likewise.
6469
6470 * decl.c (lookup_tag): Remove code no longer needed after
6471 name-lookup improvements.
6472 * decl2.c (handle_class_head): Make error-recovery more robust.
6473 * friend.c (make_friend_class): Reject templated typename types.
6474 * lex.c (is_global): A template parameter isn't global.
6475 * parse.y (class_head): Robustify.
6476 * parse.c: Regenerated.
6477
6478 1999-05-22 Mark Mitchell <mark@codesourcery.com>
6479
6480 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6481 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
6482
6483 * cp-tree.h (push_nested_namespace): Declare.
6484 (pop_nested_namespace): Likewise.
6485 * decl.c (push_nested_namespace): New function.
6486 (pop_nested_namespace): Likewise.
6487 * pt.c (instantiate_class_template): Use them.
6488
6489 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6490
6491 * cp-tree.h (cplus_expand_constant): Declare.
6492 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6493 converted from one pointer-to-object type to another.
6494 * expr.c (cplus_expand_constant): Don't make it static.
6495 * typeck.c (build_component_ref): Don't crash when presented with
6496 a component which is a TEMPLATE_DECL.
6497 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
6498 cast from a pointer-to-member constant to its own type does not
6499 result in a valid non-type template argument.
6500
6501 1999-05-21 Mark Mitchell <mark@codesourcery.com>
6502 Nathan Sidwell <nathan@acm.org>
6503
6504 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6505 * cp-tree.h: Fix typo in documentation on pointers-to-members.
6506 (cp_build_qualified_type): Make it a macro.
6507 (cp_build_qualified_type_real): Declare.
6508 * decl.c (grokdeclarator): Remove misleading comment. Avoid
6509 problem with template parameters and restrict-qualification.
6510 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6511 * hash.h: Regenerated.
6512 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6513 the enumeration.
6514 (NORID): Remove definition.
6515 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6516 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
6517 (fn_type_unification): Check that the function type resulting from
6518 the deduction is legal.
6519 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6520 (unify): Use cp_build_qualified_type_real.
6521 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6522 (cp_build_qualified_type): Rename to ...
6523 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6524 and modify appropriately.
6525
6526 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6527 reveal optimization opportunities.
6528
6529 * pt.c (tsubst): Don't issue error messages when we're not
6530 complaining, even if we see a qualified function type.
6531 (check_cv_quals_for_unify): Don't allow a qualified function
6532 type.
6533
6534 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6535
6536 * class.c (instantiate_type): Downgrade errors for object-dependent
6537 memfn refs to pedwarn.
6538
6539 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6540
6541 * decl.c (grokdeclarator): Don't treat [] as indicating a
6542 zero-sized array in a typedef.
6543
6544 * call.c (build_object_call): Don't look at DECL_NAME for a type.
6545 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6546 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6547
6548 * pt.c (for_each_template_parm): Rework to match documentation.
6549 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6550
6551 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6552
6553 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6554
6555 * class.c (finish_base_struct): Allow non-COM bases for COM classes
6556 except at the leftmost position.
6557 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6558 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6559 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6560
6561 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6562 (build_cplus_new): Make sure that what we return is of the right type.
6563
6564 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6565
6566 * cp-tree.h (make_ptrmem_cst): New function.
6567 * expr.c (cplus_expand_constant): Split out from ...
6568 (cplus_expand_expr): Here. Use cplus_expand_constant.
6569 (init_cplus_expand): Set lang_expand_constant.
6570 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6571
6572 * tree.c (make_ptrmem_cst): Define.
6573 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6574 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6575
6576 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6577
6578 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6579
6580 * decl2.c (start_static_storage_duration_function): Fix comment.
6581 (finish_file): Create static storage duration functions lazily.
6582
6583 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6584
6585 Implement anonymous structs.
6586 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6587 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6588 * class.c (finish_struct_1): Remove redundant check for anon struct.
6589 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6590 (check_tag_decl): Check for anonymous struct here.
6591 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6592 * init.c (sort_member_init, emit_base_init): Handle getting fields
6593 as well as names in current_member_init_list.
6594 (perform_member_init): Handle getting an anon aggr.
6595 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6596 (do_build_copy_constructor): Likewise.
6597
6598 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6599
6600 * tree.c (cp_build_qualified_type): Don't allow qualified function
6601 types.
6602
6603 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
6604
6605 * gxxint.texi: Fix typo.
6606
6607 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6608
6609 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6610 * class.c (finish_struct_1): Use CLASS_TYPE_P.
6611 * ptree.c (print_lang_type): Likewise.
6612 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6613 IS_AGGR_TYPE_CODE.
6614 * typeck2.c (digest_init): Likewise.
6615
6616 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
6617
6618 * call.c (joust): Compare the types of the conv ops, not the
6619 target types of the conversions.
6620
6621 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
6622
6623 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6624 was not given.
6625
6626 1999-05-17 Mark Mitchell <mark@codesourcery.com>
6627
6628 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6629 * decl.c (grokfndecl): Don't allow inline declarations of friend
6630 template specializations, or friend template specializations with
6631 default arguments.
6632 * pt.c (tsubst): Handle substitution into array types that does
6633 not yield a fixed upper bound, even when not processing a
6634 template.
6635 (tsubst_copy): Deal with the fact that the second operand to a
6636 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6637 * search.c (marked_pushdecls_p): Don't descend into
6638 TEMPLATE_TYPE_PARMs and the like.
6639 (unmarked_pushdecls_p): Likewise.
6640
6641 * call.c (build_over_call): Don't throw away
6642 initializations/copies of empty classes; use MODIFY_EXPR and
6643 INIT_EXPR as for non-empty classes.
6644 * class.c (finish_struct_1): Put the padding byte for an empty
6645 class on the TYPE_NONCOPIED_PARTS list for the class.
6646
6647 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6648
6649 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6650 indicate a reference to a field that is a qualified name.
6651
6652 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
6653
6654 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6655 ASM_OUTPUT_CONSTRUCTOR.
6656
6657 * friend.c (do_friend): Add attrlist arg. Remove support for
6658 getting a non-decl as 'decl'.
6659 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
6660 rtl.
6661 (grokdeclarator): Adjust.
6662 * cp-tree.h: Adjust.
6663
6664 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6665
6666 * cp-tree.h (permanent_p): New function.
6667 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6668 possibly complex tree node.
6669 * tree.c (mapcar): Adjust comments, and follow coding standards in
6670 conditional.
6671 (permanent_p): New function.
6672
6673 1999-05-13 Per Bothner <bothner@cygnus.com>
6674
6675 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
6676 primitive Java types, if we actually see `extern "Java"'.
6677
6678 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6679
6680 * lang-specs.h: Pass -$ to the preprocessor.
6681
6682 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
6683
6684 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6685 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6686 (resolve_offset_ref): Don't handle a raw baselink.
6687 * cvt.c (build_expr_type_conversion): Likewise.
6688 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6689 convert_for_initialization): Likewise.
6690 * class.c (instantiate_type): Handle seeing a baselink under an
6691 OFFSET_REF.
6692 * error.c (dump_expr): Likewise.
6693 * pt.c (for_each_template_parm): Likewise.
6694 (resolve_overloaded_unification): Likewise.
6695 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6696 * typeck.c (expr_sizeof): Also complain about other permutations
6697 of overloaded functions.
6698
6699 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
6700
6701 * init.c (resolve_offset_ref): Don't return a raw method.
6702 Use BASELINK_P.
6703 * typeck.c (decay_conversion): Don't handle a raw method.
6704 Resolve all OFFSET_REFs.
6705 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6706 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
6707 same_type_p for pmf bits. Don't use build_binary_op to compare
6708 raw pointers to methods.
6709 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6710 to decide when to call resolve_offset_ref.
6711 (build_c_cast, convert_for_initialization): Likewise.
6712 * cvt.c (build_expr_type_conversion): Likewise.
6713
6714 1999-05-06 Nathan Sidwell <nathan@acm.org>
6715
6716 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6717
6718 1999-05-05 Mark Mitchell <mark@codesourcery.com>
6719
6720 * decl2.c (start_objects): Don't let static constructors and
6721 destructors get inlined.
6722
6723 * parse.y (nested_name_specifier): Make sure ordinary types are
6724 complete, just like template types.
6725 * parse.c: Regenerated.
6726
6727 * pt.c (check_explicit_specialization): Improve error messages.
6728
6729 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6730
6731 * typeck.c (string_conv_p): Use same_type_p to check whether we
6732 try to convert between char and wchar_t.
6733
6734 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6735
6736 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6737 lookup to error_mark_node here.
6738 (lookup_member): Revise documentation. Add comments. Don't set
6739 the TREE_TYPE to error_mark_node here, and don't build up an extra
6740 TREE_LIST for ambiguous lookups.
6741 (setup_class_bindings): Adjust accordingly.
6742 (push_class_decls): Revise out-of-date comments.
6743
6744 * typeck.c (build_const_cast): Tighten checks for legality.
6745
6746 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6747
6748 * init.c (build_member_call): Lookup names coming from
6749 namespace-scoped LOOKUP_EXPR.
6750
6751 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6752
6753 * gxxint.texi: Add documentation for 'I'.
6754
6755 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6756
6757 * tinfo.cc (operator==): Qualify type_info with std::.
6758
6759 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6760
6761 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6762 (DECL_COMDAT): Remove definition.
6763
6764 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6765
6766 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6767 change.
6768
6769 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6770
6771 * class.c (build_vtable): Use build_lang_decl when building
6772 vtables, not just build_decl.
6773 (prepare_fresh_vtable): Likewise.
6774 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6775 DECL_EXTERNAL when calling wrapup_global_declarations.
6776 * decl2.c (priority_info_s): Add initializations_p and
6777 destructions_p members.
6778 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6779 when deciding what vtables to write out.
6780 (ssdf_decls): New variable.
6781 (ssdf_decls_used): Likewise.
6782 (start_static_storage_duration_function): Deal with being called
6783 multiple times. Avoid inlining this function.
6784 (generate_inits_for_priority): Deal with reuse of priority map.
6785 (get_priority_info): Clear initializations_p and destructions_p.
6786 (do_static_initialization): Tweak comment.
6787 (do_static_destruction): Likewise. Fix condition on sentries for
6788 destruction.
6789 (generate_ctor_or_dtor_function): Call all of the static storage
6790 duration functions.
6791 (generate_ctor_or_dtor_function_for_priority): Check
6792 initializations_p and destructions_p to see what priorities need
6793 initialization functions.
6794 (finish_file): Rework to generate multiple static storage duration
6795 functions, rather than just one.
6796
6797 * typeck.c (build_const_cast): Tweak last change to handle
6798 templates correctly.
6799
6800 * typeck.c (build_const_cast): Disallow use of const_cast to
6801 anything but a pointer or reference type.
6802
6803 1999-04-30 Nathan Sidwell <nathan@acm.org>
6804
6805 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6806 signature type.
6807
6808 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6809
6810 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6811 (finish_file): Indent comments properly.
6812
6813 1999-04-29 Richard Henderson <rth@cygnus.com>
6814
6815 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6816 (do_static_destruction): Likewise.
6817
6818 1999-04-29 Nathan Sidwell <nathan@acm.org>
6819
6820 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6821 * decl2.c (delete_sanity): Warn on deleting void *.
6822 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6823 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6824 throwing operator new.
6825
6826 1999-04-28 Nathan Sidwell <nathan@acm.org>
6827
6828 * cp-tree.h (build_component_addr): Remove prototype.
6829 * typeck.c (build_component_addr): Make static. Remove MSG
6830 argument.
6831 (build_component_addr): Remove MSG parameter, clean up
6832 comment.
6833 (build_x_function_call): Use cp_error.
6834 (build_unary_op): Adjust call of build_component_addr.
6835
6836 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6837
6838 * pt.c (tsubst_friend_class): Check for NULL.
6839
6840 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6841
6842 * search.c (binfo_for_vtable): Initialize bfvi.var.
6843
6844 1999-04-27 Nathan Sidwell <nathan@acm.org>
6845
6846 * rtti.c (build_x_typeid): Check rtti is enabled.
6847
6848 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6849
6850 * search.c (is_subobject_of_p): Make sure we're looking at the
6851 right baseclasses.
6852
6853 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6854
6855 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6856
6857 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6858
6859 * decl2.c (finish_file): Tweak handling of extern inlines so that
6860 they are not unnecessarily put out.
6861
6862 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6863 such as base classes.
6864
6865 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6866
6867 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6868 not trying V, while cycling through U.
6869
6870 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6871
6872 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6873 preserves_first_arg. Enlarge dummy accordingly.
6874 (DECL_TINFO_FN_P): New macro.
6875 (SET_DECL_TINFO_FN_P): Likeiwse.
6876 (DECL_RETURNS_FIRST_ARG): Remove.
6877 (DECL_PRESERVES_THIS): Likewise.
6878 (DECL_INIT_PRIORITY): New macro.
6879 (finish_struct_1): Change prototype.
6880 (cat_namespace_levels): Remove prototype.
6881 (vtable_decl_p): New prototype.
6882 (vtype_decl_p): Likewise.
6883 (sigtable_decl_p): Likewise.
6884 (walk_globals_pred): New typedef.
6885 (walk_globals_fn): Likewise.
6886 (walk_globals): New prototype.
6887 (walk_namespaces_fn): New typedef.
6888 (walk_namespaces): New prototype.
6889 (wrapup_globals_for_namespace): Likewise.
6890 (walk_vtables): Remove prototype.
6891 (walk_sigtables): Likewise.
6892 (instantiate_pending_templates): New prototype.
6893 * class.c (finish_struct_1): Don't return a value.
6894 * decl.h (pending_statics): Remove declaration.
6895 * decl.c (walk_namespaces_r): New function.
6896 (walk_globals_r): Likewise.
6897 (vtable_decl_p): Likewise.
6898 (vtype_decl_p): Likewise.
6899 (sigtable_decl_p): Likewise.
6900 (walk_namespaces): Likewise.
6901 (walk_globals_data): New type.
6902 (walk_globals): New function.
6903 (wrapup_globals_for_namespace): Likewise.
6904 (expand_static_init): Remove assertion. Remove redundancy in
6905 conditional. Don't put static data members in static_aggregates
6906 Tidy.
6907 (finish_function): Remove redundancy in conditional. Don't set
6908 DECL_RETURNS_FIRST_ARG.
6909 (cat_namespace_levels): Remove.
6910 * decl2.c: Include splay-tree.h and varray.h.
6911 (priority_info_s): New structure.
6912 (finish_vtable_vardecl): Change prototype. Adjust for new calling
6913 conventions.
6914 (prune_vtable_vardecl): Likewise.
6915 (finish_sigtable_vardecl): Likewise.
6916 (setup_initp): Remove.
6917 (do_dtors): Remove.
6918 (do_ctors): Remove.
6919 (start_static_storage_duration_function): New function.
6920 (generate_inits_for_priority): Likewise.
6921 (finish_static_storage_duration_function): Likewise.
6922 (get_priority_info): Likewise.
6923 (do_static_initialization): Likewise.
6924 (do_static_destruction): Likewise.
6925 (do_static_initialization_and_destruction): Likewise.
6926 (generate_ctor_or_dtor_function): Likewise.
6927 (generate_ctor_and_dtor_functions_for_priority): Likewise.
6928 (pending_statics): Make it a varray.
6929 (pending_statics_used): New variable.
6930 (saved_inlines): Make it a varray.
6931 (saved_inlines_used): New variable.
6932 (finish_static_data_member): Change method of updating
6933 pending_statics.
6934 (mark_inline_for_output): Remove #if 0'd code. Change method of
6935 updating saved_inlines.
6936 (walk_vtables): Remove.
6937 (walk_sigtables): Likewise.
6938 (import_export_decl): Use DECL_TINFO_FN_P.
6939 (pending_templates): Remove declaration.
6940 (maybe_templates): Likewise.
6941 (static_aggregates_initp): Likewise.
6942 (setup_initp): Likewise.
6943 (finish_objects): Simplify.
6944 (INITIALIZE_P_IDENTIFIER): New macro.
6945 (PRIORITY_IDENTIFIER): New macro.
6946 (SSDF_IDENTIFIER): New macro.
6947 (initialize_p_decl): New variable.
6948 (priority_decl): Likewise.
6949 (ssdf_decl): Likewise.
6950 (priority_info_map): Likewise.
6951 (finish_file): Recode output of static intializers and other
6952 file-scope finalization tasks.
6953 * error.c (OB_END_TEMPLATE_ID): New macro.
6954 (dump_type_real): Use it.
6955 (dump_decl): Likewise.
6956 (dump_function_name): Likewise.
6957 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6958 interface.
6959 (check_newline): Use walk_globals, not walk_vtables.
6960 * pt.c (pending_tempalte_expansions): Remove.
6961 (set_vardecl_interface_info): Likewise.
6962 (pending_templates): Make static.
6963 (maybe_templates): Likewise.
6964 (instantiate_class_template): Adjust call to finish_struct_1.
6965 (instantiate_pending_templates): New function.
6966 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6967 * tree.c (static_aggregates_initp): Remove.
6968 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6969 instead.
6970 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6971
6972 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6973 with the RTL code RETURN.
6974 * hash.h: Regenerated.
6975 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6976 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6977 * parse.c: Regenerated.
6978 * pt.c: Include varray.h. Include rtl.h since varray.h requires
6979 it.
6980 (inline_parm_levels): New variable.
6981 (inline_parm_levels_used): Likewise.
6982 (maybe_begin_member_template_processing): Update them.
6983 (maybe_end_member_template_processing): Use them, rather than
6984 guessing how many levels to pop.
6985
6986 * decl.c (make_typename_type): Tighten error-checking.
6987
6988 1999-04-20 Mark Mitchell <mark@codesourcery.com>
6989
6990 * cp-tree.h (build_binary_op): Remove unneeded parameter.
6991 * class.c (build_vrable_entry_ref): Adjust call to
6992 build_binary_op.
6993 * decl.c (expand_static_init): Likewise.
6994 (grokdeclarator): Likewise.
6995 (finish_function): Likewise.
6996 * decl2.c (delete_sanity): Likewise.
6997 (do_dtors): Likewise.
6998 (do_ctors): Likewise.
6999 * error.c (dump_type_suffix): Likewise.
7000 * expr.c (cplus_expand_expr): Likewise.
7001 * init.c (resolve_offset_ref): Likewise.
7002 (build_new): Likewise.
7003 (build_new_1): Likewise.
7004 (build_vec_delete_1): Likewise.
7005 (expand_vec_init_catch_clause): Likewise.
7006 (build_delete): Likewise.
7007 * pt.c (tsubst): Likewise.
7008 * rtti.c (synthesize_tinfo_fn): Likewise.
7009 * search.c (expand_upcast_fixups): Likewise.
7010 (expand_direct_vtbls_init): Likewise.
7011 * typeck.c (get_member_function_from_ptrfunc): Likewise.
7012 (build_binary_op_nodefault): Likewise.
7013 (point_int_sum): Likewise.
7014 (pointer_diff): Likewise.
7015 (build_unary_op): Likewise.
7016 (build_modify_expr): Likewise.
7017 (get_delta_difference): Likewise.
7018 (build_ptrmemfunc): Likewise.
7019 (expand_ptrmemfunc_cst): Likewise.
7020
7021 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
7022
7023 * decl.c (grokfndecl): Always call cplus_decl_attributes.
7024 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
7025
7026 1999-04-19 Mark Mitchell <mark@codesourcery.com>
7027
7028 * cp-tree.h (finish_static_data_member_decl): New function.
7029 * decl2.c (finish_static_data_member_decl): Split out from ...
7030 (grokfield): Here.
7031 * pt.c (instantiate_class_template): Use it here instead of
7032 trying to fake it.
7033 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
7034 finish_static_data_member_decl will do that. Explicit set
7035 DECL_EXTERNAL to match non-template processing.
7036
7037 1999-04-18 Mark Mitchell <mark@codesourcery.com>
7038
7039 * cp-tree.h (finish_class_definition): Add parameter.
7040 * parse.y (structsp): Use it. Don't call pop_scope here.
7041 * parse.c: Regenerated.
7042 * semantics.c (finish_class_definition): Pop it here.
7043
7044 1999-04-17 Mark Mitchell <mark@codesourcery.com>
7045
7046 * decl.c (xref_tag): Revise handling of nested template
7047 declarations.
7048 * pt.c (check_explicit_specialization): Tweak handling of friend
7049 templates in template classes.
7050 (tsubst_friend_class): Handle friend declarations for nested
7051 member template classes.
7052
7053 1999-04-16 Mark Mitchell <mark@codesourcery.com>
7054
7055 * class.c (finish_struct): Remove unused variable.
7056 (pushclass): Likewise.
7057 (invalidate_class_lookup_cache): Likewise.
7058 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
7059 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
7060 doesn't get obliterated.
7061 (make_typename_type): Handle template classes correctly.
7062
7063 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
7064 (storetags): Declare.
7065 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
7066 (pushclass): Likewise. Use storetags to install tag declarations,
7067 not pushtag.
7068 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
7069 * decl.c (storetags): Make it global.
7070 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
7071 implicit typename declaration.
7072 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
7073 * method.c (hack_identifier): Likewise.
7074 * search.c (lookup_member): Likewise.
7075
7076 * decl.c (warn_about_implicit_typename_lookup): New function.
7077 (lookup_name_real): Use it. Rework handling of implicit typename
7078 extension.
7079
7080 1999-04-15 Mark Mitchell <mark@codesourcery.com>
7081
7082 * cp-tree.h (lookup_nested_field): Remove.
7083 * class.c (push_nested_class): Handle UNION_TYPEs.
7084 (pop_nested_class): Likewise.
7085 * decl.c (lookup_name_real): Don't call lookup_nested_field.
7086 (start_decl): Use push_nested_class, not just pushclass.
7087 (cp_finish_decl): Use pop_nested_class, not just popclass.
7088 * search.c (lookup_nested_field): Remove.
7089
7090 * cp-tree.h (lang_type): Add documentation.
7091 * decl2.c (handle_class_head): Create template declarations here,
7092 as appropriate.
7093 * parse.y (class_head): Return whether or not we entered a new
7094 scope, as well as the type named.
7095 (named_class_head): Likewise.
7096 (named_complex_class_head_sans_basetype): Likewise.
7097 (structsp): Adjust accordingly. Pop scope when required.
7098 * parse.c: Regenerated.
7099 * pt.c (check_default_tmpl_args): Robustify.
7100 (redeclare_class_template): Likewise.
7101 (instantiate_class_template): An instantiation of an
7102 anonymous union is itself an anonymous union.
7103 * semantics.c (begin_class_definition): Don't create template
7104 declarations here.
7105
7106 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
7107
7108 * parse.y (after_type_declarator_intern): New nonterminal.
7109 (after_type_declarator): Use it.
7110 (direct_after_type_declarator): Likewise. Move above
7111 nonnested_type to fix reduce/reduce conflict resolution.
7112 (declmods): Reducing from just 'attributes' has EMPTY precedence.
7113 * Makefile.in (CONFLICTS): Update.
7114
7115 * decl.c (define_label): Downgrade error for jumping over a
7116 non-POD decl to pedwarn.
7117
7118 1999-04-14 Mark Mitchell <mark@codesourcery.com>
7119
7120 * cp-tree.h (popclass): Change declaration.
7121 (pop_nested_class): Likewise.
7122 (poplevel_class): Remove declaration.
7123 * call.c (convert_default_argument): Pass no arguments to
7124 popclass.
7125 * class.c (finish_struct_1): Likewise.
7126 (finish_struct): Likewise.
7127 (popclass): Remove argument. Simplify code accordingly.
7128 (pop_nested_class): Likewise.
7129 * decl.c (poplevel_class): Declare it here, and make it static.
7130 (poplevel): Handle class scopes.
7131 (poplevel_class): Don't take an rgument. Simplify.
7132 (pop_everything): Pass no arguments to pop_nested_class.
7133 (cp_finish_decl): Pass no arguments to popclass.
7134 (grokdeclarator): Pass no arguments to pop_nested_class.
7135 (finish_function): Likewise.
7136 * decl2.c (grokfield): Likewise.
7137 (pop_scope): Pass no arguments to popclass.
7138 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7139 * pt.c (instantiate_class_template): Move call to pushclass, and
7140 document. Pass no arguments to popclass.
7141 (regenerate_decl_from_template): Likewise.
7142
7143 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
7144
7145 * typeck.c (build_unary_op): Handle taking the address of a unique
7146 bound non-static member function.
7147
7148 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
7149
7150 * lang-options.h (-Wdeprecated): New flag.
7151 * decl2.c (warn_deprecated): New flag.
7152 (lang_decode_option): Deprecated this-is-variable,
7153 external-templates, alt-external-templates.
7154 Support -Wdeprecated.
7155 * errfn.c (cp_deprecated): New function.
7156
7157 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
7158
7159 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7160 of the decls themselves.
7161
7162 * pt.c (tsubst_function_type): Copy attributes over.
7163
7164 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
7165 and com_interface.
7166 * cp-tree.h: Add prototype.
7167 * decl.c (init_decl_processing): Set valid_lang_attribute.
7168
7169 1999-04-13 Mark Mitchell <mark@codesourcery.com>
7170
7171 * class.c (finish_struct_1): Look at the const-ness of the field's
7172 type, not the TREE_READONLY-ness of the declaration.
7173 * method.c (synthesize_method): Likewise.
7174 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7175 creating new declarations.
7176
7177 1999-04-13 Mike Stump <mrs@wrs.com>
7178
7179 * decl2.c (import_export_decl): Because vtables always reference
7180 virtual functions, even if they are inlined, don't allow
7181 -fno-implement-inlines to not emit them, instead, emit them with
7182 the vtable.
7183 * decl.c (start_function): Likewise.
7184
7185 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
7186
7187 * cp-tree.h (struct lang_type): Add com_interface.
7188 (CLASSTYPE_COM_INTERFACE): New macro.
7189 * class.c (set_rtti_entry): COM interface classes have no RTTI
7190 entries in their vtables; adjust.
7191 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7192 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7193 finish_struct_1): Likewise.
7194 * decl2.c (mark_vtable_entries): Likewise.
7195 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7196 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7197 expand_upcast_fixups): Likewise.
7198 * tree.c (debug_binfo): Likewise.
7199
7200 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7201 * typeck.c (comptypes): If we get it, ignore attributes.
7202 * class.c (instantiate_type): Use BASELINK_P. Change complain
7203 parameter to flags; 2 means ignore attributes.
7204 * call.c (build_op_delete_call): Pass it.
7205
7206 * decl.c (xref_tag): Only complain once about using a typedef-name
7207 with 'struct'. Downgrade to pedwarn.
7208
7209 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7210
7211 * parse.y (absdcl_intern): New nonterminal.
7212 (absdcl, direct_abstract_declarator): Use it.
7213
7214 * pt.c (lookup_template_class): Look through implict typename.
7215
7216 1999-04-11 Mark Mitchell <mark@codesourcery.com>
7217
7218 * friend.c (add_friend): Deal gracefully with error_mark_node.
7219 * method.c (build_overload_value): Handle pointers-to-members as
7220 template parameters.
7221
7222 * decl.c (push_binding): Fix typo in comment.
7223
7224 1999-04-10 Mark Mitchell <mark@codesourcery.com>
7225
7226 * error.c (dump_type_real): If a typename is a template-id, put
7227 out the template arguments.
7228 (dump_expr): Handle TEMPLATE_ID_EXPR.
7229 * pt.c (lookup_template_class): Now that full arguments are
7230 available everywhere, remove code that tried to guess them.
7231
7232 1999-04-09 Mark Mitchell <mark@codesourcery.com>
7233
7234 * decl.c (make_typename_type): Complain if we don't find a type
7235 when trying to make a typename type for a non-template type.
7236
7237 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
7238
7239 * decl.c (start_decl): Pass attributes to grokdeclarator.
7240 (grokdeclarator): Handle attributes on constructor-syntax
7241 initializers.
7242
7243 1999-04-08 Mark Mitchell <mark@codesourcery.com>
7244
7245 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7246 don't have types.
7247
7248 * search.c (template_self_reference_p): Tweak.
7249
7250 1999-04-07 Mark Mitchell <mark@codesourcery.com>
7251
7252 * init.c (build_offset_ref): Don't build yet another weird data
7253 structure to describe overloaded functions.
7254
7255 1999-04-06 Mark Mitchell <mark@codesourcery.com>
7256
7257 * cp-tree.h (BASELINK_P): New macro.
7258 (SET_BASELINK_P): Likewise.
7259 * init.c (build_member_call): Remove needless assignment in if
7260 statement.
7261 * search.c (lookup_field_r): Fix handling when we are looking
7262 specifically for a type; these are not hidden by functions and
7263 variables.
7264 (lookup_member): Use SET_BASELINK_P.
7265 * tree.c (is_overloaded_fn): Use BASELINK_P.
7266 (really_overloaed_fn): Likewise.
7267 (get_first_fn): Likewise.
7268
7269 1999-04-05 Mark Mitchell <mark@codesourcery.com>
7270
7271 * decl.c (lookup_name_current_level): Tweak, and improve
7272 documentation.
7273
7274 * class.c (maybe_fixup_vptrs): Remove declaration.
7275 (build_class_init_list): Likewise.
7276 * decl.c (pushdecl_class_level): Call check_template_shadow here
7277 ...
7278 (push_class_level_binding): ... not here.
7279 * search.c (dfs_push_type_decls): Only avoid
7280 template-self-reference TYPE_DECLs if they are from base classes.
7281
7282 1999-04-04 Mark Mitchell <mark@codesourcery.com>
7283
7284 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7285 nodes. Tidy.
7286
7287 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
7288
7289 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7290 (finish_struct_1): Don't call build_class_init_list.
7291
7292 1999-04-02 Mark Mitchell <mark@codesourcery.com>
7293
7294 * tinfo.h (__class_type_info): Fix illegal declaration.
7295
7296 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7297 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7298 (IDENTIFIER_CLASS_VALUE): Improve documentation.
7299 (is_properly_derived_from): Declare.
7300 (invalidate_class_lookup_cache): Likewise.
7301 (maybe_maybe_note_name_used_in_class): Likewise.
7302 (note_name_declared_in_class): Likewise.
7303 (push_using_decl): Remove duplicate declaration.
7304 (id_in_current_class): Remove declaration.
7305 (push_class_binding): Change prototype.
7306 (clear_identitifer_class_values): Declare.
7307 * call.c (is_properly_derived_from): Make it global.
7308 (build_new_function_call): Be careful about updating candidates.
7309 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
7310 asked to make illegal calls.
7311 * class.c: Include splay-tree.h.
7312 (class_stack_node): Add names_used slot.
7313 (check_member_decl_is_same_in_complete_scope): Remove.
7314 (add_method): Fix comment. Push the declaration into class
7315 scope.
7316 (finish_struct_1): When popping the class, pop the bindings too.
7317 Remove check for data member/function member conflict.
7318 (finish_struct): Remove calls to
7319 check_member_decl_is_same_in_complete_scope. Change calls to
7320 popclass.
7321 (pushclass): Clear names_used in the class stack entry.
7322 Use invalidate_class_lookup_cache to remove cached entries, rather
7323 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
7324 before entering a new class. Remove dead code. Don't mess with
7325 current_function_decl when pushing declarations.
7326 (invalidate_class_lookup_cache): New function, split out from ...
7327 (popclass): Here. Clean up names_used on our way out.
7328 (instantiate_type): Adjust.
7329 (build_self_reference): Don't push the declaration here.
7330 (maybe_note_name_used_in_class): New function.
7331 (note_name_declared_in_class): Likewise.
7332 * decl.c (add_binding): Change prototype.
7333 (find_class_binding_level): New function.
7334 (innermost_nonclass_level): Likewise.
7335 (current_binding_level): Update documentation.
7336 (inner_binding_level): Remove. Replace with current_binding_level
7337 throughout.
7338 (push_binding_level): Remove special handling of
7339 class_binding_level.
7340 (pop_binding_level): Likewise. Use find_class_binding_level.
7341 (suspend_binding_level): Likewise.
7342 (global_bindings_p): Use innermost_nonclass_level.
7343 (toplevel_bindings_p): Likewise.
7344 (namespace_bindings_p): Likewise.
7345 (pseudo_global_level_p): Likewise.
7346 (push_binding): Clear INHERITED_VALUE_BINDING_P.
7347 (add_binding): Check for illegal multiple declarations. Return a
7348 value indicating whether or not the new binding was legal.
7349 (push_local_binding): Skip over class binding levels. Check
7350 return value from add_binding.
7351 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
7352 note_name_declared_in_class.
7353 (pushlevel_class): Remove "fake out the rest of the compiler"
7354 code.
7355 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7356 (clear_identifier_class_values): New function.
7357 (pop_from_top_level): Use it.
7358 (pop_everything): Tweak.
7359 (maybe_process_template_type_declaration): Don't push the
7360 declaration for the template here.
7361 (pushtag): Don't push tag declarations into class scope here.
7362 (pushdecl): Apply DeMorgan's law for readability.
7363 (pushdecl_class_level): Remove special-case code for
7364 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
7365 (push_class_level_bindng): Deal with inherited bindings.
7366 (lookup_name_real): Remove special-case code for
7367 TYPE_BEING_DEFINED, and some implicit typename magic.
7368 (grokdeclarator): Handle COMPONENT_REF for a template function.
7369 (build_enumerator): Don't call pushdecl_class_level here.
7370 (id_in_current_class): Remove.
7371 * decl2.c (grokfield): Don't call pushdecl_class_level or
7372 check_template_shadow.
7373 * errfn.c (cp_file_of): Don't declare.
7374 (cp_line_of): Likewise.
7375 * error.c (dump_decl): Handle an OVERLOAD.
7376 (cp_file_of): Likewise.
7377 (cp_line_of): Likewise.
7378 * init.c (build_member_call): Handle a COMPONENT_REF.
7379 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7380 pushdecl_class_level.
7381 * method.c (hack_identifier): Build COMPONENT_REFs for references
7382 to member templates as well as member functions. Remove dead
7383 code.
7384 * parse.y (left_curly): Remove.
7385 (nonnested_type): Call maybe_note_name_used_in_class, not
7386 pushdecl_class_level.
7387 * parse.c: Regenerated.
7388 (nested_name_specifier_1): Likewise.
7389 * pt.c (check_explicit_specialization): Adjust, for robustness.
7390 (check_template_shadow): Handle OVERLOADs.
7391 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7392 TEMPLATE_DECL, if appropriate.
7393 * search.c (envelope_add_decl): Remove.
7394 (dfs_pushdecls): Likewise.
7395 (dfs_compress_decls): Likewise.
7396 (dfs_push_decls): New function.
7397 (dfs_push_type_decls): Likewise.
7398 (setup_class_bindings): Likewise.
7399 (template_self_reference_p): Likewise.
7400 (lookup_field_r): Use it.
7401 (looup_member): Remove old comment. Deal with ambiguity.
7402 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7403 and remove envelope processing.
7404 * semantics.c (begin_class_definition): Let pushclass push
7405 declarations for base classes.
7406 (finish_member_declaration): Push declarations into class scope.
7407 * typeck.c (build_component_ref): Just put an OVERLOAD into the
7408 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7409 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
7410 * Makefile.in (class.o): Depend on splay-tree.h.
7411
7412 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
7413
7414 * cvt.c (convert_pointer_to_real): Use same_type_p.
7415 * typeck.c (comp_target_types): Use same_type_p.
7416
7417 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
7418
7419 * semantics.c (begin_inline_definitions,
7420 finish_inline_definitions): Rename from finish_default_args and
7421 begin_inline_definitions, respectively, to something that isn't a
7422 total lie. :)
7423 * parse.y (structsp): Adjust.
7424
7425 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7426 (list_hash_lookup): Likewise.
7427 (hash_tree_chain): Adjust.
7428 * pt.c (tsubst): Adjust.
7429 (tsubst_arg_types): Use plain hash_tree_cons.
7430 * cp-tree.h (hash_tree_cons_simple): Lose.
7431 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7432
7433 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7434
7435 * Makefile.in (hash.h): Generate using gperf language 'C', not
7436 'KR-C', so gperf uses the `const' keyword on strings.
7437
7438 * gxx.gperf (resword): Const-ify a char*.
7439
7440 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
7441
7442 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7443 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7444 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7445 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7446 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7447 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7448 tree.c: Adjust.
7449
7450 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
7451
7452 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7453
7454 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
7455
7456 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7457
7458 1999-03-27 Mark Mitchell <mark@codesourcery.com>
7459
7460 * cp-tree.h (add_friend): Declare.
7461 (add_friends): Likewise.
7462 * friend.c (add_friend): Make it global. Don't add to
7463 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7464 (add_friends): Make it global.
7465 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7466 befriending class is a template.
7467 * parse.y (component_decl_1): Fix typo in comment.
7468 * parse.c: Regenerated.
7469 * pt.c (instantiate_class_template): Use add_friend and
7470 add_friends rather that duplicating some of their functionality
7471 here.
7472
7473 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
7474
7475 * call.c (build_field_call): Unify 'this' and non-'this' cases.
7476
7477 * typeck.c (build_indirect_ref): Check for 'this' sooner.
7478
7479 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7480
7481 * call.c (op_error): Const-ify a char*.
7482 (add_candidate, source_type, add_warning): Add static prototype.
7483 (print_z_candidates): Const-ify a char*.
7484
7485 * class.c (resolve_address_of_overloaded_function,
7486 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7487 (get_vtable_name, finish_struct_1): Const-ify a char*.
7488
7489 * cvt.c (convert_to_reference): Likewise.
7490
7491 * decl.c (redeclaration_error_message, record_builtin_type,
7492 record_unknown_type, member_function_or_else, bad_specifiers):
7493 Likewise.
7494 (find_binding, select_decl, unqualified_namespace_lookup,
7495 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7496 Add static prototype.
7497 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7498 implicitly_declare, record_builtin_java_type, define_function,
7499 grok_op_properties, tag_name): Const-ify a char*.
7500
7501 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7502 (define_function, finish_builtin_type): Const-ify a char*.
7503 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7504 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7505 (file_name_nondirectory): Const-ify a char*.
7506 (init_filename_times): Don't prototype.
7507 (compiler_error): Prototype.
7508 (yyerror, init_repo): Const-ify a char*.
7509 (build_srcloc): Don't prototype.
7510 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7511 Const-ify a char*.
7512 (warn_for_assignment): Don't prototype.
7513 (convert_for_initialization, readonly_error, check_for_new_type,
7514 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7515 Const-ify a char*.
7516
7517 * decl2.c (acceptable_java_type, output_vtable_inherit,
7518 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7519 merge_functions, decl_namespace, validate_nonmember_using_decl,
7520 do_nonmember_using_decl): Add static prototype.
7521 (lang_f_options): Const-ify a char*.
7522 (finish_builtin_type): Likewise.
7523 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7524 prototype.
7525
7526 * errfn.c: Include cp-tree.h.
7527 (cp_thing): Add static prototype.
7528 (compiler_error): Don't protoptype.
7529 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7530 passing it to `cp_thing'.
7531
7532 * error.c (interesting_scope_p): Add static prototype.
7533
7534 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7535 a char*.
7536
7537 * init.c (compiler_error): Don't prototype.
7538 (member_init_ok_or_else): Const-ify a char*.
7539 (build_java_class_ref): Add static prototype.
7540
7541 * lex.c (compiler_error): Don't prototype.
7542 (get_time_identifier, interface_strcmp, extend_token_buffer,
7543 handle_cp_pragma): Const-ify a char*.
7544 (is_global, init_filename_times): Add static prototype.
7545 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7546 (compiler_error): Change from fixed args to variable args.
7547 (yyerror): Const-ify a char*.
7548
7549 * parse.y (cond_stmt_keyword): Const-ify a char*.
7550 (parse_decl): Add static prototype.
7551
7552 * pt.c (template_args_equal, print_template_context): Likewise.
7553 (print_candidates, check_default_tmpl_args): Const-ify a char*.
7554 (instantiate_class_template): Likewise.
7555
7556 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7557
7558 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7559 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7560
7561 * search.c (lookup_field_info, lookup_member): Likewise.
7562 (lookup_member): Cast the first argument of `bzero' to a PTR.
7563
7564 * sig.c (compiler_error): Don't prototype.
7565 (build_signature_pointer_or_reference_nam): Const-ify a char*.
7566 (get_sigtable_name, build_member_function_pointer): Likewise.
7567
7568 * tree.c (compiler_error): Don't prototype.
7569 (no_linkage_helper, build_srcloc): Add static prototype.
7570 (build_vbase_pointer_fields): Const-ify a char*.
7571 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7572
7573 * typeck.c (compiler_error): Don't prototype.
7574 (convert_for_assignment): Const-ify a char*.
7575 (comp_cv_target_types): Add static prototype.
7576 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7577 build_component_addr, build_unary_op, convert_for_initialization):
7578 Const-ify a char*.
7579
7580 * typeck2.c (ack): Add static prototype and change from fixed args
7581 to variable args.
7582 (readonly_error, check_for_new_type): Const-ify a char*.
7583
7584 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7585 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7586 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
7587 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7588 gen_assign, GNU_xref_member): Const-ify a char*.
7589
7590 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7591
7592 * gxxint.texi: Remove old discussion on copying virtual bases.
7593
7594 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
7595
7596 * Make-lang.in: Remove all references to g++.o/g++.c.
7597 Link g++ from gcc.o.
7598
7599 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7600
7601 * decl2.c (comdat_linkage): Treat vtables like functions.
7602
7603 1999-03-25 Mark Mitchell <mark@codesourcery.com>
7604
7605 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7606
7607 1999-03-25 Nathan Sidwell <nathan@acm.org>
7608
7609 * decl.c (init_decl_processing): Add `signed' type as a synonym
7610 for `int'.
7611
7612 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7613
7614 * typeck.c (common_type): Handle cv-qual unification for pointers
7615 to members.
7616
7617 * decl.c (unqualified_namespace_lookup): Return error_mark_node
7618 on error.
7619 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7620 * lex.c (do_identifier): If we got error_mark_node, call
7621 lookup_name again.
7622
7623 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7624
7625 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7626 classes.
7627
7628 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
7629
7630 * decl.c (lookup_name_real): Do nested field lookup regardless of
7631 TYPE_BEING_DEFINED.
7632
7633 1999-03-24 Mark Mitchell <mark@codesourcery.com>
7634
7635 * cp-tree.h (lang_type): Remove has_assignment and
7636 has_real_assignment. Add befriending_classes.
7637 (TYPE_HAS_ASSIGNMENT): Remove.
7638 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7639 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7640 (lang_decl): Document.
7641 (DECL_BEFRIENDING_CLASSES): New macro.
7642 (FRIEND_NAME): Move declaration to more obvious location.
7643 (FRIEND_DECLS): Likewise.
7644 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7645 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7646 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7647 (grok_op_properties): Likewise.
7648 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7649 (add_friend): Likewise. Don't do weird things with assignment
7650 operators. Update DECL_BEFRIENDING_CLASSES.
7651 (add_friends): Don't do weird things with assignment operators.
7652 (make_friend_class): Likewise. Update
7653 CLASSTYPE_BEFRIENDING_CLASSES.
7654 * pt.c (instantiate_class_template): Don't set
7655 TYPE_HAS_ASSIGNMENT.
7656 (tsubst_copy): Substitute the TREE_TYPE for more unary
7657 expressions.
7658 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7659 * search.c (protected_accessible_p): New function.
7660 (friend_accessible_p): Likewise.
7661 (accessible_p): Use them.
7662
7663 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7664
7665 * pt.c (convert_nontype_argument): Don't create things that aren't
7666 PTRMEM_CSTs when applying a qualification conversion to a
7667 PTRMEM_CST.
7668
7669 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7670
7671 * Makefile.in (OBJS): Don't mention hash.o.
7672 (OBJDEPS): Likewise.
7673
7674 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
7675
7676 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7677 * decl.c (expand_static_init): Make sure we don't add any after
7678 then.
7679
7680 * decl.c (cp_finish_decl): Move intelligence about handling
7681 DECL_COMDAT for variables from here...
7682 * decl2.c (comdat_linkage): ...to here.
7683 (maybe_make_one_only): Tweak.
7684 (import_export_decl): Call comdat_linkage for variables, too.
7685 (finish_file): Handle template statics properly.
7686
7687 1999-03-22 Mark Mitchell <mark@codesourcery.com>
7688
7689 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7690 Document internals of pointer-to-member-functions.
7691 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7692 (PFN_FROM_PTRMEMFUNC): Likewise.
7693 (build_type_conversion): Remove unused parameter.
7694 (build_ptrmemfunc1): Declare.
7695 (expand_ptrmemfunc_cst): New function.
7696 (delta2_from_ptrmemfunc): Likewise.
7697 (pfn_from_ptrmemfunc): Likewise.
7698 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7699 build_type_conversion. Use TYPE_PTRMEM_P for readability.
7700 (convert_to_reference): Remove unused parameter to
7701 build_type_conversion.
7702 (ocp_convert): Likewise.
7703 (build_user_type_conversion): Likewise.
7704 * error.c (dump_expr): Handle NULL pointer-to-member functions.
7705 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7706 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7707 open when handling pointer-to-member functions.
7708 * pt.c (convert_nontype_argument): Clean up error messages. Be
7709 more stringent with pointers-to-members.
7710 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
7711 (build_unary_op): Tidy ever-so-slightly.
7712 (build_conditional_expr): Remove extra parameter to
7713 build_type_conversion.
7714 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7715 we're using.
7716 (expand_ptrmemfunc_cst): Define.
7717 (delta2_from_ptrmemfunc): Likewise.
7718 (pfn_from_ptrmemfunc): Likewise.
7719
7720 1999-03-19 Mark Mitchell <mark@codesourcery.com>
7721
7722 * init.c (build_member_call): Handle template-id expressions
7723 correctly.
7724 * typeck.c (build_x_function_call): Likewise.
7725
7726 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
7727
7728 * friend.c (make_friend_class): Avoid core dump when
7729 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7730
7731 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
7732
7733 * decl.c (start_function): Suppress normal linkage heuristics
7734 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7735
7736 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7737
7738 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7739 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7740
7741 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7742
7743 * parse.y (named_complex_class_head_sans_basetype):
7744 Do not push a scope for error_mark_node.
7745 (maybe_base_class_list): Likewise.
7746
7747 * decl.c (start_decl): Check for error_mark_node as a type.
7748 Detected by g++.brendan/array-refs.C.
7749 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7750 (maybe_build_cleanup_1): Likewise. Detected by
7751 g++.jason/incomplete1.C.
7752
7753 * tree.c (build_dummy_object): Use void_zero_node instead of the
7754 error_mark_node.
7755 (is_dummy_object): Check for such a node.
7756 Detected by g++.bob/inherit1.C
7757
7758 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7759
7760 * method.c (old_backref_index): Split out...
7761 (flush_repeats): From here. Rename back from try_old_backref.
7762 (build_mangled_name): Put back some old-style repeat handling.
7763
7764 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7765
7766 * lex.c: Don't include setjmp.h.
7767 (parse_float): New static function.
7768 (pf_args): New struct.
7769 (real_yylex): Use them in call to `do_float_handler'.
7770
7771 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7772
7773 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7774 * tree.c (layout_basetypes): Not here.
7775 * search.c (dfs_search): Remove; no longer used.
7776
7777 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7778
7779 * decl2.c (validate_nonmember_using_decl): Issue sensible
7780 error-messages on bogus qualifiers.
7781
7782 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7783
7784 * call.c (add_function_candidate): Fix uninitialized variable.
7785
7786 * Makefile.in (search.o): Add dependency on varray.h.
7787
7788 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7789
7790 * decl.c (duplicate_decls): Use same_type_p.
7791 * method.c (try_old_backref): Renamed from flush_repeats. Use
7792 same_type_p. Don't try to handle repeats. Return success.
7793 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7794 calls from old-style code, too.
7795 (check_ktype): Use same_type_p.
7796 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7797 (build_qualified_name): Simplify logic.
7798 (process_overload_item): Strip typedefs and quals at the top.
7799 (build_mangled_name_for_type_with_Gcode): Remove call to
7800 type_canonical_variant.
7801 (build_mangled_name): Likewise. Remove support for old-style
7802 repeats, which have been disabled since 2.7.2. Don't mess with
7803 TREE_USED.
7804 (build_decl_overload_real): Don't mess with TREE_USED.
7805
7806 1999-03-13 Nathan Sidwell <nathan@acm.org>
7807
7808 * error.c (cp_printers): Add 'F' escape character.
7809 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7810 Functionality moved to dump_parameters.
7811 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7812 (dump_function_decl): Extend meaning of V parameter. Use
7813 dump_parameters and dump_exception_spec.
7814 (dump_parameters): New static function.
7815 (dump_exception_spec): New static function.
7816 (fndecl_as_string): Change argument semantics. Use
7817 dump_function_decl directly.
7818
7819 * sig.c (build_signature_table_constructor): Use cp_error.
7820
7821 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7822
7823 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7824 Detected by g++.law/enum5.C.
7825
7826 * typeck.c (build_modify_expr): Check for errors after resolving
7827 offsets. Detected by g++.brendan/static1.C.
7828
7829 * decl.c (complete_array_type): Ignore initial_value if it is an
7830 error. Detected by g++.benjamin/17930.C.
7831
7832 * typeck2.c (process_init_constructor): Return error if one argument
7833 is in error. Detected by g++.benjamin/13478.C.
7834
7835 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7836
7837 * decl.c (select_decl): Allow class templates when we need types.
7838 * decl2.c (ambiguous_decl): Likewise.
7839
7840 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7841
7842 * lex.c (do_identifier): Correct call to enforce_access.
7843 * search.c (accessible_p): Tweak comment.
7844
7845 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7846
7847 * semantics.c (begin_class_definition): Call build_self_reference.
7848 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7849
7850 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7851
7852 * search.c (dfs_canonical_queue): New function.
7853 (dfs_assert_unmarked_p): Likewise.
7854 (assert_canonical_unmarked): Likewise.
7855 (access_in_type): Use it.
7856 (accessible_p): Likewise. Walk the whole tree when umarking.
7857
7858 * sig.c (build_signature_table_constructor): Use accessible_p
7859 instead of compute_access.
7860
7861 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7862
7863 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7864
7865 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7866
7867 * cp-tree.h (flag_access_control): Declare.
7868 (TREE_VIA_PPUBLIC): Document.
7869 (DECL_NONSTATIC_MEMBER_P): New macro.
7870 (enforce_access): Return an indication of whether or not access
7871 was permitted.
7872 (build_self_reference): Change prototype.
7873 (compute_access): Replace with ...
7874 (accessible_p): New function.
7875 (dfs_walk): Change prototype.
7876 (dfs_unmark): Likewise.
7877 (markedp): Likewise.
7878 * call.c (enforce_access): Use accessible_p.
7879 * class.c (build_self_reference): Insert the declaration into the
7880 list of members for this type, and make it public.
7881 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7882 * init.c (build_offset_ref): Use lookup_member, not three separate
7883 name-lookups. Call enforce_access rather than checking for
7884 illegal accesses here.
7885 (resolve_offset_ref): Likewise.
7886 * lex.c (do_identifier): Likewise.
7887 * method.c (hack_identifier): Likewise.
7888 * parse.y (self_reference): Remove.
7889 (opt_component_decl_list): Don't use it.
7890 * parse.c: Regenerated.
7891 * pt.c (print_candidates): Generalize to handle lists of
7892 overloaded functions.
7893 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7894 not set.
7895 (get_template_base): Use new calling convention for dfs_walk.
7896 * search.c: Include varray.h. Add prototypes.
7897 (dfs_walk): Accept a data pointer to pass to the work functions.
7898 All callers changed. All work functions changed.
7899 (breadth_first_search): Rename to bfs_walk, and make consistent
7900 with dfs_walk.
7901 (dfs_walk_real): New function.
7902 (canonical_binfo): New function.
7903 (context_for_name_lookup): Likewise.
7904 (shared_marked_p): Likewise.
7905 (shared_unmarked_p): Likewise.
7906 (lokup_field_queue_p): Likewise.
7907 (lookup_field_r): Generalize to handle both functions and fields.
7908 (lookup_field): Just call lookup_member.
7909 (lookup_fnfields): Likewise.
7910 (lookup_member): Move body of lookup_field here and generalize.
7911 (dfs_accessible_queue_p): Likewise.
7912 (dfs_accessible_p): Likewise.
7913 (dfs_access_in_type): Likewise.
7914 (access_in_type): Likewise.
7915 (compute_access): Remove, and replace with ...
7916 (accessible_p): New function.
7917 (vbase_types): Remove.
7918 (vbase_decl_ptr_intermediate): Likewise.
7919 (vbase_decl_ptr): Likewise.
7920 (vbase_init_result): Likewise.
7921 (closed_envelopes): Likewise.
7922 (bvtable): Likewise.
7923
7924 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7925
7926 * call.c (add_function_candidate): Check for proper number of args
7927 before checking the validity of those args.
7928
7929 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
7930
7931 * cp-tree.h (struct lang_type): Add anon_union field.
7932 (ANON_UNION_TYPE_P): Use it instead of examining type.
7933 (SET_ANON_UNION_TYPE_P): New macro.
7934 * decl.c (check_tag_decl): Use it.
7935
7936 * search.c (compute_access): Handle non-type contexts earlier, and
7937 handle NULL_TREE.
7938
7939 * tree.c (build_exception_variant): Use copy_to_permanent.
7940
7941 * decl2.c (setup_initp): Give statics with no priority the default
7942 priority here.
7943 (do_dtors, do_ctors, finish_file): Remove special handling of
7944 non-prioritized statics.
7945
7946 1999-03-05 Mark Mitchell <mark@markmitchell.com>
7947
7948 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7949 * decl.c (make_typename_type): Don't issue an error if an
7950 immediate lookup fails; it migt be resolved later.
7951 * friend.c (is_friend): Add comment.
7952 * search.c (breadth_first_search): Add POSTFN and DATA
7953 parameters. Tidy. All callers changed.
7954 (lookup_field_queue_p): New function.
7955 (lookup_field_r): Likewise.
7956 (lookup_field_post): Likewise.
7957 (lookup_field): Use them, via breadth_first_search, instead of
7958 duplicating logic.
7959 (compute_access): Robustify.
7960 (lookup_fnfield_info): New structure.
7961
7962 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
7963
7964 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7965
7966 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
7967
7968 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7969 cc happy.
7970
7971 * decl2.c (import_export_class): Also return if
7972 CLASSTYPE_INTERFACE_ONLY is set.
7973
7974 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
7975
7976 * decl.c (push_overloaded_decl): Only overwrite the old binding if
7977 there was one.
7978 * decl2.c (do_local_using_decl): Fix loop termination.
7979
7980 1999-03-02 Mark Mitchell <mark@markmitchell.com>
7981
7982 * cp-tree.h (determine_specialization): Don't declare.
7983 * pt.c (determine_specialization): Make it static. Eliminate
7984 complain parameter. Note that decl is always non-NULL now, and
7985 simplify accordingly.
7986
7987 * decl.c (maybe_push_to_top_level): Always call
7988 push_cp_function_context.
7989 (pop_from_top_level): Always call pop_cp_function_context.
7990
7991 1999-02-26 Nathan Sidwell <nathan@acm.org>
7992
7993 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7994 diagnostics.
7995 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7996 * init.c (build_new_1): Extra arg to complete_type_or_else.
7997 (build_delete): Likewise.
7998 * typeck.c (require_complete_type): Likewise.
7999 (pointer_int_sum): Likewise.
8000 (pointer_diff): Likewise.
8001 (build_component_ref): Likewise.
8002
8003 * typeck2.c (incomplete_type_error): Always use cp_error.
8004 Show declaration of undefined type, if appropriate.
8005 Deal with UNKNOWN_TYPE nodes.
8006
8007 * typeck.c (require_complete_type): Use TYPE_SIZE as
8008 size_zero_node to mean incomplete type.
8009 (require_complete_type_in_void): New function.
8010 (build_compound_expr): Call complete_type_in_void for LHS.
8011 (build_c_cast): Call complete_type_in_void for void cast.
8012 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
8013 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
8014 require_complete_type_in_void. Call it.
8015 * cp-tree.h (require_complete_type_in_void): Prototype new function.
8016
8017 * typeck.c (convert_arguments): Use alternative format for
8018 function decls. Don't require_complete_type here. Simplify
8019 diagnostic printing.
8020 (convert_for_initialization): Don't require_complete_type on RHS yet.
8021 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
8022
8023 * call.c (build_over_call): Cope with qualified void return type.
8024 * semantics.c (finish_call_expr): Likewise.
8025 * typeck.c (build_function_call_real): Likewise.
8026 (c_expand_return): Likewise.
8027 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
8028
8029 * call.c (print_z_candidates): Use alternate print format, to be
8030 consistent with (pt.c) print_candidates.
8031 * method.c (hack_identifier): List candidate members.
8032 * search.c (lookup_field): Build ambiguous list, and show it, if
8033 ambiguous.
8034
8035 1999-02-26 Mark Mitchell <mark@markmitchell.com>
8036
8037 * typeck.c (decay_conversion): Don't confuse constant array
8038 variables with their initializers.
8039
8040 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
8041 merging decls.
8042 * pt.c (regenerate_decl_from_template): Tweak for clarity.
8043 (instantiate_decl): Mark a decl instantiated before regenerating
8044 it to avoid recursion.
8045 * tree.c (mapcar): Don't call decl_constant_value unless we know
8046 something is TREE_READONLY_DECL_P.
8047
8048 * class.c (check_for_override): Don't stop checking when we find
8049 the first overridden function. Delete #if 0'd code.
8050 * search.c (get_matching_virtual): Likewise.
8051
8052 1999-02-25 Richard Henderson <rth@cygnus.com>
8053
8054 * lang-specs.h: Define __FAST_MATH__ when appropriate.
8055
8056 1999-02-24 Mike Stump <mrs@wrs.com>
8057
8058 * typeck.c (convert_for_assignment): Allow boolean integral constant
8059 expressions to convert to null pointer.
8060
8061 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
8062
8063 * decl.c (lookup_namespace_name): Resolve namespace aliases.
8064
8065 * class.c (push_nested_class): Allow namespaces.
8066
8067 * decl2.c (set_decl_namespace): Add friendp parameter.
8068 * decl.c (grokfndecl): Pass it.
8069 (grokvardecl): Likewise.
8070 * cp-tree.h: Change declaration.
8071
8072 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
8073
8074 * pt.c (tsubst): Allow an array of explicit size zero.
8075
8076 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
8077
8078 * errfn.c: Change varargs code to look like toplev.c.
8079
8080 * method.c (process_modifiers): Don't prepend 'U' for char or
8081 wchar_t.
8082
8083 1999-02-20 Craig Burley <craig@jcb-sc.com>
8084
8085 * Make-lang.in (cplib2.ready): Don't consider updating
8086 cplib2 stuff if the current directory isn't writable, as
8087 it won't work (such as during a `make install').
8088
8089 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
8090
8091 * decl2.c (start_objects): Make file scope constructors and
8092 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
8093 ASM_OUTPUT_DESTRUCTOR are defined.
8094
8095 1999-02-19 Mark Mitchell <mark@markmitchell.com>
8096
8097 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8098 (fn_type_unification): Adjust prototype.
8099 (lookup_fnfields_1): Declare.
8100 * call.c (add_template_candidate_real): Adjust call to
8101 fn_type_unification.
8102 * class.c (add_method): Don't allow duplicate declarations of
8103 constructors or destructors.
8104 (resolve_address_of_overloaded_function): Remove unused variable.
8105 Adjust call to fn_type_unification.
8106 * decl.c (grokfndecl): Be more robust in the face of illegal
8107 specializations.
8108 * decl2.c (check_classfn): Remove hokey handling of member
8109 templates.
8110 * pt.c (determine_specialization): Improve comments. Adjust to
8111 handle template argument deduction as per the standard.
8112 (check_explicit_specialization): Fix comment spacing. Handle
8113 type-conversion operators correctly. Improve error-recovery.
8114 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8115 (get_bindings_real): Simplify handling of static members.
8116 * search.c (lookup_fnfields_1): Make it have external linkage.
8117 * typeck.c (compparms): Fix comment.
8118 (build_unary_op): Don't try to figure out which template
8119 specialization is being referred to when when the address-of
8120 operator is used with a template function.
8121
8122 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8123
8124 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8125 keyword to match an analogous change at the top level.
8126
8127 * tree.c (lvalue_or_else): Likewise.
8128
8129 1999-02-17 Mark Mitchell <mark@markmitchell.com>
8130
8131 * decl.c (xref_basetypes): Comment.
8132 * pt.c (instantiate_class_template): Use xref_basetypes.
8133
8134 1999-02-16 Mark Mitchell <mark@markmitchell.com>
8135
8136 * cp-tree.h (tsubst): Change prototype.
8137 (tsubst_expr): Likewise.
8138 (tsubst_copy): Likewise.
8139 (type_unification): Remove prototype.
8140 * call.c (convert_default_arg): Adjust call to tsubst_expr.
8141 * class.c (resolve_address_of_overloaded_function): Just use
8142 fn_type_unification.
8143 * decl.c (grokdeclarator): Adjust call to tsubst.
8144 * method.c (build_template_parm_names): Likewise.
8145 * pt.c (GTB_VIA_VIRTUAL): New macro.
8146 (GTB_IGNORE_TYPE): Likewise.
8147 (resolve_overloaded_unification): Add `complain' parameter.
8148 (try_one_overload): Likewise.
8149 (tsubst_template_arg_vector): Likewise.
8150 (tsubst_template_parms): Likewise.
8151 (tsubst_aggr_type): Likewise.
8152 (tsubst_arg_types): Likewise.
8153 (tsubst_call_declarator_parms): Likewise.
8154 (unify): Remove explicit_mask.
8155 (type_unification_real): Likewise.
8156 (get_template_base_recursive): Likewise.
8157 (coerce_template_template_parms): Provide prototype.
8158 (tsubst_function_type): Likewise.
8159 (try_class_unification): New function.
8160 All callers changed to use new complain parameter.
8161 (get_template_base): Use try_class_unification.
8162 (unify): Adjust handling of classes derived from template types.
8163 (fn_type_unification): Substitute explicit arguments before
8164 unification.
8165
8166 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8167
8168 * decl.c (pushdecl): Remove dead code.
8169
8170 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
8171
8172 * decl2.c (finish_objects): Fix code I missed in previous change.
8173
8174 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
8175
8176 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8177 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8178
8179 * pt.c (maybe_process_partial_specialization): Complain about
8180 'template <>' on non-specialization.
8181
8182 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
8183
8184 * decl.c (grokdeclarator): Catch wierd declarators.
8185 * decl2.c (finish_file): Don't abort because of namespace parsing
8186 failure.
8187 (check_decl_namespace): Remove.
8188
8189 1999-02-09 Mark Mitchell <mark@markmitchell.com>
8190
8191 * cp-tree.h (get_template_base): Don't declare.
8192 (dfs_walk): Declare.
8193 (dfs_unmark): Likewise.
8194 (markedp): Likewise.
8195 * pt.c (unify): Remove duplicate declaration. Pass tparms and
8196 targs to get_template_base.
8197 (get_template_base_recursive): Move here from search.c. Check to
8198 see that the base found can be instantiated to form the desired
8199 type.
8200 (get_template_base): Likewise.
8201 (get_class_bindings): Simplify.
8202 * search.c (get_template_base_recursive): Move to pt.c.
8203 (get_template_base): Likewise.
8204 (markedp): Make it global.
8205 (dfs_walk): Likewise.
8206 (dfs_unmark): Likewise.
8207
8208 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
8209
8210 * pt.c (maybe_process_partial_specialization): Complain about
8211 specialization in wrong namespace.
8212 * tree.c (decl_namespace_context): New fn.
8213
8214 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8215
8216 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8217 * pt.c (coerce_template_template_parms): Handle nested
8218 template template parameters.
8219
8220 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
8221
8222 * typeck2.c: Update email addresses.
8223
8224 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8225
8226 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8227 turned off.
8228
8229 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
8230
8231 * lex.c (retrofit_lang_decl): Split out...
8232 (build_lang_decl): From here.
8233 * decl.c (pushdecl): Call it for functions generated by the middle
8234 end that don't have DECL_LANG_SPECIFIC.
8235 * cp-tree.h: Declare it.
8236
8237 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
8238 (start_objects, finish_objects): Only use special
8239 init_priority code if the user specified a priority.
8240 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8241 objects.
8242
8243 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
8244
8245 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8246 mkstemp.o. Get them from libiberty now.
8247 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8248
8249 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8250
8251 * decl2.c (lang_decode_option): Use read_integral_parameter.
8252
8253 1999-02-01 Mark Mitchell <mark@markmitchell.com>
8254
8255 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8256 before calling complete_type_or_else.
8257
8258 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8259
8260 * input.c (inline): Don't define, its handled by system.h.
8261
8262 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
8263
8264 * decl2.c: Don't define flag_no_ident here. Don't process
8265 -f(no-)ident here.
8266 * cp-tree.h: Don't declare flag_no_ident here.
8267 * lang-specs.h: Map -Qn to -fno-ident.
8268
8269 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
8270
8271 * cp-tree.h (struct tree_binding): Replace scope field with a union.
8272 (BINDING_SCOPE): Adjust.
8273 * decl.c (BINDING_LEVEL): Adjust.
8274
8275 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
8276
8277 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8278 member constants.
8279
8280 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8281 a ctor initializer.
8282
8283 * tree.c (equal_functions): Fix name in prototype.
8284
8285 * decl.c (push_local_binding): Add FLAGS argument.
8286 (pushdecl, push_overloaded_decl): Pass it.
8287 * decl2.c (do_local_using_decl): Likewise.
8288 * cp-tree.h: Adjust prototype.
8289 * decl.c (poplevel): Fix logic.
8290
8291 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8292 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
8293 (cat_namespace_levels): Don't loop forever.
8294
8295 1999-01-25 Richard Henderson <rth@cygnus.com>
8296
8297 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8298
8299 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
8300
8301 * class.c (resolve_address_of_overloaded_function): Mark the
8302 chosen function used.
8303
8304 * call.c (build_call): Make sure that a function coming in has
8305 been marked used already.
8306 * decl.c (expand_static_init): Call mark_used instead of
8307 assemble_external.
8308 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8309 alloc_eh_object, expand_throw): Likewise.
8310 * init.c (build_builtin_delete_call): Likewise.
8311 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8312 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8313 expand_generic_desc): Likewise.
8314
8315 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
8316
8317 * tree.c (equal_functions): New function.
8318 (ovl_member): Call it.
8319
8320 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8321
8322 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8323
8324 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
8325
8326 * decl.c (decls_match): Return 1 if old and new are identical.
8327 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8328
8329 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
8330
8331 * decl.c (start_function): Make member functions one_only on windows.
8332 * decl2.c (import_export_decl): Likewise.
8333
8334 * decl.c (grokdeclarator): Don't complain about implicit int in
8335 a system header. Change same-name field check to not complain in
8336 a system header instead of within extern "C".
8337
8338 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8339
8340 * cp-tree.h (PUSH_GLOBAL): New macro.
8341 (PUSH_LOCAL): Likewise.
8342 (PUSH_USING): Likewise.
8343 (namespace_bindings_p): Declare.
8344 (push_overloaded_decl): Likewise.
8345 * decl.c (push_overloaded_decl): Don't make it static. Check for
8346 illegal declarations after using declarations here.
8347 (namespace_bindings_p): Likewise.
8348 (duplicate_decls): Don't consider declarations from different
8349 namespaces to be the same.
8350 (pushdecl): Use symbolic PUSH_ constants in calls to
8351 push_overloaded_decl.
8352 (push_overloaded_decl_1): Likewise.
8353 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8354 (do_nonmember_using_decl): Check for illegal using declarations
8355 after ordinary declarations here.
8356 (do_local_using_decl): Call pushdecl to insert declarations.
8357
8358 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
8359
8360 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8361
8362 1999-01-21 Mark Mitchell <mark@markmitchell.com>
8363
8364 * tree.c (build_cplus_array_type_1): Don't call build_array_type
8365 for types involving template parameters.
8366
8367 * cp-tree.h (PARM_DECL_EXPR): Delete.
8368 (convert_default_arg): Change prototype.
8369 (check_default_argument): Declare.
8370 (search_tree): Likewise.
8371 * call.c (convert_default_arg): Take the function to which the
8372 default argument belongs as a parameter, and do any necessary
8373 instantiation here, instead of ...
8374 (build_over_call): Here.
8375 * decl.c (local_variable_p): New function.
8376 (check_default_argument): Likewise, split out and tidied from ...
8377 (grokparms): Here.
8378 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8379 * pt.c (tsubst_call_declarator_parms): New function.
8380 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
8381 with CALL_EXPRs, rather than trying to be clever.
8382 (tsubst): Use tsubst_call_declarator_parms.
8383 * tree.c (search_tree): Don't make it static.
8384 * typeck.c (convert_arguments): Use new interface to
8385 convert_default_arg.
8386
8387 1999-01-20 Mark Mitchell <mark@markmitchell.com>
8388
8389 * error.c (dump_function_decl): Don't print the argument types for
8390 a function when the verbosity level is negative.
8391
8392 * call.c (build_over_call): Check format attributes at call-time.
8393
8394 * pt.c (tsubst_copy): Fix comment.
8395 (unify): Don't allow unification with variable-sized arrays.
8396
8397 * semantics.c (finish_stmt_expr): When processing a template make
8398 the BIND_EXPR long-lived.
8399
8400 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
8401
8402 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8403 (import_export_vtable): Not here.
8404
8405 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8406
8407 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8408 non-static member function.
8409
8410 1999-01-18 Nathan Sidwell <nathan@acm.org>
8411
8412 * class.c (instantiate_type): Only diagnose illegal address of member
8413 function if complaining.
8414
8415 * decl.c (lookup_name_real): Remove duplicate code.
8416
8417 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8418
8419 * tree.c (copy_template_template_parm): Use permanent_obstack.
8420
8421 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8422
8423 * pt.c (unify): Remove restrictions on deduction of argument
8424 of template template parameters.
8425
8426 1999-01-18 Nathan Sidwell <nathan@acm.org>
8427
8428 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8429
8430 * class.c (resolve_address_of_overloaded_function): Show list of
8431 all candidates, when none of them match.
8432
8433 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
8434
8435 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8436 definition of 'casting away const' in reinterpret_cast<>.
8437
8438 1999-01-18 Graham <grahams@rcp.co.uk>
8439
8440 * cvt.c: Add include for decl.h, remove extern for
8441 static_aggregates which is now provided by decl.h.
8442
8443 * Makefile.in (cvt.o): Add dependency for decl.h and missing
8444 dependencies for convert.h and flags.h.
8445
8446 1999-01-18 Nathan Sidwell <nathan@acm.org>
8447
8448 * decl2.c (do_dtors): Set current location to that of the
8449 decl, for sensible diagnostics and debugging.
8450 (check_classfn): Issue `incomplete type' error, if
8451 class is not defined.
8452
8453 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8454
8455 * cp-tree.h: Add prototype for bound_pmf_p.
8456
8457 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8458 Manfred Hollstein <manfred@s-direktnet.de>
8459
8460 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8461 -Wreturn-type.
8462
8463 1999-01-16 Nathan Sidwell <nathan@acm.org>
8464
8465 * cp-tree.h (struct lang_type): Added has_mutable flag.
8466 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8467 (TYPE_HAS_MUTABLE_P): New macro to read it.
8468 (cp_has_mutable_p): Prototype for new function.
8469 * class.c (finish_struct_1): Set has_mutable from members.
8470 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8471 it contains a mutable.
8472 * typeck.c (cp_has_mutable_p): New function.
8473
8474 1999-01-15 Mark Mitchell <mark@markmitchell.com>
8475
8476 * pt.c (process_template_parm): Ignore top-level qualifiers on
8477 non-type parameters.
8478
8479 * decl.c (start_function): Use current_function_parms in the call
8480 to require_complete_type_for_parms, not the probably empty
8481 DECL_ARGUMENTS.
8482
8483 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
8484
8485 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8486
8487 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8488 that we don't suppress the other copies.
8489 * lex.c (handle_cp_pragma): Likewise.
8490
8491 1999-01-13 Mark Mitchell <mark@markmitchell.com>
8492
8493 * decl.c (grokdeclarator): Undo 1998-12-14 change.
8494 * tree.c (build_cplus_array_type_1): Likewise.
8495 * pt.c (instantiate_class_template): Remove misleading comment.
8496 (tsubst_aggr_type): Substitute if there are template parameters,
8497 regardless of whether or not they use template arguments.
8498 (unify): Likewise, but for unification.
8499
8500 1999-01-12 Richard Henderson <rth@cygnus.com>
8501
8502 * cp-tree.h (flag_permissive): Declare extern.
8503
8504 1999-01-06 Mark Mitchell <mark@markmitchell.com>
8505
8506 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8507 here.
8508 (lang_type): Add is_partial_instantiation. Decrease width of
8509 dummy.
8510 (PARTIAL_INSTANTIATION_P): New macro.
8511 (OPERATOR_TYPENAME_P): Remove.
8512 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8513 OPERATOR_TYPENAME_P.
8514 (grok_op_properties): Likewise.
8515 * friend.c (do_friend): Handle friends that are member functions
8516 correctly.
8517 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8518 * pt.c (instantiate_class_template): Rework for clarity. Avoid
8519 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
8520 any more partial instantiation than is absolutely necessary for
8521 implicit typename. Set PARTIAL_INSTANTIATION_P.
8522 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8523 * semantics.c (begin_class_definition): Handle partial
8524 specializations of a type that was previously partially
8525 instantiated.
8526
8527 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
8528
8529 * g++spec.c (LIBSTDCXX): Provide default definition.
8530 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8531
8532 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8533
8534 * Make-lang.in (g++.o): Depend on prefix.h.
8535
8536 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
8537
8538 * tree.c (bound_pmf_p): New fn.
8539 * typeck.c (build_c_cast): Use it.
8540
8541 * decl.c (grok_op_properties): Use same_type_p.
8542
8543 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8544
8545 * Makefile.in (cvt.o): Depend on toplev.h.
8546
8547 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8548
8549 * cvt.c: Include toplev.h.
8550
8551 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8552 definitions.
8553
8554 * init.c (expand_vec_init): Initialize variable `itype'.
8555
8556 * lex.c (yyerror): Cast the argument passed to a ctype function to
8557 an unsigned char.
8558
8559 * method.c (build_mangled_C9x_name): Wrap prototype and definition
8560 in "HOST_BITS_PER_WIDE_INT >= 64".
8561
8562 * typeck.c (build_binary_op): Mark parameter `convert_p' with
8563 ATTRIBUTE_UNUSED.
8564
8565 1998-12-22 Mark Mitchell <mark@markmitchell.com>
8566
8567 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8568 * tree.c (build_exception_variant): Don't crash on empty throw
8569 specs.
8570
8571 1998-12-18 DJ Delorie <dj@cygnus.com>
8572
8573 * cvt.c (convert_to_reference): Check for both error_mark_node
8574 and NULL_NODE after call to convert_for_initialization.
8575
8576 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
8577
8578 * error.c (interesting_scope_p): New fn.
8579 (dump_simple_decl): Use it.
8580 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8581 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8582
8583 1998-12-16 Mark Mitchell <mark@markmitchell.com>
8584
8585 * class.c (resolve_address_of_overloaded_function): Do conversion
8586 to correct type here, rather than ...
8587 (instantiate_type): Here.
8588
8589 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8590 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8591 (decl_template_parm_p): Remove.
8592 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8593 parameter.
8594 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8595 * pt.c (push_inline_template_parms_recursive): Set it.
8596 (decl_template_parm_p): Remove.
8597 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8598 (process_template_parm): Set it.
8599
8600 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
8601
8602 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8603 if configured with cpplib.
8604
8605 1998-12-15 Mark Mitchell <mark@markmitchell.com>
8606
8607 * decl.c (poplevel): Make sure ns_binding is initialized.
8608
8609 * decl.c (finish_function): Undo inadvertent change in previous
8610 patch.
8611
8612 1998-12-14 Mark Mitchell <mark@markmitchell.com>
8613
8614 * class.c (pushclass): Tweak handling of class-level bindings.
8615 (resolve_address_of_overloaded_function): Update pointer-to-member
8616 handling.
8617 (instantiate_type): Likewise.
8618 * cvt.c (cp_convert_to_pointer): Likewise.
8619 * decl.c (pop_binding): Take the DECL to pop, not just the name.
8620 Deal with `struct stat' hack.
8621 (binding_level): Add to documentation.
8622 (push_binding): Clear BINDING_TYPE.
8623 (add_binding): New function.
8624 (push_local_binding): Use it.
8625 (push_class_binding): Likewise.
8626 (poplevel): Adjust calls to pop_binding.
8627 (poplevel_class): Likewise.
8628 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8629 declarations to current binding level.
8630 (push_class_level_binding): Likewise.
8631 (push_overloaded_decl): Adjust handling of OVERLOADs in local
8632 bindings.
8633 (lookup_namespace_name): Don't crash when confronted with a
8634 TEMPLATE_DECL.
8635 (lookup_name_real): Do `struct stat' hack in local binding
8636 contexts.
8637 (build_ptrmemfunc_type): Adjust documentation.
8638 (grokdeclarator): Don't avoid building real array types when
8639 processing templates unless really necessary.
8640 (finish_method): Adjust calls to pop_binding.
8641 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8642 not reparse_decl_as_expr.
8643 (build_expr_from_tree): Deal with a template-id as the function to
8644 call in a METHOD_CALL_EXPR.
8645 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8646 (maybe_adjust_types_For_deduction): Don't do peculiar things with
8647 METHOD_TYPEs here.
8648 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
8649 pointer-to-member types where necessary.
8650 * tree.c (build_cplus_array_type_1): Don't avoid building real
8651 array types when processing templates unless really necessary.
8652 (build_exception_variant): Compare the exception lists correctly.
8653
8654 1998-12-13 Mark Mitchell <mark@markmitchell.com>
8655
8656 * cp-tree.def (CPLUS_BINDING): Update documentation.
8657 * cp-tree.h (LOCAL_BINDING_P): New macro.
8658 (lang_identifier): Rename local_value to bindings.
8659 (tree_binding): Make `scope' of type `void*', not `tree'.
8660 (BINDING_SCOPE): Update documentation.
8661 (IDENTIFIER_LOCAL_VALUE): Remove.
8662 (IDENTIFIER_CLASS_VALUE): Document.
8663 (IDENTIFIER_BINDING): New macro.
8664 (IDENTIFIER_VALUE): Likewise.
8665 (TIME_IDENTIFIER_TIME): Likewise.
8666 (TIME_IDENTIFIER_FILEINFO): Likewise.
8667 (IMPLICIT_TYPENAME_P): Likewise.
8668 (set_identifier_local_value): Remove.
8669 (push_local_binding): New function.
8670 (push_class_binding): Likewise.
8671 * class.c (pushclass): Update comments; use push_class_binding.
8672 * decl.c (set_identifier_local_value_with_scope): Remove.
8673 (set_identifier_local_value): Likewise.
8674 (push_binding): New function.
8675 (pop_binding): Likewise.
8676 (binding_level): Update documentation. Remove shadowed.
8677 (BINDING_LEVEL): New macro.
8678 (free_binding_nodes): New variable.
8679 (poplevel): Adjust for new name-lookup scheme. Don't mess up
8680 BLOCK_VARs when doing for-scope extension. Remove effectively
8681 dead code.
8682 (pushlevel_class): Tweak formatting.
8683 (poplevel_class): Adjust for new name-lookup scheme.
8684 (print_binding_level): Likewise.
8685 (store_bindings): Likewise.
8686 (pushdecl): Likewise.
8687 (pushdecl_class_level): Likewise.
8688 (push_class_level_binding): Likewise.
8689 (push_overloaded_decl): Update comments. Adjust for new
8690 name-lookup scheme.
8691 (lookup_name_real): Likewise.
8692 (lookup_name_current_level): Likewise.
8693 (cp_finish_decl): Likewise.
8694 (require_complete_types_for_parms): Likewise. Remove misleading
8695 #if 0'd code.
8696 (grok_parms): Likewise. Don't call
8697 require_complete_types_for_parms here.
8698 (grok_ctor_properties): Don't treat templates as copy
8699 constructors.
8700 (grop_op_properties): Or as assignment operators.
8701 (start_function): Document. Adjust for new name-lookup scheme.
8702 (finish_function): Likewise.
8703 * decl2.c (do_local_using_decl): Use push_local_binding.
8704 * lex.c (begin_definition_of_inclass_inline): New function, split
8705 out from ...
8706 (do_pending_inlines): Here, and ...
8707 (process_next_inline): Here.
8708 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8709 (init_filename_times): Likewise.
8710 (extract_interface_info): Likewise.
8711 (ste_typedecl_interface_info): Likewise.
8712 (check_newline): Likewise.
8713 (dump_time_statistics): Likewise.
8714 (handle_cp_pragma): Likewise.
8715 (do_identifier): Adjust for new name-lookup scheme.
8716 * parse.y (function_try_block): Return ctor_initializer_opt value.
8717 (fndef): Use it.
8718 (fn.defpen): Pass appropriate values to start_function.
8719 (pending_inline): Use functor_try_block value, and pass
8720 appropriate values to finish_function.
8721 * pt.c (is_member_template): Update documentation; remove handling
8722 of FUNCTION_DECLs. As per name, this function should deal only in
8723 TEMPLATE_DECLs.
8724 (decl_template_parm_p): Change name of olddecl parameter to decl.
8725 (check_template_shadow): Adjust for new name-lookup scheme.
8726 (lookup_template_class): Likewise.
8727 (tsubst_decl): Tweak so as not to confuse member templates with
8728 copy constructors and assignment operators.
8729 (unify): Handle UNION_TYPEs.
8730 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8731 (lang_print_xnode): Adjust for new name-lookup scheme.
8732 * typeck.c (mark_addressable): Likewise.
8733 (c_expand_return): Likewise.
8734
8735 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8736
8737 * decl.c (grokdeclarator): Allow field with same name as class
8738 in extern "C".
8739
8740 * decl.c (lookup_name_real): Don't limit field lookup to types.
8741 * class.c (check_member_decl_is_same_in_complete_scope): No error
8742 if icv and x are the same.
8743 * lex.c (do_identifier): Tweak error message.
8744
8745 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8746
8747 * decl.c (start_enum): Use push_obstacks, not
8748 end_temporary_allocation.
8749 (finish_enum): Call pop_obstacks.
8750
8751 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8752
8753 * class.c (instantiate_type): Return error_mark_node rather than
8754 junk.
8755
8756 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8757
8758 * cp-tree.h (most_specialized_instantiation): New function.
8759 (print_candidates): Likewise.
8760 * class.c (validate_lhs): Remove.
8761 (resolve_address_of_overloaded_function): New function, split out
8762 and then substantially reworked, from ...
8763 (instantiate_type): Use it. Simplify.
8764 * cvt.c (convert_to_reference): Complain when caller has indicated
8765 that's the right thing to do. Don't crash if instantiate_type
8766 fails.
8767 * pt.c: Substitute `parameters' for `paramters' throughout.
8768 (print_candidates): Don't make it static.
8769 (most_specialized_instantiation): Split out from ...
8770 (most_specialized): Here.
8771
8772 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8773
8774 * lex.c (lang_init_options): Initialize cpplib.
8775 * decl2.c (parse_options,cpp_initialized): Removed.
8776 (lang_decode_option): Move initialization of cpplib to
8777 lang_init_options.
8778
8779 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8780
8781 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8782 well as the TYPE_DECL, when a typedef name is assigned to a
8783 previously anonymous type.
8784
8785 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8786
8787 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8788 __cp_eh_info for getting the eh info pointer. Add table_index to
8789 field list.
8790 (push_eh_cleanup): Don't increment 'handlers' data field.
8791 (process_start_catch_block): Don't set the 'caught' field.
8792
8793 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8794 exception info pointer within library routines.
8795 (__cp_eh_info): Use CP_EH_INFO.
8796 (__start_cp_handler): Get exception info pointer, set caught field,
8797 and increment the handlers field. Avoids this being done by handlers.
8798 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8799 (uncaught_exception): Use CP_EH_INFO macro.
8800
8801 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8802
8803 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8804
8805 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8806
8807 * lex.c (check_newline): Add support for \ as `natural'
8808 characters in file names in #line to be consistent with #include
8809 handling. We support escape processing in the # 1 "..." version of
8810 the command. See also support in cp/lex.c.
8811
8812 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8813
8814 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8815 structure.
8816
8817 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8818
8819 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8820
8821 * error.c (dump_simple_decl): Also print namespace context.
8822 (dump_function_decl): Likewise.
8823
8824 * decl2.c (ambiguous_decl): Don't print old value if it's
8825 error_mark_node.
8826
8827 * decl.c (lookup_name_real): Fix handling of local types shadowed
8828 by a non-type decl. Remove obsolete code.
8829 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8830
8831 * lang-options.h: Add -fpermissive.
8832 * decl2.c: Likewise.
8833 * cp-tree.h: Add flag_permissive.
8834 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8835 were specified, set flag_pedantic_errors.
8836 * call.c (build_over_call): Turn dropped qualifier messages
8837 back into pedwarns.
8838 * cvt.c (convert_to_reference): Likewise.
8839 * typeck.c (convert_for_assignment): Likewise.
8840
8841 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8842
8843 * decl2.c (coerce_new_type): Use same_type_p.
8844 (coerce_delete_type): Likewise.
8845
8846 * call.c (check_dtor_name): Return 1, not error_mark_node.
8847
8848 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8849
8850 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8851 if MULTIPLE_SYMBOL_SPACES.
8852
8853 * pt.c (check_template_shadow): New fn.
8854 * decl2.c (grokfield): Use it.
8855 * decl.c (pushdecl): Likewise.
8856 (pushdecl_class_level): Likewise.
8857 (start_method): Likewise.
8858 (xref_tag): Don't try to use 't' if we're defining.
8859
8860 * call.c (check_dtor_name): Just return an error_mark_node.
8861 * pt.c (lookup_template_class): Complain about using non-template here.
8862 * parse.y (apparent_template_type): Not here.
8863
8864 * pt.c (check_explicit_specialization): Complain about specialization
8865 with C linkage.
8866
8867 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8868
8869 * pt.c (convert_nontype_argument): Don't assume that any integer
8870 argument is intended to be a constant-expression.
8871
8872 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8873
8874 * class.c (handle_using_decl): Fix comment. Don't lookup
8875 constructors in base classes.
8876 (validate_lhs): Fix typo in comment.
8877 * search.c (lookup_field_1): Don't return a USING_DECL.
8878
8879 * cp-tree.h (DECL_ACCESS): Improve documentation.
8880
8881 * decl.c (expand_static_init): Don't set the initialization-done
8882 flag until the initialization is done.
8883
8884 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8885
8886 * decl2.c (validate_nonmember_using_decl): Complain about using
8887 declarations for class members.
8888
8889 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
8890
8891 * typeck2.c (process_init_constructor): Use same_type_p.
8892
8893 * decl.c (check_tag_decl): Don't warn about null decl inside a
8894 class.
8895
8896 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8897 UNIFY_ALLOW_NONE.
8898 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8899 (resolve_overloaded_unification): Strip baselinks.
8900
8901 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8902
8903 * g++spec.c: Don't prototype xmalloc.
8904
8905 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
8906
8907 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8908
8909 * decl.c (check_tag_decl): Do complain about null friend decl at
8910 file scope.
8911
8912 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8913
8914 * lex.c (make_lang_type): Clear the whole struct lang_type, not
8915 only the first multiple of sizeof (int).
8916
8917 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8918
8919 * decl.c (start_decl): An explicit specialization of a static data
8920 member is only a definition if it has an initializer.
8921
8922 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8923 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8924 cp_finish_decl.
8925 * init.c (expand_default_init): Check for DIRECT_BIND instead of
8926 DECL_ARTIFICIAL.
8927
8928 * call.c (build_over_call): Use build_decl.
8929
8930 * except.c (expand_throw): Just use convert, not
8931 build_reinterpret_cast.
8932
8933 * lex.c (handle_generic_pragma): Use token_buffer.
8934
8935 * decl.c (check_tag_decl): Don't complain about null friend decl.
8936
8937 1998-11-24 Dave Pitts <dpitts@cozx.com>
8938
8939 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8940 first position.
8941 * lex.c (check_newline): Use ISALPHA.
8942 (readescape): Use ISGRAPH.
8943 (yyerror): Use ISGRAPH.
8944
8945 1998-11-24 Nathan Sidwell <nathan@acm.org>
8946
8947 * search.c (get_abstract_virtuals): Do not use initial
8948 CLASSTYPE_ABSTRACT_VIRTUALS.
8949 * typeck2.c (abstract_virtuals_error): Show location of abstract
8950 declaration.
8951 * call.c (build_new_method_call): Use
8952 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8953 * class.c (finish_struct_bits): Don't bother working out whether
8954 get_abstract_virtuals will do anything, just do it.
8955
8956 1998-11-24 Graham <grahams@rcp.co.uk>
8957
8958 * typeck.c (build_component_ref): Remove unused statement.
8959
8960 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8961
8962 * class.c (add_method): Catch invalid overloads.
8963
8964 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8965 * search.c (lookup_conversions): Handle getting real OVERLOADs.
8966 (add_conversions): Likewise. Revert last change.
8967 * call.c (add_conv_candidate): Pass totype to add_candidate instead
8968 of fn. Don't add a new candidate if the last one was for the same
8969 type.
8970 (print_z_candidates): Handle getting a type as a function.
8971 (joust): If we got two conversion candidates to the same type,
8972 just pick one.
8973 (build_object_call): Lose 'templates'.
8974 (build_user_type_conversion_1): Handle getting real OVERLOADs.
8975
8976 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8977
8978 * typeck2.c (process_init_constructor): If there are elements
8979 that don't have initializers and they need to have constructors
8980 run, supply them with initializers.
8981
8982 * class.c (finish_struct_1): A class with a 0-width bitfield is
8983 still empty.
8984
8985 1998-11-23 Mark Mitchell <mark@markmitchell.com>
8986
8987 * pt.c (instantiate_class_template): Don't try to figure out what
8988 specialization to use for a partial instantiation. Correct
8989 typos in a couple of comments. Avoid calling uses_template_parms
8990 multiple times.
8991
8992 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
8993
8994 * method.c (process_overload_item): Add call to
8995 build_mangled_C9x_name for intTI_type_nodes.
8996 (build_mangled_C9x_name): Add prototype, define.
8997 * decl.c (init_decl_processing): Add names for
8998 TImode_type_node.
8999
9000 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
9001
9002 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
9003
9004 * class.c (finish_struct_1): Set things up for 0-width bitfields
9005 like we do for others.
9006
9007 * decl.c (check_tag_decl): New fn.
9008 (shadow_tag): Split out from here.
9009 * decl2.c (grok_x_components): Call it.
9010
9011 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
9012
9013 * decl.c: Lose warn_about_return_type.
9014 (grokdeclarator): Always complain about implicit int, except for
9015 `main () { ... }'.
9016
9017 * decl.c (tag_name): New fn.
9018 (xref_tag): Complain about using typedef-name after class-key.
9019
9020 * init.c (expand_vec_init): Also keep going if from_array.
9021
9022 * tree.c (is_overloaded_fn): Also handle the output of
9023 build_offset_ref.
9024
9025 * decl.c (grokdeclarator): Use constructor_name when comparing
9026 field name against enclosing class.
9027 * class.c (finish_struct_anon): Likewise.
9028
9029 1998-11-22 Mark Mitchell <mark@markmitchell.com>
9030
9031 * decl.c (poplevel): Remove code to handle KEEP == 2.
9032 (finish_function): Don't confuse BLOCK-order when
9033 processing a destructor.
9034
9035 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
9036
9037 * decl.c (require_complete_types_for_parms): Call layout_decl
9038 after we've completed the type.
9039
9040 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
9041
9042 * decl2.c (validate_nonmember_using_decl): Allow using templates
9043 from the global namespace.
9044
9045 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
9046
9047 Handle specifying template args to member function templates.
9048 * tree.c (build_overload): Always create an OVERLOAD for a template.
9049 * search.c (add_conversions): Handle finding an OVERLOAD.
9050 * decl2.c (check_classfn): Likewise.
9051 * lex.c (identifier_type): See through a baselink.
9052 * parse.y (do_id): Don't call do_identifier if we got a baselink.
9053 * class.c (instantiate_type, case TREE_LIST): Recurse.
9054
9055 * decl.c (grokdeclarator): Allow a boolean constant for array
9056 bounds, odd as that sounds.
9057
9058 * pt.c (unify): Be more strict about non-type parms, except for
9059 array bounds.
9060 (UNIFY_ALLOW_INTEGER): New macro.
9061
9062 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
9063
9064 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
9065
9066 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
9067
9068 * semantics.c (begin_class_definition): Call
9069 maybe_process_partial_specialization before push_template_decl.
9070 Don't call push_template_decl for a specialization.
9071 * search.c (lookup_field): Do return a member template class.
9072 * decl2.c (handle_class_head): Handle member template classes.
9073
9074 * decl.c (grokdeclarator): A parm type need not be complete.
9075
9076 * pt.c (convert_nontype_argument): Fix thinko.
9077
9078 1998-11-18 Mark Mitchell <mark@markmitchell.com>
9079
9080 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
9081 (global_delete_fndecl): New variable.
9082 * decl.c (global_delete_fndecl): Define it.
9083 (init_decl_processing): Set it.
9084 * init.c (build_builtin_delete_call): Use it.
9085 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
9086 nodes.
9087
9088 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
9089
9090 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
9091 type.
9092
9093 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
9094 * call.c (build_object_call): Also support references to functions.
9095 * typeck.c (convert_for_initialization): Don't decay a function
9096 if the target is a reference to function.
9097
9098 * search.c (add_conversions): Get all the overloads from a class.
9099
9100 * decl.c (grok_ctor_properties): Complain about any constructor
9101 that will take a single arg of the class type by value.
9102
9103 * typeck2.c (build_functional_cast): Can't create objects of
9104 abstract classes this way.
9105 * cvt.c (ocp_convert): Likewise.
9106
9107 * decl.c (grokfndecl): Member functions of local classes are not
9108 public.
9109
9110 1998-11-18 Mark Mitchell <mark@markmitchell.com>
9111
9112 * Make-lang.in (cc1plus): Add dependency on hash.o.
9113
9114 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
9115
9116 * search.c (get_abstract_virtuals): Complain about virtuals with
9117 no final overrider.
9118 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9119 with no final overrider.
9120 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9121 on virtuals with no final overrider.
9122
9123 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9124
9125 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9126 after layout_type.
9127
9128 * friend.c (do_friend): Don't set_mangled_name_for_decl.
9129
9130 * class.c (finish_struct_anon): Complain about non-fields.
9131 * decl2.c (build_anon_union_vars): Likewise.
9132
9133 * decl.c (grokdeclarator): Normal data members can't have the same
9134 name as the class, either.
9135 * class.c (finish_struct_anon): Neither can members of an
9136 anonymous union.
9137
9138 1998-11-17 Mark Mitchell <mark@markmitchell.com>
9139
9140 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9141 (TYPE_BINFO): Likewise.
9142 (IS_AGGR_TYPE): Tweak.
9143 (SET_IS_AGGR_TYPE): New macro.
9144 (CLASS_TYPE_P): Tweak.
9145 (lang_type): Group mark bitfields together. Remove linenum.
9146 (CLASSTYPE_SOURCE_LINE): Remove macro.
9147 (CLASSTYPE_MARKED_N): New macro.
9148 (SET_CLASSTYPE_MARKED_N): Likewise.
9149 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9150 (CLASS_TYPE_MARKED_*): Use them.
9151 (SET_CLASSTYPE_MARKED_*): Likewise.
9152 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9153 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9154 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9155 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9156 * class.c (class_cache_obstack): New variable.
9157 (class_cache_firstobj): Likewise.
9158 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9159 (pushclass): Free the cache, when appropriate.
9160 (popclass): Tidy.
9161 (maybe_push_cache_obstack): Use class_cache_obstack.
9162 * decl.c (include hash.h).
9163 (typename_hash): New function.
9164 (typename_compare): Likewise.
9165 (build_typename_type): Check the hash table to avoid creating
9166 duplicates.
9167 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9168 (grokdeclarator): Use CLASS_TYPE_P.
9169 (xref_basetypes): Likewise.
9170 (start_function): Likewise. Don't put current_class_ref on the
9171 permanent obstack.
9172 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9173 and TYPE_TI_ARGS.
9174 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9175 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9176 fields for types other than class types. Do clear TYPE_ALIAS_SET
9177 for types other than class types, though.
9178 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9179 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9180 * pt.c (process_template_parm): Don't set
9181 CLASSTYPE_GOT_SEMICOLON.
9182 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9183 Coerce arguments on the momentary obstack.
9184 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9185 (instantiate_class_template): Calculate template arguments on the
9186 momentary obstack. Tidy.
9187 (tsubst_template_arg_vector): Use make_temp_vec.
9188 (tsubst_aggr_type): Put template arguments on the momentary
9189 obstack.
9190 (tsubst_decl): Likewise.
9191 (tsubst): Copy the array bounds index to the permanent obstack
9192 before building index types. Use new macros.
9193 (unify): Use new macros.
9194 (do_type_instantiation): Likewise.
9195 * search.c (lookup_fnfields_1): Use new macros.
9196 (dfs_pushdecls): Build envelopes on the cache obstack.
9197 (dfs_compress_decls): Use new macros.
9198 (push_class_decls): Build on the cache obstack.
9199 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9200 * sign.c (build_signature_pointer_or_reference_type): Use
9201 SET_IS_AGGR_TYPE.
9202 * tree.c (make_binfo): Check CLASS_TYPE_P.
9203 (copy_template_template_parm): Adjust.
9204 (make_temp_vec): Use push_expression_obstack.
9205 * typeck.c (complete_type): Use new macros.
9206 (comptypes): Likewise.
9207
9208 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
9209
9210 * pt.c (tsubst): Add diagnostics for invalid array, reference
9211 and pointer to member types.
9212
9213 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9214
9215 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9216
9217 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9218 Simplify.
9219
9220 * parse.y (structsp): Fix cut-and-paste error.
9221
9222 * init.c (build_new): Complain about non-integral size.
9223
9224 * parse.y (unary_expr): Complain about defining types in sizeof.
9225
9226 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9227
9228 * rtti.c (build_x_typeid): Complain about typeid without
9229 including <typeinfo>.
9230 (get_typeid): Likewise. Complain about typeid of incomplete type.
9231 (get_tinfo_fn_dynamic): Likewise.
9232 (get_typeid_1): Not static anymore.
9233 * except.c (build_eh_type_type): Use get_typeid_1.
9234
9235 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9236 ambiguous or private bases. Fix warning for reference cast.
9237
9238 1998-11-16 Mark Mitchell <mark@markmitchell.com>
9239
9240 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9241 * decl.c (duplicate_decls): Remove special-case code to deal with
9242 template friends, and just do the obvious thing.
9243 * pt.c (register_specialization): Tweak for clarity, and also to
9244 clear DECL_INITIAL for an instantiation before it is merged with a
9245 specialization.
9246 (check_explicit_specialization): Fix indentation.
9247 (tsubst_friend_function): Handle both definitions in friend
9248 declaration and outside friend declarations.
9249 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9250 (regenerate_decl_from_template): Tweak accordingly.
9251 (instantiate_decl): Likewise.
9252
9253 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
9254
9255 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9256 member function reference to error.
9257 * cvt.c (ocp_convert): Complain about converting an overloaded
9258 function to void.
9259
9260 * init.c (build_offset_ref): Just return a lone static member
9261 function.
9262
9263 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9264 not internal ones.
9265
9266 * typeck.c (build_binary_op_nodefault): Improve error handling.
9267
9268 * decl.c (grokfndecl): Complain about making 'main' a template.
9269
9270 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9271
9272 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9273 TYPE_DECL in a template.
9274
9275 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
9276
9277 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9278
9279 * decl.c (struct cp_function): Add named_label_uses.
9280 (push_cp_function_context): Save it.
9281 (pop_cp_function_context): Restore it.
9282 (define_label): Also complain about jumping into the scope of
9283 non-POD objects that don't have constructors.
9284 * tree.c (pod_type_p): New fn.
9285
9286 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9287 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9288 (get_tinfo_fn): Not here.
9289 * repo.c (repo_get_id): Abort if we get called for an incomplete
9290 type.
9291
9292 1998-11-13 Mark Mitchell <mark@markmitchell.com>
9293
9294 * except.c (expand_throw): Make sure first argument to
9295 __cp_push_exception is of type `void*' to avoid spurious error
9296 messages.
9297
9298 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
9299
9300 * pt.c (try_one_overload): Take orig_targs again. Only check for
9301 mismatches against them; we don't care what a previous call found.
9302 (resolve_overloaded_unification): Adjust.
9303
9304 * search.c (lookup_field): Don't return anything for a non-type
9305 field from a dependent type.
9306 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9307 in an array declarator.
9308 (start_decl): Push into the class before looking for the field.
9309
9310 1998-11-08 Mark Mitchell <mark@markmitchell.com>
9311
9312 * method.c (build_overload_value): Handle REFERENCE_TYPE.
9313
9314 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
9315
9316 * decl.c (grokdeclarator): Allow namespace-scoped members if they
9317 are friends.
9318
9319 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
9320
9321 * pt.c (tsubst_decl): Don't mess with the global value of an
9322 un-mangled DECL_ASSEMBLER_NAME.
9323
9324 1998-11-03 Christopher Faylor <cgf@cygnus.com>
9325
9326 * decl.c (init_decl_processing): Remove CYGWIN conditional
9327 since CYGWIN is now able to deal with trapping signals.
9328
9329 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9330
9331 * cp-tree.h: Don't include gansidecl.h.
9332 * exception.cc: Include gansidecl.h (since we don't include config.h)
9333 * g++spec.c: Don't include gansidecl.h.
9334
9335 1998-11-06 Mark Mitchell <mark@markmitchell.com>
9336
9337 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
9338 size of dummy.
9339 (DECL_DEFINED_IN_CLASS_P): New macro.
9340 (TEMPLATE_PARMS_FOR_INLINE): Document.
9341 (check_static_variable_definition): New function.
9342 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9343 appropriate.
9344 (check_static_variable_definition): Split out from ...
9345 (grokdeclarator): Here.
9346 * pt.c (check_default_tmpl_args): New function, split out from ...
9347 (push_template_decl_real): Here.
9348 (instantiate_template): Fix comment.
9349
9350 1998-11-04 Mark Mitchell <mark@markmitchell.com>
9351
9352 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9353 (CP_TYPE_VOLATILE_P): Likewise.
9354 (CP_TYPE_RESTRICT_P): Likewise.
9355
9356 1998-11-03 Mark Mitchell <mark@markmitchell.com>
9357
9358 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9359
9360 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
9361
9362 * class.c (instantiate_type): Be more helpful.
9363
9364 * decl2.c (import_export_decl): Call import_export_class.
9365
9366 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9367 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9368 * pt.c (tsubst_copy): Likewise.
9369
9370 1998-11-02 Mark Mitchell <mark@markmitchell.com>
9371
9372 * init.c (expand_vec_init): Fix off-by-one error.
9373
9374 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
9375
9376 * parse.y (apparent_template_type): New type.
9377 (named_complex_class_head_sans_basetype): Use it.
9378 * Makefile.in (CONFLICTS): One new conflict.
9379 * parse.c: Regenerated.
9380
9381 1998-11-01 Mark Mitchell <mark@markmitchell.com>
9382
9383 * cp-tree.h (COMPARE_STRICT): New macro.
9384 (COMPARE_BASE): Likewise.
9385 (COMPARE_RELAXED): Likewise.
9386 (COMPARE_REDECLARATION): Likewise.
9387 (same_type_p): Likewise.
9388 (same_or_base_type_p): Likewise.
9389 * call.c (standard_conversion): Use them, in place of comptypes
9390 with numeric arguments.
9391 (reference_binding): Likewise.
9392 (convert_like): Likewise.
9393 (build_over_call): Likewise.
9394 (is_subseq): Likewise.
9395 (is_properly_derived_from): Likewise.
9396 (compare_ics): Likewise.
9397 (joust): Likewise.
9398 * class.c (delete_duplicate_fields_1): Likewise.
9399 (resolves_to_fixed_type_p): Likewise.
9400 (instantiate_type): Likewise. Remove #if 0'd code.
9401 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
9402 (pushdecl): Likewise.
9403 (lookup_name_real): Likewise.
9404 (grokdeclarator): Likewise. Check for illegal array declarations.
9405 (grokparms): Likewise.
9406 (grok_op_properties): Likewise.
9407 * decl2.c (check_classfn): Likewise.
9408 * friend.c (is_friend): Likewise.
9409 (make_friend_class): Likewise.
9410 * init.c (expand_aggr_init): Likewise.
9411 (expand_vec_init): Likewise.
9412 * pt.c (is_member_template_class): Remove declaration.
9413 (is_specialization_of): Use COMPARE_* and new macros.
9414 (comp_template_parms): Likewise.
9415 (convert_nontype_argument): Likewise.
9416 (coerce_template_template_parms): Likewise.
9417 (template_args_equal): Likewise.
9418 (lookup_template_class): Likewise.
9419 (type_unification_real): Likewise.
9420 (unify): Likewise.
9421 (get_bindings_real): Likewise.
9422 * search.c (covariant_return_p): Likewise.
9423 (get_matching_virtual): Likewise.
9424 * sig.c (match_method_types): Likewise.
9425 * tree.c (vec_binfo_member): Likewise.
9426 (cp_tree_equal): Likewise.
9427 * typeck.c (common_type): Likewise.
9428 (comp_array_types): Likewise. Get issues involving unknown array
9429 bounds right.
9430 (comptypes): Update comments. Use new flags.
9431 (comp_target_types): Use new macros.
9432 (compparms): Likewise.
9433 (comp_target_parms): Likewise.
9434 (string_conv_p): Likewise.
9435 (build_component_ref): Likewise.
9436 (build_indirect_ref): Likewise.
9437 (build_conditional_expr): Likewise.
9438 (build_static_cast): Likewise.
9439 (build_reinterpret_cast): Likewise.
9440 (build_const_cast): Likewise.
9441 (build_modify_expr): Likewise.
9442 (convert_for_assignment): Likewise.
9443 (comp_ptr_ttypes_real): Likewise.
9444 (ptr_reasonably_similar): Likewise.
9445 (comp_ptr_ttypes_const): Likewise.
9446
9447 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
9448
9449 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9450
9451 1998-10-30 Mark Mitchell <mark@markmitchell.com>
9452
9453 * decl2.c (delete_sanity): Pass integer_zero_node, not
9454 integer_two_node, to build_vec_delete.
9455 * init.c (build_array_eh_cleanup): Remove.
9456 (expand_vec_init_try_block): New function.
9457 (expand_vec_init_catch_clause): Likewise.
9458 (build_vec_delete_1): Don't deal with case that auto_delete_vec
9459 might be integer_two_node anymore.
9460 (expand_vec_init): Rework for initialization-correctness and
9461 exception-correctness.
9462 * typeck2.c (process_init_constructor): Make mutual exclusivity
9463 of cases more obvious.
9464
9465 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
9466
9467 * decl.c (lookup_name_real): OK, only warn if not lexing.
9468 Simplify suggested fix.
9469
9470 * cp-tree.h (IDENTIFIER_MARKED): New macro.
9471 * search.c (lookup_conversions): Use breadth_first_search.
9472 (add_conversions): Avoid adding two conversions to the same type.
9473 (breadth_first_search): Work with base binfos, rather
9474 than binfos and base indices.
9475 (get_virtual_destructor): Adjust.
9476 (tree_has_any_destructor_p): Adjust.
9477 (get_matching_virtual): Adjust.
9478
9479 * pt.c (push_template_decl_real): Generalize check for incorrect
9480 number of template parms.
9481 (is_member_template_class): #if 0.
9482
9483 1998-10-29 Richard Henderson <rth@cygnus.com>
9484
9485 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9486 last.
9487
9488 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
9489
9490 * lex.c: Call check_newline from lang_init always. After
9491 calling cpp_start_read, set yy_cur and yy_lim to read from the
9492 cpplib token buffer.
9493
9494 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
9495
9496 * class.c (instantiate_type): Don't consider templates for a normal
9497 match.
9498
9499 * class.c (finish_struct_1): Don't complain about non-copy
9500 assignment ops in union members.
9501
9502 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9503 (prepare_fresh_vtable): Likewise.
9504 (finish_struct_1): Don't call import_export_class.
9505 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9506 (finish_prevtable_vardecl): Lose.
9507 (finish_file): Don't call it.
9508 * pt.c (instantiate_class_template): Likewise.
9509 * cp-tree.h: Remove it.
9510
9511 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9512 * decl.c (finish_function): Not here.
9513 (start_function): Do set DECL_INITIAL.
9514
9515 * pt.c (push_template_decl_real): Complain about default template
9516 args for enclosing classes.
9517
9518 * call.c (add_function_candidate): Treat conversion functions
9519 as coming from the argument's class.
9520 * cp-tree.h (DECL_CONV_FN_P): New fn.
9521 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9522 * class.c (add_method): Use DECL_CONV_FN_P.
9523 * decl2.c (check_classfn): Likewise.
9524 * error.c (dump_function_name): Likewise.
9525 (dump_function_decl): Likewise.
9526 * pt.c (fn_type_unification): Likewise.
9527 * search.c (add_conversions): Likewise.
9528
9529 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9530
9531 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9532 * method.c (hack_identifier): Also check for using RESULT_DECL
9533 from outer context.
9534
9535 1998-10-27 Mark Mitchell <mark@markmitchell.com>
9536
9537 * decl.c (grokdeclarator): Use type_quals, rather than constp,
9538 consistently.
9539
9540 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9541
9542 * call.c (standard_conversion): instantiate_type here.
9543 (reference_binding): And here.
9544 (implicit_conversion): Not here.
9545 (build_op_delete_call): No need to cons up an OVERLOAD.
9546 * cvt.c (cp_convert_to_pointer): instantiate_type here.
9547 (convert_to_reference): And here.
9548 * decl.c (grok_reference_init): Not here.
9549 (grokparms): Or here.
9550 * typeck2.c (digest_init): Or here.
9551 * typeck.c (decay_conversion): Take the address of overloaded
9552 functions, too.
9553 (require_instantiated_type): Lose.
9554 (convert_arguments): Don't handle unknown types here.
9555 (build_c_cast): Likewise.
9556 (build_binary_op): Gut.
9557 (build_conditional_expr): Don't require_instantiated_type.
9558 (build_modify_expr): Likewise.
9559 (build_static_cast): Don't instantiate_type.
9560 (build_reinterpret_cast): Likewise.
9561 (build_const_cast): Likewise.
9562 (convert_for_initialization): Likewise.
9563 (build_ptrmemfunc): Use type_unknown_p.
9564 (convert_for_assignment): Also do default_conversion on overloaded
9565 functions. Hand them off to ocp_convert.
9566
9567 1998-10-26 Mark Mitchell <mark@markmitchell.com>
9568
9569 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9570 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
9571
9572 * class.c (finish_struct_1): Use build_cplus_array_type to build
9573 array types.
9574 * decl.c (init_decl_processing): Likewise.
9575 * except.c (expand_end_eh_spec): Likewise.
9576 * search.c (expand_upcast_fixups): Simplify very slightly.
9577
9578 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9579
9580 * decl.c (grokdeclarator): Complain about a variable using
9581 constructor syntax coming back null from start_decl.
9582
9583 * friend.c (make_friend_class): Complain about trying to make
9584 a non-class type a friend.
9585
9586 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9587 (start_function): Not here.
9588
9589 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
9590
9591 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9592
9593 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9594
9595 * typeck2.c (process_init_constructor): Only skip anonymous fields
9596 if they are bitfields.
9597
9598 * cp-tree.def (TYPEOF_TYPE): New code.
9599 * error.c (dump_type_real): Handle it.
9600 * pt.c (tsubst): Likewise.
9601 * tree.c (search_tree): Likewise.
9602 * semantics.c (finish_typeof): New fn.
9603 * parse.y (typespec): Use it.
9604 * cp-tree.h: Declare it.
9605
9606 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
9607
9608 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9609
9610 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9611
9612 * typeck.c (convert_arguments): Don't handle pmf references
9613 specially.
9614
9615 * init.c (build_member_call): Don't try to convert to the base type
9616 if it's ambiguous or pedantic.
9617
9618 * typeck2.c (check_for_new_type): Only depend on pedantic for
9619 C-style casts.
9620
9621 1998-10-25 Mark Mitchell <mark@markmitchell.com>
9622
9623 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9624 non-converting constructors.
9625
9626 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9627
9628 * gxxint.texi: Correct documentation for n, N, Q, and B.
9629
9630 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
9631
9632 * parse.y (condition): Convert VAR_DECL from reference to indirect
9633 reference.
9634
9635 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
9636
9637 * exception.cc (__cp_pop_exception): Free the original exception
9638 value, not the potentially coerced one.
9639
9640 1998-10-23 Mark Mitchell <mark@markmitchell.com>
9641
9642 * Makefile.in (hash.h): Run gperf when necessary.
9643
9644 * cp-tree.h (CP_TYPE_READONLY): Remove.
9645 (CP_TYPE_VOLATILE): Likewise.
9646 (CP_TYPE_QUALS): New macro.
9647 (CP_TYPE_CONST_P): Likewise.
9648 (CP_TYPE_VOLATILE_P): Likewise.
9649 (CP_TYPE_RESTRICT_P): Likewise.
9650 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9651 (cp_build_type_variant): Rename to ...
9652 (cp_build_qualified_type): New function.
9653 (c_apply_type_quals_to_decl): Declare.
9654 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9655 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9656 (cp_type_qual_from_rid): New function.
9657 (compparms): Remove unused parameter. All callers changed.
9658 (cp_type_quals): New function.
9659 (at_least_as_qualified_p): Likewise.
9660 (more_qualified_p): Likewise.
9661
9662 * call.c (standard_conversion): Replace calls to
9663 cp_build_type_variant with cp_build_qualified_type. Use
9664 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9665 compare them. Use CP_TYPE_* macros to check qualifiers.
9666 (reference_binding): Likewise.
9667 (implicit_conversion): Likewise.
9668 (add_builtin_candidates): Likewise.
9669 (build_over_call): Likewise.
9670 * class.c (overrides): Compare all qualifiers, not just `const',
9671 on method declarations.
9672 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9673 (convert_pointer_to_real): Likewise.
9674 (type_promotes_to): Likewise.
9675 * decl.c (check_for_uninitialized_const_var): New function.
9676 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9677 (cp_finish_decl): Use check_for_uninitialized_const_var.
9678 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
9679 handle `restrict'.
9680 (grok_ctor_properties): Likewise.
9681 (grok_op_properties): Likewise.
9682 (start_function): Likewise.
9683 (rever_static_member_fn): Likewise.
9684 * decl2.c (grok_method_quals): Likewise.
9685 (grokfield): Likewise.
9686 * error.c (dump_readonly_or_volatile): Rename to ...
9687 (dump_qualifiers): New function. Handle `restrict'.
9688 (dump_type_real): Use it.
9689 (dump_aggr_type): Likewise.
9690 (dump_type_prefix): Likewise.
9691 (dump_type_suffix): Likewise.
9692 (dump_function_decl): Likewise.
9693 (cv_as_string): Likewise.
9694 * gxx.gperf: Add __restrict and __restrict__.
9695 * gxxint.texi: Document `u' as used for `__restrict', and a few
9696 other previously undocumented codes.
9697 * hash.h: Regenerated.
9698 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9699 (build_member_call): Likewise.
9700 (build_new_1): Likewise.
9701 * lex.c (init_parse): Add entry for RID_RESTRICT.
9702 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9703 (cp_type_qual_from_rid): Define.
9704 * lex.h (enum rid): Add RID_RESTRICT.
9705 * method.c (process_modifiers): Deal with `restrict'.
9706 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9707 * parse.c: Regenerated.
9708 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9709 (tsubst_aggr_type): Likewise.
9710 (tsubst): Likewise.
9711 (check_cv_quals_for_unify): Likewise.
9712 (unify): Likewise.
9713 * rtti.c (init_rtti_processing): Likewise.
9714 (build_headof): Likewise.
9715 (get_tinfo_var): Likewise.
9716 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
9717 (expand_class_desc): Likewise.
9718 (expand_attr_desc): Likewise.
9719 (synthesize_tinfo_fn): Likewise.
9720 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
9721 (get_matching_virtual): Likewise.
9722 (expand_upcast_fixups): Likewise.
9723 * sig.c (build_signature_pointer_or_reference_name): Take
9724 type_quals, not constp and volatilep.
9725 (build_signature_pointer_or_reference_type): Likewise.
9726 (match_method_types): More CP_TYPE_QUALS conversion, etc.
9727 (build_signature_pointer_constructor): Likewise.
9728 (build_signature_method_call): Likewise.
9729 * tree.c (build_cplus_array_type): Likewise.
9730 (cp_build_type_variant): Rename to ...
9731 (cp_build_qualified_type): New function. Deal with `__restrict'.
9732 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9733 (build_exception_variant): Likewise.
9734 (mapcar): Likewise.
9735 * typeck.c (qualif_type): Likewise.
9736 (common_type): Likewise.
9737 (comptypes): Likewise.
9738 (comp_cv_target_types): Likewise.
9739 (at_least_as_qualified_p): Define.
9740 (more_qualified_p): Likewise.
9741 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9742 (compparms): Likewise.
9743 (inline_conversion): Likewise.
9744 (string_conv_p): Likewise.
9745 (build_component_ref): Likewise.
9746 (build_indirect_ref): Likewise.
9747 (build_array_ref): Likewise.
9748 (build_unary_op): Likewise.
9749 (build_conditional_expr): Likewise.
9750 (build_static_cast): Likewise.
9751 (build_c_cast): Likewise.
9752 (build_modify_expr): Likewise.
9753 (convert_For_assignment): Likewise.
9754 (comp_ptr_ttypes_real): Likewise.
9755 (cp_type_quals): New function.
9756
9757 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9758
9759 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9760 (CP_TYPE_VOLATILE): Likewise.
9761 * decl.c (grokdeclarator): Use them.
9762 * tree.c (canonical_type_variant): Likewise.
9763
9764 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9765
9766 * parse.y (named_class_head): Push into class while parsing the
9767 base class list.
9768 * decl2.c (push_scope, pop_scope): New functions.
9769 * cp-tree.h: Declare them.
9770 * init.c (build_new_1): Delay cleanup until end of full expression.
9771
9772 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9773
9774 * typeck.c (build_component_ref): Use of a type here is an error.
9775
9776 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9777
9778 Revamp references to member functions.
9779 * method.c (hack_identifier): Call build_component_ref for a
9780 reference to a member function.
9781 * typeck.c (build_component_ref): Only return a single function
9782 if it's static. Otherwise, return a COMPONENT_REF.
9783 (build_x_function_call): Handle a COMPONENT_REF.
9784 (build_unary_op): Handle all unknown-type things.
9785 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9786 * class.c (instantiate_type): Complain if the function we get is a
9787 nonstatic member function. Remove code for finding "compatible"
9788 functions.
9789 * pt.c (tsubst_copy): Handle NOP_EXPR.
9790 * tree.c (build_dummy_object): New fn.
9791 (maybe_dummy_object): New fn.
9792 (is_dummy_object): New fn.
9793 * cp-tree.h: Declare them.
9794 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9795 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9796 * init.c (build_member_call): Use maybe_dummy_object and
9797 is_dummy_object.
9798 (build_offset_ref): Use maybe_dummy_object.
9799 (resolve_offset_ref): Use is_dummy_object.
9800 * typeck.c (build_x_function_call): Call build_dummy_object.
9801 (unary_complex_lvalue): Call is_dummy_object.
9802
9803 * typeck.c (build_component_addr): Make sure field is a field.
9804
9805 * call.c (build_new_op): Delete obsolete code.
9806
9807 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9808
9809 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9810
9811 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9812 std if std is ignored.
9813
9814 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9815
9816 * decl.c (grokvardecl): Fix thinko.
9817
9818 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9819 not the left.
9820
9821 * parse.y (fn.def2): Fix 'attrs' format.
9822
9823 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9824
9825 * Makefile.in (CONFLICTS): Update.
9826 * parse.y (expr_or_declarator_intern): New rule.
9827 (expr_or_declarator, direct_notype_declarator, primary,
9828 functional_cast): Use it.
9829 (notype_declarator_intern): New rule.
9830 (notype_declarator, complex_notype_declarator): Use it.
9831
9832 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9833
9834 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9835 (grokvardecl): Likewise.
9836
9837 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9838
9839 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9840 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9841
9842 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9843
9844 * pt.c (process_partial_specialization): Cast 1st argument of
9845 `bzero' to (PTR).
9846
9847 * tree.c (build_base_fields): Cast `base_align' to (int) when
9848 comparing against one.
9849
9850 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9851
9852 * decl.c (lookup_name_real): Handle template parameters for member
9853 templates where said parameters have the same name as the
9854 surrounding class.
9855
9856 * decl.c (expand_static_init): Build cleanups before entering the
9857 anonymous function used to do them to avoid access-checking
9858 confusion.
9859
9860 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9861 accidentally removed by previous change, and make DECL_RTL here.
9862 * class.c (add_method): Don't make DECL_RTL here.
9863
9864 * pt.c (for_each_template_parm): Don't examine uninstantiated
9865 default arguments.
9866
9867 1998-10-16 Dave Brolley <brolley@cygnus.com>
9868
9869 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9870
9871 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9872
9873 * class.c (add_method): Fix documentation to reflect previous
9874 changes. Check for duplicate method declarations here.
9875 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9876 correctly; such things never match.
9877 (grokfndecl): Don't look for duplicate methods here.
9878 * decl2.c (check_classfn): Don't assume names are mangled.
9879 Don't add bogus member function declarations to a class before the
9880 class type is complete.
9881 (grokfield): Reformat error message.
9882 * method.c (set_mangled_name_for_decl): Don't mangle names while
9883 processing_template_decl.
9884
9885 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9886
9887 * typeck.c (build_indirect_ref): Complain about a pointer to data
9888 member, too.
9889 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9890 data member.
9891 * init.c (resolve_offset_ref): Don't undo the above.
9892
9893 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9894 (struct lang_decl_flags): Add `bitfield'.
9895 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9896 DECL_BIT_FIELD.
9897 * decl2.c (grokbitfield, grok_alignof): Likewise.
9898 * init.c (build_offset_ref): Likewise.
9899 * typeck.c (build_component_addr, expr_sizeof): Likewise.
9900 * cvt.c (build_up_reference): Don't crash if taking the address
9901 returns error_mark_node.
9902
9903 * decl.c (grokfndecl): Also check ctype when checking for ::main().
9904
9905 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
9906
9907 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9908 Do mangling here.
9909 (grokdeclarator): Instead of here.
9910 * friend.c (do_friend): Lose special handling of ::main and
9911 __builtin_*.
9912 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9913
9914 * spew.c (yylex): Clear looking_for_typename if we got
9915 'enum { ... };'.
9916
9917 1998-10-15 Mark Mitchell <mark@markmitchell.com>
9918
9919 * class.c (maybe_warn_about_overly_private_class): Improve error
9920 messages for class with only private constructors.
9921
9922 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9923 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9924 (build_typename_type): New function.
9925 * decl.c (build_typename_type): Broken out from ...
9926 (make_typename_type): Use it.
9927 * search.c (lookup_field): Likewise.
9928
9929 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9930
9931 * pt.c (convert_nontype_argument): Check against type_referred_to.
9932 * decl.c (grokvardecl): Check for declarator name before building
9933 DECL_ASSEMBLER_NAME.
9934
9935 1998-10-14 Mark Mitchell <mark@markmitchell.com>
9936
9937 * pt.c (lookup_template_class): Add comment.
9938 (instantiate_class_template): Don't mark the _TYPE node for
9939 member class templates as an instantiation.
9940
9941 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
9942
9943 * decl.c (grokfndecl): Fix my thinko.
9944
9945 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
9946
9947 * tinfo2.cc (fast_compare): Remove.
9948 (before): Just use strcmp.
9949 * tinfo.cc (operator==): Just use strcmp.
9950
9951 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9952
9953 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9954 declarations.
9955
9956 1998-10-13 Mark Mitchell <mark@markmitchell.com>
9957
9958 * cp-tree.h (specializations_of_same_template_p): Remove.
9959 * search.c (get_template_base): Don't use it.
9960 (get_template_base_recursive): Likewise.
9961 * pt.c (specializations_of_same_template_p): Remove.
9962 (unify): Don't use it.
9963 (lookup_template_class): Find the correct parent when setting
9964 CLASSTYPE_TI_TEMPLATE.
9965
9966 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9967
9968 * tinfo.cc (operator==): Always compare names.
9969
9970 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9971
9972 * decl.c (start_function): Fix cut-and-paste error.
9973
9974 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9975
9976 * inc/typeinfo: Add #pragma interface.
9977 (operator!=): Just call operator==.
9978 * tinfo.cc: Add #pragma implementation.
9979 (operator==): Move from inc/typeinfo and tinfo2.cc.
9980 Check __COMMON_UNRELIABLE instead of _WIN32.
9981
9982 * typeck2.c (my_friendly_abort): Add URL.
9983
9984 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9985
9986 * decl.c (start_method): Added extra parameter for attributes.
9987 * cp-tree.h (start_method): Update prototype.
9988 * parse.y (fn.def2): Update start_method parameter list.
9989
9990 1998-10-11 Mark Mitchell <mark@markmitchell.com>
9991
9992 * cp-tree.h (specializations_of_same_template_p): Declare.
9993 * pt.c (specializations_of_same_template_p): New function.
9994 (unify): Use it.
9995 * search.c (get_template_base): Use it.
9996 (get_template_base_recursive): Likewise.
9997
9998 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
9999
10000 * decl2.c (start_objects): Add new variable `joiner' and
10001 initialize it properly.
10002
10003 1998-10-09 Mark Mitchell <mark@markmitchell.com>
10004
10005 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
10006 change to vtable types.
10007
10008 * cvt.c (ocp_convert): Avoid infinite recursion caused by
10009 1998-10-03 change.
10010
10011 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
10012
10013 * pt.c (resolve_overloaded_unification): New fn.
10014 (try_one_overload): Likewise.
10015 (unify): Don't fail on unknown type.
10016 (type_unification_real): Likewise. Use resolve_overloaded_unification
10017 to handle an overloaded argument.
10018 (template_args_equal): Split out...
10019 (comp_template_args): From here.
10020 (determine_specialization): Also allow a template with more
10021 parms than were explicitly specified.
10022 * cp-tree.h: Add template_args_equal.
10023 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
10024
10025 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
10026
10027 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
10028 change.
10029
10030 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
10031
10032 * typeck.c (unsigned_type): Only return TItype nodes when
10033 HOST_BITS_PER_WIDE_INT is >= 64 bits.
10034 (signed_type): Likewise.
10035 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
10036 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10037 (init_decl_processing): Only create TItype nodes when
10038 HOST_BITS_PER_WIDE_INT is >= 64 bits.
10039 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
10040 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10041
10042 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10043
10044 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
10045 (gxx.gperf): Update comments describing invocation flags.
10046 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
10047
10048 1998-10-07 Mark Mitchell <mark@markmitchell.com>
10049
10050 * class.c (finish_struct_1): Add commentary on previous change.
10051
10052 * cp-tree.h (vtbl_ptr_type_node): New variable.
10053 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
10054 already of the right type.
10055 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
10056 Simplify code to grow vtable.
10057 * decl.c (vtbl_ptr_type_node): Define.
10058 (init_decl_processing): Initialize it.
10059
10060 1998-10-06 Mark Mitchell <mark@markmitchell.com>
10061
10062 * cp-tree.def (PTRMEM_CST): New tree node.
10063 * cp-tree.h (ptrmem_cst): New type.
10064 (lang_type): Remove local_typedecls.
10065 (dummy): Increase to 12 bits from 11.
10066 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
10067 (PTRMEM_CST_CLASS): New macro.
10068 (PTRMEM_CST_MEMBER): Likewise.
10069 (current_access_specifier): New variable.
10070 (current_class_type): Remove duplicate declaration.
10071 (finish_struct): Change prototype.
10072 (unreverse_member_declarations): New function.
10073 (pushdecl_class_level): Change prototype.
10074 (grok_enum_decls): Remove.
10075 (fixup_anonymous_union): New function.
10076 (grok_x_components): Change prototype.
10077 (tsubst_chain): Remove.
10078 (finish_member_template_decl): Likewise.
10079 (check_explicit_specialization): Fix indentation.
10080 (finish_class_definition): Change prototype.
10081 (finish_member_class_template): Likewise.
10082 (finish_member_declaration): New function.
10083 (check_multiple_declarators): Likewise.
10084 * class.c (class_stack_node_t): New type.
10085 (current_class_base): Remove.
10086 (current_class_stack): Change type.
10087 (current_access_specifier): New variable.
10088 (grow_method): Remove.
10089 (check_member_decl_is_same_in_complete_scope): Break out from
10090 finish_struct.
10091 (make_method_vec): New function.
10092 (free_method_vec): Likewise.
10093 (add_implicitly_declared_members): Break out from finish_struct_1.
10094 (free_method_vecs): New variable.
10095 (add_method): Rework for direct use from parser.
10096 (handle_using_decl): Watch for NULL_TREE while iterating through
10097 CLASSTYPE_METHOD_VEC.
10098 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10099 just do some error-checking.
10100 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10101 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
10102 (finish_struct): Change prototype. Simplify; fields and methods
10103 are already set up at this point.
10104 (init_class_processing): Set up current_class_stack.
10105 (pushclass): Save current_access_specifier.
10106 (popclass): Restore it.
10107 (currently_open_class): Simplify.
10108 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10109 * decl.c (saved_scope): Add access_specifier.
10110 (maybe_push_to_top_level): Save it.
10111 (pop_from_top_level): Restore it.
10112 (maybe_process_template_type_declaration): Use
10113 finish_member_declaration.
10114 (pushtag): Likewise.
10115 (pushdecl_class_level): Don't return a value.
10116 (fixup_anonymous_union): Break out from grok_x_components.
10117 (shadow_tag): Use it.
10118 (xref_tag): Complain about using an elaborated type specifier to
10119 reference a template type parameter or typedef name.
10120 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10121 (current_local_enum): Remove.
10122 (build_enumerator): Call finish_member_declaration.
10123 (grok_enum_decls): Remove.
10124 * decl2.c (grok_x_components): Simplify.
10125 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10126 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10127 (merge_functions): Add to comment.
10128 (arg_assoc_type): Prototype.
10129 (arg_assoc): Pass as many arguments as there are parameters.
10130 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
10131 OFFSET_REF.
10132 * expr.c (cpls_expand_expr): Remove dead code. Handle
10133 PTRMEM_CST.
10134 * friend.c (do_friend): Lookup friends when in nested classes.
10135 Change comments.
10136 * init.c (build_offset_ref): Do lookup even for classes that are
10137 only partially defined.
10138 (decl_constant_value): Remove dead code.
10139 * method.c (build_overload_value): Remove hack where by TYPE was
10140 not a TYPE. Handle PTRMEM_CST.
10141 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10142 should go.
10143 * parse.y (components, notype_components, component_decl,
10144 component_decl_1, component_declarator, component_declarator0):
10145 Now all are itype rather than ttype. Rework to add members to
10146 classes on the fly.
10147 (typesqpecqual_reserved): Use check_multiple_declarators.
10148 (structsp): Update class to finish_class_definition.
10149 (do_xref_defn): Unsplit into named_class_head.
10150 (access_specifier): Set current_access_specifier.
10151 * pt.c (set_current_access_from_decl): New function.
10152 (finish_member_template_decl): Don't take the parameters.
10153 (comp_template_args): Make more robust.
10154 (lookup_template_class): Don't use current_local_enum.
10155 (for_each_template_parm): Handle PTRMEM_CST.
10156 (instantiate_class_template): Use set_current_access_from_decl,
10157 finish_member_declaration and unreverse_member_declarations. Set
10158 lineno/input_filename before generating implicit member functions.
10159 (type_unification_real): Don't assume back-unification happens
10160 only for the last argument.
10161 (regenerate_decl_from_template): Call pushclass a bit earlier.
10162 (tsubst_chain): Remove.
10163 (tsubst_enum): Use set_current_access_from_decl.
10164 (set_mangled_name_for_template_decl): Fix indentation.
10165 * search.c (lookup_fnfields_1): Change iteration through
10166 CLASSTYPE_METHOD_VEC.
10167 (dfs_pushdecls): Likewise.
10168 (dfs_compress_decls): Likewise.
10169 (add_conversions): Likewise.
10170 * semantics.c (finish_class_definition): Don't take components.
10171 Change call to finish_struct.
10172 (finish_member_declaration): New function.
10173 (finish_member_class_template): Don't take template parameters.
10174 Change call to grok_x_components. Call finish_member_template_decl.
10175 (check_multiple_declarators): New function.
10176 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10177 a passed in fieldlist.
10178 * tree.c (search_tree): Handle PTRMEM_CST.
10179 (mapcar): Likewise.
10180 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10181 INTEGER_CSTs, for pointer-to-data members.
10182
10183 * call.c (resolve_args): Resolve template specializations, if
10184 possible.
10185
10186 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10187
10188 * Makefile.in (spew.o): Depend on toplev.h.
10189
10190 * call.c (compare_ics): Initialize variables `deref_from_type2',
10191 `deref_to_type1' and `deref_to_type2'.
10192
10193 * except.c (get_eh_type): Hide prototype and definition.
10194 (process_start_catch_block_old): Remove unused static prototype.
10195
10196 * pt.c (tsubst_decl): Initialize variable `argvec'.
10197
10198 * spew.c: Include toplev.h.
10199
10200 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
10201
10202 * pt.c (instantiate_decl): Do save and restore file position.
10203
10204 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
10205
10206 * method.c (build_decl_overload_real): Clear
10207 numeric_output_need_bar after __.
10208
10209 1998-10-05 Nathan Sidwell <nathan@acm.org>
10210
10211 * call.c (build_new_method_call): Issue 'incomplete type' error,
10212 if class is not defined.
10213
10214 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10215
10216 * call.c (build_object_call): Move declaration of variable
10217 `fn' into the scope where it is used. Don't access variable
10218 `fn' when it is uninitialized, instead use `fns'.
10219
10220 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10221
10222 * errfn.c (cp_thing): Print buf as a string not as a printf format
10223 to avoid problems with the operator%. Consequently, `%%' sequences
10224 in format are copied as `%' in buf.
10225
10226 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
10227
10228 * pt.c (pop_tinst_level): Call extract_interface_info.
10229 (instantiate_decl): Don't save and restore file position.
10230
10231 * decl.c (cp_finish_decl): Make statics in extern inlines and
10232 templates common, if possible and the target doesn't support weak
10233 symbols.
10234
10235 * decl.c (grokdeclarator): Remove redundant calls to
10236 build_type_variant and some duplicated code.
10237 * sig.c (build_signature_reference_type): Only take the type parm.
10238 (build_signature_pointer_type): Likewise.
10239 * tree.c (build_cplus_method_type): Adjust.
10240 * cp-tree.h: Update.
10241
10242 1998-10-04 Mark Mitchell <mark@markmitchell.com>
10243
10244 * call.c (build_over_call): Make pedwarns about dropped qualifiers
10245 into full-fledged errors.
10246 * cvt.c (convert_to_reference): Likewise.
10247 * typeck.c (convert_for_assignment): Likewise.
10248
10249 * search.c (expand_upcast_vtables): In addition to unsetting
10250 TREE_READONLY, remove top-level const type qualifier.
10251
10252 1998-10-03 Mark Mitchell <mark@markmitchell.com>
10253
10254 * class.c (current_class_ptr, current_class_ref): Clarify
10255 documentation.
10256 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10257 NOP type conversions.
10258 * decl.c (decls_match): Use comptypes directly; ignore
10259 qualifiers on the DECL.
10260 (duplicate_decls): Remove qualifier checks on DECL.
10261 (grokdeclarator): Make the type built up include top-level
10262 qualifiers.
10263 * decl2.c (do_dtors): Fix spelling error.
10264 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10265 when printing type information.
10266 * init.c (build_new_1): Add documentation. Deal with the fact
10267 that type of allocated memory now contains qualifiers.
10268 * lex.c (is_global): Improve error-recovery.
10269 * sig.c (build_member_function_pointer): Don't cast away const
10270 on fields of sigtable_entry_type.
10271 * tree.c (lvalue_type): Don't look at top-level qualifiers on
10272 expressions.
10273 * typeck.c (decay_conversion): Likewise.
10274 (build_component_ref): Make sure the type of the COMPONENT_REF
10275 contains top-level qualifiers, as appropriate. Improve
10276 error-handling.
10277 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
10278 (build_array_ref): Likewise.
10279 (build_unary_op): Improve error-recovery.
10280 (unary_complex_lvalue): Make taking the address a bound member
10281 function an error, not a sorry.
10282 (build_conditional_expr): Look at the type qualifiers, not the
10283 qualifiers on the expression itself.
10284
10285 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
10286
10287 * decl2.c (merge_functions): Remove duplicates.
10288
10289 * decl2.c: Add -f{no-,}implicit-inline-templates.
10290 (import_export_decl): Check it.
10291
10292 * decl.c (lookup_name_real): Template parms also take precedence
10293 over implicit typename. Only warn if yylex.
10294
10295 * typeck.c (build_conditional_expr): Only fold if ifexp is an
10296 INTEGER_CST.
10297
10298 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10299 instead of linkage.
10300
10301 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
10302
10303 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10304 * class.c (build_vbase_pointer): Use it.
10305 * rtti.c (expand_class_desc): Likewise.
10306 * tree.c (build_vbase_pointer_fields): Likewise.
10307
10308 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
10309
10310 * decl.c (start_decl): Add invocation of
10311 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10312 (start_function): Add invocation of
10313 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10314
10315 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10316 HANDLE_GENERIC_PRAGMAS.
10317
10318 1998-09-28 Anthony Green <green@cygnus.com>
10319
10320 * semantics.c (finish_asm_stmt): Always permit volatile asms.
10321
10322 1998-09-28 Mark Mitchell <mark@markmitchell.com>
10323
10324 * decl.c (grokdeclarator): Tighten checks for invalid
10325 destructors. Improve error-messages and error-recovery.
10326 * decl2.c (check_classfn): Don't assume that mangled destructor
10327 names contain type information.
10328
10329 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
10330
10331 * search.c (get_base_distance): Remove assert.
10332
10333 * decl2.c (build_anon_union_vars): Don't process a field with no
10334 name.
10335 (finish_anon_union): Also complain about local anon unions with no
10336 members.
10337
10338 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10339
10340 * decl.c (lookup_namespace_name): If the name is a namespace,
10341 return it immediately.
10342
10343 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10344
10345 * cp-tree.h (define_case_label): Remove unused parameter.
10346 (check_java_method): Likewise.
10347 (grokclassfn): Likewise.
10348 (expand_aggr_init): Likewise.
10349 (build_x_delete): Likewise.
10350 (maybe_end_member_template_processing): Likewise.
10351 (unshare_base_binfos): Add prototype.
10352 (string_conv_p): Likewise.
10353 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10354
10355 * cvt.c (build_up_reference): Remove unused parameter
10356 `checkconst', all callers changed.
10357 (build_type_conversion): Mark parameter `code' with
10358 ATTRIBUTE_UNUSED.
10359 (build_expr_type_conversion): Initialize variable `conv'.
10360
10361 * decl.c (push_namespace): Initialize variable `d'.
10362 (define_case_label): Remove unused parameter `decl', all callers
10363 changed.
10364
10365 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10366 `argc' with ATTRIBUTE_UNUSED.
10367 (grokclassfn): Remove unused parameter `cname', all callers
10368 changed.
10369 (check_java_method): Likewise for parameter `ctype'.
10370 (copy_assignment_arg_p): Mark parameter `virtualp' with
10371 ATTRIBUTE_UNUSED.
10372 (finish_prevtable_vardecl): Likewise for parameter `prev'.
10373
10374 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10375
10376 * init.c (expand_aggr_init_1): Remove unused parameter
10377 `alias_this', all callers changed.
10378 (expand_aggr_init): Likewise.
10379 (expand_default_init): Likewise.
10380 (build_new_1): Initialize variable `susp'.
10381 (build_x_delete): Remove unused parameter `type', all callers
10382 changed.
10383
10384 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10385 ATTRIBUTE_UNUSED.
10386 (readescape): Use (unsigned) value in shift.
10387 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
10388 comparing to a signed quantity.
10389
10390 * pt.c (maybe_end_member_template_processing): Remove unused
10391 parameter `decl', all callers changed.
10392 (check_explicit_specialization): Add braces around empty body in
10393 an else-statement.
10394 (current_template_args): Initialize variable `args'.
10395 (lookup_template_class): Likewise for variable `prev_local_enum'.
10396 (tsubst_decl): Likewise for variable `r'.
10397 (set_mangled_name_for_template_decl): Initialize variable
10398 `context'.
10399
10400 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10401 Likewise for variable `i'.
10402 (yylex): Initialize variable `trrr'.
10403
10404 * typeck.c (compparms): Mark variable `strict' with
10405 ATTRIBUTE_UNUSED.
10406
10407 * xref.c (simplify_type): Cast argument of ctype function to
10408 `unsigned char'.
10409
10410 1998-09-24 Mark Mitchell <mark@markmitchell.com>
10411
10412 * cp-tree.h (language_lvalue_valid): Remove.
10413 * decl.c (grokdeclarator): Don't disallow references to functions.
10414 * tree.c (lvalue_p_1): New function, combining duplicated
10415 code from ...
10416 (lvalue_p): Use it.
10417 (real_lvalue_p): Likewise.
10418 * typeck.c (language_lvalue_valid): Remove.
10419 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10420 they don't have TREE_READONLY set.
10421 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10422
10423 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
10424
10425 * spew.c (yylex): Give diagnostic.
10426 * hash.h (is_reserved_word): Add export.
10427 * gxx.gperf: Likewise.
10428 * lex.h (rid): Add RID_EXPORT.
10429 * lex.c (init_parse): Likewise.
10430
10431 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10432
10433 * friend.c (do_friend): Make warning a full sentence.
10434
10435 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10436
10437 * parse.y (component_decl_list): Improve error-recovery.
10438
10439 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
10440
10441 * decl.c (make_typename_type): Move error to point where name
10442 variable can be used by dump_type.
10443
10444 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10445
10446 * decl.c (grokfndecl): Improve error-recovery.
10447 * decl2.c (grokfield): Likewise.
10448 * pt.c (finish_member_template_decl): Likewise.
10449
10450 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
10451
10452 * method.c (hack_identifier): Finding multiple members is always
10453 an error.
10454
10455 1998-09-21 Per Bothner <bothner@cygnus.com>
10456
10457 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
10458
10459 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
10460
10461 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10462
10463 1998-09-20 Mark Mitchell <mark@markmitchell.com>
10464
10465 * class.c (maybe_warn_about_overly_private_class): Reformat.
10466
10467 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
10468
10469 * exception.cc (__cplus_type_matcher): Realign some code.
10470
10471 1998-09-16 Mark Mitchell <mark@markmitchell.com>
10472
10473 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10474 (tinfo2.o): Likewise.
10475 (exception.o): Likewise.
10476 (new.o): Likewise.
10477 (opnew.o): Likewise.
10478 (opnewnt.o): Likewise.
10479 (opvnew.o): Likewise.
10480 (opvnewnt.o): Likewise.
10481 (opdel.o): Likewise.
10482 (opdelnt.o): Likewise.
10483 (opvdel.o): Likewise.
10484 (opvdelnt.o): Likewise.
10485
10486 1998-09-16 Richard Henderson <rth@cygnus.com>
10487
10488 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10489
10490 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
10491
10492 * call.c (build_field_call): Handle static data members too.
10493
10494 * typeck.c (comptypes): When comparing pointer types, check
10495 whether referred types match even in strictest modes.
10496
10497 1998-09-15 Mark Mitchell <mark@markmitchell.com>
10498
10499 * cp-tree.h: Revert previous change.
10500 (finish_struct_methods): Remove declaration.
10501 * class.c: Revert previous change.
10502 (maybe_warn_about_overly_private_class): New function.
10503 (finish_struct_methods): Declare here, and make static. Remove
10504 unnecessary parameters. Tidy slightly. Use
10505 maybe_warn_about_overly_private_class.
10506 (finish_struct_1): Adjust. Remove check for private constructors,
10507 now done elsewhere.
10508 (finish_struct): Adjust.
10509
10510 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10511
10512 * except.c (expand_start_catch_block): No need to check for new
10513 exception model.
10514 (process_start_catch_block_old): Deleted.
10515 (process_start_catch_block): Add call to start_decl_1().
10516 (expand_end_catch_block): Add call to end_catch_handler().
10517 * exception.cc (__cplus_type_matcher): Only check the exception
10518 language if there is an exception table.
10519
10520 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10521
10522 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10523 as used to prevent conflicts with virtual function tables.
10524
10525 1998-09-14 Mark Mitchell <mark@markmitchell.com>
10526
10527 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10528 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10529 * class.c (maybe_class_too_private_p): New function.
10530 (finish_struct_methods): Use it.
10531 (finish_struct_1): Likewise.
10532 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10533 appropriate.
10534
10535 * pt.c (check_specialization_scope): Fix spelling error.
10536 (check_explicit_specialization): Remove code to handle explicit
10537 specializations in class scope; they are now correctly diagnosed
10538 as errors.
10539
10540 1998-09-10 Mark Mitchell <mark@markmitchell.com>
10541
10542 * decl.c (pushdecl): Don't copy types if the
10543 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10544 type.
10545
10546 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10547
10548 * class.c (get_enclosing_class): New function.
10549 (is_base_of_enclosing_class): Likewise.
10550 * cp-tree.h (get_enclosing_class): Declare.
10551 (is_base_of_enclosing_class): Likewise.
10552 * pt.c (coerce_template_parms): Use them.
10553
10554 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
10555
10556 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10557 null to decide whether to use it.
10558
10559 * error.c (dump_type_real): Handle NAMESPACE_DECL.
10560 * parse.y (base_class.1): Avoid crash on error.
10561
10562 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10563
10564 * decl.c (make_typename_type): If context is a namespace, the code
10565 is in error.
10566
10567 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
10568
10569 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10570
10571 1998-09-08 Mark Mitchell <mark@markmitchell.com>
10572
10573 * cp-tree.h (anonymous_namespace_name): Declare.
10574 * decl.c: Define it.
10575 (push_namespace): Use anonymous_namespace_name, rather than local
10576 static anon_name.
10577 * error.c (dump_decl): If a namespace is named
10578 anonymous_namespace_name, call it {anonymous}.
10579
10580 * decl.c (grokparms): Distinguish between references and pointers
10581 in error message.
10582
10583 1998-09-08 Richard Henderson <rth@cygnus.com>
10584 Mark Mitchell <mark@markmitchell.com>
10585
10586 * pt.c (process_partial_specialization): Consistently allocate
10587 and zero tpd.parms based on ntparms. Use tpd2.parms, not
10588 tpd.parms, where appropriate.
10589
10590 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
10591
10592 * Makefile.in (INCLUDES): Update after recent toplevel gcc
10593 reorganizations.
10594
10595 1998-09-05 Mark Mitchell <mark@markmitchell.com>
10596
10597 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10598 * class.c (finish_struct): Remove hackery to deal with explicit
10599 specializations in class scope.
10600 * decl.c (grokfndecl): Improve error-recovery.
10601 * decl2.c (grokfield): Likewise.
10602 * pt.c (check_specialization_scope): New function.
10603 (begin_specialization): Call it.
10604 (process_partial_specialization): New function, split out from
10605 push_template_decl. Check partial specializations more
10606 stringently.
10607 (push_template_decl): Call it.
10608 (check_explicit_specialization): Don't attempt to handle explicit
10609 specializations in class scope.
10610 (template_parm_data): Document. Add current_arg and
10611 arg_uses_template_parms.
10612 (mark_template_parm): Set it.
10613 (tsubst_arg_types): Remove unused variable.
10614 * semantics.c (begin_class_definition): Tweak.
10615
10616 1998-09-04 Mark Mitchell <mark@markmitchell.com>
10617
10618 * inc/typeinfo (type_info::type_info(const char*)): Make
10619 `explicit'.
10620
10621 * cp-tree.h (hash_tree_cons_simple): New macro.
10622 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
10623 (coerce_template_parms): Use make_temp_vec, instead of
10624 make_tree_vec. Document this behavior.
10625 (lookup_template_class): Likewise.
10626 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10627 Remove dead code (and add assertion to check its deadness). Fix
10628 bug w.r.t. exception specifications.
10629
10630 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
10631
10632 * decl2.c (import_export_vtable): Always make artificials comdat.
10633 (import_export_decl): Likewise.
10634 * pt.c (mark_decl_instantiated): Likewise.
10635
10636 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10637
10638 * cp-tree.h (finish_globally_qualified_member_call_expr):
10639 Rename to ...
10640 (finish_qualified_call_expr).
10641 * semantics.c: Likewise.
10642 * parse.y (primary): Use it.
10643 * method.c (hack_identifier): Remove redundant code.
10644
10645 * init.c (resolve_offset_ref): Call convert_from_reference to
10646 handle members of reference type. Improve error recovery.
10647
10648 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
10649
10650 * cp-tree.h: Declare warn_nontemplate_friend.
10651 * decl2.c (lang_decode_option): Set.
10652 * lang-options.h: Add -Wnon-template-friend.
10653 * friend.c (do_friend): Use to toggle non-template function warning.
10654
10655 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10656
10657 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10658 corresponding INTEGER_CSTs when processing_template_decl.
10659 * pt.c (tsubst_enum): Tweak accordingly.
10660
10661 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10662
10663 * decl.c (pushdecl_class_level): Add warning here.
10664 (pushdecl): Tweak.
10665
10666 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
10667
10668 * cvt.c (convert_pointer_to_real): Tidy.
10669 * search.c (get_base_distance_recursive): Simplify.
10670 (get_base_distance): Likewise.
10671
10672 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10673 parms.
10674
10675 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
10676
10677 * lex.c (check_newline): Call HANDLE_PRAGMA before
10678 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
10679 if unknown pragmas are encountered.
10680 (handle_sysv_pragma): Interpret return code from
10681 handle_pragma_token (). Return success/failure indication rather
10682 than next unprocessed character.
10683 (pragma_getc): New function: retrieves characters from the
10684 input stream. Defined when HANDLE_PRAGMA is defined.
10685 (pragma_ungetc): New function: replaces characters back into the
10686 input stream. Defined when HANDLE_PRAGMA is defined.
10687
10688 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10689
10690 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10691 * class.c (build_vtable_entry_ref): Likewise.
10692
10693 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10694
10695 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10696 * decl2.c (import_export_decl): Likewise.
10697 * pt.c (instantiate_decl): Use it.
10698
10699 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10700
10701 * decl.c (lookup_name_real): Also do implicit typename thing for
10702 artificial TYPE_DECLs.
10703 * search.c (lookup_field): Likewise.
10704 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10705 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10706 (enter_scope_of): Extract type from implicit typename.
10707 (begin_class_definition): Likewise.
10708 * lex.c (identifier_type): Handle implicit typename when checking
10709 for SELFNAME.
10710
10711 * cp-tree.h: Declare flag_strict_prototype.
10712 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10713 -fstrict-prototype.
10714 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10715 specified, set it to the value of pedantic.
10716
10717 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10718
10719 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10720
10721 1998-08-31 Mark Mitchell <mark@markmitchell.com>
10722
10723 * decl.c (finish_enum): Handle member enums of classes declared in
10724 template functions.
10725
10726 * decl2.c (grok_x_components): Strip attributes before calling
10727 groktypename.
10728
10729 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
10730
10731 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10732 -fenum-int-equivalence and -fno-nonnull-objects.
10733 * class.c (check_for_override): Remove support for -fall-virtual.
10734 (finish_struct_1): Likewise.
10735 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10736 * typeck.c (build_binary_op_nodefault): Likewise.
10737 * cvt.c (ocp_convert): Likewise.
10738 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10739 * class.c (build_vbase_path): Likewise.
10740
10741 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10742
10743 * Makefile.in (INTERFACE): New, set to 1.
10744
10745 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10746
10747 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10748 comparing with global_namespace.
10749 (dump_aggr_type): Likewise.
10750
10751 * decl.c (grokfndecl): Issue error on declaration of friend
10752 templates with explicit template arguments.
10753
10754 * pt.c (convert_template_argument): New function, split out
10755 from...
10756 (coerce_template_parms): Here.
10757 (tsubst): Attempt better error-recovery.
10758
10759 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10760
10761 * pt.c (decl_template_parm_p): Add checks for
10762 TEMPLATE_TEMPLATE_PARM.
10763
10764 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10765
10766 * lex.c (do_identifier): Fix thinko in previous change.
10767
10768 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10769
10770 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10771 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10772
10773 1998-08-28 Richard Henderson <rth@cygnus.com>
10774
10775 Add support for discarding unused virtual functions.
10776 * lang-options.h: Add -fvtable-gc.
10777 * cp-tree.h: Add flag_vtable_gc.
10778 * decl2.c (output_vtable_inherit): New fn.
10779 (finish_vtable_vardecl): Call it.
10780 * class.c (build_vtable_entry_ref): New fn.
10781 (build_vtbl_ref): Call it.
10782
10783 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10784
10785 * cp-tree.h (build_enumerator): Take the enumeration type as a
10786 parameter.
10787 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10788 enumeration constant values if we're processing_template_decls.
10789 Don't set the type for the CONST_DECLs either; that's done in
10790 build_enumerator.
10791 (build_enumerator): Take the enumeration type as a
10792 parameter.
10793 * lex.c (do_identifier): Don't resolve enumeration constants while
10794 processing template declarations, even if they happen to be
10795 TEMPLATE_PARM_INDEXs.
10796
10797 * parse.y (current_enum_type): New variable.
10798 (primary): Don't allow statement-expression in local classes just
10799 as we don't in global classes.
10800 (structsp): Use current_enum_type.
10801 (enum_list): Likewise.
10802 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10803 finish_enum; they no longer occur.
10804
10805 * cp-tree.h (finish_base_specifier): New function.
10806 * parse.y (base_class): Use it.
10807 * semantics.c (finish_base_specifier): Define it.
10808
10809 * parse.y (structsp): Warn on use of typename outside of template
10810 declarations.
10811
10812 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10813
10814 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10815 * lang-options.h: Remove +e options.
10816 * decl2.c (lang_decode_option): Likewise.
10817 (import_export_vtable): Don't check write_virtuals.
10818 (finish_vtable_vardecl, finish_file): Likewise.
10819 * search.c (dfs_debug_mark): Likewise.
10820 * semantics.c (begin_class_definition): Likewise.
10821 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10822
10823 * call.c (build_over_call): Check flag_elide_constructors.
10824 * decl2.c: flag_elide_constructors defaults to 1.
10825 * typeck.c (convert_arguments): Remove return_loc parm.
10826 (build_function_call_real): Adjust.
10827
10828 * search.c: Tear out all mi_matrix and memoize code.
10829 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10830 * lang-options.h: Remove documentation for -fhandle-exceptions,
10831 -fmemoize-lookups and -fsave-memoized.
10832 * cp-tree.h: Lose mi_matrix and memoize support.
10833 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10834 * class.c: Lose struct class_level.
10835 (pushclass, popclass): Lose memoize support.
10836 * init.c (build_offset_ref): Likewise.
10837
10838 Never change BINFO_INHERITANCE_CHAIN.
10839 * init.c (emit_base_init): Change modification of
10840 BINFO_INHERITANCE_CHAIN to an assert.
10841 * search.c (get_base_distance_recursive): Likewise.
10842 (get_base_distance): Likewise.
10843 (lookup_member): Likewise.
10844 (convert_pointer_to_single_level): Likewise.
10845 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10846 (lookup_fnfields): Likewise.
10847 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10848 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10849 (layout_basetypes): Call propagate_binfo_offsets instead of
10850 unshare_base_binfos.
10851 * decl.c (xref_basetypes): Call unshare_base_binfos.
10852 * pt.c (instantiate_class_template): Likewise.
10853 * tree.c (reverse_path): Remove 'copy' parm; always make a
10854 temporary copy.
10855 * class.c (build_vbase_path): Just call it.
10856 * search.c (compute_access): Likewise. Don't re-reverse.
10857
10858 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10859
10860 * class.c (build_vbase_path): Use reverse_path.
10861 (finish_base_struct): Move warnings for inaccessible bases to
10862 layout_basetypes.
10863 (modify_one_vtable): Remove check of TREE_USED (binfo).
10864 (fixup_vtable_deltas1): Likewise.
10865 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10866 (xref_tag): Remove binfos parameter.
10867 (make_binfo): Remove chain parameter.
10868 (reverse_path): Add copy parameter.
10869 * decl.c (init_decl_processing): Change calls to xref_tag.
10870 (xref_tag): Remove binfos parameter.
10871 (xref_basetypes): Change calls to make_binfo.
10872 * decl2.c (grok_x_components): Change calls to xref_tag.
10873 (handle_class_head): Likewise.
10874 * friend.c (do_friend): Likewise.
10875 * lex.c (make_lang_type): Change calls to make_binfo.
10876 * parse.y (structsp): Change calls to xref_tag.
10877 (named_complex_class_head_sans_basetype): Likewise.
10878 (named_class_head): Likewise.
10879 * rtti.c (init_rtti_processing): Likewise.
10880 * search.c (compute_access): Change calls to reverse_path.
10881 (dfs_get_vbase_types): Change calls to make_binfo.
10882 (get_vbase_types): Remove dead code.
10883 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10884 (layout_basetypes): Warn here about inaccessible bases.
10885 (make_binfo): Remove chain parameter.
10886 (reverse_path): Add copy parameter.
10887
10888 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10889
10890 * class.c: #if 0 complete_type_p.
10891 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10892 * method.c (process_overload_item): Likewise.
10893 * typeck.c (comp_target_types): Likewise.
10894
10895 Stop sharing binfos for indirect virtual bases.
10896 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10897 (layout_basetypes): Likewise.
10898 (unshare_base_binfos): Copy vbases, too.
10899 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10900 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10901 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10902 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10903 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10904 reference to BINFO_VIA_PUBLIC.
10905 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10906 (push_class_decls): Use them.
10907 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10908 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10909
10910 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10911
10912 * decl.c (build_enumerator): Set DECL_CONTEXT for the
10913 CONST_DECLs.
10914
10915 1998-08-26 Mark Mitchell <mark@markmitchell.com>
10916
10917 * cp-tree.h (finish_enum): Change prototype.
10918 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10919 VALUES parameter. Don't try to compute mins/maxs if
10920 processing_template_decl.
10921 * parse.y (structsp): Use new calling sequence for finish_enum.
10922 * pt.c (tsubst_enum): Likewise. Take the new type as input.
10923 (lookup_template_class): Remove unused variables. Tweak.
10924 Register enums on instantiation list before substituting
10925 enumeration constants.
10926 (tsubst_decl): Remove unused variables.
10927 (regenerate_decl_from_template): Likewise.
10928
10929 * decl.c (duplicate_decls): Don't obliterate the
10930 DECL_TEMPLATE_INFO for a template if we're not replacing it with
10931 anything.
10932
10933 * lex.c (do_identifier): Fix typo in comment.
10934
10935 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10936
10937 * errfn.c: Remove stdarg.h/varargs.h.
10938 * tree.c: Likewise.
10939
10940 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
10941
10942 * pt.c (tsubst_copy): Only do typename overloading on an
10943 IDENTIFIER_NODE that happens to look like a typename if it actually
10944 has a type for us to use.
10945
10946 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10947
10948 * typeck.c (comp_cv_target_types): Split out...
10949 (comp_target_types): From here. Don't allow cv-qual changes under
10950 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
10951 (build_ptrmemfunc): Pass 1 to nptrs.
10952 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10953
10954 1998-08-25 Mark Mitchell <mark@markmitchell.com>
10955
10956 * search.c (dependent_base_p): Don't compare a binfo to
10957 current_class_type; use the TREE_TYPE of the binfo instead.
10958
10959 * cp-tree.h (CLASS_TYPE_P): Revise definition.
10960
10961 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10962
10963 * decl.c (duplicate_decls): Don't complain about different
10964 exceptions from an internal decl even if pedantic.
10965
10966 * typeck.c (convert_for_assignment): Converting from pm of vbase
10967 to derived is an error, not a sorry.
10968
10969 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10970 * class.c (fixed_type_or_null): Rename from
10971 resolves_to_fixed_type_p. Return the dynamic type of the
10972 expression, if fixed, or null.
10973 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
10974 does not match the static type.
10975 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
10976 resolves_to_fixed_type_p again.
10977
10978 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10979
10980 * pt.c (tsubst_decl): Move special case code for dealing with
10981 tricky friend templates here from ...
10982 (regenerate_decl_from_template): Here.
10983
10984 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10985
10986 * decl.c (start_decl): Remove redundant linkage check.
10987
10988 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
10989
10990 * typeck.c (c_expand_return): Handle the case that valtype
10991 is wider than the functions return type.
10992
10993 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10994
10995 * cp-tree.h (CLASS_TYPE_P): New macro.
10996 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10997 * pt.c (process_template_parm): Undo previous change.
10998
10999 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
11000
11001 * cp-tree.h: Declare.
11002 * pt.c (decl_template_parm_p): New function.
11003 * decl.c (pushdecl): Check decls for redeclaring template parms.
11004 (xref_tag): Make redeclaration an error, print decl.
11005 * decl2.c (grokfield): Check field_decls for redeclaration as well.
11006
11007 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
11008
11009 * parse.y (primary): Fix up the type of string constants.
11010
11011 1998-08-24 Mark Mitchell <mark@markmitchell.com>
11012
11013 * typeck.c (convert_for_initialization): Move check for odd uses
11014 of NULL to avoid duplicate warnings.
11015
11016 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
11017
11018 * tree.c (lvalue_type): Fix for arrays.
11019 * typeck.c (string_conv_p): New fn.
11020 (convert_for_assignment): Use it.
11021 (build_unary_op): Use lvalue_type.
11022 * call.c (standard_conversion, convert_like): Use string_conv_p.
11023 (add_function_candidate): Use lvalue_type.
11024 * cvt.c (convert_to_reference): Likewise.
11025 * decl2.c (lang_decode_option): Ignore -traditional.
11026 * decl.c (init_decl_processing): flag_writable_strings inhibits
11027 flag_const_strings.
11028
11029 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
11030
11031 * lang-options.h (lang_options): Add fconst-strings to the list
11032 of valid options.
11033 * decl2.c (lang_f_options, lang_decode_option): Likewise.
11034
11035 1998-08-24 Nathan Sidwell <nathan@acm.org>
11036
11037 * lex.c (real_yylex): Don't warn about long long constants if
11038 we're allowing long long.
11039
11040 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11041
11042 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
11043 accessing bindings directly.
11044
11045 * search.c (my_tree_cons): Reimplement.
11046
11047 * lang-specs.h: Remove __HONOR_STD.
11048 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
11049
11050 1998-08-23 Mark Mitchell <mark@markmitchell.com>
11051
11052 * decl.c (grokdeclarator): Complain about in-class initialization
11053 of aggregates and/or references.
11054 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
11055 TEMPLATE_TYPE_PARMs.
11056
11057 * decl2.c (grok_array_decl): Add comment.
11058 (mark_used): Don't instantiate an explicit instantiation.
11059 * friend.c (make_friend_class): Remove bogus comment. Fix check
11060 for partial specializations.
11061 * pt.c (check_explicit_specialization): Don't
11062 SET_DECL_EXPLICIT_INSTANTIATION here.
11063 (mark_decl_instantiated): Or here.
11064 (do_decl_instantiation): Do it here, instead. Add checks for
11065 duplicate explicit instantiations, etc. Tidy.
11066 (do_type_instantiation): Likewise.
11067 (instantiate_decl): Improve comments. Complain about explicit
11068 instantiations where no definition is available.
11069
11070 * cp-tree.h (ansi_null_node): Remove.
11071 * call.c (build_over_call): Warn about converting NULL to an
11072 arithmetic type.
11073 * cvt.c (build_expr_type_conversion): Likewise. Use
11074 null_ptr_cst_p instead of expanding it inline.
11075 * decl.c (ansi_null_node): Remove.
11076 (init_decl_processing): Make null_node always have integral type.
11077 * except.c (build_throw): Warn about converting NULL to an
11078 arithmetic type.
11079 * lex.c (init_parse): Remove handling of ansi_null_node.
11080 * pt.c (type_unification_real): Don't convert NULL to void* type.
11081 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
11082 (convert_for_assignment): Warn about converting NULL to an
11083 arithmetic type.
11084 (convert_for_initialization): Likewise.
11085
11086 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
11087
11088 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
11089 * pt.c (coerce_template_parms): Use no_linkage_check.
11090 * decl.c (grokvardecl): Likewise.
11091 (grokfndecl): Likewise. Members of anonymous types have no linkage.
11092
11093 * method.c (process_overload_item): Remove useless code.
11094
11095 1998-08-20 Per Bothner <bothner@cygnus.com>
11096
11097 Handle new'ing of Java classes.
11098 * init.c (build_class_classref): New function.
11099 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
11100 constructor does not return this; don't need to exception-protect.
11101
11102 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
11103 * decl2.c (acceptable_java_type): Handle template-derived types.
11104
11105 1998-08-20 Per Bothner <bothner@cygnus.com>
11106
11107 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
11108
11109 1998-08-20 Mark Mitchell <mark@markmitchell.com>
11110
11111 * decl.c (duplicate_decls): Always merge the old and new patterns
11112 for templates, regardless of whether or not the new one has
11113 DECL_INITIAL. Don't throw away specializations. Merge
11114 DECL_SAVED_TREE.
11115 * pt.c (tsubst_decl): Use the right pattern when calculating the
11116 complete args for a new template instance.
11117 (do_decl_instantiation): Fix typo in comment.
11118 (regenerate_decl_from_template): Deal with tricky friend template
11119 case.
11120 (instantiate_decl): Likewise.
11121
11122 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
11123
11124 * init.c (build_builtin_delete_call): Add missing assemble_external
11125 call.
11126
11127 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
11128
11129 * parse.y (notype_unqualified_id): Also accept ~A<int>.
11130
11131 1998-08-19 Mark Mitchell <mark@markmitchell.com>
11132
11133 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11134 arithmetic.
11135 * except.c (build_throw): Warn when NULL is thrown, even with
11136 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
11137 thrown expression.
11138
11139 * cp-tree.h (ansi_null_node): New variable.
11140 * decl.c (ansi_null_node): New variable.
11141 (init_decl_processing): Initialize its type.
11142 * lex.c (init_parse): Initialize its value. Use ansi_null_node
11143 for null_node in non-ANSI mode.
11144 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11145 place of null_node to avoid spurious errors.
11146
11147 1998-08-17 Mark Mitchell <mark@markmitchell.com>
11148
11149 * cp-tree.h (enter_scope_of): New function.
11150 * parse.y (complex_direct_notype_declarator): Use it.
11151 * semantics.c (enter_scope_of): New function.
11152
11153 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
11154
11155 * decl.c (grokparms): No, here.
11156
11157 * decl.c (grokdeclarator): Catch parm with pointer to array of
11158 unknown bound here...
11159 * method.c (process_overload_item): ...not here.
11160
11161 * gxxint.texi: Remove obsolete documentation of overloading code.
11162
11163 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11164 * class.c (finish_struct_bits): Likewise.
11165
11166 * tree.c (lvalue_type): Fix for arrays.
11167 * typeck.c (build_unary_op): Use lvalue_type.
11168 * call.c (add_function_candidate): Likewise.
11169 * cvt.c (convert_to_reference): Likewise.
11170
11171 * decl2.c (lang_decode_option): Ignore -traditional.
11172
11173 * init.c (build_offset_ref): Don't mess with error_mark_node.
11174 * lex.c (do_scoped_id): Use cp_error.
11175
11176 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11177
11178 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
11179
11180 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11181
11182 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
11183
11184 * cp-tree.h (set_identifier_local_value): Provide prototype.
11185
11186 * decl2.c (do_namespace_alias): Remove unused variables `binding'
11187 and `old'.
11188
11189 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
11190
11191 * Makefile.in: Rename BBISON to BISON so that it can be properly
11192 inherited from the parent makefile.
11193
11194 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11195
11196 * lang-options.h: Add -finit-priority.
11197 * decl2.c: Likewise. Check flag_init_priority instead of
11198 USE_INIT_PRIORITY.
11199
11200 * decl2.c (setup_initp): New fn.
11201 (start_objects, finish_objects, do_ctors): Handle init_priority.
11202 (do_dtors, finish_file): Likewise.
11203
11204 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
11205
11206 * pt.c (tsubst_copy): Hush warning.
11207
11208 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11209
11210 1998-08-12 Mark Mitchell <mark@markmitchell.com>
11211
11212 * pt.c (print_template_context): Don't abort when instantiating a
11213 synthesized method.
11214
11215 * decl.c (grokdeclarator): Issue errors on namespace qualified
11216 declarators in parameter lists or in class scope.
11217
11218 1998-08-09 Mark Mitchell <mark@markmitchell.com>
11219
11220 * pt.c (check_explicit_specialization): Don't abort on bogus
11221 explicit instantiations.
11222
11223 1998-08-07 Mark Mitchell <mark@markmitchell.com>
11224
11225 * typeck.c (require_complete_type): Use complete_type_or_else.
11226 (complete_type_or_else): Always return NULL_TREE on failure, as
11227 documented.
11228
11229 * pt.c (tsubst_aggr_type): Prototype.
11230 (tsubst_decl): New function, split out from tsubst. Set
11231 input_filename and lineno as appropriate.
11232 (pop_tinst_level): Restore the file and line number saved in
11233 push_tinst_level.
11234 (instantiate_class_template): Set input_filename and lineno as
11235 appropriate.
11236 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
11237 context for a TYPENAME_TYPE is complete.
11238
11239 * decl2.c (grokbitfield): Issue errors on bitfields declared with
11240 function type.
11241 (do_dtors): As in do_ctors, pretend to be a member of the same
11242 class as a static data member while generating a call to its
11243 destructor.
11244
11245 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11246 conversions, even in complex virtual base class hierarchies.
11247
11248 1998-08-06 Mark Mitchell <mark@markmitchell.com>
11249
11250 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11251 (TYPE_TEMPLATE_INFO): Likewise.
11252 (SET_TYPE_TEMPLATE_INFO): Likewise.
11253 (ENUM_TI_TEMPLATE): Likewise.
11254 (ENUM_TI_ARGS): Likewise.
11255 (lookup_nested_type_by_name): Remove.
11256 * decl.c (maybe_process_template_type_declaration): Handle enums.
11257 (start_enum): Don't check for primary-template enum declarations
11258 here.
11259 (finish_enum): Clean up, document. Make sure template enum
11260 constants get the correct type.
11261 (build_enumerator): Copy initializers for template enumerations,
11262 too.
11263 (grok_enum_decls): Document.
11264 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11265 better. Build LOOKUP_EXPRs for local variables, even if they are
11266 TREE_PERMANENT.
11267 * pt.c (tsubst_enum): Remove field_chain parameter.
11268 (template_class_depth): Include the depth of surrounding function
11269 contexts.
11270 (push_template_decl): Check for primary-template enum declarations
11271 here. Deal with enumeration templates.
11272 (lookup_template_class): Likewise.
11273 (for_each_template_parm): Likewise.
11274 (instantiate_class_template): Don't call tsubst_enum directly,
11275 call tsubst instead, to instantiate enums. Deal with all
11276 field_chain issues here, not in tsubst_enum.
11277 (lookup_nested_type_by_name): Remove.
11278 (tsubst_aggr_type): Revise handling of enumeration types.
11279 (tsubst): Likewise.
11280 (tsubst_copy): Likewise.
11281 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11282
11283 1998-08-04 Mark Mitchell <mark@markmitchell.com>
11284
11285 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11286 uses template parameters.
11287 * method.c (build_template_parm_names): Use the full set of
11288 template arguments for tsubst'ing.
11289 (build_overload_identifier): Pass the full set of template
11290 arguments to build_template_parm_names, not just the
11291 innermost_args.
11292 * pt.c (TMPL_ARGS_DEPTH): Define using
11293 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11294 (NUM_TMPL_ARGS): New macro.
11295 (add_outermost_template_args): Deal with the case where the outer
11296 args will be completely discarded.
11297 (coerce_template_parms): Use the full set of template arguments
11298 for tsubst'ing. Simplify. Add some asserts. Improve
11299 error messages.
11300 (lookup_template_class): Pass the full set of template arguments
11301 to coerce_template_parms.
11302 (tsubst): Add assertion.
11303 (do_type_instantiation): Don't instantiate member template
11304 classes.
11305
11306 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11307 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11308
11309 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
11310
11311 * method.c (set_mangled_name_for_decl): Change return type to void.
11312
11313 * decl.c (lookup_name_real): A namespace-level decl takes priority
11314 over implicit typename. Avoid doing the same lookup twice.
11315
11316 * search.c (dependent_base_p): New fn.
11317 (dfs_pushdecls, dfs_compress_decls): Use it.
11318
11319 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11320 virtual functions if the type doesn't have any.
11321
11322 1998-08-03 Mark Mitchell <mark@markmitchell.com>
11323
11324 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11325 uses template parameters.
11326
11327 1998-08-02 Mark Mitchell <mark@markmitchell.com>
11328
11329 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
11330 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11331 * lex.c (do_identifier): Don't use a second argument, or a type,
11332 when building LOOKUP_EXPRs.
11333 (do_identifier): Likewise.
11334 (do_scoped_id): Likewise.
11335 * method.c (hack_identifier): Improve error message.
11336 * pt.c (lookup_template_function): Don't needlessly call
11337 copy_to_permanent or build_min.
11338 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
11339 necessary.
11340 (do_decl_instantiation): Improve error message.
11341 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11342 (build_min): Copy the type to the permanent obstack, too.
11343
11344 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
11345
11346 * init.c (init_init_processing): Remove BI* handling.
11347 (build_builtin_call): Remove.
11348 (build_builtin_delete_call): New fn.
11349 (build_delete): Use it.
11350
11351 1998-07-31 Mark Mitchell <mark@markmitchell.com>
11352
11353 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11354 (maybe_check_template_type): New function.
11355 * decl.c (maybe_process_template_type_declaration): New function,
11356 split out from pushtag Call maybe_check_template_type.
11357 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
11358 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11359 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11360 * pt.c (template_class_depth_real): Generalization of ...
11361 (template_class_depth): Use it.
11362 (register_specialization): Use duplicate_decls for duplicate
11363 declarations of specializations.
11364 (maybe_check_template_type): New function.
11365 (push_template_decl_real): Fix comment.
11366 (convert_nontype_argument): Likewise.
11367 (lookup_template_class): Likewise. Avoid an infinite loop on
11368 erroneous code.
11369 (tsubst_friend_function): Fix comment.
11370 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11371 an IDENTIFIER_NODE.
11372 * semantics.c (begin_function_definition): Use
11373 reset_specialization to note that template headers don't apply
11374 directly to declarations after the opening curly for a function.
11375
11376 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
11377
11378 * decl.c (push_overloaded_decl): Use current_namespace instead of
11379 DECL_CONTEXT (decl) to determine where we go.
11380
11381 * decl.c (lookup_name_real): Fix typo.
11382
11383 1998-07-28 Mark Mitchell <mark@markmitchell.com>
11384
11385 * friend.c (is_friend): Be lenient with member functions to deal
11386 with nested friends.
11387
11388 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
11389
11390 * class.c (finish_struct_1): Convert integer_zero_node to
11391 ssizetype before passing it to set_rtti_entry.
11392 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11393 of any size to a pointer.
11394
11395 1998-07-27 Mark Mitchell <mark@markmitchell.com>
11396
11397 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11398 (build_template_decl_overload): Remove.
11399 (set_mangled_name_for_decl): New function.
11400 (innermost_args): Remove is_spec parameter.
11401 (most_specialized, most_specialized_class): Remove declarations.
11402 (lookup_template_class): Add entering_scope parameter.
11403 (maybe_process_partial_specialization): New function.
11404 (finish_template_decl): Likewise.
11405 (finish_template_type): Likewise.
11406 * class.c (finish_struct): Clean up processing of member template
11407 specializations.
11408 * decl.c (pushtag): Fix formatting.
11409 (lookup_tag): Improve handling of pseudo-global levels.
11410 (make_typename_type): Adjust call to lookup_template_class.
11411 (shadow_tag): Use maybe_process_partial_specialization.
11412 (xref_tag): Improve handling of member friends.
11413 (start_function): Call push_nested_class before
11414 push_template_decl. Don't call push_template_decl for
11415 specializations.
11416 * decl2.c (grok_x_components): Don't call xref_tag for
11417 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
11418 (grokclassfn): Use set_mangled_name_for_decl.
11419 (arg_assoc_class): Adjust call to innermost_args.
11420 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11421 * error.c (dump_function_name): Improve printing of template
11422 function names.
11423 * friend.c (is_friend): Don't compare types of decls to determine
11424 friendship, unless flag_guiding_decls.
11425 (make_friend_class): Partial specializations cannot be friends.
11426 (do_friend): Use set_mangled_name_for_decl. Call
11427 push_template_decl_real instead of push_template_decl.
11428 * method.c (build_decl_overload_real): Remove prototype. Give it
11429 external linkage.
11430 (build_overload_identififer): Adjust call to innermost_args.
11431 (build_template_decl_overload): Remove.
11432 (set_mangled_name_for_decl): New function.
11433 * parse.y (.finish_template_type): New non-terminal.
11434 (template_def): Use finish_template_decl. Use template_extdef
11435 instead of extdef.
11436 (template_extdef, template_datadef): New non-terminals, containing
11437 only those rules for things which can be templates.
11438 (datadef): Tidy.
11439 (template_type, self_template_type): Use .finish_template_type.
11440 (named_class_head): Use maybe_process_partial_specialization.
11441 * pt.c (mangle_class_name_for_template): Remove context parameter.
11442 (get_class_bindings): Remove outer_args parameter.
11443 (complete_template_args): Remove.
11444 (add_outermost_template_args): New function.
11445 (register_specialization): Return the specialization.
11446 (unregister_specialization): New function.
11447 (tsubst_template_parms): Likewise.
11448 (most_specialized, most_specialized_class): Prototype here as
11449 static.
11450 (original_template): Rename to most_general_template.
11451 (tsubst_template_parms): New function.
11452 (set_mangled_name_for_template_decl): Likewise.
11453 (TMPL_ARGS_DEPTH): New macro.
11454 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11455 (TMPL_ARGS_LEVEL): New macro.
11456 (SET_TMPL_ARGS_LEVEL): Likewise.
11457 (TMPL_ARG): Likewise.
11458 (SET_TMPL_ARG): Likewise.
11459 (TMPL_ARGS_DEPTH): Likewise.
11460 (finish_member_template_decl): Use finish_template_decl.
11461 (maybe_process_partial_specialization): New function, split out
11462 from tsubst.
11463 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11464 (maybe_begin_member_template_processing): Use new macros.
11465 (is_member_template): Likewise.
11466 (is_member_template_class): Likewise.
11467 (add_to_template_args): Likewise. Deal with multiple levels of
11468 args.
11469 (maybe_process_partial_specialization): New function.
11470 (retrieve_specialization): Add consistency check.
11471 (determine_specialization): Return full argument list.
11472 (check_explicit_specialization): Tweak friend handling. Use full
11473 argument lists. Simplify.
11474 (current_template_args): Use new macros.
11475 (push_template_decl_real): Change ill-named mainargs to specargs.
11476 Check that a partial specialization actually specializes at least
11477 one parameter. Improve friend handling. Modify for full
11478 template arguments.
11479 (classtype_mangled_name): Don't mangle the names of
11480 specializations.
11481 (lookup_template_class): Add entering_scope parameter. Use it to
11482 avoid finding a template type when an instantiation is required.
11483 Simplify. Use full template arguments.
11484 (tsubst_friend_function): Use unregister_specialization. Use new
11485 macros. Use full template arguments.
11486 (tsubst_friend_class): Substitute, using tsubst_template_parms,
11487 into the template parameters before passing them to
11488 redeclare_class_template.
11489 (instantiate_class_template): Simplify. Use full template
11490 arguments. Adjust calls to get_class_bindings. Use
11491 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
11492 (innermost_args): Use new macros.
11493 (tsubst_aggr_type): New function, split out from tsubst.
11494 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11495 conventions for lookup_template_class. Refine handling of partial
11496 instantiations. Remove calls to complete_template_args.
11497 Simplify. Add consistency checks. Use set_mangled_name_for_decl
11498 and set_mangled_name_for_template_decl.
11499 (tsubst_copy): Use tsubst_aggr_type.
11500 (instantiate_template): Use full template arguments.
11501 (more_specialized): Improve formatting.
11502 (more_specialized_class): Adjust calls to get_class_bindings.
11503 (get_bindings_real): Don't call complete_template_args.
11504 (most_specialized): Don't overwrite input; create a new list.
11505 (most_specialized_class): Use most_general_template.
11506 (regenerate_decl_from_template): Use unregister_specialization.
11507 Use full template arguments.
11508 (instantiate_decl): Use full template arguments.
11509 (set_mangled_name_for_template_decl): New function.
11510 * semantics.c (begin_class_definition): Use
11511 maybe_process_partial_specialization.
11512 (finish_member_class_template): New function.
11513 (finish_template_decl): Likewise.
11514 (finish_template_type): Likewise.
11515 (typeck.c): Don't crash after issuing a compiler_error.
11516 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11517
11518 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
11519
11520 * typeck2.c (build_functional_cast): Handle default-initialization.
11521
11522 * call.c (build_over_call): Pass 1 to popclass.
11523
11524 * parse.y (direct_notype_declarator): Add precedence declaration
11525 to notype_unqualified_id case.
11526 * Makefile.in (EXPECT): Adjust.
11527
11528 * tree.c (ovl_member): Fix for single function in OVL.
11529
11530 1998-07-27 Dave Brolley <brolley@cygnus.com>
11531
11532 * c-lex.c (yylex): Fix boundary conditions in character literal and
11533 string literal loops.
11534
11535 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
11536
11537 * decl.c (lookup_name_real): OK, do return the from_obj value
11538 unless got_object depends on template parms.
11539
11540 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11541
11542 * pt.c (coerce_template_parms): Also complain about local enums.
11543
11544 * cp-tree.h: Add prototype for set_identifier_local_value.
11545 * decl.c (set_identifier_local_value_with_scope): Make static,
11546 prototype.
11547 * search.c (covariant_return_p): Likewise.
11548 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11549
11550 * call.c (build_method_call): Only pull out the type of a destructor
11551 if it's a template type parm.
11552 * decl.c (lookup_name_real): Never return the from_obj value.
11553
11554 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11555
11556 * except.c (process_start_catch_block_old): Call start_decl_1 for
11557 catch parm.
11558 * decl.c (start_decl_1): Avoid duplicate error.
11559
11560 * init.c (expand_default_init): Only perform the initialization if
11561 it will do something.
11562
11563 1998-07-23 H.J. Lu (hjl@gnu.org)
11564
11565 * parse.y (base_class): Check for invalid base class.
11566
11567 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11568
11569 * decl2.c (import_export_template): Fold in...
11570 (import_export_class): ...to here. Handle dllimport/export.
11571
11572 * class.c (build_vtable): Pass at_eof to import_export_vtable.
11573 (prepare_fresh_vtable): Likewise.
11574 * decl2.c (import_export_class): Split out...
11575 (finish_prevtable_vardecl): From here.
11576 * class.c (finish_struct_1): Call import_export_class if at_eof.
11577
11578 * decl.c (start_function): #if 0 mysterious code I wrote and have
11579 forgotten why.
11580 * rtti.c (get_tinfo_fn): If this is for a class type, set
11581 DECL_CONTEXT.
11582
11583 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
11584
11585 * inc/exception: Change terminate and unexpected to ().
11586
11587 * parse.y (named_class_head_sans_basetype_defn): A
11588 named_class_head_sans_basetype followed by '{' or ':' is a defn.
11589
11590 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
11591
11592 * tree.c (canonical_type_variant): New fn to handle arrays.
11593 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11594 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
11595 * method.c (process_overload_item): Use build_overload_value for
11596 arrays.
11597
11598 1998-07-20 Dave Brolley <brolley@cygnus.com>
11599
11600 * lex.c (mbchar.h): #include it.
11601 (GET_ENVIRONMENT): New macro.
11602 (init_parse): Set character set based on LANG environment variable.
11603 (real_yylex): Handle multibyte characters in character literals.
11604 (real_yylex): Handle multibyte characters in string literals.
11605
11606 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
11607
11608 * lex.c (do_identifier): Look for class value even if we don't
11609 have a global value. Do implicit declaration if parsing is 2.
11610 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11611 lookup.
11612
11613 1998-07-19 Mark Mitchell <mark@markmitchell.com>
11614
11615 * decl.c (pushtag): Revert previous change.
11616 * pt.c (lookup_template_class): Don't put out debugging
11617 information for types that use template parameters.
11618
11619 * decl.c (pushtag): Don't put out debugging information for
11620 compiler-generated typedefs.
11621
11622 * error.c (dump_type_real): Don't crash when presented with
11623 intQI_type_node or the like.
11624
11625 * semantics.c (finish_translation_unit): Fix spelling error in
11626 comment.
11627
11628 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
11629
11630 * decl.c (lookup_name_real): Pull out single function here.
11631 (select_decl): Not here.
11632 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11633
11634 * decl.c (qualify_lookup): Tweak again.
11635
11636 * pt.c (lookup_template_class): Don't mess with the context of the
11637 instantiation.
11638 * decl2.c (current_decl_namespace): Remove special handling for
11639 templates.
11640
11641 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11642 a member template specialization.
11643
11644 * tree.c (ovl_member): Use decls_match to compare functions.
11645 * decl.c (decls_match): Check the context of a function.
11646
11647 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11648 in Koenig lookup support rules.
11649 * semantics.c (finish_call_expr): Handle the new cases.
11650
11651 * typeck.c (build_x_function_call): Handle overloaded methods.
11652
11653 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11654
11655 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11656
11657 * semantics.c (finish_object_call_expr): Revert previous change.
11658 * call.c (build_new_method_call): Likewise. Instead, convert
11659 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11660
11661 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11662
11663 * decl.c (qualify_lookup): Handle templates.
11664
11665 * decl2.c (do_using_directive): Don't pass ancestor.
11666 * decl.c (push_using_directive): Calculate ancestor.
11667
11668 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11669 * decl.c (pushdecl): Move type shadowing handling from here...
11670 (duplicate_decls): ...to here.
11671 * decl.c (set_identifier_local_value_with_scope): New fn.
11672 (pushdecl): Use it.
11673 (set_identifier_local_value, lookup_type_current_level): New fns.
11674 * decl2.c (do_local_using_decl): Handle types and binding level
11675 stuff properly.
11676
11677 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11678 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11679 (lookup_namespace_name): Likewise.
11680 * typeck.c (build_unary_op): Not here anymore.
11681
11682 * decl2.c (do_class_using_decl): Make sure we get an identifier.
11683 * class.c (handle_using_decl): Ignore TYPE_DECLs.
11684
11685 * decl.c (qualify_lookup): New fn.
11686 (lookup_name_real): Use it.
11687
11688 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11689
11690 * decl2.c (add_using_namespace): When directly using a namespace
11691 that was indirect before, promote it.
11692
11693 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11694 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11695 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11696 * decl.c (select_decl): Replace two flag parameters by one.
11697 (unqualified_namespace_lookup): Likewise, pass flag.
11698 (lookup_flags): New function.
11699 (lookup_name_real): Compute flags, pass them.
11700 (lookup_namespace_name): Call with zero-flag.
11701 * decl2.c (ambiguous_decl): Add flag parameter, complain only
11702 according to flags.
11703 (lookup_using_namespace, qualified_lookup_using_namespace):
11704 Add flag parameter, pass them through.
11705 * lex.c (do_scoped_id): Call with zero-flag.
11706
11707 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11708
11709 * typeck.c (convert_for_assignment): Use comptypes.
11710
11711 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11712
11713 * semantics.c (finish_object_call_expr): Move test for the
11714 function called being a TYPE_DECL to ...
11715 * call.c (build_new_method_call): Here.
11716
11717 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11718
11719 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11720 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11721
11722 * lex.c (looking_for_typename): Don't initialize.
11723
11724 * decl2.c (ambiguous_decl): Clarify error message.
11725
11726 * decl.c (push_using_directive): Iterate over namespaces used
11727 indirectly.
11728
11729 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11730
11731 * decl2.c (add_using_namespace): Iterate over namespaces used
11732 indirectly.
11733
11734 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11735 (cat_namespace_levels): Ignore aliases.
11736 (duplicate_decls): Ignore duplicate aliases.
11737 * decl2.c (do_namespace_alias): Process block level namespace
11738 aliases. Store alias with pushdecl. Remove odr errors.
11739 * parse.y (namespace_alias): New non-terminal.
11740 (extdef): Use it.
11741
11742 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11743
11744 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11745 Handle TEMPLATE_TYPE_PARM.
11746 (arg_assoc): Rewrite.
11747
11748 * pt.c (complete_template_args): Don't look at the context unless
11749 we have to.
11750
11751 * method.c (build_decl_overload_real): Fix namespace handling.
11752
11753 * typeck.c (build_unary_op): Extract a lone function from an
11754 OVERLOAD.
11755
11756 * call.c (build_scoped_method_call): Handle getting a namespace
11757 for basetype in a destructor call.
11758 (check_dtor_name): Handle enums.
11759
11760 * parse.y (using_directive): New nonterminal.
11761 (extdef, simple_stmt): Use it.
11762
11763 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11764
11765 * decl2.c (add_function): Move error message ...
11766 (arg_assoc_namespace): ... from here.
11767
11768 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11769
11770 * parse.y (namespace_qualifier): Fix multiple level handling.
11771 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11772 (arg_assoc): Don't skip the first argument of a function.
11773
11774 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11775
11776 * search.c (my_tree_cons): Clean up.
11777
11778 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11779
11780 * call.c (joust): Don't warn about "confusing" conversions to the
11781 same type.
11782
11783 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11784
11785 * class.c (push_nested_class): Complain about namespaces.
11786 * decl.c (start_decl): Enter the object's namespace.
11787 (cp_finish_decl): Leave it.
11788 (grokdeclarator): Likewise.
11789 * decl2.c (check_decl_namespace): New function.
11790 (finish_file): Call it.
11791 * parse.y (complex_direct_notype_declarator): Set complexity
11792 of namespace-qualified ids to -1, enter the namespace.
11793
11794 * method.c (build_template_decl_overload): Expect _DECL as first
11795 parameter. Put context temporarily into current_namespace.
11796 * pt.c (check_explicit_specialization): Change caller.
11797 (tsubst): Likewise.
11798
11799 * init.c (build_offset_ref): Call mark_used and
11800 convert_from_reference for namespace members.
11801
11802 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11803
11804 * search.c (my_tree_cons): The bitfield is at index 2.
11805
11806 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11807
11808 * lang-options.h: Format changed to work with new --help support
11809 in gcc/toplev.c
11810
11811 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11812
11813 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11814 Do Koenig lookup in CALL_EXPR.
11815 (arg_assoc): Handle error_mark.
11816 * lex.c (is_global): New function.
11817 (do_identifier): Expect arguments for Koenig lookup.
11818 * parse.y (primary): Add rules for calls of unqualified function calls.
11819 (do_id): Change call of do_identifier.
11820 * pt.c (finish_stmt_expr): Likewise.
11821 * semantics.c (finish_id_expr): Likewise.
11822 (finish_call_expr): Add integer parameter to indicate
11823 argument-dependent lookup.
11824
11825 * decl.c (struct binding_level): New field using_directives.
11826 (push_using_decl): Not sorry anymore.
11827 (push_using_directive): New function.
11828 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11829 (unqualified_namespace_lookup): New function, code from ...
11830 (lookup_name_real): ... here.
11831 * decl2.c (lookup_using_namespace): Pass using list instead of
11832 initial scope.
11833 (validate_nonmember_using_decl): New function.
11834 (do_nonmember_using_decl): New function.
11835 (do_toplevel_using_decl): Use them.
11836 (do_local_using_decl): New function.
11837 (do_using_directive): Support block-level directives.
11838 * parse.y (simple_stmt): Support using declarations and
11839 directives.
11840 (namespace_qualifier, namespace_using_decl): New non-terminals.
11841
11842 * xref.c (classname): New function.
11843 (GNU_xref_hier): Change class and base parameters to tree.
11844 * decl.c (xref_baseypes): Change caller.
11845 * friend.c (make_friend_class): Likewise.
11846
11847 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11848
11849 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11850 comparison.
11851
11852 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11853 template template parameter, record its use.
11854 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11855 its template arguments if exists.
11856
11857 * pt.c (coerce_template_template_parms): New function equivalent
11858 to coerce_template_parms when IS_TMPL_PARM is true.
11859 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11860 all callers changed.
11861
11862 (coerce_template_parms): Access ARGLIST properly when creating a
11863 new vector. Only accept implicit TYPE_DECL as valid argument for
11864 a template template parameter when it is a base class of
11865 current_class_type. Don't display error message when COMPLAIN is
11866 false.
11867
11868 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11869
11870 * repo.c (get_base_filename): Use file_name_nondirectory.
11871 (open_repo_file): Likewise.
11872 * cp-tree.h (file_name_nondirectory): Add prototype.
11873
11874 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11875
11876 * friend.c (do_friend): Pull the identifier out of declarator.
11877 Use cp_error and friends.
11878 * decl2.c (qualified_lookup_using_namespace): Fix call to
11879 purpose_member.
11880 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11881 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11882 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11883 * class.c (warn_hidden): Fix for OVERLOAD.
11884 From grahams@rcp.co.uk:
11885 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11886 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11887
11888 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
11889
11890 * g++.1 (-traditional): Remove duplicated documentation.
11891
11892 1998-07-11 Mark Mitchell <mark@markmitchell.com>
11893
11894 * method.c (flush_repeats): Add nrepeats parameter.
11895 (issue_nrepeats): Likewise.
11896 (is_back_referenceable_type): New function. Don't back-reference
11897 TEMPLATE_TYPE_PARMs as well as simple types like integers.
11898 (build_mangled_name_for_type): Likewise.
11899 (build_mangled_name_for_type_with_Gcode): Likewise.
11900 (lasttype): Remove.
11901 (nrepeats): Likewise.
11902 (Nrepeats): Likewise.
11903 (start_squangling): Don't clear the variables removed above.
11904 (end_squangling): Likewise.
11905 (flush_repeats): Tidy. Use nrepeats parameter rather than
11906 Nrepeats global.
11907 (issue_nrepeats): Likewise, but with nrepeats global. Use
11908 is_backreferenceable_type.
11909 (build_overload_nested_name): Tidy. Add comment. Use
11910 build_mangled_name_for_type.
11911 (build_underscore_int): Comment.
11912 (build_overload_scope_ref): Use build_mangled_name_for_type.
11913 (build_overload_int): Likewise.
11914 (build_template_template_parm_names): Tidy.
11915 (build_template_parm_names): Use build_mangled_name_for_type.
11916 (build_overload_identifier): Add comments.
11917 (build_mangled_name_for_type_with_Gcode): Split out from
11918 build_mangled_name.
11919 (build_mangled_name_for_type): Use it.
11920 (build_mangled_name): Rework to use build_mangled_name_for_type
11921 and to not use global nrepeats/Nrepeats. Tidy.
11922 (process_modifiers): Tidy.
11923 (check_btype): Use is_backreferenceable_type. Add comment.
11924 Rename `node' to `type'.
11925 (process_overload_item): Set numeric_output_need_bar here.
11926 Use build_mangled_name_for_type. Tidy.
11927 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
11928 build_mangled_name_for_type.
11929
11930 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11931 for TYPE_DECLs.
11932
11933 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
11934
11935 * cp-tree.h (warn_long_long): Define.
11936 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11937 warning "ANSI C++ does not support `long long'".
11938 * decl2.c (warn_long_long): Define.
11939 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11940
11941 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
11942
11943 * decl.c (xref_tag): Handle attributes between 'class' and name.
11944 * parse.y (aggr): Likewise.
11945 * semantics.c (finish_class_definition): Likewise.
11946 * Makefile.in (EXPECTED): Adjust.
11947
11948 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11949 * decl2.c: Define them.
11950 (lang_decode_option): Handle them.
11951 * lang-options.h: Add -foptional-diags.
11952 * class.c (finish_struct): Don't complain about multiple meanings of
11953 name if -fno-optional-diags.
11954 * decl.c (pushdecl_class_level): Likewise.
11955 * lex.c (real_yylex): Check warn_multichar.
11956
11957 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
11958
11959 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11960
11961 * tree.c (make_binfo): Fix length.
11962
11963 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
11964
11965 * decl2.c (lang_decode_option): Remove warn_template_debugging.
11966 * lang-options.h: Likewise.
11967
11968 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11969
11970 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11971 (process_start_catch_block): Likewise for variables
11972 `false_label_rtx', `call_rtx' and `return_value_rtx'.
11973
11974 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
11975
11976 * tree.c (build_srcloc): Make sure we allocate this node on the
11977 permanent obstack.
11978
11979 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
11980
11981 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11982 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11983 (lang_specific_driver): Only add -lm automatically if need_math is
11984 nonzero.
11985
11986 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
11987
11988 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
11989
11990 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11991
11992 * Makefile.in (EXPR_H): New dependency variable.
11993 (decl2.o): Depend on $(EXPR_H).
11994 (typeck.o): Likewise.
11995 (init.o): Likewise.
11996 (expr.o): Likewise.
11997
11998 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11999
12000 * decl.c (start_enum): Put local enums on permanent_obstack.
12001
12002 1998-06-25 Mark Mitchell <mark@markmitchell.com>
12003
12004 * cp-tree.h (c_get_alias_set): Declare.
12005 * decl.c (init_decl_processing): Set lang_get_alias_set.
12006
12007 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
12008
12009 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
12010 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
12011 flag for all function decls which are in the exception table.
12012 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
12013 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
12014 code is emitted for any referenced rtti function.
12015
12016 1998-06-25 Dave Brolley <brolley@cygnus.com>
12017
12018 * lang-specs.h: Use new | syntax to eliminate
12019 string concatenation.
12020
12021 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
12022
12023 * cp-tree.h (CP_DECL_CONTEXT): New macro.
12024 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
12025 * method.c (build_overload_nested_name): Likewise.
12026 * sig.c (build_signature_pointer_or_reference_type): Don't set
12027 DECL_CONTEXT.
12028
12029 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12030
12031 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
12032 * cp-tree.h (FROB_CONTEXT): New macro.
12033 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
12034 * decl.c (namespace_binding): Replace NULL_TREE with
12035 global_namespace.
12036 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
12037 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
12038 Likewise.
12039 * decl.c (pushtag): Use FROB_CONTEXT.
12040 (pushdecl, make_typename_type, define_function, grokdeclarator):
12041 Likewise.
12042 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
12043 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
12044 Likewise.
12045 * decl2.c (decl_namespace): Return global_namespace if no context.
12046 * method.c (build_overload_nested_name): Expect null as context.
12047 * pt.c (mangle_class_name_for_template): Do nothing for null
12048 contexts.
12049 (lookup_template_class): Allow for null id_context.
12050
12051 1998-06-25 Richard Henderson <rth@cygnus.com>
12052
12053 * method.c (emit_thunk): Set current_function_is_thunk for the
12054 ASM_OUTPUT_MI_THUNK case as well.
12055
12056 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
12057
12058 * exception.cc (__cplus_type_matcher): Get a match_info pointer
12059 instead of an exception table entry as a parameter.
12060
12061 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
12062
12063 * parse.y (function_try_block): Don't call start_catch_handler.
12064 * except.c (call_eh_info): Remove coerced field from declaration.
12065 (build_eh_type_type_ref): New function to create an address of a
12066 rtti function for the new style exception tables.
12067 (expand_start_catch_block): Split function, this contains the
12068 common part.
12069 (process_start_catch_block_old): New function to perform the rest
12070 of expand_start_catch_block under old style exceptions.
12071 (process_start_catch_block_old): New function to perform the rest
12072 of expand_start_catch_block under new style exceptions.
12073 (expand_end_catch_block): Only pop the false label off the stack under
12074 the old style of exceptions.
12075 * semantics.c (finish_try_block): Don't call start_catch_handler.
12076 * exception.cc (struct cp_eh_info): Add original_value field.
12077 (__cplus_type_matcher): Perform type matching on the original exception
12078 value, and if we have a match, set the current value.
12079 (__cp_push_exception): Set the original exception value.
12080
12081 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
12082
12083 * call.c (joust): Fix confusing conversion warning.
12084
12085 * call.c (build_op_delete_call): Add placement parm. Check
12086 LOOKUP_SPECULATIVELY.
12087 * cp-tree.h, decl2.c, init.c: Adjust.
12088 * decl.c (finish_function): Use it.
12089
12090 * pt.c (tsubst): Diagnose creating void fields or variables.
12091
12092 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12093
12094 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12095
12096 * cp-tree.h (check_dtor_name): Add prototype.
12097
12098 * init.c (expand_member_init): Remove unused variables
12099 `ptr_type_node', `parm' and `rval'.
12100
12101 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12102 in call to fprintf.
12103 (lang_print_xnode): Likewise.
12104
12105 * typeck2.c (enum_name_string): Cast argument to sprintf to long
12106 and use %ld specifier.
12107
12108 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12109 specifier in call to fprintf.
12110 (GNU_xref_member): Cast argument to sprintf to int.
12111
12112 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12113
12114 * typeck2.c (pop_init_level): Warn about implicit zero initialization
12115 of struct members.
12116
12117 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12118
12119 * cp-tree.h: Prototype function `check_java_method'.
12120
12121 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12122
12123 * class.c (finish_struct): Make conflicting use of id a pedwarn.
12124 * decl.c (pushdecl_class_level): Likewise.
12125
12126 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12127
12128 * pt.c (convert_nontype_argument): Issue an error when presented
12129 with an integer (real) constant that cannot be simplified to an
12130 INT_CST (REAL_CST).
12131
12132 * cp-tree.h (c_get_alias_set): Remove declaration added in
12133 1998-06-13 change that should never have been checked in.
12134
12135 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12136
12137 * typeck.c (build_binary_op_nodefault): Change % in format strings
12138 to %%.
12139
12140 * decl.c (grokvardecl): Don't build_static_name for decls that
12141 aren't at namespace scope.
12142
12143 * init.c (perform_member_init): Catch default-initialization of
12144 references.
12145
12146 1998-06-17 Mark Mitchell <mark@markmitchell.com>
12147
12148 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12149
12150 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
12151
12152 * method.c (hack_identifier): Complain about getting a namespace
12153 or class template.
12154 * typeck.c (decay_conversion): Remove check for namespaces.
12155 * typeck2.c (incomplete_type_error): Likewise.
12156 * parse.y (template_arg): Add PTYPENAME expansion.
12157
12158 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
12159
12160 * decl.c (grokvardecl): Don't build external assembler names for
12161 TYPENAMEs in other namespaces as there is no declarator.
12162 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12163 info from DECL_CONTEXT if it is NULL.
12164
12165 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
12166
12167 * call.c (check_dtor_name): Split out.
12168 (build_scoped_method_call): Use it.
12169 (build_method_call): Use it.
12170 * init.c (build_offset_ref): Use it.
12171
12172 * typeck.c (build_static_cast): Fix handling of pointers to members.
12173
12174 * decl.c (finish_function): Just return nothing from a constructor.
12175 * typeck.c (c_expand_return): Complain about returning a void
12176 expression from a destructor.
12177
12178 1998-06-13 Mark Mitchell <mark@markmitchell.com>
12179
12180 * class.c (alter_access): Accept a BINFO explaining how to get
12181 from the entity whose accessed is being altered to the type doing
12182 the altering.
12183 (handle_using_decl): New function containing code split out from ...
12184 (finish_struct_1): Here.
12185
12186 * cp-tree.h (complete_type_or_else): Declare.
12187 * init.c (build_new_1, build_delete): Use it.
12188 * typeck.c (require_complete_type): Use complete_type, rather than
12189 expanding it inline.
12190 (complete_type_or_else): New function.
12191 (build_component_ref): Use it.
12192 (pointer_int_sum): Make sure the type pointed to is complete.
12193 (pointer_diff): Likewise.
12194
12195 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12196 types.
12197
12198 * search.c (get_matching_virtual): Note that member templates
12199 cannot override virtual functions.
12200
12201 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
12202
12203 * pt.c (check_explicit_specialization): If DECLARATOR turned into
12204 an error_mark_node from lookup_template_function, return the same.
12205 (determine_specialization): Also make sure TEMPLATE_ID isn't an
12206 error_mark_node, before we try to read its operands.
12207 * decl.c (grokdeclarator): If we got an error_mark_node from
12208 check_explicit_specialization, just return it right back.
12209
12210 1998-06-12 Mark Mitchell <mark@markmitchell.com>
12211
12212 * class.c (instantiate_type): Don't treat template-ids that don't
12213 specify any template arguments as equivalent to ordinary
12214 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
12215 pointer-to-members for member templates. Tidy slightly.
12216 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12217 * init.c (build_offset_ref): Handle template-ids like ordinary
12218 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12219 offset part of the OFFSET_REF.
12220 * typeck.c (build_unary_op): Change check for unknown types to
12221 look for OFFSET_REFs, not SCOPE_REFs.
12222
12223 1998-06-11 Mark Mitchell <mark@markmitchell.com>
12224
12225 * pt.c (is_member_template_class): New function.
12226 (push_template_decl_real): Use it.
12227
12228 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
12229
12230 * friend.c (do_friend): Add support for nested classes using
12231 member functions of the enclosing class as friends.
12232
12233 1998-06-10 Mark Mitchell <mark@markmitchell.com>
12234
12235 * call.c (convert_default_arg): Make global, not static.
12236 (convert_arg_for_ellipsis): Split out from ...
12237 (build_over_call): Here.
12238 * cp-tree.h (convert_default_arg); Declare.
12239 (convert_arg_to_ellipsis): Likewise.
12240 (do_member_init): Remove.
12241 * init.c (do_member_init): Remove; this code is dead.
12242 (expand_member_init): Remove much of this code; it is dead.
12243 * typeck.c (convert_arguments): Use convert_default_arg and
12244 convert_arg_for_ellipsis, rather than duplicating here.
12245
12246 * call.c (convert_like): Don't fail silently if
12247 build_user_type_conversion fails. Always return error_mark_node
12248 for failure.
12249
12250 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12251
12252 * search.c (covariant_return_p): Complain about ambiguous base.
12253
12254 * typeck.c (build_component_ref): Diagnose ref to nested type.
12255
12256 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12257
12258 * decl.c (grokparms): Check that INIT isn't an error_mark_node
12259 before giving error about invalid type for default arg.
12260
12261 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12262
12263 * call.c (build_method_call): Fix thinko.
12264
12265 1998-06-10 Dave Brolley <brolley@cygnus.com>
12266
12267 * decl2.c (lang_decode_option): New argc/argv interface.
12268 * cp-tree.h (lang_decode_option): New argc/argv interface.
12269 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12270 specified for cpplib-enabled compilers.
12271 * lex.c (lang_init): Don't check_newline for cpplib.
12272 (init_parse): Don't initialize cpplib here.
12273
12274 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
12275
12276 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12277 piece before checking DECL_MUTABLE_P.
12278
12279 1998-06-10 John Carr <jfc@mit.edu>
12280
12281 * tree.c (debug_binfo): Make printf format match arguments.
12282
12283 * error.c (OB_PUTI): Make printf format match arguments.
12284
12285 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
12286
12287 * init.c (perform_member_init): Handle default-initialization.
12288
12289 * except.c (build_throw): Handle throwing NULL.
12290
12291 * typeck.c (build_x_function_call): Use resolve_offset_ref.
12292
12293 * search.c (compute_access): Only strip an anonymous union
12294 for a FIELD_DECL.
12295
12296 * call.c (add_builtin_candidates): Tweak.
12297
12298 * cvt.c (build_expr_type_conversion): Restore code for conversion
12299 from class types.
12300 * decl2.c (delete_sanity): Use it. Clean up.
12301
12302 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12303
12304 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
12305
12306 * typeck.c (c_expand_return): Don't warn about void expressions on
12307 return statements in functions returning void.
12308
12309 1998-06-09 Mark Mitchell <mark@markmitchell.com>
12310
12311 * pt.c (fn_type_unification): Revise documentation. Tidy.
12312 (type_unification): Likewise.
12313
12314 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
12315
12316 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12317 expand_end_catch.
12318 * parse.y (function_try_block): Rename expand_start_catch, and delete
12319 expand_end_catch.
12320 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12321 expand_end_catch.
12322
12323 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
12324
12325 * search.c (lookup_member): New fn.
12326 * class.c (finish_struct_1): Use it.
12327 * decl.c (lookup_name_real): Use it.
12328
12329 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12330
12331 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12332
12333 * cp-tree.h: Add prototype for `maybe_print_template_context' and
12334 `maybe_make_one_only'.
12335
12336 * decl.c (auto_function): Remove unused variable `decl'.
12337
12338 * decl2.c: Include dwarf2out.h and dwarfout.h.
12339
12340 * lex.c: Remove redundant declarations of `set_float_handler' and
12341 `asm_out_file'.
12342
12343 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
12344
12345 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12346 time flag. Call __cp_eh_info instead of __cp_exception_info.
12347 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12348 (__cp_exception_info): Return offset into cp_eh_info structure to
12349 match what use to be the start of this structure.
12350 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12351 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12352 compile time flag.
12353 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12354 __cp_eh_info instead of __cp_exception_info.
12355
12356 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
12357
12358 * decl.c (cp_finish_decl): Disable inlining of extern inlines
12359 with static variables.
12360
12361 1998-06-08 Mark Mitchell <mark@markmitchell.com>
12362
12363 * init.c (build_offset_ref): Correct previous change to use build,
12364 not build_min.
12365
12366 1998-06-07 Mark Mitchell <mark@markmitchell.com>
12367
12368 * class.c (instantiate_type): Handle pointer-to-members where the
12369 member is a template.
12370 * init.c (build_offset_ref): Likewise.
12371 * typeck.c (build_unary_op): Likewise.
12372
12373 1998-06-07 Richard Henderson <rth@cygnus.com>
12374
12375 * lex.c (lang_init_options): New function.
12376 (lang_init): Remove flag_exceptions == 2 hack.
12377
12378 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12379
12380 * search.c (envelope_add_decl): Tweak for implicit typename.
12381
12382 * call.c (joust): Also warn about confusing conversion op/constructor
12383 overload resolution.
12384
12385 * spew.c (yylex): Also return the TYPE_DECL if got_object.
12386 Don't clear got_object after '~'.
12387 * call.c (build_scoped_method_call): Tweak destructor handling.
12388 (build_method_call): Likewise.
12389 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12390 TYPE_MAIN_VARIANT for destructors.
12391 * semantics.c (finish_object_call_expr): Complain about calling a
12392 TYPE_DECL.
12393
12394 1998-06-05 Per Bothner <bothner@cygnus.com>
12395
12396 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12397 Define - update needed by gcc.c change.
12398
12399 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12400
12401 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12402
12403 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12404
12405 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12406 * decl.c (lookup_name_real): Add namespaces_only parameter.
12407 If set, return only NAMESPACE_DECLs.
12408 (select_decl): Likewise.
12409 (identifier_type_value): Give additional parameter.
12410 (lookup_name_nonclass): Likewise.
12411 (lookup_name): Likewise.
12412 (find_binding): Skip namespace aliases.
12413 (binding_for_name): Likewise.
12414 (push_namespace): Check for namespace aliases.
12415 (lookup_name_namespace_only): New function.
12416 (begin_only_namespace_names, end_only_namespace_names): New functions.
12417 * decl2.c (set_decl_namespace): Skip namespace aliases.
12418 (do_using_directive): Likewise.
12419 (do_namespace_alias): Produce namespace aliases, fix alias
12420 redeclaration.
12421 * error.c (dump_decl): Support SCOPE_REF.
12422 * parse.y (extdef): Wrap lookup with namespace_only for namespace
12423 aliases and using declarations.
12424
12425 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
12426
12427 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12428
12429 * error.c (dump_expr): Clean up NEW_EXPR case.
12430
12431 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
12432
12433 Suggested by Brendan Kehoe
12434 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12435 treat it as using ::decl.
12436
12437 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12438
12439 * tree.c (mapcar): Support NEW_EXPR.
12440
12441 * error.c (dump_expr): Support NEW_EXPR.
12442
12443 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
12444
12445 * method.c (make_thunk): Use overload machinery to make name.
12446 * search.c (covariant_return_p): New fn.
12447 (get_matching_virtual): Use it.
12448
12449 * init.c (build_new_1): Fix check for void.
12450
12451 1998-06-01 Per Bothner <bothner@cygnus.com>
12452
12453 * cp-tree.h (TYPE_FOR_JAVA): New macro.
12454 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12455 java_int_type_node, java_long_type_node, java_float_type_node,
12456 java_double_type_node, java_char_type_node, java_boolean_type_node):
12457 New "primitive" types, with predefined names __java_byte etc.
12458 (record_builtin_java_type): New function.
12459 (init_decl_processing): Make Java types with record_builtin_java_type.
12460 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
12461 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
12462 (grokfndecl): Call check_java_method for Java classes.
12463 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
12464 (process_overload_item): Match types against specific
12465 java_XX_type_node types, rather than using is_java_type.
12466 * class.c (finish_struct_1): Don't add default copy constructor
12467 or operator= if TYPE_FOR_JAVA.
12468 (pop_lang_conext): Restore strict_prototyp proper if Java.
12469 * decl2.c (acceptable_java_type, check_java_method): New functions.
12470 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
12471 (tsubst): Move common statement after if statement.
12472 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
12473
12474 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
12475
12476 * pt.c (for_each_template_parm): Use first_rtl_op.
12477
12478 * tree.c (build_cplus_array_type_1): Also check index_type for
12479 template parms.
12480
12481 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
12482
12483 * pt.c (tsubst): Always copy BINFO_BASETYPES.
12484
12485 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
12486
12487 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12488 TYPE_SIZE_UNIT too.
12489
12490 1998-05-29 Mark Mitchell <mark@markmitchell.com>
12491
12492 * decl.c (grokdeclarator): Don't complain about in-class
12493 initialization of static consts if we don't really know the type
12494 of the variable.
12495
12496 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
12497
12498 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12499 * method.c (build_destructor_name): New fn.
12500 * decl2.c (maybe_retrofit_in_chrg): Split out...
12501 (grokclassfn): From here. Reorganize.
12502 * decl.c (grok_ctor_properties): Make sure ctors for types with
12503 vbases have the in_chrg parm.
12504 * pt.c (instantiate_class_template): Update
12505 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
12506 grok_*_properties.
12507 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12508
12509 1998-05-28 Mark Mitchell <mark@markmitchell.com>
12510
12511 * pt.c (instantiate_decl): Make test for whether or not static
12512 variables should be instantiated early match its comment.
12513
12514 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
12515
12516 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12517 a member.
12518 (start_function): Call check_default_args.
12519 * decl2.c (grokfield): Don't call check_default_args.
12520 (check_default_args): Use cp_error_at.
12521 * lex.c (do_pending_defargs): Call check_default_args.
12522
12523 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
12524
12525 * call.c (build_method_call): Make sure get_type_value returns
12526 something before we try to use its TYPE_MAIN_VARIANT.
12527 (build_scoped_method_call): Likewise.
12528
12529 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
12530
12531 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12532 initialize an array.
12533
12534 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12535 DECL_VIRTUAL_P.
12536
12537 * friend.c (do_friend): Clarify template warning.
12538
12539 1998-05-27 Mark Mitchell <mark@markmitchell.com>
12540
12541 * decl.c (shadow_label): Don't treat decls as identifiers.
12542 (maybe_push_to_top_level): Clear shadowed_labels.
12543
12544 * pt.c (instantiate_decl): Reset lineno and filename after calling
12545 regenerate_decl_from_template.
12546
12547 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12548 error_mark_node.
12549
12550 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
12551
12552 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12553
12554 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12555
12556 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12557 (convert_nontype_argument): Handle cases when nontype template
12558 parameters become classes after substitution.
12559
12560 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12561
12562 * friend.c (is_friend): Use comptypes, rather than == to compare
12563 types. Modify for new representation of template friends.
12564 (make_friend_class): Likewise.
12565 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
12566 (instantiate_class_template): Deal with template friends.
12567
12568 * decl.c (store_parm_decls): Remove redundant call to
12569 expand_main_function.
12570
12571 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
12572
12573 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12574 DECL_USE_TEMPLATE.
12575
12576 1998-05-26 Per Bothner <bothner@cygnus.com>
12577
12578 * language_as_string: Handle lang_java.
12579
12580 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
12581
12582 * decl.c (pushdecl): Don't copy the type_decl.
12583
12584 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12585
12586 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12587 current_class_type.
12588 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12589
12590 * parse.y (complex_direct_notype_declarator): Use $1 to access
12591 scope of notype_qualified_id.
12592
12593 1998-05-26 Dave Brolley <brolley@cygnus.com>
12594
12595 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12596 (init_parse): Initialize cpplib interface.
12597
12598 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12599 empty continuation.
12600
12601 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12602
12603 * decl.c (pushtag): Avoid crashing on erroneous input.
12604
12605 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12606
12607 * decl.c (push_namespace): Only produce one unique name for
12608 anonymous namespaces.
12609 (get_unique_name): Remove.
12610
12611 1998-05-25 Mark Mitchell <mark@markmitchell.com>
12612
12613 * call.c (tourney): Don't do any extra comparisons.
12614
12615 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12616
12617 * cp-tree.h (processing_template_parmlist): Declare.
12618 * decl.c (pushtag): Don't call push_template_decl when we
12619 shouldn't.
12620 * pt.c (processing_template_parmlist): New variable.
12621 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12622 (complete_template_args): Use it.
12623 (add_to_template_args): Likewise.
12624 (innermost_args): Likewise.
12625 (tsubst): Likewise.
12626 (begin_template_parm_list): Use processing_template_parmlist.
12627 (end_template_parm_list): Likewise.
12628
12629 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12630 * decl.c (grokdeclarator): Use it.
12631 * decl2.c (grok_x_components): Likewise.
12632 * init.c (initializing_context): Likewise.
12633 * method.c (do_build_copy_constructor): Likewise.
12634 (do_build_assign_ref): Likewise.
12635 * search.c (compute_access): Likewise.
12636 * typeck.c (build_component_ref): Likewise.
12637
12638 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12639 unnamed type a typedef name "for linkage purposes".
12640
12641 * pt.c (lookup_template_class): Don't look at
12642 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12643
12644 * method.c (build_overload_int): Handle error cases gracefully.
12645
12646 * pt.c (instantiate_decl): Handle static member variables
12647 correctly.
12648
12649 * pt.c (tsubst): Use the tsubst'd type when producing new
12650 TEMPLATE_PARM_INDEX nodes.
12651
12652 1998-05-24 Mark Mitchell <mark@markmitchell.com>
12653
12654 * tree.c (cp_tree_equal): Handle pointers to member functions.
12655
12656 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
12657 sure the type of the REF_BIND is a reference type.
12658 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12659 target_type for clarity.
12660
12661 * parse.y (xcond): Move call to condition_conversion ...
12662 * semantics.c (finish_for_cond): Here.
12663 * parse.c: Regenerated.
12664
12665 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
12666
12667 * decl.c (push_namespace): Namespaces have type void.
12668 * typeck2.c (incomplete_type_error): Complain about namespace
12669 used as expression.
12670 * typeck.c (decay_conversion): Likewise.
12671
12672 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12673
12674 * error.c (dump_expr): Support namespaces.
12675
12676 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
12677
12678 * cp-tree.def: Add SRCLOC.
12679 * cp-tree.h: Add struct tree_srcloc and accessor macros.
12680 * tree.c (build_srcloc, build_srcloc_here): New fns.
12681 * pt.c (add_pending_template): Use build_srcloc_here.
12682 (push_tinst_level): Update last_template_error_tick before erroring.
12683 (instantiate_decl): Restore lineno and input_filename before
12684 calling add_pending_template.
12685 * decl2.c (finish_file): Set up lineno and input_filename for
12686 pending templates.
12687
12688 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12689
12690 * decl.c (lang_print_error_function): New fn.
12691 (init_decl_processing): Set print_error_function to use it.
12692 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12693
12694 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12695 ICS_BAD_FLAG.
12696
12697 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12698 copy-initialization.
12699
12700 * class.c (build_vtable_entry): Use int_fits_type_p.
12701 (build_vtable): Pass a signed offset to build_vtable_entry.
12702 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12703 set_rtti_entry): Likewise.
12704
12705 1998-05-22 Per Bothner <bothner@cygnus.com>
12706
12707 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
12708 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
12709
12710 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12711
12712 * pt.c (print_template_context): Use fprintf instead of cp_error.
12713
12714 * pt.c (determine_specialization): Just return an error_mark_node.
12715 Also print the decl we want in error messages. If we complain,
12716 return error_mark_node.
12717 (tsubst_friend_function): Set lineno and input_filename so
12718 error messages will be useful.
12719 (instantiate_template): Just return an error_mark_node.
12720 (check_explicit_specialization): Don't mess with a returned
12721 error_mark_node.
12722
12723 * pt.c (print_template_context): Add new argument.
12724 (maybe_print_template_context): New fn.
12725 (push_tinst_level): Increment tinst_level_tick.
12726 (pop_tinst_level): Likewise.
12727 * errfn.c (cp_thing): Call maybe_print_template_context. Use
12728 xrealloc instead of xmalloc.
12729
12730 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12731
12732 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12733
12734 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12735 if the template we looked up is the same as the one we already
12736 have.
12737
12738 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12739
12740 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12741 (cpp_reader,parse_in): Add for cpplib.
12742 (check_newline): Call handle_sysv_pragma with new interface.
12743 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12744
12745 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12746 (sub_getch): Call GETC for cpplib.
12747
12748 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12749 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12750
12751 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12752
12753 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12754
12755 * decl2.c (maybe_make_one_only): New fn.
12756 (import_export_vtable): Use it.
12757 (import_export_decl): Likewise.
12758 * pt.c (mark_decl_instantiated): Likewise.
12759
12760 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12761
12762 * decl2.c (find_representative_member): Rename to ...
12763 (build_anon_union_vars): New function.
12764 (finish_anon_union): Fix stupidity of previous change.
12765
12766 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12767
12768 * decl.c (grokfndecl): Handle definition of specialization in
12769 friend declaration.
12770
12771 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12772
12773 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12774
12775 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12776 to look for type declarations.
12777 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12778 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12779 (finish_member_class_template): Declare.
12780 * decl.c (pushtag): Put member class templates on the
12781 CLASSTYPE_TAGS list, just as for ordinary member classes.
12782 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12783 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12784 IDENTIFIER_NAMESPACE_VALUEs.
12785 * parse.y (component_decl): Move code to ...
12786 * semantics.c (finish_member_class_template): New function.
12787 Don't put member class templates on the list of components for a
12788 class.
12789 * parse.c: Regenerated.
12790 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12791 In fact, don't use DECL_CONTEXT at all here.
12792
12793 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12794
12795 * decl.c (record_unknown_type): New function.
12796 (init_decl_processing): Call it for the unknown and global type
12797 nodes.
12798
12799 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12800
12801 * decl2.c (find_representative_member): New function.
12802 (finish_anon_union): Use it.
12803
12804 * cp-tree.h (MAIN_NAME_P): New macro.
12805 (DECL_MAIN_P): Likwise.
12806 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12807 (grokfndecl): Use the new macros.
12808 (grokdeclarator): Likewise.
12809 (start_function): Likewise.
12810 (store_parm_decls): Likewise.
12811 (finsh_function): Likewise.
12812 * friend.c (do_friend): Likewise.
12813 * typeck.c (build_function_call_real): Likewise.
12814 (build_unary_op): Likewise.
12815
12816 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12817
12818 * decl2.c (start_objects, finish_objects, do_dtors,
12819 do_ctors): Split out from...
12820 (finish_file): ...here.
12821
12822 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12823
12824 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12825 push_class_decls.
12826
12827 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12828
12829 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12830
12831 * error.c (dump_expr): Handle an ARROW_EXPR.
12832
12833 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12834
12835 * decl.c (saveable_obstack): Declare.
12836 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12837 declare, if necessary.
12838
12839 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12840
12841 * call.c (compare_qual): Remove.
12842 (is_subseq): Tweak.
12843 (is_properly_derived_from): New function.
12844 (maybe_handle_ref_bind): Likewise.
12845 (maybe_handle_implicit_object): Likewise.
12846 (compare_ics): Modify substantially to bring into conformance with
12847 the standard.
12848 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12849 (comp_cv_qualification): Declare.
12850 (comp_cv_qual_signature): Likewise.
12851 * typeck.c (comp_cv_qualification): Likewise.
12852 (comp_cv_qual_signature): Likewise.
12853
12854 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12855
12856 * Makefile.in (parse.o): Depend on toplev.h.
12857
12858 * class.c (typecode_p): Remove prototype and definition.
12859
12860 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12861 Add prototype.
12862
12863 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12864 definition.
12865
12866 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12867 in call to `cp_thing'.
12868 (cp_warning): Likewise for function pointer `warning'.
12869
12870 * except.c (do_function_call): Remove prototype and definition.
12871 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12872
12873 * method.c (is_java_type): Add prototype and make it static.
12874
12875 * parse.y: Include toplev.h.
12876
12877 * pt.c (type_unification): Remove unused variable `arg'.
12878 (instantiate_decl): Likewise for `save_ti'.
12879
12880 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12881
12882 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12883
12884 * init.c (build_member_call): Handle template_ids.
12885 * parse.y (primary): Add global_scope template_id.
12886
12887 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12888
12889 * decl2.c (get_sentry): Use end_temporary_allocation.
12890 Don't declare permanent_obstack.
12891
12892 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
12893
12894 * parse.y (.finish_new_placement): New non-terminal.
12895 (unary_expr, new_type_id): Use it.
12896 * parse.c: Regenerated.
12897
12898 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
12899
12900 * pt.c (redeclare_class_template): Say where the original definition
12901 of the template-parameter's default argument appeared.
12902
12903 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
12904
12905 * call.c (build_over_call): Tweak empty class handling.
12906
12907 * decl.c (make_typename_type): Use currently_open_class.
12908
12909 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12910
12911 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12912
12913 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12914 for a type unless it is one.
12915
12916 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12917
12918 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
12919
12920 * Makefile.in (program_transform_name, objdir): Define.
12921
12922 * Makefile.in (BISON): Use bison from the build tree if it exists.
12923 (FLEX): Likewise.
12924
12925 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12926
12927 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12928
12929 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12930
12931 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
12932
12933 * call.c (build_scoped_method_call): Likewise.
12934
12935 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
12936
12937 * init.c (build_new_1): Call suspend_momentary around the creation
12938 of values that must be saved for exception handling.
12939 * parse.y (.build_new_placement): New non-terminal.
12940 (unary_expr, new_placement): Use it.
12941 * parse.c: Regenerated.
12942
12943 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
12944
12945 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12946 old and new types.
12947
12948 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12949 canonical type.
12950
12951 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12952
12953 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12954
12955 * decl.c (start_decl): Revert problem change.
12956
12957 * Makefile.in (CONFLICTS): Fix.
12958
12959 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12960
12961 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12962
12963 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12964
12965 * class.c (finish_struct_1): Use BINFO_SIZE.
12966
12967 * decl.c (start_decl): Use 'tem'.
12968
12969 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
12970
12971 * exception.cc: Include eh-common.h.
12972 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12973 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12974 (__cp_push_exception): Initialize eh_info struct as well.
12975 * except.c: Remove local structs and include eh-common.h.
12976 (init_exception_processing): Set language and version codes.
12977 (call_eh_info): Add presence of eh_info to runtime description of
12978 struct cp_eh_info.
12979 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12980 * semantics.c (finish_try_block): Call start_catch_block() and
12981 end_catch_block().
12982 * parse.y (function_try_block): Call start_catch_block() and
12983 end_catch_block().
12984
12985 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
12986
12987 * typeck.c (original_type): New function.
12988 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12989 to see if they're actually the same.
12990 * cp-tree.h (original_type): Declare.
12991
12992 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12993
12994 * Makefile.in (lex.o): Depend on output.h.
12995
12996 * call.c (add_function_candidate): Remove unused variable `cand'.
12997 (add_conv_candidate): Likewise.
12998 (build_builtin_candidate): Likewise.
12999
13000 * cp-tree.h: Add prototype for `types_overlap_p'.
13001
13002 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
13003
13004 * decl2.c (merge_functions): Remove unused variables `tmp' and
13005 `tempn'.
13006
13007 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
13008 (code_as_string): Likewise.
13009 (language_as_string): Likewise.
13010 (parm_as_string): Likewise.
13011 (op_as_string): Likewise.
13012 (assop_as_string): Likewise.
13013 (cv_as_string): Likewise.
13014
13015 * lex.c: Include output.h.
13016
13017 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
13018
13019 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
13020 ATTRIBUTE_UNUSED.
13021
13022 * tinfo.cc (__class_type_info::dcast): Change the type of variable
13023 `i' from int to size_t.
13024
13025 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
13026 ATTRIBUTE_UNUSED.
13027
13028 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
13029
13030 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
13031 DECL_NAMESPACE_SCOPE_P.
13032 (lang_decl_name): Likewise.
13033 * pt.c (tsubst_friend_function, tsubst): Likewise.
13034 * decl.c (pushdecl, redeclaration_error_message, start_decl,
13035 cp_finish_decl, start_function): Likewise.
13036 * class.c (finish_struct_1): Likewise.
13037 * call.c (build_over_call): Likewise.
13038 (compare_ics): Use DERIVED_FROM_P.
13039
13040 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
13041
13042 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
13043 * method.c (build_mangled_name): Use it.
13044 (build_decl_overload_real): Likewise.
13045
13046 * error.c (dump_simple_decl): New function, broken out from ...
13047 (dump_decl): Use it.
13048
13049 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
13050
13051 * ptree.c (lang_print_xnode): Add missing `break'.
13052
13053 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
13054
13055 * call.c (add_template_candidate): Adjust for changes to
13056 fn_type_unification.
13057 (add_template_candidate_real): Likewise.
13058 (add_template_conv_candidate): Likewise.
13059 (build_user_type_conversion_1): Likewise.
13060 (build_new_function_call): Likewise.
13061 (build_object_call): Likewise.
13062 (build_new_op): Likewise.
13063 (build_new_method_call): Likewise.
13064 * class.c (instantiate_type): Likewise.
13065 * cp-tree.h (unification_kind_t): New type.
13066 (fn_type_unification): Adjust prototype.
13067 (type_unificaiton): Likewise.
13068 * pt.c (UNIFY_ALLOW_NONE): New macro.
13069 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
13070 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
13071 (UNIFY_ALLOW_DERIVED): Likewise.
13072 (unify): Change prototype.
13073 (maybe_adjust_types_for_deduction): New function.
13074 (check_cv_quals_for_unify): Likewise.
13075 (determine_specialization): Adjust.
13076 (fn_type_unification): Likewise.
13077 (type_unification): Likewise.
13078 (type_unification_real): Likewise. Use
13079 maybe_adjust_types_for_deduction. Fix mishandling of
13080 back-unification of template functions passed as arguments. Pass
13081 appropriate combination of UNIFY_ALLOW_* to unify.
13082 (unify): Remove unused NTPARMS parameter. Use
13083 check_cv_quals_for_unify. Remove bogus code that allowed
13084 too-generous unification in order to adhere more closely to standard.
13085 (get_bindings_real): Adjust.
13086 (get_class_bindings): Likewise.
13087
13088 * method.c (build_overload_identifier): Only use the innermost
13089 template arguments when mangling.
13090 * pt.c (tsubst_template_argument_vector): New function.
13091 (complete_template_args): Deal with the situation where the
13092 extra_args contain more than one level of arguments.
13093 (lookup_template_class): Deal with member template classes, which
13094 may have more than one level of arguments.
13095 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13096 Improve handling of member template classes. Use
13097 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
13098 tsubst_template_argument_vector where appropriate.
13099 (regenerate_decl_from_template): Break out from ...
13100 (instantiate_decl): Here.
13101
13102 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13103 * parse.h: Regenerated.
13104 * parse.c: Really regenerated.
13105
13106 * cp-tree.h (finish_unary_op_expr): New function.
13107 (finish_id_expr): Likewise.
13108 (begin_new_placement): Likewise.
13109 (finish_new_placement): Likewise.
13110 (finish_declarator): Likewise.
13111 (finish_translation_unit): Likewise.
13112 (finish_parmlist): Likewise.
13113 (begin_class_definition): Likewise.
13114 (finish_class_definition): Likewise.
13115 (finish_default_args): Likewise.
13116 (finish_inline_definitions): Likewise.
13117 * parse.y (GCC_ASM_KEYWORD): Remove.
13118 (TYPENAME_ELLIPSIS): Likewise.
13119 * parse.c: Regenerated.
13120 Use new functions in semantics.c in the actions for many rules.
13121 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13122 * hash.h: Regenerated.
13123 * semantics.c (finish_expr_stmt): Allow NULL expr.
13124 (finish_unary_op_expr): New function, containing
13125 code previously in parse.y.
13126 (finish_id_expr): Likewise.
13127 (begin_new_placement): Likewise.
13128 (finish_new_placement): Likewise.
13129 (finish_declarator): Likewise.
13130 (finish_translation_unit): Likewise.
13131 (finish_parmlist): Likewise.
13132 (begin_class_definition): Likewise.
13133 (finish_class_definition): Likewise.
13134 (finish_default_args): Likewise.
13135 (finish_inline_definitions): Likewise.
13136
13137 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
13138
13139 * typeck.c (build_c_cast): Don't decay arrays and functions to
13140 pointer type when converting to a class type.
13141
13142 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
13143
13144 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13145 (DECL_CLASS_SCOPE_P): Likewise.
13146
13147 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
13148
13149 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13150 * decl2.c (constructor_name_full): Likewise.
13151
13152 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
13153
13154 * tree.c (mapcar): Add OVERLOAD support.
13155
13156 * init.c (resolve_offset_ref): We must use basetype_path before we
13157 destroy it with a call to convert_pointer_to.
13158
13159 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13160
13161 * class.c (currently_open_class): New fn.
13162 * decl.c (lookup_name_real): Use it.
13163 * search.c (lookup_field): Likewise.
13164
13165 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
13166
13167 * cp-tree.def (OVERLOAD): New node.
13168 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13169 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13170 (NAMESPACE_BINDING): Remove.
13171 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13172 namespace_binding.
13173 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13174 Define.
13175 (tree_overload): New struct.
13176 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13177 (REAL_IDENTIFIER_TYPE_VALUE): Define.
13178 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13179 (lang_decl_flags): Remove in_namespace.
13180 (lang_decl): Remove chain.
13181 (DECL_CHAIN, DECL_NAMESPACE): Remove.
13182 (flag_honor_std): Declare extern.
13183 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13184 namespace_binding, set_namespace_binding,
13185 lookup_function_nonclass, cat_namespace_levels,
13186 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13187 scratch_ovl_cons, ovl_member, build_overload): Declare.
13188 (decl_list_length, get_namespace_id, current_namespace_id,
13189 overloaded_globals_p): Remove.
13190 (lookup_using_namespace, qualified_lookup_using_namespace): Change
13191 return type.
13192 (push_scratch_obstack): New macro.
13193 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13194 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13195 convs, fns.
13196 (build_new_function_call): Iterate using OVL_CHAIN.
13197 Print DECL_NAME in when reporting ambiguities.
13198 (build_object_call): Iterate using OVL_NEXT for fns, convs.
13199 (build_new_op): Call lookup_function_nonclass.
13200 Iterate using OVL_NEXT.
13201 (build_op_delete_call): Change detection of members.
13202 Do not wrap TREE_LIST around fields and single global functions.
13203 (build_over_call): Don't push a class level if the context is a
13204 namespace.
13205 (build_new_method_call): Iterate using OVL_NEXT.
13206 * class.c (add_method): Chain overloaded members using
13207 build_overload. Remove copying of method.
13208 (grow_method): When iterating through the obstack, expect OVERLOAD
13209 nodes. Chain overload members.
13210 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
13211 nodes in call to get_baselinks.
13212 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13213 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
13214 fdecls that are OVERLOAD nodes.
13215 (validate_lhs): New function.
13216 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
13217 code. Use DECL_NAME in error messages. Split code between global
13218 and member function processing.
13219 * decl.c (global_type_node): New static variable.
13220 (in_std): New global.
13221 (struct binding_level): New field usings.
13222 (resume_binding_level): Assert that we are not in a class.
13223 (toplevel_bindings_p): Just check for namespace_p or
13224 pseudo_global.
13225 (resume_level): Remove.
13226 (find_binding): New function.
13227 (binding_for_name): Call it.
13228 (namespace_binding, set_namespace_binding): New functions.
13229 (push_namespace): Associate binding level with new namespace,
13230 resume_binding_level for existing namespace. Remove old code.
13231 Fake std by counting.
13232 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13233 (maybe_push_to_top_level): Save current namespace.
13234 (pop_from_top_level): Restore saved namespace.
13235 (pop_namespace): Call suspend_binding_level. Remove old code.
13236 (cat_namespace_levels): New function.
13237 (set_identifier_type_value_with_scope): For namespace bindings,
13238 set BINDING_TYPE, and use global_type_node.
13239 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13240 (identifier_type_value): New function.
13241 (pushtag): If no context, use current_namespace.
13242 (duplicate_decls): Don't process DECL_CHAIN.
13243 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13244 already set. Never reset it to NULL_TREE. Lookup global variables
13245 in their namespace. Push overloaded templates if they are on
13246 namespace level.
13247 (pushdecl_namespace_level): New function.
13248 (pushdecl_top_level): Implement using pushdecl_namespace_level.
13249 (pushdecl_using_decl): New function.
13250 (overloaded_globals_p): Remove.
13251 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13252 them. Use namespace_binding and set_namespace_value.
13253 (redeclaration_error_message): Complain if the declarations come
13254 from different namespaces.
13255 (lookup_tag): On namespace level, look in the BINDING_TYPE.
13256 (lookup_namespace_name): Pass tree_bindings from stack. Remove
13257 old code.
13258 (select_decl): New function.
13259 (lookup_name_real): Call it for qualified and unqualified lookup.
13260 Pass tree_bindings from the stack.
13261 If prefer_type is 1, also accept namespaces.
13262 (lookup_function_nonclass): New function.
13263 (init_decl_processing): Set the binding level of the global
13264 namespace to global_binding_level.
13265 Build a proper type list for __builtin_apply.
13266 Initialize std_node to "fake std" if flag_honor_std is set.
13267 Initialize global_type_node.
13268 Allocated bad_alloc in namespace std if flag_honor_std.
13269 (define_function): Set the DECL_CONTEXT to the current_namespace.
13270 (start_decl): A namespace is not considered as a context here. If
13271 the DECL_CONTEXT is a namespace, push the decl.
13272 (cp_finish_decl): Check for namespaces used as initializers.
13273 (grokfndecl): Add namespace parameter. Remove processing of
13274 DECL_CHAIN.
13275 (grokvardecl): Add namespace parameter.
13276 (grokdeclarator): Process SCOPEs that are namespaces. For
13277 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13278 (start_function): Check for contexts that are namespaces.
13279 Set context for declarations that have not been pushed.
13280 (store_parm_decls): Check for ::main only.
13281 (finish_function): Likewise.
13282 (start_method): Check for contexts that are namespaces.
13283 (start_method): Remove DECL_CHAIN processing.
13284 * decl2.c (flag_honor_std): Declare.
13285 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13286 (decl_namespace_list): New static global.
13287 (grok_x_components): Ignore namespaces as type contexts.
13288 (check_classfn): Expect OVERLOAD nodes.
13289 (grokfield): Remove DECL_CHAIN processing.
13290 (finish_file): Call cat_namespace_levels.
13291 (merge_functions): New function.
13292 (ambiguous_decl): Rewrite.
13293 (lookup_using_namespace): Produce tree_bindings.
13294 (qualified_lookup_using_namespace): Likewise.
13295 (set_decl_namespace, decl_namespace, current_decl_namespace,
13296 push_decl_namespace, pop_decl_namespace): New functions.
13297 (arg_lookup): New struct.
13298 (add_function, arg_assoc_namespace, arg_assoc_class,
13299 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13300 New functions.
13301 (get_namespace_id, current_namespace_id): Remove.
13302 (do_toplevel_using_decl): Rewrite.
13303 (do_class_using_decl): Complain about namespace qualifiers.
13304 (do_using_directive): Sorry if not on namespace level. Complain
13305 about unknown namespaces.
13306 * error.c (dump_aggr_type): Check for namespace contexts.
13307 * except.c (init_exception_processing): Push terminate into std.
13308 * friend.c (is_friend): A namespace is not a context, here.
13309 * init.c (expand_member_init): Remove DECL_CHAIN processing.
13310 (build_offset_ref): Process OVERLOAD nodes.
13311 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13312 * lex.c (identifier_type): Loop using OVL_CHAIN.
13313 (see_typename): Set looking_for_typename to 2.
13314 (real_yylex): Likewise.
13315 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13316 (do_scoped_id): Expect OVERLOAD nodes.
13317 Change calling convention for qualified_lookup_using_namespace.
13318 (build_lang_decl): Don't set in_namespace anymore.
13319 * method.c (typevec_size): New global.
13320 (build_overload_nested_name): Return if global_namespace.
13321 Otherwise, always expect a declaration context.
13322 (build_qualified_name): Likewise.
13323 Make sure we don't write beyond typevec_size.
13324 (build_decl_overload_real): Likewise.
13325 Allocate one extra slot for the namespace.
13326 (hack_identifier): Mark code dead.
13327 Process OVERLOAD and NAMESPACE_DECL nodes.
13328 * parse.y (program): Pop namespaces until in global namespace.
13329 (extdef): In a using-declaration, don't discard the identifier if
13330 there is no declaration.
13331 (left_curly): Ignore type contexts which are namespaces.
13332 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13333 used as scope.
13334 * pt.c (template_class_depth): Expect types to be namespaces.
13335 (determine_specialization): Simplify by expecting OVERLOAD nodes.
13336 (push_template_decl): Push into namespace level.
13337 Reset ctx if it is a namespace.
13338 Set DECL_CONTEXT to current_namespace if not set already.
13339 Ignore real contexts that are namespaces.
13340 (mangle_class_name_for_template): Skip global_namespace.
13341 Mangle other namespaces as declarations.
13342 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13343 (lookup_template_class): Push into namespace of context.
13344 If the context is a namespace, set it to global_namespace.
13345 Use id_context for mangling.
13346 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13347 (tsubst_friend_function): Ignore namespace contexts.
13348 Push into namespace level.
13349 (tsubst): Handle NAMESPACE_DECL nodes.
13350 Remove DECL_CHAIN processing.
13351 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13352 * ptree.c (print_lang_identifier): Print bindings.
13353 (lang_print_xnode): Print OVERLOAD nodes.
13354 * rtti.c (init_rtti_processing): Push type_info into std.
13355 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13356 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13357 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13358 lookup_fnfields_here): Likewise.
13359 Process all nodes, instead of going through TREE_CHAIN.
13360 * sig.c (build_signature_pointer_or_reference_type): Set context
13361 to global_namespace.
13362 (build_signature_table_constructor): Expect OVERLOAD nodes.
13363 * spew.c (yylex): Save old setting of looking_for_typename.
13364 * tree.c (decl_list_length): Remove.
13365 (binding_init): New function.
13366 (count_functions): Rewrite.
13367 (is_overloaded_fn): Expect OVERLOAD nodes.
13368 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13369 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13370 ovl_member): New functions.
13371 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13372 (type_unknown_p): Likewise.
13373 (require_instantiated_type): Likewise.
13374 (build_component_ref): Declare code dead.
13375 (build_x_function_call): Create and expect OVERLOAD nodes.
13376 (build_function_call_real): Check for ::main only.
13377 (build_unary_op): Likewise. Expect OVERLOAD nodes.
13378 (convert_for_assignment): Check for TREE_LIST before accessing
13379 TREE_VALUE.
13380 * decl.c (duplicate_decls): Check for namespace bindings instead
13381 of global bindings.
13382 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13383 lookup_name_current_level, start_decl, xref_tag,
13384 finish_enum): Likewise.
13385 * init.c (build_offset_ref): Likewise.
13386 * search.c (lookup_field): Likewise.
13387 (lookup_fnfields): Likewise.
13388 (dfs_debug_mark): Likewise.
13389 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13390 (poplevel_class, pop_from_top_level): Likewise.
13391 * decl2.c (finish_method): Likewise.
13392 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13393 * decl.c (record_builtin_type): Likewise.
13394 (init_decl_processing, grokfndecl): Likewise.
13395 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13396 (make_lang_type): Likewise.
13397 * parse.y (make_thunk): Likewise.
13398 * pt.c (tsubst): Likewise.
13399 * tree.c (debug_binfo): Likewise.
13400 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13401 tinfo2.cc, inc/new.h: Add std qualifications.
13402 * inc/new: Wrap with namespace std if __HONOR_STD.
13403 * inc/typeinfo: Likewise.
13404
13405 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13406
13407 * call.c (build_user_type_conversion_1): Handle second_conv
13408 properly for templates.
13409
13410 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
13411
13412 * method.c (build_decl_overload_real): Set TREE_USED flag to
13413 zero for build_type_variants nodes as well.
13414
13415 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
13416
13417 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13418
13419 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
13420
13421 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13422 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13423 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13424 xref.o): Add toplev.h dependencies.
13425
13426 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
13427
13428 * errfn.c (cp_error, cp_warning): Remove declarations for
13429 error and warning respectively.
13430
13431 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13432
13433 * error.c: Convert to using ctype macros defined in system.h.
13434 * method.c: Likewise.
13435 * xref.c: Likewise.
13436 * lex.c: Likewise. Also remove redundant system header stuff.
13437
13438 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
13439
13440 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13441 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13442 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13443 xref.c: Add include of toplev.h.
13444
13445 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13446
13447 * tree.c (perm_manip): Also regenerate the RTL of an extern.
13448 (copy_to_permanent): Use end_temporary_allocation.
13449
13450 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
13451
13452 * init.c (expand_vec_init): The initialization of each array
13453 element is a full-expression.
13454
13455 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
13456
13457 * method.c (build_mangled_name): Add a call to build_type_variant
13458 to get the right type.
13459
13460 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
13461
13462 * Makefile.in: Add .SUFFIXES.
13463
13464 * cp-tree.def: Remove NAMESPACE_DECL.
13465
13466 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
13467
13468 * call.c (build_over_call): Do evaluate arg even if it has empty
13469 class type.
13470 * decl.c (start_function): Don't push a member function.
13471
13472 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
13473
13474 * Makefile.in (g++FAQ.info): Put -o option before input file.
13475
13476 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
13477
13478 * gxxint.texi: Add info for squangling codes K and B.
13479
13480 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
13481
13482 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13483 the expression in templates.
13484 (finish_stmt_expr): Likewise.
13485
13486 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
13487
13488 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13489
13490 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
13491
13492 * decl.c (maybe_push_to_top_level): Always clear
13493 current_template_parms and processing_template_decl.
13494 (pushtag): Remove check of current_class_type and some comments,
13495 since maybe_push_to_top_level no longer creates confusion.
13496
13497 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
13498
13499 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13500 (DECL_CLASS_TEMPLATE_P): Likewise.
13501 (DECL_PRIMARY_TEMPLATE): Likewise.
13502 (PRIMARY_TEMPLATE_P): Use it.
13503 (push_template_decl_real): New function.
13504 (redeclare_class_template): Take new template parameters as
13505 input.
13506 (is_specialization_of): New function.
13507 (comp_template_args): Declare.
13508 * decl.c (pushtag): Handle friend template classes.
13509 (xref_tag): Likewise. Use new calling convention for
13510 redeclare_class_template.
13511 * decl2.c (grok_x_components): Handle friend templates.
13512 * friend.c (is_friend): Use is_specialization_of where
13513 appropriate. Deal with friend class templates.
13514 (make_friend_class): Let a class template be friends with itself.
13515 * pt.c (comp_template_args): Remove declaration.
13516 (tsubst_friend_class): New function.
13517 (push_template_decl_real): New function.
13518 (push_template_decl): Use it.
13519 (redeclare_class_template): Adjust for new calling convention.
13520 (comp_template_args): Give it external linkage.
13521 (instantiate_class_type): Use tsubst_friend_class to deal
13522 with friend templates.
13523 * typeck.c (comptypes): Use comp_template_args, rather than
13524 expanding it inline.
13525 * parse.y (component_decl): Handle a nested template type
13526 like other component type declarations.
13527
13528 * pt.c (check_explicit_specialization): Handle overloaded
13529 constructors correctly.
13530
13531 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13532 (lookup_template_class): Use it.
13533
13534 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13535
13536 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
13537 * cp-tree.h: Add WRAPPER support.
13538 * call.c (add_candidate): Split out from add_*_candidate fns.
13539 (build_over_call): Take the candidate instead of function and args.
13540 Enforce access control here. Emit overload warnings here.
13541 (add_warning): New fn.
13542 (joust): Add WARN parm. If not set, call add_warning instead of
13543 printing a warning. Re-enable some warnings.
13544 (tourney): Pass it.
13545 (convert_like): Adjust.
13546 (build_new_op): Adjust.
13547 (build_new_function_call): Adjust.
13548 (build_user_type_conversion_1): Adjust.
13549 (USER_CONV_FN): Adjust.
13550 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13551 build_int_wrapper): New fns.
13552
13553 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
13554
13555 * pt.c (unify): Fix typo in previous change.
13556
13557 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13558
13559 * error.c (dump_type_real): Declare canonical_name.
13560
13561 * typeck.c (comp_target_types): Fix PMFs.
13562
13563 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
13564
13565 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13566 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13567 TEMPLATE_DECL.
13568
13569 * pt.c (tsubst): Decrease the template-level of
13570 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
13571 TEMPLATE_PARM_INDEX.
13572 (template_decl_level): New function.
13573 (unify): Make sure to record unifications for template
13574 parameters, even when the parameters exactly match the arguments.
13575 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13576 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
13577 aren't from the level we're currently working on.
13578
13579 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
13580
13581 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13582
13583 * decl2.c (check_member_template): Set DECL_IGNORED for member
13584 class templates, too.
13585
13586 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13587
13588 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13589
13590 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13591
13592 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
13593
13594 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13595 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13596 (init_decl_processing): Handle TI types.
13597 * typeck.c (unsigned_type, signed_type): Handle TI types.
13598
13599 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
13600
13601 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13602 New local added_libraries. Increment count when add library to
13603 arglist.
13604
13605 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
13606
13607 * cp-tree.h (type_as_string_real): New function.
13608 * pt.c (mangle_class_name_for_template): Use it.
13609 * error.c (dump_aggr_type): Change prototype.
13610 (dump_type_prefix): Likewise.
13611 (dump_type_suffix): Likewise.
13612 (dump_type_real): Convert from dump_type. If desired, the
13613 "canonica" name of a typedef, i.e., the name of the underlying
13614 type, can be printed.
13615 (dump_type): Call dump_type_real.
13616
13617 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
13618
13619 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13620
13621 * typeck.c (comp_target_types): Tweak pedantic case.
13622 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
13623 Return -1 or 1 instead of 1 or 2.
13624 (compparms): Remove STRICT handling.
13625 (convert_for_assignment): Fix handling of pmfs.
13626
13627 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
13628
13629 * typeck.c (comp_target_types): Handle references like pointers.
13630 (comp_target_parms): Note that return code from comp_target_types
13631 can be negative to indicate failure.
13632
13633 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13634
13635 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13636 which requires a working target compiler to build.
13637
13638 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
13639
13640 * tree.c (avoid_overlap): Add prototype.
13641
13642 * spew.c (num_tokens): Add prototype.
13643 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13644
13645 * search.c (dfs_check_overlap): Add prototype.
13646 (dfs_no_overlap_yet): Likewise.
13647
13648 * pt.c (original_template): Add prototype.
13649 (inline_needs_template_parms): Likewise.
13650 (push_inline_template_parms_recursive): Likewise.
13651 (retrieve_specialization, register_specialization): Likewise.
13652 (print_candidates, reduce_template_parm_level): Likewise.
13653 (build_template_decl, mark_template_parm): Likewise.
13654 (tsubst_friend_function, get_bindings_real): Likewise.
13655
13656 * method.c (start_squangling): Add prototype.
13657 (end_squangling, check_ktype, issue_ktype): Likewise.
13658 (build_overloaded_scope_ref, check_btype): Likewise.
13659 (build_mangled_template_parm_index): Likewise.
13660
13661 * lex.c (init_cpp_parse): Add prototype.
13662 (handle_cp_pragma, handle_sysv_pragma): Likewise.
13663 (reduce_cmp, token_cmp): Likewise.
13664
13665 * except.c (call_eh_info): Add prototype.
13666 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13667 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13668
13669 * decl2.c (is_namespace_ancestor): Add prototype.
13670 (namespace_ancestor, add_using_namespace): Likewise.
13671 (ambiguous_decl): Likewise.
13672
13673 * decl.c (indent): Add prototype.
13674
13675 * call.c (add_template_candidate_real): Add prototype.
13676
13677 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13678
13679 * decl2.c (build_expr_from_tree): Just return a PMF.
13680
13681 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
13682
13683 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13684 when doing initializations.
13685
13686 * pt.c (unify): Use comptypes to compare type args.
13687
13688 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
13689
13690 * decl.c (duplicate_decls): Fix check for when it's safe to free
13691 the new decl.
13692
13693 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13694 to type_as_string.
13695
13696 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
13697
13698 * pt.c (build_template_parm_index): Add prototype.
13699
13700 * search.c (my_tree_cons): Don't clear words outside the
13701 newly allocated node.
13702
13703 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
13704
13705 * lex.c (init_parse): Now returns char* containing the filename.
13706
13707 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
13708 Jeff Law <law@cygnus.com>
13709
13710 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13711 than a pointer.
13712
13713 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13714
13715 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13716
13717 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13718
13719 * decl.c (duplicate_decls): Don't warn for redundant decls if
13720 friend: let add_friend take care of it.
13721
13722 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13723
13724 * sig.c (build_signature_pointer_constructor): Don't set
13725 TREE_HAS_CONSTRUCTOR for a signature pointer.
13726 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13727 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13728 here, too.
13729 * typeck.c (build_unary_op): Only allow taking the address of a
13730 real constructor.
13731 * typeck2.c (digest_init): Simplify.
13732 (store_init_value): Don't pedwarn about using { } for pmfs.
13733
13734 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13735
13736 * cp-tree.h (start_decl): Update prototype.
13737 * decl.c (start_decl): Like the C version, new parameters
13738 for the attributes. Call cplus_decl_attributes here,
13739 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13740 (grokdeclarator): Pass NULL for new start_decl arguments.
13741 * pt.c (tsubst_expr): Likewise.
13742 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13743 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13744 * lex.c (build_lang_decl): Add lang_name_java.
13745 * class.c (push_lang_context): Add lang_name_java.
13746 * method.c (build_mangled_name): Check for is_java_type.
13747
13748 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13749
13750 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13751 * call.c (build_scoped_method_call): Check for TREE_CODE for
13752 VOID_TYPE instead of type == void_type_node.
13753 (build_method_call): Likewise.
13754 * decl.c (lookup_name_real): Likewise.
13755 (grokdeclarator): Likewise.
13756 (start_decl): Likewise.
13757 (grokparms): Likewise.
13758 (start_function): Likewise.
13759 (finish_function): Likewise.
13760 (start_method): Likewise.
13761
13762 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13763
13764 * lex.c (finput): New variable.
13765 (init_cpp_parse): Renamed from init_parse.
13766 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13767 (finish_parse): New function.
13768 * cp-tree.h (init_lex, init_parse): Remove declarations.
13769
13770 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13771
13772 * call.c (build_call): Still evaluate the actual argument.
13773 * class.c (is_empty_class): Update for -fnew-abi.
13774
13775 * decl2.c: -fnew-abi implies -fsquangle.
13776
13777 * method.c (do_build_assign_ref): Don't do anything to copy
13778 an empty class.
13779 (do_build_copy_constructor): Likewise.
13780 * call.c (build_over_call): Likewise.
13781
13782 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13783
13784 * tree.c (avoid_overlap): Return a value.
13785
13786 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13787
13788 * method.c (check_btype): Add missing argument to xrealloc.
13789 (check_ktype): Likewise.
13790
13791 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13792
13793 Implement empty base optimization.
13794 * class.c (finish_struct_1): Add vbase fields earlier. Set
13795 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13796 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13797 (types_overlap_p): New fn.
13798 * tree.c (avoid_overlap): New fn.
13799 (build_base_fields): Use it to avoid overlapping empty bases.
13800 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13801
13802 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13803
13804 Re-implement allocation of base class subobjects.
13805 * tree.c (unshare_base_binfos): New fn.
13806 (layout_basetypes): Use it. Now handles offsets of both virtual and
13807 non-virtual bases, after layout_type.
13808 (layout_vbasetypes): Remove.
13809 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13810 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13811 * class.c (finish_base_struct): Lose offset handling code.
13812 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13813 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13814 * cp-tree.h: Adjust.
13815
13816 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13817
13818 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13819 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13820 * class.c (duplicate_tag_error): Likewise.
13821 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13822 * tree.c (layout_vbasetypes): Update from layout_record, remove
13823 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13824 (layout_basetypes): Likewise.
13825
13826 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13827
13828 * class.c, Make sure system.h is included just after config.h.
13829 Delete lingering stdio and errno references too.
13830 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13831
13832 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13833
13834 * friend.c (is_friend): Fix access control for local classes.
13835
13836 * class.c (is_empty_class): New fn.
13837 * call.c (build_call): Don't pass empty class objects to a function.
13838
13839 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13840
13841 * call.c (build_over_call): Do name resolution for default
13842 arguments of function templates in the scope of the templates.
13843
13844 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13845
13846 * call.c: Include system.h. Remove includes, declarations and
13847 defines provided by system.h.
13848 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13849 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13850 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13851 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13852 * typeck2.c, xref.c: Likewise.
13853 * Makefile.in: Dependencies updated as appropriate.
13854 * Make-lang.in: Likewise.
13855
13856 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13857
13858 * pt.c (fn_type_unification): Allow incomplete unification without
13859 an immediate error message.
13860
13861 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13862
13863 * tree.c (member_p): New fn.
13864 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13865 initializing class members.
13866
13867 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13868 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13869
13870 * call.c (build_method_call): Handle non-scoped destructors, too.
13871 * pt.c (tsubst_copy): Likewise.
13872
13873 * pt.c (print_template_context): Split out...
13874 (push_tinst_level): ...from here.
13875
13876 * friend.c (is_friend): Don't pass a type to decl_function_context.
13877
13878 * typeck.c (convert_for_initialization): Always hand off
13879 conversions to class type.
13880
13881 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13882
13883 * friend.c (is_friend): Local classes have the same access as the
13884 enclosing function.
13885
13886 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13887
13888 * typeck.c (expand_target_expr): Delete dead function.
13889
13890 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13891
13892 * repo.c (save_string): Delete dead function.
13893
13894 * method.c (thunk_printable_name): Delete dead function.
13895
13896 * lex.c (yynextch): Delete dead function.
13897
13898 * expr.c (tree_extract_aggr_init): #if 0 out.
13899
13900 * except.c (do_unwind): Delete dead function.
13901 (easy_expand_asm): Likewise.
13902
13903 * cvt.c (build_conversion_type_1): Delete dead function.
13904
13905 * cp-tree.h (push_expression_obstack): Declare.
13906
13907 * call.c (source_type): #if 0 out.
13908
13909 * class.c (alter_access): Remove unused label. Add braces
13910 around empty else clause.
13911
13912 * lex.c (yyprint): Fix argument to printf.
13913
13914 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
13915
13916 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13917
13918 * pt.c (instantiate_class_template): Make sure template
13919 arguments are permanent.
13920 * init.c (resolve_offset_ref): Don't go looking around in
13921 template types.
13922
13923 * semantics.c: Add routines to handle expressions, and some
13924 declaration processing.
13925 * parse.y: Use them.
13926 (current_class_depth): Move declaration to cp-tree.h.
13927 * parse.c: Regenerated.
13928 * cp-tree.h: Use them.
13929 (current_class_depth): Declare.
13930 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13931
13932 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
13933
13934 * error.c (dump_decl): Be a bit more explicit with template
13935 type arguments, when verbose.
13936
13937 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13938
13939 * inc/exception: Reorder closing braces.
13940
13941 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
13942
13943 * pt.c (redeclare_class_template): New function.
13944 * cp_tree.h (redeclare_class_template): Declare it.
13945 * decl.c (xref_tag): Use it.
13946
13947 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
13948
13949 * call.c (build_over_call): Check IS_AGGR_TYPE, not
13950 TYPE_LANG_SPECIFIC.
13951 * typeck.c (convert_arguments): Likewise.
13952
13953 * decl.c (grokdeclarator): Remove const and volatile from type after
13954 setting constp and volatilep.
13955
13956 * class.c (finish_struct_1): Don't warn about bool bitfield larger
13957 than one bit.
13958
13959 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
13960
13961 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13962
13963 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
13964
13965 * call.c (build_object_call): Complain about ambiguous operator(),
13966 rather that crashing.
13967 (build_new_op): Likewise.
13968 (build_op_delete_call): Likewise.
13969
13970 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
13971
13972 * cvt.c (perform_qualification_conversions): Use comp_target_types
13973 instead of comp_ptr_ttypes.
13974
13975 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
13976
13977 * cp-tree.h (enforce_access): Declare.
13978 * call.c (enforce_access): Make it extern, not static.
13979 * class.c (alter_access): Use enforce_access; modify code for ISO
13980 compliance, rather than ARM rules.
13981
13982 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13983
13984 * cp-tree.h: Fix typo.
13985
13986 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13987
13988 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13989 if (aggregate_value_p (type)).
13990
13991 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13992
13993 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
13994
13995 * tree.c (mapcar): When dealing with a DECL, use it's constant
13996 value, if any.
13997 * pt.c (lookup_template_class): Don't mangle the names of template
13998 classes whose arguments are unknown.
13999
14000 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
14001
14002 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14003
14004 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
14005
14006 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
14007
14008 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
14009 boolean_type_node to 1.
14010
14011 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
14012
14013 * error.c (dump_expr): Remove unused variable `l'.
14014
14015 * pt.c (for_each_template_parm): New function, created by
14016 converting uses_template_parms.
14017 (tree_fn_t): New typedef.
14018 (uses_template_parms): Use it.
14019 (mark_template_parm): New function.
14020 (push_template_decl): Check that the argument list of a partial
14021 specialization uses all the template parameters.
14022
14023 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
14024 with it; we might want it for debugging.
14025 * cp-tree.h (type_unification): Change interface.
14026 * class.c (finish_struct_1): Skip nested template types, just like
14027 ordinary nested types.
14028 (instantiate_type): Use new interface to type_unification.
14029 * lex.c (init_lex): Add __sz as opname for sizeof.
14030 * method.c (build_overload_scope_ref): New function.
14031 (build_overload_int): Handle complex expressions. Set
14032 numeric_output_need_bar if necessary.
14033 (build_overload_value): Handle non-PARM_DECL nodes; this
14034 routine is now used by build_overload_int. Remove some
14035 assignments to numeric_output_need_bar. Use
14036 build_overload_scope_ref.
14037 (build_qualified_name): Note that some template mangled names end
14038 with digits, and set numeric_output_need_bar appropriately. Use
14039 build_underscore_int.
14040 * pt.c (unify): Change interface.
14041 (type_unification_real): Likewise.
14042 (determine_specialization): Use new interfaces.
14043 (tsubst): Deal gracefully with situations in which the argument
14044 vector is not fully filled.
14045 (fn_type_unification): Use new interfaces.
14046 (type_unification): Likewise. Remove NOP_EXPR hack.
14047 (type_unification_real): Likewise.
14048 (unify): Likewise. Deal with unification of complex expressions.
14049
14050 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14051
14052 * pt.c (complete_template_args): Initialize skip properly.
14053
14054 * decl.c (make_typename_type): Revert.
14055 (make_implicit_typename): Remove.
14056 (lookup_name_real): Don't call it. Call lookup_field if we see a
14057 TYPE_DECL from a template base.
14058 * search.c (lookup_field): Do implicit typename stuff.
14059
14060 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
14061 Geoff Noer <noer@cygnus.com>
14062
14063 * Makefile.in: Various fixes for building cygwin32 native toolchains.
14064 * Make-lang.in: Likewise.
14065
14066 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14067
14068 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
14069
14070 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
14071
14072 * decl.c (make_implicit_typename): Rewrite removed code.
14073 (make_typename_type): Call it if the type we look up comes from
14074 a base that uses template parms.
14075
14076 * pt.c (complete_template_args): Rewrite.
14077 (tsubst, FUNCTION_DECL): Use it.
14078
14079 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
14080
14081 * semantics.c (finish_asm_stmt): Fix combine strings. Call
14082 c_expand_asm_operands () if output_operands, input_operands or
14083 clobbers is not NULL_TREE.
14084
14085 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14086
14087 * pt.c (complete_template_args): New function.
14088 (get_bindings): Deal with specializations of function templates
14089 with return type containing parameters from outer class
14090 templates.
14091 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
14092 substitute arguments and compose a new type.
14093
14094 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
14095
14096 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14097 FUNCTION_DECLs.
14098
14099 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
14100
14101 * decl.c (make_implicit_typename): Lose useless code.
14102
14103 * call.c (standard_conversion): Handle A* -> const A* properly.
14104
14105 * pt.c (get_bindings_real): Rename from get_bindings. Add
14106 check_rettype parm.
14107 (get_bindings): Pass 1.
14108 (get_bindings_overload): Pass 0.
14109
14110 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
14111
14112 * pt.c (check_explicit_specialization): When reverting a static
14113 member function, also remove the `this' parameter from
14114 last_function_parms.
14115
14116 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14117
14118 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14119 a function context.
14120
14121 * decl.c (store_bindings): Use free_binding_vecs.
14122 (pop_from_top_level): Likewise.
14123
14124 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14125
14126 * decl.c (make_implicit_typename): Only change the type of a
14127 TYPENAME_TYPE.
14128
14129 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
14130
14131 * semantics.c: New file, containing routines to perform the
14132 semantic phase of parsing.
14133 * parse.y: Use it.
14134 * pt.c (tsubst_expr): Likewise.
14135 * cp-tree.h: Declare the various functions in semantics.c.
14136 Provide macros to access _STMT tree nodes.
14137 * cp-tree.def: Add ASM_STMT tree node.
14138 * Makefile.in, Make-lang.in: Add dependencies on and for
14139 semantics.c.
14140
14141 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
14142
14143 * pt.c (push_template_decl): Only check primary templates.
14144
14145 * pt.c (check_explicit_specialization): Complain about default args
14146 in explicit specialization.
14147
14148 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14149 constructor_declarator.
14150
14151 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
14152
14153 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14154 has no overloaded operator ->.
14155
14156 * call.c (build_field_call): Don't crash when presented with a
14157 field that is actually a nested type.
14158
14159 * decl.c (pushtag): Deal with friend class injection in local
14160 classes.
14161
14162 * call.c (build_object_call): Don't crash if OBJ is a
14163 pointer-to-member-function.
14164
14165 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14166
14167 * pt.c (push_template_decl): Complain about template with C linkage,
14168 anonymous template class.
14169
14170 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
14171
14172 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14173 * search.c: Likewise.
14174
14175 * lex.c (do_pending_defargs): Only call
14176 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14177
14178 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14179
14180 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
14181
14182 * parse.y: Deal with CONSTRUCTORS in new_initializers.
14183
14184 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
14185
14186 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14187 closely mimics the behavior in parse.y.
14188 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14189 into a compound statement.
14190
14191 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
14192
14193 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14194 * pt.c (inline_needs_template_parms): New fn.
14195 (original_template): New fn.
14196 (push_inline_template_parms_recursive): New fn.
14197 (maybe_begin_member_template_processing): Use them.
14198 (maybe_end_member_template_processing): Likewise.
14199 (is_member_or_friend_template): Rename to is_member_template.
14200 Member functions of local classes are never member templates.
14201
14202 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14203
14204 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14205 added in the class scope to catch redefinition error.
14206
14207 * pt.c (reduce_template_parm_level): Also copy
14208 the DECL_TEMPLATE_PARMS field.
14209
14210 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
14211
14212 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14213 reduced-level template type parameter.
14214
14215 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
14216
14217 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14218 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14219 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14220 * decl.c (duplicate_decls): Propagate it.
14221 * typeck2.c (abstract_virtuals_error): Use two loops to emit
14222 abstract virtual functions and virtual functions which need a
14223 final overrider separately.
14224
14225 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
14226
14227 * lang-specs.h: Properly put brackets around array elements in
14228 initializer.
14229
14230 * typeck.c (build_binary_op_nodefault): Correctly place parens around
14231 && and || in expression.
14232
14233 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
14234
14235 * call.c (default_parm_conversions): Remove prototype definition.
14236 (build_method_call): Remove unused variable result.
14237
14238 * cvt.c (ocp_convert): Remove unused variable conversion.
14239
14240 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14241
14242 * except.c (do_unwind): #if 0 definition of unused variables fcall
14243 and next_pc.
14244
14245 * expr.c (extract_scalar_init): #if 0 prototype and function
14246 definition.
14247
14248 * init.c (expand_aggr_init_1): Remove unused variable init_type.
14249 (build_new_1): Remove unused variable t.
14250
14251 * pt.c (instantiate_class_template): Remove unused variable newtag;
14252 cast called function return value to void.
14253 (do_decl_instantiation): Remove unused variables name and fn.
14254
14255 * tree.c (get_type_decl): Add default return to shut up compiler from
14256 complaining control reaches end of non-void function.
14257
14258 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14259
14260 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
14261
14262 * call.c (default_parm_conversions): Remove prototype definition.
14263 (build_method_call): Remove unused variable result.
14264 (build_over_call): Add default case in enumeration switch.
14265
14266 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
14267
14268 * decl2.c (lang_decode_option): Change j's type to size_t.
14269
14270 * tree.c (layout_vbasetypes): record_align and desired_align are of
14271 type unsigned int; const_size and nonvirtual_const_size likewise.
14272
14273 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
14274
14275 * parse.y (new_initializer): Make sure all initializers are
14276 lists.
14277
14278 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
14279
14280 * decl2.c (import_export_decl): Mark tinfo functions for
14281 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14282
14283 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
14284
14285 * method.c: Fix typo.
14286
14287 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14288
14289 * method.c: Include "system.h" to get stdlib.h, stdio.h,
14290 ctype.h, string.h, etc.
14291 (issue_nrepeats): Add default case in enumeration switch.
14292 (check_btype): Likewise.
14293 (process_overload_item): Likewise.
14294
14295 * Makefile.in (method.o): Depend on system.h.
14296
14297 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14298
14299 * lex.c (do_scoped_id): Fix parenthesizing.
14300
14301 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
14302
14303 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14304 FLAG_RTTI is unset, initialize type info machinery and continue
14305 with FLAG_RTTI enabled.
14306 (get_typeid): Likewise.
14307
14308 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14309
14310 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14311 from B.
14312
14313 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
14314
14315 * pt.c (finish_member_template_decl): Deal more gracefully with
14316 invalid declarations.
14317
14318 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
14319
14320 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14321 cp-tree.h: Clean up more old overloading code, old RTTI code, and
14322 some formatting quirks.
14323
14324 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14325 method.c, pt.c, ptree.c, typeck.c: Remove support for
14326 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14327 * class.h: Remove.
14328 * Makefile.in: Adjust.
14329
14330 * pt.c (unify): Don't allow reduced cv-quals when strict.
14331
14332 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14333 *type_unification* and unify.
14334
14335 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
14336
14337 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14338 (nested_name_specifier): And add it before this use.
14339 (typename_sub0): And this use. Also add use without the keyword.
14340 (typename_sub1): Likewise.
14341 * pt.c (instantiate_class_template): Don't actually instantiate
14342 anything if our type uses template parms.
14343
14344 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
14345
14346 * decl.c (start_function): Don't call temporary_allocation for a
14347 nested function.
14348
14349 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14350
14351 * pt.c (instantiate_class_template): Don't mess with friends if
14352 our type uses template parms.
14353
14354 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14355
14356 * parse.y (nested_name_specifier): Use explicit_template_type.
14357 (typename_sub): Allow a template_type, an explicit_template_type,
14358 or an implicit template type at the end.
14359 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14360 * decl.c (make_typename_type): Handle template-id where the name
14361 is a TEMPLATE_DECL.
14362 * call.c (build_scoped_method_call): Handle member template
14363 destructor call.
14364 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14365 destructor is represented by the type.
14366
14367 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14368 * parse.y (nested_name_specifier): Add 'template' case.
14369 (explicit_template_type): New rule.
14370 (typename_sub): Use it.
14371 * decl.c (make_typename_type): Handle getting a template-id for NAME.
14372 * pt.c (tsubst): Likewise.
14373
14374 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
14375
14376 * pt.c (add_to_template_args): Fix thinko.
14377 (instantiate_class_template): Call it later.
14378
14379 * pt.c (get_class_bindings): Add outer_args parm.
14380 (most_specialized_class): Likewise.
14381 (instantiate_class_template): Pass it.
14382 (more_specialized_class): Likewise.
14383 (lookup_template_class): Get context from template if none
14384 was specified.
14385 (finish_member_template_decl): Don't do anything with a
14386 partial specialization.
14387 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14388 AGGREGATE_TYPE_P.
14389 * class.c (finish_struct): Member class templates have already been
14390 checked for name clashes.
14391 * decl.c (pushdecl_with_scope): Handle pushing at class level.
14392
14393 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14394
14395 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14396 (tsubst, *_PARM): Support multiple levels of template classes.
14397 (instantiate_class_template): Look up the pattern from the
14398 original template.
14399 (lookup_template_class): Handle getting a template for d1.
14400 (push_template_decl): Correct setting of 'primary'.
14401 (reduce_template_parm_level): Add 'levels' parm.
14402 (finish_member_template_decl): Support member class templates.
14403 (template_class_depth): Handle multiple levels.
14404 * parse.y (component_decl_1, fn.def2): Remove member template case.
14405 (component_decl): Add member template cases.
14406 * decl2.c (check_member_template): We now handle member template
14407 classes.
14408 * decl.c (pushtag): Handle member templates.
14409 * method.c (do_inline_function_hair): Don't touch
14410 IDENTIFIER_GLOBAL_VALUE.
14411 * init.c (build_offset_ref): If name isn't an identifier, just
14412 return it.
14413 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14414
14415 * typeck.c (get_delta_difference): Do adjust for conversions to
14416 and from virtual base.
14417
14418 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
14419
14420 * typeck.c (get_delta_difference): Give hard error for conversion
14421 from virtual base.
14422
14423 * cp-tree.h: Tweak formatting.
14424
14425 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
14426
14427 * decl.c (push_namespace): Handle redeclaration error.
14428
14429 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14430 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14431 (NAMESPACE_BINDING): New macro.
14432 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14433 * *.c: Use them.
14434
14435 * pt.c (push_template_decl): Use innermost_args.
14436
14437 * decl.c (get_unique_name): Tweak from earlier in the name.
14438
14439 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14440
14441 * cp-tree.def: Add CPLUS_BINDING node.
14442 * cp-tree.h (tree_binding): New struct.
14443 (BINDING_SCOPE, BINDING_VALUE): New macros.
14444 (current_namespace, global_namespace): Declare extern.
14445 (struct lang_decl_flags): New field in_namespace.
14446 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14447 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14448 (TREE_INDIRECT_USING): New macro.
14449 * decl2.c (current_namespace, global_namespace): Declare. The
14450 value is a NAMESPACE_DECL now, not a TREE_LIST.
14451 (is_namespace_ancestor, namespace_ancestor): New static functions.
14452 (add_using_namespace, ambiguous_decl): Likewise.
14453 (lookup_using_namespace): New support function for lookup_name.
14454 (qualified_lookup_using_namespace): New support function for
14455 do_scoped_id and lookup_namespace_name.
14456 (get_namespace_id): Mark as obsolete.
14457 (current_namespace_id): Likewise.
14458 (do_namespace_alias): Implement.
14459 (do_using_directive): Implement as call to add_using_namespace.
14460 * decl.c (binding_for_name): New function.
14461 (push_namespace, pop_namespace): Implement.
14462 (push_decl): Don't install a FUNCTION_DECL in the global branch.
14463 (lookup_namespace_name): Implement using qualified lookup.
14464 (lookup_name_real): For global scoping, lookup in
14465 global_namespace. For namespace scoping, lookup in given
14466 namespace. For unscoped lookup, iterate over namespace,
14467 considering using directives.
14468 (init_decl_processing): Initialize global_namespace.
14469 (grokvardecl): Build assembler name as static name for globals.
14470 (grokdeclarator): Remove old namespace mangling.
14471 (xref_tag): When installing a global binding for the
14472 tag, make sure we have an identifier.
14473 * method.c (build_overload_nested_name): Mangle namespaces.
14474 (build_qualified_name): Likewise.
14475 (build_decl_overload_real): Likewise.
14476 * lex.c (build_lang_decl): Set namespace for new declaration to
14477 current_namespace.
14478 (do_scoped_id): Find global names in global or current
14479 namespace, or using qualified namespace lookup, depending on
14480 context.
14481 * init.c (build_member_call): When scope is namespace, use
14482 build_x_function_call instead.
14483 (build_offset_ref): When scope is namespace, collapse processing
14484 to lookup_namespace_name instead.
14485 * error.c (dump_decl): Support NAMESPACE_DECL.
14486 * decl.c (pushdecl): Bind globals to current namespace.
14487 (push_overloaded_decl): Likewise.
14488 (lookup_tag): Likewise.
14489 (lookup_name_current_level): Likewise.
14490 (xref_tag): Likewise.
14491 (start_function): Likewise.
14492 * lex.c (do_identifier): Likewise.
14493 (identifier_typedecl_value): Likewise.
14494 (real_yylex): Likewise.
14495 * method.c (do_inline_function_hair): Likewise.
14496 * parse.y (unscoped): Likewise.
14497 * pt.c (check_explicit_specialization): Likewise.
14498 (lookup_template_class): Likewise.
14499 * rtti.c (call_void_fn): Likewise.
14500 * sig.c (build_sigtable): Likewise.
14501 * ptree.c (lang_print_xnode): New function.
14502
14503 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
14504
14505 * pt.c (instantiate_class_template): Don't instantiate if pedantic
14506 and the args use template parms.
14507
14508 * pt.c (push_tinst_level): If the instantiation uses template parms,
14509 fail silently.
14510 * decl.c (xref_basetypes): Do call complete_type for basetypes
14511 that involve template parameters.
14512
14513 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14514
14515 * typeck2.c (process_init_constructor): Fix labeled init check.
14516
14517 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14518
14519 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14520 argument to tsubst and friends.
14521
14522 * pt.c (tsubst, FUNCTION_DECL): Tidy.
14523
14524 * typeck.c (build_x_function_call): Handle static member function
14525 templates like non-templates. Handle friend templates like normal
14526 function templates.
14527 * pt.c (tsubst, *_PARM): Don't use orig_level.
14528 (get_bindings): Don't call add_to_template_args.
14529 (instantiate_template): Likewise.
14530 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14531 * ptree.c (print_lang_type): Print index/level for template parms.
14532
14533 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
14534
14535 * Make-lang.in (cc1plus): Note that cc1plus depends on
14536 cp/cp-tree.h and cp/cp-tree.def.
14537
14538 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14539 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14540 position in a template parameter list.
14541 * cp-tree.h (template_parm_index): New structure, used as the tree
14542 structure for a TEMPLATE_PARM_INDEX.
14543 (TEMPLATE_PARM_IDX): New macro.
14544 (TEMPLATE_PARM_LEVEL): Likewise.
14545 (TEMPLATE_PARM_DESCENDANTS): Likewise.
14546 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14547 (TEMPLATE_PARM_DECL): Likewise.
14548 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14549 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14550 (TEMPLATE_TYPE_DECL): Likewise.
14551 (TEMPLATE_CONST_IDX): Remove.
14552 (TEMPLATE_CONST_LEVEL): Likewise.
14553 (TEMPLATE_CONST_SET_INFO): Likewise.
14554 (TEMPLATE_TYPE_SET_INFO): Likewise.
14555 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14556 node.
14557 (TEMPLATE_TYPE_LEVEL): Likewise.
14558 * decl.c (decls_match): Call comp_template_parms, rather than
14559 expanding it inline.
14560 (duplicate_decls): If two template declarations are being merged,
14561 then their TEMPLATE_INFOs should be merged as well.
14562 (grokfndecl): Save template-id information when declaring a friend
14563 with explicit template arguments. Pass arguments to
14564 check_explicit_specialization via correct convention; at some
14565 point check_explicit_specialization changed, but these call-sites
14566 did not.
14567 (grokdeclarator): Tidy up slightly.
14568 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
14569 two template functions with the same DECL_ASSEMBLER_NAME the same,
14570 since the names are not yet mangled.
14571 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14572 TEMPLATE_CONST_PARM.
14573 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
14574 decl for a non-type parameter, rather than printing `<tparm ...>'.
14575 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14576 (do_friend): Deal with template friends.
14577 * lex.c (do_pending_inlines): Call
14578 maybe_begin_member_template_processing, rather than
14579 conditionally calling begin_member_template_processing.
14580 (process_next_inline): Likewise. Call
14581 maybe_end_member_template_processing, rather than
14582 conditionally calling end_member_template_processing.
14583 (do_pending_defargs): Likewise.
14584 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14585 TEMPLATE_CONST_PARM.
14586 * method.c (build_mangled_template_parm_index): New function.
14587 (build_overload_value): Use it.
14588 (build_overload_name): Likewise.
14589 * pt.c (finish_member_template_decl): Allow friend declarations.
14590 (template_class_depth): New function.
14591 (is_member_template): Rename, and modify, to become...
14592 (is_member_or_friend_template): New function.
14593 (end_member_template_processing): Rename, and modify, to become...
14594 (maybe_end_member_template_processing).
14595 (build_template_parm_index): New function.
14596 (reduce_template_parm_level): New function.
14597 (process_template_parm): Modify to use build_template_parm_index.
14598 (push_template_decl): Deal with friend templates.
14599 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14600 TEMPLATE_CONST_PARM.
14601 (tsubst_friend_function): New function.
14602 (instantiate_class_template): Generate the DECL_FRIENDLIST
14603 for a new instantiation by using tsubst_friend_function rather
14604 than just tsubst.
14605 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14606 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14607 appropriate new macros. Use reduce_template_parm_level to
14608 generate lower-level template parameters. Handle tsubst'ing into
14609 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
14610 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14611 templates. Similarly for the template parameters for a new
14612 template.
14613 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
14614 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
14615 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14616 (get_bindings): Call add_to_template_args if necessary.
14617 (instantiate_decl): Handle instantiations of friend templates.
14618 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14619 TEMPLATE_TYPE_PARM as a list of fields; it's not!
14620 * spew.c (yylex): Do a little manual constant propagation to
14621 clarify the code.
14622
14623 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
14624
14625 * error.c: Include sys/types.h.
14626
14627 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
14628
14629 * method.c (build_mangled_name): Start CPP directives in column zero.
14630
14631 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14632
14633 * typeck2.c (process_init_constructor): Sorry about non-trivial
14634 labeled initializers.
14635 * parse.y (initlist): Re-enable labeled initializers.
14636
14637 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14638
14639 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14640 all callers changed. Rely on the new parameter instead of arg
14641 being a TREE_LIST when determine whether we are working inside
14642 template template parameter. Clean up is_type test.
14643
14644 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
14645
14646 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14647 * typeck2.c (initializer_constant_valid_p): Allow conversions
14648 between pointers and references.
14649
14650 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
14651
14652 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14653 if pedantic || warn_pointer_arith.
14654
14655 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14656
14657 * pt.c (unify): Handle TEMPLATE_DECL.
14658
14659 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
14660
14661 * cp-tree.h (strip_attrs): Remove decl.
14662
14663 1998-02-18 Doug Evans <devans@cygnus.com>
14664
14665 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14666 Update olddecl's attributes too.
14667 (strip_attrs): Remove function.
14668 * typeck.c (common_type): Call merge_machine_type_attributes.
14669
14670 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
14671
14672 * parse.y (initdcl0_innards): New grammar symbol.
14673 (nomods_initdecls, nomods_initdcl0): Change type from itype to
14674 none, since the resulting value is never used.
14675 (parse_decl): New function.
14676 (datadef): Remove redundant actions.
14677 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14678 * parse.c: Regenerated.
14679
14680 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14681
14682 * parse.y (simple_stmt): Use getdecls() to check for decl.
14683
14684 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
14685
14686 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14687 macros.
14688 (c++.install-common): Install c++filt properly as native or as cross
14689 variant.
14690 (c++.uninstall): Add c++filt.
14691
14692 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14693
14694 * call.c (standard_conversion): Fix multi-level ptr conversions.
14695
14696 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
14697
14698 * init.c (build_new): Propagate error_mark_node up.
14699
14700 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
14701
14702 * parse.y (simple_stmt): If the condition isn't a declaration,
14703 start the controlled block after the test.
14704
14705 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14706
14707 * call.c (build_over_call): Convert builtin abs, labs and fabs to
14708 tree-codes.
14709 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14710 builtins.
14711
14712 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14713
14714 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14715
14716 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
14717
14718 * cp-tree.h: Add access_protected_virtual_node.
14719 * class.c (init_class_processing): Initialize it.
14720 * decl.c (xref_basetypes): Use it.
14721 * parse.y (base_class_access_list): Likewise.
14722
14723 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14724 (c++.install-common): Install c++filt.
14725
14726 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14727
14728 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14729
14730 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
14731
14732 * call.c (reference_binding): Use comptypes when comparing
14733 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14734
14735 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14736
14737 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14738 (really_overloaded_fn): Move check here from is_overloaded_fn.
14739 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14740
14741 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14742
14743 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14744 conversions.
14745
14746 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14747
14748 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14749 equivalent duplicate.
14750 * decl.c (pushtag): Use the return value from push_template_decl.
14751 (duplicate_decls): When duplicating a template declaration, merge
14752 the DECL_TEMPLATE_RESULTs as well.
14753 (make_implicit_typename): Don't try to dive into typename types to
14754 find a context for making a new implicit typename.
14755 (start_decl): Use the return value from push_template_decl.
14756 (grokdeclarator): Complain about declarations list `const operator
14757 int'. Since we don't correctly handle in-class initializations of
14758 non-static data members, complain about this (now illegal)
14759 practice. Issue an error for initializations of non-const statics
14760 since that is illegal as well, and since we don't handle that case
14761 correctly either.
14762 (start_function): Use the return value from push_template_decl.
14763 (start_method): Likewise.
14764 * decl2.c (grokfield): Likewise. Since the change to
14765 grokdeclarator ensures that all initialized fields are in fact
14766 static, remove a redundant test for TREE_PUBLIC.
14767 * parse.y (initlist): Disable labeled initializers since they do
14768 not work as per the documentation, and since they do not use the
14769 same syntax as the C front end.
14770 * pt.c (push_template_decl): Return the decl passed in, or an
14771 equivalent duplicate.
14772 (lookup_template_class): When searching in a nested context,
14773 use the right arguments.
14774 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14775 * typeck.c (build_component_ref): Assign the correct type to the
14776 result of build_vfn_ref.
14777
14778 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14779
14780 * pt.c (convert_nontype_argument): Fix typo.
14781 (check_explicit_specialization): Allow old-style specialization
14782 of class template members.
14783
14784 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14785 Manfred Hollstein <manfred@s-direktnet.de>
14786
14787 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14788 when deciding to override DECL_ASSEMBLER_NAME.
14789
14790 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14791
14792 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14793 * cp-tree.h (flag_do_squangling): Add declaration.
14794 * lang-options.h: Add -fsquangle and -fno-squangle.
14795 * method.c: Add macros and static variables for squangling.
14796 (build_overload_name): Rename to build_mangled_name, add logic for B
14797 compression, and split into process_modifiers and
14798 process_overload_item.
14799 (process_modifiers): New function, to handle constant, reference,
14800 and pointer types.
14801 (process_overload_item): New function, handles issue of type codes.
14802 (build_overload_name): New function, start squangling and call
14803 build_mangled_name.
14804 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14805 (start_squangling): New function to initialize squangling structs.
14806 (end_squangling): New function to destroy squangling structs.
14807 (nrepeats): Rename variable to Nrepeats.
14808 (issue_nrepeats): New function for issuing 'n' type repeats.
14809 (check_ktype): New function to check for type K name compression.
14810 (build_overload_nested_name): Add a check for K name compression.
14811 (build_qualified_name): Add a check for K name compression and don't
14812 use DECL_ASSEMBLER_NAME when squangling is on.
14813 (check_btype): New function, checks for B type compression.
14814 (build_static_name, build_decl_overload_real): Initiate squangling.
14815 (build_typename_overload, build_overload_with_type): Initiate
14816 squangling
14817
14818 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14819
14820 * method.c (make_thunk): Avoid name buffer overflow.
14821
14822 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14823
14824 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14825 don't define them yet.
14826
14827 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14828
14829 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14830
14831 * config-lang.in (diff_excludes): Use basename only.
14832
14833 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14834
14835 * tinfo2.cc: Add tinfo for signed char.
14836
14837 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14838
14839 * search.c (compute_access): Handle protected constructors in derived
14840 classes as accessible.
14841
14842 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14843
14844 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14845 Call convert_from_reference sooner.
14846
14847 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14848
14849 * cvt.c (ocp_convert): Obtain the constant values from constant
14850 decls even if the destination type is the same as the type of the
14851 decl.
14852
14853 * decl2.c (finish_file): Make sure that static inlines with
14854 definitions are not marked DECL_EXTERNAL before returning.
14855
14856 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14857
14858 * decl.c: Lose arg_looking_for_template.
14859 (lookup_name_real): Likewise.
14860 * parse.y: Lose processing_template_arg, template_arg1.
14861 (primary): Likewise.
14862 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14863
14864 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14865
14866 * error.c (dump_decl): Fix type of default arguments for template
14867 template parameters and nontype template parameters.
14868 * parse.y (template_parm): Handle invalid default template
14869 template arguments here.
14870
14871 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14872 for default template template argument.
14873 * pt.c (coerce_template_parms): Merge default template argument
14874 codes. Can treat RECORD_TYPE as template name if it is implicitly
14875 created. Fix argument index in error message.
14876 * typeck.c (comptypes): Merge template argument comparison codes in
14877 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14878
14879 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14880
14881 * lex.c (file_name_nondirectory): Also check for '/'.
14882
14883 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14884
14885 * parse.y (primary): Deal with statement-expressions in
14886 templates.
14887 * pt.c (tsubst_copy): Handle BIND_EXPR.
14888 * tree.c (mapcar): Likewise.
14889
14890 * call.c (add_template_candidate_real): Pass extra parameter to
14891 fn_type_unification.
14892 * cp-tree.h (fn_type_unification): Add parameter.
14893 * pt.c (fn_type_unification): Add additional parameter to deal with
14894 static member functions.
14895 (get_bindings): Deal with static member functions.
14896
14897 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14898 (revert_static_member_fn): Declare.
14899 * decl.c (revert_static_member_fn): Remove declaration. Change
14900 linkage from internal to external.
14901 (cp_finish_decl): Deal with virtual functions in classes local to
14902 template functions.
14903 * decl2.c (finish_file): Don't forget to emit increment/decrement
14904 expressions in initializers for file-scope variables.
14905 * parse.y (typename_sub2): If the typename doesn't names a
14906 template, rather than a type, issue an error message.
14907 * pt.c (check_explicit_specialization): Handle specializations of
14908 static member functions.
14909 (coerce_template_parms): Handle offset references to lists of
14910 member functions.
14911 * search.c (note_debug_info_needed): Don't crash when handed a
14912 type which is being defined.
14913 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14914 that can happen with some illegal code.
14915
14916 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14917
14918 * call.c (user_harshness): Initialize `code' to 0.
14919 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14920 (null_ptr_cst_p): Add parentheses around && within ||.
14921 (standard_conversion): Likewise.
14922 (z_candidate): Likewise.
14923 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14924 (build_object_call): Likewise for `mem_args'.
14925 (build_new_op): Likewise for `mem_arglist'. Add `return' from
14926 default case in enumeration switch.
14927
14928 * class.c (build_vtable_entry): Add explicit braces to avoid
14929 ambiguous `else'.
14930 (build_class_init_list): Likewise.
14931 (finish_struct_1): Initialize `width' to 0.
14932 (instantiate_type): Initialize `name' to NULL_TREE. Add
14933 explicit braces to avoid ambiguous `else'.
14934
14935 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14936 `else'.
14937
14938 * decl.c (grok_reference_init): Eliminate unused parameter, all
14939 callers changed.
14940 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14941 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14942 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14943 (grokdeclarator): Add parentheses around && within ||. Add
14944 explicit braces to avoid ambiguous `else'.
14945 (grokparms): Initialize `type' to NULL_TREE.
14946 (xref_tag): Remove unused label `just_return'.
14947 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14948 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14949 (hack_incomplete_structures): Add parentheses around assignment
14950 used as truth value.
14951
14952 * decl2.c (coerce_delete_type): Hide definition of `e3'.
14953
14954 * error.c: Include <stdlib.h>.
14955 (dump_expr): Change the type of `i' to size_t. Remove unused
14956 label `error'.
14957
14958 * except.c (init_exception_processing): Remove unused variable `d'.
14959 (expand_throw): Likewise for `label'.
14960
14961 * friend.c (add_friends): Add explicit braces to avoid ambiguous
14962 `else'.
14963
14964 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14965 (sort_base_init): Likewise for `binfo'.
14966 (expand_member_init): Likewise for `rval'.
14967 (build_member_call): Add parentheses around assignment used as
14968 truth value.
14969 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14970 (build_new): Initialize `nelts' to NULL_TREE. Initialize
14971 `old_immediate_size_expand' to 0.
14972 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14973 (build_vec_delete_1): Remove unused variable `block'.
14974 (expand_vec_init): Initialize `itype' to NULL_TREE.
14975
14976 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
14977 declaration of `index' and `rindex' with autoconf macros.
14978 (reinit_parse_for_expr): Remove unused variables
14979 `look_for_semicolon' and `look_for_lbrac'.
14980 (cons_up_default_function): Initialize `args' to NULL_TREE.
14981 (readescape): Initialize `firstdig' to 0.
14982 (real_yylex): Add parentheses around assignment used as truth value.
14983
14984 * method.c: Include <strings.h> if we don't have <string.h>.
14985 Protect declaration of `index' with autoconf macro.
14986
14987 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14988 Initialize `type' to NULL_TREE.
14989 (structsp): Remove unused variable `id'.
14990
14991 * pt.c (coerce_template_parms): Add explicit braces to avoid
14992 ambiguous `else'.
14993 (lookup_template_class): Initialize `template' to NULL_TREE.
14994 (instantiate_class_template): Remove unused variable `name' and `e'.
14995 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
14996 (do_poplevel): Initialize `saved_warn_unused' to 0.
14997 (type_unification): Remove unused varable `parm'.
14998 (unify): Likewise for `j'.
14999
15000 * repo.c (init_repo): Add parentheses around assignment used as
15001 truth value.
15002 (finish_repo): Remove unused varable `p'.
15003
15004 * search.c (get_binfo): Initialize `type' to NULL_TREE.
15005 (get_base_distance): Likewise.
15006 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
15007 and `new_v' to NULL_TREE.
15008 (lookup_fnfields): Likewise for `rval_binfo_h'.
15009 (breadth_first_search): Add parentheses around assignment used as
15010 truth value.
15011 (get_template_base): Initialize `type' to NULL_TREE.
15012
15013 * sig.c (append_signature_fields): Initialize `last_mfptr' to
15014 NULL_TREE.
15015 (build_signature_table_constructor): Likewise for
15016 `last_rhs_field', `pfn' and `vt_off'.
15017 (build_sigtable): Likewise for `init'.
15018
15019 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
15020 (propagate_binfo_offsets): Likewise for `delta'.
15021 (hash_tree_cons): Initialize hashcode to 0.
15022 (can_free): Likewise for `size'.
15023 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
15024
15025 * typeck.c (convert_sequence): Hide prototype.
15026 (common_type): Add explicit braces to avoid ambiguous `else'.
15027 (comp_target_types): Likewise.
15028 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
15029 (build_function_call_real): Add explicit braces to avoid ambiguous
15030 `else'.
15031 (convert_arguments): Initialize `called_thing' to 0.
15032 (convert_for_initialization): Initialize `savew' and `savee' to 0.
15033
15034 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
15035 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
15036 (build_x_arrow): Likewise for `last_rval'.
15037
15038 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
15039
15040 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
15041
15042 * decl.c (init_decl_processing): Use set_sizetype.
15043 * decl2.c (sizetype): Don't declare.
15044 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
15045 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
15046 (build_component_addr, unary_complex_lvalue): Likewise.
15047 * rtti.c (expand_class_desc): Likewise.
15048 * class.c (get_vfield_offset): Likewise.
15049
15050 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
15051
15052 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
15053 early to avoid bogus error. Handle overloaded function
15054 names provided as template arguments correctly.
15055 (coerce_template_parms): Don't mishandle overloaded functions when
15056 dealing with template template parameters.
15057 (lookup_template_class): Issue an error message, rather than
15058 crashing, when the TYPE_DECL provided is not a template type.
15059
15060 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
15061
15062 * class.c (instantiate_type): Don't just return a known type if
15063 it's wrong.
15064
15065 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
15066
15067 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
15068 since that code could never be reached.
15069
15070 * error.c (dump_decl): Avoid aborting in the midst of printing an
15071 error message about an illegal template declaration.
15072
15073 * parse.y (structsp): Print an error message, rather than crashing,
15074 when a class-head does not name a class.
15075
15076 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
15077 template arguments as a g++ extension.
15078
15079 * cp-tree.def (ALIGNOF_EXPR): New tree code.
15080 * decl2.c (grok_alignof): If processing_template_decl, just store
15081 the expression.
15082 * typeck.c (c_alignof): Likewise.
15083 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
15084 * error.c (dump_expr): Likewise.
15085 * pt.c (tsubst_copy): Likewise.
15086 * tree.c (cp_tree_equal): Likewise.
15087 * pt.c (uses_template_parms): Correctly determine whether or not a
15088 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
15089 folding can be done.
15090
15091 * cp-tree.h (grok_enum_decls): Remove type parameter.
15092 * decl.c (grok_enum_decls): Likewise.
15093 * decl2.c (grok_x_components): Call grok_enum_decls
15094 unconditionally, since it will do nothing if there is no
15095 current_local_enum. Use the new calling sequence.
15096 * pt.c (tsubst_enum): Use the new calling sequence for
15097 grok_enum_decls.
15098
15099 * decl.c (start_function): Make member functions of local classes
15100 in extern inline functions have comdat linkage here...
15101 (grokdeclarator): Rather than here.
15102
15103 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
15104
15105 * pt.c (convert_nontype_argument): Use decl_constant_value.
15106
15107 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
15108
15109 * call.c (add_template_candidate_real): New function.
15110 (add_template_candidate): Use it.
15111 (add_template_conv_candidate): Likewise.
15112 (joust): Pass extra argument to more_specialized.
15113 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15114 (is_local_class): Remove.
15115 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15116 * cp-tree.h (is_local_class): Remove.
15117 (perform_array_to_pointer_conversion): Likewise.
15118 (finish_member_template_decl): Add.
15119 (check_explicit_specialization): Return a tree, not an int.
15120 (more_specialized): Take additional argument.
15121 (get_bindings): Likewise.
15122 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15123 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15124 (perform_array_to_pointer_conversion): Remove.
15125 * decl.c (saved_scope): Add processing_specialization,
15126 processing_explicit_instantiation fields.
15127 (maybe_push_to_top_level): Save them.
15128 (pop_from_top_level): Restore them.
15129 (grokfndecl): Use new return value from
15130 check_explicit_specialization.
15131 (start_decl): Don't check flag_guiding_decls before pushing
15132 decls.
15133 (cp_finish_decl): Remove previous (bogus) change.
15134 (grok_declarator): Use decl_function_context rather than
15135 is_local_class.
15136 * decl2.c (finish_file): Pass extra argument to get_bindings.
15137 (build_expr_from_tree): Let build_x_component_ref check
15138 validity of arguments rather than doing it here.
15139 * lex.c (cons_up_default_function): Remove code fooling with
15140 processing_specialization, processing_explicit_instantiation
15141 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15142 * method.c (build_overload_identifier): Mangle local classes in
15143 template functions correctly.
15144 * parse.y (finish_member_template_decl): Move to pt.c.
15145 * pt.c (finish_member_template_decl): Moved here from parse.y.
15146 (print_candidates): New function.
15147 (determine_specialization): Change interface. Properly look for
15148 most specialized versions of template candidates.
15149 (check_explicit_specialization): Fully process explicit
15150 instantiations.
15151 (push_template_decl): Avoid looking at CLASSTYPE fields in
15152 FUNCTION_DECLS.
15153 (determine_overloaded_function): Remove.
15154 (convert_nontype_argument): Change name from
15155 convert_nontype_parameter. Use determine_overloaded_function
15156 instead of instantiate_type.
15157 (mangle_class_name_for_template): Handle type contexts as well as
15158 function contexts.
15159 (classtype_mangled_name): Likewise.
15160 (lookup_template_class): Likewise.
15161 (tsubst): Likewise.
15162 (more_specialized): Take explict template arguments as a
15163 parameter.
15164 (most_specialized): Likewise.
15165 (get_bindings): Likewise. Check that return types match before
15166 proclaiming a function a match.
15167 (do_decl_instantiation): Remove code searching for function to
15168 instantiate; that is now done in check_explicit_specialization.
15169 (add_maybe_template): Pass extra argument to get_bindings.
15170 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15171 implementation.
15172 * typeck.c (build_component_ref): Check for invalid arguments.
15173
15174 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
15175
15176 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15177 return_target and call_target are equivalent.
15178
15179 * pt.c (type_unification_real): Just accept function parms that
15180 don't use any template parms.
15181
15182 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15183
15184 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15185 unset DECL_NOT_REALLY_EXTERN.
15186
15187 * parse.y (typename_sub*): Fix std::.
15188
15189 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
15190
15191 * error.c (dump_decl): Fix type default template args.
15192 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15193
15194 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
15195
15196 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15197 (file_name_nondirectory): Use.
15198
15199 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15200
15201 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15202 that are not really present. Substitute default arguments in
15203 template template arguments. Correctly convert TEMPLATE_DECL to
15204 TEMPLATE_TEMPLATE_PARM.
15205 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15206 are no longer treated specially here.
15207 * parse.y (template_template_parm): Fix copy error.
15208 * decl.c (grokdeclarator): Warn about missing `typename' for nested
15209 type created from template template parameters.
15210 * parse.y (bad_parm): Likewise
15211
15212 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15213 (push_nested_class): Likewise.
15214 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15215 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15216 (copy_template_template_parm): Declare.
15217 * decl.c (arg_looking_for_template): New variable.
15218 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15219 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15220 node if arg_looking_for_template is nonzero.
15221 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15222 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15223 (grokdeclarator): Handle TEMPLATE_DECL.
15224 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15225 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15226 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15227 (dump_decl): Handle unnamed template type parameters.
15228 Handle template template parameters.
15229 (dump_function_name): Handle template template parameters.
15230 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15231 Handle TEMPLATE_TEMPLATE_PARM.
15232 * method.c (build_template_template_parm_names): New function.
15233 (build_template_parm_names): Handle TEMPLATE_DECL.
15234 (build_overload_nested_name, build_overload_name):
15235 Handle TEMPLATE_TEMPLATE_PARM.
15236 * parse.y (maybe_identifier): New nonterminal.
15237 (template_type_parm): Use it.
15238 (template_template_parm, template_arg1): New nonterminal.
15239 (template_parm): Add template_template_parm rules.
15240 (template_arg): Set processing_template_arg.
15241 (template_arg1): Rules moved from template_arg.
15242 (primary, nonnested_type): Set arg_looking_for_template if we are
15243 processing template arguments.
15244 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15245 (process_template_parm): Handle template template parameters.
15246 (coerce_template_parms, comp_template_args): Likewise.
15247 (mangle_class_name_for_template, lookup_template_class): Likewise.
15248 (uses_template_parms): Handle TEMPLATE_DECL and
15249 TEMPLATE_TEMPLATE_PARM.
15250 (current_template_args): Handle TEMPLATE_DECL.
15251 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15252 * search.c (dfs_walk, dfs_record_inheritance):
15253 Handle TEMPLATE_TEMPLATE_PARM.
15254 * tree.c (copy_template_template_parm): New function.
15255 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15256 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15257
15258 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
15259
15260 * decl.c (start_decl): Don't allow duplicate definitions of static
15261 data members.
15262
15263 * call.c (build_user_type_conversion_1): Handle user-defined
15264 template conversion operators correctly.
15265
15266 * decl2.c (build_expr_from_tree): Issue an error message if the
15267 object in a COMPONENT_REF is a TEMPLATE_DECL.
15268
15269 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15270
15271 * class.c (is_local_class): New function.
15272 * cp-tree.h (is_local_class): Declare it.
15273 (last_tree): Likewise.
15274 (begin_tree): Likewise.
15275 (end_tree): Likewise.
15276 (lookup_template_class): Change prototype.
15277 * decl.c (cp_finish_decl): Check for NULL where necessary.
15278 Consider FUNCTION_DECLS to declare objects with top-level binding,
15279 when calling make_decl_rtl.
15280 (grokdeclarator): Give members of local classes internal linkage.
15281 (start_function): Remove declaration of last_tree.
15282 (finish_function): Set flag_keep_inline_functions around call to
15283 rest_of_compilation if we are processing a member function in a
15284 local class.
15285 (start_method): Call push_template_decl for member functions of
15286 local classes in template functions.
15287 * decl2.c (import_export_decl): Don't give external linkage to
15288 instantiations of templates with internal linkage.
15289 * parse.y (last_tree): Remove declaration.
15290 (template_type): Pass extra parameter to lookup_template_class.
15291 (self_template_type): Likewise.
15292 (structsp): Move call to reset_specialization into left_curly.
15293 (left_curly): Call reset_specialization, and begin_tree.
15294 * pt.c (saved_trees): New variable.
15295 (mangle_class_name_for_template): Change prototype. Use
15296 additional function context to name local classes in templates
15297 correctly.
15298 (classtype_mangled_name): Pass the context.
15299 (push_template_decl): Handle local classes and templates, and
15300 member functions for such classes.
15301 (convert_nontype_parameter): Fix handling of pointer-to-member
15302 constants.
15303 (lookup_template_class): Handle local classes in templates.
15304 (tsubst): Likewise. Don't assume that template instantiations
15305 have external linkage; pay attention to the template declaration.
15306 (mark_decl_instantiated): Likewise.
15307 (begin_tree): New function.
15308 (end_tree): Likewise.
15309
15310 * decl.c (xref_basetypes): Don't call complete_type for basetypes
15311 that involve template parameters; that can lead to infinite
15312 recursion unnecessarily.
15313
15314 * pt.c (register_specialization): Do not register specializations
15315 that aren't ready to be registered yet.
15316 (check_explicit_specialization): Handle explicit specialization of
15317 constructors and destructors.
15318 (build_template_decl): New function.
15319 (push_template_delc): Handle out-of-class specializations of
15320 member templates.
15321
15322 * pt.c (check_explicit_specialization): Set up the template
15323 information before registering the specialization.
15324 (coerce_template_parms): Fix thinko.
15325 (tsubst): Handle specializations of member templates correctly.
15326
15327 * class.c (finish_struct_methods): Remove calls to
15328 check_explicit_specialization from here.
15329 (finish_struct): And insert them here.
15330 * cp-tree.h (perform_qualification_conversions): New function.
15331 (perform_array_to_pointer_conversion): Likewise.
15332 (begin_explicit_instantiation): Likewise.
15333 (end_explicit_instantiation): Likewise.
15334 (determine_specialization): Renamed from
15335 determine_explicit_specialization.
15336 (comp_template_parms): New function.
15337 (processing_explicit_instantiation): New variable.
15338 * cvt.c (perform_qualification_conversions): New function.
15339 (perform_array_to_pointer_conversion): Likewise.
15340 * decl.c (duplicate_decls): Don't consider template functions
15341 alike unless they have the same parameters. Refine handling of
15342 instantiation/specialization mismatches.
15343 (start_decl): Don't call pushdecl for template specializations,
15344 since they don't affect overloading.
15345 (start_function): Likewise.
15346 (grokfndecl): Call check_explicit_specialization a little later.
15347 Don't call duplicate_decls for memberm template specializations.
15348 (grokdeclarator): Don't update template_count for classes that are
15349 themselves specializations. Remove use of `2' as parameter to
15350 grokfndecl since that value isn't used.
15351 * lex.c (cons_up_default_function): Save and restore
15352 processing_explicit_instantiation around calls to grokfield.
15353 * parse.y (finish_member_template_decl): New function.
15354 (component_decl_1): Use it.
15355 (fn.def2): Likewise.
15356 (template_arg_list_opt): New nonterminal.
15357 (template_type): Use it.
15358 (self_template_type): Likewise.
15359 (template_id): Likewise.
15360 (object_template_id): Likewise.
15361 (notype_template_declarator): Likwise.
15362 (begin_explicit_instantiation): Likewise.
15363 (end_explicit_instantiation): Likewise.
15364 (explicit_instantiation): Use them.
15365 * pt.c (coerce_template_parms): Add parameters.
15366 (processing_explicit_instantiation): New variable.
15367 (convert_nontype_parameter): New function.
15368 (determine_overloaded_function): Likewise.
15369 (begin_explicit_instantiation): Likewise.
15370 (end_explicit_instantiation): Likewise.
15371 (retrieve_specialization): Likewise.
15372 (register_specialization): Likewise.
15373 (processing_explicit_specialization): Removed.
15374 (determine_specialization): Handle specializations of member
15375 functions of template class instantiations.
15376 (check_explicit_specialization): Refine to conform to standard.
15377 (comp_template_parms): New function.
15378 (coerce_template_parms): Call convert_nontype_parameter.
15379 (tsubst): Refine handling of member templates. Use
15380 register_specialization.
15381 (instantiate_template): Use retrieve_specialization.
15382 (do_decl_instantiation): Likewise.
15383 (instantiate_decl): Likewise.
15384 (type_unification): Improve handling of explict template
15385 arguments.
15386 * tree.c (mapcar): Return error_mark_node, rather than aborting,
15387 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15388 * typeck.c (build_unary_op): Call determine_specialization, rather
15389 than determine_explicit_specialization.
15390
15391 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
15392
15393 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15394
15395 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15396
15397 * error.c (dump_decl): For enum tags, output the tag, not its value.
15398
15399 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
15400
15401 * decl.c (init_decl_processing): Only call init_rtti_processing
15402 FLAG_RTTI is set.
15403
15404 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
15405
15406 * init.c (build_new_1): Split out from build_new.
15407 (build_new): Just return a NEW_EXPR.
15408 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15409
15410 * decl2.c (get_temp_regvar): Tweak.
15411
15412 * cp-tree.h (TREE_CALLS_NEW): Comment out.
15413 * class.c (resolves_to_fixed_type_p): Remove use.
15414 * method.c (build_opfncall): Likewise.
15415 * call.c (build_new_op): Likewise.
15416
15417 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15418
15419 * exception.cc (__eh_alloc, __eh_free): New fns.
15420 (__cp_push_exception, __cp_pop_exception): Use them.
15421 (__uncatch_exception): Call terminate here if no exception.
15422 * except.c (build_terminate_handler): New fn.
15423 (expand_start_catch_block): Use it.
15424 (expand_exception_blocks): Likewise.
15425 (alloc_eh_object): New fn.
15426 (expand_throw): Use it. Protect exception init with terminate.
15427 * typeck.c (build_modify_expr): Remove code that ignores trivial
15428 methods.
15429
15430 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15431
15432 * call.c (add_builtin_candidate): Add default case in enumeration
15433 switch.
15434 (build_new_op): Likewise.
15435 (convert_like): Likewise.
15436 * cvt.c (build_expr_type_conversion): Likewise.
15437 * tree.c (real_lvalue_p): Likewise.
15438 (lvalue_p): Likewise.
15439 (cp_tree_equal): Likewise.
15440 * typeck.c (comptypes): Likewise.
15441 (build_component_ref): Likewise.
15442 (build_function_call_real): Likewise.
15443 (build_binary_op_nodefault): Likewise.
15444 (build_unary_op): Likewise.
15445 (build_modify_expr): Likewise.
15446 * typeck2.c (initializer_constant_valid_p): Likewise.
15447
15448 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
15449
15450 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15451
15452 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
15453
15454 * pt.c (coerce_template_parms): Make sure to digest_init if
15455 possible.
15456
15457 * decl.c (duplicate_decls): Make the newdecl virtual if the
15458 olddecl was, just as is done with other attributes of olddecl.
15459
15460 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15461
15462 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15463 address of an OFFSET_REF.
15464
15465 * cp-tree.def: Add AGGR_INIT_EXPR.
15466 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15467 AGGR_INIT_EXPR where appropriate.
15468 * expr.c (cplus_expand_expr): Likewise. Simplify.
15469
15470 * decl2.c (finish_file): Remove call to register_exception_table.
15471
15472 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15473
15474 * pt.c (instantiate_class_template): Don't do injection when
15475 processing_template_decl is true, as pollutes current_binding_level
15476 for base classes.
15477
15478 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
15479
15480 * pt.c (maybe_fold_nontype_arg): Add prototype.
15481
15482 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15483
15484 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15485 * error.c (dump_expr): Likewise.
15486
15487 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15488
15489 * typeck.c (build_function_call_real): Remove "inline called before
15490 definition" pedwarn.
15491
15492 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15493
15494 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15495
15496 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15497
15498 * pt.c (type_unification_real): Change __null to type void* with
15499 a warning.
15500
15501 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
15502
15503 * call.c (implicit_conversion): Don't call
15504 build_user_type_conversion_1 with a NULL expr, since it will
15505 crash.
15506
15507 * pt.c (unify): Don't try to unify array bounds if either array is
15508 unbounded.
15509
15510 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15511
15512 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15513 Replace extern decls with casts.
15514
15515 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15516 Update last_parm_cleanup_insn.
15517 (store_after_parms): Remove.
15518 * cp-tree.h: Adjust.
15519
15520 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15521
15522 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15523 (finish_file): Check DECL_COMDAT instead of weak|one_only.
15524 (import_export_vtable): Use make_decl_one_only instead of
15525 comdat_linkage for win32 tweak.
15526 (import_export_decl): Likewise.
15527 * pt.c (mark_decl_instantiated): Likewise.
15528
15529 * decl2.c (finish_file): Lose handling of templates in pending_statics.
15530
15531 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15532
15533 * decl2.c (finish_file): Lose call to expand_builtin_throw.
15534 * except.c (expand_builtin_throw): Remove.
15535 * cp-tree.h: Remove ptr_ptr_type_node.
15536 * decl.c: Likewise.
15537
15538 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
15539
15540 * decl.c (ptr_ptr_type_node): Define.
15541 (init_decl_processing): Initialize it.
15542 * cp-tree.h: Declare it.
15543 * exception.cc (__cp_exception_info): Use __get_eh_info.
15544 (__cp_push_exception): Likewise.
15545 (__cp_pop_exception): Likewise.
15546
15547 From Scott Snyder <snyder@d0sgif.fnal.gov>:
15548 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15549 saved_pc.
15550 (init_exception_processing): Removed saved_pc initialization.
15551
15552 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
15553
15554 * pt.c (instantiate_decl): Defer all templates but inline functions.
15555
15556 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15557
15558 * init.c (expand_vec_init): Don't fold a list of parameters.
15559
15560 * decl.c (copy_args_p): Handle copy elision for types with virtual
15561 bases.
15562 * call.c (build_over_call): Likewise.
15563
15564 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
15565
15566 * pt.c (lookup_template_function): Copy the template arguments,
15567 not just the list containing them, to the permanent obstack.
15568
15569 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
15570
15571 * except.c (expand_start_catch_block): suspend_momentary for the
15572 terminate handler.
15573
15574 * error.c (dump_decl): Handle LOOKUP_EXPR.
15575
15576 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
15577
15578 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15579 permanent obstack if we are processing a template decl.
15580 * typeck.c (build_static_cast): Likewise.
15581 (build_const_cast): Likewise.
15582 (build_reinterpret_cast): Likewise.
15583
15584 * pt.c (coerce_template_parms): Coerce some expressions, even
15585 when processing_template_decl.
15586
15587 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15588
15589 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15590 handling of pointer difference expressions.
15591
15592 * typeck.c (comp_target_types): Comparison of function/method types
15593 is independent of nptrs.
15594
15595 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
15596
15597 * pt.c (tsubst): Avoid creating pointer to reference and
15598 reference to reference types.
15599
15600 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15601
15602 * parse.y (do_id): New nonterminal.
15603 (template_id): Use it.
15604
15605 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15606
15607 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15608 * spew.c (yylex): Don't do_identifier here.
15609 * decl2.c (build_expr_from_tree): Revert last change.
15610
15611 * decl2.c (build_expr_from_tree): Expand the name for a method call.
15612 * parse.y (object_template_id): Don't try to take the DECL_NAME.
15613
15614 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15615
15616 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15617 alloc_expr.
15618 * call.c (build_op_delete_call): Adjust.
15619
15620 * except.c (expand_end_catch_block): Lose rethrow region.
15621 (expand_start_catch_block): Likewise.
15622 (expand_end_catch_block): Don't expand_leftover_cleanups.
15623
15624 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15625
15626 * pt.c (tsubst): Remove tree_cons call (places redundant info into
15627 DECL_TEMPLATE_INSTANTIATION).
15628
15629 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15630
15631 * tree.c (is_overloaded_fn): Handle getting a fn template.
15632 (really_overloaded_fn): Likewise.
15633 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15634 * pt.c (check_explicit_specialization): Tweak.
15635 (determine_explicit_specialization): Tweak.
15636
15637 * tree.c, cp-tree.h (get_target_expr): New fn.
15638
15639 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
15640
15641 * pt.c (check_explicit_specialization): Fix misspelling in
15642 diagnostic: `preceeded'.
15643 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15644 `conversiona'.
15645
15646 1997-12-02 Mark Mitchell <mmitchell@usa.net>
15647
15648 * pt.c (determine_explicit_specialization): Avoid an internal
15649 error for bad specializations.
15650
15651 * method.c (build_overload_value): Handle SCOPE_REF.
15652
15653 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
15654
15655 * class.c (prepare_fresh_vtable): Enable even more complex MI
15656 vtable names.
15657
15658 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15659
15660 * exception.cc (__check_eh_spec): Optimize a bit.
15661
15662 * exception.cc (__cp_pop_exception): Lose handler arg.
15663 * except.c (do_pop_exception): Likewise.
15664 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15665 (expand_end_catch_block): Likewise.
15666
15667 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15668
15669 * pt.c (check_explicit_specialization): Complain about using a
15670 template-id for a non-specialization.
15671
15672 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
15673
15674 * repo.c: Prototype rindex only if needed.
15675 * xref.c: Likewise.
15676
15677 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15678
15679 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15680
15681 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15682
15683 * typeck.c (build_const_cast): Handle references here instead of
15684 handing off to convert_to_reference.
15685
15686 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15687 TerminateFunctionCall.
15688 (init_exception_processing): Likewise. Terminate et al are now
15689 the fns, not ADDR_EXPRs.
15690 (various): Lose redundant assemble_external calls.
15691 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15692
15693 * cp-tree.h (struct lang_decl_flags): Add comdat.
15694 (DECL_COMDAT): New macro.
15695 * decl.c (duplicate_decls): Propagate it.
15696 (cp_finish_decl): Handle it.
15697 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15698
15699 * class.c: Remove static pending_hard_virtuals.
15700 (add_virtual_function): Take pointers to pending_virtuals
15701 and pending_hard_virtuals.
15702 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
15703
15704 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15705
15706 * decl2.c (import_export_vtable): If we support one_only but not
15707 weak symbols, mark instantiated template vtables one_only.
15708 (import_export_decl): Likewise for tinfo functions.
15709 (finish_vtable_vardecl): Also write out vtables from explicitly
15710 instantiated template classes.
15711 * pt.c (mark_class_instantiated): Revert last change.
15712
15713 * except.c (expand_throw): Call mark_used on the destructor.
15714
15715 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
15716
15717 * lex.c (lang_init): Enable flag_exceptions by default if no
15718 command line switch was specified.
15719
15720 1997-11-26 Mark Mitchell <mmitchell@usa.net>
15721
15722 * pt.c (unify): Handle `void' template parameters in
15723 specializations.
15724
15725 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
15726
15727 * rtti.c (build_dynamic_cast): Handle template case here.
15728 (build_dynamic_cast_1): Not here.
15729
15730 * typeck2.c (digest_init): Make copies where appropriate.
15731
15732 * decl2.c (delete_sanity): resolve_offset_ref.
15733
15734 * except.c: Call terminate without caching so many bits.
15735
15736 * except.c (expand_start_catch_block): Fix catching a reference
15737 to pointer.
15738
15739 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15740
15741 * init.c (build_new): Copy size to the saveable obstack.
15742
15743 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15744 TRY_CATCH_EXPR for now.
15745
15746 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15747
15748 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15749 has DECL_LANG_SPECIFIC.
15750
15751 * exception.cc (struct cp_eh_info): Add handlers field.
15752 (__cp_push_exception): Initialize it.
15753 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15754 (__throw_bad_exception): Remove.
15755 * except.c (call_eh_info): Add handlers field.
15756 (get_eh_handlers): New fn.
15757 (push_eh_cleanup): Increment handlers.
15758
15759 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15760
15761 * except.c (expand_start_eh_spec): Use the try/catch code.
15762 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15763 doing everything inline.
15764 (init_exception_processing): throw_type_match now takes
15765 const void pointers.
15766 * exception.cc (__check_eh_spec): New fn.
15767 * inc/exception: Neither terminate nor unexpected return.
15768 * decl.c: Make const_ptr_type_node public.
15769 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15770
15771 * except.c (expand_start_catch_block): We only need the rethrow
15772 region for non-sjlj exceptions.
15773 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15774
15775 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15776
15777 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15778 (various.o): Likewise.
15779 * inc/new: Add placement deletes. Add throw specs for default new.
15780 * new.cc (set_new_handler): Move here from libgcc2.
15781 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15782 (new): Move from libgcc2. Throw bad_alloc.
15783 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15784 * decl.c (init_decl_processing): Update exception specs on new and
15785 delete.
15786
15787 * method.c (build_decl_overload_real): Don't mess with global
15788 placement delete.
15789
15790 * init.c (build_new): Check for null throw spec, not nothrow_t.
15791
15792 * decl.c (duplicate_decls): Don't complain about different exceptions
15793 from an internal declaration.
15794
15795 * call.c (build_op_delete_call): Fix check for member fns again.
15796
15797 * decl2.c (import_export_decl): Interface hackery affects
15798 virtual synthesized methods.
15799
15800 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15801
15802 * decl.c (start_decl): Don't just complain about a mismatched
15803 scope, fix it.
15804
15805 * decl.c (make_implicit_typename): Handle case where t is not
15806 actually from context.
15807 * tree.c (get_type_decl): Lose identifier case.
15808 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15809 * parse.y (nonnested_type): Just use lookup_name.
15810 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15811
15812 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15813
15814 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15815 T was built in C language context (for example, by
15816 output_func_start_profiler).
15817
15818 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15819
15820 * decl.c (make_implicit_typename): New fn.
15821 (lookup_name_real): Use it. Use current_class_type as the context.
15822
15823 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15824
15825 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15826
15827 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15828
15829 * friend.c (do_friend): Warn about non-template friends in templates.
15830
15831 * call.c (build_op_delete_call): Fix handling of inherited delete.
15832
15833 * search.c (dfs_record_inheritance): Ignore template type parms.
15834
15835 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15836
15837 * call.c (build_new_op): Fix copy error.
15838 (build_op_new_call): New fn.
15839 (build_op_delete_call): New fn.
15840 * cp-tree.h: Declare them.
15841 * init.c (build_new): Use them. Support placement delete.
15842 (build_x_delete): Use build_op_delete_call.
15843 (build_delete): Likewise.
15844 * decl2.c (delete_sanity): Likewise.
15845 (coerce_delete_type): Don't complain about placement delete.
15846
15847 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15848
15849 * call.c (build_new_function_call): Remove unused 'obj' parm.
15850 * cp-tree.h, typeck.c: Adjust.
15851
15852 * init.c (build_new): Make the cleanup last longer.
15853 (expand_vec_init): Call do_pending_stack_adjust.
15854
15855 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15856
15857 * pt.c (do_type_instantiation): Fix typo.
15858 (mark_class_instantiated): If we support one_only but not weak
15859 symbols, don't mark this as known.
15860
15861 * init.c (build_new): Handle vec delete in EH cleanup.
15862
15863 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15864
15865 * call.c (build_method_call): Call complete_type before checking
15866 for destructor.
15867
15868 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15869
15870 * decl.c (add_block_current_level): Delete.
15871 * init.c (build_vec_delete_1): Delete build_block and
15872 add_block_current_level calls.
15873
15874 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15875
15876 * init.c (build_new): Handle freeing allocated memory when the
15877 constructor throws.
15878
15879 * call.c (build_new_method_call): Fix flags arg.
15880
15881 * pt.c (do_type_instantiation): Don't try to instantiate
15882 member templates.
15883 (mark_decl_instantiated): If we support one_only but not
15884 weak symbols, mark this one_only.
15885 * decl2.c (import_export_vtable): Don't defer handling of vtables
15886 if MULTIPLE_SYMBOL_SPACES.
15887
15888 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15889
15890 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15891
15892 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
15893
15894 * except.c (do_pop_exception): Return a value.
15895
15896 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15897
15898 * call.c (build_new_method_call): Handle getting a
15899 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
15900 if we got template parms.
15901 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15902 not just the args.
15903 * decl2.c (build_expr_from_tree): Tweak last change.
15904 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15905 (maybe_fold_nontype_arg): Split out from tsubst_copy.
15906 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15907
15908 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15909
15910 * pt.c (tsubst_copy): Handle explicit template arguments in
15911 function calls.
15912 * typeck.c (build_x_function_call): Likewise.
15913 * decl2.c (build_expr_from_tree): Lookup function name if it
15914 hasn't been done.
15915
15916 * pt.c (tsubst): Instantiate template functions properly when
15917 template parameter does not appear in function arguments and return
15918 type.
15919 (comp_template_args): Handle member templates required by tsubst.
15920
15921 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15922
15923 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15924 previous change.
15925
15926 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15927
15928 * pt.c (coerce_template_parms): Tweak error message.
15929
15930 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15931 return type defaults to `int', even if there are storage-class
15932 specifiers.
15933
15934 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15935
15936 Complete nested exception support.
15937 * except.c (do_pop_exception): Split out...
15938 (push_eh_cleanup): From here. Handle the EH region by hand.
15939 (expand_start_catch_block): Add a new level for the catch parm.
15940 Move the rethrow region outside the two cleanup regions.
15941 Protect the initializer for the catch parm with terminate.
15942 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
15943 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
15944 popping off the middle of the stack.
15945 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15946 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15947 (build_cplus_new): Only wrap CALL_EXPRs.
15948 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15949 the constructor call.
15950
15951 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15952
15953 * Make-lang.in (c++.distdir): Make inc subdirectory.
15954
15955 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15956
15957 * decl2.c (finish_file): Put back some code.
15958
15959 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15960
15961 * decl2.c (finish_file): Remove redundant code.
15962 * method.c (emit_thunk): Don't let the backend defer generic thunks.
15963
15964 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15965
15966 * except.c (call_eh_info): Split out...
15967 (push_eh_info): From here.
15968 (expand_builtin_throw): Use it.
15969 (expand_start_catch_block): Move region start back.
15970
15971 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
15972
15973 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15974 (real_yylex): Record wide strings using target endianness, not host.
15975
15976 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
15977
15978 * repo.c (rindex): Add decl unconditionally.
15979 (get_base_filename, open_repo_file): Don't cast rindex.
15980 * xref.c (rindex): Add decl unconditionally.
15981 (index): Remove unused decl.
15982 (open_xref_file): Don't cast rindex.
15983
15984 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15985
15986 * class.c (build_vbase_path): Propagate the result type properly.
15987
15988 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
15989
15990 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15991 remaining use of saved_throw_type with a call to get_eh_type.
15992
15993 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
15994
15995 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15996 (file_name_nondirectory): New function, doing the same as the macro.
15997 (set_typedecl_interface_info): Use it instead of the macro.
15998 (check_newline): Likewise.
15999 (handle_cp_pragma): Likewise.
16000
16001 * repo.c (get_base_filename): Cast result of rindex to char*.
16002 (open_repo_file): Likewise.
16003 * xref.c (open_xref_file): Likewise.
16004 * error.c (dump_char): Make its arg int, not char.
16005
16006 * except.c (push_eh_info): Pass the number of fields - 1 down, not
16007 the exact number of fields.
16008
16009 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16010
16011 Support for nested exceptions.
16012 * tinfo2.cc (__is_pointer): New fn.
16013 * exception.cc (struct cp_eh_info): Define.
16014 (__cp_exception_info, __uncatch_exception): New fns.
16015 (__cp_push_exception, __cp_pop_exception): New fns.
16016 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
16017 Lose empty_fndecl.
16018 (init_exception_processing): Likewise. __eh_pc is now external.
16019 (push_eh_info): New fn.
16020 (get_eh_{info,value,type,caught}): New fns.
16021 (push_eh_cleanup): Just call __cp_pop_exception.
16022 (expand_start_catch_block): Use push_eh_info. Start the eh region
16023 sooner.
16024 (expand_end_eh_spec): Use push_eh_info.
16025 (expand_throw): Call __cp_push_exception to set up the exception info.
16026 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
16027 when we rethrow.
16028 (expand_builtin_throw): Don't refer to empty_fndecl.
16029
16030 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16031
16032 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
16033
16034 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
16035
16036 * method.c (build_template_parm_names, build_decl_overload_real):
16037 Add static to definitions.
16038 * pt.c (add_to_template_args, note_template_header,
16039 processing_explicit_specialization, type_unification_real): Likewise.
16040 ({determine,check}_explicit_specialization): Use a single string for
16041 error messages.
16042
16043 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
16044
16045 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
16046 (expand_end_catch_block): Likewise.
16047 (expand_end_eh_spec): Likewise.
16048
16049 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
16050
16051 * decl.c (duplicate_decls): Handle template specializations
16052 correctly.
16053 * error.c (dump_function_name): Fix printing of specializations of
16054 member functions that are not member templates.
16055 * cp-tree.h (processing_specialization): Make global.
16056 * pt.c (processing_specialization): Likewise.
16057 * lex.c (cons_up_default_function): Save and restore
16058 processing_specialization to avoid confusion.
16059
16060 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16061
16062 * decl.c (init_decl_processing): Give null_node unknown* type.
16063 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
16064 (common_type): Likewise.
16065 * error.c (args_as_string): Recognize null_node.
16066
16067 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16068
16069 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
16070 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
16071
16072 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
16073
16074 * Make-lang.in (g++): Include prefix.o.
16075
16076 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
16077
16078 * pt.c (determine_explicit_specialization): Initialize "dummy"
16079 to keep Purify quiet.
16080
16081 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16082
16083 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
16084 (build_overload_int): Not here.
16085
16086 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
16087
16088 * class.c (build_type_pathname): Remove.
16089 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
16090
16091 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
16092
16093 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
16094 &&label GNU extension.
16095
16096 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
16097
16098 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16099 so as to avoid incorrect manglings.
16100 * method.c (build_decl_overload_real): Don't mangle return types
16101 for constructors.
16102
16103 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
16104
16105 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16106 scratch_tree_cons): Define as macros for now.
16107 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16108 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16109 typeck2.c: Use them and the expression_obstack variants.
16110
16111 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16112
16113 * decl.c (store_return_init): Allow classes with explicit ctors to
16114 be used with the named return values extension.
16115
16116 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
16117
16118 * pt.c (instantiate_decl): Fix previous change.
16119
16120 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
16121
16122 * pt.c (tsubst): Fix thinko.
16123 (instantiate_decl): Really use the original template.
16124
16125 * call.c (build_new_method_call): Use simple constructor_name for
16126 error messages.
16127
16128 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
16129
16130 * method.c (build_underscore_int): Don't use ANSI specific
16131 features.
16132
16133 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16134
16135 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16136 for our key method; it might have been inlined by -O3.
16137
16138 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
16139
16140 * decl.c (make_typename_type): Do not try to call lookup_field for
16141 non-aggregate types.
16142
16143 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
16144
16145 * typeck.c (build_reinterpret_cast): Tweak.
16146
16147 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16148
16149 * typeck.c (build_reinterpret_cast): Converting a void pointer
16150 to function pointer with a reinterpret_cast produces a warning
16151 if -pedantic is issued.
16152
16153 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
16154
16155 * typeck.c (c_expand_return): Don't warn about returning a
16156 reference-type variable as a reference.
16157
16158 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
16159
16160 * method.c (build_static_name): Fix typo.
16161
16162 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
16163
16164 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16165 OLDDECL before we try to do DECL_USE_TEMPLATE.
16166
16167 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16168
16169 * decl.c (duplicate_decls): Don't warn about template instances.
16170
16171 * typeck.c (mark_addressable): Lose ancient code that unsets
16172 DECL_EXTERNAL.
16173
16174 * pt.c (do_decl_instantiation): Lose support for instantiating
16175 non-templates.
16176
16177 * call.c (build_new_function_call): Fix handling of null explicit
16178 template args.
16179 (build_new_method_call): Likewise.
16180
16181 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
16182
16183 * method.c (build_underscore_int): Fix typo.
16184
16185 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
16186
16187 * tree.c (print_lang_statistics): #if 0 call to
16188 print_inline_obstack_statistics until its definition is checked in.
16189
16190 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16191
16192 * decl2.c (finish_file): Move dump_tree_statistics to end.
16193
16194 * pt.c (instantiate_decl): Look for the original template.
16195 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16196 of member templates.
16197
16198 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16199
16200 * Makefile.in (g++FAQ.*): New rules.
16201 (CONFLICTS): Update.
16202 * g++FAQ.texi: Moved from libg++.
16203
16204 * parse.y (PFUNCNAME): Only specify the type once.
16205
16206 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
16207
16208 * lex.c (real_yylex): Clean up the code to fully behave the way
16209 the c-lex.c parser does for complex and real numbers.
16210
16211 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16212
16213 * method.c (build_decl_overload_real): Reformat.
16214
16215 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
16216
16217 * method.c (synthesize_method): If at_eof, determine our linkage.
16218
16219 1997-09-29 Paul Eggert <eggert@twinsun.com>
16220
16221 * lex.c (real_yylex): Treat `$' just like `_', except issue a
16222 diagnostic if !dollars_in_ident or if pedantic.
16223
16224 * lang-specs.h (@c++): -ansi no longer implies -$.
16225
16226 * decl2.c (lang_decode_option):
16227 -traditional and -ansi now do not mess with
16228 dollars_in_ident.
16229
16230 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
16231
16232 * Makefile.in (parse.o, decl.o): Also depend on
16233 $(srcdir)/../except.h $(srcdir)/../output.h.
16234 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16235 $(srcdir)/../except.h $(srcdir)/../output.h.
16236 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16237 ../insn-codes.h.
16238
16239 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16240
16241 * expr.c (cplus_expand_expr): Make it static.
16242
16243 * decl2.c, init.c, typeck.c: Include "expr.h".
16244 (expand_expr): Use proper values when calling the function.
16245
16246 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
16247
16248 * lang-options.h: New -Wold-style-cast flag.
16249 * cp-tree.h (warn_old_style_cast): New variable.
16250 * decl2.c (warn_old_style_cast): Likewise.
16251 (lang_decode_option): Support -Wold-style-cast.
16252 (reparse_absdcl_as_casts): Produce old-style-cast warning.
16253
16254 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16255
16256 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16257 TREE_USED, reset value based on already_used.
16258
16259 * init.c (expand_member_init): Revert change.
16260
16261 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16262
16263 * cp-tree.h, decl.c, decl2.c, pt.c:
16264 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
16265
16266 * decl2.c (lang_decode_option): Add missing ;.
16267
16268 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16269
16270 * friend.c (do_friend): Disable injection for all template-derived
16271 decls.
16272 * decl2.c (lang_decode_option): Handle -fguiding-decls.
16273 * parse.y (notype_template_declarator): New nonterminal.
16274 (direct_notype_declarator): Use it.
16275 (complex_direct_notype_declarator): Likewise.
16276 (object_template_id): Accept any kind of identifier after TEMPLATE.
16277 (notype_qualified_id): Don't add template declarators here.
16278
16279 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
16280
16281 * call.c (add_template_candidate): Add explicit_targs parameter.
16282 (build_scoped_method_call): Use it.
16283 (build_overload_call_real): Likewise.
16284 (build_user_type_conversion_1): Likewise.
16285 (build_new_function_call): Likewise.
16286 (build_object_call): Likewise.
16287 (build_new_op): Likewise.
16288 (build_new_method_call): Likewise.
16289 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16290 (build_new_method_call): Likewise.
16291
16292 * class.c (finish_struct_methods): Add specialization pass to
16293 determine which methods were specializing which other methods.
16294 (instantiate_type): Handle TEMPLATE_ID_EXPR.
16295
16296 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16297
16298 * cp-tree.h (name_mangling_version): New variable.
16299 (flag_guiding_decls): Likewise.
16300 (build_template_decl_overload): New function.
16301 (begin_specialization): Likewise.
16302 (reset_specialization): Likewise.
16303 (end_specialization): Likewise.
16304 (determine_explicit_specialization): Likewise.
16305 (check_explicit_specialization): Likewise.
16306 (lookup_template_function): Likewise.
16307 (fn_type_unification): Add explicit_targs parameter.
16308 (type_unification): Likewise.
16309
16310 * decl.c (duplicate_decls): Add smarts for explicit
16311 specializations.
16312 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16313 specializations.
16314 (grokfndecl): Call check_explicit_specialization.
16315
16316 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16317 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16318 (check_classfn): Handle specializations.
16319
16320 * error.c (dump_function_name): Print specialization arguments.
16321
16322 * friend.c (do_friend): Don't call pushdecl for template
16323 instantiations.
16324
16325 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16326
16327 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16328 and -fno-guiding-decls.
16329
16330 * lex.c (identifier_type): Return PFUNCNAME for template function
16331 names.
16332
16333 * method.c (build_decl_overload_real): New function.
16334 (build_template_parm_names): New function.
16335 (build_overload_identifier): Use it.
16336 (build_underscore_int): New function.
16337 (build_overload_int): Use it. Add levels for template
16338 parameters.
16339 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
16340 (build_overload_nested_names): Handle template type parameters.
16341 (build_template_decl_overload): New function.
16342
16343 * parse.y (YYSTYPE): New ntype member.
16344 (nested_name_specifier): Use it.
16345 (nested_name_specifier_1): Likewise.
16346 (PFUNCNAME): New token.
16347 (template_id, object_template_id): New non-terminals.
16348 (template_parm_list): Note specializations.
16349 (template_def): Likewise.
16350 (structsp): Likewise.
16351 (fn.def2): Handle member template specializations.
16352 (component_decl_1): Likewise.
16353 (direct_notype_declarator): Handle template-ids.
16354 (component_decl_1): Likewise.
16355 (direct_notype_declarator): Handle template-ids.
16356 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16357
16358 * pt.c (processing_specializations): New variable.
16359 (template_header_count): Likewise.
16360 (type_unification_real): New function.
16361 (processing_explicit_specialization): Likewise.
16362 (note_template_header): Likewise.
16363 (is_member_template): Handle specializations.
16364 (end_template_decl): Call reset_specialization.
16365 (push_template_decl): Handle member template specializations.
16366 (tsubst): Likewise.
16367 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16368 (instantiate_template): Handle specializations.
16369 (instantiate_decl): Likewise.
16370 (fn_type_unification): Handle explicit_targs.
16371 (type_unification): Likewise. Allow incomplete unification
16372 without an error message, if allow_incomplete.
16373 (get_bindings): Use new calling sequence for fn_type_unification.
16374
16375 * spew.c (yylex): Handle PFUNCNAME.
16376
16377 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16378 (really_overloaded_fn): Likewise.
16379 (get_first_fn): Handle function templates.
16380
16381 * typeck.c (build_x_function_call): Use really_overloaded_fn.
16382 Handle TEMPLATE_ID_EXPR.
16383 (build_x_unary_op): Likewise.
16384 (build_unary_op): Likewise.
16385 (mark_addressable): Templates whose address is taken are marked
16386 as used.
16387
16388 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16389
16390 * decl.c (init_decl_processing): Declare __builtin_constant_p as
16391 accepting any kind of type, not only int.
16392
16393 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16394
16395 * search.c (get_matching_virtual): Notice virtual bases when sorrying
16396 about covariant returns.
16397
16398 * parse.y (member_init): Also imply typename here. Remove ancient
16399 extension for initializing base members.
16400
16401 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16402
16403 Handle multi-level typenames and implicit typename in base list.
16404 * parse.y (typename_sub{,[0-2]}): New rules.
16405 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16406 (nonnested_type): New rule.
16407 (complete_type_name): Use it.
16408 (base_class.1): Use typename_sub and nonnested_type.
16409 (nested_name_specifier): Don't elide std:: here.
16410 * decl.c (make_typename_type): Handle getting a type for NAME.
16411 (lookup_name_real): Turn std:: into :: here.
16412
16413 Rvalue conversions were removed in London.
16414 * call.c (is_subseq): Don't consider lvalue transformations.
16415 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16416 (joust): Re-enable ?: kludge.
16417
16418 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
16419
16420 * decl.c (start_function): Up warning of no return type to be a
16421 pedwarn.
16422
16423 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16424
16425 * init.c (expand_member_init): Don't set TREE_USED.
16426 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16427 set,don't clear TREE_USED wholesale.
16428
16429 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
16430
16431 * call.c (build_over_call): Do require_complete_type before
16432 build_cplus_new.
16433
16434 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16435
16436 * search.c (lookup_field): Call complete_type in all cases.
16437
16438 * decl.c (finish_function): Just warn about flowing off the end.
16439
16440 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16441
16442 * decl.c (grokparms): Don't bash a permanent list node if we're
16443 in a function.
16444
16445 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
16446
16447 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16448
16449 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16450
16451 * call.c (build_new_op): Give better error for syntactically
16452 correct, but semantically invalid, use of undeclared template.
16453
16454 * call.c (compare_qual): Handle pmfs.
16455
16456 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16457 after the exception spec.
16458
16459 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16460
16461 * call.c (null_ptr_cst_p): Integer type, not integral type.
16462
16463 * call.c (joust): Disable warnings until they can be moved to the
16464 right place.
16465
16466 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
16467
16468 * Makefile.in, config-lang.in: Convert to autoconf.
16469
16470 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16471
16472 * decl.c (lookup_name_real): Add implicit 'typename' to types from
16473 base classes.
16474
16475 * pt.c (most_specialized_class): Fix typo.
16476 (tsubst): Move constant folding to TREE_VEC case.
16477
16478 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
16479
16480 * pt.c (do_poplevel): Don't warn about unused local variables
16481 while processing_template_decl since we don't always know whether
16482 or not they will need constructing/destructing.
16483
16484 * pt.c (uses_template_parms): Check the values of an enumeration
16485 type to make sure they don't depend on template parms.
16486
16487 * decl.c (make_typename_type): Don't lookup the field if the
16488 context uses template parms, even if we're not
16489 processing_template_decl at the moment.
16490
16491 * pt.c (coerce_template_parms): Avoid looking at the
16492 TYPE_LANG_DECL portion of a typename type, since there won't be
16493 one.
16494 (tsubst): Do constant folding as necessary to make sure that
16495 arguments passed to lookup_template_class really are constants.
16496
16497 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16498
16499 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16500 * decl2.c (finish_file): Only register exception tables if we
16501 need to.
16502
16503 * decl.c (init_decl_processing): Add __builtin_[fs]p.
16504
16505 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16506
16507 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16508
16509 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
16510
16511 * error.c (dump_decl): Avoid crashing when presented with a
16512 uninitialized constant, as can occur with a template parameter.
16513 (dump_expr): Make sure that there are enough levels of
16514 current_template_parms before we start diving through them.
16515
16516 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16517
16518 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16519 c-typeck.c.
16520
16521 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16522
16523 * except.c (expand_throw): Call build_delete for all
16524 exception types, not just objects with destructors.
16525
16526 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
16527
16528 * decl.c (current_local_enum): Remove static.
16529 * pt.c (tsubst_enum): Save and restore value of current_local_enum
16530 in case template is expanded in enum decl.
16531 (instantiate_class_template): Use new tsubst_enum signature.
16532 (tsubst_expr): Likewise.
16533
16534 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
16535
16536 * pt.c (begin_member_template_processing): Take a function as
16537 argument, not a set of template arguments. Use the template
16538 parameters, rather than the arguments. Handle non-type parameters
16539 correctly. Push a binding level for the parameters so that multiple
16540 member templates using the same parameter names can be declared.
16541 (end_member_template_processing): Pop the binding level.
16542 (push_template_decl): Mark member templates as static when
16543 appropriate.
16544
16545 * lex.c (do_pending_inlines): Pass the function, not its template
16546 arguments, to begin_member_template_processing.
16547 (process_next_inline): Likewise.
16548 (do_pending_defargs): Likewise.
16549
16550 * error.c (dump_expr): Obtain the correct declaration for a
16551 TEMPLATE_CONST_PARM.
16552
16553 * call.c (add_template_conv_candidate): New function.
16554 (build_object_call): Handle member templates, as done in the other
16555 build_ functions.
16556
16557 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
16558
16559 * decl.c (replace_defag): Undo previous change.
16560 * lex.c (do_pending_defargs): Deal with member templates.
16561
16562 * pt.c (is_member_template): Avoid crashing when passed a
16563 non-function argument.
16564
16565 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16566
16567 * class.c (grow_method): Remove check for redeclaration.
16568
16569 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
16570
16571 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16572 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16573 (PRIMARY_TEMPLATE_P): Use it.
16574 * call.c (build_overload_call_real): Use it.
16575 * class.c (instantiate_type): Likewise.
16576 * decl.c (decls_match): Likewise.
16577 * method.c (build_overload_identifier): Likewise.
16578 * pt.c (push_template_decl): Likewise.
16579 (classtype_mangled_name): Likewise.
16580 (lookup_template_class): Likewise.
16581
16582 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16583 DECL_NTPARMS to conform to usage elsewhere.
16584 * call.c (add_template_candidate): Likewise.
16585 * class.c (instantiate_type): Likewise.
16586 * pt.c (instantiate_template): Likewise.
16587 (get_bindings): Likewise.
16588
16589 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16590 is_member_template.
16591
16592 * pt.c (unify): Undo changes to allow multiple levels of template
16593 parameters.
16594 (type_unification): Likewise.
16595 (fn_type_unification): Likewise.
16596 (get_class_bindings): Likewise.
16597 * cp-tree.h (Likewise).
16598
16599 * decl.c (replace_defarg): Check that the type of the default
16600 parameter does not invlove a template type before complaining
16601 about the initialization.
16602
16603 * error.c (dump_expr): Deal with template constant parameters in
16604 member templates correctly.
16605
16606 * pt.c (is_member_template): Deal with class specializations
16607 correctly.
16608 (tsubst): Handle "partial instantiation" of member templates
16609 correctly.
16610
16611 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
16612
16613 * pt.c (type_unification): Change calling sequence to allow for
16614 multiple levels of template parameters.
16615 (tsubst_expr): Likewise.
16616 (tsubst): Likewise.
16617 (tsubst_copy): Likewise.
16618 (instantiate_template): Likewise.
16619 (unify): Likewise.
16620 * call.c (build_overload_call_real): Use it.
16621 (add_builtin_candidate): Use it.
16622 (build_new_method_call): Use it.
16623 * class.c (instantiate_type): Use it.
16624 * decl.c (grokdeclarator): Use it.
16625 * decl2.c (finish_file): Use it.
16626 * method.c (build_overload_identifier): Use it.
16627
16628 * call.c (add_template_candidate): Add additional parameter for
16629 the function return type. Call fn_type_unification istead of
16630 type_unification.
16631 (build_user_type_conversion_1): Handle member templates.
16632 (build_new_function_call): Likewise.
16633 (build_new_op): Likewise.
16634 (build_new_method_call): Likewise.
16635
16636 * class.c (grow_method): Don't give an error message indicating
16637 that two member templates with the same name are ambiguous.
16638 (finish_struct): Treat member template functions just like member
16639 functions.
16640
16641 * cp-tree.h (check_member_template): Add declaration.
16642 (begin_member_template_processing): Likewise.
16643 (end_member_template_processing): Likewise.
16644 (fn_type_unification): Likewise.
16645 (is_member_template): Likewise.
16646 (tsubst): Change prototype.
16647 (tsubst_expr): Likewise.
16648 (tsubst_copy): Likewise.
16649 (instantiate_template): Likewise.
16650 (get_bindings): Likewise.
16651
16652 * decl.c (decls_match): Handle multiple levels of template
16653 parameters.
16654 (pushdecl): Handle template type params just like other type
16655 declarations.
16656 (push_class_level_binding): Return immediately if the
16657 class_binding_level is NULL.
16658 (grokfndecl): If check_classfn() returns a member_template, use
16659 the result of the template, not the template itself.
16660
16661 * decl2.c (check_member_template): New function. Check to see
16662 that the entity declared to be a member template can be one.
16663 (check_classfn): Allow redeclaration of member template functions
16664 with different types; the new functions can be specializations or
16665 explicit instantiations.
16666
16667 * error.c (dump_decl): Handle multiple levels of template
16668 parameters.
16669 (dump_function_decl): Update to handle function templates.
16670
16671 * lex.c (do_pending_inlines): Set up template parameter context
16672 for member templates.
16673 (process_next_inline): Likewise.
16674
16675 * method.c (build_overload_identifier): Adjust for multiple levels
16676 of template parameters.
16677
16678 * parse.y (fn.def2): Add member templates.
16679 (component_decl_1): Likewise.
16680
16681 * pt.c (begin_member_template_processing): New function.
16682 (end_member_template_processing): Likewise.
16683 (is_member_template): Likewise.
16684 (fn_type_unification): Likewise.
16685 (current_template_parms): Return a vector of all the template
16686 parms, not just the innermost level of parms.
16687 (push_template_decl): Deal with the possibility of member
16688 templates.
16689 (lookup_template_class): Likewise.
16690 (uses_template_parms): Likewise.
16691 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16692 TEMPLATE_CONST_PARM to deal with multiple levels of template
16693 arguments. Add processing of TEMPLATE_DECL to produce new
16694 TEMPLATE_DECLs from old ones.
16695 (do_decl_instantiation): Handle member templates.
16696
16697 * search.c (lookup_fnfields_1): Handle member template conversion
16698 operators.
16699
16700 * tree.c (cp_tree_equal): Check the levels, as well as the
16701 indices, of TEMPLATE_CONST_PARMs.
16702
16703 * typeck.c (comptypes): Check the levels, as well as the indices,
16704 fo TEMPLATE_TYPE_PARMs.
16705 (build_x_function_call): Treat member templates like member
16706 functions.
16707
16708 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16709
16710 * typeck.c (c_expand_return): Always convert_for_initialization
16711 before checking for returning a pointer to local.
16712
16713 * pt.c (type_unification): If strict and the function parm doesn't
16714 use template parms, just compare types.
16715
16716 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
16717
16718 * method.c (build_overloaded_value): Replace direct call
16719 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16720
16721 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16722
16723 * typeck.c (convert_arguments): Don't arbitrarily choose the first
16724 of a set of overloaded functions.
16725
16726 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16727
16728 * lex.c (real_yylex): Don't elide __FUNCTION__.
16729
16730 * method.c (build_overload_value): Add in_template parm.
16731 (build_overload_int): Likewise.
16732 (build_overload_identifier): Pass it.
16733
16734 * decl.c (duplicate_decls): Don't bash a previous template
16735 definition with a redeclaration.
16736
16737 * pt.c (unify): float doesn't match double.
16738
16739 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16740 TYPE_DECL. Handle getting non-template types.
16741 * parse.y (explicit_instantiation): Use typespec instead of
16742 aggr template_type.
16743
16744 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16745
16746 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16747
16748 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16749
16750 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16751 (compare_ics): Likewise.
16752
16753 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16754
16755 * call.c (joust): Warn about choosing one conversion op over
16756 another because of 'this' argument when the other return type is
16757 better.
16758 (source_type): New fn.
16759
16760 * call.c (build_new_op): Strip leading REF_BIND from first operand
16761 to builtin operator.
16762
16763 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16764 use its RTL.
16765
16766 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16767
16768 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16769
16770 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16771
16772 * typeck.c (expand_target_expr): Make definition match declaration.
16773
16774 * class.c (get_basefndecls): Make definition match declaration.
16775
16776 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16777
16778 * input.c (sub_getch): Eventually give up and release the input file.
16779
16780 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16781 right place.
16782
16783 * call.c (joust): Tweak message.
16784
16785 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16786
16787 * error.c (type_as_string): Put const/volatile on template type
16788 parameters where appropriate.
16789
16790 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16791
16792 * call.c (strictly_better): Make arguments unsigned ints.
16793
16794 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16795
16796 * lex.c (real_yylex): Refer to __complex instead of complex.
16797
16798 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16799
16800 * lex.c (real_yylex): Don't use getc directly.
16801
16802 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16803
16804 * call.c (is_subseq): Don't try to be clever.
16805
16806 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16807
16808 * parse.y, pt.c: Include "except.h".
16809 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16810 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16811 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16812 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16813 prototyping.
16814
16815 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16816
16817 * decl2.c (mark_vtable_entries): Instead of replacing pure
16818 virtuals with a reference to __pure_virtual, copy the decl and
16819 change the RTL.
16820
16821 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16822
16823 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16824
16825 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16826
16827 * pt.c (instantiate_class_template): Call repo_template_used
16828 before finish_prevtable_vardecl.
16829
16830 * call.c (is_subseq): New fn.
16831 (compare_ics): Use it.
16832
16833 * repo.c (finish_repo): Don't crash on no args.
16834
16835 * parse.y (named_complex_class_head_sans_basetype): Handle
16836 explicit global scope.
16837 * decl2.c (handle_class_head): New fn.
16838
16839 * pt.c (unify): Add CONST_DECL case.
16840
16841 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16842
16843 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16844
16845 * cp-tree.h (report_type_mismatch): Add prototype.
16846 * call.c (build_overload_call_real): Remove erroneous fourth
16847 argument to report_type_mismatch.
16848 (build_user_type_conversion_1): Remove erroneous second arg to
16849 tourney.
16850 (build_new_function_call): Likewise.
16851 (build_object_call): Likewise.
16852 (build_new_op): Likewise.
16853 (build_new_method_call): Likewise.
16854
16855 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16856
16857 * error.c (dump_decl): Don't bother processing a function with no
16858 DECL_LANG_SPECIFIC.
16859
16860 * method.c (emit_thunk): Call init_function_start in the macro case.
16861
16862 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16863
16864 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16865 defined and used to set flag_vtable_thunks.
16866
16867 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16868
16869 * parse.y: Don't clear the inlines from their obstack until they've
16870 all been processed.
16871
16872 * decl.c (duplicate_decls): Don't complain about exception
16873 specification mismatch if flag_exceptions is off.
16874
16875 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16876
16877 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16878
16879 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16880
16881 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16882 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16883 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16884
16885 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16886 Include "config.h" first, as per autoconf manual.
16887
16888 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16889
16890 * decl.c (duplicate_decls): Tweak wording.
16891 * lex.c (do_pending_defargs): Don't die if we see a default arg
16892 that isn't a DEFAULT_ARG.
16893 * error.c (dump_expr): Handle DEFAULT_ARG.
16894
16895 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16896 * lang-options.h: Add -fhandle-exceptions.
16897
16898 * class.c (build_vtable): Vtables are artificial.
16899 (prepare_fresh_vtable): Likewise.
16900
16901 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16902
16903 * cvt.c (ocp_convert): After converting to the target type, set
16904 LOOKUP_NO_CONVERSION.
16905
16906 * call.c (joust): Warn about potentially confusing promotion rules
16907 with -Wsign-promo.
16908 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16909
16910 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
16911
16912 * exception.cc: Declare __terminate_func with noreturn attribute.
16913
16914 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
16915
16916 * parse.y: Break out eat_saved_input, handle errors.
16917 (function_try_block): Use compstmt instead of compstmt_or_error.
16918
16919 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16920
16921 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16922
16923 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16924
16925 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16926 existence of cc1plus check whether $(LANGUAGES) contains C++.
16927
16928 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16929
16930 * method.c (do_build_copy_constructor): When copying an anonymous
16931 union member loop around to handle nested anonymous unions. Use
16932 the offset of the member relative to the outer structure, not the
16933 union.
16934
16935 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16936
16937 * call.c (resolve_args): New fn.
16938 (build_new_function_call): Use it.
16939 (build_object_call): Likewise.
16940 (build_new_method_call): Likewise.
16941
16942 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16943
16944 * call.c (build_over_call): tsubst all default parms from templates.
16945
16946 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16947
16948 * decl.c (struct cp_function): Add static_labelno.
16949 (push_cp_function_context): Save it.
16950 (pop_cp_function_context): Restore it.
16951
16952 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16953
16954 * typeck.c (build_component_ref_1): Convert from reference.
16955
16956 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16957
16958 * parse.y (current_declspecs, prefix_attributes): Initialize to
16959 NULL_TREE.
16960
16961 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16962 before we try to force it to be a TREE_LIST.
16963 (decl): Make sure $1.t is non-nil.
16964
16965 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16966
16967 * pt.c (uses_template_parms): Handle template first-parse codes.
16968
16969 * decl.c (cp_finish_decl): Only warn about user-defined statics.
16970
16971 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16972
16973 * pt.c (unify): Handle BOOLEAN_TYPE.
16974
16975 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16976 * pt.c (tsubst): Don't set it.
16977 * call.c (build_over_call): Use uses_template_parms.
16978
16979 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16980
16981 * method.c (build_overload_nested_name): Use static_labelno
16982 instead of var_labelno.
16983 (build_qualified_name): New fn.
16984 (build_overload_name): Split out from here.
16985 (build_static_name): Use build_qualified_name.
16986 * decl.c (cp_finish_decl): Statics in extern inline functions
16987 have comdat linkage.
16988 (start_function): Initialize static_labelno.
16989
16990 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16991
16992 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16993 before "all member functions in class [] are private".
16994
16995 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16996
16997 * lex.c (do_scoped_id): convert_from_reference.
16998 * init.c (build_offset_ref): Likewise.
16999
17000 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
17001
17002 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
17003
17004 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17005
17006 * typeck.c (get_member_function_from_ptrfunc): Promote index
17007 before saving it.
17008
17009 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17010
17011 * tree.c (layout_basetypes): Move non-virtual destructor warning.
17012 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
17013
17014 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17015
17016 * decl.c (grokdeclarator): Call add_defarg_fn for the function
17017 type, too.
17018 * lex.c (add_defarg_fn): Adjust.
17019 (do_pending_defargs): Adjust. Don't skip the first parm.
17020
17021 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17022
17023 * decl.c (build_enumerator): Global enumerators are also readonly.
17024
17025 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
17026 (build_dynamic_cast): Call it and convert_from_reference.
17027
17028 * lex.c (add_defarg_fn): New fn.
17029 (snarf_defarg): Don't add to defarg_types.
17030 (do_pending_defargs): Lose defarg_types. All fns we process now
17031 have defargs.
17032 * decl.c (grokfndecl): Call add_defarg_fn.
17033
17034 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
17035 * cp-tree.def: Add DEFAULT_ARG.
17036 * spew.c (yylex): Call snarf_defarg as appropriate.
17037 * parse.y: New tokens DEFARG and DEFARG_MARKER.
17038 (defarg_again, pending_defargs, defarg, defarg1): New rules.
17039 (structsp): Use pending_defargs.
17040 (parms, full_parm): Use defarg.
17041 * lex.c (init_lex): Initialize inline_text_firstobj.
17042 (do_pending_inlines): Never pass the obstack to feed_input.
17043 (process_next_inline): Call end_input instead of restore_pending_input.
17044 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
17045 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
17046 * input.c (end_input): New fn.
17047 (sub_getch): At the end of some fed input, just keep returning EOF
17048 until someone calls end_input.
17049 Remove 'obstack' field from struct input_source.
17050 * decl.c (grokparms): Handle DEFAULT_ARG.
17051 (replace_defarg): New fn.
17052 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
17053
17054 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17055
17056 * call.c (implicit_conversion): If nothing else works, try binding
17057 an rvalue to a reference.
17058
17059 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
17060
17061 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
17062 ifndef for Cygwin32 to include SIGSEGV.
17063
17064 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17065
17066 * class.c (finish_struct_1): Only complain about pointers without
17067 copy stuff if there are any constructors.
17068
17069 * rtti.c (build_dynamic_cast): Call complete_type on the types.
17070
17071 * decl.c (grokfndecl): If the function we chose doesn't actually
17072 match, die.
17073
17074 * decl2.c (grokclassfn): Don't specify 'const int' for the
17075 artificial destructor parm.
17076
17077 * pt.c (type_unification): If we are called recursively, nothing
17078 decays.
17079
17080 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
17081
17082 * decl.c (init_decl_processing): Stop trying to catch signals
17083 other than SIGABRT since the Cygwin32 library doesn't support
17084 them correctly yet. This fixes a situation in which g++ causes
17085 a hang on SIGSEGVs and other such signals in our Win32-hosted
17086 tools.
17087
17088 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
17089
17090 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
17091
17092 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17093
17094 * typeck2.c (store_init_value): Always return the value if our
17095 type needs constructing.
17096
17097 * method.c (hack_identifier): Convert class statics from
17098 reference, too.
17099
17100 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17101
17102 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17103
17104 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
17105
17106 * typeck.c (c_expand_return): Make sure we clean up temporaries at
17107 the end of return x;
17108
17109 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17110
17111 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17112
17113 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
17114
17115 * except.c (expand_builtin_throw): Add support
17116 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17117
17118 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17119
17120 * repo.c (extract_string): Null-terminate.
17121
17122 * cp-tree.h (TI_SPEC_INFO): New macro.
17123 (CLASSTYPE_TI_SPEC_INFO): New macro.
17124 * pt.c (push_template_decl): Correctly determine # of template parms
17125 for partial specs.
17126
17127 * call.c (compare_ics): Really fix 'this' conversions.
17128
17129 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17130 non-template fn.
17131
17132 * pt.c (push_template_decl): Complain about mismatch in # of
17133 template parms between a class template and a member template.
17134
17135 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17136
17137 * method.c (synthesize_method): You can't call
17138 function_cannot_inline_p after finish_function.
17139 * decl.c (finish_function): Turn on flag_inline_functions and turn
17140 off DECL_INLINE before handing a synthesized method to the
17141 backend.
17142
17143 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17144
17145 * method.c (synthesize_method): Remove July 30 change to never set
17146 DECL_INLINE if at_eof.
17147
17148 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
17149
17150 * xref.c (GNU_xref_member): Ensure that the node has a
17151 decl_lang_specific part before checking DECL_FRIEND_P.
17152
17153 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17154
17155 * pt.c (instantiate_class_template): Diagnose non-class types used
17156 as bases.
17157
17158 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17159
17160 * typeck.c (build_conditional_expr): Use convert_for_initialization
17161 instead of convert_and_check.
17162
17163 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17164
17165 * parse.y (typespec): Don't pedwarn for typeof.
17166
17167 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17168
17169 * repo.c (finish_repo): Only check changes if we would write a
17170 repo file.
17171
17172 * call.c (compare_ics): Fix handling of 'this' conversions.
17173
17174 * pt.c (do_decl_instantiation): Support static data too. Rename
17175 from do_function_instantiation.
17176 * cp-tree.h: Adjust.
17177 * parse.y: Adjust.
17178
17179 * repo.c (extract_string): New fn.
17180 (get_base_filename): Use it.
17181 (init_repo): Compare old args with current args.
17182
17183 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
17184
17185 * Makefile.in, Make-lang.in: Protect C-ls with a comment
17186 character, idea from Paul Eggert <eggert@twinsun.com>.
17187
17188 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
17189
17190 * typeck.c (c_expand_return): Be more persistent in looking for
17191 returned temps.
17192
17193 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17194 pointer to reference.
17195
17196 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17197
17198 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17199
17200 * init.c (build_member_call, build_offset_ref):
17201 Use do_scoped_id instead of do_identifier.
17202
17203 * cvt.c (convert): Remove bogosity.
17204
17205 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17206
17207 * cvt.c (build_up_reference): Do checks of ARGTYPE and
17208 TARGET_TYPE before trying to use get_binfo.
17209
17210 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17211
17212 * cvt.c (build_up_reference): Call get_binfo to get access control.
17213
17214 * decl2.c (import_export_decl): If we don't support weaks, leave
17215 statics undefined.
17216
17217 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
17218
17219 * except.c (expand_builtin_throw): Add support for machines that
17220 cannot access globals after throw's epilogue when
17221 -fno-sjlj-exceptions is used.
17222
17223 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17224
17225 * parse.y: 'std::' becomes '::'.
17226 * lex.c (real_yylex): Remove 'namespace' warning.
17227 * init.c (build_member_call): Ignore 'std::'.
17228 (build_offset_ref): Likewise.
17229 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17230 (do_toplevel_using_decl): Ignore 'using std::whatever'.
17231 * decl.c (push_namespace): Just sorry.
17232 (pop_namespace): Nop.
17233 (init_decl_processing): Declare std namespace.
17234
17235 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17236
17237 * search.c (push_class_decls): A name which ambiguously refers to
17238 several instantiations of the same template just refers to the
17239 template.
17240
17241 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
17242
17243 * decl.c (build_enumerator): Fix problem with unsigned long
17244 enumerated values being smashed to ints, causing overflow
17245 when computing next enumerated value (for enum values around
17246 MAX_VAL).
17247
17248 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
17249
17250 * typeck.c (build_component_ref): Only call mark_used on a decl.
17251
17252 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17253
17254 * typeck.c (build_c_cast): Make the check for a ptr to function
17255 more specific before possible default_conversion call.
17256
17257 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
17258
17259 * except.c (expand_exception_blocks): Simplify and fix and make
17260 sure we don't end a region in a sequence, as expand_end_bindings
17261 doesn't like it.
17262
17263 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
17264
17265 * except.c (init_exception_processing): Mark terminate as not
17266 returning so that the optimizer can optimize better.
17267
17268 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
17269
17270 * cvt.c (convert): Don't do any extra work, if we can avoid it
17271 easily.
17272
17273 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
17274
17275 * *.[chy]: Change cp_convert to ocp_convert, change convert to
17276 cp_convert. convert is now reserved for the backend, and doesn't
17277 have the semantics a frontend person should ever want.
17278
17279 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17280
17281 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17282 Lose -traditional support.
17283
17284 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17285
17286 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17287
17288 * parse.y (self_reference): Do it for templates, too.
17289 * class.c (pushclass): Don't overload_template_name; the alias
17290 generated by build_self_reference serves the same purpose.
17291
17292 * tree.c (list_hash): Make static, take more args.
17293 (list_hash_lookup): Likewise.
17294 (list_hash_add): Make static.
17295 (list_hash_canon): Lose.
17296 (hash_tree_cons): Only build a new node if one isn't already in the
17297 hashtable.
17298 (hash_tree_chain): Use hash_tree_cons.
17299 * cp-tree.h: Adjust.
17300 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17301 of calling lookup_name.
17302
17303 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17304
17305 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17306 doesn't refer to the CONST_DECLs.
17307
17308 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
17309
17310 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17311 is bigger.
17312 (expand_class_desc): Convert the last argument to a sizetype.
17313
17314 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17315
17316 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17317 __real__): Add reswords.
17318 * hash.h: Regenerate.
17319 * lex.h (rid): Add RID_COMPLEX.
17320 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17321 * lex.c (init_lex): Add building of RID_COMPLEX.
17322 (real_yylex): General cleanup in line with what c-lex.c also has,
17323 sans the cruft for traditional; add handling of SPEC_IMAG, complex
17324 types, and imaginary numeric constants.
17325 * parse.y (REALPART, IMAGPART): Add tokens.
17326 (unary_expr): Add REALPART and IMAGPART rules.
17327 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17328 * decl.c (complex_{integer,float,double,long}_type_node): Define
17329 types.
17330 (init_decl_processing): Set up the types.
17331 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
17332 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17333 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17334 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17335 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17336 COMPLEX_TYPE case.
17337 * method.c (build_overload_name): Add handling of the different
17338 COMPLEX_TYPEs, prefixing them with `J'.
17339 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17340 as a template parm.
17341 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17342 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17343 (mapcar): Handle COMPLEX_CST.
17344 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17345 (common_type): Add code for complex types.
17346 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17347 (convert_for_assignment): Likewise.
17348 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17349
17350 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17351
17352 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17353 tsubst_expr, as it might try to do overload resolution.
17354
17355 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17356
17357 * pt.c (instantiate_class_template): Oops.
17358
17359 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17360
17361 * cp-tree.def: Add TAG_DEFN.
17362 * pt.c (tsubst_enum): New fn.
17363 (instantiate_class_template): Use it.
17364 (tsubst_expr): Support TAG_DEFN.
17365 (tsubst): Support local enums.
17366 (tsubst_copy): Likewise.
17367 * decl.c (finish_enum): Likewise.
17368 (start_enum): If this is a local enum, switch to permanent_obstack.
17369
17370 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
17371
17372 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17373 (finish_function): Put the base init code for constructors just
17374 after the parm cleanup insns.
17375 (struct cp_function): Add last_parm_cleanup_insn.
17376 (push_cp_function_context): Likewise.
17377 (pop_cp_function_context): Likewise.
17378
17379 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17380
17381 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17382
17383 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17384
17385 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17386 for THUNK_FNDECL before we switch to temporary allocation.
17387
17388 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
17389
17390 * call.c (build_new_op): Handle null arg2 for ?:.
17391
17392 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
17393
17394 * except.c (expand_exception_blocks): Ensure that we flow through
17395 the end of the exception region for the exception specification.
17396 Move exception region for the exception specification in, so that
17397 it doesn't protect the parm cleanup. Remove some obsolete code.
17398 * decl.c (store_parm_decls): Likewise.
17399 (finish_function): Likewise.
17400
17401 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17402
17403 * init.c (build_new): Fix nothrow handling.
17404
17405 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17406
17407 * init.c (emit_base_init): Don't warn about the initialization
17408 list for an artificial member.
17409
17410 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17411
17412 * expr.c (do_case): Handle !START case for the error msg.
17413
17414 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17415
17416 * decl2.c, lang-options.h: New option -Weffc++.
17417 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17418 to -Weffc++.
17419
17420 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17421 to MULTIPLE_SYMBOL_SPACES.
17422
17423 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17424
17425 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17426
17427 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17428
17429 * typeck.c (c_expand_return): Don't complain about returning void
17430 to void in an artificial function.
17431 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17432 don't set DECL_RESULT, set DECL_ARTIFICIAL.
17433 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17434
17435 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
17436
17437 * init.c (init_decl_processing): Add support for setjmp/longjmp based
17438 exception handling.
17439 * except.c (init_exception_processing): Likewise.
17440 (expand_end_catch_block): Likewise.
17441 (expand_exception_blocks): Likewise.
17442 (expand_throw): Likewise.
17443 * exception.cc (__default_terminate): Likewise.
17444
17445 * init.c (perform_member_init): Use new method of expr level
17446 cleanups, instead of cleanups_this_call and friends.
17447 (emit_base_init): Likewise.
17448 (expand_aggr_vbase_init_1): Likewise.
17449 (expand_vec_init): Likewise.
17450 * decl.c (cp_finish_decl): Likewise.
17451 (expand_static_init): Likewise.
17452 (store_parm_decls): Likewise.
17453 (cplus_expand_expr_stmt): Likewise.
17454 * decl2.c (finish_file): Likewise.
17455
17456 * Make-lang.in (exception.o): Ok to compile with -O now.
17457
17458 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17459 we know it will be done later by the backend.
17460
17461 * decl2.c (lang_f_options): Remove support for short temps.
17462 * lang-options.h: Likewise.
17463
17464 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17465
17466 * tree.c (varargs_function_p): New fn.
17467 * method.c (emit_thunk): Replace broken generic code with code to
17468 generate a heavyweight thunk function.
17469
17470 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
17471
17472 * pt.c (process_template_parm): pedwarn about floating-point parms.
17473
17474 * decl.c (grokdeclarator): inline no longer implies static.
17475
17476 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17477
17478 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17479
17480 * class.c (check_for_override): The signature of an overriding
17481 function is not changed.
17482
17483 * call.c (build_over_call): Move setting of conv into the loop.
17484 Note: this change, along with the related changes of the 18th thru
17485 the 20th of April, fix an infinite loop problem in conversions.
17486
17487 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17488
17489 * call.c (build_user_type_conversion_1): Really ignore rvalue
17490 conversions when looking for a REFERENCE_TYPE.
17491
17492 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17493 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17494 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17495 (build_unary_op): Likewise.
17496 * call.c (build_over_call): See through a CONVERT_EXPR around the
17497 ADDR_EXPR for on a temporary.
17498 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17499 the ADDR_EXPR for a local variable.
17500
17501 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17502
17503 * call.c (build_user_type_conversion_1): If we're trying to
17504 convert to a REFERENCE_TYPE, only consider lvalue conversions.
17505 (build_new_function_call): Print candidates.
17506 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17507 (reference_binding): Binding a temporary of a reference-related type
17508 is BAD.
17509
17510 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17511
17512 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17513 * tinfo2.cc (type_info::before): Likewise.
17514
17515 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17516
17517 * call.c (implicit_conversion): Oops.
17518
17519 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17520
17521 * call.c (implicit_conversion): Try to find a reference conversion
17522 before binding a const reference to a temporary.
17523
17524 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
17525
17526 * exception.cc (__default_unexpected): Call terminate by default,
17527 so that if the user overrides terminate, the correct function will
17528 be called.
17529
17530 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
17531
17532 * parse.y (left_curly): Avoid trying to use any fields of
17533 error_mark_node, as there aren't any.
17534
17535 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17536
17537 * lex.c (do_identifier): Avoid breaking on overloaded methods
17538 as default arguments.
17539
17540 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
17541
17542 * call.c (add_template_candidate): Initialize the variable "dummy".
17543
17544 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
17545
17546 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17547 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17548
17549 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17550
17551 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17552 (debug_binfo): Delete decl, not needed.
17553
17554 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17555 promotes_to_aggr_type): Delete fns.
17556 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17557 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17558 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17559
17560 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17561
17562 * friend.c (is_friend_type): Delete fn.
17563 * cp-tree.h (is_friend_type): Delete decl.
17564
17565 * decl.c (original_result_rtx, double_ftype_double,
17566 double_ftype_double_double, int_ftype_int, long_ftype_long,
17567 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17568 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17569
17570 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17571 fwd decls.
17572 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17573
17574 * decl.c (pushdecl_nonclass_level): #if 0, unused.
17575 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17576
17577 * lex.c (reinit_lang_specific): #if 0, unused.
17578 * cp-tree.h (reinit_lang_specific): #if 0 decl.
17579
17580 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17581 * cp-tree.h (revert_static_member_fn): Delete decl.
17582
17583 * class.c (root_lang_context_p): Delete fn.
17584 * cp-tree.h (root_lang_context_p): Delete decl.
17585
17586 * decl.c (set_current_level_tags_transparency): #if 0, unused.
17587 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17588
17589 * lex.c (set_vardecl_interface_info): Make static.
17590 * cp-tree.h (set_vardecl_interface_info): Delete decl.
17591
17592 * call.c (find_scoped_type): Make static.
17593 * cp-tree.h (find_scoped_type): Delete decl.
17594
17595 * search.c (convert_pointer_to_vbase): Make static.
17596 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17597
17598 * decl.c (const_ptr_type_node): Likewise.
17599 * cp-tree.h (const_ptr_type_node): Delete decl.
17600
17601 * typeck.c (common_base_type): Make static.
17602 * cp-tree.h (common_base_types): Delete erroneous decl.
17603
17604 * pt.c (classtype_mangled_name): Make static.
17605 * cp-tree.h (classtype_mangled_name): Delete decl.
17606
17607 * lex.c (check_newline): Make static.
17608 * cp-tree.h (check_newline): Delete decl.
17609
17610 * typeck.c (build_x_array_ref): Delete fn, same idea as
17611 grok_array_decl.
17612 * cp-tree.h (build_x_array_ref): Delete decl.
17613
17614 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17615 copy_lang_decl.
17616 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17617
17618 * class.c (build_vtable_entry): Make static.
17619 * cp-tree.h (build_vtable_entry): Delete decl.
17620
17621 * class.c (build_vbase_pointer): Make static.
17622 * cp-tree.h (build_vbase_pointer): Delete decl.
17623
17624 * sig.c (build_sptr_ref): Add forward decl and make static.
17625 * cp-tree.h (build_sptr_ref): Delete decl.
17626
17627 * call.c (build_new_method_call): Add forward decl and make static.
17628 * cp-tree.h (build_new_method_call): Delete decl.
17629
17630 * call.c (build_object_call): Make static.
17631 * class.c (check_for_override, complete_type_p, mark_overriders):
17632 Likewise.
17633 * decl.c (cp_function_chain): Likewise.
17634 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17635 Likewise.
17636 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17637 Likewise.
17638 * tree.c (build_cplus_array_type_1): Likewise.
17639 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17640 (comp_target_parms): Likewise.
17641
17642 * init.c (build_builtin_call): Make static.
17643 * cp-tree.h (build_builtin_call): Delete decl.
17644
17645 * typeck.c (binary_op_error): Delete decl.
17646 * cp-tree.h (binary_op_error): Likewise.
17647
17648 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17649
17650 * call.c (build_method_call): Compare against error_mark_node
17651 directly, rather than the ERROR_MARK tree code.
17652 * cvt.c (cp_convert): Likewise.
17653 * decl.c (print_binding_level): Likewise.
17654 (duplicate_decls): Likewise.
17655 (grokdeclarator): Likewise.
17656 (grokdeclarator): Likewise.
17657 * init.c (expand_aggr_init_1): Likewise.
17658 (decl_constant_value): Likewise.
17659 * method.c (build_opfncall): Likewise.
17660 (hack_identifier): Likewise.
17661 * typeck.c (build_modify_expr): Likewise.
17662
17663 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17664
17665 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17666
17667 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17668
17669 * pt.c (coerce_template_parms): Add new error message.
17670
17671 * method.c (build_overload_value): Implement name mangling for
17672 floating-point template arguments.
17673
17674 * method.c (build_overload_int, icat, dicat): Fix mangling of template
17675 arguments whose absolute value doesn't fit in a signed word.
17676
17677 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17678
17679 * friend.c: New file; put all of the friend stuff in here.
17680 * init.c: Instead of here.
17681 * Makefile.in (CXX_OBJS): Add friend.o.
17682 (friend.o): Add dependencies.
17683 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17684
17685 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17686
17687 * call.c (build_scoped_method_call): Complain if the scope isn't a
17688 base.
17689
17690 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17691
17692 * parse.y (left_curly): Don't crash on erroneous type.
17693
17694 * init.c (build_delete): Fix type of ref.
17695
17696 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17697
17698 * search.c (get_vbase_1): Renamed from get_vbase.
17699 (get_vbase): Wrapper, now non-static.
17700 (convert_pointer_to_vbase): Now static.
17701
17702 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17703 * init.c (build_delete): Pass one.
17704 (build_partial_cleanup_for): Use build_scoped_method_call.
17705 * decl.c (finish_function): Pass a binfo.
17706
17707 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17708
17709 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17710
17711 * typeck.c (build_c_cast): Lose other reference to flag.
17712
17713 * call.c (build_field_call): Don't look for [cd]tor_identifier.
17714 * decl2.c (delete_sanity): Remove meaningless use of
17715 LOOKUP_HAS_IN_CHARGE.
17716 * decl.c (finish_function): Use build_scoped_method_call instead
17717 of build_delete for running vbase dtors.
17718 * init.c (build_delete): Call overload resolution code instead of
17719 duplicating it badly.
17720
17721 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
17722
17723 * call.c (build_over_call): Call mark_used before trying to elide
17724 the call.
17725
17726 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17727
17728 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17729
17730 * typeck.c (build_modify_expr): Always pedwarn for a cast to
17731 non-reference used as an lvalue.
17732
17733 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17734
17735 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17736
17737 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17738
17739 * parse.y (handler): Fix template typo.
17740
17741 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17742
17743 * error.c (lang_decl_name): New fn.
17744 * tree.c (lang_printable_name): Use it.
17745
17746 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
17747
17748 * g++spec.c: Include config.h so that we can catch bzero #defines
17749 from the config file.
17750
17751 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
17752
17753 * new1.cc: Include a declaration for malloc, to avoid warning, and
17754 avoid lossing on systems that require one (ones that define malloc
17755 in xm.h).
17756
17757 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17758
17759 * decl2.c (max_tinst_depth): New variable.
17760 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17761 option.
17762 * pt.c (max_tinst_depth): Variable moved.
17763 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17764 as legal.
17765
17766 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17767
17768 * decl.c (xref_basetypes): Allow a base class that depends on
17769 template parms to be incomplete.
17770
17771 * decl2.c (build_expr_from_tree): Support typeid(type).
17772 * rtti.c (get_typeid): Support templates.
17773 (expand_si_desc, expand_class_desc): Fix string length.
17774 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17775
17776 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17777
17778 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17779
17780 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17781
17782 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17783
17784 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17785 smashes together template and non-template decls of the same
17786 signature.
17787
17788 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
17789
17790 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17791
17792 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17793
17794 * decl.c (duplicate_decls): Next route, pedwarn about different
17795 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17796
17797 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17798
17799 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17800 (struct lang_type): Delete has_default_implementation member.
17801 Increase dummy to 21.
17802 * decl.c (start_method): Delete usage.
17803
17804 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17805 store_after_parms, start_decl_1, auto_function): Add decls.
17806 (get_arglist_len_in_bytes, declare_implicit_exception,
17807 have_exceptions_p, make_type_decl, typedecl_for_tag,
17808 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17809 build_component_type_expr, cplus_exception_name,
17810 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17811 * call.c (build_this): Make static.
17812 (is_complete): Likewise.
17813 (implicit_conversion): Likewise.
17814 (reference_binding): Likewise.
17815 (standard_conversion): Likewise.
17816 (strip_top_quals): Likewise.
17817 (non_reference): Likewise.
17818 (build_conv): Likewise.
17819 (user_harshness): Likewise.
17820 (rank_for_ideal): Likewise.
17821 * decl.c (start_decl_1): Delete forward decl.
17822 (push_decl_level): Make static.
17823 (resume_binding_level): Make static.
17824 (namespace_bindings_p): Make static.
17825 (declare_namespace_level): Make static.
17826 (lookup_name_real): Make static.
17827 (duplicate_decls): Make static. Take register off NEWDECL and
17828 OLDDECL parm decls.
17829 * decl2.c (get_sentry): Make static.
17830 (temp_name_p): Delete fn.
17831 * except.c (auto_function): Delete decl.
17832 * lex.c (handle_{cp,sysv}_pragma): Make static.
17833 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17834 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17835 * pt.c (tsubst_expr_values): Make static.
17836 * rtti.c (combine_strings): Delete decl.
17837
17838 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17839
17840 * pt.c (push_template_decl): Handle getting a typedef.
17841
17842 * call.c (build_new_function_call): Complain about void arg.
17843
17844 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17845
17846 * decl.c (duplicate_decls): Give pedwarn of different exceptions
17847 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17848
17849 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
17850
17851 * except.c (expand_throw): Don't expand the cleanup tree here,
17852 since we are not going to write the rtl out. Fixes problem with
17853 -g -O on SPARC.
17854
17855 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
17856
17857 * Make-lang.in: Add $(exeext) as necessary.
17858
17859 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
17860
17861 * parse.y (handler_seq): Must have at least one catch clause.
17862
17863 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17864
17865 * call.c (add_builtin_candidate): Restore ?: hack.
17866
17867 * decl.c (grok_op_properties): More warnings.
17868
17869 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17870
17871 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17872 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17873
17874 * decl.c (duplicate_decls): Scale back to a warning, and only do
17875 'em if -pedantic.
17876
17877 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
17878
17879 * decl.c (duplicate_decls): pedwarn mismatched exception
17880 specifications.
17881
17882 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
17883
17884 * call.c (build_new_method_call): Don't display the invisible
17885 argument for controlling virtual bases.
17886
17887 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
17888
17889 * new: Add nothrow new and delete, bad_alloc and throw specifications
17890 for delete.
17891 * decl.c (init_decl_processing): Add throw specification for delete.
17892 * new.cc (nothrow): Define.
17893 * lex.c (real_yylex): Removing warning that throw and friends are
17894 keywords.
17895 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
17896 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
17897 * Make-lang.in: Add new{1,2}.{cc,o}.
17898
17899 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17900
17901 * lex.c (cons_up_default_function): Fix return type of synth op=.
17902
17903 * init.c (emit_base_init): Add warnings for uninitialized members
17904 and bases.
17905
17906 * decl.c (xref_basetypes): Add warning for non-polymorphic type
17907 with destructor used as base type.
17908
17909 * decl.c (grok_op_properties): Add warning for op= returning void.
17910 * typeck.c (c_expand_return): Add warning for op= returning anything
17911 other than *this.
17912
17913 * class.c (finish_struct_1): Add warning for class with pointers
17914 but not copy ctor or copy op=.
17915
17916 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
17917 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
17918 (instantiate_template): If -fexternal-templates, add this
17919 instantiation to pending_templates.
17920
17921 * decl2.c (copy_assignment_arg_p): Disable old hack to support
17922 Booch components.
17923
17924 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
17925
17926 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
17927
17928 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
17929
17930 * call.c (standard_conversion): Handle getting references. Tack
17931 on RVALUE_CONV here. Do it for non-class types, too.
17932 (reference_binding): Pass references to standard_conversion.
17933 (implicit_conversion): Likewise.
17934 (add_builtin_candidate): Disable one ?: kludge.
17935 (convert_like): Handle RVALUE_CONVs for non-class types.
17936 (joust): Disable the other ?: kludge.
17937
17938 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17939
17940 * decl.c (init_decl_processing): Add code to build up common
17941 function types beforehand, to avoid creation then removal of
17942 things already in the hash table.
17943
17944 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17945
17946 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
17947 the arguments.
17948
17949 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
17950 current_template_parms.
17951
17952 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
17953
17954 * search.c (lookup_field): Don't return a function, check want_type.
17955
17956 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17957
17958 * init.c (build_new): Make sure PLACEMENT has a type.
17959
17960 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17961
17962 * init.c (build_new): Support new (nothrow).
17963
17964 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17965
17966 * pt.c (instantiate_decl): Also do push_to_top_level before setting
17967 up DECL_INITIAL.
17968
17969 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
17970 * pt.c (tsubst): Defer instantiation of default args.
17971 * call.c (build_over_call): Until here.
17972
17973 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17974
17975 * search.c (lookup_field): Make sure we have an
17976 IDENTIFIER_CLASS_VALUE before we try to return it.
17977
17978 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17979
17980 * call.c (build_method_call): Delete unused var PARM.
17981 (build_overload_call_real): Likewise.
17982 (build_object_call): Delete unused var P.
17983 (build_new_op): Likewise.
17984 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
17985 var definitions, which are never used.
17986 (shadow_tag): Delete unused var FN.
17987 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
17988 * init.c (build_new): Delete unused var ALLOC_TEMP.
17989 * method.c (hack_identifier): Delete unused var CONTEXT.
17990 (do_build_copy_constructor): Delete unused var NAME.
17991 (synthesize_method): Delete unused var BASE.
17992 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
17993 * rtti.c (build_headof): Delete unused var VPTR.
17994 (get_typeid): Delete unused var T.
17995 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
17996 and ORIG_OP2.
17997 (build_ptrmemfunc): Delete unused vars U and NINDEX.
17998 * typeck2.c (build_functional_cast): Delete unused var BINFO.
17999
18000 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
18001
18002 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
18003 things in a type being defined.
18004 * decl.c (finish_enum): Reverse the values so that they are in
18005 the correct order.
18006
18007 * pt.c (instantiate_class_template): Don't initialize
18008 BINFO_BASETYPES until the vector is filled out.
18009 (unify): Don't abort on conflicting bindings, just fail.
18010 (instantiate_decl): Do push_tinst_level before any tsubsting.
18011
18012 * method.c (build_overload_value): Handle getting a
18013 TEMPLATE_CONST_PARM for a pointer.
18014
18015 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
18016
18017 * init.c (expand_member_init): Don't give 'not a base' error for
18018 templates.
18019
18020 * pt.c (instantiate_decl): Call import_export_decl later.
18021
18022 * pt.c (instantiate_class_template): Return a value.
18023
18024 * parse.y (extension): New rule for __extension__.
18025 (extdef, unary_expr, decl, component_decl): Use it.
18026
18027 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
18028
18029 * class.c (base_binfo): Remove unused base_has_virtual member.
18030 (finish_base_struct): Likewise.
18031 (finish_struct_1): Likewise.
18032
18033 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
18034
18035 * search.c (expand_upcast_fixups): Fix bogus code generation
18036 problem where the generated code uses the wrong index into the
18037 runtime built vtable on the stack. Old code could clobber random
18038 stack values.
18039
18040 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
18041
18042 * init.c (perform_member_init): Make sure the partial EH cleanups
18043 live on the function_obstack.
18044
18045 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
18046
18047 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
18048 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
18049
18050 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
18051
18052 * decl.c (grokvardecl): Avoid ANSI style initialization.
18053
18054 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
18055
18056 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
18057
18058 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
18059
18060 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
18061
18062 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18063
18064 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
18065 arguments we compare against. Start the count of I at 1, not 0,
18066 since argv[0] is still the command.
18067
18068 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
18069
18070 * lang-specs.h: Accept .cp as an C++ extension.
18071
18072 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18073
18074 * cp-tree.h (ptr_reasonably_similar): Add decl.
18075
18076 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18077
18078 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
18079 pointer. New local SPECBITS with the parm's value.
18080 (grokdeclarator): Pass &specbits down.
18081
18082 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18083 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
18084
18085 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
18086 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
18087
18088 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
18089 not an error_mark_node.
18090
18091 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18092
18093 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
18094 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18095
18096 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18097
18098 * decl.c (grokdeclarator): When giving an anonymous struct a name,
18099 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18100 not affected).
18101
18102 * typeck2.c (build_m_component_ref): If component is a pointer
18103 to data member, resolve the OFFSET_REF now.
18104
18105 * call.c (convert_like): Don't go into infinite recursion.
18106
18107 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18108
18109 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18110 * tree.c (layout_basetypes): And on the vbase ptr.
18111
18112 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18113
18114 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18115 CHAR_TYPE_SIZE so bool is always the same size as another type.
18116
18117 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18118
18119 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
18120
18121 * decl2.c (grok_x_components): Remove synthesized methods from
18122 TYPE_METHODS of an anonymous union, complain about member
18123 functions.
18124 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18125 anonymous unions.
18126 (finish_function): Just clear the DECL_RTL of our arguments.
18127
18128 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18129
18130 * decl2.c (finish_file): Emit DWARF debugging info for static data
18131 members.
18132
18133 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18134
18135 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
18136
18137 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18138 IDENTIFIER_NODE.
18139
18140 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18141
18142 * Make-lang.in (g++-cross$(exeext)): Fix typo.
18143
18144 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18145
18146 Make the g++ driver now be a standalone program, rather than one
18147 that tries to run the gcc driver after munging up the options.
18148 * Make-lang.in (g++.c, g++spec.o): New rules.
18149 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18150 added.
18151 (g++$(exeext)): New rule, based on xgcc rule.
18152 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18153 * g++spec.c: New file.
18154 * g++.c: Removed file.
18155
18156 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
18157
18158 * cvt.c (build_up_reference): Arrange for any temporary values
18159 that have been keep in registers until now to be put into memory.
18160
18161 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18162
18163 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18164 that make -j3 bootstrap works better.
18165
18166 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
18167
18168 * decl.c (pushtag): Do pushdecl for anon tags.
18169
18170 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18171
18172 * typeck.c (c_expand_return): Fix logic.
18173 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18174
18175 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
18176
18177 * g++.c (main): Make sure arglist has a final NULL entry. Add
18178 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18179 stdin/stdout of the invoked program are redirected to
18180 nowheresville.
18181
18182 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18183
18184 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18185
18186 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
18187
18188 * init.c (resolve_offset_ref): Handle obj.vfn better.
18189 * typeck.c (build_component_ref): Set TREE_TYPE on result from
18190 build_vfn_ref.
18191
18192 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
18193
18194 * typeck.c (convert_for_assignment): Also handle anachronistic
18195 implicit conversions from (::*)() to cv void*.
18196 * cvt.c (cp_convert_to_pointer): Likewise.
18197
18198 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18199
18200 * lex.c (handle_cp_pragma): Fix bogus warning.
18201
18202 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
18203
18204 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18205 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18206
18207 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18208
18209 * class.c (finish_struct_1): Support DWARF2_DEBUG.
18210 * search.c (dfs_debug_mark): Likewise.
18211 * decl2.c (finish_vtable_vardecl): Likewise.
18212 * decl.c (pushtag, finish_enum): Likewise.
18213 * lex.c (check_newline): Use debug_* instead of calling *out
18214 functions directly.
18215
18216 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18217
18218 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18219 on some picky hosts.
18220
18221 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18222
18223 * class.c (finish_struct_1): A class has a non-trivial copy
18224 constructor if it has virtual functions.
18225
18226 * cvt.c (cp_convert): Always call a constructor.
18227
18228 * call.c (reference_binding): Still tack on a REF_BIND
18229 for bad conversions.
18230 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18231
18232 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18233 (c_expand_return): Likewise.
18234 * typeck2.c (digest_init): Likewise for { }.
18235 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18236 * cvt.c (cp_convert): Handle failure better.
18237
18238 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18239
18240 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18241 of GCC be path-relative.
18242
18243 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18244
18245 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18246 it does need choose-temp.o and pexecute.o.
18247
18248 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18249
18250 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18251 that we still use it.
18252 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18253
18254 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
18255
18256 * init.c (expand_default_init): Avoid calling constructors to
18257 initialize reference temps.
18258
18259 * cvt.c (convert_to_reference): Fix.
18260
18261 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18262
18263 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18264 (convert_to_reference): Likewise.
18265 * typeck.c (convert_for_initialization): Likewise.
18266 * init.c (expand_default_init): Likewise.
18267 (expand_aggr_init_1): Likewise.
18268 * cp-tree.h (CONV_NONCONVERTING): Lose.
18269 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18270 * *.c: Adjust.
18271 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18272
18273 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
18274
18275 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18276
18277 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18278
18279 * init.c (expand_aggr_init_1): Don't crash on non-constructor
18280 TARGET_EXPR.
18281
18282 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18283
18284 * g++.c: Include gansidecl.h.
18285 (VPROTO, PVPROTO, VA_START): Delete.
18286 (choose_temp_base_try, choose_temp_base, perror_exec,
18287 run_dos) [__MSDOS__]: Delete fns.
18288 (pfatal_with_name): Delete fn.
18289 (temp_filename): Declare like in gcc.c.
18290 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18291 (error_count, signal_count): Define.
18292 (error): Delete both definitions.
18293 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18294 (pfatal_pexecute): Add fn from gcc.c.
18295 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
18296 code to use the pexecute stuff also used by gcc.c.
18297 (MIN_FATAL_STATUS): Define.
18298 * Make-lang.in (g++): Add dependency on and linking with
18299 choose-temp.o and pexecute.o.
18300
18301 * cp-tree.h: Include gansidecl.h.
18302 (STDIO_PROTO): Delete #undef/#define.
18303 * cvt.c (NULL): Delete #undef/#define.
18304 * expr.c (NULL): Likewise.
18305 * init.c (NULL): Likewise.
18306 * rtti.c (NULL): Likewise.
18307 * xref.c (NULL): Likewise.
18308
18309 * cp-tree.h (build_user_type_conversion): Add prototype.
18310 * call.c (build_user_type_conversion): Delete prototype. Correct
18311 decl of FLAGS arg to be an int.
18312 * cvt.c (build_user_type_conversion): Likewise.
18313
18314 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
18315
18316 * cp-tree.def: Add TRY_BLOCK and HANDLER.
18317 * except.c (expand_start_catch_block): Support templates.
18318 * parse.y (try_block, handler_seq): Likewise.
18319 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18320
18321 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
18322
18323 * pt.c (current_template_args): New fn.
18324 (push_template_decl): Use it.
18325 * decl.c (grokdeclarator): Use it.
18326
18327 * decl2.c (build_expr_from_tree): Dereference ref vars.
18328
18329 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18330 the decl-specifier-seq.
18331
18332 * decl.c (grok_op_properties): Don't force the type of a conversion
18333 op to be complete. Don't warn about converting to the same type
18334 for template instantiations.
18335
18336 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18337 methods.
18338
18339 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
18340
18341 * typeck.c (get_delta_difference): Remove previous bogusness.
18342 Don't give errors if force is set.
18343
18344 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18345
18346 * decl2.c (finish_file): Don't emit debug info.
18347 * decl.c (pushdecl): Lose obsolete code.
18348 (grokdeclarator): Still do the long long thing after complaining.
18349 * search.c (note_debug_info_needed): Don't do anything if we're in a
18350 template.
18351 * method.c (synthesize_method): For non-local classes,
18352 push_to_top_level first.
18353
18354 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
18355
18356 * typeck.c (get_delta_difference): Add no_error parameter.
18357 (build_ptrmemfunc): Call get_delta_difference with no_error set;
18358 we don't want error messages when converting unrelated
18359 pointer-to-member functions.
18360
18361 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
18362
18363 * error.c (dump_expr): Improve the wording on error messages that
18364 involve pointer to member functions.
18365
18366 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
18367
18368 * cvt.c (cp_convert_to_pointer): Move code for conversions from
18369 (::*)() to void* or (*)() up a bit, so that we can convert from
18370 METHOD_TYPEs as well.
18371
18372 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18373
18374 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18375 There are no 'member' types.
18376 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18377 (build_x_typeid): Handle errors.
18378
18379 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
18380
18381 * typeck.c (convert_for_assignment): Handle anachronistic implicit
18382 conversions from (::*)() to void* or (*)().
18383 * cvt.c (cp_convert_to_pointer): Likewise.
18384 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18385 conversions from here.
18386 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18387 * lang-options.h: Likewise.
18388 * decl2.c (warn_pmf2ptr): Define.
18389 * cp-tree.h: Declare it.
18390 * typeck2.c (digest_init): Allow pmfs down into
18391 convert_for_initialization.
18392
18393 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18394
18395 * typeck.c (c_expand_return): Fix for returning overloaded fn.
18396
18397 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18398
18399 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18400 * decl.c (grok_reference_init): Pass DIRECT_BIND.
18401 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
18402 DIRECT_BIND.
18403 * call.c (convert_like): Don't pass INDIRECT_BIND.
18404 * typeck.c (convert_arguments): Likewise.
18405 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18406
18407 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18408
18409 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18410 similar code in build_up_ref.
18411 * cvt.c (build_up_reference): Drastically simplify.
18412
18413 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
18414
18415 * typeck.c (signed_or_unsigned_type): If the given type already
18416 as the correct signedness, then just return it.
18417
18418 * typeck.c ({un,}signed_type): If can't do anything, call
18419 signed_or_unsigned_type.
18420
18421 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
18422
18423 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18424 current_class_type is NULL.
18425
18426 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
18427
18428 * class.c (finish_struct_1): Avoid empty structs by adding a field
18429 so layout_type gets the mode right.
18430
18431 * typeck.c (c_expand_return): Drastically simplify.
18432
18433 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18434
18435 * typeck.c (decay_conversion): Handle overloaded methods.
18436
18437 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18438
18439 * call.c (build_over_call): A TARGET_EXPR has side-effects.
18440
18441 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
18442
18443 * cvt.c (convert_to_pointer_force): Add code to support pointer to
18444 member function to pointer to function conversions.
18445 * init.c (resolve_offset_ref): Add code to allow faked up objects,
18446 ignoring them if they are not used, and giving an error, if they
18447 are needed.
18448 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18449 code, and so that we can give an error, if we needed an object,
18450 and one was not provided.
18451 (build_c_cast): Don't call default_conversion when we want to
18452 convert to pointer to function from a METHOD_TYPE.
18453
18454 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18455
18456 * Make-lang.in (cplib2.ready): Fix logic.
18457
18458 * decl.c (shadow_tag): Only complain about non-artificial function
18459 members.
18460
18461 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18462
18463 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18464
18465 * expr.c (cplus_expand_expr): Pre-tweak call_target like
18466 expand_inline_function would.
18467
18468 * pt.c (mark_decl_instantiated): If extern_p, call
18469 mark_inline_for_output.
18470
18471 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
18472
18473 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18474 pmd conversions.
18475
18476 * typeck.c (get_delta_difference): Fix wording, as we can be used
18477 for pointer to data members.
18478
18479 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
18480
18481 * pt.c (tsubst): If the function decl isn't a member of this
18482 template, return a copy of the decl (including copying the
18483 lang-specific part) so we don't hose ourselves later.
18484
18485 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18486
18487 * class.c (finish_struct): Remove DWARF-specific tag handling.
18488 * decl.c (pushtag): Likewise.
18489 (finish_function): Always clear DECL_ARGUMENTS on function decls with
18490 no saved RTX.
18491 * decl2.c (finish_file): Emit DWARF debugging info for static data
18492 members.
18493
18494 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
18495
18496 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18497 isn't the same as the new one before we whack it.
18498
18499 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18500
18501 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18502 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18503 warn_traditional and warn_strict_prototypes; remove ancient
18504 'overload' code; remove references to flag_traditional.
18505
18506 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
18507
18508 * input.c (sub_getch): Handle 8-bit characters in string literals.
18509
18510 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
18511
18512 * tree.c (mapcar): Handle CONSTRUCTORs.
18513 (copy_to_permanent): Handle expression_obstack properly.
18514
18515 * Make-lang.in (cplib2.txt): Also depend on the headers.
18516
18517 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18518 INT_TYPE_SIZE.
18519 (expand_class_desc): Use USItype for offset field.
18520 * tinfo.h (struct __class_type_info): Likewise.
18521
18522 * method.c (build_overload_int): TYPE_PRECISION should be applied
18523 to types.
18524
18525 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18526
18527 * call.c (build_new_op): A COND_EXPR involving void must be a
18528 builtin.
18529
18530 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18531
18532 * typeck.c (build_x_component_ref): New fn.
18533 (build_object_ref): Use it.
18534 * parse.y (primary): Use it.
18535 * decl2.c (build_expr_from_tree): Use it.
18536 * cp-tree.h: Declare it.
18537
18538 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18539 * error.c (dump_type_suffix): Handle variable arrays.
18540
18541 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18542
18543 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18544
18545 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18546
18547 * decl.c (lookup_name_real): Don't try to look up anything in a
18548 TYPENAME_TYPE.
18549
18550 * tinfo2.cc (__throw_type_match_rtti): Oops.
18551
18552 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18553
18554 * Make-lang.in (exception.o): Use -fno-PIC for now.
18555
18556 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18557
18558 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18559 calling them.
18560 (get_tinfo_fn_dynamic): Extracted from build_typeid.
18561 * tinfo2.cc (__dynamic_cast): Adjust.
18562
18563 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18564 (build_x_typeid): Likewise.
18565
18566 * parse.y: Call build_x_typeid instead of build_typeid.
18567 * cp-tree.def: Add TYPEID_EXPR.
18568 * pt.c (tsubst_copy): Handle typeid.
18569 * decl2.c (build_expr_from_tree): Likewise.
18570 * rtti.c (build_x_typeid): Throw bad_typeid from here.
18571 (build_typeid): Not here.
18572 * cp-tree.h: Declare build_x_typeid.
18573
18574 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
18575
18576 * call.c (convert_like): Pull out constant values.
18577
18578 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18579
18580 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18581
18582 * decl.c (init_decl_processing): Create short int types before
18583 creating size_t in case a machine description needs to use
18584 unsigned short for size_t.
18585
18586 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18587
18588 * Make-lang.in (exception.o): Turn off pic.
18589
18590 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18591 type, multi-level ptr conversions.
18592
18593 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18594 (throw_bad_cast): Use it.
18595 (throw_bad_typeid): New fn.
18596 (build_typeid): Throw bad_typeid as needed.
18597 Use build_call.
18598 (synthesize_tinfo_fn): Handle functions and arrays before checking
18599 for cv-quals.
18600
18601 * Remove .h from standard C++ headers, add new.h, move into inc
18602 subdirectory.
18603
18604 * exception*: Remove pointer from object, constructors. Add
18605 default exception::what that uses type_info::name. Add
18606 __throw_bad_typeid.
18607
18608 * init.c (build_new): Don't add a cookie to new (void *) T[2].
18609
18610 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
18611
18612 * Make-lang.in: Building C++ code depends on cc1plus.
18613
18614 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18615
18616 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18617 a HOST_WIDE_INT, not a tree.
18618
18619 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18620
18621 * exception.cc: Don't include <stdlib.h>.
18622
18623 * Make-lang.in (c++.clean): Remove cplib2.*.
18624
18625 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
18626
18627 * parse.y (component_decl_1, component_costructor_declarator case):
18628 Pass attributes/prefix_attributes in tree list.
18629
18630 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18631
18632 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18633
18634 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18635
18636 * lex.c (do_identifier): Don't do deferred lookup in a template
18637 header.
18638
18639 * typeck2.c (store_init_value): Oops.
18640
18641 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18642 New files for C++ lang-support library.
18643 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18644 (CXX_LIB2FUNCS): Define.
18645 And rules for building the C++ lang-support code.
18646 * config-lang.in (headers): Define.
18647 (lib2funcs): Define.
18648
18649 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18650
18651 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18652 digest_init.
18653 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18654 * typeck2.c (store_init_value): Check for initializing pmf with { }
18655 here.
18656 (process_init_constructor): Not here.
18657
18658 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18659
18660 * pt.c (begin_template_parm_list): Increment
18661 processing_template_decl here.
18662 (end_template_parm_list): Not here.
18663 (process_template_parm): No need to add 1 to it now.
18664 * *.c: Use processing_template_decl instead of current_template_parms
18665 to check for being in a template.
18666
18667 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
18668 (tsubst_copy): Handle CONSTRUCTOR.
18669 (instantiate_decl): Set up context properly for variables.
18670 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18671 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18672
18673 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18674
18675 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18676
18677 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18678
18679 * method.c (make_thunk): Call comdat_linkage before setting the
18680 TREE_CODE.
18681
18682 * decl2.c (comdat_linkage): Use make_decl_one_only.
18683 (import_export_decl): Likewise.
18684 * decl.c (init_decl_processing): Check supports_one_only instead of
18685 SUPPORTS_WEAK.
18686
18687 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
18688
18689 * decl2.c (grokfield): Tighten checking for access decls.
18690
18691 * decl.c (make_typename_type): Resolve references to
18692 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
18693 (lookup_name_real): Types that depend on a template parameter get
18694 an implicit 'typename' unless they're in the current scope.
18695 (start_decl_1): We don't care about incomplete types that depend
18696 on a template parm.
18697 (grokdeclarator): Resolve 'typename's in the type specifier that
18698 refer to members of the current scope.
18699
18700 * call.c (build_over_call): Remove 'inline called before
18701 definition' diagnostic.
18702 (build_method_call): Likewise.
18703 * decl.c (duplicate_decls): Downgrade 'used before declared
18704 inline' to a warning, only with -Winline.
18705
18706 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
18707
18708 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18709
18710 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18711
18712 * call.c (build_method_call): When calling a signature
18713 default implementation, as in other cases, let instance_ptr simply
18714 be instance.
18715
18716 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
18717
18718 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18719
18720 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
18721
18722 * except.c (expand_start_catch_block): Add a pushlevel so that -g
18723 works on hppa and SPARC.
18724
18725 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18726
18727 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18728
18729 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18730
18731 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18732 before testing whether it's a signature.
18733
18734 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18735
18736 * call.c (build_new_method_call): Don't complain about signature
18737 pointers and references not being an aggr type.
18738 (build_this): If a signature pointer or reference was passed in,
18739 just return it.
18740 (build_new_method_call): If instance is a signature pointer, set
18741 basetype to the signature type of instance.
18742 * sig.c (build_signature_method_call): Deleted basetype and
18743 instance parameters, they can be found as the DECL_CONTEXT of
18744 function and as the first argument passed in.
18745 * cp-tree.h: Changed declaration of build_signature_method_call.
18746 * call.c (build_method_call): Deleted first two arguments in call
18747 of build_signature_method_call.
18748 (build_over_call): Added call to build_signature_method_call.
18749
18750 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18751
18752 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18753 target_expr.
18754
18755 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18756
18757 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18758
18759 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
18760
18761 * except.c (expand_start_try_stmts): Move to except.c in the backend.
18762 (expand_end_try_stmts): Remove.
18763
18764 * init.c (perform_member_init): Use add_partial_entry () instead
18765 of directly manipulating lists.
18766 (emit_base_init): Likewise.
18767
18768 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
18769
18770 * except.c (expand_exception_blocks): Always make sure USE and
18771 CLOBBER insns that came at the end still do, the backend relies
18772 upon this.
18773
18774 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18775
18776 * call.c (build_over_call): We can only use a TARGET_EXPR of the
18777 right type.
18778
18779 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
18780
18781 * cvt.c (convert_to_reference): Revert last change, don't complain
18782 about temp without target decl.
18783
18784 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
18785
18786 * decl.c (grokdeclarator): Don't core dump when void() is given.
18787
18788 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
18789
18790 * decl.c (copy_args_p): Don't crash.
18791
18792 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
18793
18794 * pt.c (tsubst): And support template args inside the exception
18795 specification.
18796
18797 * pt.c (tsubst): Add support for exception specifications in
18798 template functions.
18799
18800 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
18801
18802 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18803 fields now.
18804 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18805 (start_function): Likewise.
18806 (start_method): Likewise.
18807 (grokfield): Likewise.
18808 (make_call_declarator): Add throw spec parameter.
18809 (set_quals_and_spec): Add routine.
18810 * lex.c (set_quals_and_spec): Likewise.
18811 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18812 * decl.c (shadow_tag): Eliminate the throw spec parameter to
18813 grokdeclarator.
18814 (groktypename): Likewise.
18815 (start_decl): Eliminate the throw spec parameter. Eliminate the
18816 throw spec parameter to grokdeclarator. Eliminate the throw spec
18817 field in DECL_STMT.
18818 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18819 (grokfndecl): Remove useless set of raises.
18820 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
18821 the throw spec parameter to start_decl. Pull the throw spec out
18822 of the call declarator.
18823 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18824 (start_function): Eliminate the throw spec parameter. Eliminate
18825 the throw spec parameter to grokdeclarator.
18826 (start_method): Likewise.
18827 * decl2.c (grokfield): Likewise.
18828 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18829 (grokoptypename): Likewise.
18830 (finish_file): Eliminate the throw spec parameter to
18831 start_function. Add throw spec to make_call_declarator.
18832 * except.c (init_exception_processing): Add throw spec to
18833 make_call_declarator. Eliminate the throw spec parameter to
18834 start_decl.
18835 (expand_start_catch_block): Eliminate the throw spec parameter to
18836 grokdeclarator.
18837 (expand_builtin_throw): Add throw spec to make_call_declarator.
18838 Eliminate the throw spec parameter to start_function.
18839 (start_anon_func): Likewise.
18840 * lex.c (make_call_declarator): Add throw spec parameter.
18841 (set_quals_and_spec): New routine.
18842 (cons_up_default_function): Add throw spec to make_call_declarator.
18843 Eliminate the throw spec parameter to grokfield.
18844 * method.c (synthesize_method): Eliminate the throw spec parameter
18845 to start_function.
18846 * pt.c (process_template_parm): Eliminate the throw spec parameter
18847 to grokdeclarator.
18848 (tsubst): Add throw spec to make_call_declarator.
18849 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18850 (do_function_instantiation): Eliminate the throw spec parameter to
18851 grokdeclarator. Eliminate the throw spec parameter to
18852 start_function.
18853 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18854 to start_function.
18855 * parse.y (datadef): Remove non-winning optimization.
18856 (decl): Likewise.
18857 (fndef): Remove ambiguous error productions uncovered by grammar
18858 fixing.
18859 (constructor_declarator): Add exception_specification_opt here.
18860 (component_constructor_declarator): Likewise.
18861 (direct_after_type_declarator): Likewise.
18862 (complex_direct_notype_declarator): Likewise.
18863 (direct_abstract_declarator): Likewise.
18864 (fn.def1): Remove exception_specification_opt.
18865 (fn.def2): Likewise.
18866 (condition): Likewise.
18867 (initdcl0): Likewise.
18868 (initdcl): Likewise.
18869 (notype_initdcl0): Likewise.
18870 (nomods_initdcl0): Likewise.
18871 (component_decl_1): Likewise.
18872 (component_declarator): Likewise.
18873 (after_type_component_declarator0): Likewise.
18874 (after_type_component_declarator): Likewise.
18875 (notype_component_declarator): Likewise.
18876
18877 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18878
18879 * call.c (build_over_call): Also use an INIT_EXPR when
18880 initializing anything from an rvalue.
18881
18882 * call.c (build_over_call): Call stabilize_reference when building
18883 an INIT_EXPR instead of calling the copy ctor.
18884
18885 * call.c (joust): Extend the previous change to all comparisons.
18886
18887 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18888 NO_LINKAGE_HEURISTICS.
18889
18890 * decl2.c (finish_file): Emit any statics that weren't already.
18891
18892 * typeck.c (build_static_cast): Implement.
18893 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
18894 * decl.c (grokparms): Use can_convert_arg instead of
18895 implicit_conversion directly.
18896 (copy_args_p): New fn.
18897 * cvt.c (convert_to_reference): Don't complain about temp with
18898 static_cast.
18899 (build_up_reference): Handle TARGET_EXPRs.
18900 * call.c (build_over_call): Elide unnecessary temps.
18901 (can_convert*): Use new overloading code.
18902
18903 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18904
18905 * call.c: Move TYPE_PTR*_MACROS ...
18906 * cp-tree.h: To here.
18907 * typeck.c (build_reinterpret_cast): Implement.
18908
18909 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
18910 ptr_complete_ob.
18911 (joust): If we're comparing a function to a builtin and the worst
18912 conversion for the builtin is worse than the worst conversion for the
18913 function, take the function.
18914
18915 * typeck.c (build_const_cast): Implement.
18916 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
18917 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
18918
18919 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
18920
18921 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
18922 too early. Make sure we explode if exprtype turns out to be a
18923 NULL_TREE when it shouldn't be.
18924
18925 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
18926
18927 * cp-tree.h: New routine make_call_declarator.
18928 * lex.c (make_call_declarator): Define it.
18929 * except.c (init_exception_processing): Use it.
18930 (expand_builtin_throw): Likewise.
18931 (start_anon_func): Likewise.
18932 * decl2.c (finish_file): Likewise.
18933 * lex.c (cons_up_default_function): Likewise.
18934 * parse.y: Likewise.
18935 * pt.c (tsubst): Likewise.
18936
18937 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
18938
18939 * decl2.c (groktypefield): Remove unused code.
18940
18941 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
18942
18943 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
18944 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
18945 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
18946 nonempty_cv_qualifiers.
18947 * hash.h: Rebuild.
18948
18949 * lex.c (make_pointer_declarator): Change type_quals into
18950 cv_qualifiers.
18951 (make_reference_declarator): Likewise.
18952
18953 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18954
18955 * decl.c (start_function): Only check interface_* for templates
18956 with flag_alt_external_templates.
18957
18958 * call.c (build_new_op): Check for comparison of different enum types.
18959 (build_over_call): Fix arg # output.
18960
18961 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
18962
18963 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
18964
18965 * call.c (build_new_op): Check for erroneous args.
18966
18967 * call.c (build_new_method_call): Add missing args to cp_error.
18968
18969 * tree.c (error_type): Don't print reference-to-array.
18970
18971 * typeck.c (convert_for_assignment): Don't say contravariance for
18972 removing const.
18973
18974 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18975
18976 * call.c (build_over_call): Diagnose bad convs for `this'.
18977
18978 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
18979 on _ctor_arg.
18980
18981 * call.c (convert_like): Handle bad convs.
18982 (build_over_call): Handle bad convs better.
18983
18984 * decl2.c: -fansi-overloading is now the default.
18985
18986 * call.c (build_new_method_call): Check for erroneous args.
18987
18988 * pt.c (instantiate_class_template): Propagate
18989 TYPE_USES_MULTIPLE_INHERITANCE.
18990
18991 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
18992
18993 * call.c (enforce_access): Add static to routine.
18994
18995 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
18996
18997 * call.c (build_user_type_conversion_1): Fix bad handling.
18998 (compare_ics): Likewise.
18999
19000 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19001
19002 * call.c (standard_conversion): Oops.
19003
19004 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
19005
19006 * g++.c: Update test for win32 (&& ! cygwin32).
19007
19008 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19009
19010 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
19011 (ptr_reasonably_similar): New fn.
19012 * call.c (BAD_RANK): New rank.
19013 (ICS_BAD_FLAG): New macro.
19014 (standard_conversion): Handle almost-right pointer conversions.
19015 (reference_binding): Handle bad rvalue bindings.
19016 (add_*_candidate): Stuff.
19017 (build_over_call): Pass bad conversions to convert_for_initialization.
19018 (compare_ics): Handle bad convs.
19019 (joust): Likewise.
19020
19021 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
19022
19023 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
19024 integer_type_node when computing pointer offsets.
19025
19026 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
19027
19028 * tree.c (lvalue_type): New fn.
19029 (error_type): New fn.
19030 * call.c (op_error): Use error_type.
19031 (add_conv_candidate): Use lvalue_type.
19032 (add_builtin_candidates): Likewise.
19033 * error.c (args_as_string): Use error_type.
19034
19035 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19036
19037 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
19038 (tsubst): Not here.
19039
19040 * decl.c (init_decl_processing): With -ansi, __null's type is the
19041 signed integral type with the same number of bits as a pointer.
19042 Introduce a new variable null_node for it.
19043 * cp-tree.h: Adjust.
19044 * call.c (null_ptr_cst_p): Adjust.
19045
19046 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
19047
19048 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
19049 optimize.
19050
19051 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
19052
19053 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
19054 fns of classes without virtual functions.
19055
19056 * call.c (add_function_candidate): Handle `this' specially.
19057 (compare_ics): Likewise.
19058
19059 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
19060
19061 * typeck.c (build_conditional_expr): Fix handling of __null.
19062
19063 * decl2.c (comdat_linkage): New fn.
19064 (import_export_vtable): Use it.
19065 (import_export_decl): Use it.
19066 * method.c (make_thunk): Use it.
19067
19068 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
19069
19070 * pt.c (end_template_decl): If we don't actually have parms, return.
19071 * parse.y (template_header): Accept 'template <>'.
19072
19073 * errfn.c: Allow 5 args.
19074
19075 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19076
19077 * tree.c (make_temp_vec): New fn.
19078 * pt.c (push_template_decl): Handle partial specs.
19079 (instantiate_class_template): Likewise.
19080 (more_specialized): Use get_bindings.
19081 (more_specialized_class): New fn.
19082 (get_class_bindings): New fn.
19083 (most_specialized_class): New fn.
19084 (do_function_instantiation): List candidates for ambiguous case.
19085 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
19086 (shadow_tag): Call push_template_decl for partial specializations.
19087 * parse.y: Likewise.
19088 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
19089 DECL_TEMPLATE_MEMBERS.
19090 * call.c (print_z_candidates): Reduce duplication.
19091
19092 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19093
19094 * decl2.c (lang_decode_option): Allow -fansi-overloading.
19095
19096 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
19097
19098 * pt.c (get_bindings): New fn.
19099 (most_specialized): Likewise.
19100 (do_function_instantiation): Use them.
19101 (add_maybe_template): New fn.
19102 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19103 * call.c (build_new_op): Handle guiding decls.
19104 (build_new_function_call): Likewise.
19105 * decl2.c (finish_file): Likewise.
19106
19107 * decl2.c (mark_used): Do synthesis here.
19108 * call.c (build_method_call): Not here.
19109 (build_over_call): Or here.
19110 * typeck.c (build_function_call_real): Or here.
19111 * tree.c (bot_manip): Call mark_used on functions used in default
19112 args.
19113
19114 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19115
19116 * decl2.c (import_export_vtable): Delete code that disabled vtable
19117 heuristic on systems with ASM_OUTPUT_EXTERNAL.
19118
19119 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19120
19121 * typeck.c (build_x_function_call): Handle static call context
19122 better.
19123
19124 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19125 the function, not its outer block.
19126
19127 * call.c (build_field_call): Pass fields on to build_opfncall
19128 regardless of TYPE_OVERLOADS_CALL_EXPR.
19129 (build_method_call): Pass on to build_new_method_call sooner.
19130
19131 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19132 gives us.
19133 * class.c (instantiate_type): Don't put a POINTER_TYPE to
19134 METHOD_TYPE on an expression. Also make a copy of rhs instead of
19135 modifying it.
19136
19137 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19138
19139 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19140 (add_builtin_candidate): Don't take enums for ++.
19141 (build_new_method_call): Handle non-aggregates and field calls.
19142 Move new overloading code from...
19143 * cvt.c: Here.
19144
19145 * decl.c (grokparms): Don't check default args in templates.
19146
19147 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
19148
19149 * cvt.c (build_new_op): Fix args to build_unary_op.
19150 (add_builtin_candidates): Don't call type_promotes_to on float.
19151
19152 * decl.c (grokparms): Check the type of the default arg.
19153
19154 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19155 returning NULL_TREE.
19156
19157 * typeck.c (build_x_binary_op): Avoid doing extra work.
19158 (build_x_unary_op): Likewise.
19159 (build_x_conditional_expr): Likewise.
19160 * cvt.c (build_over_call): Return.
19161 (add_builtin_candidate): Fix MEMBER_REF.
19162 (build_new_op): Likewise.
19163
19164 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
19165
19166 * method.c (build_overload_name): Put bug fix into code but leave
19167 disabled for now so we can be bug compatible with older releases
19168 that do repeats incorrectly. In the future, we can enable it.
19169
19170 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
19171
19172 * cvt.c (convert_like): Don't call build_cplus_new twice.
19173
19174 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19175 Control new overloading code with -fansi-overloading.
19176
19177 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
19178
19179 * cvt.c (build_over_call): Call build_cplus_new.
19180 * call.c (build_method_call): Likewise.
19181 * typeck.c (build_function_call_real): Likewise.
19182 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19183 the COND_EXPR in a TARGET_EXPR so they use the same slot.
19184
19185 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19186 recursive calls.
19187 * typeck.c (complete_type): Propagate
19188 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19189
19190 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19191
19192 * cvt.c (joust): More ?: kludging. Sigh.
19193 (build_over_call): Don't try to synthesize global fns.
19194
19195 * search.c (lookup_conversions): Use binfo marking.
19196
19197 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
19198
19199 * search.c (build_mi_matrix): Use the correct value of cid
19200 when determining the new mi_size.
19201
19202 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
19203
19204 * cvt.c (add_builtin_candidates): Do consider type conversion ops
19205 for the first parms of += et al.
19206 (strip_top_quals): New fn.
19207 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19208 (implicit_conversion): Likewise.
19209 (add_builtin_candidates): Be careful about arrays.
19210 (build_new_method_call): Handle vtable optimization.
19211
19212 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19213
19214 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19215 * cvt.c (reference_binding): Use it.
19216 (implicit_conversion): Use it.
19217 (add_builtin_candidate, COND_EXPR): Use it.
19218
19219 * cvt.c (build_new_function_call): Check for error args.
19220
19221 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19222
19223 * gxx.gperf: Add __null.
19224 * hash.h: Regenerate.
19225 * lex.h: Add RID_NULL.
19226 * lex.c (init_lex): Create null_pointer_node here, stick it in
19227 RID_NULL.
19228 * decl.c (init_decl_processing): Still set its type here.
19229 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19230 (convert_to_pointer_force): Likewise.
19231 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19232 if (! pedantic).
19233 * call.c (convert_harshness): Use null_ptr_cst_p.
19234 * typeck.c (convert_for_assignment): Likewise. Don't produce
19235 null_pointer_node.
19236
19237 * error.c (args_as_string): Handle lists of actual args, too.
19238 * cvt.c (null_ptr_cst): Support (void*)0 for now.
19239 (build_user_type_conversion_1): Improve diagnostics.
19240 (build_new_function_call): Likewise.
19241 (build_object_call): Likewise.
19242 (build_new_method_call): Likewise. Move call before def diagnostic...
19243 (build_over_call): Here.
19244
19245 * cvt.c (build_new_method_call): Don't complain about no match if
19246 LOOKUP_SPECULATIVELY.
19247 (build_over_call): Fix 'this' for virtual fn.
19248 (build_new_method_call): Add diagnostic.
19249
19250 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19251
19252 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19253 constructors to be passed in.
19254 (build_over_call): Likewise.
19255 (build_user_type_conversion_1): Pass them in.
19256 (convert_like): Likewise.
19257 (build_object_call): Handle overloaded conversions.
19258 (build_over_call): Pass the right args to build_vfn_ref.
19259 (standard_conversion): Fix pmf convs.
19260 (joust): Handle comparing statics and non-statics.
19261 (build_new_method_call): New fn.
19262 * call.c (build_method_call): Call it if NEW_OVER.
19263
19264 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
19265
19266 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19267 %D instead.
19268
19269 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
19270
19271 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19272 instead of just maybe_build_cleanup so that we deallocate the
19273 thrown object.
19274
19275 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19276
19277 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19278 * cp-tree.h (finish_prevtable_vardecl): Add decl.
19279
19280 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
19281
19282 * pt.c (instantiate_class_template): Call complete_type. Also, if
19283 we're at the end of the file and we just instantiated a template
19284 class with a vtable, call finish_prevtable_vardecl.
19285
19286 * error.c (dump_decl): Don't explode (or explode more gracefully
19287 as appropriate) if the object being dumped has a null type.
19288 (dump_expr): Likewise.
19289
19290 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19291 by counting the number of nodes that we'll need before allocating
19292 the array.
19293 (lookup_fnfields): Fix comment.
19294 (breadth_first_search): Fix comment.
19295
19296 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
19297
19298 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19299 TYPE_ALIGN.
19300 * class.c (finish_struct): Call cplus_decl_attributes here.
19301 (finish_struct_1): Not here.
19302 * cp-tree.h: Adjust.
19303
19304 * pt.c (type_unification): New parameter STRICT.
19305 (unify): If STRICT, don't allow cv addition or base deduction.
19306 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19307
19308 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19309
19310 * search.c (get_template_base{_recursive}): New fns.
19311 * pt.c (more_specialized): New fn.
19312 (do_function_instantiation): Use it.
19313 (unify): Handle base deduction.
19314 * cvt.c (joust): Use more_specialized.
19315 Don't arbitrarily choose between non-builtin candidates.
19316 (build_over_call): Call require_complete_type.
19317
19318 * decl.c (start_function): Statics are static even in a #pragma
19319 interface file.
19320
19321 * decl2.c (import_export_vtable): Disable vtable heuristic on
19322 systems with ASM_OUTPUT_EXTERNAL.
19323
19324 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19325 (standard_conversion): No std conv to enum type.
19326
19327 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19328 for ptm's.
19329
19330 * cvt.c (reference_binding): Bind directly to a base subobject of
19331 a class rvalue.
19332
19333 * cvt.c (build_new_op): Enforce access control.
19334
19335 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
19336
19337 * typeck2.c (process_init_constructor): When scanning the
19338 union for a named field, skip things that aren't FIELD_DECLs.
19339
19340 * method.c (synthesize_method): Don't scan fndecl's rtl if
19341 we're at the end of the file; just assume the function can't
19342 be inlined.
19343
19344 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19345
19346 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19347 it failed.
19348
19349 * cvt.c (build_user_type_conversion_1): Handle overloaded
19350 conversion ops.
19351
19352 * cvt.c (add_builtin_candidates): Don't consider type conversion
19353 operators for the first parameter of operator=.
19354
19355 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
19356
19357 * typeck.c (complete_type): Only call layout_type if we're not
19358 expanding a template.
19359
19360 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19361
19362 * cvt.c (compare_ics): Oops.
19363
19364 * cvt.c (op_error): Oops.
19365
19366 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19367 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
19368 (build_conv): Use them.
19369 (implicit_conversion): Use them.
19370 (convert_like): Handle them.
19371 (build_new_op): Handle builtin COND_EXPR again.
19372 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
19373 in lists of types for COND_EXPR.
19374 (add_builtin_candidate): Add enum candidates for COND_EXPR.
19375
19376 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
19377
19378 * typeck.c (build_modify_expr): Always attempt to build a call to
19379 the assignment operator, even if we're using a default one.
19380 (convert_for_initialization): Call complete_type.
19381
19382 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19383
19384 * cvt.c (reference_binding): A REF_BIND gets the reference type.
19385 (implicit_conversion): Likewise.
19386 (convert_like): Likewise.
19387 (compare_ics): Likewise.
19388 (compare_qual): Likewise.
19389 (print_z_candidates): Handle no candidates.
19390 (build_new_op): Don't handle builtin COND_EXPR for now.
19391
19392 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
19393
19394 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19395
19396 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19397
19398 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19399
19400 * cvt.c (build_builtin_candidate): Oops.
19401 (build_new_op): Oops.
19402
19403 * method.c (build_opfncall): Pass COND_EXPR on.
19404 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19405 (add_builtin_candidate{,s}): Likewise.
19406 (add_builtin_candidates): Likewise.
19407 (print_z_candidates, op_error, build_new_op): Likewise.
19408 (type_decays_to): New fn.
19409 * lex.c (init_lex): Just say ?: for COND_EXPR.
19410
19411 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
19412
19413 * typeck.c (complete_type): Call layout_type rather than building
19414 a new array type.
19415
19416 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19417 only use ptrdiff_t.
19418
19419 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19420
19421 * cvt.c: Always compile the new overloading code (but don't use it).
19422 (implicit_conversion): Add a BASE_CONV when converting to
19423 the same class type.
19424 (convert_like): Handle BASE_CONV.
19425
19426 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19427
19428 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19429 (add_builtin_candidate): Likewise.
19430
19431 NEW_OVER changes:
19432 * typeck.c (build_x_function_call): Try an operator function
19433 whenever we call an object of class type.
19434 * method.c (build_opfncall): Pass CALL_EXPRs through.
19435 * cvt.c (implicit_conversion): Do const-ref case first.
19436 (add_conv_candidate, build_object_call, op_error): New fns.
19437 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19438 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19439 builtin candidates.
19440 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
19441 Fall back on preincrement handling. Use op_error.
19442 Handle warn_synth.
19443 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
19444 an error_mark_node.
19445 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19446 properly.
19447
19448 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
19449
19450 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19451
19452 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
19453
19454 * typeck.c (build_component_ref_1): Use build_component_ref
19455 instead of open coding it here.
19456
19457 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19458
19459 * g++.c (main): Don't link with -lg++.
19460
19461 NEW_OVER changes:
19462 * cvt.c (convert_to_reference): Don't use convert_from_reference on
19463 result of build_type_conversion.
19464 (cp_convert): Only call build_method_call for ctors if
19465 build_type_conversion failed.
19466 (ptr_complete_ob): New function.
19467 (TYPE_PTR{,OB,MEM}_P): New macros.
19468 ({add,build}_builtin_candidate{,s}): New functions.
19469 (print_z_candidates): Handle builtins.
19470 (build_user_type_conversion_1): Don't use conversion fns for
19471 converting to a base type.
19472 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19473 (build_user_type_conversion): Use convert_from_reference.
19474 (build_new_op): New function.
19475 (build_over_call): Fix handling of methods.
19476 (compare_ics): Handle AMBIG_CONV properly.
19477 * typeck2.c: Increment abort count.
19478 * method.c (build_opfncall): Forward most requests to build_new_op.
19479 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19480
19481 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19482
19483 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19484 invalid second argument to dump_expr_list.
19485
19486 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
19487
19488 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19489
19490 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
19491
19492 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19493 ASSEMBLE_EXTERNAL.
19494
19495 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
19496
19497 * typeck2.c (process_init_constructor): New pedwarn for using { }
19498 to initialize a pointer to member function.
19499 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19500 we can avoid the new error.
19501
19502 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
19503
19504 * typeck.c (build_ptrmemfunc1): New function to hide details of
19505 pointer to member functions better.
19506
19507 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
19508
19509 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19510 methods into the actual method, as we know the implied object is
19511 not used.
19512
19513 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19514
19515 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19516 inside a system header.
19517
19518 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
19519
19520 * call.c (build_method_call): Call complete_type on the
19521 instance type.
19522
19523 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
19524
19525 * typeck.c (build_component_ref): Always build up an OFFSET_REF
19526 for obj_ptr->func so that we can know which object to use in a
19527 method call.
19528
19529 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
19530
19531 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19532 around things. Also improve maintainability.
19533
19534 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
19535
19536 * decl.c (grokdeclarator): Check for overflow when evaluating an
19537 array dimension.
19538
19539 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
19540
19541 * cvt.c (cp_convert): Don't check for ambiguity with constructor
19542 if NEW_OVER.
19543
19544 * typeck.c (build_x_function_call): Pass function overload
19545 questions to new overloading code if NEW_OVER.
19546 * init.c (expand_aggr_init_1): Only check for type conversion ops
19547 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19548 Don't check for ambiguity with constructor if NEW_OVER.
19549 * cvt.c (convert_to_reference): Dereference the result of a type
19550 conversion operator.
19551 (build_conv): Propagate ICS_USER_FLAG.
19552 (implicit_conversion): Call instantiate_type.
19553 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19554 (add_function_candidate): Fix cv-quals on argtype.
19555 (print_z_candidates): New function.
19556 (build_new_function_call): Call it.
19557 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19558 consider non-converting constructors.
19559 Call print_z_candidates.
19560 Return an AMBIG_CONV for an ambiguous conversion.
19561 (build_user_type_conversion): Handle AMBIG_CONV.
19562 (convert_like): Fix test for building TARGET_EXPR.
19563 Call instantiate_type.
19564 Handle AMBIG_CONV and LVALUE_CONV.
19565 (build_over_call): Handle 0 args and ellipsis.
19566 * cp-tree.def: Add AMBIG_CONV.
19567
19568 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
19569
19570 * decl.c (lookup_name_real): If we find mem in obj when parsing
19571 `obj->mem', make sure we return the right value.
19572
19573 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
19574
19575 * search.c (get_base_distance): Call complete_type.
19576
19577 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
19578
19579 * decl.c (store_bindings): Make static.
19580
19581 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19582
19583 * init.c (expand_aggr_init_1): Don't check type conversions if
19584 NEW_OVER.
19585
19586 * cvt.c (z_candidate): Put back template field.
19587 (add_function_candidate): Set it.
19588 (add_template_candidate): Likewise.
19589 (joust): Use it.
19590 (compare_qual): Handle references and pointers to members.
19591 (compare_ics): Handle reference bindings.
19592
19593 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19594
19595 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
19596
19597 * call.c (compute_conversion_costs): Call complete_type.
19598
19599 * tree.c (vec_binfo_member): Use comptypes instead of comparing
19600 pointers, so we can handle template parameters.
19601
19602 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
19603
19604 * cvt.c (cp_convert_to_pointer): We have to call complete_type
19605 here; let's make it explicit instead of a side effect of an
19606 error check.
19607
19608 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19609
19610 * cvt.c (z_candidate): Remove template field.
19611 (reference_binding): Handle binding to temporary.
19612 (implicit_conversion): Likewise.
19613 (add_function_candidate): Handle artificial constructor parms.
19614 Handle functions with too few parms.
19615 (add_template_candidate): New function.
19616 (build_user_type_conversion_1): Handle constructors.
19617 (convert_like): Likewise.
19618 (build_over_call): Likewise.
19619 (build_new_function_call): Support templates.
19620 (compare_ics): Fix reference, inheritance handling.
19621
19622 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
19623
19624 * decl.c: Add signed_size_zero_node.
19625 (init_decl_processing): Build it.
19626 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19627 when we're trying to make a negative delta.
19628
19629 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19630
19631 Stop doing this damn index==strchr variable name confusion.
19632 * class.c (add_virtual_function): Change local var INDEX to be
19633 named IDX.
19634 (add_method): Likewise.
19635 * lex.c (print_parse_statistics): Likewise.
19636 * search.c (make_memoized_table_entry): Likewise.
19637 (lookup_fnfields_here): Likewise.
19638 (lookup_field): Likewise.
19639 (lookup_fnfields): Likewise.
19640 (get_baselinks): Likewise.
19641 * sig.c (build_signature_table_constructor): Likewise.
19642 (build_signature_method_call): Likewise.
19643 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19644 (get_member_function_from_ptrfunc): Likewise.
19645 (build_ptrmemfunc): Change local var INDEX to be IDX.
19646 (c_expand_start_case): Likewise.
19647
19648 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19649
19650 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19651 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19652 (convert_to_reference): Use build_type_conversion to convert to
19653 the reference type directly.
19654 (standard_conversion): Fix void* case, non-conversions.
19655 (reference_binding): Fix expr == 0 case, non-conversions.
19656 (convert_like): Support REF_BIND.
19657 (compare_qual): Split out from compare_ics.
19658 (compare_ics): Use it, handle icses with only a qual_conv.
19659
19660 * init.c (expand_vec_init): Don't crash if decl is NULL.
19661
19662 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
19663
19664 * mpw-config.in: New file, configury for Mac MPW.
19665 * mpw-make.sed: New file, makefile editing for MPW.
19666
19667 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19668
19669 * pt.c (instantiate_class_template): Call repo_template_used.
19670
19671 * search.c (lookup_conversions): Only lookup conversions in
19672 complete types.
19673
19674 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19675
19676 * cp-tree.def: Renamed from tree.def, to avoid confusion with
19677 gcc's tree.def.
19678 * cp-tree.h, lex.c: Include cp-tree.def.
19679 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19680
19681 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
19682
19683 * init.c (build_vec_delete_1): Call complete_type.
19684
19685 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
19686
19687 * except.c (start_anon_func): Make sure anonymous functions are
19688 never external.
19689
19690 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19691
19692 * decl.c (finish_function): If function_depth > 1, set nested.
19693
19694 * decl2.c (grokbitfield): Revert Bob's change.
19695 * class.c (finish_struct_1): Fix handling of named bitfield widths.
19696
19697 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19698
19699 * pt.c (add_pending_template): Handle types.
19700 (lookup_template_class): With -fexternal-templates, just add the class
19701 to pending_templates instead of instantiating it now.
19702 * decl2.c (finish_file): Handle types in pending_templates.
19703
19704 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
19705
19706 * decl2.c (grokbitfield): Handle constant decls appropriately.
19707 Give an appropriate error message now instead of spewing core
19708 later.
19709
19710 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19711
19712 * decl2.c: Don't turn on thunks by default for now.
19713
19714 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
19715
19716 * typeck.c (complete_type): Handle error_mark_node.
19717 (common_type, OFFSET_TYPE): Handle template_type_parms.
19718
19719 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
19720
19721 * pt.c (instantiate_decl): If at_eof, call import_export_decl
19722 regardless of DECL_INLINE.
19723
19724 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19725
19726 * class.c (finish_struct_bits): Copy TYPE_SIZE.
19727
19728 * rtti.c (build_dynamic_cast): Support templates.
19729 * tree.def: Support DYNAMIC_CAST_EXPR.
19730 * pt.c (tsubst_copy): Likewise.
19731 * decl2.c (build_expr_from_tree): Likewise.
19732
19733 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19734
19735 * typeck.c (build_static_cast): Support templates.
19736 (build_const_cast): Likewise.
19737 * tree.def: Support CONST/STATIC_CAST_EXPR.
19738 * pt.c (tsubst_copy): Likewise.
19739 * decl2.c (build_expr_from_tree): Likewise.
19740
19741 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19742
19743 * decl2.c (finish_vtable_vardecl): Don't trust
19744 TREE_SYMBOL_REFERENCED for vtables of local classes.
19745
19746 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19747
19748 * pt.c (tsubst_copy): Handle operator T.
19749
19750 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19751
19752 * init.c (build_delete): Move creation of PARMS inside test of
19753 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19754
19755 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
19756
19757 * typeck.c (build_conditional_expr): Don't assume that
19758 the arguments to ?: are always pointers or records.
19759
19760 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19761
19762 * decl2.c (import_export_decl): Still emit static/weak/comdat
19763 copies of inline template functions with -fno-implicit-templates.
19764
19765 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
19766
19767 * init.c (build_delete): Determine the complete basetype
19768 path to the destructor we're calling.
19769
19770 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
19771
19772 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19773 initialize the enum, because we really and truly don't know where
19774 it came from.
19775 (start_enum): Don't copy integer_zero_node because
19776 build_enumerator will do it.
19777
19778 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19779
19780 * decl.c (finish_function): Do access control on base destructors.
19781
19782 * pt.c (tsubst, case FUNCTION_DECL): Set up
19783 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19784 hose us.
19785
19786 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
19787
19788 * cvt.c (build_up_reference): If we have already extended the
19789 lifetime of the temporary, don't try it again.
19790 * typeck.c (c_expand_return): Don't try and convert the return
19791 value twice when we want a reference, once is enough.
19792
19793 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
19794
19795 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19796 LOOKUP_ONLYCONVERTING at all for now.
19797
19798 * search.c (add_conversions): Put the conversion function in
19799 TREE_VALUE, the basetype in TREE_PURPOSE.
19800 * cvt.c (build_type_conversion): Adjust.
19801 * cvt.c (build_expr_type_conversion): Adjust.
19802 * call.c (user_harshness): Adjust.
19803
19804 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
19805
19806 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19807 backend's benefit.
19808
19809 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
19810
19811 * except.c (expand_start_catch_block): Add a dummy region, if we
19812 get an error, so that we can avoid core dumping later.
19813
19814 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
19815
19816 * cp-tree.h (OFFSET_REF): Remove.
19817 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19818 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19819 * init.c (expand_aggr_init_1): Likewise.
19820 (build_new): Likewise.
19821 * typeck.c (expand_target_expr): Likewise.
19822
19823 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19824
19825 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19826 TARGET_EXPR.
19827
19828 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
19829
19830 * cvt.c (build_up_reference): Redo how and when temporaries are
19831 created.
19832 * decl.c (grok_reference_init): Don't try and be smart about
19833 running cleanups.
19834
19835 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
19836
19837 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19838 (TARGET_EXPR...), now that it has 4 arguments.
19839 * tree.c (build_cplus_new): Likewise.
19840
19841 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19842
19843 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19844
19845 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19846 * decl.c (struct saved_scope): Remove named_labels,
19847 {base,member}_init_list.
19848 (maybe_push_to_top_level): Don't set them. Call
19849 push_cp_function_context if appropriate.
19850 (pop_from_top_level): Likewise.
19851
19852 * method.c (do_build_assign_ref): Remove obsolete check of
19853 TYPE_HAS_ASSIGN_REF (basetype).
19854
19855 * decl.c (grokfndecl): Diagnose user definition of
19856 implicitly-declared methods.
19857
19858 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
19859
19860 * method.c (do_build_copy_constructor): Add code to give
19861 meaningful error messages instead of crashing.
19862 (do_build_assign_ref): Don't synthesize assignment operators for
19863 classes containing reference or const members.
19864
19865 * class.c (struct base_info): Remove cant_synth_copy_ctor
19866 and cant_synth_asn_ref.
19867 (finish_base_struct): Remove the code that tries to conditionalize
19868 synthesis of copy constructors & assignment operators based on
19869 access permissions. Instead, let it fail when it tries to
19870 synthesize the copy constructor. This will give meaningful error
19871 messages instead of silently generating code to perform a bitcopy.
19872
19873 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
19874
19875 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19876 determining types for constant values.
19877
19878 * decl.c (struct named_label_list): Use instead of stuffing
19879 random items into a TREE_LIST node.
19880 (named_label_uses): Use the new struct.
19881 (poplevel): Likewise.
19882 (lookup_label): Likewise.
19883 (define_label): Add an error message to tell the user the line
19884 where the goto is located in addition to the destination of the
19885 goto.
19886 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19887 named_label_uses.
19888 (finish_function): Likewise.
19889
19890 (start_decl): Complain about defining a static data member
19891 in a different type from which it was declared.
19892
19893 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19894
19895 * cvt.c (build_expr_type_conversion): Adjust.
19896
19897 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
19898
19899 * call.c (build_method_call): Always convert 'this' to the
19900 appropriate type.
19901
19902 * search.c (add_conversions): Put the conversion function in
19903 TREE_VALUE, the type in TREE_PURPOSE.
19904 * cvt.c (build_type_conversion): Adjust.
19905 * call.c (user_harshness): Adjust.
19906
19907 * method.c (emit_thunk): Call temporary_allocation and
19908 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
19909
19910 * tree.c (build_cplus_array_type): Handle tweaking of
19911 TYPE_MAIN_VARIANT here.
19912 * typeck.c (common_type): Not here.
19913
19914 * typeck.c (complete_type): Only try to complete an array type if
19915 it has a domain.
19916
19917 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19918
19919 * decl.c (grokvardecl): Call complete_type.
19920 (grokdeclarator): Call complete_type for PARM_DECLs.
19921
19922 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19923
19924 * pt.c (instantiate_class_template): Re-set
19925 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
19926
19927 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
19928
19929 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
19930 smart enough to do it right.
19931 * tree.c (cp_expand_decl_cleanup): Likewise.
19932 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
19933 cp_expand_decl_cleanup.
19934 (store_parm_decls): Likewise.
19935 (hack_incomplete_structures): Likewise.
19936 * except.c (push_eh_cleanup): Likewise.
19937
19938 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
19939
19940 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
19941 frontend to the backend where it belongs.
19942 * tree.c (unsave_expr): Likewise.
19943 (unsave_expr_now): Likewise.
19944 * tree.def (UNSAVE_EXPR): Likewise.
19945 * cp-tree.h (unsave_expr): Likewise.
19946 (unsave_expr_now): Likewise.
19947
19948 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
19949
19950 * init.c (emit_base_init): Make sure the partial EH cleanups live
19951 on the function_obstack.
19952
19953 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
19954
19955 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
19956 when checking for pointer types.
19957
19958 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19959
19960 * pt.c (instantiate_class_template): Remove obsolete check for
19961 access declarations.
19962
19963 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
19964
19965 * call.c (build_overload_call): Simplify calls to
19966 build_overload_call by removing last parameter.
19967 (build_method_call): Likewise.
19968 * cp-tree.h: Likewise.
19969 * method.c (build_opfncall): Likewise.
19970 * typeck.c (build_x_function_call): Likewise.
19971
19972 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
19973
19974 * call.c (default_parm_conversions): Factor out common code.
19975 (build_method_call): Use it.
19976 (build_overload_call_real): Use it.
19977
19978 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
19979
19980 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
19981 but pedwarn as the code is bogus.
19982 * typeck.c (decay_conversion): Likewise.
19983 (build_function_call_real): Use build_addr_func instead of
19984 default_conversion. Don't allow pointer-to-method functions down
19985 here.
19986 (build_unary_op): Use real pointer-to-member functions instead of
19987 fake ones.
19988 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
19989 (convert_for_assignment): Removed some obsolete code.
19990 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
19991 build_x_function_call instead of current_class_ptr. Only call
19992 digest_init once on an initializer, we do this just checking
19993 TREE_TYPE.
19994 (build_expr_from_tree): Pass current_class_ref to
19995 build_x_function_call instead of current_class_ptr.
19996 * init.c (build_member_call): Likewise.
19997 * pase.y: Likewise.
19998 * error.c (dump_expr): Handle OFFSET_REFs better.
19999 * pt.c (unify): Handle pointer-to-member functions better.
20000 * decl.c (finish_function): Clear out current_class_ref just like
20001 we do for current_class_ptr.
20002
20003 * typeck.c (get_delta_difference): Handle virtual bases better.
20004
20005 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
20006
20007 * sig.c (build_signature_table_constructor): Use the delta for
20008 the original basetype for this virtual function with thunks.
20009 (build_signature_method_call): We still need to adjust 'this'
20010 with thunks.
20011
20012 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
20013
20014 * call.c (build_addr_func): New routine. Used to get the `real'
20015 address of a function or a method. Needed to avoid getting a
20016 pointer-to-member function.
20017 (build_call): New routine to build CALL_EXPRs.
20018 (build_method_call): Use it.
20019 * cvt.c (convert_to_aggr): Likewise.
20020 * typeck.c (build_function_call_real): Likewise.
20021 * sig.c (build_signature_table_constructor): Use build_addr_func.
20022 * cp-tree.h (build_call, build_addr_func): Declare them.
20023
20024 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
20025
20026 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
20027 * parse.y: Remove uses of LOOKUP_AGGR.
20028
20029 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
20030
20031 * *.[chy]: Rename current_class_decl to current_class_ptr, and
20032 C_C_D to current_class_ref.
20033
20034 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
20035
20036 * call.c (convert_harshness): Tighten up pointer conversions.
20037
20038 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
20039
20040 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
20041 (finish_file): Likewise.
20042
20043 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20044
20045 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
20046
20047 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
20048 code.
20049
20050 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20051
20052 * decl2.c: Turn on thunks by default where supported.
20053
20054 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
20055
20056 * cp-tree.h (build_overload_call_maybe): Removed.
20057 * call.c (build_overload_call_real): Invert meaning of last arg to
20058 be require_complete.
20059 (build_overload_call): Likewise.
20060 * typeck.c (build_x_function_call): Use build_overload_call_real
20061 instead of build_overload_call_maybe.
20062
20063 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
20064
20065 * decl2.c (finish_file): Don't try to emit functions that haven't
20066 been compiled.
20067
20068 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20069
20070 * decl2.c (finish_vtable_vardecl): Oops.
20071
20072 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
20073 Also store the bindings from previous_class_values.
20074 (pop_from_top_level): Restore them.
20075
20076 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20077
20078 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
20079 symbol has been referenced.
20080 (finish_file): Re-join synthesis/vtable loop with inline emission
20081 loop, disable inlining when an inline is output.
20082
20083 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
20084
20085 * except.c (init_exception_processing): Setup saved_in_catch.
20086 (push_eh_cleanup): Reset __eh_in_catch.
20087 (expand_start_catch_block): Set __eh_in_catch.
20088
20089 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
20090
20091 * except.c (push_eh_cleanup): Add tracking for whether or not we
20092 have an active exception object.
20093 (expand_builtin_throw): Use it to make sure a rethrow without an
20094 exception object is caught.
20095
20096 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20097
20098 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20099 cache.
20100
20101 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
20102
20103 * decl2.c (finish_file): Also use sentries for vars with
20104 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20105 created).
20106
20107 * lex.c (handle_cp_pragma): Disable #pragma
20108 interface/implementation if SUPPORTS_ONE_ONLY > 1.
20109
20110 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
20111
20112 * method.c (emit_thunk): Wrap default case in
20113 temporary/permanent_allocation.
20114
20115 * method.c (make_thunk): Use DECL_ONE_ONLY.
20116 (emit_thunk): Call assemble_end_function.
20117
20118 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20119
20120 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20121 (import_export_decl): Likewise.
20122 (finish_prevtable_vardecl): Disable vtable hack if
20123 SUPPORTS_ONE_ONLY > 1.
20124
20125 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
20126
20127 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20128 PREDECREMENT_EXPRs take two arguments, not one.
20129
20130 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20131
20132 * class.c (build_vtable_entry): Don't build thunks for abstract
20133 virtuals.
20134
20135 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20136 frontend.
20137
20138 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20139
20140 * class.c (set_rtti_entry): Use size_zero_node.
20141 (build_vtable): Likewise.
20142
20143 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
20144
20145 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20146 (prepare_fresh_vtable): Likewise.
20147
20148 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
20149
20150 * method.c (emit_thunk): Call mark_used on the target function.
20151
20152 * call.c (build_method_call): Don't warn about pending templates.
20153
20154 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20155
20156 * decl2.c (finish_file): Fix list walking logic.
20157
20158 * typeck2.c (check_for_new_type): Only warn if -pedantic.
20159
20160 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
20161
20162 * class.c (finish_struct_1): Remove old code for
20163 dont_allow_type_definitions.
20164 * cp-tree.h: Likewise.
20165 * spew.c: Make sure cp-tree.h is included before parse.h, so the
20166 definition of flagged_type_tree is found before it is used.
20167 * lex.c: Likewise.
20168 * parse.y: Added the ftype member to the type union, and changed a
20169 number of rules to use it instead of ttype. Added calls to
20170 check_for_new_type() as appropriate.
20171 * typeck2.c (check_for_new_type): New function for checking
20172 if a newly defined type appears in the specified tree.
20173 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
20174 for check_for_new_type().
20175
20176 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
20177
20178 * decl2.c (finish_file): Only use a sentry if the decl is public.
20179
20180 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20181 don't pass LOOKUP_ONLYCONVERTING.
20182
20183 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
20184
20185 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20186 properly keeps track of const and volatile type modifiers.
20187
20188 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20189
20190 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20191 * pt.c (comp_template_args): Use it.
20192
20193 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20194 assemble_external for artificial function decls.
20195
20196 * decl.c (cp_finish_decl): Oops.
20197
20198 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20199
20200 * decl2.c (import_export_decl): Put static data member templates
20201 into common storage, or make them weak, depending on whether they
20202 are dynamically or statically initialized.
20203 (get_sentry): New function.
20204 (finish_file): Do import_export_decl for static data members before
20205 building the init/fini functions. Don't init/fini a variable that's
20206 EXTERNAL. Use a sentry for variables in common. Fix mismatching
20207 push/pop_temp_slots.
20208 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20209 expand_static_init thang.
20210 * method.c (get_id_2): New function.
20211
20212 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
20213
20214 * parse.y (empty_parms): Make sure we use C++-style prototypes
20215 when we're declaring member functions.
20216
20217 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20218
20219 * Makefile.in (CONFLICTS): 16 s/r conflicts.
20220 * parse.y (self_template_type): New nonterminal.
20221
20222 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20223
20224 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20225 name.
20226 * parse.y (base_class.1): Allow 'typename foo::bar'.
20227
20228 * lex.c (check_newline): Remove #pragma code that plays with the
20229 input stream, since we now deal with tokens. Clear nextchar when
20230 we're done.
20231 (handle_cp_pragma): Use real_yylex.
20232 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
20233 in one place.
20234
20235 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20236
20237 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20238
20239 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20240
20241 * parse.y: New token SELFNAME for potential constructor.
20242 * spew.c (yylex): Handle it.
20243 * lex.c (identifier_type): Produce it.
20244
20245 * parse.y (complete_type_name): In :: case, don't push class binding.
20246 (complex_type_name): Likewise.
20247
20248 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
20249
20250 * typeck.c (build_reinterpret_cast): Handle pointer to member
20251 functions.
20252
20253 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20254
20255 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20256 pragmas.
20257 (check_newline): Put the vtable/unit/implementation/interface pragma
20258 code into handle_cp_pragma, replacing it with a call.
20259 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20260 args. Get the next token after handling the pragma token.
20261
20262 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20263
20264 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20265 (convert_to_pointer_force): Likewise.
20266
20267 * init.c (build_new): Fix array new without -fcheck-new.
20268
20269 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20270
20271 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20272 tree.c: Lose TYPE_NESTED_NAME.
20273
20274 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20275 as identifiers.
20276
20277 * tree.def: Add VEC_INIT_EXPR.
20278 * expr.c (cplus_expand_expr): Handle it.
20279 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20280 the extra file-scope symbol nastiness.
20281
20282 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20283
20284 * method.c (make_thunk): Thunks are static.
20285 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20286
20287 * decl2.c (mark_vtable_entries): Emit thunks as needed.
20288 (finish_file): Don't emit them here.
20289
20290 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20291
20292 * rtti.c (build_dynamic_cast): Handle null pointers.
20293 (ifnonnull): New function.
20294
20295 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
20296
20297 * call.c (build_method_call): Remember the original basetype we
20298 were called with. Give an error message instead of trying
20299 (incorrectly) to call a non-static member function through a
20300 non-inherited class.
20301
20302 * search.c (expand_upcast_fixups): Mark the new fixup as
20303 DECL_ARTIFICIAL.
20304
20305 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20306
20307 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20308
20309 * class.c (set_rtti_entry): Fix for thunks.
20310
20311 * decl2.c (import_export_decl): Still emit typeinfo fns for
20312 cv-variants of builtin types.
20313
20314 * rtti.c (expand_class_desc): Set up base_info_type_node here.
20315 (init_rtti_processing): Instead of here.
20316
20317 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20318
20319 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20320 (build_typeid): Only complain about taking dynamic typeid without
20321 -frtti.
20322
20323 * decl2.c: flag_rtti defaults to 1.
20324
20325 * rtti.c (get_tinfo_var): The general class case is now smaller.
20326 (init_rtti_processing): Pack the latter three fields of base_info
20327 into 32 bits.
20328
20329 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
20330
20331 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20332
20333 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
20334
20335 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20336 (push_memoized_context): Split out code to undefer pop_type_level to
20337 (clear_memoized_cache): here.
20338 (pop_memoized_context): We can only handle one layer of deferral of
20339 pop_type_level so clear the cache, if there was a previous level.
20340
20341 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20342
20343 * rtti.c (init_rtti_processing): Build up base_info_type_node.
20344 (expand_class_desc): Use one pointer to an array of base_info
20345 structs, passed using a CONSTRUCTOR.
20346
20347 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
20348
20349 * class.c (build_vbase_path): Remove block extern for
20350 flag_assume_nonnull_objects here.
20351 (build_vfn_ref): Split out functionality into build_vtbl_ref.
20352 (build_vtbl_ref): New routine.
20353 (build_vtable): Set up rtti info here.
20354 (add_virtual_function): Note in CLASSTYPE_RTTI the best
20355 place where we can get the rtti pointers from to avoid having to
20356 search around for a place.
20357 (finish_base_struct): Likewise.
20358 (finish_struct_1): Likewise. Never create totally new vtables
20359 with totally new vtable pointers for rtti. Disable code to layout
20360 vtable pointers better until we want to break binary
20361 compatibility.
20362 * rtti.c (build_headof_sub): New routine to convert down to a
20363 sub-object that has an rtti pointer in the vtable.
20364 (build_headof): Use it. Also, use build_vtbl_ref now to be more
20365 maintainable.
20366 (build_dynamic_cast): Make sure we have saved it, if we need to.
20367 * search.c (dfs_init_vbase_pointers): Disable code that deals with
20368 a more efficient vtable layout, enable later.
20369 * call.c (flag_assume_nonnull_objects): Moved declaration to
20370 * cp-tree.h: here. Declare build_vtbl_ref.
20371 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20372 function calls that want a tree.
20373
20374 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20375
20376 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20377 other X subobjects in the most derived type. Ack.
20378
20379 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20380 get_typeid will do it for us.
20381 (get_typeid_1): Break out call-building for expand_*_desc to use.
20382 (get_typeid): Call it.
20383 (expand_*_desc): Likewise.
20384 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20385 and void *.
20386 (init_decl_processing): Lose builtin_type_tdescs lossage.
20387 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20388
20389 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
20390
20391 * pt.c (tsubst): When calling set_nested_typename, use
20392 TYPE_NESTED_NAME (current_class_type) instead of
20393 current_class_name.
20394
20395 * decl.c (pushdecl): Likewise.
20396 (pushdecl_class_level): Likewise.
20397 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20398 set_nested_typename.
20399
20400 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20401
20402 * rtti.c (synthesize_tinfo_fn): Handle arrays.
20403
20404 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20405
20406 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20407
20408 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20409 (init_rtti_processing): Lose bad_cast_type.
20410 (build_dynamic_cast): Use throw_bad_cast.
20411
20412 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20413
20414 * decl2.c (finish_file): Don't synthesize artificial functions
20415 that are external and not inline.
20416
20417 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20418
20419 * decl2.c (finish_file): Handle having new inlines added to
20420 saved_inlines by synthesis.
20421
20422 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20423
20424 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20425
20426 RTTI rewrite to initialize nodes as needed, not require that
20427 users #include <typeinfo>, complete functionality and reduce wasted
20428 space.
20429 * rtti.c (init_rtti_processing): New fn.
20430 (build_typeid): The vtable entry is now a function.
20431 (get_tinfo_var): New fn.
20432 (get_tinfo_fn): Likewise.
20433 (get_typeid): Use it.
20434 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20435 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20436 points __rtti_*.
20437 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20438 (synthesize_tinfo_fn): New fn.
20439 * method.c (build_t_desc_overload): Lose.
20440 (build_overload_with_type): More generic.
20441 * decl.c (init_decl_processing): Call init_rtti_processing.
20442 * class.c (set_rtti_entry): Use get_tinfo_fn.
20443 * decl2.c (mark_vtable_entries): Mark the rtti function.
20444 (finish_prevtable_vardecl): Don't build_t_desc.
20445 (import_export_decl): Handle tinfo functions.
20446 (finish_file): Likewise.
20447 * typeck.c (inline_conversion): New fn.
20448 (build_function_call_real): Use it.
20449 * cp-tree.h: Add decls.
20450
20451 * method.c (hack_identifier): Also convert component_refs from
20452 references.
20453
20454 * lex.c (cons_up_default_function): Use the type, not the name, in
20455 declspecs.
20456
20457 * decl2.c (import_export_vtable): Fix weak vtables.
20458
20459 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
20460
20461 * search.c (get_base_distance_recursive): Fix access checks for
20462 protected bases.
20463
20464 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20465
20466 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20467 cp-tree.h.
20468 (convert_harshness): Add prototypes wrapped by PROTO.
20469 * decl2.c (grok_function_init): Likewise.
20470 (do_toplevel_using_decl): Change to void return type.
20471 * class.c (build_vtable_entry): Remove decl of make_thunk.
20472 (merge_overrides): Fix order of arg definitions.
20473 (finish_vtbls): Likewise.
20474 (fixup_vtable_deltas): Likewise.
20475 (modify_all_direct_vtables): Likewise.
20476 (modify_all_indirect_vtables): Likewise.
20477 * search.c (get_base_distance_recursive): Likewise.
20478 (get_abstract_virtuals_1): Likewise.
20479 (fixup_virtual_upcast_offsets): Likewise.
20480 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20481 * init.c (perform_member_init): Fix order of arg definitions.
20482 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20483 * cp-tree.h (make_thunk): Add decl.
20484 (overload_template_name, push_template_decl): Add decls.
20485 (do_toplevel_using_decl): Change to void return type.
20486 (vec_binfo_member): Add decl.
20487
20488 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20489
20490 * typeck.c (mark_addressable, convert_for_assignment,
20491 convert_for_initialization, pointer_int_sum, pointer_diff,
20492 unary_complex_lvalue): Add prototypes wrapped by PROTO.
20493 (convert_sequence): #if 0 fn decl, since definition also is.
20494
20495 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
20496
20497 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20498 cast to pointer types for type searching.
20499
20500 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20501
20502 * typeck.c (get_delta_difference): Use cp_error, not error, in the
20503 case where BINFO == 0.
20504
20505 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
20506
20507 * call.c (build_method_call): Fix wording of error messages so
20508 constructors come out right.
20509
20510 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
20511
20512 * decl.c (push_overloaded_decl): Don't warn about hidden
20513 constructors when both the type and the function are declared
20514 in a system header file.
20515
20516 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
20517
20518 * class.c (finish_struct_1): Propagate the TYPE_PACKED
20519 flag for the type to the type's fields.
20520
20521 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20522
20523 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20524
20525 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
20526
20527 * class.c (base_info, finish_base_struct): Replace
20528 needs_virtual_dtor with base_has_virtual.
20529
20530 (finish_struct_1): Remove the old code that tried to make default
20531 destructors virtual. Use base_has_virtual when checking if we need
20532 to add a vtable entry for the rtti code.
20533
20534 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20535
20536 * pt.c (push_template_decl): Complain about template decl with
20537 inappropriate declaration.
20538
20539 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
20540
20541 * typeck.c (build_x_unary_op): Remove bogus check for taking
20542 the address of a member function.
20543
20544 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20545
20546 * parse.y (constructor_declarator): Only push the class if
20547 we are not already in the class.
20548
20549 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
20550
20551 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20552 Add additional argument to INIT_CUMULATIVE_ARGS.
20553
20554 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20555
20556 * decl.c (shadow_tag): Fix error about anon union with methods.
20557
20558 * parse.y (self_reference): Only generate a self-reference if this
20559 is a non-template class.
20560 (opt.component_decl_list): Only use it if it was generated.
20561
20562 * parse.y (component_decl_1): Use constructor_declarator.
20563 (fn.def2): Likewise.
20564 (notype_component_declarator0): Likewise.
20565
20566 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
20567
20568 * typeck.c (build_x_unary_op): Add checks for taking the address
20569 of a TARGET_EXPR or of a member function, and give appropriate
20570 warnings.
20571
20572 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20573
20574 * pt.c (process_template_parm): Allow template type parms to be
20575 used as types for template const parms.
20576
20577 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
20578
20579 * init.c (expand_vec_init): Ensure the eh cleanups are on the
20580 function_obstack.
20581
20582 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20583
20584 * decl.c (lookup_name_real): Be even more picky about the
20585 ambiguous lookup warning.
20586 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20587 * parse.y (constructor_declarator): Rather than here.
20588
20589 * parse.y (constructor_declarator): New nonterminal.
20590 (fn.def1): Use it.
20591 (explicit_instantiation): Likewise.
20592
20593 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20594
20595 Add implicit declaration of class name at class scope.
20596 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20597 * parse.y (self_reference): New nonterminal.
20598 (opt.component_decl_list): Use it.
20599 (fn.def1): Add nested_name_specifier type_name cases.
20600 * class.c (build_self_reference): New function.
20601 (finish_struct): Handle access_default later, move self-reference
20602 decl to the end.
20603 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20604 * cp-tree.h: Adjust.
20605
20606 * pt.c (do_function_instantiation): Separate handling of member
20607 functions and non-member functions properly.
20608
20609 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20610
20611 * pt.c (process_template_parm): Improve error for 'volatile class K'.
20612
20613 * class.c (finish_struct_1): Check the right slot for destructors.
20614
20615 * decl.c (start_enum): Complain about enum templates.
20616
20617 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
20618
20619 * init.c (resolve_offset_ref): Offset pointers to member data by one.
20620 * typeck.c (unary_complex_lvalue): Likewise.
20621
20622 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
20623
20624 * typeck.c (c_expand_return): Check for a returned local
20625 array name, similar to the check for an ADDR_EXPR.
20626
20627 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20628
20629 * decl.c (cp_finish_decl): Don't build cleanups for static
20630 variables here.
20631
20632 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
20633
20634 * typeck.c (build_modify_expr): Fix error messages to be more
20635 accurate.
20636 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20637 assignment operators.
20638 * error.c (assop_as_string): Likewise. Add support for `%Q' for
20639 assignment operators.
20640
20641 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20642
20643 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
20644 give an error if initialized. pedwarn about nested type with the
20645 same name as its enclosing class.
20646
20647 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20648
20649 * typeck.c (require_complete_type): Be sure to instantiate the
20650 MAIN_VARIANT of the type.
20651
20652 * decl2.c (finish_file): Instantiate pending templates before
20653 processing static constructors and destructors.
20654
20655 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20656 unless at_eof.
20657
20658 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
20659
20660 * decl2.c (delete_sanity): If error_mark_node is passed
20661 in as an expression, quit while we're ahead.
20662
20663 * decl.c (grokdeclarator): Give an error message if `friend'
20664 is combined with any storage class specifiers.
20665
20666 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
20667
20668 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20669 definition of nonexistent nested type.
20670
20671 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20672 not to say 'typedef'.
20673
20674 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20675
20676 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20677 * search.c (dfs_walk, dfs_init_vbase_pointers,
20678 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20679 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20680
20681 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20682
20683 * except.c (build_throw): Support minimal parse.
20684 * pt.c (tsubst_copy): Support THROW_EXPR.
20685 * decl2.c (build_expr_from_tree): Likewise.
20686
20687 * pt.c (mangle_class_name_for_template): Always allocate
20688 scratch_firstobj.
20689
20690 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
20691
20692 * cvt.c (cp_convert_to_pointer): Give an appropriate error
20693 when trying to cast from an incomplete type.
20694
20695 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20696
20697 * pt.c (instantiate_class_template): Don't bother setting up
20698 CLASSTYPE_TAGS explicitly, as the nested types will add
20699 themselves.
20700
20701 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
20702
20703 * decl.c (shadow_tag): Remove old error check for usage of
20704 an enum without a previous declaration.
20705 (xref_tag): Add error message about usage of enums without a
20706 previous declaration.
20707
20708 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20709
20710 * lex.c (do_identifier): Only do name consistency check if we're
20711 parsing.
20712
20713 * pt.c (push_template_decl): Don't crash if we get a member defn
20714 that doesn't match.
20715
20716 * decl.c (xref_tag_from_type): New function to do an xref without
20717 always having to figure out code_type_node.
20718 * cp-tree.h: Declare it.
20719 * pt.c (instantiate_class_template): Use it for friend classes.
20720 (lookup_template_class): Use it.
20721
20722 * typeck2.c (build_functional_cast): Pull out a single parm before
20723 passing it to build_c_cast.
20724
20725 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
20726
20727 * expr.c (do_case): Give an error message if a pointer is
20728 given as a case value.
20729
20730 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20731
20732 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20733 an overload list.
20734
20735 * lex.c (cons_up_default_function): Really, now, interface hackery
20736 does not apply to synthesized methods.
20737
20738 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
20739
20740 * call.c (build_method_call): Ctors and dtors now have special names
20741 with respect to lookups.
20742 * class.c (add_method): Likewise.
20743 (grow_method): Likewise.
20744 (finish_struct_methods): Likewise.
20745 (warn_hidden): Likewise.
20746 (finish_struct_1): Likewise.
20747 * cvt.c (convert_to_reference): Likewise.
20748 (convert_to_aggr): Likewise.
20749 (cp_convert): Likewise.
20750 * decl2.c (check_classfn): Likewise.
20751 * init.c (expand_member_init): Likewise.
20752 (expand_default_init): Likewise.
20753 (expand_aggr_init_1): Likewise.
20754 (build_offset_ref): Likewise.
20755 (build_new): Likewise.
20756 (build_delete): Likewise.
20757 * lex.c (do_inline_function_hair): Likewise.
20758 * search.c (lookup_field_1): Likewise.
20759 (lookup_fnfields_here): Likewise.
20760 (lookup_field): Likewise.
20761 (lookup_fnfields): Likewise.
20762 (get_virtual_destructor): Likewise.
20763 (dfs_debug_mark): Likewise.
20764 (dfs_pushdecls): Likewise.
20765 (dfs_compress_decls): Likewise.
20766 * tree.c (layout_basetypes): Likewise.
20767 * typeck.c (build_component_ref): Likewise.
20768 (build_x_function_call): Likewise.
20769 (build_modify_expr): Likewise.
20770 (convert_for_initialization): Likewise.
20771 (build_functional_cast): Likewise.
20772 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20773 (CTOR_NAME): New.
20774 (DTOR_NAME): New.
20775 * decl.c (ctor_identifier): New.
20776 (dtor_identifier): New.
20777 (init_decl_processing): Set them.
20778
20779 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
20780
20781 * typeck.c (build_component_ref): Don't get confused by fields whose
20782 context has no type name, like pointer to member functions.
20783
20784 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20785
20786 * decl.c (grokdeclarator): Handle typedef without declarator.
20787
20788 * pt.c (tsubst): Handle SCOPE_REF in declarator.
20789
20790 * parse.y (bad_parm): Catch another case of missing `typename'.
20791
20792 * lex.c (yyprint): Handle TYPE_DECLs.
20793
20794 * decl.c (start_function): Don't try to be clever.
20795
20796 * lex.c: Lose compiler_error_with_decl.
20797 * typeck2.c: Lose error_with_aggr_type.
20798 (incomplete_type_error): Use cp_* instead of old functions.
20799 (readonly_error): Likewise.
20800 * typeck.c (convert_arguments): Likewise.
20801 * search.c (lookup_nested_field): Likewise.
20802 * method.c (make_thunk): Likewise.
20803 * decl.c (grokparms): Likewise.
20804 * cp-tree.h: Update.
20805
20806 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20807 and value.
20808
20809 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
20810
20811 * method.c (build_opfncall): When deleting a pointer to an
20812 array, build a new pointer to the tree past any ARRAY_TYPE
20813 nodes.
20814
20815 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20816
20817 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20818
20819 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20820
20821 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20822 and ! DECL_INLINE.
20823
20824 * decl.c (finish_function): Don't set nested based on
20825 hack_decl_function_context.
20826 * parse.y (function_try_block): Check for nested function.
20827 (pending_inlines): Likewise.
20828
20829 * decl2.c (build_expr_from_tree): If a unary op already has a
20830 type, just return it.
20831
20832 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20833
20834 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20835 (finish_file): Check the return value of walk_vtables.
20836 (finish_prevtable_vardecl): Return int.
20837 (finish_vtable_vardecl): Likewise.
20838 (prune_vtable_vardecl): Likewise.
20839 * lex.c (set_vardecl_interface_info): Likewise.
20840 * cp-tree.h: Adjust return types.
20841
20842 * class.c (delete_duplicate_fields_1): Don't complain about
20843 duplicate nested types if they're the same type.
20844 (finish_struct): Remove check for duplicate.
20845 * decl2.c (grokfield): Don't check for typedef of anonymous type.
20846
20847 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20848
20849 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20850
20851 * decl.c (grokdeclarator): Lose special handling of class-level
20852 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
20853 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20854
20855 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20856
20857 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20858
20859 * search.c (compute_access): Fix handling of anonymous union
20860 members.
20861 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20862 from anonymous unions to their members.
20863
20864 * typeck.c (build_x_function_call): For static member functions,
20865 hand off to build_member_call.
20866
20867 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20868
20869 * typeck.c (build_component_ref): Handle OFFSET_REFs.
20870
20871 * init.c (expand_vec_init): Fix init == 0 case.
20872
20873 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20874
20875 * init.c (build_new): pedwarn about init and array new.
20876 (expand_vec_init): Handle lists, use convert_for_initialization.
20877
20878 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20879 when converting to an aggregate type.
20880 * cvt.c (cp_convert): Pass it through.
20881
20882 * typeck.c (build_conditional_expr): Handle user-defined
20883 conversions to slightly different types.
20884
20885 * decl.c (grokdeclarator): Force an array type in a parm to be
20886 permanent.
20887
20888 * decl2.c (do_using_directive): Sorry.
20889 (do_namespace_alias): Likewise.
20890 * lex.c (real_yylex): Warn about using the `namespace' keyword.
20891
20892 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20893
20894 * parse.y (datadef): Move call to note_list_got_semicolon up.
20895
20896 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
20897
20898 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
20899
20900 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
20901
20902 * decl.c (cp_finish_decl): The exception regions have to be
20903 nested, not overlapping. We start the exception region for a
20904 decl, after it has been fully built, and all temporaries for it
20905 have been cleaned up.
20906
20907 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
20908
20909 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
20910
20911 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20912
20913 * tree.def: Add RETURN_INIT.
20914 * pt.c (instantiate_decl): Handle RETURN_INIT.
20915 * decl.c (store_return_init): Handle minimal_parse_mode.
20916
20917 * tree.c (cp_build_type_variant): Just return an error_mark_node.
20918 * decl.c (make_typename_type): Don't try to get the file and line
20919 of an identifier.
20920 * typeck.c (comptypes): Handle TYPENAME_TYPE.
20921
20922 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
20923
20924 * decl.c (poplevel): Make sure we clear out and restore old local
20925 non-VAR_DECL values by default when they go out of scope.
20926
20927 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20928
20929 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20930 referring to addresses of variables and functions.
20931
20932 * error.c (dump_expr): Support SIZEOF_EXPR.
20933
20934 * init.c (do_friend): Use the return value of check_classfn.
20935
20936 * typeck.c (convert_arguments): Call complete_type.
20937
20938 * method.c (hack_identifier): After giving an error, set value to
20939 error_mark_node.
20940
20941 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20942
20943 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
20944 lossage for local classes.
20945 * cp-tree.h: Declare it.
20946 * decl.c (lookup_name_real): Evil, painful hack for local classes.
20947 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
20948 Use hack_decl_function_context.
20949 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
20950 (start_function): Use hack_decl_function_context.
20951 (finish_function): Likewise.
20952 * method.c (synthesize_method): Likewise.
20953 * lex.c (process_next_inline): Likewise.
20954 (do_pending_inlines): Likewise.
20955 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
20956 done with it.
20957
20958 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
20959
20960 * sig.c (build_signature_pointer_or_reference_type): Align
20961 signature pointers/references on 8-byte boundaries so they can be
20962 grabbed 2 words at a time on a Sparc.
20963
20964 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20965
20966 * method.c (hack_identifier): Requiring a static chain is now a
20967 hard error.
20968 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
20969 functions.
20970
20971 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20972
20973 * init.c (build_offset_ref): Call complete_type.
20974
20975 * decl.c (pop_from_top_level): Always pop previous_class_type.
20976
20977 * parse.y: Handle multiple decls in a for-init-statement.
20978 * pt.c (tsubst_expr): Likewise.
20979
20980 * pt.c (tsubst): Use tsubst_expr for the second operand of an
20981 ARRAY_REF.
20982
20983 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
20984 (poplevel_class): Set it here.
20985 (pop_from_top_level): Pop it here if we're returning to class scope.
20986 * class.c (pushclass): Don't set it here.
20987
20988 * decl.c (maybe_push_to_top_level): Save current_template_parms,
20989 and clear it if !pseudo.
20990 (pop_from_top_level): Restore it.
20991
20992 * decl2.c (finish_file): Push the dummy each time we walk the list
20993 of vtables.
20994
20995 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
20996 something for CAST_EXPR.
20997
20998 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
20999
21000 * cvt.c (cp_convert): Warn about implicit conversion of the
21001 address of a function to bool, as it is always true.
21002
21003 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
21004
21005 * typeck.c (c_expand_return): Fix warning for local externs returned.
21006
21007 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21008
21009 * tree.c (mapcar): Propagate const and volatile properly.
21010
21011 * typeck.c (complete_type): Be sure to instantiate the
21012 MAIN_VARIANT of the type.
21013
21014 * method.c (synthesize_method): Class interface hackery does not
21015 apply to synthesized methods.
21016
21017 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21018
21019 * pt.c (comp_template_args): Use comptypes rather than just
21020 checking for TEMPLATE_TYPE_PARM equivalence.
21021
21022 * typeck.c (build_x_function_call): Call complete_type before
21023 checking TYPE_OVERLOADS_CALL_EXPR.
21024
21025 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
21026
21027 * g++.c (main): Check also for new define ALT_LIBM.
21028
21029 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21030
21031 * pt.c (instantiate_class_template): If we don't have a pattern
21032 yet, that's OK.
21033 (coerce_template_parms): If we see a local class, bail.
21034
21035 * decl.c (grok_reference_init): Make sure there's a type before
21036 checking its code.
21037
21038 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
21039 (push_template_decl): Likewise.
21040
21041 * parse.y (named_class_head): Set
21042 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
21043
21044 * decl.c (xref_tag): Diagnose redeclaration of template
21045 type-parameter name.
21046
21047 * error.c (dump_type): Handle anonymous template type parms.
21048
21049 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
21050 TYPE_STUB_DECL.
21051 (coerce_template_parms): Likewise.
21052
21053 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
21054
21055 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
21056 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
21057
21058 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21059
21060 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
21061 before trying to get its STUB_DECL.
21062 (coerce_template_parms): Likewise.
21063
21064 * parse.y (template_type_parm): If they didn't use 'class',
21065 pretend they did after giving an error.
21066
21067 * pt.c (coerce_template_parms): Diagnose use of local class.
21068
21069 * decl.c (grok_reference_init): Use instantiate_type.
21070
21071 * error.c (dump_expr): Handle TEMPLATE_DECLs.
21072
21073 * parse.y (named_class_head): Diagnose mismatching types and tags.
21074
21075 * decl.c (pushdecl): Type decls and class templates clash with
21076 artificial type decls, not hide them.
21077
21078 * decl.c (redeclaration_error_message): Diagnose redefinition of
21079 templates properly.
21080 (duplicate_decls): Diagnose disallowed overloads for template
21081 functions, too.
21082
21083 * decl.c (start_decl): Call complete_type before checking for a
21084 destructor.
21085
21086 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
21087
21088 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
21089
21090 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21091
21092 * decl.c (grok_op_properties): Don't check for operator++(int) in
21093 a template.
21094
21095 * tree.c (perm_manip): Return a copy of variable and function
21096 decls with external linkage.
21097
21098 * tree.def: Change some of the min tree codes to type "1".
21099 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21100 * method.c (build_overload_int): Emit something arbitrary for
21101 anything but an INTEGER_CST if we're in a template.
21102
21103 * decl.c (cp_finish_decl): Call complete_type before deciding
21104 whether or not to lay out the decl.
21105
21106 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21107
21108 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21109
21110 * typeck2.c (build_x_arrow): Call complete_type.
21111
21112 * pt.c (add_pending_template): Broken out.
21113 (lookup_template_class): If -fexternal-templates, call it for all
21114 the methods of implemented types.
21115 (instantiate_class_template): Instead of instantiating them here.
21116 (instantiate_decl): Handle -fexternal-templates earlier.
21117
21118 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21119
21120 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21121 memoized lookup stuff inside GATHER_STATISTICS.
21122
21123 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21124
21125 * decl.c (start_decl): Complain about array of incomplete type
21126 here.
21127 (grokdeclarator): Not here.
21128
21129 * parse.y (template_parm): Expand full_parm inline so we can set
21130 the rule's precedence.
21131
21132 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21133 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21134 * decl2.c (grokbitfield): Don't check for integer constant here.
21135 * class.c (finish_struct_1): Check here.
21136
21137 * decl.c (define_label): Make the min decl go on permanent_obstack.
21138
21139 * pt.c (unify): Don't handle CONST_DECLs.
21140 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21141 (tsubst_copy): Likewise.
21142
21143 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21144 CONST_DECL for a template parm.
21145
21146 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21147
21148 * decl.c (grokdeclarator): Complain about array of incomplete type
21149 here.
21150 (start_decl_1): Not here.
21151
21152 * pt.c (tsubst): Handle pointer-to-function declarators.
21153
21154 * method.c (hack_identifier): If pedantic, diagnose local class
21155 methods that require a static chain.
21156
21157 * decl.c (grok_op_properties): No longer static.
21158 * cp-tree.h: Declare it.
21159 * pt.c (tsubst): Call it for operators.
21160 Use tsubst_copy for TREE_VECs.
21161
21162 * parse.y (template_arg): The expr has precedence like '>'.
21163
21164 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21165
21166 * pt.c (coerce_template_parms): Don't coerce an expression using
21167 template parms.
21168 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21169 (tsubst): Don't use build_index_2_type if the max_value uses template
21170 parms.
21171 * method.c (build_overload_int): Emit something arbitrary for an
21172 expression using template parms.
21173
21174 * parse.y (template_close_bracket): New non-terminal to catch use
21175 of '>>' instead of '> >' in template class names.
21176 (template_type): Use it.
21177 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21178
21179 * tree.def: Add CAST_EXPR.
21180 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21181 CONVERT_EXPR for minimal_parse_mode.
21182 * typeck.c (build_c_cast): Likewise.
21183 * pt.c (tsubst_copy): Likewise.
21184 * decl2.c (build_expr_from_tree): Likewise.
21185 * error.c (dump_expr): Likewise.
21186
21187 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21188
21189 * except.c (SetTerminate, SetUnexpected): Put back global vars.
21190 (init_exception_processing): Put back decl/init of
21191 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21192 fns from libstdc++.
21193
21194 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21195 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21196 Delete unused fns.
21197 * cp-tree.h (declare_uninstantiated_type_level,
21198 uninstantiated_type_level_p): Delete prototypes.
21199
21200 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21201
21202 * pt.c (tsubst_expr): Add default return.
21203
21204 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21205
21206 * error.c (fndecl_as_string): Delete unused arg CNAME.
21207 * sig.c (build_signature_table_constructor,
21208 build_signature_method_call): Fix calls.
21209
21210 * class.c (the_null_vtable_entry): Delete var definition.
21211 (init_class_processing): Delete tree the_null_vtable_entry init.
21212 * decl.c (no_print_{functions, builtins}): Declare as static.
21213 (__tp_desc_type_node): #if 0 var definition.
21214 (init_type_desc): #if 0 init of __tp_desc_type_node.
21215 (vb_off_identifier): Move var decl into init_decl_processing.
21216 (current_function_assigns_this): Declare as static.
21217 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21218 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21219 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21220 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21221 * init.c (BI_header_type, BI_header_size): Declare as static.
21222 * pt.c (template_classes): Delete unused var.
21223 (add_pending_template): Delete decl for non-existent fn.
21224 (lookup_template_class): Delete vars CODE and TAG_CODE.
21225 (instantiate_template): Delete unused var TARGS.
21226 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21227 Delete decls.
21228 (__tp_desc_type_node): #if 0 var decl.
21229 (fndecl_as_string): Fix prototype.
21230
21231 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21232
21233 * tree.def: Add GOTO_STMT.
21234 * pt.c (tsubst_expr): Support goto and labels.
21235 * decl.c (define_label): Support minimal parsing.
21236 * parse.y (simple_stmt): Likewise.
21237
21238 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21239
21240 * xref.c (GNU_xref_member): Only define/set var I if
21241 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21242 used.
21243 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21244 (GNU_xref_end): Fix call.
21245 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21246 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21247
21248 * tree.c (build_exception_variant): Delete unused vars I, A, T,
21249 T2, and CNAME.
21250 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21251 (mapcar): Delete unused var CODE.
21252 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21253 (break_out_cleanups): Fix call.
21254 (bot_manip): Likewise.
21255 * call.c (build_method_call): Likewise.
21256 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21257 Likewise.
21258 * typeck.c (unary_complex_lvalue, build_modify_expr,
21259 convert_for_initialization): Likewise.
21260 * typeck2.c (build_functional_cast): Likewise.
21261 * cp-tree.h (build_cplus_new): Fix prototype.
21262
21263 * repo.c (open_repo_file): Delete unused var Q.
21264 (repo_compile_flags, repo_template_declared,
21265 repo_template_defined, repo_class_defined, repo_inline_used,
21266 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21267 (repo_get_id, repo_vtable_used): Declare as static.
21268 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21269 prototypes.
21270
21271 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
21272
21273 * parse.y (pending_inlines): Add function_try_block case.
21274
21275 * pt.c (unify): Fix for template const parms.
21276
21277 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21278
21279 * lex.c (extract_interface_info): Delete forward decl.
21280 (default_copy_constructor_body, default_assign_ref_body): Delete
21281 decls for non-existent functions.
21282 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21283 (init_lex): Delete setting them.
21284 (cons_up_default_function): Delete unused vars FUNC_BUF,
21285 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
21286 #if 0'd synth code.
21287 (toplevel, expression_obstack): Delete unused extern decls.
21288 (tree_node_kind): Delete unused enum.
21289 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21290 GATHER_STATISTICS.
21291 (tree_node_kind_names): Delete unused extern decl.
21292 (synth_obstack): Delete unused var.
21293 (init_lex): Don't set it.
21294 (init_parse): Add decl before use.
21295 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21296 (current_unit_{name, language}): Delete unused vars.
21297 (check_newline): Don't bother setting them, just accept the #pragma.
21298 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21299 (current_unit_{name, language}): Delete decls.
21300
21301 * search.c: Wrap all of the memoized functions, macros, and
21302 variables inside #ifdef GATHER_STATISTICS.
21303 (lookup_field, lookup_fnfields): Likewise.
21304 (init_search_processing): Likewise.
21305 (reinit_search_statistics): Wrap whole function.
21306 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21307
21308 * decl.c (finish_function): Only call pop_memoized_context if
21309 GATHER_STATISTICS is defined.
21310 (start_function): Likewise for push_memoized_context.
21311 * class.c (pushclass, popclass): Likewise.
21312
21313 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21314 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21315
21316 * cvt.c (cp_convert): Delete unused local var FORM.
21317 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21318 prototypes.
21319
21320 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21321
21322 * pt.c (do_poplevel): Oops; really return what we get from
21323 poplevel this time.
21324
21325 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21326
21327 * cp-tree.h (is_aggr_type): Add prototype.
21328
21329 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21330 * method.c ({push,pop}_cp_function_context): Delete decls.
21331 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21332 (SetUnexpected, SetTerminate): Delete unused vars.
21333 (init_exception_processing): Don't set SetUnexpected or
21334 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21335 (output_exception_table_entry): Delete unused array LABEL.
21336 (expand_internal_throw): Delete unused var PARAMS.
21337 (expand_start_catch_block): Delete unused var CLEANUP.
21338 (emit_exception_table): Delete unused var EH_NODE_DECL.
21339 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21340 GOTO_UNWIND_AND_THROW. Don't set them.
21341 (end_eh_unwinder): Add top decl.
21342 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21343 (exception_section, push_rtl_perm, do_function_call,
21344 lang_interim_eh, push_eh_cleanup, eh_outer_context,
21345 expand_end_eh_spec, end_eh_unwinder): Declare as static.
21346 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21347 throw_used): Likewise.
21348 * cp-tree.h (expand_end_eh_spec): Delete prototype.
21349
21350 * search.c (dfs_mark, dfs_mark_vtable_path,
21351 dfs_unmark_vtable_path, dfs_mark_new_vtable,
21352 dfs_unmark_new_vtable, dfs_clear_search_slot,
21353 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21354 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21355 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21356 functions.
21357 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21358 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21359 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21360 Only define #ifdef GATHER_STATISTICS.
21361 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21362 is defined.
21363 (vbase_decl): Delete var definition.
21364 (init_search): Delete old decl.
21365 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21366 never actually used.
21367 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21368 (get_base_distance_recursive): Delete unused fourth arg
21369 BASETYPE_PATH. Fix call .
21370 (get_base_distance): Fix call.
21371 (push_class_decls): Delete unused var ID.
21372 (make_memoized_table_entry): Declare as static.
21373 (breadth_first_search): Declare as static.
21374 (tree_has_any_destructor_p): Declare as static.
21375 (pop_class_decls): Delete unused arg pop_class_decls.
21376 * class.c (popclass): Fix call to pop_class_decls.
21377 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21378 tree_has_any_destructor_p): Delete prototypes.
21379
21380 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21381 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
21382 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21383 (build_user_desc): Delete unused var T.
21384 (build_class_desc): Delete unused vars T and OFF.
21385 (build_t_desc): Delete unused var NAME_STRING.
21386 (build_headof): Make static.
21387 (get_bad_cast_node): Likewise.
21388 (get_def_to_follow): Likewise.
21389 * cp-tree.h (init_type_desc): Add prototype.
21390 (build_headof): Remove prototype.
21391
21392 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21393
21394 * pt.c (tsubst): Only look for matching decls at file scope for
21395 non-member functions.
21396
21397 * call.c (build_scoped_method_call): Handle scoped destructor
21398 calls in templates.
21399
21400 * decl.c (*_top_level): Also save previous_class_values.
21401
21402 * pt.c (tsubst_expr): Support do {} while loops.
21403 * parse.y (simple_stmt): Likewise.
21404 * tree.def: Likewise.
21405
21406 * method.c (build_overload_identifier): For a class nested in a
21407 template class, don't mangle in the template parms from our
21408 context.
21409
21410 * lex.c, cp-tree.h: Remove support for template instantiations in
21411 the pending_inlines code.
21412 * pt.c: Remove dead functions and unused arguments.
21413 (uses_template_parms): TYPENAME_TYPEs always use template parms.
21414 * parse.y: Stop passing anything to end_template_decl.
21415 * tree.c (print_lang_statistics): Only print tinst info #ifdef
21416 GATHER_STATISTICS.
21417
21418 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21419
21420 * init.c (expand_recursive_init{,_1}): Delete decls.
21421 (sort_member_init): Delete unused var INIT.
21422 (emit_base_init): Delete unused var X.
21423 (build_offset_ref): Delete unused var CNAME.
21424 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21425 (emit_base_init): Delete unused local var BASE. Delete extern
21426 decl of IN_CHARGE_IDENTIFIER.
21427 (build_delete): Delete unused local var VIRTUAL_SIZE.
21428
21429 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21430 (build_delete): Fix call.
21431 * decl2.c (delete_sanity): Likewise.
21432 * cp-tree.h (build_vec_delete): Update prototype.
21433
21434 * typeck.c (common_base_type): Delete unused var TMP.
21435 (build_binary_op): Delete local var ARGS_SAVE.
21436 (build_array_ref): Delete unused var ITYPE.
21437 (c_expand_return): Delete unused var USE_TEMP.
21438
21439 * typeck.c (compexcepttypes): Delete unused arg STRICT.
21440 (comptypes): Fix calls.
21441 * decl.c (duplicate_decls): Likewise.
21442 * cp-tree.h (compexcepttypes): Delete extra arg.
21443
21444 * decl2.c (check_classfn): Delete unused second arg CNAME.
21445 * decl.c (start_decl, grokfndecl): Fix calls.
21446 * init.c (do_friend): Likewise.
21447 * cp-tree.h (check_classfn): Update prototype.
21448
21449 * cp-tree.h (signature_error, import_export_vtable,
21450 append_signature_fields, id_in_current_class, mark_used,
21451 copy_assignment_arg_p): Add decls.
21452 * decl2.c (mark_used): Delete decl.
21453
21454 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21455
21456 * class.c (get_vtable_entry): Disable unused function.
21457 (doing_hard_virtuals): Delete unused static global var.
21458 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21459 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21460 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21461 (modify_one_vtable): Delete unused var OLD_RTTI.
21462 (finish_struct_anon): Delete unused vars OFFSET and X.
21463 (finish_struct_bits): Delete unused var METHOD_VEC.
21464 (get_basefndecls): Delete unused var PURPOSE. Delete unused
21465 for-scope local variable METHODS.
21466
21467 * call.c (user_harshness): Delete unused/unneeded arg PARM.
21468 (ideal_candidate): Delete unused args BASETYPE and PARMS.
21469 (build_method_call): Delete unused args passed into ideal_candidate.
21470 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
21471 * cp-tree.h (synthesize_method): Add decl.
21472
21473 * decl.c (note_level_for_for): Give void return type.
21474 (pushdecl_nonclass_level): Likewise.
21475 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21476 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21477 (suspend_binding_level): Delete unused var LEVEL.
21478 (duplicate_decls): Delete unused var CTYPE.
21479 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21480 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21481 PTR_ENDLINK.
21482 (grokdeclarator): Delete unused var C.
21483 (grokdeclarator): Delete unused var SIZE_VARIES.
21484 (grokparms): Delete unused var SAW_VOID.
21485 (start_function): Delete unused var OLDDECL.
21486 (cplus_expand_expr_stmt): Delete unused var
21487 REMOVE_IMPLICIT_IMMEDIATELY.
21488
21489 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21490
21491 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21492
21493 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21494
21495 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21496 (build_min_nt): Likewise.
21497 * pt.c (do_pushlevel): Emit line note.
21498 (do_poplevel): Return what we get from poplevel.
21499 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21500 * parse.y: Use do_pushlevel and do_poplevel.
21501 * cp-tree.h: Declare do_poplevel.
21502
21503 * cp-tree.h: Declare at_eof.
21504 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21505 * decl2.c (import_export_decl): Renamed from import_export_inline.
21506 (finish_file): Call it to do interface handling for statics.
21507 * pt.c (tsubst_copy): Call mark_used on variables and functions
21508 used here.
21509
21510 * decl2.c (finish_file): Don't emit statics we can't generate.
21511 * pt.c (instantiate_decl): Don't set interface on instantiations
21512 we can't generate.
21513
21514 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21515 * tree.c (print_lang_statistics): Print max template depth.
21516 * pt.c (push_tinst_level): Dump entire instantiation context.
21517 (instantiate_class_template): Use it and pop_tinst_level.
21518 (instantiate_decl): Likewise.
21519
21520 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21521 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21522
21523 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21524
21525 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21526 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21527 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21528 the new template implementation.
21529
21530 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21531
21532 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21533
21534 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
21535
21536 * decl.c (cp_finish_decl): Delay emitting the debug information for
21537 a typedef that has been installed as the canonical typedef, if the
21538 type has not yet been defined.
21539
21540 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21541
21542 * decl2.c (grokfield): Still call pop_nested_class for access decls.
21543
21544 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21545
21546 * decl.c (lookup_label): Call label_rtx.
21547
21548 * decl.c (make_binding_level): New function.
21549 (pushlevel, pushlevel_class): Call it instead of explicit
21550 duplicate calls to xmalloc.
21551
21552 * decl.c (init_decl_processing): Delete useless build_pointer_type
21553 call.
21554
21555 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21556 (sizet_ftype_string): Delete variable.
21557 (init_decl_processing): Add built-in functions fabsf, fabsl,
21558 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
21559 variable strlen_ftype, used for strlen.
21560
21561 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21562
21563 * decl.c (push_to_top_level): Start from current_binding_level
21564 again for now; the stl hacks depend on g++ being broken in this
21565 way, and it'll be fixed in the template rewrite.
21566
21567 * tree.def: Add USING_DECL.
21568 * decl2.c (do_class_using_decl): Implement.
21569 (grokfield): Pass access decls off to do_class_using_decl instead of
21570 grokdeclarator.
21571 * error.c (dump_decl): Handle USING_DECLs.
21572 * decl.c (grokdeclarator): Remove code for handling access decls.
21573 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21574 as access decls for now.
21575 (finish_struct): Don't check USING_DECLs for other uses of the name.
21576
21577 * search.c (get_matching_virtual): Use cp_error_at.
21578
21579 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21580
21581 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21582 match c-typeck.c.
21583 (self_promoting_args_p): Move the check that TYPE is non-nil
21584 before trying to look at its main variant.
21585 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21586
21587 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21588 Delete macros.
21589 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21590 (do_friend): Delete call to xref_friend.
21591 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21592
21593 * typeck.c (convert_sequence): #if 0 unused function.
21594
21595 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21596 be in decl_in_memory_p.
21597 (decl_in_memory_p): Delete decl.
21598 * expr.c (decl_in_memory_p): Delete fn.
21599 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21600
21601 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21602
21603 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21604
21605 * class.c (finish_struct_1): Check for a pure-specifier on a
21606 non-virtual function here.
21607
21608 * decl2.c (grok_function_init): Don't check whether the function
21609 is virtual here.
21610 (grokfield): Don't call check_for_override here.
21611
21612 * decl.c (push_to_top_level): Start from inner_binding_level,
21613 check class_shadowed in class levels.
21614
21615 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
21616
21617 * decl.c (resume_level): Ignore things that don't have names, instead
21618 of core dumping.
21619
21620 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21621
21622 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21623
21624 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21625
21626 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21627 synthesized dtor.
21628
21629 * parse.y (complete_type_name): Bind global_scope earlier.
21630 (complex_type_name): Likewise.
21631 (qualified_type_name): Remove.
21632
21633 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21634
21635 * decl.c (grokfndecl): Move code that looks for virtuals in base
21636 classes...
21637 * class.c (check_for_override): ... to a new function.
21638 (finish_struct_1): Call it.
21639
21640 * cp-tree.h: Declare warn_sign_compare.
21641
21642 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21643 rather than extra_warnings to decide whether to warn about
21644 comparison of signed and unsigned.
21645
21646 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
21647 implies -Wsign-compare. -Wall doesn't imply -W.
21648
21649 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
21650
21651 * typeck.c (build_component_ref): Fix to handle anon unions in base
21652 classes as well.
21653
21654 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21655
21656 * class.c (resolves_to_fixed_type_p): Delete code dealing with
21657 a WITH_CLEANUP_EXPR, since we don't generate them any more.
21658 * cvt.c (build_up_reference): Likewise.
21659 * decl.c (grok_reference_init): Likewise.
21660 (cp_finish_decl): Likewise.
21661 * error.c (dump_expr): Likewise.
21662 * tree.c (real_lvalue_p): Likewise.
21663 (lvalue_p): Likewise.
21664 (build_cplus_new): Likewise.
21665 (unsave_expr_now): Likewise.
21666 * typeck.c (unary_complex_lvalue, build_modify_expr,
21667 c_expand_return): Likewise.
21668
21669 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21670
21671 Make the C++ front-end pay attention to attributes for structures.
21672 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21673 finish_struct_1.
21674 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21675 Take out old round_up_size use and setting the DECL_ALIGN possibly
21676 using it. Take out setting of TYPE_ALIGN to round_up_size, which
21677 can override what the attribute set.
21678 * cp-tree.h (finish_struct): Update prototype.
21679 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21680 attributes to finish_struct.
21681 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21682 value down into finish_struct.
21683 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21684
21685 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
21686
21687 * decl.c (poplevel): Re-word dead for local handling.
21688 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
21689 (cp_finish_decl): If is_for_scope, check for duplicates so
21690 we can disable is_for_scope. Otherwise, preserve_temp_slots.
21691
21692 * lex.c (do_identifier): Use global binding in preference of
21693 dead for local variable.
21694
21695 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
21696
21697 * init.c (initializing_context): Handle anon union changes, the
21698 context where fields of anon unions can be initialized now has to be
21699 found by walking up the TYPE_CONTEXT chain.
21700
21701 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
21702
21703 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21704 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21705 (obscure_complex_init): If bss is supported, always set
21706 DECL_INITIAL to error_mark_node.
21707
21708 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21709
21710 * init.c (is_friend): Make sure there's a context before we see if
21711 it's an aggr type.
21712
21713 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
21714
21715 * init.c (is_friend): Classes are not friendly with nested classes.
21716
21717 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
21718
21719 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21720 and record its result.
21721
21722 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
21723
21724 * class.c (finish_struct_anon): Switch around code to not move anon
21725 union elements around, nor mess up their contexts, nor offsets,
21726 instead we now build up the right number of COMPONENT_REFs for all
21727 the anon unions that may be present at build_component_ref time.
21728 * typeck.c (lookup_anon_field): New routine to handle field lookup
21729 on fields without names. We find them, based upon their unique type
21730 instead.
21731 * typeck.c (build_component_ref): Allow FIELD_DECL components.
21732 Handle finding components in anonymous unions, and ensure that a
21733 COMPONENT_REF is built for each level as necessary.
21734
21735 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
21736
21737 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21738 code that ensures that copy ctors are used if appropriate.
21739
21740 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21741
21742 * init.c (build_vec_delete): Only give an error if base isn't an
21743 error_mark_node.
21744
21745 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
21746
21747 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21748 (yylex): If we see `new', keep slurping.
21749
21750 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
21751
21752 * class.c (finish_struct_1): Move code for handling anon unions...
21753 (finish_struct_anon): to here. Fixup so that we do the offset
21754 calculations right, and so that the fields are physically moved to
21755 the containers's chain.
21756
21757 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21758
21759 * decl.c (grokdeclarator): Avoid trying to get an operand off an
21760 identifier node.
21761
21762 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
21763
21764 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21765 POINTER_SIZE to agree with expr.c.
21766
21767 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
21768
21769 * search.c (lookup_field): Don't report ambiguities if protect is 0,
21770 instead return NULL_TREE.
21771
21772 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
21773
21774 * class.c (finish_struct_1): Call warn_hidden if we want warnings
21775 about overloaded virtual functions.
21776 (warn_hidden): New routine to warn of virtual functions that are
21777 hidden by other virtual functions, that are not overridden.
21778 (get_basefndecls): New routine, used by warn_hidden.
21779 (mark_overriders): New routine, used by warn_hidden.
21780 * search.c (get_matching_virtual): Remove old warning that just
21781 isn't very useful.
21782
21783 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21784
21785 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21786
21787 * typeck.c (null_ptr_cst_p): Delete unused fn.
21788 (build_function_call_maybe): Delete unused fn.
21789
21790 * expr.c (extract_init): #if 0 the code after unconditional return 0
21791 for now.
21792
21793 Delete old cadillac code.
21794 * edsel.c: Remove file.
21795 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21796 * Makefile.in (CXX_OBJS): Delete edsel.o.
21797 (edsel.o): Delete rule.
21798 * cp-tree.h (flag_cadillac): Delete var decl.
21799 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21800 * decl2.c (flag_cadillac): Delete var definition.
21801 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21802 (grokfield): Delete code depending on flag_cadillac.
21803 (finish_anon_union): Likewise.
21804 * class.c (finish_struct_1): Likewise.
21805 (pushclass): Likewise.
21806 (popclass): Likewise.
21807 (push_lang_context): Likewise.
21808 (pop_lang_context): Likewise.
21809 * decl.c (init_decl_processing): Likewise.
21810 (start_decl): Likewise.
21811 (cp_finish_decl): Likewise.
21812 (xref_tag): Likewise.
21813 (finish_enum): Likewise.
21814 (start_function): Likewise.
21815 (finish_function): Likewise.
21816 (finish_stmt): Likewise.
21817 * lex.c (lang_init): Likewise.
21818 (check_newline): Likewise.
21819
21820 * lex.c (do_pending_inlines): Delete synthesized method kludge.
21821
21822 Delete defunct, ancient garbage collection implementation.
21823 * rtti.c: New file with the RTTI stuff from gc.c.
21824 * gc.c: Removed file (moved the remaining stuff into rtti.c).
21825 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21826 (rtti.o): New rule, replacing gc.o.
21827 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21828 * cp-tree.h: Delete gc-related fn decls.
21829 (DECL_GC_OFFSET): Delete macro.
21830 (flag_gc): Delete extern decl.
21831 * decl.c (current_function_obstack_index): Delete var decl.
21832 (current_function_obstack_usage): Delete var decl.
21833 (start_function): Delete clearing of current_function_obstack_index
21834 and current_function_obstack_usage.
21835 (init_decl_processing): Delete code relying on -fgc.
21836 Delete call to init_gc_processing.
21837 (cp_finish_decl): Delete calls to build_static_gc_entry and
21838 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
21839 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21840 and to expand_expr of a __gc_main call.
21841 (maybe_gc_cleanup): Delete var decl.
21842 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21843 * decl2.c (flag_gc): Delete var decl.
21844 (lang_f_options): Delete offering of -fgc.
21845 (lang_decode_option): Delete -fgc and -fno-gc handling.
21846 (get_temp_regvar): Delete gc code.
21847 * init.c (build_new): Delete gc code.
21848 * lex.c (init_lex): Delete checking of flag_gc.
21849
21850 * typeck.c (convert_arguments): Delete gc code.
21851 (build_component_addr): Delete -fgc warning.
21852 (build_modify_expr): Delete gc code.
21853
21854 * decl2.c (build_push_scope): Delete fn.
21855 * cp-tree.h (build_push_scope): Delete decl.
21856
21857 * search.c (clear_search_slots): Delete fn.
21858 * cp-tree.h (clear_search_slots): Delete decl.
21859
21860 * search.c (tree_needs_constructor_p): Delete fn.
21861 * cp-tree.h (tree_needs_constructor_p): Delete decl.
21862
21863 * tree.c (id_cmp): Delete fn.
21864
21865 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21866 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21867
21868 * tree.c (decl_value_member): Delete fn.
21869 * cp-tree.h (decl_value_member): Delete decl.
21870
21871 * tree.c (list_hash_lookup_or_cons): Delete fn.
21872 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21873
21874 * method.c (cplus_exception_name): Delete fn.
21875 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21876
21877 * spew.c (shift_tokens): Delete fn.
21878
21879 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21880
21881 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21882 to cp_finish_decl.
21883 * parse.y: Likewise.
21884
21885 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21886
21887 * tree.c (build_cplus_staticfn_type): Delete function definition;
21888 never used.
21889 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
21890
21891 * tree.c (virtual_member): Delete function definition; never used.
21892 * cp-tree.h (virtual_member): Delete decl.
21893
21894 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
21895
21896 * typeck.c (build_component_ref): Handle getting vbase pointers
21897 out of complex multiple inheritance better.
21898
21899 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
21900
21901 * typeck.c (build_object_ref): Make sure we use the real type, not
21902 any reference type.
21903
21904 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
21905
21906 * tree.c (build_exception_variant): Don't create new types if we
21907 don't have to, also build new types on the right obstack.
21908
21909 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21910
21911 * decl.c (store_bindings): Split out from push_to_top_level.
21912 (push_to_top_level): Call it for b->type_shadowed on class binding
21913 levels.
21914
21915 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
21916
21917 * search.c (expand_upcast_fixups): Fix so that offsets stored in
21918 vbase_offsets are always right. Fixes a problem where virtual base
21919 upcasting and downcasting could be wrong during conversions on this
21920 during virtual function dispatch at ctor/dtor time when dynamic
21921 vtable fixups for deltas are needed. This only sounds easier than
21922 it is. :-)
21923 (fixup_virtual_upcast_offsets): Change to reflect new calling
21924 convention for expand_upcast_fixups.
21925
21926 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21927
21928 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
21929 check that it's usable as the bitfield width.
21930
21931 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21932
21933 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
21934 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
21935 only ever used for functions in it.
21936
21937 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21938
21939 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
21940 (nested_type): Likewise.
21941 (nested_name_specifier): Use lastiddecl.
21942
21943 * decl.c (grokdeclarator): Adjust accordingly.
21944 * init.c (expand_member_init): Likewise.
21945 * parse.y (base_class): Likewise.
21946 * typeck2.c (build_functional_cast): Likewise.
21947
21948 * typeck2.c (build_functional_cast): Fill in name after we've
21949 checked for non-aggr type.
21950
21951 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
21952
21953 * decl2.c (warn_pointer_arith): Default to on.
21954
21955 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21956
21957 * lex.c (is_rid): New function.
21958 * decl.c (grokdeclarator): Diagnose reserved words used as
21959 declarator-ids.
21960
21961 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
21962
21963 * tree.c (get_decl_list): Don't lose cv-quals.
21964
21965 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
21966 typespecs used as declarator-ids.
21967
21968 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
21969
21970 * decl.c (poplevel): When poping a level, don't give a warning for
21971 any subblocks that already exist.
21972
21973 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21974
21975 * typeck.c (build_object_ref): Finish what I started.
21976
21977 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
21978
21979 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
21980
21981 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
21982 scope.
21983
21984 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21985
21986 * decl.c (xref_tag): Handle passing a type in directly.
21987
21988 * parse.y (qualified_type_name): Pull out the type.
21989 (nested_type): Likewise.
21990 Take types directly instead of as identifiers.
21991 * call.c (build_scoped_method_call): Take types directly instead of
21992 as identifiers.
21993 * decl.c (xref_basetypes): Likewise.
21994 * init.c (expand_member_init): Likewise.
21995 (build_member_call): Likewise.
21996 (build_offset_ref): Likewise.
21997 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
21998 * method.c (do_build_assign_ref): Likewise.
21999 * decl.c (grokdeclarator): Handle a type appearing as the
22000 declarator-id for constructors.
22001 * method.c (do_build_copy_constructor): current_base_init_list now
22002 uses the types directly, not their names.
22003 * init.c (sort_base_init): Likewise.
22004 (expand_member_init): Likewise.
22005 * init.c (is_aggr_type): New function, like is_aggr_typedef.
22006
22007 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
22008
22009 * tree.c (layout_basetypes): Call build_lang_field_decl instead
22010 of build_lang_decl if first arg is a FIELD_DECL.
22011
22012 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22013
22014 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
22015 non-empty.
22016 * except.c (expand_start_catch_block): Set TREE_USED to avoid
22017 warnings about the catch handler.
22018
22019 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
22020
22021 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
22022 expand_target_expr.
22023
22024 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22025
22026 Fix access control to use trees rather than integers.
22027 * class.c (access_{default, public, protected, private,
22028 default_virtual, public_virtual, private_virtual}_node): Add
22029 definitions.
22030 (init_class_processing): Do creation of those nodes.
22031 * cp-tree.h (access_type): Delete enum decl.
22032 (access_{default, public, protected, private, default_virtual,
22033 public_virtual, private_virtual}_node): Add decls.
22034 (compute_access): Change return type.
22035 * search.c (compute_access): Have tree return type, instead of enum.
22036 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
22037 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
22038 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
22039 * parse.y (VISSPEC): Make ttype rather than itype.
22040 (base_class_access_list): Likewise.
22041 * *.[cy]: Change all refs of `access_public' to `access_public_node',
22042 etc.
22043 * call.c (build_method_call): Make ACCESS be a tree.
22044 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
22045 * cvt.c (convert_to_aggr): Likewise.
22046 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
22047 Likewise.
22048 * method.c (hack_identifier): Likewise.
22049 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
22050
22051 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
22052
22053 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
22054 frontend, and make it more consistent with respect to
22055 warn_pointer_arith.
22056
22057 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22058
22059 * decl.c (pushdecl): Check for duplicate parameter names.
22060
22061 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
22062
22063 * decl.c (expand_static_init): Call assemble_external for atexit.
22064
22065 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
22066
22067 * except.c (do_unwind): Remove some generated dead code.
22068 (eh_outer_context): New routine, factor out some common code from
22069 expand_builtin_throw and end_eh_unwinder. Add code to do return
22070 address masking for the PA.
22071 (expand_builtin_throw): Use eh_outer_context instead of open coding
22072 it here.
22073 (end_eh_unwinder): Likewise.
22074
22075 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
22076
22077 * except.c (expand_throw): Call assemble_external for __empty, if we
22078 use it.
22079
22080 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
22081
22082 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
22083 NORMAL_RETURN_ADDR_OFFSET.
22084 (end_eh_unwinder): Likewise.
22085
22086 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
22087
22088 * gc.c (build_dynamic_cast): Make sure we don't cast away const
22089 when dealing with references, and make sure we handle dynamic
22090 casting to a cv qualified reference.
22091
22092 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
22093
22094 * except.c (struct eh_context): New structure top hold eh context
22095 information.
22096 (push_eh_context): New routine.
22097 (pop_eh_context): Likewise.
22098 * decl.c (push_cp_function_context): Use them.
22099 (pop_cp_function_context): Likewise.
22100
22101 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
22102
22103 * decl2.c (finish_file): Also prune uninteresting functions in the
22104 inline emission loop.
22105
22106 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
22107
22108 * sig.c (build_signature_table_constructor): Mark functions
22109 in the signature as referenced.
22110
22111 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
22112
22113 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22114 the inline emission stuff.
22115
22116 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
22117
22118 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22119 weak symbols.
22120 * lang-options.h: Add -f{no-,}weak.
22121 * decl.c (init_decl_processing): If the target does not support weak
22122 symbols, don't use them.
22123 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22124
22125 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22126
22127 * init.c (expand_member_init): warning for base init after members.
22128
22129 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
22130
22131 * cvt.c (build_expr_type_conversion): Don't convert to a reference
22132 type.
22133
22134 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
22135
22136 * method.c (report_type_mismatch): Improve wording for volatile
22137 mismatches.
22138
22139 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
22140
22141 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22142 expand_assignment, as the later doesn't handle things that have
22143 copy constructors well. The compiler would do bitwise copying,
22144 instead of ctor calling in some cases.
22145
22146 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
22147
22148 * g++.c (my_strerror): Return "cannot access" if errno is 0.
22149 (pfatal_with_name, perror_exec): Don't assume that
22150 the returned value from my_strerror contains no '%'s.
22151 (concat): Remove.
22152 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22153
22154 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
22155
22156 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22157 TYPE_METHODS/TREE_CHAIN mean what they used to.
22158 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22159 instead of TYPE_METHODS.
22160 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22161 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22162 * cp-tree.h (CLASSTYPE_METHODS): Lose.
22163 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22164 TYPE_METHODS.
22165 (struct lang_decl): Lose next_method field.
22166 (DECL_NEXT_METHOD): Lose.
22167 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22168 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22169 anymore.
22170 (finish_struct_methods): Don't mess with the TREE_CHAINs in
22171 fn_fields.
22172
22173 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22174 vector.
22175
22176 * call.c (build_method_call): Synthesize here even when not inlining.
22177 * typeck.c (build_function_call_real): Likewise.
22178
22179 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
22180
22181 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22182 == DBX_DEBUG, call dbxout_start_new_source_file and
22183 dbxout_resume_previous_source_file when appropriate.
22184
22185 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
22186
22187 * except.c (start_anon_func): Push to the top level.
22188 (end_anon_func): Pop from the top level.
22189
22190 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
22191
22192 * cp-tree.h (build_cleanup): New routine to build cleanups.
22193 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22194 call at ctor time and use atexit to run it later.
22195 * decl2.c (build_cleanup): New routine, taken from finish_file.
22196 (finish_file): Use build_cleanup instead, and don't put function
22197 local statics in global dtor list.
22198
22199 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
22200
22201 * except.c (expand_throw): Ensure that we have cleanups, if we try
22202 and expand cleanups.
22203
22204 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
22205
22206 * except.c (expand_throw): Add logic to manage dynamic cleanups for
22207 the EH object.
22208 (expand_end_catch_block): Use the magic of expand_goto, instead of
22209 emit_jump so that we get the cleanup for any catch clause parameter
22210 and the cleanup for the exception object. Update to reflect label
22211 changes.
22212 (push_eh_cleanup): New routine to register a cleanup for an
22213 exception object.
22214 (empty_fndecl): Used to default cleanup actions to
22215 nothing.
22216 (init_exception_processing): Setup empty_fndecl. Setup
22217 saved_cleanup.
22218 (expand_start_catch_block): Update to reflect label changes. Call
22219 push_eh_object to register the cleanup for the EH object.
22220 (start_anon_func): New routine to start building lambda expressions
22221 from trees.
22222 (end_anon_func): New routine to end them.
22223 (struct labelNode): Change so that we can use tree labels, or rtx
22224 labels.
22225 (saved_cleanup): Object to check for dynamic cleanups for the
22226 exception handling object.
22227 (push_label_entry): Change so that we can use tree labels, or rtx
22228 labels.
22229 (pop_label_entry): Likewise.
22230 (top_label_entry): Likewise.
22231 (expand_start_all_catch): Use tree label instead of rtx label, so
22232 that we can get the magic of expand_goto.
22233 (expand_end_all_catch): Update to reflect label changes.
22234
22235 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22236 use UNSAVE_EXPRs.
22237 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22238 building_cleanup logic, as we now use UNSAVE_EXPRs.
22239 * cp-tree.h (unsave_expr): Declare it.
22240 * decl.c (building_cleanup): Remove.
22241 (maybe_build_cleanup): Remove building_cleanup logic, and use
22242 UNSAVE_EXPR instead.
22243
22244 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
22245
22246 * gc.c (build_t_desc): Update error message to say <typeinfo>.
22247
22248 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22249
22250 * decl.c (pushdecl): Only warn about shadowing a local variable if
22251 warn_shadow is true.
22252
22253 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
22254
22255 * typeck.c (build_binary_op_nodefault): Added warning about
22256 comparisons between different enum types with -Wall, unless
22257 -fenum-int-equiv set.
22258
22259 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
22260
22261 * class.c (finish_struct_1): Skip down to the inner type in
22262 multidimensional arrays. Ensures ctors will be made for types that
22263 need constructing.
22264
22265 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
22266
22267 * decl.c (last_dtor_insn): New to track the last compiler generated
22268 insn in a dtor.
22269 (store_parm_decls): Set it.
22270 (finish_function): Use it to see if the dtor is empty. Avoid doing
22271 vtable setup all the time, if we can.
22272 (struct cp_function): Add last_dtor_insn.
22273 (push_cp_function_context): Save it.
22274 (pop_cp_function_context): Restore it.
22275
22276 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
22277
22278 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22279 warnings.
22280
22281 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
22282
22283 * typeck.c (expand_target_expr): Make sure targets get put into the
22284 current temp_slot_level, so that the free_temp_slots call will reuse
22285 them.
22286
22287 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
22288
22289 * class.c (finish_struct_1): Delay delta fixups for virtual bases
22290 until after we have done the hard virtuals, to avoid a bogus `every
22291 virtual function must have a unique final overrider' for virtual
22292 functions that are only overridden by hard virtuals.
22293
22294 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22295
22296 * pt.c (do_function_instantiation): Don't try to find a file-scope
22297 template for a member function.
22298
22299 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
22300
22301 * g++.c (main): Add handling of -nodefaultlibs.
22302
22303 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
22304
22305 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22306 distinguish between direct bindings of reference variables, and
22307 indirect bindings of reference variables.
22308 * cvt.c (build_up_reference): Use it.
22309 * typeck.c (convert_arguments): Use it to indicate this is an
22310 indirect binding.
22311 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22312 as they are unused.
22313 (expand_static_init): Likewise.
22314 (cplus_expand_expr_stmt): Likewise.
22315 * decl2.c (finish_file): Likewise.
22316 * init.c (perform_member_init): Likewise.
22317 (emit_base_init): Likewise.
22318 (expand_aggr_vbase_init_1): Likewise.
22319
22320 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22321
22322 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22323 get a DECL_LANG_SPECIFIC node.
22324 * cp-tree.h (lang_decl_flags): Add new member `level'.
22325 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22326 decl_flags level member.
22327
22328 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22329
22330 * call.c (build_method_call): Make sure instance has a
22331 TYPE_LANG_SPECIFIC node before we dive into it.
22332
22333 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
22334
22335 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22336
22337 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
22338
22339 * decl.c (duplicate_decls): When smashing decls, smash staticness in
22340 the usual way.
22341
22342 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
22343
22344 * decl.c (poplevel): Handle the merging of subblocks of cleanups
22345 when finishing blocks that have already been created (usually due to
22346 the fixup goto code). Fixes bad debugging information.
22347
22348 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
22349
22350 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22351 that's not a list of overloaded functions.
22352
22353 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22354
22355 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22356 before trying to use DECL_ABSTRACT_VIRTUAL_P.
22357
22358 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
22359
22360 * decl2.c (mark_used): New function for hooking into setting of
22361 TREE_USED on decls.
22362 * call.c (build_method_call): Use it.
22363 * class.c (instantiate_type): Likewise.
22364 * init.c (build_offset_ref): Likewise. Don't call assemble_external
22365 for all like-named functions.
22366 * method.c (hack_identifier): Likewise.
22367 (emit_thunk): Don't call assemble_external.
22368 (make_thunk): Create thunk as a FUNCTION_DECL so that it
22369 gets the right mode and ENCODE_SECTION_INFO works.
22370
22371 * parse.y: Use mark_used. Pass operator names to do_identifier.
22372 * lex.c (do_identifier): Handle operator names.
22373
22374 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22375
22376 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22377
22378 * errfn.c: Include stdio.h.
22379 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22380
22381 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
22382
22383 * typeck2.c (digest_init): Always convert initializers to the
22384 right type.
22385
22386 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
22387
22388 * init.c (member_init_ok_or_else): Don't allow member initializers
22389 for indirect members, as it is invalid.
22390
22391 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22392
22393 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22394
22395 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
22396
22397 * parse.y (for.init.statement): Catch compound statements inside for
22398 initializations, if we're being pedantic.
22399
22400 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
22401
22402 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22403 looking for.
22404
22405 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
22406
22407 * error.c (dump_expr): Don't core dump when a boolean expression is
22408 used as a default argument.
22409
22410 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22411
22412 * class.c (finish_struct_bits): Check aggregate_value_p instead of
22413 RETURN_IN_MEMORY.
22414
22415 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
22416
22417 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22418 BLKmode type that would otherwise be returned in registers.
22419
22420 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22421
22422 * g++.c (WITHLIBC): New macro.
22423 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
22424 saw_libc and pass it at the end if it was set.
22425
22426 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22427
22428 * parse.y (fn.def1): Call split_specs_attrs in
22429 declmods notype_declarator case.
This page took 1.027117 seconds and 5 git commands to generate.