1 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
3 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4 pseudo_type_info creation into the std namespace
6 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
9 (import_export_class): Remove declaration.
10 * decl2.c (import_export_class): Make it static.
11 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
12 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
13 EXPR_WITH_FILE_LOCATION.
14 * lex.c (check_newline): Tweak filename/lineno setting.
15 * semantics.c (begin_while_stmt): Fix typo in comment.
17 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19 * lang-options.h (-fmessage-length=): Add missing option.
21 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
23 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
25 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
27 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
29 * optimize.c (expand_call_inline): Emit the return label before
30 evaluating the return value.
32 2000-02-24 Mark Mitchell <mark@codesourcery.com>
34 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
35 than duplicating functionality here.
36 * optimize.c: Include input.h.
37 (expand_call_inline): Use push_srcloc and pop_srcloc.
38 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
39 * parse.c: Regenerated.
40 * Makefile.in (lex.o): Depend on input.h.
41 (optimize.o): Likewise.
43 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
45 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
46 function type, rather than ICE.
48 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
50 * decl.c (grokdeclarator): Call decl_type_access_control.
51 * parse.y (parse_end_decl): Don't call decl_type_access_control if
54 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
56 * decl.c (decls_match): Remove obsolete static member nadgering.
58 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
60 * decl.c (grokdeclarator): Change ANSI to ISO.
61 * lex.c (consume_string, readescape, do_identifier): Likewise.
62 (parse_float, real_yylex): Likewise.
63 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
64 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
65 new_type_id, maybe_label_decls, simple_stmt,
66 for.init.statement): Likewise.
67 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
68 * semantics.c (finish_named_return_value): Likewise.
69 * parse.c: Regenerate.
71 2000-02-21 Mark Mitchell <mark@codesourcery.com>
73 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
74 (CPTI_CLASS_STAR_TYPE): Remove.
75 (vtable_index_type): Likewise.
76 (class_star_type_node): Remove.
77 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
78 (build_binary_op_nodefault): Remove.
79 * call.c (build_new_op): Use build_binary_op instead of
80 build_binary_op_nodefault.
81 * decl.c (init_decl_processing): Remove class_star_type_node
82 initialization. Make delta_type_node ptrdiff_type_node under the
83 new ABI. Initialize vtable_index_type.
84 (build_ptrmemfunc_type): Build different structures for the new
86 (build_enumerator): Use build_binary_op instead of
87 build_binary_op_nodefault.
88 * method.c (build_overload_value): Mangle pointers-to-members
89 appropriately under the new ABI.
90 * typeck.c (build_array_ref): Use build_binary_op instead of
91 build_binary_op_nodefault.
92 (get_member_function_from_ptrfunc): Adjust for the new ABI.
93 (build_binary_op_nodefault): Rename to ...
94 (build_binary_op): ... this. Remove old version. Adjust for
95 pointer-to-member comparisons under the new ABI.
96 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
97 (build_ptrmemfunc): Adjust for the new ABI.
98 (expand_ptrmemfunc_cst): Likewise.
99 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
100 (pfn_from_ptrmemfunc): Adjust for the new ABI.
102 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
104 * call.c (build_object_call): Compress consecutive calls to
106 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
107 (build_op_delete_call): Adjust message formatting.
109 * class.c (check_bases): Compress consecutive calls to
111 (finish_struct_anon): Say 'ISO C++'.
113 * decl.c (start_decl): Same here.
114 (grok_reference_init): Likewise.
115 (grokfndecl): Correct message formatting.
116 (grokfndecl): Improve diagnostic.
117 (check_static_variable_definition): Likewise. Say 'ISO C++'
118 (compute_array_index_type): Say 'ISO C++'
119 (create_array_type_for_decl): Compress consecutive calls to
121 (grokdeclarator): Say 'ISO C++'
122 (grok_op_properties): Likewise.
124 * decl2.c (delete_sanity): Clairify diagnostic.
125 (check_member_template): Same here.
126 (grok_function_init): Use consistent terminology.
128 * expr.c (do_case): Say 'ISO C++'
130 * friend.c (do_friend): Compress consecutive calls to warning.
132 2000-02-20 Mark Mitchell <mark@codesourcery.com>
134 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
135 * class.c (build_secondary_vtable): Reorganize. Don't create a
136 new vtable under the new ABI.
137 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
139 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
140 the initializing elements.
141 (initialize_vtable): New function.
142 (dfs_finish_vtbls): Use it.
143 (dfs_accumulate_vtbl_inits): New function.
144 (finish_vtbls): Merge primary and secondary vtables under the new
146 (finish_struct_1): Remove redundant call to layout_vtable_decl.
147 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
150 * class.c (build_vtable): New function, split out from ...
151 (get_vtable_decl): ... here, and ...
152 (build_secondary_vtable): ... here.
154 * pt.c (tsubst_decl): Fix formatting.
156 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
158 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
159 (avoid_overlap, build_base_field): Likewise.
160 (build_base_field, build_base_fields, is_empty_class):
161 Test DECL_SIZE with integer_zero.
162 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
163 * cp-tree.h (struct lang_type): New field size_unit.
164 (CLASSTYPE_SIZE_UNIT): New macro.
165 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
166 (cp_finish_decl): Delete -Wlarger-than processing.
167 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
168 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
169 * tree.c (make_binfo): binfo vector is one entry longer.
170 (walk_tree): Walk DECL_SIZE_UNIT.
172 2000-02-19 Mark Mitchell <mark@codesourcery.com>
174 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
176 (build_vtable_entry): Don't assume all vtable entries are
178 (build_vtbl_initializer): Adjust accordingly.
179 (get_vtable_decl): Fix formatting.
181 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
183 * semantics.c (deferred_type_access_control): Walk the entire
185 (save_type_access_control): Rename from
186 initial_deferred_type_access_control. Just remember the value.
187 (decl_type_access_control): New fn.
188 (begin_function_definition): Use deferred_type_access_control, after
189 we've started the function. Set type_lookups to error_mark_node.
190 * parse.y (frob_specs, fn.def1): Adjust.
191 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
192 (parse_end_decl, parse_bitfield0, parse_method): New fns.
193 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
194 (after_type_component_declarator0): Likewise.
195 (after_type_component_declarator): Likewise.
196 (notype_component_declarator): Likewise.
199 * decl.c (redeclaration_error_message): Allow redeclaration of
200 namespace-scope decls.
202 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
204 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
206 2000-02-17 Mark Mitchell <mark@codesourcery.com>
208 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
209 * decl2.c (grokclassfn): Likewise.
211 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
213 * decl2.c (lang_decode_option): Don't set default message length
215 * lex.c (lang_init_options): Set it here.
217 2000-02-16 Mark Mitchell <mark@codesourcery.com>
219 Make DECL_CONTEXT mean the class in which a member function was
220 declared, even for a virtual function.
221 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
222 (DECL_FRIEND_CONTEXT): New macro.
223 (DECL_REAL_CONTEXT): Remove.
224 (SET_DECL_FRIEND_CONTEXT): Likewise.
225 (DECL_VIRTUAL_CONTEXT): Adjust.
226 (DECL_CLASS_SCOPE_P): Use TYPE_P.
227 (add_friends): Remove.
228 (hack_decl_function_context): Likewise.
229 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
231 (build_over_call): Fix indentation. Use DECL_CONTEXT
232 instead of DECL_CLASS_CONTEXT.
233 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
234 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
235 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
236 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
237 (build_base_field): Likewise.
238 (finish_struct_1): Likewise.
239 (build_self_reference): Likewise.
240 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
242 (pushtag): Use decl_function_context, not
243 hack_decl_function_context.
244 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
245 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
246 (pushdecl): Remove bogus code.
247 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
248 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
249 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
250 Use decl_function_context, nothack_decl_function_context.
251 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
252 (grokdeclarator): Likewise. Use decl_function_context, not
253 hack_decl_function_context.
254 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
255 (start_function): Use DECL_FRIEND_CONTEXT, not
256 DECL_CLASS_CONTEXT. Use decl_function_context, not
257 hack_decl_function_context.
258 (finish_function): Use decl_function_context, not
259 hack_decl_function_context.
260 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
262 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
263 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
264 (grokfield): Likewise.
265 (finish_builtin_type): Likewise.
266 (finish_vtable_vardec): Use decl_function_context, not
267 hack_decl_function_context.
268 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
269 (start_static_initialization_or_destruction): Likewise.
270 (finish_static_initialization_or_destruction): Likewise.
271 (mark_used): Adjust logic for deciding when to synthesize methods.
272 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
274 * error.c (dump_function_decl): Use DECL_CONTEXT, not
276 * friend.c (is_friend): Likewise.
277 (add_friends): Remove.
278 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
279 * lex.c (begin_definition_of_inclass_inline): Use
280 decl_function_context, not hack_decl_function_context.
281 (process_next_inline): Likewise.
282 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
283 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
285 (hack_identifier): Likewise.
286 (synthesize_method): Use decl_function_context, not
287 hack_decl_function_context.
288 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
290 (is_member_template): Use decl_function_context, not
291 hack_decl_function_context. Use DECL_CONTEXT, not
293 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
295 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
297 (push_template_decl_real): Likewise.
298 (instantiate_class_template): Don't call add_friends.
299 (tsubst_default_argument): Use DECL_CONTEXT, not
301 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
302 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
303 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
305 * repo.c (repo_inline_used): Likewise.
306 * search.c (current_scope): Adjust for new _CONTEXT macros.
307 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
309 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
310 (lookup_fnfields_here):Likewise.
311 (check_final_overrider): Likewise.
312 (init_vbase_pointers): Likewise.
313 (virtual_context): Likewise.
314 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
315 (expand_body): Use decl_function_context, not
316 hack_decl_function_context.
317 * tree.c (hack_decl_function_context): Remove.
318 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
320 * typeck2.c (error_not_base_type): Likewise.
322 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
324 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
326 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
328 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
330 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
332 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
334 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
336 * decl2.c (lang_decode_option): Enable automatic line wrapping.
338 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
340 * parse.y (frob_specs): Split out...
341 (parse_decl): From here.
342 (fn.def2): Call initial_deferred_type_access_control.
343 (after_type_component_declarator0): Call frob_specs.
344 (notype_component_declarator0): Likewise.
345 * search.c (friend_accessible_p): Nested classes are friends of their
348 2000-02-10 Mark Mitchell <mark@codesourcery.com>
350 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
351 used to create an implicit temporary.
353 * class.c (dfs_modify_vtables): Tweak calculation of functions to
356 2000-02-08 Nathan Sidwell <nathan@acm.org>
358 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
359 strip array element qualifiers too.
361 2000-02-07 Mark Mitchell <mark@codesourcery.com>
363 * decl.c (store_parm_decls): Don't build cleanups for parameters
364 while processing_template_decl.
366 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
368 * cp-tree.h (struct saved_scope): Add incomplete field.
369 (namespace_scope_incomplete): New macro.
370 * decl.c (pushdecl): Use it.
371 (hack_incomplete_structures): Use it. See through artificial
373 (mark_saved_scope): Mark it.
375 Implement access control for nested types.
376 * search.c (type_access_control): New fn.
377 (accessible_p): Now we do perform access control for types.
378 * semantics.c (deferred_type_access_control): New fn.
379 (initial_deferred_type_access_control): New fn.
380 (begin_function_definition): Call it. Add lookups parm.
381 * decl.c (struct binding_level): Add this_class field.
382 (pushlevel_class): Set it.
383 (mark_binding_level): Mark it.
384 (lookup_name_real): Use it. Call type_access_control.
385 (mark_saved_scope): Mark lookups field.
386 * cp-tree.h (flagged_type_tree): Add lookups field.
387 (struct saved_scope): Add lookups field.
388 (type_lookups): New macro.
389 * parse.y (declmods): Now <ftype>.
390 (parse_decl): Add lookups parm. Call
391 initial_deferred_type_access_control.
392 (lang_extdef): Clear type_lookups.
393 (typed_declspecs, declmods, typespec): Set lookups field.
394 (initdcl): Call deferred_type_access_control.
395 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
396 component_decl_1, named_parm): Adjust.
397 * friend.c (is_friend): Nested classes are friends of their
400 * class.c (currently_open_derived_class): New fn.
401 * method.c (hack_identifier): Use it.
403 * lex.c (do_identifier): Remove obsolete code.
405 * parse.y (typed_typespecs): Propagate new_type_flag properly.
407 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
409 * tinfo.h: Remove apostrophes from C++ comment (xgettext
410 thinks this file is plain C).
412 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
414 * Makefile.in (call.o): Depend on $(EXPR_H).
416 * call.c: Include "expr.h".
418 * class.c (dump_class_hierarchy): Add prototype.
420 * search.c (dfs_get_pure_virtuals): Likewise.
422 2000-02-1 Ulrich Drepper <drepper@redhat.com>
424 * parse.y (simple_stmt): Allow :: token in asm parameter list.
427 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
429 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
430 Store it in DECL_FCONTEXT.
431 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
433 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
435 * tinfo.h (old abi): #include "tconfig.h".
436 * tinfo.cc (convert_to_base): Move into old abi section.
438 2000-01-31 Mark Mitchell <mark@codesourcery.com>
440 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
441 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
442 (BINFO_PRIMARY_BINFO): New macro.
443 (BF_DELTA): Rename to ...
444 (BV_DELTA): ... this.
445 (BF_VCALL_INDEX): Rename to ...
446 (BV_VCALL_INDEX): ... this.
447 (BF_FN): Rename to ...
449 * class.c (build_vbase_path): Adjust for changes to reverse_path.
450 (set_rtti_entry): Rename BF_ macros to BV_ variants.
451 (modify_vtable_entry): Simplify.
452 (add_virtual_function): Rename BF_ macros to BV_ variants.
453 (build_vtable_initializer): Likewise.
454 (get_class_offset_1): Remove.
455 (dfs_get_class_offset): Likewise.
456 (get_class_offset): Likewise.
457 (dfs_find_final_overrider): New function.
458 (find_final_overrider): Likewise.
459 (modify_one_vtable): Remove.
460 (dfs_find_base): New function.
461 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
462 find_final_overrider.
463 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
465 (dfs_fixup_vtable_deltas): Remove.
466 (override_one_vtable): Remove.
467 (merge_overrides): Likewise.
468 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
469 unreal chilren of virtual bases.
470 (finish_struct_1): Don't use merge_overrides. Don't use
471 dfs_fixup_vtable_deltas.
472 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
475 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
476 Jason Merrill <jason@yorick.cygnus.com>
478 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
480 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
482 * exception.cc (__throw_bad_typeid): Add missing std::.
484 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
486 * cp-tree.h (make_thunk): PROTO -> PARAMS.
488 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
490 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
492 Runtime support for new-abi rtti.
493 * inc/typeinfo (type_info::operator!=): Define in class.
494 (type_info::before, type_info::name, type_info::operator==,
495 type_info::operator!=): Define new ABI implementations.
496 (type_info::is_pointer_p, type_info::is_function_p): Declare
497 new virtual functions.
498 (type_info::do_catch, type_info::do_upcast): Likewise.
500 * tinfo.h (__base_class_info): Define new class.
501 (__class_type_info): Likewise.
502 (__si_class_type_info): Likewise.
503 (__vmi_class_type_info): Likewise.
504 (__dynamic_cast): Prototype.
506 * tinfo.cc: Conditionalize old and new rtti mechanisms.
507 (type_info::is_pointer_p): Define new function.
508 (type_info::is_function_p): Likewise.
509 (type_info::do_catch): Likewise.
510 (type_info::do_upcast): Likewise.
511 (vtable_prefix): New structure for vtable access.
512 (adjust_pointer): Define new template function.
513 (contained_p, public_p, virtual_p, contained_public_p,
514 contained_nonpublic_p, contained_nonvirtual_p): Define new
516 (nonvirtual_base_type): New local variable.
517 (__class_type_info::~__class_type_info): Define.
518 (__si_class_type_info::~__si_class_type_info): Likewise.
519 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
520 (__class_type_info::do_catch): Define new function.
521 (__class_type_info::do_upcast): Likewise.
522 (__class_type_info::find_public_src): Likewise.
523 (__class_type_info::do_find_public_src): Likewise.
524 (__si_class_type_info::do_find_public_src): Likewise.
525 (__vmi_class_type_info::do_find_public_src): Likewise.
526 (__class_type_info::do_dyncast): Likewise.
527 (__si_class_type_info::do_dyncast): Likewise.
528 (__vmi_class_type_info::do_dyncast): Likewise.
529 (__class_type_info::do_upcast): Likewise.
530 (__si_class_type_info::do_upcast): Likewise.
531 (__vmi_class_type_info::do_upcast): Likewise.
532 (__dynamic_cast): Likewise.
534 * tinfo2.cc (__fundamental_type_info): Define new class.
535 (__pointer_type_info): Likewise.
536 (__reference_type_info): Likewise.
537 (__array_type_info): Likewise.
538 (__function_type_info): Likewise.
539 (__enum_type_info): Likewise.
540 (__ptr_to_member_type_info): Likewise.
541 (__fundamental_type_info::~__fundamental_type_info): Define.
542 (__pointer_type_info::~__pointer_type_info): Likewise.
543 (__reference_type_info::~__reference_type_info): Likewise.
544 (__array_type_info::~__array_type_info): Likewise.
545 (__function_type_info::~__function_type_info): Likewise.
546 (__enum_type_info::~__enum_type_info): Likewise.
547 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
548 (__pointer_type_info::do_catch): Define new function.
549 (__ptr_to_member_type_info::do_catch): Define new function.
551 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
552 (__is_pointer): Likewise.
554 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
556 2000-01-30 Mark Mitchell <mark@codesourcery.com>
558 * cp/class.c (build_vtable): Rename to build_primary_vtable.
559 (prepare_fresh_vtable): Rename to build_secondary_vtable.
560 (make_new_vtable): New function.
561 (modify_vtable_entry): Handle generation of new vtables correctly.
562 (modify_one_vtable): Remove unused parameter.
563 (dfs_fixup_vtable_deltas): Likewise.
564 (override_one_vtable): Use build_secondary_vtable.
565 (finish_struct_1): Use build_primary_vtable and
566 build_secondary_vtable.
568 2000-01-28 Ulrich Drepper <drepper@redhat.com>
570 * cp/decl.c: Adjust variable names, comments, help strings.
572 2000-01-29 Nathan Sidwell <nathan@acm.org>
574 * new2.cc (operator delete[]): Use operator delete, don't assume
577 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
579 * class.c (build_vtbl_initializer): Add argument to
580 build_vtable_entry call.
582 2000-01-27 Mark Mitchell <mark@codesourcery.com>
584 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
585 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
586 (BF_DELTA): New macro.
587 (BF_VCALL_INDEX): Likewise.
589 (THUNK_VCALL_OFFSET): Likewise.
590 (make_thunk): Change prototype.
591 * class.c (build_vtable_entry): Integrate
592 build_vtable_entry_for_fn. Handle vcall indices.
593 (build_vtable_entry_for_fn): Remove.
594 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
595 BF_VCALL_INDEX, BF_FN.
596 (modify_vtable_entry): Integrate common code from
597 modify_one_vtable and dfs_fixup_vtable_deltas.
598 (add_virtual_function): Set BF_VCALL_INDEX.
599 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
601 (modify_one_vtable): Simplify.
602 (dfs_fixup_vtable_deltas): Likewise.
603 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
604 * method.c (make_thunk): Handle vcall indices.
606 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
608 Compiler side new abi rtti (not enabled).
609 * cp-tree.h (new_abi_rtti_p): New macro.
610 (emit_support_tinfos): Prototype new function.
611 (tinfo_decl_p): Likewise.
612 (emit_tinfo_decl): Likwise.
613 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
615 (doing_runtime): New local static.
616 (init_rtti_processing): Add new-abi initializer.
617 (get_tinfo_decl): Add new-abi logic.
618 (tinfo_from_decl): Likewise.
619 (build_dynamic_cast_1): Likewise.
620 (qualifier_flags): New static function.
621 (tinfo_base_init): Likewise.
622 (generic_initializer): Likewise.
623 (ptr_ref_initializer): Likewise.
624 (ptmd_initializer): Likewise.
625 (class_hint_flags): Likewise.
626 (class_initializer): Likewise.
627 (synthesize_tinfo_var): Likewise.
628 (create_real_tinfo_var): Likewise.
629 (create_pseudo_type_info): Likewise.
630 (get_vmi_pseudo_type_info): Likewise.
631 (create_tinfo_types): Likewise.
632 (emit_support_tinfos): New global function.
633 (tinfo_decl_p): New global predicate.
634 (emit_tinfo_decl): New global function.
635 * class.c (set_rtti_entry): Generalize for old and new rtti.
636 (build_vtbl_initializer): Likewise.
637 * decl2.c (finish_file): Likewise.
639 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
641 * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
642 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
644 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
646 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
649 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
651 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
653 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
655 * cp/optimize.c (calls_setjmp_r): Supply new argument
656 to special_function_p.
658 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
660 * call.c: PROTO -> PARAMS.
662 * cp-tree.h: Likewise.
670 * except.c: Likewise.
676 * method.c: Likewise.
677 * optimize.c: Likewise.
682 * search.c: Likewise.
683 * semantics.c: Likewise.
686 * typeck.c: Likewise.
687 * typeck2.c: Likewise.
690 2000-01-25 Richard Henderson <rth@cygnus.com>
692 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
694 2000-01-25 Mark Mitchell <mark@codesourcery.com>
696 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
697 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
698 (struct vcall_offset_data_s): New type.
699 (dfs_vcall_offset_queue_p): New function.
700 (dfs_build_vcall_offset_vtbl_entries): Likewise.
701 (build_vcall_offset_vtbl_entries): Likewise.
702 (layout_vtable_decl): Likewise.
703 (num_vfun_entries): Likewise.
704 (num_extra_vtbl_entries): Add the entries for vcall offsets.
705 (build_vtbl_initializer): Likewise.
706 (dfs_finish_vtabls): Use layout_vtable_decl.
707 (modify_one_vtables): Always duplicate vtables under the new ABI.
708 (finish_struct_1): Use layout_vtable_decl.
710 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
712 * decl.c (member_function_or_else): Change third arg from a format
713 specifier to an `enum overload_flags'. Callers changed.
715 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
717 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
718 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
719 build_const_cast, get_delta_difference, check_return_expr): Avoid
720 ANSI string concatenation usage.
722 2000-01-24 Mark Mitchell <mark@codesourcery.com>
724 * class.c (layout_class_type): Put the fields required to make a
725 class non-empty at the end, not the beginning, of the TYPE_FIELDs
728 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
730 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
733 * decl2.c (mark_used): Do instantiate inlines that have been
734 explicitly instantiated.
736 2000-01-24 Richard Henderson <rth@cygnus.com>
738 * call.c (build_over_call): Use expand_tree_builtin.
739 * typeck.c (build_function_call_real): Likewise.
740 (build_binary_op_nodefault): Handle unordered compares.
742 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
744 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
745 cp_tree_index values.
746 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
747 New global node #defines for them.
748 * rtti.c (call_void_fn): Replace with ...
749 (build_runtime_decl): ... new static function.
750 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
751 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
752 (build_dynamic_cast_1): Always produce correctly typed result.
753 Explicitly produce type_info addresses. Use dynamic_cast_node.
754 * exception.cc (__throw_bad_cast): Return `void *'.
755 (__throw_bad_typeid): Return `const type_info &'.
757 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
759 * cp-tree.h (get_vtable_decl): Prototype new function.
760 * class.c (get_vtable_decl): New function. Broken out from ...
761 (build_vtable): ... here. Use it.
762 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
765 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
767 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
768 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
769 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
770 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
771 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
772 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
773 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
774 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
775 (CPTI_TINFO_VAR_ID): New enumeration.
776 (__tp_desc_type_node, __access_mode_type_node,
777 __bltn_desc_type_node, __user_desc_type_node,
778 __class_desc_type_node, __ptr_desc_type_node,
779 __attr_desc_type_node, __func_desc_type_node,
780 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
781 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
782 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
783 enum_desc_type_node, class_desc_type_node,
784 si_class_desc_type_node, vmi_class_desc_type_node,
785 ptmd_desc_type_node, base_desc_type_node): New #defines.
786 (tinfo_fn_id, tinfo_fn_type): Rename to ...
787 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
788 (tinfo_var_id): New enumeration.
789 (DECL_TINFO_FN_P): Augment comment.
790 * decl.c (cp_global_trees): Adjust documentation.
791 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
792 tinfo_decl_type and tinfo_var_id.
793 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
794 (build_typeid): Remove unused variable.
795 (get_tinfo_var): Use tinfo_var_id.
796 (tinfo_name): New static function.
797 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
798 (tinfo_from_decl): Likewise.
799 (get_base_offset): New static function, broken out of
801 (expand_si_desc): Use tinfo_name.
802 (expand_class_desc): Likewise. Lose local static variable.
803 Use base_desc_type_node. Use get_base_offset.
804 (expand_ptr_desc): Use tinfo_name.
805 (expand_attr_desc): Likewise.
806 (expand_generic_desc): Likewise.
808 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
809 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
811 2000-01-23 Mark Mitchell <mark@codesourcery.com>
813 * cp-tree.h (__eprintf): Remove declaration.
814 * tree.c (__eprintf): Remove definition.
816 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
817 Mark Mitchell <mark@codesourcery.com>
819 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
820 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
822 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
824 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
826 2000-01-23 Mark Mitchell <mark@codesourcery.com>
828 * cp-tree.h (register_dtor_fn): New function.
829 * decl.c (destroy_local_static): Rename to ...
830 (register_dtor_fn): ... this. Give it external linkage.
831 (expand_static_init): Use it.
832 * decl2.c (do_static_initialization): Likewise, if using
834 (do_static_destruction): Check that __cxa_atexit is not in use.
835 (finish_file): Don't call do_static_destruction if using
838 * typeck.c (convert_arguments): Restore two-message error
841 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
843 Remap dynamic cast hint values to be consistent across ABIs.
844 * search.c (dynamic_cast_base_recurse): Remap generated value.
845 (get_dynamic_cast_base_type): Adjust documentation.
846 * tinfo.h (__user_type_info::dyncast): Likewise.
847 (__user_type_info::find_public_subobj): Remap BOFF meaning.
848 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
849 (__class_type_info::do_dyncast): Likewise.
850 (__class_type_info::do_find_public_subobj): Likewise.
851 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
853 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom>
855 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
857 * typeck2.c (incomplete_type_error): Restore previous
858 cp_error and cp_error_at call sequence.
860 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
862 * class.c (dump_class_hierarchy): Make format agree with argument;
863 cast pointer to unsigned long and print with %lx.
865 2000-01-19 Gabriel Dos Reis <gdr@codesourcery>
867 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
869 * typeck.c (composite_pointer_type, common_type,
870 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
871 build_function_call_real, convert_arguments,
872 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
873 build_unary_op, mark_addressable, build_compound_expr,
874 build_static_cast, build_reinterpret_cast, build_const_cast,
875 build_c_cast, build_modify_expr, get_delta_difference,
876 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
877 'ISO C++'. Fusion consecutive calls to diagnotic message routines
879 * typeck2.c (readonly_error, abstract_virtuals_error,
880 process_init_constructor, check_for_new_type): Likewise.
882 2000-01-19 Mark Mitchell <mark@codesourcery.com>
884 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
887 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
889 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
890 (build_x_typeid): Likewise.
891 (get_tinfo_fn): Likewise.
892 (get_tinfo_fn_unused): Rename to ...
893 (get_tinfo_decl): ... here.
894 * rtti.c (build_headof): Replace logic error with assertion.
895 (get_tinfo_fn_dynamic): Rename to ...
896 (get_tinfo_decl_dynamic): ... here. Make static. Use
897 complete_type_or_else.
898 (build_x_typeid): Move into ...
899 (build_typeid): ... here. Adjust call to
900 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
901 throw_bad_typeid expression.
902 (get_tinfo_fn_unused): Rename to ...
903 (get_tinfo_decl): ... here. Adjust comment.
904 (get_tinfo_fn): Delete.
905 (tinfo_from_decl): New static function.
906 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
907 (get_typeid): Use complete_type_or_else.
908 (build_dynamic_cast_1): Adjust calls to
909 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
910 * parse.y (primary): Adjust call to build_typeid.
911 * except.c (build_eh_type_type_ref): Adjust call to
912 get_tinfo_decl. Mark as used.
913 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
914 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
915 * parse.c: Regenerated.
917 2000-01-17 Mark Mitchell <mark@codesourcery.com>
919 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
921 (resolves_to_fixed_type_p): Document calling convention.
922 * rtti.c (build_x_typeid): Initialize NONNULL.
924 * cp-tree.h (build_shared_int_cst): New function.
925 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
926 * class.c (modify_vtable_entry): Likewise.
927 (add_virtual_function): Split out code to generated shared
928 INTEGER_CSTs to build_share_int_cst.
929 (modify_all_vtables): Handle all the overridden functions here.
930 Add overridden functions from non-primary virtual bases to the
932 (finish_struct_1): Adjust call to modify_all_vtables. Add
933 overridden functions from non-primary bases to the vtable.
934 * tree.c (build_shared_int_cst): New function.
936 * cp-tree.h (scratchalloc): Remove.
937 (build_scratch_list): Likewise.
938 * call.c (convert_class_to_reference): Replace build_scratch_list
939 and build_expr_list with build_tree_list.
940 (add_candidate): Replace scratchalloc with expralloc. Note memory
942 (build_user_type_conversion_1): Replace build_scratch_list
943 and build_expr_list with build_tree_list.
944 (build_new_op): Likewise.
945 (build_op_delete_call): Likewise.
946 (convert_like): Likewise.
947 * cvt.c (ocp_convert): Likewise.
948 * decl.c (start_decl): Likewise.
949 (start_function): Likewise.
950 (finish_destructor_body): Likewise.
951 (maybe_build_cleanup_1): Likewise.
952 * decl2.c (reparse_decl_as_expr): Likewise.
953 * init.c (perform_member_init): Likewise.
954 (expand_cleanup_for_base): Likewise.
955 (build_builtin_delete_call): Likewise.
956 (build_new_1): Likewise.
957 (build_delete): Likewise.
958 * method.c (do_build_assign_ref): Likewise.
959 * parse.y (already_scoped_stmt): Likewise.
960 (nontrivial_exprlist): Likewise.
961 (net_initializer): Likewise.
962 (initlist): Likewise.
963 * parse.c: Regenerated.
964 * rtti.c (build_x_typeid): Likewise.
965 (build_dynamic_cast_1): Likewise.
966 * typeck.c (build_x_compound_expr): Likewise.
967 (build_static_cast): Likewise.
968 (build_modify_expr): Likewise.
970 * cp-tree.h (DECL_VINDEX): Add documentation.
971 * class.c (build_vtable_entry): Likewise.
972 (start_vtable): Add comment.
973 (add_virtual_function): Replace pending_hard_virtuals with
974 overridden_virtuals and pending_virtuals with new_virtuals.
975 Replace redundant assignments with assertions.
976 (check_for_override): Add comment.
977 (check_bases_and_members): Replace pending_hard_virtuals with
978 overridden_virtuals and pending_virtuals with new_virtuals.
979 (create_vtbl_ptr): Likewise.
980 (layout_class_type): Likewise.
981 (finish_struct_1): Likewise. Add comments.
983 2000-01-16 Mark Mitchell <mark@codesourcery.com>
985 * class.c (finish_struct_1): Replace redundant code with
988 * cp-tree.h (flag_new_abi): Move.
989 (flag_use_cxa_atexit): Likewise.
990 (flag_honor_std): Likewise.
991 (flag_rtti): Likewise.
992 (vbase_offsets_in_vtable_p): Define.
993 (vptrs_present_everywhere_p): Likewise.
994 (TYPE_CONTAINS_VPTR_P): Likewise.
995 (dfs_walk_real): Declare.
996 * class.c (build_vbase_pointer_fields): Check
997 vbase_offsets_in_vtable_p.
998 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1000 (build_vbase_offset_vtbl_entries): Simplify.
1001 (build_vbase_offset_vtbl_entries): Adjust.
1002 (build_vbase_pointer): Add ability to look up vbase offsets in
1004 (start_vtable): New function.
1005 (add_virtual_function): Use it.
1006 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1007 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1008 (build_vtbl_initializer): Take the type of the complete object as
1009 input. Use it to correctly calculate vbase offsets.
1010 (dfs_finish_vtbls): Pass the complete type to
1011 build_vtbl_initializer.
1012 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1013 (create_vtable_ptr): Create a vtable even if there are no
1014 new virtual functions, under the new ABI.
1015 (finish_struct_1): Likewise.
1016 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1017 * decl.c (exapnd_static_init): Remove call to
1018 preserve_initializer.
1019 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1021 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1022 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1023 (construct_virtual_bases): Don't initialize virtual base pointers
1025 (build_aggr_init): Clean up comment.
1026 (expand_aggr_init_1): Likewise.
1027 * rtti.c (expand_class_desc): Store the virtual function table
1028 index where the vbase offset lives in the offset field.
1029 * search.c (dfs_walk_real): Make it global.
1030 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1031 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1033 * tinfo.h (USItype): Make it signed under the new ABI.
1034 * tinfo.cc (convert_to_base): New function. Encapsulate base
1035 conversion logic here.
1036 (__class_type_info::do_upcast): Use it.
1037 (__class_type_info::do_dyncast): Likewise.
1038 (__class_type_info::do_find_public_subobj): Likewise.
1040 * init.c (construct_virtual_bases): Don't look up the addresses of
1041 virtual bases at run-time.
1043 * class.c (build_vbase_pointer): Relocate.
1044 (build_vbase_pointer_fields): Likewise.
1045 (dfs_build_vbase_offset_vtbl_entries): Likewise.
1046 (build_vbase_offset_vtbl_entries): Likewise.
1048 * decl.c (init_decl_processing): Complain if -fnew-abi
1049 -fno-vtable-thunks is used.
1051 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1054 2000-01-15 Mark Mitchell <mark@codesourcery.com>
1056 * cp-tree.h (num_extra_vtbl_entries): New function.
1057 (size_extra_vtbl_entries): Likewise.
1058 (dfs_vtable_path_unmark): Likewise.
1059 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1060 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1061 * class.c (num_extra_vtbl_entries): New function.
1062 (size_extra_vtbl_entries): Likewise.
1063 (dfs_build_vbase_offset_vtbl_entries): New function.
1064 (build_vbase_offset_vtbl_entries): Likewise.
1065 (build_vtbl_initializer): Use it.
1066 (finish_struct_1): Adjust vtable sizes (using
1067 num_extra_vtbl_entries).
1068 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1069 THUNK_DECL is non-NULL before expanding it.
1070 * init.c (expand_virtual_init): Adjust the vtable pointer by
1071 size_extra_vtbl_entries before storing it.
1072 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1073 Handle TREE_LIST parameters here, not in the dfs_* functions.
1074 (dfs_unmarked_real_bases_queue_p): Adjust.
1075 (dfs_marked_real_bases_queue_p): Likewise.
1076 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1077 (dfs_vtable_path_marked_real_bases_queue_p): New function.
1078 (dfs_vtable_path_unmark): Likewise.
1080 2000-01-14 Mark Mitchell <mark@codesourcery.com>
1082 * optimize.c (copy_body_r): Clear the operand three of a
1083 TARGET_EXPR when copying it.
1085 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1087 * method.c (build_decl_overload_real): Check whether we are in ::
1088 before returning __builtin_new/delete.
1090 2000-01-13 Mark Mitchell <mark@codesourcery.com>
1092 * pt.c (tsubst_friend_function): Improve comment.
1093 (instantiate_decl): Avoid crashing when a "nested" function is
1094 instantiated from the top level.
1096 * dump.c (dqeueue_and_dump): Dump
1097 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1099 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1101 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1103 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
1105 * g++spec.c (lang_specific_driver): Add -fnew-abi if
1106 ENABLE_NEW_GXX_ABI defined.
1107 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1108 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1109 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1111 2000-01-12 Mark Mitchell <mark@codesourcery.com>
1113 * decl.c (start_cleanup_fn): Call pushdecl.
1115 * call.c (convert_class_to_reference): Fix typos.
1116 (build_conditional_expr): Handle errors gracefully.
1117 * class.c (push_nested_class): Likewise.
1118 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1119 (DECL_THIS_EXTERN): Use it.
1120 (DECL_THIS_STATIC): Likewise.
1121 * cvt.c (convert_to_void): Handle errors gracefully.
1122 (build_expr_type_conversion): Likewise.
1123 * decl.c (maybe_push_decl): Likewise.
1124 (start_decl_1): Likewise.
1125 (require_complete_types_for_parms): Likewise.
1126 * parse.y (structsp): Likewise.
1127 (base_class): Likewise.
1128 * parse.c: Regenerated.
1129 * pt.c (finish_member_template_decl): Likewise.
1130 * typeck.c (decay_conversion): Likewise.
1132 * cp-tree.h (dfs_skip_vbases): New function.
1133 (find_vbase_instance): Likewise.
1134 * class.c (determine_primary_base): Allow a nearly empty base to
1135 serve as a primary base class under the new ABI.
1136 (get_class_offset_1): Rename to ...
1137 (dfs_get_class_offset): ... this. Simplify. Don't issue error
1139 (get_class_offset): Use it. Issue error messages here.
1140 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1141 find the right copies of virtual bases.
1142 (fixup_vtable_deltas1): Rename to ...
1143 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
1144 bases as primary bases.
1145 (fixup_vtable_deltas): Remove.
1146 (override_one_vtable): Handle virtual bases as primary bases.
1147 (merge_overrides): Likewise.
1148 (finish_struct_1): Likewise.
1149 (dump_class_hierarchy): Dump primary-ness of bases as well.
1150 * search.c (mark_primary_bases): Use a pre-order traversal to
1151 handle primary virtual bases.
1152 (dfs_skip_vbases): New fiunction.
1153 (expand_upcast_fixups): Adjust to handle primary virtual bases.
1154 (fixup_virtual_upcast_offsets): Likewise.
1155 (fixup_all_virtual_upcast_offsets): Likewise.
1156 (dfs_find_vbase_instances): New function.
1157 (find_vbase_instance): Likewise.
1159 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
1161 * lex.c (DIR_SEPARATOR): Delete macro.
1163 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
1165 * decl2.c (lang_decode_option): Handle automatic line wrapping
1168 2000-01-11 Mark Mitchell <mark@codesourcery.com>
1170 * friend.c (do_friend): Don't resolve scopes when processing
1171 template declarations, even if the qualifying scope doesn't
1172 involve template parameters.
1174 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
1176 * class.c (dfs_modify_vtables_queue_p): Remove.
1177 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1178 and dfs_marked_real_bases_queue_p instead of
1179 dfs_modify_vtables_queue_p.
1181 * class.c (build_vbase_path): Simplify.
1182 (dfs_propagate_binfo_offsets): New function.
1183 (propagate_binfo_offsets): Use it.
1184 (remove_base_field): Simplify.
1185 (dfs_set_offset_for_vbases): Remove.
1186 (dfs_set_offset_for_shared_vbases): New function.
1187 (dfs_set_offset_for_unshared_vbases): Likewise.
1188 (layout_virtual_bases): Use them.
1189 (layout_basetypes): Don't call propagate_binfo_offsets.
1190 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1193 * class.c (build_base_field): New function, split out from ...
1194 (build_base_fields): ... here. Use it. Allocate primary bases
1195 first, under the new ABI.
1196 (get_vtable_entry): Remove.
1197 (remove_base_field): New function, split out from ...
1198 (remove_base_fields): ... here. Adjust since primary bases come
1199 first under the new ABI.
1201 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1202 (initialize_vtbl_ptrs): New function.
1203 (expand_indirect_vtbls_init): Change prototype.
1204 (convert_pointer_to_vbase): Declare.
1205 * init.c (expand_direct_vtbls_init): Remove.
1206 (dfs_initialize_vtbl_ptrs): New function.
1207 (initialize_vtbl_ptrs): Likewise.
1208 (emit_base_init): Use initialize_vtbl_ptrs.
1209 * search.c (convert_pointer_to_vbase): Make it global.
1210 (expand_indirect_vtbls_init): Remove vtable initialization code.
1211 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1213 * class.c (dfs_finish_vtbls): New function.
1214 (finish_vtbls): Use it.
1215 (dump_class_hierarchy): New function.
1217 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1218 (BINFO_VBASE_PRIMARY_P): New macro.
1219 (BINFO_VIRTUALS): Add to documentation.
1220 (SET_BINFO_PRIMARY_MARKED_P): Remove.
1221 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1222 (dfs_mark_primary_bases_queue_p): Likewise.
1223 (dfs_unmarked_real_bases_queue_p): New function.
1224 (dfs_marked_real_bases_queue_p): Likewise.
1225 * search.c (dfs_mark_primary_bases): Adjust.
1226 (mark_primary_bases): Likewise.
1227 (get_shared_vbase_if_not_primary): New function.
1228 (dfs_unmarked_real_bases_queue_p): Likewise.
1229 (dfs_marked_real_bases_queue_p): Likewise.
1230 (dfs_get_pure_virtuals): Simplify.
1231 (get_pure_virtuals): Likewise.
1233 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1235 * lex.c: Include tm_p.h.
1237 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
1239 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1241 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
1243 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1244 * pt.c (instantiate_decl): Defer comdat templates that might not be
1247 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1248 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1249 (finish_file): Likewise.
1251 * decl2.c (import_export_class): Undo 12/14 change.
1253 * error.c (dump_decl): operator new, not operatornew.
1255 * class.c (field_decl_cmp): A nontype is "greater" than a type.
1256 * search.c (lookup_field_1): Look for the last field with the
1259 2000-01-05 Nathan Sidwell <nathan@acm.org>
1261 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1264 2000-01-05 Nathan Sidwell <nathan@acm.org>
1266 * typeck.c (build_static_cast): Don't strip target qualifiers
1267 when casting from a class.
1269 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1271 * class.c (warn_hidden): Initialize variable `fndecl'.
1273 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
1275 * decl.c (flag_isoc9x): New variable to be able to use code in
1276 c-common.c. For now always zero.
1278 2000-01-03 Mark Mitchell <mark@codesourcery.com>
1280 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1281 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1282 or unshare_base_binfos for virtual bases here.
1283 * search.c (dfs_get_vbase_types): Do it here.
1284 (get_vbase_types): Adjust.
1286 2000-01-02 Mark Mitchell <mark@codesourcery.com>
1288 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1289 (BINFO_PRIMARY_MARKED_P): Use flag 5.
1290 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1291 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1292 (unmark_primary_bases): Remove declaration.
1293 (unmarkedp): Declare.
1294 (dfs_vbase_unmark): Likewise.
1295 * class.c (determine_primary_base): Return immediately if there
1296 are no base classes. Call mark_primary_bases here.
1297 (modify_all_direct_vtables): Remove.
1298 (modify_all_indirect_vtables): Remove.
1299 (dfs_modify_vtables_queue_p): New function.
1300 (dfs_modify_vtables): New function.
1301 (modify_all_vtables): Use them.
1302 (build_base_fields): Build FIELD_DECLs for primary virtual base
1304 (create_vtable_ptr): Don't call determine_primary_base here.
1305 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1306 (dfs_set_offset_for_vbases): ... this.
1307 (layout_virtual_bases): Use it.
1308 (layout_class_type): Call determine_primary_base here.
1309 * search.c (unmarkedp): Make it global.
1310 (shared_marked_p): Simplify.
1311 (shared_unmarked_p): Likewise.
1312 (dfs_primary_bases_queue_p): Remove.
1313 (dfs_unmark_primary_bases): Likewise.
1314 (unmark_primary_bases): Likewise.
1315 (mark_primary_bases): Simplify.
1316 (get_pure_virtuals): Don't call mark_primary_bases here.
1317 (dfs_vbase_unmark): New function.
1318 (get_vbase_types): Simplify.
1320 * class.c (struct base_info): Remove.
1321 (determine_primary_base): Take has_virtual_p rather than a
1322 base_info as input. Don't calculate max_has_virtual.
1323 (finish_struct_bits): Remove max_has_virtual argument.
1324 (create_vtable_ptr): Remove max_has_virtual_p argument.
1325 (layout_virtual_bases): Remove max argument.
1326 (layout_basetypes): Likewise.
1327 (layout_class_type): Remove max_has_virtual_p argument.
1328 (finish_struct_1): Remove max_has_virtual.
1330 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1331 (layout_basetypes): Remove.
1332 * class.c (propagate_binfo_offsets): Moved here from tree.c.
1333 Update to handle primary virtual bases.
1334 (remove_base_fields): New function, split out from
1336 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1337 (layout_virtual_bases): New function, split out from
1338 layout_basetypes. Update to handle primary virtual bases.
1339 (layout_basetypes): Moved here from tree.c. Use
1340 remove_base_fields and layout_virtual_bases.
1341 * search.c (dfs_mark_primary_bases_queue_p): New function.
1342 (mark_primary_bases): Use it.
1343 * tree.c (CEIL): Remove.
1344 (propagate_binfo_offsets): Remove.
1345 (layout_basetypes): Remove.
1347 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1349 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1350 (BINFO_PRIMARY_MARKED_P): New macro.
1351 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1352 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1353 (mark_primary_bases): New function.
1354 (unmark_primary_bases): Likewise.
1355 * search.c (get_abstract_virtuals_1): Remove.
1356 (dfs_mark_primary_bases): New function.
1357 (mark_primary_bases): Likewise.
1358 (dfs_unmark_primary_bases): Likewise.
1359 (unmark_primary_bases): Likewise.
1360 (dfs_get_pure_virtuals): Likewise.
1362 2000-01-01 Mark Mitchell <mark@codesourcery.com>
1364 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1365 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1366 (modify_one_vtable): Adjust.
1367 (fixup_vtable_deltas1): Likewise.
1368 (override_one_vtable): Likewise.
1369 * search.c (get_abstract_virtuals_1): Likewise.
1370 (get_pure_virtuals): Likewise.
1371 (expand_upcast_fixups): Likewise.
1372 * tree.c (debug_binfo): Likewise.
1374 * class.c (build_vtable): Don't return a value. Don't rebuild
1375 vtables for bases that have already been handled.
1376 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1377 already been handled.
1378 (modify_one_vtable): Adjust accordingly.
1379 (fixup_vtable_deltas1): Likewise.
1380 (finish_struct_1): Likewise.
1382 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1384 * call.c (build_new_method_call): Also check destructors.
1386 1999-12-31 Mark Mitchell <mark@codesourcery.com>
1388 * cp-tree.h (VF_NORMAL_VALUE): Remove.
1389 * class.c (struct base_info): Remove vfield, vfields, and rtti.
1390 (set_primary_base): New function, split out from ...
1391 (finish_base_struct): ... here. Rename to ...
1392 (determine_primary_base): ... this. Simplify.
1393 (create_vtable_ptr): Tweak accordingly.
1394 (finish_struct_1): Simplify.
1396 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1397 (CLASSTYPE_N_BASECLASSES): Likewise.
1398 (BINFO_FOR_VBASE): New macro.
1399 (get_vbase_types): Change prototype.
1400 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1401 (prepare_fresh_vtable): Likewise.
1402 (finish_vtbls): Likewise.
1403 (get_class_offset_1): Likewise.
1404 (modify_all_indirect_vtables): Likewise.
1405 (build_vbase_pointer_fields): Likewise.
1406 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1407 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1408 (expand_member_init): Likewise.
1409 * search.c (get_base_distance): Likewise.
1410 (lookup_field_queue_p): Likewise.
1411 (virtual_context): Likewise.
1412 (get_vbase_types): Don't return a value. Set
1413 CLASSTYPE_VBASECLASSES here.
1414 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1416 1999-12-30 Mark Mitchell <mark@codesourcery.com>
1418 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1420 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1422 * class.c (create_vtable_ptr): Put the vtable at the beginning of
1423 the class, not the end, in the new ABI.
1424 * tree.c (propagate_binfo_offsets): Do the right thing for the new
1427 1999-12-29 Mark Mitchell <mark@codesourcery.com>
1429 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
1430 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1431 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1432 (check_field_decls): Likewise.
1433 (check_bases_and_members): Likewise.
1435 1999-12-28 Mark Mitchell <mark@codesourcery.com>
1437 * cp-tree.h (do_inline_function_hair): Remove.
1438 * class.c (layout_class_type): New function, split out from
1440 (fixup_pending_inline): Likewise.
1441 (fixup_inline_methods): New function.
1442 * method.c (fixup_pending_inline): Remove.
1443 (do_inline_function_hair): Likewise.
1445 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1448 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1449 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1450 (CLASSTYPE_PURE_VIRTUALS): ... this.
1451 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1452 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1453 (DECL_PURE_VIRTUAL_P): ... this.
1454 (get_abstract_virtuals): Rename to ...
1455 (get_pure_virtuals): ... this.
1456 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1457 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1458 CLASSTYPE_PURE_VIRTUALS.
1459 * class.c (build_vtable_entry): Likewise.
1460 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
1461 get_abstract_virtuals.
1462 (build_vtbl_initializer): Likewise.
1463 (override_one_vtable): Likewise.
1464 (check_methods): Likewise.
1465 * decl.c (duplicate_decls): Likewise.
1466 (redeclaration_error_message): Likewise.
1467 (lang_mark_tree): Likewise.
1468 * decl2.c (grok_function_init): Likewise.
1469 (import_export_vtable): Likewise.
1470 (import_expor_class): Likewise.
1471 * typeck2.c (abstract_virtuals_error): Likewise.
1472 * xref.c (GNU_xref_member): Likewise.
1473 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1475 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
1477 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1480 1999-12-26 Mark Mitchell <mark@codesourcery.com>
1482 * decl.c (store_return_init): Use mode of old RTL generated for
1483 DECL_RESULT, not the mode of DECL_RESULT itself.
1484 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1485 for functions that used named return values.
1487 1999-12-24 Mark Mitchell <mark@codesourcery.com>
1489 * semantics.c (expand_body): Use
1490 note_deferral_of_defined_inline_function.
1492 1999-12-22 Mark Mitchell <mark@codesourcery.com>
1494 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1496 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1498 * error.c (dump_decl): Support named return values.
1500 1999-12-20 Mark Mitchell <mark@codesourcery.com>
1502 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1503 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1504 (CLASSTYPE_PRIMARY_BINFO): Likewise.
1505 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1506 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1507 (check_bases_and_members): Set them here instead.
1508 (create_vtable_ptr): New function, split out from ...
1509 (finish_struct_1): ... here. Use it. Tidy. Use
1510 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1511 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1512 the first field in the class.
1513 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
1514 seeing TYPE_VFIELD as the first field in the class.
1516 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1517 (TYPE_POLYMORPHIC_P): ... this.
1518 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1519 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1520 (TREE_CALLS_NEW): Remove.
1521 (TREE_MANGLED): Likewise.
1522 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1523 and TYPE_POLYMORPHIC_P.
1524 * class.c (check_bases): Likewise.
1525 (finish_base_struct): Likewise.
1526 (finish_struct_bits): Likewise.
1527 (check_for_override): Likewise.
1528 (finish_struct_1): Likewise.
1529 (get_vfield_name): Likewise.
1530 * decl.c (xref_basetypes): Likewise.
1531 * decl2.c (import_export_class): Likewise.
1532 (import_export_decl): Likewise.
1533 * error.c (dump_function_decl): Likewise.
1534 * pt.c (instantiate_class_template): Likewise.
1535 * repo.c (repo_inline_used): Likewise.
1536 * rtti.c (build_headof): Likewise.
1537 (get_tinfo_fn_dynamic): Likewise.
1538 (build_x_typeid): Likewise.
1539 (get_tinfo_var): Likewise.
1540 (build_dynamic_cast_1): Likewise.
1541 (synthesize_tinfo_fn): Likewise.
1542 * search.c (lookup_field_1): Likewise.
1543 (dfs_debug_mark): Likewise.
1544 (maybe_suppress_debug_info): Likewise.
1545 * typeck.c (build_component_ref): Likewise.
1546 (build_component_addr): Likewise.
1547 * typeck2.c (process_init_constructor): Likewise.
1549 1999-12-20 Nathan Sidwell <nathan@acm.org>
1551 * typeck.c (strip_all_pointer_quals): New static function.
1552 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1554 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1556 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1557 (dso_handle_node): New macro.
1558 (flag_use_cxa_atexit): New variable.
1559 (declare_global_var): New function.
1560 (start_anon_func): Remove declaration.
1561 (end_anon_func): Likewise.
1562 * decl.c (get_atexit_node): New function, split out from
1563 destroy_local_static. Handle flag_use_cxa_atexit.
1564 (get_dso_handle_node): Likewise.
1565 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
1566 except.c. Handle flag_use_cxa_atexit.
1567 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
1569 (declare_global_var): New variable.
1570 (destroy_local_static): Handle flag_use_cxa_atexit.
1571 * decl2.c (flag_use_cxa_atexit): New variable.
1572 (lang_f_options): Likewise.
1573 * except.c (start_anon_func): Remove.
1574 (end_anon_func): Liekwise.
1575 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1576 * rtti.c (get_tinfo_var): Use declare_global_var.
1578 1999-12-16 Mark Mitchell <mark@codesourcery.com>
1580 * class.c (check_field_decls): Don't return a value.
1581 (avoid_overlap): Moved here from tree.c.
1582 (build_base_fields): Likewise.
1583 (check_bases): New function, split out from finish_base_struct.
1584 (check_bases_and_members): New function, split out from
1586 (struct base_info): Remove cant_have_default_ctor,
1587 cant_have_const_ctor, cant_have_asn_ref.
1588 (finish_base_struct): Split semantic analysis into check_bases.
1589 (finish_struct_methods): Fix bogus assertion.
1590 (check_field_decls): Call finish_struct_anon here.
1591 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1592 (finish_struct_1): Use check_bases_and_members. Reorganize.
1593 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1594 (build_base_fields): Don't declare.
1595 * tree.c (avoid_overlap): Remove.
1596 (build_base_fields): Likewise.
1598 * optimize.c (struct inline_data): Remove scope_stmt.
1599 (remap_block): Don't use insert_block_after_note. Don't update
1601 (expand_call_inline): Don't update scope_stmt.
1602 (optimize_function): Don't initialize scope_stmt.
1603 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1604 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1606 1999-12-15 Mark Mitchell <mark@codesourcery.com>
1608 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1609 out of the class, rather than taking them as parameters.
1610 (build_vbase_pointer_fields): Move here from tree.c.
1611 (build_vtbl_or_vbase_field): New function.
1612 (check_methods): Likewise.
1613 (remove_zero_width_bitfields): Likewise.
1614 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1615 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
1617 (finish_struct_methods): Handle the case where there are no
1619 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1620 (check_field_decls): Call delete_duplicate_fields here.
1621 (finish_struct_1): Tidy. Use check_methods and
1622 remove_zero_width_bitfields.
1623 * cp-tree.h (build_vbase_pointer_fields): Remove.
1624 * decl.c (grokdeclarator): Use tree_cons instead of
1626 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1627 instead of temp_tree_cons.
1628 * lex.c (cons_up_default_function): Remove dead code.
1629 * method.c (fixup_pending_inline): New function, split out from ...
1630 (do_inline_function_hair): ... here.
1631 * tree.c (build_vbase_pointer_fields): Remove.
1633 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
1635 * tree.c (walk_tree): Walk operand subtrees in forward order.
1636 * optimize.c (expand_call_inline): Likewise.
1637 (optimize_function): Initialize id->scope_stmt to something useful.
1638 (remap_block): Assume id->scope_stmt has a useful value.
1640 1999-12-15 Nathan Sidwell <nathan@acm.org>
1642 * typeck.c (build_c_cast): Expand warning message. Move pointer
1643 alignment warning to after the cast. Don't warn about pointer
1644 alignment when given a pointer to incomplete.
1646 1999-12-15 Richard Henderson <rth@cygnus.com>
1648 * cp-tree.h (make_aggr_type): Declare.
1649 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1650 (make_aggr_type): New.
1652 * decl.c (build_typename_type, init_decl_processing): Use it.
1653 (build_ptrmemfunc_type, xref_tag): Likewise.
1654 * except.c (call_eh_info): Likewise.
1655 * init.c (init_init_processing): Likewise.
1656 * pt.c (process_template_parm, lookup_template_class): Likewise.
1657 * rtti.c (expand_class_desc): Likewise.
1658 * semantics.c (begin_class_definition, finish_typeof): Likewise.
1659 * tree.c (copy_template_template_parm): Likewise.
1661 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
1663 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1664 sizeof (struct tree_common).
1666 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
1668 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1669 outermost block to point to the inlined function decl.
1671 * error.c (dump_decl): operator==, not operator ==.
1672 (op_to_string): Likewise.
1674 * decl.c (compute_array_index_type): Handle null name.
1676 * decl2.c (ambiguous_decl): Fix to match comment.
1677 (lookup_using_namespace): Adjust.
1679 * decl2.c (import_export_class): Don't ignore dllimport.
1681 1999-12-14 Mark Mitchell <mark@codesourcery.com>
1683 * class.c (check_field_decls): Split out from ...
1684 (finish_struct_1): ... here. Use it. Tidy.
1686 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1687 * optimize.c (copy_body_r): Pass it.
1688 * tree.c (remap_save_expr): Clear walk_subtrees for an
1689 already-handled SAVE_EXPR.
1690 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1692 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1693 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1695 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1697 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
1699 * class.c (finish_base_struct): Allow multiple COM base classes
1700 as well as non-COM bases as long as it's not the leftmost.
1702 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
1704 * lex.c (saving_parse_to_obstack): New global.
1705 (reinit_parse_for_block): Use.
1706 (reinit_parse_for_expr): Use.
1707 (check_newline): Use.
1709 1999-12-13 Mark Mitchell <mark@codesourcery.com>
1711 * optimize.c (initialize_inlined_parameters): Take FN to which the
1712 parameters belong as an argument.
1713 (expand_call_inline): Expand calls into the parameter
1714 initializations before pushing the function onto the list of
1715 functions we are presently expanding.
1717 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1719 * class.c (get_vtable_name): Use a literal format string and
1720 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1721 (prepare_fresh_vtable): Likewise.
1723 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1726 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1728 * init.c (build_vec_init): Initialize variable `try_body'.
1730 * lex.c (yyerror): Don't call a variadic function with a
1731 non-literal format string.
1733 * optimize.c (optimize_function): Call memset, not bzero.
1735 * pt.c (for_each_template_parm_r): Add static prototype.
1737 1999-12-09 Andreas Jaeger <aj@suse.de>
1739 * except.c (expand_throw): Add static attribute to match
1742 * Makefile.in (semantics.o): Add dependency on output.h.
1743 * semantics.c: Include output.h for declaration of
1746 1999-12-09 Mark Mitchell <mark@codesourcery.com>
1748 * decl.c (init_decl_processing): Reenable inlining on trees.
1749 (finish_function): Likewise.
1750 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1751 * semantics.c (simplify_aggr_init_exprs): New function.
1752 (expand_body): Use it.
1753 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1754 sometimes present the same sub-tree twice.
1756 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1759 * semantics.c (finish_switch_cond): Do conversions here, not ...
1760 * typeck.c (c_expand_start_case): Here.
1762 * semantics.c (do_poplevel): Remove unused variable.
1764 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1766 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1767 unless we're declaring the variable in question.
1769 1999-12-06 Mark Mitchell <mark@codesourcery.com>
1771 * decl.c (init_decl_processing): #if 0 last patch.
1772 (finish_function): Likewise.
1774 1999-12-05 Mark Mitchell <mark@codesourcery.com>
1776 * decl.c (init_decl_processing): Set flag_inline_trees if
1779 * cp-tree.h (calls_setjmp_p): Declare.
1780 * decl.c (finish_function): Mark functions that call setjmp as
1782 * optimize.c (calls_setjmp_r): New function.
1783 (calls_setjmp_p): Likewise.
1785 1999-12-04 Mark Mitchell <mark@codesourcery.com>
1787 * optimize.c (expand_call_inline): Wrap the expanded call in an
1788 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1791 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
1792 in_target_cleanup_p.
1793 (remap_decl): New function.
1794 (remap_block): Likewise.
1795 (copy_scope_stmt): Likewise.
1796 (copy_body_r): Use remap_decl and copy_scope_stmt.
1797 (copy_body): Use VARRAY_TOP_TREE.
1798 (initialize_inlined_parameters): Likewise.
1799 (declare_return_variable): Likewise.
1800 (inlinable_function_p): Check flag_inline_trees.
1801 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1802 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
1803 parameters of the inlined function.
1804 (optimize_function): Prevent recursion into partially complete
1807 * cp-tree.def (SCOPE_STMT): Take one operand.
1808 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1809 (SCOPE_NULLIFIED_P): Redefine.
1810 (SCOPE_NO_CLEANUPS_P): New macro.
1811 (add_scope_stmt): Change prototype.
1812 * decl.c (poplevel): Tidy. Warn about unused variables here.
1813 Record SCOPE_STMT_BLOCKs.
1814 (finish_function): Keep DECL_INITIAL for functions that might be
1816 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1817 * semantics.c: Include rtl.h.
1818 (add_scope_stmt): Return the new scope statement and, for an
1819 end-of-scope statement, its matching begin statement. Don't set
1821 (do_pushlevel): Simplify, now that we are always
1823 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
1824 (expand_stmt): Don't call expand_start_bindings or
1825 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1826 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1828 * Makefile.in (semantics.o): Depend on RTL_H.
1830 * decl2.c (pending_statics_used): Make it a macro.
1831 (saved_inlines_used): Likewise.
1832 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1833 (mark_inline_for_output): Likewise.
1834 (ssdf_decls_used): Remove.
1835 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1836 (generate_ctor_or_dtor_function): Adjust accordingly.
1838 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
1839 Greg McGary <gkm@gnu.org>
1841 * decl.c (duplicate_decls): Merge
1842 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1843 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1845 1999-12-02 Mike Stump <mrs@wrs.com>
1847 * init.c (perform_member_init): Handle parse errors better.
1849 1999-12-01 Mark Mitchell <mark@codesourcery.com>
1851 * cp-tree.h (min_tree_cons): Remove.
1852 (scratch_ovl_cons): Likewise.
1853 * decl.c (saveable_obstack): Don't declare.
1854 (duplicate_decls): Tweak error-message.
1855 (initialize_local_var): Explicitly mark the definition as static.
1856 (finish_function): Call permanent_allocation, just so
1857 that the middle-end sees the obstacks it expects.
1858 (mark_cp_function_context): Likewise.
1859 * init.c (build_new): Don't use min_tree_cons.
1860 * lex.c (permanent_obstack): Don't declare.
1861 (current_obstack, saveable_obstack): Likewise.
1862 * spew.c (current_obstack, saveable_obstack): Likewise.
1863 * tree.c (current_obstack, saveable_obstack): Likewise.
1864 (scratch_ovl_cons): Remove.
1865 (build_min_nt): Don't mess with obstacks.
1866 (build_min): Likewise.
1867 (min_tree_cons): Remove
1868 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1869 (build_x_function_call): Likewise.
1870 (build_c_cast): Don't use min_tree_cons.
1872 1999-11-29 Mark Mitchell <mark@codesourcery.com>
1874 * pt.c (tsubst_decl): Robustify.
1876 1999-11-27 Mark Mitchell <mark@codesourcery.com>
1878 * decl2.c (finish_file): Call expand_body for inline functions
1879 that will be written out but that do not yet have RTL.
1880 * semantics.c (expand_body): Do not generate RTL For inline
1881 functions that do not yet need to be written out.
1883 1999-11-25 Mark Mitchell <mark@codesourcery.com>
1885 * Make-lang.in (CXX_SRCS): Add optimize.c.
1886 * Makefile.in (CXX_OBJS): Add optimize.o.
1887 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1888 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1889 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1890 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1891 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1893 (optimize.o): New target.
1894 * class.c: Don't include splay-tree.h.
1895 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
1896 * cp-tree.h: Include splay-tree.h.
1897 (DECL_UNINLINABLE): New macro.
1898 (CTOR_BEGIN_P, CTOR_END_P): New macros.
1899 (flag_inline_trees): New variable.
1900 (local_variable_p): New function.
1901 (nonstatic_local_decl_p): Likewise.
1902 (optimize_function): Likewise.
1903 (cplus_unsave_expr_now): Remove.
1904 (copy_tree_r): Declare.
1905 (remap_save_expr): Likewise.
1906 * decl.c (local_variable_p): Don't
1908 (local_variable_p_walkfn): New function.
1909 (make_rtl_for_local_static): Remove code to try to avoid writing
1910 out static constants.
1911 (emit_local_var): Fix indentation.
1912 (nonstatic_local_decl_p): New function.
1913 (check_default_argument): Use local_variable_p_walkfn, not
1914 local_variable_p, when walking the tree.
1915 (start_function): Set the DECL_CONTEXT for automatically generated
1917 (finish_constructor_body): Use CTOR_STMT to mark the end of a
1919 * decl2.c: Don't include splay-tree.h.
1920 (flag_inline_trees): Define.
1921 * dump.c: Don't include
1923 * except.c (expand_end_catch_block): Fix comment formatting.
1924 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
1925 (expand_throw): Tidy comment.
1926 * init.c (build_vec_delete_1): Use create_temporary_var.
1927 * lex.c (cplus_tree_code_type): Make it static.
1928 (cplus_tree_code_length): Likewise.
1929 (cplus_tree_code_name): Likewise.
1930 * optimize.c: New file.
1931 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
1932 with computed gotos.
1933 (setup_vtbl_ptr): Mark the beginnings of constructors with
1935 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
1936 (expand_body): Call optimize_function. Save bodies if we're doing
1938 * tree.c: Don't include splay-tree.h. Include insn-config.h and
1940 (copy_tree_r): Make it public.
1941 (statement_code_p): New function.
1942 (mark_local_for_remap_r): Likewise.
1943 (cp_usave_r): Likewise.
1944 (cp_unsave): Likewise.
1945 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
1946 (walk_tree): Walk into `s' class nodes. Walk statement chains.
1947 (copy_tree_r): Handle 's' class nodes. Restore chains for
1948 statements. Nullify scopes. Don't copy types.
1949 (init_tree): Set lang_unsave to cp_unsave.
1950 (remap_save_expr): Define.
1951 * ir.texi: Document CTOR_STMT.
1953 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
1955 * search.c (note_debug_info_needed): Do perform this optimization
1957 (maybe_suppress_debug_info): Likewise. Start by clearing
1958 TYPE_DECL_SUPPRESS_DEBUG.
1960 1999-11-24 Mark Mitchell <mark@codesourcery.com>
1962 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
1964 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
1966 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1968 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
1969 function with a non-literal format string.
1971 * lex.c (do_identifier): Likewise.
1973 * typeck.c (build_unary_op): Likewise.
1975 1999-11-23 Mark Mitchell <mark@codesourcery.com>
1977 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
1979 1999-11-22 Mark Mitchell <mark@codesourcery.com>
1981 * cp-tree.def (CTOR_COMPLETE): New tree node.
1982 * decl.c (finish_constructor_body): Add it, to mark the end of the
1984 (finish_function): Don't call end_protect_partials here.
1985 * ir.texi (CTOR_COMPLETE): Document it.
1986 * semantics.c (expand_stmt): Handle it.
1988 * cp-tree.def (FUNCTION_NAME): New tree node.
1989 * cp-tree.h (current_function_name_declared): Tweak documentation.
1990 (lang_decl_flags): Add pretty_function_p, adjust dummy.
1991 (DECL_PRETTY_FUNCTION_P): New macro.
1992 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
1993 etc., in a template function. Use at_function_scope_p instead of
1994 expanding it inline.
1995 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
1997 (tsubst): Handle FUNCTION_NAME.
1998 (tsubst_copy): Likewise.
1999 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2000 etc. in instantiation.
2001 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2002 even in template functions.
2003 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2004 conditional scope at the top of a destructor.
2006 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2007 specializations too.
2009 1999-11-22 Nathan Sidwell <nathan@acm.org>
2011 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2012 when actually negative.
2014 * typeck.c (convert_for_assignment): Expand comment about
2015 strange NULL check, moved from ...
2016 (convert_for_initialization): ... here. Remove unneeded
2019 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2021 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2022 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2023 Always destruct virtual bases of array components, but never
2025 (build_vec_init): Adjust invocations.
2026 (build_delete): Likewise.
2027 * decl2.c (delete_sanity): Likewise.
2029 1999-11-19 Nathan Sidwell <nathan@acm.org>
2031 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2032 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2033 * decl2.c (grok_method_quals): Accept `restrict' as applying to
2034 the object pointer. Return such qualifiers.
2035 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2038 1999-11-18 Mark Mitchell <mark@codesourcery.com>
2040 * except.c (expand_end_catch_block): Fix typo.
2041 (expand_exception_blocks): Simplify. Don't call
2042 expand_leftover_cleanups.
2044 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
2046 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2047 * pt.c (tsubst, case INTEGER_TYPE): Call it.
2048 Check uses_template_parms.
2050 * class.c (finish_struct): If we're a local class in a template
2051 function, add a TAG_DEFN.
2052 * pt.c (lookup_template_class): If this is a local class in a
2053 template function, call pushtag.
2054 (tsubst_expr, case TAG_DEFN): Handle classes, too.
2056 Emit debug info with the vtable.
2057 * search.c (maybe_suppress_debug_info): New function...
2058 * class.c (finish_struct_1): ...split out from here.
2059 * cp-tree.h: Declare it.
2060 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2061 if we're writing out the vtable.
2062 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
2063 note_debug_info_needed): #if 0 out.
2065 1999-11-14 Mark Mitchell <mark@codesourcery.com>
2067 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2068 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2070 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2071 * decl2.c (lookup_arg_dependent): Use it.
2073 * cp-tree.h (cp_finish_decl): Change prototype.
2074 (finish_static_data_member_decl): Likewise.
2075 (push_permanent_obstack): Remove declaration.
2076 (push_expression_obstack): Likewise.
2077 (push_scratch_obstack): Likewise.
2078 (DECL_TEMPLATE_PARM_P): Robustify.
2079 (SET_DECL_TEMPLATE_PARM_P): New macro.
2080 * class.c (add_method): Don't manipulate obstacks.
2081 (finish_vtbls): Likewise.
2082 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2083 * decl.c (binding_for_name): Don't manipulate obstacks.
2084 (maybe_push_to_top_level): Likewise.
2085 (pop_from_top_level): Likewise.
2086 (duplicate_decls): Likewise.
2087 (pushdecl): Likewise.
2088 (implicitly_declare): Likewise.
2089 (build_typename_type): Likewise.
2090 (start_decl): Likewise.
2091 (cp_finish_decl): Likewise.
2092 (finish_decl): Likewise.
2093 (destroy_local_static): Likewise.
2094 (expand_static_init): Likewise.
2095 (complete_array_type): Likewise.
2096 (grokvardecl): Likewise.
2097 (build_ptrmemfnc_type): Likewise.
2098 (grokdeclarator): Likewise.
2099 (xref_tag): Likewise.
2100 (xref_basetypes): Likewise.
2101 (start_enum): Likewise.
2102 (finish_enum): Likewise.
2103 (start_function): Likewise.
2104 (finish_function): Likewise.
2105 (start_method): Adjust call to cp_finish_decl.
2106 * decl2.c (finish_static_data_member_decl): Don't manipulate
2108 (grokfield): Likewise.
2109 (grokbitfield): Likewise.
2110 (get_temp_name): Likewise.
2111 (get_sentry): Likewise.
2112 (fnish_file): Likewise.
2113 (lookup_arg_dependent): Likewise.
2114 * except.c (call_eh_info): Likewise.
2115 (push_eh_info): Likewise.
2116 (do_pop_exception): Likewise.
2117 (initialize_handler_parm): Likewise.
2118 (expand_end_eh_spec): Likewise.
2119 (alloc_eh_object): Likewise.
2120 (expand_throw): Likewise.
2121 * expr.c (extract_scalar_init): Likewise.
2122 * init.c (build_java_class_ref): Likewise.
2123 * lex.c (get_time_identifier): Likewise.
2124 (snarf_defarg): Likewise.
2125 (add_defarg_fn): Likewise.
2126 (is_global): Simplify.
2127 (do_identifier): Don't check TREE_PERMANENT.
2128 * method.c (emit_thunk): Don't manipulate obstacks.
2129 * parse.y (condition): Adjust call to cp_finish_decl.
2130 (primary): Likewise.
2131 (initdcl): Likewise.
2132 (initdcl0_innards): Likewise.
2133 (nomods_initdcl0): Likewise.
2134 * pt.c (push_inline_template_parms_recursive): Use
2135 SET_DECL_TEMPLATE_PARM_P.
2136 (process_template_parm): Likewise.
2137 (lookup_template_class): Don't manipulate obstacks.
2138 (instantiate_class_template): Adjust call to
2139 finish_static_data_member_decl.
2140 (tsubst_decl): Don't manipulate obstacks.
2141 (tsubst_expr): Likewise.
2142 (instantiate_template): Likewise.
2143 (instantiate_decl): Adjust calls to cp_finish_decl.
2144 * rtti.c (call_void_fn): Don't manipulate obstacks.
2145 (get_tinfo_var): Likewise.
2146 (get_tinfo_fn_unused): Likewise.
2147 (build_dynamic_cast_1): Likewise.
2148 (expand_si_desc): Likewise.
2149 (expand_class_desc): Likewise.
2150 (expand_ptr_desc): Likewise.
2151 (expand_attr_desc): Likewise.
2152 (expand_generic_desc): Likewise.
2153 (synthesize_tinfo_fn): Likewise.
2154 * search.c (expand_upcast_fixups): Likewise.
2155 * semantics.c (finish_asm_stmt): Likewise.
2156 (finish_named_return_value): Likewise.
2157 (begin_class_definition): Likewise.
2158 (finish_class_definition): Likewise.
2159 (finish_typeof): Likewise.
2160 * tree.c (build_cplus_method_type): Likewise.
2161 (reverse_path): Likewise.
2162 (copy_template_template_parm): Likewise.
2163 (build_expr_ptr_wrapper): Likewise.
2164 (push_expression_obstack): Remove.
2165 (push_permanent_obstack): Likewise.
2166 * typeck.c (mark_addressable): Likewise.
2168 1999-11-13 Mark Mitchell <mark@codesourcery.com>
2170 * call.c (build_conditional_expr): Use build_target_expr_with_type.
2171 (convert_like): Likewise.
2172 (build_over_call): Likewise.
2173 * cp-tree.h (build_target_expr): Remove.
2174 (build_target_expr_with_type): New function.
2175 * cvt.c (build_up_reference): Use get_target_expr.
2176 * decl.c (build_target_expr): Move to ...
2177 * tree.c (build_target_expr): Here. Make it static.
2178 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
2179 the temporary VAR_DECLs.
2180 (get_target_expr): Use it.
2182 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
2184 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2185 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2186 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2187 * class.c (set_rtti_entry): Use it.
2189 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2191 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2193 * semantics.c (finish_expr_stmt): Call it here instead. Move
2194 default_conversion logic to semantic-analysis time.
2196 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
2198 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2200 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2202 * init.c (init_init_processing): Re-instated Nov 11 patch after
2205 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2207 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2208 Patch had not been approved yet.
2210 1999-11-12 Mark Mitchell <mark@codesourcery.com>
2212 * decl.c (compute_array_index_type): New function, split out from
2214 (create_array_type_for_decl): Likewise.
2215 (grokdeclarator): Use them.
2217 * semantics.c (expand_stmt): Don't suspend_momentary or
2220 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
2222 * init.c (init_init_processing): Header information for
2223 arrays allocated via `new' should have the same alignment used by
2226 1999-11-10 Mark Mitchell <mark@codesourcery.com>
2228 * error.c (dump_function_name): Don't crash if given a friend
2229 pseudo-instantiation.
2231 * cp-tree.h (build_enumerator): Change prototype.
2232 * decl.c (enum_next_value): Remove.
2233 (enum_overflow): Likewise.
2234 (init_decl_processing): Don't register enum_next_value as a root.
2235 (start_enum): Clear TYPE_VALUES for a redefined enum.
2236 (finish_enum): Reset the type of enumeration constants.
2237 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
2238 we don't need to. Maintain the TYPE_VALUES list and look there
2239 for the previously defined enumeration constant. Let enumeration
2240 constants have the type of their values until the enumeration type
2242 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2244 * parse.c: Regenerated.
2245 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2247 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
2248 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2250 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2252 1999-11-09 Mark Mitchell <mark@codesourcery.com>
2254 * cp-tree.h (language_function): Remove x_last_dtor_insn and
2255 x_last_parm_cleanup_insn.
2256 * decl.c (last_dtor_insn): Remove.
2257 (last_parm_cleanup_insn): Likewise.
2258 (expand_start_early_try_stmts): Don't set them.
2259 (store_parm_decls): Likewise.
2260 (save_function_data): Or save them.
2261 (mark_lang_function): Or mark them.
2263 1999-11-08 Mark Mitchell <mark@codesourcery.com>
2265 * decl.c (store_parm_decls): Generate cleanup code at
2266 semantic-analysis time. Destroy objects in the correct order.
2268 1999-11-07 Mark Mitchell <mark@codesourcery.com>
2270 * cp-tree.h (begin_new_placement): Remove.
2271 (finish_new_placement): Likewise.
2272 * class.c (finish_struct_1): Don't suspend_momentary or
2274 * decl.c (grokdeclarator): Likewise.
2275 (maybe_build_cleanup_1): Likewise.
2276 * except.c (push_eh_cleanup): Likewise.
2277 (build_terminate_handler): Likewise.
2278 * init.c (build_new_1): Likewise.
2279 * parse.y (parse_decl): Change prototype.
2280 (initdecls, notype_initdecls, initdcl): Don't return int.
2281 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2282 (.begin_new_placement): Remove.
2283 (.finish_new_placement): Likewise.
2284 (nonmomentary_expr): Likewise.
2285 (suspend_mom): Likewise.
2286 (condition): Don't suspend_momentary, resume_momentary, or keep
2287 track of need to resume.
2288 (unary_expr): Likewise.
2289 (new_placement): Likewise.
2291 (structsp): Likewise.
2292 (new_type_id): Likewise.
2293 (maybe_parmlist): Likewise.
2294 (direct_after_type_declaration): Likewise.
2295 (direct_new_declarator): Likewise.
2296 (direct_abstract_declaration): Likewise.
2297 * parse.c: Regenerated.
2298 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2299 * semantics.c (begin_new_placement): Remove.
2300 (finish_new_placement): Likewise.
2302 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2304 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2305 (DECL_TEMPLATE_INFO): Use it.
2306 * decl.c (warn_extern_redeclared_static): Do nothing for
2308 * decl2.c (mark_used): Explicitly check for function or variable.
2309 * semantics.c (finish_unary_op_expr): Check whether result is also
2312 1999-11-05 Mark Mitchell <mark@codesourcery.com>
2314 * Makefile.in (typeck2.o): Depend on output.h.
2315 * typeck2.c: Include output.h.
2317 * decl.c (flag_ansi): Remove declaration.
2319 * pt.c (tinst_level_tick): Make it static.
2320 (last_template_error_tick): Likewise.
2322 * cp-tree.h (mapcar): Remove declaration.
2323 (search_tree): Likewise.
2324 (walk_tree_fn): New typedef.
2325 (walk_tree): New function.
2326 * tree.c (bot_manip): Change prototype. Adjust to be called via
2328 (bot_replace): Likewise.
2329 (no_linkage_helper): Likewise.
2330 (copy_tree_r): New function.
2331 (search_tree): Rename, and adjust, to become ...
2332 (walk_tree): New function.
2334 (target_remap): Remove.
2335 (target_remap_count): Likewise.
2336 (break_out_target_exprs): Use walk_tree.
2337 * decl.c (local_variable_p): Change prototype.
2338 (check_default_argument): Use walk_tree.
2339 * pt.c (for_each_template_parm_r): New function, split out from ...
2340 (for_each_template_parm): Here. Use it, via walk_tree.
2342 1999-11-03 Mark Mitchell <mark@codesourcery.com>
2344 * class.c (check_bitfield_decl): New function, split out from
2346 (check_field_decl): Likewise. Recursively examine members of
2348 (finish_struct_1): Use them.
2349 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2351 1999-11-02 Mark Mitchell <mark@codesourcery.com>
2353 * decl.c (grokfndecl): Remove dead code.
2355 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2357 1999-11-02 Scott Snyder <snyder@fnal.gov>
2359 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2361 * pt.c (tsubst_copy): Likewise.
2363 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
2365 * decl2.c (maybe_make_one_only): Always make things comdat on
2368 1999-10-31 Mark Mitchell <mark@codesourcery.com>
2370 * decl.c (finish_function): Call free_after_parsing for functions
2371 we are not immediately turning into RTL.
2373 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
2375 * cp-tree.h (flag_dump_translation_unit): Add decl.
2377 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
2379 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2381 1999-10-30 Mark Mitchell <mark@codesourcery.com>
2383 * decl.c (pop_cp_function_context): Don't call free on a NULL
2385 * semantics.c: Include ggc.h.
2386 (expand_body): Do garbage-collection after processing a template
2387 function. Clear DECL_SAVED_TREE after generating RTL for a
2389 * Makefile.in (semantics.o): Depend on ggc.h.
2391 1999-10-29 Mark Mitchell <mark@codesourcery.com>
2393 * cp-tree.h (make_typename_type): Change prototype.
2394 * decl.c (make_typename_type): Only complain if so requested.
2395 * parse.y (nested_name_specifier): Adjust calls.
2396 (typename_sub0): Likewise.
2397 (typename_sub1): Likewise.
2398 * parse.c: Regenerated.
2399 * pt.c (convert_template_argument): Pass complain to
2403 1999-10-28 Mark Mitchell <mark@codesourcery.com>
2405 * semantics.c (finish_handler): End the scope of the handler
2406 before attaching it to the statement-tree.
2408 1999-10-28 Ian Lance Taylor <ian@zembu.com>
2410 * rtti.c (build_dynamic_cast_1): Give a better error message for
2411 an attempt to dynamic_cast from a non-polymorphic type.
2413 1999-10-27 Mark Mitchell <mark@codesourcery.com>
2415 * cp-tree.h (make_temp_vec): Remove.
2416 (make_scratch_vec): Likewise.
2417 * call.c (add_function_candidate): Use make_tree_vec.
2418 (add_conv_candidate): Likewise.
2419 (build_builtin_candidate): Likewise.
2420 (add_template_candidate_real): Likewise.
2421 * class.c (resolve_address_of_overloaded_function): Likewise.
2422 * decl.c (start_function): Don't fool with the momentary obstack.
2423 (finish_function): Likewise.
2424 * init.c (expand_direct_vtbls_init): Likewise.
2425 (begin_init_stmts): Likewise.
2426 (finish_init_stmts): Likewise.
2427 * pt.c (add_to_template_args): Use make_tree_vec.
2428 (check_explicit_specialization): Likewise.
2429 (coerce_template_parms): Likewise.
2430 (lookup_template_class): Don't fool with the momentary obstack.
2431 (instantiate_class_template): Likewise.
2432 (tsubst_template_arg_vector): Use make_tree_vec.
2433 (tsubst_aggr_type): Don't fool with the momentary obstack.
2434 (tsubst_decl): Likewise. Use make_tree_vec.
2435 (try_one_overload): Likewise.
2436 (try_class_unification): Don't fool with the momentary obstack.
2437 (get_bindings_real): Use make_tree_vec.
2438 (set_mangled_name_for_template_decl): Likewise.
2439 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2440 * semantics.c (finish_expr_stmt): Likewise.
2441 (finish_do_stmt): Likewise.
2442 (finish_for_expr): Likewise.
2443 (finish_switch_cond): Likewise.
2444 (do_pushlevel): Likewise.
2445 (do_poplevel): Likewise.
2446 * tree.c (make_temp_vec): Remove.
2448 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
2449 CLEANUP_P for a TRY_BLOCK.
2450 * ir.texi: Document SAVE_EXPR.
2452 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
2454 * call.c (build_over_call): Check that the built-in function is
2455 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2456 * typeck.c (build_function_call_real): Similarly.
2458 1999-10-26 Mark Mitchell <mark@codesourcery.com>
2460 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
2463 1999-10-24 Mark Mitchell <mark@codesourcery.com>
2465 * decl.c (push_overloaded_decl_1): Use pushdecl.
2467 * decl.c (auto_function): Replace #ifdef'd __inline with just
2469 * lex.c (my_get_run_time): Likeise.
2470 (yyprint): Likewise.
2471 (identifier_type): Likewise.
2472 * method.c (start_squangling): Likewise.
2473 (end_squangling): Likewise.
2475 (old_backref_index): Likewise.
2476 (flush_repeats): Likewise.
2477 (issue_ktype): Likewise.
2478 * parse.y (empty_parms): Likewise.
2479 * parse.c: Regenerated.
2481 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2483 * dump.c (dequeue_and_dump): Replace several uses of
2484 queue_and_dump_index with dump_child.
2486 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2488 * expr.c: Include tm_p.h.
2490 1999-10-21 Mark Mitchell <mark@codesourcery.com>
2492 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2493 (pushlevel_temporary): Remove.
2494 (add_scope_stmt): New function.
2495 * decl.c (pushlevel_temporary): Remove.
2496 (poplevel): Use add_scope_stmt.
2497 (start_decl_1): Likewise.
2498 * semantics.c (add_scope_stmt): New function.
2499 (do_pushlevel): Use it.
2500 (do_poplevel): Use it.
2501 (expand_stmt): Check SCOPE_PARTIAL_P.
2503 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2504 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2505 * expr.c (cplus_expand_expr): Expand it.
2506 * ir.texi: Document EMPTY_CLASS_EXPR.
2508 1999-10-20 Mark Mitchell <mark@codesourcery.com>
2510 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2511 parameters as having namespace scope.
2513 1999-10-19 Mark Mitchell <mark@codesourcery.com>
2515 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2516 (mangling_flags): New type.
2517 (build_overload_int): Change prototype.
2518 (build_overload_value): Likewise.
2519 (numeric_output_need_bar): Improve comment.
2520 (mangle_expression): New function, broken out from ...
2521 (build_overload_int): Here.
2522 (build_overload_value): Adjust for use of mangling flags. Don't
2523 warn about real-valued template parameters here. Do handle
2524 complex expressions involving real-valued template parameters.
2525 (build_template_parm_names): Encase non-type template parameters
2526 in underscores, if necessary.
2527 (process_overload_item): Remove conditional on
2528 PARM_CAN_BE_ARRAY_TYPE.
2530 1999-10-17 Mark Mitchell <mark@codesourcery.com>
2532 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2534 * ir.texi: Clean up documentation of RETURN_INIT.
2536 1999-10-15 Greg McGary <gkm@gnu.org>
2538 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2539 (lang_init): Set default for flag_bounds_check if still "unspecified".
2541 1999-10-13 Andrew Haley <aph@cygnus.com>
2543 * class.c (finish_struct_1): Force alignment of non-bitfields to
2546 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
2548 * typeck2.c (process_init_constructor): Handle empty constructors.
2550 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
2552 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2554 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2557 1999-10-13 Mark Mitchell <mark@codesourcery.com>
2559 * decl.c (make_rtl_for_local_static): Don't create register RTL
2560 for addressable constants.
2562 1999-10-13 Nathan Sidwell <nathan@acm.org>
2564 * cp-tree.h (build_x_va_arg): Prototype new function.
2565 * call.c (build_x_va_arg): Define it.
2566 * parse.y (unary_expr): Call build_x_va_arg.
2568 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2569 * call.c (convert_type_from_ellipsis): Define it.
2570 * decl.c (init_decl_processing): Set lang_type_promotes_to.
2572 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2574 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
2576 * class.c (fixed_type_or_null): Always set *nonnull.
2578 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2580 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2581 __GNUC__ and __GNUC_MINOR__.
2583 1999-10-09 Mark Mitchell <mark@codesourcery.com>
2585 * cp-tree.h (make_rtl_for_local_static): New function.
2586 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2588 (make_rtl_for_local_static): Here.
2589 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2591 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2593 * method.c: Include tm_p.h.
2595 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2597 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2598 * lex.c (cp_make_lake_type): Likewise.
2599 * tree.c (init_tree): Init make_lang_type_fn.
2601 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2603 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2606 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2607 local statics if we don't really have them.
2609 * ir.texi: Improve documentation for STMT_EXPR. Describe
2612 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
2614 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2616 1999-10-07 Greg McGary <gkm@gnu.org>
2618 * class.c (finish_struct_1): Use simpler method of
2619 removing elements of a singly-linked list which doesn't
2620 lose for classes without data members.
2622 1999-10-07 Mark Mitchell <mark@codesourcery.com>
2624 * friend.c (make_friend_class): Robustify.
2626 * semantics.c (finish_object_call_expr): Reject calls to template
2629 1999-10-06 Mark Mitchell <mark@codesourcery.com>
2631 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2633 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2634 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2636 * class.c (get_vfield_offset): Likewise.
2637 (finish_base_struct): Likewise.
2638 (modify_one_vtable): Likewise.
2639 (fixup_vtable_deltas): Likewise.
2640 (finish_struct_1): Likewise.
2641 * init.c (expand_virtual_init): Likewise.
2642 * search.c (lookup_field_1): Likewise.
2643 (expand_upcast_fixups): Likewise.
2644 * typeck.c (build_component_ref): Likewise.
2645 (build_binary_op_nodefault): Likewise.
2647 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2648 * ir.texi: Document TYPE_VFIELD.
2650 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
2652 * decl.c (grokdeclarator): Only warn about non-zero arrays if
2653 !in_system_header (linux socketbits.h can give this for
2654 __cmsg_data, which is using a GNU extension).
2656 1999-10-05 Mark Mitchell <mark@codesourcery.com>
2658 * decl2.c (start_static_storage_duration_function): Push the
2659 function declaration so it ends up in namespace scope.
2661 * dump.c (DUMP_CHILDREN): Remove.
2662 (DUMP_BINFO): Adjust.
2663 (struct dump_node_info): Remove dump_children_p.
2664 (queue_and_dump_type): Remove dump_children_p parameter.
2665 (queue): Don't set dump_children_p.
2666 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2667 queue_and_dump_index.
2668 (dequeue_and_dump): Unconditionally print children. Adjust calls
2669 to functions mentioned above.
2670 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2672 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2673 * dump.c (dequeue_and_dump): Dump them.
2675 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2677 * decl.c (start_function): Set current_in_charge_parm for
2678 constructors, too, where appropriate.
2679 * search.c (fixup_all_virtual_upcast_offsets): New function.
2680 (expand_indirect_vtbls_init): Use it.
2682 1999-10-04 Nathan Sidwell <nathan@acm.org>
2684 * decl2.c (grok_alignof): Don't decay lvalues.
2686 * init.c (build_new): Remove unused variable.
2688 1999-10-04 Mark Mitchell <mark@codesourcery.com>
2690 * cp-tree.h (struct language_function): Remove static_labelno.
2691 (static_labelno): Remove macro.
2692 * method.c (build_overload_nested_name): Make static_labelno
2695 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2696 to decide whether or not a function is defined.
2698 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2699 situations where make_node will do it automatically.
2700 * decl.c (grok_reference_init): Likewise.
2701 (expand_static_init): Likewise.
2702 (do_static_initialization): Likewise.
2703 * init.c (perform_member_init): Likewise.
2704 (expand_aggr_init_1): Likewise.
2705 (build_new_1): Likewise.
2706 * method.c (do_build_copy_constructor): Likewise.
2707 (do_build_assign_ref): Likewise.
2708 * search.c (expand_upcast_fixups): Likewise.
2709 * semantics.c (finish_stmt_expr): Likewise.
2710 * typeck.c (build_unary_op): Likewise.
2711 (check_return_expr): Likewise.
2713 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
2715 * init.c (build_vec_delete_1): Fold COND_EXPRs.
2717 1999-10-03 Mark Mitchell <mark@codesourcery.com>
2719 * cp-tree.def (VEC_INIT_EXPR): Remove.
2720 * cp-tree.h (struct stmt_tree): New type.
2721 (struct saved_scope): Remove firstobj. Add x_saved_tree,
2723 (class_cache_firstobj): Remove.
2724 (struct language_function): Remove stmts_are_full_exprs_p,
2725 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
2726 (current_stmt_tree): New macro.
2727 (last_tree): Adjust.
2728 (last_expr_type): Likewise.
2729 (doing_semantic_analysis_p): Simplify.
2730 (stmts_are_full_exprs_p): Adjust.
2731 (begin_tree): Remove prototype.
2732 (end_tree): Likewise.
2733 (begin_stmt_tree): Change prototype.
2734 (finish_stmt_tree): Likewise.
2735 (building_stmt_tree): Simplify.
2736 * decl.c (mark_stmt_tree): New function.
2737 (mark_saved_scope): Use it.
2738 (start_function): Rearrange slightly to call begin_stmt_tree
2740 (save_function_data): Tweak.
2741 (finish_function): Adjust call to finish_stmt_tree.
2742 (mark_lang_function): Use mark_stmt_tree.
2743 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2744 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2745 (build_vec_init): Remove creation of stand-in intializer.
2746 * pt.c (begin_tree): Remove.
2747 (end_tree): Likewise.
2748 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
2749 (begin_compound_stmt): Handle a compound-statement outside of a
2751 (begin_stmt_expr): Handle a statement-expression outsidef of a
2753 (finish_stmt_expr): Likewise.
2754 (begin_class_definition): Don't call begin_tree.
2755 (finish_inline_definitions): Don't call end_tree.
2756 (begin_stmt_tree): Take a pointer to tree, not a function as input.
2757 (finish_stmt_tree): Likewise.
2758 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2761 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2762 * parse.c: Regenerated.
2764 * dump.c (dqueue_and_dump): Dump bitfieldness.
2766 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2767 bitfields, rather than DECL_BIT_FIELD.
2768 * ir.texi: Document how to tell whether or not a field is a
2771 * lex.c (make_lang_type): Fix typo in comment.
2773 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
2775 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2777 1999-10-01 Mark Mitchell <mark@codesourcery.com>
2779 * pt.c (tsubst_decl): If the type of a template instantiation is
2780 bogus, so is the whole instantiation.
2782 1999-09-30 Mark Mitchell <mark@codesourcery.com>
2784 * decl.c (initialize_local_var): Handle static variables here.
2785 (cp_finish_decl): Tweak handling of function-scope static
2787 * semantics.c (expand_stmt): Handle DECL_STMTs for static
2790 * method.c (emit_thunk): Don't crash when -fsyntax-only.
2792 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2793 global_dtor_p. Add init_priority.
2794 (DECL_ACCESS): Adjust accordingly.
2795 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2796 (GLOBAL_INIT_PRIORITY): Likewise.
2797 * decl.c (lang_mark_tree): Adjust accordingly.
2798 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
2799 and GLOBAL_INIT_PRIORITY.
2800 * dump.c (dequeue_and_dump): Print them.
2801 * ir.texi: Document them.
2803 * decl2.c (struct priority_info_s): Remove initialization_sequence
2804 and destruction_sequence.
2805 (start_static_storage_duration_function): Return the body of the
2806 function. Convert for function-at-a-time mode.
2807 (generate_inits_for_priority): Remove.
2808 (finish_static_storage_duration_function): Change prototype.
2809 Adjust for function-at-a-time mode.
2810 (do_static_initialization): Likewise.
2811 (do_static_destruction): Likewise.
2812 (do_static_initialization_and_destruction): Remove.
2813 (start_static_initialization_or_destruction): New function.
2814 (finish_static_initialization_or_destruction): Likewise.
2815 (get_priority_info): Don't manipulation initialization_sequence or
2816 destruction_sequence.
2817 (prune_vars_needing_no_initialization): New function.
2818 (write_out_vars): Likewise.
2819 (finish_file): Use the various new functions instead of the old.
2821 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
2823 * cp-tree.h (warn_float_equal): Declare.
2824 * decl2.c (warn_float_equal): Define.
2825 (lang_decode_option): Recognize -W[no-]float-equal.
2826 * typeck.c (build_binary_op_nodefault): Conditionally warn
2827 about equality tests of floating point types.
2829 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
2831 Support normal type_info-based EH mechanisms with -fno-rtti.
2832 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2833 (build_eh_type_type_ref): Likewise.
2834 (build_eh_type): Remove.
2835 (expand_throw): Call build_eh_type_type, not build_eh_type.
2836 * decl2.c (import_export_decl): Don't associate the tinfo fn with
2837 the vtable if -fno-rtti.
2838 * decl.c (init_decl_processing): Always init_rtti_processing.
2840 * rtti.c (get_typeid): Don't complain about -fno-rtti.
2842 * class.c (class_cache_obstack, class_obstack): Remove.
2843 (init_class_processing): Don't initialize class_obstack.
2844 (push_cache_obstack): Remove.
2845 (pushclass): Don't call it.
2846 * cp-tree.h: Remove prototype for push_cache_obstack.
2847 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2848 (pushlevel_class): Don't push_decl_level.
2849 (poplevel_class): Don't pop_stack_level.
2850 (push_class_level_binding): Don't push_cache_obstack.
2851 (init_decl_processing): Don't intialize decl_obstack.
2852 * search.c (push_class_decls): Don't push_cache_obstack.
2853 * tree.c (list_hash_add): Put hash node on permanent_obstack.
2854 (hash_tree_cons): Don't mess with obstacks.
2855 (print_lang_statistics): Don't print stats for class_obstack and
2858 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2860 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2861 * ir.texi: Document DECL_EXTERNAL.
2863 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2864 * ir.texi: Document THUNK_DECLs.
2866 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2867 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2868 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2869 * error.c (dump_template_bindings): Remove unused parameter.
2870 Handle multiple levels of template parameters.
2871 (dump_template_decl): Use `parms', not `args', for template
2872 parameters. Fix thinko.
2873 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
2874 flags to dump_template_bindings.
2875 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2876 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2877 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2878 (tsubst_copy): Clarify variable name.
2879 (most_general_template): Robustify.
2881 1999-09-29 Nathan Sidwell <nathan@acm.org>
2883 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2884 to change primary template rendering.
2886 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2888 * cp-tree.h (UPT_TEMPLATE): Remove.
2889 (UPT_PARMS): Likewise.
2890 (DECL_NEEDED_P): New macro.
2891 * decl2.c (finish_vtable_vardecl): Use it.
2892 (finish_objects): Don't crash with -fsyntax-only.
2893 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
2895 * pt.c (tsubst_friend_function): Remove FIXME that talks about
2897 (tsubst_expr): Correct handling of function try-blocks.
2898 * semantics.c: Include flags.h.
2899 (expand_body): Don't do RTL generation if -fsyntax-only.
2900 * Makefile.in (semantics.o): Depends on flags.h.
2902 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
2904 * pt.c (most_general_template): Adjust declaration.
2906 * cp-tree.h: (most_general_template): Declare.
2908 * error.c (dump_template_value): Rename to ...
2909 (dump_template_argument): This.
2910 (dump_template_argument_list): New function.
2911 (dump_type): Use it.
2912 (dump_template_parameter): New function.
2913 (dump_template_decl): Use it.
2914 (dump_template_bindings): New function.
2915 (dump_function_decl): Use it. Pretty print function template
2918 1999-09-28 Nathan Sidwell <nathan@acm.org>
2920 * decl.c (grokdeclarator): Distinguish parameter context for
2921 diagnostics. Tidy up missing type diagnostic.
2922 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
2924 1999-09-28 Mark Mitchell <mark@codesourcery.com>
2926 * ir.texi: Improve documentation for TARGET_EXPR.
2928 1999-09-27 Nathan Sidwell <nathan@acm.org>
2930 Augment stringification of trees.
2931 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
2932 (fndecl_as_string, type_as_string_real, args_as_string,
2933 code_as_string, language_as_string, parm_as_string,
2934 op_as_string, assop_as_string, cv_as_string): Remove.
2935 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
2936 (context_as_string): Declare new function.
2937 * error.c (cp_printers): Move definition.
2939 (OB_END_TEMPLATE_ID): Adjust.
2940 (interesting_scope_p): Remove.
2941 (dump_scope): New static function.
2942 (dump_qualifiers): Adjust prototype, reimplement.
2943 (dump_template_value): Use tree_string_flags.
2944 (dump_type_real): Move back to dump_type.
2945 (dump_type): Adjust prototype. Use tree_string_flags.
2946 (dump_aggr_type): Likewise. Use dump_template_parms.
2947 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
2949 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
2950 (dump_simple_decl): Likewise.
2951 (dump_decl): Likewise. Use dump_template_decl.
2952 (dump_template_decl): New static function broken out of dump_decl.
2953 (dump_function_decl): Adjust prototype. Use tree_string_flags.
2954 (dump_parameters): Likewise. Prefix space.
2955 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
2956 (dump_function_name): Likewise. Use dump_template_parms.
2957 (dump_template_parms): New static function broken out of
2959 (dump_expr_list): Adjust prototype. Use tree_string_flags.
2960 (dump_expr): Likewise.
2961 (fndecl_as_string): Removed
2962 (type_as_string_real): Removed
2963 (dump_binary_op): Adjust prototype. Use tree_string_flags.
2964 (dump_unary_op): Likewise.
2965 (type_as_string): Likewise.
2966 (expr_as_string): Likewise.
2967 (decl_as_string): Likewise.
2968 (context_as_string): New function.
2969 (lang_decl_name): Adjust.
2970 (decl_to_string): New static print callback.
2971 (expr_to_string): Likewise.
2972 (fndecl_to_string): Likewise.
2973 (code_as_string): Renamed to ...
2974 (code_to_string): ... here. Adjust.
2975 (language_as_string): Renamed to ...
2976 (language_to_string): ... here. Adjust.
2977 (parm_as_string): Renamed to ...
2978 (parm_to_string): ... here.
2979 (op_as_string): Renamed to ...
2980 (op_to_string): ... here.
2981 (assop_as_string): Renamed to ...
2982 (assop_to_string): ... here.
2983 (type_to_string): New static print callback.
2984 (args_as_string): Renamed to ...
2985 (args_to_string): ... here. Adjust.
2986 (cv_as_string): Renamed to ...
2987 (cv_to_string): ... here. Adjust.
2988 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
2989 (print_template_context): Likewise.
2991 1999-09-26 Mark Mitchell <mark@codesourcery.com>
2993 * cp-tree.h (expand_throw): Remove prototype.
2994 * except.c (expand_throw): Make it static. Use tree-generation
2995 functions, rather than RTL-generation functions.
2996 (build_throw): Use it.
2997 * expr.c: Include except.h.
2998 (cplus_expand_expr): Don't call expand_throw here.
2999 * Makefile.in (expr.o): Depend on except.h.
3000 * ir.texi: Update documentation for THROW_EXPR.
3002 * decl.c (start_function): Set x_dont_save_pending_sizes rather
3003 than calling get_pending_sizes.
3004 * init.c (build_new): Don't save and restore
3005 immediate_size_expand; instead, assert that it has the expected
3008 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3010 * lex.c (compiler_error): Add missing call to va_end().
3012 1999-09-25 Mark Mitchell <mark@codesourcery.com>
3014 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3015 * ir.texi: Document RESULT_DECL and DECL_RESULT.
3017 * cp-tree.h (check_return_expr): New function.
3018 * decl.c (finish_constructor_body): New function.
3019 (pushdecl): Put global friend functions in namespace binding
3020 level, not the class binding level.
3021 (finish_destructor_body): Make sure the dtor_label is always
3022 defined. Fix typo in comment.
3023 (finish_function): Move generation of constructor-termination code
3024 to semantic-analysis time. Move generation of implicit `main'
3025 return value to semantic-analysis time.
3026 * semantics.c (finish_return_stmt): Generate goto's to
3027 ctor_label/dtor_label here. Use check_return_expr to do semantic
3028 analysis on the returned expression.
3029 * typeck.c (maybe_warn_about_returning_address_of_local): New
3030 function split out from c_expand_return.
3031 (check_return_expr): Likewise.
3032 (c_expand_return): Just generate the RTL for the return.
3034 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3036 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3037 (cleanup_type): Likewise.
3038 (search_tree): Change prototype.
3039 * decl.c (local_variable_p): Adjust for new interface to
3041 (check_default_argument): Likewise.
3042 * error.c (dump_expr): Handle INIT_EXPR.
3043 * except.c (expand_throw): Don't make cleanup_type a local static.
3044 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3045 * init.c (build_new): Call build_new_1 directly, rather than
3046 building a NEW_EXPR.
3047 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
3048 processing file-scope initializers.
3049 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3050 * tree.c: Include splay-tree.h
3051 (no_linkage_helper): Adjust for new interface to search_tree.
3052 (search_tree): Pass around pointers to tree nodes, rather than the
3053 nodes themselves. Handle VEC_INIT_EXPR.
3054 (no_linkage_check): Adjust for new interface to search_tree.
3055 (mapcar): Handle VEC_INIT_EXPR.
3056 (target_remap): New variable.
3057 (bot_manip): Use it.
3058 (bot_replace): New function.
3059 (break_out_target_exprs): Use it to remap all variables used in a
3060 default argument expression.
3061 * typeck.c (build_modify_expr): Don't crash when outside a
3062 function and presented with an INIT_EXPR assignment
3063 * Makefile.in (tree.o): Depend on splay-tree.h.
3065 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3067 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3069 (builtin_function): New arg CLASS. Arg CODE now of type int. All
3071 Set the builtin's DECL_BUILT_IN_CLASS.
3073 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3075 * decl.c (pushdecl): Don't make local declarations of extern
3076 variables give the variable a DECL_CONTEXT for the function.
3077 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
3078 Don't accidentally make RTL for local declarations.
3079 (emit_local_var): Handle declarations with asm-specifiers here.
3081 1999-09-23 Mark Mitchell <mark@codesourcery.com>
3083 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
3084 STMT_IS_FULL_EXPR_P.
3086 * cp-tree.h (language_function): Add cannot_inline.
3087 * decl.c (start_function): Restore current_function_cannot_inline
3088 from the saved value.
3089 (save_function_data): Save current_function_cannot_inline.
3090 * decl2.c (start_objects): Change prototype. Build the function
3091 in function-at-a-time mode.
3092 (finish_objects): Likewise.
3093 (generate_ctor_or_dtor_function): Adjust accordingly.
3095 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3096 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3097 Don't call expand_anon_union_decl here
3098 * semantics.c (exapnd_stmt): Call it here, instead.
3099 * typeck.c (mark_addressable): Addressed variables are implicitly
3102 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3104 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3105 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3106 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3107 * cp-tree.h: Add tree checking macros to various tree access
3109 * ptree.c (print_lang_decl): Test for function or variable
3110 before accessing template info.
3112 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
3114 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3115 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3116 * decl2.c (lang_f_options): Add -fshort-wchar.
3117 * cp-tree.h: Declare flag_short_wchar.
3118 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
3121 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3123 * ir.texi: Fix formatting errors and typos.
3125 1999-09-22 Mark Mitchell <mark@codesourcery.com>
3127 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3129 * decl.c (pushdecl): Do create a binding for extern "C" functions,
3130 but not for their DECL_ASSEMBLER_NAMEs.
3131 (lookup_name_current_level): Fix formatting.
3132 (xref_tag): Likewise.
3133 * decl2.c (start_objects): Mark static constructors and
3134 destructors as used.
3136 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
3138 * decl.c (define_case_label): Don't crash if we're not in a switch.
3140 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3141 * lang-options.h: Restore -fthis-is-variable. Remove help strings
3142 for unsupported flags.
3144 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
3146 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3147 Accept and warn about -fthis-is-variable.
3149 1999-09-21 Mark Mitchell <mark@codesourcery.com>
3151 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3152 CLEANUP_STMT, and SCOPE_STMT.
3154 * decl2.c (lang_decode_option): Adjust, in the wake of recent
3155 changes to option processing.
3157 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3159 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3160 function pointer from pmfs with no object given.
3161 (convert_for_assignment): Do not return error when converting
3164 1999-09-21 Alex Samuel <samuel@codesourcery.com>
3166 * lex.c (internal_filename): New variable.
3167 (INTERNAL_FILENAME): New macro.
3168 (init_parse): Allocate internal_filename and mark as root. Use it
3169 instead of a string constant.
3171 1999-09-21 Nathan Sidwell <nathan@acm.org>
3173 Reimplement dynamic cast and catch matching.
3174 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3175 * search.c (dynamic_cast_base_recurse): New function.
3176 (get_dynamic_cast_base_type): New function for dynamic cast.
3177 * rtti.c (build_dynamic_cast_1): Determine source and target
3178 class relationship. Call __dynamic_cast_2.
3179 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3180 (__user_type_info::dyncast): New dynamic cast dispatcher.
3181 (__user_type_info::sub_kind): New nested enumeration.
3182 (__user_type_info::contained_p): sub_kind predicate.
3183 (__user_type_info::contained_public_p): Likewise.
3184 (__user_type_info::contained_nonpublic_p): Likewise.
3185 (__user_type_info::contained_nonvirtual_p: Likewise.
3186 (__user_type_info::upcast_result): New nested struct.
3187 (__user_type_info::dyncast_result): New nested struct.
3188 (*::do_upcast): New catch function.
3189 (*::do_dyncast): New dynamic cast function.
3190 (__user_type_info::find_public_subobj): New dynamic cast
3192 (*::do_find_public_subobj): New dynamic cast helper function.
3193 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3194 (__user_type_info::dyncast): Define dynamic cast dispatcher.
3195 (*::do_upcast): Define catch function.
3196 (*::do_dyncast): Define dynamic cast function.
3197 (*::do_find_public_subobj): Define dynamic cast helper function.
3198 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3199 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3200 (__dynamic_cast_2): New dynamic cast runtime.
3202 1999-09-20 Mark Mitchell <mark@codesourcery.com>
3204 * cp-tree.h (finish_stmt_expr): Change prototype.
3205 * expr.c (cplus_expand_expr): Adjust call accordingly.
3206 * init.c (finish_init_stmts): Likewise.
3207 * parse.y (primary): Likewise.
3208 * pt.c (tsubst_copy): Likewise.
3209 * semantics.c (finish_stmt_expr): Don't take two parameters.
3210 Don't remove generated BLOCKs from the block-tree.
3212 Remove support for assigning to `this'.
3213 * NEWS: Note that fact.
3214 * class.c (build_vbase_path): Don't check flag_this_is_variable.
3215 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3216 (language_function): Remove assigns_this, just_assigned_this, and
3217 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
3218 (base_init_expr): Remove.
3219 (current_vcalls_possible_p): New macro.
3220 (vtbls_set_up_p): Likewise.
3221 (emit_base_init): Change prototype.
3222 * decl.c (finish_destructor_body): New function, split out from
3224 (current_function_assigns_this): Remove.
3225 (current_function_just_assigned_this): Likewise.
3226 (start_function): Don't set them.
3227 (finish_function): Don't check them. Don't emit
3228 base-initialization code here. Generate code for destructors when
3229 doing semantic analysis.
3230 (finish_stmt): Don't check current_function_just_assigned_this.
3231 * decl2.c (lang_f_options): Remove this-is-variable.
3232 (lang_decode_option): Likewise.
3233 (grokclassfn): Don't check flag_this_is_variable.
3234 * init.c (emit_base_init): Return the expression generated.
3235 (construct_virtual_bases): Don't push/pop obstacks. Fix
3237 (build_new_1): Don't check flag_this_is_variable.
3238 (get_temp_regvar): Don't set DECL_REGISTER.
3239 (build_vec_init): Don't call use_variable.
3240 * lang-options.h: Remove "-fthis-is-variable" and
3241 "-fno-this-is-variable".
3242 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3243 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3245 * semantics.c (finish_expr_stmt_real): Rename to ...
3246 (finish_expr_stmt): This. Remove assigned_this parameter.
3247 (begin_if_stmt): Call do_pushlevel before starting the statement.
3248 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3250 (setup_vtbl_ptr): Emit initialization code for bases and members
3251 at semantic-analysis time. Emit code to initialize vtables in
3253 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3254 Don't handle CTOR_INITIALIZER any more.
3255 * typeck.c (build_modify_expr): Don't check for assignments to
3257 (c_expand_return): Don't suggest assigning to `this'.
3259 * Makefile.in (decl.o): Depend on RTL_H.
3260 (decl2.o): Likewise.
3261 (class.o): Likewise.
3263 (method.o): Likewise.
3264 (search.o): Likewise.
3268 * decl.c (duplicate_decls): When a builtin function is redeclared
3269 as static, make sure it is mangled correctly.
3271 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
3272 detail about the statement-tree.
3274 1999-09-20 Nathan Sidwell <nathan@acm.org>
3276 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3278 1999-09-20 Nick Clifton <nickc@cygnus.com>
3280 * decl2.c (lang_decode_option): Extend comment.
3282 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3284 * typeck.c: Include "tm_p.h".
3286 1999-09-19 Mark Mitchell <mark@codesourcery.com>
3288 * ir.texi: New file.
3290 1999-09-19 Paul Burchard <burchard@pobox.com>
3292 * semantics.c (expand_stmt): Initialize return value.
3294 1999-09-18 Paul Burchard <burchard@pobox.com>
3296 * gxxint.texi: G++ now implements namespaces.
3298 1999-09-18 Mark Mitchell <mark@codesourcery.com>
3300 * decl.c (pop_label): Don't warn about unused labels more than
3302 * semantics.c (finish_goto_stmt): Always marked used labels as
3305 * decl.c (layout_var_decl): Change prototype. Call layout_decl
3306 even when the declaration is external.
3307 (cp_finish_decl): Adjust call to layout_var_decl.
3308 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3310 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
3312 * typeck.c (get_member_function_from_ptrfunc): Always consider
3313 virtuality inside member pointer.
3315 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3317 Turn on function-at-a-time processing.
3318 * cp-tree.h (doing_semantic_analysis_p): New macro.
3319 (SF_DEFAULT): Define to zero, not SF_EXPAND.
3320 (start_handler_parms): Change prototype.
3321 (expand_start_catch_block): Likewise.
3322 (expand_end_catch_block): Likewise.
3323 (expand_start_eh_spec): Likewise.
3324 (expand_end_eh_spec): Declare.
3325 (finish_handler_parms): Change prototype.
3326 (begin_catch_block): Declare.
3327 (finish_handler): Change prototype.
3328 (do_pushlevel): Declare.
3329 (do_poplevel): Likewise.
3330 * decl.c (pushlevel): Don't create
3331 binding levels when not doing semantic analysis.
3332 (poplevel): Don't pop them.
3333 (pushdecl): Assert that we are never called when not doing
3335 (pushdecl_top_level): Use push_to_top_level.
3336 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
3337 label when expanding.
3338 (cp_finish_decl): Only inject for-scope variables when doing
3339 semantic analysis. Add comments.
3340 (start_handler_parms): Return the handler parm.
3341 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
3342 already set. Reinitialize from saved function data if available.
3343 Don't pushlevel when not doing semantic analysis.
3344 (store_parm_decls): Only generate RTL when expanding. Only
3345 pushdecl when doing semantic analysis. Set
3346 current_eh_spec_try_block if appropriate.
3347 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
3348 Combine common code. Don't poplevel when not doing semantic
3350 (push_cp_function_context): Don't expand functions without an
3351 explicit call to expand_body.
3352 (mark_lang_function): Make eh_spec_try_block and
3354 * except.c (expand_end_eh_spec): Don't
3356 (process_start_catch_block): Likewise.
3357 (push_eh_cleanup): Use finish_decl_cleanup.
3358 (initialize_handler_parm): New function.
3359 (expand_start_catch_block): Use it.
3360 (expand_end_catch_block): Use tree-generation functions, not
3361 RTL-generation functions.
3362 (expand_start_eh_spec): Likewise.
3363 (expand_end_eh_spec): Likewise.
3364 (expand_exception_blocks): Simplify.
3365 (start_anon_func): Use do_pushlevel.
3366 (end_anon_func): Use do_poplvel. Call expand_body for the
3368 * expr.c (do_case): Don't call define_case_label.
3369 * init.c (create_temporary_var): Set DECL_CONTEXT for local
3371 * method.c (emit_thunk): Call expand_body for the
3373 (sythesize_method): Likewise.
3374 * parse.y (handler_args): Give it ttype.
3375 (eat_saved_input): Call expand_body.
3376 (base_init): Use do_pushlevel.
3377 (pending_inline): Call expand_body.
3378 (handler): Adjust calls to finish_handler_parms and
3380 (handler_args): Don't call expand_start_catch_block. Return the
3381 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
3382 * parse.c: Regenerated.
3383 * rtti.c (synthesize_tinfo_fn): Call finish_function.
3384 * semantics.c (do_pushlevel): Give it external linkage. Build
3386 (do_poplevel): Likewise.
3387 (finish_case_label): Call define_case_label when doing semantic
3389 (finish_goto_stmt): Create RTL for labels.
3390 (finish_function_try_block): Set in_function_try_handler
3392 (finish_function_handler_sequence): Unset it.
3393 (finish_handler_parms): Use expand_start_catch_block even when
3394 building a statement-tree.
3395 (begin_catch_block): New function.
3396 (finish_handler): Move a little RTL-generation logic here.
3397 (finish_decl_cleanup): Allow cleanups for empty declarations.
3398 (finish_named_return_value): Don't pushdecl when not doing
3400 (expand_stmt): Don't do semantic analysis for variable
3401 declarations. Handle START_CATCH_STMT. Call expand_label
3402 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
3403 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3404 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3405 RETURN_INIT and function try blocks.
3407 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
3408 x_scope_stmt_stack. Add x_in_charge_parm.
3409 (current_eh_spec_try_block): New macro.
3410 (current_scope_stmt_stack): Likewise.
3411 (current_in_charge_parm): Likewise.
3412 * decl.c (start_function): Initialize current_in_charge_parm.
3413 (finish_function): Use current_in_charge_parm rather than looking
3415 * search.c (expand_indirect_vtbls_init): Likewise.
3417 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3418 (TRY_BLOCK): Likewise.
3419 (HANDLER): Likewise.
3420 (START_CATCH_STMT): New tree node.
3421 (SCOPE_STMT): Likewise.
3422 * cp-tree.h (SCOPE_BEGIN_P): New macro.
3423 (SCOPE_NULLIFIED_P): Likewise.
3424 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
3425 (struct lang_decl): Add saved_language_function.
3426 (DECL_PENDING_INLINE_INFO): Adjust documentation.
3427 (DECL_PENDING_INLINE_P): New macro.
3428 (TYPE_TI_ARGS): Fix typo in comment.
3429 (DECL_SAVED_TREE): Add to documentation.
3430 (DECL_SAVED_FUNCTION_DATA): New macro.
3431 (START_CATCH_TYPE): Likewise.
3432 (SCOPE_END_P): New macro.
3433 (declare_parm_level): Don't declare.
3434 * decl.c (mark_lang_function): New function, split out from
3435 mark_cp_function_context.
3436 (save_function_data): New function.
3437 (declare_parm_level): Remove.
3438 (finish_function): Use save_function_data to squirrel away
3439 important stuff for later use.
3440 (mark_cp_function_context): Use mark_function_data.
3441 (lang_mark_tree): Likewise.
3442 * lex.c (begin_definition_of_inclass_inline): Set
3443 DECL_PENDING_INLINE_P.
3444 (store_pending_inline): Clear it.
3445 * pt.c (tsubst_decl): Likewise.
3447 1999-09-17 Nathan Sidwell <nathan@acm.org>
3449 * call.c (perform_implicit_conversion): Deal with error_mark_node.
3451 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3453 * decl.c (warn_extern_redeclared_static): Don't get confused by
3454 static member functions.
3455 (duplicate_decls): Merge DECL_THIS_STATIC.
3457 * decl.c (expand_static_init): Make sure assignments to local
3458 statics actually occur.
3460 1999-09-17 Mark Mitchell <mark@codesourcery.com>
3462 * cp-tree.h (poplevel_class): Declare.
3463 * class.c (popclass): Use poplevel_class, not poplevel.
3464 * decl.c (poplevel_class): Don't make it static. Don't return a
3466 (poplevel): Don't call poplevel_class; abort in a class
3467 binding level is seen.
3468 * semantics.c (finish_translation_unit): Use pop_everything.
3469 * parse.y (member_init): Allow errors.
3470 (pending_inline): Call finish_function.
3471 * parse.c: Regenerated.
3472 * Makefile.in (CONFLICTS): Adjust.
3474 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
3476 * error.c: Reduce code duplication.
3477 (dump_template_value): New function.
3478 (dump_type_real): Use it.
3479 (dump_decl): Likewise.
3480 (dump_function_name): Likewise.
3481 (dump_function_decl): Don't be too talkative about function return
3484 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3486 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3488 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3490 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
3492 * decl2.c (finish_file): Also call check_global_declarations for
3493 the pending_statics list.
3495 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
3497 * lex.c (cp_pragma_implementation): Allow #pragma implementation
3500 1999-09-15 Richard Henderson <rth@cygnus.com>
3502 * lex.c (mark_impl_file_chain): Follow the next chain.
3504 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3506 * decl.c (warn_extern_redeclared_static): Simplify. Catch
3507 problems with extern "C" functions redeclared as static.
3508 (duplicate_decls): When a builtin is redeclared static, make the
3509 new function have internal linkage.
3511 1999-09-15 Mark Mitchell <mark@codesourcery.com>
3513 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3514 * pt.c (tsubst_copy): Likewise.
3515 * tree.c (search_tree): Likewise.
3518 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3520 * typeck2.c (ack): Don't declare progname.
3522 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3524 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3525 filenames with ggc_alloc_string.
3527 1999-09-14 Mark Mitchell <mark@codesourcery.com>
3529 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
3531 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3533 * cvt.c (build_up_reference): Likewise.
3534 * tree.c (build_cplus_new): Likewise.
3535 (get_target_expr): Likewise.
3537 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
3539 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
3541 1999-09-13 Mark Mitchell <mark@codesourcery.com>
3543 * cp-tree.h (build_target_expr): New function.
3544 * call.c (build_conditional_expr): Use build_target_expr.
3545 (convert_like): Likewise.
3546 (build_over_call): Likewise.
3547 * cvt.c (build_up_reference): Likewise.
3548 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3549 (destroy_local_var): Here.
3550 (build_target_expr): New function.
3551 * tree.c (build_cplus_new): Use it.
3552 (get_target_expr): Likewise.
3554 1999-09-13 Nathan Sidwell <nathan@acm.org>
3556 * typeck.c (expr_sizeof): Don't decay arrays and functions.
3557 Remove misleading comment.
3558 (build_compound_expr): Don't decay arrays.
3560 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
3562 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3563 class rvalues again.
3565 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3567 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3569 * g++spec.c: Include gcc.h.
3570 (lang_specific_driver): Constify a char*. Call xcalloc, not
3571 xmalloc/bzero. All calls to the function pointer parameter now
3572 explicitly call `fatal'.
3574 1999-09-12 Mark Mitchell <mark@codesourcery.com>
3576 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
3577 * cvt.c (ocp_convert): Complete the from and destination types.
3578 Adjust warning about functions always being `true' in conditionals.
3579 * decl.c (duplicate_decls): Don't play funny games with abort.
3580 * error.c (dump_expr): Handle OVERLOADs.
3581 * spew.c (probe_obstack): Remove.
3582 * typeck.c (condition_conversion): Use perform_implicit_conversion.
3584 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
3586 * cp-tree.h (auto_function, define_function): Adjust prototypes.
3587 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
3589 (auto_function): Likewise, for CODE arg.
3590 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3591 (builtin_function): ... here.
3593 1999-09-11 Mark Mitchell <mark@codesourcery.com>
3595 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3596 (init_decl_processing): Don't set TREE_PERMANENT for the
3598 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3599 (grokdeclarator): Likewise.
3600 (grokparms): Don't check TREE_PERMANENT when building up lists.
3601 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3602 (mark_inline_for_output): Likewise.
3603 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3604 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3605 * lex.c (check_newline): Don't check ggc_p; it is always one.
3606 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3607 * spew.c (yylex): Don't copy_node or probe_obstacks for
3608 non-permanent CONSTANTs and STRINGs.
3609 * tree.c (build_cplus_array_type_1): Don't fuss with
3610 TREE_PERMANENT on ARRAY_TYPEs.
3612 * cp-tree.def (CLEANUP_STMT): New node.
3613 * cp-tree.h (language_function): Add name_declared.
3614 (current_function_name_declared): New macro.
3615 (CLEANUP_DECL): New macro.
3616 (CLEANUP_EXPR): Likewise.
3617 (emit_local_var): Likewise.
3618 (finish_decl_cleanup): New function.
3619 * cvt.c (build_up_reference): Simplify.
3620 (ocp_convert): Remove dead code.
3621 * decl.c (start_decl): Remove call to add_decl_stmt.
3622 (grok_reference_init): Adjust, to handle bindings temporaries to
3623 references. Remove dead code.
3624 (initialize_local_var): Don't generate RTL for
3625 declarations here, or build cleanups here. Don't fuss with
3626 obstacks. Replace expand_start_target_temps calls with explicit
3627 setting of stms_are_full_exprs_p.
3628 (destroy_local_var): New function.
3629 (emit_local_var): Likewise.
3630 (cp_finish_decl): Use them, as appropriate.
3631 (start_function): Announce template functions.
3632 (store_parm_decls): Don't call declare_function_name here.
3633 (finish_stmt): Don't start emit base-initialization code when just
3634 building the statement-tree.
3635 * init.c (create_temporary_var): Move add_decl_stmt call ...
3636 (get_temp_regvar): Here.
3637 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3638 cp_finish_decl would expect. Don't call add_decl_stmt.
3639 * semantics.c (begin_compound_stmt): Call declare_function_name,
3641 (finish_decl_cleanup): New function.
3642 (expand_stmt): Use emit_local_var to output variables.
3643 (expand_body): Set current_funtion_name_declared.
3645 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3647 * cp-tree.h (finish_cleanup_try_block): New function.
3648 * semantics.c (finish_cleanup_try_block): Add comment.
3650 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3652 * cp-tree.h: Delete declarations for all tree nodes now moved to
3654 * decl.c: Delete their definitions.
3655 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3656 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3658 (init_decl_processing): Call build_common_tree_nodes and
3659 build_common_tree_nodes_2 instead of building their nodes here.
3660 Don't add gc roots for them.
3662 1999-09-10 Mark Mitchell <mark@codesourcery.com>
3664 * cp-tree.h (language_function): Rename expanding_p to
3665 x_expanding_p. Rename named_label_uses to x_named_label_uses.
3666 (expanding_p): Adjust accordingly.
3667 (TREE_VIA_PRIVATE): Fix typo in comment.
3668 (DECL_REFERENCE_SLOT): Remove.
3669 (SET_DECL_REFERENCE_SLOT): Likewise.
3670 * decl.c (named_label_uses): Adjust. Remove chicken comment.
3671 (push_overloaded_decl): Don't truncate the chain of bindings when
3672 adding an overloaded function.
3673 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3674 (initialize_local_var): Fix typo in comment.
3675 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
3676 * decl2.c (start_objects): Make the fact that we are expanding
3677 the generated function right away explicit.
3678 (start_static_storage_duration_function): Likewise.
3679 (finish_file): Fix typo in comment.
3680 * init.c (build_vec_init): Correct bugs in handling cleanups.
3681 * semantics.c (maybe_convert_cond): New function.
3682 (FINISH_COND): Always store the condition, even if there's
3684 (finish_if_stmt_cond): Use maybe_convert_cond.
3685 (finish_while_stmt_cond): Likewise.
3686 (finish_do_stmt): Likewise.
3687 (finish_for_cond): Likewise.
3688 (expand_cond): Adjust.
3690 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3691 * init.c (perform_member_init): Remove obstack machinations.
3692 (expand_cleanup_for_base): Likewise.
3693 (finish_init_stmts): Mark the statement-expression as used.
3694 * method.c (emit_thunk): Use tree-generating functions, not
3696 (do_build_copy_constructor): Likewise.
3697 (do_build_assign_ref): Likewise.
3698 (synthesize_method): Likewise. Keep track of line numbers.
3699 * pt.c (tsubst_expr): Handle various kinds of try blocks.
3700 * semantics.c (expand_stmts): Remove.
3701 (begin_function_try_block): Set FN_TRY_BLOCK_P.
3702 (finish_function_try_block): Be careful rechaining
3703 function try blocks.
3704 (expand_stmt): Loop through all the statements at a given level.
3705 (exapnd_body): Be careful with line-numbers here too. Prepare for
3706 being called directly from the parser.
3708 * cp-tree.h (finish_function): Adjust prototype.
3709 * decl.c (finish_function): Return the function compiled.
3710 * pt.c (instantiate_decl): Don't play games with obstacks.
3711 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3712 (search_tree): Likewise.
3713 * typeck.c: Fix typo in comment.
3714 * typeck2.c (store_init_value): Add comment.
3716 * cp-tree.h (CPTI_ATEXIT): New macro.
3717 (atexit_node): Likewise.
3718 * decl.c (destroy_local_static): New function, broken out from ...
3719 (expand_static_init): Here.
3721 * rtti.c (get_tinfo_var): These should always be global
3722 (expand_si_desc): Use tree, not RTL, functions to generate code.
3723 (expand_class_desc): Likewise.
3724 (expand_ptr_desc): Likewise.
3725 (expand_attr_desc): Likewise.
3726 (expand_generic_desc): Likewise.
3727 (synthesize_tinfo_fn): Likewise.
3729 1999-09-09 Mark Mitchell <mark@codesourcery.com>
3731 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3732 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
3734 (RECHAIN_STMST_FROM_CHAIN): Likewise.
3736 * parse.y (simple_stmt): Fix typo in last change.
3738 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3739 (STMT_IS_FULL_EXPR_P): Likewise.
3740 (STMT_LINENO_FOR_FN_P): Likewise.
3741 (prep_stmt): New function.
3742 (building_stmt_tree): Tweak for safety.
3743 * pt.c (tsubst_expr): Use prep_stmt throughout.
3744 (add_tree): Move it to semantics.c
3745 * semantics.c (add_tree): Move it here.
3746 (finish_expr_stmt_real): New function.
3747 (finish_expr_stmt): Use it.
3748 (finish_if_stmt_cond): Use FINISH_COND.
3749 (finish_while_stmt_cond): Likewise.
3750 (finish_for_cond): Likewise.
3751 (finish_stmt_tree): Tweak line-number handling.
3752 (prep_stmt): New function.
3753 (expand_stmt): Use it.
3755 * cp-tree.h (begin_switch_stmt): Adjust prototype.
3756 (finish_switch_cond): Likewise.
3757 * parse.y (simple_stmt): Adjust accordingly.
3758 * parse.c: Regenerated.
3759 * pt.c (tsubst_expr): Adjust accordingly.
3760 * semantics.c (expand_cond): New function.
3761 (FINISH_COND): New macro.
3762 (begin_switch_stmt): Build the SWITCH_STMT here.
3763 (finish_switch_stmt_cond): Not here.
3764 (expand_stmt): Adjust calls to begin_switch_stmt and
3765 finish_switch_cond. Use expand_cond throughout.
3767 * dump.c (dequeue_and_dump): Dump types for constants.
3768 Describe DECL_ARG_TYPE more intuitively.
3771 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3772 (lang_cleanup_tree): Remove.
3773 * lex.c (make_lang_type): Use ggc_alloc to allocate
3776 Reorganize per-function data.
3777 * cp-tree.h (saved_scope): Add function_decl, bindings.
3778 (language_function): Rename binding_level to bindings.
3779 (cp_function_chain): Use the current_function, not the
3780 outer_function_chain.
3781 (current_class_ptr): Make it work, even when there's no
3783 (current_class_ref): Likewise.
3784 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
3786 (clear_temp_name): Remove.
3787 * decl.c (check_function_type): New function, broken out from
3789 (current_binding_level): Adjust definition.
3790 (pushlevel): Simplify.
3791 (poplevel): Don't use named_label_uses when we're outside
3793 (mark_saved_scope): Mark function_decl and bindings.
3794 (maybe_push_to_top_level): Don't unconditionally push a new
3795 function context. Save bindings and the current_function_decl.
3796 Don't clear named_labels.
3797 (pop_from_top_level): Pop function context if appropriate.
3798 (init_decl_processing): Set init_lang_status and free_lang_status,
3799 rather than save_lang_status and restore_lang_status.
3800 (start_function): Take SF_* flags. Don't clear per-function data.
3801 Reorder and simplify to use new per-function data code. Add
3803 (store_parm_decls): Don't call init_function_start here.
3804 (finish_function): Adjust for new handling of per-function data.
3805 (push_cp_function_context): Simplify.
3806 (mark_cp_function_context): Change binding_level to bindings.
3807 * decl2.c (clear_temp_name): Remove.
3808 (start_objects): Use SF flags to start_function.
3809 (start_static_storage_duration_function): Likewise.
3810 * except.c (start_anon_func): Remove redundant calls to
3811 push_function_context_to. Use SF flags to start function.
3812 (end_anon_func): Remove redundant call to pop_function_context
3814 * lex.c (reinit_parse_for_function): Don't initialize per-function
3816 * method.c (emit_thunk): Clear current_function after calling
3817 assemble_end_function. Use SF flags for start_function.
3818 (synthesize_method): Use SF flags for start_function.
3819 * parse.c: Regenerated.
3820 * parse.y (fn.defpen): Likewise.
3821 (pending_inline): Clear current_function, even if something goes
3823 * pt.c (instantiate_decl): Use SF flags to start_function.
3824 Don't save and restore expanding_p.
3825 (add_tree): Handle the case where we are outside any function.
3826 (end_tree): Likewise.
3827 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3828 * semantics.c (begin_function_definition): Likewise.
3829 (expand_body): Likewise.
3831 1999-09-09 Nathan Sidwell <nathan@acm.org>
3833 * cp-tree.h (convert_to_void): Prototype new function.
3834 (require_complete_type_in_void): Remove prototype.
3835 * cvt.c (convert_to_void): New function.
3836 (ocp_convert): Use convert_to_void.
3837 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3839 * typeck.c (require_complete_type_in_void): Remove function.
3840 (build_compound_expr): Use convert_to_void.
3841 (build_static_cast): Likewise.
3842 (build_c_cast): Likewise.
3843 * semantics.c (finish_expr_stmt): Do not decay full expressions.
3845 * typeck.c (build_x_compound_expr): Add FIXME.
3847 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3849 * cp-tree.h (scratch_tree_cons): Remove.
3850 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3851 and perm_tree_cons with plain tree_cons.
3852 * class.c: Likewise.
3854 * decl2.c: Likewise.
3855 * except.c: Likewise.
3859 * method.c: Likewise.
3860 * parse.y: Likewise.
3864 * search.c: Likewise.
3865 * typeck.c: Likewise.
3866 * parse.c: Regenerated.
3867 * tree.c (build_srcloc): Simplify.
3869 1999-09-08 Bruce Korb autogen@linuxbox.com
3871 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
3873 1999-09-08 Mark Mitchell <mark@codesourcery.com>
3875 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3877 (LANG_DECL_PERMANENT): Remove.
3878 * decl.c (duplicate_decls): Don't mess about with obstacks trying
3880 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3881 * lex.c (free_lang_decl_chain): Remove.
3882 (build_lang_decl): Don't use obstacks.
3883 (retrofit_lang_decl): Likewise.
3884 (copy_lang_decl): Likewise.
3886 * cp-tree.h (saved_scope): Remove old_binding_level and
3887 function_decl. Tidy up.
3888 * decl.c (mark_saved_scope): Don't set them.
3889 (maybe_push_to_top_level): Clear memory.
3891 * decl.c (layout_var_decl): Change prototype. Don't complete
3892 types for external objects.
3893 (check_initializer): Likewise. Tidy.
3894 (initialize_local_var): Complete types here.
3895 (cp_finish_decl): Not here. Reorganize a little.
3896 (grokvardecl): Don't complete types here.
3898 * decl.c (start_function): Clear last_dtor_insn and
3899 last_parm_cleanup_insn.
3900 (push_cp_function_context): Just copy over a little of
3901 the old context, not all of it.
3903 * cp-tree.h (copy_to_permanent): Remove.
3904 (permanent_p): Likewise.
3905 * decl.c (building_typename_type): Don't use copy_to_permanent.
3906 (start_decl): Likewise.
3907 (grok_reference_init): Likewise.
3908 (cp_finish_decl): Likewise.
3909 * init.c (build_new_1): Don't use mapcar.
3910 (build_vec_delete_1): Don't use copy_to_permanent.
3911 (build_vec_init): Likewise.
3912 * parse.y (primary): Likewise.
3913 * parse.c: Regenerated.
3914 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
3915 (lookup_template_class): Likewise.
3916 (tsubst_friend_function): Likewise.
3917 (instantiate_class_template): Likewise.
3918 (tsubst_decl): Likewise.
3920 (instantiate_template): Likewise.
3922 * rtti.c (get_tinfo_fn): Likewise.
3923 (build_dynamic_cast): Likewise.
3924 * semantics.c (finish_if_stmt_cond): Likewise.
3925 (finish_while_stmt_cond): Likewise.
3926 (finish_do_stmt): Likewise.
3927 (finish_for_cond): Likewise.
3928 (finish_for_expr): Likewise.
3929 (finish_cleanup): Likewise.
3930 (add_decl_stmt): Likewise.
3931 (finish_named_return_value): Likewise.
3932 (finish_qualified_call_expr): Likewise.
3933 * tree.c (perm_manip): Remove.
3934 (build_exception_variant): Don't use copy_to_permanent.
3935 (permanent_p): Remove.
3936 (copy_to_permament): Remove.
3937 (build_min_nt): Don't use copy_to_permanent.
3938 (build_min): Likewise.
3939 (min_tree_cons): Likewise.
3940 * typeckc.c (build_static_cast): Likewise.
3941 (build_reinterpret_cast): Likewise.
3942 (build_const_cast): Likewise.
3944 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3946 * decl.c (ggc_p): Set it to 1.
3947 (mark_saved_scope): Add prototype.
3949 1999-09-07 Richard Henderson <rth@cygnus.com>
3951 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
3952 * typeck.c (self_promoting_args_p): Delete.
3954 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
3956 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
3957 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
3959 1999-09-07 Mark Mitchell <mark@codesourcery.com>
3961 * Makefile.in (tree.o): Depend on ggc.h.
3962 * class.c (make_method_vec): Remove.
3963 (free_method_vec): Likewise.
3964 (free_method_vecs): Remove.
3965 (add_method): Don't use them.
3966 * cp-tree.def (PTRMEM_CST): Make it longer.
3967 (TEMPLATE_PARM_INDEX): Make it shorter.
3968 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
3969 (template_parm_index): Remove RTL field.
3970 (ptrmem_cst): Add RTL field.
3971 (finish_function): Removed parameter.
3972 (process_next_inline): Change prototype.
3973 (init_cplus_unsave): Rename to init_tree.
3974 (binding_init): Remove.
3975 * decl.c (free_binding_nodes): Remove.
3976 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
3977 (pop_binding): Don't use free_binding_nodes.
3978 (free_binding_vecs): Remove.
3979 (store_bindings): Don't use them.
3980 (pop_from_top_level): Likewise.
3981 (lookup_namespace_name): Simplify.
3982 (build_typename_type): Don't use obstack_free.
3983 (unqualified_namespace_lookup): Simplify.
3984 (lookup_name_real): Simplify.
3985 (start_function): Remove comment about leaks.
3986 (finish_function): Removed nested parameter. Call
3987 expand_end_bindings even when building_stmt_tree.
3988 Call ggc_push_context and ggc_pop_context around
3989 rest_of_compilation, if necessary.
3990 (mark_cp_function_context): Handle a NULL language-context.
3991 (lang_mark_false_label_stack): Fix typo.
3992 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
3993 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
3994 pointer to method types.
3995 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
3996 * decl2.c (finish_objects): Adjust call to finish_function.
3997 (finish_static_store_duration_function): Likewise.
3998 (do_nonmember_using_decl): Remove call to binding_init.
3999 * except.c (end_anon_func): Adjust call to finish_function.
4000 * lex.c (mark_impl_file_chain): New function.
4001 (init_parse): Call init_tree, not init_cplus_unsave.
4003 (cp_pramga_interface): Use xmalloc, not permalloc.
4004 (cp_pragma_implementation): Likewise.
4005 (begin_definition_of_inclass_inline): Simplify.
4006 (process_next_inline): Adjust prototype.
4007 (do_scoped_id): Don't call binding_init.
4008 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4009 * method.c (emit_thunk): Adjust call to finish_function.
4010 (synthesize_method): Likewise.
4011 * parse.y (%union): Add a new `pi' variant.
4012 (PRE_PARSED_FUNCTION_DECL): Use it.
4013 (fn.defpen): Likewise.
4014 (fndef): Adjust call to finish_function.
4015 * pt.c (instantiate_decl): Likewise.
4016 * rtti.c (syntheisze_tinfo_fn): Likewise.
4017 * semantics.c (expand_body): Likewise.
4018 * tree.c: Include ggc.h.
4019 (mark_list_hash): New function.
4020 (binding_init): Remove.
4021 (init_cplus_unsave): Rename to ...
4022 (init_tree): This. Add GC roots.
4024 1999-09-05 Mark Mitchell <mark@codesourcery.com>
4026 Get ready for garbage collection.
4027 * Makefile.in (CXX_TREE_H): Add varray.h
4028 (lex.o): Depend on ggc.h.
4030 (decl2.o): Likewise.
4031 (method.o): Likewise.
4032 (search.o): Likewise.
4035 * class.c: Include ggc.h.
4036 (current_class_name): Remove.
4037 (current_class_type): Likewise.
4038 (current_access_specifier): Likewise.
4039 (previous_class_type): Likewise.
4040 (previous_class_values): Likewise.
4041 (class_cache_firstobj): Likewise.
4042 (current_lang_base): Likewise.
4043 (current_lang_stack): Likewise.
4044 (current_lang_stacksize): Likewise.
4045 (lang_name_c): Likewise.
4046 (lang_name_cplusplus): Likewise.
4047 (lang_name_java): Likewise.
4048 (current_lang_name): Likewise.
4049 (base_layout_decl): Likewise.
4050 (access_default_node): Likewise.
4051 (access_public_node): Likewise.
4052 (access_protected_node): Likewise.
4053 (access_private_node): Likewise.
4054 (access_default_virtual_node): Likewise.
4055 (access_public_virtual_node): Likewise.
4056 (access_protected_virtual_node): Likewise.
4057 (access_private_virtual_node): Likewise.
4058 (signed_zero_node): Likewise.
4059 (init_class_processing): Don't build base_layout_decl.
4060 (push_lang_context): Adjust now that current_lang_base is a varray.
4061 (pop_lang_context): Likewise.
4062 * cp-tree.h: Include varray.h.
4063 (cp_global_trees): Add access_default, access_public,
4064 access_protected, access_private, access_default_virtual,
4065 access_public_virtual, access_protected_virtual,
4066 access_private_virtual, ctor_identifier, delta2_identifier,
4067 delta_identifier, dtor_identifier, in_charge_identifier,
4068 index_identifier, nelts_identifier, this_identifier,
4069 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4070 lang_name_c, lang_name_cplusplus, lang_name_java,
4071 empty_except_spec, null, jclass, minus_one, terminate.
4072 (saved_scope): Move here from decl.c. Define globals in terms of
4073 saved_scope: current_namespace, current_class_name,
4074 current_class_type, current_access_specifier, current_lang_stack,
4075 current_lang_base, current_lang_name, current_function_parms,
4076 current_template_parms, processing_template_decl,
4077 processing_specialization, processing_explicit_instantiation,
4078 previous_class_type, previous_class_values, class_cache_firstobj.
4079 (scope_chain): New variable.
4080 (init_pt): New function.
4081 * decl.c (current_namespace): Remove.
4082 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4083 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4084 (delta_identifier, delta2_identifier): Likewise.
4085 (pfn_or_delta2_identifier, tag_identifier): Likewise
4086 (vt_off_identifier, empty_except_spec, null_node): Likewise.
4087 (current_function_parms, current_lang_base): Remove.
4088 (current_lang_stack, previous_class_values): Remove.
4089 (class_binding_level): Macroize.
4090 (saved_scope): Remove.
4091 (current_saved_scope): Rename to scope_chain.
4092 (mark_saved_scope): Adjust for new scope structure.
4093 (maybe_push_to_top_level): Likewise.
4094 (pop_from_top_level): Likewise.
4095 (duplicate_decls): Adjust now that current_lang_base is a varray.
4096 (build_typename_type): Call ggc_add_tree_hash_table_root.
4097 (init_decl_processing): Call init_pt. Call push_to_top_level to
4098 set up globals. Add GC roots.
4099 (xref_basetypes): Adjust now that current_lang_base is a varray.
4100 * decl.h (this_identifier): Remove.
4101 (in_charge_identifier): Likewise.
4102 * decl2.c: Don't include varray.h.
4103 (current_namespace): Remove.
4104 (init_decl2): Add GC roots.
4105 * except.c (Terminate): Remove.
4106 (init_exception_processing): Use terminate_node instead.
4107 (build_terminate_handler): Likewise.
4108 * init.c (nc_nelts_field_id): Remove.
4109 (minus_one): Likewise.
4110 (init_init_processing): Use minus_one_node and nelts_identifier
4111 instead. Add GC roots.
4112 (jclass_node): Remove.
4113 (build_new_1): Use nelts_identifier.
4114 (build_vec_init): Likewise.
4115 (build_vec_delete): Likewise.
4116 * lex.c: Include ggc.h.
4117 (defarg_fn): Move declaration early.
4118 (defarg_parms): Likewise.
4119 (init_parse): Add GC roots.
4120 (handle_cp_pragma): Remove redundant declaration of
4122 * method.c: Include ggc.h.
4123 (btypelist): Make it a varray. All uses changed.
4124 (ktypelist): Likewise.
4125 (init_method): Add GC roots.
4126 * pt.c: Don't include varray.h. Include ggc.h.
4127 (current_template_parms): Remove.
4128 (processing_template_decl): Likewise.
4129 (processing_specialization): Likewise.
4130 (processing_explicit_instantiation): Likewise.
4131 (init_pt): New function.
4132 * repo.c: Include ggc.h.
4133 (init_repo): Add GC roots.
4134 * search.c: Don't include varray.h.
4135 (_vptr_name): Remove.
4136 (lookup_field_1): Use vtpr_identifier instead.
4137 (expand_indirect_vtbls_init): Remove redundant declaration of
4138 in_charge_identifier.
4139 (init_search_processing): Use vptr_identifier.
4141 1999-09-05 Richard Henderson <rth@cygnus.com>
4142 Bernd Schmidt <bernds@cygnus.co.uk>
4143 Mark Mitchell <mark@codesourcery.com>
4145 * Makefile.in (parse.o): Depend on ggc.h.
4146 (decl2.o): Depend on ggc.h.
4147 (init.o): Depend on ggc.h.
4148 * cp-tree.h (init_decl2): Declare.
4149 (cp_parse_init): Likewise.
4150 * decl.c (ggc_p): Define to zero.
4151 (mark_saved_scope): New function.
4152 (init_decl_processing): Call cp_parse_init, and cp_decl2.
4154 (expand_static_init): Add GC roots.
4155 * decl2.c: Include ggc.h.
4156 (init_decl2): New function.
4157 * init.c: Include ggc.h.
4158 (init_init_processing): Add GC roots.
4159 * parse.y: Include ggc.h.
4160 (cp_parse_init): New function.
4162 1999-09-04 Mark Mitchell <mark@codesourcery.com>
4164 * decl.c (init_decl_processing): Set mark_lang_status.
4165 (lang_mark_false_label_stack): Adjust prototype.
4166 * decl2.c (grok_function_init): Remove extraneous declaration of
4169 * Make-lang.in (cc1plus): Remove dependency on GGC.
4170 * Makefile.in (OBJS): Don't mention ggc-simple.o.
4171 (OBJDEPS): Don't mention ggc-simple.o.
4173 * Make-lang.in (cc1plus): Depend on $(GGC).
4174 * Makefile.in (OBJS): Add ggc-simple.o.
4175 (OBJDEPS): Likewise.
4176 * cp-tree.h (language_function): Rename members to `x_' versions;
4177 we now have x_named_labels, x_ctor_label, x_dtor_label,
4178 x_base_init_list, x_member_init_list, x_base_init_expr,
4179 x_current_class_ptr, x_current_class_ref, x_last_tree,
4180 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4182 (dtor_label, ctor_label, current_base_init_list,
4183 current_member_init_list, base_init_expr, current_class_ptr,
4184 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4185 * decl.c: Include ggc.h.
4186 (last_dtor_insn): Adjust to use x_ names.
4187 (last_parm_cleanup_insn): Likewise.
4188 (original_result_rtx): Likewise.
4189 (named_labels): Likewise.
4190 (mark_binding_level): New function.
4191 (mark_cp_function_context): Likewise.
4192 (mark_false_label_stack): Likewise.
4193 (lang_mark_tree): Likewise.
4194 (lang_cleanup_tree): Likewise.
4196 1999-09-03 Mark Mitchell <mark@codesourcery.com>
4198 * Makefile.in (CXX_TREE_H): Include function.h.
4199 (decl.o): Don't depend on function.h.
4200 (decl2.o): Likewise.
4201 (typeck.o): Likewise.
4203 (method.o): Likewise.
4204 * cp-tree.h: Include function.h.
4205 (cp_function): Rename to language_function. Remove next.
4206 (cp_function_chain): Make it a macro, not a variable.
4207 (push_cp_function_context): Don't declare.
4208 (pop_cp_function_context): Likewise.
4209 * decl.c: Don't include function.h.
4210 (push_cp_function_context): Make it static. Make it suitable for
4211 a save_lang_status callback.
4212 (pop_cp_function_context): Likewise.
4213 (maybe_push_to_top_level): Call push_function_context_to, not
4214 push_cp_function_context.
4215 (pop_from_top_level): Call pop_function_context_from, not
4216 pop_cp_function_context.
4217 (init_decl_processing): Set save_lang_status and
4218 restore_lang_status. Call push_function_context_to, not
4219 push_cp_function_context.
4220 (cp_function_chain): Remove.
4221 * decl2.c: Don't include function.h.
4222 * except.c: Don't include function.h.
4223 (start_anon_func): Call push_function_context_to, not
4224 push_cp_function_context.
4225 (end_anon_func): Call pop_function_context_from, not
4226 pop_cp_function_context.
4227 * init.c: Don't include function.h.
4228 * lex.c (begin_definition_of_inclass_inline): Call
4229 push_function_context_to, not push_cp_function_context.
4230 (process_next_inline): Call pop_function_context_from, not
4231 pop_cp_function_context.
4232 * method.c: Don't include function.h.
4233 (synthesize_method): Call push_function_context_to, not
4234 push_cp_function_context. Call pop_function_context_from, not
4235 pop_cp_function_context.
4236 * typeck.c: Don't include function.h.
4238 * decl.c (expand_static_init): Tweak handling of static
4239 initializations for objects without constructors.
4241 1999-09-03 Nathan Sidwell <nathan@acm.org>
4243 * typeck.c (build_indirect_ref): Reject dereference of pointer to
4246 1999-09-02 Mark Mitchell <mark@codesourcery.com>
4248 * cp-tree.h (cp_function): Move here, from decl.c.
4249 (cp_function_chain): Declare.
4250 (dtor_label): New macro, instead of variable.
4251 (ctor_label): Likewise.
4252 (current_base_init_list): Likewise.
4253 (current_member_init_list): Likewise.
4254 (base_init_expr): Likewise.
4255 (current_class_ptr): Likewise.
4256 (current_class_ref): Likewise.
4257 (last_tree): Likewise.
4258 (last_expr_type): Likewise.
4259 (current_function_returns_value): Likewise.
4260 (current_function_returns_null): Likewise.
4261 (current_function_just_assigned_this): Likewise.
4262 (current_function_parms_stored): Likewise.
4263 (temp_name_counter): Likewise.
4264 (static_labelno): Likewise.
4265 (expanding_p): Likewise.
4266 (stmts_are_full_exprs_p): Likewise.
4267 (in_function_try_handler): Likewise.
4268 (lang_type): Remove nested type_flags. All uses changed.
4269 * call.c (ctor_label): Remove.
4270 (dtor_label): Likewise.
4271 * class.c (current_class_ptr): Remove.
4272 (current_class_ref): Likewise.
4273 * decl.c (static_labelno): Remove.
4274 (dtor_label): Likewise.
4275 (last_dtor_insn): New macro, instead of variable.
4276 (last_parm_cleanup_insn): Likewise.
4277 (original_result_rtx): Likewise.
4278 (in_function_try_handler): Remove.
4279 (named_label_uses): New macro, instead of variable.
4280 (named_labels): Likewise.
4281 (current_function_returns_value): Remove.
4282 (current_function_returns_null): Likewise.
4283 (current_function_assigns_this): New macro, instead of variable.
4284 (current_function_just_assigned_this): Likewise.
4285 (current_binding_level): Likewise.
4286 (init_decl_processing): Call push_cp_function_context.
4287 (cp_function): Move to cp-tree.h
4288 (cp_function_chain): Make it global.
4289 (temp_name_counter): Remove.
4290 (push_cp_function_context): Simplify.
4291 (pop_cp_function_context): Likewise.
4292 * decl2.c (temp_name_counter): Remove.
4293 * init_c (current_base_init_list): Likewise.
4294 (current_member_init_list): Likewise.
4295 (base_init_expr): Likewise.
4296 * method.c (static_labelno): Likewise.
4297 * pt.c (last_tree): Likewise.
4298 * semantics.c (expanding_p): Likewise.
4299 (stmts_are_full_exprs_p): Likewise.
4300 (last_expr_type): Likewise.
4301 * typeck.c (dtor_label): Likewise.
4302 (ctor_label): Likewise.
4304 1999-09-01 Alex Samuel <samuel@codesourcery.com>
4306 * decl2.c (arg_assoc_template_arg): New prototype. New function.
4307 (arg_assoc_class): Use arg_assoc_template_arg for template
4309 (arg_assoc): Likewise.
4310 * pt.c (mangle_class_name_for_template): Allow member template
4313 1999-09-02 Nathan Sidwell <nathan@acm.org>
4315 * call.c (build_conditional_expr): Warn on enum mismatches.
4316 (convert_arg_to_ellipsis): Move non-pod check to after
4319 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4321 * gxx.gperf (hash, is_reserved_word): Add prototypes.
4323 * init.c (build_vec_init): Initialize variable `try_block'.
4325 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4326 Likewise for bzero/memset.
4327 (token_getch, token_put_back): Add static prototypes. Remove
4328 `inline' from the definitions.
4329 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4331 1999-09-01 Mark Mitchell <mark@codesourcery.com>
4333 * cp-tree.h (lang_type): Move align into type_flags.
4334 (CLASSTYPE_ALIGN): Adjust accordingly.
4335 * call.c (direct_reference_binding): Remove misleading comment.
4337 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4339 * parse.y (language_string): Constify.
4341 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4343 * repo.c (getpwd): Don't prototype.
4344 * xref.c (getpwd): Likewise
4346 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4348 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4349 Remove hacks for stuff which now comes from libiberty.
4351 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
4353 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4355 1999-08-30 Mark Mitchell <mark@codesourcery.com>
4357 * cp-tree.h (begin_init_stmts): Declare.
4358 (finish_init_stmts): Likewise.
4359 * cvt.c (build_up_reference): Wrap the declaration of a temporary
4360 in a statement-expression so that we will see it when expanding
4361 tree structure later.
4362 * init.c (begin_init_stmts): Don't make it static.
4363 (finish_init_stmts): Likewise.
4365 * cp-tree.h (start_handler_parms): New function.
4366 (expand_start_catch_block): Take only one parameter.
4367 (start_handler_parms): New function.
4368 * decl.c (start_handler_parms): Define it.
4369 * except.c (process_start_catch_block): Take only one parameter.
4370 Don't call grokdeclarator here.
4371 (expand_start_catch_block): Don't call grokdeclarator here,
4373 * parse.y (handler_args): Adjust call to
4374 expand_start_catch_block. Use start_handler_parms.
4375 * pt.c (push_template_decl_real): Make permanent lists have
4377 (tsubst_expr): Adjust calls to expand_start_catch_block
4379 * semantics.c (expand_stmt): Likewise.
4381 1999-08-29 Alex Samuel <samuel@codesourcery.com>
4383 * pt.c (push_template_decl_real): Use template declaration from
4384 class type if it exists.
4386 1999-08-29 Mark Mitchell <mark@codesourcery.com>
4388 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4389 (maybe_inject_for_scope_var): Declare it.
4390 (initialize_local_var): Likewise.
4391 * decl.c (maybe_inject_for_scope_var): Make it global.
4392 (initialize_local_var): Likewise. Move cleanup handling here,
4393 from cp_finish_decl.
4394 (make_rtl_for_nonlocal_decl): Use
4395 push_obstacks_nochange/pop_obstacks, rather than
4396 end_temporary_allocation/resume_temporary_allocation.
4397 (cp_finish_decl): Try to complete the type of a variable when it
4398 is declared. Move cleanup-handling to initialize_local_var.
4399 (expand_static_init): Use tree-building code, rather than
4401 * decl2.c (get_temp_name): Assert non-initializedness of
4403 * init.c (create_temporary_var): Move RTL-assigning code to ...
4404 (get_temp_regvar): Here.
4405 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
4406 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
4407 call initialize_local_var to generate initialization code.
4409 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4411 * cp-tree.h (fndecl_as_string, type_as_string,
4412 type_as_string_real, args_as_string, decl_as_string,
4413 expr_as_string, code_as_string, language_as_string,
4414 parm_as_string, op_as_string, assop_as_string, cv_as_string,
4415 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4417 * errfn.c (cp_printer): Likewise.
4419 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4420 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4421 cp_file_of, code_as_string, language_as_string, parm_as_string,
4422 op_as_string, assop_as_string, args_as_string, cv_as_string):
4425 * tree.c (lang_printable_name): Likewise.
4427 1999-08-28 Richard Henderson <rth@cygnus.com>
4429 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4431 1999-08-28 Mark Mitchell <mark@codesourcery.com>
4433 * cp-tree.h (strip_array_types): New function.
4434 * decl.c (maybe_deduce_size_from_array_init): New function, split
4435 out from cp_finish_decl.
4436 (layout_var_decl): Likewise.
4437 (maybe_commonize_var): Likewise.
4438 (maybe_inject_for_scope_var): Likewise.
4439 (initialize_local_var): Likewise.
4440 (build_cleanup_on_safe_obstack): Likewise.
4441 (check_initializer): Likewise.
4442 (make_rtl_for_nonlocal_decl): Likewise.
4443 (cp_finish_decl): Use them.
4444 * typeck.c (strip_array_types): New function.
4446 * cp-tree.def (LABEL_STMT): New tree node.
4447 * cp-tree.h (LABEL_STMT_LABEL): New macro.
4448 (shadow_label): Remove.
4449 (declare_local_label): New function.
4450 (finish_label_decl): Likewise.
4451 * decl.c (make_label_decl): New function, split out from
4453 (shadowed_labels): Remove.
4454 (binding_level): Add shadowed_labels.
4455 (clear_binding_level): Remove.
4456 (push_binding_level): Just bzero the new binding level.
4457 (pushlevel): Fix indentation.
4458 (pop_label): New function.
4459 (pop_labels): Likewise, split out from poplevel.
4460 (poplevel): Pop local labels. Use pop_labels.
4461 (maybe_push_to_top_level): Don't clear shadowed_labels.
4462 (lookup_label): Use make_label_decl.
4463 (shadow_label): Remove.
4464 (declare_local_label): New function.
4465 (define_label): Simplify.
4466 (start_function): Don't clear shadowed_labels.
4467 (cp_function): Remove shadowed_labels.
4468 (push_cp_function_context): Don't save shadowed_labels.
4469 (pop_cp_function_context): Don't restore it.
4470 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4471 * parse.y (label_decl): Use finish_label_decl.
4472 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4474 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4476 (finish_label_decl): New function.
4477 (expand_stmt): Handle LABEL_STMTs and local label declarations.
4479 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4481 * decl.c (lookup_label): Build labels on the permanent obstack
4482 when building statement trees. Don't build RTL for labels when
4483 building statement trees.
4484 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4485 building statement trees.
4486 (finish_label_stmt): Likewise.
4487 (expand_stmt): Adjust accordingly.
4488 * pt.c (tsubst_expr); Likewise.
4489 (do_decl_instantiation): Robustify.
4491 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4492 * tree.c (build_cplus_new): Set it.
4493 * expr.c (cplus_expand_expr): Use it.
4494 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4496 * decl.c (store_parm_decls): Reset immediate_size_expand.
4497 (finish_function): Likewise.
4499 * tree.c (cplus_unsave_expr_now): Don't return a value.
4501 * semantics.c (do_poplevel): Always initialize the return value.
4503 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
4505 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4506 * tree.h (cplus_unsave_expr_now) : Same.
4508 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4510 * decl.c (grokdeclarator): Amend comment.
4511 * except.c (expand_start_catch_block): Call push_template_decl for
4512 catch-block parameters.
4513 * method.c (synthesize_method): Build an empty compound statement
4514 for the body of a constructor.
4516 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
4518 * tree.c (cp_build_qualified_type_real): If we're asking for the
4519 same quals we already have, just return.
4521 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4523 * cp-tree.def (SUBOBJECT): New tree node.
4524 * cp-tree.h (CLEANUP_P): New macro.
4525 (SUBOBJECT_CLEANUP): Likewise.
4526 (keep_next_level): Add parameter.
4527 (get_temp_regvar): Don't declare.
4528 (emit_base_init): Remove parameter.
4529 (expand_aggr_init): Rename to build_aggr_init.
4530 (expand_vec_init): Rename to build_vec_init.
4531 (do_pushlevel): Remove.
4532 (do_poplevel): Likewise.
4533 (finish_cleanup): New function.
4534 (finish_subobject): Likewise.
4535 (stmts_are_full_exprs_p): New variable.
4536 * decl.c (keep_next_level): Add parameter.
4537 (cp_finish_decl): Use build_aggr_init, not
4538 expand_aggr_init. Use finish_expr_stmt to expand the code.
4539 (expand_static_init): Use tree-generating, not RTL-generating,
4540 functions to handle the initialization.
4541 (start_function): Remove dead code. Always have a momentary
4542 obstack inside the function, even before hitting the first curly
4544 (cplus_expand_expr_stmt): Move calls to
4545 expand_{start,end}_target_temps into semantics.c.
4546 (cp_function): Add stmts_are_full_exprs_p.
4547 (push_cp_function_context): Save it.
4548 (pop_cp_function_context): Restore it.
4549 * decl2.c (get_temp_regvar): Move to init.c.
4550 (do_static_initialization): Use build_{aggr,vec}_init.
4551 (do_static_destruction): Fix typo in comment.
4552 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4553 * except.c (expand_throw): Use create_temporary_var.
4554 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4555 * init.c (expand_vec_init_try_block): Remove.
4556 (expand_vec_init_catch_clause): Likewise.
4557 (get_temp_regvar): New function.
4558 (begin_init_stmts): Likewise.
4559 (finish_init_stmts): Likewise.
4560 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
4562 (emit_base_init): Likewise. Remove unused parameter.
4563 (expand_virtual_init): Likewise.
4564 (expand_cleanup_for_base): Use finish_subobject.
4565 (expand_aggr_vbase_init_1): Simplify.
4566 (construct_virtual_bases): Use tree-generating functions to build
4568 (expand_aggr_init): Likewise. Rename to build_aggr_init.
4569 (expand_default_init): Likewise.
4570 (expand_aggr_init_1): Likewise.
4571 (expand_vec_init): Rename to build_vec_init.
4572 * method.c (do_build_copy_constructor): Use tree-generating
4573 functions. Don't call clear_last_expr.
4574 (do_build_assign_ref): Likewise.
4575 (synthesize_method): Call clear_last_expr here.
4576 * parse.y (base_init): Don't call clear_last_expr here.
4577 (nodecls): Likewise.
4578 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4579 * semantics.c (do_pushlevel): Move to here.
4580 (do_poplevel): Likewise.
4581 (stmts_are_full_exprs_p): New variable.
4582 (finish_expr_stmt): Handle logic for temoprary cleanup here.
4583 (finish_for_stmt): Use finish_expr_stmt.
4584 (finish_cleanup): New function.
4585 (finish_function_try_block): Fix indentation.
4586 (finish_subobject): New function.
4587 (setup_vtbl_ptr): Call keep_next_level here.
4588 (finish_stmt_expr): Handle a block with no scope inside the
4589 statement-expression.
4590 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
4592 * tree.c (search_tree): Handle INIT_EXPR.
4594 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4595 * typeck2.c (store_init_value): Change expand_aggr_init to
4596 build_aggr_init in comment.
4598 1999-08-25 Mark Mitchell <mark@codesourcery.com>
4600 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4602 1999-08-25 Nathan Sidwell <nathan@acm.org>
4604 * decl2.c (handle_class_head): Be graceful about additional
4605 scope qualifiers. Adjust comments to reflect reality.
4607 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
4609 * call.c (build_conditional_expr): Fix typo.
4610 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4611 lvalue before trying to mess with the sides.
4613 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4615 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
4617 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4619 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
4621 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4622 Return arbitrary pointer or NULL.
4623 (check_eh_spec): Call __throw_type_match_rtti_2.
4624 * tinfo.h (*::dcast): Return int. Add valp parm.
4625 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
4626 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4627 (__throw_type_match_rtti): Now just a wrapper.
4629 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4630 (init_exception_processing): Don't initialize them.
4632 1999-08-23 Paul Burchard <burchard@pobox.com>
4634 * decl.c (check_default_argument): Fix typo.
4636 1999-08-22 Mark Mitchell <mark@codesourcery.com>
4638 * cp-tree.def (STMT_EXPR): Fix typo in node name.
4640 * dump.c (dump_next_stmt): New function.
4641 (dequeue_and_dump): Use it.
4643 * pt.c (tsubst_copy): Make sure to initialize return value for a
4644 STMT_EXPR, even when processing_template_decl.
4645 * semantics.c (finish_stmt_expr): A statement-expression whose
4646 last statement is not an expression-statement has type `void'.
4648 1999-08-20 Mark Mitchell <mark@codesourcery.com>
4650 * semantics.c (finish_stmt_expr): Fix typo in comment.
4651 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4653 * init.c (build_vec_delete_1): Make the children of a permanent
4654 BIND_EXPR permanent.
4655 * pt.c (register_specialization): Don't register a specialization
4658 1999-08-18 Andrew Haley <aph@cygnus.com>
4660 * method.c (process_overload_item): Call build_mangled_C9x_name ()
4661 for all integer parameter types larger than long long.
4663 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4665 * pt.c (redeclare_class_template): Merge default template
4666 arguments in both directions.
4668 * typeck.c (common_type): Undo 1999-08-18 change. Remove
4669 compiler_error message.
4671 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
4673 * cp-tree.h: Declare flag_use_repository.
4674 * pt.c (do_decl_instantiation): Don't complain about duplicate
4675 instantiation with -frepo.
4676 (do_type_instantiation): Likewise.
4678 * pt.c (push_template_decl_real): Complain about everything
4679 that isn't a valid template.
4681 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4684 1999-08-19 Mark Mitchell <mark@codesourcery.com>
4686 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4687 * decl2.c (build_expr_from_tree): Handle it.
4688 * error.c (dump_expr): Likewise.
4689 * pt.c (for_each_template_parm): Likewise.
4690 (tsubst_copy): Likewise.
4691 * tree.c (search_tree): Likewise.
4692 * semantics.c (finish_pseudo_destructor_call): Create it.
4694 1999-08-18 Mark Mitchell <mark@codesourcery.com>
4696 * search.c (setup_class_bindings): Robustify.
4697 * typeck.c (common_type): Use same_type_p, not pointer equality,
4700 * cp-tree.h (build_lang_field_decl): Remove.
4701 * class.c (build_vtable): Replace calls to build_lang_field_decl
4702 with build_lang_decl.
4703 (prepare_fresh_vtable): Likewise.
4704 (finish_struct_1): Likewise.
4705 (init_class_processing): Likewise.
4706 * decl.c (push_using_decl): Likewise.
4707 (init_decl_processsing): Likewise.
4708 (grokvardecl): Likewise.
4709 (build_ptrmemfunc_type): Likewise.
4710 (grokdeclarator): Likewise.
4711 (build_enumerator): Likewise.
4712 * decl2.c (grok_x_components): Likewise.
4713 (do_class_using_decl): Likewise.
4714 * except.c (call_eh_info): Likewise.
4715 * init.c (init_init_processing): Likewise.
4716 * rtti.c (expand_class_decl): Likewise.
4717 * tree.c (build_base_fields): Likewise.
4718 (build_vbase_pointer_fields): Likewise.
4719 * lex.c (build_lang_decl): Build declarations on the permanent
4720 obstack if we're building statmeent trees.
4721 (retrofit_lang_decl): Handle both the full lang_decl and also the
4722 smaller lang_decl_flags here.
4723 (build_lang_field_decl): Remove.
4724 * pt.c (push_template_decl_real): Issue errors for variable
4725 declarations that are not static members.
4727 1999-08-18 Richard Henderson <rth@cygnus.com>
4729 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4732 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4734 * cp-tree.h (back_end_hook): New variable.
4735 * decl2.c (back_end_hook): Define it.
4736 (finish_file): If it's non-NULL, call it.
4738 * decl.c (add_decl_to_level): New function.
4739 (push_local_binding): Use it.
4740 (find_binding): Fix typo in comment.
4741 (pushdecl): Use add_decl_to_level. Put templates on the
4742 corresponding namespace-scope binding levels.
4743 * dump.c (dequeue_and_dump): Print the specializations of a
4745 * pt.c (push_template_decl_real): Don't push a template multiple
4748 1999-08-17 Mark Mitchell <mark@codesourcery.com>
4750 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4751 (CALL_DECLARATOR_QUALS): Likewise.
4752 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4753 * decl.c (grokdeclarator): Adjust to use them.
4754 * decl2.c (grokfield): Likewise.
4755 (reparse_absdcl_as_casts): Likewise.
4756 * lex.c (make_call_declarator): Likewise.
4757 (set_quals_and_spec): Likewise.
4758 * pt.c (tsubst): Likewise.
4759 * tree.c (mapcar): Remove special hack to handle third operand of
4762 1999-08-16 Mark Mitchell <mark@codesourcery.com>
4764 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4765 * class.c (build_vtable): Use build_lang_field_decl to build the
4766 VAR_DECLs for vtables.
4767 (prepare_fresh_vtable): Likewise.
4768 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4769 CAN_HAVE_FULL_LANG_DECL_P.
4770 (push_using_decl): Use build_lang_decl to build USING_DECLs.
4771 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4772 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4773 (build_lang_field_decl): Likewise.
4774 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4777 * cp-tree.def (STMT_EXPR): New tree node.
4778 * cp-tree.h (STMT_EXPR_STMT): New macro.
4779 (store_return_init): Change prototype.
4780 (finish_named_return_value): New function.
4781 (expand_stmt): Likewise.
4782 (expand_body): Likewise.
4783 (begin_stmt_tree): Likewise.
4784 (finish_stmt_tree): Likewise.
4785 (expanding_p): New variable.
4786 (last_expr_type): Likewise.
4787 (building_stmt_tree): New macro.
4788 * decl.c (start_function): Use building_stmt_tree, not
4789 processing_template_decl, where appropriate.
4790 (store_parm_decls): Likewise.
4791 (store_return_init): Move most of the body to semantics.c.
4792 (finish_function): Use building_stmt_tree.
4793 (finish_stmt): Clear last_expr_type here.
4794 (cp_function): Add expanding_p, last_tree, last_expr_type.
4795 (push_cp_function_context): Save them.
4796 (pop_cp_function_context): Restore them.
4797 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4798 * error.c (dump_expr): Handle STMT_EXPR.
4799 * except.c (expand_start_catch_block): Use building_stmt_tree.
4801 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4802 (do_case): Move add_tree call to semantics.c.
4803 * parse.y (return_init): Use finish_named_return_value.
4804 (for.init.statement): Use finish_expr_stmt.
4805 * parse.c: Regenerated.
4806 * pt.c (do_pushlevel): Move to semantics.c.
4807 (do_poplevel): Likewise.
4808 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4809 (tsubst_expr): Don't expand all the way to RTL here. Handle
4810 RETURN_INIT and CTOR_INITIALIZER.
4811 (instantiate_decl): Call expand_body after tsubst'ing into
4813 * semantics.c (expand_stmts): New function.
4814 (expanding_p): New variable.
4815 (last_expr_type): Likewise.
4816 (finish_expr_stmt): Use building_stmt_tree.
4817 (begin_if_stmt): Likewise.
4818 (finish_if_stmt_cond): Likewise.
4819 (finish_then_clause): Likewise.
4820 (begin_else_clause): Likewise.
4821 (finish_else_clause): Likewise.
4822 (begin_while_stmt): Likewise.
4823 (finish_while_stmt_cond): Likewise.
4824 (finish_while_stmt): Likewise.
4825 (finish_do_body): Likewise.
4826 (finish_do_stmt): Likewise.
4827 (finish_return_stmt): Likewise.
4828 (begin_for_stmt): Likewise.
4829 (fnish_for_init_stmt): Likewise.
4830 (finish_for_cond): Likewise.
4831 (finish_for_expr): Likewise.
4832 (finish_for_stmt): Likewise.
4833 (finish_break_stmt): Likewise.
4834 (finish_continue_stmt): Likewise.
4835 (finish_switch_cond): Likewise.
4836 (finish_switch_stmt): Likewise.
4837 (finish_case_label): Call add_tree here if necessary.
4838 (finish_goto_statement): Use building_stmt_tree.
4839 (begin_try_block): Likewise.
4840 (begin_function_try_block): Likewise.
4841 (finish_try_block): Likewise.
4842 (finish_function_try_block): Likewise.
4843 (finish_handler_sequence): Likewise.
4844 (finish_function_handler_sequence): Likewise.
4845 (begin_handler): Likewise.
4846 (finish_handler_parms): Likewise.
4847 (finish_handler): Likewise.
4848 (begin_compound_stmt): Likewise.
4849 (finish_compound_stmt): Likewise.
4850 (finish_asm_stmt): Likewise.
4851 (finish_label_stmt): Likewise.
4852 (finish_named_return_value): New function.
4853 (setup_vtbl_ptr): Moved here from decl2.c.
4854 (do_pushlevel): Moved here from pt.c.
4855 (do_poplevel): Likewise.
4856 (begin_stmt_expr): Use building_stmt_tree.
4857 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
4858 when building_stmt_tree.
4859 (begin_stmt_tree): New function.
4860 (finish_stmt_tree): Likewise.
4861 (expand_stmt): Likewise.
4862 (expand_body): Likewise.
4863 * tree.c (build_cplus_method_type): Make sure the argument types
4864 end up on the same obstack as the METHOD_TYPE.
4865 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4866 THROW_EXPR, STMT_EXPR.
4867 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
4868 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
4869 sorry, if an unsupported node is encountered.
4870 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4871 (c_expand_return): Don't call add_tree here.
4873 1999-08-15 Mark Mitchell <mark@codesourcery.com>
4875 * pt.c (check_default_tmpl_args): Don't check in local scopes.
4876 (tsubst_decl): Make sure the declaration is on a saveable
4877 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4879 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4881 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
4883 Speed up Koenig lookup.
4884 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
4885 to return namespaces we've looked at.
4886 * decl2.c (lookup_using_namespace): Likewise.
4887 (add_function): Don't call ovl_member.
4888 (lookup_arg_dependent): Initialize k.namespaces to the list of
4889 namespaces seen in unqualified lookup.
4890 * call.c (equal_functions): Move here from tree.c.
4891 (joust): Use it to handle duplicate candidates.
4892 * tree.c (ovl_member): Use ==.
4894 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4896 * cp-tree.def (DECL_STMT): Make it smaller.
4897 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
4898 (lang_decl): ... here. Add next.
4899 (DECL_SAVED_TREE): Adjust accordingly.
4900 (DECL_IMPLICIT_TYPEDEF_P): New macro.
4901 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
4902 (DECL_STMT_DECL): Likewise.
4903 (create_implicit_typedef): New function.
4904 (maybe_push_decl): Likewise.
4905 (tsubst_default_argument): New function.
4906 (at_function_scope_p): Likewise.
4907 (add_decl_stmt): Likewise.
4908 (push_permanent_obstack): Likewise.
4909 * call.c (convert_default_arg): Use tsubst_default_argument.
4910 * class.c (add_method): Use push_permanent_obstack.
4911 (build_self_reference): Create a TEMPLATE_DECL for the
4912 self-reference, if necessary.
4913 * decl.c (pseudo_global_level_p): Only look at the current binding
4915 (push_binding): Use push_permanent_obstack.
4916 (create_implicit_typedef): New function.
4918 (duplicate_decls): Use push_permanent_obstack.
4919 (maybe_push_decl): New function.
4920 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
4921 (start_decl_1): Remove dead code.
4922 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
4923 pseudo_global_level_p.
4924 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
4926 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
4927 pseudo_global_level_p.
4928 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
4930 (get_sentry): Use push_permanent_obstack.
4931 * dump.c (dequeue_and_dump): Enable DECL_STMT.
4932 * except.c (call_eh_info): Use push_permanent_obstack.
4933 (build_eh_type_ref): Likewise.
4934 (do_pop_exception): Likewise.
4935 (expand_eh_spec): Likewise.
4936 (alloc_eh_object): Likewise.
4937 (expand_throw): Likewise.
4938 * init.c (build_java_class_ref): Likewise.
4939 * lex.c (get_time_identifier): Likewise.
4940 (free_lang_decl_chain): Correct type.
4941 (retrofit_lang_decl): Adjust accordingly.
4942 (build_lang_field_decl): Likewise.
4943 * lex.h (free_lang_decl_chain): Likewise.
4944 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
4945 * parse.c: Regenerated.
4946 * pt.c (tsubst_default_arguments): New function.
4947 (retrieve_local_specialization): Likewise.
4948 (register_local_specialization): Likewise.
4949 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
4950 pseudo_global_level_p to determine whether or not a template is
4952 (lookup_template_class): Likewise. Use create_implicit_typedef.
4953 (instantiate_class_template): Call tsubst_default_arguments for
4954 member functions, if appropriate.
4955 (tsubst_default_argument): New function.
4956 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
4957 * search.c (at_function_scope_p): New function.
4958 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
4959 (finish_label_stmt): Likewise.
4960 (add_decl_stmt): New function.
4961 (begin_class_definition): Likewise.
4962 (finish_typeof): Likewise.
4963 * tree.c (copy_template_template_parm): Likewise.
4964 (copy_to_permanent): Likewise.
4965 (push_permanent_obstack): Define.
4966 (mark_addressable): Use it.
4967 * typeck.c (mark_addressable): Likewise.
4969 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
4971 * cp-tree.h (init_cplus_unsave): New.
4972 (cplus_unsave_expr_now): New.
4973 * lex.c (init_parse): Call init_cplus_unsave.
4974 * tree.c (init_cplus_unsave): New.
4975 (cplus_unsave_expr_now): New.
4977 1999-08-13 Mark Mitchell <mark@codesourcery.com>
4979 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
4980 decl_constant_value to simplify array bounds.
4982 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
4984 * lang-options.h: Add -fms-extensions.
4985 * cp-tree.h: Declare flag_ms_extensions.
4986 * decl2.c: Define it.
4987 * class.c (instantiate_type): Don't complain about taking the address
4988 of a bound member function if -fms-extensions.
4989 * typeck.c (build_unary_op): Likewise.
4990 * decl.c (grokdeclarator): Or about implicit int.
4991 * init.c (resolve_offset_ref): Or about implicit '&'.
4993 1999-08-11 Mark Mitchell <mark@codesourcery.com>
4995 * cp-tree.h (minimal_parse_mode): Remove.
4996 (finish_label_stmt): New function.
4997 * decl.c (saved_scope): Remove minimal parse mode.
4998 (maybe_push_to_top_level): Don't save it.
4999 (pop_from_top_level): Don't restore it.
5000 (define_label): Split out template-handling code to semantics.c.
5001 (start_decl): Don't use minimal_parse_mode.
5002 (cp_finish_decl): Likewise.
5003 (start_function): Don't increment it.
5004 (store_return_init): Don't use it.
5005 (finish_function): Don't decrement it.
5006 * parse.y (label_colon): Use finish_label_stmt throughout.
5007 * parse.c: Regenerated.
5008 * pt.c (minimal_parse_mode): Don't define it.
5009 (tsubst_expr): Use finish_label_stmt.
5010 * semantics.c (finish_label_stmt): New function.
5012 * dump.c (queue): Be careful when computing bitmasks.
5013 (dequeue_and_dump): Describe binfos as binfos, not as
5016 * parse.y (pedantic): Give it itype. Adjust usage accordingly
5018 * parse.c: Regenerated.
5020 * Make-lang.in (CXX_SRCS): Remove sig.c.
5021 * Makefile.in (CXX_OBJS): Remove sig.o.
5023 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5024 (CPTI_SIGNATURE_TYPE): Likewise.
5025 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5026 (opaque_type_node): Likewise.
5027 (signature_type_node): Likewise.
5028 (sigtable_entry_type): Likewise.
5029 (flag_handle_signatures): Likewise.
5030 (lang_type): Remove is_signature, is_signature_pointer,
5031 is_signature_reference, has_opaque_typedecls,
5032 sigtables_has_been_generated. Adjust dummy. Remove signature,
5033 signature_pointer_to, signature_reference_to.
5034 (IS_SIGNATURE): Remove.
5035 (SET_SIGNATURE): Remove.
5036 (CLEAR_SIGNATURE): Remove.
5037 (IS_SIGNATURE_POINTER): Remove.
5038 (IS_SIGNATURE_REFERENCE): Remove.
5039 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5040 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5041 (CLASSTYPE_SIGNATURE): Remove.
5042 (SIGNATURE_TYPE): Remove.
5043 (SIGNATURE_METHOD_VEC): Remove.
5044 (SIGNATURE_POINTER_TO): Remove.
5045 (SIGNATURE_REFERENCE_TO): Remove.
5046 (lang_decl_flags): Remove is_default_implementation. Rename
5047 memfunc_pointer_to to saved_tree.
5048 (IS_DEFAULT_IMPLEMENTATION): Remove.
5049 (DECL_MEMFUNC_POINTER_TO): Remove.
5050 (DECL_MEMFUNC_POINTING_TO): Remove.
5051 (DECL_SAVED_TREE): Adjust definition.
5052 (tag_types): Remove signature_type_node.
5053 (SIGNATURE_FIELD_NAME): Remove.
5054 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5055 (SIGNATURE_OPTR_NAME): Likewise.
5056 (SIGNATURE_SPTR_NAME): Likewise.
5057 (SIGNATURE_POINTER_NAME): Likewise.
5058 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5059 (SIGNATURE_REFERENCE_NAME): Likewise.
5060 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5061 (SIGTABLE_PTR_TYPE): Likewise.
5062 (SIGTABLE_NAME_FORMAT): Likewise.
5063 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5064 (SIGTABLE_TAG_NAME): Likewise.
5065 (SIGTABLE_VB_OFF_NAME): Likewise.
5066 (SIGTABLE_VT_OFF_NAME): Likewise.
5067 (finish_base_specifiers): Change prototype.
5068 (build_signature_pointer_type): Remove.
5069 (build_signature_reference_type): Remove.
5070 (build_signature_pointer_constructor): Remove.
5071 (build_signature_method_call): Remove.
5072 (build_optr_ref): Likewise.
5073 (append_signature_fields): Likewise.
5074 (signature_error): Likewise.
5075 * call.c (build_this): Remove signature support.
5076 (build_over_call): Likewise.
5077 (build_new_method_call): Likewise.
5078 * class.c (add_implicitly_declared_members): Likewise.
5079 (finish_struct_1): Likewise.
5080 (finish_struct): Likewise.
5081 * cvt.c (cp_convert_to_pointer): Likewise.
5082 (convert_to_pointer_force): Likewise.
5083 (ocp_convert): Likewise.
5084 * decl.c (sigtable_decl_p): Remove.
5085 (init_decl_processing): Remove support for signatures.
5086 (cp_finish_decl): Likewise.
5087 (grokdeclarator): Likewise.
5088 (grokparms): Likewise.
5089 (xref_tag): Likewise.
5090 (start_function): Likewise.
5091 (start_method): Likewise.
5092 * decl2.c (finish_sigtable_vardecl): Remove.
5093 (flag_handle_signatures): Remove.
5094 (lang_f_options): Remove handle-signatures.
5095 (grokfield): Remove support for signatures.
5096 (grokbitfield): Likewise.
5097 (finish_file): Likewise.
5098 (reparse_absdcl_as_casts): Likewise.
5099 * error.c (dump_type_real): Likewise.
5100 (dump_function_decl): Likewise.
5101 * friend.c (make_friend_class): Likewise.
5102 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5103 * hash.h: Regenerated.
5104 * init.c (build_new_1): Remove support for signatures.
5105 * lang-options.h: Remove -fhandle-signatures,
5106 -fno-handle-signatures.
5107 * lex.c (init_parse): Remove support for signatures.
5108 (yyprint): Likewise.
5109 * lex.h (rid): Remove RID_SIGNATURE.
5110 * method.c (build_decl_overload_real): Remove support for
5112 (hack_identifier): Likewise.
5113 * parse.y (base_class): Likewise.
5114 (base_class.1): Likewise.
5115 (access_specifier): Likewise.
5116 * search.c (lookup_member): Likewise.
5117 * semantics.c (finish_qualified_object_call_expr): Likewise.
5118 (finish_template_type_parm): Likewise.
5119 (begin_class_definition): Likewise.
5120 (finish_base_specifier): Likewise.
5122 * tree.c (build_cplus_method_type): Remove support for signatures.
5123 * typeck.c (require_complete_type): Likewise.
5124 (c_sizeof): Likewise.
5125 (c_alignof): Likewise.
5126 (build_object_ref): Likewise.
5127 (build_component_ref): Likewise.
5128 (build_indirect_ref): Likewise.
5129 (build_c_cast): Likewise.
5130 (build_modify_expr): Likewise.
5131 (convert_for_initialization): Likewise.
5132 * typeck2.c (signature_error): Remove.
5133 (store_init_value): Remove support for signatures.
5134 (digest_init): Likewise.
5135 (build_x_arrow): Likewise.
5136 (build_functional_cast): Likewise.
5137 * xref.c (GNU_xref_decl): Likewise.
5139 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5141 * lex.c (do_identifier): Remove unnecessary lookup of class field.
5143 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
5145 * decl2.c (set_decl_namespace): Do not complain about non-matching
5146 decls if processing a template.
5148 1999-08-09 Mark Mitchell <mark@codesourcery.com>
5150 * decl.c (build_ptrmemfunc_type): Handle qualified
5151 pointer-to-member types here.
5152 * tree.c (cp_build_qualified_type_real): Simplify handling here.
5154 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5156 * lex.c (lang_identify): Likewise.
5158 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
5160 * Makefile.in: Update dependencies.
5161 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5163 * decl.c: Include "function.h"
5164 (cleanup_label, return_label): Delete declarations.
5165 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5166 (finish_function): Rename last_parm_insn variable to
5167 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
5168 * decl2.c: Include "function.h".
5169 (rtl_expr_chain): Delete declaration.
5170 * method.c: Include "function.h"
5171 * tree.c (build_vbase_pointer_fields): Don't initialize
5172 DECL_SAVED_INSNS with NULL_RTX.
5173 * typeck.c: Include "function.h"
5175 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
5177 * semantics.c (begin_function_try_block, finish_function_try_block,
5178 finish_function_handler_sequence): New fns.
5179 * parse.y (function_try_block): Use them.
5180 * pt.c (instantiate_decl): Likewise.
5182 * cp-tree.h: Declare in_function_try_handler.
5183 * decl.c: Define it.
5184 (start_function): Clear it.
5185 (struct cp_function, push_cp_function_context): Save it.
5186 (pop_cp_function_context): Restore it.
5187 * parse.y (function_try_block): Set and clear it.
5188 * except.c (expand_end_catch_block): Rethrow if we reach the end
5189 of a function-try-block handler in a ctor or dtor.
5190 * typeck.c (c_expand_return): Complain about returning from a
5191 function-try-block handler of a ctor.
5193 * parse.y (function_try_block): Call end_protect_partials
5194 before expand_start_all_catch.
5196 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
5198 * decl.c (struct binding_level): Add eh_region field.
5199 (push_binding_level): Set it.
5200 (define_label): Complain about jumping into an EH block.
5202 * ptree.c (print_lang_type): Print the real type of a PMF.
5203 Print what exceptions a fn type throws.
5205 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5207 * class.c (count_fields, add_fields_to_vec): Add static prototype.
5209 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5210 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5213 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5216 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5219 * dump.c (queue_and_dump_index, dump_int, dump_string,
5220 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5222 (dump_stmt): Add static prototype.
5224 * errfn.c (cp_thing): Constify a char*.
5226 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5227 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5228 dump_expr): Constify a char*.
5230 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5231 read_line_number): Add static prototype.
5232 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5233 (real_yylex): Move label `letter' into the scope where it is used.
5235 * method.c (build_mangled_template_parm_index, build_overload_int,
5236 build_decl_overload_real, get_id_2): Constify a char*.
5238 * search.c (check_final_overrider): Make static.
5240 * typeck.c (composite_pointer_type): Constify a char*.
5242 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5244 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5245 we're looking at a class.
5247 * decl.c (lookup_name_real): Set the complain flag if we're
5248 looking for a namespace member.
5250 * lex.c (real_yylex): We can have a number with no digits.
5252 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5254 * search.c (binfo_from_vbase): New fn.
5255 * cp-tree.h: Declare it.
5256 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5257 from pointer to member of virtual base.
5258 * typeck.c (get_delta_difference): Likewise.
5260 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
5262 * pt.c (tsubst): Use build_index_type to build in-template array
5263 index type. Fixes g++.oliva/dwarf1.C.
5264 * decl.c (grokdeclarator): Likewise, just for consistency, as it
5265 doesn't seem to trigger the bug without it.
5267 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
5269 * typeck2.c (add_exception_specifier): Use complete_type.
5271 1999-08-06 Mark Mitchell <mark@codesourcery.com>
5273 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5274 (dump_binary_op): Bulletproof.
5275 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5276 * tree.c (search_tree): Don't enumerate all the nodes of classes
5277 `1', `2', and `<'; handle them generically. Don't be sorry about
5278 "unrecognized tree codes"; just abort.
5279 (no_linkage_check): Don't do linkage checks for templates.
5281 * tree.c (cp_build_qualified_type_real): Handle
5282 pointer-to-member-function types correctly.
5284 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
5286 * decl.c (pushdecl): Only give an error for shadowing a parm
5287 from *this* function.
5289 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
5291 * typeck2.c: Update URLs and mail addresses.
5293 1999-08-04 Nathan Sidwell <nathan@acm.org>
5295 * cp-tree.h (empty_except_spec): New global var.
5296 (compexcepttypes): Remove prototype.
5297 (comp_except_specs): Prototype new global function.
5298 (add_exception_specifier): Prototype new global function.
5299 * decl.c (empty_except_spec): Define new global var.
5300 (duplicate_decls): Use comp_except_specs, reword error message.
5301 (init_decl_processing): Initialize empty_except_spec.
5302 Adjust build_exception_variant calls.
5303 * parse.y (exception_specification_opt): Use empty_except_spec.
5304 (ansi_raise_identifier): Call check_for_new_type.
5305 (ansi_raise_identifiers): Use add_exception_specifier.
5306 * pt.c (tsubst): Use add_exception_specifier to build exception
5308 * search.c (check_final_overrider): New static function, broken
5309 out of get_matching_virtual. Check throw specifiers, reword
5311 (get_matching_virtual): Use check_final_overrider.
5312 * tree.c (build_exception_variant): Use comp_except_specs.
5313 * typeck.c (compexcepttypes): Remove.
5314 (comp_except_types): New static function, helper for
5315 comp_except_specs. Compare two types as exception specifiers.
5316 (comp_except_specs): New global function, compare two exception
5318 (comptypes): Adjust for comp_except_specs.
5319 * typeck2.c (add_exception_specifier): New global function.
5321 * class.c (check_for_override): Reword error message.
5323 1999-08-03 Nathan Sidwell <nathan@acm.org>
5325 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5326 * cp-tree.h (struct lang_type): Added non_pod_class flag.
5327 (CLASSTYPE_NON_POD_P): New macro to access it.
5328 * class.c (finish_struct_1): Determine non-PODness.
5329 Check for arrays of pointers (-Weffc++).
5330 Remove array inspection duplicated code.
5331 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5332 Use CLASSTYPE_NON_POD_P.
5334 1999-08-03 Nathan Sidwell <nathan@acm.org>
5336 * class.c (duplicate_tag_error): Preserve template information.
5338 1999-08-03 Nathan Sidwell <nathan@acm.org>
5340 * decl.c (start_enum): Show location of previous definition.
5341 * parse.y (enumlist_opt): New reduction.
5342 (structsp): Simplify enum rules to use enumlist_opt.
5344 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
5346 * lex.c (yyprint): Handle PFUNCNAME.
5348 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5349 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5351 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
5353 * decl.c (start_decl): Set attributes before duplicate_decls call.
5355 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5357 * Make-lang.in (CXX_SRCS): Add dump.c.
5358 * Makefile.in (CXX_OBJS): Add dump.o.
5359 (dump.o): New target.
5360 * cp-tree.h (DECL_CONV_FN_P): Document.
5361 (DECL_OVERLOADED_OPERATOR_P): New function.
5362 (TYPE_PTRMEM_CLASS_TYPE): New macro.
5363 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5364 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5365 (ASM_VOLATILE_P): New macro.
5366 (STMT_LINENO): Likewise.
5367 (cp_namespace_decls): New function.
5368 (dump_node_to_file): New function.
5369 * decl.c (cp_namespace_decls): New function.
5370 (walk_namespaces_r): Use it.
5371 (wrapup_globals_for_namespace): Likewise.
5372 * decl2.c (flag_dump_translation_unit): New variable.
5373 (lang_decode_option): Handle -fdump-translation-unit.
5374 (finish_file): If flag_dump_translation_unit is set, dump the
5377 * lang-options.h: Add -fdump-translation-unit.
5378 * pt.c (tsubst_template_parms): Robustify.
5379 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5380 (tsubst_expr): Use STMT_LINENO.
5381 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
5382 for invalid cv-qualifiers even while building templates.
5384 1999-08-02 Richard Henderson <rth@cygnus.com>
5386 * call.c: Include defaults.h instead of expr.h.
5389 * typeck.c: Include defaults.h.
5391 1999-08-02 Mark Mitchell <mark@codesourcery.com>
5393 * lex.c (errorcount, sorrycount): Don't declare.
5394 * repo.c (errorcount, sorrycount): Likewise.
5395 * typeck2.c (errorcount, sorrycount): Likewise.
5397 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
5399 * call.c (convert_default_arg, build_over_call): Change all uses of
5400 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5401 Ensure expr.h is included.
5402 * decl.c (grokparams): Ditto.
5403 * pt.c (tsubst_decl): Ditto.
5404 * typeck.c (convert_arguments): Ditto.
5406 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
5408 * class.c (mark_overriders): Fix order of args to overrides.
5409 (warn_hidden): Likewise. Fix for having virtual and non-virtual
5410 functions with the same name.
5412 1999-08-02 Richard Henderson <rth@cygnus.com>
5414 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5416 1999-08-01 Mark Mitchell <mark@codesourcery.com>
5418 * call.c (build_conditional_expr): Fix typo in comment.
5420 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
5422 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5423 case_stack; use in_control_zone_p.
5424 * typeck.c (c_expand_return): Likewise.
5426 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
5428 * except.c (catch_clauses): Delete declaration.
5430 1999-07-30 Mark Mitchell <mark@codesourcery.com>
5432 * call.c (build_conditional_expr): Call convert_from_reference to
5433 avoid reference/non-reference type confusion. Fix typo.
5435 1999-07-30 Richard Henderson <rth@cygnus.com>
5437 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5438 * cp-tree.h (initializer_constant_valid_p): Remove.
5440 1999-07-28 Mark Mitchell <mark@codesourcery.com>
5442 * call.c (conditional_conversion): Don't build BASE_CONVs for
5443 conversions between things that have the same type.
5444 (build_conditional_expr): Tweak.
5445 (convert_like): Some BASE_CONVs really do require the generation
5448 * init.c (perform_member_init): Don't go through build_modify_expr
5449 for simple initializations.
5451 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
5453 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5454 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5455 virtual functions and MI. Simplify.
5457 * method.c: Remove prototype for largest_union_member.
5458 * pt.c (determine_specialization): Fix uninitialized warning.
5459 * lex.c (real_yylex): Likewise.
5461 1999-07-27 Mark Mitchell <mark@codesourcery.com>
5463 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5466 * cp-tree.h (BINFO_VIRTUALS): Document new format.
5467 * class.c (modify_one_vtable): Change prototype accordingly.
5468 (modify_all_vtables): Likewise.
5469 (modify_all_direct_vtables): Likewise.
5470 (modify_all_indirect_vtables): Likewise.
5471 (build_vtable_entry_for_fn): New function.
5472 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5473 (modify_vtable_entry): Likewise.
5474 (add_virtual_function): Likewise.
5475 (build_vtbl_initializer): New function.
5476 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5477 (fixup_vtable_deltas1): Likewise.
5478 (fixup_vtable_deltas): Likewise.
5479 (override_one_vtable): Likewise.
5480 (finish_struct_1): Likewise.
5482 * error.c (dump_expr): Likewise.
5483 * search.c (get_abstract_virtuals_1): Likewise.
5484 (get_abstract_virtuals): Likewise.
5485 (expand_upcast_fixups): Likewise.
5486 * tree.c (debug_binfo): Likewise.
5487 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5488 __pure_virtual here.
5490 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5492 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5493 as per 1999-07-26 change.
5495 * typeck.c (c_sizeof): Don't allow non-static data members.
5496 (expr_sizeof): Likewise.
5498 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
5500 * input.c (feed_input): Only touch lineno and input_filename
5501 if !USE_CPPLIB. Save the old values before setting the new ones.
5503 * input.c (feed_input): Add file, line parms.
5504 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5505 (real_yylex): Check linemode before input_redirected().
5507 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5508 from op new to warning.
5510 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5512 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5513 * call.c: All uses changed.
5514 * typeck.c: Likewise.
5516 1999-07-26 Nathan Sidwell <nathan@acm.org>
5518 * exception.cc (__cplus_type_matcher): Match __eh_matcher
5521 1999-07-26 Mark Mitchell <mark@codesourcery.com>
5523 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5524 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5525 (strip_top_quals): Declare.
5526 (ncp_convert): Likewise.
5527 (type_after_usual_arithmetic_converions): Likewise.
5528 (composite_pointer_type): Likewise.
5529 * call.c (strip_top_quals): Don't make it static.
5530 (promoted_arithmetic_type_p): New function.
5531 (conditional_conversion): Likewise.
5532 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5533 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
5534 for converting a type to itself.
5535 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5536 (implicit_conversion): Make sure the from and to types are
5538 (add_builtin_candidate): Correct handling of ?: operator.
5539 (add_builtin_candidates): Improve documentation.
5540 (build_conditional_expr): New function.
5541 (can_convert): Implement in terms of can_convert_arg.
5542 (ncp_convert): New function.
5543 * typeck.c (type_after_usual_arithmetic_conversions): New
5544 function, split out from common_type.
5545 (composite_pointer_type): New function, split out from
5546 build_conditional_expr.
5547 (common_type): Use type_after_usual_arithmetic_conversions.
5548 Remove redundant attribute merging.
5549 (comptypes): Tidy. Handle COMPLEX_TYPE.
5550 (build_binary_op_nodefault): Use null_ptr_cst_p.
5551 (build_conditional_expr): Remove.
5552 (convert_for_assignment): Use new conversion functions.
5554 * cp-tree.h (abstract_virtuals_error): Change declaration.
5555 * typeck2.c (abstract_virtuals_error): Check to see if an error
5556 ocurred, and return a boolean value accordingly.
5557 (build_functional_cast): Adjust accordingly.
5558 * class.c (finish_struct_1): Likewise.
5559 * cvt.c (ocp_convert): Likewise.
5560 * decl.c (cp_finish_decl): Likewise.
5561 (grokparams): Likewise.
5562 (grok_op_properties): Likewise.
5563 (start_function): Likewise.
5564 * init.c (build_new_1): Likewise.
5566 * pt.c (unify): Don't get confused by pointers-to-member functions.
5568 * search.c (build_cplus_new): Robustify.
5570 1999-07-24 Richard Henderson <rth@cygnus.com>
5572 * gxx.gperf (__builtin_va_arg): New.
5573 * parse.y (VA_ARG): New token.
5574 (unary_expr): Recognize it.
5576 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
5578 * g++FAQ.texi: Deleted per Joe Buck's request.
5579 * Makefile.in: Corresponding changes.
5581 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
5583 * lex.c: Sync with C frontend.
5584 (whitespace_cr): New fn.
5585 (skip_white_space): Use it.
5586 (init_parse): Reorder.
5587 (yyprint): Support CONSTANT.
5588 (pragma_getc, pragma_ungetc): Bring back.
5589 (read_line_number): Change in_system_header directly.
5590 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5591 (parse_float): Update to C version.
5592 (yylex): Handle '$' under the letter case.
5593 Remove looking_for_typename handling.
5594 Support hex floating point constants.
5595 Follow C's lead for choosing type of integer constants.
5596 Rearrange stuff to match C frontend.
5597 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5598 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5600 1999-07-23 Mark Mitchell <mark@codesourcery.com>
5602 * call.c (reference_binding): Tweak.
5603 (mayble_handle_implicit_object): Use direct_reference_binding to
5604 create the right implicit conversion sequence.
5606 1999-07-22 Mark Mitchell <mark@codesourcery.com>
5608 * pt.c (convert_nontype_argument): Don't call decl_constant_value
5609 if we're converting to a reference type.
5611 * call.c (NEED_TEMPORARY_P): New macro.
5612 (standard_conversion): Set it, for derived-to-base conversions.
5613 (reference_related_p): New function.
5614 (reference_compatible_p): Likewise.
5615 (convert_class_to_reference): Likewise.
5616 (direct_reference_binding): Likewise.
5617 (reference_binding): Rework for standards-compliance.
5618 (convert_like): Adjust accordingly.
5619 (maybe_handle_ref_bind): Simplify; the right conversion sequences
5620 are now built up in reference_binding.
5621 (initialize_reference): New function.
5622 * cp-tree.h (ICS_USER_FLAG): Document.
5623 (ICS_THIS_FLAG): Likewise.
5624 (ICS_BAD_FLAG): Likewise.
5625 (NEED_TEMPORARY_P): Likewise.
5626 (cp_lvalue_kind): New type.
5627 (real_lvalue_p): Return it.
5628 * error.c (dump_expr): Provide more accurate representation for
5630 * init.c (expand_default_init): Do not try to perform implicit
5631 conversions for a brace-enclosed initializer.
5632 * search.c (lookup_conversions): Document.
5633 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
5635 (real_lvalue_p): Adjust accordingly.
5636 (lvalue_p): Likewise.
5637 (build_cplus_new): Don't allow the creation of an abstract class.
5638 * typeck.c (convert_for_initialization): Use initialize_reference.
5640 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
5642 * lex.c (real_yylex) : Correct the test for overflow when lexing
5645 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
5647 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5648 not DECL_BUILT_IN, to determine if a function is internally declared.
5649 (duplicate_decls): Likewise. Improve handling of builtins.
5650 (push_overloaded_decl): Remove special handling of builtins.
5652 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5654 * decl.c (grokdeclarator): Pull out decl_constant_value in
5657 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5658 * cp-tree.h, pt.c, semantics.c: Adjust.
5659 * method.c (largest_union_member): Remove.
5661 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5663 * lex.c (token_getch, token_put_back): New fns.
5664 (real_yylex): Use them.
5666 * lex.c (lang_init): Generalize.
5667 (lang_init_options): Tell cpplib this is C++.
5668 (nextchar): Remove. Replace uses with put_back.
5669 (skip_white_space): Handle linemode here. Optimize for cpplib.
5670 (extend_token_buffer_to): New fn.
5671 (extend_token_buffer): Use it.
5672 (read_line_number, check_newline): Just deal with tokens.
5673 (real_yylex): More cpplib optimizations. Simplify. Don't produce
5674 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5675 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5676 * parse.y (PAREN_STAR_PAREN): Remove.
5677 * input.c: Don't use the putback machinery with cpplib.
5678 (sub_getch): Fold back into getch.
5679 (getch): Don't handle linemode here.
5680 (feed_input): Unget any text in the token buffer.
5682 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5683 nextyychar, nextyylval): Remove.
5685 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
5686 Jason Merrill <jason@yorick.cygnus.com>
5688 * lex.c (indent_level): New variable.
5689 (init_parse): Set cpp_token to CPP_DIRECTIVE.
5690 (consume_string): Make this smart about USE_CPPLIB.
5691 (yyungetc): Use put_back function.
5692 (pragma_getc, pragma_ungetc): Functions deleted.
5693 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5694 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5696 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5697 Also, clean up cases where we redundantly set token_buffer[0].
5698 (read_line_number): New fn.
5699 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5700 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5701 (sub_getch): Conditionalize out code that's not appropriate if
5703 (put_back): Rewrite in case USE_CPPLIB is defined.
5704 (input_redirected): Ditto.
5706 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5708 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5709 c_global_trees and accessor macros defined in c-common.h.
5710 (cp_tree_index): New enumeration.
5711 (cp_global_trees): Declare new array. Add accessor macros for it, and
5712 delete declarations of tree nodes replaced by it.
5713 (builtin_function): Delete macro, add declaration for new function.
5715 * decl.c: Delete definitions for tree nodes that were replaced by
5716 cp_global_trees and c_global_trees.
5717 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5718 to generate the common builtins here.
5719 (builtin_function): New function.
5720 * decl2.c (abort_fndecl): Delete declaration.
5721 * except.c (expand_builtin_return_address): Delete declaration.
5722 (builtin_return_address_fndecl): Delete variable.
5723 (const_ptr_type_node): Delete declaration.
5724 * lex.c (cons_up_default_function): Delete declaration of
5726 * parse.y (void_list_node): Delete declaration.
5727 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5729 (const_string_type_node): Delete declaration.
5730 * search.c (abort_fndecl): Delete declaration.
5731 * Makefile.in: Update dependencies.
5733 1999-07-19 Mark Mitchell <mark@codesourcery.com>
5735 * pt.c (check_default_tmpl_args): Move test for missing default
5736 arguments here, from ...
5737 (end_template_parm_list): Here.
5739 1999-07-18 Mark Mitchell <mark@codesourcery.com>
5741 * decl.c (lookup_nested_type): Remove.
5742 (pushtag): Don't call it.
5744 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
5746 * Makefile.in (INTERFACE): Bump to 2.
5748 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
5750 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5751 instructions to gcc.gnu.org. Removed e-mail address.
5753 1999-07-17 Mark Mitchell <mark@codesourcery.com>
5755 * pt.c (determine_specialization): Tighten error-checking.
5756 (end_template_parm_list): Likewise.
5758 1999-07-14 Mark Mitchell <mark@codesourcery.com>
5760 * pt.c (check_default_tmpl_args): Handle friends defined in the
5761 class just like member functions defined in the class.
5763 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5764 Jason Merrill <jason@yorick.cygnus.com>
5766 * cp-tree.h (struct lang_decl): Added field for storing sorted
5767 FIELD_DECLs (used in TYPE_DECLs).
5768 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5769 (DECL_SORTED_FIELDS): New macro.
5770 * class.c (method_name_cmp): New function.
5771 (finish_struct_methods): Modified to support sorting and searching
5773 (finish_struct_anon): Changed code in inner loop to use ELT rather
5774 than UELT (which required an extra indirection for every reference).
5775 (field_decl_cmp): New function to support sorting FIELD_DECLs.
5776 (finish_struct_1): Sort fields.
5777 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5778 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5779 Also, switch to using array indexing rather than a changing pointer.
5780 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5783 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
5785 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5786 casts in system headers or extern "C" blocks.
5788 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5791 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
5793 * decl2.c (write_virtuals): Deleted declaration.
5794 * cp-tree.h (write_virtuals): Deleted extern declaration.
5795 * class.c (finish_struct_1): Removed #if 0'd code that mentions
5797 * semantics.c (begin_class_definition): Rewrite code to not depend
5800 * lex.c (cp_pragma_interface): New function.
5801 (cp_pragma_implementation): Likewise.
5802 (handle_cp_pragma): Call them.
5804 * typeck.c (comptypes): Simplify C code in look_hard.
5806 * xref.c (PALLOC): Use xcalloc, not calloc.
5807 (SALLOC): Use xmalloc, not malloc.
5809 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5811 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5814 * decl.c (duplicate_decls): If a redeclaration doesn't match the
5815 initial declaration, then don't save the inline info and by all
5816 means don't mark the function as a builtin function.
5818 * decl.c (lookup_name_real): Set NONCLASS to 1 if
5819 CURRENT_CLASS_TYPE is 0.
5821 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5824 * ptree.c (print_lang_type): Added vtable-needs-writing.
5826 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
5828 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5830 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
5832 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5833 Merged into c-common.
5835 1999-07-05 Dave Brolley <brolley@cygnus.com>
5837 * lex.c (errorcount): Declare it.
5838 (finish_parse): Update errorcount for when using CPPLIB.
5840 1999-07-05 Mark Mitchell <mark@codesourcery.com>
5842 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5844 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5845 * decl.c (push_class_binding): Use it.
5846 (lookup_name_real): Likewise.
5848 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
5850 * cp-tree.h (widest_integer_literal_type_node,
5851 widest_unsigned_literal_type) : New.
5852 * decl.c (widest_integer_literal_type_node,
5853 widest_unsigned_literal_type) : New.
5854 (init_decl_processing): Handle/use the two new types.
5855 * lex.c (real_yylex): Same.
5856 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5859 1999-07-01 Mark Mitchell <mark@codesourcery.com>
5861 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5862 to anonymous cv-qualified types.
5864 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
5866 * lex.c (real_yylex) : Change integer literal overflow handling to
5869 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5871 1999-06-28 Richard Henderson <rth@cygnus.com>
5873 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5875 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
5877 * error.c (dump_type_real): Handle TREE_LIST again.
5879 * typeck.c (comp_target_parms): Don't complain about
5880 converting from () to (...) if !flag_strict_prototype.
5882 * decl.c (grokdeclarator): Update the names of all variants when
5885 1999-06-21 Mark Mitchell <mark@codesourcery.com>
5887 * init.c (expand_aggr_vbase_init): Rename to
5888 construct_virtual_bases. Conditionalize construction here,
5890 (emit_base_init): Here.
5892 1999-06-19 Mark Mitchell <mark@codesourcery.com>
5894 * semantics.c (finish_asm_stmt): Apply decay conversions to
5897 * decl.c (expand_static_init): When building an anonymous function
5898 for use with atexit, compute its body before and after entering
5901 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
5904 1999-06-18 Mark Mitchell <mark@codesourcery.com>
5906 * init.c (expand_aggr_vbase_init): Add flag parameter.
5907 (build_partial_cleanup_for): Remove, inlining into ..
5908 (expand_cleanup_for_base): ... here. Take flag parameter.
5909 (emit_base_init): Pass the in_chrg parameter to
5910 emit_aggr_vbase_init.
5911 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
5913 1999-06-16 Mark Mitchell <mark@codesourcery.com>
5915 * decl2.c (import_export_decl): Use same_type_p, rather than
5916 relying on pointer-equality for types.
5918 * method.c (do_build_copy_constructor): Simplify.
5920 * call.c (build_method_call): Remove bogus code for two-argument
5922 * init.c (build_new_1): Expand on comment, and remove dead code.
5924 * init.c (expand_cleanup_for_base): New function, split out
5926 (emit_base_init): Here.
5927 (expand_aggr_vbase_init): Use it.
5929 1999-06-15 Mark Mitchell <mark@codesourcery.com>
5931 * cp-tree.h (class_cache_firstobj): Declare.
5932 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5933 * class.c (permanent_obstack): Remove declaration.
5934 (class_cache_firstobj): Make it global.
5935 (add_method): Don't use permanent_obstack directly.
5936 (pushclass): Only free the class_cache_obstack if we know how far
5938 (maybe_push_cache_obstack): Rename to push_cache_obstack.
5939 * decl.c: Remove dead comment.
5940 (saved_scope): Add class_cache_firstobj.
5941 (push_to_top_level): Save it.
5942 (pop_from_top_level): Restore it.
5943 (push_class_level_binding): Use push_cache_obstack, not
5944 maybe_push_cache_obstack.
5945 * search.c (push_class_decls): Likewise.
5947 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5949 * pt.c (tsubst_friend_function): Push into namespace of friend
5950 function before pushdecl'ing it.
5952 1999-06-14 Nathan Sidwell <nathan@acm.org>
5954 * call.c (build_new_op): Remove REF_BIND from all operands.
5956 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
5958 * init.c (build_new_1): Look up operator delete even if there was
5959 no explicit new placement.
5961 1999-06-08 Nathan Sidwell <nathan@acm.org>
5963 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
5965 (build_throw): ... here. Call it.
5966 (process_start_catch_block): Call it.
5968 1999-06-07 Mark Mitchell <mark@codesourcery.com>
5970 * search.c (convert_pointer_to_single_level): Reimplement without
5973 1999-06-06 Mark Mitchell <mark@codesourcery.com>
5975 * method.c (is_back_referenceable_type): Back-reference bools when
5978 1999-06-07 Dave Brolley <brolley@cygnus.com>
5980 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
5981 * input.c (putback_buffer): New structure type.
5982 (putback): Replaces putback_char member.
5983 (putback): Replaces putback_char static variable.
5984 (feed_input): Use putback.
5985 (end_input): Use putback.
5986 (sub_getch): Use putback.
5987 (put_back): Use putback.
5989 1999-06-05 Mark Mitchell <mark@codesourcery.com>
5991 * decl.c (grokdeclarator): Fix typo in last change.
5993 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
5995 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
5996 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
5998 1999-06-04 Nathan Sidwell <nathan@acm.org>
6000 * except.c (build_throw): Check throw expression validity.
6002 1999-06-03 Mark Mitchell <mark@codesourcery.com>
6004 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6005 just because flag_signed_bitfields is false.
6007 1999-06-03 Nathan Sidwell <nathan@acm.org>
6009 * semantics.c (begin_class_definition): Update the struct's
6011 * class.c (finish_struct): ... rather than here.
6013 * decl.c (make_typename_type): Don't rely on uninitialized
6016 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6018 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6020 1999-05-31 Mark Mitchell <mark@codesourcery.com>
6022 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6023 and friends rather than messing with current_obstack directly.
6024 (cp_build_qualified_type_real): Rework ARRAY_TYPE
6025 allocation to match practice throughout the rest of the
6028 1999-05-30 Mark Mitchell <mark@codesourcery.com>
6030 * lex.c (make_lang_type): Create TYPE_BINFO for
6031 TEMPLATE_TYPE_PARMs just like for non-template types.
6033 * decl.c (start_decl): Move checks on initialization to ...
6034 (cp_finish_decl): Here. Tidy formatting slightly.
6036 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6038 * decl.c (add_binding): Don't complain about a redeclaration of a
6039 semantically identical typedef in a local scope.
6041 1999-05-28 Nathan Sidwell <nathan@acm.org>
6043 * decl.c (complete_array_type): Allocate off same obstack. Fix
6044 DO_DEFAULT comment to match reality.
6046 * friend.c (make_friend_class): Fix diagnostic typo.
6048 1999-05-28 Mark Mitchell <mark@codesourcery.com>
6050 * decl.c (lookup_namespace_name): Handle getting a
6052 (expand_static_init): Don't call pushdecl for implicitly declared
6053 `atexit' used to register destructors.
6055 1999-05-25 Mark Mitchell <mark@codesourcery.com>
6057 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6060 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6061 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
6062 by combining TEMPLATE_INFO and LEVEL into a single union.
6063 (DECL_TEMPLATE_INFO): Reformat.
6064 (DECL_SAVED_TREE): Document.
6065 (DECL_TEMPLATE_INJECT): Remove.
6066 * class.c (finish_struct): Remove code to deal with
6067 DECL_TEMPLATE_INJECT.
6069 * decl.c (maybe_process_template_type_declaration): Handle all new
6070 types in templates uniformly.
6071 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6073 * pt.c (lookup_template_class): Inject template instantiations of
6074 forward-declarations.
6075 (instantiate_class_template): Remove code processing
6076 DECL_TEMPLATE_INJECT.
6078 * pt.c (lookup_template_class): Tweak lookup to find member
6081 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6083 * semantics.c (finish_asm_stmt): Make strings permanent if they're
6086 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
6088 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6089 parts of pointer to data member types.
6091 1999-05-24 Mark Mitchell <mark@codesourcery.com>
6093 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6094 and then make it look like `abort'. Just use `abort' instead.
6096 * typeck.c (build_static_cast): Don't allow static_casts that cast
6098 (casts_away_constness_r): New function.
6099 (casts_away_constness): Likewise.
6101 * decl.c (lookup_tag): Remove code no longer needed after
6102 name-lookup improvements.
6103 * decl2.c (handle_class_head): Make error-recovery more robust.
6104 * friend.c (make_friend_class): Reject templated typename types.
6105 * lex.c (is_global): A template parameter isn't global.
6106 * parse.y (class_head): Robustify.
6107 * parse.c: Regenerated.
6109 1999-05-22 Mark Mitchell <mark@codesourcery.com>
6111 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6112 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
6114 * cp-tree.h (push_nested_namespace): Declare.
6115 (pop_nested_namespace): Likewise.
6116 * decl.c (push_nested_namespace): New function.
6117 (pop_nested_namespace): Likewise.
6118 * pt.c (instantiate_class_template): Use them.
6120 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6122 * cp-tree.h (cplus_expand_constant): Declare.
6123 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6124 converted from one pointer-to-object type to another.
6125 * expr.c (cplus_expand_constant): Don't make it static.
6126 * typeck.c (build_component_ref): Don't crash when presented with
6127 a component which is a TEMPLATE_DECL.
6128 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
6129 cast from a pointer-to-member constant to its own type does not
6130 result in a valid non-type template argument.
6132 1999-05-21 Mark Mitchell <mark@codesourcery.com>
6133 Nathan Sidwell <nathan@acm.org>
6135 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6136 * cp-tree.h: Fix typo in documentation on pointers-to-members.
6137 (cp_build_qualified_type): Make it a macro.
6138 (cp_build_qualified_type_real): Declare.
6139 * decl.c (grokdeclarator): Remove misleading comment. Avoid
6140 problem with template parameters and restrict-qualification.
6141 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6142 * hash.h: Regenerated.
6143 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6145 (NORID): Remove definition.
6146 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6147 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
6148 (fn_type_unification): Check that the function type resulting from
6149 the deduction is legal.
6150 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6151 (unify): Use cp_build_qualified_type_real.
6152 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6153 (cp_build_qualified_type): Rename to ...
6154 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6155 and modify appropriately.
6157 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6158 reveal optimization opportunities.
6160 * pt.c (tsubst): Don't issue error messages when we're not
6161 complaining, even if we see a qualified function type.
6162 (check_cv_quals_for_unify): Don't allow a qualified function
6165 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6167 * class.c (instantiate_type): Downgrade errors for object-dependent
6168 memfn refs to pedwarn.
6170 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6172 * decl.c (grokdeclarator): Don't treat [] as indicating a
6173 zero-sized array in a typedef.
6175 * call.c (build_object_call): Don't look at DECL_NAME for a type.
6176 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6177 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6179 * pt.c (for_each_template_parm): Rework to match documentation.
6180 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6182 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
6184 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6186 * class.c (finish_base_struct): Allow non-COM bases for COM classes
6187 except at the leftmost position.
6188 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6189 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6190 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6192 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6193 (build_cplus_new): Make sure that what we return is of the right type.
6195 1999-05-20 Mark Mitchell <mark@codesourcery.com>
6197 * cp-tree.h (make_ptrmem_cst): New function.
6198 * expr.c (cplus_expand_constant): Split out from ...
6199 (cplus_expand_expr): Here. Use cplus_expand_constant.
6200 (init_cplus_expand): Set lang_expand_constant.
6201 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6203 * tree.c (make_ptrmem_cst): Define.
6204 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6205 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6207 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6209 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6211 * decl2.c (start_static_storage_duration_function): Fix comment.
6212 (finish_file): Create static storage duration functions lazily.
6214 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6216 Implement anonymous structs.
6217 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6218 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6219 * class.c (finish_struct_1): Remove redundant check for anon struct.
6220 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6221 (check_tag_decl): Check for anonymous struct here.
6222 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6223 * init.c (sort_member_init, emit_base_init): Handle getting fields
6224 as well as names in current_member_init_list.
6225 (perform_member_init): Handle getting an anon aggr.
6226 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6227 (do_build_copy_constructor): Likewise.
6229 1999-05-19 Mark Mitchell <mark@codesourcery.com>
6231 * tree.c (cp_build_qualified_type): Don't allow qualified function
6234 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
6236 * gxxint.texi: Fix typo.
6238 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
6240 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6241 * class.c (finish_struct_1): Use CLASS_TYPE_P.
6242 * ptree.c (print_lang_type): Likewise.
6243 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6245 * typeck2.c (digest_init): Likewise.
6247 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
6249 * call.c (joust): Compare the types of the conv ops, not the
6250 target types of the conversions.
6252 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
6254 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6257 1999-05-17 Mark Mitchell <mark@codesourcery.com>
6259 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6260 * decl.c (grokfndecl): Don't allow inline declarations of friend
6261 template specializations, or friend template specializations with
6263 * pt.c (tsubst): Handle substitution into array types that does
6264 not yield a fixed upper bound, even when not processing a
6266 (tsubst_copy): Deal with the fact that the second operand to a
6267 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6268 * search.c (marked_pushdecls_p): Don't descend into
6269 TEMPLATE_TYPE_PARMs and the like.
6270 (unmarked_pushdecls_p): Likewise.
6272 * call.c (build_over_call): Don't throw away
6273 initializations/copies of empty classes; use MODIFY_EXPR and
6274 INIT_EXPR as for non-empty classes.
6275 * class.c (finish_struct_1): Put the padding byte for an empty
6276 class on the TYPE_NONCOPIED_PARTS list for the class.
6278 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6280 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6281 indicate a reference to a field that is a qualified name.
6283 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
6285 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6286 ASM_OUTPUT_CONSTRUCTOR.
6288 * friend.c (do_friend): Add attrlist arg. Remove support for
6289 getting a non-decl as 'decl'.
6290 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
6292 (grokdeclarator): Adjust.
6293 * cp-tree.h: Adjust.
6295 1999-05-16 Mark Mitchell <mark@codesourcery.com>
6297 * cp-tree.h (permanent_p): New function.
6298 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6299 possibly complex tree node.
6300 * tree.c (mapcar): Adjust comments, and follow coding standards in
6302 (permanent_p): New function.
6304 1999-05-13 Per Bothner <bothner@cygnus.com>
6306 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
6307 primitive Java types, if we actually see `extern "Java"'.
6309 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6311 * lang-specs.h: Pass -$ to the preprocessor.
6313 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
6315 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6316 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6317 (resolve_offset_ref): Don't handle a raw baselink.
6318 * cvt.c (build_expr_type_conversion): Likewise.
6319 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6320 convert_for_initialization): Likewise.
6321 * class.c (instantiate_type): Handle seeing a baselink under an
6323 * error.c (dump_expr): Likewise.
6324 * pt.c (for_each_template_parm): Likewise.
6325 (resolve_overloaded_unification): Likewise.
6326 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6327 * typeck.c (expr_sizeof): Also complain about other permutations
6328 of overloaded functions.
6330 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
6332 * init.c (resolve_offset_ref): Don't return a raw method.
6334 * typeck.c (decay_conversion): Don't handle a raw method.
6335 Resolve all OFFSET_REFs.
6336 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6337 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
6338 same_type_p for pmf bits. Don't use build_binary_op to compare
6339 raw pointers to methods.
6340 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6341 to decide when to call resolve_offset_ref.
6342 (build_c_cast, convert_for_initialization): Likewise.
6343 * cvt.c (build_expr_type_conversion): Likewise.
6345 1999-05-06 Nathan Sidwell <nathan@acm.org>
6347 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6349 1999-05-05 Mark Mitchell <mark@codesourcery.com>
6351 * decl2.c (start_objects): Don't let static constructors and
6352 destructors get inlined.
6354 * parse.y (nested_name_specifier): Make sure ordinary types are
6355 complete, just like template types.
6356 * parse.c: Regenerated.
6358 * pt.c (check_explicit_specialization): Improve error messages.
6360 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6362 * typeck.c (string_conv_p): Use same_type_p to check whether we
6363 try to convert between char and wchar_t.
6365 1999-05-03 Mark Mitchell <mark@codesourcery.com>
6367 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6368 lookup to error_mark_node here.
6369 (lookup_member): Revise documentation. Add comments. Don't set
6370 the TREE_TYPE to error_mark_node here, and don't build up an extra
6371 TREE_LIST for ambiguous lookups.
6372 (setup_class_bindings): Adjust accordingly.
6373 (push_class_decls): Revise out-of-date comments.
6375 * typeck.c (build_const_cast): Tighten checks for legality.
6377 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6379 * init.c (build_member_call): Lookup names coming from
6380 namespace-scoped LOOKUP_EXPR.
6382 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
6384 * gxxint.texi: Add documentation for 'I'.
6386 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
6388 * tinfo.cc (operator==): Qualify type_info with std::.
6390 1999-05-02 Mark Mitchell <mark@codesourcery.com>
6392 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
6393 (DECL_COMDAT): Remove definition.
6395 1999-05-01 Mark Mitchell <mark@codesourcery.com>
6397 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6400 1999-04-30 Mark Mitchell <mark@codesourcery.com>
6402 * class.c (build_vtable): Use build_lang_decl when building
6403 vtables, not just build_decl.
6404 (prepare_fresh_vtable): Likewise.
6405 * decl.c (wrapup_globals_for_namespace): Mark vtables as
6406 DECL_EXTERNAL when calling wrapup_global_declarations.
6407 * decl2.c (priority_info_s): Add initializations_p and
6408 destructions_p members.
6409 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6410 when deciding what vtables to write out.
6411 (ssdf_decls): New variable.
6412 (ssdf_decls_used): Likewise.
6413 (start_static_storage_duration_function): Deal with being called
6414 multiple times. Avoid inlining this function.
6415 (generate_inits_for_priority): Deal with reuse of priority map.
6416 (get_priority_info): Clear initializations_p and destructions_p.
6417 (do_static_initialization): Tweak comment.
6418 (do_static_destruction): Likewise. Fix condition on sentries for
6420 (generate_ctor_or_dtor_function): Call all of the static storage
6422 (generate_ctor_or_dtor_function_for_priority): Check
6423 initializations_p and destructions_p to see what priorities need
6424 initialization functions.
6425 (finish_file): Rework to generate multiple static storage duration
6426 functions, rather than just one.
6428 * typeck.c (build_const_cast): Tweak last change to handle
6429 templates correctly.
6431 * typeck.c (build_const_cast): Disallow use of const_cast to
6432 anything but a pointer or reference type.
6434 1999-04-30 Nathan Sidwell <nathan@acm.org>
6436 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6439 1999-04-29 Mark Mitchell <mark@codesourcery.com>
6441 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6442 (finish_file): Indent comments properly.
6444 1999-04-29 Richard Henderson <rth@cygnus.com>
6446 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6447 (do_static_destruction): Likewise.
6449 1999-04-29 Nathan Sidwell <nathan@acm.org>
6451 * cp-tree.h (TYPE_NOTHROW_P): New macro.
6452 * decl2.c (delete_sanity): Warn on deleting void *.
6453 * init.c (build_new_1): Use TYPE_NOTHROW_P.
6454 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6455 throwing operator new.
6457 1999-04-28 Nathan Sidwell <nathan@acm.org>
6459 * cp-tree.h (build_component_addr): Remove prototype.
6460 * typeck.c (build_component_addr): Make static. Remove MSG
6462 (build_component_addr): Remove MSG parameter, clean up
6464 (build_x_function_call): Use cp_error.
6465 (build_unary_op): Adjust call of build_component_addr.
6467 1999-04-28 Mark Mitchell <mark@codesourcery.com>
6469 * pt.c (tsubst_friend_class): Check for NULL.
6471 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6473 * search.c (binfo_for_vtable): Initialize bfvi.var.
6475 1999-04-27 Nathan Sidwell <nathan@acm.org>
6477 * rtti.c (build_x_typeid): Check rtti is enabled.
6479 1999-04-26 Mark Mitchell <mark@codesourcery.com>
6481 * search.c (is_subobject_of_p): Make sure we're looking at the
6484 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
6486 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6488 1999-04-23 Mark Mitchell <mark@codesourcery.com>
6490 * decl2.c (finish_file): Tweak handling of extern inlines so that
6491 they are not unnecessarily put out.
6493 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6494 such as base classes.
6496 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
6498 * tree.c (build_exception_variant): Fix typo: use the chain of U,
6499 not trying V, while cycling through U.
6501 1999-04-22 Mark Mitchell <mark@codesourcery.com>
6503 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6504 preserves_first_arg. Enlarge dummy accordingly.
6505 (DECL_TINFO_FN_P): New macro.
6506 (SET_DECL_TINFO_FN_P): Likeiwse.
6507 (DECL_RETURNS_FIRST_ARG): Remove.
6508 (DECL_PRESERVES_THIS): Likewise.
6509 (DECL_INIT_PRIORITY): New macro.
6510 (finish_struct_1): Change prototype.
6511 (cat_namespace_levels): Remove prototype.
6512 (vtable_decl_p): New prototype.
6513 (vtype_decl_p): Likewise.
6514 (sigtable_decl_p): Likewise.
6515 (walk_globals_pred): New typedef.
6516 (walk_globals_fn): Likewise.
6517 (walk_globals): New prototype.
6518 (walk_namespaces_fn): New typedef.
6519 (walk_namespaces): New prototype.
6520 (wrapup_globals_for_namespace): Likewise.
6521 (walk_vtables): Remove prototype.
6522 (walk_sigtables): Likewise.
6523 (instantiate_pending_templates): New prototype.
6524 * class.c (finish_struct_1): Don't return a value.
6525 * decl.h (pending_statics): Remove declaration.
6526 * decl.c (walk_namespaces_r): New function.
6527 (walk_globals_r): Likewise.
6528 (vtable_decl_p): Likewise.
6529 (vtype_decl_p): Likewise.
6530 (sigtable_decl_p): Likewise.
6531 (walk_namespaces): Likewise.
6532 (walk_globals_data): New type.
6533 (walk_globals): New function.
6534 (wrapup_globals_for_namespace): Likewise.
6535 (expand_static_init): Remove assertion. Remove redundancy in
6536 conditional. Don't put static data members in static_aggregates
6538 (finish_function): Remove redundancy in conditional. Don't set
6539 DECL_RETURNS_FIRST_ARG.
6540 (cat_namespace_levels): Remove.
6541 * decl2.c: Include splay-tree.h and varray.h.
6542 (priority_info_s): New structure.
6543 (finish_vtable_vardecl): Change prototype. Adjust for new calling
6545 (prune_vtable_vardecl): Likewise.
6546 (finish_sigtable_vardecl): Likewise.
6547 (setup_initp): Remove.
6550 (start_static_storage_duration_function): New function.
6551 (generate_inits_for_priority): Likewise.
6552 (finish_static_storage_duration_function): Likewise.
6553 (get_priority_info): Likewise.
6554 (do_static_initialization): Likewise.
6555 (do_static_destruction): Likewise.
6556 (do_static_initialization_and_destruction): Likewise.
6557 (generate_ctor_or_dtor_function): Likewise.
6558 (generate_ctor_and_dtor_functions_for_priority): Likewise.
6559 (pending_statics): Make it a varray.
6560 (pending_statics_used): New variable.
6561 (saved_inlines): Make it a varray.
6562 (saved_inlines_used): New variable.
6563 (finish_static_data_member): Change method of updating
6565 (mark_inline_for_output): Remove #if 0'd code. Change method of
6566 updating saved_inlines.
6567 (walk_vtables): Remove.
6568 (walk_sigtables): Likewise.
6569 (import_export_decl): Use DECL_TINFO_FN_P.
6570 (pending_templates): Remove declaration.
6571 (maybe_templates): Likewise.
6572 (static_aggregates_initp): Likewise.
6573 (setup_initp): Likewise.
6574 (finish_objects): Simplify.
6575 (INITIALIZE_P_IDENTIFIER): New macro.
6576 (PRIORITY_IDENTIFIER): New macro.
6577 (SSDF_IDENTIFIER): New macro.
6578 (initialize_p_decl): New variable.
6579 (priority_decl): Likewise.
6580 (ssdf_decl): Likewise.
6581 (priority_info_map): Likewise.
6582 (finish_file): Recode output of static intializers and other
6583 file-scope finalization tasks.
6584 * error.c (OB_END_TEMPLATE_ID): New macro.
6585 (dump_type_real): Use it.
6586 (dump_decl): Likewise.
6587 (dump_function_name): Likewise.
6588 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6590 (check_newline): Use walk_globals, not walk_vtables.
6591 * pt.c (pending_tempalte_expansions): Remove.
6592 (set_vardecl_interface_info): Likewise.
6593 (pending_templates): Make static.
6594 (maybe_templates): Likewise.
6595 (instantiate_class_template): Adjust call to finish_struct_1.
6596 (instantiate_pending_templates): New function.
6597 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6598 * tree.c (static_aggregates_initp): Remove.
6599 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6601 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6603 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6604 with the RTL code RETURN.
6605 * hash.h: Regenerated.
6606 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6607 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6608 * parse.c: Regenerated.
6609 * pt.c: Include varray.h. Include rtl.h since varray.h requires
6611 (inline_parm_levels): New variable.
6612 (inline_parm_levels_used): Likewise.
6613 (maybe_begin_member_template_processing): Update them.
6614 (maybe_end_member_template_processing): Use them, rather than
6615 guessing how many levels to pop.
6617 * decl.c (make_typename_type): Tighten error-checking.
6619 1999-04-20 Mark Mitchell <mark@codesourcery.com>
6621 * cp-tree.h (build_binary_op): Remove unneeded parameter.
6622 * class.c (build_vrable_entry_ref): Adjust call to
6624 * decl.c (expand_static_init): Likewise.
6625 (grokdeclarator): Likewise.
6626 (finish_function): Likewise.
6627 * decl2.c (delete_sanity): Likewise.
6628 (do_dtors): Likewise.
6629 (do_ctors): Likewise.
6630 * error.c (dump_type_suffix): Likewise.
6631 * expr.c (cplus_expand_expr): Likewise.
6632 * init.c (resolve_offset_ref): Likewise.
6633 (build_new): Likewise.
6634 (build_new_1): Likewise.
6635 (build_vec_delete_1): Likewise.
6636 (expand_vec_init_catch_clause): Likewise.
6637 (build_delete): Likewise.
6638 * pt.c (tsubst): Likewise.
6639 * rtti.c (synthesize_tinfo_fn): Likewise.
6640 * search.c (expand_upcast_fixups): Likewise.
6641 (expand_direct_vtbls_init): Likewise.
6642 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6643 (build_binary_op_nodefault): Likewise.
6644 (point_int_sum): Likewise.
6645 (pointer_diff): Likewise.
6646 (build_unary_op): Likewise.
6647 (build_modify_expr): Likewise.
6648 (get_delta_difference): Likewise.
6649 (build_ptrmemfunc): Likewise.
6650 (expand_ptrmemfunc_cst): Likewise.
6652 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
6654 * decl.c (grokfndecl): Always call cplus_decl_attributes.
6655 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6657 1999-04-19 Mark Mitchell <mark@codesourcery.com>
6659 * cp-tree.h (finish_static_data_member_decl): New function.
6660 * decl2.c (finish_static_data_member_decl): Split out from ...
6662 * pt.c (instantiate_class_template): Use it here instead of
6664 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6665 finish_static_data_member_decl will do that. Explicit set
6666 DECL_EXTERNAL to match non-template processing.
6668 1999-04-18 Mark Mitchell <mark@codesourcery.com>
6670 * cp-tree.h (finish_class_definition): Add parameter.
6671 * parse.y (structsp): Use it. Don't call pop_scope here.
6672 * parse.c: Regenerated.
6673 * semantics.c (finish_class_definition): Pop it here.
6675 1999-04-17 Mark Mitchell <mark@codesourcery.com>
6677 * decl.c (xref_tag): Revise handling of nested template
6679 * pt.c (check_explicit_specialization): Tweak handling of friend
6680 templates in template classes.
6681 (tsubst_friend_class): Handle friend declarations for nested
6682 member template classes.
6684 1999-04-16 Mark Mitchell <mark@codesourcery.com>
6686 * class.c (finish_struct): Remove unused variable.
6687 (pushclass): Likewise.
6688 (invalidate_class_lookup_cache): Likewise.
6689 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6690 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6691 doesn't get obliterated.
6692 (make_typename_type): Handle template classes correctly.
6694 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6695 (storetags): Declare.
6696 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6697 (pushclass): Likewise. Use storetags to install tag declarations,
6699 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6700 * decl.c (storetags): Make it global.
6701 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6702 implicit typename declaration.
6703 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
6704 * method.c (hack_identifier): Likewise.
6705 * search.c (lookup_member): Likewise.
6707 * decl.c (warn_about_implicit_typename_lookup): New function.
6708 (lookup_name_real): Use it. Rework handling of implicit typename
6711 1999-04-15 Mark Mitchell <mark@codesourcery.com>
6713 * cp-tree.h (lookup_nested_field): Remove.
6714 * class.c (push_nested_class): Handle UNION_TYPEs.
6715 (pop_nested_class): Likewise.
6716 * decl.c (lookup_name_real): Don't call lookup_nested_field.
6717 (start_decl): Use push_nested_class, not just pushclass.
6718 (cp_finish_decl): Use pop_nested_class, not just popclass.
6719 * search.c (lookup_nested_field): Remove.
6721 * cp-tree.h (lang_type): Add documentation.
6722 * decl2.c (handle_class_head): Create template declarations here,
6724 * parse.y (class_head): Return whether or not we entered a new
6725 scope, as well as the type named.
6726 (named_class_head): Likewise.
6727 (named_complex_class_head_sans_basetype): Likewise.
6728 (structsp): Adjust accordingly. Pop scope when required.
6729 * parse.c: Regenerated.
6730 * pt.c (check_default_tmpl_args): Robustify.
6731 (redeclare_class_template): Likewise.
6732 (instantiate_class_template): An instantiation of an
6733 anonymous union is itself an anonymous union.
6734 * semantics.c (begin_class_definition): Don't create template
6737 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
6739 * parse.y (after_type_declarator_intern): New nonterminal.
6740 (after_type_declarator): Use it.
6741 (direct_after_type_declarator): Likewise. Move above
6742 nonnested_type to fix reduce/reduce conflict resolution.
6743 (declmods): Reducing from just 'attributes' has EMPTY precedence.
6744 * Makefile.in (CONFLICTS): Update.
6746 * decl.c (define_label): Downgrade error for jumping over a
6747 non-POD decl to pedwarn.
6749 1999-04-14 Mark Mitchell <mark@codesourcery.com>
6751 * cp-tree.h (popclass): Change declaration.
6752 (pop_nested_class): Likewise.
6753 (poplevel_class): Remove declaration.
6754 * call.c (convert_default_argument): Pass no arguments to
6756 * class.c (finish_struct_1): Likewise.
6757 (finish_struct): Likewise.
6758 (popclass): Remove argument. Simplify code accordingly.
6759 (pop_nested_class): Likewise.
6760 * decl.c (poplevel_class): Declare it here, and make it static.
6761 (poplevel): Handle class scopes.
6762 (poplevel_class): Don't take an rgument. Simplify.
6763 (pop_everything): Pass no arguments to pop_nested_class.
6764 (cp_finish_decl): Pass no arguments to popclass.
6765 (grokdeclarator): Pass no arguments to pop_nested_class.
6766 (finish_function): Likewise.
6767 * decl2.c (grokfield): Likewise.
6768 (pop_scope): Pass no arguments to popclass.
6769 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6770 * pt.c (instantiate_class_template): Move call to pushclass, and
6771 document. Pass no arguments to popclass.
6772 (regenerate_decl_from_template): Likewise.
6774 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
6776 * typeck.c (build_unary_op): Handle taking the address of a unique
6777 bound non-static member function.
6779 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
6781 * lang-options.h (-Wdeprecated): New flag.
6782 * decl2.c (warn_deprecated): New flag.
6783 (lang_decode_option): Deprecated this-is-variable,
6784 external-templates, alt-external-templates.
6785 Support -Wdeprecated.
6786 * errfn.c (cp_deprecated): New function.
6788 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
6790 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6791 of the decls themselves.
6793 * pt.c (tsubst_function_type): Copy attributes over.
6795 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
6797 * cp-tree.h: Add prototype.
6798 * decl.c (init_decl_processing): Set valid_lang_attribute.
6800 1999-04-13 Mark Mitchell <mark@codesourcery.com>
6802 * class.c (finish_struct_1): Look at the const-ness of the field's
6803 type, not the TREE_READONLY-ness of the declaration.
6804 * method.c (synthesize_method): Likewise.
6805 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6806 creating new declarations.
6808 1999-04-13 Mike Stump <mrs@wrs.com>
6810 * decl2.c (import_export_decl): Because vtables always reference
6811 virtual functions, even if they are inlined, don't allow
6812 -fno-implement-inlines to not emit them, instead, emit them with
6814 * decl.c (start_function): Likewise.
6816 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
6818 * cp-tree.h (struct lang_type): Add com_interface.
6819 (CLASSTYPE_COM_INTERFACE): New macro.
6820 * class.c (set_rtti_entry): COM interface classes have no RTTI
6821 entries in their vtables; adjust.
6822 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6823 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6824 finish_struct_1): Likewise.
6825 * decl2.c (mark_vtable_entries): Likewise.
6826 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6827 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6828 expand_upcast_fixups): Likewise.
6829 * tree.c (debug_binfo): Likewise.
6831 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6832 * typeck.c (comptypes): If we get it, ignore attributes.
6833 * class.c (instantiate_type): Use BASELINK_P. Change complain
6834 parameter to flags; 2 means ignore attributes.
6835 * call.c (build_op_delete_call): Pass it.
6837 * decl.c (xref_tag): Only complain once about using a typedef-name
6838 with 'struct'. Downgrade to pedwarn.
6840 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6842 * parse.y (absdcl_intern): New nonterminal.
6843 (absdcl, direct_abstract_declarator): Use it.
6845 * pt.c (lookup_template_class): Look through implict typename.
6847 1999-04-11 Mark Mitchell <mark@codesourcery.com>
6849 * friend.c (add_friend): Deal gracefully with error_mark_node.
6850 * method.c (build_overload_value): Handle pointers-to-members as
6851 template parameters.
6853 * decl.c (push_binding): Fix typo in comment.
6855 1999-04-10 Mark Mitchell <mark@codesourcery.com>
6857 * error.c (dump_type_real): If a typename is a template-id, put
6858 out the template arguments.
6859 (dump_expr): Handle TEMPLATE_ID_EXPR.
6860 * pt.c (lookup_template_class): Now that full arguments are
6861 available everywhere, remove code that tried to guess them.
6863 1999-04-09 Mark Mitchell <mark@codesourcery.com>
6865 * decl.c (make_typename_type): Complain if we don't find a type
6866 when trying to make a typename type for a non-template type.
6868 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
6870 * decl.c (start_decl): Pass attributes to grokdeclarator.
6871 (grokdeclarator): Handle attributes on constructor-syntax
6874 1999-04-08 Mark Mitchell <mark@codesourcery.com>
6876 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6879 * search.c (template_self_reference_p): Tweak.
6881 1999-04-07 Mark Mitchell <mark@codesourcery.com>
6883 * init.c (build_offset_ref): Don't build yet another weird data
6884 structure to describe overloaded functions.
6886 1999-04-06 Mark Mitchell <mark@codesourcery.com>
6888 * cp-tree.h (BASELINK_P): New macro.
6889 (SET_BASELINK_P): Likewise.
6890 * init.c (build_member_call): Remove needless assignment in if
6892 * search.c (lookup_field_r): Fix handling when we are looking
6893 specifically for a type; these are not hidden by functions and
6895 (lookup_member): Use SET_BASELINK_P.
6896 * tree.c (is_overloaded_fn): Use BASELINK_P.
6897 (really_overloaed_fn): Likewise.
6898 (get_first_fn): Likewise.
6900 1999-04-05 Mark Mitchell <mark@codesourcery.com>
6902 * decl.c (lookup_name_current_level): Tweak, and improve
6905 * class.c (maybe_fixup_vptrs): Remove declaration.
6906 (build_class_init_list): Likewise.
6907 * decl.c (pushdecl_class_level): Call check_template_shadow here
6909 (push_class_level_binding): ... not here.
6910 * search.c (dfs_push_type_decls): Only avoid
6911 template-self-reference TYPE_DECLs if they are from base classes.
6913 1999-04-04 Mark Mitchell <mark@codesourcery.com>
6915 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
6918 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
6920 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
6921 (finish_struct_1): Don't call build_class_init_list.
6923 1999-04-02 Mark Mitchell <mark@codesourcery.com>
6925 * tinfo.h (__class_type_info): Fix illegal declaration.
6927 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
6928 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
6929 (IDENTIFIER_CLASS_VALUE): Improve documentation.
6930 (is_properly_derived_from): Declare.
6931 (invalidate_class_lookup_cache): Likewise.
6932 (maybe_maybe_note_name_used_in_class): Likewise.
6933 (note_name_declared_in_class): Likewise.
6934 (push_using_decl): Remove duplicate declaration.
6935 (id_in_current_class): Remove declaration.
6936 (push_class_binding): Change prototype.
6937 (clear_identitifer_class_values): Declare.
6938 * call.c (is_properly_derived_from): Make it global.
6939 (build_new_function_call): Be careful about updating candidates.
6940 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
6941 asked to make illegal calls.
6942 * class.c: Include splay-tree.h.
6943 (class_stack_node): Add names_used slot.
6944 (check_member_decl_is_same_in_complete_scope): Remove.
6945 (add_method): Fix comment. Push the declaration into class
6947 (finish_struct_1): When popping the class, pop the bindings too.
6948 Remove check for data member/function member conflict.
6949 (finish_struct): Remove calls to
6950 check_member_decl_is_same_in_complete_scope. Change calls to
6952 (pushclass): Clear names_used in the class stack entry.
6953 Use invalidate_class_lookup_cache to remove cached entries, rather
6954 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
6955 before entering a new class. Remove dead code. Don't mess with
6956 current_function_decl when pushing declarations.
6957 (invalidate_class_lookup_cache): New function, split out from ...
6958 (popclass): Here. Clean up names_used on our way out.
6959 (instantiate_type): Adjust.
6960 (build_self_reference): Don't push the declaration here.
6961 (maybe_note_name_used_in_class): New function.
6962 (note_name_declared_in_class): Likewise.
6963 * decl.c (add_binding): Change prototype.
6964 (find_class_binding_level): New function.
6965 (innermost_nonclass_level): Likewise.
6966 (current_binding_level): Update documentation.
6967 (inner_binding_level): Remove. Replace with current_binding_level
6969 (push_binding_level): Remove special handling of
6970 class_binding_level.
6971 (pop_binding_level): Likewise. Use find_class_binding_level.
6972 (suspend_binding_level): Likewise.
6973 (global_bindings_p): Use innermost_nonclass_level.
6974 (toplevel_bindings_p): Likewise.
6975 (namespace_bindings_p): Likewise.
6976 (pseudo_global_level_p): Likewise.
6977 (push_binding): Clear INHERITED_VALUE_BINDING_P.
6978 (add_binding): Check for illegal multiple declarations. Return a
6979 value indicating whether or not the new binding was legal.
6980 (push_local_binding): Skip over class binding levels. Check
6981 return value from add_binding.
6982 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
6983 note_name_declared_in_class.
6984 (pushlevel_class): Remove "fake out the rest of the compiler"
6986 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
6987 (clear_identifier_class_values): New function.
6988 (pop_from_top_level): Use it.
6989 (pop_everything): Tweak.
6990 (maybe_process_template_type_declaration): Don't push the
6991 declaration for the template here.
6992 (pushtag): Don't push tag declarations into class scope here.
6993 (pushdecl): Apply DeMorgan's law for readability.
6994 (pushdecl_class_level): Remove special-case code for
6995 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
6996 (push_class_level_bindng): Deal with inherited bindings.
6997 (lookup_name_real): Remove special-case code for
6998 TYPE_BEING_DEFINED, and some implicit typename magic.
6999 (grokdeclarator): Handle COMPONENT_REF for a template function.
7000 (build_enumerator): Don't call pushdecl_class_level here.
7001 (id_in_current_class): Remove.
7002 * decl2.c (grokfield): Don't call pushdecl_class_level or
7003 check_template_shadow.
7004 * errfn.c (cp_file_of): Don't declare.
7005 (cp_line_of): Likewise.
7006 * error.c (dump_decl): Handle an OVERLOAD.
7007 (cp_file_of): Likewise.
7008 (cp_line_of): Likewise.
7009 * init.c (build_member_call): Handle a COMPONENT_REF.
7010 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7011 pushdecl_class_level.
7012 * method.c (hack_identifier): Build COMPONENT_REFs for references
7013 to member templates as well as member functions. Remove dead
7015 * parse.y (left_curly): Remove.
7016 (nonnested_type): Call maybe_note_name_used_in_class, not
7017 pushdecl_class_level.
7018 * parse.c: Regenerated.
7019 (nested_name_specifier_1): Likewise.
7020 * pt.c (check_explicit_specialization): Adjust, for robustness.
7021 (check_template_shadow): Handle OVERLOADs.
7022 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7023 TEMPLATE_DECL, if appropriate.
7024 * search.c (envelope_add_decl): Remove.
7025 (dfs_pushdecls): Likewise.
7026 (dfs_compress_decls): Likewise.
7027 (dfs_push_decls): New function.
7028 (dfs_push_type_decls): Likewise.
7029 (setup_class_bindings): Likewise.
7030 (template_self_reference_p): Likewise.
7031 (lookup_field_r): Use it.
7032 (looup_member): Remove old comment. Deal with ambiguity.
7033 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7034 and remove envelope processing.
7035 * semantics.c (begin_class_definition): Let pushclass push
7036 declarations for base classes.
7037 (finish_member_declaration): Push declarations into class scope.
7038 * typeck.c (build_component_ref): Just put an OVERLOAD into the
7039 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7040 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
7041 * Makefile.in (class.o): Depend on splay-tree.h.
7043 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
7045 * cvt.c (convert_pointer_to_real): Use same_type_p.
7046 * typeck.c (comp_target_types): Use same_type_p.
7048 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
7050 * semantics.c (begin_inline_definitions,
7051 finish_inline_definitions): Rename from finish_default_args and
7052 begin_inline_definitions, respectively, to something that isn't a
7054 * parse.y (structsp): Adjust.
7056 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7057 (list_hash_lookup): Likewise.
7058 (hash_tree_chain): Adjust.
7059 * pt.c (tsubst): Adjust.
7060 (tsubst_arg_types): Use plain hash_tree_cons.
7061 * cp-tree.h (hash_tree_cons_simple): Lose.
7062 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7064 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7066 * Makefile.in (hash.h): Generate using gperf language 'C', not
7067 'KR-C', so gperf uses the `const' keyword on strings.
7069 * gxx.gperf (resword): Const-ify a char*.
7071 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
7073 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7074 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7075 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7076 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7077 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7078 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7081 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
7083 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7085 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
7087 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7089 1999-03-27 Mark Mitchell <mark@codesourcery.com>
7091 * cp-tree.h (add_friend): Declare.
7092 (add_friends): Likewise.
7093 * friend.c (add_friend): Make it global. Don't add to
7094 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7095 (add_friends): Make it global.
7096 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7097 befriending class is a template.
7098 * parse.y (component_decl_1): Fix typo in comment.
7099 * parse.c: Regenerated.
7100 * pt.c (instantiate_class_template): Use add_friend and
7101 add_friends rather that duplicating some of their functionality
7104 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
7106 * call.c (build_field_call): Unify 'this' and non-'this' cases.
7108 * typeck.c (build_indirect_ref): Check for 'this' sooner.
7110 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7112 * call.c (op_error): Const-ify a char*.
7113 (add_candidate, source_type, add_warning): Add static prototype.
7114 (print_z_candidates): Const-ify a char*.
7116 * class.c (resolve_address_of_overloaded_function,
7117 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7118 (get_vtable_name, finish_struct_1): Const-ify a char*.
7120 * cvt.c (convert_to_reference): Likewise.
7122 * decl.c (redeclaration_error_message, record_builtin_type,
7123 record_unknown_type, member_function_or_else, bad_specifiers):
7125 (find_binding, select_decl, unqualified_namespace_lookup,
7126 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7127 Add static prototype.
7128 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7129 implicitly_declare, record_builtin_java_type, define_function,
7130 grok_op_properties, tag_name): Const-ify a char*.
7132 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7133 (define_function, finish_builtin_type): Const-ify a char*.
7134 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7135 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7136 (file_name_nondirectory): Const-ify a char*.
7137 (init_filename_times): Don't prototype.
7138 (compiler_error): Prototype.
7139 (yyerror, init_repo): Const-ify a char*.
7140 (build_srcloc): Don't prototype.
7141 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7143 (warn_for_assignment): Don't prototype.
7144 (convert_for_initialization, readonly_error, check_for_new_type,
7145 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7148 * decl2.c (acceptable_java_type, output_vtable_inherit,
7149 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7150 merge_functions, decl_namespace, validate_nonmember_using_decl,
7151 do_nonmember_using_decl): Add static prototype.
7152 (lang_f_options): Const-ify a char*.
7153 (finish_builtin_type): Likewise.
7154 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7157 * errfn.c: Include cp-tree.h.
7158 (cp_thing): Add static prototype.
7159 (compiler_error): Don't protoptype.
7160 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7161 passing it to `cp_thing'.
7163 * error.c (interesting_scope_p): Add static prototype.
7165 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7168 * init.c (compiler_error): Don't prototype.
7169 (member_init_ok_or_else): Const-ify a char*.
7170 (build_java_class_ref): Add static prototype.
7172 * lex.c (compiler_error): Don't prototype.
7173 (get_time_identifier, interface_strcmp, extend_token_buffer,
7174 handle_cp_pragma): Const-ify a char*.
7175 (is_global, init_filename_times): Add static prototype.
7176 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7177 (compiler_error): Change from fixed args to variable args.
7178 (yyerror): Const-ify a char*.
7180 * parse.y (cond_stmt_keyword): Const-ify a char*.
7181 (parse_decl): Add static prototype.
7183 * pt.c (template_args_equal, print_template_context): Likewise.
7184 (print_candidates, check_default_tmpl_args): Const-ify a char*.
7185 (instantiate_class_template): Likewise.
7187 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7189 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7190 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7192 * search.c (lookup_field_info, lookup_member): Likewise.
7193 (lookup_member): Cast the first argument of `bzero' to a PTR.
7195 * sig.c (compiler_error): Don't prototype.
7196 (build_signature_pointer_or_reference_nam): Const-ify a char*.
7197 (get_sigtable_name, build_member_function_pointer): Likewise.
7199 * tree.c (compiler_error): Don't prototype.
7200 (no_linkage_helper, build_srcloc): Add static prototype.
7201 (build_vbase_pointer_fields): Const-ify a char*.
7202 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7204 * typeck.c (compiler_error): Don't prototype.
7205 (convert_for_assignment): Const-ify a char*.
7206 (comp_cv_target_types): Add static prototype.
7207 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7208 build_component_addr, build_unary_op, convert_for_initialization):
7211 * typeck2.c (ack): Add static prototype and change from fixed args
7213 (readonly_error, check_for_new_type): Const-ify a char*.
7215 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7216 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7217 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
7218 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7219 gen_assign, GNU_xref_member): Const-ify a char*.
7221 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7223 * gxxint.texi: Remove old discussion on copying virtual bases.
7225 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
7227 * Make-lang.in: Remove all references to g++.o/g++.c.
7228 Link g++ from gcc.o.
7230 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7232 * decl2.c (comdat_linkage): Treat vtables like functions.
7234 1999-03-25 Mark Mitchell <mark@codesourcery.com>
7236 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7238 1999-03-25 Nathan Sidwell <nathan@acm.org>
7240 * decl.c (init_decl_processing): Add `signed' type as a synonym
7243 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
7245 * typeck.c (common_type): Handle cv-qual unification for pointers
7248 * decl.c (unqualified_namespace_lookup): Return error_mark_node
7250 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7251 * lex.c (do_identifier): If we got error_mark_node, call
7254 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7256 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7259 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
7261 * decl.c (lookup_name_real): Do nested field lookup regardless of
7264 1999-03-24 Mark Mitchell <mark@codesourcery.com>
7266 * cp-tree.h (lang_type): Remove has_assignment and
7267 has_real_assignment. Add befriending_classes.
7268 (TYPE_HAS_ASSIGNMENT): Remove.
7269 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7270 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7271 (lang_decl): Document.
7272 (DECL_BEFRIENDING_CLASSES): New macro.
7273 (FRIEND_NAME): Move declaration to more obvious location.
7274 (FRIEND_DECLS): Likewise.
7275 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7276 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7277 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7278 (grok_op_properties): Likewise.
7279 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7280 (add_friend): Likewise. Don't do weird things with assignment
7281 operators. Update DECL_BEFRIENDING_CLASSES.
7282 (add_friends): Don't do weird things with assignment operators.
7283 (make_friend_class): Likewise. Update
7284 CLASSTYPE_BEFRIENDING_CLASSES.
7285 * pt.c (instantiate_class_template): Don't set
7286 TYPE_HAS_ASSIGNMENT.
7287 (tsubst_copy): Substitute the TREE_TYPE for more unary
7289 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7290 * search.c (protected_accessible_p): New function.
7291 (friend_accessible_p): Likewise.
7292 (accessible_p): Use them.
7294 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7296 * pt.c (convert_nontype_argument): Don't create things that aren't
7297 PTRMEM_CSTs when applying a qualification conversion to a
7300 1999-03-23 Mark Mitchell <mark@codesourcery.com>
7302 * Makefile.in (OBJS): Don't mention hash.o.
7303 (OBJDEPS): Likewise.
7305 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
7307 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7308 * decl.c (expand_static_init): Make sure we don't add any after
7311 * decl.c (cp_finish_decl): Move intelligence about handling
7312 DECL_COMDAT for variables from here...
7313 * decl2.c (comdat_linkage): ...to here.
7314 (maybe_make_one_only): Tweak.
7315 (import_export_decl): Call comdat_linkage for variables, too.
7316 (finish_file): Handle template statics properly.
7318 1999-03-22 Mark Mitchell <mark@codesourcery.com>
7320 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7321 Document internals of pointer-to-member-functions.
7322 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7323 (PFN_FROM_PTRMEMFUNC): Likewise.
7324 (build_type_conversion): Remove unused parameter.
7325 (build_ptrmemfunc1): Declare.
7326 (expand_ptrmemfunc_cst): New function.
7327 (delta2_from_ptrmemfunc): Likewise.
7328 (pfn_from_ptrmemfunc): Likewise.
7329 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7330 build_type_conversion. Use TYPE_PTRMEM_P for readability.
7331 (convert_to_reference): Remove unused parameter to
7332 build_type_conversion.
7333 (ocp_convert): Likewise.
7334 (build_user_type_conversion): Likewise.
7335 * error.c (dump_expr): Handle NULL pointer-to-member functions.
7336 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7337 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7338 open when handling pointer-to-member functions.
7339 * pt.c (convert_nontype_argument): Clean up error messages. Be
7340 more stringent with pointers-to-members.
7341 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
7342 (build_unary_op): Tidy ever-so-slightly.
7343 (build_conditional_expr): Remove extra parameter to
7344 build_type_conversion.
7345 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7347 (expand_ptrmemfunc_cst): Define.
7348 (delta2_from_ptrmemfunc): Likewise.
7349 (pfn_from_ptrmemfunc): Likewise.
7351 1999-03-19 Mark Mitchell <mark@codesourcery.com>
7353 * init.c (build_member_call): Handle template-id expressions
7355 * typeck.c (build_x_function_call): Likewise.
7357 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
7359 * friend.c (make_friend_class): Avoid core dump when
7360 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7362 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
7364 * decl.c (start_function): Suppress normal linkage heuristics
7365 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7367 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
7369 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7370 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7372 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
7374 * parse.y (named_complex_class_head_sans_basetype):
7375 Do not push a scope for error_mark_node.
7376 (maybe_base_class_list): Likewise.
7378 * decl.c (start_decl): Check for error_mark_node as a type.
7379 Detected by g++.brendan/array-refs.C.
7380 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
7381 (maybe_build_cleanup_1): Likewise. Detected by
7382 g++.jason/incomplete1.C.
7384 * tree.c (build_dummy_object): Use void_zero_node instead of the
7386 (is_dummy_object): Check for such a node.
7387 Detected by g++.bob/inherit1.C
7389 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
7391 * method.c (old_backref_index): Split out...
7392 (flush_repeats): From here. Rename back from try_old_backref.
7393 (build_mangled_name): Put back some old-style repeat handling.
7395 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7397 * lex.c: Don't include setjmp.h.
7398 (parse_float): New static function.
7399 (pf_args): New struct.
7400 (real_yylex): Use them in call to `do_float_handler'.
7402 1999-03-15 Mark Mitchell <mark@markmitchell.com>
7404 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7405 * tree.c (layout_basetypes): Not here.
7406 * search.c (dfs_search): Remove; no longer used.
7408 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7410 * decl2.c (validate_nonmember_using_decl): Issue sensible
7411 error-messages on bogus qualifiers.
7413 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
7415 * call.c (add_function_candidate): Fix uninitialized variable.
7417 * Makefile.in (search.o): Add dependency on varray.h.
7419 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
7421 * decl.c (duplicate_decls): Use same_type_p.
7422 * method.c (try_old_backref): Renamed from flush_repeats. Use
7423 same_type_p. Don't try to handle repeats. Return success.
7424 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
7425 calls from old-style code, too.
7426 (check_ktype): Use same_type_p.
7427 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
7428 (build_qualified_name): Simplify logic.
7429 (process_overload_item): Strip typedefs and quals at the top.
7430 (build_mangled_name_for_type_with_Gcode): Remove call to
7431 type_canonical_variant.
7432 (build_mangled_name): Likewise. Remove support for old-style
7433 repeats, which have been disabled since 2.7.2. Don't mess with
7435 (build_decl_overload_real): Don't mess with TREE_USED.
7437 1999-03-13 Nathan Sidwell <nathan@acm.org>
7439 * error.c (cp_printers): Add 'F' escape character.
7440 (dump_type_real): Remove TREE_LIST (fnargs) printing.
7441 Functionality moved to dump_parameters.
7442 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7443 (dump_function_decl): Extend meaning of V parameter. Use
7444 dump_parameters and dump_exception_spec.
7445 (dump_parameters): New static function.
7446 (dump_exception_spec): New static function.
7447 (fndecl_as_string): Change argument semantics. Use
7448 dump_function_decl directly.
7450 * sig.c (build_signature_table_constructor): Use cp_error.
7452 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
7454 * semantics.c (finish_switch_cond): Handle error cases gracefully.
7455 Detected by g++.law/enum5.C.
7457 * typeck.c (build_modify_expr): Check for errors after resolving
7458 offsets. Detected by g++.brendan/static1.C.
7460 * decl.c (complete_array_type): Ignore initial_value if it is an
7461 error. Detected by g++.benjamin/17930.C.
7463 * typeck2.c (process_init_constructor): Return error if one argument
7464 is in error. Detected by g++.benjamin/13478.C.
7466 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7468 * decl.c (select_decl): Allow class templates when we need types.
7469 * decl2.c (ambiguous_decl): Likewise.
7471 1999-03-12 Mark Mitchell <mark@markmitchell.com>
7473 * lex.c (do_identifier): Correct call to enforce_access.
7474 * search.c (accessible_p): Tweak comment.
7476 1999-03-10 Mark Mitchell <mark@markmitchell.com>
7478 * semantics.c (begin_class_definition): Call build_self_reference.
7479 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7481 * search.c (assert_canonical_unmarked): Fix typo in prototype.
7483 * search.c (dfs_canonical_queue): New function.
7484 (dfs_assert_unmarked_p): Likewise.
7485 (assert_canonical_unmarked): Likewise.
7486 (access_in_type): Use it.
7487 (accessible_p): Likewise. Walk the whole tree when umarking.
7489 * sig.c (build_signature_table_constructor): Use accessible_p
7490 instead of compute_access.
7492 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7494 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7496 1999-03-09 Mark Mitchell <mark@markmitchell.com>
7498 * cp-tree.h (flag_access_control): Declare.
7499 (TREE_VIA_PPUBLIC): Document.
7500 (DECL_NONSTATIC_MEMBER_P): New macro.
7501 (enforce_access): Return an indication of whether or not access
7503 (build_self_reference): Change prototype.
7504 (compute_access): Replace with ...
7505 (accessible_p): New function.
7506 (dfs_walk): Change prototype.
7507 (dfs_unmark): Likewise.
7508 (markedp): Likewise.
7509 * call.c (enforce_access): Use accessible_p.
7510 * class.c (build_self_reference): Insert the declaration into the
7511 list of members for this type, and make it public.
7512 * decl.c (xref_basetypes): Avoid ill-timed recursion.
7513 * init.c (build_offset_ref): Use lookup_member, not three separate
7514 name-lookups. Call enforce_access rather than checking for
7515 illegal accesses here.
7516 (resolve_offset_ref): Likewise.
7517 * lex.c (do_identifier): Likewise.
7518 * method.c (hack_identifier): Likewise.
7519 * parse.y (self_reference): Remove.
7520 (opt_component_decl_list): Don't use it.
7521 * parse.c: Regenerated.
7522 * pt.c (print_candidates): Generalize to handle lists of
7523 overloaded functions.
7524 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7526 (get_template_base): Use new calling convention for dfs_walk.
7527 * search.c: Include varray.h. Add prototypes.
7528 (dfs_walk): Accept a data pointer to pass to the work functions.
7529 All callers changed. All work functions changed.
7530 (breadth_first_search): Rename to bfs_walk, and make consistent
7532 (dfs_walk_real): New function.
7533 (canonical_binfo): New function.
7534 (context_for_name_lookup): Likewise.
7535 (shared_marked_p): Likewise.
7536 (shared_unmarked_p): Likewise.
7537 (lokup_field_queue_p): Likewise.
7538 (lookup_field_r): Generalize to handle both functions and fields.
7539 (lookup_field): Just call lookup_member.
7540 (lookup_fnfields): Likewise.
7541 (lookup_member): Move body of lookup_field here and generalize.
7542 (dfs_accessible_queue_p): Likewise.
7543 (dfs_accessible_p): Likewise.
7544 (dfs_access_in_type): Likewise.
7545 (access_in_type): Likewise.
7546 (compute_access): Remove, and replace with ...
7547 (accessible_p): New function.
7548 (vbase_types): Remove.
7549 (vbase_decl_ptr_intermediate): Likewise.
7550 (vbase_decl_ptr): Likewise.
7551 (vbase_init_result): Likewise.
7552 (closed_envelopes): Likewise.
7553 (bvtable): Likewise.
7555 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
7557 * call.c (add_function_candidate): Check for proper number of args
7558 before checking the validity of those args.
7560 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
7562 * cp-tree.h (struct lang_type): Add anon_union field.
7563 (ANON_UNION_TYPE_P): Use it instead of examining type.
7564 (SET_ANON_UNION_TYPE_P): New macro.
7565 * decl.c (check_tag_decl): Use it.
7567 * search.c (compute_access): Handle non-type contexts earlier, and
7570 * tree.c (build_exception_variant): Use copy_to_permanent.
7572 * decl2.c (setup_initp): Give statics with no priority the default
7574 (do_dtors, do_ctors, finish_file): Remove special handling of
7575 non-prioritized statics.
7577 1999-03-05 Mark Mitchell <mark@markmitchell.com>
7579 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7580 * decl.c (make_typename_type): Don't issue an error if an
7581 immediate lookup fails; it migt be resolved later.
7582 * friend.c (is_friend): Add comment.
7583 * search.c (breadth_first_search): Add POSTFN and DATA
7584 parameters. Tidy. All callers changed.
7585 (lookup_field_queue_p): New function.
7586 (lookup_field_r): Likewise.
7587 (lookup_field_post): Likewise.
7588 (lookup_field): Use them, via breadth_first_search, instead of
7590 (compute_access): Robustify.
7591 (lookup_fnfield_info): New structure.
7593 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
7595 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7597 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
7599 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7602 * decl2.c (import_export_class): Also return if
7603 CLASSTYPE_INTERFACE_ONLY is set.
7605 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
7607 * decl.c (push_overloaded_decl): Only overwrite the old binding if
7609 * decl2.c (do_local_using_decl): Fix loop termination.
7611 1999-03-02 Mark Mitchell <mark@markmitchell.com>
7613 * cp-tree.h (determine_specialization): Don't declare.
7614 * pt.c (determine_specialization): Make it static. Eliminate
7615 complain parameter. Note that decl is always non-NULL now, and
7616 simplify accordingly.
7618 * decl.c (maybe_push_to_top_level): Always call
7619 push_cp_function_context.
7620 (pop_from_top_level): Always call pop_cp_function_context.
7622 1999-02-26 Nathan Sidwell <nathan@acm.org>
7624 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7626 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7627 * init.c (build_new_1): Extra arg to complete_type_or_else.
7628 (build_delete): Likewise.
7629 * typeck.c (require_complete_type): Likewise.
7630 (pointer_int_sum): Likewise.
7631 (pointer_diff): Likewise.
7632 (build_component_ref): Likewise.
7634 * typeck2.c (incomplete_type_error): Always use cp_error.
7635 Show declaration of undefined type, if appropriate.
7636 Deal with UNKNOWN_TYPE nodes.
7638 * typeck.c (require_complete_type): Use TYPE_SIZE as
7639 size_zero_node to mean incomplete type.
7640 (require_complete_type_in_void): New function.
7641 (build_compound_expr): Call complete_type_in_void for LHS.
7642 (build_c_cast): Call complete_type_in_void for void cast.
7643 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7644 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7645 require_complete_type_in_void. Call it.
7646 * cp-tree.h (require_complete_type_in_void): Prototype new function.
7648 * typeck.c (convert_arguments): Use alternative format for
7649 function decls. Don't require_complete_type here. Simplify
7650 diagnostic printing.
7651 (convert_for_initialization): Don't require_complete_type on RHS yet.
7652 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7654 * call.c (build_over_call): Cope with qualified void return type.
7655 * semantics.c (finish_call_expr): Likewise.
7656 * typeck.c (build_function_call_real): Likewise.
7657 (c_expand_return): Likewise.
7658 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7660 * call.c (print_z_candidates): Use alternate print format, to be
7661 consistent with (pt.c) print_candidates.
7662 * method.c (hack_identifier): List candidate members.
7663 * search.c (lookup_field): Build ambiguous list, and show it, if
7666 1999-02-26 Mark Mitchell <mark@markmitchell.com>
7668 * typeck.c (decay_conversion): Don't confuse constant array
7669 variables with their initializers.
7671 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7673 * pt.c (regenerate_decl_from_template): Tweak for clarity.
7674 (instantiate_decl): Mark a decl instantiated before regenerating
7675 it to avoid recursion.
7676 * tree.c (mapcar): Don't call decl_constant_value unless we know
7677 something is TREE_READONLY_DECL_P.
7679 * class.c (check_for_override): Don't stop checking when we find
7680 the first overridden function. Delete #if 0'd code.
7681 * search.c (get_matching_virtual): Likewise.
7683 1999-02-25 Richard Henderson <rth@cygnus.com>
7685 * lang-specs.h: Define __FAST_MATH__ when appropriate.
7687 1999-02-24 Mike Stump <mrs@wrs.com>
7689 * typeck.c (convert_for_assignment): Allow boolean integral constant
7690 expressions to convert to null pointer.
7692 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
7694 * decl.c (lookup_namespace_name): Resolve namespace aliases.
7696 * class.c (push_nested_class): Allow namespaces.
7698 * decl2.c (set_decl_namespace): Add friendp parameter.
7699 * decl.c (grokfndecl): Pass it.
7700 (grokvardecl): Likewise.
7701 * cp-tree.h: Change declaration.
7703 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
7705 * pt.c (tsubst): Allow an array of explicit size zero.
7707 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
7709 * errfn.c: Change varargs code to look like toplev.c.
7711 * method.c (process_modifiers): Don't prepend 'U' for char or
7714 1999-02-20 Craig Burley <craig@jcb-sc.com>
7716 * Make-lang.in (cplib2.ready): Don't consider updating
7717 cplib2 stuff if the current directory isn't writable, as
7718 it won't work (such as during a `make install').
7720 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
7722 * decl2.c (start_objects): Make file scope constructors and
7723 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7724 ASM_OUTPUT_DESTRUCTOR are defined.
7726 1999-02-19 Mark Mitchell <mark@markmitchell.com>
7728 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7729 (fn_type_unification): Adjust prototype.
7730 (lookup_fnfields_1): Declare.
7731 * call.c (add_template_candidate_real): Adjust call to
7732 fn_type_unification.
7733 * class.c (add_method): Don't allow duplicate declarations of
7734 constructors or destructors.
7735 (resolve_address_of_overloaded_function): Remove unused variable.
7736 Adjust call to fn_type_unification.
7737 * decl.c (grokfndecl): Be more robust in the face of illegal
7739 * decl2.c (check_classfn): Remove hokey handling of member
7741 * pt.c (determine_specialization): Improve comments. Adjust to
7742 handle template argument deduction as per the standard.
7743 (check_explicit_specialization): Fix comment spacing. Handle
7744 type-conversion operators correctly. Improve error-recovery.
7745 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7746 (get_bindings_real): Simplify handling of static members.
7747 * search.c (lookup_fnfields_1): Make it have external linkage.
7748 * typeck.c (compparms): Fix comment.
7749 (build_unary_op): Don't try to figure out which template
7750 specialization is being referred to when when the address-of
7751 operator is used with a template function.
7753 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7755 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7756 keyword to match an analogous change at the top level.
7758 * tree.c (lvalue_or_else): Likewise.
7760 1999-02-17 Mark Mitchell <mark@markmitchell.com>
7762 * decl.c (xref_basetypes): Comment.
7763 * pt.c (instantiate_class_template): Use xref_basetypes.
7765 1999-02-16 Mark Mitchell <mark@markmitchell.com>
7767 * cp-tree.h (tsubst): Change prototype.
7768 (tsubst_expr): Likewise.
7769 (tsubst_copy): Likewise.
7770 (type_unification): Remove prototype.
7771 * call.c (convert_default_arg): Adjust call to tsubst_expr.
7772 * class.c (resolve_address_of_overloaded_function): Just use
7773 fn_type_unification.
7774 * decl.c (grokdeclarator): Adjust call to tsubst.
7775 * method.c (build_template_parm_names): Likewise.
7776 * pt.c (GTB_VIA_VIRTUAL): New macro.
7777 (GTB_IGNORE_TYPE): Likewise.
7778 (resolve_overloaded_unification): Add `complain' parameter.
7779 (try_one_overload): Likewise.
7780 (tsubst_template_arg_vector): Likewise.
7781 (tsubst_template_parms): Likewise.
7782 (tsubst_aggr_type): Likewise.
7783 (tsubst_arg_types): Likewise.
7784 (tsubst_call_declarator_parms): Likewise.
7785 (unify): Remove explicit_mask.
7786 (type_unification_real): Likewise.
7787 (get_template_base_recursive): Likewise.
7788 (coerce_template_template_parms): Provide prototype.
7789 (tsubst_function_type): Likewise.
7790 (try_class_unification): New function.
7791 All callers changed to use new complain parameter.
7792 (get_template_base): Use try_class_unification.
7793 (unify): Adjust handling of classes derived from template types.
7794 (fn_type_unification): Substitute explicit arguments before
7797 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7799 * decl.c (pushdecl): Remove dead code.
7801 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
7803 * decl2.c (finish_objects): Fix code I missed in previous change.
7805 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
7807 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7808 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7810 * pt.c (maybe_process_partial_specialization): Complain about
7811 'template <>' on non-specialization.
7813 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
7815 * decl.c (grokdeclarator): Catch wierd declarators.
7816 * decl2.c (finish_file): Don't abort because of namespace parsing
7818 (check_decl_namespace): Remove.
7820 1999-02-09 Mark Mitchell <mark@markmitchell.com>
7822 * cp-tree.h (get_template_base): Don't declare.
7823 (dfs_walk): Declare.
7824 (dfs_unmark): Likewise.
7825 (markedp): Likewise.
7826 * pt.c (unify): Remove duplicate declaration. Pass tparms and
7827 targs to get_template_base.
7828 (get_template_base_recursive): Move here from search.c. Check to
7829 see that the base found can be instantiated to form the desired
7831 (get_template_base): Likewise.
7832 (get_class_bindings): Simplify.
7833 * search.c (get_template_base_recursive): Move to pt.c.
7834 (get_template_base): Likewise.
7835 (markedp): Make it global.
7836 (dfs_walk): Likewise.
7837 (dfs_unmark): Likewise.
7839 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
7841 * pt.c (maybe_process_partial_specialization): Complain about
7842 specialization in wrong namespace.
7843 * tree.c (decl_namespace_context): New fn.
7845 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7847 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7848 * pt.c (coerce_template_template_parms): Handle nested
7849 template template parameters.
7851 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
7853 * typeck2.c: Update email addresses.
7855 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7857 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7860 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
7862 * lex.c (retrofit_lang_decl): Split out...
7863 (build_lang_decl): From here.
7864 * decl.c (pushdecl): Call it for functions generated by the middle
7865 end that don't have DECL_LANG_SPECIFIC.
7866 * cp-tree.h: Declare it.
7868 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
7869 (start_objects, finish_objects): Only use special
7870 init_priority code if the user specified a priority.
7871 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7874 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
7876 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7877 mkstemp.o. Get them from libiberty now.
7878 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7880 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7882 * decl2.c (lang_decode_option): Use read_integral_parameter.
7884 1999-02-01 Mark Mitchell <mark@markmitchell.com>
7886 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7887 before calling complete_type_or_else.
7889 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7891 * input.c (inline): Don't define, its handled by system.h.
7893 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
7895 * decl2.c: Don't define flag_no_ident here. Don't process
7897 * cp-tree.h: Don't declare flag_no_ident here.
7898 * lang-specs.h: Map -Qn to -fno-ident.
7900 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
7902 * cp-tree.h (struct tree_binding): Replace scope field with a union.
7903 (BINDING_SCOPE): Adjust.
7904 * decl.c (BINDING_LEVEL): Adjust.
7906 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
7908 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
7911 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
7914 * tree.c (equal_functions): Fix name in prototype.
7916 * decl.c (push_local_binding): Add FLAGS argument.
7917 (pushdecl, push_overloaded_decl): Pass it.
7918 * decl2.c (do_local_using_decl): Likewise.
7919 * cp-tree.h: Adjust prototype.
7920 * decl.c (poplevel): Fix logic.
7922 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
7923 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
7924 (cat_namespace_levels): Don't loop forever.
7926 1999-01-25 Richard Henderson <rth@cygnus.com>
7928 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
7930 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
7932 * class.c (resolve_address_of_overloaded_function): Mark the
7933 chosen function used.
7935 * call.c (build_call): Make sure that a function coming in has
7936 been marked used already.
7937 * decl.c (expand_static_init): Call mark_used instead of
7939 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
7940 alloc_eh_object, expand_throw): Likewise.
7941 * init.c (build_builtin_delete_call): Likewise.
7942 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
7943 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7944 expand_generic_desc): Likewise.
7946 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7948 * tree.c (equal_functions): New function.
7949 (ovl_member): Call it.
7951 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7953 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
7955 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
7957 * decl.c (decls_match): Return 1 if old and new are identical.
7958 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
7960 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
7962 * decl.c (start_function): Make member functions one_only on windows.
7963 * decl2.c (import_export_decl): Likewise.
7965 * decl.c (grokdeclarator): Don't complain about implicit int in
7966 a system header. Change same-name field check to not complain in
7967 a system header instead of within extern "C".
7969 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7971 * cp-tree.h (PUSH_GLOBAL): New macro.
7972 (PUSH_LOCAL): Likewise.
7973 (PUSH_USING): Likewise.
7974 (namespace_bindings_p): Declare.
7975 (push_overloaded_decl): Likewise.
7976 * decl.c (push_overloaded_decl): Don't make it static. Check for
7977 illegal declarations after using declarations here.
7978 (namespace_bindings_p): Likewise.
7979 (duplicate_decls): Don't consider declarations from different
7980 namespaces to be the same.
7981 (pushdecl): Use symbolic PUSH_ constants in calls to
7982 push_overloaded_decl.
7983 (push_overloaded_decl_1): Likewise.
7984 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
7985 (do_nonmember_using_decl): Check for illegal using declarations
7986 after ordinary declarations here.
7987 (do_local_using_decl): Call pushdecl to insert declarations.
7989 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
7991 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
7993 1999-01-21 Mark Mitchell <mark@markmitchell.com>
7995 * tree.c (build_cplus_array_type_1): Don't call build_array_type
7996 for types involving template parameters.
7998 * cp-tree.h (PARM_DECL_EXPR): Delete.
7999 (convert_default_arg): Change prototype.
8000 (check_default_argument): Declare.
8001 (search_tree): Likewise.
8002 * call.c (convert_default_arg): Take the function to which the
8003 default argument belongs as a parameter, and do any necessary
8004 instantiation here, instead of ...
8005 (build_over_call): Here.
8006 * decl.c (local_variable_p): New function.
8007 (check_default_argument): Likewise, split out and tidied from ...
8009 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8010 * pt.c (tsubst_call_declarator_parms): New function.
8011 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
8012 with CALL_EXPRs, rather than trying to be clever.
8013 (tsubst): Use tsubst_call_declarator_parms.
8014 * tree.c (search_tree): Don't make it static.
8015 * typeck.c (convert_arguments): Use new interface to
8016 convert_default_arg.
8018 1999-01-20 Mark Mitchell <mark@markmitchell.com>
8020 * error.c (dump_function_decl): Don't print the argument types for
8021 a function when the verbosity level is negative.
8023 * call.c (build_over_call): Check format attributes at call-time.
8025 * pt.c (tsubst_copy): Fix comment.
8026 (unify): Don't allow unification with variable-sized arrays.
8028 * semantics.c (finish_stmt_expr): When processing a template make
8029 the BIND_EXPR long-lived.
8031 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
8033 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8034 (import_export_vtable): Not here.
8036 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8038 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8039 non-static member function.
8041 1999-01-18 Nathan Sidwell <nathan@acm.org>
8043 * class.c (instantiate_type): Only diagnose illegal address of member
8044 function if complaining.
8046 * decl.c (lookup_name_real): Remove duplicate code.
8048 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
8050 * tree.c (copy_template_template_parm): Use permanent_obstack.
8052 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8054 * pt.c (unify): Remove restrictions on deduction of argument
8055 of template template parameters.
8057 1999-01-18 Nathan Sidwell <nathan@acm.org>
8059 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8061 * class.c (resolve_address_of_overloaded_function): Show list of
8062 all candidates, when none of them match.
8064 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
8066 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8067 definition of 'casting away const' in reinterpret_cast<>.
8069 1999-01-18 Graham <grahams@rcp.co.uk>
8071 * cvt.c: Add include for decl.h, remove extern for
8072 static_aggregates which is now provided by decl.h.
8074 * Makefile.in (cvt.o): Add dependency for decl.h and missing
8075 dependencies for convert.h and flags.h.
8077 1999-01-18 Nathan Sidwell <nathan@acm.org>
8079 * decl2.c (do_dtors): Set current location to that of the
8080 decl, for sensible diagnostics and debugging.
8081 (check_classfn): Issue `incomplete type' error, if
8082 class is not defined.
8084 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8086 * cp-tree.h: Add prototype for bound_pmf_p.
8088 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
8089 Manfred Hollstein <manfred@s-direktnet.de>
8091 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8094 1999-01-16 Nathan Sidwell <nathan@acm.org>
8096 * cp-tree.h (struct lang_type): Added has_mutable flag.
8097 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8098 (TYPE_HAS_MUTABLE_P): New macro to read it.
8099 (cp_has_mutable_p): Prototype for new function.
8100 * class.c (finish_struct_1): Set has_mutable from members.
8101 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8102 it contains a mutable.
8103 * typeck.c (cp_has_mutable_p): New function.
8105 1999-01-15 Mark Mitchell <mark@markmitchell.com>
8107 * pt.c (process_template_parm): Ignore top-level qualifiers on
8108 non-type parameters.
8110 * decl.c (start_function): Use current_function_parms in the call
8111 to require_complete_type_for_parms, not the probably empty
8114 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
8116 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8118 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8119 that we don't suppress the other copies.
8120 * lex.c (handle_cp_pragma): Likewise.
8122 1999-01-13 Mark Mitchell <mark@markmitchell.com>
8124 * decl.c (grokdeclarator): Undo 1998-12-14 change.
8125 * tree.c (build_cplus_array_type_1): Likewise.
8126 * pt.c (instantiate_class_template): Remove misleading comment.
8127 (tsubst_aggr_type): Substitute if there are template parameters,
8128 regardless of whether or not they use template arguments.
8129 (unify): Likewise, but for unification.
8131 1999-01-12 Richard Henderson <rth@cygnus.com>
8133 * cp-tree.h (flag_permissive): Declare extern.
8135 1999-01-06 Mark Mitchell <mark@markmitchell.com>
8137 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8139 (lang_type): Add is_partial_instantiation. Decrease width of
8141 (PARTIAL_INSTANTIATION_P): New macro.
8142 (OPERATOR_TYPENAME_P): Remove.
8143 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8144 OPERATOR_TYPENAME_P.
8145 (grok_op_properties): Likewise.
8146 * friend.c (do_friend): Handle friends that are member functions
8148 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8149 * pt.c (instantiate_class_template): Rework for clarity. Avoid
8150 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
8151 any more partial instantiation than is absolutely necessary for
8152 implicit typename. Set PARTIAL_INSTANTIATION_P.
8153 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8154 * semantics.c (begin_class_definition): Handle partial
8155 specializations of a type that was previously partially
8158 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
8160 * g++spec.c (LIBSTDCXX): Provide default definition.
8161 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8163 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8165 * Make-lang.in (g++.o): Depend on prefix.h.
8167 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
8169 * tree.c (bound_pmf_p): New fn.
8170 * typeck.c (build_c_cast): Use it.
8172 * decl.c (grok_op_properties): Use same_type_p.
8174 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8176 * Makefile.in (cvt.o): Depend on toplev.h.
8178 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8180 * cvt.c: Include toplev.h.
8182 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8185 * init.c (expand_vec_init): Initialize variable `itype'.
8187 * lex.c (yyerror): Cast the argument passed to a ctype function to
8190 * method.c (build_mangled_C9x_name): Wrap prototype and definition
8191 in "HOST_BITS_PER_WIDE_INT >= 64".
8193 * typeck.c (build_binary_op): Mark parameter `convert_p' with
8196 1998-12-22 Mark Mitchell <mark@markmitchell.com>
8198 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8199 * tree.c (build_exception_variant): Don't crash on empty throw
8202 1998-12-18 DJ Delorie <dj@cygnus.com>
8204 * cvt.c (convert_to_reference): Check for both error_mark_node
8205 and NULL_NODE after call to convert_for_initialization.
8207 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
8209 * error.c (interesting_scope_p): New fn.
8210 (dump_simple_decl): Use it.
8211 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8212 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8214 1998-12-16 Mark Mitchell <mark@markmitchell.com>
8216 * class.c (resolve_address_of_overloaded_function): Do conversion
8217 to correct type here, rather than ...
8218 (instantiate_type): Here.
8220 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8221 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8222 (decl_template_parm_p): Remove.
8223 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8225 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8226 * pt.c (push_inline_template_parms_recursive): Set it.
8227 (decl_template_parm_p): Remove.
8228 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8229 (process_template_parm): Set it.
8231 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
8233 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8234 if configured with cpplib.
8236 1998-12-15 Mark Mitchell <mark@markmitchell.com>
8238 * decl.c (poplevel): Make sure ns_binding is initialized.
8240 * decl.c (finish_function): Undo inadvertent change in previous
8243 1998-12-14 Mark Mitchell <mark@markmitchell.com>
8245 * class.c (pushclass): Tweak handling of class-level bindings.
8246 (resolve_address_of_overloaded_function): Update pointer-to-member
8248 (instantiate_type): Likewise.
8249 * cvt.c (cp_convert_to_pointer): Likewise.
8250 * decl.c (pop_binding): Take the DECL to pop, not just the name.
8251 Deal with `struct stat' hack.
8252 (binding_level): Add to documentation.
8253 (push_binding): Clear BINDING_TYPE.
8254 (add_binding): New function.
8255 (push_local_binding): Use it.
8256 (push_class_binding): Likewise.
8257 (poplevel): Adjust calls to pop_binding.
8258 (poplevel_class): Likewise.
8259 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8260 declarations to current binding level.
8261 (push_class_level_binding): Likewise.
8262 (push_overloaded_decl): Adjust handling of OVERLOADs in local
8264 (lookup_namespace_name): Don't crash when confronted with a
8266 (lookup_name_real): Do `struct stat' hack in local binding
8268 (build_ptrmemfunc_type): Adjust documentation.
8269 (grokdeclarator): Don't avoid building real array types when
8270 processing templates unless really necessary.
8271 (finish_method): Adjust calls to pop_binding.
8272 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8273 not reparse_decl_as_expr.
8274 (build_expr_from_tree): Deal with a template-id as the function to
8275 call in a METHOD_CALL_EXPR.
8276 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8277 (maybe_adjust_types_For_deduction): Don't do peculiar things with
8279 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
8280 pointer-to-member types where necessary.
8281 * tree.c (build_cplus_array_type_1): Don't avoid building real
8282 array types when processing templates unless really necessary.
8283 (build_exception_variant): Compare the exception lists correctly.
8285 1998-12-13 Mark Mitchell <mark@markmitchell.com>
8287 * cp-tree.def (CPLUS_BINDING): Update documentation.
8288 * cp-tree.h (LOCAL_BINDING_P): New macro.
8289 (lang_identifier): Rename local_value to bindings.
8290 (tree_binding): Make `scope' of type `void*', not `tree'.
8291 (BINDING_SCOPE): Update documentation.
8292 (IDENTIFIER_LOCAL_VALUE): Remove.
8293 (IDENTIFIER_CLASS_VALUE): Document.
8294 (IDENTIFIER_BINDING): New macro.
8295 (IDENTIFIER_VALUE): Likewise.
8296 (TIME_IDENTIFIER_TIME): Likewise.
8297 (TIME_IDENTIFIER_FILEINFO): Likewise.
8298 (IMPLICIT_TYPENAME_P): Likewise.
8299 (set_identifier_local_value): Remove.
8300 (push_local_binding): New function.
8301 (push_class_binding): Likewise.
8302 * class.c (pushclass): Update comments; use push_class_binding.
8303 * decl.c (set_identifier_local_value_with_scope): Remove.
8304 (set_identifier_local_value): Likewise.
8305 (push_binding): New function.
8306 (pop_binding): Likewise.
8307 (binding_level): Update documentation. Remove shadowed.
8308 (BINDING_LEVEL): New macro.
8309 (free_binding_nodes): New variable.
8310 (poplevel): Adjust for new name-lookup scheme. Don't mess up
8311 BLOCK_VARs when doing for-scope extension. Remove effectively
8313 (pushlevel_class): Tweak formatting.
8314 (poplevel_class): Adjust for new name-lookup scheme.
8315 (print_binding_level): Likewise.
8316 (store_bindings): Likewise.
8317 (pushdecl): Likewise.
8318 (pushdecl_class_level): Likewise.
8319 (push_class_level_binding): Likewise.
8320 (push_overloaded_decl): Update comments. Adjust for new
8322 (lookup_name_real): Likewise.
8323 (lookup_name_current_level): Likewise.
8324 (cp_finish_decl): Likewise.
8325 (require_complete_types_for_parms): Likewise. Remove misleading
8327 (grok_parms): Likewise. Don't call
8328 require_complete_types_for_parms here.
8329 (grok_ctor_properties): Don't treat templates as copy
8331 (grop_op_properties): Or as assignment operators.
8332 (start_function): Document. Adjust for new name-lookup scheme.
8333 (finish_function): Likewise.
8334 * decl2.c (do_local_using_decl): Use push_local_binding.
8335 * lex.c (begin_definition_of_inclass_inline): New function, split
8337 (do_pending_inlines): Here, and ...
8338 (process_next_inline): Here.
8339 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8340 (init_filename_times): Likewise.
8341 (extract_interface_info): Likewise.
8342 (ste_typedecl_interface_info): Likewise.
8343 (check_newline): Likewise.
8344 (dump_time_statistics): Likewise.
8345 (handle_cp_pragma): Likewise.
8346 (do_identifier): Adjust for new name-lookup scheme.
8347 * parse.y (function_try_block): Return ctor_initializer_opt value.
8349 (fn.defpen): Pass appropriate values to start_function.
8350 (pending_inline): Use functor_try_block value, and pass
8351 appropriate values to finish_function.
8352 * pt.c (is_member_template): Update documentation; remove handling
8353 of FUNCTION_DECLs. As per name, this function should deal only in
8355 (decl_template_parm_p): Change name of olddecl parameter to decl.
8356 (check_template_shadow): Adjust for new name-lookup scheme.
8357 (lookup_template_class): Likewise.
8358 (tsubst_decl): Tweak so as not to confuse member templates with
8359 copy constructors and assignment operators.
8360 (unify): Handle UNION_TYPEs.
8361 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8362 (lang_print_xnode): Adjust for new name-lookup scheme.
8363 * typeck.c (mark_addressable): Likewise.
8364 (c_expand_return): Likewise.
8366 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
8368 * decl.c (grokdeclarator): Allow field with same name as class
8371 * decl.c (lookup_name_real): Don't limit field lookup to types.
8372 * class.c (check_member_decl_is_same_in_complete_scope): No error
8373 if icv and x are the same.
8374 * lex.c (do_identifier): Tweak error message.
8376 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8378 * decl.c (start_enum): Use push_obstacks, not
8379 end_temporary_allocation.
8380 (finish_enum): Call pop_obstacks.
8382 1998-12-10 Mark Mitchell <mark@markmitchell.com>
8384 * class.c (instantiate_type): Return error_mark_node rather than
8387 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8389 * cp-tree.h (most_specialized_instantiation): New function.
8390 (print_candidates): Likewise.
8391 * class.c (validate_lhs): Remove.
8392 (resolve_address_of_overloaded_function): New function, split out
8393 and then substantially reworked, from ...
8394 (instantiate_type): Use it. Simplify.
8395 * cvt.c (convert_to_reference): Complain when caller has indicated
8396 that's the right thing to do. Don't crash if instantiate_type
8398 * pt.c: Substitute `parameters' for `paramters' throughout.
8399 (print_candidates): Don't make it static.
8400 (most_specialized_instantiation): Split out from ...
8401 (most_specialized): Here.
8403 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
8405 * lex.c (lang_init_options): Initialize cpplib.
8406 * decl2.c (parse_options,cpp_initialized): Removed.
8407 (lang_decode_option): Move initialization of cpplib to
8410 1998-12-09 Mark Mitchell <mark@markmitchell.com>
8412 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8413 well as the TYPE_DECL, when a typedef name is assigned to a
8414 previously anonymous type.
8416 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
8418 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8419 __cp_eh_info for getting the eh info pointer. Add table_index to
8421 (push_eh_cleanup): Don't increment 'handlers' data field.
8422 (process_start_catch_block): Don't set the 'caught' field.
8424 * cp/exception.cc (CP_EH_INFO): New macro for getting the
8425 exception info pointer within library routines.
8426 (__cp_eh_info): Use CP_EH_INFO.
8427 (__start_cp_handler): Get exception info pointer, set caught field,
8428 and increment the handlers field. Avoids this being done by handlers.
8429 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8430 (uncaught_exception): Use CP_EH_INFO macro.
8432 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
8434 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8436 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
8438 * lex.c (check_newline): Add support for \ as `natural'
8439 characters in file names in #line to be consistent with #include
8440 handling. We support escape processing in the # 1 "..." version of
8441 the command. See also support in cp/lex.c.
8443 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
8445 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8448 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
8450 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8452 * error.c (dump_simple_decl): Also print namespace context.
8453 (dump_function_decl): Likewise.
8455 * decl2.c (ambiguous_decl): Don't print old value if it's
8458 * decl.c (lookup_name_real): Fix handling of local types shadowed
8459 by a non-type decl. Remove obsolete code.
8460 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8462 * lang-options.h: Add -fpermissive.
8463 * decl2.c: Likewise.
8464 * cp-tree.h: Add flag_permissive.
8465 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8466 were specified, set flag_pedantic_errors.
8467 * call.c (build_over_call): Turn dropped qualifier messages
8469 * cvt.c (convert_to_reference): Likewise.
8470 * typeck.c (convert_for_assignment): Likewise.
8472 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
8474 * decl2.c (coerce_new_type): Use same_type_p.
8475 (coerce_delete_type): Likewise.
8477 * call.c (check_dtor_name): Return 1, not error_mark_node.
8479 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
8481 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8482 if MULTIPLE_SYMBOL_SPACES.
8484 * pt.c (check_template_shadow): New fn.
8485 * decl2.c (grokfield): Use it.
8486 * decl.c (pushdecl): Likewise.
8487 (pushdecl_class_level): Likewise.
8488 (start_method): Likewise.
8489 (xref_tag): Don't try to use 't' if we're defining.
8491 * call.c (check_dtor_name): Just return an error_mark_node.
8492 * pt.c (lookup_template_class): Complain about using non-template here.
8493 * parse.y (apparent_template_type): Not here.
8495 * pt.c (check_explicit_specialization): Complain about specialization
8498 * lang-options.h: Add -f{no-,}implicit-inline-templates.
8500 * pt.c (convert_nontype_argument): Don't assume that any integer
8501 argument is intended to be a constant-expression.
8503 1998-12-03 Mark Mitchell <mark@markmitchell.com>
8505 * class.c (handle_using_decl): Fix comment. Don't lookup
8506 constructors in base classes.
8507 (validate_lhs): Fix typo in comment.
8508 * search.c (lookup_field_1): Don't return a USING_DECL.
8510 * cp-tree.h (DECL_ACCESS): Improve documentation.
8512 * decl.c (expand_static_init): Don't set the initialization-done
8513 flag until the initialization is done.
8515 1998-12-02 Mark Mitchell <mark@markmitchell.com>
8517 * decl2.c (validate_nonmember_using_decl): Complain about using
8518 declarations for class members.
8520 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
8522 * typeck2.c (process_init_constructor): Use same_type_p.
8524 * decl.c (check_tag_decl): Don't warn about null decl inside a
8527 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8529 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8530 (resolve_overloaded_unification): Strip baselinks.
8532 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8534 * g++spec.c: Don't prototype xmalloc.
8536 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
8538 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8540 * decl.c (check_tag_decl): Do complain about null friend decl at
8543 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8545 * lex.c (make_lang_type): Clear the whole struct lang_type, not
8546 only the first multiple of sizeof (int).
8548 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8550 * decl.c (start_decl): An explicit specialization of a static data
8551 member is only a definition if it has an initializer.
8553 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8554 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8556 * init.c (expand_default_init): Check for DIRECT_BIND instead of
8559 * call.c (build_over_call): Use build_decl.
8561 * except.c (expand_throw): Just use convert, not
8562 build_reinterpret_cast.
8564 * lex.c (handle_generic_pragma): Use token_buffer.
8566 * decl.c (check_tag_decl): Don't complain about null friend decl.
8568 1998-11-24 Dave Pitts <dpitts@cozx.com>
8570 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8572 * lex.c (check_newline): Use ISALPHA.
8573 (readescape): Use ISGRAPH.
8574 (yyerror): Use ISGRAPH.
8576 1998-11-24 Nathan Sidwell <nathan@acm.org>
8578 * search.c (get_abstract_virtuals): Do not use initial
8579 CLASSTYPE_ABSTRACT_VIRTUALS.
8580 * typeck2.c (abstract_virtuals_error): Show location of abstract
8582 * call.c (build_new_method_call): Use
8583 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8584 * class.c (finish_struct_bits): Don't bother working out whether
8585 get_abstract_virtuals will do anything, just do it.
8587 1998-11-24 Graham <grahams@rcp.co.uk>
8589 * typeck.c (build_component_ref): Remove unused statement.
8591 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
8593 * class.c (add_method): Catch invalid overloads.
8595 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8596 * search.c (lookup_conversions): Handle getting real OVERLOADs.
8597 (add_conversions): Likewise. Revert last change.
8598 * call.c (add_conv_candidate): Pass totype to add_candidate instead
8599 of fn. Don't add a new candidate if the last one was for the same
8601 (print_z_candidates): Handle getting a type as a function.
8602 (joust): If we got two conversion candidates to the same type,
8604 (build_object_call): Lose 'templates'.
8605 (build_user_type_conversion_1): Handle getting real OVERLOADs.
8607 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8609 * typeck2.c (process_init_constructor): If there are elements
8610 that don't have initializers and they need to have constructors
8611 run, supply them with initializers.
8613 * class.c (finish_struct_1): A class with a 0-width bitfield is
8616 1998-11-23 Mark Mitchell <mark@markmitchell.com>
8618 * pt.c (instantiate_class_template): Don't try to figure out what
8619 specialization to use for a partial instantiation. Correct
8620 typos in a couple of comments. Avoid calling uses_template_parms
8623 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
8625 * method.c (process_overload_item): Add call to
8626 build_mangled_C9x_name for intTI_type_nodes.
8627 (build_mangled_C9x_name): Add prototype, define.
8628 * decl.c (init_decl_processing): Add names for
8631 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
8633 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8635 * class.c (finish_struct_1): Set things up for 0-width bitfields
8636 like we do for others.
8638 * decl.c (check_tag_decl): New fn.
8639 (shadow_tag): Split out from here.
8640 * decl2.c (grok_x_components): Call it.
8642 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
8644 * decl.c: Lose warn_about_return_type.
8645 (grokdeclarator): Always complain about implicit int, except for
8648 * decl.c (tag_name): New fn.
8649 (xref_tag): Complain about using typedef-name after class-key.
8651 * init.c (expand_vec_init): Also keep going if from_array.
8653 * tree.c (is_overloaded_fn): Also handle the output of
8656 * decl.c (grokdeclarator): Use constructor_name when comparing
8657 field name against enclosing class.
8658 * class.c (finish_struct_anon): Likewise.
8660 1998-11-22 Mark Mitchell <mark@markmitchell.com>
8662 * decl.c (poplevel): Remove code to handle KEEP == 2.
8663 (finish_function): Don't confuse BLOCK-order when
8664 processing a destructor.
8666 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8668 * decl.c (require_complete_types_for_parms): Call layout_decl
8669 after we've completed the type.
8671 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
8673 * decl2.c (validate_nonmember_using_decl): Allow using templates
8674 from the global namespace.
8676 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
8678 Handle specifying template args to member function templates.
8679 * tree.c (build_overload): Always create an OVERLOAD for a template.
8680 * search.c (add_conversions): Handle finding an OVERLOAD.
8681 * decl2.c (check_classfn): Likewise.
8682 * lex.c (identifier_type): See through a baselink.
8683 * parse.y (do_id): Don't call do_identifier if we got a baselink.
8684 * class.c (instantiate_type, case TREE_LIST): Recurse.
8686 * decl.c (grokdeclarator): Allow a boolean constant for array
8687 bounds, odd as that sounds.
8689 * pt.c (unify): Be more strict about non-type parms, except for
8691 (UNIFY_ALLOW_INTEGER): New macro.
8693 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
8695 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8697 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
8699 * semantics.c (begin_class_definition): Call
8700 maybe_process_partial_specialization before push_template_decl.
8701 Don't call push_template_decl for a specialization.
8702 * search.c (lookup_field): Do return a member template class.
8703 * decl2.c (handle_class_head): Handle member template classes.
8705 * decl.c (grokdeclarator): A parm type need not be complete.
8707 * pt.c (convert_nontype_argument): Fix thinko.
8709 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8711 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8712 (global_delete_fndecl): New variable.
8713 * decl.c (global_delete_fndecl): Define it.
8714 (init_decl_processing): Set it.
8715 * init.c (build_builtin_delete_call): Use it.
8716 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8719 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8721 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8724 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8725 * call.c (build_object_call): Also support references to functions.
8726 * typeck.c (convert_for_initialization): Don't decay a function
8727 if the target is a reference to function.
8729 * search.c (add_conversions): Get all the overloads from a class.
8731 * decl.c (grok_ctor_properties): Complain about any constructor
8732 that will take a single arg of the class type by value.
8734 * typeck2.c (build_functional_cast): Can't create objects of
8735 abstract classes this way.
8736 * cvt.c (ocp_convert): Likewise.
8738 * decl.c (grokfndecl): Member functions of local classes are not
8741 1998-11-18 Mark Mitchell <mark@markmitchell.com>
8743 * Make-lang.in (cc1plus): Add dependency on hash.o.
8745 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
8747 * search.c (get_abstract_virtuals): Complain about virtuals with
8749 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8750 with no final overrider.
8751 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8752 on virtuals with no final overrider.
8754 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8756 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8759 * friend.c (do_friend): Don't set_mangled_name_for_decl.
8761 * class.c (finish_struct_anon): Complain about non-fields.
8762 * decl2.c (build_anon_union_vars): Likewise.
8764 * decl.c (grokdeclarator): Normal data members can't have the same
8765 name as the class, either.
8766 * class.c (finish_struct_anon): Neither can members of an
8769 1998-11-17 Mark Mitchell <mark@markmitchell.com>
8771 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8772 (TYPE_BINFO): Likewise.
8773 (IS_AGGR_TYPE): Tweak.
8774 (SET_IS_AGGR_TYPE): New macro.
8775 (CLASS_TYPE_P): Tweak.
8776 (lang_type): Group mark bitfields together. Remove linenum.
8777 (CLASSTYPE_SOURCE_LINE): Remove macro.
8778 (CLASSTYPE_MARKED_N): New macro.
8779 (SET_CLASSTYPE_MARKED_N): Likewise.
8780 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8781 (CLASS_TYPE_MARKED_*): Use them.
8782 (SET_CLASSTYPE_MARKED_*): Likewise.
8783 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8784 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8785 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8786 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8787 * class.c (class_cache_obstack): New variable.
8788 (class_cache_firstobj): Likewise.
8789 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8790 (pushclass): Free the cache, when appropriate.
8792 (maybe_push_cache_obstack): Use class_cache_obstack.
8793 * decl.c (include hash.h).
8794 (typename_hash): New function.
8795 (typename_compare): Likewise.
8796 (build_typename_type): Check the hash table to avoid creating
8798 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8799 (grokdeclarator): Use CLASS_TYPE_P.
8800 (xref_basetypes): Likewise.
8801 (start_function): Likewise. Don't put current_class_ref on the
8803 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8805 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8806 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8807 fields for types other than class types. Do clear TYPE_ALIAS_SET
8808 for types other than class types, though.
8809 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8810 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8811 * pt.c (process_template_parm): Don't set
8812 CLASSTYPE_GOT_SEMICOLON.
8813 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8814 Coerce arguments on the momentary obstack.
8815 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8816 (instantiate_class_template): Calculate template arguments on the
8817 momentary obstack. Tidy.
8818 (tsubst_template_arg_vector): Use make_temp_vec.
8819 (tsubst_aggr_type): Put template arguments on the momentary
8821 (tsubst_decl): Likewise.
8822 (tsubst): Copy the array bounds index to the permanent obstack
8823 before building index types. Use new macros.
8824 (unify): Use new macros.
8825 (do_type_instantiation): Likewise.
8826 * search.c (lookup_fnfields_1): Use new macros.
8827 (dfs_pushdecls): Build envelopes on the cache obstack.
8828 (dfs_compress_decls): Use new macros.
8829 (push_class_decls): Build on the cache obstack.
8830 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8831 * sign.c (build_signature_pointer_or_reference_type): Use
8833 * tree.c (make_binfo): Check CLASS_TYPE_P.
8834 (copy_template_template_parm): Adjust.
8835 (make_temp_vec): Use push_expression_obstack.
8836 * typeck.c (complete_type): Use new macros.
8837 (comptypes): Likewise.
8839 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
8841 * pt.c (tsubst): Add diagnostics for invalid array, reference
8842 and pointer to member types.
8844 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8846 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8848 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8851 * parse.y (structsp): Fix cut-and-paste error.
8853 * init.c (build_new): Complain about non-integral size.
8855 * parse.y (unary_expr): Complain about defining types in sizeof.
8857 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8859 * rtti.c (build_x_typeid): Complain about typeid without
8860 including <typeinfo>.
8861 (get_typeid): Likewise. Complain about typeid of incomplete type.
8862 (get_tinfo_fn_dynamic): Likewise.
8863 (get_typeid_1): Not static anymore.
8864 * except.c (build_eh_type_type): Use get_typeid_1.
8866 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8867 ambiguous or private bases. Fix warning for reference cast.
8869 1998-11-16 Mark Mitchell <mark@markmitchell.com>
8871 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8872 * decl.c (duplicate_decls): Remove special-case code to deal with
8873 template friends, and just do the obvious thing.
8874 * pt.c (register_specialization): Tweak for clarity, and also to
8875 clear DECL_INITIAL for an instantiation before it is merged with a
8877 (check_explicit_specialization): Fix indentation.
8878 (tsubst_friend_function): Handle both definitions in friend
8879 declaration and outside friend declarations.
8880 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8881 (regenerate_decl_from_template): Tweak accordingly.
8882 (instantiate_decl): Likewise.
8884 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
8886 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8887 member function reference to error.
8888 * cvt.c (ocp_convert): Complain about converting an overloaded
8891 * init.c (build_offset_ref): Just return a lone static member
8894 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8897 * typeck.c (build_binary_op_nodefault): Improve error handling.
8899 * decl.c (grokfndecl): Complain about making 'main' a template.
8901 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
8903 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
8904 TYPE_DECL in a template.
8906 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
8908 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
8910 * decl.c (struct cp_function): Add named_label_uses.
8911 (push_cp_function_context): Save it.
8912 (pop_cp_function_context): Restore it.
8913 (define_label): Also complain about jumping into the scope of
8914 non-POD objects that don't have constructors.
8915 * tree.c (pod_type_p): New fn.
8917 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
8918 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
8919 (get_tinfo_fn): Not here.
8920 * repo.c (repo_get_id): Abort if we get called for an incomplete
8923 1998-11-13 Mark Mitchell <mark@markmitchell.com>
8925 * except.c (expand_throw): Make sure first argument to
8926 __cp_push_exception is of type `void*' to avoid spurious error
8929 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
8931 * pt.c (try_one_overload): Take orig_targs again. Only check for
8932 mismatches against them; we don't care what a previous call found.
8933 (resolve_overloaded_unification): Adjust.
8935 * search.c (lookup_field): Don't return anything for a non-type
8936 field from a dependent type.
8937 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
8938 in an array declarator.
8939 (start_decl): Push into the class before looking for the field.
8941 1998-11-08 Mark Mitchell <mark@markmitchell.com>
8943 * method.c (build_overload_value): Handle REFERENCE_TYPE.
8945 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
8947 * decl.c (grokdeclarator): Allow namespace-scoped members if they
8950 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
8952 * pt.c (tsubst_decl): Don't mess with the global value of an
8953 un-mangled DECL_ASSEMBLER_NAME.
8955 1998-11-03 Christopher Faylor <cgf@cygnus.com>
8957 * decl.c (init_decl_processing): Remove CYGWIN conditional
8958 since CYGWIN is now able to deal with trapping signals.
8960 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8962 * cp-tree.h: Don't include gansidecl.h.
8963 * exception.cc: Include gansidecl.h (since we don't include config.h)
8964 * g++spec.c: Don't include gansidecl.h.
8966 1998-11-06 Mark Mitchell <mark@markmitchell.com>
8968 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
8970 (DECL_DEFINED_IN_CLASS_P): New macro.
8971 (TEMPLATE_PARMS_FOR_INLINE): Document.
8972 (check_static_variable_definition): New function.
8973 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
8975 (check_static_variable_definition): Split out from ...
8976 (grokdeclarator): Here.
8977 * pt.c (check_default_tmpl_args): New function, split out from ...
8978 (push_template_decl_real): Here.
8979 (instantiate_template): Fix comment.
8981 1998-11-04 Mark Mitchell <mark@markmitchell.com>
8983 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
8984 (CP_TYPE_VOLATILE_P): Likewise.
8985 (CP_TYPE_RESTRICT_P): Likewise.
8987 1998-11-03 Mark Mitchell <mark@markmitchell.com>
8989 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
8991 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
8993 * class.c (instantiate_type): Be more helpful.
8995 * decl2.c (import_export_decl): Call import_export_class.
8997 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
8998 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
8999 * pt.c (tsubst_copy): Likewise.
9001 1998-11-02 Mark Mitchell <mark@markmitchell.com>
9003 * init.c (expand_vec_init): Fix off-by-one error.
9005 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
9007 * parse.y (apparent_template_type): New type.
9008 (named_complex_class_head_sans_basetype): Use it.
9009 * Makefile.in (CONFLICTS): One new conflict.
9010 * parse.c: Regenerated.
9012 1998-11-01 Mark Mitchell <mark@markmitchell.com>
9014 * cp-tree.h (COMPARE_STRICT): New macro.
9015 (COMPARE_BASE): Likewise.
9016 (COMPARE_RELAXED): Likewise.
9017 (COMPARE_REDECLARATION): Likewise.
9018 (same_type_p): Likewise.
9019 (same_or_base_type_p): Likewise.
9020 * call.c (standard_conversion): Use them, in place of comptypes
9021 with numeric arguments.
9022 (reference_binding): Likewise.
9023 (convert_like): Likewise.
9024 (build_over_call): Likewise.
9025 (is_subseq): Likewise.
9026 (is_properly_derived_from): Likewise.
9027 (compare_ics): Likewise.
9029 * class.c (delete_duplicate_fields_1): Likewise.
9030 (resolves_to_fixed_type_p): Likewise.
9031 (instantiate_type): Likewise. Remove #if 0'd code.
9032 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
9033 (pushdecl): Likewise.
9034 (lookup_name_real): Likewise.
9035 (grokdeclarator): Likewise. Check for illegal array declarations.
9036 (grokparms): Likewise.
9037 (grok_op_properties): Likewise.
9038 * decl2.c (check_classfn): Likewise.
9039 * friend.c (is_friend): Likewise.
9040 (make_friend_class): Likewise.
9041 * init.c (expand_aggr_init): Likewise.
9042 (expand_vec_init): Likewise.
9043 * pt.c (is_member_template_class): Remove declaration.
9044 (is_specialization_of): Use COMPARE_* and new macros.
9045 (comp_template_parms): Likewise.
9046 (convert_nontype_argument): Likewise.
9047 (coerce_template_template_parms): Likewise.
9048 (template_args_equal): Likewise.
9049 (lookup_template_class): Likewise.
9050 (type_unification_real): Likewise.
9052 (get_bindings_real): Likewise.
9053 * search.c (covariant_return_p): Likewise.
9054 (get_matching_virtual): Likewise.
9055 * sig.c (match_method_types): Likewise.
9056 * tree.c (vec_binfo_member): Likewise.
9057 (cp_tree_equal): Likewise.
9058 * typeck.c (common_type): Likewise.
9059 (comp_array_types): Likewise. Get issues involving unknown array
9061 (comptypes): Update comments. Use new flags.
9062 (comp_target_types): Use new macros.
9063 (compparms): Likewise.
9064 (comp_target_parms): Likewise.
9065 (string_conv_p): Likewise.
9066 (build_component_ref): Likewise.
9067 (build_indirect_ref): Likewise.
9068 (build_conditional_expr): Likewise.
9069 (build_static_cast): Likewise.
9070 (build_reinterpret_cast): Likewise.
9071 (build_const_cast): Likewise.
9072 (build_modify_expr): Likewise.
9073 (convert_for_assignment): Likewise.
9074 (comp_ptr_ttypes_real): Likewise.
9075 (ptr_reasonably_similar): Likewise.
9076 (comp_ptr_ttypes_const): Likewise.
9078 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
9080 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9082 1998-10-30 Mark Mitchell <mark@markmitchell.com>
9084 * decl2.c (delete_sanity): Pass integer_zero_node, not
9085 integer_two_node, to build_vec_delete.
9086 * init.c (build_array_eh_cleanup): Remove.
9087 (expand_vec_init_try_block): New function.
9088 (expand_vec_init_catch_clause): Likewise.
9089 (build_vec_delete_1): Don't deal with case that auto_delete_vec
9090 might be integer_two_node anymore.
9091 (expand_vec_init): Rework for initialization-correctness and
9092 exception-correctness.
9093 * typeck2.c (process_init_constructor): Make mutual exclusivity
9094 of cases more obvious.
9096 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
9098 * decl.c (lookup_name_real): OK, only warn if not lexing.
9099 Simplify suggested fix.
9101 * cp-tree.h (IDENTIFIER_MARKED): New macro.
9102 * search.c (lookup_conversions): Use breadth_first_search.
9103 (add_conversions): Avoid adding two conversions to the same type.
9104 (breadth_first_search): Work with base binfos, rather
9105 than binfos and base indices.
9106 (get_virtual_destructor): Adjust.
9107 (tree_has_any_destructor_p): Adjust.
9108 (get_matching_virtual): Adjust.
9110 * pt.c (push_template_decl_real): Generalize check for incorrect
9111 number of template parms.
9112 (is_member_template_class): #if 0.
9114 1998-10-29 Richard Henderson <rth@cygnus.com>
9116 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9119 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
9121 * lex.c: Call check_newline from lang_init always. After
9122 calling cpp_start_read, set yy_cur and yy_lim to read from the
9123 cpplib token buffer.
9125 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
9127 * class.c (instantiate_type): Don't consider templates for a normal
9130 * class.c (finish_struct_1): Don't complain about non-copy
9131 assignment ops in union members.
9133 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9134 (prepare_fresh_vtable): Likewise.
9135 (finish_struct_1): Don't call import_export_class.
9136 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9137 (finish_prevtable_vardecl): Lose.
9138 (finish_file): Don't call it.
9139 * pt.c (instantiate_class_template): Likewise.
9140 * cp-tree.h: Remove it.
9142 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9143 * decl.c (finish_function): Not here.
9144 (start_function): Do set DECL_INITIAL.
9146 * pt.c (push_template_decl_real): Complain about default template
9147 args for enclosing classes.
9149 * call.c (add_function_candidate): Treat conversion functions
9150 as coming from the argument's class.
9151 * cp-tree.h (DECL_CONV_FN_P): New fn.
9152 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9153 * class.c (add_method): Use DECL_CONV_FN_P.
9154 * decl2.c (check_classfn): Likewise.
9155 * error.c (dump_function_name): Likewise.
9156 (dump_function_decl): Likewise.
9157 * pt.c (fn_type_unification): Likewise.
9158 * search.c (add_conversions): Likewise.
9160 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9162 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9163 * method.c (hack_identifier): Also check for using RESULT_DECL
9166 1998-10-27 Mark Mitchell <mark@markmitchell.com>
9168 * decl.c (grokdeclarator): Use type_quals, rather than constp,
9171 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
9173 * call.c (standard_conversion): instantiate_type here.
9174 (reference_binding): And here.
9175 (implicit_conversion): Not here.
9176 (build_op_delete_call): No need to cons up an OVERLOAD.
9177 * cvt.c (cp_convert_to_pointer): instantiate_type here.
9178 (convert_to_reference): And here.
9179 * decl.c (grok_reference_init): Not here.
9180 (grokparms): Or here.
9181 * typeck2.c (digest_init): Or here.
9182 * typeck.c (decay_conversion): Take the address of overloaded
9184 (require_instantiated_type): Lose.
9185 (convert_arguments): Don't handle unknown types here.
9186 (build_c_cast): Likewise.
9187 (build_binary_op): Gut.
9188 (build_conditional_expr): Don't require_instantiated_type.
9189 (build_modify_expr): Likewise.
9190 (build_static_cast): Don't instantiate_type.
9191 (build_reinterpret_cast): Likewise.
9192 (build_const_cast): Likewise.
9193 (convert_for_initialization): Likewise.
9194 (build_ptrmemfunc): Use type_unknown_p.
9195 (convert_for_assignment): Also do default_conversion on overloaded
9196 functions. Hand them off to ocp_convert.
9198 1998-10-26 Mark Mitchell <mark@markmitchell.com>
9200 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9201 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
9203 * class.c (finish_struct_1): Use build_cplus_array_type to build
9205 * decl.c (init_decl_processing): Likewise.
9206 * except.c (expand_end_eh_spec): Likewise.
9207 * search.c (expand_upcast_fixups): Simplify very slightly.
9209 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9211 * decl.c (grokdeclarator): Complain about a variable using
9212 constructor syntax coming back null from start_decl.
9214 * friend.c (make_friend_class): Complain about trying to make
9215 a non-class type a friend.
9217 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9218 (start_function): Not here.
9220 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
9222 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9224 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9226 * typeck2.c (process_init_constructor): Only skip anonymous fields
9227 if they are bitfields.
9229 * cp-tree.def (TYPEOF_TYPE): New code.
9230 * error.c (dump_type_real): Handle it.
9231 * pt.c (tsubst): Likewise.
9232 * tree.c (search_tree): Likewise.
9233 * semantics.c (finish_typeof): New fn.
9234 * parse.y (typespec): Use it.
9235 * cp-tree.h: Declare it.
9237 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
9239 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9241 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
9243 * typeck.c (convert_arguments): Don't handle pmf references
9246 * init.c (build_member_call): Don't try to convert to the base type
9247 if it's ambiguous or pedantic.
9249 * typeck2.c (check_for_new_type): Only depend on pedantic for
9252 1998-10-25 Mark Mitchell <mark@markmitchell.com>
9254 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9255 non-converting constructors.
9257 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9259 * gxxint.texi: Correct documentation for n, N, Q, and B.
9261 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
9263 * parse.y (condition): Convert VAR_DECL from reference to indirect
9266 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
9268 * exception.cc (__cp_pop_exception): Free the original exception
9269 value, not the potentially coerced one.
9271 1998-10-23 Mark Mitchell <mark@markmitchell.com>
9273 * Makefile.in (hash.h): Run gperf when necessary.
9275 * cp-tree.h (CP_TYPE_READONLY): Remove.
9276 (CP_TYPE_VOLATILE): Likewise.
9277 (CP_TYPE_QUALS): New macro.
9278 (CP_TYPE_CONST_P): Likewise.
9279 (CP_TYPE_VOLATILE_P): Likewise.
9280 (CP_TYPE_RESTRICT_P): Likewise.
9281 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9282 (cp_build_type_variant): Rename to ...
9283 (cp_build_qualified_type): New function.
9284 (c_apply_type_quals_to_decl): Declare.
9285 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9286 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9287 (cp_type_qual_from_rid): New function.
9288 (compparms): Remove unused parameter. All callers changed.
9289 (cp_type_quals): New function.
9290 (at_least_as_qualified_p): Likewise.
9291 (more_qualified_p): Likewise.
9293 * call.c (standard_conversion): Replace calls to
9294 cp_build_type_variant with cp_build_qualified_type. Use
9295 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9296 compare them. Use CP_TYPE_* macros to check qualifiers.
9297 (reference_binding): Likewise.
9298 (implicit_conversion): Likewise.
9299 (add_builtin_candidates): Likewise.
9300 (build_over_call): Likewise.
9301 * class.c (overrides): Compare all qualifiers, not just `const',
9302 on method declarations.
9303 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9304 (convert_pointer_to_real): Likewise.
9305 (type_promotes_to): Likewise.
9306 * decl.c (check_for_uninitialized_const_var): New function.
9307 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9308 (cp_finish_decl): Use check_for_uninitialized_const_var.
9309 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
9311 (grok_ctor_properties): Likewise.
9312 (grok_op_properties): Likewise.
9313 (start_function): Likewise.
9314 (rever_static_member_fn): Likewise.
9315 * decl2.c (grok_method_quals): Likewise.
9316 (grokfield): Likewise.
9317 * error.c (dump_readonly_or_volatile): Rename to ...
9318 (dump_qualifiers): New function. Handle `restrict'.
9319 (dump_type_real): Use it.
9320 (dump_aggr_type): Likewise.
9321 (dump_type_prefix): Likewise.
9322 (dump_type_suffix): Likewise.
9323 (dump_function_decl): Likewise.
9324 (cv_as_string): Likewise.
9325 * gxx.gperf: Add __restrict and __restrict__.
9326 * gxxint.texi: Document `u' as used for `__restrict', and a few
9327 other previously undocumented codes.
9328 * hash.h: Regenerated.
9329 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9330 (build_member_call): Likewise.
9331 (build_new_1): Likewise.
9332 * lex.c (init_parse): Add entry for RID_RESTRICT.
9333 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9334 (cp_type_qual_from_rid): Define.
9335 * lex.h (enum rid): Add RID_RESTRICT.
9336 * method.c (process_modifiers): Deal with `restrict'.
9337 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9338 * parse.c: Regenerated.
9339 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9340 (tsubst_aggr_type): Likewise.
9342 (check_cv_quals_for_unify): Likewise.
9344 * rtti.c (init_rtti_processing): Likewise.
9345 (build_headof): Likewise.
9346 (get_tinfo_var): Likewise.
9347 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
9348 (expand_class_desc): Likewise.
9349 (expand_attr_desc): Likewise.
9350 (synthesize_tinfo_fn): Likewise.
9351 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
9352 (get_matching_virtual): Likewise.
9353 (expand_upcast_fixups): Likewise.
9354 * sig.c (build_signature_pointer_or_reference_name): Take
9355 type_quals, not constp and volatilep.
9356 (build_signature_pointer_or_reference_type): Likewise.
9357 (match_method_types): More CP_TYPE_QUALS conversion, etc.
9358 (build_signature_pointer_constructor): Likewise.
9359 (build_signature_method_call): Likewise.
9360 * tree.c (build_cplus_array_type): Likewise.
9361 (cp_build_type_variant): Rename to ...
9362 (cp_build_qualified_type): New function. Deal with `__restrict'.
9363 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9364 (build_exception_variant): Likewise.
9366 * typeck.c (qualif_type): Likewise.
9367 (common_type): Likewise.
9368 (comptypes): Likewise.
9369 (comp_cv_target_types): Likewise.
9370 (at_least_as_qualified_p): Define.
9371 (more_qualified_p): Likewise.
9372 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9373 (compparms): Likewise.
9374 (inline_conversion): Likewise.
9375 (string_conv_p): Likewise.
9376 (build_component_ref): Likewise.
9377 (build_indirect_ref): Likewise.
9378 (build_array_ref): Likewise.
9379 (build_unary_op): Likewise.
9380 (build_conditional_expr): Likewise.
9381 (build_static_cast): Likewise.
9382 (build_c_cast): Likewise.
9383 (build_modify_expr): Likewise.
9384 (convert_For_assignment): Likewise.
9385 (comp_ptr_ttypes_real): Likewise.
9386 (cp_type_quals): New function.
9388 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
9390 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9391 (CP_TYPE_VOLATILE): Likewise.
9392 * decl.c (grokdeclarator): Use them.
9393 * tree.c (canonical_type_variant): Likewise.
9395 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
9397 * parse.y (named_class_head): Push into class while parsing the
9399 * decl2.c (push_scope, pop_scope): New functions.
9400 * cp-tree.h: Declare them.
9401 * init.c (build_new_1): Delay cleanup until end of full expression.
9403 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
9405 * typeck.c (build_component_ref): Use of a type here is an error.
9407 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
9409 Revamp references to member functions.
9410 * method.c (hack_identifier): Call build_component_ref for a
9411 reference to a member function.
9412 * typeck.c (build_component_ref): Only return a single function
9413 if it's static. Otherwise, return a COMPONENT_REF.
9414 (build_x_function_call): Handle a COMPONENT_REF.
9415 (build_unary_op): Handle all unknown-type things.
9416 * decl2.c (arg_assoc): Handle COMPONENT_REF.
9417 * class.c (instantiate_type): Complain if the function we get is a
9418 nonstatic member function. Remove code for finding "compatible"
9420 * pt.c (tsubst_copy): Handle NOP_EXPR.
9421 * tree.c (build_dummy_object): New fn.
9422 (maybe_dummy_object): New fn.
9423 (is_dummy_object): New fn.
9424 * cp-tree.h: Declare them.
9425 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9426 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9427 * init.c (build_member_call): Use maybe_dummy_object and
9429 (build_offset_ref): Use maybe_dummy_object.
9430 (resolve_offset_ref): Use is_dummy_object.
9431 * typeck.c (build_x_function_call): Call build_dummy_object.
9432 (unary_complex_lvalue): Call is_dummy_object.
9434 * typeck.c (build_component_addr): Make sure field is a field.
9436 * call.c (build_new_op): Delete obsolete code.
9438 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9440 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
9442 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9443 std if std is ignored.
9445 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9447 * decl.c (grokvardecl): Fix thinko.
9449 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9452 * parse.y (fn.def2): Fix 'attrs' format.
9454 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9456 * Makefile.in (CONFLICTS): Update.
9457 * parse.y (expr_or_declarator_intern): New rule.
9458 (expr_or_declarator, direct_notype_declarator, primary,
9459 functional_cast): Use it.
9460 (notype_declarator_intern): New rule.
9461 (notype_declarator, complex_notype_declarator): Use it.
9463 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
9465 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9466 (grokvardecl): Likewise.
9468 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9470 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9471 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9473 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9475 * pt.c (process_partial_specialization): Cast 1st argument of
9478 * tree.c (build_base_fields): Cast `base_align' to (int) when
9479 comparing against one.
9481 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9483 * decl.c (lookup_name_real): Handle template parameters for member
9484 templates where said parameters have the same name as the
9487 * decl.c (expand_static_init): Build cleanups before entering the
9488 anonymous function used to do them to avoid access-checking
9491 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9492 accidentally removed by previous change, and make DECL_RTL here.
9493 * class.c (add_method): Don't make DECL_RTL here.
9495 * pt.c (for_each_template_parm): Don't examine uninstantiated
9498 1998-10-16 Dave Brolley <brolley@cygnus.com>
9500 * lex.c (real_yylex): Fix unaligned access of wchar_t.
9502 1998-10-16 Mark Mitchell <mark@markmitchell.com>
9504 * class.c (add_method): Fix documentation to reflect previous
9505 changes. Check for duplicate method declarations here.
9506 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9507 correctly; such things never match.
9508 (grokfndecl): Don't look for duplicate methods here.
9509 * decl2.c (check_classfn): Don't assume names are mangled.
9510 Don't add bogus member function declarations to a class before the
9511 class type is complete.
9512 (grokfield): Reformat error message.
9513 * method.c (set_mangled_name_for_decl): Don't mangle names while
9514 processing_template_decl.
9516 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
9518 * typeck.c (build_indirect_ref): Complain about a pointer to data
9520 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9522 * init.c (resolve_offset_ref): Don't undo the above.
9524 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9525 (struct lang_decl_flags): Add `bitfield'.
9526 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9528 * decl2.c (grokbitfield, grok_alignof): Likewise.
9529 * init.c (build_offset_ref): Likewise.
9530 * typeck.c (build_component_addr, expr_sizeof): Likewise.
9531 * cvt.c (build_up_reference): Don't crash if taking the address
9532 returns error_mark_node.
9534 * decl.c (grokfndecl): Also check ctype when checking for ::main().
9536 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
9538 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9540 (grokdeclarator): Instead of here.
9541 * friend.c (do_friend): Lose special handling of ::main and
9543 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9545 * spew.c (yylex): Clear looking_for_typename if we got
9548 1998-10-15 Mark Mitchell <mark@markmitchell.com>
9550 * class.c (maybe_warn_about_overly_private_class): Improve error
9551 messages for class with only private constructors.
9553 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9554 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9555 (build_typename_type): New function.
9556 * decl.c (build_typename_type): Broken out from ...
9557 (make_typename_type): Use it.
9558 * search.c (lookup_field): Likewise.
9560 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9562 * pt.c (convert_nontype_argument): Check against type_referred_to.
9563 * decl.c (grokvardecl): Check for declarator name before building
9564 DECL_ASSEMBLER_NAME.
9566 1998-10-14 Mark Mitchell <mark@markmitchell.com>
9568 * pt.c (lookup_template_class): Add comment.
9569 (instantiate_class_template): Don't mark the _TYPE node for
9570 member class templates as an instantiation.
9572 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
9574 * decl.c (grokfndecl): Fix my thinko.
9576 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
9578 * tinfo2.cc (fast_compare): Remove.
9579 (before): Just use strcmp.
9580 * tinfo.cc (operator==): Just use strcmp.
9582 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9584 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9587 1998-10-13 Mark Mitchell <mark@markmitchell.com>
9589 * cp-tree.h (specializations_of_same_template_p): Remove.
9590 * search.c (get_template_base): Don't use it.
9591 (get_template_base_recursive): Likewise.
9592 * pt.c (specializations_of_same_template_p): Remove.
9593 (unify): Don't use it.
9594 (lookup_template_class): Find the correct parent when setting
9595 CLASSTYPE_TI_TEMPLATE.
9597 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9599 * tinfo.cc (operator==): Always compare names.
9601 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9603 * decl.c (start_function): Fix cut-and-paste error.
9605 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
9607 * inc/typeinfo: Add #pragma interface.
9608 (operator!=): Just call operator==.
9609 * tinfo.cc: Add #pragma implementation.
9610 (operator==): Move from inc/typeinfo and tinfo2.cc.
9611 Check __COMMON_UNRELIABLE instead of _WIN32.
9613 * typeck2.c (my_friendly_abort): Add URL.
9615 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
9617 * decl.c (start_method): Added extra parameter for attributes.
9618 * cp-tree.h (start_method): Update prototype.
9619 * parse.y (fn.def2): Update start_method parameter list.
9621 1998-10-11 Mark Mitchell <mark@markmitchell.com>
9623 * cp-tree.h (specializations_of_same_template_p): Declare.
9624 * pt.c (specializations_of_same_template_p): New function.
9626 * search.c (get_template_base): Use it.
9627 (get_template_base_recursive): Likewise.
9629 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
9631 * decl2.c (start_objects): Add new variable `joiner' and
9632 initialize it properly.
9634 1998-10-09 Mark Mitchell <mark@markmitchell.com>
9636 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9637 change to vtable types.
9639 * cvt.c (ocp_convert): Avoid infinite recursion caused by
9642 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
9644 * pt.c (resolve_overloaded_unification): New fn.
9645 (try_one_overload): Likewise.
9646 (unify): Don't fail on unknown type.
9647 (type_unification_real): Likewise. Use resolve_overloaded_unification
9648 to handle an overloaded argument.
9649 (template_args_equal): Split out...
9650 (comp_template_args): From here.
9651 (determine_specialization): Also allow a template with more
9652 parms than were explicitly specified.
9653 * cp-tree.h: Add template_args_equal.
9654 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9656 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
9658 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9661 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
9663 * typeck.c (unsigned_type): Only return TItype nodes when
9664 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9665 (signed_type): Likewise.
9666 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9667 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9668 (init_decl_processing): Only create TItype nodes when
9669 HOST_BITS_PER_WIDE_INT is >= 64 bits.
9670 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9671 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9673 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9675 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9676 (gxx.gperf): Update comments describing invocation flags.
9677 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9679 1998-10-07 Mark Mitchell <mark@markmitchell.com>
9681 * class.c (finish_struct_1): Add commentary on previous change.
9683 * cp-tree.h (vtbl_ptr_type_node): New variable.
9684 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9685 already of the right type.
9686 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9687 Simplify code to grow vtable.
9688 * decl.c (vtbl_ptr_type_node): Define.
9689 (init_decl_processing): Initialize it.
9691 1998-10-06 Mark Mitchell <mark@markmitchell.com>
9693 * cp-tree.def (PTRMEM_CST): New tree node.
9694 * cp-tree.h (ptrmem_cst): New type.
9695 (lang_type): Remove local_typedecls.
9696 (dummy): Increase to 12 bits from 11.
9697 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9698 (PTRMEM_CST_CLASS): New macro.
9699 (PTRMEM_CST_MEMBER): Likewise.
9700 (current_access_specifier): New variable.
9701 (current_class_type): Remove duplicate declaration.
9702 (finish_struct): Change prototype.
9703 (unreverse_member_declarations): New function.
9704 (pushdecl_class_level): Change prototype.
9705 (grok_enum_decls): Remove.
9706 (fixup_anonymous_union): New function.
9707 (grok_x_components): Change prototype.
9708 (tsubst_chain): Remove.
9709 (finish_member_template_decl): Likewise.
9710 (check_explicit_specialization): Fix indentation.
9711 (finish_class_definition): Change prototype.
9712 (finish_member_class_template): Likewise.
9713 (finish_member_declaration): New function.
9714 (check_multiple_declarators): Likewise.
9715 * class.c (class_stack_node_t): New type.
9716 (current_class_base): Remove.
9717 (current_class_stack): Change type.
9718 (current_access_specifier): New variable.
9719 (grow_method): Remove.
9720 (check_member_decl_is_same_in_complete_scope): Break out from
9722 (make_method_vec): New function.
9723 (free_method_vec): Likewise.
9724 (add_implicitly_declared_members): Break out from finish_struct_1.
9725 (free_method_vecs): New variable.
9726 (add_method): Rework for direct use from parser.
9727 (handle_using_decl): Watch for NULL_TREE while iterating through
9728 CLASSTYPE_METHOD_VEC.
9729 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9730 just do some error-checking.
9731 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9732 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
9733 (finish_struct): Change prototype. Simplify; fields and methods
9734 are already set up at this point.
9735 (init_class_processing): Set up current_class_stack.
9736 (pushclass): Save current_access_specifier.
9737 (popclass): Restore it.
9738 (currently_open_class): Simplify.
9739 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9740 * decl.c (saved_scope): Add access_specifier.
9741 (maybe_push_to_top_level): Save it.
9742 (pop_from_top_level): Restore it.
9743 (maybe_process_template_type_declaration): Use
9744 finish_member_declaration.
9745 (pushtag): Likewise.
9746 (pushdecl_class_level): Don't return a value.
9747 (fixup_anonymous_union): Break out from grok_x_components.
9748 (shadow_tag): Use it.
9749 (xref_tag): Complain about using an elaborated type specifier to
9750 reference a template type parameter or typedef name.
9751 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9752 (current_local_enum): Remove.
9753 (build_enumerator): Call finish_member_declaration.
9754 (grok_enum_decls): Remove.
9755 * decl2.c (grok_x_components): Simplify.
9756 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9757 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9758 (merge_functions): Add to comment.
9759 (arg_assoc_type): Prototype.
9760 (arg_assoc): Pass as many arguments as there are parameters.
9761 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
9763 * expr.c (cpls_expand_expr): Remove dead code. Handle
9765 * friend.c (do_friend): Lookup friends when in nested classes.
9767 * init.c (build_offset_ref): Do lookup even for classes that are
9768 only partially defined.
9769 (decl_constant_value): Remove dead code.
9770 * method.c (build_overload_value): Remove hack where by TYPE was
9771 not a TYPE. Handle PTRMEM_CST.
9772 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9774 * parse.y (components, notype_components, component_decl,
9775 component_decl_1, component_declarator, component_declarator0):
9776 Now all are itype rather than ttype. Rework to add members to
9778 (typesqpecqual_reserved): Use check_multiple_declarators.
9779 (structsp): Update class to finish_class_definition.
9780 (do_xref_defn): Unsplit into named_class_head.
9781 (access_specifier): Set current_access_specifier.
9782 * pt.c (set_current_access_from_decl): New function.
9783 (finish_member_template_decl): Don't take the parameters.
9784 (comp_template_args): Make more robust.
9785 (lookup_template_class): Don't use current_local_enum.
9786 (for_each_template_parm): Handle PTRMEM_CST.
9787 (instantiate_class_template): Use set_current_access_from_decl,
9788 finish_member_declaration and unreverse_member_declarations. Set
9789 lineno/input_filename before generating implicit member functions.
9790 (type_unification_real): Don't assume back-unification happens
9791 only for the last argument.
9792 (regenerate_decl_from_template): Call pushclass a bit earlier.
9793 (tsubst_chain): Remove.
9794 (tsubst_enum): Use set_current_access_from_decl.
9795 (set_mangled_name_for_template_decl): Fix indentation.
9796 * search.c (lookup_fnfields_1): Change iteration through
9797 CLASSTYPE_METHOD_VEC.
9798 (dfs_pushdecls): Likewise.
9799 (dfs_compress_decls): Likewise.
9800 (add_conversions): Likewise.
9801 * semantics.c (finish_class_definition): Don't take components.
9802 Change call to finish_struct.
9803 (finish_member_declaration): New function.
9804 (finish_member_class_template): Don't take template parameters.
9805 Change call to grok_x_components. Call finish_member_template_decl.
9806 (check_multiple_declarators): New function.
9807 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9808 a passed in fieldlist.
9809 * tree.c (search_tree): Handle PTRMEM_CST.
9811 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9812 INTEGER_CSTs, for pointer-to-data members.
9814 * call.c (resolve_args): Resolve template specializations, if
9817 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9819 * Makefile.in (spew.o): Depend on toplev.h.
9821 * call.c (compare_ics): Initialize variables `deref_from_type2',
9822 `deref_to_type1' and `deref_to_type2'.
9824 * except.c (get_eh_type): Hide prototype and definition.
9825 (process_start_catch_block_old): Remove unused static prototype.
9827 * pt.c (tsubst_decl): Initialize variable `argvec'.
9829 * spew.c: Include toplev.h.
9831 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
9833 * pt.c (instantiate_decl): Do save and restore file position.
9835 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
9837 * method.c (build_decl_overload_real): Clear
9838 numeric_output_need_bar after __.
9840 1998-10-05 Nathan Sidwell <nathan@acm.org>
9842 * call.c (build_new_method_call): Issue 'incomplete type' error,
9843 if class is not defined.
9845 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9847 * call.c (build_object_call): Move declaration of variable
9848 `fn' into the scope where it is used. Don't access variable
9849 `fn' when it is uninitialized, instead use `fns'.
9851 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9853 * errfn.c (cp_thing): Print buf as a string not as a printf format
9854 to avoid problems with the operator%. Consequently, `%%' sequences
9855 in format are copied as `%' in buf.
9857 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
9859 * pt.c (pop_tinst_level): Call extract_interface_info.
9860 (instantiate_decl): Don't save and restore file position.
9862 * decl.c (cp_finish_decl): Make statics in extern inlines and
9863 templates common, if possible and the target doesn't support weak
9866 * decl.c (grokdeclarator): Remove redundant calls to
9867 build_type_variant and some duplicated code.
9868 * sig.c (build_signature_reference_type): Only take the type parm.
9869 (build_signature_pointer_type): Likewise.
9870 * tree.c (build_cplus_method_type): Adjust.
9871 * cp-tree.h: Update.
9873 1998-10-04 Mark Mitchell <mark@markmitchell.com>
9875 * call.c (build_over_call): Make pedwarns about dropped qualifiers
9876 into full-fledged errors.
9877 * cvt.c (convert_to_reference): Likewise.
9878 * typeck.c (convert_for_assignment): Likewise.
9880 * search.c (expand_upcast_vtables): In addition to unsetting
9881 TREE_READONLY, remove top-level const type qualifier.
9883 1998-10-03 Mark Mitchell <mark@markmitchell.com>
9885 * class.c (current_class_ptr, current_class_ref): Clarify
9887 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9888 NOP type conversions.
9889 * decl.c (decls_match): Use comptypes directly; ignore
9890 qualifiers on the DECL.
9891 (duplicate_decls): Remove qualifier checks on DECL.
9892 (grokdeclarator): Make the type built up include top-level
9894 * decl2.c (do_dtors): Fix spelling error.
9895 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9896 when printing type information.
9897 * init.c (build_new_1): Add documentation. Deal with the fact
9898 that type of allocated memory now contains qualifiers.
9899 * lex.c (is_global): Improve error-recovery.
9900 * sig.c (build_member_function_pointer): Don't cast away const
9901 on fields of sigtable_entry_type.
9902 * tree.c (lvalue_type): Don't look at top-level qualifiers on
9904 * typeck.c (decay_conversion): Likewise.
9905 (build_component_ref): Make sure the type of the COMPONENT_REF
9906 contains top-level qualifiers, as appropriate. Improve
9908 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
9909 (build_array_ref): Likewise.
9910 (build_unary_op): Improve error-recovery.
9911 (unary_complex_lvalue): Make taking the address a bound member
9912 function an error, not a sorry.
9913 (build_conditional_expr): Look at the type qualifiers, not the
9914 qualifiers on the expression itself.
9916 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
9918 * decl2.c (merge_functions): Remove duplicates.
9920 * decl2.c: Add -f{no-,}implicit-inline-templates.
9921 (import_export_decl): Check it.
9923 * decl.c (lookup_name_real): Template parms also take precedence
9924 over implicit typename. Only warn if yylex.
9926 * typeck.c (build_conditional_expr): Only fold if ifexp is an
9929 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
9932 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
9934 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
9935 * class.c (build_vbase_pointer): Use it.
9936 * rtti.c (expand_class_desc): Likewise.
9937 * tree.c (build_vbase_pointer_fields): Likewise.
9939 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
9941 * decl.c (start_decl): Add invocation of
9942 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9943 (start_function): Add invocation of
9944 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
9946 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
9947 HANDLE_GENERIC_PRAGMAS.
9949 1998-09-28 Anthony Green <green@cygnus.com>
9951 * semantics.c (finish_asm_stmt): Always permit volatile asms.
9953 1998-09-28 Mark Mitchell <mark@markmitchell.com>
9955 * decl.c (grokdeclarator): Tighten checks for invalid
9956 destructors. Improve error-messages and error-recovery.
9957 * decl2.c (check_classfn): Don't assume that mangled destructor
9958 names contain type information.
9960 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
9962 * search.c (get_base_distance): Remove assert.
9964 * decl2.c (build_anon_union_vars): Don't process a field with no
9966 (finish_anon_union): Also complain about local anon unions with no
9969 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9971 * decl.c (lookup_namespace_name): If the name is a namespace,
9972 return it immediately.
9974 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9976 * cp-tree.h (define_case_label): Remove unused parameter.
9977 (check_java_method): Likewise.
9978 (grokclassfn): Likewise.
9979 (expand_aggr_init): Likewise.
9980 (build_x_delete): Likewise.
9981 (maybe_end_member_template_processing): Likewise.
9982 (unshare_base_binfos): Add prototype.
9983 (string_conv_p): Likewise.
9984 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
9986 * cvt.c (build_up_reference): Remove unused parameter
9987 `checkconst', all callers changed.
9988 (build_type_conversion): Mark parameter `code' with
9990 (build_expr_type_conversion): Initialize variable `conv'.
9992 * decl.c (push_namespace): Initialize variable `d'.
9993 (define_case_label): Remove unused parameter `decl', all callers
9996 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
9997 `argc' with ATTRIBUTE_UNUSED.
9998 (grokclassfn): Remove unused parameter `cname', all callers
10000 (check_java_method): Likewise for parameter `ctype'.
10001 (copy_assignment_arg_p): Mark parameter `virtualp' with
10003 (finish_prevtable_vardecl): Likewise for parameter `prev'.
10005 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10007 * init.c (expand_aggr_init_1): Remove unused parameter
10008 `alias_this', all callers changed.
10009 (expand_aggr_init): Likewise.
10010 (expand_default_init): Likewise.
10011 (build_new_1): Initialize variable `susp'.
10012 (build_x_delete): Remove unused parameter `type', all callers
10015 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10017 (readescape): Use (unsigned) value in shift.
10018 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
10019 comparing to a signed quantity.
10021 * pt.c (maybe_end_member_template_processing): Remove unused
10022 parameter `decl', all callers changed.
10023 (check_explicit_specialization): Add braces around empty body in
10025 (current_template_args): Initialize variable `args'.
10026 (lookup_template_class): Likewise for variable `prev_local_enum'.
10027 (tsubst_decl): Likewise for variable `r'.
10028 (set_mangled_name_for_template_decl): Initialize variable
10031 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10032 Likewise for variable `i'.
10033 (yylex): Initialize variable `trrr'.
10035 * typeck.c (compparms): Mark variable `strict' with
10038 * xref.c (simplify_type): Cast argument of ctype function to
10041 1998-09-24 Mark Mitchell <mark@markmitchell.com>
10043 * cp-tree.h (language_lvalue_valid): Remove.
10044 * decl.c (grokdeclarator): Don't disallow references to functions.
10045 * tree.c (lvalue_p_1): New function, combining duplicated
10047 (lvalue_p): Use it.
10048 (real_lvalue_p): Likewise.
10049 * typeck.c (language_lvalue_valid): Remove.
10050 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10051 they don't have TREE_READONLY set.
10052 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10054 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
10056 * spew.c (yylex): Give diagnostic.
10057 * hash.h (is_reserved_word): Add export.
10058 * gxx.gperf: Likewise.
10059 * lex.h (rid): Add RID_EXPORT.
10060 * lex.c (init_parse): Likewise.
10062 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
10064 * friend.c (do_friend): Make warning a full sentence.
10066 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10068 * parse.y (component_decl_list): Improve error-recovery.
10070 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
10072 * decl.c (make_typename_type): Move error to point where name
10073 variable can be used by dump_type.
10075 1998-09-22 Mark Mitchell <mark@markmitchell.com>
10077 * decl.c (grokfndecl): Improve error-recovery.
10078 * decl2.c (grokfield): Likewise.
10079 * pt.c (finish_member_template_decl): Likewise.
10081 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
10083 * method.c (hack_identifier): Finding multiple members is always
10086 1998-09-21 Per Bothner <bothner@cygnus.com>
10088 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
10090 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
10092 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10094 1998-09-20 Mark Mitchell <mark@markmitchell.com>
10096 * class.c (maybe_warn_about_overly_private_class): Reformat.
10098 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
10100 * exception.cc (__cplus_type_matcher): Realign some code.
10102 1998-09-16 Mark Mitchell <mark@markmitchell.com>
10104 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10105 (tinfo2.o): Likewise.
10106 (exception.o): Likewise.
10108 (opnew.o): Likewise.
10109 (opnewnt.o): Likewise.
10110 (opvnew.o): Likewise.
10111 (opvnewnt.o): Likewise.
10112 (opdel.o): Likewise.
10113 (opdelnt.o): Likewise.
10114 (opvdel.o): Likewise.
10115 (opvdelnt.o): Likewise.
10117 1998-09-16 Richard Henderson <rth@cygnus.com>
10119 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10121 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
10123 * call.c (build_field_call): Handle static data members too.
10125 * typeck.c (comptypes): When comparing pointer types, check
10126 whether referred types match even in strictest modes.
10128 1998-09-15 Mark Mitchell <mark@markmitchell.com>
10130 * cp-tree.h: Revert previous change.
10131 (finish_struct_methods): Remove declaration.
10132 * class.c: Revert previous change.
10133 (maybe_warn_about_overly_private_class): New function.
10134 (finish_struct_methods): Declare here, and make static. Remove
10135 unnecessary parameters. Tidy slightly. Use
10136 maybe_warn_about_overly_private_class.
10137 (finish_struct_1): Adjust. Remove check for private constructors,
10138 now done elsewhere.
10139 (finish_struct): Adjust.
10141 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10143 * except.c (expand_start_catch_block): No need to check for new
10145 (process_start_catch_block_old): Deleted.
10146 (process_start_catch_block): Add call to start_decl_1().
10147 (expand_end_catch_block): Add call to end_catch_handler().
10148 * exception.cc (__cplus_type_matcher): Only check the exception
10149 language if there is an exception table.
10151 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
10153 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10154 as used to prevent conflicts with virtual function tables.
10156 1998-09-14 Mark Mitchell <mark@markmitchell.com>
10158 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10159 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10160 * class.c (maybe_class_too_private_p): New function.
10161 (finish_struct_methods): Use it.
10162 (finish_struct_1): Likewise.
10163 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10166 * pt.c (check_specialization_scope): Fix spelling error.
10167 (check_explicit_specialization): Remove code to handle explicit
10168 specializations in class scope; they are now correctly diagnosed
10171 1998-09-10 Mark Mitchell <mark@markmitchell.com>
10173 * decl.c (pushdecl): Don't copy types if the
10174 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10177 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10179 * class.c (get_enclosing_class): New function.
10180 (is_base_of_enclosing_class): Likewise.
10181 * cp-tree.h (get_enclosing_class): Declare.
10182 (is_base_of_enclosing_class): Likewise.
10183 * pt.c (coerce_template_parms): Use them.
10185 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
10187 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10188 null to decide whether to use it.
10190 * error.c (dump_type_real): Handle NAMESPACE_DECL.
10191 * parse.y (base_class.1): Avoid crash on error.
10193 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10195 * decl.c (make_typename_type): If context is a namespace, the code
10198 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
10200 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10202 1998-09-08 Mark Mitchell <mark@markmitchell.com>
10204 * cp-tree.h (anonymous_namespace_name): Declare.
10205 * decl.c: Define it.
10206 (push_namespace): Use anonymous_namespace_name, rather than local
10208 * error.c (dump_decl): If a namespace is named
10209 anonymous_namespace_name, call it {anonymous}.
10211 * decl.c (grokparms): Distinguish between references and pointers
10214 1998-09-08 Richard Henderson <rth@cygnus.com>
10215 Mark Mitchell <mark@markmitchell.com>
10217 * pt.c (process_partial_specialization): Consistently allocate
10218 and zero tpd.parms based on ntparms. Use tpd2.parms, not
10219 tpd.parms, where appropriate.
10221 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
10223 * Makefile.in (INCLUDES): Update after recent toplevel gcc
10226 1998-09-05 Mark Mitchell <mark@markmitchell.com>
10228 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10229 * class.c (finish_struct): Remove hackery to deal with explicit
10230 specializations in class scope.
10231 * decl.c (grokfndecl): Improve error-recovery.
10232 * decl2.c (grokfield): Likewise.
10233 * pt.c (check_specialization_scope): New function.
10234 (begin_specialization): Call it.
10235 (process_partial_specialization): New function, split out from
10236 push_template_decl. Check partial specializations more
10238 (push_template_decl): Call it.
10239 (check_explicit_specialization): Don't attempt to handle explicit
10240 specializations in class scope.
10241 (template_parm_data): Document. Add current_arg and
10242 arg_uses_template_parms.
10243 (mark_template_parm): Set it.
10244 (tsubst_arg_types): Remove unused variable.
10245 * semantics.c (begin_class_definition): Tweak.
10247 1998-09-04 Mark Mitchell <mark@markmitchell.com>
10249 * inc/typeinfo (type_info::type_info(const char*)): Make
10252 * cp-tree.h (hash_tree_cons_simple): New macro.
10253 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
10254 (coerce_template_parms): Use make_temp_vec, instead of
10255 make_tree_vec. Document this behavior.
10256 (lookup_template_class): Likewise.
10257 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10258 Remove dead code (and add assertion to check its deadness). Fix
10259 bug w.r.t. exception specifications.
10261 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
10263 * decl2.c (import_export_vtable): Always make artificials comdat.
10264 (import_export_decl): Likewise.
10265 * pt.c (mark_decl_instantiated): Likewise.
10267 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10269 * cp-tree.h (finish_globally_qualified_member_call_expr):
10271 (finish_qualified_call_expr).
10272 * semantics.c: Likewise.
10273 * parse.y (primary): Use it.
10274 * method.c (hack_identifier): Remove redundant code.
10276 * init.c (resolve_offset_ref): Call convert_from_reference to
10277 handle members of reference type. Improve error recovery.
10279 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
10281 * cp-tree.h: Declare warn_nontemplate_friend.
10282 * decl2.c (lang_decode_option): Set.
10283 * lang-options.h: Add -Wnon-template-friend.
10284 * friend.c (do_friend): Use to toggle non-template function warning.
10286 1998-09-03 Mark Mitchell <mark@markmitchell.com>
10288 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10289 corresponding INTEGER_CSTs when processing_template_decl.
10290 * pt.c (tsubst_enum): Tweak accordingly.
10292 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10294 * decl.c (pushdecl_class_level): Add warning here.
10297 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
10299 * cvt.c (convert_pointer_to_real): Tidy.
10300 * search.c (get_base_distance_recursive): Simplify.
10301 (get_base_distance): Likewise.
10303 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10306 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
10308 * lex.c (check_newline): Call HANDLE_PRAGMA before
10309 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
10310 if unknown pragmas are encountered.
10311 (handle_sysv_pragma): Interpret return code from
10312 handle_pragma_token (). Return success/failure indication rather
10313 than next unprocessed character.
10314 (pragma_getc): New function: retrieves characters from the
10315 input stream. Defined when HANDLE_PRAGMA is defined.
10316 (pragma_ungetc): New function: replaces characters back into the
10317 input stream. Defined when HANDLE_PRAGMA is defined.
10319 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10321 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10322 * class.c (build_vtable_entry_ref): Likewise.
10324 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10326 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10327 * decl2.c (import_export_decl): Likewise.
10328 * pt.c (instantiate_decl): Use it.
10330 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
10332 * decl.c (lookup_name_real): Also do implicit typename thing for
10333 artificial TYPE_DECLs.
10334 * search.c (lookup_field): Likewise.
10335 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10336 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10337 (enter_scope_of): Extract type from implicit typename.
10338 (begin_class_definition): Likewise.
10339 * lex.c (identifier_type): Handle implicit typename when checking
10342 * cp-tree.h: Declare flag_strict_prototype.
10343 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10344 -fstrict-prototype.
10345 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10346 specified, set it to the value of pedantic.
10348 1998-09-01 Mark Mitchell <mark@markmitchell.com>
10350 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10352 1998-08-31 Mark Mitchell <mark@markmitchell.com>
10354 * decl.c (finish_enum): Handle member enums of classes declared in
10355 template functions.
10357 * decl2.c (grok_x_components): Strip attributes before calling
10360 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
10362 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10363 -fenum-int-equivalence and -fno-nonnull-objects.
10364 * class.c (check_for_override): Remove support for -fall-virtual.
10365 (finish_struct_1): Likewise.
10366 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10367 * typeck.c (build_binary_op_nodefault): Likewise.
10368 * cvt.c (ocp_convert): Likewise.
10369 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10370 * class.c (build_vbase_path): Likewise.
10372 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
10374 * Makefile.in (INTERFACE): New, set to 1.
10376 1998-08-30 Mark Mitchell <mark@markmitchell.com>
10378 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10379 comparing with global_namespace.
10380 (dump_aggr_type): Likewise.
10382 * decl.c (grokfndecl): Issue error on declaration of friend
10383 templates with explicit template arguments.
10385 * pt.c (convert_template_argument): New function, split out
10387 (coerce_template_parms): Here.
10388 (tsubst): Attempt better error-recovery.
10390 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
10392 * pt.c (decl_template_parm_p): Add checks for
10393 TEMPLATE_TEMPLATE_PARM.
10395 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10397 * lex.c (do_identifier): Fix thinko in previous change.
10399 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
10401 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10402 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10404 1998-08-28 Richard Henderson <rth@cygnus.com>
10406 Add support for discarding unused virtual functions.
10407 * lang-options.h: Add -fvtable-gc.
10408 * cp-tree.h: Add flag_vtable_gc.
10409 * decl2.c (output_vtable_inherit): New fn.
10410 (finish_vtable_vardecl): Call it.
10411 * class.c (build_vtable_entry_ref): New fn.
10412 (build_vtbl_ref): Call it.
10414 1998-08-28 Mark Mitchell <mark@markmitchell.com>
10416 * cp-tree.h (build_enumerator): Take the enumeration type as a
10418 * decl.c (finish_enum): Don't set the TREE_TYPE for the
10419 enumeration constant values if we're processing_template_decls.
10420 Don't set the type for the CONST_DECLs either; that's done in
10422 (build_enumerator): Take the enumeration type as a
10424 * lex.c (do_identifier): Don't resolve enumeration constants while
10425 processing template declarations, even if they happen to be
10426 TEMPLATE_PARM_INDEXs.
10428 * parse.y (current_enum_type): New variable.
10429 (primary): Don't allow statement-expression in local classes just
10430 as we don't in global classes.
10431 (structsp): Use current_enum_type.
10432 (enum_list): Likewise.
10433 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10434 finish_enum; they no longer occur.
10436 * cp-tree.h (finish_base_specifier): New function.
10437 * parse.y (base_class): Use it.
10438 * semantics.c (finish_base_specifier): Define it.
10440 * parse.y (structsp): Warn on use of typename outside of template
10443 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10445 * lex.c (handle_cp_pragma): Remove #pragma vtable.
10446 * lang-options.h: Remove +e options.
10447 * decl2.c (lang_decode_option): Likewise.
10448 (import_export_vtable): Don't check write_virtuals.
10449 (finish_vtable_vardecl, finish_file): Likewise.
10450 * search.c (dfs_debug_mark): Likewise.
10451 * semantics.c (begin_class_definition): Likewise.
10452 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10454 * call.c (build_over_call): Check flag_elide_constructors.
10455 * decl2.c: flag_elide_constructors defaults to 1.
10456 * typeck.c (convert_arguments): Remove return_loc parm.
10457 (build_function_call_real): Adjust.
10459 * search.c: Tear out all mi_matrix and memoize code.
10460 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10461 * lang-options.h: Remove documentation for -fhandle-exceptions,
10462 -fmemoize-lookups and -fsave-memoized.
10463 * cp-tree.h: Lose mi_matrix and memoize support.
10464 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10465 * class.c: Lose struct class_level.
10466 (pushclass, popclass): Lose memoize support.
10467 * init.c (build_offset_ref): Likewise.
10469 Never change BINFO_INHERITANCE_CHAIN.
10470 * init.c (emit_base_init): Change modification of
10471 BINFO_INHERITANCE_CHAIN to an assert.
10472 * search.c (get_base_distance_recursive): Likewise.
10473 (get_base_distance): Likewise.
10474 (lookup_member): Likewise.
10475 (convert_pointer_to_single_level): Likewise.
10476 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
10477 (lookup_fnfields): Likewise.
10478 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10479 (unshare_base_binfos): Don't call propagate_binfo_offsets.
10480 (layout_basetypes): Call propagate_binfo_offsets instead of
10481 unshare_base_binfos.
10482 * decl.c (xref_basetypes): Call unshare_base_binfos.
10483 * pt.c (instantiate_class_template): Likewise.
10484 * tree.c (reverse_path): Remove 'copy' parm; always make a
10486 * class.c (build_vbase_path): Just call it.
10487 * search.c (compute_access): Likewise. Don't re-reverse.
10489 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10491 * class.c (build_vbase_path): Use reverse_path.
10492 (finish_base_struct): Move warnings for inaccessible bases to
10494 (modify_one_vtable): Remove check of TREE_USED (binfo).
10495 (fixup_vtable_deltas1): Likewise.
10496 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10497 (xref_tag): Remove binfos parameter.
10498 (make_binfo): Remove chain parameter.
10499 (reverse_path): Add copy parameter.
10500 * decl.c (init_decl_processing): Change calls to xref_tag.
10501 (xref_tag): Remove binfos parameter.
10502 (xref_basetypes): Change calls to make_binfo.
10503 * decl2.c (grok_x_components): Change calls to xref_tag.
10504 (handle_class_head): Likewise.
10505 * friend.c (do_friend): Likewise.
10506 * lex.c (make_lang_type): Change calls to make_binfo.
10507 * parse.y (structsp): Change calls to xref_tag.
10508 (named_complex_class_head_sans_basetype): Likewise.
10509 (named_class_head): Likewise.
10510 * rtti.c (init_rtti_processing): Likewise.
10511 * search.c (compute_access): Change calls to reverse_path.
10512 (dfs_get_vbase_types): Change calls to make_binfo.
10513 (get_vbase_types): Remove dead code.
10514 * tree.c (unshare_base_binfos): Change calls to make_binfo.
10515 (layout_basetypes): Warn here about inaccessible bases.
10516 (make_binfo): Remove chain parameter.
10517 (reverse_path): Add copy parameter.
10519 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
10521 * class.c: #if 0 complete_type_p.
10522 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10523 * method.c (process_overload_item): Likewise.
10524 * typeck.c (comp_target_types): Likewise.
10526 Stop sharing binfos for indirect virtual bases.
10527 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10528 (layout_basetypes): Likewise.
10529 (unshare_base_binfos): Copy vbases, too.
10530 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10531 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10532 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10533 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10534 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10535 reference to BINFO_VIA_PUBLIC.
10536 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10537 (push_class_decls): Use them.
10538 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10539 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10541 1998-08-27 Mark Mitchell <mark@markmitchell.com>
10543 * decl.c (build_enumerator): Set DECL_CONTEXT for the
10546 1998-08-26 Mark Mitchell <mark@markmitchell.com>
10548 * cp-tree.h (finish_enum): Change prototype.
10549 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10550 VALUES parameter. Don't try to compute mins/maxs if
10551 processing_template_decl.
10552 * parse.y (structsp): Use new calling sequence for finish_enum.
10553 * pt.c (tsubst_enum): Likewise. Take the new type as input.
10554 (lookup_template_class): Remove unused variables. Tweak.
10555 Register enums on instantiation list before substituting
10556 enumeration constants.
10557 (tsubst_decl): Remove unused variables.
10558 (regenerate_decl_from_template): Likewise.
10560 * decl.c (duplicate_decls): Don't obliterate the
10561 DECL_TEMPLATE_INFO for a template if we're not replacing it with
10564 * lex.c (do_identifier): Fix typo in comment.
10566 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10568 * errfn.c: Remove stdarg.h/varargs.h.
10569 * tree.c: Likewise.
10571 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
10573 * pt.c (tsubst_copy): Only do typename overloading on an
10574 IDENTIFIER_NODE that happens to look like a typename if it actually
10575 has a type for us to use.
10577 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10579 * typeck.c (comp_cv_target_types): Split out...
10580 (comp_target_types): From here. Don't allow cv-qual changes under
10581 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
10582 (build_ptrmemfunc): Pass 1 to nptrs.
10583 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10585 1998-08-25 Mark Mitchell <mark@markmitchell.com>
10587 * search.c (dependent_base_p): Don't compare a binfo to
10588 current_class_type; use the TREE_TYPE of the binfo instead.
10590 * cp-tree.h (CLASS_TYPE_P): Revise definition.
10592 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
10594 * decl.c (duplicate_decls): Don't complain about different
10595 exceptions from an internal decl even if pedantic.
10597 * typeck.c (convert_for_assignment): Converting from pm of vbase
10598 to derived is an error, not a sorry.
10600 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10601 * class.c (fixed_type_or_null): Rename from
10602 resolves_to_fixed_type_p. Return the dynamic type of the
10603 expression, if fixed, or null.
10604 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
10605 does not match the static type.
10606 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
10607 resolves_to_fixed_type_p again.
10609 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10611 * pt.c (tsubst_decl): Move special case code for dealing with
10612 tricky friend templates here from ...
10613 (regenerate_decl_from_template): Here.
10615 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10617 * decl.c (start_decl): Remove redundant linkage check.
10619 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
10621 * typeck.c (c_expand_return): Handle the case that valtype
10622 is wider than the functions return type.
10624 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10626 * cp-tree.h (CLASS_TYPE_P): New macro.
10627 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10628 * pt.c (process_template_parm): Undo previous change.
10630 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
10632 * cp-tree.h: Declare.
10633 * pt.c (decl_template_parm_p): New function.
10634 * decl.c (pushdecl): Check decls for redeclaring template parms.
10635 (xref_tag): Make redeclaration an error, print decl.
10636 * decl2.c (grokfield): Check field_decls for redeclaration as well.
10638 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10640 * parse.y (primary): Fix up the type of string constants.
10642 1998-08-24 Mark Mitchell <mark@markmitchell.com>
10644 * typeck.c (convert_for_initialization): Move check for odd uses
10645 of NULL to avoid duplicate warnings.
10647 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
10649 * tree.c (lvalue_type): Fix for arrays.
10650 * typeck.c (string_conv_p): New fn.
10651 (convert_for_assignment): Use it.
10652 (build_unary_op): Use lvalue_type.
10653 * call.c (standard_conversion, convert_like): Use string_conv_p.
10654 (add_function_candidate): Use lvalue_type.
10655 * cvt.c (convert_to_reference): Likewise.
10656 * decl2.c (lang_decode_option): Ignore -traditional.
10657 * decl.c (init_decl_processing): flag_writable_strings inhibits
10658 flag_const_strings.
10660 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
10662 * lang-options.h (lang_options): Add fconst-strings to the list
10664 * decl2.c (lang_f_options, lang_decode_option): Likewise.
10666 1998-08-24 Nathan Sidwell <nathan@acm.org>
10668 * lex.c (real_yylex): Don't warn about long long constants if
10669 we're allowing long long.
10671 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10673 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10674 accessing bindings directly.
10676 * search.c (my_tree_cons): Reimplement.
10678 * lang-specs.h: Remove __HONOR_STD.
10679 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10681 1998-08-23 Mark Mitchell <mark@markmitchell.com>
10683 * decl.c (grokdeclarator): Complain about in-class initialization
10684 of aggregates and/or references.
10685 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10686 TEMPLATE_TYPE_PARMs.
10688 * decl2.c (grok_array_decl): Add comment.
10689 (mark_used): Don't instantiate an explicit instantiation.
10690 * friend.c (make_friend_class): Remove bogus comment. Fix check
10691 for partial specializations.
10692 * pt.c (check_explicit_specialization): Don't
10693 SET_DECL_EXPLICIT_INSTANTIATION here.
10694 (mark_decl_instantiated): Or here.
10695 (do_decl_instantiation): Do it here, instead. Add checks for
10696 duplicate explicit instantiations, etc. Tidy.
10697 (do_type_instantiation): Likewise.
10698 (instantiate_decl): Improve comments. Complain about explicit
10699 instantiations where no definition is available.
10701 * cp-tree.h (ansi_null_node): Remove.
10702 * call.c (build_over_call): Warn about converting NULL to an
10704 * cvt.c (build_expr_type_conversion): Likewise. Use
10705 null_ptr_cst_p instead of expanding it inline.
10706 * decl.c (ansi_null_node): Remove.
10707 (init_decl_processing): Make null_node always have integral type.
10708 * except.c (build_throw): Warn about converting NULL to an
10710 * lex.c (init_parse): Remove handling of ansi_null_node.
10711 * pt.c (type_unification_real): Don't convert NULL to void* type.
10712 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10713 (convert_for_assignment): Warn about converting NULL to an
10715 (convert_for_initialization): Likewise.
10717 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10719 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10720 * pt.c (coerce_template_parms): Use no_linkage_check.
10721 * decl.c (grokvardecl): Likewise.
10722 (grokfndecl): Likewise. Members of anonymous types have no linkage.
10724 * method.c (process_overload_item): Remove useless code.
10726 1998-08-20 Per Bothner <bothner@cygnus.com>
10728 Handle new'ing of Java classes.
10729 * init.c (build_class_classref): New function.
10730 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
10731 constructor does not return this; don't need to exception-protect.
10733 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
10734 * decl2.c (acceptable_java_type): Handle template-derived types.
10736 1998-08-20 Per Bothner <bothner@cygnus.com>
10738 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
10740 1998-08-20 Mark Mitchell <mark@markmitchell.com>
10742 * decl.c (duplicate_decls): Always merge the old and new patterns
10743 for templates, regardless of whether or not the new one has
10744 DECL_INITIAL. Don't throw away specializations. Merge
10746 * pt.c (tsubst_decl): Use the right pattern when calculating the
10747 complete args for a new template instance.
10748 (do_decl_instantiation): Fix typo in comment.
10749 (regenerate_decl_from_template): Deal with tricky friend template
10751 (instantiate_decl): Likewise.
10753 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
10755 * init.c (build_builtin_delete_call): Add missing assemble_external
10758 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
10760 * parse.y (notype_unqualified_id): Also accept ~A<int>.
10762 1998-08-19 Mark Mitchell <mark@markmitchell.com>
10764 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10766 * except.c (build_throw): Warn when NULL is thrown, even with
10767 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
10770 * cp-tree.h (ansi_null_node): New variable.
10771 * decl.c (ansi_null_node): New variable.
10772 (init_decl_processing): Initialize its type.
10773 * lex.c (init_parse): Initialize its value. Use ansi_null_node
10774 for null_node in non-ANSI mode.
10775 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10776 place of null_node to avoid spurious errors.
10778 1998-08-17 Mark Mitchell <mark@markmitchell.com>
10780 * cp-tree.h (enter_scope_of): New function.
10781 * parse.y (complex_direct_notype_declarator): Use it.
10782 * semantics.c (enter_scope_of): New function.
10784 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
10786 * decl.c (grokparms): No, here.
10788 * decl.c (grokdeclarator): Catch parm with pointer to array of
10789 unknown bound here...
10790 * method.c (process_overload_item): ...not here.
10792 * gxxint.texi: Remove obsolete documentation of overloading code.
10794 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10795 * class.c (finish_struct_bits): Likewise.
10797 * tree.c (lvalue_type): Fix for arrays.
10798 * typeck.c (build_unary_op): Use lvalue_type.
10799 * call.c (add_function_candidate): Likewise.
10800 * cvt.c (convert_to_reference): Likewise.
10802 * decl2.c (lang_decode_option): Ignore -traditional.
10804 * init.c (build_offset_ref): Don't mess with error_mark_node.
10805 * lex.c (do_scoped_id): Use cp_error.
10807 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10809 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
10811 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10813 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
10815 * cp-tree.h (set_identifier_local_value): Provide prototype.
10817 * decl2.c (do_namespace_alias): Remove unused variables `binding'
10820 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
10822 * Makefile.in: Rename BBISON to BISON so that it can be properly
10823 inherited from the parent makefile.
10825 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10827 * lang-options.h: Add -finit-priority.
10828 * decl2.c: Likewise. Check flag_init_priority instead of
10831 * decl2.c (setup_initp): New fn.
10832 (start_objects, finish_objects, do_ctors): Handle init_priority.
10833 (do_dtors, finish_file): Likewise.
10835 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
10837 * pt.c (tsubst_copy): Hush warning.
10839 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10841 1998-08-12 Mark Mitchell <mark@markmitchell.com>
10843 * pt.c (print_template_context): Don't abort when instantiating a
10844 synthesized method.
10846 * decl.c (grokdeclarator): Issue errors on namespace qualified
10847 declarators in parameter lists or in class scope.
10849 1998-08-09 Mark Mitchell <mark@markmitchell.com>
10851 * pt.c (check_explicit_specialization): Don't abort on bogus
10852 explicit instantiations.
10854 1998-08-07 Mark Mitchell <mark@markmitchell.com>
10856 * typeck.c (require_complete_type): Use complete_type_or_else.
10857 (complete_type_or_else): Always return NULL_TREE on failure, as
10860 * pt.c (tsubst_aggr_type): Prototype.
10861 (tsubst_decl): New function, split out from tsubst. Set
10862 input_filename and lineno as appropriate.
10863 (pop_tinst_level): Restore the file and line number saved in
10865 (instantiate_class_template): Set input_filename and lineno as
10867 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
10868 context for a TYPENAME_TYPE is complete.
10870 * decl2.c (grokbitfield): Issue errors on bitfields declared with
10872 (do_dtors): As in do_ctors, pretend to be a member of the same
10873 class as a static data member while generating a call to its
10876 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10877 conversions, even in complex virtual base class hierarchies.
10879 1998-08-06 Mark Mitchell <mark@markmitchell.com>
10881 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10882 (TYPE_TEMPLATE_INFO): Likewise.
10883 (SET_TYPE_TEMPLATE_INFO): Likewise.
10884 (ENUM_TI_TEMPLATE): Likewise.
10885 (ENUM_TI_ARGS): Likewise.
10886 (lookup_nested_type_by_name): Remove.
10887 * decl.c (maybe_process_template_type_declaration): Handle enums.
10888 (start_enum): Don't check for primary-template enum declarations
10890 (finish_enum): Clean up, document. Make sure template enum
10891 constants get the correct type.
10892 (build_enumerator): Copy initializers for template enumerations,
10894 (grok_enum_decls): Document.
10895 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10896 better. Build LOOKUP_EXPRs for local variables, even if they are
10898 * pt.c (tsubst_enum): Remove field_chain parameter.
10899 (template_class_depth): Include the depth of surrounding function
10901 (push_template_decl): Check for primary-template enum declarations
10902 here. Deal with enumeration templates.
10903 (lookup_template_class): Likewise.
10904 (for_each_template_parm): Likewise.
10905 (instantiate_class_template): Don't call tsubst_enum directly,
10906 call tsubst instead, to instantiate enums. Deal with all
10907 field_chain issues here, not in tsubst_enum.
10908 (lookup_nested_type_by_name): Remove.
10909 (tsubst_aggr_type): Revise handling of enumeration types.
10910 (tsubst): Likewise.
10911 (tsubst_copy): Likewise.
10912 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
10914 1998-08-04 Mark Mitchell <mark@markmitchell.com>
10916 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
10917 uses template parameters.
10918 * method.c (build_template_parm_names): Use the full set of
10919 template arguments for tsubst'ing.
10920 (build_overload_identifier): Pass the full set of template
10921 arguments to build_template_parm_names, not just the
10923 * pt.c (TMPL_ARGS_DEPTH): Define using
10924 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
10925 (NUM_TMPL_ARGS): New macro.
10926 (add_outermost_template_args): Deal with the case where the outer
10927 args will be completely discarded.
10928 (coerce_template_parms): Use the full set of template arguments
10929 for tsubst'ing. Simplify. Add some asserts. Improve
10931 (lookup_template_class): Pass the full set of template arguments
10932 to coerce_template_parms.
10933 (tsubst): Add assertion.
10934 (do_type_instantiation): Don't instantiate member template
10937 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
10938 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
10940 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
10942 * method.c (set_mangled_name_for_decl): Change return type to void.
10944 * decl.c (lookup_name_real): A namespace-level decl takes priority
10945 over implicit typename. Avoid doing the same lookup twice.
10947 * search.c (dependent_base_p): New fn.
10948 (dfs_pushdecls, dfs_compress_decls): Use it.
10950 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
10951 virtual functions if the type doesn't have any.
10953 1998-08-03 Mark Mitchell <mark@markmitchell.com>
10955 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
10956 uses template parameters.
10958 1998-08-02 Mark Mitchell <mark@markmitchell.com>
10960 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
10961 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
10962 * lex.c (do_identifier): Don't use a second argument, or a type,
10963 when building LOOKUP_EXPRs.
10964 (do_identifier): Likewise.
10965 (do_scoped_id): Likewise.
10966 * method.c (hack_identifier): Improve error message.
10967 * pt.c (lookup_template_function): Don't needlessly call
10968 copy_to_permanent or build_min.
10969 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
10971 (do_decl_instantiation): Improve error message.
10972 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
10973 (build_min): Copy the type to the permanent obstack, too.
10975 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
10977 * init.c (init_init_processing): Remove BI* handling.
10978 (build_builtin_call): Remove.
10979 (build_builtin_delete_call): New fn.
10980 (build_delete): Use it.
10982 1998-07-31 Mark Mitchell <mark@markmitchell.com>
10984 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
10985 (maybe_check_template_type): New function.
10986 * decl.c (maybe_process_template_type_declaration): New function,
10987 split out from pushtag Call maybe_check_template_type.
10988 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
10989 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10990 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
10991 * pt.c (template_class_depth_real): Generalization of ...
10992 (template_class_depth): Use it.
10993 (register_specialization): Use duplicate_decls for duplicate
10994 declarations of specializations.
10995 (maybe_check_template_type): New function.
10996 (push_template_decl_real): Fix comment.
10997 (convert_nontype_argument): Likewise.
10998 (lookup_template_class): Likewise. Avoid an infinite loop on
11000 (tsubst_friend_function): Fix comment.
11001 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11002 an IDENTIFIER_NODE.
11003 * semantics.c (begin_function_definition): Use
11004 reset_specialization to note that template headers don't apply
11005 directly to declarations after the opening curly for a function.
11007 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
11009 * decl.c (push_overloaded_decl): Use current_namespace instead of
11010 DECL_CONTEXT (decl) to determine where we go.
11012 * decl.c (lookup_name_real): Fix typo.
11014 1998-07-28 Mark Mitchell <mark@markmitchell.com>
11016 * friend.c (is_friend): Be lenient with member functions to deal
11017 with nested friends.
11019 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
11021 * class.c (finish_struct_1): Convert integer_zero_node to
11022 ssizetype before passing it to set_rtti_entry.
11023 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11024 of any size to a pointer.
11026 1998-07-27 Mark Mitchell <mark@markmitchell.com>
11028 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11029 (build_template_decl_overload): Remove.
11030 (set_mangled_name_for_decl): New function.
11031 (innermost_args): Remove is_spec parameter.
11032 (most_specialized, most_specialized_class): Remove declarations.
11033 (lookup_template_class): Add entering_scope parameter.
11034 (maybe_process_partial_specialization): New function.
11035 (finish_template_decl): Likewise.
11036 (finish_template_type): Likewise.
11037 * class.c (finish_struct): Clean up processing of member template
11039 * decl.c (pushtag): Fix formatting.
11040 (lookup_tag): Improve handling of pseudo-global levels.
11041 (make_typename_type): Adjust call to lookup_template_class.
11042 (shadow_tag): Use maybe_process_partial_specialization.
11043 (xref_tag): Improve handling of member friends.
11044 (start_function): Call push_nested_class before
11045 push_template_decl. Don't call push_template_decl for
11047 * decl2.c (grok_x_components): Don't call xref_tag for
11048 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
11049 (grokclassfn): Use set_mangled_name_for_decl.
11050 (arg_assoc_class): Adjust call to innermost_args.
11051 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11052 * error.c (dump_function_name): Improve printing of template
11054 * friend.c (is_friend): Don't compare types of decls to determine
11055 friendship, unless flag_guiding_decls.
11056 (make_friend_class): Partial specializations cannot be friends.
11057 (do_friend): Use set_mangled_name_for_decl. Call
11058 push_template_decl_real instead of push_template_decl.
11059 * method.c (build_decl_overload_real): Remove prototype. Give it
11061 (build_overload_identififer): Adjust call to innermost_args.
11062 (build_template_decl_overload): Remove.
11063 (set_mangled_name_for_decl): New function.
11064 * parse.y (.finish_template_type): New non-terminal.
11065 (template_def): Use finish_template_decl. Use template_extdef
11067 (template_extdef, template_datadef): New non-terminals, containing
11068 only those rules for things which can be templates.
11070 (template_type, self_template_type): Use .finish_template_type.
11071 (named_class_head): Use maybe_process_partial_specialization.
11072 * pt.c (mangle_class_name_for_template): Remove context parameter.
11073 (get_class_bindings): Remove outer_args parameter.
11074 (complete_template_args): Remove.
11075 (add_outermost_template_args): New function.
11076 (register_specialization): Return the specialization.
11077 (unregister_specialization): New function.
11078 (tsubst_template_parms): Likewise.
11079 (most_specialized, most_specialized_class): Prototype here as
11081 (original_template): Rename to most_general_template.
11082 (tsubst_template_parms): New function.
11083 (set_mangled_name_for_template_decl): Likewise.
11084 (TMPL_ARGS_DEPTH): New macro.
11085 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11086 (TMPL_ARGS_LEVEL): New macro.
11087 (SET_TMPL_ARGS_LEVEL): Likewise.
11088 (TMPL_ARG): Likewise.
11089 (SET_TMPL_ARG): Likewise.
11090 (TMPL_ARGS_DEPTH): Likewise.
11091 (finish_member_template_decl): Use finish_template_decl.
11092 (maybe_process_partial_specialization): New function, split out
11094 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11095 (maybe_begin_member_template_processing): Use new macros.
11096 (is_member_template): Likewise.
11097 (is_member_template_class): Likewise.
11098 (add_to_template_args): Likewise. Deal with multiple levels of
11100 (maybe_process_partial_specialization): New function.
11101 (retrieve_specialization): Add consistency check.
11102 (determine_specialization): Return full argument list.
11103 (check_explicit_specialization): Tweak friend handling. Use full
11104 argument lists. Simplify.
11105 (current_template_args): Use new macros.
11106 (push_template_decl_real): Change ill-named mainargs to specargs.
11107 Check that a partial specialization actually specializes at least
11108 one parameter. Improve friend handling. Modify for full
11109 template arguments.
11110 (classtype_mangled_name): Don't mangle the names of
11112 (lookup_template_class): Add entering_scope parameter. Use it to
11113 avoid finding a template type when an instantiation is required.
11114 Simplify. Use full template arguments.
11115 (tsubst_friend_function): Use unregister_specialization. Use new
11116 macros. Use full template arguments.
11117 (tsubst_friend_class): Substitute, using tsubst_template_parms,
11118 into the template parameters before passing them to
11119 redeclare_class_template.
11120 (instantiate_class_template): Simplify. Use full template
11121 arguments. Adjust calls to get_class_bindings. Use
11122 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
11123 (innermost_args): Use new macros.
11124 (tsubst_aggr_type): New function, split out from tsubst.
11125 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11126 conventions for lookup_template_class. Refine handling of partial
11127 instantiations. Remove calls to complete_template_args.
11128 Simplify. Add consistency checks. Use set_mangled_name_for_decl
11129 and set_mangled_name_for_template_decl.
11130 (tsubst_copy): Use tsubst_aggr_type.
11131 (instantiate_template): Use full template arguments.
11132 (more_specialized): Improve formatting.
11133 (more_specialized_class): Adjust calls to get_class_bindings.
11134 (get_bindings_real): Don't call complete_template_args.
11135 (most_specialized): Don't overwrite input; create a new list.
11136 (most_specialized_class): Use most_general_template.
11137 (regenerate_decl_from_template): Use unregister_specialization.
11138 Use full template arguments.
11139 (instantiate_decl): Use full template arguments.
11140 (set_mangled_name_for_template_decl): New function.
11141 * semantics.c (begin_class_definition): Use
11142 maybe_process_partial_specialization.
11143 (finish_member_class_template): New function.
11144 (finish_template_decl): Likewise.
11145 (finish_template_type): Likewise.
11146 (typeck.c): Don't crash after issuing a compiler_error.
11147 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11149 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
11151 * typeck2.c (build_functional_cast): Handle default-initialization.
11153 * call.c (build_over_call): Pass 1 to popclass.
11155 * parse.y (direct_notype_declarator): Add precedence declaration
11156 to notype_unqualified_id case.
11157 * Makefile.in (EXPECT): Adjust.
11159 * tree.c (ovl_member): Fix for single function in OVL.
11161 1998-07-27 Dave Brolley <brolley@cygnus.com>
11163 * c-lex.c (yylex): Fix boundary conditions in character literal and
11164 string literal loops.
11166 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
11168 * decl.c (lookup_name_real): OK, do return the from_obj value
11169 unless got_object depends on template parms.
11171 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11173 * pt.c (coerce_template_parms): Also complain about local enums.
11175 * cp-tree.h: Add prototype for set_identifier_local_value.
11176 * decl.c (set_identifier_local_value_with_scope): Make static,
11178 * search.c (covariant_return_p): Likewise.
11179 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11181 * call.c (build_method_call): Only pull out the type of a destructor
11182 if it's a template type parm.
11183 * decl.c (lookup_name_real): Never return the from_obj value.
11185 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11187 * except.c (process_start_catch_block_old): Call start_decl_1 for
11189 * decl.c (start_decl_1): Avoid duplicate error.
11191 * init.c (expand_default_init): Only perform the initialization if
11192 it will do something.
11194 1998-07-23 H.J. Lu (hjl@gnu.org)
11196 * parse.y (base_class): Check for invalid base class.
11198 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
11200 * decl2.c (import_export_template): Fold in...
11201 (import_export_class): ...to here. Handle dllimport/export.
11203 * class.c (build_vtable): Pass at_eof to import_export_vtable.
11204 (prepare_fresh_vtable): Likewise.
11205 * decl2.c (import_export_class): Split out...
11206 (finish_prevtable_vardecl): From here.
11207 * class.c (finish_struct_1): Call import_export_class if at_eof.
11209 * decl.c (start_function): #if 0 mysterious code I wrote and have
11211 * rtti.c (get_tinfo_fn): If this is for a class type, set
11214 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
11216 * inc/exception: Change terminate and unexpected to ().
11218 * parse.y (named_class_head_sans_basetype_defn): A
11219 named_class_head_sans_basetype followed by '{' or ':' is a defn.
11221 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
11223 * tree.c (canonical_type_variant): New fn to handle arrays.
11224 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11225 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
11226 * method.c (process_overload_item): Use build_overload_value for
11229 1998-07-20 Dave Brolley <brolley@cygnus.com>
11231 * lex.c (mbchar.h): #include it.
11232 (GET_ENVIRONMENT): New macro.
11233 (init_parse): Set character set based on LANG environment variable.
11234 (real_yylex): Handle multibyte characters in character literals.
11235 (real_yylex): Handle multibyte characters in string literals.
11237 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
11239 * lex.c (do_identifier): Look for class value even if we don't
11240 have a global value. Do implicit declaration if parsing is 2.
11241 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11244 1998-07-19 Mark Mitchell <mark@markmitchell.com>
11246 * decl.c (pushtag): Revert previous change.
11247 * pt.c (lookup_template_class): Don't put out debugging
11248 information for types that use template parameters.
11250 * decl.c (pushtag): Don't put out debugging information for
11251 compiler-generated typedefs.
11253 * error.c (dump_type_real): Don't crash when presented with
11254 intQI_type_node or the like.
11256 * semantics.c (finish_translation_unit): Fix spelling error in
11259 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
11261 * decl.c (lookup_name_real): Pull out single function here.
11262 (select_decl): Not here.
11263 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11265 * decl.c (qualify_lookup): Tweak again.
11267 * pt.c (lookup_template_class): Don't mess with the context of the
11269 * decl2.c (current_decl_namespace): Remove special handling for
11272 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11273 a member template specialization.
11275 * tree.c (ovl_member): Use decls_match to compare functions.
11276 * decl.c (decls_match): Check the context of a function.
11278 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11279 in Koenig lookup support rules.
11280 * semantics.c (finish_call_expr): Handle the new cases.
11282 * typeck.c (build_x_function_call): Handle overloaded methods.
11284 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11286 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11288 * semantics.c (finish_object_call_expr): Revert previous change.
11289 * call.c (build_new_method_call): Likewise. Instead, convert
11290 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11292 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11294 * decl.c (qualify_lookup): Handle templates.
11296 * decl2.c (do_using_directive): Don't pass ancestor.
11297 * decl.c (push_using_directive): Calculate ancestor.
11299 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11300 * decl.c (pushdecl): Move type shadowing handling from here...
11301 (duplicate_decls): ...to here.
11302 * decl.c (set_identifier_local_value_with_scope): New fn.
11303 (pushdecl): Use it.
11304 (set_identifier_local_value, lookup_type_current_level): New fns.
11305 * decl2.c (do_local_using_decl): Handle types and binding level
11308 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11309 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11310 (lookup_namespace_name): Likewise.
11311 * typeck.c (build_unary_op): Not here anymore.
11313 * decl2.c (do_class_using_decl): Make sure we get an identifier.
11314 * class.c (handle_using_decl): Ignore TYPE_DECLs.
11316 * decl.c (qualify_lookup): New fn.
11317 (lookup_name_real): Use it.
11319 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11321 * decl2.c (add_using_namespace): When directly using a namespace
11322 that was indirect before, promote it.
11324 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11325 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11326 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11327 * decl.c (select_decl): Replace two flag parameters by one.
11328 (unqualified_namespace_lookup): Likewise, pass flag.
11329 (lookup_flags): New function.
11330 (lookup_name_real): Compute flags, pass them.
11331 (lookup_namespace_name): Call with zero-flag.
11332 * decl2.c (ambiguous_decl): Add flag parameter, complain only
11333 according to flags.
11334 (lookup_using_namespace, qualified_lookup_using_namespace):
11335 Add flag parameter, pass them through.
11336 * lex.c (do_scoped_id): Call with zero-flag.
11338 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
11340 * typeck.c (convert_for_assignment): Use comptypes.
11342 1998-07-16 Mark Mitchell <mark@markmitchell.com>
11344 * semantics.c (finish_object_call_expr): Move test for the
11345 function called being a TYPE_DECL to ...
11346 * call.c (build_new_method_call): Here.
11348 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11350 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11351 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11353 * lex.c (looking_for_typename): Don't initialize.
11355 * decl2.c (ambiguous_decl): Clarify error message.
11357 * decl.c (push_using_directive): Iterate over namespaces used
11360 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11362 * decl2.c (add_using_namespace): Iterate over namespaces used
11365 * decl.c (lookup_name_real): Accept namespace aliases as locals.
11366 (cat_namespace_levels): Ignore aliases.
11367 (duplicate_decls): Ignore duplicate aliases.
11368 * decl2.c (do_namespace_alias): Process block level namespace
11369 aliases. Store alias with pushdecl. Remove odr errors.
11370 * parse.y (namespace_alias): New non-terminal.
11373 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
11375 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11376 Handle TEMPLATE_TYPE_PARM.
11377 (arg_assoc): Rewrite.
11379 * pt.c (complete_template_args): Don't look at the context unless
11382 * method.c (build_decl_overload_real): Fix namespace handling.
11384 * typeck.c (build_unary_op): Extract a lone function from an
11387 * call.c (build_scoped_method_call): Handle getting a namespace
11388 for basetype in a destructor call.
11389 (check_dtor_name): Handle enums.
11391 * parse.y (using_directive): New nonterminal.
11392 (extdef, simple_stmt): Use it.
11394 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11396 * decl2.c (add_function): Move error message ...
11397 (arg_assoc_namespace): ... from here.
11399 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11401 * parse.y (namespace_qualifier): Fix multiple level handling.
11402 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11403 (arg_assoc): Don't skip the first argument of a function.
11405 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
11407 * search.c (my_tree_cons): Clean up.
11409 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
11411 * call.c (joust): Don't warn about "confusing" conversions to the
11414 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
11416 * class.c (push_nested_class): Complain about namespaces.
11417 * decl.c (start_decl): Enter the object's namespace.
11418 (cp_finish_decl): Leave it.
11419 (grokdeclarator): Likewise.
11420 * decl2.c (check_decl_namespace): New function.
11421 (finish_file): Call it.
11422 * parse.y (complex_direct_notype_declarator): Set complexity
11423 of namespace-qualified ids to -1, enter the namespace.
11425 * method.c (build_template_decl_overload): Expect _DECL as first
11426 parameter. Put context temporarily into current_namespace.
11427 * pt.c (check_explicit_specialization): Change caller.
11428 (tsubst): Likewise.
11430 * init.c (build_offset_ref): Call mark_used and
11431 convert_from_reference for namespace members.
11433 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
11435 * search.c (my_tree_cons): The bitfield is at index 2.
11437 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
11439 * lang-options.h: Format changed to work with new --help support
11442 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
11444 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11445 Do Koenig lookup in CALL_EXPR.
11446 (arg_assoc): Handle error_mark.
11447 * lex.c (is_global): New function.
11448 (do_identifier): Expect arguments for Koenig lookup.
11449 * parse.y (primary): Add rules for calls of unqualified function calls.
11450 (do_id): Change call of do_identifier.
11451 * pt.c (finish_stmt_expr): Likewise.
11452 * semantics.c (finish_id_expr): Likewise.
11453 (finish_call_expr): Add integer parameter to indicate
11454 argument-dependent lookup.
11456 * decl.c (struct binding_level): New field using_directives.
11457 (push_using_decl): Not sorry anymore.
11458 (push_using_directive): New function.
11459 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11460 (unqualified_namespace_lookup): New function, code from ...
11461 (lookup_name_real): ... here.
11462 * decl2.c (lookup_using_namespace): Pass using list instead of
11464 (validate_nonmember_using_decl): New function.
11465 (do_nonmember_using_decl): New function.
11466 (do_toplevel_using_decl): Use them.
11467 (do_local_using_decl): New function.
11468 (do_using_directive): Support block-level directives.
11469 * parse.y (simple_stmt): Support using declarations and
11471 (namespace_qualifier, namespace_using_decl): New non-terminals.
11473 * xref.c (classname): New function.
11474 (GNU_xref_hier): Change class and base parameters to tree.
11475 * decl.c (xref_baseypes): Change caller.
11476 * friend.c (make_friend_class): Likewise.
11478 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11480 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11483 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11484 template template parameter, record its use.
11485 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11486 its template arguments if exists.
11488 * pt.c (coerce_template_template_parms): New function equivalent
11489 to coerce_template_parms when IS_TMPL_PARM is true.
11490 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
11491 all callers changed.
11493 (coerce_template_parms): Access ARGLIST properly when creating a
11494 new vector. Only accept implicit TYPE_DECL as valid argument for
11495 a template template parameter when it is a base class of
11496 current_class_type. Don't display error message when COMPLAIN is
11499 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
11501 * repo.c (get_base_filename): Use file_name_nondirectory.
11502 (open_repo_file): Likewise.
11503 * cp-tree.h (file_name_nondirectory): Add prototype.
11505 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
11507 * friend.c (do_friend): Pull the identifier out of declarator.
11508 Use cp_error and friends.
11509 * decl2.c (qualified_lookup_using_namespace): Fix call to
11511 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11512 (grokvardecl): Use DECL_CLASS_SCOPE_P.
11513 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11514 * class.c (warn_hidden): Fix for OVERLOAD.
11515 From grahams@rcp.co.uk:
11516 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11517 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11519 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
11521 * g++.1 (-traditional): Remove duplicated documentation.
11523 1998-07-11 Mark Mitchell <mark@markmitchell.com>
11525 * method.c (flush_repeats): Add nrepeats parameter.
11526 (issue_nrepeats): Likewise.
11527 (is_back_referenceable_type): New function. Don't back-reference
11528 TEMPLATE_TYPE_PARMs as well as simple types like integers.
11529 (build_mangled_name_for_type): Likewise.
11530 (build_mangled_name_for_type_with_Gcode): Likewise.
11531 (lasttype): Remove.
11532 (nrepeats): Likewise.
11533 (Nrepeats): Likewise.
11534 (start_squangling): Don't clear the variables removed above.
11535 (end_squangling): Likewise.
11536 (flush_repeats): Tidy. Use nrepeats parameter rather than
11538 (issue_nrepeats): Likewise, but with nrepeats global. Use
11539 is_backreferenceable_type.
11540 (build_overload_nested_name): Tidy. Add comment. Use
11541 build_mangled_name_for_type.
11542 (build_underscore_int): Comment.
11543 (build_overload_scope_ref): Use build_mangled_name_for_type.
11544 (build_overload_int): Likewise.
11545 (build_template_template_parm_names): Tidy.
11546 (build_template_parm_names): Use build_mangled_name_for_type.
11547 (build_overload_identifier): Add comments.
11548 (build_mangled_name_for_type_with_Gcode): Split out from
11549 build_mangled_name.
11550 (build_mangled_name_for_type): Use it.
11551 (build_mangled_name): Rework to use build_mangled_name_for_type
11552 and to not use global nrepeats/Nrepeats. Tidy.
11553 (process_modifiers): Tidy.
11554 (check_btype): Use is_backreferenceable_type. Add comment.
11555 Rename `node' to `type'.
11556 (process_overload_item): Set numeric_output_need_bar here.
11557 Use build_mangled_name_for_type. Tidy.
11558 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
11559 build_mangled_name_for_type.
11561 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11564 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
11566 * cp-tree.h (warn_long_long): Define.
11567 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11568 warning "ANSI C++ does not support `long long'".
11569 * decl2.c (warn_long_long): Define.
11570 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11572 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
11574 * decl.c (xref_tag): Handle attributes between 'class' and name.
11575 * parse.y (aggr): Likewise.
11576 * semantics.c (finish_class_definition): Likewise.
11577 * Makefile.in (EXPECTED): Adjust.
11579 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11580 * decl2.c: Define them.
11581 (lang_decode_option): Handle them.
11582 * lang-options.h: Add -foptional-diags.
11583 * class.c (finish_struct): Don't complain about multiple meanings of
11584 name if -fno-optional-diags.
11585 * decl.c (pushdecl_class_level): Likewise.
11586 * lex.c (real_yylex): Check warn_multichar.
11588 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
11590 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11592 * tree.c (make_binfo): Fix length.
11594 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
11596 * decl2.c (lang_decode_option): Remove warn_template_debugging.
11597 * lang-options.h: Likewise.
11599 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11601 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11602 (process_start_catch_block): Likewise for variables
11603 `false_label_rtx', `call_rtx' and `return_value_rtx'.
11605 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
11607 * tree.c (build_srcloc): Make sure we allocate this node on the
11610 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
11612 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11613 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11614 (lang_specific_driver): Only add -lm automatically if need_math is
11617 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
11619 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
11621 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11623 * Makefile.in (EXPR_H): New dependency variable.
11624 (decl2.o): Depend on $(EXPR_H).
11625 (typeck.o): Likewise.
11626 (init.o): Likewise.
11627 (expr.o): Likewise.
11629 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11631 * decl.c (start_enum): Put local enums on permanent_obstack.
11633 1998-06-25 Mark Mitchell <mark@markmitchell.com>
11635 * cp-tree.h (c_get_alias_set): Declare.
11636 * decl.c (init_decl_processing): Set lang_get_alias_set.
11638 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
11640 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11641 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11642 flag for all function decls which are in the exception table.
11643 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11644 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11645 code is emitted for any referenced rtti function.
11647 1998-06-25 Dave Brolley <brolley@cygnus.com>
11649 * lang-specs.h: Use new | syntax to eliminate
11650 string concatenation.
11652 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
11654 * cp-tree.h (CP_DECL_CONTEXT): New macro.
11655 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11656 * method.c (build_overload_nested_name): Likewise.
11657 * sig.c (build_signature_pointer_or_reference_type): Don't set
11660 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11662 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11663 * cp-tree.h (FROB_CONTEXT): New macro.
11664 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11665 * decl.c (namespace_binding): Replace NULL_TREE with
11667 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11668 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11670 * decl.c (pushtag): Use FROB_CONTEXT.
11671 (pushdecl, make_typename_type, define_function, grokdeclarator):
11673 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11674 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11676 * decl2.c (decl_namespace): Return global_namespace if no context.
11677 * method.c (build_overload_nested_name): Expect null as context.
11678 * pt.c (mangle_class_name_for_template): Do nothing for null
11680 (lookup_template_class): Allow for null id_context.
11682 1998-06-25 Richard Henderson <rth@cygnus.com>
11684 * method.c (emit_thunk): Set current_function_is_thunk for the
11685 ASM_OUTPUT_MI_THUNK case as well.
11687 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11689 * exception.cc (__cplus_type_matcher): Get a match_info pointer
11690 instead of an exception table entry as a parameter.
11692 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
11694 * parse.y (function_try_block): Don't call start_catch_handler.
11695 * except.c (call_eh_info): Remove coerced field from declaration.
11696 (build_eh_type_type_ref): New function to create an address of a
11697 rtti function for the new style exception tables.
11698 (expand_start_catch_block): Split function, this contains the
11700 (process_start_catch_block_old): New function to perform the rest
11701 of expand_start_catch_block under old style exceptions.
11702 (process_start_catch_block_old): New function to perform the rest
11703 of expand_start_catch_block under new style exceptions.
11704 (expand_end_catch_block): Only pop the false label off the stack under
11705 the old style of exceptions.
11706 * semantics.c (finish_try_block): Don't call start_catch_handler.
11707 * exception.cc (struct cp_eh_info): Add original_value field.
11708 (__cplus_type_matcher): Perform type matching on the original exception
11709 value, and if we have a match, set the current value.
11710 (__cp_push_exception): Set the original exception value.
11712 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
11714 * call.c (joust): Fix confusing conversion warning.
11716 * call.c (build_op_delete_call): Add placement parm. Check
11717 LOOKUP_SPECULATIVELY.
11718 * cp-tree.h, decl2.c, init.c: Adjust.
11719 * decl.c (finish_function): Use it.
11721 * pt.c (tsubst): Diagnose creating void fields or variables.
11723 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11725 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11727 * cp-tree.h (check_dtor_name): Add prototype.
11729 * init.c (expand_member_init): Remove unused variables
11730 `ptr_type_node', `parm' and `rval'.
11732 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11733 in call to fprintf.
11734 (lang_print_xnode): Likewise.
11736 * typeck2.c (enum_name_string): Cast argument to sprintf to long
11737 and use %ld specifier.
11739 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11740 specifier in call to fprintf.
11741 (GNU_xref_member): Cast argument to sprintf to int.
11743 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11745 * typeck2.c (pop_init_level): Warn about implicit zero initialization
11748 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11750 * cp-tree.h: Prototype function `check_java_method'.
11752 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11754 * class.c (finish_struct): Make conflicting use of id a pedwarn.
11755 * decl.c (pushdecl_class_level): Likewise.
11757 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11759 * pt.c (convert_nontype_argument): Issue an error when presented
11760 with an integer (real) constant that cannot be simplified to an
11761 INT_CST (REAL_CST).
11763 * cp-tree.h (c_get_alias_set): Remove declaration added in
11764 1998-06-13 change that should never have been checked in.
11766 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11768 * typeck.c (build_binary_op_nodefault): Change % in format strings
11771 * decl.c (grokvardecl): Don't build_static_name for decls that
11772 aren't at namespace scope.
11774 * init.c (perform_member_init): Catch default-initialization of
11777 1998-06-17 Mark Mitchell <mark@markmitchell.com>
11779 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11781 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
11783 * method.c (hack_identifier): Complain about getting a namespace
11785 * typeck.c (decay_conversion): Remove check for namespaces.
11786 * typeck2.c (incomplete_type_error): Likewise.
11787 * parse.y (template_arg): Add PTYPENAME expansion.
11789 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
11791 * decl.c (grokvardecl): Don't build external assembler names for
11792 TYPENAMEs in other namespaces as there is no declarator.
11793 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11794 info from DECL_CONTEXT if it is NULL.
11796 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
11798 * call.c (check_dtor_name): Split out.
11799 (build_scoped_method_call): Use it.
11800 (build_method_call): Use it.
11801 * init.c (build_offset_ref): Use it.
11803 * typeck.c (build_static_cast): Fix handling of pointers to members.
11805 * decl.c (finish_function): Just return nothing from a constructor.
11806 * typeck.c (c_expand_return): Complain about returning a void
11807 expression from a destructor.
11809 1998-06-13 Mark Mitchell <mark@markmitchell.com>
11811 * class.c (alter_access): Accept a BINFO explaining how to get
11812 from the entity whose accessed is being altered to the type doing
11814 (handle_using_decl): New function containing code split out from ...
11815 (finish_struct_1): Here.
11817 * cp-tree.h (complete_type_or_else): Declare.
11818 * init.c (build_new_1, build_delete): Use it.
11819 * typeck.c (require_complete_type): Use complete_type, rather than
11820 expanding it inline.
11821 (complete_type_or_else): New function.
11822 (build_component_ref): Use it.
11823 (pointer_int_sum): Make sure the type pointed to is complete.
11824 (pointer_diff): Likewise.
11826 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11829 * search.c (get_matching_virtual): Note that member templates
11830 cannot override virtual functions.
11832 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
11834 * pt.c (check_explicit_specialization): If DECLARATOR turned into
11835 an error_mark_node from lookup_template_function, return the same.
11836 (determine_specialization): Also make sure TEMPLATE_ID isn't an
11837 error_mark_node, before we try to read its operands.
11838 * decl.c (grokdeclarator): If we got an error_mark_node from
11839 check_explicit_specialization, just return it right back.
11841 1998-06-12 Mark Mitchell <mark@markmitchell.com>
11843 * class.c (instantiate_type): Don't treat template-ids that don't
11844 specify any template arguments as equivalent to ordinary
11845 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
11846 pointer-to-members for member templates. Tidy slightly.
11847 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11848 * init.c (build_offset_ref): Handle template-ids like ordinary
11849 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11850 offset part of the OFFSET_REF.
11851 * typeck.c (build_unary_op): Change check for unknown types to
11852 look for OFFSET_REFs, not SCOPE_REFs.
11854 1998-06-11 Mark Mitchell <mark@markmitchell.com>
11856 * pt.c (is_member_template_class): New function.
11857 (push_template_decl_real): Use it.
11859 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
11861 * friend.c (do_friend): Add support for nested classes using
11862 member functions of the enclosing class as friends.
11864 1998-06-10 Mark Mitchell <mark@markmitchell.com>
11866 * call.c (convert_default_arg): Make global, not static.
11867 (convert_arg_for_ellipsis): Split out from ...
11868 (build_over_call): Here.
11869 * cp-tree.h (convert_default_arg); Declare.
11870 (convert_arg_to_ellipsis): Likewise.
11871 (do_member_init): Remove.
11872 * init.c (do_member_init): Remove; this code is dead.
11873 (expand_member_init): Remove much of this code; it is dead.
11874 * typeck.c (convert_arguments): Use convert_default_arg and
11875 convert_arg_for_ellipsis, rather than duplicating here.
11877 * call.c (convert_like): Don't fail silently if
11878 build_user_type_conversion fails. Always return error_mark_node
11881 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11883 * search.c (covariant_return_p): Complain about ambiguous base.
11885 * typeck.c (build_component_ref): Diagnose ref to nested type.
11887 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11889 * decl.c (grokparms): Check that INIT isn't an error_mark_node
11890 before giving error about invalid type for default arg.
11892 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11894 * call.c (build_method_call): Fix thinko.
11896 1998-06-10 Dave Brolley <brolley@cygnus.com>
11898 * decl2.c (lang_decode_option): New argc/argv interface.
11899 * cp-tree.h (lang_decode_option): New argc/argv interface.
11900 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
11901 specified for cpplib-enabled compilers.
11902 * lex.c (lang_init): Don't check_newline for cpplib.
11903 (init_parse): Don't initialize cpplib here.
11905 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
11907 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
11908 piece before checking DECL_MUTABLE_P.
11910 1998-06-10 John Carr <jfc@mit.edu>
11912 * tree.c (debug_binfo): Make printf format match arguments.
11914 * error.c (OB_PUTI): Make printf format match arguments.
11916 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
11918 * init.c (perform_member_init): Handle default-initialization.
11920 * except.c (build_throw): Handle throwing NULL.
11922 * typeck.c (build_x_function_call): Use resolve_offset_ref.
11924 * search.c (compute_access): Only strip an anonymous union
11927 * call.c (add_builtin_candidates): Tweak.
11929 * cvt.c (build_expr_type_conversion): Restore code for conversion
11931 * decl2.c (delete_sanity): Use it. Clean up.
11933 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
11935 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
11937 * typeck.c (c_expand_return): Don't warn about void expressions on
11938 return statements in functions returning void.
11940 1998-06-09 Mark Mitchell <mark@markmitchell.com>
11942 * pt.c (fn_type_unification): Revise documentation. Tidy.
11943 (type_unification): Likewise.
11945 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
11947 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
11949 * parse.y (function_try_block): Rename expand_start_catch, and delete
11951 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
11954 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
11956 * search.c (lookup_member): New fn.
11957 * class.c (finish_struct_1): Use it.
11958 * decl.c (lookup_name_real): Use it.
11960 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11962 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
11964 * cp-tree.h: Add prototype for `maybe_print_template_context' and
11965 `maybe_make_one_only'.
11967 * decl.c (auto_function): Remove unused variable `decl'.
11969 * decl2.c: Include dwarf2out.h and dwarfout.h.
11971 * lex.c: Remove redundant declarations of `set_float_handler' and
11974 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
11976 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
11977 time flag. Call __cp_eh_info instead of __cp_exception_info.
11978 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
11979 (__cp_exception_info): Return offset into cp_eh_info structure to
11980 match what use to be the start of this structure.
11981 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
11982 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
11984 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
11985 __cp_eh_info instead of __cp_exception_info.
11987 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
11989 * decl.c (cp_finish_decl): Disable inlining of extern inlines
11990 with static variables.
11992 1998-06-08 Mark Mitchell <mark@markmitchell.com>
11994 * init.c (build_offset_ref): Correct previous change to use build,
11997 1998-06-07 Mark Mitchell <mark@markmitchell.com>
11999 * class.c (instantiate_type): Handle pointer-to-members where the
12000 member is a template.
12001 * init.c (build_offset_ref): Likewise.
12002 * typeck.c (build_unary_op): Likewise.
12004 1998-06-07 Richard Henderson <rth@cygnus.com>
12006 * lex.c (lang_init_options): New function.
12007 (lang_init): Remove flag_exceptions == 2 hack.
12009 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12011 * search.c (envelope_add_decl): Tweak for implicit typename.
12013 * call.c (joust): Also warn about confusing conversion op/constructor
12014 overload resolution.
12016 * spew.c (yylex): Also return the TYPE_DECL if got_object.
12017 Don't clear got_object after '~'.
12018 * call.c (build_scoped_method_call): Tweak destructor handling.
12019 (build_method_call): Likewise.
12020 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12021 TYPE_MAIN_VARIANT for destructors.
12022 * semantics.c (finish_object_call_expr): Complain about calling a
12025 1998-06-05 Per Bothner <bothner@cygnus.com>
12027 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12028 Define - update needed by gcc.c change.
12030 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
12032 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12034 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12036 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12037 * decl.c (lookup_name_real): Add namespaces_only parameter.
12038 If set, return only NAMESPACE_DECLs.
12039 (select_decl): Likewise.
12040 (identifier_type_value): Give additional parameter.
12041 (lookup_name_nonclass): Likewise.
12042 (lookup_name): Likewise.
12043 (find_binding): Skip namespace aliases.
12044 (binding_for_name): Likewise.
12045 (push_namespace): Check for namespace aliases.
12046 (lookup_name_namespace_only): New function.
12047 (begin_only_namespace_names, end_only_namespace_names): New functions.
12048 * decl2.c (set_decl_namespace): Skip namespace aliases.
12049 (do_using_directive): Likewise.
12050 (do_namespace_alias): Produce namespace aliases, fix alias
12052 * error.c (dump_decl): Support SCOPE_REF.
12053 * parse.y (extdef): Wrap lookup with namespace_only for namespace
12054 aliases and using declarations.
12056 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
12058 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12060 * error.c (dump_expr): Clean up NEW_EXPR case.
12062 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
12064 Suggested by Brendan Kehoe
12065 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12066 treat it as using ::decl.
12068 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12070 * tree.c (mapcar): Support NEW_EXPR.
12072 * error.c (dump_expr): Support NEW_EXPR.
12074 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
12076 * method.c (make_thunk): Use overload machinery to make name.
12077 * search.c (covariant_return_p): New fn.
12078 (get_matching_virtual): Use it.
12080 * init.c (build_new_1): Fix check for void.
12082 1998-06-01 Per Bothner <bothner@cygnus.com>
12084 * cp-tree.h (TYPE_FOR_JAVA): New macro.
12085 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12086 java_int_type_node, java_long_type_node, java_float_type_node,
12087 java_double_type_node, java_char_type_node, java_boolean_type_node):
12088 New "primitive" types, with predefined names __java_byte etc.
12089 (record_builtin_java_type): New function.
12090 (init_decl_processing): Make Java types with record_builtin_java_type.
12091 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
12092 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
12093 (grokfndecl): Call check_java_method for Java classes.
12094 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
12095 (process_overload_item): Match types against specific
12096 java_XX_type_node types, rather than using is_java_type.
12097 * class.c (finish_struct_1): Don't add default copy constructor
12098 or operator= if TYPE_FOR_JAVA.
12099 (pop_lang_conext): Restore strict_prototyp proper if Java.
12100 * decl2.c (acceptable_java_type, check_java_method): New functions.
12101 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
12102 (tsubst): Move common statement after if statement.
12103 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
12105 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
12107 * pt.c (for_each_template_parm): Use first_rtl_op.
12109 * tree.c (build_cplus_array_type_1): Also check index_type for
12112 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
12114 * pt.c (tsubst): Always copy BINFO_BASETYPES.
12116 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
12118 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12119 TYPE_SIZE_UNIT too.
12121 1998-05-29 Mark Mitchell <mark@markmitchell.com>
12123 * decl.c (grokdeclarator): Don't complain about in-class
12124 initialization of static consts if we don't really know the type
12127 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
12129 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12130 * method.c (build_destructor_name): New fn.
12131 * decl2.c (maybe_retrofit_in_chrg): Split out...
12132 (grokclassfn): From here. Reorganize.
12133 * decl.c (grok_ctor_properties): Make sure ctors for types with
12134 vbases have the in_chrg parm.
12135 * pt.c (instantiate_class_template): Update
12136 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
12138 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12140 1998-05-28 Mark Mitchell <mark@markmitchell.com>
12142 * pt.c (instantiate_decl): Make test for whether or not static
12143 variables should be instantiated early match its comment.
12145 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
12147 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12149 (start_function): Call check_default_args.
12150 * decl2.c (grokfield): Don't call check_default_args.
12151 (check_default_args): Use cp_error_at.
12152 * lex.c (do_pending_defargs): Call check_default_args.
12154 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
12156 * call.c (build_method_call): Make sure get_type_value returns
12157 something before we try to use its TYPE_MAIN_VARIANT.
12158 (build_scoped_method_call): Likewise.
12160 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
12162 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12163 initialize an array.
12165 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12168 * friend.c (do_friend): Clarify template warning.
12170 1998-05-27 Mark Mitchell <mark@markmitchell.com>
12172 * decl.c (shadow_label): Don't treat decls as identifiers.
12173 (maybe_push_to_top_level): Clear shadowed_labels.
12175 * pt.c (instantiate_decl): Reset lineno and filename after calling
12176 regenerate_decl_from_template.
12178 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12181 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
12183 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12185 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12187 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12188 (convert_nontype_argument): Handle cases when nontype template
12189 parameters become classes after substitution.
12191 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12193 * friend.c (is_friend): Use comptypes, rather than == to compare
12194 types. Modify for new representation of template friends.
12195 (make_friend_class): Likewise.
12196 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
12197 (instantiate_class_template): Deal with template friends.
12199 * decl.c (store_parm_decls): Remove redundant call to
12200 expand_main_function.
12202 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
12204 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12207 1998-05-26 Per Bothner <bothner@cygnus.com>
12209 * language_as_string: Handle lang_java.
12211 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
12213 * decl.c (pushdecl): Don't copy the type_decl.
12215 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12217 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12218 current_class_type.
12219 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12221 * parse.y (complex_direct_notype_declarator): Use $1 to access
12222 scope of notype_qualified_id.
12224 1998-05-26 Dave Brolley <brolley@cygnus.com>
12226 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12227 (init_parse): Initialize cpplib interface.
12229 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12230 empty continuation.
12232 1998-05-26 Mark Mitchell <mark@markmitchell.com>
12234 * decl.c (pushtag): Avoid crashing on erroneous input.
12236 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12238 * decl.c (push_namespace): Only produce one unique name for
12239 anonymous namespaces.
12240 (get_unique_name): Remove.
12242 1998-05-25 Mark Mitchell <mark@markmitchell.com>
12244 * call.c (tourney): Don't do any extra comparisons.
12246 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12248 * cp-tree.h (processing_template_parmlist): Declare.
12249 * decl.c (pushtag): Don't call push_template_decl when we
12251 * pt.c (processing_template_parmlist): New variable.
12252 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12253 (complete_template_args): Use it.
12254 (add_to_template_args): Likewise.
12255 (innermost_args): Likewise.
12256 (tsubst): Likewise.
12257 (begin_template_parm_list): Use processing_template_parmlist.
12258 (end_template_parm_list): Likewise.
12260 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12261 * decl.c (grokdeclarator): Use it.
12262 * decl2.c (grok_x_components): Likewise.
12263 * init.c (initializing_context): Likewise.
12264 * method.c (do_build_copy_constructor): Likewise.
12265 (do_build_assign_ref): Likewise.
12266 * search.c (compute_access): Likewise.
12267 * typeck.c (build_component_ref): Likewise.
12269 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12270 unnamed type a typedef name "for linkage purposes".
12272 * pt.c (lookup_template_class): Don't look at
12273 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12275 * method.c (build_overload_int): Handle error cases gracefully.
12277 * pt.c (instantiate_decl): Handle static member variables
12280 * pt.c (tsubst): Use the tsubst'd type when producing new
12281 TEMPLATE_PARM_INDEX nodes.
12283 1998-05-24 Mark Mitchell <mark@markmitchell.com>
12285 * tree.c (cp_tree_equal): Handle pointers to member functions.
12287 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
12288 sure the type of the REF_BIND is a reference type.
12289 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12290 target_type for clarity.
12292 * parse.y (xcond): Move call to condition_conversion ...
12293 * semantics.c (finish_for_cond): Here.
12294 * parse.c: Regenerated.
12296 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
12298 * decl.c (push_namespace): Namespaces have type void.
12299 * typeck2.c (incomplete_type_error): Complain about namespace
12300 used as expression.
12301 * typeck.c (decay_conversion): Likewise.
12303 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12305 * error.c (dump_expr): Support namespaces.
12307 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
12309 * cp-tree.def: Add SRCLOC.
12310 * cp-tree.h: Add struct tree_srcloc and accessor macros.
12311 * tree.c (build_srcloc, build_srcloc_here): New fns.
12312 * pt.c (add_pending_template): Use build_srcloc_here.
12313 (push_tinst_level): Update last_template_error_tick before erroring.
12314 (instantiate_decl): Restore lineno and input_filename before
12315 calling add_pending_template.
12316 * decl2.c (finish_file): Set up lineno and input_filename for
12319 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12321 * decl.c (lang_print_error_function): New fn.
12322 (init_decl_processing): Set print_error_function to use it.
12323 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12325 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12328 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12329 copy-initialization.
12331 * class.c (build_vtable_entry): Use int_fits_type_p.
12332 (build_vtable): Pass a signed offset to build_vtable_entry.
12333 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12334 set_rtti_entry): Likewise.
12336 1998-05-22 Per Bothner <bothner@cygnus.com>
12338 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
12339 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
12341 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
12343 * pt.c (print_template_context): Use fprintf instead of cp_error.
12345 * pt.c (determine_specialization): Just return an error_mark_node.
12346 Also print the decl we want in error messages. If we complain,
12347 return error_mark_node.
12348 (tsubst_friend_function): Set lineno and input_filename so
12349 error messages will be useful.
12350 (instantiate_template): Just return an error_mark_node.
12351 (check_explicit_specialization): Don't mess with a returned
12354 * pt.c (print_template_context): Add new argument.
12355 (maybe_print_template_context): New fn.
12356 (push_tinst_level): Increment tinst_level_tick.
12357 (pop_tinst_level): Likewise.
12358 * errfn.c (cp_thing): Call maybe_print_template_context. Use
12359 xrealloc instead of xmalloc.
12361 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12363 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12365 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12366 if the template we looked up is the same as the one we already
12369 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
12371 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12372 (cpp_reader,parse_in): Add for cpplib.
12373 (check_newline): Call handle_sysv_pragma with new interface.
12374 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12376 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12377 (sub_getch): Call GETC for cpplib.
12379 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12380 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12382 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12384 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
12386 * decl2.c (maybe_make_one_only): New fn.
12387 (import_export_vtable): Use it.
12388 (import_export_decl): Likewise.
12389 * pt.c (mark_decl_instantiated): Likewise.
12391 1998-05-21 Mark Mitchell <mmitchell@usa.net>
12393 * decl2.c (find_representative_member): Rename to ...
12394 (build_anon_union_vars): New function.
12395 (finish_anon_union): Fix stupidity of previous change.
12397 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
12399 * decl.c (grokfndecl): Handle definition of specialization in
12400 friend declaration.
12402 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12404 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12406 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12407 to look for type declarations.
12408 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12409 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12410 (finish_member_class_template): Declare.
12411 * decl.c (pushtag): Put member class templates on the
12412 CLASSTYPE_TAGS list, just as for ordinary member classes.
12413 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12414 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12415 IDENTIFIER_NAMESPACE_VALUEs.
12416 * parse.y (component_decl): Move code to ...
12417 * semantics.c (finish_member_class_template): New function.
12418 Don't put member class templates on the list of components for a
12420 * parse.c: Regenerated.
12421 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12422 In fact, don't use DECL_CONTEXT at all here.
12424 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
12426 * decl.c (record_unknown_type): New function.
12427 (init_decl_processing): Call it for the unknown and global type
12430 1998-05-20 Mark Mitchell <mmitchell@usa.net>
12432 * decl2.c (find_representative_member): New function.
12433 (finish_anon_union): Use it.
12435 * cp-tree.h (MAIN_NAME_P): New macro.
12436 (DECL_MAIN_P): Likwise.
12437 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12438 (grokfndecl): Use the new macros.
12439 (grokdeclarator): Likewise.
12440 (start_function): Likewise.
12441 (store_parm_decls): Likewise.
12442 (finsh_function): Likewise.
12443 * friend.c (do_friend): Likewise.
12444 * typeck.c (build_function_call_real): Likewise.
12445 (build_unary_op): Likewise.
12447 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
12449 * decl2.c (start_objects, finish_objects, do_dtors,
12450 do_ctors): Split out from...
12451 (finish_file): ...here.
12453 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
12455 * tree.c (is_overloaded_fn): Don't abort on placeholders from
12458 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
12460 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12462 * error.c (dump_expr): Handle an ARROW_EXPR.
12464 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
12466 * decl.c (saveable_obstack): Declare.
12467 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12468 declare, if necessary.
12470 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
12472 * call.c (compare_qual): Remove.
12473 (is_subseq): Tweak.
12474 (is_properly_derived_from): New function.
12475 (maybe_handle_ref_bind): Likewise.
12476 (maybe_handle_implicit_object): Likewise.
12477 (compare_ics): Modify substantially to bring into conformance with
12479 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12480 (comp_cv_qualification): Declare.
12481 (comp_cv_qual_signature): Likewise.
12482 * typeck.c (comp_cv_qualification): Likewise.
12483 (comp_cv_qual_signature): Likewise.
12485 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12487 * Makefile.in (parse.o): Depend on toplev.h.
12489 * class.c (typecode_p): Remove prototype and definition.
12491 * cp-tree.h (currently_open_class, is_empty_class, member_p):
12494 * decl.c (push_overloaded_decl_top_level): Remove prototype and
12497 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12498 in call to `cp_thing'.
12499 (cp_warning): Likewise for function pointer `warning'.
12501 * except.c (do_function_call): Remove prototype and definition.
12502 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12504 * method.c (is_java_type): Add prototype and make it static.
12506 * parse.y: Include toplev.h.
12508 * pt.c (type_unification): Remove unused variable `arg'.
12509 (instantiate_decl): Likewise for `save_ti'.
12511 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12513 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
12515 * init.c (build_member_call): Handle template_ids.
12516 * parse.y (primary): Add global_scope template_id.
12518 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12520 * decl2.c (get_sentry): Use end_temporary_allocation.
12521 Don't declare permanent_obstack.
12523 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
12525 * parse.y (.finish_new_placement): New non-terminal.
12526 (unary_expr, new_type_id): Use it.
12527 * parse.c: Regenerated.
12529 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
12531 * pt.c (redeclare_class_template): Say where the original definition
12532 of the template-parameter's default argument appeared.
12534 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
12536 * call.c (build_over_call): Tweak empty class handling.
12538 * decl.c (make_typename_type): Use currently_open_class.
12540 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12542 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12544 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12545 for a type unless it is one.
12547 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12549 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
12551 * Makefile.in (program_transform_name, objdir): Define.
12553 * Makefile.in (BISON): Use bison from the build tree if it exists.
12556 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12558 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12560 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12562 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
12564 * call.c (build_scoped_method_call): Likewise.
12566 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
12568 * init.c (build_new_1): Call suspend_momentary around the creation
12569 of values that must be saved for exception handling.
12570 * parse.y (.build_new_placement): New non-terminal.
12571 (unary_expr, new_placement): Use it.
12572 * parse.c: Regenerated.
12574 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
12576 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12579 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12582 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12584 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12586 * decl.c (start_decl): Revert problem change.
12588 * Makefile.in (CONFLICTS): Fix.
12590 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12592 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12594 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12596 * class.c (finish_struct_1): Use BINFO_SIZE.
12598 * decl.c (start_decl): Use 'tem'.
12600 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
12602 * exception.cc: Include eh-common.h.
12603 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12604 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12605 (__cp_push_exception): Initialize eh_info struct as well.
12606 * except.c: Remove local structs and include eh-common.h.
12607 (init_exception_processing): Set language and version codes.
12608 (call_eh_info): Add presence of eh_info to runtime description of
12610 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12611 * semantics.c (finish_try_block): Call start_catch_block() and
12613 * parse.y (function_try_block): Call start_catch_block() and
12616 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
12618 * typeck.c (original_type): New function.
12619 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12620 to see if they're actually the same.
12621 * cp-tree.h (original_type): Declare.
12623 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12625 * Makefile.in (lex.o): Depend on output.h.
12627 * call.c (add_function_candidate): Remove unused variable `cand'.
12628 (add_conv_candidate): Likewise.
12629 (build_builtin_candidate): Likewise.
12631 * cp-tree.h: Add prototype for `types_overlap_p'.
12633 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12635 * decl2.c (merge_functions): Remove unused variables `tmp' and
12638 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12639 (code_as_string): Likewise.
12640 (language_as_string): Likewise.
12641 (parm_as_string): Likewise.
12642 (op_as_string): Likewise.
12643 (assop_as_string): Likewise.
12644 (cv_as_string): Likewise.
12646 * lex.c: Include output.h.
12648 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12650 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12653 * tinfo.cc (__class_type_info::dcast): Change the type of variable
12654 `i' from int to size_t.
12656 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12659 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
12661 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12662 DECL_NAMESPACE_SCOPE_P.
12663 (lang_decl_name): Likewise.
12664 * pt.c (tsubst_friend_function, tsubst): Likewise.
12665 * decl.c (pushdecl, redeclaration_error_message, start_decl,
12666 cp_finish_decl, start_function): Likewise.
12667 * class.c (finish_struct_1): Likewise.
12668 * call.c (build_over_call): Likewise.
12669 (compare_ics): Use DERIVED_FROM_P.
12671 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
12673 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12674 * method.c (build_mangled_name): Use it.
12675 (build_decl_overload_real): Likewise.
12677 * error.c (dump_simple_decl): New function, broken out from ...
12678 (dump_decl): Use it.
12680 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
12682 * ptree.c (lang_print_xnode): Add missing `break'.
12684 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12686 * call.c (add_template_candidate): Adjust for changes to
12687 fn_type_unification.
12688 (add_template_candidate_real): Likewise.
12689 (add_template_conv_candidate): Likewise.
12690 (build_user_type_conversion_1): Likewise.
12691 (build_new_function_call): Likewise.
12692 (build_object_call): Likewise.
12693 (build_new_op): Likewise.
12694 (build_new_method_call): Likewise.
12695 * class.c (instantiate_type): Likewise.
12696 * cp-tree.h (unification_kind_t): New type.
12697 (fn_type_unification): Adjust prototype.
12698 (type_unificaiton): Likewise.
12699 * pt.c (UNIFY_ALLOW_NONE): New macro.
12700 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12701 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12702 (UNIFY_ALLOW_DERIVED): Likewise.
12703 (unify): Change prototype.
12704 (maybe_adjust_types_for_deduction): New function.
12705 (check_cv_quals_for_unify): Likewise.
12706 (determine_specialization): Adjust.
12707 (fn_type_unification): Likewise.
12708 (type_unification): Likewise.
12709 (type_unification_real): Likewise. Use
12710 maybe_adjust_types_for_deduction. Fix mishandling of
12711 back-unification of template functions passed as arguments. Pass
12712 appropriate combination of UNIFY_ALLOW_* to unify.
12713 (unify): Remove unused NTPARMS parameter. Use
12714 check_cv_quals_for_unify. Remove bogus code that allowed
12715 too-generous unification in order to adhere more closely to standard.
12716 (get_bindings_real): Adjust.
12717 (get_class_bindings): Likewise.
12719 * method.c (build_overload_identifier): Only use the innermost
12720 template arguments when mangling.
12721 * pt.c (tsubst_template_argument_vector): New function.
12722 (complete_template_args): Deal with the situation where the
12723 extra_args contain more than one level of arguments.
12724 (lookup_template_class): Deal with member template classes, which
12725 may have more than one level of arguments.
12726 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12727 Improve handling of member template classes. Use
12728 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
12729 tsubst_template_argument_vector where appropriate.
12730 (regenerate_decl_from_template): Break out from ...
12731 (instantiate_decl): Here.
12733 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12734 * parse.h: Regenerated.
12735 * parse.c: Really regenerated.
12737 * cp-tree.h (finish_unary_op_expr): New function.
12738 (finish_id_expr): Likewise.
12739 (begin_new_placement): Likewise.
12740 (finish_new_placement): Likewise.
12741 (finish_declarator): Likewise.
12742 (finish_translation_unit): Likewise.
12743 (finish_parmlist): Likewise.
12744 (begin_class_definition): Likewise.
12745 (finish_class_definition): Likewise.
12746 (finish_default_args): Likewise.
12747 (finish_inline_definitions): Likewise.
12748 * parse.y (GCC_ASM_KEYWORD): Remove.
12749 (TYPENAME_ELLIPSIS): Likewise.
12750 * parse.c: Regenerated.
12751 Use new functions in semantics.c in the actions for many rules.
12752 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12753 * hash.h: Regenerated.
12754 * semantics.c (finish_expr_stmt): Allow NULL expr.
12755 (finish_unary_op_expr): New function, containing
12756 code previously in parse.y.
12757 (finish_id_expr): Likewise.
12758 (begin_new_placement): Likewise.
12759 (finish_new_placement): Likewise.
12760 (finish_declarator): Likewise.
12761 (finish_translation_unit): Likewise.
12762 (finish_parmlist): Likewise.
12763 (begin_class_definition): Likewise.
12764 (finish_class_definition): Likewise.
12765 (finish_default_args): Likewise.
12766 (finish_inline_definitions): Likewise.
12768 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
12770 * typeck.c (build_c_cast): Don't decay arrays and functions to
12771 pointer type when converting to a class type.
12773 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
12775 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12776 (DECL_CLASS_SCOPE_P): Likewise.
12778 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
12780 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12781 * decl2.c (constructor_name_full): Likewise.
12783 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
12785 * tree.c (mapcar): Add OVERLOAD support.
12787 * init.c (resolve_offset_ref): We must use basetype_path before we
12788 destroy it with a call to convert_pointer_to.
12790 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12792 * class.c (currently_open_class): New fn.
12793 * decl.c (lookup_name_real): Use it.
12794 * search.c (lookup_field): Likewise.
12796 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12798 * cp-tree.def (OVERLOAD): New node.
12799 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12800 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12801 (NAMESPACE_BINDING): Remove.
12802 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12804 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12806 (tree_overload): New struct.
12807 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12808 (REAL_IDENTIFIER_TYPE_VALUE): Define.
12809 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12810 (lang_decl_flags): Remove in_namespace.
12811 (lang_decl): Remove chain.
12812 (DECL_CHAIN, DECL_NAMESPACE): Remove.
12813 (flag_honor_std): Declare extern.
12814 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12815 namespace_binding, set_namespace_binding,
12816 lookup_function_nonclass, cat_namespace_levels,
12817 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12818 scratch_ovl_cons, ovl_member, build_overload): Declare.
12819 (decl_list_length, get_namespace_id, current_namespace_id,
12820 overloaded_globals_p): Remove.
12821 (lookup_using_namespace, qualified_lookup_using_namespace): Change
12823 (push_scratch_obstack): New macro.
12824 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12825 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12827 (build_new_function_call): Iterate using OVL_CHAIN.
12828 Print DECL_NAME in when reporting ambiguities.
12829 (build_object_call): Iterate using OVL_NEXT for fns, convs.
12830 (build_new_op): Call lookup_function_nonclass.
12831 Iterate using OVL_NEXT.
12832 (build_op_delete_call): Change detection of members.
12833 Do not wrap TREE_LIST around fields and single global functions.
12834 (build_over_call): Don't push a class level if the context is a
12836 (build_new_method_call): Iterate using OVL_NEXT.
12837 * class.c (add_method): Chain overloaded members using
12838 build_overload. Remove copying of method.
12839 (grow_method): When iterating through the obstack, expect OVERLOAD
12840 nodes. Chain overload members.
12841 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
12842 nodes in call to get_baselinks.
12843 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12844 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
12845 fdecls that are OVERLOAD nodes.
12846 (validate_lhs): New function.
12847 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
12848 code. Use DECL_NAME in error messages. Split code between global
12849 and member function processing.
12850 * decl.c (global_type_node): New static variable.
12851 (in_std): New global.
12852 (struct binding_level): New field usings.
12853 (resume_binding_level): Assert that we are not in a class.
12854 (toplevel_bindings_p): Just check for namespace_p or
12856 (resume_level): Remove.
12857 (find_binding): New function.
12858 (binding_for_name): Call it.
12859 (namespace_binding, set_namespace_binding): New functions.
12860 (push_namespace): Associate binding level with new namespace,
12861 resume_binding_level for existing namespace. Remove old code.
12862 Fake std by counting.
12863 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12864 (maybe_push_to_top_level): Save current namespace.
12865 (pop_from_top_level): Restore saved namespace.
12866 (pop_namespace): Call suspend_binding_level. Remove old code.
12867 (cat_namespace_levels): New function.
12868 (set_identifier_type_value_with_scope): For namespace bindings,
12869 set BINDING_TYPE, and use global_type_node.
12870 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12871 (identifier_type_value): New function.
12872 (pushtag): If no context, use current_namespace.
12873 (duplicate_decls): Don't process DECL_CHAIN.
12874 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12875 already set. Never reset it to NULL_TREE. Lookup global variables
12876 in their namespace. Push overloaded templates if they are on
12878 (pushdecl_namespace_level): New function.
12879 (pushdecl_top_level): Implement using pushdecl_namespace_level.
12880 (pushdecl_using_decl): New function.
12881 (overloaded_globals_p): Remove.
12882 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12883 them. Use namespace_binding and set_namespace_value.
12884 (redeclaration_error_message): Complain if the declarations come
12885 from different namespaces.
12886 (lookup_tag): On namespace level, look in the BINDING_TYPE.
12887 (lookup_namespace_name): Pass tree_bindings from stack. Remove
12889 (select_decl): New function.
12890 (lookup_name_real): Call it for qualified and unqualified lookup.
12891 Pass tree_bindings from the stack.
12892 If prefer_type is 1, also accept namespaces.
12893 (lookup_function_nonclass): New function.
12894 (init_decl_processing): Set the binding level of the global
12895 namespace to global_binding_level.
12896 Build a proper type list for __builtin_apply.
12897 Initialize std_node to "fake std" if flag_honor_std is set.
12898 Initialize global_type_node.
12899 Allocated bad_alloc in namespace std if flag_honor_std.
12900 (define_function): Set the DECL_CONTEXT to the current_namespace.
12901 (start_decl): A namespace is not considered as a context here. If
12902 the DECL_CONTEXT is a namespace, push the decl.
12903 (cp_finish_decl): Check for namespaces used as initializers.
12904 (grokfndecl): Add namespace parameter. Remove processing of
12906 (grokvardecl): Add namespace parameter.
12907 (grokdeclarator): Process SCOPEs that are namespaces. For
12908 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
12909 (start_function): Check for contexts that are namespaces.
12910 Set context for declarations that have not been pushed.
12911 (store_parm_decls): Check for ::main only.
12912 (finish_function): Likewise.
12913 (start_method): Check for contexts that are namespaces.
12914 (start_method): Remove DECL_CHAIN processing.
12915 * decl2.c (flag_honor_std): Declare.
12916 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
12917 (decl_namespace_list): New static global.
12918 (grok_x_components): Ignore namespaces as type contexts.
12919 (check_classfn): Expect OVERLOAD nodes.
12920 (grokfield): Remove DECL_CHAIN processing.
12921 (finish_file): Call cat_namespace_levels.
12922 (merge_functions): New function.
12923 (ambiguous_decl): Rewrite.
12924 (lookup_using_namespace): Produce tree_bindings.
12925 (qualified_lookup_using_namespace): Likewise.
12926 (set_decl_namespace, decl_namespace, current_decl_namespace,
12927 push_decl_namespace, pop_decl_namespace): New functions.
12928 (arg_lookup): New struct.
12929 (add_function, arg_assoc_namespace, arg_assoc_class,
12930 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
12932 (get_namespace_id, current_namespace_id): Remove.
12933 (do_toplevel_using_decl): Rewrite.
12934 (do_class_using_decl): Complain about namespace qualifiers.
12935 (do_using_directive): Sorry if not on namespace level. Complain
12936 about unknown namespaces.
12937 * error.c (dump_aggr_type): Check for namespace contexts.
12938 * except.c (init_exception_processing): Push terminate into std.
12939 * friend.c (is_friend): A namespace is not a context, here.
12940 * init.c (expand_member_init): Remove DECL_CHAIN processing.
12941 (build_offset_ref): Process OVERLOAD nodes.
12942 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
12943 * lex.c (identifier_type): Loop using OVL_CHAIN.
12944 (see_typename): Set looking_for_typename to 2.
12945 (real_yylex): Likewise.
12946 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
12947 (do_scoped_id): Expect OVERLOAD nodes.
12948 Change calling convention for qualified_lookup_using_namespace.
12949 (build_lang_decl): Don't set in_namespace anymore.
12950 * method.c (typevec_size): New global.
12951 (build_overload_nested_name): Return if global_namespace.
12952 Otherwise, always expect a declaration context.
12953 (build_qualified_name): Likewise.
12954 Make sure we don't write beyond typevec_size.
12955 (build_decl_overload_real): Likewise.
12956 Allocate one extra slot for the namespace.
12957 (hack_identifier): Mark code dead.
12958 Process OVERLOAD and NAMESPACE_DECL nodes.
12959 * parse.y (program): Pop namespaces until in global namespace.
12960 (extdef): In a using-declaration, don't discard the identifier if
12961 there is no declaration.
12962 (left_curly): Ignore type contexts which are namespaces.
12963 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
12965 * pt.c (template_class_depth): Expect types to be namespaces.
12966 (determine_specialization): Simplify by expecting OVERLOAD nodes.
12967 (push_template_decl): Push into namespace level.
12968 Reset ctx if it is a namespace.
12969 Set DECL_CONTEXT to current_namespace if not set already.
12970 Ignore real contexts that are namespaces.
12971 (mangle_class_name_for_template): Skip global_namespace.
12972 Mangle other namespaces as declarations.
12973 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
12974 (lookup_template_class): Push into namespace of context.
12975 If the context is a namespace, set it to global_namespace.
12976 Use id_context for mangling.
12977 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
12978 (tsubst_friend_function): Ignore namespace contexts.
12979 Push into namespace level.
12980 (tsubst): Handle NAMESPACE_DECL nodes.
12981 Remove DECL_CHAIN processing.
12982 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
12983 * ptree.c (print_lang_identifier): Print bindings.
12984 (lang_print_xnode): Print OVERLOAD nodes.
12985 * rtti.c (init_rtti_processing): Push type_info into std.
12986 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
12987 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
12988 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
12989 lookup_fnfields_here): Likewise.
12990 Process all nodes, instead of going through TREE_CHAIN.
12991 * sig.c (build_signature_pointer_or_reference_type): Set context
12992 to global_namespace.
12993 (build_signature_table_constructor): Expect OVERLOAD nodes.
12994 * spew.c (yylex): Save old setting of looking_for_typename.
12995 * tree.c (decl_list_length): Remove.
12996 (binding_init): New function.
12997 (count_functions): Rewrite.
12998 (is_overloaded_fn): Expect OVERLOAD nodes.
12999 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13000 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13001 ovl_member): New functions.
13002 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13003 (type_unknown_p): Likewise.
13004 (require_instantiated_type): Likewise.
13005 (build_component_ref): Declare code dead.
13006 (build_x_function_call): Create and expect OVERLOAD nodes.
13007 (build_function_call_real): Check for ::main only.
13008 (build_unary_op): Likewise. Expect OVERLOAD nodes.
13009 (convert_for_assignment): Check for TREE_LIST before accessing
13011 * decl.c (duplicate_decls): Check for namespace bindings instead
13012 of global bindings.
13013 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13014 lookup_name_current_level, start_decl, xref_tag,
13015 finish_enum): Likewise.
13016 * init.c (build_offset_ref): Likewise.
13017 * search.c (lookup_field): Likewise.
13018 (lookup_fnfields): Likewise.
13019 (dfs_debug_mark): Likewise.
13020 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13021 (poplevel_class, pop_from_top_level): Likewise.
13022 * decl2.c (finish_method): Likewise.
13023 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13024 * decl.c (record_builtin_type): Likewise.
13025 (init_decl_processing, grokfndecl): Likewise.
13026 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13027 (make_lang_type): Likewise.
13028 * parse.y (make_thunk): Likewise.
13029 * pt.c (tsubst): Likewise.
13030 * tree.c (debug_binfo): Likewise.
13031 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13032 tinfo2.cc, inc/new.h: Add std qualifications.
13033 * inc/new: Wrap with namespace std if __HONOR_STD.
13034 * inc/typeinfo: Likewise.
13036 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
13038 * call.c (build_user_type_conversion_1): Handle second_conv
13039 properly for templates.
13041 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
13043 * method.c (build_decl_overload_real): Set TREE_USED flag to
13044 zero for build_type_variants nodes as well.
13046 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
13048 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13050 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
13052 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13053 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13054 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13055 xref.o): Add toplev.h dependencies.
13057 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
13059 * errfn.c (cp_error, cp_warning): Remove declarations for
13060 error and warning respectively.
13062 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13064 * error.c: Convert to using ctype macros defined in system.h.
13065 * method.c: Likewise.
13066 * xref.c: Likewise.
13067 * lex.c: Likewise. Also remove redundant system header stuff.
13069 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
13071 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13072 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13073 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13074 xref.c: Add include of toplev.h.
13076 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13078 * tree.c (perm_manip): Also regenerate the RTL of an extern.
13079 (copy_to_permanent): Use end_temporary_allocation.
13081 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
13083 * init.c (expand_vec_init): The initialization of each array
13084 element is a full-expression.
13086 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
13088 * method.c (build_mangled_name): Add a call to build_type_variant
13089 to get the right type.
13091 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
13093 * Makefile.in: Add .SUFFIXES.
13095 * cp-tree.def: Remove NAMESPACE_DECL.
13097 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
13099 * call.c (build_over_call): Do evaluate arg even if it has empty
13101 * decl.c (start_function): Don't push a member function.
13103 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
13105 * Makefile.in (g++FAQ.info): Put -o option before input file.
13107 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
13109 * gxxint.texi: Add info for squangling codes K and B.
13111 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
13113 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13114 the expression in templates.
13115 (finish_stmt_expr): Likewise.
13117 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
13119 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13121 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
13123 * decl.c (maybe_push_to_top_level): Always clear
13124 current_template_parms and processing_template_decl.
13125 (pushtag): Remove check of current_class_type and some comments,
13126 since maybe_push_to_top_level no longer creates confusion.
13128 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
13130 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13131 (DECL_CLASS_TEMPLATE_P): Likewise.
13132 (DECL_PRIMARY_TEMPLATE): Likewise.
13133 (PRIMARY_TEMPLATE_P): Use it.
13134 (push_template_decl_real): New function.
13135 (redeclare_class_template): Take new template parameters as
13137 (is_specialization_of): New function.
13138 (comp_template_args): Declare.
13139 * decl.c (pushtag): Handle friend template classes.
13140 (xref_tag): Likewise. Use new calling convention for
13141 redeclare_class_template.
13142 * decl2.c (grok_x_components): Handle friend templates.
13143 * friend.c (is_friend): Use is_specialization_of where
13144 appropriate. Deal with friend class templates.
13145 (make_friend_class): Let a class template be friends with itself.
13146 * pt.c (comp_template_args): Remove declaration.
13147 (tsubst_friend_class): New function.
13148 (push_template_decl_real): New function.
13149 (push_template_decl): Use it.
13150 (redeclare_class_template): Adjust for new calling convention.
13151 (comp_template_args): Give it external linkage.
13152 (instantiate_class_type): Use tsubst_friend_class to deal
13153 with friend templates.
13154 * typeck.c (comptypes): Use comp_template_args, rather than
13155 expanding it inline.
13156 * parse.y (component_decl): Handle a nested template type
13157 like other component type declarations.
13159 * pt.c (check_explicit_specialization): Handle overloaded
13160 constructors correctly.
13162 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13163 (lookup_template_class): Use it.
13165 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13167 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
13168 * cp-tree.h: Add WRAPPER support.
13169 * call.c (add_candidate): Split out from add_*_candidate fns.
13170 (build_over_call): Take the candidate instead of function and args.
13171 Enforce access control here. Emit overload warnings here.
13172 (add_warning): New fn.
13173 (joust): Add WARN parm. If not set, call add_warning instead of
13174 printing a warning. Re-enable some warnings.
13175 (tourney): Pass it.
13176 (convert_like): Adjust.
13177 (build_new_op): Adjust.
13178 (build_new_function_call): Adjust.
13179 (build_user_type_conversion_1): Adjust.
13180 (USER_CONV_FN): Adjust.
13181 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13182 build_int_wrapper): New fns.
13184 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
13186 * pt.c (unify): Fix typo in previous change.
13188 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13190 * error.c (dump_type_real): Declare canonical_name.
13192 * typeck.c (comp_target_types): Fix PMFs.
13194 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
13196 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13197 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13200 * pt.c (tsubst): Decrease the template-level of
13201 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
13202 TEMPLATE_PARM_INDEX.
13203 (template_decl_level): New function.
13204 (unify): Make sure to record unifications for template
13205 parameters, even when the parameters exactly match the arguments.
13206 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13207 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
13208 aren't from the level we're currently working on.
13210 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
13212 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13214 * decl2.c (check_member_template): Set DECL_IGNORED for member
13215 class templates, too.
13217 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13219 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13221 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13223 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
13225 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13226 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13227 (init_decl_processing): Handle TI types.
13228 * typeck.c (unsigned_type, signed_type): Handle TI types.
13230 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
13232 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13233 New local added_libraries. Increment count when add library to
13236 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
13238 * cp-tree.h (type_as_string_real): New function.
13239 * pt.c (mangle_class_name_for_template): Use it.
13240 * error.c (dump_aggr_type): Change prototype.
13241 (dump_type_prefix): Likewise.
13242 (dump_type_suffix): Likewise.
13243 (dump_type_real): Convert from dump_type. If desired, the
13244 "canonica" name of a typedef, i.e., the name of the underlying
13245 type, can be printed.
13246 (dump_type): Call dump_type_real.
13248 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
13250 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13252 * typeck.c (comp_target_types): Tweak pedantic case.
13253 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
13254 Return -1 or 1 instead of 1 or 2.
13255 (compparms): Remove STRICT handling.
13256 (convert_for_assignment): Fix handling of pmfs.
13258 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
13260 * typeck.c (comp_target_types): Handle references like pointers.
13261 (comp_target_parms): Note that return code from comp_target_types
13262 can be negative to indicate failure.
13264 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13266 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13267 which requires a working target compiler to build.
13269 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
13271 * tree.c (avoid_overlap): Add prototype.
13273 * spew.c (num_tokens): Add prototype.
13274 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13276 * search.c (dfs_check_overlap): Add prototype.
13277 (dfs_no_overlap_yet): Likewise.
13279 * pt.c (original_template): Add prototype.
13280 (inline_needs_template_parms): Likewise.
13281 (push_inline_template_parms_recursive): Likewise.
13282 (retrieve_specialization, register_specialization): Likewise.
13283 (print_candidates, reduce_template_parm_level): Likewise.
13284 (build_template_decl, mark_template_parm): Likewise.
13285 (tsubst_friend_function, get_bindings_real): Likewise.
13287 * method.c (start_squangling): Add prototype.
13288 (end_squangling, check_ktype, issue_ktype): Likewise.
13289 (build_overloaded_scope_ref, check_btype): Likewise.
13290 (build_mangled_template_parm_index): Likewise.
13292 * lex.c (init_cpp_parse): Add prototype.
13293 (handle_cp_pragma, handle_sysv_pragma): Likewise.
13294 (reduce_cmp, token_cmp): Likewise.
13296 * except.c (call_eh_info): Add prototype.
13297 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13298 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13300 * decl2.c (is_namespace_ancestor): Add prototype.
13301 (namespace_ancestor, add_using_namespace): Likewise.
13302 (ambiguous_decl): Likewise.
13304 * decl.c (indent): Add prototype.
13306 * call.c (add_template_candidate_real): Add prototype.
13308 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13310 * decl2.c (build_expr_from_tree): Just return a PMF.
13312 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
13314 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13315 when doing initializations.
13317 * pt.c (unify): Use comptypes to compare type args.
13319 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
13321 * decl.c (duplicate_decls): Fix check for when it's safe to free
13324 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13327 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
13329 * pt.c (build_template_parm_index): Add prototype.
13331 * search.c (my_tree_cons): Don't clear words outside the
13332 newly allocated node.
13334 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
13336 * lex.c (init_parse): Now returns char* containing the filename.
13338 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
13339 Jeff Law <law@cygnus.com>
13341 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13344 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13346 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13348 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13350 * decl.c (duplicate_decls): Don't warn for redundant decls if
13351 friend: let add_friend take care of it.
13353 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13355 * sig.c (build_signature_pointer_constructor): Don't set
13356 TREE_HAS_CONSTRUCTOR for a signature pointer.
13357 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13358 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13360 * typeck.c (build_unary_op): Only allow taking the address of a
13362 * typeck2.c (digest_init): Simplify.
13363 (store_init_value): Don't pedwarn about using { } for pmfs.
13365 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
13367 * cp-tree.h (start_decl): Update prototype.
13368 * decl.c (start_decl): Like the C version, new parameters
13369 for the attributes. Call cplus_decl_attributes here,
13370 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
13371 (grokdeclarator): Pass NULL for new start_decl arguments.
13372 * pt.c (tsubst_expr): Likewise.
13373 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
13374 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13375 * lex.c (build_lang_decl): Add lang_name_java.
13376 * class.c (push_lang_context): Add lang_name_java.
13377 * method.c (build_mangled_name): Check for is_java_type.
13379 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
13381 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13382 * call.c (build_scoped_method_call): Check for TREE_CODE for
13383 VOID_TYPE instead of type == void_type_node.
13384 (build_method_call): Likewise.
13385 * decl.c (lookup_name_real): Likewise.
13386 (grokdeclarator): Likewise.
13387 (start_decl): Likewise.
13388 (grokparms): Likewise.
13389 (start_function): Likewise.
13390 (finish_function): Likewise.
13391 (start_method): Likewise.
13393 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
13395 * lex.c (finput): New variable.
13396 (init_cpp_parse): Renamed from init_parse.
13397 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
13398 (finish_parse): New function.
13399 * cp-tree.h (init_lex, init_parse): Remove declarations.
13401 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
13403 * call.c (build_call): Still evaluate the actual argument.
13404 * class.c (is_empty_class): Update for -fnew-abi.
13406 * decl2.c: -fnew-abi implies -fsquangle.
13408 * method.c (do_build_assign_ref): Don't do anything to copy
13410 (do_build_copy_constructor): Likewise.
13411 * call.c (build_over_call): Likewise.
13413 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13415 * tree.c (avoid_overlap): Return a value.
13417 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
13419 * method.c (check_btype): Add missing argument to xrealloc.
13420 (check_ktype): Likewise.
13422 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13424 Implement empty base optimization.
13425 * class.c (finish_struct_1): Add vbase fields earlier. Set
13426 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
13427 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13428 (types_overlap_p): New fn.
13429 * tree.c (avoid_overlap): New fn.
13430 (build_base_fields): Use it to avoid overlapping empty bases.
13431 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13433 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13435 Re-implement allocation of base class subobjects.
13436 * tree.c (unshare_base_binfos): New fn.
13437 (layout_basetypes): Use it. Now handles offsets of both virtual and
13438 non-virtual bases, after layout_type.
13439 (layout_vbasetypes): Remove.
13440 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13441 (build_vbase_pointer_fields): Split out from old layout_basetypes.
13442 * class.c (finish_base_struct): Lose offset handling code.
13443 Move nonvdtor warning here. Don't mess with t_binfo anymore.
13444 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
13445 * cp-tree.h: Adjust.
13447 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13449 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13450 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13451 * class.c (duplicate_tag_error): Likewise.
13452 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13453 * tree.c (layout_vbasetypes): Update from layout_record, remove
13454 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13455 (layout_basetypes): Likewise.
13457 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
13459 * class.c, Make sure system.h is included just after config.h.
13460 Delete lingering stdio and errno references too.
13461 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13463 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
13465 * friend.c (is_friend): Fix access control for local classes.
13467 * class.c (is_empty_class): New fn.
13468 * call.c (build_call): Don't pass empty class objects to a function.
13470 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
13472 * call.c (build_over_call): Do name resolution for default
13473 arguments of function templates in the scope of the templates.
13475 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
13477 * call.c: Include system.h. Remove includes, declarations and
13478 defines provided by system.h.
13479 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13480 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13481 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13482 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13483 * typeck2.c, xref.c: Likewise.
13484 * Makefile.in: Dependencies updated as appropriate.
13485 * Make-lang.in: Likewise.
13487 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
13489 * pt.c (fn_type_unification): Allow incomplete unification without
13490 an immediate error message.
13492 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13494 * tree.c (member_p): New fn.
13495 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13496 initializing class members.
13498 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13499 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13501 * call.c (build_method_call): Handle non-scoped destructors, too.
13502 * pt.c (tsubst_copy): Likewise.
13504 * pt.c (print_template_context): Split out...
13505 (push_tinst_level): ...from here.
13507 * friend.c (is_friend): Don't pass a type to decl_function_context.
13509 * typeck.c (convert_for_initialization): Always hand off
13510 conversions to class type.
13512 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13514 * friend.c (is_friend): Local classes have the same access as the
13515 enclosing function.
13517 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
13519 * typeck.c (expand_target_expr): Delete dead function.
13521 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13523 * repo.c (save_string): Delete dead function.
13525 * method.c (thunk_printable_name): Delete dead function.
13527 * lex.c (yynextch): Delete dead function.
13529 * expr.c (tree_extract_aggr_init): #if 0 out.
13531 * except.c (do_unwind): Delete dead function.
13532 (easy_expand_asm): Likewise.
13534 * cvt.c (build_conversion_type_1): Delete dead function.
13536 * cp-tree.h (push_expression_obstack): Declare.
13538 * call.c (source_type): #if 0 out.
13540 * class.c (alter_access): Remove unused label. Add braces
13541 around empty else clause.
13543 * lex.c (yyprint): Fix argument to printf.
13545 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
13547 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13549 * pt.c (instantiate_class_template): Make sure template
13550 arguments are permanent.
13551 * init.c (resolve_offset_ref): Don't go looking around in
13554 * semantics.c: Add routines to handle expressions, and some
13555 declaration processing.
13556 * parse.y: Use them.
13557 (current_class_depth): Move declaration to cp-tree.h.
13558 * parse.c: Regenerated.
13559 * cp-tree.h: Use them.
13560 (current_class_depth): Declare.
13561 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13563 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
13565 * error.c (dump_decl): Be a bit more explicit with template
13566 type arguments, when verbose.
13568 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13570 * inc/exception: Reorder closing braces.
13572 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
13574 * pt.c (redeclare_class_template): New function.
13575 * cp_tree.h (redeclare_class_template): Declare it.
13576 * decl.c (xref_tag): Use it.
13578 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
13580 * call.c (build_over_call): Check IS_AGGR_TYPE, not
13581 TYPE_LANG_SPECIFIC.
13582 * typeck.c (convert_arguments): Likewise.
13584 * decl.c (grokdeclarator): Remove const and volatile from type after
13585 setting constp and volatilep.
13587 * class.c (finish_struct_1): Don't warn about bool bitfield larger
13590 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
13592 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13594 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
13596 * call.c (build_object_call): Complain about ambiguous operator(),
13597 rather that crashing.
13598 (build_new_op): Likewise.
13599 (build_op_delete_call): Likewise.
13601 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
13603 * cvt.c (perform_qualification_conversions): Use comp_target_types
13604 instead of comp_ptr_ttypes.
13606 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
13608 * cp-tree.h (enforce_access): Declare.
13609 * call.c (enforce_access): Make it extern, not static.
13610 * class.c (alter_access): Use enforce_access; modify code for ISO
13611 compliance, rather than ARM rules.
13613 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13615 * cp-tree.h: Fix typo.
13617 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13619 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13620 if (aggregate_value_p (type)).
13622 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13624 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
13626 * tree.c (mapcar): When dealing with a DECL, use it's constant
13628 * pt.c (lookup_template_class): Don't mangle the names of template
13629 classes whose arguments are unknown.
13631 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13633 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13635 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13637 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
13639 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13640 boolean_type_node to 1.
13642 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
13644 * error.c (dump_expr): Remove unused variable `l'.
13646 * pt.c (for_each_template_parm): New function, created by
13647 converting uses_template_parms.
13648 (tree_fn_t): New typedef.
13649 (uses_template_parms): Use it.
13650 (mark_template_parm): New function.
13651 (push_template_decl): Check that the argument list of a partial
13652 specialization uses all the template parameters.
13654 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13655 with it; we might want it for debugging.
13656 * cp-tree.h (type_unification): Change interface.
13657 * class.c (finish_struct_1): Skip nested template types, just like
13658 ordinary nested types.
13659 (instantiate_type): Use new interface to type_unification.
13660 * lex.c (init_lex): Add __sz as opname for sizeof.
13661 * method.c (build_overload_scope_ref): New function.
13662 (build_overload_int): Handle complex expressions. Set
13663 numeric_output_need_bar if necessary.
13664 (build_overload_value): Handle non-PARM_DECL nodes; this
13665 routine is now used by build_overload_int. Remove some
13666 assignments to numeric_output_need_bar. Use
13667 build_overload_scope_ref.
13668 (build_qualified_name): Note that some template mangled names end
13669 with digits, and set numeric_output_need_bar appropriately. Use
13670 build_underscore_int.
13671 * pt.c (unify): Change interface.
13672 (type_unification_real): Likewise.
13673 (determine_specialization): Use new interfaces.
13674 (tsubst): Deal gracefully with situations in which the argument
13675 vector is not fully filled.
13676 (fn_type_unification): Use new interfaces.
13677 (type_unification): Likewise. Remove NOP_EXPR hack.
13678 (type_unification_real): Likewise.
13679 (unify): Likewise. Deal with unification of complex expressions.
13681 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13683 * pt.c (complete_template_args): Initialize skip properly.
13685 * decl.c (make_typename_type): Revert.
13686 (make_implicit_typename): Remove.
13687 (lookup_name_real): Don't call it. Call lookup_field if we see a
13688 TYPE_DECL from a template base.
13689 * search.c (lookup_field): Do implicit typename stuff.
13691 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
13692 Geoff Noer <noer@cygnus.com>
13694 * Makefile.in: Various fixes for building cygwin32 native toolchains.
13695 * Make-lang.in: Likewise.
13697 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13699 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13701 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
13703 * decl.c (make_implicit_typename): Rewrite removed code.
13704 (make_typename_type): Call it if the type we look up comes from
13705 a base that uses template parms.
13707 * pt.c (complete_template_args): Rewrite.
13708 (tsubst, FUNCTION_DECL): Use it.
13710 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
13712 * semantics.c (finish_asm_stmt): Fix combine strings. Call
13713 c_expand_asm_operands () if output_operands, input_operands or
13714 clobbers is not NULL_TREE.
13716 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13718 * pt.c (complete_template_args): New function.
13719 (get_bindings): Deal with specializations of function templates
13720 with return type containing parameters from outer class
13722 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13723 substitute arguments and compose a new type.
13725 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
13727 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13730 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
13732 * decl.c (make_implicit_typename): Lose useless code.
13734 * call.c (standard_conversion): Handle A* -> const A* properly.
13736 * pt.c (get_bindings_real): Rename from get_bindings. Add
13737 check_rettype parm.
13738 (get_bindings): Pass 1.
13739 (get_bindings_overload): Pass 0.
13741 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
13743 * pt.c (check_explicit_specialization): When reverting a static
13744 member function, also remove the `this' parameter from
13745 last_function_parms.
13747 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13749 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13750 a function context.
13752 * decl.c (store_bindings): Use free_binding_vecs.
13753 (pop_from_top_level): Likewise.
13755 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
13757 * decl.c (make_implicit_typename): Only change the type of a
13760 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
13762 * semantics.c: New file, containing routines to perform the
13763 semantic phase of parsing.
13765 * pt.c (tsubst_expr): Likewise.
13766 * cp-tree.h: Declare the various functions in semantics.c.
13767 Provide macros to access _STMT tree nodes.
13768 * cp-tree.def: Add ASM_STMT tree node.
13769 * Makefile.in, Make-lang.in: Add dependencies on and for
13772 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
13774 * pt.c (push_template_decl): Only check primary templates.
13776 * pt.c (check_explicit_specialization): Complain about default args
13777 in explicit specialization.
13779 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13780 constructor_declarator.
13782 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
13784 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13785 has no overloaded operator ->.
13787 * call.c (build_field_call): Don't crash when presented with a
13788 field that is actually a nested type.
13790 * decl.c (pushtag): Deal with friend class injection in local
13793 * call.c (build_object_call): Don't crash if OBJ is a
13794 pointer-to-member-function.
13796 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13798 * pt.c (push_template_decl): Complain about template with C linkage,
13799 anonymous template class.
13801 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
13803 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13804 * search.c: Likewise.
13806 * lex.c (do_pending_defargs): Only call
13807 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13809 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13811 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
13813 * parse.y: Deal with CONSTRUCTORS in new_initializers.
13815 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
13817 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13818 closely mimics the behavior in parse.y.
13819 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13820 into a compound statement.
13822 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
13824 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13825 * pt.c (inline_needs_template_parms): New fn.
13826 (original_template): New fn.
13827 (push_inline_template_parms_recursive): New fn.
13828 (maybe_begin_member_template_processing): Use them.
13829 (maybe_end_member_template_processing): Likewise.
13830 (is_member_or_friend_template): Rename to is_member_template.
13831 Member functions of local classes are never member templates.
13833 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13835 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13836 added in the class scope to catch redefinition error.
13838 * pt.c (reduce_template_parm_level): Also copy
13839 the DECL_TEMPLATE_PARMS field.
13841 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
13843 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13844 reduced-level template type parameter.
13846 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
13848 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13849 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13850 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13851 * decl.c (duplicate_decls): Propagate it.
13852 * typeck2.c (abstract_virtuals_error): Use two loops to emit
13853 abstract virtual functions and virtual functions which need a
13854 final overrider separately.
13856 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
13858 * lang-specs.h: Properly put brackets around array elements in
13861 * typeck.c (build_binary_op_nodefault): Correctly place parens around
13862 && and || in expression.
13864 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
13866 * call.c (default_parm_conversions): Remove prototype definition.
13867 (build_method_call): Remove unused variable result.
13869 * cvt.c (ocp_convert): Remove unused variable conversion.
13871 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13873 * except.c (do_unwind): #if 0 definition of unused variables fcall
13876 * expr.c (extract_scalar_init): #if 0 prototype and function
13879 * init.c (expand_aggr_init_1): Remove unused variable init_type.
13880 (build_new_1): Remove unused variable t.
13882 * pt.c (instantiate_class_template): Remove unused variable newtag;
13883 cast called function return value to void.
13884 (do_decl_instantiation): Remove unused variables name and fn.
13886 * tree.c (get_type_decl): Add default return to shut up compiler from
13887 complaining control reaches end of non-void function.
13889 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13891 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
13893 * call.c (default_parm_conversions): Remove prototype definition.
13894 (build_method_call): Remove unused variable result.
13895 (build_over_call): Add default case in enumeration switch.
13897 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
13899 * decl2.c (lang_decode_option): Change j's type to size_t.
13901 * tree.c (layout_vbasetypes): record_align and desired_align are of
13902 type unsigned int; const_size and nonvirtual_const_size likewise.
13904 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
13906 * parse.y (new_initializer): Make sure all initializers are
13909 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
13911 * decl2.c (import_export_decl): Mark tinfo functions for
13912 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
13914 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
13916 * method.c: Fix typo.
13918 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13920 * method.c: Include "system.h" to get stdlib.h, stdio.h,
13921 ctype.h, string.h, etc.
13922 (issue_nrepeats): Add default case in enumeration switch.
13923 (check_btype): Likewise.
13924 (process_overload_item): Likewise.
13926 * Makefile.in (method.o): Depend on system.h.
13928 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13930 * lex.c (do_scoped_id): Fix parenthesizing.
13932 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
13934 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
13935 FLAG_RTTI is unset, initialize type info machinery and continue
13936 with FLAG_RTTI enabled.
13937 (get_typeid): Likewise.
13939 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
13941 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
13944 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
13946 * pt.c (finish_member_template_decl): Deal more gracefully with
13947 invalid declarations.
13949 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
13951 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
13952 cp-tree.h: Clean up more old overloading code, old RTTI code, and
13953 some formatting quirks.
13955 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
13956 method.c, pt.c, ptree.c, typeck.c: Remove support for
13957 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
13959 * Makefile.in: Adjust.
13961 * pt.c (unify): Don't allow reduced cv-quals when strict.
13963 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
13964 *type_unification* and unify.
13966 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
13968 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
13969 (nested_name_specifier): And add it before this use.
13970 (typename_sub0): And this use. Also add use without the keyword.
13971 (typename_sub1): Likewise.
13972 * pt.c (instantiate_class_template): Don't actually instantiate
13973 anything if our type uses template parms.
13975 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
13977 * decl.c (start_function): Don't call temporary_allocation for a
13980 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13982 * pt.c (instantiate_class_template): Don't mess with friends if
13983 our type uses template parms.
13985 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
13987 * parse.y (nested_name_specifier): Use explicit_template_type.
13988 (typename_sub): Allow a template_type, an explicit_template_type,
13989 or an implicit template type at the end.
13990 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
13991 * decl.c (make_typename_type): Handle template-id where the name
13992 is a TEMPLATE_DECL.
13993 * call.c (build_scoped_method_call): Handle member template
13995 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
13996 destructor is represented by the type.
13998 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
13999 * parse.y (nested_name_specifier): Add 'template' case.
14000 (explicit_template_type): New rule.
14001 (typename_sub): Use it.
14002 * decl.c (make_typename_type): Handle getting a template-id for NAME.
14003 * pt.c (tsubst): Likewise.
14005 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
14007 * pt.c (add_to_template_args): Fix thinko.
14008 (instantiate_class_template): Call it later.
14010 * pt.c (get_class_bindings): Add outer_args parm.
14011 (most_specialized_class): Likewise.
14012 (instantiate_class_template): Pass it.
14013 (more_specialized_class): Likewise.
14014 (lookup_template_class): Get context from template if none
14016 (finish_member_template_decl): Don't do anything with a
14017 partial specialization.
14018 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14020 * class.c (finish_struct): Member class templates have already been
14021 checked for name clashes.
14022 * decl.c (pushdecl_with_scope): Handle pushing at class level.
14024 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14026 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14027 (tsubst, *_PARM): Support multiple levels of template classes.
14028 (instantiate_class_template): Look up the pattern from the
14030 (lookup_template_class): Handle getting a template for d1.
14031 (push_template_decl): Correct setting of 'primary'.
14032 (reduce_template_parm_level): Add 'levels' parm.
14033 (finish_member_template_decl): Support member class templates.
14034 (template_class_depth): Handle multiple levels.
14035 * parse.y (component_decl_1, fn.def2): Remove member template case.
14036 (component_decl): Add member template cases.
14037 * decl2.c (check_member_template): We now handle member template
14039 * decl.c (pushtag): Handle member templates.
14040 * method.c (do_inline_function_hair): Don't touch
14041 IDENTIFIER_GLOBAL_VALUE.
14042 * init.c (build_offset_ref): If name isn't an identifier, just
14044 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14046 * typeck.c (get_delta_difference): Do adjust for conversions to
14047 and from virtual base.
14049 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
14051 * typeck.c (get_delta_difference): Give hard error for conversion
14054 * cp-tree.h: Tweak formatting.
14056 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
14058 * decl.c (push_namespace): Handle redeclaration error.
14060 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14061 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14062 (NAMESPACE_BINDING): New macro.
14063 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14066 * pt.c (push_template_decl): Use innermost_args.
14068 * decl.c (get_unique_name): Tweak from earlier in the name.
14070 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14072 * cp-tree.def: Add CPLUS_BINDING node.
14073 * cp-tree.h (tree_binding): New struct.
14074 (BINDING_SCOPE, BINDING_VALUE): New macros.
14075 (current_namespace, global_namespace): Declare extern.
14076 (struct lang_decl_flags): New field in_namespace.
14077 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14078 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14079 (TREE_INDIRECT_USING): New macro.
14080 * decl2.c (current_namespace, global_namespace): Declare. The
14081 value is a NAMESPACE_DECL now, not a TREE_LIST.
14082 (is_namespace_ancestor, namespace_ancestor): New static functions.
14083 (add_using_namespace, ambiguous_decl): Likewise.
14084 (lookup_using_namespace): New support function for lookup_name.
14085 (qualified_lookup_using_namespace): New support function for
14086 do_scoped_id and lookup_namespace_name.
14087 (get_namespace_id): Mark as obsolete.
14088 (current_namespace_id): Likewise.
14089 (do_namespace_alias): Implement.
14090 (do_using_directive): Implement as call to add_using_namespace.
14091 * decl.c (binding_for_name): New function.
14092 (push_namespace, pop_namespace): Implement.
14093 (push_decl): Don't install a FUNCTION_DECL in the global branch.
14094 (lookup_namespace_name): Implement using qualified lookup.
14095 (lookup_name_real): For global scoping, lookup in
14096 global_namespace. For namespace scoping, lookup in given
14097 namespace. For unscoped lookup, iterate over namespace,
14098 considering using directives.
14099 (init_decl_processing): Initialize global_namespace.
14100 (grokvardecl): Build assembler name as static name for globals.
14101 (grokdeclarator): Remove old namespace mangling.
14102 (xref_tag): When installing a global binding for the
14103 tag, make sure we have an identifier.
14104 * method.c (build_overload_nested_name): Mangle namespaces.
14105 (build_qualified_name): Likewise.
14106 (build_decl_overload_real): Likewise.
14107 * lex.c (build_lang_decl): Set namespace for new declaration to
14109 (do_scoped_id): Find global names in global or current
14110 namespace, or using qualified namespace lookup, depending on
14112 * init.c (build_member_call): When scope is namespace, use
14113 build_x_function_call instead.
14114 (build_offset_ref): When scope is namespace, collapse processing
14115 to lookup_namespace_name instead.
14116 * error.c (dump_decl): Support NAMESPACE_DECL.
14117 * decl.c (pushdecl): Bind globals to current namespace.
14118 (push_overloaded_decl): Likewise.
14119 (lookup_tag): Likewise.
14120 (lookup_name_current_level): Likewise.
14121 (xref_tag): Likewise.
14122 (start_function): Likewise.
14123 * lex.c (do_identifier): Likewise.
14124 (identifier_typedecl_value): Likewise.
14125 (real_yylex): Likewise.
14126 * method.c (do_inline_function_hair): Likewise.
14127 * parse.y (unscoped): Likewise.
14128 * pt.c (check_explicit_specialization): Likewise.
14129 (lookup_template_class): Likewise.
14130 * rtti.c (call_void_fn): Likewise.
14131 * sig.c (build_sigtable): Likewise.
14132 * ptree.c (lang_print_xnode): New function.
14134 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
14136 * pt.c (instantiate_class_template): Don't instantiate if pedantic
14137 and the args use template parms.
14139 * pt.c (push_tinst_level): If the instantiation uses template parms,
14141 * decl.c (xref_basetypes): Do call complete_type for basetypes
14142 that involve template parameters.
14144 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
14146 * typeck2.c (process_init_constructor): Fix labeled init check.
14148 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
14150 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14151 argument to tsubst and friends.
14153 * pt.c (tsubst, FUNCTION_DECL): Tidy.
14155 * typeck.c (build_x_function_call): Handle static member function
14156 templates like non-templates. Handle friend templates like normal
14157 function templates.
14158 * pt.c (tsubst, *_PARM): Don't use orig_level.
14159 (get_bindings): Don't call add_to_template_args.
14160 (instantiate_template): Likewise.
14161 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14162 * ptree.c (print_lang_type): Print index/level for template parms.
14164 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
14166 * Make-lang.in (cc1plus): Note that cc1plus depends on
14167 cp/cp-tree.h and cp/cp-tree.def.
14169 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14170 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14171 position in a template parameter list.
14172 * cp-tree.h (template_parm_index): New structure, used as the tree
14173 structure for a TEMPLATE_PARM_INDEX.
14174 (TEMPLATE_PARM_IDX): New macro.
14175 (TEMPLATE_PARM_LEVEL): Likewise.
14176 (TEMPLATE_PARM_DESCENDANTS): Likewise.
14177 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14178 (TEMPLATE_PARM_DECL): Likewise.
14179 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14180 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14181 (TEMPLATE_TYPE_DECL): Likewise.
14182 (TEMPLATE_CONST_IDX): Remove.
14183 (TEMPLATE_CONST_LEVEL): Likewise.
14184 (TEMPLATE_CONST_SET_INFO): Likewise.
14185 (TEMPLATE_TYPE_SET_INFO): Likewise.
14186 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14188 (TEMPLATE_TYPE_LEVEL): Likewise.
14189 * decl.c (decls_match): Call comp_template_parms, rather than
14190 expanding it inline.
14191 (duplicate_decls): If two template declarations are being merged,
14192 then their TEMPLATE_INFOs should be merged as well.
14193 (grokfndecl): Save template-id information when declaring a friend
14194 with explicit template arguments. Pass arguments to
14195 check_explicit_specialization via correct convention; at some
14196 point check_explicit_specialization changed, but these call-sites
14198 (grokdeclarator): Tidy up slightly.
14199 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
14200 two template functions with the same DECL_ASSEMBLER_NAME the same,
14201 since the names are not yet mangled.
14202 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14203 TEMPLATE_CONST_PARM.
14204 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
14205 decl for a non-type parameter, rather than printing `<tparm ...>'.
14206 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14207 (do_friend): Deal with template friends.
14208 * lex.c (do_pending_inlines): Call
14209 maybe_begin_member_template_processing, rather than
14210 conditionally calling begin_member_template_processing.
14211 (process_next_inline): Likewise. Call
14212 maybe_end_member_template_processing, rather than
14213 conditionally calling end_member_template_processing.
14214 (do_pending_defargs): Likewise.
14215 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14216 TEMPLATE_CONST_PARM.
14217 * method.c (build_mangled_template_parm_index): New function.
14218 (build_overload_value): Use it.
14219 (build_overload_name): Likewise.
14220 * pt.c (finish_member_template_decl): Allow friend declarations.
14221 (template_class_depth): New function.
14222 (is_member_template): Rename, and modify, to become...
14223 (is_member_or_friend_template): New function.
14224 (end_member_template_processing): Rename, and modify, to become...
14225 (maybe_end_member_template_processing).
14226 (build_template_parm_index): New function.
14227 (reduce_template_parm_level): New function.
14228 (process_template_parm): Modify to use build_template_parm_index.
14229 (push_template_decl): Deal with friend templates.
14230 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14231 TEMPLATE_CONST_PARM.
14232 (tsubst_friend_function): New function.
14233 (instantiate_class_template): Generate the DECL_FRIENDLIST
14234 for a new instantiation by using tsubst_friend_function rather
14236 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14237 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14238 appropriate new macros. Use reduce_template_parm_level to
14239 generate lower-level template parameters. Handle tsubst'ing into
14240 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
14241 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14242 templates. Similarly for the template parameters for a new
14244 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
14245 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
14246 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14247 (get_bindings): Call add_to_template_args if necessary.
14248 (instantiate_decl): Handle instantiations of friend templates.
14249 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14250 TEMPLATE_TYPE_PARM as a list of fields; it's not!
14251 * spew.c (yylex): Do a little manual constant propagation to
14254 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
14256 * error.c: Include sys/types.h.
14258 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
14260 * method.c (build_mangled_name): Start CPP directives in column zero.
14262 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
14264 * typeck2.c (process_init_constructor): Sorry about non-trivial
14265 labeled initializers.
14266 * parse.y (initlist): Re-enable labeled initializers.
14268 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14270 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14271 all callers changed. Rely on the new parameter instead of arg
14272 being a TREE_LIST when determine whether we are working inside
14273 template template parameter. Clean up is_type test.
14275 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
14277 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14278 * typeck2.c (initializer_constant_valid_p): Allow conversions
14279 between pointers and references.
14281 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
14283 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14284 if pedantic || warn_pointer_arith.
14286 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14288 * pt.c (unify): Handle TEMPLATE_DECL.
14290 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
14292 * cp-tree.h (strip_attrs): Remove decl.
14294 1998-02-18 Doug Evans <devans@cygnus.com>
14296 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14297 Update olddecl's attributes too.
14298 (strip_attrs): Remove function.
14299 * typeck.c (common_type): Call merge_machine_type_attributes.
14301 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
14303 * parse.y (initdcl0_innards): New grammar symbol.
14304 (nomods_initdecls, nomods_initdcl0): Change type from itype to
14305 none, since the resulting value is never used.
14306 (parse_decl): New function.
14307 (datadef): Remove redundant actions.
14308 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14309 * parse.c: Regenerated.
14311 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
14313 * parse.y (simple_stmt): Use getdecls() to check for decl.
14315 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
14317 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14319 (c++.install-common): Install c++filt properly as native or as cross
14321 (c++.uninstall): Add c++filt.
14323 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14325 * call.c (standard_conversion): Fix multi-level ptr conversions.
14327 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
14329 * init.c (build_new): Propagate error_mark_node up.
14331 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
14333 * parse.y (simple_stmt): If the condition isn't a declaration,
14334 start the controlled block after the test.
14336 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14338 * call.c (build_over_call): Convert builtin abs, labs and fabs to
14340 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14343 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14345 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14347 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
14349 * cp-tree.h: Add access_protected_virtual_node.
14350 * class.c (init_class_processing): Initialize it.
14351 * decl.c (xref_basetypes): Use it.
14352 * parse.y (base_class_access_list): Likewise.
14354 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14355 (c++.install-common): Install c++filt.
14357 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14359 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14361 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
14363 * call.c (reference_binding): Use comptypes when comparing
14364 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14366 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
14368 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14369 (really_overloaded_fn): Move check here from is_overloaded_fn.
14370 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14372 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
14374 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14377 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
14379 * cp-tree.h (push_template_decl): Return the decl passed in, or an
14380 equivalent duplicate.
14381 * decl.c (pushtag): Use the return value from push_template_decl.
14382 (duplicate_decls): When duplicating a template declaration, merge
14383 the DECL_TEMPLATE_RESULTs as well.
14384 (make_implicit_typename): Don't try to dive into typename types to
14385 find a context for making a new implicit typename.
14386 (start_decl): Use the return value from push_template_decl.
14387 (grokdeclarator): Complain about declarations list `const operator
14388 int'. Since we don't correctly handle in-class initializations of
14389 non-static data members, complain about this (now illegal)
14390 practice. Issue an error for initializations of non-const statics
14391 since that is illegal as well, and since we don't handle that case
14393 (start_function): Use the return value from push_template_decl.
14394 (start_method): Likewise.
14395 * decl2.c (grokfield): Likewise. Since the change to
14396 grokdeclarator ensures that all initialized fields are in fact
14397 static, remove a redundant test for TREE_PUBLIC.
14398 * parse.y (initlist): Disable labeled initializers since they do
14399 not work as per the documentation, and since they do not use the
14400 same syntax as the C front end.
14401 * pt.c (push_template_decl): Return the decl passed in, or an
14402 equivalent duplicate.
14403 (lookup_template_class): When searching in a nested context,
14404 use the right arguments.
14405 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14406 * typeck.c (build_component_ref): Assign the correct type to the
14407 result of build_vfn_ref.
14409 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
14411 * pt.c (convert_nontype_argument): Fix typo.
14412 (check_explicit_specialization): Allow old-style specialization
14413 of class template members.
14415 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14416 Manfred Hollstein <manfred@s-direktnet.de>
14418 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14419 when deciding to override DECL_ASSEMBLER_NAME.
14421 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
14423 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14424 * cp-tree.h (flag_do_squangling): Add declaration.
14425 * lang-options.h: Add -fsquangle and -fno-squangle.
14426 * method.c: Add macros and static variables for squangling.
14427 (build_overload_name): Rename to build_mangled_name, add logic for B
14428 compression, and split into process_modifiers and
14429 process_overload_item.
14430 (process_modifiers): New function, to handle constant, reference,
14432 (process_overload_item): New function, handles issue of type codes.
14433 (build_overload_name): New function, start squangling and call
14434 build_mangled_name.
14435 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14436 (start_squangling): New function to initialize squangling structs.
14437 (end_squangling): New function to destroy squangling structs.
14438 (nrepeats): Rename variable to Nrepeats.
14439 (issue_nrepeats): New function for issuing 'n' type repeats.
14440 (check_ktype): New function to check for type K name compression.
14441 (build_overload_nested_name): Add a check for K name compression.
14442 (build_qualified_name): Add a check for K name compression and don't
14443 use DECL_ASSEMBLER_NAME when squangling is on.
14444 (check_btype): New function, checks for B type compression.
14445 (build_static_name, build_decl_overload_real): Initiate squangling.
14446 (build_typename_overload, build_overload_with_type): Initiate
14449 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
14451 * method.c (make_thunk): Avoid name buffer overflow.
14453 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14455 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14456 don't define them yet.
14458 * parse.y (nomods_initdcl0): Add constructor_declarator case.
14460 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14462 * config-lang.in (diff_excludes): Use basename only.
14464 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
14466 * tinfo2.cc: Add tinfo for signed char.
14468 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
14470 * search.c (compute_access): Handle protected constructors in derived
14471 classes as accessible.
14473 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14475 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14476 Call convert_from_reference sooner.
14478 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
14480 * cvt.c (ocp_convert): Obtain the constant values from constant
14481 decls even if the destination type is the same as the type of the
14484 * decl2.c (finish_file): Make sure that static inlines with
14485 definitions are not marked DECL_EXTERNAL before returning.
14487 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
14489 * decl.c: Lose arg_looking_for_template.
14490 (lookup_name_real): Likewise.
14491 * parse.y: Lose processing_template_arg, template_arg1.
14492 (primary): Likewise.
14493 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14495 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14497 * error.c (dump_decl): Fix type of default arguments for template
14498 template parameters and nontype template parameters.
14499 * parse.y (template_parm): Handle invalid default template
14500 template arguments here.
14502 * parse.y (template_parm): Use template_arg instead of PTYPENAME
14503 for default template template argument.
14504 * pt.c (coerce_template_parms): Merge default template argument
14505 codes. Can treat RECORD_TYPE as template name if it is implicitly
14506 created. Fix argument index in error message.
14507 * typeck.c (comptypes): Merge template argument comparison codes in
14508 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14510 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
14512 * lex.c (file_name_nondirectory): Also check for '/'.
14514 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
14516 * parse.y (primary): Deal with statement-expressions in
14518 * pt.c (tsubst_copy): Handle BIND_EXPR.
14519 * tree.c (mapcar): Likewise.
14521 * call.c (add_template_candidate_real): Pass extra parameter to
14522 fn_type_unification.
14523 * cp-tree.h (fn_type_unification): Add parameter.
14524 * pt.c (fn_type_unification): Add additional parameter to deal with
14525 static member functions.
14526 (get_bindings): Deal with static member functions.
14528 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14529 (revert_static_member_fn): Declare.
14530 * decl.c (revert_static_member_fn): Remove declaration. Change
14531 linkage from internal to external.
14532 (cp_finish_decl): Deal with virtual functions in classes local to
14533 template functions.
14534 * decl2.c (finish_file): Don't forget to emit increment/decrement
14535 expressions in initializers for file-scope variables.
14536 * parse.y (typename_sub2): If the typename doesn't names a
14537 template, rather than a type, issue an error message.
14538 * pt.c (check_explicit_specialization): Handle specializations of
14539 static member functions.
14540 (coerce_template_parms): Handle offset references to lists of
14542 * search.c (note_debug_info_needed): Don't crash when handed a
14543 type which is being defined.
14544 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14545 that can happen with some illegal code.
14547 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14549 * call.c (user_harshness): Initialize `code' to 0.
14550 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14551 (null_ptr_cst_p): Add parentheses around && within ||.
14552 (standard_conversion): Likewise.
14553 (z_candidate): Likewise.
14554 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14555 (build_object_call): Likewise for `mem_args'.
14556 (build_new_op): Likewise for `mem_arglist'. Add `return' from
14557 default case in enumeration switch.
14559 * class.c (build_vtable_entry): Add explicit braces to avoid
14561 (build_class_init_list): Likewise.
14562 (finish_struct_1): Initialize `width' to 0.
14563 (instantiate_type): Initialize `name' to NULL_TREE. Add
14564 explicit braces to avoid ambiguous `else'.
14566 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14569 * decl.c (grok_reference_init): Eliminate unused parameter, all
14571 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14572 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14573 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14574 (grokdeclarator): Add parentheses around && within ||. Add
14575 explicit braces to avoid ambiguous `else'.
14576 (grokparms): Initialize `type' to NULL_TREE.
14577 (xref_tag): Remove unused label `just_return'.
14578 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14579 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14580 (hack_incomplete_structures): Add parentheses around assignment
14581 used as truth value.
14583 * decl2.c (coerce_delete_type): Hide definition of `e3'.
14585 * error.c: Include <stdlib.h>.
14586 (dump_expr): Change the type of `i' to size_t. Remove unused
14589 * except.c (init_exception_processing): Remove unused variable `d'.
14590 (expand_throw): Likewise for `label'.
14592 * friend.c (add_friends): Add explicit braces to avoid ambiguous
14595 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14596 (sort_base_init): Likewise for `binfo'.
14597 (expand_member_init): Likewise for `rval'.
14598 (build_member_call): Add parentheses around assignment used as
14600 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14601 (build_new): Initialize `nelts' to NULL_TREE. Initialize
14602 `old_immediate_size_expand' to 0.
14603 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14604 (build_vec_delete_1): Remove unused variable `block'.
14605 (expand_vec_init): Initialize `itype' to NULL_TREE.
14607 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
14608 declaration of `index' and `rindex' with autoconf macros.
14609 (reinit_parse_for_expr): Remove unused variables
14610 `look_for_semicolon' and `look_for_lbrac'.
14611 (cons_up_default_function): Initialize `args' to NULL_TREE.
14612 (readescape): Initialize `firstdig' to 0.
14613 (real_yylex): Add parentheses around assignment used as truth value.
14615 * method.c: Include <strings.h> if we don't have <string.h>.
14616 Protect declaration of `index' with autoconf macro.
14618 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14619 Initialize `type' to NULL_TREE.
14620 (structsp): Remove unused variable `id'.
14622 * pt.c (coerce_template_parms): Add explicit braces to avoid
14624 (lookup_template_class): Initialize `template' to NULL_TREE.
14625 (instantiate_class_template): Remove unused variable `name' and `e'.
14626 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
14627 (do_poplevel): Initialize `saved_warn_unused' to 0.
14628 (type_unification): Remove unused varable `parm'.
14629 (unify): Likewise for `j'.
14631 * repo.c (init_repo): Add parentheses around assignment used as
14633 (finish_repo): Remove unused varable `p'.
14635 * search.c (get_binfo): Initialize `type' to NULL_TREE.
14636 (get_base_distance): Likewise.
14637 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14638 and `new_v' to NULL_TREE.
14639 (lookup_fnfields): Likewise for `rval_binfo_h'.
14640 (breadth_first_search): Add parentheses around assignment used as
14642 (get_template_base): Initialize `type' to NULL_TREE.
14644 * sig.c (append_signature_fields): Initialize `last_mfptr' to
14646 (build_signature_table_constructor): Likewise for
14647 `last_rhs_field', `pfn' and `vt_off'.
14648 (build_sigtable): Likewise for `init'.
14650 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14651 (propagate_binfo_offsets): Likewise for `delta'.
14652 (hash_tree_cons): Initialize hashcode to 0.
14653 (can_free): Likewise for `size'.
14654 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14656 * typeck.c (convert_sequence): Hide prototype.
14657 (common_type): Add explicit braces to avoid ambiguous `else'.
14658 (comp_target_types): Likewise.
14659 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14660 (build_function_call_real): Add explicit braces to avoid ambiguous
14662 (convert_arguments): Initialize `called_thing' to 0.
14663 (convert_for_initialization): Initialize `savew' and `savee' to 0.
14665 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14666 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14667 (build_x_arrow): Likewise for `last_rval'.
14669 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14671 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
14673 * decl.c (init_decl_processing): Use set_sizetype.
14674 * decl2.c (sizetype): Don't declare.
14675 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14676 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14677 (build_component_addr, unary_complex_lvalue): Likewise.
14678 * rtti.c (expand_class_desc): Likewise.
14679 * class.c (get_vfield_offset): Likewise.
14681 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
14683 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14684 early to avoid bogus error. Handle overloaded function
14685 names provided as template arguments correctly.
14686 (coerce_template_parms): Don't mishandle overloaded functions when
14687 dealing with template template parameters.
14688 (lookup_template_class): Issue an error message, rather than
14689 crashing, when the TYPE_DECL provided is not a template type.
14691 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
14693 * class.c (instantiate_type): Don't just return a known type if
14696 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
14698 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14699 since that code could never be reached.
14701 * error.c (dump_decl): Avoid aborting in the midst of printing an
14702 error message about an illegal template declaration.
14704 * parse.y (structsp): Print an error message, rather than crashing,
14705 when a class-head does not name a class.
14707 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
14708 template arguments as a g++ extension.
14710 * cp-tree.def (ALIGNOF_EXPR): New tree code.
14711 * decl2.c (grok_alignof): If processing_template_decl, just store
14713 * typeck.c (c_alignof): Likewise.
14714 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14715 * error.c (dump_expr): Likewise.
14716 * pt.c (tsubst_copy): Likewise.
14717 * tree.c (cp_tree_equal): Likewise.
14718 * pt.c (uses_template_parms): Correctly determine whether or not a
14719 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14720 folding can be done.
14722 * cp-tree.h (grok_enum_decls): Remove type parameter.
14723 * decl.c (grok_enum_decls): Likewise.
14724 * decl2.c (grok_x_components): Call grok_enum_decls
14725 unconditionally, since it will do nothing if there is no
14726 current_local_enum. Use the new calling sequence.
14727 * pt.c (tsubst_enum): Use the new calling sequence for
14730 * decl.c (start_function): Make member functions of local classes
14731 in extern inline functions have comdat linkage here...
14732 (grokdeclarator): Rather than here.
14734 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
14736 * pt.c (convert_nontype_argument): Use decl_constant_value.
14738 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
14740 * call.c (add_template_candidate_real): New function.
14741 (add_template_candidate): Use it.
14742 (add_template_conv_candidate): Likewise.
14743 (joust): Pass extra argument to more_specialized.
14744 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14745 (is_local_class): Remove.
14746 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14747 * cp-tree.h (is_local_class): Remove.
14748 (perform_array_to_pointer_conversion): Likewise.
14749 (finish_member_template_decl): Add.
14750 (check_explicit_specialization): Return a tree, not an int.
14751 (more_specialized): Take additional argument.
14752 (get_bindings): Likewise.
14753 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14754 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14755 (perform_array_to_pointer_conversion): Remove.
14756 * decl.c (saved_scope): Add processing_specialization,
14757 processing_explicit_instantiation fields.
14758 (maybe_push_to_top_level): Save them.
14759 (pop_from_top_level): Restore them.
14760 (grokfndecl): Use new return value from
14761 check_explicit_specialization.
14762 (start_decl): Don't check flag_guiding_decls before pushing
14764 (cp_finish_decl): Remove previous (bogus) change.
14765 (grok_declarator): Use decl_function_context rather than
14767 * decl2.c (finish_file): Pass extra argument to get_bindings.
14768 (build_expr_from_tree): Let build_x_component_ref check
14769 validity of arguments rather than doing it here.
14770 * lex.c (cons_up_default_function): Remove code fooling with
14771 processing_specialization, processing_explicit_instantiation
14772 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14773 * method.c (build_overload_identifier): Mangle local classes in
14774 template functions correctly.
14775 * parse.y (finish_member_template_decl): Move to pt.c.
14776 * pt.c (finish_member_template_decl): Moved here from parse.y.
14777 (print_candidates): New function.
14778 (determine_specialization): Change interface. Properly look for
14779 most specialized versions of template candidates.
14780 (check_explicit_specialization): Fully process explicit
14782 (push_template_decl): Avoid looking at CLASSTYPE fields in
14784 (determine_overloaded_function): Remove.
14785 (convert_nontype_argument): Change name from
14786 convert_nontype_parameter. Use determine_overloaded_function
14787 instead of instantiate_type.
14788 (mangle_class_name_for_template): Handle type contexts as well as
14790 (classtype_mangled_name): Likewise.
14791 (lookup_template_class): Likewise.
14792 (tsubst): Likewise.
14793 (more_specialized): Take explict template arguments as a
14795 (most_specialized): Likewise.
14796 (get_bindings): Likewise. Check that return types match before
14797 proclaiming a function a match.
14798 (do_decl_instantiation): Remove code searching for function to
14799 instantiate; that is now done in check_explicit_specialization.
14800 (add_maybe_template): Pass extra argument to get_bindings.
14801 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14803 * typeck.c (build_component_ref): Check for invalid arguments.
14805 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
14807 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14808 return_target and call_target are equivalent.
14810 * pt.c (type_unification_real): Just accept function parms that
14811 don't use any template parms.
14813 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
14815 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14816 unset DECL_NOT_REALLY_EXTERN.
14818 * parse.y (typename_sub*): Fix std::.
14820 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
14822 * error.c (dump_decl): Fix type default template args.
14823 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14825 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
14827 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14828 (file_name_nondirectory): Use.
14830 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14832 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14833 that are not really present. Substitute default arguments in
14834 template template arguments. Correctly convert TEMPLATE_DECL to
14835 TEMPLATE_TEMPLATE_PARM.
14836 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14837 are no longer treated specially here.
14838 * parse.y (template_template_parm): Fix copy error.
14839 * decl.c (grokdeclarator): Warn about missing `typename' for nested
14840 type created from template template parameters.
14841 * parse.y (bad_parm): Likewise
14843 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14844 (push_nested_class): Likewise.
14845 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14846 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14847 (copy_template_template_parm): Declare.
14848 * decl.c (arg_looking_for_template): New variable.
14849 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14850 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14851 node if arg_looking_for_template is nonzero.
14852 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14853 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14854 (grokdeclarator): Handle TEMPLATE_DECL.
14855 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14856 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14857 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14858 (dump_decl): Handle unnamed template type parameters.
14859 Handle template template parameters.
14860 (dump_function_name): Handle template template parameters.
14861 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14862 Handle TEMPLATE_TEMPLATE_PARM.
14863 * method.c (build_template_template_parm_names): New function.
14864 (build_template_parm_names): Handle TEMPLATE_DECL.
14865 (build_overload_nested_name, build_overload_name):
14866 Handle TEMPLATE_TEMPLATE_PARM.
14867 * parse.y (maybe_identifier): New nonterminal.
14868 (template_type_parm): Use it.
14869 (template_template_parm, template_arg1): New nonterminal.
14870 (template_parm): Add template_template_parm rules.
14871 (template_arg): Set processing_template_arg.
14872 (template_arg1): Rules moved from template_arg.
14873 (primary, nonnested_type): Set arg_looking_for_template if we are
14874 processing template arguments.
14875 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14876 (process_template_parm): Handle template template parameters.
14877 (coerce_template_parms, comp_template_args): Likewise.
14878 (mangle_class_name_for_template, lookup_template_class): Likewise.
14879 (uses_template_parms): Handle TEMPLATE_DECL and
14880 TEMPLATE_TEMPLATE_PARM.
14881 (current_template_args): Handle TEMPLATE_DECL.
14882 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14883 * search.c (dfs_walk, dfs_record_inheritance):
14884 Handle TEMPLATE_TEMPLATE_PARM.
14885 * tree.c (copy_template_template_parm): New function.
14886 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14887 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14889 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
14891 * decl.c (start_decl): Don't allow duplicate definitions of static
14894 * call.c (build_user_type_conversion_1): Handle user-defined
14895 template conversion operators correctly.
14897 * decl2.c (build_expr_from_tree): Issue an error message if the
14898 object in a COMPONENT_REF is a TEMPLATE_DECL.
14900 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
14902 * class.c (is_local_class): New function.
14903 * cp-tree.h (is_local_class): Declare it.
14904 (last_tree): Likewise.
14905 (begin_tree): Likewise.
14906 (end_tree): Likewise.
14907 (lookup_template_class): Change prototype.
14908 * decl.c (cp_finish_decl): Check for NULL where necessary.
14909 Consider FUNCTION_DECLS to declare objects with top-level binding,
14910 when calling make_decl_rtl.
14911 (grokdeclarator): Give members of local classes internal linkage.
14912 (start_function): Remove declaration of last_tree.
14913 (finish_function): Set flag_keep_inline_functions around call to
14914 rest_of_compilation if we are processing a member function in a
14916 (start_method): Call push_template_decl for member functions of
14917 local classes in template functions.
14918 * decl2.c (import_export_decl): Don't give external linkage to
14919 instantiations of templates with internal linkage.
14920 * parse.y (last_tree): Remove declaration.
14921 (template_type): Pass extra parameter to lookup_template_class.
14922 (self_template_type): Likewise.
14923 (structsp): Move call to reset_specialization into left_curly.
14924 (left_curly): Call reset_specialization, and begin_tree.
14925 * pt.c (saved_trees): New variable.
14926 (mangle_class_name_for_template): Change prototype. Use
14927 additional function context to name local classes in templates
14929 (classtype_mangled_name): Pass the context.
14930 (push_template_decl): Handle local classes and templates, and
14931 member functions for such classes.
14932 (convert_nontype_parameter): Fix handling of pointer-to-member
14934 (lookup_template_class): Handle local classes in templates.
14935 (tsubst): Likewise. Don't assume that template instantiations
14936 have external linkage; pay attention to the template declaration.
14937 (mark_decl_instantiated): Likewise.
14938 (begin_tree): New function.
14939 (end_tree): Likewise.
14941 * decl.c (xref_basetypes): Don't call complete_type for basetypes
14942 that involve template parameters; that can lead to infinite
14943 recursion unnecessarily.
14945 * pt.c (register_specialization): Do not register specializations
14946 that aren't ready to be registered yet.
14947 (check_explicit_specialization): Handle explicit specialization of
14948 constructors and destructors.
14949 (build_template_decl): New function.
14950 (push_template_delc): Handle out-of-class specializations of
14953 * pt.c (check_explicit_specialization): Set up the template
14954 information before registering the specialization.
14955 (coerce_template_parms): Fix thinko.
14956 (tsubst): Handle specializations of member templates correctly.
14958 * class.c (finish_struct_methods): Remove calls to
14959 check_explicit_specialization from here.
14960 (finish_struct): And insert them here.
14961 * cp-tree.h (perform_qualification_conversions): New function.
14962 (perform_array_to_pointer_conversion): Likewise.
14963 (begin_explicit_instantiation): Likewise.
14964 (end_explicit_instantiation): Likewise.
14965 (determine_specialization): Renamed from
14966 determine_explicit_specialization.
14967 (comp_template_parms): New function.
14968 (processing_explicit_instantiation): New variable.
14969 * cvt.c (perform_qualification_conversions): New function.
14970 (perform_array_to_pointer_conversion): Likewise.
14971 * decl.c (duplicate_decls): Don't consider template functions
14972 alike unless they have the same parameters. Refine handling of
14973 instantiation/specialization mismatches.
14974 (start_decl): Don't call pushdecl for template specializations,
14975 since they don't affect overloading.
14976 (start_function): Likewise.
14977 (grokfndecl): Call check_explicit_specialization a little later.
14978 Don't call duplicate_decls for memberm template specializations.
14979 (grokdeclarator): Don't update template_count for classes that are
14980 themselves specializations. Remove use of `2' as parameter to
14981 grokfndecl since that value isn't used.
14982 * lex.c (cons_up_default_function): Save and restore
14983 processing_explicit_instantiation around calls to grokfield.
14984 * parse.y (finish_member_template_decl): New function.
14985 (component_decl_1): Use it.
14986 (fn.def2): Likewise.
14987 (template_arg_list_opt): New nonterminal.
14988 (template_type): Use it.
14989 (self_template_type): Likewise.
14990 (template_id): Likewise.
14991 (object_template_id): Likewise.
14992 (notype_template_declarator): Likwise.
14993 (begin_explicit_instantiation): Likewise.
14994 (end_explicit_instantiation): Likewise.
14995 (explicit_instantiation): Use them.
14996 * pt.c (coerce_template_parms): Add parameters.
14997 (processing_explicit_instantiation): New variable.
14998 (convert_nontype_parameter): New function.
14999 (determine_overloaded_function): Likewise.
15000 (begin_explicit_instantiation): Likewise.
15001 (end_explicit_instantiation): Likewise.
15002 (retrieve_specialization): Likewise.
15003 (register_specialization): Likewise.
15004 (processing_explicit_specialization): Removed.
15005 (determine_specialization): Handle specializations of member
15006 functions of template class instantiations.
15007 (check_explicit_specialization): Refine to conform to standard.
15008 (comp_template_parms): New function.
15009 (coerce_template_parms): Call convert_nontype_parameter.
15010 (tsubst): Refine handling of member templates. Use
15011 register_specialization.
15012 (instantiate_template): Use retrieve_specialization.
15013 (do_decl_instantiation): Likewise.
15014 (instantiate_decl): Likewise.
15015 (type_unification): Improve handling of explict template
15017 * tree.c (mapcar): Return error_mark_node, rather than aborting,
15018 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15019 * typeck.c (build_unary_op): Call determine_specialization, rather
15020 than determine_explicit_specialization.
15022 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
15024 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15026 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15028 * error.c (dump_decl): For enum tags, output the tag, not its value.
15030 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
15032 * decl.c (init_decl_processing): Only call init_rtti_processing
15035 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
15037 * init.c (build_new_1): Split out from build_new.
15038 (build_new): Just return a NEW_EXPR.
15039 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15041 * decl2.c (get_temp_regvar): Tweak.
15043 * cp-tree.h (TREE_CALLS_NEW): Comment out.
15044 * class.c (resolves_to_fixed_type_p): Remove use.
15045 * method.c (build_opfncall): Likewise.
15046 * call.c (build_new_op): Likewise.
15048 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15050 * exception.cc (__eh_alloc, __eh_free): New fns.
15051 (__cp_push_exception, __cp_pop_exception): Use them.
15052 (__uncatch_exception): Call terminate here if no exception.
15053 * except.c (build_terminate_handler): New fn.
15054 (expand_start_catch_block): Use it.
15055 (expand_exception_blocks): Likewise.
15056 (alloc_eh_object): New fn.
15057 (expand_throw): Use it. Protect exception init with terminate.
15058 * typeck.c (build_modify_expr): Remove code that ignores trivial
15061 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15063 * call.c (add_builtin_candidate): Add default case in enumeration
15065 (build_new_op): Likewise.
15066 (convert_like): Likewise.
15067 * cvt.c (build_expr_type_conversion): Likewise.
15068 * tree.c (real_lvalue_p): Likewise.
15069 (lvalue_p): Likewise.
15070 (cp_tree_equal): Likewise.
15071 * typeck.c (comptypes): Likewise.
15072 (build_component_ref): Likewise.
15073 (build_function_call_real): Likewise.
15074 (build_binary_op_nodefault): Likewise.
15075 (build_unary_op): Likewise.
15076 (build_modify_expr): Likewise.
15077 * typeck2.c (initializer_constant_valid_p): Likewise.
15079 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
15081 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15083 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
15085 * pt.c (coerce_template_parms): Make sure to digest_init if
15088 * decl.c (duplicate_decls): Make the newdecl virtual if the
15089 olddecl was, just as is done with other attributes of olddecl.
15091 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15093 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15094 address of an OFFSET_REF.
15096 * cp-tree.def: Add AGGR_INIT_EXPR.
15097 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15098 AGGR_INIT_EXPR where appropriate.
15099 * expr.c (cplus_expand_expr): Likewise. Simplify.
15101 * decl2.c (finish_file): Remove call to register_exception_table.
15103 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15105 * pt.c (instantiate_class_template): Don't do injection when
15106 processing_template_decl is true, as pollutes current_binding_level
15109 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
15111 * pt.c (maybe_fold_nontype_arg): Add prototype.
15113 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15115 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15116 * error.c (dump_expr): Likewise.
15118 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15120 * typeck.c (build_function_call_real): Remove "inline called before
15121 definition" pedwarn.
15123 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15125 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15127 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15129 * pt.c (type_unification_real): Change __null to type void* with
15132 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
15134 * call.c (implicit_conversion): Don't call
15135 build_user_type_conversion_1 with a NULL expr, since it will
15138 * pt.c (unify): Don't try to unify array bounds if either array is
15141 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15143 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15144 Replace extern decls with casts.
15146 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15147 Update last_parm_cleanup_insn.
15148 (store_after_parms): Remove.
15149 * cp-tree.h: Adjust.
15151 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15153 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15154 (finish_file): Check DECL_COMDAT instead of weak|one_only.
15155 (import_export_vtable): Use make_decl_one_only instead of
15156 comdat_linkage for win32 tweak.
15157 (import_export_decl): Likewise.
15158 * pt.c (mark_decl_instantiated): Likewise.
15160 * decl2.c (finish_file): Lose handling of templates in pending_statics.
15162 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15164 * decl2.c (finish_file): Lose call to expand_builtin_throw.
15165 * except.c (expand_builtin_throw): Remove.
15166 * cp-tree.h: Remove ptr_ptr_type_node.
15167 * decl.c: Likewise.
15169 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
15171 * decl.c (ptr_ptr_type_node): Define.
15172 (init_decl_processing): Initialize it.
15173 * cp-tree.h: Declare it.
15174 * exception.cc (__cp_exception_info): Use __get_eh_info.
15175 (__cp_push_exception): Likewise.
15176 (__cp_pop_exception): Likewise.
15178 From Scott Snyder <snyder@d0sgif.fnal.gov>:
15179 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15181 (init_exception_processing): Removed saved_pc initialization.
15183 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
15185 * pt.c (instantiate_decl): Defer all templates but inline functions.
15187 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15189 * init.c (expand_vec_init): Don't fold a list of parameters.
15191 * decl.c (copy_args_p): Handle copy elision for types with virtual
15193 * call.c (build_over_call): Likewise.
15195 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
15197 * pt.c (lookup_template_function): Copy the template arguments,
15198 not just the list containing them, to the permanent obstack.
15200 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
15202 * except.c (expand_start_catch_block): suspend_momentary for the
15205 * error.c (dump_decl): Handle LOOKUP_EXPR.
15207 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
15209 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15210 permanent obstack if we are processing a template decl.
15211 * typeck.c (build_static_cast): Likewise.
15212 (build_const_cast): Likewise.
15213 (build_reinterpret_cast): Likewise.
15215 * pt.c (coerce_template_parms): Coerce some expressions, even
15216 when processing_template_decl.
15218 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15220 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15221 handling of pointer difference expressions.
15223 * typeck.c (comp_target_types): Comparison of function/method types
15224 is independent of nptrs.
15226 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
15228 * pt.c (tsubst): Avoid creating pointer to reference and
15229 reference to reference types.
15231 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15233 * parse.y (do_id): New nonterminal.
15234 (template_id): Use it.
15236 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15238 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15239 * spew.c (yylex): Don't do_identifier here.
15240 * decl2.c (build_expr_from_tree): Revert last change.
15242 * decl2.c (build_expr_from_tree): Expand the name for a method call.
15243 * parse.y (object_template_id): Don't try to take the DECL_NAME.
15245 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15247 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15249 * call.c (build_op_delete_call): Adjust.
15251 * except.c (expand_end_catch_block): Lose rethrow region.
15252 (expand_start_catch_block): Likewise.
15253 (expand_end_catch_block): Don't expand_leftover_cleanups.
15255 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15257 * pt.c (tsubst): Remove tree_cons call (places redundant info into
15258 DECL_TEMPLATE_INSTANTIATION).
15260 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15262 * tree.c (is_overloaded_fn): Handle getting a fn template.
15263 (really_overloaded_fn): Likewise.
15264 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15265 * pt.c (check_explicit_specialization): Tweak.
15266 (determine_explicit_specialization): Tweak.
15268 * tree.c, cp-tree.h (get_target_expr): New fn.
15270 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
15272 * pt.c (check_explicit_specialization): Fix misspelling in
15273 diagnostic: `preceeded'.
15274 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15277 1997-12-02 Mark Mitchell <mmitchell@usa.net>
15279 * pt.c (determine_explicit_specialization): Avoid an internal
15280 error for bad specializations.
15282 * method.c (build_overload_value): Handle SCOPE_REF.
15284 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
15286 * class.c (prepare_fresh_vtable): Enable even more complex MI
15289 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15291 * exception.cc (__check_eh_spec): Optimize a bit.
15293 * exception.cc (__cp_pop_exception): Lose handler arg.
15294 * except.c (do_pop_exception): Likewise.
15295 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15296 (expand_end_catch_block): Likewise.
15298 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15300 * pt.c (check_explicit_specialization): Complain about using a
15301 template-id for a non-specialization.
15303 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
15305 * repo.c: Prototype rindex only if needed.
15306 * xref.c: Likewise.
15308 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15310 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15312 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15314 * typeck.c (build_const_cast): Handle references here instead of
15315 handing off to convert_to_reference.
15317 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15318 TerminateFunctionCall.
15319 (init_exception_processing): Likewise. Terminate et al are now
15320 the fns, not ADDR_EXPRs.
15321 (various): Lose redundant assemble_external calls.
15322 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15324 * cp-tree.h (struct lang_decl_flags): Add comdat.
15325 (DECL_COMDAT): New macro.
15326 * decl.c (duplicate_decls): Propagate it.
15327 (cp_finish_decl): Handle it.
15328 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15330 * class.c: Remove static pending_hard_virtuals.
15331 (add_virtual_function): Take pointers to pending_virtuals
15332 and pending_hard_virtuals.
15333 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
15335 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15337 * decl2.c (import_export_vtable): If we support one_only but not
15338 weak symbols, mark instantiated template vtables one_only.
15339 (import_export_decl): Likewise for tinfo functions.
15340 (finish_vtable_vardecl): Also write out vtables from explicitly
15341 instantiated template classes.
15342 * pt.c (mark_class_instantiated): Revert last change.
15344 * except.c (expand_throw): Call mark_used on the destructor.
15346 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
15348 * lex.c (lang_init): Enable flag_exceptions by default if no
15349 command line switch was specified.
15351 1997-11-26 Mark Mitchell <mmitchell@usa.net>
15353 * pt.c (unify): Handle `void' template parameters in
15356 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
15358 * rtti.c (build_dynamic_cast): Handle template case here.
15359 (build_dynamic_cast_1): Not here.
15361 * typeck2.c (digest_init): Make copies where appropriate.
15363 * decl2.c (delete_sanity): resolve_offset_ref.
15365 * except.c: Call terminate without caching so many bits.
15367 * except.c (expand_start_catch_block): Fix catching a reference
15370 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15372 * init.c (build_new): Copy size to the saveable obstack.
15374 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15375 TRY_CATCH_EXPR for now.
15377 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15379 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15380 has DECL_LANG_SPECIFIC.
15382 * exception.cc (struct cp_eh_info): Add handlers field.
15383 (__cp_push_exception): Initialize it.
15384 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
15385 (__throw_bad_exception): Remove.
15386 * except.c (call_eh_info): Add handlers field.
15387 (get_eh_handlers): New fn.
15388 (push_eh_cleanup): Increment handlers.
15390 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15392 * except.c (expand_start_eh_spec): Use the try/catch code.
15393 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
15394 doing everything inline.
15395 (init_exception_processing): throw_type_match now takes
15396 const void pointers.
15397 * exception.cc (__check_eh_spec): New fn.
15398 * inc/exception: Neither terminate nor unexpected return.
15399 * decl.c: Make const_ptr_type_node public.
15400 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15402 * except.c (expand_start_catch_block): We only need the rethrow
15403 region for non-sjlj exceptions.
15404 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
15406 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
15408 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15409 (various.o): Likewise.
15410 * inc/new: Add placement deletes. Add throw specs for default new.
15411 * new.cc (set_new_handler): Move here from libgcc2.
15412 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15413 (new): Move from libgcc2. Throw bad_alloc.
15414 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15415 * decl.c (init_decl_processing): Update exception specs on new and
15418 * method.c (build_decl_overload_real): Don't mess with global
15421 * init.c (build_new): Check for null throw spec, not nothrow_t.
15423 * decl.c (duplicate_decls): Don't complain about different exceptions
15424 from an internal declaration.
15426 * call.c (build_op_delete_call): Fix check for member fns again.
15428 * decl2.c (import_export_decl): Interface hackery affects
15429 virtual synthesized methods.
15431 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15433 * decl.c (start_decl): Don't just complain about a mismatched
15436 * decl.c (make_implicit_typename): Handle case where t is not
15437 actually from context.
15438 * tree.c (get_type_decl): Lose identifier case.
15439 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15440 * parse.y (nonnested_type): Just use lookup_name.
15441 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15443 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
15445 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15446 T was built in C language context (for example, by
15447 output_func_start_profiler).
15449 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15451 * decl.c (make_implicit_typename): New fn.
15452 (lookup_name_real): Use it. Use current_class_type as the context.
15454 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
15456 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15458 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15460 * friend.c (do_friend): Warn about non-template friends in templates.
15462 * call.c (build_op_delete_call): Fix handling of inherited delete.
15464 * search.c (dfs_record_inheritance): Ignore template type parms.
15466 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
15468 * call.c (build_new_op): Fix copy error.
15469 (build_op_new_call): New fn.
15470 (build_op_delete_call): New fn.
15471 * cp-tree.h: Declare them.
15472 * init.c (build_new): Use them. Support placement delete.
15473 (build_x_delete): Use build_op_delete_call.
15474 (build_delete): Likewise.
15475 * decl2.c (delete_sanity): Likewise.
15476 (coerce_delete_type): Don't complain about placement delete.
15478 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15480 * call.c (build_new_function_call): Remove unused 'obj' parm.
15481 * cp-tree.h, typeck.c: Adjust.
15483 * init.c (build_new): Make the cleanup last longer.
15484 (expand_vec_init): Call do_pending_stack_adjust.
15486 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
15488 * pt.c (do_type_instantiation): Fix typo.
15489 (mark_class_instantiated): If we support one_only but not weak
15490 symbols, don't mark this as known.
15492 * init.c (build_new): Handle vec delete in EH cleanup.
15494 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15496 * call.c (build_method_call): Call complete_type before checking
15499 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
15501 * decl.c (add_block_current_level): Delete.
15502 * init.c (build_vec_delete_1): Delete build_block and
15503 add_block_current_level calls.
15505 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
15507 * init.c (build_new): Handle freeing allocated memory when the
15508 constructor throws.
15510 * call.c (build_new_method_call): Fix flags arg.
15512 * pt.c (do_type_instantiation): Don't try to instantiate
15514 (mark_decl_instantiated): If we support one_only but not
15515 weak symbols, mark this one_only.
15516 * decl2.c (import_export_vtable): Don't defer handling of vtables
15517 if MULTIPLE_SYMBOL_SPACES.
15519 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15521 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15523 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
15525 * except.c (do_pop_exception): Return a value.
15527 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15529 * call.c (build_new_method_call): Handle getting a
15530 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
15531 if we got template parms.
15532 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15534 * decl2.c (build_expr_from_tree): Tweak last change.
15535 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15536 (maybe_fold_nontype_arg): Split out from tsubst_copy.
15537 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15539 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15541 * pt.c (tsubst_copy): Handle explicit template arguments in
15543 * typeck.c (build_x_function_call): Likewise.
15544 * decl2.c (build_expr_from_tree): Lookup function name if it
15547 * pt.c (tsubst): Instantiate template functions properly when
15548 template parameter does not appear in function arguments and return
15550 (comp_template_args): Handle member templates required by tsubst.
15552 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15554 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15557 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15559 * pt.c (coerce_template_parms): Tweak error message.
15561 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15562 return type defaults to `int', even if there are storage-class
15565 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15567 Complete nested exception support.
15568 * except.c (do_pop_exception): Split out...
15569 (push_eh_cleanup): From here. Handle the EH region by hand.
15570 (expand_start_catch_block): Add a new level for the catch parm.
15571 Move the rethrow region outside the two cleanup regions.
15572 Protect the initializer for the catch parm with terminate.
15573 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
15574 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
15575 popping off the middle of the stack.
15576 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15577 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15578 (build_cplus_new): Only wrap CALL_EXPRs.
15579 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15580 the constructor call.
15582 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15584 * Make-lang.in (c++.distdir): Make inc subdirectory.
15586 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15588 * decl2.c (finish_file): Put back some code.
15590 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15592 * decl2.c (finish_file): Remove redundant code.
15593 * method.c (emit_thunk): Don't let the backend defer generic thunks.
15595 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15597 * except.c (call_eh_info): Split out...
15598 (push_eh_info): From here.
15599 (expand_builtin_throw): Use it.
15600 (expand_start_catch_block): Move region start back.
15602 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
15604 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15605 (real_yylex): Record wide strings using target endianness, not host.
15607 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
15609 * repo.c (rindex): Add decl unconditionally.
15610 (get_base_filename, open_repo_file): Don't cast rindex.
15611 * xref.c (rindex): Add decl unconditionally.
15612 (index): Remove unused decl.
15613 (open_xref_file): Don't cast rindex.
15615 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15617 * class.c (build_vbase_path): Propagate the result type properly.
15619 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
15621 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15622 remaining use of saved_throw_type with a call to get_eh_type.
15624 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
15626 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15627 (file_name_nondirectory): New function, doing the same as the macro.
15628 (set_typedecl_interface_info): Use it instead of the macro.
15629 (check_newline): Likewise.
15630 (handle_cp_pragma): Likewise.
15632 * repo.c (get_base_filename): Cast result of rindex to char*.
15633 (open_repo_file): Likewise.
15634 * xref.c (open_xref_file): Likewise.
15635 * error.c (dump_char): Make its arg int, not char.
15637 * except.c (push_eh_info): Pass the number of fields - 1 down, not
15638 the exact number of fields.
15640 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15642 Support for nested exceptions.
15643 * tinfo2.cc (__is_pointer): New fn.
15644 * exception.cc (struct cp_eh_info): Define.
15645 (__cp_exception_info, __uncatch_exception): New fns.
15646 (__cp_push_exception, __cp_pop_exception): New fns.
15647 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15649 (init_exception_processing): Likewise. __eh_pc is now external.
15650 (push_eh_info): New fn.
15651 (get_eh_{info,value,type,caught}): New fns.
15652 (push_eh_cleanup): Just call __cp_pop_exception.
15653 (expand_start_catch_block): Use push_eh_info. Start the eh region
15655 (expand_end_eh_spec): Use push_eh_info.
15656 (expand_throw): Call __cp_push_exception to set up the exception info.
15657 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
15659 (expand_builtin_throw): Don't refer to empty_fndecl.
15661 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15663 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15665 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
15667 * method.c (build_template_parm_names, build_decl_overload_real):
15668 Add static to definitions.
15669 * pt.c (add_to_template_args, note_template_header,
15670 processing_explicit_specialization, type_unification_real): Likewise.
15671 ({determine,check}_explicit_specialization): Use a single string for
15674 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
15676 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15677 (expand_end_catch_block): Likewise.
15678 (expand_end_eh_spec): Likewise.
15680 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
15682 * decl.c (duplicate_decls): Handle template specializations
15684 * error.c (dump_function_name): Fix printing of specializations of
15685 member functions that are not member templates.
15686 * cp-tree.h (processing_specialization): Make global.
15687 * pt.c (processing_specialization): Likewise.
15688 * lex.c (cons_up_default_function): Save and restore
15689 processing_specialization to avoid confusion.
15691 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15693 * decl.c (init_decl_processing): Give null_node unknown* type.
15694 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15695 (common_type): Likewise.
15696 * error.c (args_as_string): Recognize null_node.
15698 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15700 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15701 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15703 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15705 * Make-lang.in (g++): Include prefix.o.
15707 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
15709 * pt.c (determine_explicit_specialization): Initialize "dummy"
15710 to keep Purify quiet.
15712 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15714 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15715 (build_overload_int): Not here.
15717 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
15719 * class.c (build_type_pathname): Remove.
15720 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15722 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
15724 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15725 &&label GNU extension.
15727 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
15729 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15730 so as to avoid incorrect manglings.
15731 * method.c (build_decl_overload_real): Don't mangle return types
15734 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
15736 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15737 scratch_tree_cons): Define as macros for now.
15738 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15739 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15740 typeck2.c: Use them and the expression_obstack variants.
15742 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15744 * decl.c (store_return_init): Allow classes with explicit ctors to
15745 be used with the named return values extension.
15747 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
15749 * pt.c (instantiate_decl): Fix previous change.
15751 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
15753 * pt.c (tsubst): Fix thinko.
15754 (instantiate_decl): Really use the original template.
15756 * call.c (build_new_method_call): Use simple constructor_name for
15759 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
15761 * method.c (build_underscore_int): Don't use ANSI specific
15764 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15766 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15767 for our key method; it might have been inlined by -O3.
15769 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
15771 * decl.c (make_typename_type): Do not try to call lookup_field for
15772 non-aggregate types.
15774 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
15776 * typeck.c (build_reinterpret_cast): Tweak.
15778 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15780 * typeck.c (build_reinterpret_cast): Converting a void pointer
15781 to function pointer with a reinterpret_cast produces a warning
15782 if -pedantic is issued.
15784 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
15786 * typeck.c (c_expand_return): Don't warn about returning a
15787 reference-type variable as a reference.
15789 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
15791 * method.c (build_static_name): Fix typo.
15793 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
15795 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15796 OLDDECL before we try to do DECL_USE_TEMPLATE.
15798 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15800 * decl.c (duplicate_decls): Don't warn about template instances.
15802 * typeck.c (mark_addressable): Lose ancient code that unsets
15805 * pt.c (do_decl_instantiation): Lose support for instantiating
15808 * call.c (build_new_function_call): Fix handling of null explicit
15810 (build_new_method_call): Likewise.
15812 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
15814 * method.c (build_underscore_int): Fix typo.
15816 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
15818 * tree.c (print_lang_statistics): #if 0 call to
15819 print_inline_obstack_statistics until its definition is checked in.
15821 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15823 * decl2.c (finish_file): Move dump_tree_statistics to end.
15825 * pt.c (instantiate_decl): Look for the original template.
15826 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15827 of member templates.
15829 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15831 * Makefile.in (g++FAQ.*): New rules.
15832 (CONFLICTS): Update.
15833 * g++FAQ.texi: Moved from libg++.
15835 * parse.y (PFUNCNAME): Only specify the type once.
15837 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
15839 * lex.c (real_yylex): Clean up the code to fully behave the way
15840 the c-lex.c parser does for complex and real numbers.
15842 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15844 * method.c (build_decl_overload_real): Reformat.
15846 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
15848 * method.c (synthesize_method): If at_eof, determine our linkage.
15850 1997-09-29 Paul Eggert <eggert@twinsun.com>
15852 * lex.c (real_yylex): Treat `$' just like `_', except issue a
15853 diagnostic if !dollars_in_ident or if pedantic.
15855 * lang-specs.h (@c++): -ansi no longer implies -$.
15857 * decl2.c (lang_decode_option):
15858 -traditional and -ansi now do not mess with
15861 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
15863 * Makefile.in (parse.o, decl.o): Also depend on
15864 $(srcdir)/../except.h $(srcdir)/../output.h.
15865 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15866 $(srcdir)/../except.h $(srcdir)/../output.h.
15867 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15870 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15872 * expr.c (cplus_expand_expr): Make it static.
15874 * decl2.c, init.c, typeck.c: Include "expr.h".
15875 (expand_expr): Use proper values when calling the function.
15877 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
15879 * lang-options.h: New -Wold-style-cast flag.
15880 * cp-tree.h (warn_old_style_cast): New variable.
15881 * decl2.c (warn_old_style_cast): Likewise.
15882 (lang_decode_option): Support -Wold-style-cast.
15883 (reparse_absdcl_as_casts): Produce old-style-cast warning.
15885 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15887 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15888 TREE_USED, reset value based on already_used.
15890 * init.c (expand_member_init): Revert change.
15892 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15894 * cp-tree.h, decl.c, decl2.c, pt.c:
15895 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
15897 * decl2.c (lang_decode_option): Add missing ;.
15899 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15901 * friend.c (do_friend): Disable injection for all template-derived
15903 * decl2.c (lang_decode_option): Handle -fguiding-decls.
15904 * parse.y (notype_template_declarator): New nonterminal.
15905 (direct_notype_declarator): Use it.
15906 (complex_direct_notype_declarator): Likewise.
15907 (object_template_id): Accept any kind of identifier after TEMPLATE.
15908 (notype_qualified_id): Don't add template declarators here.
15910 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
15912 * call.c (add_template_candidate): Add explicit_targs parameter.
15913 (build_scoped_method_call): Use it.
15914 (build_overload_call_real): Likewise.
15915 (build_user_type_conversion_1): Likewise.
15916 (build_new_function_call): Likewise.
15917 (build_object_call): Likewise.
15918 (build_new_op): Likewise.
15919 (build_new_method_call): Likewise.
15920 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
15921 (build_new_method_call): Likewise.
15923 * class.c (finish_struct_methods): Add specialization pass to
15924 determine which methods were specializing which other methods.
15925 (instantiate_type): Handle TEMPLATE_ID_EXPR.
15927 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
15929 * cp-tree.h (name_mangling_version): New variable.
15930 (flag_guiding_decls): Likewise.
15931 (build_template_decl_overload): New function.
15932 (begin_specialization): Likewise.
15933 (reset_specialization): Likewise.
15934 (end_specialization): Likewise.
15935 (determine_explicit_specialization): Likewise.
15936 (check_explicit_specialization): Likewise.
15937 (lookup_template_function): Likewise.
15938 (fn_type_unification): Add explicit_targs parameter.
15939 (type_unification): Likewise.
15941 * decl.c (duplicate_decls): Add smarts for explicit
15943 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
15945 (grokfndecl): Call check_explicit_specialization.
15947 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
15948 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
15949 (check_classfn): Handle specializations.
15951 * error.c (dump_function_name): Print specialization arguments.
15953 * friend.c (do_friend): Don't call pushdecl for template
15956 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
15958 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
15959 and -fno-guiding-decls.
15961 * lex.c (identifier_type): Return PFUNCNAME for template function
15964 * method.c (build_decl_overload_real): New function.
15965 (build_template_parm_names): New function.
15966 (build_overload_identifier): Use it.
15967 (build_underscore_int): New function.
15968 (build_overload_int): Use it. Add levels for template
15970 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
15971 (build_overload_nested_names): Handle template type parameters.
15972 (build_template_decl_overload): New function.
15974 * parse.y (YYSTYPE): New ntype member.
15975 (nested_name_specifier): Use it.
15976 (nested_name_specifier_1): Likewise.
15977 (PFUNCNAME): New token.
15978 (template_id, object_template_id): New non-terminals.
15979 (template_parm_list): Note specializations.
15980 (template_def): Likewise.
15981 (structsp): Likewise.
15982 (fn.def2): Handle member template specializations.
15983 (component_decl_1): Likewise.
15984 (direct_notype_declarator): Handle template-ids.
15985 (component_decl_1): Likewise.
15986 (direct_notype_declarator): Handle template-ids.
15987 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
15989 * pt.c (processing_specializations): New variable.
15990 (template_header_count): Likewise.
15991 (type_unification_real): New function.
15992 (processing_explicit_specialization): Likewise.
15993 (note_template_header): Likewise.
15994 (is_member_template): Handle specializations.
15995 (end_template_decl): Call reset_specialization.
15996 (push_template_decl): Handle member template specializations.
15997 (tsubst): Likewise.
15998 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
15999 (instantiate_template): Handle specializations.
16000 (instantiate_decl): Likewise.
16001 (fn_type_unification): Handle explicit_targs.
16002 (type_unification): Likewise. Allow incomplete unification
16003 without an error message, if allow_incomplete.
16004 (get_bindings): Use new calling sequence for fn_type_unification.
16006 * spew.c (yylex): Handle PFUNCNAME.
16008 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16009 (really_overloaded_fn): Likewise.
16010 (get_first_fn): Handle function templates.
16012 * typeck.c (build_x_function_call): Use really_overloaded_fn.
16013 Handle TEMPLATE_ID_EXPR.
16014 (build_x_unary_op): Likewise.
16015 (build_unary_op): Likewise.
16016 (mark_addressable): Templates whose address is taken are marked
16019 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16021 * decl.c (init_decl_processing): Declare __builtin_constant_p as
16022 accepting any kind of type, not only int.
16024 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16026 * search.c (get_matching_virtual): Notice virtual bases when sorrying
16027 about covariant returns.
16029 * parse.y (member_init): Also imply typename here. Remove ancient
16030 extension for initializing base members.
16032 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16034 Handle multi-level typenames and implicit typename in base list.
16035 * parse.y (typename_sub{,[0-2]}): New rules.
16036 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16037 (nonnested_type): New rule.
16038 (complete_type_name): Use it.
16039 (base_class.1): Use typename_sub and nonnested_type.
16040 (nested_name_specifier): Don't elide std:: here.
16041 * decl.c (make_typename_type): Handle getting a type for NAME.
16042 (lookup_name_real): Turn std:: into :: here.
16044 Rvalue conversions were removed in London.
16045 * call.c (is_subseq): Don't consider lvalue transformations.
16046 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16047 (joust): Re-enable ?: kludge.
16049 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
16051 * decl.c (start_function): Up warning of no return type to be a
16054 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16056 * init.c (expand_member_init): Don't set TREE_USED.
16057 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16058 set,don't clear TREE_USED wholesale.
16060 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
16062 * call.c (build_over_call): Do require_complete_type before
16065 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16067 * search.c (lookup_field): Call complete_type in all cases.
16069 * decl.c (finish_function): Just warn about flowing off the end.
16071 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16073 * decl.c (grokparms): Don't bash a permanent list node if we're
16076 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
16078 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16080 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16082 * call.c (build_new_op): Give better error for syntactically
16083 correct, but semantically invalid, use of undeclared template.
16085 * call.c (compare_qual): Handle pmfs.
16087 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16088 after the exception spec.
16090 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16092 * call.c (null_ptr_cst_p): Integer type, not integral type.
16094 * call.c (joust): Disable warnings until they can be moved to the
16097 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
16099 * Makefile.in, config-lang.in: Convert to autoconf.
16101 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16103 * decl.c (lookup_name_real): Add implicit 'typename' to types from
16106 * pt.c (most_specialized_class): Fix typo.
16107 (tsubst): Move constant folding to TREE_VEC case.
16109 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
16111 * pt.c (do_poplevel): Don't warn about unused local variables
16112 while processing_template_decl since we don't always know whether
16113 or not they will need constructing/destructing.
16115 * pt.c (uses_template_parms): Check the values of an enumeration
16116 type to make sure they don't depend on template parms.
16118 * decl.c (make_typename_type): Don't lookup the field if the
16119 context uses template parms, even if we're not
16120 processing_template_decl at the moment.
16122 * pt.c (coerce_template_parms): Avoid looking at the
16123 TYPE_LANG_DECL portion of a typename type, since there won't be
16125 (tsubst): Do constant folding as necessary to make sure that
16126 arguments passed to lookup_template_class really are constants.
16128 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
16130 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16131 * decl2.c (finish_file): Only register exception tables if we
16134 * decl.c (init_decl_processing): Add __builtin_[fs]p.
16136 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16138 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16140 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
16142 * error.c (dump_decl): Avoid crashing when presented with a
16143 uninitialized constant, as can occur with a template parameter.
16144 (dump_expr): Make sure that there are enough levels of
16145 current_template_parms before we start diving through them.
16147 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16149 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16152 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16154 * except.c (expand_throw): Call build_delete for all
16155 exception types, not just objects with destructors.
16157 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
16159 * decl.c (current_local_enum): Remove static.
16160 * pt.c (tsubst_enum): Save and restore value of current_local_enum
16161 in case template is expanded in enum decl.
16162 (instantiate_class_template): Use new tsubst_enum signature.
16163 (tsubst_expr): Likewise.
16165 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
16167 * pt.c (begin_member_template_processing): Take a function as
16168 argument, not a set of template arguments. Use the template
16169 parameters, rather than the arguments. Handle non-type parameters
16170 correctly. Push a binding level for the parameters so that multiple
16171 member templates using the same parameter names can be declared.
16172 (end_member_template_processing): Pop the binding level.
16173 (push_template_decl): Mark member templates as static when
16176 * lex.c (do_pending_inlines): Pass the function, not its template
16177 arguments, to begin_member_template_processing.
16178 (process_next_inline): Likewise.
16179 (do_pending_defargs): Likewise.
16181 * error.c (dump_expr): Obtain the correct declaration for a
16182 TEMPLATE_CONST_PARM.
16184 * call.c (add_template_conv_candidate): New function.
16185 (build_object_call): Handle member templates, as done in the other
16188 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
16190 * decl.c (replace_defag): Undo previous change.
16191 * lex.c (do_pending_defargs): Deal with member templates.
16193 * pt.c (is_member_template): Avoid crashing when passed a
16194 non-function argument.
16196 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
16198 * class.c (grow_method): Remove check for redeclaration.
16200 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
16202 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16203 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16204 (PRIMARY_TEMPLATE_P): Use it.
16205 * call.c (build_overload_call_real): Use it.
16206 * class.c (instantiate_type): Likewise.
16207 * decl.c (decls_match): Likewise.
16208 * method.c (build_overload_identifier): Likewise.
16209 * pt.c (push_template_decl): Likewise.
16210 (classtype_mangled_name): Likewise.
16211 (lookup_template_class): Likewise.
16213 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16214 DECL_NTPARMS to conform to usage elsewhere.
16215 * call.c (add_template_candidate): Likewise.
16216 * class.c (instantiate_type): Likewise.
16217 * pt.c (instantiate_template): Likewise.
16218 (get_bindings): Likewise.
16220 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16221 is_member_template.
16223 * pt.c (unify): Undo changes to allow multiple levels of template
16225 (type_unification): Likewise.
16226 (fn_type_unification): Likewise.
16227 (get_class_bindings): Likewise.
16228 * cp-tree.h (Likewise).
16230 * decl.c (replace_defarg): Check that the type of the default
16231 parameter does not invlove a template type before complaining
16232 about the initialization.
16234 * error.c (dump_expr): Deal with template constant parameters in
16235 member templates correctly.
16237 * pt.c (is_member_template): Deal with class specializations
16239 (tsubst): Handle "partial instantiation" of member templates
16242 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
16244 * pt.c (type_unification): Change calling sequence to allow for
16245 multiple levels of template parameters.
16246 (tsubst_expr): Likewise.
16247 (tsubst): Likewise.
16248 (tsubst_copy): Likewise.
16249 (instantiate_template): Likewise.
16251 * call.c (build_overload_call_real): Use it.
16252 (add_builtin_candidate): Use it.
16253 (build_new_method_call): Use it.
16254 * class.c (instantiate_type): Use it.
16255 * decl.c (grokdeclarator): Use it.
16256 * decl2.c (finish_file): Use it.
16257 * method.c (build_overload_identifier): Use it.
16259 * call.c (add_template_candidate): Add additional parameter for
16260 the function return type. Call fn_type_unification istead of
16262 (build_user_type_conversion_1): Handle member templates.
16263 (build_new_function_call): Likewise.
16264 (build_new_op): Likewise.
16265 (build_new_method_call): Likewise.
16267 * class.c (grow_method): Don't give an error message indicating
16268 that two member templates with the same name are ambiguous.
16269 (finish_struct): Treat member template functions just like member
16272 * cp-tree.h (check_member_template): Add declaration.
16273 (begin_member_template_processing): Likewise.
16274 (end_member_template_processing): Likewise.
16275 (fn_type_unification): Likewise.
16276 (is_member_template): Likewise.
16277 (tsubst): Change prototype.
16278 (tsubst_expr): Likewise.
16279 (tsubst_copy): Likewise.
16280 (instantiate_template): Likewise.
16281 (get_bindings): Likewise.
16283 * decl.c (decls_match): Handle multiple levels of template
16285 (pushdecl): Handle template type params just like other type
16287 (push_class_level_binding): Return immediately if the
16288 class_binding_level is NULL.
16289 (grokfndecl): If check_classfn() returns a member_template, use
16290 the result of the template, not the template itself.
16292 * decl2.c (check_member_template): New function. Check to see
16293 that the entity declared to be a member template can be one.
16294 (check_classfn): Allow redeclaration of member template functions
16295 with different types; the new functions can be specializations or
16296 explicit instantiations.
16298 * error.c (dump_decl): Handle multiple levels of template
16300 (dump_function_decl): Update to handle function templates.
16302 * lex.c (do_pending_inlines): Set up template parameter context
16303 for member templates.
16304 (process_next_inline): Likewise.
16306 * method.c (build_overload_identifier): Adjust for multiple levels
16307 of template parameters.
16309 * parse.y (fn.def2): Add member templates.
16310 (component_decl_1): Likewise.
16312 * pt.c (begin_member_template_processing): New function.
16313 (end_member_template_processing): Likewise.
16314 (is_member_template): Likewise.
16315 (fn_type_unification): Likewise.
16316 (current_template_parms): Return a vector of all the template
16317 parms, not just the innermost level of parms.
16318 (push_template_decl): Deal with the possibility of member
16320 (lookup_template_class): Likewise.
16321 (uses_template_parms): Likewise.
16322 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16323 TEMPLATE_CONST_PARM to deal with multiple levels of template
16324 arguments. Add processing of TEMPLATE_DECL to produce new
16325 TEMPLATE_DECLs from old ones.
16326 (do_decl_instantiation): Handle member templates.
16328 * search.c (lookup_fnfields_1): Handle member template conversion
16331 * tree.c (cp_tree_equal): Check the levels, as well as the
16332 indices, of TEMPLATE_CONST_PARMs.
16334 * typeck.c (comptypes): Check the levels, as well as the indices,
16335 fo TEMPLATE_TYPE_PARMs.
16336 (build_x_function_call): Treat member templates like member
16339 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16341 * typeck.c (c_expand_return): Always convert_for_initialization
16342 before checking for returning a pointer to local.
16344 * pt.c (type_unification): If strict and the function parm doesn't
16345 use template parms, just compare types.
16347 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
16349 * method.c (build_overloaded_value): Replace direct call
16350 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16352 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
16354 * typeck.c (convert_arguments): Don't arbitrarily choose the first
16355 of a set of overloaded functions.
16357 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
16359 * lex.c (real_yylex): Don't elide __FUNCTION__.
16361 * method.c (build_overload_value): Add in_template parm.
16362 (build_overload_int): Likewise.
16363 (build_overload_identifier): Pass it.
16365 * decl.c (duplicate_decls): Don't bash a previous template
16366 definition with a redeclaration.
16368 * pt.c (unify): float doesn't match double.
16370 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16371 TYPE_DECL. Handle getting non-template types.
16372 * parse.y (explicit_instantiation): Use typespec instead of
16373 aggr template_type.
16375 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
16377 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16379 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
16381 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16382 (compare_ics): Likewise.
16384 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16386 * call.c (joust): Warn about choosing one conversion op over
16387 another because of 'this' argument when the other return type is
16389 (source_type): New fn.
16391 * call.c (build_new_op): Strip leading REF_BIND from first operand
16392 to builtin operator.
16394 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16397 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16399 * call.c (null_ptr_cst_p): Remove support for (void*)0.
16401 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
16403 * typeck.c (expand_target_expr): Make definition match declaration.
16405 * class.c (get_basefndecls): Make definition match declaration.
16407 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
16409 * input.c (sub_getch): Eventually give up and release the input file.
16411 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16414 * call.c (joust): Tweak message.
16416 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
16418 * error.c (type_as_string): Put const/volatile on template type
16419 parameters where appropriate.
16421 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
16423 * call.c (strictly_better): Make arguments unsigned ints.
16425 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
16427 * lex.c (real_yylex): Refer to __complex instead of complex.
16429 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
16431 * lex.c (real_yylex): Don't use getc directly.
16433 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16435 * call.c (is_subseq): Don't try to be clever.
16437 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16439 * parse.y, pt.c: Include "except.h".
16440 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16441 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16442 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16443 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16446 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16448 * decl2.c (mark_vtable_entries): Instead of replacing pure
16449 virtuals with a reference to __pure_virtual, copy the decl and
16452 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16454 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16456 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16458 * pt.c (instantiate_class_template): Call repo_template_used
16459 before finish_prevtable_vardecl.
16461 * call.c (is_subseq): New fn.
16462 (compare_ics): Use it.
16464 * repo.c (finish_repo): Don't crash on no args.
16466 * parse.y (named_complex_class_head_sans_basetype): Handle
16467 explicit global scope.
16468 * decl2.c (handle_class_head): New fn.
16470 * pt.c (unify): Add CONST_DECL case.
16472 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16474 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16476 * cp-tree.h (report_type_mismatch): Add prototype.
16477 * call.c (build_overload_call_real): Remove erroneous fourth
16478 argument to report_type_mismatch.
16479 (build_user_type_conversion_1): Remove erroneous second arg to
16481 (build_new_function_call): Likewise.
16482 (build_object_call): Likewise.
16483 (build_new_op): Likewise.
16484 (build_new_method_call): Likewise.
16486 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16488 * error.c (dump_decl): Don't bother processing a function with no
16489 DECL_LANG_SPECIFIC.
16491 * method.c (emit_thunk): Call init_function_start in the macro case.
16493 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
16495 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16496 defined and used to set flag_vtable_thunks.
16498 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16500 * parse.y: Don't clear the inlines from their obstack until they've
16501 all been processed.
16503 * decl.c (duplicate_decls): Don't complain about exception
16504 specification mismatch if flag_exceptions is off.
16506 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
16508 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16510 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
16512 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16513 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16514 Include <stdio.h> before include files that formerly used STDIO_PROTO.
16516 * decl.c, g++spec.c, lex.c, method.c, repo.c:
16517 Include "config.h" first, as per autoconf manual.
16519 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
16521 * decl.c (duplicate_decls): Tweak wording.
16522 * lex.c (do_pending_defargs): Don't die if we see a default arg
16523 that isn't a DEFAULT_ARG.
16524 * error.c (dump_expr): Handle DEFAULT_ARG.
16526 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16527 * lang-options.h: Add -fhandle-exceptions.
16529 * class.c (build_vtable): Vtables are artificial.
16530 (prepare_fresh_vtable): Likewise.
16532 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16534 * cvt.c (ocp_convert): After converting to the target type, set
16535 LOOKUP_NO_CONVERSION.
16537 * call.c (joust): Warn about potentially confusing promotion rules
16539 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16541 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
16543 * exception.cc: Declare __terminate_func with noreturn attribute.
16545 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
16547 * parse.y: Break out eat_saved_input, handle errors.
16548 (function_try_block): Use compstmt instead of compstmt_or_error.
16550 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
16552 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16554 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16556 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16557 existence of cc1plus check whether $(LANGUAGES) contains C++.
16559 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16561 * method.c (do_build_copy_constructor): When copying an anonymous
16562 union member loop around to handle nested anonymous unions. Use
16563 the offset of the member relative to the outer structure, not the
16566 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16568 * call.c (resolve_args): New fn.
16569 (build_new_function_call): Use it.
16570 (build_object_call): Likewise.
16571 (build_new_method_call): Likewise.
16573 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
16575 * call.c (build_over_call): tsubst all default parms from templates.
16577 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
16579 * decl.c (struct cp_function): Add static_labelno.
16580 (push_cp_function_context): Save it.
16581 (pop_cp_function_context): Restore it.
16583 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
16585 * typeck.c (build_component_ref_1): Convert from reference.
16587 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16589 * parse.y (current_declspecs, prefix_attributes): Initialize to
16592 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16593 before we try to force it to be a TREE_LIST.
16594 (decl): Make sure $1.t is non-nil.
16596 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
16598 * pt.c (uses_template_parms): Handle template first-parse codes.
16600 * decl.c (cp_finish_decl): Only warn about user-defined statics.
16602 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16604 * pt.c (unify): Handle BOOLEAN_TYPE.
16606 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16607 * pt.c (tsubst): Don't set it.
16608 * call.c (build_over_call): Use uses_template_parms.
16610 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
16612 * method.c (build_overload_nested_name): Use static_labelno
16613 instead of var_labelno.
16614 (build_qualified_name): New fn.
16615 (build_overload_name): Split out from here.
16616 (build_static_name): Use build_qualified_name.
16617 * decl.c (cp_finish_decl): Statics in extern inline functions
16618 have comdat linkage.
16619 (start_function): Initialize static_labelno.
16621 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16623 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16624 before "all member functions in class [] are private".
16626 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
16628 * lex.c (do_scoped_id): convert_from_reference.
16629 * init.c (build_offset_ref): Likewise.
16631 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16633 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16635 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16637 * typeck.c (get_member_function_from_ptrfunc): Promote index
16640 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
16642 * tree.c (layout_basetypes): Move non-virtual destructor warning.
16643 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16645 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16647 * decl.c (grokdeclarator): Call add_defarg_fn for the function
16649 * lex.c (add_defarg_fn): Adjust.
16650 (do_pending_defargs): Adjust. Don't skip the first parm.
16652 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
16654 * decl.c (build_enumerator): Global enumerators are also readonly.
16656 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16657 (build_dynamic_cast): Call it and convert_from_reference.
16659 * lex.c (add_defarg_fn): New fn.
16660 (snarf_defarg): Don't add to defarg_types.
16661 (do_pending_defargs): Lose defarg_types. All fns we process now
16663 * decl.c (grokfndecl): Call add_defarg_fn.
16665 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16666 * cp-tree.def: Add DEFAULT_ARG.
16667 * spew.c (yylex): Call snarf_defarg as appropriate.
16668 * parse.y: New tokens DEFARG and DEFARG_MARKER.
16669 (defarg_again, pending_defargs, defarg, defarg1): New rules.
16670 (structsp): Use pending_defargs.
16671 (parms, full_parm): Use defarg.
16672 * lex.c (init_lex): Initialize inline_text_firstobj.
16673 (do_pending_inlines): Never pass the obstack to feed_input.
16674 (process_next_inline): Call end_input instead of restore_pending_input.
16675 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16676 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16677 * input.c (end_input): New fn.
16678 (sub_getch): At the end of some fed input, just keep returning EOF
16679 until someone calls end_input.
16680 Remove 'obstack' field from struct input_source.
16681 * decl.c (grokparms): Handle DEFAULT_ARG.
16682 (replace_defarg): New fn.
16683 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16685 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
16687 * call.c (implicit_conversion): If nothing else works, try binding
16688 an rvalue to a reference.
16690 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
16692 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16693 ifndef for Cygwin32 to include SIGSEGV.
16695 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16697 * class.c (finish_struct_1): Only complain about pointers without
16698 copy stuff if there are any constructors.
16700 * rtti.c (build_dynamic_cast): Call complete_type on the types.
16702 * decl.c (grokfndecl): If the function we chose doesn't actually
16705 * decl2.c (grokclassfn): Don't specify 'const int' for the
16706 artificial destructor parm.
16708 * pt.c (type_unification): If we are called recursively, nothing
16711 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
16713 * decl.c (init_decl_processing): Stop trying to catch signals
16714 other than SIGABRT since the Cygwin32 library doesn't support
16715 them correctly yet. This fixes a situation in which g++ causes
16716 a hang on SIGSEGVs and other such signals in our Win32-hosted
16719 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
16721 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16723 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
16725 * typeck2.c (store_init_value): Always return the value if our
16726 type needs constructing.
16728 * method.c (hack_identifier): Convert class statics from
16731 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
16733 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16735 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
16737 * typeck.c (c_expand_return): Make sure we clean up temporaries at
16738 the end of return x;
16740 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16742 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16744 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
16746 * except.c (expand_builtin_throw): Add support
16747 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16749 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
16751 * repo.c (extract_string): Null-terminate.
16753 * cp-tree.h (TI_SPEC_INFO): New macro.
16754 (CLASSTYPE_TI_SPEC_INFO): New macro.
16755 * pt.c (push_template_decl): Correctly determine # of template parms
16758 * call.c (compare_ics): Really fix 'this' conversions.
16760 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16763 * pt.c (push_template_decl): Complain about mismatch in # of
16764 template parms between a class template and a member template.
16766 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
16768 * method.c (synthesize_method): You can't call
16769 function_cannot_inline_p after finish_function.
16770 * decl.c (finish_function): Turn on flag_inline_functions and turn
16771 off DECL_INLINE before handing a synthesized method to the
16774 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16776 * method.c (synthesize_method): Remove July 30 change to never set
16777 DECL_INLINE if at_eof.
16779 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
16781 * xref.c (GNU_xref_member): Ensure that the node has a
16782 decl_lang_specific part before checking DECL_FRIEND_P.
16784 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16786 * pt.c (instantiate_class_template): Diagnose non-class types used
16789 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
16791 * typeck.c (build_conditional_expr): Use convert_for_initialization
16792 instead of convert_and_check.
16794 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16796 * parse.y (typespec): Don't pedwarn for typeof.
16798 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
16800 * repo.c (finish_repo): Only check changes if we would write a
16803 * call.c (compare_ics): Fix handling of 'this' conversions.
16805 * pt.c (do_decl_instantiation): Support static data too. Rename
16806 from do_function_instantiation.
16807 * cp-tree.h: Adjust.
16810 * repo.c (extract_string): New fn.
16811 (get_base_filename): Use it.
16812 (init_repo): Compare old args with current args.
16814 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
16816 * Makefile.in, Make-lang.in: Protect C-ls with a comment
16817 character, idea from Paul Eggert <eggert@twinsun.com>.
16819 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
16821 * typeck.c (c_expand_return): Be more persistent in looking for
16824 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16825 pointer to reference.
16827 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16829 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
16831 * init.c (build_member_call, build_offset_ref):
16832 Use do_scoped_id instead of do_identifier.
16834 * cvt.c (convert): Remove bogosity.
16836 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16838 * cvt.c (build_up_reference): Do checks of ARGTYPE and
16839 TARGET_TYPE before trying to use get_binfo.
16841 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
16843 * cvt.c (build_up_reference): Call get_binfo to get access control.
16845 * decl2.c (import_export_decl): If we don't support weaks, leave
16848 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
16850 * except.c (expand_builtin_throw): Add support for machines that
16851 cannot access globals after throw's epilogue when
16852 -fno-sjlj-exceptions is used.
16854 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
16856 * parse.y: 'std::' becomes '::'.
16857 * lex.c (real_yylex): Remove 'namespace' warning.
16858 * init.c (build_member_call): Ignore 'std::'.
16859 (build_offset_ref): Likewise.
16860 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16861 (do_toplevel_using_decl): Ignore 'using std::whatever'.
16862 * decl.c (push_namespace): Just sorry.
16863 (pop_namespace): Nop.
16864 (init_decl_processing): Declare std namespace.
16866 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
16868 * search.c (push_class_decls): A name which ambiguously refers to
16869 several instantiations of the same template just refers to the
16872 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
16874 * decl.c (build_enumerator): Fix problem with unsigned long
16875 enumerated values being smashed to ints, causing overflow
16876 when computing next enumerated value (for enum values around
16879 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
16881 * typeck.c (build_component_ref): Only call mark_used on a decl.
16883 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16885 * typeck.c (build_c_cast): Make the check for a ptr to function
16886 more specific before possible default_conversion call.
16888 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
16890 * except.c (expand_exception_blocks): Simplify and fix and make
16891 sure we don't end a region in a sequence, as expand_end_bindings
16894 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
16896 * except.c (init_exception_processing): Mark terminate as not
16897 returning so that the optimizer can optimize better.
16899 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
16901 * cvt.c (convert): Don't do any extra work, if we can avoid it
16904 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
16906 * *.[chy]: Change cp_convert to ocp_convert, change convert to
16907 cp_convert. convert is now reserved for the backend, and doesn't
16908 have the semantics a frontend person should ever want.
16910 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16912 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
16913 Lose -traditional support.
16915 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
16917 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
16919 * parse.y (self_reference): Do it for templates, too.
16920 * class.c (pushclass): Don't overload_template_name; the alias
16921 generated by build_self_reference serves the same purpose.
16923 * tree.c (list_hash): Make static, take more args.
16924 (list_hash_lookup): Likewise.
16925 (list_hash_add): Make static.
16926 (list_hash_canon): Lose.
16927 (hash_tree_cons): Only build a new node if one isn't already in the
16929 (hash_tree_chain): Use hash_tree_cons.
16930 * cp-tree.h: Adjust.
16931 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
16932 of calling lookup_name.
16934 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
16936 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
16937 doesn't refer to the CONST_DECLs.
16939 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
16941 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
16943 (expand_class_desc): Convert the last argument to a sizetype.
16945 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
16947 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
16948 __real__): Add reswords.
16949 * hash.h: Regenerate.
16950 * lex.h (rid): Add RID_COMPLEX.
16951 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
16952 * lex.c (init_lex): Add building of RID_COMPLEX.
16953 (real_yylex): General cleanup in line with what c-lex.c also has,
16954 sans the cruft for traditional; add handling of SPEC_IMAG, complex
16955 types, and imaginary numeric constants.
16956 * parse.y (REALPART, IMAGPART): Add tokens.
16957 (unary_expr): Add REALPART and IMAGPART rules.
16958 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
16959 * decl.c (complex_{integer,float,double,long}_type_node): Define
16961 (init_decl_processing): Set up the types.
16962 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
16963 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
16964 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16965 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
16966 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
16968 * method.c (build_overload_name): Add handling of the different
16969 COMPLEX_TYPEs, prefixing them with `J'.
16970 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
16971 as a template parm.
16972 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
16973 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
16974 (mapcar): Handle COMPLEX_CST.
16975 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
16976 (common_type): Add code for complex types.
16977 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
16978 (convert_for_assignment): Likewise.
16979 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
16981 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
16983 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
16984 tsubst_expr, as it might try to do overload resolution.
16986 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
16988 * pt.c (instantiate_class_template): Oops.
16990 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
16992 * cp-tree.def: Add TAG_DEFN.
16993 * pt.c (tsubst_enum): New fn.
16994 (instantiate_class_template): Use it.
16995 (tsubst_expr): Support TAG_DEFN.
16996 (tsubst): Support local enums.
16997 (tsubst_copy): Likewise.
16998 * decl.c (finish_enum): Likewise.
16999 (start_enum): If this is a local enum, switch to permanent_obstack.
17001 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
17003 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17004 (finish_function): Put the base init code for constructors just
17005 after the parm cleanup insns.
17006 (struct cp_function): Add last_parm_cleanup_insn.
17007 (push_cp_function_context): Likewise.
17008 (pop_cp_function_context): Likewise.
17010 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17012 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17014 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17016 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17017 for THUNK_FNDECL before we switch to temporary allocation.
17019 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
17021 * call.c (build_new_op): Handle null arg2 for ?:.
17023 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
17025 * except.c (expand_exception_blocks): Ensure that we flow through
17026 the end of the exception region for the exception specification.
17027 Move exception region for the exception specification in, so that
17028 it doesn't protect the parm cleanup. Remove some obsolete code.
17029 * decl.c (store_parm_decls): Likewise.
17030 (finish_function): Likewise.
17032 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17034 * init.c (build_new): Fix nothrow handling.
17036 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17038 * init.c (emit_base_init): Don't warn about the initialization
17039 list for an artificial member.
17041 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17043 * expr.c (do_case): Handle !START case for the error msg.
17045 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
17047 * decl2.c, lang-options.h: New option -Weffc++.
17048 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17051 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17052 to MULTIPLE_SYMBOL_SPACES.
17054 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17056 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17058 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17060 * typeck.c (c_expand_return): Don't complain about returning void
17061 to void in an artificial function.
17062 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17063 don't set DECL_RESULT, set DECL_ARTIFICIAL.
17064 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17066 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
17068 * init.c (init_decl_processing): Add support for setjmp/longjmp based
17069 exception handling.
17070 * except.c (init_exception_processing): Likewise.
17071 (expand_end_catch_block): Likewise.
17072 (expand_exception_blocks): Likewise.
17073 (expand_throw): Likewise.
17074 * exception.cc (__default_terminate): Likewise.
17076 * init.c (perform_member_init): Use new method of expr level
17077 cleanups, instead of cleanups_this_call and friends.
17078 (emit_base_init): Likewise.
17079 (expand_aggr_vbase_init_1): Likewise.
17080 (expand_vec_init): Likewise.
17081 * decl.c (cp_finish_decl): Likewise.
17082 (expand_static_init): Likewise.
17083 (store_parm_decls): Likewise.
17084 (cplus_expand_expr_stmt): Likewise.
17085 * decl2.c (finish_file): Likewise.
17087 * Make-lang.in (exception.o): Ok to compile with -O now.
17089 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17090 we know it will be done later by the backend.
17092 * decl2.c (lang_f_options): Remove support for short temps.
17093 * lang-options.h: Likewise.
17095 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17097 * tree.c (varargs_function_p): New fn.
17098 * method.c (emit_thunk): Replace broken generic code with code to
17099 generate a heavyweight thunk function.
17101 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
17103 * pt.c (process_template_parm): pedwarn about floating-point parms.
17105 * decl.c (grokdeclarator): inline no longer implies static.
17107 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17109 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17111 * class.c (check_for_override): The signature of an overriding
17112 function is not changed.
17114 * call.c (build_over_call): Move setting of conv into the loop.
17115 Note: this change, along with the related changes of the 18th thru
17116 the 20th of April, fix an infinite loop problem in conversions.
17118 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17120 * call.c (build_user_type_conversion_1): Really ignore rvalue
17121 conversions when looking for a REFERENCE_TYPE.
17123 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17124 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17125 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17126 (build_unary_op): Likewise.
17127 * call.c (build_over_call): See through a CONVERT_EXPR around the
17128 ADDR_EXPR for on a temporary.
17129 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17130 the ADDR_EXPR for a local variable.
17132 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17134 * call.c (build_user_type_conversion_1): If we're trying to
17135 convert to a REFERENCE_TYPE, only consider lvalue conversions.
17136 (build_new_function_call): Print candidates.
17137 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17138 (reference_binding): Binding a temporary of a reference-related type
17141 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17143 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17144 * tinfo2.cc (type_info::before): Likewise.
17146 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17148 * call.c (implicit_conversion): Oops.
17150 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17152 * call.c (implicit_conversion): Try to find a reference conversion
17153 before binding a const reference to a temporary.
17155 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
17157 * exception.cc (__default_unexpected): Call terminate by default,
17158 so that if the user overrides terminate, the correct function will
17161 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
17163 * parse.y (left_curly): Avoid trying to use any fields of
17164 error_mark_node, as there aren't any.
17166 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17168 * lex.c (do_identifier): Avoid breaking on overloaded methods
17169 as default arguments.
17171 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
17173 * call.c (add_template_candidate): Initialize the variable "dummy".
17175 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
17177 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17178 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17180 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17182 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17183 (debug_binfo): Delete decl, not needed.
17185 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17186 promotes_to_aggr_type): Delete fns.
17187 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17188 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17189 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17191 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17193 * friend.c (is_friend_type): Delete fn.
17194 * cp-tree.h (is_friend_type): Delete decl.
17196 * decl.c (original_result_rtx, double_ftype_double,
17197 double_ftype_double_double, int_ftype_int, long_ftype_long,
17198 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17199 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17201 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17203 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17205 * decl.c (pushdecl_nonclass_level): #if 0, unused.
17206 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17208 * lex.c (reinit_lang_specific): #if 0, unused.
17209 * cp-tree.h (reinit_lang_specific): #if 0 decl.
17211 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17212 * cp-tree.h (revert_static_member_fn): Delete decl.
17214 * class.c (root_lang_context_p): Delete fn.
17215 * cp-tree.h (root_lang_context_p): Delete decl.
17217 * decl.c (set_current_level_tags_transparency): #if 0, unused.
17218 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17220 * lex.c (set_vardecl_interface_info): Make static.
17221 * cp-tree.h (set_vardecl_interface_info): Delete decl.
17223 * call.c (find_scoped_type): Make static.
17224 * cp-tree.h (find_scoped_type): Delete decl.
17226 * search.c (convert_pointer_to_vbase): Make static.
17227 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17229 * decl.c (const_ptr_type_node): Likewise.
17230 * cp-tree.h (const_ptr_type_node): Delete decl.
17232 * typeck.c (common_base_type): Make static.
17233 * cp-tree.h (common_base_types): Delete erroneous decl.
17235 * pt.c (classtype_mangled_name): Make static.
17236 * cp-tree.h (classtype_mangled_name): Delete decl.
17238 * lex.c (check_newline): Make static.
17239 * cp-tree.h (check_newline): Delete decl.
17241 * typeck.c (build_x_array_ref): Delete fn, same idea as
17243 * cp-tree.h (build_x_array_ref): Delete decl.
17245 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17247 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17249 * class.c (build_vtable_entry): Make static.
17250 * cp-tree.h (build_vtable_entry): Delete decl.
17252 * class.c (build_vbase_pointer): Make static.
17253 * cp-tree.h (build_vbase_pointer): Delete decl.
17255 * sig.c (build_sptr_ref): Add forward decl and make static.
17256 * cp-tree.h (build_sptr_ref): Delete decl.
17258 * call.c (build_new_method_call): Add forward decl and make static.
17259 * cp-tree.h (build_new_method_call): Delete decl.
17261 * call.c (build_object_call): Make static.
17262 * class.c (check_for_override, complete_type_p, mark_overriders):
17264 * decl.c (cp_function_chain): Likewise.
17265 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17267 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17269 * tree.c (build_cplus_array_type_1): Likewise.
17270 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17271 (comp_target_parms): Likewise.
17273 * init.c (build_builtin_call): Make static.
17274 * cp-tree.h (build_builtin_call): Delete decl.
17276 * typeck.c (binary_op_error): Delete decl.
17277 * cp-tree.h (binary_op_error): Likewise.
17279 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17281 * call.c (build_method_call): Compare against error_mark_node
17282 directly, rather than the ERROR_MARK tree code.
17283 * cvt.c (cp_convert): Likewise.
17284 * decl.c (print_binding_level): Likewise.
17285 (duplicate_decls): Likewise.
17286 (grokdeclarator): Likewise.
17287 (grokdeclarator): Likewise.
17288 * init.c (expand_aggr_init_1): Likewise.
17289 (decl_constant_value): Likewise.
17290 * method.c (build_opfncall): Likewise.
17291 (hack_identifier): Likewise.
17292 * typeck.c (build_modify_expr): Likewise.
17294 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17296 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17298 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17300 * pt.c (coerce_template_parms): Add new error message.
17302 * method.c (build_overload_value): Implement name mangling for
17303 floating-point template arguments.
17305 * method.c (build_overload_int, icat, dicat): Fix mangling of template
17306 arguments whose absolute value doesn't fit in a signed word.
17308 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17310 * friend.c: New file; put all of the friend stuff in here.
17311 * init.c: Instead of here.
17312 * Makefile.in (CXX_OBJS): Add friend.o.
17313 (friend.o): Add dependencies.
17314 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17316 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
17318 * call.c (build_scoped_method_call): Complain if the scope isn't a
17321 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17323 * parse.y (left_curly): Don't crash on erroneous type.
17325 * init.c (build_delete): Fix type of ref.
17327 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17329 * search.c (get_vbase_1): Renamed from get_vbase.
17330 (get_vbase): Wrapper, now non-static.
17331 (convert_pointer_to_vbase): Now static.
17333 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17334 * init.c (build_delete): Pass one.
17335 (build_partial_cleanup_for): Use build_scoped_method_call.
17336 * decl.c (finish_function): Pass a binfo.
17338 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17340 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17342 * typeck.c (build_c_cast): Lose other reference to flag.
17344 * call.c (build_field_call): Don't look for [cd]tor_identifier.
17345 * decl2.c (delete_sanity): Remove meaningless use of
17346 LOOKUP_HAS_IN_CHARGE.
17347 * decl.c (finish_function): Use build_scoped_method_call instead
17348 of build_delete for running vbase dtors.
17349 * init.c (build_delete): Call overload resolution code instead of
17350 duplicating it badly.
17352 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
17354 * call.c (build_over_call): Call mark_used before trying to elide
17357 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17359 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17361 * typeck.c (build_modify_expr): Always pedwarn for a cast to
17362 non-reference used as an lvalue.
17364 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17366 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17368 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17370 * parse.y (handler): Fix template typo.
17372 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17374 * error.c (lang_decl_name): New fn.
17375 * tree.c (lang_printable_name): Use it.
17377 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
17379 * g++spec.c: Include config.h so that we can catch bzero #defines
17380 from the config file.
17382 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
17384 * new1.cc: Include a declaration for malloc, to avoid warning, and
17385 avoid lossing on systems that require one (ones that define malloc
17388 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17390 * decl2.c (max_tinst_depth): New variable.
17391 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17393 * pt.c (max_tinst_depth): Variable moved.
17394 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17397 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17399 * decl.c (xref_basetypes): Allow a base class that depends on
17400 template parms to be incomplete.
17402 * decl2.c (build_expr_from_tree): Support typeid(type).
17403 * rtti.c (get_typeid): Support templates.
17404 (expand_si_desc, expand_class_desc): Fix string length.
17405 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17407 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17409 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17411 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17413 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17415 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17416 smashes together template and non-template decls of the same
17419 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
17421 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17423 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17425 * decl.c (duplicate_decls): Next route, pedwarn about different
17426 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17428 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17430 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17431 (struct lang_type): Delete has_default_implementation member.
17432 Increase dummy to 21.
17433 * decl.c (start_method): Delete usage.
17435 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17436 store_after_parms, start_decl_1, auto_function): Add decls.
17437 (get_arglist_len_in_bytes, declare_implicit_exception,
17438 have_exceptions_p, make_type_decl, typedecl_for_tag,
17439 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17440 build_component_type_expr, cplus_exception_name,
17441 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17442 * call.c (build_this): Make static.
17443 (is_complete): Likewise.
17444 (implicit_conversion): Likewise.
17445 (reference_binding): Likewise.
17446 (standard_conversion): Likewise.
17447 (strip_top_quals): Likewise.
17448 (non_reference): Likewise.
17449 (build_conv): Likewise.
17450 (user_harshness): Likewise.
17451 (rank_for_ideal): Likewise.
17452 * decl.c (start_decl_1): Delete forward decl.
17453 (push_decl_level): Make static.
17454 (resume_binding_level): Make static.
17455 (namespace_bindings_p): Make static.
17456 (declare_namespace_level): Make static.
17457 (lookup_name_real): Make static.
17458 (duplicate_decls): Make static. Take register off NEWDECL and
17459 OLDDECL parm decls.
17460 * decl2.c (get_sentry): Make static.
17461 (temp_name_p): Delete fn.
17462 * except.c (auto_function): Delete decl.
17463 * lex.c (handle_{cp,sysv}_pragma): Make static.
17464 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17465 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17466 * pt.c (tsubst_expr_values): Make static.
17467 * rtti.c (combine_strings): Delete decl.
17469 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
17471 * pt.c (push_template_decl): Handle getting a typedef.
17473 * call.c (build_new_function_call): Complain about void arg.
17475 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17477 * decl.c (duplicate_decls): Give pedwarn of different exceptions
17478 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17480 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
17482 * except.c (expand_throw): Don't expand the cleanup tree here,
17483 since we are not going to write the rtl out. Fixes problem with
17486 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
17488 * Make-lang.in: Add $(exeext) as necessary.
17490 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
17492 * parse.y (handler_seq): Must have at least one catch clause.
17494 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
17496 * call.c (add_builtin_candidate): Restore ?: hack.
17498 * decl.c (grok_op_properties): More warnings.
17500 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17502 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17503 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17505 * decl.c (duplicate_decls): Scale back to a warning, and only do
17508 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
17510 * decl.c (duplicate_decls): pedwarn mismatched exception
17513 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
17515 * call.c (build_new_method_call): Don't display the invisible
17516 argument for controlling virtual bases.
17518 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
17520 * new: Add nothrow new and delete, bad_alloc and throw specifications
17522 * decl.c (init_decl_processing): Add throw specification for delete.
17523 * new.cc (nothrow): Define.
17524 * lex.c (real_yylex): Removing warning that throw and friends are
17526 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
17527 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
17528 * Make-lang.in: Add new{1,2}.{cc,o}.
17530 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17532 * lex.c (cons_up_default_function): Fix return type of synth op=.
17534 * init.c (emit_base_init): Add warnings for uninitialized members
17537 * decl.c (xref_basetypes): Add warning for non-polymorphic type
17538 with destructor used as base type.
17540 * decl.c (grok_op_properties): Add warning for op= returning void.
17541 * typeck.c (c_expand_return): Add warning for op= returning anything
17544 * class.c (finish_struct_1): Add warning for class with pointers
17545 but not copy ctor or copy op=.
17547 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
17548 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
17549 (instantiate_template): If -fexternal-templates, add this
17550 instantiation to pending_templates.
17552 * decl2.c (copy_assignment_arg_p): Disable old hack to support
17555 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
17557 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
17559 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
17561 * call.c (standard_conversion): Handle getting references. Tack
17562 on RVALUE_CONV here. Do it for non-class types, too.
17563 (reference_binding): Pass references to standard_conversion.
17564 (implicit_conversion): Likewise.
17565 (add_builtin_candidate): Disable one ?: kludge.
17566 (convert_like): Handle RVALUE_CONVs for non-class types.
17567 (joust): Disable the other ?: kludge.
17569 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17571 * decl.c (init_decl_processing): Add code to build up common
17572 function types beforehand, to avoid creation then removal of
17573 things already in the hash table.
17575 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17577 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
17580 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
17581 current_template_parms.
17583 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
17585 * search.c (lookup_field): Don't return a function, check want_type.
17587 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17589 * init.c (build_new): Make sure PLACEMENT has a type.
17591 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17593 * init.c (build_new): Support new (nothrow).
17595 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17597 * pt.c (instantiate_decl): Also do push_to_top_level before setting
17600 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
17601 * pt.c (tsubst): Defer instantiation of default args.
17602 * call.c (build_over_call): Until here.
17604 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17606 * search.c (lookup_field): Make sure we have an
17607 IDENTIFIER_CLASS_VALUE before we try to return it.
17609 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
17611 * call.c (build_method_call): Delete unused var PARM.
17612 (build_overload_call_real): Likewise.
17613 (build_object_call): Delete unused var P.
17614 (build_new_op): Likewise.
17615 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
17616 var definitions, which are never used.
17617 (shadow_tag): Delete unused var FN.
17618 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
17619 * init.c (build_new): Delete unused var ALLOC_TEMP.
17620 * method.c (hack_identifier): Delete unused var CONTEXT.
17621 (do_build_copy_constructor): Delete unused var NAME.
17622 (synthesize_method): Delete unused var BASE.
17623 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
17624 * rtti.c (build_headof): Delete unused var VPTR.
17625 (get_typeid): Delete unused var T.
17626 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
17628 (build_ptrmemfunc): Delete unused vars U and NINDEX.
17629 * typeck2.c (build_functional_cast): Delete unused var BINFO.
17631 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
17633 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
17634 things in a type being defined.
17635 * decl.c (finish_enum): Reverse the values so that they are in
17638 * pt.c (instantiate_class_template): Don't initialize
17639 BINFO_BASETYPES until the vector is filled out.
17640 (unify): Don't abort on conflicting bindings, just fail.
17641 (instantiate_decl): Do push_tinst_level before any tsubsting.
17643 * method.c (build_overload_value): Handle getting a
17644 TEMPLATE_CONST_PARM for a pointer.
17646 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
17648 * init.c (expand_member_init): Don't give 'not a base' error for
17651 * pt.c (instantiate_decl): Call import_export_decl later.
17653 * pt.c (instantiate_class_template): Return a value.
17655 * parse.y (extension): New rule for __extension__.
17656 (extdef, unary_expr, decl, component_decl): Use it.
17658 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
17660 * class.c (base_binfo): Remove unused base_has_virtual member.
17661 (finish_base_struct): Likewise.
17662 (finish_struct_1): Likewise.
17664 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
17666 * search.c (expand_upcast_fixups): Fix bogus code generation
17667 problem where the generated code uses the wrong index into the
17668 runtime built vtable on the stack. Old code could clobber random
17671 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
17673 * init.c (perform_member_init): Make sure the partial EH cleanups
17674 live on the function_obstack.
17676 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
17678 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
17679 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
17681 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
17683 * decl.c (grokvardecl): Avoid ANSI style initialization.
17685 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
17687 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
17689 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17691 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
17693 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17695 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
17696 arguments we compare against. Start the count of I at 1, not 0,
17697 since argv[0] is still the command.
17699 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
17701 * lang-specs.h: Accept .cp as an C++ extension.
17703 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17705 * cp-tree.h (ptr_reasonably_similar): Add decl.
17707 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17709 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
17710 pointer. New local SPECBITS with the parm's value.
17711 (grokdeclarator): Pass &specbits down.
17713 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
17714 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
17716 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
17717 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
17719 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
17720 not an error_mark_node.
17722 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17724 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
17725 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
17727 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17729 * decl.c (grokdeclarator): When giving an anonymous struct a name,
17730 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
17733 * typeck2.c (build_m_component_ref): If component is a pointer
17734 to data member, resolve the OFFSET_REF now.
17736 * call.c (convert_like): Don't go into infinite recursion.
17738 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
17740 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
17741 * tree.c (layout_basetypes): And on the vbase ptr.
17743 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
17745 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
17746 CHAR_TYPE_SIZE so bool is always the same size as another type.
17748 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
17750 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
17752 * decl2.c (grok_x_components): Remove synthesized methods from
17753 TYPE_METHODS of an anonymous union, complain about member
17755 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
17757 (finish_function): Just clear the DECL_RTL of our arguments.
17759 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17761 * decl2.c (finish_file): Emit DWARF debugging info for static data
17764 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
17766 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
17768 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
17771 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
17773 * Make-lang.in (g++-cross$(exeext)): Fix typo.
17775 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17777 Make the g++ driver now be a standalone program, rather than one
17778 that tries to run the gcc driver after munging up the options.
17779 * Make-lang.in (g++.c, g++spec.o): New rules.
17780 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
17782 (g++$(exeext)): New rule, based on xgcc rule.
17783 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
17784 * g++spec.c: New file.
17785 * g++.c: Removed file.
17787 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
17789 * cvt.c (build_up_reference): Arrange for any temporary values
17790 that have been keep in registers until now to be put into memory.
17792 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17794 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
17795 that make -j3 bootstrap works better.
17797 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
17799 * decl.c (pushtag): Do pushdecl for anon tags.
17801 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
17803 * typeck.c (c_expand_return): Fix logic.
17804 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
17806 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
17808 * g++.c (main): Make sure arglist has a final NULL entry. Add
17809 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
17810 stdin/stdout of the invoked program are redirected to
17813 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17815 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
17817 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
17819 * init.c (resolve_offset_ref): Handle obj.vfn better.
17820 * typeck.c (build_component_ref): Set TREE_TYPE on result from
17823 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
17825 * typeck.c (convert_for_assignment): Also handle anachronistic
17826 implicit conversions from (::*)() to cv void*.
17827 * cvt.c (cp_convert_to_pointer): Likewise.
17829 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17831 * lex.c (handle_cp_pragma): Fix bogus warning.
17833 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
17835 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
17836 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
17838 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17840 * class.c (finish_struct_1): Support DWARF2_DEBUG.
17841 * search.c (dfs_debug_mark): Likewise.
17842 * decl2.c (finish_vtable_vardecl): Likewise.
17843 * decl.c (pushtag, finish_enum): Likewise.
17844 * lex.c (check_newline): Use debug_* instead of calling *out
17845 functions directly.
17847 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17849 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
17850 on some picky hosts.
17852 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
17854 * class.c (finish_struct_1): A class has a non-trivial copy
17855 constructor if it has virtual functions.
17857 * cvt.c (cp_convert): Always call a constructor.
17859 * call.c (reference_binding): Still tack on a REF_BIND
17860 for bad conversions.
17861 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
17863 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
17864 (c_expand_return): Likewise.
17865 * typeck2.c (digest_init): Likewise for { }.
17866 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
17867 * cvt.c (cp_convert): Handle failure better.
17869 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17871 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
17872 of GCC be path-relative.
17874 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
17876 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
17877 it does need choose-temp.o and pexecute.o.
17879 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17881 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
17882 that we still use it.
17883 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
17885 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17887 * init.c (expand_default_init): Avoid calling constructors to
17888 initialize reference temps.
17890 * cvt.c (convert_to_reference): Fix.
17892 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
17894 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
17895 (convert_to_reference): Likewise.
17896 * typeck.c (convert_for_initialization): Likewise.
17897 * init.c (expand_default_init): Likewise.
17898 (expand_aggr_init_1): Likewise.
17899 * cp-tree.h (CONV_NONCONVERTING): Lose.
17900 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
17902 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
17904 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
17906 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
17908 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17910 * init.c (expand_aggr_init_1): Don't crash on non-constructor
17913 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17915 * g++.c: Include gansidecl.h.
17916 (VPROTO, PVPROTO, VA_START): Delete.
17917 (choose_temp_base_try, choose_temp_base, perror_exec,
17918 run_dos) [__MSDOS__]: Delete fns.
17919 (pfatal_with_name): Delete fn.
17920 (temp_filename): Declare like in gcc.c.
17921 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
17922 (error_count, signal_count): Define.
17923 (error): Delete both definitions.
17924 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
17925 (pfatal_pexecute): Add fn from gcc.c.
17926 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
17927 code to use the pexecute stuff also used by gcc.c.
17928 (MIN_FATAL_STATUS): Define.
17929 * Make-lang.in (g++): Add dependency on and linking with
17930 choose-temp.o and pexecute.o.
17932 * cp-tree.h: Include gansidecl.h.
17933 (STDIO_PROTO): Delete #undef/#define.
17934 * cvt.c (NULL): Delete #undef/#define.
17935 * expr.c (NULL): Likewise.
17936 * init.c (NULL): Likewise.
17937 * rtti.c (NULL): Likewise.
17938 * xref.c (NULL): Likewise.
17940 * cp-tree.h (build_user_type_conversion): Add prototype.
17941 * call.c (build_user_type_conversion): Delete prototype. Correct
17942 decl of FLAGS arg to be an int.
17943 * cvt.c (build_user_type_conversion): Likewise.
17945 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
17947 * cp-tree.def: Add TRY_BLOCK and HANDLER.
17948 * except.c (expand_start_catch_block): Support templates.
17949 * parse.y (try_block, handler_seq): Likewise.
17950 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
17952 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
17954 * pt.c (current_template_args): New fn.
17955 (push_template_decl): Use it.
17956 * decl.c (grokdeclarator): Use it.
17958 * decl2.c (build_expr_from_tree): Dereference ref vars.
17960 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
17961 the decl-specifier-seq.
17963 * decl.c (grok_op_properties): Don't force the type of a conversion
17964 op to be complete. Don't warn about converting to the same type
17965 for template instantiations.
17967 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
17970 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
17972 * typeck.c (get_delta_difference): Remove previous bogusness.
17973 Don't give errors if force is set.
17975 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17977 * decl2.c (finish_file): Don't emit debug info.
17978 * decl.c (pushdecl): Lose obsolete code.
17979 (grokdeclarator): Still do the long long thing after complaining.
17980 * search.c (note_debug_info_needed): Don't do anything if we're in a
17982 * method.c (synthesize_method): For non-local classes,
17983 push_to_top_level first.
17985 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
17987 * typeck.c (get_delta_difference): Add no_error parameter.
17988 (build_ptrmemfunc): Call get_delta_difference with no_error set;
17989 we don't want error messages when converting unrelated
17990 pointer-to-member functions.
17992 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
17994 * error.c (dump_expr): Improve the wording on error messages that
17995 involve pointer to member functions.
17997 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
17999 * cvt.c (cp_convert_to_pointer): Move code for conversions from
18000 (::*)() to void* or (*)() up a bit, so that we can convert from
18001 METHOD_TYPEs as well.
18003 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18005 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18006 There are no 'member' types.
18007 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18008 (build_x_typeid): Handle errors.
18010 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
18012 * typeck.c (convert_for_assignment): Handle anachronistic implicit
18013 conversions from (::*)() to void* or (*)().
18014 * cvt.c (cp_convert_to_pointer): Likewise.
18015 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18016 conversions from here.
18017 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18018 * lang-options.h: Likewise.
18019 * decl2.c (warn_pmf2ptr): Define.
18020 * cp-tree.h: Declare it.
18021 * typeck2.c (digest_init): Allow pmfs down into
18022 convert_for_initialization.
18024 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18026 * typeck.c (c_expand_return): Fix for returning overloaded fn.
18028 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18030 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18031 * decl.c (grok_reference_init): Pass DIRECT_BIND.
18032 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
18034 * call.c (convert_like): Don't pass INDIRECT_BIND.
18035 * typeck.c (convert_arguments): Likewise.
18036 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18038 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18040 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18041 similar code in build_up_ref.
18042 * cvt.c (build_up_reference): Drastically simplify.
18044 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
18046 * typeck.c (signed_or_unsigned_type): If the given type already
18047 as the correct signedness, then just return it.
18049 * typeck.c ({un,}signed_type): If can't do anything, call
18050 signed_or_unsigned_type.
18052 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
18054 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18055 current_class_type is NULL.
18057 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
18059 * class.c (finish_struct_1): Avoid empty structs by adding a field
18060 so layout_type gets the mode right.
18062 * typeck.c (c_expand_return): Drastically simplify.
18064 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18066 * typeck.c (decay_conversion): Handle overloaded methods.
18068 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18070 * call.c (build_over_call): A TARGET_EXPR has side-effects.
18072 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
18074 * cvt.c (convert_to_pointer_force): Add code to support pointer to
18075 member function to pointer to function conversions.
18076 * init.c (resolve_offset_ref): Add code to allow faked up objects,
18077 ignoring them if they are not used, and giving an error, if they
18079 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18080 code, and so that we can give an error, if we needed an object,
18081 and one was not provided.
18082 (build_c_cast): Don't call default_conversion when we want to
18083 convert to pointer to function from a METHOD_TYPE.
18085 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18087 * Make-lang.in (cplib2.ready): Fix logic.
18089 * decl.c (shadow_tag): Only complain about non-artificial function
18092 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18094 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18096 * expr.c (cplus_expand_expr): Pre-tweak call_target like
18097 expand_inline_function would.
18099 * pt.c (mark_decl_instantiated): If extern_p, call
18100 mark_inline_for_output.
18102 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
18104 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18107 * typeck.c (get_delta_difference): Fix wording, as we can be used
18108 for pointer to data members.
18110 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
18112 * pt.c (tsubst): If the function decl isn't a member of this
18113 template, return a copy of the decl (including copying the
18114 lang-specific part) so we don't hose ourselves later.
18116 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18118 * class.c (finish_struct): Remove DWARF-specific tag handling.
18119 * decl.c (pushtag): Likewise.
18120 (finish_function): Always clear DECL_ARGUMENTS on function decls with
18122 * decl2.c (finish_file): Emit DWARF debugging info for static data
18125 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
18127 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18128 isn't the same as the new one before we whack it.
18130 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
18132 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18133 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18134 warn_traditional and warn_strict_prototypes; remove ancient
18135 'overload' code; remove references to flag_traditional.
18137 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
18139 * input.c (sub_getch): Handle 8-bit characters in string literals.
18141 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
18143 * tree.c (mapcar): Handle CONSTRUCTORs.
18144 (copy_to_permanent): Handle expression_obstack properly.
18146 * Make-lang.in (cplib2.txt): Also depend on the headers.
18148 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18150 (expand_class_desc): Use USItype for offset field.
18151 * tinfo.h (struct __class_type_info): Likewise.
18153 * method.c (build_overload_int): TYPE_PRECISION should be applied
18156 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18158 * call.c (build_new_op): A COND_EXPR involving void must be a
18161 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18163 * typeck.c (build_x_component_ref): New fn.
18164 (build_object_ref): Use it.
18165 * parse.y (primary): Use it.
18166 * decl2.c (build_expr_from_tree): Use it.
18167 * cp-tree.h: Declare it.
18169 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18170 * error.c (dump_type_suffix): Handle variable arrays.
18172 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18174 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18176 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18178 * decl.c (lookup_name_real): Don't try to look up anything in a
18181 * tinfo2.cc (__throw_type_match_rtti): Oops.
18183 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18185 * Make-lang.in (exception.o): Use -fno-PIC for now.
18187 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18189 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18191 (get_tinfo_fn_dynamic): Extracted from build_typeid.
18192 * tinfo2.cc (__dynamic_cast): Adjust.
18194 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18195 (build_x_typeid): Likewise.
18197 * parse.y: Call build_x_typeid instead of build_typeid.
18198 * cp-tree.def: Add TYPEID_EXPR.
18199 * pt.c (tsubst_copy): Handle typeid.
18200 * decl2.c (build_expr_from_tree): Likewise.
18201 * rtti.c (build_x_typeid): Throw bad_typeid from here.
18202 (build_typeid): Not here.
18203 * cp-tree.h: Declare build_x_typeid.
18205 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
18207 * call.c (convert_like): Pull out constant values.
18209 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18211 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18213 * decl.c (init_decl_processing): Create short int types before
18214 creating size_t in case a machine description needs to use
18215 unsigned short for size_t.
18217 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18219 * Make-lang.in (exception.o): Turn off pic.
18221 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18222 type, multi-level ptr conversions.
18224 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18225 (throw_bad_cast): Use it.
18226 (throw_bad_typeid): New fn.
18227 (build_typeid): Throw bad_typeid as needed.
18229 (synthesize_tinfo_fn): Handle functions and arrays before checking
18232 * Remove .h from standard C++ headers, add new.h, move into inc
18235 * exception*: Remove pointer from object, constructors. Add
18236 default exception::what that uses type_info::name. Add
18237 __throw_bad_typeid.
18239 * init.c (build_new): Don't add a cookie to new (void *) T[2].
18241 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
18243 * Make-lang.in: Building C++ code depends on cc1plus.
18245 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18247 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18248 a HOST_WIDE_INT, not a tree.
18250 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
18252 * exception.cc: Don't include <stdlib.h>.
18254 * Make-lang.in (c++.clean): Remove cplib2.*.
18256 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
18258 * parse.y (component_decl_1, component_costructor_declarator case):
18259 Pass attributes/prefix_attributes in tree list.
18261 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
18263 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18265 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18267 * lex.c (do_identifier): Don't do deferred lookup in a template
18270 * typeck2.c (store_init_value): Oops.
18272 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18273 New files for C++ lang-support library.
18274 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18275 (CXX_LIB2FUNCS): Define.
18276 And rules for building the C++ lang-support code.
18277 * config-lang.in (headers): Define.
18278 (lib2funcs): Define.
18280 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18282 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18284 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18285 * typeck2.c (store_init_value): Check for initializing pmf with { }
18287 (process_init_constructor): Not here.
18289 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18291 * pt.c (begin_template_parm_list): Increment
18292 processing_template_decl here.
18293 (end_template_parm_list): Not here.
18294 (process_template_parm): No need to add 1 to it now.
18295 * *.c: Use processing_template_decl instead of current_template_parms
18296 to check for being in a template.
18298 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
18299 (tsubst_copy): Handle CONSTRUCTOR.
18300 (instantiate_decl): Set up context properly for variables.
18301 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18302 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18304 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18306 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18308 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18310 * method.c (make_thunk): Call comdat_linkage before setting the
18313 * decl2.c (comdat_linkage): Use make_decl_one_only.
18314 (import_export_decl): Likewise.
18315 * decl.c (init_decl_processing): Check supports_one_only instead of
18318 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
18320 * decl2.c (grokfield): Tighten checking for access decls.
18322 * decl.c (make_typename_type): Resolve references to
18323 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
18324 (lookup_name_real): Types that depend on a template parameter get
18325 an implicit 'typename' unless they're in the current scope.
18326 (start_decl_1): We don't care about incomplete types that depend
18327 on a template parm.
18328 (grokdeclarator): Resolve 'typename's in the type specifier that
18329 refer to members of the current scope.
18331 * call.c (build_over_call): Remove 'inline called before
18332 definition' diagnostic.
18333 (build_method_call): Likewise.
18334 * decl.c (duplicate_decls): Downgrade 'used before declared
18335 inline' to a warning, only with -Winline.
18337 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
18339 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18341 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18343 * call.c (build_method_call): When calling a signature
18344 default implementation, as in other cases, let instance_ptr simply
18347 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
18349 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18351 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
18353 * except.c (expand_start_catch_block): Add a pushlevel so that -g
18354 works on hppa and SPARC.
18356 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18358 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18360 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18362 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18363 before testing whether it's a signature.
18365 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
18367 * call.c (build_new_method_call): Don't complain about signature
18368 pointers and references not being an aggr type.
18369 (build_this): If a signature pointer or reference was passed in,
18371 (build_new_method_call): If instance is a signature pointer, set
18372 basetype to the signature type of instance.
18373 * sig.c (build_signature_method_call): Deleted basetype and
18374 instance parameters, they can be found as the DECL_CONTEXT of
18375 function and as the first argument passed in.
18376 * cp-tree.h: Changed declaration of build_signature_method_call.
18377 * call.c (build_method_call): Deleted first two arguments in call
18378 of build_signature_method_call.
18379 (build_over_call): Added call to build_signature_method_call.
18381 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18383 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18386 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18388 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18390 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
18392 * except.c (expand_start_try_stmts): Move to except.c in the backend.
18393 (expand_end_try_stmts): Remove.
18395 * init.c (perform_member_init): Use add_partial_entry () instead
18396 of directly manipulating lists.
18397 (emit_base_init): Likewise.
18399 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
18401 * except.c (expand_exception_blocks): Always make sure USE and
18402 CLOBBER insns that came at the end still do, the backend relies
18405 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
18407 * call.c (build_over_call): We can only use a TARGET_EXPR of the
18410 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
18412 * cvt.c (convert_to_reference): Revert last change, don't complain
18413 about temp without target decl.
18415 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
18417 * decl.c (grokdeclarator): Don't core dump when void() is given.
18419 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
18421 * decl.c (copy_args_p): Don't crash.
18423 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
18425 * pt.c (tsubst): And support template args inside the exception
18428 * pt.c (tsubst): Add support for exception specifications in
18429 template functions.
18431 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
18433 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18435 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18436 (start_function): Likewise.
18437 (start_method): Likewise.
18438 (grokfield): Likewise.
18439 (make_call_declarator): Add throw spec parameter.
18440 (set_quals_and_spec): Add routine.
18441 * lex.c (set_quals_and_spec): Likewise.
18442 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18443 * decl.c (shadow_tag): Eliminate the throw spec parameter to
18445 (groktypename): Likewise.
18446 (start_decl): Eliminate the throw spec parameter. Eliminate the
18447 throw spec parameter to grokdeclarator. Eliminate the throw spec
18448 field in DECL_STMT.
18449 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18450 (grokfndecl): Remove useless set of raises.
18451 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
18452 the throw spec parameter to start_decl. Pull the throw spec out
18453 of the call declarator.
18454 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18455 (start_function): Eliminate the throw spec parameter. Eliminate
18456 the throw spec parameter to grokdeclarator.
18457 (start_method): Likewise.
18458 * decl2.c (grokfield): Likewise.
18459 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18460 (grokoptypename): Likewise.
18461 (finish_file): Eliminate the throw spec parameter to
18462 start_function. Add throw spec to make_call_declarator.
18463 * except.c (init_exception_processing): Add throw spec to
18464 make_call_declarator. Eliminate the throw spec parameter to
18466 (expand_start_catch_block): Eliminate the throw spec parameter to
18468 (expand_builtin_throw): Add throw spec to make_call_declarator.
18469 Eliminate the throw spec parameter to start_function.
18470 (start_anon_func): Likewise.
18471 * lex.c (make_call_declarator): Add throw spec parameter.
18472 (set_quals_and_spec): New routine.
18473 (cons_up_default_function): Add throw spec to make_call_declarator.
18474 Eliminate the throw spec parameter to grokfield.
18475 * method.c (synthesize_method): Eliminate the throw spec parameter
18477 * pt.c (process_template_parm): Eliminate the throw spec parameter
18479 (tsubst): Add throw spec to make_call_declarator.
18480 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18481 (do_function_instantiation): Eliminate the throw spec parameter to
18482 grokdeclarator. Eliminate the throw spec parameter to
18484 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18486 * parse.y (datadef): Remove non-winning optimization.
18488 (fndef): Remove ambiguous error productions uncovered by grammar
18490 (constructor_declarator): Add exception_specification_opt here.
18491 (component_constructor_declarator): Likewise.
18492 (direct_after_type_declarator): Likewise.
18493 (complex_direct_notype_declarator): Likewise.
18494 (direct_abstract_declarator): Likewise.
18495 (fn.def1): Remove exception_specification_opt.
18496 (fn.def2): Likewise.
18497 (condition): Likewise.
18498 (initdcl0): Likewise.
18499 (initdcl): Likewise.
18500 (notype_initdcl0): Likewise.
18501 (nomods_initdcl0): Likewise.
18502 (component_decl_1): Likewise.
18503 (component_declarator): Likewise.
18504 (after_type_component_declarator0): Likewise.
18505 (after_type_component_declarator): Likewise.
18506 (notype_component_declarator): Likewise.
18508 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18510 * call.c (build_over_call): Also use an INIT_EXPR when
18511 initializing anything from an rvalue.
18513 * call.c (build_over_call): Call stabilize_reference when building
18514 an INIT_EXPR instead of calling the copy ctor.
18516 * call.c (joust): Extend the previous change to all comparisons.
18518 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18519 NO_LINKAGE_HEURISTICS.
18521 * decl2.c (finish_file): Emit any statics that weren't already.
18523 * typeck.c (build_static_cast): Implement.
18524 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
18525 * decl.c (grokparms): Use can_convert_arg instead of
18526 implicit_conversion directly.
18527 (copy_args_p): New fn.
18528 * cvt.c (convert_to_reference): Don't complain about temp with
18530 (build_up_reference): Handle TARGET_EXPRs.
18531 * call.c (build_over_call): Elide unnecessary temps.
18532 (can_convert*): Use new overloading code.
18534 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18536 * call.c: Move TYPE_PTR*_MACROS ...
18537 * cp-tree.h: To here.
18538 * typeck.c (build_reinterpret_cast): Implement.
18540 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
18542 (joust): If we're comparing a function to a builtin and the worst
18543 conversion for the builtin is worse than the worst conversion for the
18544 function, take the function.
18546 * typeck.c (build_const_cast): Implement.
18547 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
18548 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
18550 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
18552 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
18553 too early. Make sure we explode if exprtype turns out to be a
18554 NULL_TREE when it shouldn't be.
18556 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
18558 * cp-tree.h: New routine make_call_declarator.
18559 * lex.c (make_call_declarator): Define it.
18560 * except.c (init_exception_processing): Use it.
18561 (expand_builtin_throw): Likewise.
18562 (start_anon_func): Likewise.
18563 * decl2.c (finish_file): Likewise.
18564 * lex.c (cons_up_default_function): Likewise.
18565 * parse.y: Likewise.
18566 * pt.c (tsubst): Likewise.
18568 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
18570 * decl2.c (groktypefield): Remove unused code.
18572 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
18574 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
18575 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
18576 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
18577 nonempty_cv_qualifiers.
18580 * lex.c (make_pointer_declarator): Change type_quals into
18582 (make_reference_declarator): Likewise.
18584 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18586 * decl.c (start_function): Only check interface_* for templates
18587 with flag_alt_external_templates.
18589 * call.c (build_new_op): Check for comparison of different enum types.
18590 (build_over_call): Fix arg # output.
18592 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
18594 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
18596 * call.c (build_new_op): Check for erroneous args.
18598 * call.c (build_new_method_call): Add missing args to cp_error.
18600 * tree.c (error_type): Don't print reference-to-array.
18602 * typeck.c (convert_for_assignment): Don't say contravariance for
18605 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
18607 * call.c (build_over_call): Diagnose bad convs for `this'.
18609 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
18612 * call.c (convert_like): Handle bad convs.
18613 (build_over_call): Handle bad convs better.
18615 * decl2.c: -fansi-overloading is now the default.
18617 * call.c (build_new_method_call): Check for erroneous args.
18619 * pt.c (instantiate_class_template): Propagate
18620 TYPE_USES_MULTIPLE_INHERITANCE.
18622 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
18624 * call.c (enforce_access): Add static to routine.
18626 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
18628 * call.c (build_user_type_conversion_1): Fix bad handling.
18629 (compare_ics): Likewise.
18631 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
18633 * call.c (standard_conversion): Oops.
18635 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
18637 * g++.c: Update test for win32 (&& ! cygwin32).
18639 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
18641 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
18642 (ptr_reasonably_similar): New fn.
18643 * call.c (BAD_RANK): New rank.
18644 (ICS_BAD_FLAG): New macro.
18645 (standard_conversion): Handle almost-right pointer conversions.
18646 (reference_binding): Handle bad rvalue bindings.
18647 (add_*_candidate): Stuff.
18648 (build_over_call): Pass bad conversions to convert_for_initialization.
18649 (compare_ics): Handle bad convs.
18652 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
18654 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
18655 integer_type_node when computing pointer offsets.
18657 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18659 * tree.c (lvalue_type): New fn.
18660 (error_type): New fn.
18661 * call.c (op_error): Use error_type.
18662 (add_conv_candidate): Use lvalue_type.
18663 (add_builtin_candidates): Likewise.
18664 * error.c (args_as_string): Use error_type.
18666 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
18668 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
18669 (tsubst): Not here.
18671 * decl.c (init_decl_processing): With -ansi, __null's type is the
18672 signed integral type with the same number of bits as a pointer.
18673 Introduce a new variable null_node for it.
18674 * cp-tree.h: Adjust.
18675 * call.c (null_ptr_cst_p): Adjust.
18677 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
18679 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
18682 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
18684 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
18685 fns of classes without virtual functions.
18687 * call.c (add_function_candidate): Handle `this' specially.
18688 (compare_ics): Likewise.
18690 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
18692 * typeck.c (build_conditional_expr): Fix handling of __null.
18694 * decl2.c (comdat_linkage): New fn.
18695 (import_export_vtable): Use it.
18696 (import_export_decl): Use it.
18697 * method.c (make_thunk): Use it.
18699 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
18701 * pt.c (end_template_decl): If we don't actually have parms, return.
18702 * parse.y (template_header): Accept 'template <>'.
18704 * errfn.c: Allow 5 args.
18706 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
18708 * tree.c (make_temp_vec): New fn.
18709 * pt.c (push_template_decl): Handle partial specs.
18710 (instantiate_class_template): Likewise.
18711 (more_specialized): Use get_bindings.
18712 (more_specialized_class): New fn.
18713 (get_class_bindings): New fn.
18714 (most_specialized_class): New fn.
18715 (do_function_instantiation): List candidates for ambiguous case.
18716 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
18717 (shadow_tag): Call push_template_decl for partial specializations.
18718 * parse.y: Likewise.
18719 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
18720 DECL_TEMPLATE_MEMBERS.
18721 * call.c (print_z_candidates): Reduce duplication.
18723 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
18725 * decl2.c (lang_decode_option): Allow -fansi-overloading.
18727 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
18729 * pt.c (get_bindings): New fn.
18730 (most_specialized): Likewise.
18731 (do_function_instantiation): Use them.
18732 (add_maybe_template): New fn.
18733 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
18734 * call.c (build_new_op): Handle guiding decls.
18735 (build_new_function_call): Likewise.
18736 * decl2.c (finish_file): Likewise.
18738 * decl2.c (mark_used): Do synthesis here.
18739 * call.c (build_method_call): Not here.
18740 (build_over_call): Or here.
18741 * typeck.c (build_function_call_real): Or here.
18742 * tree.c (bot_manip): Call mark_used on functions used in default
18745 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
18747 * decl2.c (import_export_vtable): Delete code that disabled vtable
18748 heuristic on systems with ASM_OUTPUT_EXTERNAL.
18750 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
18752 * typeck.c (build_x_function_call): Handle static call context
18755 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
18756 the function, not its outer block.
18758 * call.c (build_field_call): Pass fields on to build_opfncall
18759 regardless of TYPE_OVERLOADS_CALL_EXPR.
18760 (build_method_call): Pass on to build_new_method_call sooner.
18762 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
18764 * class.c (instantiate_type): Don't put a POINTER_TYPE to
18765 METHOD_TYPE on an expression. Also make a copy of rhs instead of
18768 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
18770 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
18771 (add_builtin_candidate): Don't take enums for ++.
18772 (build_new_method_call): Handle non-aggregates and field calls.
18773 Move new overloading code from...
18776 * decl.c (grokparms): Don't check default args in templates.
18778 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
18780 * cvt.c (build_new_op): Fix args to build_unary_op.
18781 (add_builtin_candidates): Don't call type_promotes_to on float.
18783 * decl.c (grokparms): Check the type of the default arg.
18785 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
18786 returning NULL_TREE.
18788 * typeck.c (build_x_binary_op): Avoid doing extra work.
18789 (build_x_unary_op): Likewise.
18790 (build_x_conditional_expr): Likewise.
18791 * cvt.c (build_over_call): Return.
18792 (add_builtin_candidate): Fix MEMBER_REF.
18793 (build_new_op): Likewise.
18795 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
18797 * method.c (build_overload_name): Put bug fix into code but leave
18798 disabled for now so we can be bug compatible with older releases
18799 that do repeats incorrectly. In the future, we can enable it.
18801 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
18803 * cvt.c (convert_like): Don't call build_cplus_new twice.
18805 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
18806 Control new overloading code with -fansi-overloading.
18808 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
18810 * cvt.c (build_over_call): Call build_cplus_new.
18811 * call.c (build_method_call): Likewise.
18812 * typeck.c (build_function_call_real): Likewise.
18813 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
18814 the COND_EXPR in a TARGET_EXPR so they use the same slot.
18816 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
18818 * typeck.c (complete_type): Propagate
18819 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
18821 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
18823 * cvt.c (joust): More ?: kludging. Sigh.
18824 (build_over_call): Don't try to synthesize global fns.
18826 * search.c (lookup_conversions): Use binfo marking.
18828 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
18830 * search.c (build_mi_matrix): Use the correct value of cid
18831 when determining the new mi_size.
18833 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
18835 * cvt.c (add_builtin_candidates): Do consider type conversion ops
18836 for the first parms of += et al.
18837 (strip_top_quals): New fn.
18838 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
18839 (implicit_conversion): Likewise.
18840 (add_builtin_candidates): Be careful about arrays.
18841 (build_new_method_call): Handle vtable optimization.
18843 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
18845 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
18846 * cvt.c (reference_binding): Use it.
18847 (implicit_conversion): Use it.
18848 (add_builtin_candidate, COND_EXPR): Use it.
18850 * cvt.c (build_new_function_call): Check for error args.
18852 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
18854 * gxx.gperf: Add __null.
18855 * hash.h: Regenerate.
18856 * lex.h: Add RID_NULL.
18857 * lex.c (init_lex): Create null_pointer_node here, stick it in
18859 * decl.c (init_decl_processing): Still set its type here.
18860 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
18861 (convert_to_pointer_force): Likewise.
18862 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
18864 * call.c (convert_harshness): Use null_ptr_cst_p.
18865 * typeck.c (convert_for_assignment): Likewise. Don't produce
18868 * error.c (args_as_string): Handle lists of actual args, too.
18869 * cvt.c (null_ptr_cst): Support (void*)0 for now.
18870 (build_user_type_conversion_1): Improve diagnostics.
18871 (build_new_function_call): Likewise.
18872 (build_object_call): Likewise.
18873 (build_new_method_call): Likewise. Move call before def diagnostic...
18874 (build_over_call): Here.
18876 * cvt.c (build_new_method_call): Don't complain about no match if
18877 LOOKUP_SPECULATIVELY.
18878 (build_over_call): Fix 'this' for virtual fn.
18879 (build_new_method_call): Add diagnostic.
18881 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
18883 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
18884 constructors to be passed in.
18885 (build_over_call): Likewise.
18886 (build_user_type_conversion_1): Pass them in.
18887 (convert_like): Likewise.
18888 (build_object_call): Handle overloaded conversions.
18889 (build_over_call): Pass the right args to build_vfn_ref.
18890 (standard_conversion): Fix pmf convs.
18891 (joust): Handle comparing statics and non-statics.
18892 (build_new_method_call): New fn.
18893 * call.c (build_method_call): Call it if NEW_OVER.
18895 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
18897 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
18900 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
18902 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
18903 instead of just maybe_build_cleanup so that we deallocate the
18906 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18908 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
18909 * cp-tree.h (finish_prevtable_vardecl): Add decl.
18911 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
18913 * pt.c (instantiate_class_template): Call complete_type. Also, if
18914 we're at the end of the file and we just instantiated a template
18915 class with a vtable, call finish_prevtable_vardecl.
18917 * error.c (dump_decl): Don't explode (or explode more gracefully
18918 as appropriate) if the object being dumped has a null type.
18919 (dump_expr): Likewise.
18921 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
18922 by counting the number of nodes that we'll need before allocating
18924 (lookup_fnfields): Fix comment.
18925 (breadth_first_search): Fix comment.
18927 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
18929 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
18931 * class.c (finish_struct): Call cplus_decl_attributes here.
18932 (finish_struct_1): Not here.
18933 * cp-tree.h: Adjust.
18935 * pt.c (type_unification): New parameter STRICT.
18936 (unify): If STRICT, don't allow cv addition or base deduction.
18937 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
18939 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
18941 * search.c (get_template_base{_recursive}): New fns.
18942 * pt.c (more_specialized): New fn.
18943 (do_function_instantiation): Use it.
18944 (unify): Handle base deduction.
18945 * cvt.c (joust): Use more_specialized.
18946 Don't arbitrarily choose between non-builtin candidates.
18947 (build_over_call): Call require_complete_type.
18949 * decl.c (start_function): Statics are static even in a #pragma
18952 * decl2.c (import_export_vtable): Disable vtable heuristic on
18953 systems with ASM_OUTPUT_EXTERNAL.
18955 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
18956 (standard_conversion): No std conv to enum type.
18958 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
18961 * cvt.c (reference_binding): Bind directly to a base subobject of
18964 * cvt.c (build_new_op): Enforce access control.
18966 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
18968 * typeck2.c (process_init_constructor): When scanning the
18969 union for a named field, skip things that aren't FIELD_DECLs.
18971 * method.c (synthesize_method): Don't scan fndecl's rtl if
18972 we're at the end of the file; just assume the function can't
18975 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
18977 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
18980 * cvt.c (build_user_type_conversion_1): Handle overloaded
18983 * cvt.c (add_builtin_candidates): Don't consider type conversion
18984 operators for the first parameter of operator=.
18986 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
18988 * typeck.c (complete_type): Only call layout_type if we're not
18989 expanding a template.
18991 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18993 * cvt.c (compare_ics): Oops.
18995 * cvt.c (op_error): Oops.
18997 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
18998 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
18999 (build_conv): Use them.
19000 (implicit_conversion): Use them.
19001 (convert_like): Handle them.
19002 (build_new_op): Handle builtin COND_EXPR again.
19003 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
19004 in lists of types for COND_EXPR.
19005 (add_builtin_candidate): Add enum candidates for COND_EXPR.
19007 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
19009 * typeck.c (build_modify_expr): Always attempt to build a call to
19010 the assignment operator, even if we're using a default one.
19011 (convert_for_initialization): Call complete_type.
19013 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19015 * cvt.c (reference_binding): A REF_BIND gets the reference type.
19016 (implicit_conversion): Likewise.
19017 (convert_like): Likewise.
19018 (compare_ics): Likewise.
19019 (compare_qual): Likewise.
19020 (print_z_candidates): Handle no candidates.
19021 (build_new_op): Don't handle builtin COND_EXPR for now.
19023 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
19025 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19027 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19029 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19031 * cvt.c (build_builtin_candidate): Oops.
19032 (build_new_op): Oops.
19034 * method.c (build_opfncall): Pass COND_EXPR on.
19035 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19036 (add_builtin_candidate{,s}): Likewise.
19037 (add_builtin_candidates): Likewise.
19038 (print_z_candidates, op_error, build_new_op): Likewise.
19039 (type_decays_to): New fn.
19040 * lex.c (init_lex): Just say ?: for COND_EXPR.
19042 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
19044 * typeck.c (complete_type): Call layout_type rather than building
19047 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19048 only use ptrdiff_t.
19050 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19052 * cvt.c: Always compile the new overloading code (but don't use it).
19053 (implicit_conversion): Add a BASE_CONV when converting to
19054 the same class type.
19055 (convert_like): Handle BASE_CONV.
19057 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19059 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19060 (add_builtin_candidate): Likewise.
19063 * typeck.c (build_x_function_call): Try an operator function
19064 whenever we call an object of class type.
19065 * method.c (build_opfncall): Pass CALL_EXPRs through.
19066 * cvt.c (implicit_conversion): Do const-ref case first.
19067 (add_conv_candidate, build_object_call, op_error): New fns.
19068 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19069 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19070 builtin candidates.
19071 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
19072 Fall back on preincrement handling. Use op_error.
19074 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
19075 an error_mark_node.
19076 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19079 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
19081 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19083 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
19085 * typeck.c (build_component_ref_1): Use build_component_ref
19086 instead of open coding it here.
19088 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19090 * g++.c (main): Don't link with -lg++.
19093 * cvt.c (convert_to_reference): Don't use convert_from_reference on
19094 result of build_type_conversion.
19095 (cp_convert): Only call build_method_call for ctors if
19096 build_type_conversion failed.
19097 (ptr_complete_ob): New function.
19098 (TYPE_PTR{,OB,MEM}_P): New macros.
19099 ({add,build}_builtin_candidate{,s}): New functions.
19100 (print_z_candidates): Handle builtins.
19101 (build_user_type_conversion_1): Don't use conversion fns for
19102 converting to a base type.
19103 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19104 (build_user_type_conversion): Use convert_from_reference.
19105 (build_new_op): New function.
19106 (build_over_call): Fix handling of methods.
19107 (compare_ics): Handle AMBIG_CONV properly.
19108 * typeck2.c: Increment abort count.
19109 * method.c (build_opfncall): Forward most requests to build_new_op.
19110 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19112 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19114 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19115 invalid second argument to dump_expr_list.
19117 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
19119 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19121 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
19123 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19126 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
19128 * typeck2.c (process_init_constructor): New pedwarn for using { }
19129 to initialize a pointer to member function.
19130 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19131 we can avoid the new error.
19133 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
19135 * typeck.c (build_ptrmemfunc1): New function to hide details of
19136 pointer to member functions better.
19138 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
19140 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19141 methods into the actual method, as we know the implied object is
19144 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19146 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19147 inside a system header.
19149 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
19151 * call.c (build_method_call): Call complete_type on the
19154 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
19156 * typeck.c (build_component_ref): Always build up an OFFSET_REF
19157 for obj_ptr->func so that we can know which object to use in a
19160 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
19162 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19163 around things. Also improve maintainability.
19165 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
19167 * decl.c (grokdeclarator): Check for overflow when evaluating an
19170 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
19172 * cvt.c (cp_convert): Don't check for ambiguity with constructor
19175 * typeck.c (build_x_function_call): Pass function overload
19176 questions to new overloading code if NEW_OVER.
19177 * init.c (expand_aggr_init_1): Only check for type conversion ops
19178 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19179 Don't check for ambiguity with constructor if NEW_OVER.
19180 * cvt.c (convert_to_reference): Dereference the result of a type
19181 conversion operator.
19182 (build_conv): Propagate ICS_USER_FLAG.
19183 (implicit_conversion): Call instantiate_type.
19184 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19185 (add_function_candidate): Fix cv-quals on argtype.
19186 (print_z_candidates): New function.
19187 (build_new_function_call): Call it.
19188 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19189 consider non-converting constructors.
19190 Call print_z_candidates.
19191 Return an AMBIG_CONV for an ambiguous conversion.
19192 (build_user_type_conversion): Handle AMBIG_CONV.
19193 (convert_like): Fix test for building TARGET_EXPR.
19194 Call instantiate_type.
19195 Handle AMBIG_CONV and LVALUE_CONV.
19196 (build_over_call): Handle 0 args and ellipsis.
19197 * cp-tree.def: Add AMBIG_CONV.
19199 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
19201 * decl.c (lookup_name_real): If we find mem in obj when parsing
19202 `obj->mem', make sure we return the right value.
19204 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
19206 * search.c (get_base_distance): Call complete_type.
19208 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
19210 * decl.c (store_bindings): Make static.
19212 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19214 * init.c (expand_aggr_init_1): Don't check type conversions if
19217 * cvt.c (z_candidate): Put back template field.
19218 (add_function_candidate): Set it.
19219 (add_template_candidate): Likewise.
19221 (compare_qual): Handle references and pointers to members.
19222 (compare_ics): Handle reference bindings.
19224 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19226 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
19228 * call.c (compute_conversion_costs): Call complete_type.
19230 * tree.c (vec_binfo_member): Use comptypes instead of comparing
19231 pointers, so we can handle template parameters.
19233 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
19235 * cvt.c (cp_convert_to_pointer): We have to call complete_type
19236 here; let's make it explicit instead of a side effect of an
19239 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19241 * cvt.c (z_candidate): Remove template field.
19242 (reference_binding): Handle binding to temporary.
19243 (implicit_conversion): Likewise.
19244 (add_function_candidate): Handle artificial constructor parms.
19245 Handle functions with too few parms.
19246 (add_template_candidate): New function.
19247 (build_user_type_conversion_1): Handle constructors.
19248 (convert_like): Likewise.
19249 (build_over_call): Likewise.
19250 (build_new_function_call): Support templates.
19251 (compare_ics): Fix reference, inheritance handling.
19253 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
19255 * decl.c: Add signed_size_zero_node.
19256 (init_decl_processing): Build it.
19257 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19258 when we're trying to make a negative delta.
19260 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19262 Stop doing this damn index==strchr variable name confusion.
19263 * class.c (add_virtual_function): Change local var INDEX to be
19265 (add_method): Likewise.
19266 * lex.c (print_parse_statistics): Likewise.
19267 * search.c (make_memoized_table_entry): Likewise.
19268 (lookup_fnfields_here): Likewise.
19269 (lookup_field): Likewise.
19270 (lookup_fnfields): Likewise.
19271 (get_baselinks): Likewise.
19272 * sig.c (build_signature_table_constructor): Likewise.
19273 (build_signature_method_call): Likewise.
19274 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19275 (get_member_function_from_ptrfunc): Likewise.
19276 (build_ptrmemfunc): Change local var INDEX to be IDX.
19277 (c_expand_start_case): Likewise.
19279 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19281 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19282 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19283 (convert_to_reference): Use build_type_conversion to convert to
19284 the reference type directly.
19285 (standard_conversion): Fix void* case, non-conversions.
19286 (reference_binding): Fix expr == 0 case, non-conversions.
19287 (convert_like): Support REF_BIND.
19288 (compare_qual): Split out from compare_ics.
19289 (compare_ics): Use it, handle icses with only a qual_conv.
19291 * init.c (expand_vec_init): Don't crash if decl is NULL.
19293 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
19295 * mpw-config.in: New file, configury for Mac MPW.
19296 * mpw-make.sed: New file, makefile editing for MPW.
19298 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19300 * pt.c (instantiate_class_template): Call repo_template_used.
19302 * search.c (lookup_conversions): Only lookup conversions in
19305 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19307 * cp-tree.def: Renamed from tree.def, to avoid confusion with
19309 * cp-tree.h, lex.c: Include cp-tree.def.
19310 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19312 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
19314 * init.c (build_vec_delete_1): Call complete_type.
19316 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
19318 * except.c (start_anon_func): Make sure anonymous functions are
19321 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19323 * decl.c (finish_function): If function_depth > 1, set nested.
19325 * decl2.c (grokbitfield): Revert Bob's change.
19326 * class.c (finish_struct_1): Fix handling of named bitfield widths.
19328 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
19330 * pt.c (add_pending_template): Handle types.
19331 (lookup_template_class): With -fexternal-templates, just add the class
19332 to pending_templates instead of instantiating it now.
19333 * decl2.c (finish_file): Handle types in pending_templates.
19335 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
19337 * decl2.c (grokbitfield): Handle constant decls appropriately.
19338 Give an appropriate error message now instead of spewing core
19341 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
19343 * decl2.c: Don't turn on thunks by default for now.
19345 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
19347 * typeck.c (complete_type): Handle error_mark_node.
19348 (common_type, OFFSET_TYPE): Handle template_type_parms.
19350 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
19352 * pt.c (instantiate_decl): If at_eof, call import_export_decl
19353 regardless of DECL_INLINE.
19355 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19357 * class.c (finish_struct_bits): Copy TYPE_SIZE.
19359 * rtti.c (build_dynamic_cast): Support templates.
19360 * tree.def: Support DYNAMIC_CAST_EXPR.
19361 * pt.c (tsubst_copy): Likewise.
19362 * decl2.c (build_expr_from_tree): Likewise.
19364 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19366 * typeck.c (build_static_cast): Support templates.
19367 (build_const_cast): Likewise.
19368 * tree.def: Support CONST/STATIC_CAST_EXPR.
19369 * pt.c (tsubst_copy): Likewise.
19370 * decl2.c (build_expr_from_tree): Likewise.
19372 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19374 * decl2.c (finish_vtable_vardecl): Don't trust
19375 TREE_SYMBOL_REFERENCED for vtables of local classes.
19377 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
19379 * pt.c (tsubst_copy): Handle operator T.
19381 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19383 * init.c (build_delete): Move creation of PARMS inside test of
19384 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19386 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
19388 * typeck.c (build_conditional_expr): Don't assume that
19389 the arguments to ?: are always pointers or records.
19391 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19393 * decl2.c (import_export_decl): Still emit static/weak/comdat
19394 copies of inline template functions with -fno-implicit-templates.
19396 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
19398 * init.c (build_delete): Determine the complete basetype
19399 path to the destructor we're calling.
19401 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
19403 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19404 initialize the enum, because we really and truly don't know where
19406 (start_enum): Don't copy integer_zero_node because
19407 build_enumerator will do it.
19409 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19411 * decl.c (finish_function): Do access control on base destructors.
19413 * pt.c (tsubst, case FUNCTION_DECL): Set up
19414 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19417 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
19419 * cvt.c (build_up_reference): If we have already extended the
19420 lifetime of the temporary, don't try it again.
19421 * typeck.c (c_expand_return): Don't try and convert the return
19422 value twice when we want a reference, once is enough.
19424 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
19426 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19427 LOOKUP_ONLYCONVERTING at all for now.
19429 * search.c (add_conversions): Put the conversion function in
19430 TREE_VALUE, the basetype in TREE_PURPOSE.
19431 * cvt.c (build_type_conversion): Adjust.
19432 * cvt.c (build_expr_type_conversion): Adjust.
19433 * call.c (user_harshness): Adjust.
19435 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
19437 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19440 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
19442 * except.c (expand_start_catch_block): Add a dummy region, if we
19443 get an error, so that we can avoid core dumping later.
19445 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
19447 * cp-tree.h (OFFSET_REF): Remove.
19448 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19449 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19450 * init.c (expand_aggr_init_1): Likewise.
19451 (build_new): Likewise.
19452 * typeck.c (expand_target_expr): Likewise.
19454 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
19456 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19459 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
19461 * cvt.c (build_up_reference): Redo how and when temporaries are
19463 * decl.c (grok_reference_init): Don't try and be smart about
19466 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
19468 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19469 (TARGET_EXPR...), now that it has 4 arguments.
19470 * tree.c (build_cplus_new): Likewise.
19472 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19474 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19476 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19477 * decl.c (struct saved_scope): Remove named_labels,
19478 {base,member}_init_list.
19479 (maybe_push_to_top_level): Don't set them. Call
19480 push_cp_function_context if appropriate.
19481 (pop_from_top_level): Likewise.
19483 * method.c (do_build_assign_ref): Remove obsolete check of
19484 TYPE_HAS_ASSIGN_REF (basetype).
19486 * decl.c (grokfndecl): Diagnose user definition of
19487 implicitly-declared methods.
19489 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
19491 * method.c (do_build_copy_constructor): Add code to give
19492 meaningful error messages instead of crashing.
19493 (do_build_assign_ref): Don't synthesize assignment operators for
19494 classes containing reference or const members.
19496 * class.c (struct base_info): Remove cant_synth_copy_ctor
19497 and cant_synth_asn_ref.
19498 (finish_base_struct): Remove the code that tries to conditionalize
19499 synthesis of copy constructors & assignment operators based on
19500 access permissions. Instead, let it fail when it tries to
19501 synthesize the copy constructor. This will give meaningful error
19502 messages instead of silently generating code to perform a bitcopy.
19504 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
19506 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19507 determining types for constant values.
19509 * decl.c (struct named_label_list): Use instead of stuffing
19510 random items into a TREE_LIST node.
19511 (named_label_uses): Use the new struct.
19512 (poplevel): Likewise.
19513 (lookup_label): Likewise.
19514 (define_label): Add an error message to tell the user the line
19515 where the goto is located in addition to the destination of the
19517 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19519 (finish_function): Likewise.
19521 (start_decl): Complain about defining a static data member
19522 in a different type from which it was declared.
19524 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19526 * cvt.c (build_expr_type_conversion): Adjust.
19528 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
19530 * call.c (build_method_call): Always convert 'this' to the
19533 * search.c (add_conversions): Put the conversion function in
19534 TREE_VALUE, the type in TREE_PURPOSE.
19535 * cvt.c (build_type_conversion): Adjust.
19536 * call.c (user_harshness): Adjust.
19538 * method.c (emit_thunk): Call temporary_allocation and
19539 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
19541 * tree.c (build_cplus_array_type): Handle tweaking of
19542 TYPE_MAIN_VARIANT here.
19543 * typeck.c (common_type): Not here.
19545 * typeck.c (complete_type): Only try to complete an array type if
19548 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
19550 * decl.c (grokvardecl): Call complete_type.
19551 (grokdeclarator): Call complete_type for PARM_DECLs.
19553 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19555 * pt.c (instantiate_class_template): Re-set
19556 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
19558 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
19560 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
19561 smart enough to do it right.
19562 * tree.c (cp_expand_decl_cleanup): Likewise.
19563 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
19564 cp_expand_decl_cleanup.
19565 (store_parm_decls): Likewise.
19566 (hack_incomplete_structures): Likewise.
19567 * except.c (push_eh_cleanup): Likewise.
19569 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
19571 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
19572 frontend to the backend where it belongs.
19573 * tree.c (unsave_expr): Likewise.
19574 (unsave_expr_now): Likewise.
19575 * tree.def (UNSAVE_EXPR): Likewise.
19576 * cp-tree.h (unsave_expr): Likewise.
19577 (unsave_expr_now): Likewise.
19579 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
19581 * init.c (emit_base_init): Make sure the partial EH cleanups live
19582 on the function_obstack.
19584 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
19586 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
19587 when checking for pointer types.
19589 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19591 * pt.c (instantiate_class_template): Remove obsolete check for
19592 access declarations.
19594 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
19596 * call.c (build_overload_call): Simplify calls to
19597 build_overload_call by removing last parameter.
19598 (build_method_call): Likewise.
19599 * cp-tree.h: Likewise.
19600 * method.c (build_opfncall): Likewise.
19601 * typeck.c (build_x_function_call): Likewise.
19603 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
19605 * call.c (default_parm_conversions): Factor out common code.
19606 (build_method_call): Use it.
19607 (build_overload_call_real): Use it.
19609 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
19611 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
19612 but pedwarn as the code is bogus.
19613 * typeck.c (decay_conversion): Likewise.
19614 (build_function_call_real): Use build_addr_func instead of
19615 default_conversion. Don't allow pointer-to-method functions down
19617 (build_unary_op): Use real pointer-to-member functions instead of
19619 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
19620 (convert_for_assignment): Removed some obsolete code.
19621 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
19622 build_x_function_call instead of current_class_ptr. Only call
19623 digest_init once on an initializer, we do this just checking
19625 (build_expr_from_tree): Pass current_class_ref to
19626 build_x_function_call instead of current_class_ptr.
19627 * init.c (build_member_call): Likewise.
19628 * pase.y: Likewise.
19629 * error.c (dump_expr): Handle OFFSET_REFs better.
19630 * pt.c (unify): Handle pointer-to-member functions better.
19631 * decl.c (finish_function): Clear out current_class_ref just like
19632 we do for current_class_ptr.
19634 * typeck.c (get_delta_difference): Handle virtual bases better.
19636 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
19638 * sig.c (build_signature_table_constructor): Use the delta for
19639 the original basetype for this virtual function with thunks.
19640 (build_signature_method_call): We still need to adjust 'this'
19643 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
19645 * call.c (build_addr_func): New routine. Used to get the `real'
19646 address of a function or a method. Needed to avoid getting a
19647 pointer-to-member function.
19648 (build_call): New routine to build CALL_EXPRs.
19649 (build_method_call): Use it.
19650 * cvt.c (convert_to_aggr): Likewise.
19651 * typeck.c (build_function_call_real): Likewise.
19652 * sig.c (build_signature_table_constructor): Use build_addr_func.
19653 * cp-tree.h (build_call, build_addr_func): Declare them.
19655 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
19657 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
19658 * parse.y: Remove uses of LOOKUP_AGGR.
19660 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
19662 * *.[chy]: Rename current_class_decl to current_class_ptr, and
19663 C_C_D to current_class_ref.
19665 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
19667 * call.c (convert_harshness): Tighten up pointer conversions.
19669 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
19671 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
19672 (finish_file): Likewise.
19674 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
19676 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
19678 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
19681 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
19683 * decl2.c: Turn on thunks by default where supported.
19685 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
19687 * cp-tree.h (build_overload_call_maybe): Removed.
19688 * call.c (build_overload_call_real): Invert meaning of last arg to
19689 be require_complete.
19690 (build_overload_call): Likewise.
19691 * typeck.c (build_x_function_call): Use build_overload_call_real
19692 instead of build_overload_call_maybe.
19694 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
19696 * decl2.c (finish_file): Don't try to emit functions that haven't
19699 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19701 * decl2.c (finish_vtable_vardecl): Oops.
19703 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
19704 Also store the bindings from previous_class_values.
19705 (pop_from_top_level): Restore them.
19707 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
19709 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
19710 symbol has been referenced.
19711 (finish_file): Re-join synthesis/vtable loop with inline emission
19712 loop, disable inlining when an inline is output.
19714 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
19716 * except.c (init_exception_processing): Setup saved_in_catch.
19717 (push_eh_cleanup): Reset __eh_in_catch.
19718 (expand_start_catch_block): Set __eh_in_catch.
19720 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
19722 * except.c (push_eh_cleanup): Add tracking for whether or not we
19723 have an active exception object.
19724 (expand_builtin_throw): Use it to make sure a rethrow without an
19725 exception object is caught.
19727 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
19729 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
19732 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
19734 * decl2.c (finish_file): Also use sentries for vars with
19735 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
19738 * lex.c (handle_cp_pragma): Disable #pragma
19739 interface/implementation if SUPPORTS_ONE_ONLY > 1.
19741 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
19743 * method.c (emit_thunk): Wrap default case in
19744 temporary/permanent_allocation.
19746 * method.c (make_thunk): Use DECL_ONE_ONLY.
19747 (emit_thunk): Call assemble_end_function.
19749 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
19751 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
19752 (import_export_decl): Likewise.
19753 (finish_prevtable_vardecl): Disable vtable hack if
19754 SUPPORTS_ONE_ONLY > 1.
19756 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
19758 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
19759 PREDECREMENT_EXPRs take two arguments, not one.
19761 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
19763 * class.c (build_vtable_entry): Don't build thunks for abstract
19766 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
19769 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
19771 * class.c (set_rtti_entry): Use size_zero_node.
19772 (build_vtable): Likewise.
19774 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
19776 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
19777 (prepare_fresh_vtable): Likewise.
19779 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
19781 * method.c (emit_thunk): Call mark_used on the target function.
19783 * call.c (build_method_call): Don't warn about pending templates.
19785 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
19787 * decl2.c (finish_file): Fix list walking logic.
19789 * typeck2.c (check_for_new_type): Only warn if -pedantic.
19791 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
19793 * class.c (finish_struct_1): Remove old code for
19794 dont_allow_type_definitions.
19795 * cp-tree.h: Likewise.
19796 * spew.c: Make sure cp-tree.h is included before parse.h, so the
19797 definition of flagged_type_tree is found before it is used.
19799 * parse.y: Added the ftype member to the type union, and changed a
19800 number of rules to use it instead of ttype. Added calls to
19801 check_for_new_type() as appropriate.
19802 * typeck2.c (check_for_new_type): New function for checking
19803 if a newly defined type appears in the specified tree.
19804 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
19805 for check_for_new_type().
19807 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
19809 * decl2.c (finish_file): Only use a sentry if the decl is public.
19811 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
19812 don't pass LOOKUP_ONLYCONVERTING.
19814 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
19816 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
19817 properly keeps track of const and volatile type modifiers.
19819 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
19821 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
19822 * pt.c (comp_template_args): Use it.
19824 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
19825 assemble_external for artificial function decls.
19827 * decl.c (cp_finish_decl): Oops.
19829 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
19831 * decl2.c (import_export_decl): Put static data member templates
19832 into common storage, or make them weak, depending on whether they
19833 are dynamically or statically initialized.
19834 (get_sentry): New function.
19835 (finish_file): Do import_export_decl for static data members before
19836 building the init/fini functions. Don't init/fini a variable that's
19837 EXTERNAL. Use a sentry for variables in common. Fix mismatching
19838 push/pop_temp_slots.
19839 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
19840 expand_static_init thang.
19841 * method.c (get_id_2): New function.
19843 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
19845 * parse.y (empty_parms): Make sure we use C++-style prototypes
19846 when we're declaring member functions.
19848 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19850 * Makefile.in (CONFLICTS): 16 s/r conflicts.
19851 * parse.y (self_template_type): New nonterminal.
19853 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
19855 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
19857 * parse.y (base_class.1): Allow 'typename foo::bar'.
19859 * lex.c (check_newline): Remove #pragma code that plays with the
19860 input stream, since we now deal with tokens. Clear nextchar when
19862 (handle_cp_pragma): Use real_yylex.
19863 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
19866 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
19868 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
19870 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
19872 * parse.y: New token SELFNAME for potential constructor.
19873 * spew.c (yylex): Handle it.
19874 * lex.c (identifier_type): Produce it.
19876 * parse.y (complete_type_name): In :: case, don't push class binding.
19877 (complex_type_name): Likewise.
19879 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
19881 * typeck.c (build_reinterpret_cast): Handle pointer to member
19884 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19886 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
19888 (check_newline): Put the vtable/unit/implementation/interface pragma
19889 code into handle_cp_pragma, replacing it with a call.
19890 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
19891 args. Get the next token after handling the pragma token.
19893 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
19895 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
19896 (convert_to_pointer_force): Likewise.
19898 * init.c (build_new): Fix array new without -fcheck-new.
19900 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
19902 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
19903 tree.c: Lose TYPE_NESTED_NAME.
19905 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
19908 * tree.def: Add VEC_INIT_EXPR.
19909 * expr.c (cplus_expand_expr): Handle it.
19910 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
19911 the extra file-scope symbol nastiness.
19913 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
19915 * method.c (make_thunk): Thunks are static.
19916 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
19918 * decl2.c (mark_vtable_entries): Emit thunks as needed.
19919 (finish_file): Don't emit them here.
19921 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
19923 * rtti.c (build_dynamic_cast): Handle null pointers.
19924 (ifnonnull): New function.
19926 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
19928 * call.c (build_method_call): Remember the original basetype we
19929 were called with. Give an error message instead of trying
19930 (incorrectly) to call a non-static member function through a
19931 non-inherited class.
19933 * search.c (expand_upcast_fixups): Mark the new fixup as
19936 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19938 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
19940 * class.c (set_rtti_entry): Fix for thunks.
19942 * decl2.c (import_export_decl): Still emit typeinfo fns for
19943 cv-variants of builtin types.
19945 * rtti.c (expand_class_desc): Set up base_info_type_node here.
19946 (init_rtti_processing): Instead of here.
19948 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
19950 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
19951 (build_typeid): Only complain about taking dynamic typeid without
19954 * decl2.c: flag_rtti defaults to 1.
19956 * rtti.c (get_tinfo_var): The general class case is now smaller.
19957 (init_rtti_processing): Pack the latter three fields of base_info
19960 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
19962 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
19964 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
19966 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
19967 (push_memoized_context): Split out code to undefer pop_type_level to
19968 (clear_memoized_cache): here.
19969 (pop_memoized_context): We can only handle one layer of deferral of
19970 pop_type_level so clear the cache, if there was a previous level.
19972 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19974 * rtti.c (init_rtti_processing): Build up base_info_type_node.
19975 (expand_class_desc): Use one pointer to an array of base_info
19976 structs, passed using a CONSTRUCTOR.
19978 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
19980 * class.c (build_vbase_path): Remove block extern for
19981 flag_assume_nonnull_objects here.
19982 (build_vfn_ref): Split out functionality into build_vtbl_ref.
19983 (build_vtbl_ref): New routine.
19984 (build_vtable): Set up rtti info here.
19985 (add_virtual_function): Note in CLASSTYPE_RTTI the best
19986 place where we can get the rtti pointers from to avoid having to
19987 search around for a place.
19988 (finish_base_struct): Likewise.
19989 (finish_struct_1): Likewise. Never create totally new vtables
19990 with totally new vtable pointers for rtti. Disable code to layout
19991 vtable pointers better until we want to break binary
19993 * rtti.c (build_headof_sub): New routine to convert down to a
19994 sub-object that has an rtti pointer in the vtable.
19995 (build_headof): Use it. Also, use build_vtbl_ref now to be more
19997 (build_dynamic_cast): Make sure we have saved it, if we need to.
19998 * search.c (dfs_init_vbase_pointers): Disable code that deals with
19999 a more efficient vtable layout, enable later.
20000 * call.c (flag_assume_nonnull_objects): Moved declaration to
20001 * cp-tree.h: here. Declare build_vtbl_ref.
20002 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20003 function calls that want a tree.
20005 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20007 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20008 other X subobjects in the most derived type. Ack.
20010 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20011 get_typeid will do it for us.
20012 (get_typeid_1): Break out call-building for expand_*_desc to use.
20013 (get_typeid): Call it.
20014 (expand_*_desc): Likewise.
20015 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20017 (init_decl_processing): Lose builtin_type_tdescs lossage.
20018 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20020 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
20022 * pt.c (tsubst): When calling set_nested_typename, use
20023 TYPE_NESTED_NAME (current_class_type) instead of
20024 current_class_name.
20026 * decl.c (pushdecl): Likewise.
20027 (pushdecl_class_level): Likewise.
20028 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20029 set_nested_typename.
20031 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20033 * rtti.c (synthesize_tinfo_fn): Handle arrays.
20035 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20037 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
20039 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20040 (init_rtti_processing): Lose bad_cast_type.
20041 (build_dynamic_cast): Use throw_bad_cast.
20043 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20045 * decl2.c (finish_file): Don't synthesize artificial functions
20046 that are external and not inline.
20048 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20050 * decl2.c (finish_file): Handle having new inlines added to
20051 saved_inlines by synthesis.
20053 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20055 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20057 RTTI rewrite to initialize nodes as needed, not require that
20058 users #include <typeinfo>, complete functionality and reduce wasted
20060 * rtti.c (init_rtti_processing): New fn.
20061 (build_typeid): The vtable entry is now a function.
20062 (get_tinfo_var): New fn.
20063 (get_tinfo_fn): Likewise.
20064 (get_typeid): Use it.
20065 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20066 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20068 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20069 (synthesize_tinfo_fn): New fn.
20070 * method.c (build_t_desc_overload): Lose.
20071 (build_overload_with_type): More generic.
20072 * decl.c (init_decl_processing): Call init_rtti_processing.
20073 * class.c (set_rtti_entry): Use get_tinfo_fn.
20074 * decl2.c (mark_vtable_entries): Mark the rtti function.
20075 (finish_prevtable_vardecl): Don't build_t_desc.
20076 (import_export_decl): Handle tinfo functions.
20077 (finish_file): Likewise.
20078 * typeck.c (inline_conversion): New fn.
20079 (build_function_call_real): Use it.
20080 * cp-tree.h: Add decls.
20082 * method.c (hack_identifier): Also convert component_refs from
20085 * lex.c (cons_up_default_function): Use the type, not the name, in
20088 * decl2.c (import_export_vtable): Fix weak vtables.
20090 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
20092 * search.c (get_base_distance_recursive): Fix access checks for
20095 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20097 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20099 (convert_harshness): Add prototypes wrapped by PROTO.
20100 * decl2.c (grok_function_init): Likewise.
20101 (do_toplevel_using_decl): Change to void return type.
20102 * class.c (build_vtable_entry): Remove decl of make_thunk.
20103 (merge_overrides): Fix order of arg definitions.
20104 (finish_vtbls): Likewise.
20105 (fixup_vtable_deltas): Likewise.
20106 (modify_all_direct_vtables): Likewise.
20107 (modify_all_indirect_vtables): Likewise.
20108 * search.c (get_base_distance_recursive): Likewise.
20109 (get_abstract_virtuals_1): Likewise.
20110 (fixup_virtual_upcast_offsets): Likewise.
20111 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20112 * init.c (perform_member_init): Fix order of arg definitions.
20113 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20114 * cp-tree.h (make_thunk): Add decl.
20115 (overload_template_name, push_template_decl): Add decls.
20116 (do_toplevel_using_decl): Change to void return type.
20117 (vec_binfo_member): Add decl.
20119 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20121 * typeck.c (mark_addressable, convert_for_assignment,
20122 convert_for_initialization, pointer_int_sum, pointer_diff,
20123 unary_complex_lvalue): Add prototypes wrapped by PROTO.
20124 (convert_sequence): #if 0 fn decl, since definition also is.
20126 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
20128 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20129 cast to pointer types for type searching.
20131 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20133 * typeck.c (get_delta_difference): Use cp_error, not error, in the
20134 case where BINFO == 0.
20136 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
20138 * call.c (build_method_call): Fix wording of error messages so
20139 constructors come out right.
20141 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
20143 * decl.c (push_overloaded_decl): Don't warn about hidden
20144 constructors when both the type and the function are declared
20145 in a system header file.
20147 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
20149 * class.c (finish_struct_1): Propagate the TYPE_PACKED
20150 flag for the type to the type's fields.
20152 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20154 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20156 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
20158 * class.c (base_info, finish_base_struct): Replace
20159 needs_virtual_dtor with base_has_virtual.
20161 (finish_struct_1): Remove the old code that tried to make default
20162 destructors virtual. Use base_has_virtual when checking if we need
20163 to add a vtable entry for the rtti code.
20165 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20167 * pt.c (push_template_decl): Complain about template decl with
20168 inappropriate declaration.
20170 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
20172 * typeck.c (build_x_unary_op): Remove bogus check for taking
20173 the address of a member function.
20175 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20177 * parse.y (constructor_declarator): Only push the class if
20178 we are not already in the class.
20180 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
20182 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20183 Add additional argument to INIT_CUMULATIVE_ARGS.
20185 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20187 * decl.c (shadow_tag): Fix error about anon union with methods.
20189 * parse.y (self_reference): Only generate a self-reference if this
20190 is a non-template class.
20191 (opt.component_decl_list): Only use it if it was generated.
20193 * parse.y (component_decl_1): Use constructor_declarator.
20194 (fn.def2): Likewise.
20195 (notype_component_declarator0): Likewise.
20197 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
20199 * typeck.c (build_x_unary_op): Add checks for taking the address
20200 of a TARGET_EXPR or of a member function, and give appropriate
20203 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20205 * pt.c (process_template_parm): Allow template type parms to be
20206 used as types for template const parms.
20208 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
20210 * init.c (expand_vec_init): Ensure the eh cleanups are on the
20213 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20215 * decl.c (lookup_name_real): Be even more picky about the
20216 ambiguous lookup warning.
20217 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20218 * parse.y (constructor_declarator): Rather than here.
20220 * parse.y (constructor_declarator): New nonterminal.
20222 (explicit_instantiation): Likewise.
20224 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20226 Add implicit declaration of class name at class scope.
20227 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20228 * parse.y (self_reference): New nonterminal.
20229 (opt.component_decl_list): Use it.
20230 (fn.def1): Add nested_name_specifier type_name cases.
20231 * class.c (build_self_reference): New function.
20232 (finish_struct): Handle access_default later, move self-reference
20234 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20235 * cp-tree.h: Adjust.
20237 * pt.c (do_function_instantiation): Separate handling of member
20238 functions and non-member functions properly.
20240 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20242 * pt.c (process_template_parm): Improve error for 'volatile class K'.
20244 * class.c (finish_struct_1): Check the right slot for destructors.
20246 * decl.c (start_enum): Complain about enum templates.
20248 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
20250 * init.c (resolve_offset_ref): Offset pointers to member data by one.
20251 * typeck.c (unary_complex_lvalue): Likewise.
20253 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
20255 * typeck.c (c_expand_return): Check for a returned local
20256 array name, similar to the check for an ADDR_EXPR.
20258 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20260 * decl.c (cp_finish_decl): Don't build cleanups for static
20263 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
20265 * typeck.c (build_modify_expr): Fix error messages to be more
20267 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20268 assignment operators.
20269 * error.c (assop_as_string): Likewise. Add support for `%Q' for
20270 assignment operators.
20272 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
20274 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
20275 give an error if initialized. pedwarn about nested type with the
20276 same name as its enclosing class.
20278 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20280 * typeck.c (require_complete_type): Be sure to instantiate the
20281 MAIN_VARIANT of the type.
20283 * decl2.c (finish_file): Instantiate pending templates before
20284 processing static constructors and destructors.
20286 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20289 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
20291 * decl2.c (delete_sanity): If error_mark_node is passed
20292 in as an expression, quit while we're ahead.
20294 * decl.c (grokdeclarator): Give an error message if `friend'
20295 is combined with any storage class specifiers.
20297 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
20299 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20300 definition of nonexistent nested type.
20302 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20303 not to say 'typedef'.
20305 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20307 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20308 * search.c (dfs_walk, dfs_init_vbase_pointers,
20309 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20310 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20312 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20314 * except.c (build_throw): Support minimal parse.
20315 * pt.c (tsubst_copy): Support THROW_EXPR.
20316 * decl2.c (build_expr_from_tree): Likewise.
20318 * pt.c (mangle_class_name_for_template): Always allocate
20321 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
20323 * cvt.c (cp_convert_to_pointer): Give an appropriate error
20324 when trying to cast from an incomplete type.
20326 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20328 * pt.c (instantiate_class_template): Don't bother setting up
20329 CLASSTYPE_TAGS explicitly, as the nested types will add
20332 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
20334 * decl.c (shadow_tag): Remove old error check for usage of
20335 an enum without a previous declaration.
20336 (xref_tag): Add error message about usage of enums without a
20337 previous declaration.
20339 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20341 * lex.c (do_identifier): Only do name consistency check if we're
20344 * pt.c (push_template_decl): Don't crash if we get a member defn
20345 that doesn't match.
20347 * decl.c (xref_tag_from_type): New function to do an xref without
20348 always having to figure out code_type_node.
20349 * cp-tree.h: Declare it.
20350 * pt.c (instantiate_class_template): Use it for friend classes.
20351 (lookup_template_class): Use it.
20353 * typeck2.c (build_functional_cast): Pull out a single parm before
20354 passing it to build_c_cast.
20356 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
20358 * expr.c (do_case): Give an error message if a pointer is
20359 given as a case value.
20361 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20363 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20366 * lex.c (cons_up_default_function): Really, now, interface hackery
20367 does not apply to synthesized methods.
20369 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
20371 * call.c (build_method_call): Ctors and dtors now have special names
20372 with respect to lookups.
20373 * class.c (add_method): Likewise.
20374 (grow_method): Likewise.
20375 (finish_struct_methods): Likewise.
20376 (warn_hidden): Likewise.
20377 (finish_struct_1): Likewise.
20378 * cvt.c (convert_to_reference): Likewise.
20379 (convert_to_aggr): Likewise.
20380 (cp_convert): Likewise.
20381 * decl2.c (check_classfn): Likewise.
20382 * init.c (expand_member_init): Likewise.
20383 (expand_default_init): Likewise.
20384 (expand_aggr_init_1): Likewise.
20385 (build_offset_ref): Likewise.
20386 (build_new): Likewise.
20387 (build_delete): Likewise.
20388 * lex.c (do_inline_function_hair): Likewise.
20389 * search.c (lookup_field_1): Likewise.
20390 (lookup_fnfields_here): Likewise.
20391 (lookup_field): Likewise.
20392 (lookup_fnfields): Likewise.
20393 (get_virtual_destructor): Likewise.
20394 (dfs_debug_mark): Likewise.
20395 (dfs_pushdecls): Likewise.
20396 (dfs_compress_decls): Likewise.
20397 * tree.c (layout_basetypes): Likewise.
20398 * typeck.c (build_component_ref): Likewise.
20399 (build_x_function_call): Likewise.
20400 (build_modify_expr): Likewise.
20401 (convert_for_initialization): Likewise.
20402 (build_functional_cast): Likewise.
20403 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20406 * decl.c (ctor_identifier): New.
20407 (dtor_identifier): New.
20408 (init_decl_processing): Set them.
20410 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
20412 * typeck.c (build_component_ref): Don't get confused by fields whose
20413 context has no type name, like pointer to member functions.
20415 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
20417 * decl.c (grokdeclarator): Handle typedef without declarator.
20419 * pt.c (tsubst): Handle SCOPE_REF in declarator.
20421 * parse.y (bad_parm): Catch another case of missing `typename'.
20423 * lex.c (yyprint): Handle TYPE_DECLs.
20425 * decl.c (start_function): Don't try to be clever.
20427 * lex.c: Lose compiler_error_with_decl.
20428 * typeck2.c: Lose error_with_aggr_type.
20429 (incomplete_type_error): Use cp_* instead of old functions.
20430 (readonly_error): Likewise.
20431 * typeck.c (convert_arguments): Likewise.
20432 * search.c (lookup_nested_field): Likewise.
20433 * method.c (make_thunk): Likewise.
20434 * decl.c (grokparms): Likewise.
20435 * cp-tree.h: Update.
20437 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20440 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
20442 * method.c (build_opfncall): When deleting a pointer to an
20443 array, build a new pointer to the tree past any ARRAY_TYPE
20446 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20448 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20450 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
20452 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20455 * decl.c (finish_function): Don't set nested based on
20456 hack_decl_function_context.
20457 * parse.y (function_try_block): Check for nested function.
20458 (pending_inlines): Likewise.
20460 * decl2.c (build_expr_from_tree): If a unary op already has a
20461 type, just return it.
20463 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20465 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20466 (finish_file): Check the return value of walk_vtables.
20467 (finish_prevtable_vardecl): Return int.
20468 (finish_vtable_vardecl): Likewise.
20469 (prune_vtable_vardecl): Likewise.
20470 * lex.c (set_vardecl_interface_info): Likewise.
20471 * cp-tree.h: Adjust return types.
20473 * class.c (delete_duplicate_fields_1): Don't complain about
20474 duplicate nested types if they're the same type.
20475 (finish_struct): Remove check for duplicate.
20476 * decl2.c (grokfield): Don't check for typedef of anonymous type.
20478 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20480 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20482 * decl.c (grokdeclarator): Lose special handling of class-level
20483 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
20484 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20486 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20488 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20490 * search.c (compute_access): Fix handling of anonymous union
20492 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20493 from anonymous unions to their members.
20495 * typeck.c (build_x_function_call): For static member functions,
20496 hand off to build_member_call.
20498 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
20500 * typeck.c (build_component_ref): Handle OFFSET_REFs.
20502 * init.c (expand_vec_init): Fix init == 0 case.
20504 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20506 * init.c (build_new): pedwarn about init and array new.
20507 (expand_vec_init): Handle lists, use convert_for_initialization.
20509 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20510 when converting to an aggregate type.
20511 * cvt.c (cp_convert): Pass it through.
20513 * typeck.c (build_conditional_expr): Handle user-defined
20514 conversions to slightly different types.
20516 * decl.c (grokdeclarator): Force an array type in a parm to be
20519 * decl2.c (do_using_directive): Sorry.
20520 (do_namespace_alias): Likewise.
20521 * lex.c (real_yylex): Warn about using the `namespace' keyword.
20523 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20525 * parse.y (datadef): Move call to note_list_got_semicolon up.
20527 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
20529 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
20531 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
20533 * decl.c (cp_finish_decl): The exception regions have to be
20534 nested, not overlapping. We start the exception region for a
20535 decl, after it has been fully built, and all temporaries for it
20536 have been cleaned up.
20538 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
20540 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
20542 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20544 * tree.def: Add RETURN_INIT.
20545 * pt.c (instantiate_decl): Handle RETURN_INIT.
20546 * decl.c (store_return_init): Handle minimal_parse_mode.
20548 * tree.c (cp_build_type_variant): Just return an error_mark_node.
20549 * decl.c (make_typename_type): Don't try to get the file and line
20551 * typeck.c (comptypes): Handle TYPENAME_TYPE.
20553 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
20555 * decl.c (poplevel): Make sure we clear out and restore old local
20556 non-VAR_DECL values by default when they go out of scope.
20558 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
20560 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20561 referring to addresses of variables and functions.
20563 * error.c (dump_expr): Support SIZEOF_EXPR.
20565 * init.c (do_friend): Use the return value of check_classfn.
20567 * typeck.c (convert_arguments): Call complete_type.
20569 * method.c (hack_identifier): After giving an error, set value to
20572 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20574 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
20575 lossage for local classes.
20576 * cp-tree.h: Declare it.
20577 * decl.c (lookup_name_real): Evil, painful hack for local classes.
20578 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
20579 Use hack_decl_function_context.
20580 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
20581 (start_function): Use hack_decl_function_context.
20582 (finish_function): Likewise.
20583 * method.c (synthesize_method): Likewise.
20584 * lex.c (process_next_inline): Likewise.
20585 (do_pending_inlines): Likewise.
20586 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
20589 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
20591 * sig.c (build_signature_pointer_or_reference_type): Align
20592 signature pointers/references on 8-byte boundaries so they can be
20593 grabbed 2 words at a time on a Sparc.
20595 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20597 * method.c (hack_identifier): Requiring a static chain is now a
20599 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
20602 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20604 * init.c (build_offset_ref): Call complete_type.
20606 * decl.c (pop_from_top_level): Always pop previous_class_type.
20608 * parse.y: Handle multiple decls in a for-init-statement.
20609 * pt.c (tsubst_expr): Likewise.
20611 * pt.c (tsubst): Use tsubst_expr for the second operand of an
20614 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
20615 (poplevel_class): Set it here.
20616 (pop_from_top_level): Pop it here if we're returning to class scope.
20617 * class.c (pushclass): Don't set it here.
20619 * decl.c (maybe_push_to_top_level): Save current_template_parms,
20620 and clear it if !pseudo.
20621 (pop_from_top_level): Restore it.
20623 * decl2.c (finish_file): Push the dummy each time we walk the list
20626 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
20627 something for CAST_EXPR.
20629 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
20631 * cvt.c (cp_convert): Warn about implicit conversion of the
20632 address of a function to bool, as it is always true.
20634 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
20636 * typeck.c (c_expand_return): Fix warning for local externs returned.
20638 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20640 * tree.c (mapcar): Propagate const and volatile properly.
20642 * typeck.c (complete_type): Be sure to instantiate the
20643 MAIN_VARIANT of the type.
20645 * method.c (synthesize_method): Class interface hackery does not
20646 apply to synthesized methods.
20648 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
20650 * pt.c (comp_template_args): Use comptypes rather than just
20651 checking for TEMPLATE_TYPE_PARM equivalence.
20653 * typeck.c (build_x_function_call): Call complete_type before
20654 checking TYPE_OVERLOADS_CALL_EXPR.
20656 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
20658 * g++.c (main): Check also for new define ALT_LIBM.
20660 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
20662 * pt.c (instantiate_class_template): If we don't have a pattern
20664 (coerce_template_parms): If we see a local class, bail.
20666 * decl.c (grok_reference_init): Make sure there's a type before
20669 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
20670 (push_template_decl): Likewise.
20672 * parse.y (named_class_head): Set
20673 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
20675 * decl.c (xref_tag): Diagnose redeclaration of template
20676 type-parameter name.
20678 * error.c (dump_type): Handle anonymous template type parms.
20680 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
20682 (coerce_template_parms): Likewise.
20684 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
20686 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
20687 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
20689 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20691 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
20692 before trying to get its STUB_DECL.
20693 (coerce_template_parms): Likewise.
20695 * parse.y (template_type_parm): If they didn't use 'class',
20696 pretend they did after giving an error.
20698 * pt.c (coerce_template_parms): Diagnose use of local class.
20700 * decl.c (grok_reference_init): Use instantiate_type.
20702 * error.c (dump_expr): Handle TEMPLATE_DECLs.
20704 * parse.y (named_class_head): Diagnose mismatching types and tags.
20706 * decl.c (pushdecl): Type decls and class templates clash with
20707 artificial type decls, not hide them.
20709 * decl.c (redeclaration_error_message): Diagnose redefinition of
20710 templates properly.
20711 (duplicate_decls): Diagnose disallowed overloads for template
20714 * decl.c (start_decl): Call complete_type before checking for a
20717 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
20719 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
20721 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20723 * decl.c (grok_op_properties): Don't check for operator++(int) in
20726 * tree.c (perm_manip): Return a copy of variable and function
20727 decls with external linkage.
20729 * tree.def: Change some of the min tree codes to type "1".
20730 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
20731 * method.c (build_overload_int): Emit something arbitrary for
20732 anything but an INTEGER_CST if we're in a template.
20734 * decl.c (cp_finish_decl): Call complete_type before deciding
20735 whether or not to lay out the decl.
20737 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
20739 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
20741 * typeck2.c (build_x_arrow): Call complete_type.
20743 * pt.c (add_pending_template): Broken out.
20744 (lookup_template_class): If -fexternal-templates, call it for all
20745 the methods of implemented types.
20746 (instantiate_class_template): Instead of instantiating them here.
20747 (instantiate_decl): Handle -fexternal-templates earlier.
20749 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20751 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
20752 memoized lookup stuff inside GATHER_STATISTICS.
20754 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
20756 * decl.c (start_decl): Complain about array of incomplete type
20758 (grokdeclarator): Not here.
20760 * parse.y (template_parm): Expand full_parm inline so we can set
20761 the rule's precedence.
20763 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
20764 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
20765 * decl2.c (grokbitfield): Don't check for integer constant here.
20766 * class.c (finish_struct_1): Check here.
20768 * decl.c (define_label): Make the min decl go on permanent_obstack.
20770 * pt.c (unify): Don't handle CONST_DECLs.
20771 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
20772 (tsubst_copy): Likewise.
20774 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
20775 CONST_DECL for a template parm.
20777 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
20779 * decl.c (grokdeclarator): Complain about array of incomplete type
20781 (start_decl_1): Not here.
20783 * pt.c (tsubst): Handle pointer-to-function declarators.
20785 * method.c (hack_identifier): If pedantic, diagnose local class
20786 methods that require a static chain.
20788 * decl.c (grok_op_properties): No longer static.
20789 * cp-tree.h: Declare it.
20790 * pt.c (tsubst): Call it for operators.
20791 Use tsubst_copy for TREE_VECs.
20793 * parse.y (template_arg): The expr has precedence like '>'.
20795 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
20797 * pt.c (coerce_template_parms): Don't coerce an expression using
20799 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
20800 (tsubst): Don't use build_index_2_type if the max_value uses template
20802 * method.c (build_overload_int): Emit something arbitrary for an
20803 expression using template parms.
20805 * parse.y (template_close_bracket): New non-terminal to catch use
20806 of '>>' instead of '> >' in template class names.
20807 (template_type): Use it.
20808 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
20810 * tree.def: Add CAST_EXPR.
20811 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
20812 CONVERT_EXPR for minimal_parse_mode.
20813 * typeck.c (build_c_cast): Likewise.
20814 * pt.c (tsubst_copy): Likewise.
20815 * decl2.c (build_expr_from_tree): Likewise.
20816 * error.c (dump_expr): Likewise.
20818 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20820 * except.c (SetTerminate, SetUnexpected): Put back global vars.
20821 (init_exception_processing): Put back decl/init of
20822 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
20823 fns from libstdc++.
20825 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
20826 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
20828 * cp-tree.h (declare_uninstantiated_type_level,
20829 uninstantiated_type_level_p): Delete prototypes.
20831 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20833 * pt.c (tsubst_expr): Add default return.
20835 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20837 * error.c (fndecl_as_string): Delete unused arg CNAME.
20838 * sig.c (build_signature_table_constructor,
20839 build_signature_method_call): Fix calls.
20841 * class.c (the_null_vtable_entry): Delete var definition.
20842 (init_class_processing): Delete tree the_null_vtable_entry init.
20843 * decl.c (no_print_{functions, builtins}): Declare as static.
20844 (__tp_desc_type_node): #if 0 var definition.
20845 (init_type_desc): #if 0 init of __tp_desc_type_node.
20846 (vb_off_identifier): Move var decl into init_decl_processing.
20847 (current_function_assigns_this): Declare as static.
20848 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
20849 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
20850 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
20851 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
20852 * init.c (BI_header_type, BI_header_size): Declare as static.
20853 * pt.c (template_classes): Delete unused var.
20854 (add_pending_template): Delete decl for non-existent fn.
20855 (lookup_template_class): Delete vars CODE and TAG_CODE.
20856 (instantiate_template): Delete unused var TARGS.
20857 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
20859 (__tp_desc_type_node): #if 0 var decl.
20860 (fndecl_as_string): Fix prototype.
20862 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
20864 * tree.def: Add GOTO_STMT.
20865 * pt.c (tsubst_expr): Support goto and labels.
20866 * decl.c (define_label): Support minimal parsing.
20867 * parse.y (simple_stmt): Likewise.
20869 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20871 * xref.c (GNU_xref_member): Only define/set var I if
20872 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
20874 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
20875 (GNU_xref_end): Fix call.
20876 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
20877 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
20879 * tree.c (build_exception_variant): Delete unused vars I, A, T,
20881 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
20882 (mapcar): Delete unused var CODE.
20883 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
20884 (break_out_cleanups): Fix call.
20885 (bot_manip): Likewise.
20886 * call.c (build_method_call): Likewise.
20887 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
20889 * typeck.c (unary_complex_lvalue, build_modify_expr,
20890 convert_for_initialization): Likewise.
20891 * typeck2.c (build_functional_cast): Likewise.
20892 * cp-tree.h (build_cplus_new): Fix prototype.
20894 * repo.c (open_repo_file): Delete unused var Q.
20895 (repo_compile_flags, repo_template_declared,
20896 repo_template_defined, repo_class_defined, repo_inline_used,
20897 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
20898 (repo_get_id, repo_vtable_used): Declare as static.
20899 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
20902 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
20904 * parse.y (pending_inlines): Add function_try_block case.
20906 * pt.c (unify): Fix for template const parms.
20908 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20910 * lex.c (extract_interface_info): Delete forward decl.
20911 (default_copy_constructor_body, default_assign_ref_body): Delete
20912 decls for non-existent functions.
20913 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
20914 (init_lex): Delete setting them.
20915 (cons_up_default_function): Delete unused vars FUNC_BUF,
20916 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
20917 #if 0'd synth code.
20918 (toplevel, expression_obstack): Delete unused extern decls.
20919 (tree_node_kind): Delete unused enum.
20920 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
20922 (tree_node_kind_names): Delete unused extern decl.
20923 (synth_obstack): Delete unused var.
20924 (init_lex): Don't set it.
20925 (init_parse): Add decl before use.
20926 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
20927 (current_unit_{name, language}): Delete unused vars.
20928 (check_newline): Don't bother setting them, just accept the #pragma.
20929 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
20930 (current_unit_{name, language}): Delete decls.
20932 * search.c: Wrap all of the memoized functions, macros, and
20933 variables inside #ifdef GATHER_STATISTICS.
20934 (lookup_field, lookup_fnfields): Likewise.
20935 (init_search_processing): Likewise.
20936 (reinit_search_statistics): Wrap whole function.
20937 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
20939 * decl.c (finish_function): Only call pop_memoized_context if
20940 GATHER_STATISTICS is defined.
20941 (start_function): Likewise for push_memoized_context.
20942 * class.c (pushclass, popclass): Likewise.
20944 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
20945 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
20947 * cvt.c (cp_convert): Delete unused local var FORM.
20948 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
20951 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20953 * pt.c (do_poplevel): Oops; really return what we get from
20954 poplevel this time.
20956 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20958 * cp-tree.h (is_aggr_type): Add prototype.
20960 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
20961 * method.c ({push,pop}_cp_function_context): Delete decls.
20962 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
20963 (SetUnexpected, SetTerminate): Delete unused vars.
20964 (init_exception_processing): Don't set SetUnexpected or
20965 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
20966 (output_exception_table_entry): Delete unused array LABEL.
20967 (expand_internal_throw): Delete unused var PARAMS.
20968 (expand_start_catch_block): Delete unused var CLEANUP.
20969 (emit_exception_table): Delete unused var EH_NODE_DECL.
20970 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
20971 GOTO_UNWIND_AND_THROW. Don't set them.
20972 (end_eh_unwinder): Add top decl.
20973 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
20974 (exception_section, push_rtl_perm, do_function_call,
20975 lang_interim_eh, push_eh_cleanup, eh_outer_context,
20976 expand_end_eh_spec, end_eh_unwinder): Declare as static.
20977 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
20978 throw_used): Likewise.
20979 * cp-tree.h (expand_end_eh_spec): Delete prototype.
20981 * search.c (dfs_mark, dfs_mark_vtable_path,
20982 dfs_unmark_vtable_path, dfs_mark_new_vtable,
20983 dfs_unmark_new_vtable, dfs_clear_search_slot,
20984 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
20985 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
20986 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
20988 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
20989 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
20990 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
20991 Only define #ifdef GATHER_STATISTICS.
20992 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
20994 (vbase_decl): Delete var definition.
20995 (init_search): Delete old decl.
20996 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
20997 never actually used.
20998 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
20999 (get_base_distance_recursive): Delete unused fourth arg
21000 BASETYPE_PATH. Fix call .
21001 (get_base_distance): Fix call.
21002 (push_class_decls): Delete unused var ID.
21003 (make_memoized_table_entry): Declare as static.
21004 (breadth_first_search): Declare as static.
21005 (tree_has_any_destructor_p): Declare as static.
21006 (pop_class_decls): Delete unused arg pop_class_decls.
21007 * class.c (popclass): Fix call to pop_class_decls.
21008 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21009 tree_has_any_destructor_p): Delete prototypes.
21011 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21012 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
21013 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21014 (build_user_desc): Delete unused var T.
21015 (build_class_desc): Delete unused vars T and OFF.
21016 (build_t_desc): Delete unused var NAME_STRING.
21017 (build_headof): Make static.
21018 (get_bad_cast_node): Likewise.
21019 (get_def_to_follow): Likewise.
21020 * cp-tree.h (init_type_desc): Add prototype.
21021 (build_headof): Remove prototype.
21023 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21025 * pt.c (tsubst): Only look for matching decls at file scope for
21026 non-member functions.
21028 * call.c (build_scoped_method_call): Handle scoped destructor
21029 calls in templates.
21031 * decl.c (*_top_level): Also save previous_class_values.
21033 * pt.c (tsubst_expr): Support do {} while loops.
21034 * parse.y (simple_stmt): Likewise.
21035 * tree.def: Likewise.
21037 * method.c (build_overload_identifier): For a class nested in a
21038 template class, don't mangle in the template parms from our
21041 * lex.c, cp-tree.h: Remove support for template instantiations in
21042 the pending_inlines code.
21043 * pt.c: Remove dead functions and unused arguments.
21044 (uses_template_parms): TYPENAME_TYPEs always use template parms.
21045 * parse.y: Stop passing anything to end_template_decl.
21046 * tree.c (print_lang_statistics): Only print tinst info #ifdef
21049 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21051 * init.c (expand_recursive_init{,_1}): Delete decls.
21052 (sort_member_init): Delete unused var INIT.
21053 (emit_base_init): Delete unused var X.
21054 (build_offset_ref): Delete unused var CNAME.
21055 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21056 (emit_base_init): Delete unused local var BASE. Delete extern
21057 decl of IN_CHARGE_IDENTIFIER.
21058 (build_delete): Delete unused local var VIRTUAL_SIZE.
21060 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21061 (build_delete): Fix call.
21062 * decl2.c (delete_sanity): Likewise.
21063 * cp-tree.h (build_vec_delete): Update prototype.
21065 * typeck.c (common_base_type): Delete unused var TMP.
21066 (build_binary_op): Delete local var ARGS_SAVE.
21067 (build_array_ref): Delete unused var ITYPE.
21068 (c_expand_return): Delete unused var USE_TEMP.
21070 * typeck.c (compexcepttypes): Delete unused arg STRICT.
21071 (comptypes): Fix calls.
21072 * decl.c (duplicate_decls): Likewise.
21073 * cp-tree.h (compexcepttypes): Delete extra arg.
21075 * decl2.c (check_classfn): Delete unused second arg CNAME.
21076 * decl.c (start_decl, grokfndecl): Fix calls.
21077 * init.c (do_friend): Likewise.
21078 * cp-tree.h (check_classfn): Update prototype.
21080 * cp-tree.h (signature_error, import_export_vtable,
21081 append_signature_fields, id_in_current_class, mark_used,
21082 copy_assignment_arg_p): Add decls.
21083 * decl2.c (mark_used): Delete decl.
21085 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21087 * class.c (get_vtable_entry): Disable unused function.
21088 (doing_hard_virtuals): Delete unused static global var.
21089 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21090 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21091 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21092 (modify_one_vtable): Delete unused var OLD_RTTI.
21093 (finish_struct_anon): Delete unused vars OFFSET and X.
21094 (finish_struct_bits): Delete unused var METHOD_VEC.
21095 (get_basefndecls): Delete unused var PURPOSE. Delete unused
21096 for-scope local variable METHODS.
21098 * call.c (user_harshness): Delete unused/unneeded arg PARM.
21099 (ideal_candidate): Delete unused args BASETYPE and PARMS.
21100 (build_method_call): Delete unused args passed into ideal_candidate.
21101 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
21102 * cp-tree.h (synthesize_method): Add decl.
21104 * decl.c (note_level_for_for): Give void return type.
21105 (pushdecl_nonclass_level): Likewise.
21106 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21107 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21108 (suspend_binding_level): Delete unused var LEVEL.
21109 (duplicate_decls): Delete unused var CTYPE.
21110 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21111 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21113 (grokdeclarator): Delete unused var C.
21114 (grokdeclarator): Delete unused var SIZE_VARIES.
21115 (grokparms): Delete unused var SAW_VOID.
21116 (start_function): Delete unused var OLDDECL.
21117 (cplus_expand_expr_stmt): Delete unused var
21118 REMOVE_IMPLICIT_IMMEDIATELY.
21120 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21122 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21124 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21126 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21127 (build_min_nt): Likewise.
21128 * pt.c (do_pushlevel): Emit line note.
21129 (do_poplevel): Return what we get from poplevel.
21130 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21131 * parse.y: Use do_pushlevel and do_poplevel.
21132 * cp-tree.h: Declare do_poplevel.
21134 * cp-tree.h: Declare at_eof.
21135 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21136 * decl2.c (import_export_decl): Renamed from import_export_inline.
21137 (finish_file): Call it to do interface handling for statics.
21138 * pt.c (tsubst_copy): Call mark_used on variables and functions
21141 * decl2.c (finish_file): Don't emit statics we can't generate.
21142 * pt.c (instantiate_decl): Don't set interface on instantiations
21145 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21146 * tree.c (print_lang_statistics): Print max template depth.
21147 * pt.c (push_tinst_level): Dump entire instantiation context.
21148 (instantiate_class_template): Use it and pop_tinst_level.
21149 (instantiate_decl): Likewise.
21151 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21152 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21154 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21156 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21157 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21158 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21159 the new template implementation.
21161 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21163 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21165 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
21167 * decl.c (cp_finish_decl): Delay emitting the debug information for
21168 a typedef that has been installed as the canonical typedef, if the
21169 type has not yet been defined.
21171 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21173 * decl2.c (grokfield): Still call pop_nested_class for access decls.
21175 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21177 * decl.c (lookup_label): Call label_rtx.
21179 * decl.c (make_binding_level): New function.
21180 (pushlevel, pushlevel_class): Call it instead of explicit
21181 duplicate calls to xmalloc.
21183 * decl.c (init_decl_processing): Delete useless build_pointer_type
21186 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21187 (sizet_ftype_string): Delete variable.
21188 (init_decl_processing): Add built-in functions fabsf, fabsl,
21189 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
21190 variable strlen_ftype, used for strlen.
21192 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
21194 * decl.c (push_to_top_level): Start from current_binding_level
21195 again for now; the stl hacks depend on g++ being broken in this
21196 way, and it'll be fixed in the template rewrite.
21198 * tree.def: Add USING_DECL.
21199 * decl2.c (do_class_using_decl): Implement.
21200 (grokfield): Pass access decls off to do_class_using_decl instead of
21202 * error.c (dump_decl): Handle USING_DECLs.
21203 * decl.c (grokdeclarator): Remove code for handling access decls.
21204 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21205 as access decls for now.
21206 (finish_struct): Don't check USING_DECLs for other uses of the name.
21208 * search.c (get_matching_virtual): Use cp_error_at.
21210 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21212 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21214 (self_promoting_args_p): Move the check that TYPE is non-nil
21215 before trying to look at its main variant.
21216 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21218 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21220 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21221 (do_friend): Delete call to xref_friend.
21222 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21224 * typeck.c (convert_sequence): #if 0 unused function.
21226 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21227 be in decl_in_memory_p.
21228 (decl_in_memory_p): Delete decl.
21229 * expr.c (decl_in_memory_p): Delete fn.
21230 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21232 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21234 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21236 * class.c (finish_struct_1): Check for a pure-specifier on a
21237 non-virtual function here.
21239 * decl2.c (grok_function_init): Don't check whether the function
21241 (grokfield): Don't call check_for_override here.
21243 * decl.c (push_to_top_level): Start from inner_binding_level,
21244 check class_shadowed in class levels.
21246 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
21248 * decl.c (resume_level): Ignore things that don't have names, instead
21251 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21253 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21255 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21257 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21260 * parse.y (complete_type_name): Bind global_scope earlier.
21261 (complex_type_name): Likewise.
21262 (qualified_type_name): Remove.
21264 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21266 * decl.c (grokfndecl): Move code that looks for virtuals in base
21268 * class.c (check_for_override): ... to a new function.
21269 (finish_struct_1): Call it.
21271 * cp-tree.h: Declare warn_sign_compare.
21273 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21274 rather than extra_warnings to decide whether to warn about
21275 comparison of signed and unsigned.
21277 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
21278 implies -Wsign-compare. -Wall doesn't imply -W.
21280 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
21282 * typeck.c (build_component_ref): Fix to handle anon unions in base
21285 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21287 * class.c (resolves_to_fixed_type_p): Delete code dealing with
21288 a WITH_CLEANUP_EXPR, since we don't generate them any more.
21289 * cvt.c (build_up_reference): Likewise.
21290 * decl.c (grok_reference_init): Likewise.
21291 (cp_finish_decl): Likewise.
21292 * error.c (dump_expr): Likewise.
21293 * tree.c (real_lvalue_p): Likewise.
21294 (lvalue_p): Likewise.
21295 (build_cplus_new): Likewise.
21296 (unsave_expr_now): Likewise.
21297 * typeck.c (unary_complex_lvalue, build_modify_expr,
21298 c_expand_return): Likewise.
21300 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21302 Make the C++ front-end pay attention to attributes for structures.
21303 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21305 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21306 Take out old round_up_size use and setting the DECL_ALIGN possibly
21307 using it. Take out setting of TYPE_ALIGN to round_up_size, which
21308 can override what the attribute set.
21309 * cp-tree.h (finish_struct): Update prototype.
21310 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21311 attributes to finish_struct.
21312 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21313 value down into finish_struct.
21314 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21316 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
21318 * decl.c (poplevel): Re-word dead for local handling.
21319 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
21320 (cp_finish_decl): If is_for_scope, check for duplicates so
21321 we can disable is_for_scope. Otherwise, preserve_temp_slots.
21323 * lex.c (do_identifier): Use global binding in preference of
21324 dead for local variable.
21326 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
21328 * init.c (initializing_context): Handle anon union changes, the
21329 context where fields of anon unions can be initialized now has to be
21330 found by walking up the TYPE_CONTEXT chain.
21332 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
21334 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21335 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21336 (obscure_complex_init): If bss is supported, always set
21337 DECL_INITIAL to error_mark_node.
21339 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21341 * init.c (is_friend): Make sure there's a context before we see if
21344 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
21346 * init.c (is_friend): Classes are not friendly with nested classes.
21348 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
21350 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21351 and record its result.
21353 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
21355 * class.c (finish_struct_anon): Switch around code to not move anon
21356 union elements around, nor mess up their contexts, nor offsets,
21357 instead we now build up the right number of COMPONENT_REFs for all
21358 the anon unions that may be present at build_component_ref time.
21359 * typeck.c (lookup_anon_field): New routine to handle field lookup
21360 on fields without names. We find them, based upon their unique type
21362 * typeck.c (build_component_ref): Allow FIELD_DECL components.
21363 Handle finding components in anonymous unions, and ensure that a
21364 COMPONENT_REF is built for each level as necessary.
21366 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
21368 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21369 code that ensures that copy ctors are used if appropriate.
21371 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21373 * init.c (build_vec_delete): Only give an error if base isn't an
21376 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
21378 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21379 (yylex): If we see `new', keep slurping.
21381 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
21383 * class.c (finish_struct_1): Move code for handling anon unions...
21384 (finish_struct_anon): to here. Fixup so that we do the offset
21385 calculations right, and so that the fields are physically moved to
21386 the containers's chain.
21388 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21390 * decl.c (grokdeclarator): Avoid trying to get an operand off an
21393 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
21395 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21396 POINTER_SIZE to agree with expr.c.
21398 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
21400 * search.c (lookup_field): Don't report ambiguities if protect is 0,
21401 instead return NULL_TREE.
21403 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
21405 * class.c (finish_struct_1): Call warn_hidden if we want warnings
21406 about overloaded virtual functions.
21407 (warn_hidden): New routine to warn of virtual functions that are
21408 hidden by other virtual functions, that are not overridden.
21409 (get_basefndecls): New routine, used by warn_hidden.
21410 (mark_overriders): New routine, used by warn_hidden.
21411 * search.c (get_matching_virtual): Remove old warning that just
21414 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21416 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21418 * typeck.c (null_ptr_cst_p): Delete unused fn.
21419 (build_function_call_maybe): Delete unused fn.
21421 * expr.c (extract_init): #if 0 the code after unconditional return 0
21424 Delete old cadillac code.
21425 * edsel.c: Remove file.
21426 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21427 * Makefile.in (CXX_OBJS): Delete edsel.o.
21428 (edsel.o): Delete rule.
21429 * cp-tree.h (flag_cadillac): Delete var decl.
21430 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21431 * decl2.c (flag_cadillac): Delete var definition.
21432 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21433 (grokfield): Delete code depending on flag_cadillac.
21434 (finish_anon_union): Likewise.
21435 * class.c (finish_struct_1): Likewise.
21436 (pushclass): Likewise.
21437 (popclass): Likewise.
21438 (push_lang_context): Likewise.
21439 (pop_lang_context): Likewise.
21440 * decl.c (init_decl_processing): Likewise.
21441 (start_decl): Likewise.
21442 (cp_finish_decl): Likewise.
21443 (xref_tag): Likewise.
21444 (finish_enum): Likewise.
21445 (start_function): Likewise.
21446 (finish_function): Likewise.
21447 (finish_stmt): Likewise.
21448 * lex.c (lang_init): Likewise.
21449 (check_newline): Likewise.
21451 * lex.c (do_pending_inlines): Delete synthesized method kludge.
21453 Delete defunct, ancient garbage collection implementation.
21454 * rtti.c: New file with the RTTI stuff from gc.c.
21455 * gc.c: Removed file (moved the remaining stuff into rtti.c).
21456 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21457 (rtti.o): New rule, replacing gc.o.
21458 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21459 * cp-tree.h: Delete gc-related fn decls.
21460 (DECL_GC_OFFSET): Delete macro.
21461 (flag_gc): Delete extern decl.
21462 * decl.c (current_function_obstack_index): Delete var decl.
21463 (current_function_obstack_usage): Delete var decl.
21464 (start_function): Delete clearing of current_function_obstack_index
21465 and current_function_obstack_usage.
21466 (init_decl_processing): Delete code relying on -fgc.
21467 Delete call to init_gc_processing.
21468 (cp_finish_decl): Delete calls to build_static_gc_entry and
21469 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
21470 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21471 and to expand_expr of a __gc_main call.
21472 (maybe_gc_cleanup): Delete var decl.
21473 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21474 * decl2.c (flag_gc): Delete var decl.
21475 (lang_f_options): Delete offering of -fgc.
21476 (lang_decode_option): Delete -fgc and -fno-gc handling.
21477 (get_temp_regvar): Delete gc code.
21478 * init.c (build_new): Delete gc code.
21479 * lex.c (init_lex): Delete checking of flag_gc.
21481 * typeck.c (convert_arguments): Delete gc code.
21482 (build_component_addr): Delete -fgc warning.
21483 (build_modify_expr): Delete gc code.
21485 * decl2.c (build_push_scope): Delete fn.
21486 * cp-tree.h (build_push_scope): Delete decl.
21488 * search.c (clear_search_slots): Delete fn.
21489 * cp-tree.h (clear_search_slots): Delete decl.
21491 * search.c (tree_needs_constructor_p): Delete fn.
21492 * cp-tree.h (tree_needs_constructor_p): Delete decl.
21494 * tree.c (id_cmp): Delete fn.
21496 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21497 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21499 * tree.c (decl_value_member): Delete fn.
21500 * cp-tree.h (decl_value_member): Delete decl.
21502 * tree.c (list_hash_lookup_or_cons): Delete fn.
21503 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21505 * method.c (cplus_exception_name): Delete fn.
21506 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21508 * spew.c (shift_tokens): Delete fn.
21510 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21512 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21514 * parse.y: Likewise.
21516 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21518 * tree.c (build_cplus_staticfn_type): Delete function definition;
21520 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
21522 * tree.c (virtual_member): Delete function definition; never used.
21523 * cp-tree.h (virtual_member): Delete decl.
21525 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
21527 * typeck.c (build_component_ref): Handle getting vbase pointers
21528 out of complex multiple inheritance better.
21530 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
21532 * typeck.c (build_object_ref): Make sure we use the real type, not
21533 any reference type.
21535 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
21537 * tree.c (build_exception_variant): Don't create new types if we
21538 don't have to, also build new types on the right obstack.
21540 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21542 * decl.c (store_bindings): Split out from push_to_top_level.
21543 (push_to_top_level): Call it for b->type_shadowed on class binding
21546 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
21548 * search.c (expand_upcast_fixups): Fix so that offsets stored in
21549 vbase_offsets are always right. Fixes a problem where virtual base
21550 upcasting and downcasting could be wrong during conversions on this
21551 during virtual function dispatch at ctor/dtor time when dynamic
21552 vtable fixups for deltas are needed. This only sounds easier than
21554 (fixup_virtual_upcast_offsets): Change to reflect new calling
21555 convention for expand_upcast_fixups.
21557 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21559 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
21560 check that it's usable as the bitfield width.
21562 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21564 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
21565 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
21566 only ever used for functions in it.
21568 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21570 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
21571 (nested_type): Likewise.
21572 (nested_name_specifier): Use lastiddecl.
21574 * decl.c (grokdeclarator): Adjust accordingly.
21575 * init.c (expand_member_init): Likewise.
21576 * parse.y (base_class): Likewise.
21577 * typeck2.c (build_functional_cast): Likewise.
21579 * typeck2.c (build_functional_cast): Fill in name after we've
21580 checked for non-aggr type.
21582 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
21584 * decl2.c (warn_pointer_arith): Default to on.
21586 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21588 * lex.c (is_rid): New function.
21589 * decl.c (grokdeclarator): Diagnose reserved words used as
21592 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
21594 * tree.c (get_decl_list): Don't lose cv-quals.
21596 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
21597 typespecs used as declarator-ids.
21599 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
21601 * decl.c (poplevel): When poping a level, don't give a warning for
21602 any subblocks that already exist.
21604 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21606 * typeck.c (build_object_ref): Finish what I started.
21608 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
21610 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
21612 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
21615 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21617 * decl.c (xref_tag): Handle passing a type in directly.
21619 * parse.y (qualified_type_name): Pull out the type.
21620 (nested_type): Likewise.
21621 Take types directly instead of as identifiers.
21622 * call.c (build_scoped_method_call): Take types directly instead of
21624 * decl.c (xref_basetypes): Likewise.
21625 * init.c (expand_member_init): Likewise.
21626 (build_member_call): Likewise.
21627 (build_offset_ref): Likewise.
21628 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
21629 * method.c (do_build_assign_ref): Likewise.
21630 * decl.c (grokdeclarator): Handle a type appearing as the
21631 declarator-id for constructors.
21632 * method.c (do_build_copy_constructor): current_base_init_list now
21633 uses the types directly, not their names.
21634 * init.c (sort_base_init): Likewise.
21635 (expand_member_init): Likewise.
21636 * init.c (is_aggr_type): New function, like is_aggr_typedef.
21638 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
21640 * tree.c (layout_basetypes): Call build_lang_field_decl instead
21641 of build_lang_decl if first arg is a FIELD_DECL.
21643 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21645 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
21647 * except.c (expand_start_catch_block): Set TREE_USED to avoid
21648 warnings about the catch handler.
21650 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
21652 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
21653 expand_target_expr.
21655 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21657 Fix access control to use trees rather than integers.
21658 * class.c (access_{default, public, protected, private,
21659 default_virtual, public_virtual, private_virtual}_node): Add
21661 (init_class_processing): Do creation of those nodes.
21662 * cp-tree.h (access_type): Delete enum decl.
21663 (access_{default, public, protected, private, default_virtual,
21664 public_virtual, private_virtual}_node): Add decls.
21665 (compute_access): Change return type.
21666 * search.c (compute_access): Have tree return type, instead of enum.
21667 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
21668 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
21669 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
21670 * parse.y (VISSPEC): Make ttype rather than itype.
21671 (base_class_access_list): Likewise.
21672 * *.[cy]: Change all refs of `access_public' to `access_public_node',
21674 * call.c (build_method_call): Make ACCESS be a tree.
21675 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
21676 * cvt.c (convert_to_aggr): Likewise.
21677 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
21679 * method.c (hack_identifier): Likewise.
21680 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
21682 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
21684 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
21685 frontend, and make it more consistent with respect to
21686 warn_pointer_arith.
21688 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
21690 * decl.c (pushdecl): Check for duplicate parameter names.
21692 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
21694 * decl.c (expand_static_init): Call assemble_external for atexit.
21696 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
21698 * except.c (do_unwind): Remove some generated dead code.
21699 (eh_outer_context): New routine, factor out some common code from
21700 expand_builtin_throw and end_eh_unwinder. Add code to do return
21701 address masking for the PA.
21702 (expand_builtin_throw): Use eh_outer_context instead of open coding
21704 (end_eh_unwinder): Likewise.
21706 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
21708 * except.c (expand_throw): Call assemble_external for __empty, if we
21711 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
21713 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
21714 NORMAL_RETURN_ADDR_OFFSET.
21715 (end_eh_unwinder): Likewise.
21717 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
21719 * gc.c (build_dynamic_cast): Make sure we don't cast away const
21720 when dealing with references, and make sure we handle dynamic
21721 casting to a cv qualified reference.
21723 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
21725 * except.c (struct eh_context): New structure top hold eh context
21727 (push_eh_context): New routine.
21728 (pop_eh_context): Likewise.
21729 * decl.c (push_cp_function_context): Use them.
21730 (pop_cp_function_context): Likewise.
21732 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
21734 * decl2.c (finish_file): Also prune uninteresting functions in the
21735 inline emission loop.
21737 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21739 * sig.c (build_signature_table_constructor): Mark functions
21740 in the signature as referenced.
21742 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
21744 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
21745 the inline emission stuff.
21747 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
21749 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
21751 * lang-options.h: Add -f{no-,}weak.
21752 * decl.c (init_decl_processing): If the target does not support weak
21753 symbols, don't use them.
21754 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
21756 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
21758 * init.c (expand_member_init): warning for base init after members.
21760 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
21762 * cvt.c (build_expr_type_conversion): Don't convert to a reference
21765 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
21767 * method.c (report_type_mismatch): Improve wording for volatile
21770 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
21772 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
21773 expand_assignment, as the later doesn't handle things that have
21774 copy constructors well. The compiler would do bitwise copying,
21775 instead of ctor calling in some cases.
21777 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
21779 * g++.c (my_strerror): Return "cannot access" if errno is 0.
21780 (pfatal_with_name, perror_exec): Don't assume that
21781 the returned value from my_strerror contains no '%'s.
21783 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
21785 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
21787 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
21788 TYPE_METHODS/TREE_CHAIN mean what they used to.
21789 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
21790 instead of TYPE_METHODS.
21791 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
21792 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
21793 * cp-tree.h (CLASSTYPE_METHODS): Lose.
21794 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
21796 (struct lang_decl): Lose next_method field.
21797 (DECL_NEXT_METHOD): Lose.
21798 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
21799 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
21801 (finish_struct_methods): Don't mess with the TREE_CHAINs in
21804 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
21807 * call.c (build_method_call): Synthesize here even when not inlining.
21808 * typeck.c (build_function_call_real): Likewise.
21810 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
21812 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
21813 == DBX_DEBUG, call dbxout_start_new_source_file and
21814 dbxout_resume_previous_source_file when appropriate.
21816 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
21818 * except.c (start_anon_func): Push to the top level.
21819 (end_anon_func): Pop from the top level.
21821 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
21823 * cp-tree.h (build_cleanup): New routine to build cleanups.
21824 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
21825 call at ctor time and use atexit to run it later.
21826 * decl2.c (build_cleanup): New routine, taken from finish_file.
21827 (finish_file): Use build_cleanup instead, and don't put function
21828 local statics in global dtor list.
21830 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
21832 * except.c (expand_throw): Ensure that we have cleanups, if we try
21833 and expand cleanups.
21835 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
21837 * except.c (expand_throw): Add logic to manage dynamic cleanups for
21839 (expand_end_catch_block): Use the magic of expand_goto, instead of
21840 emit_jump so that we get the cleanup for any catch clause parameter
21841 and the cleanup for the exception object. Update to reflect label
21843 (push_eh_cleanup): New routine to register a cleanup for an
21845 (empty_fndecl): Used to default cleanup actions to
21847 (init_exception_processing): Setup empty_fndecl. Setup
21849 (expand_start_catch_block): Update to reflect label changes. Call
21850 push_eh_object to register the cleanup for the EH object.
21851 (start_anon_func): New routine to start building lambda expressions
21853 (end_anon_func): New routine to end them.
21854 (struct labelNode): Change so that we can use tree labels, or rtx
21856 (saved_cleanup): Object to check for dynamic cleanups for the
21857 exception handling object.
21858 (push_label_entry): Change so that we can use tree labels, or rtx
21860 (pop_label_entry): Likewise.
21861 (top_label_entry): Likewise.
21862 (expand_start_all_catch): Use tree label instead of rtx label, so
21863 that we can get the magic of expand_goto.
21864 (expand_end_all_catch): Update to reflect label changes.
21866 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
21868 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
21869 building_cleanup logic, as we now use UNSAVE_EXPRs.
21870 * cp-tree.h (unsave_expr): Declare it.
21871 * decl.c (building_cleanup): Remove.
21872 (maybe_build_cleanup): Remove building_cleanup logic, and use
21873 UNSAVE_EXPR instead.
21875 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
21877 * gc.c (build_t_desc): Update error message to say <typeinfo>.
21879 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
21881 * decl.c (pushdecl): Only warn about shadowing a local variable if
21882 warn_shadow is true.
21884 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
21886 * typeck.c (build_binary_op_nodefault): Added warning about
21887 comparisons between different enum types with -Wall, unless
21888 -fenum-int-equiv set.
21890 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
21892 * class.c (finish_struct_1): Skip down to the inner type in
21893 multidimensional arrays. Ensures ctors will be made for types that
21896 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
21898 * decl.c (last_dtor_insn): New to track the last compiler generated
21900 (store_parm_decls): Set it.
21901 (finish_function): Use it to see if the dtor is empty. Avoid doing
21902 vtable setup all the time, if we can.
21903 (struct cp_function): Add last_dtor_insn.
21904 (push_cp_function_context): Save it.
21905 (pop_cp_function_context): Restore it.
21907 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
21909 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
21912 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
21914 * typeck.c (expand_target_expr): Make sure targets get put into the
21915 current temp_slot_level, so that the free_temp_slots call will reuse
21918 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
21920 * class.c (finish_struct_1): Delay delta fixups for virtual bases
21921 until after we have done the hard virtuals, to avoid a bogus `every
21922 virtual function must have a unique final overrider' for virtual
21923 functions that are only overridden by hard virtuals.
21925 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
21927 * pt.c (do_function_instantiation): Don't try to find a file-scope
21928 template for a member function.
21930 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
21932 * g++.c (main): Add handling of -nodefaultlibs.
21934 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
21936 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
21937 distinguish between direct bindings of reference variables, and
21938 indirect bindings of reference variables.
21939 * cvt.c (build_up_reference): Use it.
21940 * typeck.c (convert_arguments): Use it to indicate this is an
21942 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
21943 as they are unused.
21944 (expand_static_init): Likewise.
21945 (cplus_expand_expr_stmt): Likewise.
21946 * decl2.c (finish_file): Likewise.
21947 * init.c (perform_member_init): Likewise.
21948 (emit_base_init): Likewise.
21949 (expand_aggr_vbase_init_1): Likewise.
21951 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
21953 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
21954 get a DECL_LANG_SPECIFIC node.
21955 * cp-tree.h (lang_decl_flags): Add new member `level'.
21956 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
21957 decl_flags level member.
21959 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
21961 * call.c (build_method_call): Make sure instance has a
21962 TYPE_LANG_SPECIFIC node before we dive into it.
21964 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
21966 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
21968 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
21970 * decl.c (duplicate_decls): When smashing decls, smash staticness in
21973 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
21975 * decl.c (poplevel): Handle the merging of subblocks of cleanups
21976 when finishing blocks that have already been created (usually due to
21977 the fixup goto code). Fixes bad debugging information.
21979 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
21981 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
21982 that's not a list of overloaded functions.
21984 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
21986 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
21987 before trying to use DECL_ABSTRACT_VIRTUAL_P.
21989 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
21991 * decl2.c (mark_used): New function for hooking into setting of
21992 TREE_USED on decls.
21993 * call.c (build_method_call): Use it.
21994 * class.c (instantiate_type): Likewise.
21995 * init.c (build_offset_ref): Likewise. Don't call assemble_external
21996 for all like-named functions.
21997 * method.c (hack_identifier): Likewise.
21998 (emit_thunk): Don't call assemble_external.
21999 (make_thunk): Create thunk as a FUNCTION_DECL so that it
22000 gets the right mode and ENCODE_SECTION_INFO works.
22002 * parse.y: Use mark_used. Pass operator names to do_identifier.
22003 * lex.c (do_identifier): Handle operator names.
22005 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22007 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22009 * errfn.c: Include stdio.h.
22010 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22012 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
22014 * typeck2.c (digest_init): Always convert initializers to the
22017 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
22019 * init.c (member_init_ok_or_else): Don't allow member initializers
22020 for indirect members, as it is invalid.
22022 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22024 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22026 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
22028 * parse.y (for.init.statement): Catch compound statements inside for
22029 initializations, if we're being pedantic.
22031 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
22033 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22036 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
22038 * error.c (dump_expr): Don't core dump when a boolean expression is
22039 used as a default argument.
22041 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
22043 * class.c (finish_struct_bits): Check aggregate_value_p instead of
22046 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
22048 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22049 BLKmode type that would otherwise be returned in registers.
22051 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22053 * g++.c (WITHLIBC): New macro.
22054 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
22055 saw_libc and pass it at the end if it was set.
22057 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
22059 * parse.y (fn.def1): Call split_specs_attrs in
22060 declmods notype_declarator case.