1 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
3 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4 instructions to gcc.gnu.org. Removed e-mail address.
6 1999-07-17 Mark Mitchell <mark@codesourcery.com>
8 * pt.c (determine_specialization): Tighten error-checking.
9 (end_template_parm_list): Likewise.
11 1999-07-14 Mark Mitchell <mark@codesourcery.com>
13 * pt.c (check_default_tmpl_args): Handle friends defined in the
14 class just like member functions defined in the class.
16 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
17 Jason Merrill <jason@yorick.cygnus.com>
19 * cp-tree.h (struct lang_decl): Added field for storing sorted
20 FIELD_DECLs (used in TYPE_DECLs).
21 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
22 (DECL_SORTED_FIELDS): New macro.
23 * class.c (method_name_cmp): New function.
24 (finish_struct_methods): Modified to support sorting and searching
26 (finish_struct_anon): Changed code in inner loop to use ELT rather
27 than UELT (which required an extra indirection for every reference).
28 (field_decl_cmp): New function to support sorting FIELD_DECLs.
29 (finish_struct_1): Sort fields.
30 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
31 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
32 Also, switch to using array indexing rather than a changing pointer.
33 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
36 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
38 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
39 casts in system headers or extern "C" blocks.
41 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
44 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
46 * decl2.c (write_virtuals): Deleted declaration.
47 * cp-tree.h (write_virtuals): Deleted extern declaration.
48 * class.c (finish_struct_1): Removed #if 0'd code that mentions
50 * semantics.c (begin_class_definition): Rewrite code to not depend
53 * lex.c (cp_pragma_interface): New function.
54 (cp_pragma_implementation): Likewise.
55 (handle_cp_pragma): Call them.
57 * typeck.c (comptypes): Simplify C code in look_hard.
59 * xref.c (PALLOC): Use xcalloc, not calloc.
60 (SALLOC): Use xmalloc, not malloc.
62 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
64 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
67 * decl.c (duplicate_decls): If a redeclaration doesn't match the
68 initial declaration, then don't save the inline info and by all
69 means don't mark the function as a builtin function.
71 * decl.c (lookup_name_real): Set NONCLASS to 1 if
72 CURRENT_CLASS_TYPE is 0.
74 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
77 * ptree.c (print_lang_type): Added vtable-needs-writing.
79 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
81 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
83 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
85 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
88 1999-07-05 Dave Brolley <brolley@cygnus.com>
90 * lex.c (errorcount): Declare it.
91 (finish_parse): Update errorcount for when using CPPLIB.
93 1999-07-05 Mark Mitchell <mark@codesourcery.com>
95 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
97 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
98 * decl.c (push_class_binding): Use it.
99 (lookup_name_real): Likewise.
101 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
103 * cp-tree.h (widest_integer_literal_type_node,
104 widest_unsigned_literal_type) : New.
105 * decl.c (widest_integer_literal_type_node,
106 widest_unsigned_literal_type) : New.
107 (init_decl_processing): Handle/use the two new types.
108 * lex.c (real_yylex): Same.
109 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
112 1999-07-01 Mark Mitchell <mark@codesourcery.com>
114 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
115 to anonymous cv-qualified types.
117 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
119 * lex.c (real_yylex) : Change integer literal overflow handling to
122 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
124 1999-06-28 Richard Henderson <rth@cygnus.com>
126 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
128 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
130 * error.c (dump_type_real): Handle TREE_LIST again.
132 * typeck.c (comp_target_parms): Don't complain about
133 converting from () to (...) if !flag_strict_prototype.
135 * decl.c (grokdeclarator): Update the names of all variants when
138 1999-06-21 Mark Mitchell <mark@codesourcery.com>
140 * init.c (expand_aggr_vbase_init): Rename to
141 construct_virtual_bases. Conditionalize construction here,
143 (emit_base_init): Here.
145 1999-06-19 Mark Mitchell <mark@codesourcery.com>
147 * semantics.c (finish_asm_statement): Apply decay conversions to
150 * decl.c (expand_static_init): When building an anonymous function
151 for use with atexit, compute its body before and after entering
154 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
157 1999-06-18 Mark Mitchell <mark@codesourcery.com>
159 * init.c (expand_aggr_vbase_init): Add flag parameter.
160 (build_partial_cleanup_for): Remove, inlining into ..
161 (expand_cleanup_for_base): ... here. Take flag parameter.
162 (emit_base_init): Pass the in_chrg parameter to
163 emit_aggr_vbase_init.
164 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
166 1999-06-16 Mark Mitchell <mark@codesourcery.com>
168 * decl2.c (import_export_decl): Use same_type_p, rather than
169 relying on pointer-equality for types.
171 * method.c (do_build_copy_constructor): Simplify.
173 * call.c (build_method_call): Remove bogus code for two-argument
175 * init.c (build_new_1): Expand on comment, and remove dead code.
177 * init.c (expand_cleanup_for_base): New function, split out
179 (emit_base_init): Here.
180 (expand_aggr_vbase_init): Use it.
182 1999-06-15 Mark Mitchell <mark@codesourcery.com>
184 * cp-tree.h (class_cache_firstobj): Declare.
185 (maybe_push_cache_obstack): Rename to push_cache_obstack.
186 * class.c (permanent_obstack): Remove declaration.
187 (class_cache_firstobj): Make it global.
188 (add_method): Don't use permanent_obstack directly.
189 (pushclass): Only free the class_cache_obstack if we know how far
191 (maybe_push_cache_obstack): Rename to push_cache_obstack.
192 * decl.c: Remove dead comment.
193 (saved_scope): Add class_cache_firstobj.
194 (push_to_top_level): Save it.
195 (pop_from_top_level): Restore it.
196 (push_class_level_binding): Use push_cache_obstack, not
197 maybe_push_cache_obstack.
198 * search.c (push_class_decls): Likewise.
200 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
202 * pt.c (tsubst_friend_function): Push into namespace of friend
203 function before pushdecl'ing it.
205 1999-06-14 Nathan Sidwell <nathan@acm.org>
207 * call.c (build_new_op): Remove REF_BIND from all operands.
209 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
211 * init.c (build_new_1): Look up operator delete even if there was
212 no explicit new placement.
214 1999-06-08 Nathan Sidwell <nathan@acm.org>
216 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
218 (build_throw): ... here. Call it.
219 (process_start_catch_block): Call it.
221 1999-06-07 Mark Mitchell <mark@codesourcery.com>
223 * search.c (convert_pointer_to_single_level): Reimplement without
226 1999-06-06 Mark Mitchell <mark@codesourcery.com>
228 * method.c (is_back_referenceable_type): Back-reference bools when
231 1999-06-07 Dave Brolley <brolley@cygnus.com>
233 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
234 * input.c (putback_buffer): New structure type.
235 (putback): Replaces putback_char member.
236 (putback): Replaces putback_char static variable.
237 (feed_input): Use putback.
238 (end_input): Use putback.
239 (sub_getch): Use putback.
240 (put_back): Use putback.
242 1999-06-05 Mark Mitchell <mark@codesourcery.com>
244 * decl.c (grokdeclarator): Fix typo in last change.
246 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
248 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
249 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
251 1999-06-04 Nathan Sidwell <nathan@acm.org>
253 * except.c (build_throw): Check throw expression validity.
255 1999-06-03 Mark Mitchell <mark@codesourcery.com>
257 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
258 just because flag_signed_bitfields is false.
260 1999-06-03 Nathan Sidwell <nathan@acm.org>
262 * semantics.c (begin_class_definition): Update the struct's
264 * class.c (finish_struct): ... rather than here.
266 * decl.c (make_typename_type): Don't rely on uninitialized
269 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
271 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
273 1999-05-31 Mark Mitchell <mark@codesourcery.com>
275 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
276 and friends rather than messing with current_obstack directly.
277 (cp_build_qualified_type_real): Rework ARRAY_TYPE
278 allocation to match practice throughout the rest of the
281 1999-05-30 Mark Mitchell <mark@codesourcery.com>
283 * lex.c (make_lang_type): Create TYPE_BINFO for
284 TEMPLATE_TYPE_PARMs just like for non-template types.
286 * decl.c (start_decl): Move checks on initialization to ...
287 (cp_finish_decl): Here. Tidy formatting slightly.
289 1999-05-28 Mark Mitchell <mark@codesourcery.com>
291 * decl.c (add_binding): Don't complain about a redeclaration of a
292 semantically identical typedef in a local scope.
294 1999-05-28 Nathan Sidwell <nathan@acm.org>
296 * decl.c (complete_array_type): Allocate off same obstack. Fix
297 DO_DEFAULT comment to match reality.
299 * friend.c (make_friend_class): Fix diagnostic typo.
301 1999-05-28 Mark Mitchell <mark@codesourcery.com>
303 * decl.c (lookup_namespace_name): Handle getting a
305 (expand_static_init): Don't call pushdecl for implicitly declared
306 `atexit' used to register destructors.
308 1999-05-25 Mark Mitchell <mark@codesourcery.com>
310 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
313 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
314 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
315 by combining TEMPLATE_INFO and LEVEL into a single union.
316 (DECL_TEMPLATE_INFO): Reformat.
317 (DECL_SAVED_TREE): Document.
318 (DECL_TEMPLATE_INJECT): Remove.
319 * class.c (finish_struct): Remove code to deal with
320 DECL_TEMPLATE_INJECT.
322 * decl.c (maybe_process_template_type_declaration): Handle all new
323 types in templates uniformly.
324 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
326 * pt.c (lookup_template_class): Inject template instantiations of
327 forward-declarations.
328 (instantiate_class_template): Remove code processing
329 DECL_TEMPLATE_INJECT.
331 * pt.c (lookup_template_class): Tweak lookup to find member
334 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
336 * semantics.c (finish_asm_stmt): Make strings permanent if they're
339 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
341 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
342 parts of pointer to data member types.
344 1999-05-24 Mark Mitchell <mark@codesourcery.com>
346 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
347 and then make it look like `abort'. Just use `abort' instead.
349 * typeck.c (build_static_cast): Don't allow static_casts that cast
351 (casts_away_constness_r): New function.
352 (casts_away_constness): Likewise.
354 * decl.c (lookup_tag): Remove code no longer needed after
355 name-lookup improvements.
356 * decl2.c (handle_class_head): Make error-recovery more robust.
357 * friend.c (make_friend_class): Reject templated typename types.
358 * lex.c (is_global): A template parameter isn't global.
359 * parse.y (class_head): Robustify.
360 * parse.c: Regenerated.
362 1999-05-22 Mark Mitchell <mark@codesourcery.com>
364 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
365 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
367 * cp-tree.h (push_nested_namespace): Declare.
368 (pop_nested_namespace): Likewise.
369 * decl.c (push_nested_namespace): New function.
370 (pop_nested_namespace): Likewise.
371 * pt.c (instantiate_class_template): Use them.
373 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
375 * cp-tree.h (cplus_expand_constant): Declare.
376 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
377 converted from one pointer-to-object type to another.
378 * expr.c (cplus_expand_constant): Don't make it static.
379 * typeck.c (build_component_ref): Don't crash when presented with
380 a component which is a TEMPLATE_DECL.
381 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
382 cast from a pointer-to-member constant to its own type does not
383 result in a valid non-type template argument.
385 1999-05-21 Mark Mitchell <mark@codesourcery.com>
386 Nathan Sidwell <nathan@acm.org>
388 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
389 * cp-tree.h: Fix typo in documentation on pointers-to-members.
390 (cp_build_qualified_type): Make it a macro.
391 (cp_build_qualified_type_real): Declare.
392 * decl.c (grokdeclarator): Remove misleading comment. Avoid
393 problem with template parameters and restrict-qualification.
394 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
395 * hash.h: Regenerated.
396 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
398 (NORID): Remove definition.
399 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
400 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
401 (fn_type_unification): Check that the function type resulting from
402 the deduction is legal.
403 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
404 (unify): Use cp_build_qualified_type_real.
405 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
406 (cp_build_qualified_type): Rename to ...
407 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
408 and modify appropriately.
410 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
411 reveal optimization opportunities.
413 * pt.c (tsubst): Don't issue error messages when we're not
414 complaining, even if we see a qualified function type.
415 (check_cv_quals_for_unify): Don't allow a qualified function
418 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
420 * class.c (instantiate_type): Downgrade errors for object-dependent
421 memfn refs to pedwarn.
423 1999-05-20 Mark Mitchell <mark@codesourcery.com>
425 * decl.c (grokdeclarator): Don't treat [] as indicating a
426 zero-sized array in a typedef.
428 * call.c (build_object_call): Don't look at DECL_NAME for a type.
429 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
430 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
432 * pt.c (for_each_template_parm): Rework to match documentation.
433 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
435 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
437 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
439 * class.c (finish_base_struct): Allow non-COM bases for COM classes
440 except at the leftmost position.
441 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
442 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
443 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
445 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
446 (build_cplus_new): Make sure that what we return is of the right type.
448 1999-05-20 Mark Mitchell <mark@codesourcery.com>
450 * cp-tree.h (make_ptrmem_cst): New function.
451 * expr.c (cplus_expand_constant): Split out from ...
452 (cplus_expand_expr): Here. Use cplus_expand_constant.
453 (init_cplus_expand): Set lang_expand_constant.
454 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
456 * tree.c (make_ptrmem_cst): Define.
457 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
458 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
460 1999-05-19 Mark Mitchell <mark@codesourcery.com>
462 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
464 * decl2.c (start_static_storage_duration_function): Fix comment.
465 (finish_file): Create static storage duration functions lazily.
467 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
469 Implement anonymous structs.
470 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
471 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
472 * class.c (finish_struct_1): Remove redundant check for anon struct.
473 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
474 (check_tag_decl): Check for anonymous struct here.
475 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
476 * init.c (sort_member_init, emit_base_init): Handle getting fields
477 as well as names in current_member_init_list.
478 (perform_member_init): Handle getting an anon aggr.
479 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
480 (do_build_copy_constructor): Likewise.
482 1999-05-19 Mark Mitchell <mark@codesourcery.com>
484 * tree.c (cp_build_qualified_type): Don't allow qualified function
487 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
489 * gxxint.texi: Fix typo.
491 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
493 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
494 * class.c (finish_struct_1): Use CLASS_TYPE_P.
495 * ptree.c (print_lang_type): Likewise.
496 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
498 * typeck2.c (digest_init): Likewise.
500 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
502 * call.c (joust): Compare the types of the conv ops, not the
503 target types of the conversions.
505 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
507 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
510 1999-05-17 Mark Mitchell <mark@codesourcery.com>
512 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
513 * decl.c (grokfndecl): Don't allow inline declarations of friend
514 template specializations, or friend template specializations with
516 * pt.c (tsubst): Handle substitution into array types that does
517 not yield a fixed upper bound, even when not processing a
519 (tsubst_copy): Deal with the fact that the second operand to a
520 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
521 * search.c (marked_pushdecls_p): Don't descend into
522 TEMPLATE_TYPE_PARMs and the like.
523 (unmarked_pushdecls_p): Likewise.
525 * call.c (build_over_call): Don't throw away
526 initializations/copies of empty classes; use MODIFY_EXPR and
527 INIT_EXPR as for non-empty classes.
528 * class.c (finish_struct_1): Put the padding byte for an empty
529 class on the TYPE_NONCOPIED_PARTS list for the class.
531 1999-05-16 Mark Mitchell <mark@codesourcery.com>
533 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
534 indicate a reference to a field that is a qualified name.
536 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
538 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
539 ASM_OUTPUT_CONSTRUCTOR.
541 * friend.c (do_friend): Add attrlist arg. Remove support for
542 getting a non-decl as 'decl'.
543 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
545 (grokdeclarator): Adjust.
548 1999-05-16 Mark Mitchell <mark@codesourcery.com>
550 * cp-tree.h (permanent_p): New function.
551 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
552 possibly complex tree node.
553 * tree.c (mapcar): Adjust comments, and follow coding standards in
555 (permanent_p): New function.
557 1999-05-13 Per Bothner <bothner@cygnus.com>
559 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
560 primitive Java types, if we actually see `extern "Java"'.
562 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
564 * lang-specs.h: Pass -$ to the preprocessor.
566 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
568 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
569 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
570 (resolve_offset_ref): Don't handle a raw baselink.
571 * cvt.c (build_expr_type_conversion): Likewise.
572 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
573 convert_for_initialization): Likewise.
574 * class.c (instantiate_type): Handle seeing a baselink under an
576 * error.c (dump_expr): Likewise.
577 * pt.c (for_each_template_parm): Likewise.
578 (resolve_overloaded_unification): Likewise.
579 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
580 * typeck.c (expr_sizeof): Also complain about other permutations
581 of overloaded functions.
583 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
585 * init.c (resolve_offset_ref): Don't return a raw method.
587 * typeck.c (decay_conversion): Don't handle a raw method.
588 Resolve all OFFSET_REFs.
589 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
590 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
591 same_type_p for pmf bits. Don't use build_binary_op to compare
592 raw pointers to methods.
593 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
594 to decide when to call resolve_offset_ref.
595 (build_c_cast, convert_for_initialization): Likewise.
596 * cvt.c (build_expr_type_conversion): Likewise.
598 1999-05-06 Nathan Sidwell <nathan@acm.org>
600 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
602 1999-05-05 Mark Mitchell <mark@codesourcery.com>
604 * decl2.c (start_objects): Don't let static constructors and
605 destructors get inlined.
607 * parse.y (nested_name_specifier): Make sure ordinary types are
608 complete, just like template types.
609 * parse.c: Regenerated.
611 * pt.c (check_explicit_specialization): Improve error messages.
613 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
615 * typeck.c (string_conv_p): Use same_type_p to check whether we
616 try to convert between char and wchar_t.
618 1999-05-03 Mark Mitchell <mark@codesourcery.com>
620 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
621 lookup to error_mark_node here.
622 (lookup_member): Revise documentation. Add comments. Don't set
623 the TREE_TYPE to error_mark_node here, and don't build up an extra
624 TREE_LIST for ambiguous lookups.
625 (setup_class_bindings): Adjust accordingly.
626 (push_class_decls): Revise out-of-date comments.
628 * typeck.c (build_const_cast): Tighten checks for legality.
630 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
632 * init.c (build_member_call): Lookup names coming from
633 namespace-scoped LOOKUP_EXPR.
635 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
637 * gxxint.texi: Add documentation for 'I'.
639 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
641 * tinfo.cc (operator==): Qualify type_info with std::.
643 1999-05-02 Mark Mitchell <mark@codesourcery.com>
645 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
646 (DECL_COMDAT): Remove definition.
648 1999-05-01 Mark Mitchell <mark@codesourcery.com>
650 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
653 1999-04-30 Mark Mitchell <mark@codesourcery.com>
655 * class.c (build_vtable): Use build_lang_decl when building
656 vtables, not just build_decl.
657 (prepare_fresh_vtable): Likewise.
658 * decl.c (wrapup_globals_for_namespace): Mark vtables as
659 DECL_EXTERNAL when calling wrapup_global_declarations.
660 * decl2.c (priority_info_s): Add initializations_p and
661 destructions_p members.
662 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
663 when deciding what vtables to write out.
664 (ssdf_decls): New variable.
665 (ssdf_decls_used): Likewise.
666 (start_static_storage_duration_function): Deal with being called
667 multiple times. Avoid inlining this function.
668 (generate_inits_for_priority): Deal with reuse of priority map.
669 (get_priority_info): Clear initializations_p and destructions_p.
670 (do_static_initialization): Tweak comment.
671 (do_static_destruction): Likewise. Fix condition on sentries for
673 (generate_ctor_or_dtor_function): Call all of the static storage
675 (generate_ctor_or_dtor_function_for_priority): Check
676 initializations_p and destructions_p to see what priorities need
677 initialization functions.
678 (finish_file): Rework to generate multiple static storage duration
679 functions, rather than just one.
681 * typeck.c (build_const_cast): Tweak last change to handle
684 * typeck.c (build_const_cast): Disallow use of const_cast to
685 anything but a pointer or reference type.
687 1999-04-30 Nathan Sidwell <nathan@acm.org>
689 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
692 1999-04-29 Mark Mitchell <mark@codesourcery.com>
694 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
695 (finish_file): Indent comments properly.
697 1999-04-29 Richard Henderson <rth@cygnus.com>
699 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
700 (do_static_destruction): Likewise.
702 1999-04-29 Nathan Sidwell <nathan@acm.org>
704 * cp-tree.h (TYPE_NOTHROW_P): New macro.
705 * decl2.c (delete_sanity): Warn on deleting void *.
706 * init.c (build_new_1): Use TYPE_NOTHROW_P.
707 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
708 throwing operator new.
710 1999-04-28 Nathan Sidwell <nathan@acm.org>
712 * cp-tree.h (build_component_addr): Remove prototype.
713 * typeck.c (build_component_addr): Make static. Remove MSG
715 (build_component_addr): Remove MSG parameter, clean up
717 (build_x_function_call): Use cp_error.
718 (build_unary_op): Adjust call of build_component_addr.
720 1999-04-28 Mark Mitchell <mark@codesourcery.com>
722 * pt.c (tsubst_friend_class): Check for NULL.
724 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
726 * search.c (binfo_for_vtable): Initialize bfvi.var.
728 1999-04-27 Nathan Sidwell <nathan@acm.org>
730 * rtti.c (build_x_typeid): Check rtti is enabled.
732 1999-04-26 Mark Mitchell <mark@codesourcery.com>
734 * search.c (is_subobject_of_p): Make sure we're looking at the
737 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
739 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
741 1999-04-23 Mark Mitchell <mark@codesourcery.com>
743 * decl2.c (finish_file): Tweak handling of extern inlines so that
744 they are not unnecessarily put out.
746 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
747 such as base classes.
749 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
751 * tree.c (build_exception_variant): Fix typo: use the chain of U,
752 not trying V, while cycling through U.
754 1999-04-22 Mark Mitchell <mark@codesourcery.com>
756 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
757 preserves_first_arg. Enlarge dummy accordingly.
758 (DECL_TINFO_FN_P): New macro.
759 (SET_DECL_TINFO_FN_P): Likeiwse.
760 (DECL_RETURNS_FIRST_ARG): Remove.
761 (DECL_PRESERVES_THIS): Likewise.
762 (DECL_INIT_PRIORITY): New macro.
763 (finish_struct_1): Change prototype.
764 (cat_namespace_levels): Remove prototype.
765 (vtable_decl_p): New prototype.
766 (vtype_decl_p): Likewise.
767 (sigtable_decl_p): Likewise.
768 (walk_globals_pred): New typedef.
769 (walk_globals_fn): Likewise.
770 (walk_globals): New prototype.
771 (walk_namespaces_fn): New typedef.
772 (walk_namespaces): New prototype.
773 (wrapup_globals_for_namespace): Likewise.
774 (walk_vtables): Remove prototype.
775 (walk_sigtables): Likewise.
776 (instantiate_pending_templates): New prototype.
777 * class.c (finish_struct_1): Don't return a value.
778 * decl.h (pending_statics): Remove declaration.
779 * decl.c (walk_namespaces_r): New function.
780 (walk_globals_r): Likewise.
781 (vtable_decl_p): Likewise.
782 (vtype_decl_p): Likewise.
783 (sigtable_decl_p): Likewise.
784 (walk_namespaces): Likewise.
785 (walk_globals_data): New type.
786 (walk_globals): New function.
787 (wrapup_globals_for_namespace): Likewise.
788 (expand_static_init): Remove assertion. Remove redundancy in
789 conditional. Don't put static data members in static_aggregates
791 (finish_function): Remove redundancy in conditional. Don't set
792 DECL_RETURNS_FIRST_ARG.
793 (cat_namespace_levels): Remove.
794 * decl2.c: Include splay-tree.h and varray.h.
795 (priority_info_s): New structure.
796 (finish_vtable_vardecl): Change prototype. Adjust for new calling
798 (prune_vtable_vardecl): Likewise.
799 (finish_sigtable_vardecl): Likewise.
800 (setup_initp): Remove.
803 (start_static_storage_duration_function): New function.
804 (generate_inits_for_priority): Likewise.
805 (finish_static_storage_duration_function): Likewise.
806 (get_priority_info): Likewise.
807 (do_static_initialization): Likewise.
808 (do_static_destruction): Likewise.
809 (do_static_initialization_and_destruction): Likewise.
810 (generate_ctor_or_dtor_function): Likewise.
811 (generate_ctor_and_dtor_functions_for_priority): Likewise.
812 (pending_statics): Make it a varray.
813 (pending_statics_used): New variable.
814 (saved_inlines): Make it a varray.
815 (saved_inlines_used): New variable.
816 (finish_static_data_member): Change method of updating
818 (mark_inline_for_output): Remove #if 0'd code. Change method of
819 updating saved_inlines.
820 (walk_vtables): Remove.
821 (walk_sigtables): Likewise.
822 (import_export_decl): Use DECL_TINFO_FN_P.
823 (pending_templates): Remove declaration.
824 (maybe_templates): Likewise.
825 (static_aggregates_initp): Likewise.
826 (setup_initp): Likewise.
827 (finish_objects): Simplify.
828 (INITIALIZE_P_IDENTIFIER): New macro.
829 (PRIORITY_IDENTIFIER): New macro.
830 (SSDF_IDENTIFIER): New macro.
831 (initialize_p_decl): New variable.
832 (priority_decl): Likewise.
833 (ssdf_decl): Likewise.
834 (priority_info_map): Likewise.
835 (finish_file): Recode output of static intializers and other
836 file-scope finalization tasks.
837 * error.c (OB_END_TEMPLATE_ID): New macro.
838 (dump_type_real): Use it.
839 (dump_decl): Likewise.
840 (dump_function_name): Likewise.
841 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
843 (check_newline): Use walk_globals, not walk_vtables.
844 * pt.c (pending_tempalte_expansions): Remove.
845 (set_vardecl_interface_info): Likewise.
846 (pending_templates): Make static.
847 (maybe_templates): Likewise.
848 (instantiate_class_template): Adjust call to finish_struct_1.
849 (instantiate_pending_templates): New function.
850 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
851 * tree.c (static_aggregates_initp): Remove.
852 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
854 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
856 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
857 with the RTL code RETURN.
858 * hash.h: Regenerated.
859 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
860 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
861 * parse.c: Regenerated.
862 * pt.c: Include varray.h. Include rtl.h since varray.h requires
864 (inline_parm_levels): New variable.
865 (inline_parm_levels_used): Likewise.
866 (maybe_begin_member_template_processing): Update them.
867 (maybe_end_member_template_processing): Use them, rather than
868 guessing how many levels to pop.
870 * decl.c (make_typename_type): Tighten error-checking.
872 1999-04-20 Mark Mitchell <mark@codesourcery.com>
874 * cp-tree.h (build_binary_op): Remove unneeded parameter.
875 * class.c (build_vrable_entry_ref): Adjust call to
877 * decl.c (expand_static_init): Likewise.
878 (grokdeclarator): Likewise.
879 (finish_function): Likewise.
880 * decl2.c (delete_sanity): Likewise.
881 (do_dtors): Likewise.
882 (do_ctors): Likewise.
883 * error.c (dump_type_suffix): Likewise.
884 * expr.c (cplus_expand_expr): Likewise.
885 * init.c (resolve_offset_ref): Likewise.
886 (build_new): Likewise.
887 (build_new_1): Likewise.
888 (build_vec_delete_1): Likewise.
889 (expand_vec_init_catch_clause): Likewise.
890 (build_delete): Likewise.
891 * pt.c (tsubst): Likewise.
892 * rtti.c (synthesize_tinfo_fn): Likewise.
893 * search.c (expand_upcast_fixups): Likewise.
894 (expand_direct_vtbls_init): Likewise.
895 * typeck.c (get_member_function_from_ptrfunc): Likewise.
896 (build_binary_op_nodefault): Likewise.
897 (point_int_sum): Likewise.
898 (pointer_diff): Likewise.
899 (build_unary_op): Likewise.
900 (build_modify_expr): Likewise.
901 (get_delta_difference): Likewise.
902 (build_ptrmemfunc): Likewise.
903 (expand_ptrmemfunc_cst): Likewise.
905 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
907 * decl.c (grokfndecl): Always call cplus_decl_attributes.
908 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
910 1999-04-19 Mark Mitchell <mark@codesourcery.com>
912 * cp-tree.h (finish_static_data_member_decl): New function.
913 * decl2.c (finish_static_data_member_decl): Split out from ...
915 * pt.c (instantiate_class_template): Use it here instead of
917 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
918 finish_static_data_member_decl will do that. Explicit set
919 DECL_EXTERNAL to match non-template processing.
921 1999-04-18 Mark Mitchell <mark@codesourcery.com>
923 * cp-tree.h (finish_class_definition): Add parameter.
924 * parse.y (structsp): Use it. Don't call pop_scope here.
925 * parse.c: Regenerated.
926 * semantics.c (finish_class_definition): Pop it here.
928 1999-04-17 Mark Mitchell <mark@codesourcery.com>
930 * decl.c (xref_tag): Revise handling of nested template
932 * pt.c (check_explicit_specialization): Tweak handling of friend
933 templates in template classes.
934 (tsubst_friend_class): Handle friend declarations for nested
935 member template classes.
937 1999-04-16 Mark Mitchell <mark@codesourcery.com>
939 * class.c (finish_struct): Remove unused variable.
940 (pushclass): Likewise.
941 (invalidate_class_lookup_cache): Likewise.
942 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
943 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
944 doesn't get obliterated.
945 (make_typename_type): Handle template classes correctly.
947 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
948 (storetags): Declare.
949 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
950 (pushclass): Likewise. Use storetags to install tag declarations,
952 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
953 * decl.c (storetags): Make it global.
954 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
955 implicit typename declaration.
956 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
957 * method.c (hack_identifier): Likewise.
958 * search.c (lookup_member): Likewise.
960 * decl.c (warn_about_implicit_typename_lookup): New function.
961 (lookup_name_real): Use it. Rework handling of implicit typename
964 1999-04-15 Mark Mitchell <mark@codesourcery.com>
966 * cp-tree.h (lookup_nested_field): Remove.
967 * class.c (push_nested_class): Handle UNION_TYPEs.
968 (pop_nested_class): Likewise.
969 * decl.c (lookup_name_real): Don't call lookup_nested_field.
970 (start_decl): Use push_nested_class, not just pushclass.
971 (cp_finish_decl): Use pop_nested_class, not just popclass.
972 * search.c (lookup_nested_field): Remove.
974 * cp-tree.h (lang_type): Add documentation.
975 * decl2.c (handle_class_head): Create template declarations here,
977 * parse.y (class_head): Return whether or not we entered a new
978 scope, as well as the type named.
979 (named_class_head): Likewise.
980 (named_complex_class_head_sans_basetype): Likewise.
981 (structsp): Adjust accordingly. Pop scope when required.
982 * parse.c: Regenerated.
983 * pt.c (check_default_tmpl_args): Robustify.
984 (redeclare_class_template): Likewise.
985 (instantiate_class_template): An instantiation of an
986 anonymous union is itself an anonymous union.
987 * semantics.c (begin_class_definition): Don't create template
990 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
992 * parse.y (after_type_declarator_intern): New nonterminal.
993 (after_type_declarator): Use it.
994 (direct_after_type_declarator): Likewise. Move above
995 nonnested_type to fix reduce/reduce conflict resolution.
996 (declmods): Reducing from just 'attributes' has EMPTY precedence.
997 * Makefile.in (CONFLICTS): Update.
999 * decl.c (define_label): Downgrade error for jumping over a
1000 non-POD decl to pedwarn.
1002 1999-04-14 Mark Mitchell <mark@codesourcery.com>
1004 * cp-tree.h (popclass): Change declaration.
1005 (pop_nested_class): Likewise.
1006 (poplevel_class): Remove declaration.
1007 * call.c (convert_default_argument): Pass no arguments to
1009 * class.c (finish_struct_1): Likewise.
1010 (finish_struct): Likewise.
1011 (popclass): Remove argument. Simplify code accordingly.
1012 (pop_nested_class): Likewise.
1013 * decl.c (poplevel_class): Declare it here, and make it static.
1014 (poplevel): Handle class scopes.
1015 (poplevel_class): Don't take an rgument. Simplify.
1016 (pop_everything): Pass no arguments to pop_nested_class.
1017 (cp_finish_decl): Pass no arguments to popclass.
1018 (grokdeclarator): Pass no arguments to pop_nested_class.
1019 (finish_function): Likewise.
1020 * decl2.c (grokfield): Likewise.
1021 (pop_scope): Pass no arguments to popclass.
1022 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
1023 * pt.c (instantiate_class_template): Move call to pushclass, and
1024 document. Pass no arguments to popclass.
1025 (regenerate_decl_from_template): Likewise.
1027 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
1029 * typeck.c (build_unary_op): Handle taking the address of a unique
1030 bound non-static member function.
1032 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
1034 * lang-options.h (-Wdeprecated): New flag.
1035 * decl2.c (warn_deprecated): New flag.
1036 (lang_decode_option): Deprecated this-is-variable,
1037 external-templates, alt-external-templates.
1038 Support -Wdeprecated.
1039 * errfn.c (cp_deprecated): New function.
1041 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
1043 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
1044 of the decls themselves.
1046 * pt.c (tsubst_function_type): Copy attributes over.
1048 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
1050 * cp-tree.h: Add prototype.
1051 * decl.c (init_decl_processing): Set valid_lang_attribute.
1053 1999-04-13 Mark Mitchell <mark@codesourcery.com>
1055 * class.c (finish_struct_1): Look at the const-ness of the field's
1056 type, not the TREE_READONLY-ness of the declaration.
1057 * method.c (synthesize_method): Likewise.
1058 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
1059 creating new declarations.
1061 1999-04-13 Mike Stump <mrs@wrs.com>
1063 * decl2.c (import_export_decl): Because vtables always reference
1064 virtual functions, even if they are inlined, don't allow
1065 -fno-implement-inlines to not emit them, instead, emit them with
1067 * decl.c (start_function): Likewise.
1069 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
1071 * cp-tree.h (struct lang_type): Add com_interface.
1072 (CLASSTYPE_COM_INTERFACE): New macro.
1073 * class.c (set_rtti_entry): COM interface classes have no RTTI
1074 entries in their vtables; adjust.
1075 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
1076 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
1077 finish_struct_1): Likewise.
1078 * decl2.c (mark_vtable_entries): Likewise.
1079 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
1080 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
1081 expand_upcast_fixups): Likewise.
1082 * tree.c (debug_binfo): Likewise.
1084 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
1085 * typeck.c (comptypes): If we get it, ignore attributes.
1086 * class.c (instantiate_type): Use BASELINK_P. Change complain
1087 parameter to flags; 2 means ignore attributes.
1088 * call.c (build_op_delete_call): Pass it.
1090 * decl.c (xref_tag): Only complain once about using a typedef-name
1091 with 'struct'. Downgrade to pedwarn.
1093 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
1095 * parse.y (absdcl_intern): New nonterminal.
1096 (absdcl, direct_abstract_declarator): Use it.
1098 * pt.c (lookup_template_class): Look through implict typename.
1100 1999-04-11 Mark Mitchell <mark@codesourcery.com>
1102 * friend.c (add_friend): Deal gracefully with error_mark_node.
1103 * method.c (build_overload_value): Handle pointers-to-members as
1104 template parameters.
1106 * decl.c (push_binding): Fix typo in comment.
1108 1999-04-10 Mark Mitchell <mark@codesourcery.com>
1110 * error.c (dump_type_real): If a typename is a template-id, put
1111 out the template arguments.
1112 (dump_expr): Handle TEMPLATE_ID_EXPR.
1113 * pt.c (lookup_template_class): Now that full arguments are
1114 available everywhere, remove code that tried to guess them.
1116 1999-04-09 Mark Mitchell <mark@codesourcery.com>
1118 * decl.c (make_typename_type): Complain if we don't find a type
1119 when trying to make a typename type for a non-template type.
1121 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
1123 * decl.c (start_decl): Pass attributes to grokdeclarator.
1124 (grokdeclarator): Handle attributes on constructor-syntax
1127 1999-04-08 Mark Mitchell <mark@codesourcery.com>
1129 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
1132 * search.c (template_self_reference_p): Tweak.
1134 1999-04-07 Mark Mitchell <mark@codesourcery.com>
1136 * init.c (build_offset_ref): Don't build yet another weird data
1137 structure to describe overloaded functions.
1139 1999-04-06 Mark Mitchell <mark@codesourcery.com>
1141 * cp-tree.h (BASELINK_P): New macro.
1142 (SET_BASELINK_P): Likewise.
1143 * init.c (build_member_call): Remove needless assignment in if
1145 * search.c (lookup_field_r): Fix handling when we are looking
1146 specifically for a type; these are not hidden by functions and
1148 (lookup_member): Use SET_BASELINK_P.
1149 * tree.c (is_overloaded_fn): Use BASELINK_P.
1150 (really_overloaed_fn): Likewise.
1151 (get_first_fn): Likewise.
1153 1999-04-05 Mark Mitchell <mark@codesourcery.com>
1155 * decl.c (lookup_name_current_level): Tweak, and improve
1158 * class.c (maybe_fixup_vptrs): Remove declaration.
1159 (build_class_init_list): Likewise.
1160 * decl.c (pushdecl_class_level): Call check_template_shadow here
1162 (push_class_level_binding): ... not here.
1163 * search.c (dfs_push_type_decls): Only avoid
1164 template-self-reference TYPE_DECLs if they are from base classes.
1166 1999-04-04 Mark Mitchell <mark@codesourcery.com>
1168 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
1171 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
1173 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
1174 (finish_struct_1): Don't call build_class_init_list.
1176 1999-04-02 Mark Mitchell <mark@codesourcery.com>
1178 * tinfo.h (__class_type_info): Fix illegal declaration.
1180 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
1181 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
1182 (IDENTIFIER_CLASS_VALUE): Improve documentation.
1183 (is_properly_derived_from): Declare.
1184 (invalidate_class_lookup_cache): Likewise.
1185 (maybe_maybe_note_name_used_in_class): Likewise.
1186 (note_name_declared_in_class): Likewise.
1187 (push_using_decl): Remove duplicate declaration.
1188 (id_in_current_class): Remove declaration.
1189 (push_class_binding): Change prototype.
1190 (clear_identitifer_class_values): Declare.
1191 * call.c (is_properly_derived_from): Make it global.
1192 (build_new_function_call): Be careful about updating candidates.
1193 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
1194 asked to make illegal calls.
1195 * class.c: Include splay-tree.h.
1196 (class_stack_node): Add names_used slot.
1197 (check_member_decl_is_same_in_complete_scope): Remove.
1198 (add_method): Fix comment. Push the declaration into class
1200 (finish_struct_1): When popping the class, pop the bindings too.
1201 Remove check for data member/function member conflict.
1202 (finish_struct): Remove calls to
1203 check_member_decl_is_same_in_complete_scope. Change calls to
1205 (pushclass): Clear names_used in the class stack entry.
1206 Use invalidate_class_lookup_cache to remove cached entries, rather
1207 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
1208 before entering a new class. Remove dead code. Don't mess with
1209 current_function_decl when pushing declarations.
1210 (invalidate_class_lookup_cache): New function, split out from ...
1211 (popclass): Here. Clean up names_used on our way out.
1212 (instantiate_type): Adjust.
1213 (build_self_reference): Don't push the declaration here.
1214 (maybe_note_name_used_in_class): New function.
1215 (note_name_declared_in_class): Likewise.
1216 * decl.c (add_binding): Change prototype.
1217 (find_class_binding_level): New function.
1218 (innermost_nonclass_level): Likewise.
1219 (current_binding_level): Update documentation.
1220 (inner_binding_level): Remove. Replace with current_binding_level
1222 (push_binding_level): Remove special handling of
1223 class_binding_level.
1224 (pop_binding_level): Likewise. Use find_class_binding_level.
1225 (suspend_binding_level): Likewise.
1226 (global_bindings_p): Use innermost_nonclass_level.
1227 (toplevel_bindings_p): Likewise.
1228 (namespace_bindings_p): Likewise.
1229 (pseudo_global_level_p): Likewise.
1230 (push_binding): Clear INHERITED_VALUE_BINDING_P.
1231 (add_binding): Check for illegal multiple declarations. Return a
1232 value indicating whether or not the new binding was legal.
1233 (push_local_binding): Skip over class binding levels. Check
1234 return value from add_binding.
1235 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
1236 note_name_declared_in_class.
1237 (pushlevel_class): Remove "fake out the rest of the compiler"
1239 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
1240 (clear_identifier_class_values): New function.
1241 (pop_from_top_level): Use it.
1242 (pop_everything): Tweak.
1243 (maybe_process_template_type_declaration): Don't push the
1244 declaration for the template here.
1245 (pushtag): Don't push tag declarations into class scope here.
1246 (pushdecl): Apply DeMorgan's law for readability.
1247 (pushdecl_class_level): Remove special-case code for
1248 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
1249 (push_class_level_bindng): Deal with inherited bindings.
1250 (lookup_name_real): Remove special-case code for
1251 TYPE_BEING_DEFINED, and some implicit typename magic.
1252 (grokdeclarator): Handle COMPONENT_REF for a template function.
1253 (build_enumerator): Don't call pushdecl_class_level here.
1254 (id_in_current_class): Remove.
1255 * decl2.c (grokfield): Don't call pushdecl_class_level or
1256 check_template_shadow.
1257 * errfn.c (cp_file_of): Don't declare.
1258 (cp_line_of): Likewise.
1259 * error.c (dump_decl): Handle an OVERLOAD.
1260 (cp_file_of): Likewise.
1261 (cp_line_of): Likewise.
1262 * init.c (build_member_call): Handle a COMPONENT_REF.
1263 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
1264 pushdecl_class_level.
1265 * method.c (hack_identifier): Build COMPONENT_REFs for references
1266 to member templates as well as member functions. Remove dead
1268 * parse.y (left_curly): Remove.
1269 (nonnested_type): Call maybe_note_name_used_in_class, not
1270 pushdecl_class_level.
1271 * parse.c: Regenerated.
1272 (nested_name_specifier_1): Likewise.
1273 * pt.c (check_explicit_specialization): Adjust, for robustness.
1274 (check_template_shadow): Handle OVERLOADs.
1275 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
1276 TEMPLATE_DECL, if appropriate.
1277 * search.c (envelope_add_decl): Remove.
1278 (dfs_pushdecls): Likewise.
1279 (dfs_compress_decls): Likewise.
1280 (dfs_push_decls): New function.
1281 (dfs_push_type_decls): Likewise.
1282 (setup_class_bindings): Likewise.
1283 (template_self_reference_p): Likewise.
1284 (lookup_field_r): Use it.
1285 (looup_member): Remove old comment. Deal with ambiguity.
1286 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
1287 and remove envelope processing.
1288 * semantics.c (begin_class_definition): Let pushclass push
1289 declarations for base classes.
1290 (finish_member_declaration): Push declarations into class scope.
1291 * typeck.c (build_component_ref): Just put an OVERLOAD into the
1292 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
1293 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
1294 * Makefile.in (class.o): Depend on splay-tree.h.
1296 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
1298 * cvt.c (convert_pointer_to_real): Use same_type_p.
1299 * typeck.c (comp_target_types): Use same_type_p.
1301 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
1303 * semantics.c (begin_inline_definitions,
1304 finish_inline_definitions): Rename from finish_default_args and
1305 begin_inline_definitions, respectively, to something that isn't a
1307 * parse.y (structsp): Adjust.
1309 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
1310 (list_hash_lookup): Likewise.
1311 (hash_tree_chain): Adjust.
1312 * pt.c (tsubst): Adjust.
1313 (tsubst_arg_types): Use plain hash_tree_cons.
1314 * cp-tree.h (hash_tree_cons_simple): Lose.
1315 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
1317 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1319 * Makefile.in (hash.h): Generate using gperf language 'C', not
1320 'KR-C', so gperf uses the `const' keyword on strings.
1322 * gxx.gperf (resword): Const-ify a char*.
1324 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
1326 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
1327 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
1328 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
1329 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
1330 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
1331 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
1334 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
1336 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
1338 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
1340 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
1342 1999-03-27 Mark Mitchell <mark@codesourcery.com>
1344 * cp-tree.h (add_friend): Declare.
1345 (add_friends): Likewise.
1346 * friend.c (add_friend): Make it global. Don't add to
1347 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
1348 (add_friends): Make it global.
1349 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
1350 befriending class is a template.
1351 * parse.y (component_decl_1): Fix typo in comment.
1352 * parse.c: Regenerated.
1353 * pt.c (instantiate_class_template): Use add_friend and
1354 add_friends rather that duplicating some of their functionality
1357 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
1359 * call.c (build_field_call): Unify 'this' and non-'this' cases.
1361 * typeck.c (build_indirect_ref): Check for 'this' sooner.
1363 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1365 * call.c (op_error): Const-ify a char*.
1366 (add_candidate, source_type, add_warning): Add static prototype.
1367 (print_z_candidates): Const-ify a char*.
1369 * class.c (resolve_address_of_overloaded_function,
1370 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
1371 (get_vtable_name, finish_struct_1): Const-ify a char*.
1373 * cvt.c (convert_to_reference): Likewise.
1375 * decl.c (redeclaration_error_message, record_builtin_type,
1376 record_unknown_type, member_function_or_else, bad_specifiers):
1378 (find_binding, select_decl, unqualified_namespace_lookup,
1379 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
1380 Add static prototype.
1381 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
1382 implicitly_declare, record_builtin_java_type, define_function,
1383 grok_op_properties, tag_name): Const-ify a char*.
1385 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
1386 (define_function, finish_builtin_type): Const-ify a char*.
1387 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
1388 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
1389 (file_name_nondirectory): Const-ify a char*.
1390 (init_filename_times): Don't prototype.
1391 (compiler_error): Prototype.
1392 (yyerror, init_repo): Const-ify a char*.
1393 (build_srcloc): Don't prototype.
1394 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
1396 (warn_for_assignment): Don't prototype.
1397 (convert_for_initialization, readonly_error, check_for_new_type,
1398 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
1401 * decl2.c (acceptable_java_type, output_vtable_inherit,
1402 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
1403 merge_functions, decl_namespace, validate_nonmember_using_decl,
1404 do_nonmember_using_decl): Add static prototype.
1405 (lang_f_options): Const-ify a char*.
1406 (finish_builtin_type): Likewise.
1407 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
1410 * errfn.c: Include cp-tree.h.
1411 (cp_thing): Add static prototype.
1412 (compiler_error): Don't protoptype.
1413 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
1414 passing it to `cp_thing'.
1416 * error.c (interesting_scope_p): Add static prototype.
1418 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
1421 * init.c (compiler_error): Don't prototype.
1422 (member_init_ok_or_else): Const-ify a char*.
1423 (build_java_class_ref): Add static prototype.
1425 * lex.c (compiler_error): Don't prototype.
1426 (get_time_identifier, interface_strcmp, extend_token_buffer,
1427 handle_cp_pragma): Const-ify a char*.
1428 (is_global, init_filename_times): Add static prototype.
1429 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
1430 (compiler_error): Change from fixed args to variable args.
1431 (yyerror): Const-ify a char*.
1433 * parse.y (cond_stmt_keyword): Const-ify a char*.
1434 (parse_decl): Add static prototype.
1436 * pt.c (template_args_equal, print_template_context): Likewise.
1437 (print_candidates, check_default_tmpl_args): Const-ify a char*.
1438 (instantiate_class_template): Likewise.
1440 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
1442 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
1443 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
1445 * search.c (lookup_field_info, lookup_member): Likewise.
1446 (lookup_member): Cast the first argument of `bzero' to a PTR.
1448 * sig.c (compiler_error): Don't prototype.
1449 (build_signature_pointer_or_reference_nam): Const-ify a char*.
1450 (get_sigtable_name, build_member_function_pointer): Likewise.
1452 * tree.c (compiler_error): Don't prototype.
1453 (no_linkage_helper, build_srcloc): Add static prototype.
1454 (build_vbase_pointer_fields): Const-ify a char*.
1455 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
1457 * typeck.c (compiler_error): Don't prototype.
1458 (convert_for_assignment): Const-ify a char*.
1459 (comp_cv_target_types): Add static prototype.
1460 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
1461 build_component_addr, build_unary_op, convert_for_initialization):
1464 * typeck2.c (ack): Add static prototype and change from fixed args
1466 (readonly_error, check_for_new_type): Const-ify a char*.
1468 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
1469 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
1470 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
1471 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
1472 gen_assign, GNU_xref_member): Const-ify a char*.
1474 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
1476 * gxxint.texi: Remove old discussion on copying virtual bases.
1478 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
1480 * Make-lang.in: Remove all references to g++.o/g++.c.
1481 Link g++ from gcc.o.
1483 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
1485 * decl2.c (comdat_linkage): Treat vtables like functions.
1487 1999-03-25 Mark Mitchell <mark@codesourcery.com>
1489 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
1491 1999-03-25 Nathan Sidwell <nathan@acm.org>
1493 * decl.c (init_decl_processing): Add `signed' type as a synonym
1496 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
1498 * typeck.c (common_type): Handle cv-qual unification for pointers
1501 * decl.c (unqualified_namespace_lookup): Return error_mark_node
1503 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
1504 * lex.c (do_identifier): If we got error_mark_node, call
1507 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
1509 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
1512 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
1514 * decl.c (lookup_name_real): Do nested field lookup regardless of
1517 1999-03-24 Mark Mitchell <mark@codesourcery.com>
1519 * cp-tree.h (lang_type): Remove has_assignment and
1520 has_real_assignment. Add befriending_classes.
1521 (TYPE_HAS_ASSIGNMENT): Remove.
1522 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
1523 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
1524 (lang_decl): Document.
1525 (DECL_BEFRIENDING_CLASSES): New macro.
1526 (FRIEND_NAME): Move declaration to more obvious location.
1527 (FRIEND_DECLS): Likewise.
1528 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
1529 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
1530 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
1531 (grok_op_properties): Likewise.
1532 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
1533 (add_friend): Likewise. Don't do weird things with assignment
1534 operators. Update DECL_BEFRIENDING_CLASSES.
1535 (add_friends): Don't do weird things with assignment operators.
1536 (make_friend_class): Likewise. Update
1537 CLASSTYPE_BEFRIENDING_CLASSES.
1538 * pt.c (instantiate_class_template): Don't set
1539 TYPE_HAS_ASSIGNMENT.
1540 (tsubst_copy): Substitute the TREE_TYPE for more unary
1542 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
1543 * search.c (protected_accessible_p): New function.
1544 (friend_accessible_p): Likewise.
1545 (accessible_p): Use them.
1547 1999-03-23 Mark Mitchell <mark@codesourcery.com>
1549 * pt.c (convert_nontype_argument): Don't create things that aren't
1550 PTRMEM_CSTs when applying a qualification conversion to a
1553 1999-03-23 Mark Mitchell <mark@codesourcery.com>
1555 * Makefile.in (OBJS): Don't mention hash.o.
1556 (OBJDEPS): Likewise.
1558 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
1560 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
1561 * decl.c (expand_static_init): Make sure we don't add any after
1564 * decl.c (cp_finish_decl): Move intelligence about handling
1565 DECL_COMDAT for variables from here...
1566 * decl2.c (comdat_linkage): ...to here.
1567 (maybe_make_one_only): Tweak.
1568 (import_export_decl): Call comdat_linkage for variables, too.
1569 (finish_file): Handle template statics properly.
1571 1999-03-22 Mark Mitchell <mark@codesourcery.com>
1573 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
1574 Document internals of pointer-to-member-functions.
1575 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
1576 (PFN_FROM_PTRMEMFUNC): Likewise.
1577 (build_type_conversion): Remove unused parameter.
1578 (build_ptrmemfunc1): Declare.
1579 (expand_ptrmemfunc_cst): New function.
1580 (delta2_from_ptrmemfunc): Likewise.
1581 (pfn_from_ptrmemfunc): Likewise.
1582 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
1583 build_type_conversion. Use TYPE_PTRMEM_P for readability.
1584 (convert_to_reference): Remove unused parameter to
1585 build_type_conversion.
1586 (ocp_convert): Likewise.
1587 (build_user_type_conversion): Likewise.
1588 * error.c (dump_expr): Handle NULL pointer-to-member functions.
1589 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
1590 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
1591 open when handling pointer-to-member functions.
1592 * pt.c (convert_nontype_argument): Clean up error messages. Be
1593 more stringent with pointers-to-members.
1594 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
1595 (build_unary_op): Tidy ever-so-slightly.
1596 (build_conditional_expr): Remove extra parameter to
1597 build_type_conversion.
1598 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
1600 (expand_ptrmemfunc_cst): Define.
1601 (delta2_from_ptrmemfunc): Likewise.
1602 (pfn_from_ptrmemfunc): Likewise.
1604 1999-03-19 Mark Mitchell <mark@codesourcery.com>
1606 * init.c (build_member_call): Handle template-id expressions
1608 * typeck.c (build_x_function_call): Likewise.
1610 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
1612 * friend.c (make_friend_class): Avoid core dump when
1613 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
1615 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
1617 * decl.c (start_function): Suppress normal linkage heuristics
1618 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
1620 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
1622 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
1623 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
1625 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
1627 * parse.y (named_complex_class_head_sans_basetype):
1628 Do not push a scope for error_mark_node.
1629 (maybe_base_class_list): Likewise.
1631 * decl.c (start_decl): Check for error_mark_node as a type.
1632 Detected by g++.brendan/array-refs.C.
1633 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
1634 (maybe_build_cleanup_1): Likewise. Detected by
1635 g++.jason/incomplete1.C.
1637 * tree.c (build_dummy_object): Use void_zero_node instead of the
1639 (is_dummy_object): Check for such a node.
1640 Detected by g++.bob/inherit1.C
1642 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
1644 * method.c (old_backref_index): Split out...
1645 (flush_repeats): From here. Rename back from try_old_backref.
1646 (build_mangled_name): Put back some old-style repeat handling.
1648 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1650 * lex.c: Don't include setjmp.h.
1651 (parse_float): New static function.
1652 (pf_args): New struct.
1653 (real_yylex): Use them in call to `do_float_handler'.
1655 1999-03-15 Mark Mitchell <mark@markmitchell.com>
1657 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
1658 * tree.c (layout_basetypes): Not here.
1659 * search.c (dfs_search): Remove; no longer used.
1661 1999-03-12 Mark Mitchell <mark@markmitchell.com>
1663 * decl2.c (validate_nonmember_using_decl): Issue sensible
1664 error-messages on bogus qualifiers.
1666 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
1668 * call.c (add_function_candidate): Fix uninitialized variable.
1670 * Makefile.in (search.o): Add dependency on varray.h.
1672 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
1674 * decl.c (duplicate_decls): Use same_type_p.
1675 * method.c (try_old_backref): Renamed from flush_repeats. Use
1676 same_type_p. Don't try to handle repeats. Return success.
1677 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
1678 calls from old-style code, too.
1679 (check_ktype): Use same_type_p.
1680 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
1681 (build_qualified_name): Simplify logic.
1682 (process_overload_item): Strip typedefs and quals at the top.
1683 (build_mangled_name_for_type_with_Gcode): Remove call to
1684 type_canonical_variant.
1685 (build_mangled_name): Likewise. Remove support for old-style
1686 repeats, which have been disabled since 2.7.2. Don't mess with
1688 (build_decl_overload_real): Don't mess with TREE_USED.
1690 1999-03-13 Nathan Sidwell <nathan@acm.org>
1692 * error.c (cp_printers): Add 'F' escape character.
1693 (dump_type_real): Remove TREE_LIST (fnargs) printing.
1694 Functionality moved to dump_parameters.
1695 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
1696 (dump_function_decl): Extend meaning of V parameter. Use
1697 dump_parameters and dump_exception_spec.
1698 (dump_parameters): New static function.
1699 (dump_exception_spec): New static function.
1700 (fndecl_as_string): Change argument semantics. Use
1701 dump_function_decl directly.
1703 * sig.c (build_signature_table_constructor): Use cp_error.
1705 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
1707 * semantics.c (finish_switch_cond): Handle error cases gracefully.
1708 Detected by g++.law/enum5.C.
1710 * typeck.c (build_modify_expr): Check for errors after resolving
1711 offsets. Detected by g++.brendan/static1.C.
1713 * decl.c (complete_array_type): Ignore initial_value if it is an
1714 error. Detected by g++.benjamin/17930.C.
1716 * typeck2.c (process_init_constructor): Return error if one argument
1717 is in error. Detected by g++.benjamin/13478.C.
1719 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
1721 * decl.c (select_decl): Allow class templates when we need types.
1722 * decl2.c (ambiguous_decl): Likewise.
1724 1999-03-12 Mark Mitchell <mark@markmitchell.com>
1726 * lex.c (do_identifier): Correct call to enforce_access.
1727 * search.c (accessible_p): Tweak comment.
1729 1999-03-10 Mark Mitchell <mark@markmitchell.com>
1731 * semantics.c (begin_class_definition): Call build_self_reference.
1732 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
1734 * search.c (assert_canonical_unmarked): Fix typo in prototype.
1736 * search.c (dfs_canonical_queue): New function.
1737 (dfs_assert_unmarked_p): Likewise.
1738 (assert_canonical_unmarked): Likewise.
1739 (access_in_type): Use it.
1740 (accessible_p): Likewise. Walk the whole tree when umarking.
1742 * sig.c (build_signature_table_constructor): Use accessible_p
1743 instead of compute_access.
1745 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
1747 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
1749 1999-03-09 Mark Mitchell <mark@markmitchell.com>
1751 * cp-tree.h (flag_access_control): Declare.
1752 (TREE_VIA_PPUBLIC): Document.
1753 (DECL_NONSTATIC_MEMBER_P): New macro.
1754 (enforce_access): Return an indication of whether or not access
1756 (build_self_reference): Change prototype.
1757 (compute_access): Replace with ...
1758 (accessible_p): New function.
1759 (dfs_walk): Change prototype.
1760 (dfs_unmark): Likewise.
1761 (markedp): Likewise.
1762 * call.c (enforce_access): Use accessible_p.
1763 * class.c (build_self_reference): Insert the declaration into the
1764 list of members for this type, and make it public.
1765 * decl.c (xref_basetypes): Avoid ill-timed recursion.
1766 * init.c (build_offset_ref): Use lookup_member, not three separate
1767 name-lookups. Call enforce_access rather than checking for
1768 illegal accesses here.
1769 (resolve_offset_ref): Likewise.
1770 * lex.c (do_identifier): Likewise.
1771 * method.c (hack_identifier): Likewise.
1772 * parse.y (self_reference): Remove.
1773 (opt_component_decl_list): Don't use it.
1774 * parse.c: Regenerated.
1775 * pt.c (print_candidates): Generalize to handle lists of
1776 overloaded functions.
1777 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
1779 (get_template_base): Use new calling convention for dfs_walk.
1780 * search.c: Include varray.h. Add prototypes.
1781 (dfs_walk): Accept a data pointer to pass to the work functions.
1782 All callers changed. All work functions changed.
1783 (breadth_first_search): Rename to bfs_walk, and make consistent
1785 (dfs_walk_real): New function.
1786 (canonical_binfo): New function.
1787 (context_for_name_lookup): Likewise.
1788 (shared_marked_p): Likewise.
1789 (shared_unmarked_p): Likewise.
1790 (lokup_field_queue_p): Likewise.
1791 (lookup_field_r): Generalize to handle both functions and fields.
1792 (lookup_field): Just call lookup_member.
1793 (lookup_fnfields): Likewise.
1794 (lookup_member): Move body of lookup_field here and generalize.
1795 (dfs_accessible_queue_p): Likewise.
1796 (dfs_accessible_p): Likewise.
1797 (dfs_access_in_type): Likewise.
1798 (access_in_type): Likewise.
1799 (compute_access): Remove, and replace with ...
1800 (accessible_p): New function.
1801 (vbase_types): Remove.
1802 (vbase_decl_ptr_intermediate): Likewise.
1803 (vbase_decl_ptr): Likewise.
1804 (vbase_init_result): Likewise.
1805 (closed_envelopes): Likewise.
1806 (bvtable): Likewise.
1808 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
1810 * call.c (add_function_candidate): Check for proper number of args
1811 before checking the validity of those args.
1813 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
1815 * cp-tree.h (struct lang_type): Add anon_union field.
1816 (ANON_UNION_TYPE_P): Use it instead of examining type.
1817 (SET_ANON_UNION_TYPE_P): New macro.
1818 * decl.c (check_tag_decl): Use it.
1820 * search.c (compute_access): Handle non-type contexts earlier, and
1823 * tree.c (build_exception_variant): Use copy_to_permanent.
1825 * decl2.c (setup_initp): Give statics with no priority the default
1827 (do_dtors, do_ctors, finish_file): Remove special handling of
1828 non-prioritized statics.
1830 1999-03-05 Mark Mitchell <mark@markmitchell.com>
1832 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
1833 * decl.c (make_typename_type): Don't issue an error if an
1834 immediate lookup fails; it migt be resolved later.
1835 * friend.c (is_friend): Add comment.
1836 * search.c (breadth_first_search): Add POSTFN and DATA
1837 parameters. Tidy. All callers changed.
1838 (lookup_field_queue_p): New function.
1839 (lookup_field_r): Likewise.
1840 (lookup_field_post): Likewise.
1841 (lookup_field): Use them, via breadth_first_search, instead of
1843 (compute_access): Robustify.
1844 (lookup_fnfield_info): New structure.
1846 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
1848 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
1850 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
1852 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
1855 * decl2.c (import_export_class): Also return if
1856 CLASSTYPE_INTERFACE_ONLY is set.
1858 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
1860 * decl.c (push_overloaded_decl): Only overwrite the old binding if
1862 * decl2.c (do_local_using_decl): Fix loop termination.
1864 1999-03-02 Mark Mitchell <mark@markmitchell.com>
1866 * cp-tree.h (determine_specialization): Don't declare.
1867 * pt.c (determine_specialization): Make it static. Eliminate
1868 complain parameter. Note that decl is always non-NULL now, and
1869 simplify accordingly.
1871 * decl.c (maybe_push_to_top_level): Always call
1872 push_cp_function_context.
1873 (pop_from_top_level): Always call pop_cp_function_context.
1875 1999-02-26 Nathan Sidwell <nathan@acm.org>
1877 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
1879 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
1880 * init.c (build_new_1): Extra arg to complete_type_or_else.
1881 (build_delete): Likewise.
1882 * typeck.c (require_complete_type): Likewise.
1883 (pointer_int_sum): Likewise.
1884 (pointer_diff): Likewise.
1885 (build_component_ref): Likewise.
1887 * typeck2.c (incomplete_type_error): Always use cp_error.
1888 Show declaration of undefined type, if appropriate.
1889 Deal with UNKNOWN_TYPE nodes.
1891 * typeck.c (require_complete_type): Use TYPE_SIZE as
1892 size_zero_node to mean incomplete type.
1893 (require_complete_type_in_void): New function.
1894 (build_compound_expr): Call complete_type_in_void for LHS.
1895 (build_c_cast): Call complete_type_in_void for void cast.
1896 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
1897 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
1898 require_complete_type_in_void. Call it.
1899 * cp-tree.h (require_complete_type_in_void): Prototype new function.
1901 * typeck.c (convert_arguments): Use alternative format for
1902 function decls. Don't require_complete_type here. Simplify
1903 diagnostic printing.
1904 (convert_for_initialization): Don't require_complete_type on RHS yet.
1905 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
1907 * call.c (build_over_call): Cope with qualified void return type.
1908 * semantics.c (finish_call_expr): Likewise.
1909 * typeck.c (build_function_call_real): Likewise.
1910 (c_expand_return): Likewise.
1911 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
1913 * call.c (print_z_candidates): Use alternate print format, to be
1914 consistent with (pt.c) print_candidates.
1915 * method.c (hack_identifier): List candidate members.
1916 * search.c (lookup_field): Build ambiguous list, and show it, if
1919 1999-02-26 Mark Mitchell <mark@markmitchell.com>
1921 * typeck.c (decay_conversion): Don't confuse constant array
1922 variables with their initializers.
1924 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
1926 * pt.c (regenerate_decl_from_template): Tweak for clarity.
1927 (instantiate_decl): Mark a decl instantiated before regenerating
1928 it to avoid recursion.
1929 * tree.c (mapcar): Don't call decl_constant_value unless we know
1930 something is TREE_READONLY_DECL_P.
1932 * class.c (check_for_override): Don't stop checking when we find
1933 the first overridden function. Delete #if 0'd code.
1934 * search.c (get_matching_virtual): Likewise.
1936 1999-02-25 Richard Henderson <rth@cygnus.com>
1938 * lang-specs.h: Define __FAST_MATH__ when appropriate.
1940 1999-02-24 Mike Stump <mrs@wrs.com>
1942 * typeck.c (convert_for_assignment): Allow boolean integral constant
1943 expressions to convert to null pointer.
1945 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
1947 * decl.c (lookup_namespace_name): Resolve namespace aliases.
1949 * class.c (push_nested_class): Allow namespaces.
1951 * decl2.c (set_decl_namespace): Add friendp parameter.
1952 * decl.c (grokfndecl): Pass it.
1953 (grokvardecl): Likewise.
1954 * cp-tree.h: Change declaration.
1956 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
1958 * pt.c (tsubst): Allow an array of explicit size zero.
1960 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
1962 * errfn.c: Change varargs code to look like toplev.c.
1964 * method.c (process_modifiers): Don't prepend 'U' for char or
1967 1999-02-20 Craig Burley <craig@jcb-sc.com>
1969 * Make-lang.in (cplib2.ready): Don't consider updating
1970 cplib2 stuff if the current directory isn't writable, as
1971 it won't work (such as during a `make install').
1973 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
1975 * decl2.c (start_objects): Make file scope constructors and
1976 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
1977 ASM_OUTPUT_DESTRUCTOR are defined.
1979 1999-02-19 Mark Mitchell <mark@markmitchell.com>
1981 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
1982 (fn_type_unification): Adjust prototype.
1983 (lookup_fnfields_1): Declare.
1984 * call.c (add_template_candidate_real): Adjust call to
1985 fn_type_unification.
1986 * class.c (add_method): Don't allow duplicate declarations of
1987 constructors or destructors.
1988 (resolve_address_of_overloaded_function): Remove unused variable.
1989 Adjust call to fn_type_unification.
1990 * decl.c (grokfndecl): Be more robust in the face of illegal
1992 * decl2.c (check_classfn): Remove hokey handling of member
1994 * pt.c (determine_specialization): Improve comments. Adjust to
1995 handle template argument deduction as per the standard.
1996 (check_explicit_specialization): Fix comment spacing. Handle
1997 type-conversion operators correctly. Improve error-recovery.
1998 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
1999 (get_bindings_real): Simplify handling of static members.
2000 * search.c (lookup_fnfields_1): Make it have external linkage.
2001 * typeck.c (compparms): Fix comment.
2002 (build_unary_op): Don't try to figure out which template
2003 specialization is being referred to when when the address-of
2004 operator is used with a template function.
2006 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2008 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
2009 keyword to match an analogous change at the top level.
2011 * tree.c (lvalue_or_else): Likewise.
2013 1999-02-17 Mark Mitchell <mark@markmitchell.com>
2015 * decl.c (xref_basetypes): Comment.
2016 * pt.c (instantiate_class_template): Use xref_basetypes.
2018 1999-02-16 Mark Mitchell <mark@markmitchell.com>
2020 * cp-tree.h (tsubst): Change prototype.
2021 (tsubst_expr): Likewise.
2022 (tsubst_copy): Likewise.
2023 (type_unification): Remove prototype.
2024 * call.c (convert_default_arg): Adjust call to tsubst_expr.
2025 * class.c (resolve_address_of_overloaded_function): Just use
2026 fn_type_unification.
2027 * decl.c (grokdeclarator): Adjust call to tsubst.
2028 * method.c (build_template_parm_names): Likewise.
2029 * pt.c (GTB_VIA_VIRTUAL): New macro.
2030 (GTB_IGNORE_TYPE): Likewise.
2031 (resolve_overloaded_unification): Add `complain' parameter.
2032 (try_one_overload): Likewise.
2033 (tsubst_template_arg_vector): Likewise.
2034 (tsubst_template_parms): Likewise.
2035 (tsubst_aggr_type): Likewise.
2036 (tsubst_arg_types): Likewise.
2037 (tsubst_call_declarator_parms): Likewise.
2038 (unify): Remove explicit_mask.
2039 (type_unification_real): Likewise.
2040 (get_template_base_recursive): Likewise.
2041 (coerce_template_template_parms): Provide prototype.
2042 (tsubst_function_type): Likewise.
2043 (try_class_unification): New function.
2044 All callers changed to use new complain parameter.
2045 (get_template_base): Use try_class_unification.
2046 (unify): Adjust handling of classes derived from template types.
2047 (fn_type_unification): Substitute explicit arguments before
2050 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2052 * decl.c (pushdecl): Remove dead code.
2054 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
2056 * decl2.c (finish_objects): Fix code I missed in previous change.
2058 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
2060 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
2061 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
2063 * pt.c (maybe_process_partial_specialization): Complain about
2064 'template <>' on non-specialization.
2066 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
2068 * decl.c (grokdeclarator): Catch wierd declarators.
2069 * decl2.c (finish_file): Don't abort because of namespace parsing
2071 (check_decl_namespace): Remove.
2073 1999-02-09 Mark Mitchell <mark@markmitchell.com>
2075 * cp-tree.h (get_template_base): Don't declare.
2076 (dfs_walk): Declare.
2077 (dfs_unmark): Likewise.
2078 (markedp): Likewise.
2079 * pt.c (unify): Remove duplicate declaration. Pass tparms and
2080 targs to get_template_base.
2081 (get_template_base_recursive): Move here from search.c. Check to
2082 see that the base found can be instantiated to form the desired
2084 (get_template_base): Likewise.
2085 (get_class_bindings): Simplify.
2086 * search.c (get_template_base_recursive): Move to pt.c.
2087 (get_template_base): Likewise.
2088 (markedp): Make it global.
2089 (dfs_walk): Likewise.
2090 (dfs_unmark): Likewise.
2092 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
2094 * pt.c (maybe_process_partial_specialization): Complain about
2095 specialization in wrong namespace.
2096 * tree.c (decl_namespace_context): New fn.
2098 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2100 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
2101 * pt.c (coerce_template_template_parms): Handle nested
2102 template template parameters.
2104 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
2106 * typeck2.c: Update email addresses.
2108 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2110 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
2113 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
2115 * lex.c (retrofit_lang_decl): Split out...
2116 (build_lang_decl): From here.
2117 * decl.c (pushdecl): Call it for functions generated by the middle
2118 end that don't have DECL_LANG_SPECIFIC.
2119 * cp-tree.h: Declare it.
2121 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
2122 (start_objects, finish_objects): Only use special
2123 init_priority code if the user specified a priority.
2124 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
2127 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
2129 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
2130 mkstemp.o. Get them from libiberty now.
2131 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
2133 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2135 * decl2.c (lang_decode_option): Use read_integral_parameter.
2137 1999-02-01 Mark Mitchell <mark@markmitchell.com>
2139 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
2140 before calling complete_type_or_else.
2142 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2144 * input.c (inline): Don't define, its handled by system.h.
2146 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
2148 * decl2.c: Don't define flag_no_ident here. Don't process
2150 * cp-tree.h: Don't declare flag_no_ident here.
2151 * lang-specs.h: Map -Qn to -fno-ident.
2153 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
2155 * cp-tree.h (struct tree_binding): Replace scope field with a union.
2156 (BINDING_SCOPE): Adjust.
2157 * decl.c (BINDING_LEVEL): Adjust.
2159 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
2161 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
2164 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
2167 * tree.c (equal_functions): Fix name in prototype.
2169 * decl.c (push_local_binding): Add FLAGS argument.
2170 (pushdecl, push_overloaded_decl): Pass it.
2171 * decl2.c (do_local_using_decl): Likewise.
2172 * cp-tree.h: Adjust prototype.
2173 * decl.c (poplevel): Fix logic.
2175 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
2176 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
2177 (cat_namespace_levels): Don't loop forever.
2179 1999-01-25 Richard Henderson <rth@cygnus.com>
2181 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
2183 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
2185 * class.c (resolve_address_of_overloaded_function): Mark the
2186 chosen function used.
2188 * call.c (build_call): Make sure that a function coming in has
2189 been marked used already.
2190 * decl.c (expand_static_init): Call mark_used instead of
2192 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
2193 alloc_eh_object, expand_throw): Likewise.
2194 * init.c (build_builtin_delete_call): Likewise.
2195 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
2196 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2197 expand_generic_desc): Likewise.
2199 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
2201 * tree.c (equal_functions): New function.
2202 (ovl_member): Call it.
2204 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
2206 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
2208 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
2210 * decl.c (decls_match): Return 1 if old and new are identical.
2211 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
2213 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
2215 * decl.c (start_function): Make member functions one_only on windows.
2216 * decl2.c (import_export_decl): Likewise.
2218 * decl.c (grokdeclarator): Don't complain about implicit int in
2219 a system header. Change same-name field check to not complain in
2220 a system header instead of within extern "C".
2222 1999-01-21 Mark Mitchell <mark@markmitchell.com>
2224 * cp-tree.h (PUSH_GLOBAL): New macro.
2225 (PUSH_LOCAL): Likewise.
2226 (PUSH_USING): Likewise.
2227 (namespace_bindings_p): Declare.
2228 (push_overloaded_decl): Likewise.
2229 * decl.c (push_overloaded_decl): Don't make it static. Check for
2230 illegal declarations after using declarations here.
2231 (namespace_bindings_p): Likewise.
2232 (duplicate_decls): Don't consider declarations from different
2233 namespaces to be the same.
2234 (pushdecl): Use symbolic PUSH_ constants in calls to
2235 push_overloaded_decl.
2236 (push_overloaded_decl_1): Likewise.
2237 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
2238 (do_nonmember_using_decl): Check for illegal using declarations
2239 after ordinary declarations here.
2240 (do_local_using_decl): Call pushdecl to insert declarations.
2242 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
2244 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
2246 1999-01-21 Mark Mitchell <mark@markmitchell.com>
2248 * tree.c (build_cplus_array_type_1): Don't call build_array_type
2249 for types involving template parameters.
2251 * cp-tree.h (PARM_DECL_EXPR): Delete.
2252 (convert_default_arg): Change prototype.
2253 (check_default_argument): Declare.
2254 (search_tree): Likewise.
2255 * call.c (convert_default_arg): Take the function to which the
2256 default argument belongs as a parameter, and do any necessary
2257 instantiation here, instead of ...
2258 (build_over_call): Here.
2259 * decl.c (local_variable_p): New function.
2260 (check_default_argument): Likewise, split out and tidied from ...
2262 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
2263 * pt.c (tsubst_call_declarator_parms): New function.
2264 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
2265 with CALL_EXPRs, rather than trying to be clever.
2266 (tsubst): Use tsubst_call_declarator_parms.
2267 * tree.c (search_tree): Don't make it static.
2268 * typeck.c (convert_arguments): Use new interface to
2269 convert_default_arg.
2271 1999-01-20 Mark Mitchell <mark@markmitchell.com>
2273 * error.c (dump_function_decl): Don't print the argument types for
2274 a function when the verbosity level is negative.
2276 * call.c (build_over_call): Check format attributes at call-time.
2278 * pt.c (tsubst_copy): Fix comment.
2279 (unify): Don't allow unification with variable-sized arrays.
2281 * semantics.c (finish_stmt_expr): When processing a template make
2282 the BIND_EXPR long-lived.
2284 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
2286 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
2287 (import_export_vtable): Not here.
2289 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
2291 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
2292 non-static member function.
2294 1999-01-18 Nathan Sidwell <nathan@acm.org>
2296 * class.c (instantiate_type): Only diagnose illegal address of member
2297 function if complaining.
2299 * decl.c (lookup_name_real): Remove duplicate code.
2301 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
2303 * tree.c (copy_template_template_parm): Use permanent_obstack.
2305 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2307 * pt.c (unify): Remove restrictions on deduction of argument
2308 of template template parameters.
2310 1999-01-18 Nathan Sidwell <nathan@acm.org>
2312 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
2314 * class.c (resolve_address_of_overloaded_function): Show list of
2315 all candidates, when none of them match.
2317 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
2319 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
2320 definition of 'casting away const' in reinterpret_cast<>.
2322 1999-01-18 Graham <grahams@rcp.co.uk>
2324 * cvt.c: Add include for decl.h, remove extern for
2325 static_aggregates which is now provided by decl.h.
2327 * Makefile.in (cvt.o): Add dependency for decl.h and missing
2328 dependencies for convert.h and flags.h.
2330 1999-01-18 Nathan Sidwell <nathan@acm.org>
2332 * decl2.c (do_dtors): Set current location to that of the
2333 decl, for sensible diagnostics and debugging.
2334 (check_classfn): Issue `incomplete type' error, if
2335 class is not defined.
2337 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
2339 * cp-tree.h: Add prototype for bound_pmf_p.
2341 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
2342 Manfred Hollstein <manfred@s-direktnet.de>
2344 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
2347 1999-01-16 Nathan Sidwell <nathan@acm.org>
2349 * cp-tree.h (struct lang_type): Added has_mutable flag.
2350 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
2351 (TYPE_HAS_MUTABLE_P): New macro to read it.
2352 (cp_has_mutable_p): Prototype for new function.
2353 * class.c (finish_struct_1): Set has_mutable from members.
2354 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
2355 it contains a mutable.
2356 * typeck.c (cp_has_mutable_p): New function.
2358 1999-01-15 Mark Mitchell <mark@markmitchell.com>
2360 * pt.c (process_template_parm): Ignore top-level qualifiers on
2361 non-type parameters.
2363 * decl.c (start_function): Use current_function_parms in the call
2364 to require_complete_type_for_parms, not the probably empty
2367 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
2369 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
2371 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
2372 that we don't suppress the other copies.
2373 * lex.c (handle_cp_pragma): Likewise.
2375 1999-01-13 Mark Mitchell <mark@markmitchell.com>
2377 * decl.c (grokdeclarator): Undo 1998-12-14 change.
2378 * tree.c (build_cplus_array_type_1): Likewise.
2379 * pt.c (instantiate_class_template): Remove misleading comment.
2380 (tsubst_aggr_type): Substitute if there are template parameters,
2381 regardless of whether or not they use template arguments.
2382 (unify): Likewise, but for unification.
2384 1999-01-12 Richard Henderson <rth@cygnus.com>
2386 * cp-tree.h (flag_permissive): Declare extern.
2388 1999-01-06 Mark Mitchell <mark@markmitchell.com>
2390 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
2392 (lang_type): Add is_partial_instantiation. Decrease width of
2394 (PARTIAL_INSTANTIATION_P): New macro.
2395 (OPERATOR_TYPENAME_P): Remove.
2396 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
2397 OPERATOR_TYPENAME_P.
2398 (grok_op_properties): Likewise.
2399 * friend.c (do_friend): Handle friends that are member functions
2401 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
2402 * pt.c (instantiate_class_template): Rework for clarity. Avoid
2403 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
2404 any more partial instantiation than is absolutely necessary for
2405 implicit typename. Set PARTIAL_INSTANTIATION_P.
2406 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
2407 * semantics.c (begin_class_definition): Handle partial
2408 specializations of a type that was previously partially
2411 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
2413 * g++spec.c (LIBSTDCXX): Provide default definition.
2414 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
2416 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2418 * Make-lang.in (g++.o): Depend on prefix.h.
2420 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
2422 * tree.c (bound_pmf_p): New fn.
2423 * typeck.c (build_c_cast): Use it.
2425 * decl.c (grok_op_properties): Use same_type_p.
2427 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2429 * Makefile.in (cvt.o): Depend on toplev.h.
2431 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
2433 * cvt.c: Include toplev.h.
2435 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
2438 * init.c (expand_vec_init): Initialize variable `itype'.
2440 * lex.c (yyerror): Cast the argument passed to a ctype function to
2443 * method.c (build_mangled_C9x_name): Wrap prototype and definition
2444 in "HOST_BITS_PER_WIDE_INT >= 64".
2446 * typeck.c (build_binary_op): Mark parameter `convert_p' with
2449 1998-12-22 Mark Mitchell <mark@markmitchell.com>
2451 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
2452 * tree.c (build_exception_variant): Don't crash on empty throw
2455 1998-12-18 DJ Delorie <dj@cygnus.com>
2457 * cvt.c (convert_to_reference): Check for both error_mark_node
2458 and NULL_NODE after call to convert_for_initialization.
2460 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
2462 * error.c (interesting_scope_p): New fn.
2463 (dump_simple_decl): Use it.
2464 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
2465 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
2467 1998-12-16 Mark Mitchell <mark@markmitchell.com>
2469 * class.c (resolve_address_of_overloaded_function): Do conversion
2470 to correct type here, rather than ...
2471 (instantiate_type): Here.
2473 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
2474 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
2475 (decl_template_parm_p): Remove.
2476 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
2478 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
2479 * pt.c (push_inline_template_parms_recursive): Set it.
2480 (decl_template_parm_p): Remove.
2481 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
2482 (process_template_parm): Set it.
2484 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
2486 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
2487 if configured with cpplib.
2489 1998-12-15 Mark Mitchell <mark@markmitchell.com>
2491 * decl.c (poplevel): Make sure ns_binding is initialized.
2493 * decl.c (finish_function): Undo inadvertent change in previous
2496 1998-12-14 Mark Mitchell <mark@markmitchell.com>
2498 * class.c (pushclass): Tweak handling of class-level bindings.
2499 (resolve_address_of_overloaded_function): Update pointer-to-member
2501 (instantiate_type): Likewise.
2502 * cvt.c (cp_convert_to_pointer): Likewise.
2503 * decl.c (pop_binding): Take the DECL to pop, not just the name.
2504 Deal with `struct stat' hack.
2505 (binding_level): Add to documentation.
2506 (push_binding): Clear BINDING_TYPE.
2507 (add_binding): New function.
2508 (push_local_binding): Use it.
2509 (push_class_binding): Likewise.
2510 (poplevel): Adjust calls to pop_binding.
2511 (poplevel_class): Likewise.
2512 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
2513 declarations to current binding level.
2514 (push_class_level_binding): Likewise.
2515 (push_overloaded_decl): Adjust handling of OVERLOADs in local
2517 (lookup_namespace_name): Don't crash when confronted with a
2519 (lookup_name_real): Do `struct stat' hack in local binding
2521 (build_ptrmemfunc_type): Adjust documentation.
2522 (grokdeclarator): Don't avoid building real array types when
2523 processing templates unless really necessary.
2524 (finish_method): Adjust calls to pop_binding.
2525 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
2526 not reparse_decl_as_expr.
2527 (build_expr_from_tree): Deal with a template-id as the function to
2528 call in a METHOD_CALL_EXPR.
2529 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
2530 (maybe_adjust_types_For_deduction): Don't do peculiar things with
2532 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
2533 pointer-to-member types where necessary.
2534 * tree.c (build_cplus_array_type_1): Don't avoid building real
2535 array types when processing templates unless really necessary.
2536 (build_exception_variant): Compare the exception lists correctly.
2538 1998-12-13 Mark Mitchell <mark@markmitchell.com>
2540 * cp-tree.def (CPLUS_BINDING): Update documentation.
2541 * cp-tree.h (LOCAL_BINDING_P): New macro.
2542 (lang_identifier): Rename local_value to bindings.
2543 (tree_binding): Make `scope' of type `void*', not `tree'.
2544 (BINDING_SCOPE): Update documentation.
2545 (IDENTIFIER_LOCAL_VALUE): Remove.
2546 (IDENTIFIER_CLASS_VALUE): Document.
2547 (IDENTIFIER_BINDING): New macro.
2548 (IDENTIFIER_VALUE): Likewise.
2549 (TIME_IDENTIFIER_TIME): Likewise.
2550 (TIME_IDENTIFIER_FILEINFO): Likewise.
2551 (IMPLICIT_TYPENAME_P): Likewise.
2552 (set_identifier_local_value): Remove.
2553 (push_local_binding): New function.
2554 (push_class_binding): Likewise.
2555 * class.c (pushclass): Update comments; use push_class_binding.
2556 * decl.c (set_identifier_local_value_with_scope): Remove.
2557 (set_identifier_local_value): Likewise.
2558 (push_binding): New function.
2559 (pop_binding): Likewise.
2560 (binding_level): Update documentation. Remove shadowed.
2561 (BINDING_LEVEL): New macro.
2562 (free_binding_nodes): New variable.
2563 (poplevel): Adjust for new name-lookup scheme. Don't mess up
2564 BLOCK_VARs when doing for-scope extension. Remove effectively
2566 (pushlevel_class): Tweak formatting.
2567 (poplevel_class): Adjust for new name-lookup scheme.
2568 (print_binding_level): Likewise.
2569 (store_bindings): Likewise.
2570 (pushdecl): Likewise.
2571 (pushdecl_class_level): Likewise.
2572 (push_class_level_binding): Likewise.
2573 (push_overloaded_decl): Update comments. Adjust for new
2575 (lookup_name_real): Likewise.
2576 (lookup_name_current_level): Likewise.
2577 (cp_finish_decl): Likewise.
2578 (require_complete_types_for_parms): Likewise. Remove misleading
2580 (grok_parms): Likewise. Don't call
2581 require_complete_types_for_parms here.
2582 (grok_ctor_properties): Don't treat templates as copy
2584 (grop_op_properties): Or as assignment operators.
2585 (start_function): Document. Adjust for new name-lookup scheme.
2586 (finish_function): Likewise.
2587 * decl2.c (do_local_using_decl): Use push_local_binding.
2588 * lex.c (begin_definition_of_inclass_inline): New function, split
2590 (do_pending_inlines): Here, and ...
2591 (process_next_inline): Here.
2592 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
2593 (init_filename_times): Likewise.
2594 (extract_interface_info): Likewise.
2595 (ste_typedecl_interface_info): Likewise.
2596 (check_newline): Likewise.
2597 (dump_time_statistics): Likewise.
2598 (handle_cp_pragma): Likewise.
2599 (do_identifier): Adjust for new name-lookup scheme.
2600 * parse.y (function_try_block): Return ctor_initializer_opt value.
2602 (fn.defpen): Pass appropriate values to start_function.
2603 (pending_inline): Use functor_try_block value, and pass
2604 appropriate values to finish_function.
2605 * pt.c (is_member_template): Update documentation; remove handling
2606 of FUNCTION_DECLs. As per name, this function should deal only in
2608 (decl_template_parm_p): Change name of olddecl parameter to decl.
2609 (check_template_shadow): Adjust for new name-lookup scheme.
2610 (lookup_template_class): Likewise.
2611 (tsubst_decl): Tweak so as not to confuse member templates with
2612 copy constructors and assignment operators.
2613 (unify): Handle UNION_TYPEs.
2614 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
2615 (lang_print_xnode): Adjust for new name-lookup scheme.
2616 * typeck.c (mark_addressable): Likewise.
2617 (c_expand_return): Likewise.
2619 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
2621 * decl.c (grokdeclarator): Allow field with same name as class
2624 * decl.c (lookup_name_real): Don't limit field lookup to types.
2625 * class.c (check_member_decl_is_same_in_complete_scope): No error
2626 if icv and x are the same.
2627 * lex.c (do_identifier): Tweak error message.
2629 1998-12-10 Mark Mitchell <mark@markmitchell.com>
2631 * decl.c (start_enum): Use push_obstacks, not
2632 end_temporary_allocation.
2633 (finish_enum): Call pop_obstacks.
2635 1998-12-10 Mark Mitchell <mark@markmitchell.com>
2637 * class.c (instantiate_type): Return error_mark_node rather than
2640 1998-12-09 Mark Mitchell <mark@markmitchell.com>
2642 * cp-tree.h (most_specialized_instantiation): New function.
2643 (print_candidates): Likewise.
2644 * class.c (validate_lhs): Remove.
2645 (resolve_address_of_overloaded_function): New function, split out
2646 and then substantially reworked, from ...
2647 (instantiate_type): Use it. Simplify.
2648 * cvt.c (convert_to_reference): Complain when caller has indicated
2649 that's the right thing to do. Don't crash if instantiate_type
2651 * pt.c: Substitute `parameters' for `paramters' throughout.
2652 (print_candidates): Don't make it static.
2653 (most_specialized_instantiation): Split out from ...
2654 (most_specialized): Here.
2656 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
2658 * lex.c (lang_init_options): Initialize cpplib.
2659 * decl2.c (parse_options,cpp_initialized): Removed.
2660 (lang_decode_option): Move initialization of cpplib to
2663 1998-12-09 Mark Mitchell <mark@markmitchell.com>
2665 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
2666 well as the TYPE_DECL, when a typedef name is assigned to a
2667 previously anonymous type.
2669 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
2671 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
2672 __cp_eh_info for getting the eh info pointer. Add table_index to
2674 (push_eh_cleanup): Don't increment 'handlers' data field.
2675 (process_start_catch_block): Don't set the 'caught' field.
2677 * cp/exception.cc (CP_EH_INFO): New macro for getting the
2678 exception info pointer within library routines.
2679 (__cp_eh_info): Use CP_EH_INFO.
2680 (__start_cp_handler): Get exception info pointer, set caught field,
2681 and increment the handlers field. Avoids this being done by handlers.
2682 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
2683 (uncaught_exception): Use CP_EH_INFO macro.
2685 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
2687 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
2689 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
2691 * lex.c (check_newline): Add support for \ as `natural'
2692 characters in file names in #line to be consistent with #include
2693 handling. We support escape processing in the # 1 "..." version of
2694 the command. See also support in cp/lex.c.
2696 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
2698 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
2701 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
2703 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
2705 * error.c (dump_simple_decl): Also print namespace context.
2706 (dump_function_decl): Likewise.
2708 * decl2.c (ambiguous_decl): Don't print old value if it's
2711 * decl.c (lookup_name_real): Fix handling of local types shadowed
2712 by a non-type decl. Remove obsolete code.
2713 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
2715 * lang-options.h: Add -fpermissive.
2716 * decl2.c: Likewise.
2717 * cp-tree.h: Add flag_permissive.
2718 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
2719 were specified, set flag_pedantic_errors.
2720 * call.c (build_over_call): Turn dropped qualifier messages
2722 * cvt.c (convert_to_reference): Likewise.
2723 * typeck.c (convert_for_assignment): Likewise.
2725 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
2727 * decl2.c (coerce_new_type): Use same_type_p.
2728 (coerce_delete_type): Likewise.
2730 * call.c (check_dtor_name): Return 1, not error_mark_node.
2732 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
2734 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
2735 if MULTIPLE_SYMBOL_SPACES.
2737 * pt.c (check_template_shadow): New fn.
2738 * decl2.c (grokfield): Use it.
2739 * decl.c (pushdecl): Likewise.
2740 (pushdecl_class_level): Likewise.
2741 (start_method): Likewise.
2742 (xref_tag): Don't try to use 't' if we're defining.
2744 * call.c (check_dtor_name): Just return an error_mark_node.
2745 * pt.c (lookup_template_class): Complain about using non-template here.
2746 * parse.y (apparent_template_type): Not here.
2748 * pt.c (check_explicit_specialization): Complain about specialization
2751 * lang-options.h: Add -f{no-,}implicit-inline-templates.
2753 * pt.c (convert_nontype_argument): Don't assume that any integer
2754 argument is intended to be a constant-expression.
2756 1998-12-03 Mark Mitchell <mark@markmitchell.com>
2758 * class.c (handle_using_decl): Fix comment. Don't lookup
2759 constructors in base classes.
2760 (validate_lhs): Fix typo in comment.
2761 * search.c (lookup_field_1): Don't return a USING_DECL.
2763 * cp-tree.h (DECL_ACCESS): Improve documentation.
2765 * decl.c (expand_static_init): Don't set the initialization-done
2766 flag until the initialization is done.
2768 1998-12-02 Mark Mitchell <mark@markmitchell.com>
2770 * decl2.c (validate_nonmember_using_decl): Complain about using
2771 declarations for class members.
2773 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
2775 * typeck2.c (process_init_constructor): Use same_type_p.
2777 * decl.c (check_tag_decl): Don't warn about null decl inside a
2780 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
2782 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
2783 (resolve_overloaded_unification): Strip baselinks.
2785 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2787 * g++spec.c: Don't prototype xmalloc.
2789 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
2791 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
2793 * decl.c (check_tag_decl): Do complain about null friend decl at
2796 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2798 * lex.c (make_lang_type): Clear the whole struct lang_type, not
2799 only the first multiple of sizeof (int).
2801 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
2803 * decl.c (start_decl): An explicit specialization of a static data
2804 member is only a definition if it has an initializer.
2806 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
2807 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
2809 * init.c (expand_default_init): Check for DIRECT_BIND instead of
2812 * call.c (build_over_call): Use build_decl.
2814 * except.c (expand_throw): Just use convert, not
2815 build_reinterpret_cast.
2817 * lex.c (handle_generic_pragma): Use token_buffer.
2819 * decl.c (check_tag_decl): Don't complain about null friend decl.
2821 1998-11-24 Dave Pitts <dpitts@cozx.com>
2823 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
2825 * lex.c (check_newline): Use ISALPHA.
2826 (readescape): Use ISGRAPH.
2827 (yyerror): Use ISGRAPH.
2829 1998-11-24 Nathan Sidwell <nathan@acm.org>
2831 * search.c (get_abstract_virtuals): Do not use initial
2832 CLASSTYPE_ABSTRACT_VIRTUALS.
2833 * typeck2.c (abstract_virtuals_error): Show location of abstract
2835 * call.c (build_new_method_call): Use
2836 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
2837 * class.c (finish_struct_bits): Don't bother working out whether
2838 get_abstract_virtuals will do anything, just do it.
2840 1998-11-24 Graham <grahams@rcp.co.uk>
2842 * typeck.c (build_component_ref): Remove unused statement.
2844 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
2846 * class.c (add_method): Catch invalid overloads.
2848 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
2849 * search.c (lookup_conversions): Handle getting real OVERLOADs.
2850 (add_conversions): Likewise. Revert last change.
2851 * call.c (add_conv_candidate): Pass totype to add_candidate instead
2852 of fn. Don't add a new candidate if the last one was for the same
2854 (print_z_candidates): Handle getting a type as a function.
2855 (joust): If we got two conversion candidates to the same type,
2857 (build_object_call): Lose 'templates'.
2858 (build_user_type_conversion_1): Handle getting real OVERLOADs.
2860 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
2862 * typeck2.c (process_init_constructor): If there are elements
2863 that don't have initializers and they need to have constructors
2864 run, supply them with initializers.
2866 * class.c (finish_struct_1): A class with a 0-width bitfield is
2869 1998-11-23 Mark Mitchell <mark@markmitchell.com>
2871 * pt.c (instantiate_class_template): Don't try to figure out what
2872 specialization to use for a partial instantiation. Correct
2873 typos in a couple of comments. Avoid calling uses_template_parms
2876 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
2878 * method.c (process_overload_item): Add call to
2879 build_mangled_C9x_name for intTI_type_nodes.
2880 (build_mangled_C9x_name): Add prototype, define.
2881 * decl.c (init_decl_processing): Add names for
2884 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
2886 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
2888 * class.c (finish_struct_1): Set things up for 0-width bitfields
2889 like we do for others.
2891 * decl.c (check_tag_decl): New fn.
2892 (shadow_tag): Split out from here.
2893 * decl2.c (grok_x_components): Call it.
2895 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
2897 * decl.c: Lose warn_about_return_type.
2898 (grokdeclarator): Always complain about implicit int, except for
2901 * decl.c (tag_name): New fn.
2902 (xref_tag): Complain about using typedef-name after class-key.
2904 * init.c (expand_vec_init): Also keep going if from_array.
2906 * tree.c (is_overloaded_fn): Also handle the output of
2909 * decl.c (grokdeclarator): Use constructor_name when comparing
2910 field name against enclosing class.
2911 * class.c (finish_struct_anon): Likewise.
2913 1998-11-22 Mark Mitchell <mark@markmitchell.com>
2915 * decl.c (poplevel): Remove code to handle KEEP == 2.
2916 (finish_function): Don't confuse BLOCK-order when
2917 processing a destructor.
2919 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
2921 * decl.c (require_complete_types_for_parms): Call layout_decl
2922 after we've completed the type.
2924 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
2926 * decl2.c (validate_nonmember_using_decl): Allow using templates
2927 from the global namespace.
2929 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
2931 Handle specifying template args to member function templates.
2932 * tree.c (build_overload): Always create an OVERLOAD for a template.
2933 * search.c (add_conversions): Handle finding an OVERLOAD.
2934 * decl2.c (check_classfn): Likewise.
2935 * lex.c (identifier_type): See through a baselink.
2936 * parse.y (do_id): Don't call do_identifier if we got a baselink.
2937 * class.c (instantiate_type, case TREE_LIST): Recurse.
2939 * decl.c (grokdeclarator): Allow a boolean constant for array
2940 bounds, odd as that sounds.
2942 * pt.c (unify): Be more strict about non-type parms, except for
2944 (UNIFY_ALLOW_INTEGER): New macro.
2946 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
2948 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
2950 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
2952 * semantics.c (begin_class_definition): Call
2953 maybe_process_partial_specialization before push_template_decl.
2954 Don't call push_template_decl for a specialization.
2955 * search.c (lookup_field): Do return a member template class.
2956 * decl2.c (handle_class_head): Handle member template classes.
2958 * decl.c (grokdeclarator): A parm type need not be complete.
2960 * pt.c (convert_nontype_argument): Fix thinko.
2962 1998-11-18 Mark Mitchell <mark@markmitchell.com>
2964 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
2965 (global_delete_fndecl): New variable.
2966 * decl.c (global_delete_fndecl): Define it.
2967 (init_decl_processing): Set it.
2968 * init.c (build_builtin_delete_call): Use it.
2969 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
2972 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
2974 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
2977 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
2978 * call.c (build_object_call): Also support references to functions.
2979 * typeck.c (convert_for_initialization): Don't decay a function
2980 if the target is a reference to function.
2982 * search.c (add_conversions): Get all the overloads from a class.
2984 * decl.c (grok_ctor_properties): Complain about any constructor
2985 that will take a single arg of the class type by value.
2987 * typeck2.c (build_functional_cast): Can't create objects of
2988 abstract classes this way.
2989 * cvt.c (ocp_convert): Likewise.
2991 * decl.c (grokfndecl): Member functions of local classes are not
2994 1998-11-18 Mark Mitchell <mark@markmitchell.com>
2996 * Make-lang.in (cc1plus): Add dependency on hash.o.
2998 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
3000 * search.c (get_abstract_virtuals): Complain about virtuals with
3002 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
3003 with no final overrider.
3004 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
3005 on virtuals with no final overrider.
3007 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
3009 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
3012 * friend.c (do_friend): Don't set_mangled_name_for_decl.
3014 * class.c (finish_struct_anon): Complain about non-fields.
3015 * decl2.c (build_anon_union_vars): Likewise.
3017 * decl.c (grokdeclarator): Normal data members can't have the same
3018 name as the class, either.
3019 * class.c (finish_struct_anon): Neither can members of an
3022 1998-11-17 Mark Mitchell <mark@markmitchell.com>
3024 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
3025 (TYPE_BINFO): Likewise.
3026 (IS_AGGR_TYPE): Tweak.
3027 (SET_IS_AGGR_TYPE): New macro.
3028 (CLASS_TYPE_P): Tweak.
3029 (lang_type): Group mark bitfields together. Remove linenum.
3030 (CLASSTYPE_SOURCE_LINE): Remove macro.
3031 (CLASSTYPE_MARKED_N): New macro.
3032 (SET_CLASSTYPE_MARKED_N): Likewise.
3033 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
3034 (CLASS_TYPE_MARKED_*): Use them.
3035 (SET_CLASSTYPE_MARKED_*): Likewise.
3036 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
3037 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
3038 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
3039 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
3040 * class.c (class_cache_obstack): New variable.
3041 (class_cache_firstobj): Likewise.
3042 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
3043 (pushclass): Free the cache, when appropriate.
3045 (maybe_push_cache_obstack): Use class_cache_obstack.
3046 * decl.c (include hash.h).
3047 (typename_hash): New function.
3048 (typename_compare): Likewise.
3049 (build_typename_type): Check the hash table to avoid creating
3051 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
3052 (grokdeclarator): Use CLASS_TYPE_P.
3053 (xref_basetypes): Likewise.
3054 (start_function): Likewise. Don't put current_class_ref on the
3056 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
3058 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
3059 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
3060 fields for types other than class types. Do clear TYPE_ALIAS_SET
3061 for types other than class types, though.
3062 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
3063 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3064 * pt.c (process_template_parm): Don't set
3065 CLASSTYPE_GOT_SEMICOLON.
3066 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3067 Coerce arguments on the momentary obstack.
3068 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3069 (instantiate_class_template): Calculate template arguments on the
3070 momentary obstack. Tidy.
3071 (tsubst_template_arg_vector): Use make_temp_vec.
3072 (tsubst_aggr_type): Put template arguments on the momentary
3074 (tsubst_decl): Likewise.
3075 (tsubst): Copy the array bounds index to the permanent obstack
3076 before building index types. Use new macros.
3077 (unify): Use new macros.
3078 (do_type_instantiation): Likewise.
3079 * search.c (lookup_fnfields_1): Use new macros.
3080 (dfs_pushdecls): Build envelopes on the cache obstack.
3081 (dfs_compress_decls): Use new macros.
3082 (push_class_decls): Build on the cache obstack.
3083 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
3084 * sign.c (build_signature_pointer_or_reference_type): Use
3086 * tree.c (make_binfo): Check CLASS_TYPE_P.
3087 (copy_template_template_parm): Adjust.
3088 (make_temp_vec): Use push_expression_obstack.
3089 * typeck.c (complete_type): Use new macros.
3090 (comptypes): Likewise.
3092 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
3094 * pt.c (tsubst): Add diagnostics for invalid array, reference
3095 and pointer to member types.
3097 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
3099 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
3101 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
3104 * parse.y (structsp): Fix cut-and-paste error.
3106 * init.c (build_new): Complain about non-integral size.
3108 * parse.y (unary_expr): Complain about defining types in sizeof.
3110 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
3112 * rtti.c (build_x_typeid): Complain about typeid without
3113 including <typeinfo>.
3114 (get_typeid): Likewise. Complain about typeid of incomplete type.
3115 (get_tinfo_fn_dynamic): Likewise.
3116 (get_typeid_1): Not static anymore.
3117 * except.c (build_eh_type_type): Use get_typeid_1.
3119 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
3120 ambiguous or private bases. Fix warning for reference cast.
3122 1998-11-16 Mark Mitchell <mark@markmitchell.com>
3124 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
3125 * decl.c (duplicate_decls): Remove special-case code to deal with
3126 template friends, and just do the obvious thing.
3127 * pt.c (register_specialization): Tweak for clarity, and also to
3128 clear DECL_INITIAL for an instantiation before it is merged with a
3130 (check_explicit_specialization): Fix indentation.
3131 (tsubst_friend_function): Handle both definitions in friend
3132 declaration and outside friend declarations.
3133 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
3134 (regenerate_decl_from_template): Tweak accordingly.
3135 (instantiate_decl): Likewise.
3137 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
3139 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
3140 member function reference to error.
3141 * cvt.c (ocp_convert): Complain about converting an overloaded
3144 * init.c (build_offset_ref): Just return a lone static member
3147 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
3150 * typeck.c (build_binary_op_nodefault): Improve error handling.
3152 * decl.c (grokfndecl): Complain about making 'main' a template.
3154 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
3156 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
3157 TYPE_DECL in a template.
3159 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
3161 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
3163 * decl.c (struct cp_function): Add named_label_uses.
3164 (push_cp_function_context): Save it.
3165 (pop_cp_function_context): Restore it.
3166 (define_label): Also complain about jumping into the scope of
3167 non-POD objects that don't have constructors.
3168 * tree.c (pod_type_p): New fn.
3170 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
3171 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
3172 (get_tinfo_fn): Not here.
3173 * repo.c (repo_get_id): Abort if we get called for an incomplete
3176 1998-11-13 Mark Mitchell <mark@markmitchell.com>
3178 * except.c (expand_throw): Make sure first argument to
3179 __cp_push_exception is of type `void*' to avoid spurious error
3182 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
3184 * pt.c (try_one_overload): Take orig_targs again. Only check for
3185 mismatches against them; we don't care what a previous call found.
3186 (resolve_overloaded_unification): Adjust.
3188 * search.c (lookup_field): Don't return anything for a non-type
3189 field from a dependent type.
3190 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
3191 in an array declarator.
3192 (start_decl): Push into the class before looking for the field.
3194 1998-11-08 Mark Mitchell <mark@markmitchell.com>
3196 * method.c (build_overload_value): Handle REFERENCE_TYPE.
3198 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
3200 * decl.c (grokdeclarator): Allow namespace-scoped members if they
3203 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
3205 * pt.c (tsubst_decl): Don't mess with the global value of an
3206 un-mangled DECL_ASSEMBLER_NAME.
3208 1998-11-03 Christopher Faylor <cgf@cygnus.com>
3210 * decl.c (init_decl_processing): Remove CYGWIN conditional
3211 since CYGWIN is now able to deal with trapping signals.
3213 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3215 * cp-tree.h: Don't include gansidecl.h.
3216 * exception.cc: Include gansidecl.h (since we don't include config.h)
3217 * g++spec.c: Don't include gansidecl.h.
3219 1998-11-06 Mark Mitchell <mark@markmitchell.com>
3221 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
3223 (DECL_DEFINED_IN_CLASS_P): New macro.
3224 (TEMPLATE_PARMS_FOR_INLINE): Document.
3225 (check_static_variable_definition): New function.
3226 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
3228 (check_static_variable_definition): Split out from ...
3229 (grokdeclarator): Here.
3230 * pt.c (check_default_tmpl_args): New function, split out from ...
3231 (push_template_decl_real): Here.
3232 (instantiate_template): Fix comment.
3234 1998-11-04 Mark Mitchell <mark@markmitchell.com>
3236 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
3237 (CP_TYPE_VOLATILE_P): Likewise.
3238 (CP_TYPE_RESTRICT_P): Likewise.
3240 1998-11-03 Mark Mitchell <mark@markmitchell.com>
3242 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
3244 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
3246 * class.c (instantiate_type): Be more helpful.
3248 * decl2.c (import_export_decl): Call import_export_class.
3250 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
3251 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
3252 * pt.c (tsubst_copy): Likewise.
3254 1998-11-02 Mark Mitchell <mark@markmitchell.com>
3256 * init.c (expand_vec_init): Fix off-by-one error.
3258 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
3260 * parse.y (apparent_template_type): New type.
3261 (named_complex_class_head_sans_basetype): Use it.
3262 * Makefile.in (CONFLICTS): One new conflict.
3263 * parse.c: Regenerated.
3265 1998-11-01 Mark Mitchell <mark@markmitchell.com>
3267 * cp-tree.h (COMPARE_STRICT): New macro.
3268 (COMPARE_BASE): Likewise.
3269 (COMPARE_RELAXED): Likewise.
3270 (COMPARE_REDECLARATION): Likewise.
3271 (same_type_p): Likewise.
3272 (same_or_base_type_p): Likewise.
3273 * call.c (standard_conversion): Use them, in place of comptypes
3274 with numeric arguments.
3275 (reference_binding): Likewise.
3276 (convert_like): Likewise.
3277 (build_over_call): Likewise.
3278 (is_subseq): Likewise.
3279 (is_properly_derived_from): Likewise.
3280 (compare_ics): Likewise.
3282 * class.c (delete_duplicate_fields_1): Likewise.
3283 (resolves_to_fixed_type_p): Likewise.
3284 (instantiate_type): Likewise. Remove #if 0'd code.
3285 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
3286 (pushdecl): Likewise.
3287 (lookup_name_real): Likewise.
3288 (grokdeclarator): Likewise. Check for illegal array declarations.
3289 (grokparms): Likewise.
3290 (grok_op_properties): Likewise.
3291 * decl2.c (check_classfn): Likewise.
3292 * friend.c (is_friend): Likewise.
3293 (make_friend_class): Likewise.
3294 * init.c (expand_aggr_init): Likewise.
3295 (expand_vec_init): Likewise.
3296 * pt.c (is_member_template_class): Remove declaration.
3297 (is_specialization_of): Use COMPARE_* and new macros.
3298 (comp_template_parms): Likewise.
3299 (convert_nontype_argument): Likewise.
3300 (coerce_template_template_parms): Likewise.
3301 (template_args_equal): Likewise.
3302 (lookup_template_class): Likewise.
3303 (type_unification_real): Likewise.
3305 (get_bindings_real): Likewise.
3306 * search.c (covariant_return_p): Likewise.
3307 (get_matching_virtual): Likewise.
3308 * sig.c (match_method_types): Likewise.
3309 * tree.c (vec_binfo_member): Likewise.
3310 (cp_tree_equal): Likewise.
3311 * typeck.c (common_type): Likewise.
3312 (comp_array_types): Likewise. Get issues involving unknown array
3314 (comptypes): Update comments. Use new flags.
3315 (comp_target_types): Use new macros.
3316 (compparms): Likewise.
3317 (comp_target_parms): Likewise.
3318 (string_conv_p): Likewise.
3319 (build_component_ref): Likewise.
3320 (build_indirect_ref): Likewise.
3321 (build_conditional_expr): Likewise.
3322 (build_static_cast): Likewise.
3323 (build_reinterpret_cast): Likewise.
3324 (build_const_cast): Likewise.
3325 (build_modify_expr): Likewise.
3326 (convert_for_assignment): Likewise.
3327 (comp_ptr_ttypes_real): Likewise.
3328 (ptr_reasonably_similar): Likewise.
3329 (comp_ptr_ttypes_const): Likewise.
3331 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
3333 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
3335 1998-10-30 Mark Mitchell <mark@markmitchell.com>
3337 * decl2.c (delete_sanity): Pass integer_zero_node, not
3338 integer_two_node, to build_vec_delete.
3339 * init.c (build_array_eh_cleanup): Remove.
3340 (expand_vec_init_try_block): New function.
3341 (expand_vec_init_catch_clause): Likewise.
3342 (build_vec_delete_1): Don't deal with case that auto_delete_vec
3343 might be integer_two_node anymore.
3344 (expand_vec_init): Rework for initialization-correctness and
3345 exception-correctness.
3346 * typeck2.c (process_init_constructor): Make mutual exclusivity
3347 of cases more obvious.
3349 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
3351 * decl.c (lookup_name_real): OK, only warn if not lexing.
3352 Simplify suggested fix.
3354 * cp-tree.h (IDENTIFIER_MARKED): New macro.
3355 * search.c (lookup_conversions): Use breadth_first_search.
3356 (add_conversions): Avoid adding two conversions to the same type.
3357 (breadth_first_search): Work with base binfos, rather
3358 than binfos and base indices.
3359 (get_virtual_destructor): Adjust.
3360 (tree_has_any_destructor_p): Adjust.
3361 (get_matching_virtual): Adjust.
3363 * pt.c (push_template_decl_real): Generalize check for incorrect
3364 number of template parms.
3365 (is_member_template_class): #if 0.
3367 1998-10-29 Richard Henderson <rth@cygnus.com>
3369 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
3372 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
3374 * lex.c: Call check_newline from lang_init always. After
3375 calling cpp_start_read, set yy_cur and yy_lim to read from the
3376 cpplib token buffer.
3378 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
3380 * class.c (instantiate_type): Don't consider templates for a normal
3383 * class.c (finish_struct_1): Don't complain about non-copy
3384 assignment ops in union members.
3386 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
3387 (prepare_fresh_vtable): Likewise.
3388 (finish_struct_1): Don't call import_export_class.
3389 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
3390 (finish_prevtable_vardecl): Lose.
3391 (finish_file): Don't call it.
3392 * pt.c (instantiate_class_template): Likewise.
3393 * cp-tree.h: Remove it.
3395 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
3396 * decl.c (finish_function): Not here.
3397 (start_function): Do set DECL_INITIAL.
3399 * pt.c (push_template_decl_real): Complain about default template
3400 args for enclosing classes.
3402 * call.c (add_function_candidate): Treat conversion functions
3403 as coming from the argument's class.
3404 * cp-tree.h (DECL_CONV_FN_P): New fn.
3405 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
3406 * class.c (add_method): Use DECL_CONV_FN_P.
3407 * decl2.c (check_classfn): Likewise.
3408 * error.c (dump_function_name): Likewise.
3409 (dump_function_decl): Likewise.
3410 * pt.c (fn_type_unification): Likewise.
3411 * search.c (add_conversions): Likewise.
3413 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
3415 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
3416 * method.c (hack_identifier): Also check for using RESULT_DECL
3419 1998-10-27 Mark Mitchell <mark@markmitchell.com>
3421 * decl.c (grokdeclarator): Use type_quals, rather than constp,
3424 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
3426 * call.c (standard_conversion): instantiate_type here.
3427 (reference_binding): And here.
3428 (implicit_conversion): Not here.
3429 (build_op_delete_call): No need to cons up an OVERLOAD.
3430 * cvt.c (cp_convert_to_pointer): instantiate_type here.
3431 (convert_to_reference): And here.
3432 * decl.c (grok_reference_init): Not here.
3433 (grokparms): Or here.
3434 * typeck2.c (digest_init): Or here.
3435 * typeck.c (decay_conversion): Take the address of overloaded
3437 (require_instantiated_type): Lose.
3438 (convert_arguments): Don't handle unknown types here.
3439 (build_c_cast): Likewise.
3440 (build_binary_op): Gut.
3441 (build_conditional_expr): Don't require_instantiated_type.
3442 (build_modify_expr): Likewise.
3443 (build_static_cast): Don't instantiate_type.
3444 (build_reinterpret_cast): Likewise.
3445 (build_const_cast): Likewise.
3446 (convert_for_initialization): Likewise.
3447 (build_ptrmemfunc): Use type_unknown_p.
3448 (convert_for_assignment): Also do default_conversion on overloaded
3449 functions. Hand them off to ocp_convert.
3451 1998-10-26 Mark Mitchell <mark@markmitchell.com>
3453 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
3454 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
3456 * class.c (finish_struct_1): Use build_cplus_array_type to build
3458 * decl.c (init_decl_processing): Likewise.
3459 * except.c (expand_end_eh_spec): Likewise.
3460 * search.c (expand_upcast_fixups): Simplify very slightly.
3462 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
3464 * decl.c (grokdeclarator): Complain about a variable using
3465 constructor syntax coming back null from start_decl.
3467 * friend.c (make_friend_class): Complain about trying to make
3468 a non-class type a friend.
3470 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
3471 (start_function): Not here.
3473 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
3475 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
3477 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
3479 * typeck2.c (process_init_constructor): Only skip anonymous fields
3480 if they are bitfields.
3482 * cp-tree.def (TYPEOF_TYPE): New code.
3483 * error.c (dump_type_real): Handle it.
3484 * pt.c (tsubst): Likewise.
3485 * tree.c (search_tree): Likewise.
3486 * semantics.c (finish_typeof): New fn.
3487 * parse.y (typespec): Use it.
3488 * cp-tree.h: Declare it.
3490 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
3492 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
3494 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
3496 * typeck.c (convert_arguments): Don't handle pmf references
3499 * init.c (build_member_call): Don't try to convert to the base type
3500 if it's ambiguous or pedantic.
3502 * typeck2.c (check_for_new_type): Only depend on pedantic for
3505 1998-10-25 Mark Mitchell <mark@markmitchell.com>
3507 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
3508 non-converting constructors.
3510 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3512 * gxxint.texi: Correct documentation for n, N, Q, and B.
3514 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
3516 * parse.y (condition): Convert VAR_DECL from reference to indirect
3519 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
3521 * exception.cc (__cp_pop_exception): Free the original exception
3522 value, not the potentially coerced one.
3524 1998-10-23 Mark Mitchell <mark@markmitchell.com>
3526 * Makefile.in (hash.h): Run gperf when necessary.
3528 * cp-tree.h (CP_TYPE_READONLY): Remove.
3529 (CP_TYPE_VOLATILE): Likewise.
3530 (CP_TYPE_QUALS): New macro.
3531 (CP_TYPE_CONST_P): Likewise.
3532 (CP_TYPE_VOLATILE_P): Likewise.
3533 (CP_TYPE_RESTRICT_P): Likewise.
3534 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
3535 (cp_build_type_variant): Rename to ...
3536 (cp_build_qualified_type): New function.
3537 (c_apply_type_quals_to_decl): Declare.
3538 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
3539 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
3540 (cp_type_qual_from_rid): New function.
3541 (compparms): Remove unused parameter. All callers changed.
3542 (cp_type_quals): New function.
3543 (at_least_as_qualified_p): Likewise.
3544 (more_qualified_p): Likewise.
3546 * call.c (standard_conversion): Replace calls to
3547 cp_build_type_variant with cp_build_qualified_type. Use
3548 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
3549 compare them. Use CP_TYPE_* macros to check qualifiers.
3550 (reference_binding): Likewise.
3551 (implicit_conversion): Likewise.
3552 (add_builtin_candidates): Likewise.
3553 (build_over_call): Likewise.
3554 * class.c (overrides): Compare all qualifiers, not just `const',
3555 on method declarations.
3556 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
3557 (convert_pointer_to_real): Likewise.
3558 (type_promotes_to): Likewise.
3559 * decl.c (check_for_uninitialized_const_var): New function.
3560 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
3561 (cp_finish_decl): Use check_for_uninitialized_const_var.
3562 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
3564 (grok_ctor_properties): Likewise.
3565 (grok_op_properties): Likewise.
3566 (start_function): Likewise.
3567 (rever_static_member_fn): Likewise.
3568 * decl2.c (grok_method_quals): Likewise.
3569 (grokfield): Likewise.
3570 * error.c (dump_readonly_or_volatile): Rename to ...
3571 (dump_qualifiers): New function. Handle `restrict'.
3572 (dump_type_real): Use it.
3573 (dump_aggr_type): Likewise.
3574 (dump_type_prefix): Likewise.
3575 (dump_type_suffix): Likewise.
3576 (dump_function_decl): Likewise.
3577 (cv_as_string): Likewise.
3578 * gxx.gperf: Add __restrict and __restrict__.
3579 * gxxint.texi: Document `u' as used for `__restrict', and a few
3580 other previously undocumented codes.
3581 * hash.h: Regenerated.
3582 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
3583 (build_member_call): Likewise.
3584 (build_new_1): Likewise.
3585 * lex.c (init_parse): Add entry for RID_RESTRICT.
3586 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
3587 (cp_type_qual_from_rid): Define.
3588 * lex.h (enum rid): Add RID_RESTRICT.
3589 * method.c (process_modifiers): Deal with `restrict'.
3590 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
3591 * parse.c: Regenerated.
3592 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
3593 (tsubst_aggr_type): Likewise.
3595 (check_cv_quals_for_unify): Likewise.
3597 * rtti.c (init_rtti_processing): Likewise.
3598 (build_headof): Likewise.
3599 (get_tinfo_var): Likewise.
3600 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
3601 (expand_class_desc): Likewise.
3602 (expand_attr_desc): Likewise.
3603 (synthesize_tinfo_fn): Likewise.
3604 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
3605 (get_matching_virtual): Likewise.
3606 (expand_upcast_fixups): Likewise.
3607 * sig.c (build_signature_pointer_or_reference_name): Take
3608 type_quals, not constp and volatilep.
3609 (build_signature_pointer_or_reference_type): Likewise.
3610 (match_method_types): More CP_TYPE_QUALS conversion, etc.
3611 (build_signature_pointer_constructor): Likewise.
3612 (build_signature_method_call): Likewise.
3613 * tree.c (build_cplus_array_type): Likewise.
3614 (cp_build_type_variant): Rename to ...
3615 (cp_build_qualified_type): New function. Deal with `__restrict'.
3616 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
3617 (build_exception_variant): Likewise.
3619 * typeck.c (qualif_type): Likewise.
3620 (common_type): Likewise.
3621 (comptypes): Likewise.
3622 (comp_cv_target_types): Likewise.
3623 (at_least_as_qualified_p): Define.
3624 (more_qualified_p): Likewise.
3625 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
3626 (compparms): Likewise.
3627 (inline_conversion): Likewise.
3628 (string_conv_p): Likewise.
3629 (build_component_ref): Likewise.
3630 (build_indirect_ref): Likewise.
3631 (build_array_ref): Likewise.
3632 (build_unary_op): Likewise.
3633 (build_conditional_expr): Likewise.
3634 (build_static_cast): Likewise.
3635 (build_c_cast): Likewise.
3636 (build_modify_expr): Likewise.
3637 (convert_For_assignment): Likewise.
3638 (comp_ptr_ttypes_real): Likewise.
3639 (cp_type_quals): New function.
3641 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
3643 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
3644 (CP_TYPE_VOLATILE): Likewise.
3645 * decl.c (grokdeclarator): Use them.
3646 * tree.c (canonical_type_variant): Likewise.
3648 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
3650 * parse.y (named_class_head): Push into class while parsing the
3652 * decl2.c (push_scope, pop_scope): New functions.
3653 * cp-tree.h: Declare them.
3654 * init.c (build_new_1): Delay cleanup until end of full expression.
3656 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
3658 * typeck.c (build_component_ref): Use of a type here is an error.
3660 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
3662 Revamp references to member functions.
3663 * method.c (hack_identifier): Call build_component_ref for a
3664 reference to a member function.
3665 * typeck.c (build_component_ref): Only return a single function
3666 if it's static. Otherwise, return a COMPONENT_REF.
3667 (build_x_function_call): Handle a COMPONENT_REF.
3668 (build_unary_op): Handle all unknown-type things.
3669 * decl2.c (arg_assoc): Handle COMPONENT_REF.
3670 * class.c (instantiate_type): Complain if the function we get is a
3671 nonstatic member function. Remove code for finding "compatible"
3673 * pt.c (tsubst_copy): Handle NOP_EXPR.
3674 * tree.c (build_dummy_object): New fn.
3675 (maybe_dummy_object): New fn.
3676 (is_dummy_object): New fn.
3677 * cp-tree.h: Declare them.
3678 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
3679 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
3680 * init.c (build_member_call): Use maybe_dummy_object and
3682 (build_offset_ref): Use maybe_dummy_object.
3683 (resolve_offset_ref): Use is_dummy_object.
3684 * typeck.c (build_x_function_call): Call build_dummy_object.
3685 (unary_complex_lvalue): Call is_dummy_object.
3687 * typeck.c (build_component_addr): Make sure field is a field.
3689 * call.c (build_new_op): Delete obsolete code.
3691 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
3693 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
3695 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
3696 std if std is ignored.
3698 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
3700 * decl.c (grokvardecl): Fix thinko.
3702 * decl.c (grokdeclarator): Embedded attrs bind to the right,
3705 * parse.y (fn.def2): Fix 'attrs' format.
3707 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
3709 * Makefile.in (CONFLICTS): Update.
3710 * parse.y (expr_or_declarator_intern): New rule.
3711 (expr_or_declarator, direct_notype_declarator, primary,
3712 functional_cast): Use it.
3713 (notype_declarator_intern): New rule.
3714 (notype_declarator, complex_notype_declarator): Use it.
3716 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
3718 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
3719 (grokvardecl): Likewise.
3721 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3723 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
3724 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
3726 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
3728 * pt.c (process_partial_specialization): Cast 1st argument of
3731 * tree.c (build_base_fields): Cast `base_align' to (int) when
3732 comparing against one.
3734 1998-10-16 Mark Mitchell <mark@markmitchell.com>
3736 * decl.c (lookup_name_real): Handle template parameters for member
3737 templates where said parameters have the same name as the
3740 * decl.c (expand_static_init): Build cleanups before entering the
3741 anonymous function used to do them to avoid access-checking
3744 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
3745 accidentally removed by previous change, and make DECL_RTL here.
3746 * class.c (add_method): Don't make DECL_RTL here.
3748 * pt.c (for_each_template_parm): Don't examine uninstantiated
3751 1998-10-16 Dave Brolley <brolley@cygnus.com>
3753 * lex.c (real_yylex): Fix unaligned access of wchar_t.
3755 1998-10-16 Mark Mitchell <mark@markmitchell.com>
3757 * class.c (add_method): Fix documentation to reflect previous
3758 changes. Check for duplicate method declarations here.
3759 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
3760 correctly; such things never match.
3761 (grokfndecl): Don't look for duplicate methods here.
3762 * decl2.c (check_classfn): Don't assume names are mangled.
3763 Don't add bogus member function declarations to a class before the
3764 class type is complete.
3765 (grokfield): Reformat error message.
3766 * method.c (set_mangled_name_for_decl): Don't mangle names while
3767 processing_template_decl.
3769 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
3771 * typeck.c (build_indirect_ref): Complain about a pointer to data
3773 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
3775 * init.c (resolve_offset_ref): Don't undo the above.
3777 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
3778 (struct lang_decl_flags): Add `bitfield'.
3779 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
3781 * decl2.c (grokbitfield, grok_alignof): Likewise.
3782 * init.c (build_offset_ref): Likewise.
3783 * typeck.c (build_component_addr, expr_sizeof): Likewise.
3784 * cvt.c (build_up_reference): Don't crash if taking the address
3785 returns error_mark_node.
3787 * decl.c (grokfndecl): Also check ctype when checking for ::main().
3789 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
3791 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
3793 (grokdeclarator): Instead of here.
3794 * friend.c (do_friend): Lose special handling of ::main and
3796 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
3798 * spew.c (yylex): Clear looking_for_typename if we got
3801 1998-10-15 Mark Mitchell <mark@markmitchell.com>
3803 * class.c (maybe_warn_about_overly_private_class): Improve error
3804 messages for class with only private constructors.
3806 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
3807 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
3808 (build_typename_type): New function.
3809 * decl.c (build_typename_type): Broken out from ...
3810 (make_typename_type): Use it.
3811 * search.c (lookup_field): Likewise.
3813 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3815 * pt.c (convert_nontype_argument): Check against type_referred_to.
3816 * decl.c (grokvardecl): Check for declarator name before building
3817 DECL_ASSEMBLER_NAME.
3819 1998-10-14 Mark Mitchell <mark@markmitchell.com>
3821 * pt.c (lookup_template_class): Add comment.
3822 (instantiate_class_template): Don't mark the _TYPE node for
3823 member class templates as an instantiation.
3825 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
3827 * decl.c (grokfndecl): Fix my thinko.
3829 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
3831 * tinfo2.cc (fast_compare): Remove.
3832 (before): Just use strcmp.
3833 * tinfo.cc (operator==): Just use strcmp.
3835 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
3837 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
3840 1998-10-13 Mark Mitchell <mark@markmitchell.com>
3842 * cp-tree.h (specializations_of_same_template_p): Remove.
3843 * search.c (get_template_base): Don't use it.
3844 (get_template_base_recursive): Likewise.
3845 * pt.c (specializations_of_same_template_p): Remove.
3846 (unify): Don't use it.
3847 (lookup_template_class): Find the correct parent when setting
3848 CLASSTYPE_TI_TEMPLATE.
3850 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
3852 * tinfo.cc (operator==): Always compare names.
3854 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3856 * decl.c (start_function): Fix cut-and-paste error.
3858 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
3860 * inc/typeinfo: Add #pragma interface.
3861 (operator!=): Just call operator==.
3862 * tinfo.cc: Add #pragma implementation.
3863 (operator==): Move from inc/typeinfo and tinfo2.cc.
3864 Check __COMMON_UNRELIABLE instead of _WIN32.
3866 * typeck2.c (my_friendly_abort): Add URL.
3868 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
3870 * decl.c (start_method): Added extra parameter for attributes.
3871 * cp-tree.h (start_method): Update prototype.
3872 * parse.y (fn.def2): Update start_method parameter list.
3874 1998-10-11 Mark Mitchell <mark@markmitchell.com>
3876 * cp-tree.h (specializations_of_same_template_p): Declare.
3877 * pt.c (specializations_of_same_template_p): New function.
3879 * search.c (get_template_base): Use it.
3880 (get_template_base_recursive): Likewise.
3882 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
3884 * decl2.c (start_objects): Add new variable `joiner' and
3885 initialize it properly.
3887 1998-10-09 Mark Mitchell <mark@markmitchell.com>
3889 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
3890 change to vtable types.
3892 * cvt.c (ocp_convert): Avoid infinite recursion caused by
3895 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
3897 * pt.c (resolve_overloaded_unification): New fn.
3898 (try_one_overload): Likewise.
3899 (unify): Don't fail on unknown type.
3900 (type_unification_real): Likewise. Use resolve_overloaded_unification
3901 to handle an overloaded argument.
3902 (template_args_equal): Split out...
3903 (comp_template_args): From here.
3904 (determine_specialization): Also allow a template with more
3905 parms than were explicitly specified.
3906 * cp-tree.h: Add template_args_equal.
3907 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
3909 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
3911 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
3914 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
3916 * typeck.c (unsigned_type): Only return TItype nodes when
3917 HOST_BITS_PER_WIDE_INT is >= 64 bits.
3918 (signed_type): Likewise.
3919 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
3920 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
3921 (init_decl_processing): Only create TItype nodes when
3922 HOST_BITS_PER_WIDE_INT is >= 64 bits.
3923 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
3924 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
3926 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3928 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
3929 (gxx.gperf): Update comments describing invocation flags.
3930 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
3932 1998-10-07 Mark Mitchell <mark@markmitchell.com>
3934 * class.c (finish_struct_1): Add commentary on previous change.
3936 * cp-tree.h (vtbl_ptr_type_node): New variable.
3937 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
3938 already of the right type.
3939 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
3940 Simplify code to grow vtable.
3941 * decl.c (vtbl_ptr_type_node): Define.
3942 (init_decl_processing): Initialize it.
3944 1998-10-06 Mark Mitchell <mark@markmitchell.com>
3946 * cp-tree.def (PTRMEM_CST): New tree node.
3947 * cp-tree.h (ptrmem_cst): New type.
3948 (lang_type): Remove local_typedecls.
3949 (dummy): Increase to 12 bits from 11.
3950 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
3951 (PTRMEM_CST_CLASS): New macro.
3952 (PTRMEM_CST_MEMBER): Likewise.
3953 (current_access_specifier): New variable.
3954 (current_class_type): Remove duplicate declaration.
3955 (finish_struct): Change prototype.
3956 (unreverse_member_declarations): New function.
3957 (pushdecl_class_level): Change prototype.
3958 (grok_enum_decls): Remove.
3959 (fixup_anonymous_union): New function.
3960 (grok_x_components): Change prototype.
3961 (tsubst_chain): Remove.
3962 (finish_member_template_decl): Likewise.
3963 (check_explicit_specialization): Fix indentation.
3964 (finish_class_definition): Change prototype.
3965 (finish_member_class_template): Likewise.
3966 (finish_member_declaration): New function.
3967 (check_multiple_declarators): Likewise.
3968 * class.c (class_stack_node_t): New type.
3969 (current_class_base): Remove.
3970 (current_class_stack): Change type.
3971 (current_access_specifier): New variable.
3972 (grow_method): Remove.
3973 (check_member_decl_is_same_in_complete_scope): Break out from
3975 (make_method_vec): New function.
3976 (free_method_vec): Likewise.
3977 (add_implicitly_declared_members): Break out from finish_struct_1.
3978 (free_method_vecs): New variable.
3979 (add_method): Rework for direct use from parser.
3980 (handle_using_decl): Watch for NULL_TREE while iterating through
3981 CLASSTYPE_METHOD_VEC.
3982 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
3983 just do some error-checking.
3984 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
3985 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
3986 (finish_struct): Change prototype. Simplify; fields and methods
3987 are already set up at this point.
3988 (init_class_processing): Set up current_class_stack.
3989 (pushclass): Save current_access_specifier.
3990 (popclass): Restore it.
3991 (currently_open_class): Simplify.
3992 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
3993 * decl.c (saved_scope): Add access_specifier.
3994 (maybe_push_to_top_level): Save it.
3995 (pop_from_top_level): Restore it.
3996 (maybe_process_template_type_declaration): Use
3997 finish_member_declaration.
3998 (pushtag): Likewise.
3999 (pushdecl_class_level): Don't return a value.
4000 (fixup_anonymous_union): Break out from grok_x_components.
4001 (shadow_tag): Use it.
4002 (xref_tag): Complain about using an elaborated type specifier to
4003 reference a template type parameter or typedef name.
4004 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
4005 (current_local_enum): Remove.
4006 (build_enumerator): Call finish_member_declaration.
4007 (grok_enum_decls): Remove.
4008 * decl2.c (grok_x_components): Simplify.
4009 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
4010 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
4011 (merge_functions): Add to comment.
4012 (arg_assoc_type): Prototype.
4013 (arg_assoc): Pass as many arguments as there are parameters.
4014 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
4016 * expr.c (cpls_expand_expr): Remove dead code. Handle
4018 * friend.c (do_friend): Lookup friends when in nested classes.
4020 * init.c (build_offset_ref): Do lookup even for classes that are
4021 only partially defined.
4022 (decl_constant_value): Remove dead code.
4023 * method.c (build_overload_value): Remove hack where by TYPE was
4024 not a TYPE. Handle PTRMEM_CST.
4025 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
4027 * parse.y (components, notype_components, component_decl,
4028 component_decl_1, component_declarator, component_declarator0):
4029 Now all are itype rather than ttype. Rework to add members to
4031 (typesqpecqual_reserved): Use check_multiple_declarators.
4032 (structsp): Update class to finish_class_definition.
4033 (do_xref_defn): Unsplit into named_class_head.
4034 (access_specifier): Set current_access_specifier.
4035 * pt.c (set_current_access_from_decl): New function.
4036 (finish_member_template_decl): Don't take the parameters.
4037 (comp_template_args): Make more robust.
4038 (lookup_template_class): Don't use current_local_enum.
4039 (for_each_template_parm): Handle PTRMEM_CST.
4040 (instantiate_class_template): Use set_current_access_from_decl,
4041 finish_member_declaration and unreverse_member_declarations. Set
4042 lineno/input_filename before generating implicit member functions.
4043 (type_unification_real): Don't assume back-unification happens
4044 only for the last argument.
4045 (regenerate_decl_from_template): Call pushclass a bit earlier.
4046 (tsubst_chain): Remove.
4047 (tsubst_enum): Use set_current_access_from_decl.
4048 (set_mangled_name_for_template_decl): Fix indentation.
4049 * search.c (lookup_fnfields_1): Change iteration through
4050 CLASSTYPE_METHOD_VEC.
4051 (dfs_pushdecls): Likewise.
4052 (dfs_compress_decls): Likewise.
4053 (add_conversions): Likewise.
4054 * semantics.c (finish_class_definition): Don't take components.
4055 Change call to finish_struct.
4056 (finish_member_declaration): New function.
4057 (finish_member_class_template): Don't take template parameters.
4058 Change call to grok_x_components. Call finish_member_template_decl.
4059 (check_multiple_declarators): New function.
4060 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
4061 a passed in fieldlist.
4062 * tree.c (search_tree): Handle PTRMEM_CST.
4064 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
4065 INTEGER_CSTs, for pointer-to-data members.
4067 * call.c (resolve_args): Resolve template specializations, if
4070 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4072 * Makefile.in (spew.o): Depend on toplev.h.
4074 * call.c (compare_ics): Initialize variables `deref_from_type2',
4075 `deref_to_type1' and `deref_to_type2'.
4077 * except.c (get_eh_type): Hide prototype and definition.
4078 (process_start_catch_block_old): Remove unused static prototype.
4080 * pt.c (tsubst_decl): Initialize variable `argvec'.
4082 * spew.c: Include toplev.h.
4084 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
4086 * pt.c (instantiate_decl): Do save and restore file position.
4088 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
4090 * method.c (build_decl_overload_real): Clear
4091 numeric_output_need_bar after __.
4093 1998-10-05 Nathan Sidwell <nathan@acm.org>
4095 * call.c (build_new_method_call): Issue 'incomplete type' error,
4096 if class is not defined.
4098 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4100 * call.c (build_object_call): Move declaration of variable
4101 `fn' into the scope where it is used. Don't access variable
4102 `fn' when it is uninitialized, instead use `fns'.
4104 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4106 * errfn.c (cp_thing): Print buf as a string not as a printf format
4107 to avoid problems with the operator%. Consequently, `%%' sequences
4108 in format are copied as `%' in buf.
4110 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
4112 * pt.c (pop_tinst_level): Call extract_interface_info.
4113 (instantiate_decl): Don't save and restore file position.
4115 * decl.c (cp_finish_decl): Make statics in extern inlines and
4116 templates common, if possible and the target doesn't support weak
4119 * decl.c (grokdeclarator): Remove redundant calls to
4120 build_type_variant and some duplicated code.
4121 * sig.c (build_signature_reference_type): Only take the type parm.
4122 (build_signature_pointer_type): Likewise.
4123 * tree.c (build_cplus_method_type): Adjust.
4124 * cp-tree.h: Update.
4126 1998-10-04 Mark Mitchell <mark@markmitchell.com>
4128 * call.c (build_over_call): Make pedwarns about dropped qualifiers
4129 into full-fledged errors.
4130 * cvt.c (convert_to_reference): Likewise.
4131 * typeck.c (convert_for_assignment): Likewise.
4133 * search.c (expand_upcast_vtables): In addition to unsetting
4134 TREE_READONLY, remove top-level const type qualifier.
4136 1998-10-03 Mark Mitchell <mark@markmitchell.com>
4138 * class.c (current_class_ptr, current_class_ref): Clarify
4140 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
4141 NOP type conversions.
4142 * decl.c (decls_match): Use comptypes directly; ignore
4143 qualifiers on the DECL.
4144 (duplicate_decls): Remove qualifier checks on DECL.
4145 (grokdeclarator): Make the type built up include top-level
4147 * decl2.c (do_dtors): Fix spelling error.
4148 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
4149 when printing type information.
4150 * init.c (build_new_1): Add documentation. Deal with the fact
4151 that type of allocated memory now contains qualifiers.
4152 * lex.c (is_global): Improve error-recovery.
4153 * sig.c (build_member_function_pointer): Don't cast away const
4154 on fields of sigtable_entry_type.
4155 * tree.c (lvalue_type): Don't look at top-level qualifiers on
4157 * typeck.c (decay_conversion): Likewise.
4158 (build_component_ref): Make sure the type of the COMPONENT_REF
4159 contains top-level qualifiers, as appropriate. Improve
4161 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
4162 (build_array_ref): Likewise.
4163 (build_unary_op): Improve error-recovery.
4164 (unary_complex_lvalue): Make taking the address a bound member
4165 function an error, not a sorry.
4166 (build_conditional_expr): Look at the type qualifiers, not the
4167 qualifiers on the expression itself.
4169 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
4171 * decl2.c (merge_functions): Remove duplicates.
4173 * decl2.c: Add -f{no-,}implicit-inline-templates.
4174 (import_export_decl): Check it.
4176 * decl.c (lookup_name_real): Template parms also take precedence
4177 over implicit typename. Only warn if yylex.
4179 * typeck.c (build_conditional_expr): Only fold if ifexp is an
4182 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
4185 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
4187 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
4188 * class.c (build_vbase_pointer): Use it.
4189 * rtti.c (expand_class_desc): Likewise.
4190 * tree.c (build_vbase_pointer_fields): Likewise.
4192 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
4194 * decl.c (start_decl): Add invocation of
4195 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
4196 (start_function): Add invocation of
4197 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
4199 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
4200 HANDLE_GENERIC_PRAGMAS.
4202 1998-09-28 Anthony Green <green@cygnus.com>
4204 * semantics.c (finish_asm_stmt): Always permit volatile asms.
4206 1998-09-28 Mark Mitchell <mark@markmitchell.com>
4208 * decl.c (grokdeclarator): Tighten checks for invalid
4209 destructors. Improve error-messages and error-recovery.
4210 * decl2.c (check_classfn): Don't assume that mangled destructor
4211 names contain type information.
4213 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
4215 * search.c (get_base_distance): Remove assert.
4217 * decl2.c (build_anon_union_vars): Don't process a field with no
4219 (finish_anon_union): Also complain about local anon unions with no
4222 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4224 * decl.c (lookup_namespace_name): If the name is a namespace,
4225 return it immediately.
4227 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4229 * cp-tree.h (define_case_label): Remove unused parameter.
4230 (check_java_method): Likewise.
4231 (grokclassfn): Likewise.
4232 (expand_aggr_init): Likewise.
4233 (build_x_delete): Likewise.
4234 (maybe_end_member_template_processing): Likewise.
4235 (unshare_base_binfos): Add prototype.
4236 (string_conv_p): Likewise.
4237 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
4239 * cvt.c (build_up_reference): Remove unused parameter
4240 `checkconst', all callers changed.
4241 (build_type_conversion): Mark parameter `code' with
4243 (build_expr_type_conversion): Initialize variable `conv'.
4245 * decl.c (push_namespace): Initialize variable `d'.
4246 (define_case_label): Remove unused parameter `decl', all callers
4249 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
4250 `argc' with ATTRIBUTE_UNUSED.
4251 (grokclassfn): Remove unused parameter `cname', all callers
4253 (check_java_method): Likewise for parameter `ctype'.
4254 (copy_assignment_arg_p): Mark parameter `virtualp' with
4256 (finish_prevtable_vardecl): Likewise for parameter `prev'.
4258 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
4260 * init.c (expand_aggr_init_1): Remove unused parameter
4261 `alias_this', all callers changed.
4262 (expand_aggr_init): Likewise.
4263 (expand_default_init): Likewise.
4264 (build_new_1): Initialize variable `susp'.
4265 (build_x_delete): Remove unused parameter `type', all callers
4268 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
4270 (readescape): Use (unsigned) value in shift.
4271 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
4272 comparing to a signed quantity.
4274 * pt.c (maybe_end_member_template_processing): Remove unused
4275 parameter `decl', all callers changed.
4276 (check_explicit_specialization): Add braces around empty body in
4278 (current_template_args): Initialize variable `args'.
4279 (lookup_template_class): Likewise for variable `prev_local_enum'.
4280 (tsubst_decl): Likewise for variable `r'.
4281 (set_mangled_name_for_template_decl): Initialize variable
4284 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
4285 Likewise for variable `i'.
4286 (yylex): Initialize variable `trrr'.
4288 * typeck.c (compparms): Mark variable `strict' with
4291 * xref.c (simplify_type): Cast argument of ctype function to
4294 1998-09-24 Mark Mitchell <mark@markmitchell.com>
4296 * cp-tree.h (language_lvalue_valid): Remove.
4297 * decl.c (grokdeclarator): Don't disallow references to functions.
4298 * tree.c (lvalue_p_1): New function, combining duplicated
4301 (real_lvalue_p): Likewise.
4302 * typeck.c (language_lvalue_valid): Remove.
4303 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
4304 they don't have TREE_READONLY set.
4305 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
4307 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
4309 * spew.c (yylex): Give diagnostic.
4310 * hash.h (is_reserved_word): Add export.
4311 * gxx.gperf: Likewise.
4312 * lex.h (rid): Add RID_EXPORT.
4313 * lex.c (init_parse): Likewise.
4315 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
4317 * friend.c (do_friend): Make warning a full sentence.
4319 1998-09-22 Mark Mitchell <mark@markmitchell.com>
4321 * parse.y (component_decl_list): Improve error-recovery.
4323 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
4325 * decl.c (make_typename_type): Move error to point where name
4326 variable can be used by dump_type.
4328 1998-09-22 Mark Mitchell <mark@markmitchell.com>
4330 * decl.c (grokfndecl): Improve error-recovery.
4331 * decl2.c (grokfield): Likewise.
4332 * pt.c (finish_member_template_decl): Likewise.
4334 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
4336 * method.c (hack_identifier): Finding multiple members is always
4339 1998-09-21 Per Bothner <bothner@cygnus.com>
4341 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
4343 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
4345 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
4347 1998-09-20 Mark Mitchell <mark@markmitchell.com>
4349 * class.c (maybe_warn_about_overly_private_class): Reformat.
4351 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
4353 * exception.cc (__cplus_type_matcher): Realign some code.
4355 1998-09-16 Mark Mitchell <mark@markmitchell.com>
4357 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
4358 (tinfo2.o): Likewise.
4359 (exception.o): Likewise.
4361 (opnew.o): Likewise.
4362 (opnewnt.o): Likewise.
4363 (opvnew.o): Likewise.
4364 (opvnewnt.o): Likewise.
4365 (opdel.o): Likewise.
4366 (opdelnt.o): Likewise.
4367 (opvdel.o): Likewise.
4368 (opvdelnt.o): Likewise.
4370 1998-09-16 Richard Henderson <rth@cygnus.com>
4372 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
4374 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
4376 * call.c (build_field_call): Handle static data members too.
4378 * typeck.c (comptypes): When comparing pointer types, check
4379 whether referred types match even in strictest modes.
4381 1998-09-15 Mark Mitchell <mark@markmitchell.com>
4383 * cp-tree.h: Revert previous change.
4384 (finish_struct_methods): Remove declaration.
4385 * class.c: Revert previous change.
4386 (maybe_warn_about_overly_private_class): New function.
4387 (finish_struct_methods): Declare here, and make static. Remove
4388 unnecessary parameters. Tidy slightly. Use
4389 maybe_warn_about_overly_private_class.
4390 (finish_struct_1): Adjust. Remove check for private constructors,
4392 (finish_struct): Adjust.
4394 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
4396 * except.c (expand_start_catch_block): No need to check for new
4398 (process_start_catch_block_old): Deleted.
4399 (process_start_catch_block): Add call to start_decl_1().
4400 (expand_end_catch_block): Add call to end_catch_handler().
4401 * exception.cc (__cplus_type_matcher): Only check the exception
4402 language if there is an exception table.
4404 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
4406 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
4407 as used to prevent conflicts with virtual function tables.
4409 1998-09-14 Mark Mitchell <mark@markmitchell.com>
4411 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
4412 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
4413 * class.c (maybe_class_too_private_p): New function.
4414 (finish_struct_methods): Use it.
4415 (finish_struct_1): Likewise.
4416 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
4419 * pt.c (check_specialization_scope): Fix spelling error.
4420 (check_explicit_specialization): Remove code to handle explicit
4421 specializations in class scope; they are now correctly diagnosed
4424 1998-09-10 Mark Mitchell <mark@markmitchell.com>
4426 * decl.c (pushdecl): Don't copy types if the
4427 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
4430 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4432 * class.c (get_enclosing_class): New function.
4433 (is_base_of_enclosing_class): Likewise.
4434 * cp-tree.h (get_enclosing_class): Declare.
4435 (is_base_of_enclosing_class): Likewise.
4436 * pt.c (coerce_template_parms): Use them.
4438 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
4440 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
4441 null to decide whether to use it.
4443 * error.c (dump_type_real): Handle NAMESPACE_DECL.
4444 * parse.y (base_class.1): Avoid crash on error.
4446 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
4448 * decl.c (make_typename_type): If context is a namespace, the code
4451 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
4453 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
4455 1998-09-08 Mark Mitchell <mark@markmitchell.com>
4457 * cp-tree.h (anonymous_namespace_name): Declare.
4458 * decl.c: Define it.
4459 (push_namespace): Use anonymous_namespace_name, rather than local
4461 * error.c (dump_decl): If a namespace is named
4462 anonymous_namespace_name, call it {anonymous}.
4464 * decl.c (grokparms): Distinguish between references and pointers
4467 1998-09-08 Richard Henderson <rth@cygnus.com>
4468 Mark Mitchell <mark@markmitchell.com>
4470 * pt.c (process_partial_specialization): Consistently allocate
4471 and zero tpd.parms based on ntparms. Use tpd2.parms, not
4472 tpd.parms, where appropriate.
4474 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
4476 * Makefile.in (INCLUDES): Update after recent toplevel gcc
4479 1998-09-05 Mark Mitchell <mark@markmitchell.com>
4481 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
4482 * class.c (finish_struct): Remove hackery to deal with explicit
4483 specializations in class scope.
4484 * decl.c (grokfndecl): Improve error-recovery.
4485 * decl2.c (grokfield): Likewise.
4486 * pt.c (check_specialization_scope): New function.
4487 (begin_specialization): Call it.
4488 (process_partial_specialization): New function, split out from
4489 push_template_decl. Check partial specializations more
4491 (push_template_decl): Call it.
4492 (check_explicit_specialization): Don't attempt to handle explicit
4493 specializations in class scope.
4494 (template_parm_data): Document. Add current_arg and
4495 arg_uses_template_parms.
4496 (mark_template_parm): Set it.
4497 (tsubst_arg_types): Remove unused variable.
4498 * semantics.c (begin_class_definition): Tweak.
4500 1998-09-04 Mark Mitchell <mark@markmitchell.com>
4502 * inc/typeinfo (type_info::type_info(const char*)): Make
4505 * cp-tree.h (hash_tree_cons_simple): New macro.
4506 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
4507 (coerce_template_parms): Use make_temp_vec, instead of
4508 make_tree_vec. Document this behavior.
4509 (lookup_template_class): Likewise.
4510 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
4511 Remove dead code (and add assertion to check its deadness). Fix
4512 bug w.r.t. exception specifications.
4514 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
4516 * decl2.c (import_export_vtable): Always make artificials comdat.
4517 (import_export_decl): Likewise.
4518 * pt.c (mark_decl_instantiated): Likewise.
4520 1998-09-03 Mark Mitchell <mark@markmitchell.com>
4522 * cp-tree.h (finish_globally_qualified_member_call_expr):
4524 (finish_qualified_call_expr).
4525 * semantics.c: Likewise.
4526 * parse.y (primary): Use it.
4527 * method.c (hack_identifier): Remove redundant code.
4529 * init.c (resolve_offset_ref): Call convert_from_reference to
4530 handle members of reference type. Improve error recovery.
4532 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
4534 * cp-tree.h: Declare warn_nontemplate_friend.
4535 * decl2.c (lang_decode_option): Set.
4536 * lang-options.h: Add -Wnon-template-friend.
4537 * friend.c (do_friend): Use to toggle non-template function warning.
4539 1998-09-03 Mark Mitchell <mark@markmitchell.com>
4541 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
4542 corresponding INTEGER_CSTs when processing_template_decl.
4543 * pt.c (tsubst_enum): Tweak accordingly.
4545 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
4547 * decl.c (pushdecl_class_level): Add warning here.
4550 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
4552 * cvt.c (convert_pointer_to_real): Tidy.
4553 * search.c (get_base_distance_recursive): Simplify.
4554 (get_base_distance): Likewise.
4556 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
4559 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
4561 * lex.c (check_newline): Call HANDLE_PRAGMA before
4562 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
4563 if unknown pragmas are encountered.
4564 (handle_sysv_pragma): Interpret return code from
4565 handle_pragma_token (). Return success/failure indication rather
4566 than next unprocessed character.
4567 (pragma_getc): New function: retrieves characters from the
4568 input stream. Defined when HANDLE_PRAGMA is defined.
4569 (pragma_ungetc): New function: replaces characters back into the
4570 input stream. Defined when HANDLE_PRAGMA is defined.
4572 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
4574 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
4575 * class.c (build_vtable_entry_ref): Likewise.
4577 1998-09-01 Mark Mitchell <mark@markmitchell.com>
4579 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
4580 * decl2.c (import_export_decl): Likewise.
4581 * pt.c (instantiate_decl): Use it.
4583 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
4585 * decl.c (lookup_name_real): Also do implicit typename thing for
4586 artificial TYPE_DECLs.
4587 * search.c (lookup_field): Likewise.
4588 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
4589 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
4590 (enter_scope_of): Extract type from implicit typename.
4591 (begin_class_definition): Likewise.
4592 * lex.c (identifier_type): Handle implicit typename when checking
4595 * cp-tree.h: Declare flag_strict_prototype.
4596 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
4598 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
4599 specified, set it to the value of pedantic.
4601 1998-09-01 Mark Mitchell <mark@markmitchell.com>
4603 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
4605 1998-08-31 Mark Mitchell <mark@markmitchell.com>
4607 * decl.c (finish_enum): Handle member enums of classes declared in
4610 * decl2.c (grok_x_components): Strip attributes before calling
4613 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
4615 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
4616 -fenum-int-equivalence and -fno-nonnull-objects.
4617 * class.c (check_for_override): Remove support for -fall-virtual.
4618 (finish_struct_1): Likewise.
4619 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
4620 * typeck.c (build_binary_op_nodefault): Likewise.
4621 * cvt.c (ocp_convert): Likewise.
4622 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
4623 * class.c (build_vbase_path): Likewise.
4625 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
4627 * Makefile.in (INTERFACE): New, set to 1.
4629 1998-08-30 Mark Mitchell <mark@markmitchell.com>
4631 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
4632 comparing with global_namespace.
4633 (dump_aggr_type): Likewise.
4635 * decl.c (grokfndecl): Issue error on declaration of friend
4636 templates with explicit template arguments.
4638 * pt.c (convert_template_argument): New function, split out
4640 (coerce_template_parms): Here.
4641 (tsubst): Attempt better error-recovery.
4643 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
4645 * pt.c (decl_template_parm_p): Add checks for
4646 TEMPLATE_TEMPLATE_PARM.
4648 1998-08-28 Mark Mitchell <mark@markmitchell.com>
4650 * lex.c (do_identifier): Fix thinko in previous change.
4652 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
4654 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
4655 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
4657 1998-08-28 Richard Henderson <rth@cygnus.com>
4659 Add support for discarding unused virtual functions.
4660 * lang-options.h: Add -fvtable-gc.
4661 * cp-tree.h: Add flag_vtable_gc.
4662 * decl2.c (output_vtable_inherit): New fn.
4663 (finish_vtable_vardecl): Call it.
4664 * class.c (build_vtable_entry_ref): New fn.
4665 (build_vtbl_ref): Call it.
4667 1998-08-28 Mark Mitchell <mark@markmitchell.com>
4669 * cp-tree.h (build_enumerator): Take the enumeration type as a
4671 * decl.c (finish_enum): Don't set the TREE_TYPE for the
4672 enumeration constant values if we're processing_template_decls.
4673 Don't set the type for the CONST_DECLs either; that's done in
4675 (build_enumerator): Take the enumeration type as a
4677 * lex.c (do_identifier): Don't resolve enumeration constants while
4678 processing template declarations, even if they happen to be
4679 TEMPLATE_PARM_INDEXs.
4681 * parse.y (current_enum_type): New variable.
4682 (primary): Don't allow statement-expression in local classes just
4683 as we don't in global classes.
4684 (structsp): Use current_enum_type.
4685 (enum_list): Likewise.
4686 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
4687 finish_enum; they no longer occur.
4689 * cp-tree.h (finish_base_specifier): New function.
4690 * parse.y (base_class): Use it.
4691 * semantics.c (finish_base_specifier): Define it.
4693 * parse.y (structsp): Warn on use of typename outside of template
4696 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
4698 * lex.c (handle_cp_pragma): Remove #pragma vtable.
4699 * lang-options.h: Remove +e options.
4700 * decl2.c (lang_decode_option): Likewise.
4701 (import_export_vtable): Don't check write_virtuals.
4702 (finish_vtable_vardecl, finish_file): Likewise.
4703 * search.c (dfs_debug_mark): Likewise.
4704 * semantics.c (begin_class_definition): Likewise.
4705 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
4707 * call.c (build_over_call): Check flag_elide_constructors.
4708 * decl2.c: flag_elide_constructors defaults to 1.
4709 * typeck.c (convert_arguments): Remove return_loc parm.
4710 (build_function_call_real): Adjust.
4712 * search.c: Tear out all mi_matrix and memoize code.
4713 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
4714 * lang-options.h: Remove documentation for -fhandle-exceptions,
4715 -fmemoize-lookups and -fsave-memoized.
4716 * cp-tree.h: Lose mi_matrix and memoize support.
4717 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
4718 * class.c: Lose struct class_level.
4719 (pushclass, popclass): Lose memoize support.
4720 * init.c (build_offset_ref): Likewise.
4722 Never change BINFO_INHERITANCE_CHAIN.
4723 * init.c (emit_base_init): Change modification of
4724 BINFO_INHERITANCE_CHAIN to an assert.
4725 * search.c (get_base_distance_recursive): Likewise.
4726 (get_base_distance): Likewise.
4727 (lookup_member): Likewise.
4728 (convert_pointer_to_single_level): Likewise.
4729 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
4730 (lookup_fnfields): Likewise.
4731 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
4732 (unshare_base_binfos): Don't call propagate_binfo_offsets.
4733 (layout_basetypes): Call propagate_binfo_offsets instead of
4734 unshare_base_binfos.
4735 * decl.c (xref_basetypes): Call unshare_base_binfos.
4736 * pt.c (instantiate_class_template): Likewise.
4737 * tree.c (reverse_path): Remove 'copy' parm; always make a
4739 * class.c (build_vbase_path): Just call it.
4740 * search.c (compute_access): Likewise. Don't re-reverse.
4742 1998-08-27 Mark Mitchell <mark@markmitchell.com>
4744 * class.c (build_vbase_path): Use reverse_path.
4745 (finish_base_struct): Move warnings for inaccessible bases to
4747 (modify_one_vtable): Remove check of TREE_USED (binfo).
4748 (fixup_vtable_deltas1): Likewise.
4749 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
4750 (xref_tag): Remove binfos parameter.
4751 (make_binfo): Remove chain parameter.
4752 (reverse_path): Add copy parameter.
4753 * decl.c (init_decl_processing): Change calls to xref_tag.
4754 (xref_tag): Remove binfos parameter.
4755 (xref_basetypes): Change calls to make_binfo.
4756 * decl2.c (grok_x_components): Change calls to xref_tag.
4757 (handle_class_head): Likewise.
4758 * friend.c (do_friend): Likewise.
4759 * lex.c (make_lang_type): Change calls to make_binfo.
4760 * parse.y (structsp): Change calls to xref_tag.
4761 (named_complex_class_head_sans_basetype): Likewise.
4762 (named_class_head): Likewise.
4763 * rtti.c (init_rtti_processing): Likewise.
4764 * search.c (compute_access): Change calls to reverse_path.
4765 (dfs_get_vbase_types): Change calls to make_binfo.
4766 (get_vbase_types): Remove dead code.
4767 * tree.c (unshare_base_binfos): Change calls to make_binfo.
4768 (layout_basetypes): Warn here about inaccessible bases.
4769 (make_binfo): Remove chain parameter.
4770 (reverse_path): Add copy parameter.
4772 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
4774 * class.c: #if 0 complete_type_p.
4775 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
4776 * method.c (process_overload_item): Likewise.
4777 * typeck.c (comp_target_types): Likewise.
4779 Stop sharing binfos for indirect virtual bases.
4780 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
4781 (layout_basetypes): Likewise.
4782 (unshare_base_binfos): Copy vbases, too.
4783 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
4784 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
4785 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
4786 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
4787 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
4788 reference to BINFO_VIA_PUBLIC.
4789 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
4790 (push_class_decls): Use them.
4791 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
4792 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
4794 1998-08-27 Mark Mitchell <mark@markmitchell.com>
4796 * decl.c (build_enumerator): Set DECL_CONTEXT for the
4799 1998-08-26 Mark Mitchell <mark@markmitchell.com>
4801 * cp-tree.h (finish_enum): Change prototype.
4802 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
4803 VALUES parameter. Don't try to compute mins/maxs if
4804 processing_template_decl.
4805 * parse.y (structsp): Use new calling sequence for finish_enum.
4806 * pt.c (tsubst_enum): Likewise. Take the new type as input.
4807 (lookup_template_class): Remove unused variables. Tweak.
4808 Register enums on instantiation list before substituting
4809 enumeration constants.
4810 (tsubst_decl): Remove unused variables.
4811 (regenerate_decl_from_template): Likewise.
4813 * decl.c (duplicate_decls): Don't obliterate the
4814 DECL_TEMPLATE_INFO for a template if we're not replacing it with
4817 * lex.c (do_identifier): Fix typo in comment.
4819 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4821 * errfn.c: Remove stdarg.h/varargs.h.
4824 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
4826 * pt.c (tsubst_copy): Only do typename overloading on an
4827 IDENTIFIER_NODE that happens to look like a typename if it actually
4828 has a type for us to use.
4830 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
4832 * typeck.c (comp_cv_target_types): Split out...
4833 (comp_target_types): From here. Don't allow cv-qual changes under
4834 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
4835 (build_ptrmemfunc): Pass 1 to nptrs.
4836 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
4838 1998-08-25 Mark Mitchell <mark@markmitchell.com>
4840 * search.c (dependent_base_p): Don't compare a binfo to
4841 current_class_type; use the TREE_TYPE of the binfo instead.
4843 * cp-tree.h (CLASS_TYPE_P): Revise definition.
4845 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
4847 * decl.c (duplicate_decls): Don't complain about different
4848 exceptions from an internal decl even if pedantic.
4850 * typeck.c (convert_for_assignment): Converting from pm of vbase
4851 to derived is an error, not a sorry.
4853 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
4854 * class.c (fixed_type_or_null): Rename from
4855 resolves_to_fixed_type_p. Return the dynamic type of the
4856 expression, if fixed, or null.
4857 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
4858 does not match the static type.
4859 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
4860 resolves_to_fixed_type_p again.
4862 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4864 * pt.c (tsubst_decl): Move special case code for dealing with
4865 tricky friend templates here from ...
4866 (regenerate_decl_from_template): Here.
4868 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4870 * decl.c (start_decl): Remove redundant linkage check.
4872 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
4874 * typeck.c (c_expand_return): Handle the case that valtype
4875 is wider than the functions return type.
4877 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4879 * cp-tree.h (CLASS_TYPE_P): New macro.
4880 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
4881 * pt.c (process_template_parm): Undo previous change.
4883 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
4885 * cp-tree.h: Declare.
4886 * pt.c (decl_template_parm_p): New function.
4887 * decl.c (pushdecl): Check decls for redeclaring template parms.
4888 (xref_tag): Make redeclaration an error, print decl.
4889 * decl2.c (grokfield): Check field_decls for redeclaration as well.
4891 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4893 * parse.y (primary): Fix up the type of string constants.
4895 1998-08-24 Mark Mitchell <mark@markmitchell.com>
4897 * typeck.c (convert_for_initialization): Move check for odd uses
4898 of NULL to avoid duplicate warnings.
4900 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
4902 * tree.c (lvalue_type): Fix for arrays.
4903 * typeck.c (string_conv_p): New fn.
4904 (convert_for_assignment): Use it.
4905 (build_unary_op): Use lvalue_type.
4906 * call.c (standard_conversion, convert_like): Use string_conv_p.
4907 (add_function_candidate): Use lvalue_type.
4908 * cvt.c (convert_to_reference): Likewise.
4909 * decl2.c (lang_decode_option): Ignore -traditional.
4910 * decl.c (init_decl_processing): flag_writable_strings inhibits
4913 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
4915 * lang-options.h (lang_options): Add fconst-strings to the list
4917 * decl2.c (lang_f_options, lang_decode_option): Likewise.
4919 1998-08-24 Nathan Sidwell <nathan@acm.org>
4921 * lex.c (real_yylex): Don't warn about long long constants if
4922 we're allowing long long.
4924 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4926 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
4927 accessing bindings directly.
4929 * search.c (my_tree_cons): Reimplement.
4931 * lang-specs.h: Remove __HONOR_STD.
4932 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
4934 1998-08-23 Mark Mitchell <mark@markmitchell.com>
4936 * decl.c (grokdeclarator): Complain about in-class initialization
4937 of aggregates and/or references.
4938 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
4939 TEMPLATE_TYPE_PARMs.
4941 * decl2.c (grok_array_decl): Add comment.
4942 (mark_used): Don't instantiate an explicit instantiation.
4943 * friend.c (make_friend_class): Remove bogus comment. Fix check
4944 for partial specializations.
4945 * pt.c (check_explicit_specialization): Don't
4946 SET_DECL_EXPLICIT_INSTANTIATION here.
4947 (mark_decl_instantiated): Or here.
4948 (do_decl_instantiation): Do it here, instead. Add checks for
4949 duplicate explicit instantiations, etc. Tidy.
4950 (do_type_instantiation): Likewise.
4951 (instantiate_decl): Improve comments. Complain about explicit
4952 instantiations where no definition is available.
4954 * cp-tree.h (ansi_null_node): Remove.
4955 * call.c (build_over_call): Warn about converting NULL to an
4957 * cvt.c (build_expr_type_conversion): Likewise. Use
4958 null_ptr_cst_p instead of expanding it inline.
4959 * decl.c (ansi_null_node): Remove.
4960 (init_decl_processing): Make null_node always have integral type.
4961 * except.c (build_throw): Warn about converting NULL to an
4963 * lex.c (init_parse): Remove handling of ansi_null_node.
4964 * pt.c (type_unification_real): Don't convert NULL to void* type.
4965 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
4966 (convert_for_assignment): Warn about converting NULL to an
4968 (convert_for_initialization): Likewise.
4970 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
4972 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
4973 * pt.c (coerce_template_parms): Use no_linkage_check.
4974 * decl.c (grokvardecl): Likewise.
4975 (grokfndecl): Likewise. Members of anonymous types have no linkage.
4977 * method.c (process_overload_item): Remove useless code.
4979 1998-08-20 Per Bothner <bothner@cygnus.com>
4981 Handle new'ing of Java classes.
4982 * init.c (build_class_classref): New function.
4983 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
4984 constructor does not return this; don't need to exception-protect.
4986 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
4987 * decl2.c (acceptable_java_type): Handle template-derived types.
4989 1998-08-20 Per Bothner <bothner@cygnus.com>
4991 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
4993 1998-08-20 Mark Mitchell <mark@markmitchell.com>
4995 * decl.c (duplicate_decls): Always merge the old and new patterns
4996 for templates, regardless of whether or not the new one has
4997 DECL_INITIAL. Don't throw away specializations. Merge
4999 * pt.c (tsubst_decl): Use the right pattern when calculating the
5000 complete args for a new template instance.
5001 (do_decl_instantiation): Fix typo in comment.
5002 (regenerate_decl_from_template): Deal with tricky friend template
5004 (instantiate_decl): Likewise.
5006 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
5008 * init.c (build_builtin_delete_call): Add missing assemble_external
5011 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
5013 * parse.y (notype_unqualified_id): Also accept ~A<int>.
5015 1998-08-19 Mark Mitchell <mark@markmitchell.com>
5017 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
5019 * except.c (build_throw): Warn when NULL is thrown, even with
5020 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
5023 * cp-tree.h (ansi_null_node): New variable.
5024 * decl.c (ansi_null_node): New variable.
5025 (init_decl_processing): Initialize its type.
5026 * lex.c (init_parse): Initialize its value. Use ansi_null_node
5027 for null_node in non-ANSI mode.
5028 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
5029 place of null_node to avoid spurious errors.
5031 1998-08-17 Mark Mitchell <mark@markmitchell.com>
5033 * cp-tree.h (enter_scope_of): New function.
5034 * parse.y (complex_direct_notype_declarator): Use it.
5035 * semantics.c (enter_scope_of): New function.
5037 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
5039 * decl.c (grokparms): No, here.
5041 * decl.c (grokdeclarator): Catch parm with pointer to array of
5042 unknown bound here...
5043 * method.c (process_overload_item): ...not here.
5045 * gxxint.texi: Remove obsolete documentation of overloading code.
5047 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
5048 * class.c (finish_struct_bits): Likewise.
5050 * tree.c (lvalue_type): Fix for arrays.
5051 * typeck.c (build_unary_op): Use lvalue_type.
5052 * call.c (add_function_candidate): Likewise.
5053 * cvt.c (convert_to_reference): Likewise.
5055 * decl2.c (lang_decode_option): Ignore -traditional.
5057 * init.c (build_offset_ref): Don't mess with error_mark_node.
5058 * lex.c (do_scoped_id): Use cp_error.
5060 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
5062 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
5064 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
5066 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
5068 * cp-tree.h (set_identifier_local_value): Provide prototype.
5070 * decl2.c (do_namespace_alias): Remove unused variables `binding'
5073 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
5075 * Makefile.in: Rename BBISON to BISON so that it can be properly
5076 inherited from the parent makefile.
5078 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
5080 * lang-options.h: Add -finit-priority.
5081 * decl2.c: Likewise. Check flag_init_priority instead of
5084 * decl2.c (setup_initp): New fn.
5085 (start_objects, finish_objects, do_ctors): Handle init_priority.
5086 (do_dtors, finish_file): Likewise.
5088 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
5090 * pt.c (tsubst_copy): Hush warning.
5092 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
5094 1998-08-12 Mark Mitchell <mark@markmitchell.com>
5096 * pt.c (print_template_context): Don't abort when instantiating a
5099 * decl.c (grokdeclarator): Issue errors on namespace qualified
5100 declarators in parameter lists or in class scope.
5102 1998-08-09 Mark Mitchell <mark@markmitchell.com>
5104 * pt.c (check_explicit_specialization): Don't abort on bogus
5105 explicit instantiations.
5107 1998-08-07 Mark Mitchell <mark@markmitchell.com>
5109 * typeck.c (require_complete_type): Use complete_type_or_else.
5110 (complete_type_or_else): Always return NULL_TREE on failure, as
5113 * pt.c (tsubst_aggr_type): Prototype.
5114 (tsubst_decl): New function, split out from tsubst. Set
5115 input_filename and lineno as appropriate.
5116 (pop_tinst_level): Restore the file and line number saved in
5118 (instantiate_class_template): Set input_filename and lineno as
5120 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
5121 context for a TYPENAME_TYPE is complete.
5123 * decl2.c (grokbitfield): Issue errors on bitfields declared with
5125 (do_dtors): As in do_ctors, pretend to be a member of the same
5126 class as a static data member while generating a call to its
5129 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
5130 conversions, even in complex virtual base class hierarchies.
5132 1998-08-06 Mark Mitchell <mark@markmitchell.com>
5134 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
5135 (TYPE_TEMPLATE_INFO): Likewise.
5136 (SET_TYPE_TEMPLATE_INFO): Likewise.
5137 (ENUM_TI_TEMPLATE): Likewise.
5138 (ENUM_TI_ARGS): Likewise.
5139 (lookup_nested_type_by_name): Remove.
5140 * decl.c (maybe_process_template_type_declaration): Handle enums.
5141 (start_enum): Don't check for primary-template enum declarations
5143 (finish_enum): Clean up, document. Make sure template enum
5144 constants get the correct type.
5145 (build_enumerator): Copy initializers for template enumerations,
5147 (grok_enum_decls): Document.
5148 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
5149 better. Build LOOKUP_EXPRs for local variables, even if they are
5151 * pt.c (tsubst_enum): Remove field_chain parameter.
5152 (template_class_depth): Include the depth of surrounding function
5154 (push_template_decl): Check for primary-template enum declarations
5155 here. Deal with enumeration templates.
5156 (lookup_template_class): Likewise.
5157 (for_each_template_parm): Likewise.
5158 (instantiate_class_template): Don't call tsubst_enum directly,
5159 call tsubst instead, to instantiate enums. Deal with all
5160 field_chain issues here, not in tsubst_enum.
5161 (lookup_nested_type_by_name): Remove.
5162 (tsubst_aggr_type): Revise handling of enumeration types.
5164 (tsubst_copy): Likewise.
5165 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
5167 1998-08-04 Mark Mitchell <mark@markmitchell.com>
5169 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
5170 uses template parameters.
5171 * method.c (build_template_parm_names): Use the full set of
5172 template arguments for tsubst'ing.
5173 (build_overload_identifier): Pass the full set of template
5174 arguments to build_template_parm_names, not just the
5176 * pt.c (TMPL_ARGS_DEPTH): Define using
5177 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
5178 (NUM_TMPL_ARGS): New macro.
5179 (add_outermost_template_args): Deal with the case where the outer
5180 args will be completely discarded.
5181 (coerce_template_parms): Use the full set of template arguments
5182 for tsubst'ing. Simplify. Add some asserts. Improve
5184 (lookup_template_class): Pass the full set of template arguments
5185 to coerce_template_parms.
5186 (tsubst): Add assertion.
5187 (do_type_instantiation): Don't instantiate member template
5190 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
5191 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
5193 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
5195 * method.c (set_mangled_name_for_decl): Change return type to void.
5197 * decl.c (lookup_name_real): A namespace-level decl takes priority
5198 over implicit typename. Avoid doing the same lookup twice.
5200 * search.c (dependent_base_p): New fn.
5201 (dfs_pushdecls, dfs_compress_decls): Use it.
5203 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
5204 virtual functions if the type doesn't have any.
5206 1998-08-03 Mark Mitchell <mark@markmitchell.com>
5208 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
5209 uses template parameters.
5211 1998-08-02 Mark Mitchell <mark@markmitchell.com>
5213 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
5214 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
5215 * lex.c (do_identifier): Don't use a second argument, or a type,
5216 when building LOOKUP_EXPRs.
5217 (do_identifier): Likewise.
5218 (do_scoped_id): Likewise.
5219 * method.c (hack_identifier): Improve error message.
5220 * pt.c (lookup_template_function): Don't needlessly call
5221 copy_to_permanent or build_min.
5222 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
5224 (do_decl_instantiation): Improve error message.
5225 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
5226 (build_min): Copy the type to the permanent obstack, too.
5228 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
5230 * init.c (init_init_processing): Remove BI* handling.
5231 (build_builtin_call): Remove.
5232 (build_builtin_delete_call): New fn.
5233 (build_delete): Use it.
5235 1998-07-31 Mark Mitchell <mark@markmitchell.com>
5237 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
5238 (maybe_check_template_type): New function.
5239 * decl.c (maybe_process_template_type_declaration): New function,
5240 split out from pushtag Call maybe_check_template_type.
5241 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
5242 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
5243 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
5244 * pt.c (template_class_depth_real): Generalization of ...
5245 (template_class_depth): Use it.
5246 (register_specialization): Use duplicate_decls for duplicate
5247 declarations of specializations.
5248 (maybe_check_template_type): New function.
5249 (push_template_decl_real): Fix comment.
5250 (convert_nontype_argument): Likewise.
5251 (lookup_template_class): Likewise. Avoid an infinite loop on
5253 (tsubst_friend_function): Fix comment.
5254 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
5256 * semantics.c (begin_function_definition): Use
5257 reset_specialization to note that template headers don't apply
5258 directly to declarations after the opening curly for a function.
5260 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
5262 * decl.c (push_overloaded_decl): Use current_namespace instead of
5263 DECL_CONTEXT (decl) to determine where we go.
5265 * decl.c (lookup_name_real): Fix typo.
5267 1998-07-28 Mark Mitchell <mark@markmitchell.com>
5269 * friend.c (is_friend): Be lenient with member functions to deal
5270 with nested friends.
5272 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
5274 * class.c (finish_struct_1): Convert integer_zero_node to
5275 ssizetype before passing it to set_rtti_entry.
5276 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
5277 of any size to a pointer.
5279 1998-07-27 Mark Mitchell <mark@markmitchell.com>
5281 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
5282 (build_template_decl_overload): Remove.
5283 (set_mangled_name_for_decl): New function.
5284 (innermost_args): Remove is_spec parameter.
5285 (most_specialized, most_specialized_class): Remove declarations.
5286 (lookup_template_class): Add entering_scope parameter.
5287 (maybe_process_partial_specialization): New function.
5288 (finish_template_decl): Likewise.
5289 (finish_template_type): Likewise.
5290 * class.c (finish_struct): Clean up processing of member template
5292 * decl.c (pushtag): Fix formatting.
5293 (lookup_tag): Improve handling of pseudo-global levels.
5294 (make_typename_type): Adjust call to lookup_template_class.
5295 (shadow_tag): Use maybe_process_partial_specialization.
5296 (xref_tag): Improve handling of member friends.
5297 (start_function): Call push_nested_class before
5298 push_template_decl. Don't call push_template_decl for
5300 * decl2.c (grok_x_components): Don't call xref_tag for
5301 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
5302 (grokclassfn): Use set_mangled_name_for_decl.
5303 (arg_assoc_class): Adjust call to innermost_args.
5304 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
5305 * error.c (dump_function_name): Improve printing of template
5307 * friend.c (is_friend): Don't compare types of decls to determine
5308 friendship, unless flag_guiding_decls.
5309 (make_friend_class): Partial specializations cannot be friends.
5310 (do_friend): Use set_mangled_name_for_decl. Call
5311 push_template_decl_real instead of push_template_decl.
5312 * method.c (build_decl_overload_real): Remove prototype. Give it
5314 (build_overload_identififer): Adjust call to innermost_args.
5315 (build_template_decl_overload): Remove.
5316 (set_mangled_name_for_decl): New function.
5317 * parse.y (.finish_template_type): New non-terminal.
5318 (template_def): Use finish_template_decl. Use template_extdef
5320 (template_extdef, template_datadef): New non-terminals, containing
5321 only those rules for things which can be templates.
5323 (template_type, self_template_type): Use .finish_template_type.
5324 (named_class_head): Use maybe_process_partial_specialization.
5325 * pt.c (mangle_class_name_for_template): Remove context parameter.
5326 (get_class_bindings): Remove outer_args parameter.
5327 (complete_template_args): Remove.
5328 (add_outermost_template_args): New function.
5329 (register_specialization): Return the specialization.
5330 (unregister_specialization): New function.
5331 (tsubst_template_parms): Likewise.
5332 (most_specialized, most_specialized_class): Prototype here as
5334 (original_template): Rename to most_general_template.
5335 (tsubst_template_parms): New function.
5336 (set_mangled_name_for_template_decl): Likewise.
5337 (TMPL_ARGS_DEPTH): New macro.
5338 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
5339 (TMPL_ARGS_LEVEL): New macro.
5340 (SET_TMPL_ARGS_LEVEL): Likewise.
5341 (TMPL_ARG): Likewise.
5342 (SET_TMPL_ARG): Likewise.
5343 (TMPL_ARGS_DEPTH): Likewise.
5344 (finish_member_template_decl): Use finish_template_decl.
5345 (maybe_process_partial_specialization): New function, split out
5347 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
5348 (maybe_begin_member_template_processing): Use new macros.
5349 (is_member_template): Likewise.
5350 (is_member_template_class): Likewise.
5351 (add_to_template_args): Likewise. Deal with multiple levels of
5353 (maybe_process_partial_specialization): New function.
5354 (retrieve_specialization): Add consistency check.
5355 (determine_specialization): Return full argument list.
5356 (check_explicit_specialization): Tweak friend handling. Use full
5357 argument lists. Simplify.
5358 (current_template_args): Use new macros.
5359 (push_template_decl_real): Change ill-named mainargs to specargs.
5360 Check that a partial specialization actually specializes at least
5361 one parameter. Improve friend handling. Modify for full
5363 (classtype_mangled_name): Don't mangle the names of
5365 (lookup_template_class): Add entering_scope parameter. Use it to
5366 avoid finding a template type when an instantiation is required.
5367 Simplify. Use full template arguments.
5368 (tsubst_friend_function): Use unregister_specialization. Use new
5369 macros. Use full template arguments.
5370 (tsubst_friend_class): Substitute, using tsubst_template_parms,
5371 into the template parameters before passing them to
5372 redeclare_class_template.
5373 (instantiate_class_template): Simplify. Use full template
5374 arguments. Adjust calls to get_class_bindings. Use
5375 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
5376 (innermost_args): Use new macros.
5377 (tsubst_aggr_type): New function, split out from tsubst.
5378 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
5379 conventions for lookup_template_class. Refine handling of partial
5380 instantiations. Remove calls to complete_template_args.
5381 Simplify. Add consistency checks. Use set_mangled_name_for_decl
5382 and set_mangled_name_for_template_decl.
5383 (tsubst_copy): Use tsubst_aggr_type.
5384 (instantiate_template): Use full template arguments.
5385 (more_specialized): Improve formatting.
5386 (more_specialized_class): Adjust calls to get_class_bindings.
5387 (get_bindings_real): Don't call complete_template_args.
5388 (most_specialized): Don't overwrite input; create a new list.
5389 (most_specialized_class): Use most_general_template.
5390 (regenerate_decl_from_template): Use unregister_specialization.
5391 Use full template arguments.
5392 (instantiate_decl): Use full template arguments.
5393 (set_mangled_name_for_template_decl): New function.
5394 * semantics.c (begin_class_definition): Use
5395 maybe_process_partial_specialization.
5396 (finish_member_class_template): New function.
5397 (finish_template_decl): Likewise.
5398 (finish_template_type): Likewise.
5399 (typeck.c): Don't crash after issuing a compiler_error.
5400 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
5402 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
5404 * typeck2.c (build_functional_cast): Handle default-initialization.
5406 * call.c (build_over_call): Pass 1 to popclass.
5408 * parse.y (direct_notype_declarator): Add precedence declaration
5409 to notype_unqualified_id case.
5410 * Makefile.in (EXPECT): Adjust.
5412 * tree.c (ovl_member): Fix for single function in OVL.
5414 1998-07-27 Dave Brolley <brolley@cygnus.com>
5416 * c-lex.c (yylex): Fix boundary conditions in character literal and
5417 string literal loops.
5419 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
5421 * decl.c (lookup_name_real): OK, do return the from_obj value
5422 unless got_object depends on template parms.
5424 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
5426 * pt.c (coerce_template_parms): Also complain about local enums.
5428 * cp-tree.h: Add prototype for set_identifier_local_value.
5429 * decl.c (set_identifier_local_value_with_scope): Make static,
5431 * search.c (covariant_return_p): Likewise.
5432 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
5434 * call.c (build_method_call): Only pull out the type of a destructor
5435 if it's a template type parm.
5436 * decl.c (lookup_name_real): Never return the from_obj value.
5438 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
5440 * except.c (process_start_catch_block_old): Call start_decl_1 for
5442 * decl.c (start_decl_1): Avoid duplicate error.
5444 * init.c (expand_default_init): Only perform the initialization if
5445 it will do something.
5447 1998-07-23 H.J. Lu (hjl@gnu.org)
5449 * parse.y (base_class): Check for invalid base class.
5451 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
5453 * decl2.c (import_export_template): Fold in...
5454 (import_export_class): ...to here. Handle dllimport/export.
5456 * class.c (build_vtable): Pass at_eof to import_export_vtable.
5457 (prepare_fresh_vtable): Likewise.
5458 * decl2.c (import_export_class): Split out...
5459 (finish_prevtable_vardecl): From here.
5460 * class.c (finish_struct_1): Call import_export_class if at_eof.
5462 * decl.c (start_function): #if 0 mysterious code I wrote and have
5464 * rtti.c (get_tinfo_fn): If this is for a class type, set
5467 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
5469 * inc/exception: Change terminate and unexpected to ().
5471 * parse.y (named_class_head_sans_basetype_defn): A
5472 named_class_head_sans_basetype followed by '{' or ':' is a defn.
5474 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
5476 * tree.c (canonical_type_variant): New fn to handle arrays.
5477 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
5478 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
5479 * method.c (process_overload_item): Use build_overload_value for
5482 1998-07-20 Dave Brolley <brolley@cygnus.com>
5484 * lex.c (mbchar.h): #include it.
5485 (GET_ENVIRONMENT): New macro.
5486 (init_parse): Set character set based on LANG environment variable.
5487 (real_yylex): Handle multibyte characters in character literals.
5488 (real_yylex): Handle multibyte characters in string literals.
5490 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
5492 * lex.c (do_identifier): Look for class value even if we don't
5493 have a global value. Do implicit declaration if parsing is 2.
5494 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
5497 1998-07-19 Mark Mitchell <mark@markmitchell.com>
5499 * decl.c (pushtag): Revert previous change.
5500 * pt.c (lookup_template_class): Don't put out debugging
5501 information for types that use template parameters.
5503 * decl.c (pushtag): Don't put out debugging information for
5504 compiler-generated typedefs.
5506 * error.c (dump_type_real): Don't crash when presented with
5507 intQI_type_node or the like.
5509 * semantics.c (finish_translation_unit): Fix spelling error in
5512 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
5514 * decl.c (lookup_name_real): Pull out single function here.
5515 (select_decl): Not here.
5516 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
5518 * decl.c (qualify_lookup): Tweak again.
5520 * pt.c (lookup_template_class): Don't mess with the context of the
5522 * decl2.c (current_decl_namespace): Remove special handling for
5525 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
5526 a member template specialization.
5528 * tree.c (ovl_member): Use decls_match to compare functions.
5529 * decl.c (decls_match): Check the context of a function.
5531 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
5532 in Koenig lookup support rules.
5533 * semantics.c (finish_call_expr): Handle the new cases.
5535 * typeck.c (build_x_function_call): Handle overloaded methods.
5537 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
5539 1998-07-16 Mark Mitchell <mark@markmitchell.com>
5541 * semantics.c (finish_object_call_expr): Revert previous change.
5542 * call.c (build_new_method_call): Likewise. Instead, convert
5543 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
5545 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
5547 * decl.c (qualify_lookup): Handle templates.
5549 * decl2.c (do_using_directive): Don't pass ancestor.
5550 * decl.c (push_using_directive): Calculate ancestor.
5552 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
5553 * decl.c (pushdecl): Move type shadowing handling from here...
5554 (duplicate_decls): ...to here.
5555 * decl.c (set_identifier_local_value_with_scope): New fn.
5557 (set_identifier_local_value, lookup_type_current_level): New fns.
5558 * decl2.c (do_local_using_decl): Handle types and binding level
5561 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
5562 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
5563 (lookup_namespace_name): Likewise.
5564 * typeck.c (build_unary_op): Not here anymore.
5566 * decl2.c (do_class_using_decl): Make sure we get an identifier.
5567 * class.c (handle_using_decl): Ignore TYPE_DECLs.
5569 * decl.c (qualify_lookup): New fn.
5570 (lookup_name_real): Use it.
5572 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5574 * decl2.c (add_using_namespace): When directly using a namespace
5575 that was indirect before, promote it.
5577 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
5578 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
5579 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
5580 * decl.c (select_decl): Replace two flag parameters by one.
5581 (unqualified_namespace_lookup): Likewise, pass flag.
5582 (lookup_flags): New function.
5583 (lookup_name_real): Compute flags, pass them.
5584 (lookup_namespace_name): Call with zero-flag.
5585 * decl2.c (ambiguous_decl): Add flag parameter, complain only
5587 (lookup_using_namespace, qualified_lookup_using_namespace):
5588 Add flag parameter, pass them through.
5589 * lex.c (do_scoped_id): Call with zero-flag.
5591 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
5593 * typeck.c (convert_for_assignment): Use comptypes.
5595 1998-07-16 Mark Mitchell <mark@markmitchell.com>
5597 * semantics.c (finish_object_call_expr): Move test for the
5598 function called being a TYPE_DECL to ...
5599 * call.c (build_new_method_call): Here.
5601 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
5603 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
5604 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
5606 * lex.c (looking_for_typename): Don't initialize.
5608 * decl2.c (ambiguous_decl): Clarify error message.
5610 * decl.c (push_using_directive): Iterate over namespaces used
5613 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5615 * decl2.c (add_using_namespace): Iterate over namespaces used
5618 * decl.c (lookup_name_real): Accept namespace aliases as locals.
5619 (cat_namespace_levels): Ignore aliases.
5620 (duplicate_decls): Ignore duplicate aliases.
5621 * decl2.c (do_namespace_alias): Process block level namespace
5622 aliases. Store alias with pushdecl. Remove odr errors.
5623 * parse.y (namespace_alias): New non-terminal.
5626 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
5628 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
5629 Handle TEMPLATE_TYPE_PARM.
5630 (arg_assoc): Rewrite.
5632 * pt.c (complete_template_args): Don't look at the context unless
5635 * method.c (build_decl_overload_real): Fix namespace handling.
5637 * typeck.c (build_unary_op): Extract a lone function from an
5640 * call.c (build_scoped_method_call): Handle getting a namespace
5641 for basetype in a destructor call.
5642 (check_dtor_name): Handle enums.
5644 * parse.y (using_directive): New nonterminal.
5645 (extdef, simple_stmt): Use it.
5647 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5649 * decl2.c (add_function): Move error message ...
5650 (arg_assoc_namespace): ... from here.
5652 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
5654 * parse.y (namespace_qualifier): Fix multiple level handling.
5655 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
5656 (arg_assoc): Don't skip the first argument of a function.
5658 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
5660 * search.c (my_tree_cons): Clean up.
5662 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
5664 * call.c (joust): Don't warn about "confusing" conversions to the
5667 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
5669 * class.c (push_nested_class): Complain about namespaces.
5670 * decl.c (start_decl): Enter the object's namespace.
5671 (cp_finish_decl): Leave it.
5672 (grokdeclarator): Likewise.
5673 * decl2.c (check_decl_namespace): New function.
5674 (finish_file): Call it.
5675 * parse.y (complex_direct_notype_declarator): Set complexity
5676 of namespace-qualified ids to -1, enter the namespace.
5678 * method.c (build_template_decl_overload): Expect _DECL as first
5679 parameter. Put context temporarily into current_namespace.
5680 * pt.c (check_explicit_specialization): Change caller.
5683 * init.c (build_offset_ref): Call mark_used and
5684 convert_from_reference for namespace members.
5686 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
5688 * search.c (my_tree_cons): The bitfield is at index 2.
5690 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
5692 * lang-options.h: Format changed to work with new --help support
5695 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
5697 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
5698 Do Koenig lookup in CALL_EXPR.
5699 (arg_assoc): Handle error_mark.
5700 * lex.c (is_global): New function.
5701 (do_identifier): Expect arguments for Koenig lookup.
5702 * parse.y (primary): Add rules for calls of unqualified function calls.
5703 (do_id): Change call of do_identifier.
5704 * pt.c (finish_stmt_expr): Likewise.
5705 * semantics.c (finish_id_expr): Likewise.
5706 (finish_call_expr): Add integer parameter to indicate
5707 argument-dependent lookup.
5709 * decl.c (struct binding_level): New field using_directives.
5710 (push_using_decl): Not sorry anymore.
5711 (push_using_directive): New function.
5712 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
5713 (unqualified_namespace_lookup): New function, code from ...
5714 (lookup_name_real): ... here.
5715 * decl2.c (lookup_using_namespace): Pass using list instead of
5717 (validate_nonmember_using_decl): New function.
5718 (do_nonmember_using_decl): New function.
5719 (do_toplevel_using_decl): Use them.
5720 (do_local_using_decl): New function.
5721 (do_using_directive): Support block-level directives.
5722 * parse.y (simple_stmt): Support using declarations and
5724 (namespace_qualifier, namespace_using_decl): New non-terminals.
5726 * xref.c (classname): New function.
5727 (GNU_xref_hier): Change class and base parameters to tree.
5728 * decl.c (xref_baseypes): Change caller.
5729 * friend.c (make_friend_class): Likewise.
5731 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5733 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
5736 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
5737 template template parameter, record its use.
5738 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
5739 its template arguments if exists.
5741 * pt.c (coerce_template_template_parms): New function equivalent
5742 to coerce_template_parms when IS_TMPL_PARM is true.
5743 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
5744 all callers changed.
5746 (coerce_template_parms): Access ARGLIST properly when creating a
5747 new vector. Only accept implicit TYPE_DECL as valid argument for
5748 a template template parameter when it is a base class of
5749 current_class_type. Don't display error message when COMPLAIN is
5752 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
5754 * repo.c (get_base_filename): Use file_name_nondirectory.
5755 (open_repo_file): Likewise.
5756 * cp-tree.h (file_name_nondirectory): Add prototype.
5758 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
5760 * friend.c (do_friend): Pull the identifier out of declarator.
5761 Use cp_error and friends.
5762 * decl2.c (qualified_lookup_using_namespace): Fix call to
5764 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
5765 (grokvardecl): Use DECL_CLASS_SCOPE_P.
5766 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
5767 * class.c (warn_hidden): Fix for OVERLOAD.
5768 From grahams@rcp.co.uk:
5769 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
5770 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
5772 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
5774 * g++.1 (-traditional): Remove duplicated documentation.
5776 1998-07-11 Mark Mitchell <mark@markmitchell.com>
5778 * method.c (flush_repeats): Add nrepeats parameter.
5779 (issue_nrepeats): Likewise.
5780 (is_back_referenceable_type): New function. Don't back-reference
5781 TEMPLATE_TYPE_PARMs as well as simple types like integers.
5782 (build_mangled_name_for_type): Likewise.
5783 (build_mangled_name_for_type_with_Gcode): Likewise.
5785 (nrepeats): Likewise.
5786 (Nrepeats): Likewise.
5787 (start_squangling): Don't clear the variables removed above.
5788 (end_squangling): Likewise.
5789 (flush_repeats): Tidy. Use nrepeats parameter rather than
5791 (issue_nrepeats): Likewise, but with nrepeats global. Use
5792 is_backreferenceable_type.
5793 (build_overload_nested_name): Tidy. Add comment. Use
5794 build_mangled_name_for_type.
5795 (build_underscore_int): Comment.
5796 (build_overload_scope_ref): Use build_mangled_name_for_type.
5797 (build_overload_int): Likewise.
5798 (build_template_template_parm_names): Tidy.
5799 (build_template_parm_names): Use build_mangled_name_for_type.
5800 (build_overload_identifier): Add comments.
5801 (build_mangled_name_for_type_with_Gcode): Split out from
5803 (build_mangled_name_for_type): Use it.
5804 (build_mangled_name): Rework to use build_mangled_name_for_type
5805 and to not use global nrepeats/Nrepeats. Tidy.
5806 (process_modifiers): Tidy.
5807 (check_btype): Use is_backreferenceable_type. Add comment.
5808 Rename `node' to `type'.
5809 (process_overload_item): Set numeric_output_need_bar here.
5810 Use build_mangled_name_for_type. Tidy.
5811 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
5812 build_mangled_name_for_type.
5814 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
5817 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
5819 * cp-tree.h (warn_long_long): Define.
5820 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
5821 warning "ANSI C++ does not support `long long'".
5822 * decl2.c (warn_long_long): Define.
5823 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
5825 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
5827 * decl.c (xref_tag): Handle attributes between 'class' and name.
5828 * parse.y (aggr): Likewise.
5829 * semantics.c (finish_class_definition): Likewise.
5830 * Makefile.in (EXPECTED): Adjust.
5832 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
5833 * decl2.c: Define them.
5834 (lang_decode_option): Handle them.
5835 * lang-options.h: Add -foptional-diags.
5836 * class.c (finish_struct): Don't complain about multiple meanings of
5837 name if -fno-optional-diags.
5838 * decl.c (pushdecl_class_level): Likewise.
5839 * lex.c (real_yylex): Check warn_multichar.
5841 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
5843 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
5845 * tree.c (make_binfo): Fix length.
5847 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
5849 * decl2.c (lang_decode_option): Remove warn_template_debugging.
5850 * lang-options.h: Likewise.
5852 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5854 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
5855 (process_start_catch_block): Likewise for variables
5856 `false_label_rtx', `call_rtx' and `return_value_rtx'.
5858 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
5860 * tree.c (build_srcloc): Make sure we allocate this node on the
5863 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
5865 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
5866 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
5867 (lang_specific_driver): Only add -lm automatically if need_math is
5870 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
5872 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
5874 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5876 * Makefile.in (EXPR_H): New dependency variable.
5877 (decl2.o): Depend on $(EXPR_H).
5878 (typeck.o): Likewise.
5882 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
5884 * decl.c (start_enum): Put local enums on permanent_obstack.
5886 1998-06-25 Mark Mitchell <mark@markmitchell.com>
5888 * cp-tree.h (c_get_alias_set): Declare.
5889 * decl.c (init_decl_processing): Set lang_get_alias_set.
5891 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
5893 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
5894 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
5895 flag for all function decls which are in the exception table.
5896 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
5897 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
5898 code is emitted for any referenced rtti function.
5900 1998-06-25 Dave Brolley <brolley@cygnus.com>
5902 * lang-specs.h: Use new | syntax to eliminate
5903 string concatenation.
5905 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
5907 * cp-tree.h (CP_DECL_CONTEXT): New macro.
5908 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
5909 * method.c (build_overload_nested_name): Likewise.
5910 * sig.c (build_signature_pointer_or_reference_type): Don't set
5913 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5915 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
5916 * cp-tree.h (FROB_CONTEXT): New macro.
5917 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
5918 * decl.c (namespace_binding): Replace NULL_TREE with
5920 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
5921 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
5923 * decl.c (pushtag): Use FROB_CONTEXT.
5924 (pushdecl, make_typename_type, define_function, grokdeclarator):
5926 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
5927 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
5929 * decl2.c (decl_namespace): Return global_namespace if no context.
5930 * method.c (build_overload_nested_name): Expect null as context.
5931 * pt.c (mangle_class_name_for_template): Do nothing for null
5933 (lookup_template_class): Allow for null id_context.
5935 1998-06-25 Richard Henderson <rth@cygnus.com>
5937 * method.c (emit_thunk): Set current_function_is_thunk for the
5938 ASM_OUTPUT_MI_THUNK case as well.
5940 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
5942 * exception.cc (__cplus_type_matcher): Get a match_info pointer
5943 instead of an exception table entry as a parameter.
5945 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
5947 * parse.y (function_try_block): Don't call start_catch_handler.
5948 * except.c (call_eh_info): Remove coerced field from declaration.
5949 (build_eh_type_type_ref): New function to create an address of a
5950 rtti function for the new style exception tables.
5951 (expand_start_catch_block): Split function, this contains the
5953 (process_start_catch_block_old): New function to perform the rest
5954 of expand_start_catch_block under old style exceptions.
5955 (process_start_catch_block_old): New function to perform the rest
5956 of expand_start_catch_block under new style exceptions.
5957 (expand_end_catch_block): Only pop the false label off the stack under
5958 the old style of exceptions.
5959 * semantics.c (finish_try_block): Don't call start_catch_handler.
5960 * exception.cc (struct cp_eh_info): Add original_value field.
5961 (__cplus_type_matcher): Perform type matching on the original exception
5962 value, and if we have a match, set the current value.
5963 (__cp_push_exception): Set the original exception value.
5965 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
5967 * call.c (joust): Fix confusing conversion warning.
5969 * call.c (build_op_delete_call): Add placement parm. Check
5970 LOOKUP_SPECULATIVELY.
5971 * cp-tree.h, decl2.c, init.c: Adjust.
5972 * decl.c (finish_function): Use it.
5974 * pt.c (tsubst): Diagnose creating void fields or variables.
5976 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5978 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
5980 * cp-tree.h (check_dtor_name): Add prototype.
5982 * init.c (expand_member_init): Remove unused variables
5983 `ptr_type_node', `parm' and `rval'.
5985 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
5987 (lang_print_xnode): Likewise.
5989 * typeck2.c (enum_name_string): Cast argument to sprintf to long
5990 and use %ld specifier.
5992 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
5993 specifier in call to fprintf.
5994 (GNU_xref_member): Cast argument to sprintf to int.
5996 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
5998 * typeck2.c (pop_init_level): Warn about implicit zero initialization
6001 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6003 * cp-tree.h: Prototype function `check_java_method'.
6005 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
6007 * class.c (finish_struct): Make conflicting use of id a pedwarn.
6008 * decl.c (pushdecl_class_level): Likewise.
6010 1998-06-17 Mark Mitchell <mark@markmitchell.com>
6012 * pt.c (convert_nontype_argument): Issue an error when presented
6013 with an integer (real) constant that cannot be simplified to an
6016 * cp-tree.h (c_get_alias_set): Remove declaration added in
6017 1998-06-13 change that should never have been checked in.
6019 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
6021 * typeck.c (build_binary_op_nodefault): Change % in format strings
6024 * decl.c (grokvardecl): Don't build_static_name for decls that
6025 aren't at namespace scope.
6027 * init.c (perform_member_init): Catch default-initialization of
6030 1998-06-17 Mark Mitchell <mark@markmitchell.com>
6032 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
6034 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
6036 * method.c (hack_identifier): Complain about getting a namespace
6038 * typeck.c (decay_conversion): Remove check for namespaces.
6039 * typeck2.c (incomplete_type_error): Likewise.
6040 * parse.y (template_arg): Add PTYPENAME expansion.
6042 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
6044 * decl.c (grokvardecl): Don't build external assembler names for
6045 TYPENAMEs in other namespaces as there is no declarator.
6046 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
6047 info from DECL_CONTEXT if it is NULL.
6049 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
6051 * call.c (check_dtor_name): Split out.
6052 (build_scoped_method_call): Use it.
6053 (build_method_call): Use it.
6054 * init.c (build_offset_ref): Use it.
6056 * typeck.c (build_static_cast): Fix handling of pointers to members.
6058 * decl.c (finish_function): Just return nothing from a constructor.
6059 * typeck.c (c_expand_return): Complain about returning a void
6060 expression from a destructor.
6062 1998-06-13 Mark Mitchell <mark@markmitchell.com>
6064 * class.c (alter_access): Accept a BINFO explaining how to get
6065 from the entity whose accessed is being altered to the type doing
6067 (handle_using_decl): New function containing code split out from ...
6068 (finish_struct_1): Here.
6070 * cp-tree.h (complete_type_or_else): Declare.
6071 * init.c (build_new_1, build_delete): Use it.
6072 * typeck.c (require_complete_type): Use complete_type, rather than
6073 expanding it inline.
6074 (complete_type_or_else): New function.
6075 (build_component_ref): Use it.
6076 (pointer_int_sum): Make sure the type pointed to is complete.
6077 (pointer_diff): Likewise.
6079 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
6082 * search.c (get_matching_virtual): Note that member templates
6083 cannot override virtual functions.
6085 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
6087 * pt.c (check_explicit_specialization): If DECLARATOR turned into
6088 an error_mark_node from lookup_template_function, return the same.
6089 (determine_specialization): Also make sure TEMPLATE_ID isn't an
6090 error_mark_node, before we try to read its operands.
6091 * decl.c (grokdeclarator): If we got an error_mark_node from
6092 check_explicit_specialization, just return it right back.
6094 1998-06-12 Mark Mitchell <mark@markmitchell.com>
6096 * class.c (instantiate_type): Don't treat template-ids that don't
6097 specify any template arguments as equivalent to ordinary
6098 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
6099 pointer-to-members for member templates. Tidy slightly.
6100 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
6101 * init.c (build_offset_ref): Handle template-ids like ordinary
6102 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
6103 offset part of the OFFSET_REF.
6104 * typeck.c (build_unary_op): Change check for unknown types to
6105 look for OFFSET_REFs, not SCOPE_REFs.
6107 1998-06-11 Mark Mitchell <mark@markmitchell.com>
6109 * pt.c (is_member_template_class): New function.
6110 (push_template_decl_real): Use it.
6112 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
6114 * friend.c (do_friend): Add support for nested classes using
6115 member functions of the enclosing class as friends.
6117 1998-06-10 Mark Mitchell <mark@markmitchell.com>
6119 * call.c (convert_default_arg): Make global, not static.
6120 (convert_arg_for_ellipsis): Split out from ...
6121 (build_over_call): Here.
6122 * cp-tree.h (convert_default_arg); Declare.
6123 (convert_arg_to_ellipsis): Likewise.
6124 (do_member_init): Remove.
6125 * init.c (do_member_init): Remove; this code is dead.
6126 (expand_member_init): Remove much of this code; it is dead.
6127 * typeck.c (convert_arguments): Use convert_default_arg and
6128 convert_arg_for_ellipsis, rather than duplicating here.
6130 * call.c (convert_like): Don't fail silently if
6131 build_user_type_conversion fails. Always return error_mark_node
6134 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
6136 * search.c (covariant_return_p): Complain about ambiguous base.
6138 * typeck.c (build_component_ref): Diagnose ref to nested type.
6140 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
6142 * decl.c (grokparms): Check that INIT isn't an error_mark_node
6143 before giving error about invalid type for default arg.
6145 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
6147 * call.c (build_method_call): Fix thinko.
6149 1998-06-10 Dave Brolley <brolley@cygnus.com>
6151 * decl2.c (lang_decode_option): New argc/argv interface.
6152 * cp-tree.h (lang_decode_option): New argc/argv interface.
6153 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
6154 specified for cpplib-enabled compilers.
6155 * lex.c (lang_init): Don't check_newline for cpplib.
6156 (init_parse): Don't initialize cpplib here.
6158 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
6160 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
6161 piece before checking DECL_MUTABLE_P.
6163 1998-06-10 John Carr <jfc@mit.edu>
6165 * tree.c (debug_binfo): Make printf format match arguments.
6167 * error.c (OB_PUTI): Make printf format match arguments.
6169 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
6171 * init.c (perform_member_init): Handle default-initialization.
6173 * except.c (build_throw): Handle throwing NULL.
6175 * typeck.c (build_x_function_call): Use resolve_offset_ref.
6177 * search.c (compute_access): Only strip an anonymous union
6180 * call.c (add_builtin_candidates): Tweak.
6182 * cvt.c (build_expr_type_conversion): Restore code for conversion
6184 * decl2.c (delete_sanity): Use it. Clean up.
6186 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
6188 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
6190 * typeck.c (c_expand_return): Don't warn about void expressions on
6191 return statements in functions returning void.
6193 1998-06-09 Mark Mitchell <mark@markmitchell.com>
6195 * pt.c (fn_type_unification): Revise documentation. Tidy.
6196 (type_unification): Likewise.
6198 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
6200 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
6202 * parse.y (function_try_block): Rename expand_start_catch, and delete
6204 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
6207 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
6209 * search.c (lookup_member): New fn.
6210 * class.c (finish_struct_1): Use it.
6211 * decl.c (lookup_name_real): Use it.
6213 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6215 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
6217 * cp-tree.h: Add prototype for `maybe_print_template_context' and
6218 `maybe_make_one_only'.
6220 * decl.c (auto_function): Remove unused variable `decl'.
6222 * decl2.c: Include dwarf2out.h and dwarfout.h.
6224 * lex.c: Remove redundant declarations of `set_float_handler' and
6227 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
6229 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
6230 time flag. Call __cp_eh_info instead of __cp_exception_info.
6231 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
6232 (__cp_exception_info): Return offset into cp_eh_info structure to
6233 match what use to be the start of this structure.
6234 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
6235 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
6237 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
6238 __cp_eh_info instead of __cp_exception_info.
6240 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
6242 * decl.c (cp_finish_decl): Disable inlining of extern inlines
6243 with static variables.
6245 1998-06-08 Mark Mitchell <mark@markmitchell.com>
6247 * init.c (build_offset_ref): Correct previous change to use build,
6250 1998-06-07 Mark Mitchell <mark@markmitchell.com>
6252 * class.c (instantiate_type): Handle pointer-to-members where the
6253 member is a template.
6254 * init.c (build_offset_ref): Likewise.
6255 * typeck.c (build_unary_op): Likewise.
6257 1998-06-07 Richard Henderson <rth@cygnus.com>
6259 * lex.c (lang_init_options): New function.
6260 (lang_init): Remove flag_exceptions == 2 hack.
6262 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
6264 * search.c (envelope_add_decl): Tweak for implicit typename.
6266 * call.c (joust): Also warn about confusing conversion op/constructor
6267 overload resolution.
6269 * spew.c (yylex): Also return the TYPE_DECL if got_object.
6270 Don't clear got_object after '~'.
6271 * call.c (build_scoped_method_call): Tweak destructor handling.
6272 (build_method_call): Likewise.
6273 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
6274 TYPE_MAIN_VARIANT for destructors.
6275 * semantics.c (finish_object_call_expr): Complain about calling a
6278 1998-06-05 Per Bothner <bothner@cygnus.com>
6280 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
6281 Define - update needed by gcc.c change.
6283 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
6285 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
6287 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6289 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
6290 * decl.c (lookup_name_real): Add namespaces_only parameter.
6291 If set, return only NAMESPACE_DECLs.
6292 (select_decl): Likewise.
6293 (identifier_type_value): Give additional parameter.
6294 (lookup_name_nonclass): Likewise.
6295 (lookup_name): Likewise.
6296 (find_binding): Skip namespace aliases.
6297 (binding_for_name): Likewise.
6298 (push_namespace): Check for namespace aliases.
6299 (lookup_name_namespace_only): New function.
6300 (begin_only_namespace_names, end_only_namespace_names): New functions.
6301 * decl2.c (set_decl_namespace): Skip namespace aliases.
6302 (do_using_directive): Likewise.
6303 (do_namespace_alias): Produce namespace aliases, fix alias
6305 * error.c (dump_decl): Support SCOPE_REF.
6306 * parse.y (extdef): Wrap lookup with namespace_only for namespace
6307 aliases and using declarations.
6309 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
6311 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
6313 * error.c (dump_expr): Clean up NEW_EXPR case.
6315 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
6317 Suggested by Brendan Kehoe
6318 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
6319 treat it as using ::decl.
6321 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
6323 * tree.c (mapcar): Support NEW_EXPR.
6325 * error.c (dump_expr): Support NEW_EXPR.
6327 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
6329 * method.c (make_thunk): Use overload machinery to make name.
6330 * search.c (covariant_return_p): New fn.
6331 (get_matching_virtual): Use it.
6333 * init.c (build_new_1): Fix check for void.
6335 1998-06-01 Per Bothner <bothner@cygnus.com>
6337 * cp-tree.h (TYPE_FOR_JAVA): New macro.
6338 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
6339 java_int_type_node, java_long_type_node, java_float_type_node,
6340 java_double_type_node, java_char_type_node, java_boolean_type_node):
6341 New "primitive" types, with predefined names __java_byte etc.
6342 (record_builtin_java_type): New function.
6343 (init_decl_processing): Make Java types with record_builtin_java_type.
6344 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
6345 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
6346 (grokfndecl): Call check_java_method for Java classes.
6347 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
6348 (process_overload_item): Match types against specific
6349 java_XX_type_node types, rather than using is_java_type.
6350 * class.c (finish_struct_1): Don't add default copy constructor
6351 or operator= if TYPE_FOR_JAVA.
6352 (pop_lang_conext): Restore strict_prototyp proper if Java.
6353 * decl2.c (acceptable_java_type, check_java_method): New functions.
6354 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
6355 (tsubst): Move common statement after if statement.
6356 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
6358 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
6360 * pt.c (for_each_template_parm): Use first_rtl_op.
6362 * tree.c (build_cplus_array_type_1): Also check index_type for
6365 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
6367 * pt.c (tsubst): Always copy BINFO_BASETYPES.
6369 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
6371 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
6374 1998-05-29 Mark Mitchell <mark@markmitchell.com>
6376 * decl.c (grokdeclarator): Don't complain about in-class
6377 initialization of static consts if we don't really know the type
6380 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
6382 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
6383 * method.c (build_destructor_name): New fn.
6384 * decl2.c (maybe_retrofit_in_chrg): Split out...
6385 (grokclassfn): From here. Reorganize.
6386 * decl.c (grok_ctor_properties): Make sure ctors for types with
6387 vbases have the in_chrg parm.
6388 * pt.c (instantiate_class_template): Update
6389 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
6391 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
6393 1998-05-28 Mark Mitchell <mark@markmitchell.com>
6395 * pt.c (instantiate_decl): Make test for whether or not static
6396 variables should be instantiated early match its comment.
6398 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
6400 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
6402 (start_function): Call check_default_args.
6403 * decl2.c (grokfield): Don't call check_default_args.
6404 (check_default_args): Use cp_error_at.
6405 * lex.c (do_pending_defargs): Call check_default_args.
6407 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
6409 * call.c (build_method_call): Make sure get_type_value returns
6410 something before we try to use its TYPE_MAIN_VARIANT.
6411 (build_scoped_method_call): Likewise.
6413 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
6415 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
6416 initialize an array.
6418 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
6421 * friend.c (do_friend): Clarify template warning.
6423 1998-05-27 Mark Mitchell <mark@markmitchell.com>
6425 * decl.c (shadow_label): Don't treat decls as identifiers.
6426 (maybe_push_to_top_level): Clear shadowed_labels.
6428 * pt.c (instantiate_decl): Reset lineno and filename after calling
6429 regenerate_decl_from_template.
6431 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
6434 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
6436 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
6438 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6440 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
6441 (convert_nontype_argument): Handle cases when nontype template
6442 parameters become classes after substitution.
6444 1998-05-26 Mark Mitchell <mark@markmitchell.com>
6446 * friend.c (is_friend): Use comptypes, rather than == to compare
6447 types. Modify for new representation of template friends.
6448 (make_friend_class): Likewise.
6449 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
6450 (instantiate_class_template): Deal with template friends.
6452 * decl.c (store_parm_decls): Remove redundant call to
6453 expand_main_function.
6455 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
6457 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
6460 1998-05-26 Per Bothner <bothner@cygnus.com>
6462 * language_as_string: Handle lang_java.
6464 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
6466 * decl.c (pushdecl): Don't copy the type_decl.
6468 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6470 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
6472 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
6474 * parse.y (complex_direct_notype_declarator): Use $1 to access
6475 scope of notype_qualified_id.
6477 1998-05-26 Dave Brolley <brolley@cygnus.com>
6479 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
6480 (init_parse): Initialize cpplib interface.
6482 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
6485 1998-05-26 Mark Mitchell <mark@markmitchell.com>
6487 * decl.c (pushtag): Avoid crashing on erroneous input.
6489 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6491 * decl.c (push_namespace): Only produce one unique name for
6492 anonymous namespaces.
6493 (get_unique_name): Remove.
6495 1998-05-25 Mark Mitchell <mark@markmitchell.com>
6497 * call.c (tourney): Don't do any extra comparisons.
6499 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
6501 * cp-tree.h (processing_template_parmlist): Declare.
6502 * decl.c (pushtag): Don't call push_template_decl when we
6504 * pt.c (processing_template_parmlist): New variable.
6505 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
6506 (complete_template_args): Use it.
6507 (add_to_template_args): Likewise.
6508 (innermost_args): Likewise.
6510 (begin_template_parm_list): Use processing_template_parmlist.
6511 (end_template_parm_list): Likewise.
6513 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
6514 * decl.c (grokdeclarator): Use it.
6515 * decl2.c (grok_x_components): Likewise.
6516 * init.c (initializing_context): Likewise.
6517 * method.c (do_build_copy_constructor): Likewise.
6518 (do_build_assign_ref): Likewise.
6519 * search.c (compute_access): Likewise.
6520 * typeck.c (build_component_ref): Likewise.
6522 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
6523 unnamed type a typedef name "for linkage purposes".
6525 * pt.c (lookup_template_class): Don't look at
6526 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
6528 * method.c (build_overload_int): Handle error cases gracefully.
6530 * pt.c (instantiate_decl): Handle static member variables
6533 * pt.c (tsubst): Use the tsubst'd type when producing new
6534 TEMPLATE_PARM_INDEX nodes.
6536 1998-05-24 Mark Mitchell <mark@markmitchell.com>
6538 * tree.c (cp_tree_equal): Handle pointers to member functions.
6540 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
6541 sure the type of the REF_BIND is a reference type.
6542 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
6543 target_type for clarity.
6545 * parse.y (xcond): Move call to condition_conversion ...
6546 * semantics.c (finish_for_cond): Here.
6547 * parse.c: Regenerated.
6549 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
6551 * decl.c (push_namespace): Namespaces have type void.
6552 * typeck2.c (incomplete_type_error): Complain about namespace
6554 * typeck.c (decay_conversion): Likewise.
6556 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6558 * error.c (dump_expr): Support namespaces.
6560 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
6562 * cp-tree.def: Add SRCLOC.
6563 * cp-tree.h: Add struct tree_srcloc and accessor macros.
6564 * tree.c (build_srcloc, build_srcloc_here): New fns.
6565 * pt.c (add_pending_template): Use build_srcloc_here.
6566 (push_tinst_level): Update last_template_error_tick before erroring.
6567 (instantiate_decl): Restore lineno and input_filename before
6568 calling add_pending_template.
6569 * decl2.c (finish_file): Set up lineno and input_filename for
6572 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
6574 * decl.c (lang_print_error_function): New fn.
6575 (init_decl_processing): Set print_error_function to use it.
6576 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
6578 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
6581 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
6582 copy-initialization.
6584 * class.c (build_vtable_entry): Use int_fits_type_p.
6585 (build_vtable): Pass a signed offset to build_vtable_entry.
6586 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
6587 set_rtti_entry): Likewise.
6589 1998-05-22 Per Bothner <bothner@cygnus.com>
6591 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
6592 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
6594 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
6596 * pt.c (print_template_context): Use fprintf instead of cp_error.
6598 * pt.c (determine_specialization): Just return an error_mark_node.
6599 Also print the decl we want in error messages. If we complain,
6600 return error_mark_node.
6601 (tsubst_friend_function): Set lineno and input_filename so
6602 error messages will be useful.
6603 (instantiate_template): Just return an error_mark_node.
6604 (check_explicit_specialization): Don't mess with a returned
6607 * pt.c (print_template_context): Add new argument.
6608 (maybe_print_template_context): New fn.
6609 (push_tinst_level): Increment tinst_level_tick.
6610 (pop_tinst_level): Likewise.
6611 * errfn.c (cp_thing): Call maybe_print_template_context. Use
6612 xrealloc instead of xmalloc.
6614 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
6616 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
6618 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
6619 if the template we looked up is the same as the one we already
6622 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
6624 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
6625 (cpp_reader,parse_in): Add for cpplib.
6626 (check_newline): Call handle_sysv_pragma with new interface.
6627 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
6629 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
6630 (sub_getch): Call GETC for cpplib.
6632 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
6633 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
6635 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
6637 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
6639 * decl2.c (maybe_make_one_only): New fn.
6640 (import_export_vtable): Use it.
6641 (import_export_decl): Likewise.
6642 * pt.c (mark_decl_instantiated): Likewise.
6644 1998-05-21 Mark Mitchell <mmitchell@usa.net>
6646 * decl2.c (find_representative_member): Rename to ...
6647 (build_anon_union_vars): New function.
6648 (finish_anon_union): Fix stupidity of previous change.
6650 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
6652 * decl.c (grokfndecl): Handle definition of specialization in
6655 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
6657 1998-05-20 Mark Mitchell <mmitchell@usa.net>
6659 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
6660 to look for type declarations.
6661 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
6662 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
6663 (finish_member_class_template): Declare.
6664 * decl.c (pushtag): Put member class templates on the
6665 CLASSTYPE_TAGS list, just as for ordinary member classes.
6666 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
6667 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
6668 IDENTIFIER_NAMESPACE_VALUEs.
6669 * parse.y (component_decl): Move code to ...
6670 * semantics.c (finish_member_class_template): New function.
6671 Don't put member class templates on the list of components for a
6673 * parse.c: Regenerated.
6674 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
6675 In fact, don't use DECL_CONTEXT at all here.
6677 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
6679 * decl.c (record_unknown_type): New function.
6680 (init_decl_processing): Call it for the unknown and global type
6683 1998-05-20 Mark Mitchell <mmitchell@usa.net>
6685 * decl2.c (find_representative_member): New function.
6686 (finish_anon_union): Use it.
6688 * cp-tree.h (MAIN_NAME_P): New macro.
6689 (DECL_MAIN_P): Likwise.
6690 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
6691 (grokfndecl): Use the new macros.
6692 (grokdeclarator): Likewise.
6693 (start_function): Likewise.
6694 (store_parm_decls): Likewise.
6695 (finsh_function): Likewise.
6696 * friend.c (do_friend): Likewise.
6697 * typeck.c (build_function_call_real): Likewise.
6698 (build_unary_op): Likewise.
6700 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
6702 * decl2.c (start_objects, finish_objects, do_dtors,
6703 do_ctors): Split out from...
6704 (finish_file): ...here.
6706 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
6708 * tree.c (is_overloaded_fn): Don't abort on placeholders from
6711 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
6713 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
6715 * error.c (dump_expr): Handle an ARROW_EXPR.
6717 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
6719 * decl.c (saveable_obstack): Declare.
6720 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
6721 declare, if necessary.
6723 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
6725 * call.c (compare_qual): Remove.
6727 (is_properly_derived_from): New function.
6728 (maybe_handle_ref_bind): Likewise.
6729 (maybe_handle_implicit_object): Likewise.
6730 (compare_ics): Modify substantially to bring into conformance with
6732 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
6733 (comp_cv_qualification): Declare.
6734 (comp_cv_qual_signature): Likewise.
6735 * typeck.c (comp_cv_qualification): Likewise.
6736 (comp_cv_qual_signature): Likewise.
6738 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6740 * Makefile.in (parse.o): Depend on toplev.h.
6742 * class.c (typecode_p): Remove prototype and definition.
6744 * cp-tree.h (currently_open_class, is_empty_class, member_p):
6747 * decl.c (push_overloaded_decl_top_level): Remove prototype and
6750 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
6751 in call to `cp_thing'.
6752 (cp_warning): Likewise for function pointer `warning'.
6754 * except.c (do_function_call): Remove prototype and definition.
6755 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
6757 * method.c (is_java_type): Add prototype and make it static.
6759 * parse.y: Include toplev.h.
6761 * pt.c (type_unification): Remove unused variable `arg'.
6762 (instantiate_decl): Likewise for `save_ti'.
6764 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
6766 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
6768 * init.c (build_member_call): Handle template_ids.
6769 * parse.y (primary): Add global_scope template_id.
6771 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
6773 * decl2.c (get_sentry): Use end_temporary_allocation.
6774 Don't declare permanent_obstack.
6776 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
6778 * parse.y (.finish_new_placement): New non-terminal.
6779 (unary_expr, new_type_id): Use it.
6780 * parse.c: Regenerated.
6782 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
6784 * pt.c (redeclare_class_template): Say where the original definition
6785 of the template-parameter's default argument appeared.
6787 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
6789 * call.c (build_over_call): Tweak empty class handling.
6791 * decl.c (make_typename_type): Use currently_open_class.
6793 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
6795 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6797 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
6798 for a type unless it is one.
6800 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
6802 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
6804 * Makefile.in (program_transform_name, objdir): Define.
6806 * Makefile.in (BISON): Use bison from the build tree if it exists.
6809 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6811 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
6813 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
6815 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
6817 * call.c (build_scoped_method_call): Likewise.
6819 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
6821 * init.c (build_new_1): Call suspend_momentary around the creation
6822 of values that must be saved for exception handling.
6823 * parse.y (.build_new_placement): New non-terminal.
6824 (unary_expr, new_placement): Use it.
6825 * parse.c: Regenerated.
6827 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
6829 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
6832 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
6835 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
6837 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
6839 * decl.c (start_decl): Revert problem change.
6841 * Makefile.in (CONFLICTS): Fix.
6843 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6845 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
6847 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
6849 * class.c (finish_struct_1): Use BINFO_SIZE.
6851 * decl.c (start_decl): Use 'tem'.
6853 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
6855 * exception.cc: Include eh-common.h.
6856 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
6857 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
6858 (__cp_push_exception): Initialize eh_info struct as well.
6859 * except.c: Remove local structs and include eh-common.h.
6860 (init_exception_processing): Set language and version codes.
6861 (call_eh_info): Add presence of eh_info to runtime description of
6863 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
6864 * semantics.c (finish_try_block): Call start_catch_block() and
6866 * parse.y (function_try_block): Call start_catch_block() and
6869 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
6871 * typeck.c (original_type): New function.
6872 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
6873 to see if they're actually the same.
6874 * cp-tree.h (original_type): Declare.
6876 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6878 * Makefile.in (lex.o): Depend on output.h.
6880 * call.c (add_function_candidate): Remove unused variable `cand'.
6881 (add_conv_candidate): Likewise.
6882 (build_builtin_candidate): Likewise.
6884 * cp-tree.h: Add prototype for `types_overlap_p'.
6886 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
6888 * decl2.c (merge_functions): Remove unused variables `tmp' and
6891 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
6892 (code_as_string): Likewise.
6893 (language_as_string): Likewise.
6894 (parm_as_string): Likewise.
6895 (op_as_string): Likewise.
6896 (assop_as_string): Likewise.
6897 (cv_as_string): Likewise.
6899 * lex.c: Include output.h.
6901 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
6903 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
6906 * tinfo.cc (__class_type_info::dcast): Change the type of variable
6907 `i' from int to size_t.
6909 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
6912 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
6914 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
6915 DECL_NAMESPACE_SCOPE_P.
6916 (lang_decl_name): Likewise.
6917 * pt.c (tsubst_friend_function, tsubst): Likewise.
6918 * decl.c (pushdecl, redeclaration_error_message, start_decl,
6919 cp_finish_decl, start_function): Likewise.
6920 * class.c (finish_struct_1): Likewise.
6921 * call.c (build_over_call): Likewise.
6922 (compare_ics): Use DERIVED_FROM_P.
6924 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
6926 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
6927 * method.c (build_mangled_name): Use it.
6928 (build_decl_overload_real): Likewise.
6930 * error.c (dump_simple_decl): New function, broken out from ...
6931 (dump_decl): Use it.
6933 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
6935 * ptree.c (lang_print_xnode): Add missing `break'.
6937 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
6939 * call.c (add_template_candidate): Adjust for changes to
6940 fn_type_unification.
6941 (add_template_candidate_real): Likewise.
6942 (add_template_conv_candidate): Likewise.
6943 (build_user_type_conversion_1): Likewise.
6944 (build_new_function_call): Likewise.
6945 (build_object_call): Likewise.
6946 (build_new_op): Likewise.
6947 (build_new_method_call): Likewise.
6948 * class.c (instantiate_type): Likewise.
6949 * cp-tree.h (unification_kind_t): New type.
6950 (fn_type_unification): Adjust prototype.
6951 (type_unificaiton): Likewise.
6952 * pt.c (UNIFY_ALLOW_NONE): New macro.
6953 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
6954 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
6955 (UNIFY_ALLOW_DERIVED): Likewise.
6956 (unify): Change prototype.
6957 (maybe_adjust_types_for_deduction): New function.
6958 (check_cv_quals_for_unify): Likewise.
6959 (determine_specialization): Adjust.
6960 (fn_type_unification): Likewise.
6961 (type_unification): Likewise.
6962 (type_unification_real): Likewise. Use
6963 maybe_adjust_types_for_deduction. Fix mishandling of
6964 back-unification of template functions passed as arguments. Pass
6965 appropriate combination of UNIFY_ALLOW_* to unify.
6966 (unify): Remove unused NTPARMS parameter. Use
6967 check_cv_quals_for_unify. Remove bogus code that allowed
6968 too-generous unification in order to adhere more closely to standard.
6969 (get_bindings_real): Adjust.
6970 (get_class_bindings): Likewise.
6972 * method.c (build_overload_identifier): Only use the innermost
6973 template arguments when mangling.
6974 * pt.c (tsubst_template_argument_vector): New function.
6975 (complete_template_args): Deal with the situation where the
6976 extra_args contain more than one level of arguments.
6977 (lookup_template_class): Deal with member template classes, which
6978 may have more than one level of arguments.
6979 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
6980 Improve handling of member template classes. Use
6981 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
6982 tsubst_template_argument_vector where appropriate.
6983 (regenerate_decl_from_template): Break out from ...
6984 (instantiate_decl): Here.
6986 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
6987 * parse.h: Regenerated.
6988 * parse.c: Really regenerated.
6990 * cp-tree.h (finish_unary_op_expr): New function.
6991 (finish_id_expr): Likewise.
6992 (begin_new_placement): Likewise.
6993 (finish_new_placement): Likewise.
6994 (finish_declarator): Likewise.
6995 (finish_translation_unit): Likewise.
6996 (finish_parmlist): Likewise.
6997 (begin_class_definition): Likewise.
6998 (finish_class_definition): Likewise.
6999 (finish_default_args): Likewise.
7000 (finish_inline_definitions): Likewise.
7001 * parse.y (GCC_ASM_KEYWORD): Remove.
7002 (TYPENAME_ELLIPSIS): Likewise.
7003 * parse.c: Regenerated.
7004 Use new functions in semantics.c in the actions for many rules.
7005 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
7006 * hash.h: Regenerated.
7007 * semantics.c (finish_expr_stmt): Allow NULL expr.
7008 (finish_unary_op_expr): New function, containing
7009 code previously in parse.y.
7010 (finish_id_expr): Likewise.
7011 (begin_new_placement): Likewise.
7012 (finish_new_placement): Likewise.
7013 (finish_declarator): Likewise.
7014 (finish_translation_unit): Likewise.
7015 (finish_parmlist): Likewise.
7016 (begin_class_definition): Likewise.
7017 (finish_class_definition): Likewise.
7018 (finish_default_args): Likewise.
7019 (finish_inline_definitions): Likewise.
7021 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
7023 * typeck.c (build_c_cast): Don't decay arrays and functions to
7024 pointer type when converting to a class type.
7026 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
7028 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
7029 (DECL_CLASS_SCOPE_P): Likewise.
7031 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
7033 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
7034 * decl2.c (constructor_name_full): Likewise.
7036 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
7038 * tree.c (mapcar): Add OVERLOAD support.
7040 * init.c (resolve_offset_ref): We must use basetype_path before we
7041 destroy it with a call to convert_pointer_to.
7043 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7045 * class.c (currently_open_class): New fn.
7046 * decl.c (lookup_name_real): Use it.
7047 * search.c (lookup_field): Likewise.
7049 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
7051 * cp-tree.def (OVERLOAD): New node.
7052 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
7053 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
7054 (NAMESPACE_BINDING): Remove.
7055 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
7057 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
7059 (tree_overload): New struct.
7060 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
7061 (REAL_IDENTIFIER_TYPE_VALUE): Define.
7062 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
7063 (lang_decl_flags): Remove in_namespace.
7064 (lang_decl): Remove chain.
7065 (DECL_CHAIN, DECL_NAMESPACE): Remove.
7066 (flag_honor_std): Declare extern.
7067 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
7068 namespace_binding, set_namespace_binding,
7069 lookup_function_nonclass, cat_namespace_levels,
7070 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
7071 scratch_ovl_cons, ovl_member, build_overload): Declare.
7072 (decl_list_length, get_namespace_id, current_namespace_id,
7073 overloaded_globals_p): Remove.
7074 (lookup_using_namespace, qualified_lookup_using_namespace): Change
7076 (push_scratch_obstack): New macro.
7077 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
7078 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
7080 (build_new_function_call): Iterate using OVL_CHAIN.
7081 Print DECL_NAME in when reporting ambiguities.
7082 (build_object_call): Iterate using OVL_NEXT for fns, convs.
7083 (build_new_op): Call lookup_function_nonclass.
7084 Iterate using OVL_NEXT.
7085 (build_op_delete_call): Change detection of members.
7086 Do not wrap TREE_LIST around fields and single global functions.
7087 (build_over_call): Don't push a class level if the context is a
7089 (build_new_method_call): Iterate using OVL_NEXT.
7090 * class.c (add_method): Chain overloaded members using
7091 build_overload. Remove copying of method.
7092 (grow_method): When iterating through the obstack, expect OVERLOAD
7093 nodes. Chain overload members.
7094 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
7095 nodes in call to get_baselinks.
7096 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
7097 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
7098 fdecls that are OVERLOAD nodes.
7099 (validate_lhs): New function.
7100 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
7101 code. Use DECL_NAME in error messages. Split code between global
7102 and member function processing.
7103 * decl.c (global_type_node): New static variable.
7104 (in_std): New global.
7105 (struct binding_level): New field usings.
7106 (resume_binding_level): Assert that we are not in a class.
7107 (toplevel_bindings_p): Just check for namespace_p or
7109 (resume_level): Remove.
7110 (find_binding): New function.
7111 (binding_for_name): Call it.
7112 (namespace_binding, set_namespace_binding): New functions.
7113 (push_namespace): Associate binding level with new namespace,
7114 resume_binding_level for existing namespace. Remove old code.
7115 Fake std by counting.
7116 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
7117 (maybe_push_to_top_level): Save current namespace.
7118 (pop_from_top_level): Restore saved namespace.
7119 (pop_namespace): Call suspend_binding_level. Remove old code.
7120 (cat_namespace_levels): New function.
7121 (set_identifier_type_value_with_scope): For namespace bindings,
7122 set BINDING_TYPE, and use global_type_node.
7123 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
7124 (identifier_type_value): New function.
7125 (pushtag): If no context, use current_namespace.
7126 (duplicate_decls): Don't process DECL_CHAIN.
7127 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
7128 already set. Never reset it to NULL_TREE. Lookup global variables
7129 in their namespace. Push overloaded templates if they are on
7131 (pushdecl_namespace_level): New function.
7132 (pushdecl_top_level): Implement using pushdecl_namespace_level.
7133 (pushdecl_using_decl): New function.
7134 (overloaded_globals_p): Remove.
7135 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
7136 them. Use namespace_binding and set_namespace_value.
7137 (redeclaration_error_message): Complain if the declarations come
7138 from different namespaces.
7139 (lookup_tag): On namespace level, look in the BINDING_TYPE.
7140 (lookup_namespace_name): Pass tree_bindings from stack. Remove
7142 (select_decl): New function.
7143 (lookup_name_real): Call it for qualified and unqualified lookup.
7144 Pass tree_bindings from the stack.
7145 If prefer_type is 1, also accept namespaces.
7146 (lookup_function_nonclass): New function.
7147 (init_decl_processing): Set the binding level of the global
7148 namespace to global_binding_level.
7149 Build a proper type list for __builtin_apply.
7150 Initialize std_node to "fake std" if flag_honor_std is set.
7151 Initialize global_type_node.
7152 Allocated bad_alloc in namespace std if flag_honor_std.
7153 (define_function): Set the DECL_CONTEXT to the current_namespace.
7154 (start_decl): A namespace is not considered as a context here. If
7155 the DECL_CONTEXT is a namespace, push the decl.
7156 (cp_finish_decl): Check for namespaces used as initializers.
7157 (grokfndecl): Add namespace parameter. Remove processing of
7159 (grokvardecl): Add namespace parameter.
7160 (grokdeclarator): Process SCOPEs that are namespaces. For
7161 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
7162 (start_function): Check for contexts that are namespaces.
7163 Set context for declarations that have not been pushed.
7164 (store_parm_decls): Check for ::main only.
7165 (finish_function): Likewise.
7166 (start_method): Check for contexts that are namespaces.
7167 (start_method): Remove DECL_CHAIN processing.
7168 * decl2.c (flag_honor_std): Declare.
7169 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
7170 (decl_namespace_list): New static global.
7171 (grok_x_components): Ignore namespaces as type contexts.
7172 (check_classfn): Expect OVERLOAD nodes.
7173 (grokfield): Remove DECL_CHAIN processing.
7174 (finish_file): Call cat_namespace_levels.
7175 (merge_functions): New function.
7176 (ambiguous_decl): Rewrite.
7177 (lookup_using_namespace): Produce tree_bindings.
7178 (qualified_lookup_using_namespace): Likewise.
7179 (set_decl_namespace, decl_namespace, current_decl_namespace,
7180 push_decl_namespace, pop_decl_namespace): New functions.
7181 (arg_lookup): New struct.
7182 (add_function, arg_assoc_namespace, arg_assoc_class,
7183 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
7185 (get_namespace_id, current_namespace_id): Remove.
7186 (do_toplevel_using_decl): Rewrite.
7187 (do_class_using_decl): Complain about namespace qualifiers.
7188 (do_using_directive): Sorry if not on namespace level. Complain
7189 about unknown namespaces.
7190 * error.c (dump_aggr_type): Check for namespace contexts.
7191 * except.c (init_exception_processing): Push terminate into std.
7192 * friend.c (is_friend): A namespace is not a context, here.
7193 * init.c (expand_member_init): Remove DECL_CHAIN processing.
7194 (build_offset_ref): Process OVERLOAD nodes.
7195 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
7196 * lex.c (identifier_type): Loop using OVL_CHAIN.
7197 (see_typename): Set looking_for_typename to 2.
7198 (real_yylex): Likewise.
7199 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
7200 (do_scoped_id): Expect OVERLOAD nodes.
7201 Change calling convention for qualified_lookup_using_namespace.
7202 (build_lang_decl): Don't set in_namespace anymore.
7203 * method.c (typevec_size): New global.
7204 (build_overload_nested_name): Return if global_namespace.
7205 Otherwise, always expect a declaration context.
7206 (build_qualified_name): Likewise.
7207 Make sure we don't write beyond typevec_size.
7208 (build_decl_overload_real): Likewise.
7209 Allocate one extra slot for the namespace.
7210 (hack_identifier): Mark code dead.
7211 Process OVERLOAD and NAMESPACE_DECL nodes.
7212 * parse.y (program): Pop namespaces until in global namespace.
7213 (extdef): In a using-declaration, don't discard the identifier if
7214 there is no declaration.
7215 (left_curly): Ignore type contexts which are namespaces.
7216 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
7218 * pt.c (template_class_depth): Expect types to be namespaces.
7219 (determine_specialization): Simplify by expecting OVERLOAD nodes.
7220 (push_template_decl): Push into namespace level.
7221 Reset ctx if it is a namespace.
7222 Set DECL_CONTEXT to current_namespace if not set already.
7223 Ignore real contexts that are namespaces.
7224 (mangle_class_name_for_template): Skip global_namespace.
7225 Mangle other namespaces as declarations.
7226 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
7227 (lookup_template_class): Push into namespace of context.
7228 If the context is a namespace, set it to global_namespace.
7229 Use id_context for mangling.
7230 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
7231 (tsubst_friend_function): Ignore namespace contexts.
7232 Push into namespace level.
7233 (tsubst): Handle NAMESPACE_DECL nodes.
7234 Remove DECL_CHAIN processing.
7235 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
7236 * ptree.c (print_lang_identifier): Print bindings.
7237 (lang_print_xnode): Print OVERLOAD nodes.
7238 * rtti.c (init_rtti_processing): Push type_info into std.
7239 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
7240 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
7241 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
7242 lookup_fnfields_here): Likewise.
7243 Process all nodes, instead of going through TREE_CHAIN.
7244 * sig.c (build_signature_pointer_or_reference_type): Set context
7245 to global_namespace.
7246 (build_signature_table_constructor): Expect OVERLOAD nodes.
7247 * spew.c (yylex): Save old setting of looking_for_typename.
7248 * tree.c (decl_list_length): Remove.
7249 (binding_init): New function.
7250 (count_functions): Rewrite.
7251 (is_overloaded_fn): Expect OVERLOAD nodes.
7252 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
7253 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
7254 ovl_member): New functions.
7255 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
7256 (type_unknown_p): Likewise.
7257 (require_instantiated_type): Likewise.
7258 (build_component_ref): Declare code dead.
7259 (build_x_function_call): Create and expect OVERLOAD nodes.
7260 (build_function_call_real): Check for ::main only.
7261 (build_unary_op): Likewise. Expect OVERLOAD nodes.
7262 (convert_for_assignment): Check for TREE_LIST before accessing
7264 * decl.c (duplicate_decls): Check for namespace bindings instead
7266 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
7267 lookup_name_current_level, start_decl, xref_tag,
7268 finish_enum): Likewise.
7269 * init.c (build_offset_ref): Likewise.
7270 * search.c (lookup_field): Likewise.
7271 (lookup_fnfields): Likewise.
7272 (dfs_debug_mark): Likewise.
7273 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
7274 (poplevel_class, pop_from_top_level): Likewise.
7275 * decl2.c (finish_method): Likewise.
7276 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
7277 * decl.c (record_builtin_type): Likewise.
7278 (init_decl_processing, grokfndecl): Likewise.
7279 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
7280 (make_lang_type): Likewise.
7281 * parse.y (make_thunk): Likewise.
7282 * pt.c (tsubst): Likewise.
7283 * tree.c (debug_binfo): Likewise.
7284 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
7285 tinfo2.cc, inc/new.h: Add std qualifications.
7286 * inc/new: Wrap with namespace std if __HONOR_STD.
7287 * inc/typeinfo: Likewise.
7289 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
7291 * call.c (build_user_type_conversion_1): Handle second_conv
7292 properly for templates.
7294 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
7296 * method.c (build_decl_overload_real): Set TREE_USED flag to
7297 zero for build_type_variants nodes as well.
7299 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
7301 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
7303 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
7305 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
7306 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
7307 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
7308 xref.o): Add toplev.h dependencies.
7310 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
7312 * errfn.c (cp_error, cp_warning): Remove declarations for
7313 error and warning respectively.
7315 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7317 * error.c: Convert to using ctype macros defined in system.h.
7318 * method.c: Likewise.
7320 * lex.c: Likewise. Also remove redundant system header stuff.
7322 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
7324 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
7325 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
7326 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
7327 xref.c: Add include of toplev.h.
7329 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
7331 * tree.c (perm_manip): Also regenerate the RTL of an extern.
7332 (copy_to_permanent): Use end_temporary_allocation.
7334 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
7336 * init.c (expand_vec_init): The initialization of each array
7337 element is a full-expression.
7339 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
7341 * method.c (build_mangled_name): Add a call to build_type_variant
7342 to get the right type.
7344 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
7346 * Makefile.in: Add .SUFFIXES.
7348 * cp-tree.def: Remove NAMESPACE_DECL.
7350 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
7352 * call.c (build_over_call): Do evaluate arg even if it has empty
7354 * decl.c (start_function): Don't push a member function.
7356 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
7358 * Makefile.in (g++FAQ.info): Put -o option before input file.
7360 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
7362 * gxxint.texi: Add info for squangling codes K and B.
7364 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
7366 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
7367 the expression in templates.
7368 (finish_stmt_expr): Likewise.
7370 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
7372 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
7374 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
7376 * decl.c (maybe_push_to_top_level): Always clear
7377 current_template_parms and processing_template_decl.
7378 (pushtag): Remove check of current_class_type and some comments,
7379 since maybe_push_to_top_level no longer creates confusion.
7381 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
7383 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
7384 (DECL_CLASS_TEMPLATE_P): Likewise.
7385 (DECL_PRIMARY_TEMPLATE): Likewise.
7386 (PRIMARY_TEMPLATE_P): Use it.
7387 (push_template_decl_real): New function.
7388 (redeclare_class_template): Take new template parameters as
7390 (is_specialization_of): New function.
7391 (comp_template_args): Declare.
7392 * decl.c (pushtag): Handle friend template classes.
7393 (xref_tag): Likewise. Use new calling convention for
7394 redeclare_class_template.
7395 * decl2.c (grok_x_components): Handle friend templates.
7396 * friend.c (is_friend): Use is_specialization_of where
7397 appropriate. Deal with friend class templates.
7398 (make_friend_class): Let a class template be friends with itself.
7399 * pt.c (comp_template_args): Remove declaration.
7400 (tsubst_friend_class): New function.
7401 (push_template_decl_real): New function.
7402 (push_template_decl): Use it.
7403 (redeclare_class_template): Adjust for new calling convention.
7404 (comp_template_args): Give it external linkage.
7405 (instantiate_class_type): Use tsubst_friend_class to deal
7406 with friend templates.
7407 * typeck.c (comptypes): Use comp_template_args, rather than
7408 expanding it inline.
7409 * parse.y (component_decl): Handle a nested template type
7410 like other component type declarations.
7412 * pt.c (check_explicit_specialization): Handle overloaded
7413 constructors correctly.
7415 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
7416 (lookup_template_class): Use it.
7418 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
7420 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
7421 * cp-tree.h: Add WRAPPER support.
7422 * call.c (add_candidate): Split out from add_*_candidate fns.
7423 (build_over_call): Take the candidate instead of function and args.
7424 Enforce access control here. Emit overload warnings here.
7425 (add_warning): New fn.
7426 (joust): Add WARN parm. If not set, call add_warning instead of
7427 printing a warning. Re-enable some warnings.
7429 (convert_like): Adjust.
7430 (build_new_op): Adjust.
7431 (build_new_function_call): Adjust.
7432 (build_user_type_conversion_1): Adjust.
7433 (USER_CONV_FN): Adjust.
7434 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
7435 build_int_wrapper): New fns.
7437 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
7439 * pt.c (unify): Fix typo in previous change.
7441 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
7443 * error.c (dump_type_real): Declare canonical_name.
7445 * typeck.c (comp_target_types): Fix PMFs.
7447 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
7449 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
7450 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
7453 * pt.c (tsubst): Decrease the template-level of
7454 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
7455 TEMPLATE_PARM_INDEX.
7456 (template_decl_level): New function.
7457 (unify): Make sure to record unifications for template
7458 parameters, even when the parameters exactly match the arguments.
7459 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
7460 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
7461 aren't from the level we're currently working on.
7463 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
7465 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
7467 * decl2.c (check_member_template): Set DECL_IGNORED for member
7468 class templates, too.
7470 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
7472 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7474 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
7476 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
7478 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
7479 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
7480 (init_decl_processing): Handle TI types.
7481 * typeck.c (unsigned_type, signed_type): Handle TI types.
7483 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
7485 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
7486 New local added_libraries. Increment count when add library to
7489 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
7491 * cp-tree.h (type_as_string_real): New function.
7492 * pt.c (mangle_class_name_for_template): Use it.
7493 * error.c (dump_aggr_type): Change prototype.
7494 (dump_type_prefix): Likewise.
7495 (dump_type_suffix): Likewise.
7496 (dump_type_real): Convert from dump_type. If desired, the
7497 "canonica" name of a typedef, i.e., the name of the underlying
7498 type, can be printed.
7499 (dump_type): Call dump_type_real.
7501 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
7503 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
7505 * typeck.c (comp_target_types): Tweak pedantic case.
7506 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
7507 Return -1 or 1 instead of 1 or 2.
7508 (compparms): Remove STRICT handling.
7509 (convert_for_assignment): Fix handling of pmfs.
7511 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
7513 * typeck.c (comp_target_types): Handle references like pointers.
7514 (comp_target_parms): Note that return code from comp_target_types
7515 can be negative to indicate failure.
7517 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7519 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
7520 which requires a working target compiler to build.
7522 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
7524 * tree.c (avoid_overlap): Add prototype.
7526 * spew.c (num_tokens): Add prototype.
7527 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
7529 * search.c (dfs_check_overlap): Add prototype.
7530 (dfs_no_overlap_yet): Likewise.
7532 * pt.c (original_template): Add prototype.
7533 (inline_needs_template_parms): Likewise.
7534 (push_inline_template_parms_recursive): Likewise.
7535 (retrieve_specialization, register_specialization): Likewise.
7536 (print_candidates, reduce_template_parm_level): Likewise.
7537 (build_template_decl, mark_template_parm): Likewise.
7538 (tsubst_friend_function, get_bindings_real): Likewise.
7540 * method.c (start_squangling): Add prototype.
7541 (end_squangling, check_ktype, issue_ktype): Likewise.
7542 (build_overloaded_scope_ref, check_btype): Likewise.
7543 (build_mangled_template_parm_index): Likewise.
7545 * lex.c (init_cpp_parse): Add prototype.
7546 (handle_cp_pragma, handle_sysv_pragma): Likewise.
7547 (reduce_cmp, token_cmp): Likewise.
7549 * except.c (call_eh_info): Add prototype.
7550 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
7551 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
7553 * decl2.c (is_namespace_ancestor): Add prototype.
7554 (namespace_ancestor, add_using_namespace): Likewise.
7555 (ambiguous_decl): Likewise.
7557 * decl.c (indent): Add prototype.
7559 * call.c (add_template_candidate_real): Add prototype.
7561 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
7563 * decl2.c (build_expr_from_tree): Just return a PMF.
7565 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
7567 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
7568 when doing initializations.
7570 * pt.c (unify): Use comptypes to compare type args.
7572 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
7574 * decl.c (duplicate_decls): Fix check for when it's safe to free
7577 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
7580 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
7582 * pt.c (build_template_parm_index): Add prototype.
7584 * search.c (my_tree_cons): Don't clear words outside the
7585 newly allocated node.
7587 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
7589 * lex.c (init_parse): Now returns char* containing the filename.
7591 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
7592 Jeff Law <law@cygnus.com>
7594 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
7597 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7599 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
7601 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
7603 * decl.c (duplicate_decls): Don't warn for redundant decls if
7604 friend: let add_friend take care of it.
7606 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
7608 * sig.c (build_signature_pointer_constructor): Don't set
7609 TREE_HAS_CONSTRUCTOR for a signature pointer.
7610 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
7611 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
7613 * typeck.c (build_unary_op): Only allow taking the address of a
7615 * typeck2.c (digest_init): Simplify.
7616 (store_init_value): Don't pedwarn about using { } for pmfs.
7618 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
7620 * cp-tree.h (start_decl): Update prototype.
7621 * decl.c (start_decl): Like the C version, new parameters
7622 for the attributes. Call cplus_decl_attributes here,
7623 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
7624 (grokdeclarator): Pass NULL for new start_decl arguments.
7625 * pt.c (tsubst_expr): Likewise.
7626 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
7627 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
7628 * lex.c (build_lang_decl): Add lang_name_java.
7629 * class.c (push_lang_context): Add lang_name_java.
7630 * method.c (build_mangled_name): Check for is_java_type.
7632 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
7634 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
7635 * call.c (build_scoped_method_call): Check for TREE_CODE for
7636 VOID_TYPE instead of type == void_type_node.
7637 (build_method_call): Likewise.
7638 * decl.c (lookup_name_real): Likewise.
7639 (grokdeclarator): Likewise.
7640 (start_decl): Likewise.
7641 (grokparms): Likewise.
7642 (start_function): Likewise.
7643 (finish_function): Likewise.
7644 (start_method): Likewise.
7646 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
7648 * lex.c (finput): New variable.
7649 (init_cpp_parse): Renamed from init_parse.
7650 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
7651 (finish_parse): New function.
7652 * cp-tree.h (init_lex, init_parse): Remove declarations.
7654 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
7656 * call.c (build_call): Still evaluate the actual argument.
7657 * class.c (is_empty_class): Update for -fnew-abi.
7659 * decl2.c: -fnew-abi implies -fsquangle.
7661 * method.c (do_build_assign_ref): Don't do anything to copy
7663 (do_build_copy_constructor): Likewise.
7664 * call.c (build_over_call): Likewise.
7666 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
7668 * tree.c (avoid_overlap): Return a value.
7670 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
7672 * method.c (check_btype): Add missing argument to xrealloc.
7673 (check_ktype): Likewise.
7675 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7677 Implement empty base optimization.
7678 * class.c (finish_struct_1): Add vbase fields earlier. Set
7679 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
7680 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
7681 (types_overlap_p): New fn.
7682 * tree.c (avoid_overlap): New fn.
7683 (build_base_fields): Use it to avoid overlapping empty bases.
7684 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
7686 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
7688 Re-implement allocation of base class subobjects.
7689 * tree.c (unshare_base_binfos): New fn.
7690 (layout_basetypes): Use it. Now handles offsets of both virtual and
7691 non-virtual bases, after layout_type.
7692 (layout_vbasetypes): Remove.
7693 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
7694 (build_vbase_pointer_fields): Split out from old layout_basetypes.
7695 * class.c (finish_base_struct): Lose offset handling code.
7696 Move nonvdtor warning here. Don't mess with t_binfo anymore.
7697 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
7698 * cp-tree.h: Adjust.
7700 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
7702 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
7703 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
7704 * class.c (duplicate_tag_error): Likewise.
7705 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
7706 * tree.c (layout_vbasetypes): Update from layout_record, remove
7707 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
7708 (layout_basetypes): Likewise.
7710 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
7712 * class.c, Make sure system.h is included just after config.h.
7713 Delete lingering stdio and errno references too.
7714 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
7716 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
7718 * friend.c (is_friend): Fix access control for local classes.
7720 * class.c (is_empty_class): New fn.
7721 * call.c (build_call): Don't pass empty class objects to a function.
7723 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
7725 * call.c (build_over_call): Do name resolution for default
7726 arguments of function templates in the scope of the templates.
7728 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
7730 * call.c: Include system.h. Remove includes, declarations and
7731 defines provided by system.h.
7732 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
7733 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
7734 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
7735 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
7736 * typeck2.c, xref.c: Likewise.
7737 * Makefile.in: Dependencies updated as appropriate.
7738 * Make-lang.in: Likewise.
7740 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
7742 * pt.c (fn_type_unification): Allow incomplete unification without
7743 an immediate error message.
7745 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7747 * tree.c (member_p): New fn.
7748 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
7749 initializing class members.
7751 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
7752 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
7754 * call.c (build_method_call): Handle non-scoped destructors, too.
7755 * pt.c (tsubst_copy): Likewise.
7757 * pt.c (print_template_context): Split out...
7758 (push_tinst_level): ...from here.
7760 * friend.c (is_friend): Don't pass a type to decl_function_context.
7762 * typeck.c (convert_for_initialization): Always hand off
7763 conversions to class type.
7765 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7767 * friend.c (is_friend): Local classes have the same access as the
7770 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
7772 * typeck.c (expand_target_expr): Delete dead function.
7774 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
7776 * repo.c (save_string): Delete dead function.
7778 * method.c (thunk_printable_name): Delete dead function.
7780 * lex.c (yynextch): Delete dead function.
7782 * expr.c (tree_extract_aggr_init): #if 0 out.
7784 * except.c (do_unwind): Delete dead function.
7785 (easy_expand_asm): Likewise.
7787 * cvt.c (build_conversion_type_1): Delete dead function.
7789 * cp-tree.h (push_expression_obstack): Declare.
7791 * call.c (source_type): #if 0 out.
7793 * class.c (alter_access): Remove unused label. Add braces
7794 around empty else clause.
7796 * lex.c (yyprint): Fix argument to printf.
7798 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
7800 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
7802 * pt.c (instantiate_class_template): Make sure template
7803 arguments are permanent.
7804 * init.c (resolve_offset_ref): Don't go looking around in
7807 * semantics.c: Add routines to handle expressions, and some
7808 declaration processing.
7809 * parse.y: Use them.
7810 (current_class_depth): Move declaration to cp-tree.h.
7811 * parse.c: Regenerated.
7812 * cp-tree.h: Use them.
7813 (current_class_depth): Declare.
7814 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
7816 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
7818 * error.c (dump_decl): Be a bit more explicit with template
7819 type arguments, when verbose.
7821 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
7823 * inc/exception: Reorder closing braces.
7825 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
7827 * pt.c (redeclare_class_template): New function.
7828 * cp_tree.h (redeclare_class_template): Declare it.
7829 * decl.c (xref_tag): Use it.
7831 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
7833 * call.c (build_over_call): Check IS_AGGR_TYPE, not
7835 * typeck.c (convert_arguments): Likewise.
7837 * decl.c (grokdeclarator): Remove const and volatile from type after
7838 setting constp and volatilep.
7840 * class.c (finish_struct_1): Don't warn about bool bitfield larger
7843 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
7845 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
7847 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
7849 * call.c (build_object_call): Complain about ambiguous operator(),
7850 rather that crashing.
7851 (build_new_op): Likewise.
7852 (build_op_delete_call): Likewise.
7854 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
7856 * cvt.c (perform_qualification_conversions): Use comp_target_types
7857 instead of comp_ptr_ttypes.
7859 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
7861 * cp-tree.h (enforce_access): Declare.
7862 * call.c (enforce_access): Make it extern, not static.
7863 * class.c (alter_access): Use enforce_access; modify code for ISO
7864 compliance, rather than ARM rules.
7866 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7868 * cp-tree.h: Fix typo.
7870 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
7872 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
7873 if (aggregate_value_p (type)).
7875 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
7877 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
7879 * tree.c (mapcar): When dealing with a DECL, use it's constant
7881 * pt.c (lookup_template_class): Don't mangle the names of template
7882 classes whose arguments are unknown.
7884 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
7886 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7888 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
7890 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
7892 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
7893 boolean_type_node to 1.
7895 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
7897 * error.c (dump_expr): Remove unused variable `l'.
7899 * pt.c (for_each_template_parm): New function, created by
7900 converting uses_template_parms.
7901 (tree_fn_t): New typedef.
7902 (uses_template_parms): Use it.
7903 (mark_template_parm): New function.
7904 (push_template_decl): Check that the argument list of a partial
7905 specialization uses all the template parameters.
7907 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
7908 with it; we might want it for debugging.
7909 * cp-tree.h (type_unification): Change interface.
7910 * class.c (finish_struct_1): Skip nested template types, just like
7911 ordinary nested types.
7912 (instantiate_type): Use new interface to type_unification.
7913 * lex.c (init_lex): Add __sz as opname for sizeof.
7914 * method.c (build_overload_scope_ref): New function.
7915 (build_overload_int): Handle complex expressions. Set
7916 numeric_output_need_bar if necessary.
7917 (build_overload_value): Handle non-PARM_DECL nodes; this
7918 routine is now used by build_overload_int. Remove some
7919 assignments to numeric_output_need_bar. Use
7920 build_overload_scope_ref.
7921 (build_qualified_name): Note that some template mangled names end
7922 with digits, and set numeric_output_need_bar appropriately. Use
7923 build_underscore_int.
7924 * pt.c (unify): Change interface.
7925 (type_unification_real): Likewise.
7926 (determine_specialization): Use new interfaces.
7927 (tsubst): Deal gracefully with situations in which the argument
7928 vector is not fully filled.
7929 (fn_type_unification): Use new interfaces.
7930 (type_unification): Likewise. Remove NOP_EXPR hack.
7931 (type_unification_real): Likewise.
7932 (unify): Likewise. Deal with unification of complex expressions.
7934 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7936 * pt.c (complete_template_args): Initialize skip properly.
7938 * decl.c (make_typename_type): Revert.
7939 (make_implicit_typename): Remove.
7940 (lookup_name_real): Don't call it. Call lookup_field if we see a
7941 TYPE_DECL from a template base.
7942 * search.c (lookup_field): Do implicit typename stuff.
7944 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
7945 Geoff Noer <noer@cygnus.com>
7947 * Makefile.in: Various fixes for building cygwin32 native toolchains.
7948 * Make-lang.in: Likewise.
7950 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7952 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
7954 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
7956 * decl.c (make_implicit_typename): Rewrite removed code.
7957 (make_typename_type): Call it if the type we look up comes from
7958 a base that uses template parms.
7960 * pt.c (complete_template_args): Rewrite.
7961 (tsubst, FUNCTION_DECL): Use it.
7963 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
7965 * semantics.c (finish_asm_stmt): Fix combine strings. Call
7966 c_expand_asm_operands () if output_operands, input_operands or
7967 clobbers is not NULL_TREE.
7969 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7971 * pt.c (complete_template_args): New function.
7972 (get_bindings): Deal with specializations of function templates
7973 with return type containing parameters from outer class
7975 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
7976 substitute arguments and compose a new type.
7978 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
7980 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
7983 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
7985 * decl.c (make_implicit_typename): Lose useless code.
7987 * call.c (standard_conversion): Handle A* -> const A* properly.
7989 * pt.c (get_bindings_real): Rename from get_bindings. Add
7991 (get_bindings): Pass 1.
7992 (get_bindings_overload): Pass 0.
7994 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
7996 * pt.c (check_explicit_specialization): When reverting a static
7997 member function, also remove the `this' parameter from
7998 last_function_parms.
8000 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
8002 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
8005 * decl.c (store_bindings): Use free_binding_vecs.
8006 (pop_from_top_level): Likewise.
8008 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
8010 * decl.c (make_implicit_typename): Only change the type of a
8013 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
8015 * semantics.c: New file, containing routines to perform the
8016 semantic phase of parsing.
8018 * pt.c (tsubst_expr): Likewise.
8019 * cp-tree.h: Declare the various functions in semantics.c.
8020 Provide macros to access _STMT tree nodes.
8021 * cp-tree.def: Add ASM_STMT tree node.
8022 * Makefile.in, Make-lang.in: Add dependencies on and for
8025 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
8027 * pt.c (push_template_decl): Only check primary templates.
8029 * pt.c (check_explicit_specialization): Complain about default args
8030 in explicit specialization.
8032 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
8033 constructor_declarator.
8035 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
8037 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
8038 has no overloaded operator ->.
8040 * call.c (build_field_call): Don't crash when presented with a
8041 field that is actually a nested type.
8043 * decl.c (pushtag): Deal with friend class injection in local
8046 * call.c (build_object_call): Don't crash if OBJ is a
8047 pointer-to-member-function.
8049 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
8051 * pt.c (push_template_decl): Complain about template with C linkage,
8052 anonymous template class.
8054 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
8056 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
8057 * search.c: Likewise.
8059 * lex.c (do_pending_defargs): Only call
8060 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
8062 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
8064 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
8066 * parse.y: Deal with CONSTRUCTORS in new_initializers.
8068 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
8070 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
8071 closely mimics the behavior in parse.y.
8072 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
8073 into a compound statement.
8075 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
8077 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
8078 * pt.c (inline_needs_template_parms): New fn.
8079 (original_template): New fn.
8080 (push_inline_template_parms_recursive): New fn.
8081 (maybe_begin_member_template_processing): Use them.
8082 (maybe_end_member_template_processing): Likewise.
8083 (is_member_or_friend_template): Rename to is_member_template.
8084 Member functions of local classes are never member templates.
8086 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8088 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
8089 added in the class scope to catch redefinition error.
8091 * pt.c (reduce_template_parm_level): Also copy
8092 the DECL_TEMPLATE_PARMS field.
8094 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
8096 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
8097 reduced-level template type parameter.
8099 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
8101 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
8102 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
8103 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
8104 * decl.c (duplicate_decls): Propagate it.
8105 * typeck2.c (abstract_virtuals_error): Use two loops to emit
8106 abstract virtual functions and virtual functions which need a
8107 final overrider separately.
8109 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
8111 * lang-specs.h: Properly put brackets around array elements in
8114 * typeck.c (build_binary_op_nodefault): Correctly place parens around
8115 && and || in expression.
8117 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
8119 * call.c (default_parm_conversions): Remove prototype definition.
8120 (build_method_call): Remove unused variable result.
8122 * cvt.c (ocp_convert): Remove unused variable conversion.
8124 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
8126 * except.c (do_unwind): #if 0 definition of unused variables fcall
8129 * expr.c (extract_scalar_init): #if 0 prototype and function
8132 * init.c (expand_aggr_init_1): Remove unused variable init_type.
8133 (build_new_1): Remove unused variable t.
8135 * pt.c (instantiate_class_template): Remove unused variable newtag;
8136 cast called function return value to void.
8137 (do_decl_instantiation): Remove unused variables name and fn.
8139 * tree.c (get_type_decl): Add default return to shut up compiler from
8140 complaining control reaches end of non-void function.
8142 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
8144 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
8146 * call.c (default_parm_conversions): Remove prototype definition.
8147 (build_method_call): Remove unused variable result.
8148 (build_over_call): Add default case in enumeration switch.
8150 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
8152 * decl2.c (lang_decode_option): Change j's type to size_t.
8154 * tree.c (layout_vbasetypes): record_align and desired_align are of
8155 type unsigned int; const_size and nonvirtual_const_size likewise.
8157 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
8159 * parse.y (new_initializer): Make sure all initializers are
8162 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
8164 * decl2.c (import_export_decl): Mark tinfo functions for
8165 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
8167 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
8169 * method.c: Fix typo.
8171 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8173 * method.c: Include "system.h" to get stdlib.h, stdio.h,
8174 ctype.h, string.h, etc.
8175 (issue_nrepeats): Add default case in enumeration switch.
8176 (check_btype): Likewise.
8177 (process_overload_item): Likewise.
8179 * Makefile.in (method.o): Depend on system.h.
8181 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8183 * lex.c (do_scoped_id): Fix parenthesizing.
8185 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
8187 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
8188 FLAG_RTTI is unset, initialize type info machinery and continue
8189 with FLAG_RTTI enabled.
8190 (get_typeid): Likewise.
8192 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
8194 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
8197 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
8199 * pt.c (finish_member_template_decl): Deal more gracefully with
8200 invalid declarations.
8202 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
8204 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
8205 cp-tree.h: Clean up more old overloading code, old RTTI code, and
8206 some formatting quirks.
8208 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
8209 method.c, pt.c, ptree.c, typeck.c: Remove support for
8210 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
8212 * Makefile.in: Adjust.
8214 * pt.c (unify): Don't allow reduced cv-quals when strict.
8216 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
8217 *type_unification* and unify.
8219 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
8221 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
8222 (nested_name_specifier): And add it before this use.
8223 (typename_sub0): And this use. Also add use without the keyword.
8224 (typename_sub1): Likewise.
8225 * pt.c (instantiate_class_template): Don't actually instantiate
8226 anything if our type uses template parms.
8228 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
8230 * decl.c (start_function): Don't call temporary_allocation for a
8233 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
8235 * pt.c (instantiate_class_template): Don't mess with friends if
8236 our type uses template parms.
8238 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
8240 * parse.y (nested_name_specifier): Use explicit_template_type.
8241 (typename_sub): Allow a template_type, an explicit_template_type,
8242 or an implicit template type at the end.
8243 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
8244 * decl.c (make_typename_type): Handle template-id where the name
8246 * call.c (build_scoped_method_call): Handle member template
8248 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
8249 destructor is represented by the type.
8251 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
8252 * parse.y (nested_name_specifier): Add 'template' case.
8253 (explicit_template_type): New rule.
8254 (typename_sub): Use it.
8255 * decl.c (make_typename_type): Handle getting a template-id for NAME.
8256 * pt.c (tsubst): Likewise.
8258 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
8260 * pt.c (add_to_template_args): Fix thinko.
8261 (instantiate_class_template): Call it later.
8263 * pt.c (get_class_bindings): Add outer_args parm.
8264 (most_specialized_class): Likewise.
8265 (instantiate_class_template): Pass it.
8266 (more_specialized_class): Likewise.
8267 (lookup_template_class): Get context from template if none
8269 (finish_member_template_decl): Don't do anything with a
8270 partial specialization.
8271 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
8273 * class.c (finish_struct): Member class templates have already been
8274 checked for name clashes.
8275 * decl.c (pushdecl_with_scope): Handle pushing at class level.
8277 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
8279 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
8280 (tsubst, *_PARM): Support multiple levels of template classes.
8281 (instantiate_class_template): Look up the pattern from the
8283 (lookup_template_class): Handle getting a template for d1.
8284 (push_template_decl): Correct setting of 'primary'.
8285 (reduce_template_parm_level): Add 'levels' parm.
8286 (finish_member_template_decl): Support member class templates.
8287 (template_class_depth): Handle multiple levels.
8288 * parse.y (component_decl_1, fn.def2): Remove member template case.
8289 (component_decl): Add member template cases.
8290 * decl2.c (check_member_template): We now handle member template
8292 * decl.c (pushtag): Handle member templates.
8293 * method.c (do_inline_function_hair): Don't touch
8294 IDENTIFIER_GLOBAL_VALUE.
8295 * init.c (build_offset_ref): If name isn't an identifier, just
8297 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
8299 * typeck.c (get_delta_difference): Do adjust for conversions to
8300 and from virtual base.
8302 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
8304 * typeck.c (get_delta_difference): Give hard error for conversion
8307 * cp-tree.h: Tweak formatting.
8309 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
8311 * decl.c (push_namespace): Handle redeclaration error.
8313 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
8314 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
8315 (NAMESPACE_BINDING): New macro.
8316 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
8319 * pt.c (push_template_decl): Use innermost_args.
8321 * decl.c (get_unique_name): Tweak from earlier in the name.
8323 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
8325 * cp-tree.def: Add CPLUS_BINDING node.
8326 * cp-tree.h (tree_binding): New struct.
8327 (BINDING_SCOPE, BINDING_VALUE): New macros.
8328 (current_namespace, global_namespace): Declare extern.
8329 (struct lang_decl_flags): New field in_namespace.
8330 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
8331 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
8332 (TREE_INDIRECT_USING): New macro.
8333 * decl2.c (current_namespace, global_namespace): Declare. The
8334 value is a NAMESPACE_DECL now, not a TREE_LIST.
8335 (is_namespace_ancestor, namespace_ancestor): New static functions.
8336 (add_using_namespace, ambiguous_decl): Likewise.
8337 (lookup_using_namespace): New support function for lookup_name.
8338 (qualified_lookup_using_namespace): New support function for
8339 do_scoped_id and lookup_namespace_name.
8340 (get_namespace_id): Mark as obsolete.
8341 (current_namespace_id): Likewise.
8342 (do_namespace_alias): Implement.
8343 (do_using_directive): Implement as call to add_using_namespace.
8344 * decl.c (binding_for_name): New function.
8345 (push_namespace, pop_namespace): Implement.
8346 (push_decl): Don't install a FUNCTION_DECL in the global branch.
8347 (lookup_namespace_name): Implement using qualified lookup.
8348 (lookup_name_real): For global scoping, lookup in
8349 global_namespace. For namespace scoping, lookup in given
8350 namespace. For unscoped lookup, iterate over namespace,
8351 considering using directives.
8352 (init_decl_processing): Initialize global_namespace.
8353 (grokvardecl): Build assembler name as static name for globals.
8354 (grokdeclarator): Remove old namespace mangling.
8355 (xref_tag): When installing a global binding for the
8356 tag, make sure we have an identifier.
8357 * method.c (build_overload_nested_name): Mangle namespaces.
8358 (build_qualified_name): Likewise.
8359 (build_decl_overload_real): Likewise.
8360 * lex.c (build_lang_decl): Set namespace for new declaration to
8362 (do_scoped_id): Find global names in global or current
8363 namespace, or using qualified namespace lookup, depending on
8365 * init.c (build_member_call): When scope is namespace, use
8366 build_x_function_call instead.
8367 (build_offset_ref): When scope is namespace, collapse processing
8368 to lookup_namespace_name instead.
8369 * error.c (dump_decl): Support NAMESPACE_DECL.
8370 * decl.c (pushdecl): Bind globals to current namespace.
8371 (push_overloaded_decl): Likewise.
8372 (lookup_tag): Likewise.
8373 (lookup_name_current_level): Likewise.
8374 (xref_tag): Likewise.
8375 (start_function): Likewise.
8376 * lex.c (do_identifier): Likewise.
8377 (identifier_typedecl_value): Likewise.
8378 (real_yylex): Likewise.
8379 * method.c (do_inline_function_hair): Likewise.
8380 * parse.y (unscoped): Likewise.
8381 * pt.c (check_explicit_specialization): Likewise.
8382 (lookup_template_class): Likewise.
8383 * rtti.c (call_void_fn): Likewise.
8384 * sig.c (build_sigtable): Likewise.
8385 * ptree.c (lang_print_xnode): New function.
8387 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
8389 * pt.c (instantiate_class_template): Don't instantiate if pedantic
8390 and the args use template parms.
8392 * pt.c (push_tinst_level): If the instantiation uses template parms,
8394 * decl.c (xref_basetypes): Do call complete_type for basetypes
8395 that involve template parameters.
8397 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
8399 * typeck2.c (process_init_constructor): Fix labeled init check.
8401 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
8403 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
8404 argument to tsubst and friends.
8406 * pt.c (tsubst, FUNCTION_DECL): Tidy.
8408 * typeck.c (build_x_function_call): Handle static member function
8409 templates like non-templates. Handle friend templates like normal
8411 * pt.c (tsubst, *_PARM): Don't use orig_level.
8412 (get_bindings): Don't call add_to_template_args.
8413 (instantiate_template): Likewise.
8414 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
8415 * ptree.c (print_lang_type): Print index/level for template parms.
8417 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
8419 * Make-lang.in (cc1plus): Note that cc1plus depends on
8420 cp/cp-tree.h and cp/cp-tree.def.
8422 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
8423 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
8424 position in a template parameter list.
8425 * cp-tree.h (template_parm_index): New structure, used as the tree
8426 structure for a TEMPLATE_PARM_INDEX.
8427 (TEMPLATE_PARM_IDX): New macro.
8428 (TEMPLATE_PARM_LEVEL): Likewise.
8429 (TEMPLATE_PARM_DESCENDANTS): Likewise.
8430 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
8431 (TEMPLATE_PARM_DECL): Likewise.
8432 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
8433 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
8434 (TEMPLATE_TYPE_DECL): Likewise.
8435 (TEMPLATE_CONST_IDX): Remove.
8436 (TEMPLATE_CONST_LEVEL): Likewise.
8437 (TEMPLATE_CONST_SET_INFO): Likewise.
8438 (TEMPLATE_TYPE_SET_INFO): Likewise.
8439 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
8441 (TEMPLATE_TYPE_LEVEL): Likewise.
8442 * decl.c (decls_match): Call comp_template_parms, rather than
8443 expanding it inline.
8444 (duplicate_decls): If two template declarations are being merged,
8445 then their TEMPLATE_INFOs should be merged as well.
8446 (grokfndecl): Save template-id information when declaring a friend
8447 with explicit template arguments. Pass arguments to
8448 check_explicit_specialization via correct convention; at some
8449 point check_explicit_specialization changed, but these call-sites
8451 (grokdeclarator): Tidy up slightly.
8452 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
8453 two template functions with the same DECL_ASSEMBLER_NAME the same,
8454 since the names are not yet mangled.
8455 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
8456 TEMPLATE_CONST_PARM.
8457 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
8458 decl for a non-type parameter, rather than printing `<tparm ...>'.
8459 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
8460 (do_friend): Deal with template friends.
8461 * lex.c (do_pending_inlines): Call
8462 maybe_begin_member_template_processing, rather than
8463 conditionally calling begin_member_template_processing.
8464 (process_next_inline): Likewise. Call
8465 maybe_end_member_template_processing, rather than
8466 conditionally calling end_member_template_processing.
8467 (do_pending_defargs): Likewise.
8468 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
8469 TEMPLATE_CONST_PARM.
8470 * method.c (build_mangled_template_parm_index): New function.
8471 (build_overload_value): Use it.
8472 (build_overload_name): Likewise.
8473 * pt.c (finish_member_template_decl): Allow friend declarations.
8474 (template_class_depth): New function.
8475 (is_member_template): Rename, and modify, to become...
8476 (is_member_or_friend_template): New function.
8477 (end_member_template_processing): Rename, and modify, to become...
8478 (maybe_end_member_template_processing).
8479 (build_template_parm_index): New function.
8480 (reduce_template_parm_level): New function.
8481 (process_template_parm): Modify to use build_template_parm_index.
8482 (push_template_decl): Deal with friend templates.
8483 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
8484 TEMPLATE_CONST_PARM.
8485 (tsubst_friend_function): New function.
8486 (instantiate_class_template): Generate the DECL_FRIENDLIST
8487 for a new instantiation by using tsubst_friend_function rather
8489 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
8490 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
8491 appropriate new macros. Use reduce_template_parm_level to
8492 generate lower-level template parameters. Handle tsubst'ing into
8493 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
8494 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
8495 templates. Similarly for the template parameters for a new
8497 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
8498 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
8499 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
8500 (get_bindings): Call add_to_template_args if necessary.
8501 (instantiate_decl): Handle instantiations of friend templates.
8502 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
8503 TEMPLATE_TYPE_PARM as a list of fields; it's not!
8504 * spew.c (yylex): Do a little manual constant propagation to
8507 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
8509 * error.c: Include sys/types.h.
8511 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
8513 * method.c (build_mangled_name): Start CPP directives in column zero.
8515 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
8517 * typeck2.c (process_init_constructor): Sorry about non-trivial
8518 labeled initializers.
8519 * parse.y (initlist): Re-enable labeled initializers.
8521 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8523 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
8524 all callers changed. Rely on the new parameter instead of arg
8525 being a TREE_LIST when determine whether we are working inside
8526 template template parameter. Clean up is_type test.
8528 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
8530 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
8531 * typeck2.c (initializer_constant_valid_p): Allow conversions
8532 between pointers and references.
8534 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
8536 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
8537 if pedantic || warn_pointer_arith.
8539 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8541 * pt.c (unify): Handle TEMPLATE_DECL.
8543 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
8545 * cp-tree.h (strip_attrs): Remove decl.
8547 1998-02-18 Doug Evans <devans@cygnus.com>
8549 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
8550 Update olddecl's attributes too.
8551 (strip_attrs): Remove function.
8552 * typeck.c (common_type): Call merge_machine_type_attributes.
8554 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
8556 * parse.y (initdcl0_innards): New grammar symbol.
8557 (nomods_initdecls, nomods_initdcl0): Change type from itype to
8558 none, since the resulting value is never used.
8559 (parse_decl): New function.
8560 (datadef): Remove redundant actions.
8561 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
8562 * parse.c: Regenerated.
8564 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
8566 * parse.y (simple_stmt): Use getdecls() to check for decl.
8568 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
8570 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
8572 (c++.install-common): Install c++filt properly as native or as cross
8574 (c++.uninstall): Add c++filt.
8576 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
8578 * call.c (standard_conversion): Fix multi-level ptr conversions.
8580 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
8582 * init.c (build_new): Propagate error_mark_node up.
8584 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
8586 * parse.y (simple_stmt): If the condition isn't a declaration,
8587 start the controlled block after the test.
8589 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8591 * call.c (build_over_call): Convert builtin abs, labs and fabs to
8593 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
8596 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
8598 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
8600 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
8602 * cp-tree.h: Add access_protected_virtual_node.
8603 * class.c (init_class_processing): Initialize it.
8604 * decl.c (xref_basetypes): Use it.
8605 * parse.y (base_class_access_list): Likewise.
8607 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
8608 (c++.install-common): Install c++filt.
8610 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8612 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
8614 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
8616 * call.c (reference_binding): Use comptypes when comparing
8617 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
8619 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
8621 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
8622 (really_overloaded_fn): Move check here from is_overloaded_fn.
8623 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
8625 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
8627 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
8630 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
8632 * cp-tree.h (push_template_decl): Return the decl passed in, or an
8633 equivalent duplicate.
8634 * decl.c (pushtag): Use the return value from push_template_decl.
8635 (duplicate_decls): When duplicating a template declaration, merge
8636 the DECL_TEMPLATE_RESULTs as well.
8637 (make_implicit_typename): Don't try to dive into typename types to
8638 find a context for making a new implicit typename.
8639 (start_decl): Use the return value from push_template_decl.
8640 (grokdeclarator): Complain about declarations list `const operator
8641 int'. Since we don't correctly handle in-class initializations of
8642 non-static data members, complain about this (now illegal)
8643 practice. Issue an error for initializations of non-const statics
8644 since that is illegal as well, and since we don't handle that case
8646 (start_function): Use the return value from push_template_decl.
8647 (start_method): Likewise.
8648 * decl2.c (grokfield): Likewise. Since the change to
8649 grokdeclarator ensures that all initialized fields are in fact
8650 static, remove a redundant test for TREE_PUBLIC.
8651 * parse.y (initlist): Disable labeled initializers since they do
8652 not work as per the documentation, and since they do not use the
8653 same syntax as the C front end.
8654 * pt.c (push_template_decl): Return the decl passed in, or an
8655 equivalent duplicate.
8656 (lookup_template_class): When searching in a nested context,
8657 use the right arguments.
8658 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
8659 * typeck.c (build_component_ref): Assign the correct type to the
8660 result of build_vfn_ref.
8662 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
8664 * pt.c (convert_nontype_argument): Fix typo.
8665 (check_explicit_specialization): Allow old-style specialization
8666 of class template members.
8668 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8669 Manfred Hollstein <manfred@s-direktnet.de>
8671 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
8672 when deciding to override DECL_ASSEMBLER_NAME.
8674 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
8676 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
8677 * cp-tree.h (flag_do_squangling): Add declaration.
8678 * lang-options.h: Add -fsquangle and -fno-squangle.
8679 * method.c: Add macros and static variables for squangling.
8680 (build_overload_name): Rename to build_mangled_name, add logic for B
8681 compression, and split into process_modifiers and
8682 process_overload_item.
8683 (process_modifiers): New function, to handle constant, reference,
8685 (process_overload_item): New function, handles issue of type codes.
8686 (build_overload_name): New function, start squangling and call
8688 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
8689 (start_squangling): New function to initialize squangling structs.
8690 (end_squangling): New function to destroy squangling structs.
8691 (nrepeats): Rename variable to Nrepeats.
8692 (issue_nrepeats): New function for issuing 'n' type repeats.
8693 (check_ktype): New function to check for type K name compression.
8694 (build_overload_nested_name): Add a check for K name compression.
8695 (build_qualified_name): Add a check for K name compression and don't
8696 use DECL_ASSEMBLER_NAME when squangling is on.
8697 (check_btype): New function, checks for B type compression.
8698 (build_static_name, build_decl_overload_real): Initiate squangling.
8699 (build_typename_overload, build_overload_with_type): Initiate
8702 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
8704 * method.c (make_thunk): Avoid name buffer overflow.
8706 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
8708 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
8709 don't define them yet.
8711 * parse.y (nomods_initdcl0): Add constructor_declarator case.
8713 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8715 * config-lang.in (diff_excludes): Use basename only.
8717 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
8719 * tinfo2.cc: Add tinfo for signed char.
8721 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
8723 * search.c (compute_access): Handle protected constructors in derived
8724 classes as accessible.
8726 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8728 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
8729 Call convert_from_reference sooner.
8731 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
8733 * cvt.c (ocp_convert): Obtain the constant values from constant
8734 decls even if the destination type is the same as the type of the
8737 * decl2.c (finish_file): Make sure that static inlines with
8738 definitions are not marked DECL_EXTERNAL before returning.
8740 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
8742 * decl.c: Lose arg_looking_for_template.
8743 (lookup_name_real): Likewise.
8744 * parse.y: Lose processing_template_arg, template_arg1.
8745 (primary): Likewise.
8746 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
8748 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8750 * error.c (dump_decl): Fix type of default arguments for template
8751 template parameters and nontype template parameters.
8752 * parse.y (template_parm): Handle invalid default template
8753 template arguments here.
8755 * parse.y (template_parm): Use template_arg instead of PTYPENAME
8756 for default template template argument.
8757 * pt.c (coerce_template_parms): Merge default template argument
8758 codes. Can treat RECORD_TYPE as template name if it is implicitly
8759 created. Fix argument index in error message.
8760 * typeck.c (comptypes): Merge template argument comparison codes in
8761 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
8763 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
8765 * lex.c (file_name_nondirectory): Also check for '/'.
8767 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
8769 * parse.y (primary): Deal with statement-expressions in
8771 * pt.c (tsubst_copy): Handle BIND_EXPR.
8772 * tree.c (mapcar): Likewise.
8774 * call.c (add_template_candidate_real): Pass extra parameter to
8775 fn_type_unification.
8776 * cp-tree.h (fn_type_unification): Add parameter.
8777 * pt.c (fn_type_unification): Add additional parameter to deal with
8778 static member functions.
8779 (get_bindings): Deal with static member functions.
8781 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
8782 (revert_static_member_fn): Declare.
8783 * decl.c (revert_static_member_fn): Remove declaration. Change
8784 linkage from internal to external.
8785 (cp_finish_decl): Deal with virtual functions in classes local to
8787 * decl2.c (finish_file): Don't forget to emit increment/decrement
8788 expressions in initializers for file-scope variables.
8789 * parse.y (typename_sub2): If the typename doesn't names a
8790 template, rather than a type, issue an error message.
8791 * pt.c (check_explicit_specialization): Handle specializations of
8792 static member functions.
8793 (coerce_template_parms): Handle offset references to lists of
8795 * search.c (note_debug_info_needed): Don't crash when handed a
8796 type which is being defined.
8797 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
8798 that can happen with some illegal code.
8800 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8802 * call.c (user_harshness): Initialize `code' to 0.
8803 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
8804 (null_ptr_cst_p): Add parentheses around && within ||.
8805 (standard_conversion): Likewise.
8806 (z_candidate): Likewise.
8807 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
8808 (build_object_call): Likewise for `mem_args'.
8809 (build_new_op): Likewise for `mem_arglist'. Add `return' from
8810 default case in enumeration switch.
8812 * class.c (build_vtable_entry): Add explicit braces to avoid
8814 (build_class_init_list): Likewise.
8815 (finish_struct_1): Initialize `width' to 0.
8816 (instantiate_type): Initialize `name' to NULL_TREE. Add
8817 explicit braces to avoid ambiguous `else'.
8819 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
8822 * decl.c (grok_reference_init): Eliminate unused parameter, all
8824 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
8825 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
8826 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
8827 (grokdeclarator): Add parentheses around && within ||. Add
8828 explicit braces to avoid ambiguous `else'.
8829 (grokparms): Initialize `type' to NULL_TREE.
8830 (xref_tag): Remove unused label `just_return'.
8831 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
8832 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
8833 (hack_incomplete_structures): Add parentheses around assignment
8834 used as truth value.
8836 * decl2.c (coerce_delete_type): Hide definition of `e3'.
8838 * error.c: Include <stdlib.h>.
8839 (dump_expr): Change the type of `i' to size_t. Remove unused
8842 * except.c (init_exception_processing): Remove unused variable `d'.
8843 (expand_throw): Likewise for `label'.
8845 * friend.c (add_friends): Add explicit braces to avoid ambiguous
8848 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
8849 (sort_base_init): Likewise for `binfo'.
8850 (expand_member_init): Likewise for `rval'.
8851 (build_member_call): Add parentheses around assignment used as
8853 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
8854 (build_new): Initialize `nelts' to NULL_TREE. Initialize
8855 `old_immediate_size_expand' to 0.
8856 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
8857 (build_vec_delete_1): Remove unused variable `block'.
8858 (expand_vec_init): Initialize `itype' to NULL_TREE.
8860 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
8861 declaration of `index' and `rindex' with autoconf macros.
8862 (reinit_parse_for_expr): Remove unused variables
8863 `look_for_semicolon' and `look_for_lbrac'.
8864 (cons_up_default_function): Initialize `args' to NULL_TREE.
8865 (readescape): Initialize `firstdig' to 0.
8866 (real_yylex): Add parentheses around assignment used as truth value.
8868 * method.c: Include <strings.h> if we don't have <string.h>.
8869 Protect declaration of `index' with autoconf macro.
8871 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
8872 Initialize `type' to NULL_TREE.
8873 (structsp): Remove unused variable `id'.
8875 * pt.c (coerce_template_parms): Add explicit braces to avoid
8877 (lookup_template_class): Initialize `template' to NULL_TREE.
8878 (instantiate_class_template): Remove unused variable `name' and `e'.
8879 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
8880 (do_poplevel): Initialize `saved_warn_unused' to 0.
8881 (type_unification): Remove unused varable `parm'.
8882 (unify): Likewise for `j'.
8884 * repo.c (init_repo): Add parentheses around assignment used as
8886 (finish_repo): Remove unused varable `p'.
8888 * search.c (get_binfo): Initialize `type' to NULL_TREE.
8889 (get_base_distance): Likewise.
8890 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
8891 and `new_v' to NULL_TREE.
8892 (lookup_fnfields): Likewise for `rval_binfo_h'.
8893 (breadth_first_search): Add parentheses around assignment used as
8895 (get_template_base): Initialize `type' to NULL_TREE.
8897 * sig.c (append_signature_fields): Initialize `last_mfptr' to
8899 (build_signature_table_constructor): Likewise for
8900 `last_rhs_field', `pfn' and `vt_off'.
8901 (build_sigtable): Likewise for `init'.
8903 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
8904 (propagate_binfo_offsets): Likewise for `delta'.
8905 (hash_tree_cons): Initialize hashcode to 0.
8906 (can_free): Likewise for `size'.
8907 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
8909 * typeck.c (convert_sequence): Hide prototype.
8910 (common_type): Add explicit braces to avoid ambiguous `else'.
8911 (comp_target_types): Likewise.
8912 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
8913 (build_function_call_real): Add explicit braces to avoid ambiguous
8915 (convert_arguments): Initialize `called_thing' to 0.
8916 (convert_for_initialization): Initialize `savew' and `savee' to 0.
8918 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
8919 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
8920 (build_x_arrow): Likewise for `last_rval'.
8922 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
8924 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
8926 * decl.c (init_decl_processing): Use set_sizetype.
8927 * decl2.c (sizetype): Don't declare.
8928 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
8929 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
8930 (build_component_addr, unary_complex_lvalue): Likewise.
8931 * rtti.c (expand_class_desc): Likewise.
8932 * class.c (get_vfield_offset): Likewise.
8934 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
8936 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
8937 early to avoid bogus error. Handle overloaded function
8938 names provided as template arguments correctly.
8939 (coerce_template_parms): Don't mishandle overloaded functions when
8940 dealing with template template parameters.
8941 (lookup_template_class): Issue an error message, rather than
8942 crashing, when the TYPE_DECL provided is not a template type.
8944 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
8946 * class.c (instantiate_type): Don't just return a known type if
8949 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
8951 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
8952 since that code could never be reached.
8954 * error.c (dump_decl): Avoid aborting in the midst of printing an
8955 error message about an illegal template declaration.
8957 * parse.y (structsp): Print an error message, rather than crashing,
8958 when a class-head does not name a class.
8960 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
8961 template arguments as a g++ extension.
8963 * cp-tree.def (ALIGNOF_EXPR): New tree code.
8964 * decl2.c (grok_alignof): If processing_template_decl, just store
8966 * typeck.c (c_alignof): Likewise.
8967 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
8968 * error.c (dump_expr): Likewise.
8969 * pt.c (tsubst_copy): Likewise.
8970 * tree.c (cp_tree_equal): Likewise.
8971 * pt.c (uses_template_parms): Correctly determine whether or not a
8972 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
8973 folding can be done.
8975 * cp-tree.h (grok_enum_decls): Remove type parameter.
8976 * decl.c (grok_enum_decls): Likewise.
8977 * decl2.c (grok_x_components): Call grok_enum_decls
8978 unconditionally, since it will do nothing if there is no
8979 current_local_enum. Use the new calling sequence.
8980 * pt.c (tsubst_enum): Use the new calling sequence for
8983 * decl.c (start_function): Make member functions of local classes
8984 in extern inline functions have comdat linkage here...
8985 (grokdeclarator): Rather than here.
8987 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
8989 * pt.c (convert_nontype_argument): Use decl_constant_value.
8991 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
8993 * call.c (add_template_candidate_real): New function.
8994 (add_template_candidate): Use it.
8995 (add_template_conv_candidate): Likewise.
8996 (joust): Pass extra argument to more_specialized.
8997 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
8998 (is_local_class): Remove.
8999 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
9000 * cp-tree.h (is_local_class): Remove.
9001 (perform_array_to_pointer_conversion): Likewise.
9002 (finish_member_template_decl): Add.
9003 (check_explicit_specialization): Return a tree, not an int.
9004 (more_specialized): Take additional argument.
9005 (get_bindings): Likewise.
9006 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
9007 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9008 (perform_array_to_pointer_conversion): Remove.
9009 * decl.c (saved_scope): Add processing_specialization,
9010 processing_explicit_instantiation fields.
9011 (maybe_push_to_top_level): Save them.
9012 (pop_from_top_level): Restore them.
9013 (grokfndecl): Use new return value from
9014 check_explicit_specialization.
9015 (start_decl): Don't check flag_guiding_decls before pushing
9017 (cp_finish_decl): Remove previous (bogus) change.
9018 (grok_declarator): Use decl_function_context rather than
9020 * decl2.c (finish_file): Pass extra argument to get_bindings.
9021 (build_expr_from_tree): Let build_x_component_ref check
9022 validity of arguments rather than doing it here.
9023 * lex.c (cons_up_default_function): Remove code fooling with
9024 processing_specialization, processing_explicit_instantiation
9025 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
9026 * method.c (build_overload_identifier): Mangle local classes in
9027 template functions correctly.
9028 * parse.y (finish_member_template_decl): Move to pt.c.
9029 * pt.c (finish_member_template_decl): Moved here from parse.y.
9030 (print_candidates): New function.
9031 (determine_specialization): Change interface. Properly look for
9032 most specialized versions of template candidates.
9033 (check_explicit_specialization): Fully process explicit
9035 (push_template_decl): Avoid looking at CLASSTYPE fields in
9037 (determine_overloaded_function): Remove.
9038 (convert_nontype_argument): Change name from
9039 convert_nontype_parameter. Use determine_overloaded_function
9040 instead of instantiate_type.
9041 (mangle_class_name_for_template): Handle type contexts as well as
9043 (classtype_mangled_name): Likewise.
9044 (lookup_template_class): Likewise.
9046 (more_specialized): Take explict template arguments as a
9048 (most_specialized): Likewise.
9049 (get_bindings): Likewise. Check that return types match before
9050 proclaiming a function a match.
9051 (do_decl_instantiation): Remove code searching for function to
9052 instantiate; that is now done in check_explicit_specialization.
9053 (add_maybe_template): Pass extra argument to get_bindings.
9054 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
9056 * typeck.c (build_component_ref): Check for invalid arguments.
9058 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
9060 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
9061 return_target and call_target are equivalent.
9063 * pt.c (type_unification_real): Just accept function parms that
9064 don't use any template parms.
9066 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
9068 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
9069 unset DECL_NOT_REALLY_EXTERN.
9071 * parse.y (typename_sub*): Fix std::.
9073 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
9075 * error.c (dump_decl): Fix type default template args.
9076 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
9078 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
9080 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
9081 (file_name_nondirectory): Use.
9083 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9085 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
9086 that are not really present. Substitute default arguments in
9087 template template arguments. Correctly convert TEMPLATE_DECL to
9088 TEMPLATE_TEMPLATE_PARM.
9089 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
9090 are no longer treated specially here.
9091 * parse.y (template_template_parm): Fix copy error.
9092 * decl.c (grokdeclarator): Warn about missing `typename' for nested
9093 type created from template template parameters.
9094 * parse.y (bad_parm): Likewise
9096 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
9097 (push_nested_class): Likewise.
9098 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
9099 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
9100 (copy_template_template_parm): Declare.
9101 * decl.c (arg_looking_for_template): New variable.
9102 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
9103 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
9104 node if arg_looking_for_template is nonzero.
9105 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
9106 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
9107 (grokdeclarator): Handle TEMPLATE_DECL.
9108 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
9109 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
9110 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
9111 (dump_decl): Handle unnamed template type parameters.
9112 Handle template template parameters.
9113 (dump_function_name): Handle template template parameters.
9114 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
9115 Handle TEMPLATE_TEMPLATE_PARM.
9116 * method.c (build_template_template_parm_names): New function.
9117 (build_template_parm_names): Handle TEMPLATE_DECL.
9118 (build_overload_nested_name, build_overload_name):
9119 Handle TEMPLATE_TEMPLATE_PARM.
9120 * parse.y (maybe_identifier): New nonterminal.
9121 (template_type_parm): Use it.
9122 (template_template_parm, template_arg1): New nonterminal.
9123 (template_parm): Add template_template_parm rules.
9124 (template_arg): Set processing_template_arg.
9125 (template_arg1): Rules moved from template_arg.
9126 (primary, nonnested_type): Set arg_looking_for_template if we are
9127 processing template arguments.
9128 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
9129 (process_template_parm): Handle template template parameters.
9130 (coerce_template_parms, comp_template_args): Likewise.
9131 (mangle_class_name_for_template, lookup_template_class): Likewise.
9132 (uses_template_parms): Handle TEMPLATE_DECL and
9133 TEMPLATE_TEMPLATE_PARM.
9134 (current_template_args): Handle TEMPLATE_DECL.
9135 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
9136 * search.c (dfs_walk, dfs_record_inheritance):
9137 Handle TEMPLATE_TEMPLATE_PARM.
9138 * tree.c (copy_template_template_parm): New function.
9139 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
9140 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
9142 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
9144 * decl.c (start_decl): Don't allow duplicate definitions of static
9147 * call.c (build_user_type_conversion_1): Handle user-defined
9148 template conversion operators correctly.
9150 * decl2.c (build_expr_from_tree): Issue an error message if the
9151 object in a COMPONENT_REF is a TEMPLATE_DECL.
9153 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
9155 * class.c (is_local_class): New function.
9156 * cp-tree.h (is_local_class): Declare it.
9157 (last_tree): Likewise.
9158 (begin_tree): Likewise.
9159 (end_tree): Likewise.
9160 (lookup_template_class): Change prototype.
9161 * decl.c (cp_finish_decl): Check for NULL where necessary.
9162 Consider FUNCTION_DECLS to declare objects with top-level binding,
9163 when calling make_decl_rtl.
9164 (grokdeclarator): Give members of local classes internal linkage.
9165 (start_function): Remove declaration of last_tree.
9166 (finish_function): Set flag_keep_inline_functions around call to
9167 rest_of_compilation if we are processing a member function in a
9169 (start_method): Call push_template_decl for member functions of
9170 local classes in template functions.
9171 * decl2.c (import_export_decl): Don't give external linkage to
9172 instantiations of templates with internal linkage.
9173 * parse.y (last_tree): Remove declaration.
9174 (template_type): Pass extra parameter to lookup_template_class.
9175 (self_template_type): Likewise.
9176 (structsp): Move call to reset_specialization into left_curly.
9177 (left_curly): Call reset_specialization, and begin_tree.
9178 * pt.c (saved_trees): New variable.
9179 (mangle_class_name_for_template): Change prototype. Use
9180 additional function context to name local classes in templates
9182 (classtype_mangled_name): Pass the context.
9183 (push_template_decl): Handle local classes and templates, and
9184 member functions for such classes.
9185 (convert_nontype_parameter): Fix handling of pointer-to-member
9187 (lookup_template_class): Handle local classes in templates.
9188 (tsubst): Likewise. Don't assume that template instantiations
9189 have external linkage; pay attention to the template declaration.
9190 (mark_decl_instantiated): Likewise.
9191 (begin_tree): New function.
9192 (end_tree): Likewise.
9194 * decl.c (xref_basetypes): Don't call complete_type for basetypes
9195 that involve template parameters; that can lead to infinite
9196 recursion unnecessarily.
9198 * pt.c (register_specialization): Do not register specializations
9199 that aren't ready to be registered yet.
9200 (check_explicit_specialization): Handle explicit specialization of
9201 constructors and destructors.
9202 (build_template_decl): New function.
9203 (push_template_delc): Handle out-of-class specializations of
9206 * pt.c (check_explicit_specialization): Set up the template
9207 information before registering the specialization.
9208 (coerce_template_parms): Fix thinko.
9209 (tsubst): Handle specializations of member templates correctly.
9211 * class.c (finish_struct_methods): Remove calls to
9212 check_explicit_specialization from here.
9213 (finish_struct): And insert them here.
9214 * cp-tree.h (perform_qualification_conversions): New function.
9215 (perform_array_to_pointer_conversion): Likewise.
9216 (begin_explicit_instantiation): Likewise.
9217 (end_explicit_instantiation): Likewise.
9218 (determine_specialization): Renamed from
9219 determine_explicit_specialization.
9220 (comp_template_parms): New function.
9221 (processing_explicit_instantiation): New variable.
9222 * cvt.c (perform_qualification_conversions): New function.
9223 (perform_array_to_pointer_conversion): Likewise.
9224 * decl.c (duplicate_decls): Don't consider template functions
9225 alike unless they have the same parameters. Refine handling of
9226 instantiation/specialization mismatches.
9227 (start_decl): Don't call pushdecl for template specializations,
9228 since they don't affect overloading.
9229 (start_function): Likewise.
9230 (grokfndecl): Call check_explicit_specialization a little later.
9231 Don't call duplicate_decls for memberm template specializations.
9232 (grokdeclarator): Don't update template_count for classes that are
9233 themselves specializations. Remove use of `2' as parameter to
9234 grokfndecl since that value isn't used.
9235 * lex.c (cons_up_default_function): Save and restore
9236 processing_explicit_instantiation around calls to grokfield.
9237 * parse.y (finish_member_template_decl): New function.
9238 (component_decl_1): Use it.
9239 (fn.def2): Likewise.
9240 (template_arg_list_opt): New nonterminal.
9241 (template_type): Use it.
9242 (self_template_type): Likewise.
9243 (template_id): Likewise.
9244 (object_template_id): Likewise.
9245 (notype_template_declarator): Likwise.
9246 (begin_explicit_instantiation): Likewise.
9247 (end_explicit_instantiation): Likewise.
9248 (explicit_instantiation): Use them.
9249 * pt.c (coerce_template_parms): Add parameters.
9250 (processing_explicit_instantiation): New variable.
9251 (convert_nontype_parameter): New function.
9252 (determine_overloaded_function): Likewise.
9253 (begin_explicit_instantiation): Likewise.
9254 (end_explicit_instantiation): Likewise.
9255 (retrieve_specialization): Likewise.
9256 (register_specialization): Likewise.
9257 (processing_explicit_specialization): Removed.
9258 (determine_specialization): Handle specializations of member
9259 functions of template class instantiations.
9260 (check_explicit_specialization): Refine to conform to standard.
9261 (comp_template_parms): New function.
9262 (coerce_template_parms): Call convert_nontype_parameter.
9263 (tsubst): Refine handling of member templates. Use
9264 register_specialization.
9265 (instantiate_template): Use retrieve_specialization.
9266 (do_decl_instantiation): Likewise.
9267 (instantiate_decl): Likewise.
9268 (type_unification): Improve handling of explict template
9270 * tree.c (mapcar): Return error_mark_node, rather than aborting,
9271 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
9272 * typeck.c (build_unary_op): Call determine_specialization, rather
9273 than determine_explicit_specialization.
9275 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
9277 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
9279 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9281 * error.c (dump_decl): For enum tags, output the tag, not its value.
9283 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
9285 * decl.c (init_decl_processing): Only call init_rtti_processing
9288 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
9290 * init.c (build_new_1): Split out from build_new.
9291 (build_new): Just return a NEW_EXPR.
9292 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
9294 * decl2.c (get_temp_regvar): Tweak.
9296 * cp-tree.h (TREE_CALLS_NEW): Comment out.
9297 * class.c (resolves_to_fixed_type_p): Remove use.
9298 * method.c (build_opfncall): Likewise.
9299 * call.c (build_new_op): Likewise.
9301 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9303 * exception.cc (__eh_alloc, __eh_free): New fns.
9304 (__cp_push_exception, __cp_pop_exception): Use them.
9305 (__uncatch_exception): Call terminate here if no exception.
9306 * except.c (build_terminate_handler): New fn.
9307 (expand_start_catch_block): Use it.
9308 (expand_exception_blocks): Likewise.
9309 (alloc_eh_object): New fn.
9310 (expand_throw): Use it. Protect exception init with terminate.
9311 * typeck.c (build_modify_expr): Remove code that ignores trivial
9314 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9316 * call.c (add_builtin_candidate): Add default case in enumeration
9318 (build_new_op): Likewise.
9319 (convert_like): Likewise.
9320 * cvt.c (build_expr_type_conversion): Likewise.
9321 * tree.c (real_lvalue_p): Likewise.
9322 (lvalue_p): Likewise.
9323 (cp_tree_equal): Likewise.
9324 * typeck.c (comptypes): Likewise.
9325 (build_component_ref): Likewise.
9326 (build_function_call_real): Likewise.
9327 (build_binary_op_nodefault): Likewise.
9328 (build_unary_op): Likewise.
9329 (build_modify_expr): Likewise.
9330 * typeck2.c (initializer_constant_valid_p): Likewise.
9332 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
9334 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
9336 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
9338 * pt.c (coerce_template_parms): Make sure to digest_init if
9341 * decl.c (duplicate_decls): Make the newdecl virtual if the
9342 olddecl was, just as is done with other attributes of olddecl.
9344 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
9346 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
9347 address of an OFFSET_REF.
9349 * cp-tree.def: Add AGGR_INIT_EXPR.
9350 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
9351 AGGR_INIT_EXPR where appropriate.
9352 * expr.c (cplus_expand_expr): Likewise. Simplify.
9354 * decl2.c (finish_file): Remove call to register_exception_table.
9356 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9358 * pt.c (instantiate_class_template): Don't do injection when
9359 processing_template_decl is true, as pollutes current_binding_level
9362 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
9364 * pt.c (maybe_fold_nontype_arg): Add prototype.
9366 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9368 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
9369 * error.c (dump_expr): Likewise.
9371 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9373 * typeck.c (build_function_call_real): Remove "inline called before
9374 definition" pedwarn.
9376 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
9378 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9380 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
9382 * pt.c (type_unification_real): Change __null to type void* with
9385 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
9387 * call.c (implicit_conversion): Don't call
9388 build_user_type_conversion_1 with a NULL expr, since it will
9391 * pt.c (unify): Don't try to unify array bounds if either array is
9394 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9396 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
9397 Replace extern decls with casts.
9399 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
9400 Update last_parm_cleanup_insn.
9401 (store_after_parms): Remove.
9402 * cp-tree.h: Adjust.
9404 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9406 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
9407 (finish_file): Check DECL_COMDAT instead of weak|one_only.
9408 (import_export_vtable): Use make_decl_one_only instead of
9409 comdat_linkage for win32 tweak.
9410 (import_export_decl): Likewise.
9411 * pt.c (mark_decl_instantiated): Likewise.
9413 * decl2.c (finish_file): Lose handling of templates in pending_statics.
9415 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
9417 * decl2.c (finish_file): Lose call to expand_builtin_throw.
9418 * except.c (expand_builtin_throw): Remove.
9419 * cp-tree.h: Remove ptr_ptr_type_node.
9422 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
9424 * decl.c (ptr_ptr_type_node): Define.
9425 (init_decl_processing): Initialize it.
9426 * cp-tree.h: Declare it.
9427 * exception.cc (__cp_exception_info): Use __get_eh_info.
9428 (__cp_push_exception): Likewise.
9429 (__cp_pop_exception): Likewise.
9431 From Scott Snyder <snyder@d0sgif.fnal.gov>:
9432 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
9434 (init_exception_processing): Removed saved_pc initialization.
9436 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
9438 * pt.c (instantiate_decl): Defer all templates but inline functions.
9440 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9442 * init.c (expand_vec_init): Don't fold a list of parameters.
9444 * decl.c (copy_args_p): Handle copy elision for types with virtual
9446 * call.c (build_over_call): Likewise.
9448 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
9450 * pt.c (lookup_template_function): Copy the template arguments,
9451 not just the list containing them, to the permanent obstack.
9453 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9455 * except.c (expand_start_catch_block): suspend_momentary for the
9458 * error.c (dump_decl): Handle LOOKUP_EXPR.
9460 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
9462 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
9463 permanent obstack if we are processing a template decl.
9464 * typeck.c (build_static_cast): Likewise.
9465 (build_const_cast): Likewise.
9466 (build_reinterpret_cast): Likewise.
9468 * pt.c (coerce_template_parms): Coerce some expressions, even
9469 when processing_template_decl.
9471 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9473 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
9474 handling of pointer difference expressions.
9476 * typeck.c (comp_target_types): Comparison of function/method types
9477 is independent of nptrs.
9479 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
9481 * pt.c (tsubst): Avoid creating pointer to reference and
9482 reference to reference types.
9484 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9486 * parse.y (do_id): New nonterminal.
9487 (template_id): Use it.
9489 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
9491 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
9492 * spew.c (yylex): Don't do_identifier here.
9493 * decl2.c (build_expr_from_tree): Revert last change.
9495 * decl2.c (build_expr_from_tree): Expand the name for a method call.
9496 * parse.y (object_template_id): Don't try to take the DECL_NAME.
9498 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
9500 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
9502 * call.c (build_op_delete_call): Adjust.
9504 * except.c (expand_end_catch_block): Lose rethrow region.
9505 (expand_start_catch_block): Likewise.
9506 (expand_end_catch_block): Don't expand_leftover_cleanups.
9508 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9510 * pt.c (tsubst): Remove tree_cons call (places redundant info into
9511 DECL_TEMPLATE_INSTANTIATION).
9513 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
9515 * tree.c (is_overloaded_fn): Handle getting a fn template.
9516 (really_overloaded_fn): Likewise.
9517 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
9518 * pt.c (check_explicit_specialization): Tweak.
9519 (determine_explicit_specialization): Tweak.
9521 * tree.c, cp-tree.h (get_target_expr): New fn.
9523 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
9525 * pt.c (check_explicit_specialization): Fix misspelling in
9526 diagnostic: `preceeded'.
9527 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
9530 1997-12-02 Mark Mitchell <mmitchell@usa.net>
9532 * pt.c (determine_explicit_specialization): Avoid an internal
9533 error for bad specializations.
9535 * method.c (build_overload_value): Handle SCOPE_REF.
9537 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
9539 * class.c (prepare_fresh_vtable): Enable even more complex MI
9542 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
9544 * exception.cc (__check_eh_spec): Optimize a bit.
9546 * exception.cc (__cp_pop_exception): Lose handler arg.
9547 * except.c (do_pop_exception): Likewise.
9548 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
9549 (expand_end_catch_block): Likewise.
9551 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9553 * pt.c (check_explicit_specialization): Complain about using a
9554 template-id for a non-specialization.
9556 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
9558 * repo.c: Prototype rindex only if needed.
9561 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9563 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
9565 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9567 * typeck.c (build_const_cast): Handle references here instead of
9568 handing off to convert_to_reference.
9570 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
9571 TerminateFunctionCall.
9572 (init_exception_processing): Likewise. Terminate et al are now
9573 the fns, not ADDR_EXPRs.
9574 (various): Lose redundant assemble_external calls.
9575 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
9577 * cp-tree.h (struct lang_decl_flags): Add comdat.
9578 (DECL_COMDAT): New macro.
9579 * decl.c (duplicate_decls): Propagate it.
9580 (cp_finish_decl): Handle it.
9581 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
9583 * class.c: Remove static pending_hard_virtuals.
9584 (add_virtual_function): Take pointers to pending_virtuals
9585 and pending_hard_virtuals.
9586 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
9588 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
9590 * decl2.c (import_export_vtable): If we support one_only but not
9591 weak symbols, mark instantiated template vtables one_only.
9592 (import_export_decl): Likewise for tinfo functions.
9593 (finish_vtable_vardecl): Also write out vtables from explicitly
9594 instantiated template classes.
9595 * pt.c (mark_class_instantiated): Revert last change.
9597 * except.c (expand_throw): Call mark_used on the destructor.
9599 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
9601 * lex.c (lang_init): Enable flag_exceptions by default if no
9602 command line switch was specified.
9604 1997-11-26 Mark Mitchell <mmitchell@usa.net>
9606 * pt.c (unify): Handle `void' template parameters in
9609 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
9611 * rtti.c (build_dynamic_cast): Handle template case here.
9612 (build_dynamic_cast_1): Not here.
9614 * typeck2.c (digest_init): Make copies where appropriate.
9616 * decl2.c (delete_sanity): resolve_offset_ref.
9618 * except.c: Call terminate without caching so many bits.
9620 * except.c (expand_start_catch_block): Fix catching a reference
9623 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
9625 * init.c (build_new): Copy size to the saveable obstack.
9627 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
9628 TRY_CATCH_EXPR for now.
9630 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
9632 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
9633 has DECL_LANG_SPECIFIC.
9635 * exception.cc (struct cp_eh_info): Add handlers field.
9636 (__cp_push_exception): Initialize it.
9637 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
9638 (__throw_bad_exception): Remove.
9639 * except.c (call_eh_info): Add handlers field.
9640 (get_eh_handlers): New fn.
9641 (push_eh_cleanup): Increment handlers.
9643 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9645 * except.c (expand_start_eh_spec): Use the try/catch code.
9646 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
9647 doing everything inline.
9648 (init_exception_processing): throw_type_match now takes
9649 const void pointers.
9650 * exception.cc (__check_eh_spec): New fn.
9651 * inc/exception: Neither terminate nor unexpected return.
9652 * decl.c: Make const_ptr_type_node public.
9653 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
9655 * except.c (expand_start_catch_block): We only need the rethrow
9656 region for non-sjlj exceptions.
9657 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
9659 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
9661 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
9662 (various.o): Likewise.
9663 * inc/new: Add placement deletes. Add throw specs for default new.
9664 * new.cc (set_new_handler): Move here from libgcc2.
9665 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
9666 (new): Move from libgcc2. Throw bad_alloc.
9667 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
9668 * decl.c (init_decl_processing): Update exception specs on new and
9671 * method.c (build_decl_overload_real): Don't mess with global
9674 * init.c (build_new): Check for null throw spec, not nothrow_t.
9676 * decl.c (duplicate_decls): Don't complain about different exceptions
9677 from an internal declaration.
9679 * call.c (build_op_delete_call): Fix check for member fns again.
9681 * decl2.c (import_export_decl): Interface hackery affects
9682 virtual synthesized methods.
9684 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9686 * decl.c (start_decl): Don't just complain about a mismatched
9689 * decl.c (make_implicit_typename): Handle case where t is not
9690 actually from context.
9691 * tree.c (get_type_decl): Lose identifier case.
9692 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
9693 * parse.y (nonnested_type): Just use lookup_name.
9694 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
9696 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
9698 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
9699 T was built in C language context (for example, by
9700 output_func_start_profiler).
9702 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9704 * decl.c (make_implicit_typename): New fn.
9705 (lookup_name_real): Use it. Use current_class_type as the context.
9707 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
9709 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
9711 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9713 * friend.c (do_friend): Warn about non-template friends in templates.
9715 * call.c (build_op_delete_call): Fix handling of inherited delete.
9717 * search.c (dfs_record_inheritance): Ignore template type parms.
9719 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
9721 * call.c (build_new_op): Fix copy error.
9722 (build_op_new_call): New fn.
9723 (build_op_delete_call): New fn.
9724 * cp-tree.h: Declare them.
9725 * init.c (build_new): Use them. Support placement delete.
9726 (build_x_delete): Use build_op_delete_call.
9727 (build_delete): Likewise.
9728 * decl2.c (delete_sanity): Likewise.
9729 (coerce_delete_type): Don't complain about placement delete.
9731 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9733 * call.c (build_new_function_call): Remove unused 'obj' parm.
9734 * cp-tree.h, typeck.c: Adjust.
9736 * init.c (build_new): Make the cleanup last longer.
9737 (expand_vec_init): Call do_pending_stack_adjust.
9739 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
9741 * pt.c (do_type_instantiation): Fix typo.
9742 (mark_class_instantiated): If we support one_only but not weak
9743 symbols, don't mark this as known.
9745 * init.c (build_new): Handle vec delete in EH cleanup.
9747 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9749 * call.c (build_method_call): Call complete_type before checking
9752 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
9754 * decl.c (add_block_current_level): Delete.
9755 * init.c (build_vec_delete_1): Delete build_block and
9756 add_block_current_level calls.
9758 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
9760 * init.c (build_new): Handle freeing allocated memory when the
9763 * call.c (build_new_method_call): Fix flags arg.
9765 * pt.c (do_type_instantiation): Don't try to instantiate
9767 (mark_decl_instantiated): If we support one_only but not
9768 weak symbols, mark this one_only.
9769 * decl2.c (import_export_vtable): Don't defer handling of vtables
9770 if MULTIPLE_SYMBOL_SPACES.
9772 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9774 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
9776 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
9778 * except.c (do_pop_exception): Return a value.
9780 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9782 * call.c (build_new_method_call): Handle getting a
9783 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
9784 if we got template parms.
9785 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
9787 * decl2.c (build_expr_from_tree): Tweak last change.
9788 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
9789 (maybe_fold_nontype_arg): Split out from tsubst_copy.
9790 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
9792 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9794 * pt.c (tsubst_copy): Handle explicit template arguments in
9796 * typeck.c (build_x_function_call): Likewise.
9797 * decl2.c (build_expr_from_tree): Lookup function name if it
9800 * pt.c (tsubst): Instantiate template functions properly when
9801 template parameter does not appear in function arguments and return
9803 (comp_template_args): Handle member templates required by tsubst.
9805 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9807 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
9810 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9812 * pt.c (coerce_template_parms): Tweak error message.
9814 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
9815 return type defaults to `int', even if there are storage-class
9818 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9820 Complete nested exception support.
9821 * except.c (do_pop_exception): Split out...
9822 (push_eh_cleanup): From here. Handle the EH region by hand.
9823 (expand_start_catch_block): Add a new level for the catch parm.
9824 Move the rethrow region outside the two cleanup regions.
9825 Protect the initializer for the catch parm with terminate.
9826 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
9827 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
9828 popping off the middle of the stack.
9829 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
9830 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
9831 (build_cplus_new): Only wrap CALL_EXPRs.
9832 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
9833 the constructor call.
9835 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9837 * Make-lang.in (c++.distdir): Make inc subdirectory.
9839 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9841 * decl2.c (finish_file): Put back some code.
9843 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9845 * decl2.c (finish_file): Remove redundant code.
9846 * method.c (emit_thunk): Don't let the backend defer generic thunks.
9848 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9850 * except.c (call_eh_info): Split out...
9851 (push_eh_info): From here.
9852 (expand_builtin_throw): Use it.
9853 (expand_start_catch_block): Move region start back.
9855 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
9857 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
9858 (real_yylex): Record wide strings using target endianness, not host.
9860 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
9862 * repo.c (rindex): Add decl unconditionally.
9863 (get_base_filename, open_repo_file): Don't cast rindex.
9864 * xref.c (rindex): Add decl unconditionally.
9865 (index): Remove unused decl.
9866 (open_xref_file): Don't cast rindex.
9868 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9870 * class.c (build_vbase_path): Propagate the result type properly.
9872 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
9874 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
9875 remaining use of saved_throw_type with a call to get_eh_type.
9877 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
9879 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
9880 (file_name_nondirectory): New function, doing the same as the macro.
9881 (set_typedecl_interface_info): Use it instead of the macro.
9882 (check_newline): Likewise.
9883 (handle_cp_pragma): Likewise.
9885 * repo.c (get_base_filename): Cast result of rindex to char*.
9886 (open_repo_file): Likewise.
9887 * xref.c (open_xref_file): Likewise.
9888 * error.c (dump_char): Make its arg int, not char.
9890 * except.c (push_eh_info): Pass the number of fields - 1 down, not
9891 the exact number of fields.
9893 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9895 Support for nested exceptions.
9896 * tinfo2.cc (__is_pointer): New fn.
9897 * exception.cc (struct cp_eh_info): Define.
9898 (__cp_exception_info, __uncatch_exception): New fns.
9899 (__cp_push_exception, __cp_pop_exception): New fns.
9900 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
9902 (init_exception_processing): Likewise. __eh_pc is now external.
9903 (push_eh_info): New fn.
9904 (get_eh_{info,value,type,caught}): New fns.
9905 (push_eh_cleanup): Just call __cp_pop_exception.
9906 (expand_start_catch_block): Use push_eh_info. Start the eh region
9908 (expand_end_eh_spec): Use push_eh_info.
9909 (expand_throw): Call __cp_push_exception to set up the exception info.
9910 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
9912 (expand_builtin_throw): Don't refer to empty_fndecl.
9914 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9916 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
9918 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
9920 * method.c (build_template_parm_names, build_decl_overload_real):
9921 Add static to definitions.
9922 * pt.c (add_to_template_args, note_template_header,
9923 processing_explicit_specialization, type_unification_real): Likewise.
9924 ({determine,check}_explicit_specialization): Use a single string for
9927 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
9929 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
9930 (expand_end_catch_block): Likewise.
9931 (expand_end_eh_spec): Likewise.
9933 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
9935 * decl.c (duplicate_decls): Handle template specializations
9937 * error.c (dump_function_name): Fix printing of specializations of
9938 member functions that are not member templates.
9939 * cp-tree.h (processing_specialization): Make global.
9940 * pt.c (processing_specialization): Likewise.
9941 * lex.c (cons_up_default_function): Save and restore
9942 processing_specialization to avoid confusion.
9944 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9946 * decl.c (init_decl_processing): Give null_node unknown* type.
9947 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
9948 (common_type): Likewise.
9949 * error.c (args_as_string): Recognize null_node.
9951 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9953 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
9954 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
9956 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
9958 * Make-lang.in (g++): Include prefix.o.
9960 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
9962 * pt.c (determine_explicit_specialization): Initialize "dummy"
9963 to keep Purify quiet.
9965 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9967 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
9968 (build_overload_int): Not here.
9970 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
9972 * class.c (build_type_pathname): Remove.
9973 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
9975 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
9977 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
9978 &&label GNU extension.
9980 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
9982 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
9983 so as to avoid incorrect manglings.
9984 * method.c (build_decl_overload_real): Don't mangle return types
9987 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9989 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
9990 scratch_tree_cons): Define as macros for now.
9991 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
9992 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
9993 typeck2.c: Use them and the expression_obstack variants.
9995 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9997 * decl.c (store_return_init): Allow classes with explicit ctors to
9998 be used with the named return values extension.
10000 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
10002 * pt.c (instantiate_decl): Fix previous change.
10004 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
10006 * pt.c (tsubst): Fix thinko.
10007 (instantiate_decl): Really use the original template.
10009 * call.c (build_new_method_call): Use simple constructor_name for
10012 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
10014 * method.c (build_underscore_int): Don't use ANSI specific
10017 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
10019 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
10020 for our key method; it might have been inlined by -O3.
10022 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
10024 * decl.c (make_typename_type): Do not try to call lookup_field for
10025 non-aggregate types.
10027 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
10029 * typeck.c (build_reinterpret_cast): Tweak.
10031 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
10033 * typeck.c (build_reinterpret_cast): Converting a void pointer
10034 to function pointer with a reinterpret_cast produces a warning
10035 if -pedantic is issued.
10037 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10039 * typeck.c (c_expand_return): Don't warn about returning a
10040 reference-type variable as a reference.
10042 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
10044 * method.c (build_static_name): Fix typo.
10046 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
10048 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
10049 OLDDECL before we try to do DECL_USE_TEMPLATE.
10051 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10053 * decl.c (duplicate_decls): Don't warn about template instances.
10055 * typeck.c (mark_addressable): Lose ancient code that unsets
10058 * pt.c (do_decl_instantiation): Lose support for instantiating
10061 * call.c (build_new_function_call): Fix handling of null explicit
10063 (build_new_method_call): Likewise.
10065 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
10067 * method.c (build_underscore_int): Fix typo.
10069 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
10071 * tree.c (print_lang_statistics): #if 0 call to
10072 print_inline_obstack_statistics until its definition is checked in.
10074 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10076 * decl2.c (finish_file): Move dump_tree_statistics to end.
10078 * pt.c (instantiate_decl): Look for the original template.
10079 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
10080 of member templates.
10082 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
10084 * Makefile.in (g++FAQ.*): New rules.
10085 (CONFLICTS): Update.
10086 * g++FAQ.texi: Moved from libg++.
10088 * parse.y (PFUNCNAME): Only specify the type once.
10090 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
10092 * lex.c (real_yylex): Clean up the code to fully behave the way
10093 the c-lex.c parser does for complex and real numbers.
10095 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10097 * method.c (build_decl_overload_real): Reformat.
10099 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
10101 * method.c (synthesize_method): If at_eof, determine our linkage.
10103 1997-09-29 Paul Eggert <eggert@twinsun.com>
10105 * lex.c (real_yylex): Treat `$' just like `_', except issue a
10106 diagnostic if !dollars_in_ident or if pedantic.
10108 * lang-specs.h (@c++): -ansi no longer implies -$.
10110 * decl2.c (lang_decode_option):
10111 -traditional and -ansi now do not mess with
10114 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
10116 * Makefile.in (parse.o, decl.o): Also depend on
10117 $(srcdir)/../except.h $(srcdir)/../output.h.
10118 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
10119 $(srcdir)/../except.h $(srcdir)/../output.h.
10120 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
10123 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
10125 * expr.c (cplus_expand_expr): Make it static.
10127 * decl2.c, init.c, typeck.c: Include "expr.h".
10128 (expand_expr): Use proper values when calling the function.
10130 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
10132 * lang-options.h: New -Wold-style-cast flag.
10133 * cp-tree.h (warn_old_style_cast): New variable.
10134 * decl2.c (warn_old_style_cast): Likewise.
10135 (lang_decode_option): Support -Wold-style-cast.
10136 (reparse_absdcl_as_casts): Produce old-style-cast warning.
10138 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10140 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
10141 TREE_USED, reset value based on already_used.
10143 * init.c (expand_member_init): Revert change.
10145 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
10147 * cp-tree.h, decl.c, decl2.c, pt.c:
10148 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
10150 * decl2.c (lang_decode_option): Add missing ;.
10152 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10154 * friend.c (do_friend): Disable injection for all template-derived
10156 * decl2.c (lang_decode_option): Handle -fguiding-decls.
10157 * parse.y (notype_template_declarator): New nonterminal.
10158 (direct_notype_declarator): Use it.
10159 (complex_direct_notype_declarator): Likewise.
10160 (object_template_id): Accept any kind of identifier after TEMPLATE.
10161 (notype_qualified_id): Don't add template declarators here.
10163 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
10165 * call.c (add_template_candidate): Add explicit_targs parameter.
10166 (build_scoped_method_call): Use it.
10167 (build_overload_call_real): Likewise.
10168 (build_user_type_conversion_1): Likewise.
10169 (build_new_function_call): Likewise.
10170 (build_object_call): Likewise.
10171 (build_new_op): Likewise.
10172 (build_new_method_call): Likewise.
10173 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
10174 (build_new_method_call): Likewise.
10176 * class.c (finish_struct_methods): Add specialization pass to
10177 determine which methods were specializing which other methods.
10178 (instantiate_type): Handle TEMPLATE_ID_EXPR.
10180 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
10182 * cp-tree.h (name_mangling_version): New variable.
10183 (flag_guiding_decls): Likewise.
10184 (build_template_decl_overload): New function.
10185 (begin_specialization): Likewise.
10186 (reset_specialization): Likewise.
10187 (end_specialization): Likewise.
10188 (determine_explicit_specialization): Likewise.
10189 (check_explicit_specialization): Likewise.
10190 (lookup_template_function): Likewise.
10191 (fn_type_unification): Add explicit_targs parameter.
10192 (type_unification): Likewise.
10194 * decl.c (duplicate_decls): Add smarts for explicit
10196 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
10198 (grokfndecl): Call check_explicit_specialization.
10200 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
10201 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
10202 (check_classfn): Handle specializations.
10204 * error.c (dump_function_name): Print specialization arguments.
10206 * friend.c (do_friend): Don't call pushdecl for template
10209 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
10211 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
10212 and -fno-guiding-decls.
10214 * lex.c (identifier_type): Return PFUNCNAME for template function
10217 * method.c (build_decl_overload_real): New function.
10218 (build_template_parm_names): New function.
10219 (build_overload_identifier): Use it.
10220 (build_underscore_int): New function.
10221 (build_overload_int): Use it. Add levels for template
10223 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
10224 (build_overload_nested_names): Handle template type parameters.
10225 (build_template_decl_overload): New function.
10227 * parse.y (YYSTYPE): New ntype member.
10228 (nested_name_specifier): Use it.
10229 (nested_name_specifier_1): Likewise.
10230 (PFUNCNAME): New token.
10231 (template_id, object_template_id): New non-terminals.
10232 (template_parm_list): Note specializations.
10233 (template_def): Likewise.
10234 (structsp): Likewise.
10235 (fn.def2): Handle member template specializations.
10236 (component_decl_1): Likewise.
10237 (direct_notype_declarator): Handle template-ids.
10238 (component_decl_1): Likewise.
10239 (direct_notype_declarator): Handle template-ids.
10240 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
10242 * pt.c (processing_specializations): New variable.
10243 (template_header_count): Likewise.
10244 (type_unification_real): New function.
10245 (processing_explicit_specialization): Likewise.
10246 (note_template_header): Likewise.
10247 (is_member_template): Handle specializations.
10248 (end_template_decl): Call reset_specialization.
10249 (push_template_decl): Handle member template specializations.
10250 (tsubst): Likewise.
10251 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
10252 (instantiate_template): Handle specializations.
10253 (instantiate_decl): Likewise.
10254 (fn_type_unification): Handle explicit_targs.
10255 (type_unification): Likewise. Allow incomplete unification
10256 without an error message, if allow_incomplete.
10257 (get_bindings): Use new calling sequence for fn_type_unification.
10259 * spew.c (yylex): Handle PFUNCNAME.
10261 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
10262 (really_overloaded_fn): Likewise.
10263 (get_first_fn): Handle function templates.
10265 * typeck.c (build_x_function_call): Use really_overloaded_fn.
10266 Handle TEMPLATE_ID_EXPR.
10267 (build_x_unary_op): Likewise.
10268 (build_unary_op): Likewise.
10269 (mark_addressable): Templates whose address is taken are marked
10272 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10274 * decl.c (init_decl_processing): Declare __builtin_constant_p as
10275 accepting any kind of type, not only int.
10277 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
10279 * search.c (get_matching_virtual): Notice virtual bases when sorrying
10280 about covariant returns.
10282 * parse.y (member_init): Also imply typename here. Remove ancient
10283 extension for initializing base members.
10285 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
10287 Handle multi-level typenames and implicit typename in base list.
10288 * parse.y (typename_sub{,[0-2]}): New rules.
10289 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
10290 (nonnested_type): New rule.
10291 (complete_type_name): Use it.
10292 (base_class.1): Use typename_sub and nonnested_type.
10293 (nested_name_specifier): Don't elide std:: here.
10294 * decl.c (make_typename_type): Handle getting a type for NAME.
10295 (lookup_name_real): Turn std:: into :: here.
10297 Rvalue conversions were removed in London.
10298 * call.c (is_subseq): Don't consider lvalue transformations.
10299 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
10300 (joust): Re-enable ?: kludge.
10302 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
10304 * decl.c (start_function): Up warning of no return type to be a
10307 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10309 * init.c (expand_member_init): Don't set TREE_USED.
10310 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
10311 set,don't clear TREE_USED wholesale.
10313 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
10315 * call.c (build_over_call): Do require_complete_type before
10318 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10320 * search.c (lookup_field): Call complete_type in all cases.
10322 * decl.c (finish_function): Just warn about flowing off the end.
10324 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10326 * decl.c (grokparms): Don't bash a permanent list node if we're
10329 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
10331 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
10333 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
10335 * call.c (build_new_op): Give better error for syntactically
10336 correct, but semantically invalid, use of undeclared template.
10338 * call.c (compare_qual): Handle pmfs.
10340 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
10341 after the exception spec.
10343 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
10345 * call.c (null_ptr_cst_p): Integer type, not integral type.
10347 * call.c (joust): Disable warnings until they can be moved to the
10350 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
10352 * Makefile.in, config-lang.in: Convert to autoconf.
10354 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
10356 * decl.c (lookup_name_real): Add implicit 'typename' to types from
10359 * pt.c (most_specialized_class): Fix typo.
10360 (tsubst): Move constant folding to TREE_VEC case.
10362 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
10364 * pt.c (do_poplevel): Don't warn about unused local variables
10365 while processing_template_decl since we don't always know whether
10366 or not they will need constructing/destructing.
10368 * pt.c (uses_template_parms): Check the values of an enumeration
10369 type to make sure they don't depend on template parms.
10371 * decl.c (make_typename_type): Don't lookup the field if the
10372 context uses template parms, even if we're not
10373 processing_template_decl at the moment.
10375 * pt.c (coerce_template_parms): Avoid looking at the
10376 TYPE_LANG_DECL portion of a typename type, since there won't be
10378 (tsubst): Do constant folding as necessary to make sure that
10379 arguments passed to lookup_template_class really are constants.
10381 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
10383 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
10384 * decl2.c (finish_file): Only register exception tables if we
10387 * decl.c (init_decl_processing): Add __builtin_[fs]p.
10389 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
10391 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
10393 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
10395 * error.c (dump_decl): Avoid crashing when presented with a
10396 uninitialized constant, as can occur with a template parameter.
10397 (dump_expr): Make sure that there are enough levels of
10398 current_template_parms before we start diving through them.
10400 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
10402 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
10405 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10407 * except.c (expand_throw): Call build_delete for all
10408 exception types, not just objects with destructors.
10410 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
10412 * decl.c (current_local_enum): Remove static.
10413 * pt.c (tsubst_enum): Save and restore value of current_local_enum
10414 in case template is expanded in enum decl.
10415 (instantiate_class_template): Use new tsubst_enum signature.
10416 (tsubst_expr): Likewise.
10418 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
10420 * pt.c (begin_member_template_processing): Take a function as
10421 argument, not a set of template arguments. Use the template
10422 parameters, rather than the arguments. Handle non-type parameters
10423 correctly. Push a binding level for the parameters so that multiple
10424 member templates using the same parameter names can be declared.
10425 (end_member_template_processing): Pop the binding level.
10426 (push_template_decl): Mark member templates as static when
10429 * lex.c (do_pending_inlines): Pass the function, not its template
10430 arguments, to begin_member_template_processing.
10431 (process_next_inline): Likewise.
10432 (do_pending_defargs): Likewise.
10434 * error.c (dump_expr): Obtain the correct declaration for a
10435 TEMPLATE_CONST_PARM.
10437 * call.c (add_template_conv_candidate): New function.
10438 (build_object_call): Handle member templates, as done in the other
10441 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
10443 * decl.c (replace_defag): Undo previous change.
10444 * lex.c (do_pending_defargs): Deal with member templates.
10446 * pt.c (is_member_template): Avoid crashing when passed a
10447 non-function argument.
10449 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
10451 * class.c (grow_method): Remove check for redeclaration.
10453 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
10455 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
10456 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
10457 (PRIMARY_TEMPLATE_P): Use it.
10458 * call.c (build_overload_call_real): Use it.
10459 * class.c (instantiate_type): Likewise.
10460 * decl.c (decls_match): Likewise.
10461 * method.c (build_overload_identifier): Likewise.
10462 * pt.c (push_template_decl): Likewise.
10463 (classtype_mangled_name): Likewise.
10464 (lookup_template_class): Likewise.
10466 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
10467 DECL_NTPARMS to conform to usage elsewhere.
10468 * call.c (add_template_candidate): Likewise.
10469 * class.c (instantiate_type): Likewise.
10470 * pt.c (instantiate_template): Likewise.
10471 (get_bindings): Likewise.
10473 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
10474 is_member_template.
10476 * pt.c (unify): Undo changes to allow multiple levels of template
10478 (type_unification): Likewise.
10479 (fn_type_unification): Likewise.
10480 (get_class_bindings): Likewise.
10481 * cp-tree.h (Likewise).
10483 * decl.c (replace_defarg): Check that the type of the default
10484 parameter does not invlove a template type before complaining
10485 about the initialization.
10487 * error.c (dump_expr): Deal with template constant parameters in
10488 member templates correctly.
10490 * pt.c (is_member_template): Deal with class specializations
10492 (tsubst): Handle "partial instantiation" of member templates
10495 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
10497 * pt.c (type_unification): Change calling sequence to allow for
10498 multiple levels of template parameters.
10499 (tsubst_expr): Likewise.
10500 (tsubst): Likewise.
10501 (tsubst_copy): Likewise.
10502 (instantiate_template): Likewise.
10504 * call.c (build_overload_call_real): Use it.
10505 (add_builtin_candidate): Use it.
10506 (build_new_method_call): Use it.
10507 * class.c (instantiate_type): Use it.
10508 * decl.c (grokdeclarator): Use it.
10509 * decl2.c (finish_file): Use it.
10510 * method.c (build_overload_identifier): Use it.
10512 * call.c (add_template_candidate): Add additional parameter for
10513 the function return type. Call fn_type_unification istead of
10515 (build_user_type_conversion_1): Handle member templates.
10516 (build_new_function_call): Likewise.
10517 (build_new_op): Likewise.
10518 (build_new_method_call): Likewise.
10520 * class.c (grow_method): Don't give an error message indicating
10521 that two member templates with the same name are ambiguous.
10522 (finish_struct): Treat member template functions just like member
10525 * cp-tree.h (check_member_template): Add declaration.
10526 (begin_member_template_processing): Likewise.
10527 (end_member_template_processing): Likewise.
10528 (fn_type_unification): Likewise.
10529 (is_member_template): Likewise.
10530 (tsubst): Change prototype.
10531 (tsubst_expr): Likewise.
10532 (tsubst_copy): Likewise.
10533 (instantiate_template): Likewise.
10534 (get_bindings): Likewise.
10536 * decl.c (decls_match): Handle multiple levels of template
10538 (pushdecl): Handle template type params just like other type
10540 (push_class_level_binding): Return immediately if the
10541 class_binding_level is NULL.
10542 (grokfndecl): If check_classfn() returns a member_template, use
10543 the result of the template, not the template itself.
10545 * decl2.c (check_member_template): New function. Check to see
10546 that the entity declared to be a member template can be one.
10547 (check_classfn): Allow redeclaration of member template functions
10548 with different types; the new functions can be specializations or
10549 explicit instantiations.
10551 * error.c (dump_decl): Handle multiple levels of template
10553 (dump_function_decl): Update to handle function templates.
10555 * lex.c (do_pending_inlines): Set up template parameter context
10556 for member templates.
10557 (process_next_inline): Likewise.
10559 * method.c (build_overload_identifier): Adjust for multiple levels
10560 of template parameters.
10562 * parse.y (fn.def2): Add member templates.
10563 (component_decl_1): Likewise.
10565 * pt.c (begin_member_template_processing): New function.
10566 (end_member_template_processing): Likewise.
10567 (is_member_template): Likewise.
10568 (fn_type_unification): Likewise.
10569 (current_template_parms): Return a vector of all the template
10570 parms, not just the innermost level of parms.
10571 (push_template_decl): Deal with the possibility of member
10573 (lookup_template_class): Likewise.
10574 (uses_template_parms): Likewise.
10575 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
10576 TEMPLATE_CONST_PARM to deal with multiple levels of template
10577 arguments. Add processing of TEMPLATE_DECL to produce new
10578 TEMPLATE_DECLs from old ones.
10579 (do_decl_instantiation): Handle member templates.
10581 * search.c (lookup_fnfields_1): Handle member template conversion
10584 * tree.c (cp_tree_equal): Check the levels, as well as the
10585 indices, of TEMPLATE_CONST_PARMs.
10587 * typeck.c (comptypes): Check the levels, as well as the indices,
10588 fo TEMPLATE_TYPE_PARMs.
10589 (build_x_function_call): Treat member templates like member
10592 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10594 * typeck.c (c_expand_return): Always convert_for_initialization
10595 before checking for returning a pointer to local.
10597 * pt.c (type_unification): If strict and the function parm doesn't
10598 use template parms, just compare types.
10600 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
10602 * method.c (build_overloaded_value): Replace direct call
10603 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
10605 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
10607 * typeck.c (convert_arguments): Don't arbitrarily choose the first
10608 of a set of overloaded functions.
10610 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
10612 * lex.c (real_yylex): Don't elide __FUNCTION__.
10614 * method.c (build_overload_value): Add in_template parm.
10615 (build_overload_int): Likewise.
10616 (build_overload_identifier): Pass it.
10618 * decl.c (duplicate_decls): Don't bash a previous template
10619 definition with a redeclaration.
10621 * pt.c (unify): float doesn't match double.
10623 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
10624 TYPE_DECL. Handle getting non-template types.
10625 * parse.y (explicit_instantiation): Use typespec instead of
10626 aggr template_type.
10628 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
10630 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
10632 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
10634 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
10635 (compare_ics): Likewise.
10637 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
10639 * call.c (joust): Warn about choosing one conversion op over
10640 another because of 'this' argument when the other return type is
10642 (source_type): New fn.
10644 * call.c (build_new_op): Strip leading REF_BIND from first operand
10645 to builtin operator.
10647 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
10650 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10652 * call.c (null_ptr_cst_p): Remove support for (void*)0.
10654 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
10656 * typeck.c (expand_target_expr): Make definition match declaration.
10658 * class.c (get_basefndecls): Make definition match declaration.
10660 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
10662 * input.c (sub_getch): Eventually give up and release the input file.
10664 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
10667 * call.c (joust): Tweak message.
10669 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
10671 * error.c (type_as_string): Put const/volatile on template type
10672 parameters where appropriate.
10674 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
10676 * call.c (strictly_better): Make arguments unsigned ints.
10678 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
10680 * lex.c (real_yylex): Refer to __complex instead of complex.
10682 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
10684 * lex.c (real_yylex): Don't use getc directly.
10686 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10688 * call.c (is_subseq): Don't try to be clever.
10690 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
10692 * parse.y, pt.c: Include "except.h".
10693 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
10694 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
10695 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
10696 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
10699 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10701 * decl2.c (mark_vtable_entries): Instead of replacing pure
10702 virtuals with a reference to __pure_virtual, copy the decl and
10705 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
10707 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
10709 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
10711 * pt.c (instantiate_class_template): Call repo_template_used
10712 before finish_prevtable_vardecl.
10714 * call.c (is_subseq): New fn.
10715 (compare_ics): Use it.
10717 * repo.c (finish_repo): Don't crash on no args.
10719 * parse.y (named_complex_class_head_sans_basetype): Handle
10720 explicit global scope.
10721 * decl2.c (handle_class_head): New fn.
10723 * pt.c (unify): Add CONST_DECL case.
10725 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10727 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
10729 * cp-tree.h (report_type_mismatch): Add prototype.
10730 * call.c (build_overload_call_real): Remove erroneous fourth
10731 argument to report_type_mismatch.
10732 (build_user_type_conversion_1): Remove erroneous second arg to
10734 (build_new_function_call): Likewise.
10735 (build_object_call): Likewise.
10736 (build_new_op): Likewise.
10737 (build_new_method_call): Likewise.
10739 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10741 * error.c (dump_decl): Don't bother processing a function with no
10742 DECL_LANG_SPECIFIC.
10744 * method.c (emit_thunk): Call init_function_start in the macro case.
10746 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
10748 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
10749 defined and used to set flag_vtable_thunks.
10751 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10753 * parse.y: Don't clear the inlines from their obstack until they've
10754 all been processed.
10756 * decl.c (duplicate_decls): Don't complain about exception
10757 specification mismatch if flag_exceptions is off.
10759 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
10761 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
10763 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
10765 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
10766 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
10767 Include <stdio.h> before include files that formerly used STDIO_PROTO.
10769 * decl.c, g++spec.c, lex.c, method.c, repo.c:
10770 Include "config.h" first, as per autoconf manual.
10772 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10774 * decl.c (duplicate_decls): Tweak wording.
10775 * lex.c (do_pending_defargs): Don't die if we see a default arg
10776 that isn't a DEFAULT_ARG.
10777 * error.c (dump_expr): Handle DEFAULT_ARG.
10779 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
10780 * lang-options.h: Add -fhandle-exceptions.
10782 * class.c (build_vtable): Vtables are artificial.
10783 (prepare_fresh_vtable): Likewise.
10785 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10787 * cvt.c (ocp_convert): After converting to the target type, set
10788 LOOKUP_NO_CONVERSION.
10790 * call.c (joust): Warn about potentially confusing promotion rules
10792 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
10794 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
10796 * exception.cc: Declare __terminate_func with noreturn attribute.
10798 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
10800 * parse.y: Break out eat_saved_input, handle errors.
10801 (function_try_block): Use compstmt instead of compstmt_or_error.
10803 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
10805 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
10807 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10809 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
10810 existence of cc1plus check whether $(LANGUAGES) contains C++.
10812 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10814 * method.c (do_build_copy_constructor): When copying an anonymous
10815 union member loop around to handle nested anonymous unions. Use
10816 the offset of the member relative to the outer structure, not the
10819 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10821 * call.c (resolve_args): New fn.
10822 (build_new_function_call): Use it.
10823 (build_object_call): Likewise.
10824 (build_new_method_call): Likewise.
10826 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
10828 * call.c (build_over_call): tsubst all default parms from templates.
10830 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
10832 * decl.c (struct cp_function): Add static_labelno.
10833 (push_cp_function_context): Save it.
10834 (pop_cp_function_context): Restore it.
10836 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10838 * typeck.c (build_component_ref_1): Convert from reference.
10840 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10842 * parse.y (current_declspecs, prefix_attributes): Initialize to
10845 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
10846 before we try to force it to be a TREE_LIST.
10847 (decl): Make sure $1.t is non-nil.
10849 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
10851 * pt.c (uses_template_parms): Handle template first-parse codes.
10853 * decl.c (cp_finish_decl): Only warn about user-defined statics.
10855 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10857 * pt.c (unify): Handle BOOLEAN_TYPE.
10859 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
10860 * pt.c (tsubst): Don't set it.
10861 * call.c (build_over_call): Use uses_template_parms.
10863 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
10865 * method.c (build_overload_nested_name): Use static_labelno
10866 instead of var_labelno.
10867 (build_qualified_name): New fn.
10868 (build_overload_name): Split out from here.
10869 (build_static_name): Use build_qualified_name.
10870 * decl.c (cp_finish_decl): Statics in extern inline functions
10871 have comdat linkage.
10872 (start_function): Initialize static_labelno.
10874 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10876 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
10877 before "all member functions in class [] are private".
10879 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
10881 * lex.c (do_scoped_id): convert_from_reference.
10882 * init.c (build_offset_ref): Likewise.
10884 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10886 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
10888 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10890 * typeck.c (get_member_function_from_ptrfunc): Promote index
10893 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10895 * tree.c (layout_basetypes): Move non-virtual destructor warning.
10896 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
10898 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10900 * decl.c (grokdeclarator): Call add_defarg_fn for the function
10902 * lex.c (add_defarg_fn): Adjust.
10903 (do_pending_defargs): Adjust. Don't skip the first parm.
10905 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
10907 * decl.c (build_enumerator): Global enumerators are also readonly.
10909 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
10910 (build_dynamic_cast): Call it and convert_from_reference.
10912 * lex.c (add_defarg_fn): New fn.
10913 (snarf_defarg): Don't add to defarg_types.
10914 (do_pending_defargs): Lose defarg_types. All fns we process now
10916 * decl.c (grokfndecl): Call add_defarg_fn.
10918 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
10919 * cp-tree.def: Add DEFAULT_ARG.
10920 * spew.c (yylex): Call snarf_defarg as appropriate.
10921 * parse.y: New tokens DEFARG and DEFARG_MARKER.
10922 (defarg_again, pending_defargs, defarg, defarg1): New rules.
10923 (structsp): Use pending_defargs.
10924 (parms, full_parm): Use defarg.
10925 * lex.c (init_lex): Initialize inline_text_firstobj.
10926 (do_pending_inlines): Never pass the obstack to feed_input.
10927 (process_next_inline): Call end_input instead of restore_pending_input.
10928 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
10929 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
10930 * input.c (end_input): New fn.
10931 (sub_getch): At the end of some fed input, just keep returning EOF
10932 until someone calls end_input.
10933 Remove 'obstack' field from struct input_source.
10934 * decl.c (grokparms): Handle DEFAULT_ARG.
10935 (replace_defarg): New fn.
10936 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
10938 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10940 * call.c (implicit_conversion): If nothing else works, try binding
10941 an rvalue to a reference.
10943 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
10945 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
10946 ifndef for Cygwin32 to include SIGSEGV.
10948 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10950 * class.c (finish_struct_1): Only complain about pointers without
10951 copy stuff if there are any constructors.
10953 * rtti.c (build_dynamic_cast): Call complete_type on the types.
10955 * decl.c (grokfndecl): If the function we chose doesn't actually
10958 * decl2.c (grokclassfn): Don't specify 'const int' for the
10959 artificial destructor parm.
10961 * pt.c (type_unification): If we are called recursively, nothing
10964 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
10966 * decl.c (init_decl_processing): Stop trying to catch signals
10967 other than SIGABRT since the Cygwin32 library doesn't support
10968 them correctly yet. This fixes a situation in which g++ causes
10969 a hang on SIGSEGVs and other such signals in our Win32-hosted
10972 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
10974 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
10976 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10978 * typeck2.c (store_init_value): Always return the value if our
10979 type needs constructing.
10981 * method.c (hack_identifier): Convert class statics from
10984 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10986 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
10988 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
10990 * typeck.c (c_expand_return): Make sure we clean up temporaries at
10991 the end of return x;
10993 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10995 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
10997 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
10999 * except.c (expand_builtin_throw): Add support
11000 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
11002 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11004 * repo.c (extract_string): Null-terminate.
11006 * cp-tree.h (TI_SPEC_INFO): New macro.
11007 (CLASSTYPE_TI_SPEC_INFO): New macro.
11008 * pt.c (push_template_decl): Correctly determine # of template parms
11011 * call.c (compare_ics): Really fix 'this' conversions.
11013 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
11016 * pt.c (push_template_decl): Complain about mismatch in # of
11017 template parms between a class template and a member template.
11019 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11021 * method.c (synthesize_method): You can't call
11022 function_cannot_inline_p after finish_function.
11023 * decl.c (finish_function): Turn on flag_inline_functions and turn
11024 off DECL_INLINE before handing a synthesized method to the
11027 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11029 * method.c (synthesize_method): Remove July 30 change to never set
11030 DECL_INLINE if at_eof.
11032 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
11034 * xref.c (GNU_xref_member): Ensure that the node has a
11035 decl_lang_specific part before checking DECL_FRIEND_P.
11037 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
11039 * pt.c (instantiate_class_template): Diagnose non-class types used
11042 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
11044 * typeck.c (build_conditional_expr): Use convert_for_initialization
11045 instead of convert_and_check.
11047 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11049 * parse.y (typespec): Don't pedwarn for typeof.
11051 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
11053 * repo.c (finish_repo): Only check changes if we would write a
11056 * call.c (compare_ics): Fix handling of 'this' conversions.
11058 * pt.c (do_decl_instantiation): Support static data too. Rename
11059 from do_function_instantiation.
11060 * cp-tree.h: Adjust.
11063 * repo.c (extract_string): New fn.
11064 (get_base_filename): Use it.
11065 (init_repo): Compare old args with current args.
11067 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
11069 * Makefile.in, Make-lang.in: Protect C-ls with a comment
11070 character, idea from Paul Eggert <eggert@twinsun.com>.
11072 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
11074 * typeck.c (c_expand_return): Be more persistent in looking for
11077 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
11078 pointer to reference.
11080 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
11082 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
11084 * init.c (build_member_call, build_offset_ref):
11085 Use do_scoped_id instead of do_identifier.
11087 * cvt.c (convert): Remove bogosity.
11089 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11091 * cvt.c (build_up_reference): Do checks of ARGTYPE and
11092 TARGET_TYPE before trying to use get_binfo.
11094 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
11096 * cvt.c (build_up_reference): Call get_binfo to get access control.
11098 * decl2.c (import_export_decl): If we don't support weaks, leave
11101 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
11103 * except.c (expand_builtin_throw): Add support for machines that
11104 cannot access globals after throw's epilogue when
11105 -fno-sjlj-exceptions is used.
11107 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
11109 * parse.y: 'std::' becomes '::'.
11110 * lex.c (real_yylex): Remove 'namespace' warning.
11111 * init.c (build_member_call): Ignore 'std::'.
11112 (build_offset_ref): Likewise.
11113 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
11114 (do_toplevel_using_decl): Ignore 'using std::whatever'.
11115 * decl.c (push_namespace): Just sorry.
11116 (pop_namespace): Nop.
11117 (init_decl_processing): Declare std namespace.
11119 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
11121 * search.c (push_class_decls): A name which ambiguously refers to
11122 several instantiations of the same template just refers to the
11125 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
11127 * decl.c (build_enumerator): Fix problem with unsigned long
11128 enumerated values being smashed to ints, causing overflow
11129 when computing next enumerated value (for enum values around
11132 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
11134 * typeck.c (build_component_ref): Only call mark_used on a decl.
11136 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11138 * typeck.c (build_c_cast): Make the check for a ptr to function
11139 more specific before possible default_conversion call.
11141 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
11143 * except.c (expand_exception_blocks): Simplify and fix and make
11144 sure we don't end a region in a sequence, as expand_end_bindings
11147 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
11149 * except.c (init_exception_processing): Mark terminate as not
11150 returning so that the optimizer can optimize better.
11152 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
11154 * cvt.c (convert): Don't do any extra work, if we can avoid it
11157 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
11159 * *.[chy]: Change cp_convert to ocp_convert, change convert to
11160 cp_convert. convert is now reserved for the backend, and doesn't
11161 have the semantics a frontend person should ever want.
11163 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11165 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
11166 Lose -traditional support.
11168 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11170 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
11172 * parse.y (self_reference): Do it for templates, too.
11173 * class.c (pushclass): Don't overload_template_name; the alias
11174 generated by build_self_reference serves the same purpose.
11176 * tree.c (list_hash): Make static, take more args.
11177 (list_hash_lookup): Likewise.
11178 (list_hash_add): Make static.
11179 (list_hash_canon): Lose.
11180 (hash_tree_cons): Only build a new node if one isn't already in the
11182 (hash_tree_chain): Use hash_tree_cons.
11183 * cp-tree.h: Adjust.
11184 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
11185 of calling lookup_name.
11187 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11189 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
11190 doesn't refer to the CONST_DECLs.
11192 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
11194 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
11196 (expand_class_desc): Convert the last argument to a sizetype.
11198 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11200 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
11201 __real__): Add reswords.
11202 * hash.h: Regenerate.
11203 * lex.h (rid): Add RID_COMPLEX.
11204 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
11205 * lex.c (init_lex): Add building of RID_COMPLEX.
11206 (real_yylex): General cleanup in line with what c-lex.c also has,
11207 sans the cruft for traditional; add handling of SPEC_IMAG, complex
11208 types, and imaginary numeric constants.
11209 * parse.y (REALPART, IMAGPART): Add tokens.
11210 (unary_expr): Add REALPART and IMAGPART rules.
11211 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
11212 * decl.c (complex_{integer,float,double,long}_type_node): Define
11214 (init_decl_processing): Set up the types.
11215 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
11216 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
11217 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
11218 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
11219 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
11221 * method.c (build_overload_name): Add handling of the different
11222 COMPLEX_TYPEs, prefixing them with `J'.
11223 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
11224 as a template parm.
11225 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
11226 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
11227 (mapcar): Handle COMPLEX_CST.
11228 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
11229 (common_type): Add code for complex types.
11230 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
11231 (convert_for_assignment): Likewise.
11232 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
11234 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11236 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
11237 tsubst_expr, as it might try to do overload resolution.
11239 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11241 * pt.c (instantiate_class_template): Oops.
11243 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11245 * cp-tree.def: Add TAG_DEFN.
11246 * pt.c (tsubst_enum): New fn.
11247 (instantiate_class_template): Use it.
11248 (tsubst_expr): Support TAG_DEFN.
11249 (tsubst): Support local enums.
11250 (tsubst_copy): Likewise.
11251 * decl.c (finish_enum): Likewise.
11252 (start_enum): If this is a local enum, switch to permanent_obstack.
11254 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
11256 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
11257 (finish_function): Put the base init code for constructors just
11258 after the parm cleanup insns.
11259 (struct cp_function): Add last_parm_cleanup_insn.
11260 (push_cp_function_context): Likewise.
11261 (pop_cp_function_context): Likewise.
11263 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11265 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
11267 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11269 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
11270 for THUNK_FNDECL before we switch to temporary allocation.
11272 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
11274 * call.c (build_new_op): Handle null arg2 for ?:.
11276 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
11278 * except.c (expand_exception_blocks): Ensure that we flow through
11279 the end of the exception region for the exception specification.
11280 Move exception region for the exception specification in, so that
11281 it doesn't protect the parm cleanup. Remove some obsolete code.
11282 * decl.c (store_parm_decls): Likewise.
11283 (finish_function): Likewise.
11285 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
11287 * init.c (build_new): Fix nothrow handling.
11289 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11291 * init.c (emit_base_init): Don't warn about the initialization
11292 list for an artificial member.
11294 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11296 * expr.c (do_case): Handle !START case for the error msg.
11298 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
11300 * decl2.c, lang-options.h: New option -Weffc++.
11301 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
11304 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
11305 to MULTIPLE_SYMBOL_SPACES.
11307 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
11309 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
11311 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
11313 * typeck.c (c_expand_return): Don't complain about returning void
11314 to void in an artificial function.
11315 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
11316 don't set DECL_RESULT, set DECL_ARTIFICIAL.
11317 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
11319 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
11321 * init.c (init_decl_processing): Add support for setjmp/longjmp based
11322 exception handling.
11323 * except.c (init_exception_processing): Likewise.
11324 (expand_end_catch_block): Likewise.
11325 (expand_exception_blocks): Likewise.
11326 (expand_throw): Likewise.
11327 * exception.cc (__default_terminate): Likewise.
11329 * init.c (perform_member_init): Use new method of expr level
11330 cleanups, instead of cleanups_this_call and friends.
11331 (emit_base_init): Likewise.
11332 (expand_aggr_vbase_init_1): Likewise.
11333 (expand_vec_init): Likewise.
11334 * decl.c (cp_finish_decl): Likewise.
11335 (expand_static_init): Likewise.
11336 (store_parm_decls): Likewise.
11337 (cplus_expand_expr_stmt): Likewise.
11338 * decl2.c (finish_file): Likewise.
11340 * Make-lang.in (exception.o): Ok to compile with -O now.
11342 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
11343 we know it will be done later by the backend.
11345 * decl2.c (lang_f_options): Remove support for short temps.
11346 * lang-options.h: Likewise.
11348 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11350 * tree.c (varargs_function_p): New fn.
11351 * method.c (emit_thunk): Replace broken generic code with code to
11352 generate a heavyweight thunk function.
11354 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
11356 * pt.c (process_template_parm): pedwarn about floating-point parms.
11358 * decl.c (grokdeclarator): inline no longer implies static.
11360 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
11362 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11364 * class.c (check_for_override): The signature of an overriding
11365 function is not changed.
11367 * call.c (build_over_call): Move setting of conv into the loop.
11368 Note: this change, along with the related changes of the 18th thru
11369 the 20th of April, fix an infinite loop problem in conversions.
11371 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
11373 * call.c (build_user_type_conversion_1): Really ignore rvalue
11374 conversions when looking for a REFERENCE_TYPE.
11376 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
11377 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
11378 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
11379 (build_unary_op): Likewise.
11380 * call.c (build_over_call): See through a CONVERT_EXPR around the
11381 ADDR_EXPR for on a temporary.
11382 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
11383 the ADDR_EXPR for a local variable.
11385 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11387 * call.c (build_user_type_conversion_1): If we're trying to
11388 convert to a REFERENCE_TYPE, only consider lvalue conversions.
11389 (build_new_function_call): Print candidates.
11390 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
11391 (reference_binding): Binding a temporary of a reference-related type
11394 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11396 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
11397 * tinfo2.cc (type_info::before): Likewise.
11399 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11401 * call.c (implicit_conversion): Oops.
11403 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
11405 * call.c (implicit_conversion): Try to find a reference conversion
11406 before binding a const reference to a temporary.
11408 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
11410 * exception.cc (__default_unexpected): Call terminate by default,
11411 so that if the user overrides terminate, the correct function will
11414 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
11416 * parse.y (left_curly): Avoid trying to use any fields of
11417 error_mark_node, as there aren't any.
11419 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11421 * lex.c (do_identifier): Avoid breaking on overloaded methods
11422 as default arguments.
11424 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
11426 * call.c (add_template_candidate): Initialize the variable "dummy".
11428 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
11430 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
11431 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
11433 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11435 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
11436 (debug_binfo): Delete decl, not needed.
11438 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
11439 promotes_to_aggr_type): Delete fns.
11440 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
11441 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
11442 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
11444 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
11446 * friend.c (is_friend_type): Delete fn.
11447 * cp-tree.h (is_friend_type): Delete decl.
11449 * decl.c (original_result_rtx, double_ftype_double,
11450 double_ftype_double_double, int_ftype_int, long_ftype_long,
11451 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
11452 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
11454 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
11456 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
11458 * decl.c (pushdecl_nonclass_level): #if 0, unused.
11459 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
11461 * lex.c (reinit_lang_specific): #if 0, unused.
11462 * cp-tree.h (reinit_lang_specific): #if 0 decl.
11464 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
11465 * cp-tree.h (revert_static_member_fn): Delete decl.
11467 * class.c (root_lang_context_p): Delete fn.
11468 * cp-tree.h (root_lang_context_p): Delete decl.
11470 * decl.c (set_current_level_tags_transparency): #if 0, unused.
11471 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
11473 * lex.c (set_vardecl_interface_info): Make static.
11474 * cp-tree.h (set_vardecl_interface_info): Delete decl.
11476 * call.c (find_scoped_type): Make static.
11477 * cp-tree.h (find_scoped_type): Delete decl.
11479 * search.c (convert_pointer_to_vbase): Make static.
11480 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
11482 * decl.c (const_ptr_type_node): Likewise.
11483 * cp-tree.h (const_ptr_type_node): Delete decl.
11485 * typeck.c (common_base_type): Make static.
11486 * cp-tree.h (common_base_types): Delete erroneous decl.
11488 * pt.c (classtype_mangled_name): Make static.
11489 * cp-tree.h (classtype_mangled_name): Delete decl.
11491 * lex.c (check_newline): Make static.
11492 * cp-tree.h (check_newline): Delete decl.
11494 * typeck.c (build_x_array_ref): Delete fn, same idea as
11496 * cp-tree.h (build_x_array_ref): Delete decl.
11498 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
11500 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
11502 * class.c (build_vtable_entry): Make static.
11503 * cp-tree.h (build_vtable_entry): Delete decl.
11505 * class.c (build_vbase_pointer): Make static.
11506 * cp-tree.h (build_vbase_pointer): Delete decl.
11508 * sig.c (build_sptr_ref): Add forward decl and make static.
11509 * cp-tree.h (build_sptr_ref): Delete decl.
11511 * call.c (build_new_method_call): Add forward decl and make static.
11512 * cp-tree.h (build_new_method_call): Delete decl.
11514 * call.c (build_object_call): Make static.
11515 * class.c (check_for_override, complete_type_p, mark_overriders):
11517 * decl.c (cp_function_chain): Likewise.
11518 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
11520 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
11522 * tree.c (build_cplus_array_type_1): Likewise.
11523 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
11524 (comp_target_parms): Likewise.
11526 * init.c (build_builtin_call): Make static.
11527 * cp-tree.h (build_builtin_call): Delete decl.
11529 * typeck.c (binary_op_error): Delete decl.
11530 * cp-tree.h (binary_op_error): Likewise.
11532 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11534 * call.c (build_method_call): Compare against error_mark_node
11535 directly, rather than the ERROR_MARK tree code.
11536 * cvt.c (cp_convert): Likewise.
11537 * decl.c (print_binding_level): Likewise.
11538 (duplicate_decls): Likewise.
11539 (grokdeclarator): Likewise.
11540 (grokdeclarator): Likewise.
11541 * init.c (expand_aggr_init_1): Likewise.
11542 (decl_constant_value): Likewise.
11543 * method.c (build_opfncall): Likewise.
11544 (hack_identifier): Likewise.
11545 * typeck.c (build_modify_expr): Likewise.
11547 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
11549 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11551 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
11553 * pt.c (coerce_template_parms): Add new error message.
11555 * method.c (build_overload_value): Implement name mangling for
11556 floating-point template arguments.
11558 * method.c (build_overload_int, icat, dicat): Fix mangling of template
11559 arguments whose absolute value doesn't fit in a signed word.
11561 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11563 * friend.c: New file; put all of the friend stuff in here.
11564 * init.c: Instead of here.
11565 * Makefile.in (CXX_OBJS): Add friend.o.
11566 (friend.o): Add dependencies.
11567 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
11569 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
11571 * call.c (build_scoped_method_call): Complain if the scope isn't a
11574 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11576 * parse.y (left_curly): Don't crash on erroneous type.
11578 * init.c (build_delete): Fix type of ref.
11580 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11582 * search.c (get_vbase_1): Renamed from get_vbase.
11583 (get_vbase): Wrapper, now non-static.
11584 (convert_pointer_to_vbase): Now static.
11586 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
11587 * init.c (build_delete): Pass one.
11588 (build_partial_cleanup_for): Use build_scoped_method_call.
11589 * decl.c (finish_function): Pass a binfo.
11591 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11593 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
11595 * typeck.c (build_c_cast): Lose other reference to flag.
11597 * call.c (build_field_call): Don't look for [cd]tor_identifier.
11598 * decl2.c (delete_sanity): Remove meaningless use of
11599 LOOKUP_HAS_IN_CHARGE.
11600 * decl.c (finish_function): Use build_scoped_method_call instead
11601 of build_delete for running vbase dtors.
11602 * init.c (build_delete): Call overload resolution code instead of
11603 duplicating it badly.
11605 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
11607 * call.c (build_over_call): Call mark_used before trying to elide
11610 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
11612 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11614 * typeck.c (build_modify_expr): Always pedwarn for a cast to
11615 non-reference used as an lvalue.
11617 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11619 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
11621 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11623 * parse.y (handler): Fix template typo.
11625 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11627 * error.c (lang_decl_name): New fn.
11628 * tree.c (lang_printable_name): Use it.
11630 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
11632 * g++spec.c: Include config.h so that we can catch bzero #defines
11633 from the config file.
11635 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
11637 * new1.cc: Include a declaration for malloc, to avoid warning, and
11638 avoid lossing on systems that require one (ones that define malloc
11641 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11643 * decl2.c (max_tinst_depth): New variable.
11644 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
11646 * pt.c (max_tinst_depth): Variable moved.
11647 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
11650 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11652 * decl.c (xref_basetypes): Allow a base class that depends on
11653 template parms to be incomplete.
11655 * decl2.c (build_expr_from_tree): Support typeid(type).
11656 * rtti.c (get_typeid): Support templates.
11657 (expand_si_desc, expand_class_desc): Fix string length.
11658 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
11660 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11662 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
11664 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
11666 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11668 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
11669 smashes together template and non-template decls of the same
11672 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
11674 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
11676 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11678 * decl.c (duplicate_decls): Next route, pedwarn about different
11679 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
11681 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11683 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
11684 (struct lang_type): Delete has_default_implementation member.
11685 Increase dummy to 21.
11686 * decl.c (start_method): Delete usage.
11688 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
11689 store_after_parms, start_decl_1, auto_function): Add decls.
11690 (get_arglist_len_in_bytes, declare_implicit_exception,
11691 have_exceptions_p, make_type_decl, typedecl_for_tag,
11692 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
11693 build_component_type_expr, cplus_exception_name,
11694 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
11695 * call.c (build_this): Make static.
11696 (is_complete): Likewise.
11697 (implicit_conversion): Likewise.
11698 (reference_binding): Likewise.
11699 (standard_conversion): Likewise.
11700 (strip_top_quals): Likewise.
11701 (non_reference): Likewise.
11702 (build_conv): Likewise.
11703 (user_harshness): Likewise.
11704 (rank_for_ideal): Likewise.
11705 * decl.c (start_decl_1): Delete forward decl.
11706 (push_decl_level): Make static.
11707 (resume_binding_level): Make static.
11708 (namespace_bindings_p): Make static.
11709 (declare_namespace_level): Make static.
11710 (lookup_name_real): Make static.
11711 (duplicate_decls): Make static. Take register off NEWDECL and
11712 OLDDECL parm decls.
11713 * decl2.c (get_sentry): Make static.
11714 (temp_name_p): Delete fn.
11715 * except.c (auto_function): Delete decl.
11716 * lex.c (handle_{cp,sysv}_pragma): Make static.
11717 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
11718 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
11719 * pt.c (tsubst_expr_values): Make static.
11720 * rtti.c (combine_strings): Delete decl.
11722 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
11724 * pt.c (push_template_decl): Handle getting a typedef.
11726 * call.c (build_new_function_call): Complain about void arg.
11728 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11730 * decl.c (duplicate_decls): Give pedwarn of different exceptions
11731 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
11733 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
11735 * except.c (expand_throw): Don't expand the cleanup tree here,
11736 since we are not going to write the rtl out. Fixes problem with
11739 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
11741 * Make-lang.in: Add $(exeext) as necessary.
11743 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
11745 * parse.y (handler_seq): Must have at least one catch clause.
11747 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
11749 * call.c (add_builtin_candidate): Restore ?: hack.
11751 * decl.c (grok_op_properties): More warnings.
11753 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11755 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
11756 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
11758 * decl.c (duplicate_decls): Scale back to a warning, and only do
11761 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
11763 * decl.c (duplicate_decls): pedwarn mismatched exception
11766 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
11768 * call.c (build_new_method_call): Don't display the invisible
11769 argument for controlling virtual bases.
11771 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
11773 * new: Add nothrow new and delete, bad_alloc and throw specifications
11775 * decl.c (init_decl_processing): Add throw specification for delete.
11776 * new.cc (nothrow): Define.
11777 * lex.c (real_yylex): Removing warning that throw and friends are
11779 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
11780 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
11781 * Make-lang.in: Add new{1,2}.{cc,o}.
11783 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11785 * lex.c (cons_up_default_function): Fix return type of synth op=.
11787 * init.c (emit_base_init): Add warnings for uninitialized members
11790 * decl.c (xref_basetypes): Add warning for non-polymorphic type
11791 with destructor used as base type.
11793 * decl.c (grok_op_properties): Add warning for op= returning void.
11794 * typeck.c (c_expand_return): Add warning for op= returning anything
11797 * class.c (finish_struct_1): Add warning for class with pointers
11798 but not copy ctor or copy op=.
11800 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
11801 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
11802 (instantiate_template): If -fexternal-templates, add this
11803 instantiation to pending_templates.
11805 * decl2.c (copy_assignment_arg_p): Disable old hack to support
11808 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
11810 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
11812 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11814 * call.c (standard_conversion): Handle getting references. Tack
11815 on RVALUE_CONV here. Do it for non-class types, too.
11816 (reference_binding): Pass references to standard_conversion.
11817 (implicit_conversion): Likewise.
11818 (add_builtin_candidate): Disable one ?: kludge.
11819 (convert_like): Handle RVALUE_CONVs for non-class types.
11820 (joust): Disable the other ?: kludge.
11822 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11824 * decl.c (init_decl_processing): Add code to build up common
11825 function types beforehand, to avoid creation then removal of
11826 things already in the hash table.
11828 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11830 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
11833 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
11834 current_template_parms.
11836 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
11838 * search.c (lookup_field): Don't return a function, check want_type.
11840 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11842 * init.c (build_new): Make sure PLACEMENT has a type.
11844 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11846 * init.c (build_new): Support new (nothrow).
11848 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11850 * pt.c (instantiate_decl): Also do push_to_top_level before setting
11853 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
11854 * pt.c (tsubst): Defer instantiation of default args.
11855 * call.c (build_over_call): Until here.
11857 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11859 * search.c (lookup_field): Make sure we have an
11860 IDENTIFIER_CLASS_VALUE before we try to return it.
11862 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
11864 * call.c (build_method_call): Delete unused var PARM.
11865 (build_overload_call_real): Likewise.
11866 (build_object_call): Delete unused var P.
11867 (build_new_op): Likewise.
11868 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
11869 var definitions, which are never used.
11870 (shadow_tag): Delete unused var FN.
11871 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
11872 * init.c (build_new): Delete unused var ALLOC_TEMP.
11873 * method.c (hack_identifier): Delete unused var CONTEXT.
11874 (do_build_copy_constructor): Delete unused var NAME.
11875 (synthesize_method): Delete unused var BASE.
11876 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
11877 * rtti.c (build_headof): Delete unused var VPTR.
11878 (get_typeid): Delete unused var T.
11879 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
11881 (build_ptrmemfunc): Delete unused vars U and NINDEX.
11882 * typeck2.c (build_functional_cast): Delete unused var BINFO.
11884 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
11886 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
11887 things in a type being defined.
11888 * decl.c (finish_enum): Reverse the values so that they are in
11891 * pt.c (instantiate_class_template): Don't initialize
11892 BINFO_BASETYPES until the vector is filled out.
11893 (unify): Don't abort on conflicting bindings, just fail.
11894 (instantiate_decl): Do push_tinst_level before any tsubsting.
11896 * method.c (build_overload_value): Handle getting a
11897 TEMPLATE_CONST_PARM for a pointer.
11899 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
11901 * init.c (expand_member_init): Don't give 'not a base' error for
11904 * pt.c (instantiate_decl): Call import_export_decl later.
11906 * pt.c (instantiate_class_template): Return a value.
11908 * parse.y (extension): New rule for __extension__.
11909 (extdef, unary_expr, decl, component_decl): Use it.
11911 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
11913 * class.c (base_binfo): Remove unused base_has_virtual member.
11914 (finish_base_struct): Likewise.
11915 (finish_struct_1): Likewise.
11917 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
11919 * search.c (expand_upcast_fixups): Fix bogus code generation
11920 problem where the generated code uses the wrong index into the
11921 runtime built vtable on the stack. Old code could clobber random
11924 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
11926 * init.c (perform_member_init): Make sure the partial EH cleanups
11927 live on the function_obstack.
11929 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
11931 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
11932 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
11934 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
11936 * decl.c (grokvardecl): Avoid ANSI style initialization.
11938 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
11940 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
11942 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
11944 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
11946 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11948 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
11949 arguments we compare against. Start the count of I at 1, not 0,
11950 since argv[0] is still the command.
11952 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
11954 * lang-specs.h: Accept .cp as an C++ extension.
11956 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11958 * cp-tree.h (ptr_reasonably_similar): Add decl.
11960 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11962 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
11963 pointer. New local SPECBITS with the parm's value.
11964 (grokdeclarator): Pass &specbits down.
11966 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
11967 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
11969 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
11970 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
11972 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
11973 not an error_mark_node.
11975 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11977 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
11978 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
11980 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11982 * decl.c (grokdeclarator): When giving an anonymous struct a name,
11983 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
11986 * typeck2.c (build_m_component_ref): If component is a pointer
11987 to data member, resolve the OFFSET_REF now.
11989 * call.c (convert_like): Don't go into infinite recursion.
11991 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
11993 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
11994 * tree.c (layout_basetypes): And on the vbase ptr.
11996 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11998 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
11999 CHAR_TYPE_SIZE so bool is always the same size as another type.
12001 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
12003 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
12005 * decl2.c (grok_x_components): Remove synthesized methods from
12006 TYPE_METHODS of an anonymous union, complain about member
12008 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
12010 (finish_function): Just clear the DECL_RTL of our arguments.
12012 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12014 * decl2.c (finish_file): Emit DWARF debugging info for static data
12017 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
12019 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
12021 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
12024 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12026 * Make-lang.in (g++-cross$(exeext)): Fix typo.
12028 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12030 Make the g++ driver now be a standalone program, rather than one
12031 that tries to run the gcc driver after munging up the options.
12032 * Make-lang.in (g++.c, g++spec.o): New rules.
12033 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
12035 (g++$(exeext)): New rule, based on xgcc rule.
12036 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
12037 * g++spec.c: New file.
12038 * g++.c: Removed file.
12040 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
12042 * cvt.c (build_up_reference): Arrange for any temporary values
12043 that have been keep in registers until now to be put into memory.
12045 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12047 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
12048 that make -j3 bootstrap works better.
12050 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
12052 * decl.c (pushtag): Do pushdecl for anon tags.
12054 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
12056 * typeck.c (c_expand_return): Fix logic.
12057 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
12059 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
12061 * g++.c (main): Make sure arglist has a final NULL entry. Add
12062 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
12063 stdin/stdout of the invoked program are redirected to
12066 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12068 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
12070 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
12072 * init.c (resolve_offset_ref): Handle obj.vfn better.
12073 * typeck.c (build_component_ref): Set TREE_TYPE on result from
12076 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
12078 * typeck.c (convert_for_assignment): Also handle anachronistic
12079 implicit conversions from (::*)() to cv void*.
12080 * cvt.c (cp_convert_to_pointer): Likewise.
12082 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12084 * lex.c (handle_cp_pragma): Fix bogus warning.
12086 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
12088 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
12089 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
12091 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12093 * class.c (finish_struct_1): Support DWARF2_DEBUG.
12094 * search.c (dfs_debug_mark): Likewise.
12095 * decl2.c (finish_vtable_vardecl): Likewise.
12096 * decl.c (pushtag, finish_enum): Likewise.
12097 * lex.c (check_newline): Use debug_* instead of calling *out
12098 functions directly.
12100 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12102 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
12103 on some picky hosts.
12105 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12107 * class.c (finish_struct_1): A class has a non-trivial copy
12108 constructor if it has virtual functions.
12110 * cvt.c (cp_convert): Always call a constructor.
12112 * call.c (reference_binding): Still tack on a REF_BIND
12113 for bad conversions.
12114 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
12116 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
12117 (c_expand_return): Likewise.
12118 * typeck2.c (digest_init): Likewise for { }.
12119 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
12120 * cvt.c (cp_convert): Handle failure better.
12122 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12124 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
12125 of GCC be path-relative.
12127 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12129 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
12130 it does need choose-temp.o and pexecute.o.
12132 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12134 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
12135 that we still use it.
12136 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
12138 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12140 * init.c (expand_default_init): Avoid calling constructors to
12141 initialize reference temps.
12143 * cvt.c (convert_to_reference): Fix.
12145 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12147 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
12148 (convert_to_reference): Likewise.
12149 * typeck.c (convert_for_initialization): Likewise.
12150 * init.c (expand_default_init): Likewise.
12151 (expand_aggr_init_1): Likewise.
12152 * cp-tree.h (CONV_NONCONVERTING): Lose.
12153 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
12155 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
12157 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
12159 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
12161 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12163 * init.c (expand_aggr_init_1): Don't crash on non-constructor
12166 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12168 * g++.c: Include gansidecl.h.
12169 (VPROTO, PVPROTO, VA_START): Delete.
12170 (choose_temp_base_try, choose_temp_base, perror_exec,
12171 run_dos) [__MSDOS__]: Delete fns.
12172 (pfatal_with_name): Delete fn.
12173 (temp_filename): Declare like in gcc.c.
12174 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
12175 (error_count, signal_count): Define.
12176 (error): Delete both definitions.
12177 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
12178 (pfatal_pexecute): Add fn from gcc.c.
12179 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
12180 code to use the pexecute stuff also used by gcc.c.
12181 (MIN_FATAL_STATUS): Define.
12182 * Make-lang.in (g++): Add dependency on and linking with
12183 choose-temp.o and pexecute.o.
12185 * cp-tree.h: Include gansidecl.h.
12186 (STDIO_PROTO): Delete #undef/#define.
12187 * cvt.c (NULL): Delete #undef/#define.
12188 * expr.c (NULL): Likewise.
12189 * init.c (NULL): Likewise.
12190 * rtti.c (NULL): Likewise.
12191 * xref.c (NULL): Likewise.
12193 * cp-tree.h (build_user_type_conversion): Add prototype.
12194 * call.c (build_user_type_conversion): Delete prototype. Correct
12195 decl of FLAGS arg to be an int.
12196 * cvt.c (build_user_type_conversion): Likewise.
12198 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
12200 * cp-tree.def: Add TRY_BLOCK and HANDLER.
12201 * except.c (expand_start_catch_block): Support templates.
12202 * parse.y (try_block, handler_seq): Likewise.
12203 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
12205 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12207 * pt.c (current_template_args): New fn.
12208 (push_template_decl): Use it.
12209 * decl.c (grokdeclarator): Use it.
12211 * decl2.c (build_expr_from_tree): Dereference ref vars.
12213 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
12214 the decl-specifier-seq.
12216 * decl.c (grok_op_properties): Don't force the type of a conversion
12217 op to be complete. Don't warn about converting to the same type
12218 for template instantiations.
12220 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
12223 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
12225 * typeck.c (get_delta_difference): Remove previous bogusness.
12226 Don't give errors if force is set.
12228 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12230 * decl2.c (finish_file): Don't emit debug info.
12231 * decl.c (pushdecl): Lose obsolete code.
12232 (grokdeclarator): Still do the long long thing after complaining.
12233 * search.c (note_debug_info_needed): Don't do anything if we're in a
12235 * method.c (synthesize_method): For non-local classes,
12236 push_to_top_level first.
12238 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
12240 * typeck.c (get_delta_difference): Add no_error parameter.
12241 (build_ptrmemfunc): Call get_delta_difference with no_error set;
12242 we don't want error messages when converting unrelated
12243 pointer-to-member functions.
12245 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
12247 * error.c (dump_expr): Improve the wording on error messages that
12248 involve pointer to member functions.
12250 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
12252 * cvt.c (cp_convert_to_pointer): Move code for conversions from
12253 (::*)() to void* or (*)() up a bit, so that we can convert from
12254 METHOD_TYPEs as well.
12256 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12258 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
12259 There are no 'member' types.
12260 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
12261 (build_x_typeid): Handle errors.
12263 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
12265 * typeck.c (convert_for_assignment): Handle anachronistic implicit
12266 conversions from (::*)() to void* or (*)().
12267 * cvt.c (cp_convert_to_pointer): Likewise.
12268 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
12269 conversions from here.
12270 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
12271 * lang-options.h: Likewise.
12272 * decl2.c (warn_pmf2ptr): Define.
12273 * cp-tree.h: Declare it.
12274 * typeck2.c (digest_init): Allow pmfs down into
12275 convert_for_initialization.
12277 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
12279 * typeck.c (c_expand_return): Fix for returning overloaded fn.
12281 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12283 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
12284 * decl.c (grok_reference_init): Pass DIRECT_BIND.
12285 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
12287 * call.c (convert_like): Don't pass INDIRECT_BIND.
12288 * typeck.c (convert_arguments): Likewise.
12289 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
12291 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12293 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
12294 similar code in build_up_ref.
12295 * cvt.c (build_up_reference): Drastically simplify.
12297 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
12299 * typeck.c (signed_or_unsigned_type): If the given type already
12300 as the correct signedness, then just return it.
12302 * typeck.c ({un,}signed_type): If can't do anything, call
12303 signed_or_unsigned_type.
12305 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
12307 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
12308 current_class_type is NULL.
12310 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
12312 * class.c (finish_struct_1): Avoid empty structs by adding a field
12313 so layout_type gets the mode right.
12315 * typeck.c (c_expand_return): Drastically simplify.
12317 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12319 * typeck.c (decay_conversion): Handle overloaded methods.
12321 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
12323 * call.c (build_over_call): A TARGET_EXPR has side-effects.
12325 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
12327 * cvt.c (convert_to_pointer_force): Add code to support pointer to
12328 member function to pointer to function conversions.
12329 * init.c (resolve_offset_ref): Add code to allow faked up objects,
12330 ignoring them if they are not used, and giving an error, if they
12332 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
12333 code, and so that we can give an error, if we needed an object,
12334 and one was not provided.
12335 (build_c_cast): Don't call default_conversion when we want to
12336 convert to pointer to function from a METHOD_TYPE.
12338 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12340 * Make-lang.in (cplib2.ready): Fix logic.
12342 * decl.c (shadow_tag): Only complain about non-artificial function
12345 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
12347 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
12349 * expr.c (cplus_expand_expr): Pre-tweak call_target like
12350 expand_inline_function would.
12352 * pt.c (mark_decl_instantiated): If extern_p, call
12353 mark_inline_for_output.
12355 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
12357 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
12360 * typeck.c (get_delta_difference): Fix wording, as we can be used
12361 for pointer to data members.
12363 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
12365 * pt.c (tsubst): If the function decl isn't a member of this
12366 template, return a copy of the decl (including copying the
12367 lang-specific part) so we don't hose ourselves later.
12369 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
12371 * class.c (finish_struct): Remove DWARF-specific tag handling.
12372 * decl.c (pushtag): Likewise.
12373 (finish_function): Always clear DECL_ARGUMENTS on function decls with
12375 * decl2.c (finish_file): Emit DWARF debugging info for static data
12378 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
12380 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
12381 isn't the same as the new one before we whack it.
12383 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
12385 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
12386 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
12387 warn_traditional and warn_strict_prototypes; remove ancient
12388 'overload' code; remove references to flag_traditional.
12390 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
12392 * input.c (sub_getch): Handle 8-bit characters in string literals.
12394 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
12396 * tree.c (mapcar): Handle CONSTRUCTORs.
12397 (copy_to_permanent): Handle expression_obstack properly.
12399 * Make-lang.in (cplib2.txt): Also depend on the headers.
12401 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
12403 (expand_class_desc): Use USItype for offset field.
12404 * tinfo.h (struct __class_type_info): Likewise.
12406 * method.c (build_overload_int): TYPE_PRECISION should be applied
12409 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
12411 * call.c (build_new_op): A COND_EXPR involving void must be a
12414 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12416 * typeck.c (build_x_component_ref): New fn.
12417 (build_object_ref): Use it.
12418 * parse.y (primary): Use it.
12419 * decl2.c (build_expr_from_tree): Use it.
12420 * cp-tree.h: Declare it.
12422 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
12423 * error.c (dump_type_suffix): Handle variable arrays.
12425 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12427 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
12429 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12431 * decl.c (lookup_name_real): Don't try to look up anything in a
12434 * tinfo2.cc (__throw_type_match_rtti): Oops.
12436 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12438 * Make-lang.in (exception.o): Use -fno-PIC for now.
12440 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
12442 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
12444 (get_tinfo_fn_dynamic): Extracted from build_typeid.
12445 * tinfo2.cc (__dynamic_cast): Adjust.
12447 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
12448 (build_x_typeid): Likewise.
12450 * parse.y: Call build_x_typeid instead of build_typeid.
12451 * cp-tree.def: Add TYPEID_EXPR.
12452 * pt.c (tsubst_copy): Handle typeid.
12453 * decl2.c (build_expr_from_tree): Likewise.
12454 * rtti.c (build_x_typeid): Throw bad_typeid from here.
12455 (build_typeid): Not here.
12456 * cp-tree.h: Declare build_x_typeid.
12458 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
12460 * call.c (convert_like): Pull out constant values.
12462 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
12464 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12466 * decl.c (init_decl_processing): Create short int types before
12467 creating size_t in case a machine description needs to use
12468 unsigned short for size_t.
12470 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12472 * Make-lang.in (exception.o): Turn off pic.
12474 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
12475 type, multi-level ptr conversions.
12477 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
12478 (throw_bad_cast): Use it.
12479 (throw_bad_typeid): New fn.
12480 (build_typeid): Throw bad_typeid as needed.
12482 (synthesize_tinfo_fn): Handle functions and arrays before checking
12485 * Remove .h from standard C++ headers, add new.h, move into inc
12488 * exception*: Remove pointer from object, constructors. Add
12489 default exception::what that uses type_info::name. Add
12490 __throw_bad_typeid.
12492 * init.c (build_new): Don't add a cookie to new (void *) T[2].
12494 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
12496 * Make-lang.in: Building C++ code depends on cc1plus.
12498 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12500 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
12501 a HOST_WIDE_INT, not a tree.
12503 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12505 * exception.cc: Don't include <stdlib.h>.
12507 * Make-lang.in (c++.clean): Remove cplib2.*.
12509 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
12511 * parse.y (component_decl_1, component_costructor_declarator case):
12512 Pass attributes/prefix_attributes in tree list.
12514 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
12516 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
12518 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12520 * lex.c (do_identifier): Don't do deferred lookup in a template
12523 * typeck2.c (store_init_value): Oops.
12525 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
12526 New files for C++ lang-support library.
12527 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
12528 (CXX_LIB2FUNCS): Define.
12529 And rules for building the C++ lang-support code.
12530 * config-lang.in (headers): Define.
12531 (lib2funcs): Define.
12533 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
12535 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
12537 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
12538 * typeck2.c (store_init_value): Check for initializing pmf with { }
12540 (process_init_constructor): Not here.
12542 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12544 * pt.c (begin_template_parm_list): Increment
12545 processing_template_decl here.
12546 (end_template_parm_list): Not here.
12547 (process_template_parm): No need to add 1 to it now.
12548 * *.c: Use processing_template_decl instead of current_template_parms
12549 to check for being in a template.
12551 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
12552 (tsubst_copy): Handle CONSTRUCTOR.
12553 (instantiate_decl): Set up context properly for variables.
12554 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
12555 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
12557 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12559 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
12561 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12563 * method.c (make_thunk): Call comdat_linkage before setting the
12566 * decl2.c (comdat_linkage): Use make_decl_one_only.
12567 (import_export_decl): Likewise.
12568 * decl.c (init_decl_processing): Check supports_one_only instead of
12571 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
12573 * decl2.c (grokfield): Tighten checking for access decls.
12575 * decl.c (make_typename_type): Resolve references to
12576 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
12577 (lookup_name_real): Types that depend on a template parameter get
12578 an implicit 'typename' unless they're in the current scope.
12579 (start_decl_1): We don't care about incomplete types that depend
12580 on a template parm.
12581 (grokdeclarator): Resolve 'typename's in the type specifier that
12582 refer to members of the current scope.
12584 * call.c (build_over_call): Remove 'inline called before
12585 definition' diagnostic.
12586 (build_method_call): Likewise.
12587 * decl.c (duplicate_decls): Downgrade 'used before declared
12588 inline' to a warning, only with -Winline.
12590 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
12592 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
12594 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
12596 * call.c (build_method_call): When calling a signature
12597 default implementation, as in other cases, let instance_ptr simply
12600 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
12602 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
12604 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
12606 * except.c (expand_start_catch_block): Add a pushlevel so that -g
12607 works on hppa and SPARC.
12609 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12611 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
12613 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
12615 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
12616 before testing whether it's a signature.
12618 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
12620 * call.c (build_new_method_call): Don't complain about signature
12621 pointers and references not being an aggr type.
12622 (build_this): If a signature pointer or reference was passed in,
12624 (build_new_method_call): If instance is a signature pointer, set
12625 basetype to the signature type of instance.
12626 * sig.c (build_signature_method_call): Deleted basetype and
12627 instance parameters, they can be found as the DECL_CONTEXT of
12628 function and as the first argument passed in.
12629 * cp-tree.h: Changed declaration of build_signature_method_call.
12630 * call.c (build_method_call): Deleted first two arguments in call
12631 of build_signature_method_call.
12632 (build_over_call): Added call to build_signature_method_call.
12634 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
12636 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
12639 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12641 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
12643 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
12645 * except.c (expand_start_try_stmts): Move to except.c in the backend.
12646 (expand_end_try_stmts): Remove.
12648 * init.c (perform_member_init): Use add_partial_entry () instead
12649 of directly manipulating lists.
12650 (emit_base_init): Likewise.
12652 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
12654 * except.c (expand_exception_blocks): Always make sure USE and
12655 CLOBBER insns that came at the end still do, the backend relies
12658 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
12660 * call.c (build_over_call): We can only use a TARGET_EXPR of the
12663 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
12665 * cvt.c (convert_to_reference): Revert last change, don't complain
12666 about temp without target decl.
12668 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
12670 * decl.c (grokdeclarator): Don't core dump when void() is given.
12672 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12674 * decl.c (copy_args_p): Don't crash.
12676 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
12678 * pt.c (tsubst): And support template args inside the exception
12681 * pt.c (tsubst): Add support for exception specifications in
12682 template functions.
12684 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
12686 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
12688 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
12689 (start_function): Likewise.
12690 (start_method): Likewise.
12691 (grokfield): Likewise.
12692 (make_call_declarator): Add throw spec parameter.
12693 (set_quals_and_spec): Add routine.
12694 * lex.c (set_quals_and_spec): Likewise.
12695 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
12696 * decl.c (shadow_tag): Eliminate the throw spec parameter to
12698 (groktypename): Likewise.
12699 (start_decl): Eliminate the throw spec parameter. Eliminate the
12700 throw spec parameter to grokdeclarator. Eliminate the throw spec
12701 field in DECL_STMT.
12702 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
12703 (grokfndecl): Remove useless set of raises.
12704 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
12705 the throw spec parameter to start_decl. Pull the throw spec out
12706 of the call declarator.
12707 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
12708 (start_function): Eliminate the throw spec parameter. Eliminate
12709 the throw spec parameter to grokdeclarator.
12710 (start_method): Likewise.
12711 * decl2.c (grokfield): Likewise.
12712 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
12713 (grokoptypename): Likewise.
12714 (finish_file): Eliminate the throw spec parameter to
12715 start_function. Add throw spec to make_call_declarator.
12716 * except.c (init_exception_processing): Add throw spec to
12717 make_call_declarator. Eliminate the throw spec parameter to
12719 (expand_start_catch_block): Eliminate the throw spec parameter to
12721 (expand_builtin_throw): Add throw spec to make_call_declarator.
12722 Eliminate the throw spec parameter to start_function.
12723 (start_anon_func): Likewise.
12724 * lex.c (make_call_declarator): Add throw spec parameter.
12725 (set_quals_and_spec): New routine.
12726 (cons_up_default_function): Add throw spec to make_call_declarator.
12727 Eliminate the throw spec parameter to grokfield.
12728 * method.c (synthesize_method): Eliminate the throw spec parameter
12730 * pt.c (process_template_parm): Eliminate the throw spec parameter
12732 (tsubst): Add throw spec to make_call_declarator.
12733 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
12734 (do_function_instantiation): Eliminate the throw spec parameter to
12735 grokdeclarator. Eliminate the throw spec parameter to
12737 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
12739 * parse.y (datadef): Remove non-winning optimization.
12741 (fndef): Remove ambiguous error productions uncovered by grammar
12743 (constructor_declarator): Add exception_specification_opt here.
12744 (component_constructor_declarator): Likewise.
12745 (direct_after_type_declarator): Likewise.
12746 (complex_direct_notype_declarator): Likewise.
12747 (direct_abstract_declarator): Likewise.
12748 (fn.def1): Remove exception_specification_opt.
12749 (fn.def2): Likewise.
12750 (condition): Likewise.
12751 (initdcl0): Likewise.
12752 (initdcl): Likewise.
12753 (notype_initdcl0): Likewise.
12754 (nomods_initdcl0): Likewise.
12755 (component_decl_1): Likewise.
12756 (component_declarator): Likewise.
12757 (after_type_component_declarator0): Likewise.
12758 (after_type_component_declarator): Likewise.
12759 (notype_component_declarator): Likewise.
12761 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12763 * call.c (build_over_call): Also use an INIT_EXPR when
12764 initializing anything from an rvalue.
12766 * call.c (build_over_call): Call stabilize_reference when building
12767 an INIT_EXPR instead of calling the copy ctor.
12769 * call.c (joust): Extend the previous change to all comparisons.
12771 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
12772 NO_LINKAGE_HEURISTICS.
12774 * decl2.c (finish_file): Emit any statics that weren't already.
12776 * typeck.c (build_static_cast): Implement.
12777 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
12778 * decl.c (grokparms): Use can_convert_arg instead of
12779 implicit_conversion directly.
12780 (copy_args_p): New fn.
12781 * cvt.c (convert_to_reference): Don't complain about temp with
12783 (build_up_reference): Handle TARGET_EXPRs.
12784 * call.c (build_over_call): Elide unnecessary temps.
12785 (can_convert*): Use new overloading code.
12787 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
12789 * call.c: Move TYPE_PTR*_MACROS ...
12790 * cp-tree.h: To here.
12791 * typeck.c (build_reinterpret_cast): Implement.
12793 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
12795 (joust): If we're comparing a function to a builtin and the worst
12796 conversion for the builtin is worse than the worst conversion for the
12797 function, take the function.
12799 * typeck.c (build_const_cast): Implement.
12800 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
12801 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
12803 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
12805 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
12806 too early. Make sure we explode if exprtype turns out to be a
12807 NULL_TREE when it shouldn't be.
12809 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
12811 * cp-tree.h: New routine make_call_declarator.
12812 * lex.c (make_call_declarator): Define it.
12813 * except.c (init_exception_processing): Use it.
12814 (expand_builtin_throw): Likewise.
12815 (start_anon_func): Likewise.
12816 * decl2.c (finish_file): Likewise.
12817 * lex.c (cons_up_default_function): Likewise.
12818 * parse.y: Likewise.
12819 * pt.c (tsubst): Likewise.
12821 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
12823 * decl2.c (groktypefield): Remove unused code.
12825 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
12827 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
12828 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
12829 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
12830 nonempty_cv_qualifiers.
12833 * lex.c (make_pointer_declarator): Change type_quals into
12835 (make_reference_declarator): Likewise.
12837 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12839 * decl.c (start_function): Only check interface_* for templates
12840 with flag_alt_external_templates.
12842 * call.c (build_new_op): Check for comparison of different enum types.
12843 (build_over_call): Fix arg # output.
12845 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
12847 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12849 * call.c (build_new_op): Check for erroneous args.
12851 * call.c (build_new_method_call): Add missing args to cp_error.
12853 * tree.c (error_type): Don't print reference-to-array.
12855 * typeck.c (convert_for_assignment): Don't say contravariance for
12858 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
12860 * call.c (build_over_call): Diagnose bad convs for `this'.
12862 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
12865 * call.c (convert_like): Handle bad convs.
12866 (build_over_call): Handle bad convs better.
12868 * decl2.c: -fansi-overloading is now the default.
12870 * call.c (build_new_method_call): Check for erroneous args.
12872 * pt.c (instantiate_class_template): Propagate
12873 TYPE_USES_MULTIPLE_INHERITANCE.
12875 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
12877 * call.c (enforce_access): Add static to routine.
12879 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12881 * call.c (build_user_type_conversion_1): Fix bad handling.
12882 (compare_ics): Likewise.
12884 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12886 * call.c (standard_conversion): Oops.
12888 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
12890 * g++.c: Update test for win32 (&& ! cygwin32).
12892 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12894 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
12895 (ptr_reasonably_similar): New fn.
12896 * call.c (BAD_RANK): New rank.
12897 (ICS_BAD_FLAG): New macro.
12898 (standard_conversion): Handle almost-right pointer conversions.
12899 (reference_binding): Handle bad rvalue bindings.
12900 (add_*_candidate): Stuff.
12901 (build_over_call): Pass bad conversions to convert_for_initialization.
12902 (compare_ics): Handle bad convs.
12905 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
12907 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
12908 integer_type_node when computing pointer offsets.
12910 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12912 * tree.c (lvalue_type): New fn.
12913 (error_type): New fn.
12914 * call.c (op_error): Use error_type.
12915 (add_conv_candidate): Use lvalue_type.
12916 (add_builtin_candidates): Likewise.
12917 * error.c (args_as_string): Use error_type.
12919 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12921 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
12922 (tsubst): Not here.
12924 * decl.c (init_decl_processing): With -ansi, __null's type is the
12925 signed integral type with the same number of bits as a pointer.
12926 Introduce a new variable null_node for it.
12927 * cp-tree.h: Adjust.
12928 * call.c (null_ptr_cst_p): Adjust.
12930 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
12932 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
12935 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12937 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
12938 fns of classes without virtual functions.
12940 * call.c (add_function_candidate): Handle `this' specially.
12941 (compare_ics): Likewise.
12943 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
12945 * typeck.c (build_conditional_expr): Fix handling of __null.
12947 * decl2.c (comdat_linkage): New fn.
12948 (import_export_vtable): Use it.
12949 (import_export_decl): Use it.
12950 * method.c (make_thunk): Use it.
12952 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12954 * pt.c (end_template_decl): If we don't actually have parms, return.
12955 * parse.y (template_header): Accept 'template <>'.
12957 * errfn.c: Allow 5 args.
12959 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12961 * tree.c (make_temp_vec): New fn.
12962 * pt.c (push_template_decl): Handle partial specs.
12963 (instantiate_class_template): Likewise.
12964 (more_specialized): Use get_bindings.
12965 (more_specialized_class): New fn.
12966 (get_class_bindings): New fn.
12967 (most_specialized_class): New fn.
12968 (do_function_instantiation): List candidates for ambiguous case.
12969 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
12970 (shadow_tag): Call push_template_decl for partial specializations.
12971 * parse.y: Likewise.
12972 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
12973 DECL_TEMPLATE_MEMBERS.
12974 * call.c (print_z_candidates): Reduce duplication.
12976 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12978 * decl2.c (lang_decode_option): Allow -fansi-overloading.
12980 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12982 * pt.c (get_bindings): New fn.
12983 (most_specialized): Likewise.
12984 (do_function_instantiation): Use them.
12985 (add_maybe_template): New fn.
12986 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
12987 * call.c (build_new_op): Handle guiding decls.
12988 (build_new_function_call): Likewise.
12989 * decl2.c (finish_file): Likewise.
12991 * decl2.c (mark_used): Do synthesis here.
12992 * call.c (build_method_call): Not here.
12993 (build_over_call): Or here.
12994 * typeck.c (build_function_call_real): Or here.
12995 * tree.c (bot_manip): Call mark_used on functions used in default
12998 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13000 * decl2.c (import_export_vtable): Delete code that disabled vtable
13001 heuristic on systems with ASM_OUTPUT_EXTERNAL.
13003 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
13005 * typeck.c (build_x_function_call): Handle static call context
13008 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
13009 the function, not its outer block.
13011 * call.c (build_field_call): Pass fields on to build_opfncall
13012 regardless of TYPE_OVERLOADS_CALL_EXPR.
13013 (build_method_call): Pass on to build_new_method_call sooner.
13015 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
13017 * class.c (instantiate_type): Don't put a POINTER_TYPE to
13018 METHOD_TYPE on an expression. Also make a copy of rhs instead of
13021 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
13023 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
13024 (add_builtin_candidate): Don't take enums for ++.
13025 (build_new_method_call): Handle non-aggregates and field calls.
13026 Move new overloading code from...
13029 * decl.c (grokparms): Don't check default args in templates.
13031 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
13033 * cvt.c (build_new_op): Fix args to build_unary_op.
13034 (add_builtin_candidates): Don't call type_promotes_to on float.
13036 * decl.c (grokparms): Check the type of the default arg.
13038 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
13039 returning NULL_TREE.
13041 * typeck.c (build_x_binary_op): Avoid doing extra work.
13042 (build_x_unary_op): Likewise.
13043 (build_x_conditional_expr): Likewise.
13044 * cvt.c (build_over_call): Return.
13045 (add_builtin_candidate): Fix MEMBER_REF.
13046 (build_new_op): Likewise.
13048 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
13050 * method.c (build_overload_name): Put bug fix into code but leave
13051 disabled for now so we can be bug compatible with older releases
13052 that do repeats incorrectly. In the future, we can enable it.
13054 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13056 * cvt.c (convert_like): Don't call build_cplus_new twice.
13058 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
13059 Control new overloading code with -fansi-overloading.
13061 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
13063 * cvt.c (build_over_call): Call build_cplus_new.
13064 * call.c (build_method_call): Likewise.
13065 * typeck.c (build_function_call_real): Likewise.
13066 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
13067 the COND_EXPR in a TARGET_EXPR so they use the same slot.
13069 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
13071 * typeck.c (complete_type): Propagate
13072 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
13074 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13076 * cvt.c (joust): More ?: kludging. Sigh.
13077 (build_over_call): Don't try to synthesize global fns.
13079 * search.c (lookup_conversions): Use binfo marking.
13081 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
13083 * search.c (build_mi_matrix): Use the correct value of cid
13084 when determining the new mi_size.
13086 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13088 * cvt.c (add_builtin_candidates): Do consider type conversion ops
13089 for the first parms of += et al.
13090 (strip_top_quals): New fn.
13091 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
13092 (implicit_conversion): Likewise.
13093 (add_builtin_candidates): Be careful about arrays.
13094 (build_new_method_call): Handle vtable optimization.
13096 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
13098 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
13099 * cvt.c (reference_binding): Use it.
13100 (implicit_conversion): Use it.
13101 (add_builtin_candidate, COND_EXPR): Use it.
13103 * cvt.c (build_new_function_call): Check for error args.
13105 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
13107 * gxx.gperf: Add __null.
13108 * hash.h: Regenerate.
13109 * lex.h: Add RID_NULL.
13110 * lex.c (init_lex): Create null_pointer_node here, stick it in
13112 * decl.c (init_decl_processing): Still set its type here.
13113 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
13114 (convert_to_pointer_force): Likewise.
13115 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
13117 * call.c (convert_harshness): Use null_ptr_cst_p.
13118 * typeck.c (convert_for_assignment): Likewise. Don't produce
13121 * error.c (args_as_string): Handle lists of actual args, too.
13122 * cvt.c (null_ptr_cst): Support (void*)0 for now.
13123 (build_user_type_conversion_1): Improve diagnostics.
13124 (build_new_function_call): Likewise.
13125 (build_object_call): Likewise.
13126 (build_new_method_call): Likewise. Move call before def diagnostic...
13127 (build_over_call): Here.
13129 * cvt.c (build_new_method_call): Don't complain about no match if
13130 LOOKUP_SPECULATIVELY.
13131 (build_over_call): Fix 'this' for virtual fn.
13132 (build_new_method_call): Add diagnostic.
13134 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13136 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
13137 constructors to be passed in.
13138 (build_over_call): Likewise.
13139 (build_user_type_conversion_1): Pass them in.
13140 (convert_like): Likewise.
13141 (build_object_call): Handle overloaded conversions.
13142 (build_over_call): Pass the right args to build_vfn_ref.
13143 (standard_conversion): Fix pmf convs.
13144 (joust): Handle comparing statics and non-statics.
13145 (build_new_method_call): New fn.
13146 * call.c (build_method_call): Call it if NEW_OVER.
13148 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
13150 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
13153 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
13155 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
13156 instead of just maybe_build_cleanup so that we deallocate the
13159 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13161 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
13162 * cp-tree.h (finish_prevtable_vardecl): Add decl.
13164 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
13166 * pt.c (instantiate_class_template): Call complete_type. Also, if
13167 we're at the end of the file and we just instantiated a template
13168 class with a vtable, call finish_prevtable_vardecl.
13170 * error.c (dump_decl): Don't explode (or explode more gracefully
13171 as appropriate) if the object being dumped has a null type.
13172 (dump_expr): Likewise.
13174 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
13175 by counting the number of nodes that we'll need before allocating
13177 (lookup_fnfields): Fix comment.
13178 (breadth_first_search): Fix comment.
13180 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
13182 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
13184 * class.c (finish_struct): Call cplus_decl_attributes here.
13185 (finish_struct_1): Not here.
13186 * cp-tree.h: Adjust.
13188 * pt.c (type_unification): New parameter STRICT.
13189 (unify): If STRICT, don't allow cv addition or base deduction.
13190 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
13192 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13194 * search.c (get_template_base{_recursive}): New fns.
13195 * pt.c (more_specialized): New fn.
13196 (do_function_instantiation): Use it.
13197 (unify): Handle base deduction.
13198 * cvt.c (joust): Use more_specialized.
13199 Don't arbitrarily choose between non-builtin candidates.
13200 (build_over_call): Call require_complete_type.
13202 * decl.c (start_function): Statics are static even in a #pragma
13205 * decl2.c (import_export_vtable): Disable vtable heuristic on
13206 systems with ASM_OUTPUT_EXTERNAL.
13208 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
13209 (standard_conversion): No std conv to enum type.
13211 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
13214 * cvt.c (reference_binding): Bind directly to a base subobject of
13217 * cvt.c (build_new_op): Enforce access control.
13219 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
13221 * typeck2.c (process_init_constructor): When scanning the
13222 union for a named field, skip things that aren't FIELD_DECLs.
13224 * method.c (synthesize_method): Don't scan fndecl's rtl if
13225 we're at the end of the file; just assume the function can't
13228 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13230 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
13233 * cvt.c (build_user_type_conversion_1): Handle overloaded
13236 * cvt.c (add_builtin_candidates): Don't consider type conversion
13237 operators for the first parameter of operator=.
13239 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
13241 * typeck.c (complete_type): Only call layout_type if we're not
13242 expanding a template.
13244 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13246 * cvt.c (compare_ics): Oops.
13248 * cvt.c (op_error): Oops.
13250 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
13251 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
13252 (build_conv): Use them.
13253 (implicit_conversion): Use them.
13254 (convert_like): Handle them.
13255 (build_new_op): Handle builtin COND_EXPR again.
13256 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
13257 in lists of types for COND_EXPR.
13258 (add_builtin_candidate): Add enum candidates for COND_EXPR.
13260 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
13262 * typeck.c (build_modify_expr): Always attempt to build a call to
13263 the assignment operator, even if we're using a default one.
13264 (convert_for_initialization): Call complete_type.
13266 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13268 * cvt.c (reference_binding): A REF_BIND gets the reference type.
13269 (implicit_conversion): Likewise.
13270 (convert_like): Likewise.
13271 (compare_ics): Likewise.
13272 (compare_qual): Likewise.
13273 (print_z_candidates): Handle no candidates.
13274 (build_new_op): Don't handle builtin COND_EXPR for now.
13276 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
13278 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
13280 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13282 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
13284 * cvt.c (build_builtin_candidate): Oops.
13285 (build_new_op): Oops.
13287 * method.c (build_opfncall): Pass COND_EXPR on.
13288 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
13289 (add_builtin_candidate{,s}): Likewise.
13290 (add_builtin_candidates): Likewise.
13291 (print_z_candidates, op_error, build_new_op): Likewise.
13292 (type_decays_to): New fn.
13293 * lex.c (init_lex): Just say ?: for COND_EXPR.
13295 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13297 * typeck.c (complete_type): Call layout_type rather than building
13300 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
13301 only use ptrdiff_t.
13303 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13305 * cvt.c: Always compile the new overloading code (but don't use it).
13306 (implicit_conversion): Add a BASE_CONV when converting to
13307 the same class type.
13308 (convert_like): Handle BASE_CONV.
13310 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13312 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
13313 (add_builtin_candidate): Likewise.
13316 * typeck.c (build_x_function_call): Try an operator function
13317 whenever we call an object of class type.
13318 * method.c (build_opfncall): Pass CALL_EXPRs through.
13319 * cvt.c (implicit_conversion): Do const-ref case first.
13320 (add_conv_candidate, build_object_call, op_error): New fns.
13321 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
13322 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
13323 builtin candidates.
13324 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
13325 Fall back on preincrement handling. Use op_error.
13327 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
13328 an error_mark_node.
13329 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
13332 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
13334 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
13336 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
13338 * typeck.c (build_component_ref_1): Use build_component_ref
13339 instead of open coding it here.
13341 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13343 * g++.c (main): Don't link with -lg++.
13346 * cvt.c (convert_to_reference): Don't use convert_from_reference on
13347 result of build_type_conversion.
13348 (cp_convert): Only call build_method_call for ctors if
13349 build_type_conversion failed.
13350 (ptr_complete_ob): New function.
13351 (TYPE_PTR{,OB,MEM}_P): New macros.
13352 ({add,build}_builtin_candidate{,s}): New functions.
13353 (print_z_candidates): Handle builtins.
13354 (build_user_type_conversion_1): Don't use conversion fns for
13355 converting to a base type.
13356 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
13357 (build_user_type_conversion): Use convert_from_reference.
13358 (build_new_op): New function.
13359 (build_over_call): Fix handling of methods.
13360 (compare_ics): Handle AMBIG_CONV properly.
13361 * typeck2.c: Increment abort count.
13362 * method.c (build_opfncall): Forward most requests to build_new_op.
13363 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
13365 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13367 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
13368 invalid second argument to dump_expr_list.
13370 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
13372 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
13374 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
13376 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
13379 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
13381 * typeck2.c (process_init_constructor): New pedwarn for using { }
13382 to initialize a pointer to member function.
13383 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
13384 we can avoid the new error.
13386 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
13388 * typeck.c (build_ptrmemfunc1): New function to hide details of
13389 pointer to member functions better.
13391 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
13393 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
13394 methods into the actual method, as we know the implied object is
13397 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13399 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
13400 inside a system header.
13402 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
13404 * call.c (build_method_call): Call complete_type on the
13407 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
13409 * typeck.c (build_component_ref): Always build up an OFFSET_REF
13410 for obj_ptr->func so that we can know which object to use in a
13413 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
13415 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
13416 around things. Also improve maintainability.
13418 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
13420 * decl.c (grokdeclarator): Check for overflow when evaluating an
13423 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13425 * cvt.c (cp_convert): Don't check for ambiguity with constructor
13428 * typeck.c (build_x_function_call): Pass function overload
13429 questions to new overloading code if NEW_OVER.
13430 * init.c (expand_aggr_init_1): Only check for type conversion ops
13431 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
13432 Don't check for ambiguity with constructor if NEW_OVER.
13433 * cvt.c (convert_to_reference): Dereference the result of a type
13434 conversion operator.
13435 (build_conv): Propagate ICS_USER_FLAG.
13436 (implicit_conversion): Call instantiate_type.
13437 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
13438 (add_function_candidate): Fix cv-quals on argtype.
13439 (print_z_candidates): New function.
13440 (build_new_function_call): Call it.
13441 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
13442 consider non-converting constructors.
13443 Call print_z_candidates.
13444 Return an AMBIG_CONV for an ambiguous conversion.
13445 (build_user_type_conversion): Handle AMBIG_CONV.
13446 (convert_like): Fix test for building TARGET_EXPR.
13447 Call instantiate_type.
13448 Handle AMBIG_CONV and LVALUE_CONV.
13449 (build_over_call): Handle 0 args and ellipsis.
13450 * cp-tree.def: Add AMBIG_CONV.
13452 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
13454 * decl.c (lookup_name_real): If we find mem in obj when parsing
13455 `obj->mem', make sure we return the right value.
13457 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
13459 * search.c (get_base_distance): Call complete_type.
13461 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
13463 * decl.c (store_bindings): Make static.
13465 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
13467 * init.c (expand_aggr_init_1): Don't check type conversions if
13470 * cvt.c (z_candidate): Put back template field.
13471 (add_function_candidate): Set it.
13472 (add_template_candidate): Likewise.
13474 (compare_qual): Handle references and pointers to members.
13475 (compare_ics): Handle reference bindings.
13477 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
13479 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
13481 * call.c (compute_conversion_costs): Call complete_type.
13483 * tree.c (vec_binfo_member): Use comptypes instead of comparing
13484 pointers, so we can handle template parameters.
13486 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
13488 * cvt.c (cp_convert_to_pointer): We have to call complete_type
13489 here; let's make it explicit instead of a side effect of an
13492 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13494 * cvt.c (z_candidate): Remove template field.
13495 (reference_binding): Handle binding to temporary.
13496 (implicit_conversion): Likewise.
13497 (add_function_candidate): Handle artificial constructor parms.
13498 Handle functions with too few parms.
13499 (add_template_candidate): New function.
13500 (build_user_type_conversion_1): Handle constructors.
13501 (convert_like): Likewise.
13502 (build_over_call): Likewise.
13503 (build_new_function_call): Support templates.
13504 (compare_ics): Fix reference, inheritance handling.
13506 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
13508 * decl.c: Add signed_size_zero_node.
13509 (init_decl_processing): Build it.
13510 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
13511 when we're trying to make a negative delta.
13513 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13515 Stop doing this damn index==strchr variable name confusion.
13516 * class.c (add_virtual_function): Change local var INDEX to be
13518 (add_method): Likewise.
13519 * lex.c (print_parse_statistics): Likewise.
13520 * search.c (make_memoized_table_entry): Likewise.
13521 (lookup_fnfields_here): Likewise.
13522 (lookup_field): Likewise.
13523 (lookup_fnfields): Likewise.
13524 (get_baselinks): Likewise.
13525 * sig.c (build_signature_table_constructor): Likewise.
13526 (build_signature_method_call): Likewise.
13527 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
13528 (get_member_function_from_ptrfunc): Likewise.
13529 (build_ptrmemfunc): Change local var INDEX to be IDX.
13530 (c_expand_start_case): Likewise.
13532 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
13534 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
13535 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
13536 (convert_to_reference): Use build_type_conversion to convert to
13537 the reference type directly.
13538 (standard_conversion): Fix void* case, non-conversions.
13539 (reference_binding): Fix expr == 0 case, non-conversions.
13540 (convert_like): Support REF_BIND.
13541 (compare_qual): Split out from compare_ics.
13542 (compare_ics): Use it, handle icses with only a qual_conv.
13544 * init.c (expand_vec_init): Don't crash if decl is NULL.
13546 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
13548 * mpw-config.in: New file, configury for Mac MPW.
13549 * mpw-make.sed: New file, makefile editing for MPW.
13551 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13553 * pt.c (instantiate_class_template): Call repo_template_used.
13555 * search.c (lookup_conversions): Only lookup conversions in
13558 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13560 * cp-tree.def: Renamed from tree.def, to avoid confusion with
13562 * cp-tree.h, lex.c: Include cp-tree.def.
13563 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
13565 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
13567 * init.c (build_vec_delete_1): Call complete_type.
13569 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
13571 * except.c (start_anon_func): Make sure anonymous functions are
13574 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
13576 * decl.c (finish_function): If function_depth > 1, set nested.
13578 * decl2.c (grokbitfield): Revert Bob's change.
13579 * class.c (finish_struct_1): Fix handling of named bitfield widths.
13581 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13583 * pt.c (add_pending_template): Handle types.
13584 (lookup_template_class): With -fexternal-templates, just add the class
13585 to pending_templates instead of instantiating it now.
13586 * decl2.c (finish_file): Handle types in pending_templates.
13588 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
13590 * decl2.c (grokbitfield): Handle constant decls appropriately.
13591 Give an appropriate error message now instead of spewing core
13594 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13596 * decl2.c: Don't turn on thunks by default for now.
13598 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
13600 * typeck.c (complete_type): Handle error_mark_node.
13601 (common_type, OFFSET_TYPE): Handle template_type_parms.
13603 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
13605 * pt.c (instantiate_decl): If at_eof, call import_export_decl
13606 regardless of DECL_INLINE.
13608 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
13610 * class.c (finish_struct_bits): Copy TYPE_SIZE.
13612 * rtti.c (build_dynamic_cast): Support templates.
13613 * tree.def: Support DYNAMIC_CAST_EXPR.
13614 * pt.c (tsubst_copy): Likewise.
13615 * decl2.c (build_expr_from_tree): Likewise.
13617 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13619 * typeck.c (build_static_cast): Support templates.
13620 (build_const_cast): Likewise.
13621 * tree.def: Support CONST/STATIC_CAST_EXPR.
13622 * pt.c (tsubst_copy): Likewise.
13623 * decl2.c (build_expr_from_tree): Likewise.
13625 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13627 * decl2.c (finish_vtable_vardecl): Don't trust
13628 TREE_SYMBOL_REFERENCED for vtables of local classes.
13630 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13632 * pt.c (tsubst_copy): Handle operator T.
13634 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13636 * init.c (build_delete): Move creation of PARMS inside test of
13637 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
13639 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
13641 * typeck.c (build_conditional_expr): Don't assume that
13642 the arguments to ?: are always pointers or records.
13644 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13646 * decl2.c (import_export_decl): Still emit static/weak/comdat
13647 copies of inline template functions with -fno-implicit-templates.
13649 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
13651 * init.c (build_delete): Determine the complete basetype
13652 path to the destructor we're calling.
13654 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
13656 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
13657 initialize the enum, because we really and truly don't know where
13659 (start_enum): Don't copy integer_zero_node because
13660 build_enumerator will do it.
13662 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13664 * decl.c (finish_function): Do access control on base destructors.
13666 * pt.c (tsubst, case FUNCTION_DECL): Set up
13667 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
13670 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
13672 * cvt.c (build_up_reference): If we have already extended the
13673 lifetime of the temporary, don't try it again.
13674 * typeck.c (c_expand_return): Don't try and convert the return
13675 value twice when we want a reference, once is enough.
13677 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
13679 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
13680 LOOKUP_ONLYCONVERTING at all for now.
13682 * search.c (add_conversions): Put the conversion function in
13683 TREE_VALUE, the basetype in TREE_PURPOSE.
13684 * cvt.c (build_type_conversion): Adjust.
13685 * cvt.c (build_expr_type_conversion): Adjust.
13686 * call.c (user_harshness): Adjust.
13688 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13690 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
13693 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
13695 * except.c (expand_start_catch_block): Add a dummy region, if we
13696 get an error, so that we can avoid core dumping later.
13698 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
13700 * cp-tree.h (OFFSET_REF): Remove.
13701 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
13702 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
13703 * init.c (expand_aggr_init_1): Likewise.
13704 (build_new): Likewise.
13705 * typeck.c (expand_target_expr): Likewise.
13707 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13709 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
13712 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
13714 * cvt.c (build_up_reference): Redo how and when temporaries are
13716 * decl.c (grok_reference_init): Don't try and be smart about
13719 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
13721 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
13722 (TARGET_EXPR...), now that it has 4 arguments.
13723 * tree.c (build_cplus_new): Likewise.
13725 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13727 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
13729 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
13730 * decl.c (struct saved_scope): Remove named_labels,
13731 {base,member}_init_list.
13732 (maybe_push_to_top_level): Don't set them. Call
13733 push_cp_function_context if appropriate.
13734 (pop_from_top_level): Likewise.
13736 * method.c (do_build_assign_ref): Remove obsolete check of
13737 TYPE_HAS_ASSIGN_REF (basetype).
13739 * decl.c (grokfndecl): Diagnose user definition of
13740 implicitly-declared methods.
13742 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
13744 * method.c (do_build_copy_constructor): Add code to give
13745 meaningful error messages instead of crashing.
13746 (do_build_assign_ref): Don't synthesize assignment operators for
13747 classes containing reference or const members.
13749 * class.c (struct base_info): Remove cant_synth_copy_ctor
13750 and cant_synth_asn_ref.
13751 (finish_base_struct): Remove the code that tries to conditionalize
13752 synthesis of copy constructors & assignment operators based on
13753 access permissions. Instead, let it fail when it tries to
13754 synthesize the copy constructor. This will give meaningful error
13755 messages instead of silently generating code to perform a bitcopy.
13757 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
13759 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
13760 determining types for constant values.
13762 * decl.c (struct named_label_list): Use instead of stuffing
13763 random items into a TREE_LIST node.
13764 (named_label_uses): Use the new struct.
13765 (poplevel): Likewise.
13766 (lookup_label): Likewise.
13767 (define_label): Add an error message to tell the user the line
13768 where the goto is located in addition to the destination of the
13770 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
13772 (finish_function): Likewise.
13774 (start_decl): Complain about defining a static data member
13775 in a different type from which it was declared.
13777 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13779 * cvt.c (build_expr_type_conversion): Adjust.
13781 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
13783 * call.c (build_method_call): Always convert 'this' to the
13786 * search.c (add_conversions): Put the conversion function in
13787 TREE_VALUE, the type in TREE_PURPOSE.
13788 * cvt.c (build_type_conversion): Adjust.
13789 * call.c (user_harshness): Adjust.
13791 * method.c (emit_thunk): Call temporary_allocation and
13792 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
13794 * tree.c (build_cplus_array_type): Handle tweaking of
13795 TYPE_MAIN_VARIANT here.
13796 * typeck.c (common_type): Not here.
13798 * typeck.c (complete_type): Only try to complete an array type if
13801 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
13803 * decl.c (grokvardecl): Call complete_type.
13804 (grokdeclarator): Call complete_type for PARM_DECLs.
13806 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13808 * pt.c (instantiate_class_template): Re-set
13809 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
13811 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
13813 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
13814 smart enough to do it right.
13815 * tree.c (cp_expand_decl_cleanup): Likewise.
13816 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
13817 cp_expand_decl_cleanup.
13818 (store_parm_decls): Likewise.
13819 (hack_incomplete_structures): Likewise.
13820 * except.c (push_eh_cleanup): Likewise.
13822 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
13824 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
13825 frontend to the backend where it belongs.
13826 * tree.c (unsave_expr): Likewise.
13827 (unsave_expr_now): Likewise.
13828 * tree.def (UNSAVE_EXPR): Likewise.
13829 * cp-tree.h (unsave_expr): Likewise.
13830 (unsave_expr_now): Likewise.
13832 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
13834 * init.c (emit_base_init): Make sure the partial EH cleanups live
13835 on the function_obstack.
13837 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
13839 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
13840 when checking for pointer types.
13842 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
13844 * pt.c (instantiate_class_template): Remove obsolete check for
13845 access declarations.
13847 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
13849 * call.c (build_overload_call): Simplify calls to
13850 build_overload_call by removing last parameter.
13851 (build_method_call): Likewise.
13852 * cp-tree.h: Likewise.
13853 * method.c (build_opfncall): Likewise.
13854 * typeck.c (build_x_function_call): Likewise.
13856 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
13858 * call.c (default_parm_conversions): Factor out common code.
13859 (build_method_call): Use it.
13860 (build_overload_call_real): Use it.
13862 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
13864 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
13865 but pedwarn as the code is bogus.
13866 * typeck.c (decay_conversion): Likewise.
13867 (build_function_call_real): Use build_addr_func instead of
13868 default_conversion. Don't allow pointer-to-method functions down
13870 (build_unary_op): Use real pointer-to-member functions instead of
13872 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
13873 (convert_for_assignment): Removed some obsolete code.
13874 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
13875 build_x_function_call instead of current_class_ptr. Only call
13876 digest_init once on an initializer, we do this just checking
13878 (build_expr_from_tree): Pass current_class_ref to
13879 build_x_function_call instead of current_class_ptr.
13880 * init.c (build_member_call): Likewise.
13881 * pase.y: Likewise.
13882 * error.c (dump_expr): Handle OFFSET_REFs better.
13883 * pt.c (unify): Handle pointer-to-member functions better.
13884 * decl.c (finish_function): Clear out current_class_ref just like
13885 we do for current_class_ptr.
13887 * typeck.c (get_delta_difference): Handle virtual bases better.
13889 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13891 * sig.c (build_signature_table_constructor): Use the delta for
13892 the original basetype for this virtual function with thunks.
13893 (build_signature_method_call): We still need to adjust 'this'
13896 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
13898 * call.c (build_addr_func): New routine. Used to get the `real'
13899 address of a function or a method. Needed to avoid getting a
13900 pointer-to-member function.
13901 (build_call): New routine to build CALL_EXPRs.
13902 (build_method_call): Use it.
13903 * cvt.c (convert_to_aggr): Likewise.
13904 * typeck.c (build_function_call_real): Likewise.
13905 * sig.c (build_signature_table_constructor): Use build_addr_func.
13906 * cp-tree.h (build_call, build_addr_func): Declare them.
13908 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
13910 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
13911 * parse.y: Remove uses of LOOKUP_AGGR.
13913 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
13915 * *.[chy]: Rename current_class_decl to current_class_ptr, and
13916 C_C_D to current_class_ref.
13918 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13920 * call.c (convert_harshness): Tighten up pointer conversions.
13922 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
13924 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
13925 (finish_file): Likewise.
13927 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13929 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
13931 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
13934 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13936 * decl2.c: Turn on thunks by default where supported.
13938 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
13940 * cp-tree.h (build_overload_call_maybe): Removed.
13941 * call.c (build_overload_call_real): Invert meaning of last arg to
13942 be require_complete.
13943 (build_overload_call): Likewise.
13944 * typeck.c (build_x_function_call): Use build_overload_call_real
13945 instead of build_overload_call_maybe.
13947 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13949 * decl2.c (finish_file): Don't try to emit functions that haven't
13952 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13954 * decl2.c (finish_vtable_vardecl): Oops.
13956 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
13957 Also store the bindings from previous_class_values.
13958 (pop_from_top_level): Restore them.
13960 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13962 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
13963 symbol has been referenced.
13964 (finish_file): Re-join synthesis/vtable loop with inline emission
13965 loop, disable inlining when an inline is output.
13967 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
13969 * except.c (init_exception_processing): Setup saved_in_catch.
13970 (push_eh_cleanup): Reset __eh_in_catch.
13971 (expand_start_catch_block): Set __eh_in_catch.
13973 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
13975 * except.c (push_eh_cleanup): Add tracking for whether or not we
13976 have an active exception object.
13977 (expand_builtin_throw): Use it to make sure a rethrow without an
13978 exception object is caught.
13980 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13982 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
13985 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13987 * decl2.c (finish_file): Also use sentries for vars with
13988 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
13991 * lex.c (handle_cp_pragma): Disable #pragma
13992 interface/implementation if SUPPORTS_ONE_ONLY > 1.
13994 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
13996 * method.c (emit_thunk): Wrap default case in
13997 temporary/permanent_allocation.
13999 * method.c (make_thunk): Use DECL_ONE_ONLY.
14000 (emit_thunk): Call assemble_end_function.
14002 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
14004 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
14005 (import_export_decl): Likewise.
14006 (finish_prevtable_vardecl): Disable vtable hack if
14007 SUPPORTS_ONE_ONLY > 1.
14009 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
14011 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
14012 PREDECREMENT_EXPRs take two arguments, not one.
14014 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
14016 * class.c (build_vtable_entry): Don't build thunks for abstract
14019 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
14022 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
14024 * class.c (set_rtti_entry): Use size_zero_node.
14025 (build_vtable): Likewise.
14027 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
14029 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
14030 (prepare_fresh_vtable): Likewise.
14032 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
14034 * method.c (emit_thunk): Call mark_used on the target function.
14036 * call.c (build_method_call): Don't warn about pending templates.
14038 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14040 * decl2.c (finish_file): Fix list walking logic.
14042 * typeck2.c (check_for_new_type): Only warn if -pedantic.
14044 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
14046 * class.c (finish_struct_1): Remove old code for
14047 dont_allow_type_definitions.
14048 * cp-tree.h: Likewise.
14049 * spew.c: Make sure cp-tree.h is included before parse.h, so the
14050 definition of flagged_type_tree is found before it is used.
14052 * parse.y: Added the ftype member to the type union, and changed a
14053 number of rules to use it instead of ttype. Added calls to
14054 check_for_new_type() as appropriate.
14055 * typeck2.c (check_for_new_type): New function for checking
14056 if a newly defined type appears in the specified tree.
14057 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
14058 for check_for_new_type().
14060 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14062 * decl2.c (finish_file): Only use a sentry if the decl is public.
14064 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
14065 don't pass LOOKUP_ONLYCONVERTING.
14067 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
14069 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
14070 properly keeps track of const and volatile type modifiers.
14072 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14074 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
14075 * pt.c (comp_template_args): Use it.
14077 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
14078 assemble_external for artificial function decls.
14080 * decl.c (cp_finish_decl): Oops.
14082 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
14084 * decl2.c (import_export_decl): Put static data member templates
14085 into common storage, or make them weak, depending on whether they
14086 are dynamically or statically initialized.
14087 (get_sentry): New function.
14088 (finish_file): Do import_export_decl for static data members before
14089 building the init/fini functions. Don't init/fini a variable that's
14090 EXTERNAL. Use a sentry for variables in common. Fix mismatching
14091 push/pop_temp_slots.
14092 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
14093 expand_static_init thang.
14094 * method.c (get_id_2): New function.
14096 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
14098 * parse.y (empty_parms): Make sure we use C++-style prototypes
14099 when we're declaring member functions.
14101 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14103 * Makefile.in (CONFLICTS): 16 s/r conflicts.
14104 * parse.y (self_template_type): New nonterminal.
14106 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14108 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
14110 * parse.y (base_class.1): Allow 'typename foo::bar'.
14112 * lex.c (check_newline): Remove #pragma code that plays with the
14113 input stream, since we now deal with tokens. Clear nextchar when
14115 (handle_cp_pragma): Use real_yylex.
14116 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
14119 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
14121 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
14123 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14125 * parse.y: New token SELFNAME for potential constructor.
14126 * spew.c (yylex): Handle it.
14127 * lex.c (identifier_type): Produce it.
14129 * parse.y (complete_type_name): In :: case, don't push class binding.
14130 (complex_type_name): Likewise.
14132 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
14134 * typeck.c (build_reinterpret_cast): Handle pointer to member
14137 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14139 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
14141 (check_newline): Put the vtable/unit/implementation/interface pragma
14142 code into handle_cp_pragma, replacing it with a call.
14143 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
14144 args. Get the next token after handling the pragma token.
14146 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
14148 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
14149 (convert_to_pointer_force): Likewise.
14151 * init.c (build_new): Fix array new without -fcheck-new.
14153 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14155 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
14156 tree.c: Lose TYPE_NESTED_NAME.
14158 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
14161 * tree.def: Add VEC_INIT_EXPR.
14162 * expr.c (cplus_expand_expr): Handle it.
14163 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
14164 the extra file-scope symbol nastiness.
14166 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
14168 * method.c (make_thunk): Thunks are static.
14169 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
14171 * decl2.c (mark_vtable_entries): Emit thunks as needed.
14172 (finish_file): Don't emit them here.
14174 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14176 * rtti.c (build_dynamic_cast): Handle null pointers.
14177 (ifnonnull): New function.
14179 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
14181 * call.c (build_method_call): Remember the original basetype we
14182 were called with. Give an error message instead of trying
14183 (incorrectly) to call a non-static member function through a
14184 non-inherited class.
14186 * search.c (expand_upcast_fixups): Mark the new fixup as
14189 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14191 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
14193 * class.c (set_rtti_entry): Fix for thunks.
14195 * decl2.c (import_export_decl): Still emit typeinfo fns for
14196 cv-variants of builtin types.
14198 * rtti.c (expand_class_desc): Set up base_info_type_node here.
14199 (init_rtti_processing): Instead of here.
14201 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14203 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
14204 (build_typeid): Only complain about taking dynamic typeid without
14207 * decl2.c: flag_rtti defaults to 1.
14209 * rtti.c (get_tinfo_var): The general class case is now smaller.
14210 (init_rtti_processing): Pack the latter three fields of base_info
14213 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
14215 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
14217 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
14219 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
14220 (push_memoized_context): Split out code to undefer pop_type_level to
14221 (clear_memoized_cache): here.
14222 (pop_memoized_context): We can only handle one layer of deferral of
14223 pop_type_level so clear the cache, if there was a previous level.
14225 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14227 * rtti.c (init_rtti_processing): Build up base_info_type_node.
14228 (expand_class_desc): Use one pointer to an array of base_info
14229 structs, passed using a CONSTRUCTOR.
14231 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
14233 * class.c (build_vbase_path): Remove block extern for
14234 flag_assume_nonnull_objects here.
14235 (build_vfn_ref): Split out functionality into build_vtbl_ref.
14236 (build_vtbl_ref): New routine.
14237 (build_vtable): Set up rtti info here.
14238 (add_virtual_function): Note in CLASSTYPE_RTTI the best
14239 place where we can get the rtti pointers from to avoid having to
14240 search around for a place.
14241 (finish_base_struct): Likewise.
14242 (finish_struct_1): Likewise. Never create totally new vtables
14243 with totally new vtable pointers for rtti. Disable code to layout
14244 vtable pointers better until we want to break binary
14246 * rtti.c (build_headof_sub): New routine to convert down to a
14247 sub-object that has an rtti pointer in the vtable.
14248 (build_headof): Use it. Also, use build_vtbl_ref now to be more
14250 (build_dynamic_cast): Make sure we have saved it, if we need to.
14251 * search.c (dfs_init_vbase_pointers): Disable code that deals with
14252 a more efficient vtable layout, enable later.
14253 * call.c (flag_assume_nonnull_objects): Moved declaration to
14254 * cp-tree.h: here. Declare build_vtbl_ref.
14255 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
14256 function calls that want a tree.
14258 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14260 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
14261 other X subobjects in the most derived type. Ack.
14263 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
14264 get_typeid will do it for us.
14265 (get_typeid_1): Break out call-building for expand_*_desc to use.
14266 (get_typeid): Call it.
14267 (expand_*_desc): Likewise.
14268 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
14270 (init_decl_processing): Lose builtin_type_tdescs lossage.
14271 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
14273 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
14275 * pt.c (tsubst): When calling set_nested_typename, use
14276 TYPE_NESTED_NAME (current_class_type) instead of
14277 current_class_name.
14279 * decl.c (pushdecl): Likewise.
14280 (pushdecl_class_level): Likewise.
14281 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
14282 set_nested_typename.
14284 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14286 * rtti.c (synthesize_tinfo_fn): Handle arrays.
14288 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
14290 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
14292 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
14293 (init_rtti_processing): Lose bad_cast_type.
14294 (build_dynamic_cast): Use throw_bad_cast.
14296 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
14298 * decl2.c (finish_file): Don't synthesize artificial functions
14299 that are external and not inline.
14301 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
14303 * decl2.c (finish_file): Handle having new inlines added to
14304 saved_inlines by synthesis.
14306 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
14308 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14310 RTTI rewrite to initialize nodes as needed, not require that
14311 users #include <typeinfo>, complete functionality and reduce wasted
14313 * rtti.c (init_rtti_processing): New fn.
14314 (build_typeid): The vtable entry is now a function.
14315 (get_tinfo_var): New fn.
14316 (get_tinfo_fn): Likewise.
14317 (get_typeid): Use it.
14318 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
14319 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
14321 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
14322 (synthesize_tinfo_fn): New fn.
14323 * method.c (build_t_desc_overload): Lose.
14324 (build_overload_with_type): More generic.
14325 * decl.c (init_decl_processing): Call init_rtti_processing.
14326 * class.c (set_rtti_entry): Use get_tinfo_fn.
14327 * decl2.c (mark_vtable_entries): Mark the rtti function.
14328 (finish_prevtable_vardecl): Don't build_t_desc.
14329 (import_export_decl): Handle tinfo functions.
14330 (finish_file): Likewise.
14331 * typeck.c (inline_conversion): New fn.
14332 (build_function_call_real): Use it.
14333 * cp-tree.h: Add decls.
14335 * method.c (hack_identifier): Also convert component_refs from
14338 * lex.c (cons_up_default_function): Use the type, not the name, in
14341 * decl2.c (import_export_vtable): Fix weak vtables.
14343 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
14345 * search.c (get_base_distance_recursive): Fix access checks for
14348 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14350 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
14352 (convert_harshness): Add prototypes wrapped by PROTO.
14353 * decl2.c (grok_function_init): Likewise.
14354 (do_toplevel_using_decl): Change to void return type.
14355 * class.c (build_vtable_entry): Remove decl of make_thunk.
14356 (merge_overrides): Fix order of arg definitions.
14357 (finish_vtbls): Likewise.
14358 (fixup_vtable_deltas): Likewise.
14359 (modify_all_direct_vtables): Likewise.
14360 (modify_all_indirect_vtables): Likewise.
14361 * search.c (get_base_distance_recursive): Likewise.
14362 (get_abstract_virtuals_1): Likewise.
14363 (fixup_virtual_upcast_offsets): Likewise.
14364 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
14365 * init.c (perform_member_init): Fix order of arg definitions.
14366 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
14367 * cp-tree.h (make_thunk): Add decl.
14368 (overload_template_name, push_template_decl): Add decls.
14369 (do_toplevel_using_decl): Change to void return type.
14370 (vec_binfo_member): Add decl.
14372 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14374 * typeck.c (mark_addressable, convert_for_assignment,
14375 convert_for_initialization, pointer_int_sum, pointer_diff,
14376 unary_complex_lvalue): Add prototypes wrapped by PROTO.
14377 (convert_sequence): #if 0 fn decl, since definition also is.
14379 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
14381 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
14382 cast to pointer types for type searching.
14384 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14386 * typeck.c (get_delta_difference): Use cp_error, not error, in the
14387 case where BINFO == 0.
14389 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
14391 * call.c (build_method_call): Fix wording of error messages so
14392 constructors come out right.
14394 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
14396 * decl.c (push_overloaded_decl): Don't warn about hidden
14397 constructors when both the type and the function are declared
14398 in a system header file.
14400 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
14402 * class.c (finish_struct_1): Propagate the TYPE_PACKED
14403 flag for the type to the type's fields.
14405 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14407 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
14409 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
14411 * class.c (base_info, finish_base_struct): Replace
14412 needs_virtual_dtor with base_has_virtual.
14414 (finish_struct_1): Remove the old code that tried to make default
14415 destructors virtual. Use base_has_virtual when checking if we need
14416 to add a vtable entry for the rtti code.
14418 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
14420 * pt.c (push_template_decl): Complain about template decl with
14421 inappropriate declaration.
14423 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
14425 * typeck.c (build_x_unary_op): Remove bogus check for taking
14426 the address of a member function.
14428 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14430 * parse.y (constructor_declarator): Only push the class if
14431 we are not already in the class.
14433 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
14435 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
14436 Add additional argument to INIT_CUMULATIVE_ARGS.
14438 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14440 * decl.c (shadow_tag): Fix error about anon union with methods.
14442 * parse.y (self_reference): Only generate a self-reference if this
14443 is a non-template class.
14444 (opt.component_decl_list): Only use it if it was generated.
14446 * parse.y (component_decl_1): Use constructor_declarator.
14447 (fn.def2): Likewise.
14448 (notype_component_declarator0): Likewise.
14450 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
14452 * typeck.c (build_x_unary_op): Add checks for taking the address
14453 of a TARGET_EXPR or of a member function, and give appropriate
14456 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14458 * pt.c (process_template_parm): Allow template type parms to be
14459 used as types for template const parms.
14461 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
14463 * init.c (expand_vec_init): Ensure the eh cleanups are on the
14466 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14468 * decl.c (lookup_name_real): Be even more picky about the
14469 ambiguous lookup warning.
14470 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
14471 * parse.y (constructor_declarator): Rather than here.
14473 * parse.y (constructor_declarator): New nonterminal.
14475 (explicit_instantiation): Likewise.
14477 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14479 Add implicit declaration of class name at class scope.
14480 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
14481 * parse.y (self_reference): New nonterminal.
14482 (opt.component_decl_list): Use it.
14483 (fn.def1): Add nested_name_specifier type_name cases.
14484 * class.c (build_self_reference): New function.
14485 (finish_struct): Handle access_default later, move self-reference
14487 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
14488 * cp-tree.h: Adjust.
14490 * pt.c (do_function_instantiation): Separate handling of member
14491 functions and non-member functions properly.
14493 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14495 * pt.c (process_template_parm): Improve error for 'volatile class K'.
14497 * class.c (finish_struct_1): Check the right slot for destructors.
14499 * decl.c (start_enum): Complain about enum templates.
14501 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
14503 * init.c (resolve_offset_ref): Offset pointers to member data by one.
14504 * typeck.c (unary_complex_lvalue): Likewise.
14506 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
14508 * typeck.c (c_expand_return): Check for a returned local
14509 array name, similar to the check for an ADDR_EXPR.
14511 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14513 * decl.c (cp_finish_decl): Don't build cleanups for static
14516 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
14518 * typeck.c (build_modify_expr): Fix error messages to be more
14520 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
14521 assignment operators.
14522 * error.c (assop_as_string): Likewise. Add support for `%Q' for
14523 assignment operators.
14525 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
14527 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
14528 give an error if initialized. pedwarn about nested type with the
14529 same name as its enclosing class.
14531 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
14533 * typeck.c (require_complete_type): Be sure to instantiate the
14534 MAIN_VARIANT of the type.
14536 * decl2.c (finish_file): Instantiate pending templates before
14537 processing static constructors and destructors.
14539 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
14542 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
14544 * decl2.c (delete_sanity): If error_mark_node is passed
14545 in as an expression, quit while we're ahead.
14547 * decl.c (grokdeclarator): Give an error message if `friend'
14548 is combined with any storage class specifiers.
14550 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
14552 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
14553 definition of nonexistent nested type.
14555 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
14556 not to say 'typedef'.
14558 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14560 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
14561 * search.c (dfs_walk, dfs_init_vbase_pointers,
14562 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
14563 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
14565 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
14567 * except.c (build_throw): Support minimal parse.
14568 * pt.c (tsubst_copy): Support THROW_EXPR.
14569 * decl2.c (build_expr_from_tree): Likewise.
14571 * pt.c (mangle_class_name_for_template): Always allocate
14574 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
14576 * cvt.c (cp_convert_to_pointer): Give an appropriate error
14577 when trying to cast from an incomplete type.
14579 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14581 * pt.c (instantiate_class_template): Don't bother setting up
14582 CLASSTYPE_TAGS explicitly, as the nested types will add
14585 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
14587 * decl.c (shadow_tag): Remove old error check for usage of
14588 an enum without a previous declaration.
14589 (xref_tag): Add error message about usage of enums without a
14590 previous declaration.
14592 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
14594 * lex.c (do_identifier): Only do name consistency check if we're
14597 * pt.c (push_template_decl): Don't crash if we get a member defn
14598 that doesn't match.
14600 * decl.c (xref_tag_from_type): New function to do an xref without
14601 always having to figure out code_type_node.
14602 * cp-tree.h: Declare it.
14603 * pt.c (instantiate_class_template): Use it for friend classes.
14604 (lookup_template_class): Use it.
14606 * typeck2.c (build_functional_cast): Pull out a single parm before
14607 passing it to build_c_cast.
14609 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
14611 * expr.c (do_case): Give an error message if a pointer is
14612 given as a case value.
14614 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14616 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
14619 * lex.c (cons_up_default_function): Really, now, interface hackery
14620 does not apply to synthesized methods.
14622 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
14624 * call.c (build_method_call): Ctors and dtors now have special names
14625 with respect to lookups.
14626 * class.c (add_method): Likewise.
14627 (grow_method): Likewise.
14628 (finish_struct_methods): Likewise.
14629 (warn_hidden): Likewise.
14630 (finish_struct_1): Likewise.
14631 * cvt.c (convert_to_reference): Likewise.
14632 (convert_to_aggr): Likewise.
14633 (cp_convert): Likewise.
14634 * decl2.c (check_classfn): Likewise.
14635 * init.c (expand_member_init): Likewise.
14636 (expand_default_init): Likewise.
14637 (expand_aggr_init_1): Likewise.
14638 (build_offset_ref): Likewise.
14639 (build_new): Likewise.
14640 (build_delete): Likewise.
14641 * lex.c (do_inline_function_hair): Likewise.
14642 * search.c (lookup_field_1): Likewise.
14643 (lookup_fnfields_here): Likewise.
14644 (lookup_field): Likewise.
14645 (lookup_fnfields): Likewise.
14646 (get_virtual_destructor): Likewise.
14647 (dfs_debug_mark): Likewise.
14648 (dfs_pushdecls): Likewise.
14649 (dfs_compress_decls): Likewise.
14650 * tree.c (layout_basetypes): Likewise.
14651 * typeck.c (build_component_ref): Likewise.
14652 (build_x_function_call): Likewise.
14653 (build_modify_expr): Likewise.
14654 (convert_for_initialization): Likewise.
14655 (build_functional_cast): Likewise.
14656 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
14659 * decl.c (ctor_identifier): New.
14660 (dtor_identifier): New.
14661 (init_decl_processing): Set them.
14663 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
14665 * typeck.c (build_component_ref): Don't get confused by fields whose
14666 context has no type name, like pointer to member functions.
14668 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
14670 * decl.c (grokdeclarator): Handle typedef without declarator.
14672 * pt.c (tsubst): Handle SCOPE_REF in declarator.
14674 * parse.y (bad_parm): Catch another case of missing `typename'.
14676 * lex.c (yyprint): Handle TYPE_DECLs.
14678 * decl.c (start_function): Don't try to be clever.
14680 * lex.c: Lose compiler_error_with_decl.
14681 * typeck2.c: Lose error_with_aggr_type.
14682 (incomplete_type_error): Use cp_* instead of old functions.
14683 (readonly_error): Likewise.
14684 * typeck.c (convert_arguments): Likewise.
14685 * search.c (lookup_nested_field): Likewise.
14686 * method.c (make_thunk): Likewise.
14687 * decl.c (grokparms): Likewise.
14688 * cp-tree.h: Update.
14690 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
14693 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
14695 * method.c (build_opfncall): When deleting a pointer to an
14696 array, build a new pointer to the tree past any ARRAY_TYPE
14699 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14701 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
14703 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
14705 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
14708 * decl.c (finish_function): Don't set nested based on
14709 hack_decl_function_context.
14710 * parse.y (function_try_block): Check for nested function.
14711 (pending_inlines): Likewise.
14713 * decl2.c (build_expr_from_tree): If a unary op already has a
14714 type, just return it.
14716 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
14718 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
14719 (finish_file): Check the return value of walk_vtables.
14720 (finish_prevtable_vardecl): Return int.
14721 (finish_vtable_vardecl): Likewise.
14722 (prune_vtable_vardecl): Likewise.
14723 * lex.c (set_vardecl_interface_info): Likewise.
14724 * cp-tree.h: Adjust return types.
14726 * class.c (delete_duplicate_fields_1): Don't complain about
14727 duplicate nested types if they're the same type.
14728 (finish_struct): Remove check for duplicate.
14729 * decl2.c (grokfield): Don't check for typedef of anonymous type.
14731 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14733 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
14735 * decl.c (grokdeclarator): Lose special handling of class-level
14736 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
14737 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
14739 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
14741 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
14743 * search.c (compute_access): Fix handling of anonymous union
14745 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
14746 from anonymous unions to their members.
14748 * typeck.c (build_x_function_call): For static member functions,
14749 hand off to build_member_call.
14751 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
14753 * typeck.c (build_component_ref): Handle OFFSET_REFs.
14755 * init.c (expand_vec_init): Fix init == 0 case.
14757 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14759 * init.c (build_new): pedwarn about init and array new.
14760 (expand_vec_init): Handle lists, use convert_for_initialization.
14762 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
14763 when converting to an aggregate type.
14764 * cvt.c (cp_convert): Pass it through.
14766 * typeck.c (build_conditional_expr): Handle user-defined
14767 conversions to slightly different types.
14769 * decl.c (grokdeclarator): Force an array type in a parm to be
14772 * decl2.c (do_using_directive): Sorry.
14773 (do_namespace_alias): Likewise.
14774 * lex.c (real_yylex): Warn about using the `namespace' keyword.
14776 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14778 * parse.y (datadef): Move call to note_list_got_semicolon up.
14780 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
14782 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
14784 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
14786 * decl.c (cp_finish_decl): The exception regions have to be
14787 nested, not overlapping. We start the exception region for a
14788 decl, after it has been fully built, and all temporaries for it
14789 have been cleaned up.
14791 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
14793 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
14795 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14797 * tree.def: Add RETURN_INIT.
14798 * pt.c (instantiate_decl): Handle RETURN_INIT.
14799 * decl.c (store_return_init): Handle minimal_parse_mode.
14801 * tree.c (cp_build_type_variant): Just return an error_mark_node.
14802 * decl.c (make_typename_type): Don't try to get the file and line
14804 * typeck.c (comptypes): Handle TYPENAME_TYPE.
14806 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
14808 * decl.c (poplevel): Make sure we clear out and restore old local
14809 non-VAR_DECL values by default when they go out of scope.
14811 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
14813 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
14814 referring to addresses of variables and functions.
14816 * error.c (dump_expr): Support SIZEOF_EXPR.
14818 * init.c (do_friend): Use the return value of check_classfn.
14820 * typeck.c (convert_arguments): Call complete_type.
14822 * method.c (hack_identifier): After giving an error, set value to
14825 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14827 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
14828 lossage for local classes.
14829 * cp-tree.h: Declare it.
14830 * decl.c (lookup_name_real): Evil, painful hack for local classes.
14831 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
14832 Use hack_decl_function_context.
14833 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
14834 (start_function): Use hack_decl_function_context.
14835 (finish_function): Likewise.
14836 * method.c (synthesize_method): Likewise.
14837 * lex.c (process_next_inline): Likewise.
14838 (do_pending_inlines): Likewise.
14839 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
14842 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
14844 * sig.c (build_signature_pointer_or_reference_type): Align
14845 signature pointers/references on 8-byte boundaries so they can be
14846 grabbed 2 words at a time on a Sparc.
14848 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
14850 * method.c (hack_identifier): Requiring a static chain is now a
14852 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
14855 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14857 * init.c (build_offset_ref): Call complete_type.
14859 * decl.c (pop_from_top_level): Always pop previous_class_type.
14861 * parse.y: Handle multiple decls in a for-init-statement.
14862 * pt.c (tsubst_expr): Likewise.
14864 * pt.c (tsubst): Use tsubst_expr for the second operand of an
14867 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
14868 (poplevel_class): Set it here.
14869 (pop_from_top_level): Pop it here if we're returning to class scope.
14870 * class.c (pushclass): Don't set it here.
14872 * decl.c (maybe_push_to_top_level): Save current_template_parms,
14873 and clear it if !pseudo.
14874 (pop_from_top_level): Restore it.
14876 * decl2.c (finish_file): Push the dummy each time we walk the list
14879 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
14880 something for CAST_EXPR.
14882 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14884 * cvt.c (cp_convert): Warn about implicit conversion of the
14885 address of a function to bool, as it is always true.
14887 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14889 * typeck.c (c_expand_return): Fix warning for local externs returned.
14891 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14893 * tree.c (mapcar): Propagate const and volatile properly.
14895 * typeck.c (complete_type): Be sure to instantiate the
14896 MAIN_VARIANT of the type.
14898 * method.c (synthesize_method): Class interface hackery does not
14899 apply to synthesized methods.
14901 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
14903 * pt.c (comp_template_args): Use comptypes rather than just
14904 checking for TEMPLATE_TYPE_PARM equivalence.
14906 * typeck.c (build_x_function_call): Call complete_type before
14907 checking TYPE_OVERLOADS_CALL_EXPR.
14909 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
14911 * g++.c (main): Check also for new define ALT_LIBM.
14913 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14915 * pt.c (instantiate_class_template): If we don't have a pattern
14917 (coerce_template_parms): If we see a local class, bail.
14919 * decl.c (grok_reference_init): Make sure there's a type before
14922 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
14923 (push_template_decl): Likewise.
14925 * parse.y (named_class_head): Set
14926 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
14928 * decl.c (xref_tag): Diagnose redeclaration of template
14929 type-parameter name.
14931 * error.c (dump_type): Handle anonymous template type parms.
14933 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
14935 (coerce_template_parms): Likewise.
14937 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
14939 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
14940 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
14942 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14944 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
14945 before trying to get its STUB_DECL.
14946 (coerce_template_parms): Likewise.
14948 * parse.y (template_type_parm): If they didn't use 'class',
14949 pretend they did after giving an error.
14951 * pt.c (coerce_template_parms): Diagnose use of local class.
14953 * decl.c (grok_reference_init): Use instantiate_type.
14955 * error.c (dump_expr): Handle TEMPLATE_DECLs.
14957 * parse.y (named_class_head): Diagnose mismatching types and tags.
14959 * decl.c (pushdecl): Type decls and class templates clash with
14960 artificial type decls, not hide them.
14962 * decl.c (redeclaration_error_message): Diagnose redefinition of
14963 templates properly.
14964 (duplicate_decls): Diagnose disallowed overloads for template
14967 * decl.c (start_decl): Call complete_type before checking for a
14970 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
14972 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
14974 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14976 * decl.c (grok_op_properties): Don't check for operator++(int) in
14979 * tree.c (perm_manip): Return a copy of variable and function
14980 decls with external linkage.
14982 * tree.def: Change some of the min tree codes to type "1".
14983 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
14984 * method.c (build_overload_int): Emit something arbitrary for
14985 anything but an INTEGER_CST if we're in a template.
14987 * decl.c (cp_finish_decl): Call complete_type before deciding
14988 whether or not to lay out the decl.
14990 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
14992 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14994 * typeck2.c (build_x_arrow): Call complete_type.
14996 * pt.c (add_pending_template): Broken out.
14997 (lookup_template_class): If -fexternal-templates, call it for all
14998 the methods of implemented types.
14999 (instantiate_class_template): Instead of instantiating them here.
15000 (instantiate_decl): Handle -fexternal-templates earlier.
15002 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15004 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
15005 memoized lookup stuff inside GATHER_STATISTICS.
15007 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15009 * decl.c (start_decl): Complain about array of incomplete type
15011 (grokdeclarator): Not here.
15013 * parse.y (template_parm): Expand full_parm inline so we can set
15014 the rule's precedence.
15016 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
15017 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
15018 * decl2.c (grokbitfield): Don't check for integer constant here.
15019 * class.c (finish_struct_1): Check here.
15021 * decl.c (define_label): Make the min decl go on permanent_obstack.
15023 * pt.c (unify): Don't handle CONST_DECLs.
15024 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
15025 (tsubst_copy): Likewise.
15027 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
15028 CONST_DECL for a template parm.
15030 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15032 * decl.c (grokdeclarator): Complain about array of incomplete type
15034 (start_decl_1): Not here.
15036 * pt.c (tsubst): Handle pointer-to-function declarators.
15038 * method.c (hack_identifier): If pedantic, diagnose local class
15039 methods that require a static chain.
15041 * decl.c (grok_op_properties): No longer static.
15042 * cp-tree.h: Declare it.
15043 * pt.c (tsubst): Call it for operators.
15044 Use tsubst_copy for TREE_VECs.
15046 * parse.y (template_arg): The expr has precedence like '>'.
15048 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15050 * pt.c (coerce_template_parms): Don't coerce an expression using
15052 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
15053 (tsubst): Don't use build_index_2_type if the max_value uses template
15055 * method.c (build_overload_int): Emit something arbitrary for an
15056 expression using template parms.
15058 * parse.y (template_close_bracket): New non-terminal to catch use
15059 of '>>' instead of '> >' in template class names.
15060 (template_type): Use it.
15061 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
15063 * tree.def: Add CAST_EXPR.
15064 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
15065 CONVERT_EXPR for minimal_parse_mode.
15066 * typeck.c (build_c_cast): Likewise.
15067 * pt.c (tsubst_copy): Likewise.
15068 * decl2.c (build_expr_from_tree): Likewise.
15069 * error.c (dump_expr): Likewise.
15071 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15073 * except.c (SetTerminate, SetUnexpected): Put back global vars.
15074 (init_exception_processing): Put back decl/init of
15075 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
15076 fns from libstdc++.
15078 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
15079 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
15081 * cp-tree.h (declare_uninstantiated_type_level,
15082 uninstantiated_type_level_p): Delete prototypes.
15084 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15086 * pt.c (tsubst_expr): Add default return.
15088 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15090 * error.c (fndecl_as_string): Delete unused arg CNAME.
15091 * sig.c (build_signature_table_constructor,
15092 build_signature_method_call): Fix calls.
15094 * class.c (the_null_vtable_entry): Delete var definition.
15095 (init_class_processing): Delete tree the_null_vtable_entry init.
15096 * decl.c (no_print_{functions, builtins}): Declare as static.
15097 (__tp_desc_type_node): #if 0 var definition.
15098 (init_type_desc): #if 0 init of __tp_desc_type_node.
15099 (vb_off_identifier): Move var decl into init_decl_processing.
15100 (current_function_assigns_this): Declare as static.
15101 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
15102 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
15103 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
15104 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
15105 * init.c (BI_header_type, BI_header_size): Declare as static.
15106 * pt.c (template_classes): Delete unused var.
15107 (add_pending_template): Delete decl for non-existent fn.
15108 (lookup_template_class): Delete vars CODE and TAG_CODE.
15109 (instantiate_template): Delete unused var TARGS.
15110 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
15112 (__tp_desc_type_node): #if 0 var decl.
15113 (fndecl_as_string): Fix prototype.
15115 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15117 * tree.def: Add GOTO_STMT.
15118 * pt.c (tsubst_expr): Support goto and labels.
15119 * decl.c (define_label): Support minimal parsing.
15120 * parse.y (simple_stmt): Likewise.
15122 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15124 * xref.c (GNU_xref_member): Only define/set var I if
15125 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
15127 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
15128 (GNU_xref_end): Fix call.
15129 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
15130 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
15132 * tree.c (build_exception_variant): Delete unused vars I, A, T,
15134 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
15135 (mapcar): Delete unused var CODE.
15136 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
15137 (break_out_cleanups): Fix call.
15138 (bot_manip): Likewise.
15139 * call.c (build_method_call): Likewise.
15140 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
15142 * typeck.c (unary_complex_lvalue, build_modify_expr,
15143 convert_for_initialization): Likewise.
15144 * typeck2.c (build_functional_cast): Likewise.
15145 * cp-tree.h (build_cplus_new): Fix prototype.
15147 * repo.c (open_repo_file): Delete unused var Q.
15148 (repo_compile_flags, repo_template_declared,
15149 repo_template_defined, repo_class_defined, repo_inline_used,
15150 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
15151 (repo_get_id, repo_vtable_used): Declare as static.
15152 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
15155 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
15157 * parse.y (pending_inlines): Add function_try_block case.
15159 * pt.c (unify): Fix for template const parms.
15161 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15163 * lex.c (extract_interface_info): Delete forward decl.
15164 (default_copy_constructor_body, default_assign_ref_body): Delete
15165 decls for non-existent functions.
15166 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
15167 (init_lex): Delete setting them.
15168 (cons_up_default_function): Delete unused vars FUNC_BUF,
15169 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
15170 #if 0'd synth code.
15171 (toplevel, expression_obstack): Delete unused extern decls.
15172 (tree_node_kind): Delete unused enum.
15173 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
15175 (tree_node_kind_names): Delete unused extern decl.
15176 (synth_obstack): Delete unused var.
15177 (init_lex): Don't set it.
15178 (init_parse): Add decl before use.
15179 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
15180 (current_unit_{name, language}): Delete unused vars.
15181 (check_newline): Don't bother setting them, just accept the #pragma.
15182 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
15183 (current_unit_{name, language}): Delete decls.
15185 * search.c: Wrap all of the memoized functions, macros, and
15186 variables inside #ifdef GATHER_STATISTICS.
15187 (lookup_field, lookup_fnfields): Likewise.
15188 (init_search_processing): Likewise.
15189 (reinit_search_statistics): Wrap whole function.
15190 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
15192 * decl.c (finish_function): Only call pop_memoized_context if
15193 GATHER_STATISTICS is defined.
15194 (start_function): Likewise for push_memoized_context.
15195 * class.c (pushclass, popclass): Likewise.
15197 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
15198 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
15200 * cvt.c (cp_convert): Delete unused local var FORM.
15201 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
15204 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15206 * pt.c (do_poplevel): Oops; really return what we get from
15207 poplevel this time.
15209 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15211 * cp-tree.h (is_aggr_type): Add prototype.
15213 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
15214 * method.c ({push,pop}_cp_function_context): Delete decls.
15215 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
15216 (SetUnexpected, SetTerminate): Delete unused vars.
15217 (init_exception_processing): Don't set SetUnexpected or
15218 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
15219 (output_exception_table_entry): Delete unused array LABEL.
15220 (expand_internal_throw): Delete unused var PARAMS.
15221 (expand_start_catch_block): Delete unused var CLEANUP.
15222 (emit_exception_table): Delete unused var EH_NODE_DECL.
15223 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
15224 GOTO_UNWIND_AND_THROW. Don't set them.
15225 (end_eh_unwinder): Add top decl.
15226 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
15227 (exception_section, push_rtl_perm, do_function_call,
15228 lang_interim_eh, push_eh_cleanup, eh_outer_context,
15229 expand_end_eh_spec, end_eh_unwinder): Declare as static.
15230 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
15231 throw_used): Likewise.
15232 * cp-tree.h (expand_end_eh_spec): Delete prototype.
15234 * search.c (dfs_mark, dfs_mark_vtable_path,
15235 dfs_unmark_vtable_path, dfs_mark_new_vtable,
15236 dfs_unmark_new_vtable, dfs_clear_search_slot,
15237 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
15238 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
15239 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
15241 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
15242 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
15243 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
15244 Only define #ifdef GATHER_STATISTICS.
15245 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
15247 (vbase_decl): Delete var definition.
15248 (init_search): Delete old decl.
15249 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
15250 never actually used.
15251 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
15252 (get_base_distance_recursive): Delete unused fourth arg
15253 BASETYPE_PATH. Fix call .
15254 (get_base_distance): Fix call.
15255 (push_class_decls): Delete unused var ID.
15256 (make_memoized_table_entry): Declare as static.
15257 (breadth_first_search): Declare as static.
15258 (tree_has_any_destructor_p): Declare as static.
15259 (pop_class_decls): Delete unused arg pop_class_decls.
15260 * class.c (popclass): Fix call to pop_class_decls.
15261 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
15262 tree_has_any_destructor_p): Delete prototypes.
15264 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
15265 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
15266 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
15267 (build_user_desc): Delete unused var T.
15268 (build_class_desc): Delete unused vars T and OFF.
15269 (build_t_desc): Delete unused var NAME_STRING.
15270 (build_headof): Make static.
15271 (get_bad_cast_node): Likewise.
15272 (get_def_to_follow): Likewise.
15273 * cp-tree.h (init_type_desc): Add prototype.
15274 (build_headof): Remove prototype.
15276 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15278 * pt.c (tsubst): Only look for matching decls at file scope for
15279 non-member functions.
15281 * call.c (build_scoped_method_call): Handle scoped destructor
15282 calls in templates.
15284 * decl.c (*_top_level): Also save previous_class_values.
15286 * pt.c (tsubst_expr): Support do {} while loops.
15287 * parse.y (simple_stmt): Likewise.
15288 * tree.def: Likewise.
15290 * method.c (build_overload_identifier): For a class nested in a
15291 template class, don't mangle in the template parms from our
15294 * lex.c, cp-tree.h: Remove support for template instantiations in
15295 the pending_inlines code.
15296 * pt.c: Remove dead functions and unused arguments.
15297 (uses_template_parms): TYPENAME_TYPEs always use template parms.
15298 * parse.y: Stop passing anything to end_template_decl.
15299 * tree.c (print_lang_statistics): Only print tinst info #ifdef
15302 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15304 * init.c (expand_recursive_init{,_1}): Delete decls.
15305 (sort_member_init): Delete unused var INIT.
15306 (emit_base_init): Delete unused var X.
15307 (build_offset_ref): Delete unused var CNAME.
15308 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
15309 (emit_base_init): Delete unused local var BASE. Delete extern
15310 decl of IN_CHARGE_IDENTIFIER.
15311 (build_delete): Delete unused local var VIRTUAL_SIZE.
15313 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
15314 (build_delete): Fix call.
15315 * decl2.c (delete_sanity): Likewise.
15316 * cp-tree.h (build_vec_delete): Update prototype.
15318 * typeck.c (common_base_type): Delete unused var TMP.
15319 (build_binary_op): Delete local var ARGS_SAVE.
15320 (build_array_ref): Delete unused var ITYPE.
15321 (c_expand_return): Delete unused var USE_TEMP.
15323 * typeck.c (compexcepttypes): Delete unused arg STRICT.
15324 (comptypes): Fix calls.
15325 * decl.c (duplicate_decls): Likewise.
15326 * cp-tree.h (compexcepttypes): Delete extra arg.
15328 * decl2.c (check_classfn): Delete unused second arg CNAME.
15329 * decl.c (start_decl, grokfndecl): Fix calls.
15330 * init.c (do_friend): Likewise.
15331 * cp-tree.h (check_classfn): Update prototype.
15333 * cp-tree.h (signature_error, import_export_vtable,
15334 append_signature_fields, id_in_current_class, mark_used,
15335 copy_assignment_arg_p): Add decls.
15336 * decl2.c (mark_used): Delete decl.
15338 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
15340 * class.c (get_vtable_entry): Disable unused function.
15341 (doing_hard_virtuals): Delete unused static global var.
15342 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
15343 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
15344 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
15345 (modify_one_vtable): Delete unused var OLD_RTTI.
15346 (finish_struct_anon): Delete unused vars OFFSET and X.
15347 (finish_struct_bits): Delete unused var METHOD_VEC.
15348 (get_basefndecls): Delete unused var PURPOSE. Delete unused
15349 for-scope local variable METHODS.
15351 * call.c (user_harshness): Delete unused/unneeded arg PARM.
15352 (ideal_candidate): Delete unused args BASETYPE and PARMS.
15353 (build_method_call): Delete unused args passed into ideal_candidate.
15354 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
15355 * cp-tree.h (synthesize_method): Add decl.
15357 * decl.c (note_level_for_for): Give void return type.
15358 (pushdecl_nonclass_level): Likewise.
15359 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
15360 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
15361 (suspend_binding_level): Delete unused var LEVEL.
15362 (duplicate_decls): Delete unused var CTYPE.
15363 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
15364 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
15366 (grokdeclarator): Delete unused var C.
15367 (grokdeclarator): Delete unused var SIZE_VARIES.
15368 (grokparms): Delete unused var SAW_VOID.
15369 (start_function): Delete unused var OLDDECL.
15370 (cplus_expand_expr_stmt): Delete unused var
15371 REMOVE_IMPLICIT_IMMEDIATELY.
15373 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
15375 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
15377 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15379 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
15380 (build_min_nt): Likewise.
15381 * pt.c (do_pushlevel): Emit line note.
15382 (do_poplevel): Return what we get from poplevel.
15383 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
15384 * parse.y: Use do_pushlevel and do_poplevel.
15385 * cp-tree.h: Declare do_poplevel.
15387 * cp-tree.h: Declare at_eof.
15388 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
15389 * decl2.c (import_export_decl): Renamed from import_export_inline.
15390 (finish_file): Call it to do interface handling for statics.
15391 * pt.c (tsubst_copy): Call mark_used on variables and functions
15394 * decl2.c (finish_file): Don't emit statics we can't generate.
15395 * pt.c (instantiate_decl): Don't set interface on instantiations
15398 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
15399 * tree.c (print_lang_statistics): Print max template depth.
15400 * pt.c (push_tinst_level): Dump entire instantiation context.
15401 (instantiate_class_template): Use it and pop_tinst_level.
15402 (instantiate_decl): Likewise.
15404 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
15405 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
15407 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15409 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
15410 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
15411 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
15412 the new template implementation.
15414 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15416 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
15418 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
15420 * decl.c (cp_finish_decl): Delay emitting the debug information for
15421 a typedef that has been installed as the canonical typedef, if the
15422 type has not yet been defined.
15424 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15426 * decl2.c (grokfield): Still call pop_nested_class for access decls.
15428 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15430 * decl.c (lookup_label): Call label_rtx.
15432 * decl.c (make_binding_level): New function.
15433 (pushlevel, pushlevel_class): Call it instead of explicit
15434 duplicate calls to xmalloc.
15436 * decl.c (init_decl_processing): Delete useless build_pointer_type
15439 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
15440 (sizet_ftype_string): Delete variable.
15441 (init_decl_processing): Add built-in functions fabsf, fabsl,
15442 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
15443 variable strlen_ftype, used for strlen.
15445 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
15447 * decl.c (push_to_top_level): Start from current_binding_level
15448 again for now; the stl hacks depend on g++ being broken in this
15449 way, and it'll be fixed in the template rewrite.
15451 * tree.def: Add USING_DECL.
15452 * decl2.c (do_class_using_decl): Implement.
15453 (grokfield): Pass access decls off to do_class_using_decl instead of
15455 * error.c (dump_decl): Handle USING_DECLs.
15456 * decl.c (grokdeclarator): Remove code for handling access decls.
15457 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
15458 as access decls for now.
15459 (finish_struct): Don't check USING_DECLs for other uses of the name.
15461 * search.c (get_matching_virtual): Use cp_error_at.
15463 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15465 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
15467 (self_promoting_args_p): Move the check that TYPE is non-nil
15468 before trying to look at its main variant.
15469 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
15471 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
15473 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
15474 (do_friend): Delete call to xref_friend.
15475 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
15477 * typeck.c (convert_sequence): #if 0 unused function.
15479 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
15480 be in decl_in_memory_p.
15481 (decl_in_memory_p): Delete decl.
15482 * expr.c (decl_in_memory_p): Delete fn.
15483 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
15485 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
15487 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15489 * class.c (finish_struct_1): Check for a pure-specifier on a
15490 non-virtual function here.
15492 * decl2.c (grok_function_init): Don't check whether the function
15494 (grokfield): Don't call check_for_override here.
15496 * decl.c (push_to_top_level): Start from inner_binding_level,
15497 check class_shadowed in class levels.
15499 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
15501 * decl.c (resume_level): Ignore things that don't have names, instead
15504 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15506 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
15508 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15510 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
15513 * parse.y (complete_type_name): Bind global_scope earlier.
15514 (complex_type_name): Likewise.
15515 (qualified_type_name): Remove.
15517 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
15519 * decl.c (grokfndecl): Move code that looks for virtuals in base
15521 * class.c (check_for_override): ... to a new function.
15522 (finish_struct_1): Call it.
15524 * cp-tree.h: Declare warn_sign_compare.
15526 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
15527 rather than extra_warnings to decide whether to warn about
15528 comparison of signed and unsigned.
15530 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
15531 implies -Wsign-compare. -Wall doesn't imply -W.
15533 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
15535 * typeck.c (build_component_ref): Fix to handle anon unions in base
15538 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15540 * class.c (resolves_to_fixed_type_p): Delete code dealing with
15541 a WITH_CLEANUP_EXPR, since we don't generate them any more.
15542 * cvt.c (build_up_reference): Likewise.
15543 * decl.c (grok_reference_init): Likewise.
15544 (cp_finish_decl): Likewise.
15545 * error.c (dump_expr): Likewise.
15546 * tree.c (real_lvalue_p): Likewise.
15547 (lvalue_p): Likewise.
15548 (build_cplus_new): Likewise.
15549 (unsave_expr_now): Likewise.
15550 * typeck.c (unary_complex_lvalue, build_modify_expr,
15551 c_expand_return): Likewise.
15553 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15555 Make the C++ front-end pay attention to attributes for structures.
15556 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
15558 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
15559 Take out old round_up_size use and setting the DECL_ALIGN possibly
15560 using it. Take out setting of TYPE_ALIGN to round_up_size, which
15561 can override what the attribute set.
15562 * cp-tree.h (finish_struct): Update prototype.
15563 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
15564 attributes to finish_struct.
15565 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
15566 value down into finish_struct.
15567 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
15569 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
15571 * decl.c (poplevel): Re-word dead for local handling.
15572 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
15573 (cp_finish_decl): If is_for_scope, check for duplicates so
15574 we can disable is_for_scope. Otherwise, preserve_temp_slots.
15576 * lex.c (do_identifier): Use global binding in preference of
15577 dead for local variable.
15579 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
15581 * init.c (initializing_context): Handle anon union changes, the
15582 context where fields of anon unions can be initialized now has to be
15583 found by walking up the TYPE_CONTEXT chain.
15585 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
15587 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
15588 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
15589 (obscure_complex_init): If bss is supported, always set
15590 DECL_INITIAL to error_mark_node.
15592 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15594 * init.c (is_friend): Make sure there's a context before we see if
15597 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
15599 * init.c (is_friend): Classes are not friendly with nested classes.
15601 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
15603 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
15604 and record its result.
15606 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
15608 * class.c (finish_struct_anon): Switch around code to not move anon
15609 union elements around, nor mess up their contexts, nor offsets,
15610 instead we now build up the right number of COMPONENT_REFs for all
15611 the anon unions that may be present at build_component_ref time.
15612 * typeck.c (lookup_anon_field): New routine to handle field lookup
15613 on fields without names. We find them, based upon their unique type
15615 * typeck.c (build_component_ref): Allow FIELD_DECL components.
15616 Handle finding components in anonymous unions, and ensure that a
15617 COMPONENT_REF is built for each level as necessary.
15619 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
15621 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
15622 code that ensures that copy ctors are used if appropriate.
15624 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15626 * init.c (build_vec_delete): Only give an error if base isn't an
15629 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
15631 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
15632 (yylex): If we see `new', keep slurping.
15634 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
15636 * class.c (finish_struct_1): Move code for handling anon unions...
15637 (finish_struct_anon): to here. Fixup so that we do the offset
15638 calculations right, and so that the fields are physically moved to
15639 the containers's chain.
15641 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15643 * decl.c (grokdeclarator): Avoid trying to get an operand off an
15646 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
15648 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
15649 POINTER_SIZE to agree with expr.c.
15651 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
15653 * search.c (lookup_field): Don't report ambiguities if protect is 0,
15654 instead return NULL_TREE.
15656 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
15658 * class.c (finish_struct_1): Call warn_hidden if we want warnings
15659 about overloaded virtual functions.
15660 (warn_hidden): New routine to warn of virtual functions that are
15661 hidden by other virtual functions, that are not overridden.
15662 (get_basefndecls): New routine, used by warn_hidden.
15663 (mark_overriders): New routine, used by warn_hidden.
15664 * search.c (get_matching_virtual): Remove old warning that just
15667 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15669 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
15671 * typeck.c (null_ptr_cst_p): Delete unused fn.
15672 (build_function_call_maybe): Delete unused fn.
15674 * expr.c (extract_init): #if 0 the code after unconditional return 0
15677 Delete old cadillac code.
15678 * edsel.c: Remove file.
15679 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
15680 * Makefile.in (CXX_OBJS): Delete edsel.o.
15681 (edsel.o): Delete rule.
15682 * cp-tree.h (flag_cadillac): Delete var decl.
15683 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
15684 * decl2.c (flag_cadillac): Delete var definition.
15685 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
15686 (grokfield): Delete code depending on flag_cadillac.
15687 (finish_anon_union): Likewise.
15688 * class.c (finish_struct_1): Likewise.
15689 (pushclass): Likewise.
15690 (popclass): Likewise.
15691 (push_lang_context): Likewise.
15692 (pop_lang_context): Likewise.
15693 * decl.c (init_decl_processing): Likewise.
15694 (start_decl): Likewise.
15695 (cp_finish_decl): Likewise.
15696 (xref_tag): Likewise.
15697 (finish_enum): Likewise.
15698 (start_function): Likewise.
15699 (finish_function): Likewise.
15700 (finish_stmt): Likewise.
15701 * lex.c (lang_init): Likewise.
15702 (check_newline): Likewise.
15704 * lex.c (do_pending_inlines): Delete synthesized method kludge.
15706 Delete defunct, ancient garbage collection implementation.
15707 * rtti.c: New file with the RTTI stuff from gc.c.
15708 * gc.c: Removed file (moved the remaining stuff into rtti.c).
15709 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
15710 (rtti.o): New rule, replacing gc.o.
15711 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
15712 * cp-tree.h: Delete gc-related fn decls.
15713 (DECL_GC_OFFSET): Delete macro.
15714 (flag_gc): Delete extern decl.
15715 * decl.c (current_function_obstack_index): Delete var decl.
15716 (current_function_obstack_usage): Delete var decl.
15717 (start_function): Delete clearing of current_function_obstack_index
15718 and current_function_obstack_usage.
15719 (init_decl_processing): Delete code relying on -fgc.
15720 Delete call to init_gc_processing.
15721 (cp_finish_decl): Delete calls to build_static_gc_entry and
15722 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
15723 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
15724 and to expand_expr of a __gc_main call.
15725 (maybe_gc_cleanup): Delete var decl.
15726 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
15727 * decl2.c (flag_gc): Delete var decl.
15728 (lang_f_options): Delete offering of -fgc.
15729 (lang_decode_option): Delete -fgc and -fno-gc handling.
15730 (get_temp_regvar): Delete gc code.
15731 * init.c (build_new): Delete gc code.
15732 * lex.c (init_lex): Delete checking of flag_gc.
15734 * typeck.c (convert_arguments): Delete gc code.
15735 (build_component_addr): Delete -fgc warning.
15736 (build_modify_expr): Delete gc code.
15738 * decl2.c (build_push_scope): Delete fn.
15739 * cp-tree.h (build_push_scope): Delete decl.
15741 * search.c (clear_search_slots): Delete fn.
15742 * cp-tree.h (clear_search_slots): Delete decl.
15744 * search.c (tree_needs_constructor_p): Delete fn.
15745 * cp-tree.h (tree_needs_constructor_p): Delete decl.
15747 * tree.c (id_cmp): Delete fn.
15749 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
15750 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
15752 * tree.c (decl_value_member): Delete fn.
15753 * cp-tree.h (decl_value_member): Delete decl.
15755 * tree.c (list_hash_lookup_or_cons): Delete fn.
15756 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
15758 * method.c (cplus_exception_name): Delete fn.
15759 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
15761 * spew.c (shift_tokens): Delete fn.
15763 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15765 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
15767 * parse.y: Likewise.
15769 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15771 * tree.c (build_cplus_staticfn_type): Delete function definition;
15773 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
15775 * tree.c (virtual_member): Delete function definition; never used.
15776 * cp-tree.h (virtual_member): Delete decl.
15778 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
15780 * typeck.c (build_component_ref): Handle getting vbase pointers
15781 out of complex multiple inheritance better.
15783 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
15785 * typeck.c (build_object_ref): Make sure we use the real type, not
15786 any reference type.
15788 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
15790 * tree.c (build_exception_variant): Don't create new types if we
15791 don't have to, also build new types on the right obstack.
15793 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15795 * decl.c (store_bindings): Split out from push_to_top_level.
15796 (push_to_top_level): Call it for b->type_shadowed on class binding
15799 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
15801 * search.c (expand_upcast_fixups): Fix so that offsets stored in
15802 vbase_offsets are always right. Fixes a problem where virtual base
15803 upcasting and downcasting could be wrong during conversions on this
15804 during virtual function dispatch at ctor/dtor time when dynamic
15805 vtable fixups for deltas are needed. This only sounds easier than
15807 (fixup_virtual_upcast_offsets): Change to reflect new calling
15808 convention for expand_upcast_fixups.
15810 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15812 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
15813 check that it's usable as the bitfield width.
15815 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15817 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
15818 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
15819 only ever used for functions in it.
15821 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15823 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
15824 (nested_type): Likewise.
15825 (nested_name_specifier): Use lastiddecl.
15827 * decl.c (grokdeclarator): Adjust accordingly.
15828 * init.c (expand_member_init): Likewise.
15829 * parse.y (base_class): Likewise.
15830 * typeck2.c (build_functional_cast): Likewise.
15832 * typeck2.c (build_functional_cast): Fill in name after we've
15833 checked for non-aggr type.
15835 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
15837 * decl2.c (warn_pointer_arith): Default to on.
15839 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15841 * lex.c (is_rid): New function.
15842 * decl.c (grokdeclarator): Diagnose reserved words used as
15845 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
15847 * tree.c (get_decl_list): Don't lose cv-quals.
15849 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
15850 typespecs used as declarator-ids.
15852 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
15854 * decl.c (poplevel): When poping a level, don't give a warning for
15855 any subblocks that already exist.
15857 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15859 * typeck.c (build_object_ref): Finish what I started.
15861 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
15863 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
15865 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
15868 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15870 * decl.c (xref_tag): Handle passing a type in directly.
15872 * parse.y (qualified_type_name): Pull out the type.
15873 (nested_type): Likewise.
15874 Take types directly instead of as identifiers.
15875 * call.c (build_scoped_method_call): Take types directly instead of
15877 * decl.c (xref_basetypes): Likewise.
15878 * init.c (expand_member_init): Likewise.
15879 (build_member_call): Likewise.
15880 (build_offset_ref): Likewise.
15881 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
15882 * method.c (do_build_assign_ref): Likewise.
15883 * decl.c (grokdeclarator): Handle a type appearing as the
15884 declarator-id for constructors.
15885 * method.c (do_build_copy_constructor): current_base_init_list now
15886 uses the types directly, not their names.
15887 * init.c (sort_base_init): Likewise.
15888 (expand_member_init): Likewise.
15889 * init.c (is_aggr_type): New function, like is_aggr_typedef.
15891 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
15893 * tree.c (layout_basetypes): Call build_lang_field_decl instead
15894 of build_lang_decl if first arg is a FIELD_DECL.
15896 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15898 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
15900 * except.c (expand_start_catch_block): Set TREE_USED to avoid
15901 warnings about the catch handler.
15903 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
15905 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
15906 expand_target_expr.
15908 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15910 Fix access control to use trees rather than integers.
15911 * class.c (access_{default, public, protected, private,
15912 default_virtual, public_virtual, private_virtual}_node): Add
15914 (init_class_processing): Do creation of those nodes.
15915 * cp-tree.h (access_type): Delete enum decl.
15916 (access_{default, public, protected, private, default_virtual,
15917 public_virtual, private_virtual}_node): Add decls.
15918 (compute_access): Change return type.
15919 * search.c (compute_access): Have tree return type, instead of enum.
15920 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
15921 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
15922 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
15923 * parse.y (VISSPEC): Make ttype rather than itype.
15924 (base_class_access_list): Likewise.
15925 * *.[cy]: Change all refs of `access_public' to `access_public_node',
15927 * call.c (build_method_call): Make ACCESS be a tree.
15928 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
15929 * cvt.c (convert_to_aggr): Likewise.
15930 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
15932 * method.c (hack_identifier): Likewise.
15933 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
15935 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
15937 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
15938 frontend, and make it more consistent with respect to
15939 warn_pointer_arith.
15941 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
15943 * decl.c (pushdecl): Check for duplicate parameter names.
15945 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
15947 * decl.c (expand_static_init): Call assemble_external for atexit.
15949 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
15951 * except.c (do_unwind): Remove some generated dead code.
15952 (eh_outer_context): New routine, factor out some common code from
15953 expand_builtin_throw and end_eh_unwinder. Add code to do return
15954 address masking for the PA.
15955 (expand_builtin_throw): Use eh_outer_context instead of open coding
15957 (end_eh_unwinder): Likewise.
15959 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
15961 * except.c (expand_throw): Call assemble_external for __empty, if we
15964 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
15966 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
15967 NORMAL_RETURN_ADDR_OFFSET.
15968 (end_eh_unwinder): Likewise.
15970 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
15972 * gc.c (build_dynamic_cast): Make sure we don't cast away const
15973 when dealing with references, and make sure we handle dynamic
15974 casting to a cv qualified reference.
15976 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
15978 * except.c (struct eh_context): New structure top hold eh context
15980 (push_eh_context): New routine.
15981 (pop_eh_context): Likewise.
15982 * decl.c (push_cp_function_context): Use them.
15983 (pop_cp_function_context): Likewise.
15985 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
15987 * decl2.c (finish_file): Also prune uninteresting functions in the
15988 inline emission loop.
15990 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
15992 * sig.c (build_signature_table_constructor): Mark functions
15993 in the signature as referenced.
15995 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
15997 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
15998 the inline emission stuff.
16000 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
16002 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
16004 * lang-options.h: Add -f{no-,}weak.
16005 * decl.c (init_decl_processing): If the target does not support weak
16006 symbols, don't use them.
16007 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
16009 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
16011 * init.c (expand_member_init): warning for base init after members.
16013 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
16015 * cvt.c (build_expr_type_conversion): Don't convert to a reference
16018 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
16020 * method.c (report_type_mismatch): Improve wording for volatile
16023 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
16025 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
16026 expand_assignment, as the later doesn't handle things that have
16027 copy constructors well. The compiler would do bitwise copying,
16028 instead of ctor calling in some cases.
16030 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
16032 * g++.c (my_strerror): Return "cannot access" if errno is 0.
16033 (pfatal_with_name, perror_exec): Don't assume that
16034 the returned value from my_strerror contains no '%'s.
16036 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
16038 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
16040 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
16041 TYPE_METHODS/TREE_CHAIN mean what they used to.
16042 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
16043 instead of TYPE_METHODS.
16044 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
16045 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
16046 * cp-tree.h (CLASSTYPE_METHODS): Lose.
16047 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
16049 (struct lang_decl): Lose next_method field.
16050 (DECL_NEXT_METHOD): Lose.
16051 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
16052 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
16054 (finish_struct_methods): Don't mess with the TREE_CHAINs in
16057 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
16060 * call.c (build_method_call): Synthesize here even when not inlining.
16061 * typeck.c (build_function_call_real): Likewise.
16063 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
16065 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
16066 == DBX_DEBUG, call dbxout_start_new_source_file and
16067 dbxout_resume_previous_source_file when appropriate.
16069 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
16071 * except.c (start_anon_func): Push to the top level.
16072 (end_anon_func): Pop from the top level.
16074 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
16076 * cp-tree.h (build_cleanup): New routine to build cleanups.
16077 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
16078 call at ctor time and use atexit to run it later.
16079 * decl2.c (build_cleanup): New routine, taken from finish_file.
16080 (finish_file): Use build_cleanup instead, and don't put function
16081 local statics in global dtor list.
16083 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
16085 * except.c (expand_throw): Ensure that we have cleanups, if we try
16086 and expand cleanups.
16088 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
16090 * except.c (expand_throw): Add logic to manage dynamic cleanups for
16092 (expand_end_catch_block): Use the magic of expand_goto, instead of
16093 emit_jump so that we get the cleanup for any catch clause parameter
16094 and the cleanup for the exception object. Update to reflect label
16096 (push_eh_cleanup): New routine to register a cleanup for an
16098 (empty_fndecl): Used to default cleanup actions to
16100 (init_exception_processing): Setup empty_fndecl. Setup
16102 (expand_start_catch_block): Update to reflect label changes. Call
16103 push_eh_object to register the cleanup for the EH object.
16104 (start_anon_func): New routine to start building lambda expressions
16106 (end_anon_func): New routine to end them.
16107 (struct labelNode): Change so that we can use tree labels, or rtx
16109 (saved_cleanup): Object to check for dynamic cleanups for the
16110 exception handling object.
16111 (push_label_entry): Change so that we can use tree labels, or rtx
16113 (pop_label_entry): Likewise.
16114 (top_label_entry): Likewise.
16115 (expand_start_all_catch): Use tree label instead of rtx label, so
16116 that we can get the magic of expand_goto.
16117 (expand_end_all_catch): Update to reflect label changes.
16119 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
16121 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
16122 building_cleanup logic, as we now use UNSAVE_EXPRs.
16123 * cp-tree.h (unsave_expr): Declare it.
16124 * decl.c (building_cleanup): Remove.
16125 (maybe_build_cleanup): Remove building_cleanup logic, and use
16126 UNSAVE_EXPR instead.
16128 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
16130 * gc.c (build_t_desc): Update error message to say <typeinfo>.
16132 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16134 * decl.c (pushdecl): Only warn about shadowing a local variable if
16135 warn_shadow is true.
16137 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
16139 * typeck.c (build_binary_op_nodefault): Added warning about
16140 comparisons between different enum types with -Wall, unless
16141 -fenum-int-equiv set.
16143 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
16145 * class.c (finish_struct_1): Skip down to the inner type in
16146 multidimensional arrays. Ensures ctors will be made for types that
16149 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
16151 * decl.c (last_dtor_insn): New to track the last compiler generated
16153 (store_parm_decls): Set it.
16154 (finish_function): Use it to see if the dtor is empty. Avoid doing
16155 vtable setup all the time, if we can.
16156 (struct cp_function): Add last_dtor_insn.
16157 (push_cp_function_context): Save it.
16158 (pop_cp_function_context): Restore it.
16160 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
16162 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
16165 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
16167 * typeck.c (expand_target_expr): Make sure targets get put into the
16168 current temp_slot_level, so that the free_temp_slots call will reuse
16171 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
16173 * class.c (finish_struct_1): Delay delta fixups for virtual bases
16174 until after we have done the hard virtuals, to avoid a bogus `every
16175 virtual function must have a unique final overrider' for virtual
16176 functions that are only overridden by hard virtuals.
16178 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
16180 * pt.c (do_function_instantiation): Don't try to find a file-scope
16181 template for a member function.
16183 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
16185 * g++.c (main): Add handling of -nodefaultlibs.
16187 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
16189 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
16190 distinguish between direct bindings of reference variables, and
16191 indirect bindings of reference variables.
16192 * cvt.c (build_up_reference): Use it.
16193 * typeck.c (convert_arguments): Use it to indicate this is an
16195 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
16196 as they are unused.
16197 (expand_static_init): Likewise.
16198 (cplus_expand_expr_stmt): Likewise.
16199 * decl2.c (finish_file): Likewise.
16200 * init.c (perform_member_init): Likewise.
16201 (emit_base_init): Likewise.
16202 (expand_aggr_vbase_init_1): Likewise.
16204 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16206 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
16207 get a DECL_LANG_SPECIFIC node.
16208 * cp-tree.h (lang_decl_flags): Add new member `level'.
16209 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
16210 decl_flags level member.
16212 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16214 * call.c (build_method_call): Make sure instance has a
16215 TYPE_LANG_SPECIFIC node before we dive into it.
16217 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
16219 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
16221 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
16223 * decl.c (duplicate_decls): When smashing decls, smash staticness in
16226 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
16228 * decl.c (poplevel): Handle the merging of subblocks of cleanups
16229 when finishing blocks that have already been created (usually due to
16230 the fixup goto code). Fixes bad debugging information.
16232 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
16234 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
16235 that's not a list of overloaded functions.
16237 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16239 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
16240 before trying to use DECL_ABSTRACT_VIRTUAL_P.
16242 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
16244 * decl2.c (mark_used): New function for hooking into setting of
16245 TREE_USED on decls.
16246 * call.c (build_method_call): Use it.
16247 * class.c (instantiate_type): Likewise.
16248 * init.c (build_offset_ref): Likewise. Don't call assemble_external
16249 for all like-named functions.
16250 * method.c (hack_identifier): Likewise.
16251 (emit_thunk): Don't call assemble_external.
16252 (make_thunk): Create thunk as a FUNCTION_DECL so that it
16253 gets the right mode and ENCODE_SECTION_INFO works.
16255 * parse.y: Use mark_used. Pass operator names to do_identifier.
16256 * lex.c (do_identifier): Handle operator names.
16258 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
16260 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16262 * errfn.c: Include stdio.h.
16263 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
16265 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
16267 * typeck2.c (digest_init): Always convert initializers to the
16270 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
16272 * init.c (member_init_ok_or_else): Don't allow member initializers
16273 for indirect members, as it is invalid.
16275 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16277 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
16279 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
16281 * parse.y (for.init.statement): Catch compound statements inside for
16282 initializations, if we're being pedantic.
16284 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
16286 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
16289 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
16291 * error.c (dump_expr): Don't core dump when a boolean expression is
16292 used as a default argument.
16294 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
16296 * class.c (finish_struct_bits): Check aggregate_value_p instead of
16299 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
16301 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
16302 BLKmode type that would otherwise be returned in registers.
16304 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16306 * g++.c (WITHLIBC): New macro.
16307 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
16308 saw_libc and pass it at the end if it was set.
16310 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
16312 * parse.y (fn.def1): Call split_specs_attrs in
16313 declmods notype_declarator case.