1 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3 * pt.c (tsubst_function_type): Copy attributes over.
5 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
7 * cp-tree.h: Add prototype.
8 * decl.c (init_decl_processing): Set valid_lang_attribute.
10 1999-04-13 Mark Mitchell <mark@codesourcery.com>
12 * class.c (finish_struct_1): Look at the const-ness of the field's
13 type, not the TREE_READONLY-ness of the declaration.
14 * method.c (synthesize_method): Likewise.
15 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
16 creating new declarations.
18 1999-04-13 Mike Stump <mrs@wrs.com>
20 * decl2.c (import_export_decl): Because vtables always reference
21 virtual functions, even if they are inlined, don't allow
22 -fno-implement-inlines to not emit them, instead, emit them with
24 * decl.c (start_function): Likewise.
26 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
28 * cp-tree.h (struct lang_type): Add com_interface.
29 (CLASSTYPE_COM_INTERFACE): New macro.
30 * class.c (set_rtti_entry): COM interface classes have no RTTI
31 entries in their vtables; adjust.
32 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
33 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
34 finish_struct_1): Likewise.
35 * decl2.c (mark_vtable_entries): Likewise.
36 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
37 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
38 expand_upcast_fixups): Likewise.
39 * tree.c (debug_binfo): Likewise.
41 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
42 * typeck.c (comptypes): If we get it, ignore attributes.
43 * class.c (instantiate_type): Use BASELINK_P. Change complain
44 parameter to flags; 2 means ignore attributes.
45 * call.c (build_op_delete_call): Pass it.
47 * decl.c (xref_tag): Only complain once about using a typedef-name
48 with 'struct'. Downgrade to pedwarn.
50 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
52 * parse.y (absdcl_intern): New nonterminal.
53 (absdcl, direct_abstract_declarator): Use it.
55 * pt.c (lookup_template_class): Look through implict typename.
57 1999-04-11 Mark Mitchell <mark@codesourcery.com>
59 * friend.c (add_friend): Deal gracefully with error_mark_node.
60 * method.c (build_overload_value): Handle pointers-to-members as
63 * decl.c (push_binding): Fix typo in comment.
65 1999-04-10 Mark Mitchell <mark@codesourcery.com>
67 * error.c (dump_type_real): If a typename is a template-id, put
68 out the template arguments.
69 (dump_expr): Handle TEMPLATE_ID_EXPR.
70 * pt.c (lookup_template_class): Now that full arguments are
71 available everywhere, remove code that tried to guess them.
73 1999-04-09 Mark Mitchell <mark@codesourcery.com>
75 * decl.c (make_typename_type): Complain if we don't find a type
76 when trying to make a typename type for a non-template type.
78 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
80 * decl.c (start_decl): Pass attributes to grokdeclarator.
81 (grokdeclarator): Handle attributes on constructor-syntax
84 1999-04-08 Mark Mitchell <mark@codesourcery.com>
86 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
89 * search.c (template_self_reference_p): Tweak.
91 1999-04-07 Mark Mitchell <mark@codesourcery.com>
93 * init.c (build_offset_ref): Don't build yet another weird data
94 structure to describe overloaded functions.
96 1999-04-06 Mark Mitchell <mark@codesourcery.com>
98 * cp-tree.h (BASELINK_P): New macro.
99 (SET_BASELINK_P): Likewise.
100 * init.c (build_member_call): Remove needless assignment in if
102 * search.c (lookup_field_r): Fix handling when we are looking
103 specifically for a type; these are not hidden by functions and
105 (lookup_member): Use SET_BASELINK_P.
106 * tree.c (is_overloaded_fn): Use BASELINK_P.
107 (really_overloaed_fn): Likewise.
108 (get_first_fn): Likewise.
110 1999-04-05 Mark Mitchell <mark@codesourcery.com>
112 * decl.c (lookup_name_current_level): Tweak, and improve
115 * class.c (maybe_fixup_vptrs): Remove declaration.
116 (build_class_init_list): Likewise.
117 * decl.c (pushdecl_class_level): Call check_template_shadow here
119 (push_class_level_binding): ... not here.
120 * search.c (dfs_push_type_decls): Only avoid
121 template-self-reference TYPE_DECLs if they are from base classes.
123 1999-04-04 Mark Mitchell <mark@codesourcery.com>
125 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
128 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
130 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
131 (finish_struct_1): Don't call build_class_init_list.
133 1999-04-02 Mark Mitchell <mark@codesourcery.com>
135 * tinfo.h (__class_type_info): Fix illegal declaration.
137 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
138 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
139 (IDENTIFIER_CLASS_VALUE): Improve documentation.
140 (is_properly_derived_from): Declare.
141 (invalidate_class_lookup_cache): Likewise.
142 (maybe_maybe_note_name_used_in_class): Likewise.
143 (note_name_declared_in_class): Likewise.
144 (push_using_decl): Remove duplicate declaration.
145 (id_in_current_class): Remove declaration.
146 (push_class_binding): Change prototype.
147 (clear_identitifer_class_values): Declare.
148 * call.c (is_properly_derived_from): Make it global.
149 (build_new_function_call): Be careful about updating candidates.
150 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
151 asked to make illegal calls.
152 * class.c: Include splay-tree.h.
153 (class_stack_node): Add names_used slot.
154 (check_member_decl_is_same_in_complete_scope): Remove.
155 (add_method): Fix comment. Push the declaration into class
157 (finish_struct_1): When popping the class, pop the bindings too.
158 Remove check for data member/function member conflict.
159 (finish_struct): Remove calls to
160 check_member_decl_is_same_in_complete_scope. Change calls to
162 (pushclass): Clear names_used in the class stack entry.
163 Use invalidate_class_lookup_cache to remove cached entries, rather
164 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
165 before entering a new class. Remove dead code. Don't mess with
166 current_function_decl when pushing declarations.
167 (invalidate_class_lookup_cache): New function, split out from ...
168 (popclass): Here. Clean up names_used on our way out.
169 (instantiate_type): Adjust.
170 (build_self_reference): Don't push the declaration here.
171 (maybe_note_name_used_in_class): New function.
172 (note_name_declared_in_class): Likewise.
173 * decl.c (add_binding): Change prototype.
174 (find_class_binding_level): New function.
175 (innermost_nonclass_level): Likewise.
176 (current_binding_level): Update documentation.
177 (inner_binding_level): Remove. Replace with current_binding_level
179 (push_binding_level): Remove special handling of
181 (pop_binding_level): Likewise. Use find_class_binding_level.
182 (suspend_binding_level): Likewise.
183 (global_bindings_p): Use innermost_nonclass_level.
184 (toplevel_bindings_p): Likewise.
185 (namespace_bindings_p): Likewise.
186 (pseudo_global_level_p): Likewise.
187 (push_binding): Clear INHERITED_VALUE_BINDING_P.
188 (add_binding): Check for illegal multiple declarations. Return a
189 value indicating whether or not the new binding was legal.
190 (push_local_binding): Skip over class binding levels. Check
191 return value from add_binding.
192 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
193 note_name_declared_in_class.
194 (pushlevel_class): Remove "fake out the rest of the compiler"
196 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
197 (clear_identifier_class_values): New function.
198 (pop_from_top_level): Use it.
199 (pop_everything): Tweak.
200 (maybe_process_template_type_declaration): Don't push the
201 declaration for the template here.
202 (pushtag): Don't push tag declarations into class scope here.
203 (pushdecl): Apply DeMorgan's law for readability.
204 (pushdecl_class_level): Remove special-case code for
205 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
206 (push_class_level_bindng): Deal with inherited bindings.
207 (lookup_name_real): Remove special-case code for
208 TYPE_BEING_DEFINED, and some implicit typename magic.
209 (grokdeclarator): Handle COMPONENT_REF for a template function.
210 (build_enumerator): Don't call pushdecl_class_level here.
211 (id_in_current_class): Remove.
212 * decl2.c (grokfield): Don't call pushdecl_class_level or
213 check_template_shadow.
214 * errfn.c (cp_file_of): Don't declare.
215 (cp_line_of): Likewise.
216 * error.c (dump_decl): Handle an OVERLOAD.
217 (cp_file_of): Likewise.
218 (cp_line_of): Likewise.
219 * init.c (build_member_call): Handle a COMPONENT_REF.
220 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
221 pushdecl_class_level.
222 * method.c (hack_identifier): Build COMPONENT_REFs for references
223 to member templates as well as member functions. Remove dead
225 * parse.y (left_curly): Remove.
226 (nonnested_type): Call maybe_note_name_used_in_class, not
227 pushdecl_class_level.
228 * parse.c: Regenerated.
229 (nested_name_specifier_1): Likewise.
230 * pt.c (check_explicit_specialization): Adjust, for robustness.
231 (check_template_shadow): Handle OVERLOADs.
232 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
233 TEMPLATE_DECL, if appropriate.
234 * search.c (envelope_add_decl): Remove.
235 (dfs_pushdecls): Likewise.
236 (dfs_compress_decls): Likewise.
237 (dfs_push_decls): New function.
238 (dfs_push_type_decls): Likewise.
239 (setup_class_bindings): Likewise.
240 (template_self_reference_p): Likewise.
241 (lookup_field_r): Use it.
242 (looup_member): Remove old comment. Deal with ambiguity.
243 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
244 and remove envelope processing.
245 * semantics.c (begin_class_definition): Let pushclass push
246 declarations for base classes.
247 (finish_member_declaration): Push declarations into class scope.
248 * typeck.c (build_component_ref): Just put an OVERLOAD into the
249 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
250 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
251 * Makefile.in (class.o): Depend on splay-tree.h.
253 Wed Mar 31 11:30:43 BST 1999 Nathan Sidwell <nathan@acm.org>
255 * cvt.c (convert_pointer_to_real): Use same_type_p.
256 * typeck.c (comp_target_types): Use same_type_p.
258 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
260 * semantics.c (begin_inline_definitions,
261 finish_inline_definitions): Rename from finish_default_args and
262 begin_inline_definitions, respectively, to something that isn't a
264 * parse.y (structsp): Adjust.
266 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
267 (list_hash_lookup): Likewise.
268 (hash_tree_chain): Adjust.
269 * pt.c (tsubst): Adjust.
270 (tsubst_arg_types): Use plain hash_tree_cons.
271 * cp-tree.h (hash_tree_cons_simple): Lose.
272 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
274 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
277 * Makefile.in (hash.h): Generate using gperf language 'C', not
278 'KR-C', so gperf uses the `const' keyword on strings.
280 * gxx.gperf (resword): Const-ify a char*.
283 * Makefile.in (hash.h): Generate using gperf language 'C', not
284 'KR-C', so gperf uses the `const' keyword on strings.
289 * gxx.gperf (resword): Const-ify a char*.
292 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
294 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
295 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
296 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
297 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
298 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
299 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
302 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
304 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
306 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
308 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
310 1999-03-27 Mark Mitchell <mark@codesourcery.com>
312 * cp-tree.h (add_friend): Declare.
313 (add_friends): Likewise.
314 * friend.c (add_friend): Make it global. Don't add to
315 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
316 (add_friends): Make it global.
317 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
318 befriending class is a template.
319 * parse.y (component_decl_1): Fix typo in comment.
320 * parse.c: Regenerated.
321 * pt.c (instantiate_class_template): Use add_friend and
322 add_friends rather that duplicating some of their functionality
325 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
327 * call.c (build_field_call): Unify 'this' and non-'this' cases.
329 * typeck.c (build_indirect_ref): Check for 'this' sooner.
331 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
333 * call.c (op_error): Const-ify a char*.
334 (add_candidate, source_type, add_warning): Add static prototype.
335 (print_z_candidates): Const-ify a char*.
337 * class.c (resolve_address_of_overloaded_function,
338 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
339 (get_vtable_name, finish_struct_1): Const-ify a char*.
341 * cvt.c (convert_to_reference): Likewise.
343 * decl.c (redeclaration_error_message, record_builtin_type,
344 record_unknown_type, member_function_or_else, bad_specifiers):
346 (find_binding, select_decl, unqualified_namespace_lookup,
347 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
348 Add static prototype.
349 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
350 implicitly_declare, record_builtin_java_type, define_function,
351 grok_op_properties, tag_name): Const-ify a char*.
353 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
354 (define_function, finish_builtin_type): Const-ify a char*.
355 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
356 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
357 (file_name_nondirectory): Const-ify a char*.
358 (init_filename_times): Don't prototype.
359 (compiler_error): Prototype.
360 (yyerror, init_repo): Const-ify a char*.
361 (build_srcloc): Don't prototype.
362 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
364 (warn_for_assignment): Don't prototype.
365 (convert_for_initialization, readonly_error, check_for_new_type,
366 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
369 * decl2.c (acceptable_java_type, output_vtable_inherit,
370 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
371 merge_functions, decl_namespace, validate_nonmember_using_decl,
372 do_nonmember_using_decl): Add static prototype.
373 (lang_f_options): Const-ify a char*.
374 (finish_builtin_type): Likewise.
375 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
378 * errfn.c: Include cp-tree.h.
379 (cp_thing): Add static prototype.
380 (compiler_error): Don't protoptype.
381 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
382 passing it to `cp_thing'.
384 * error.c (interesting_scope_p): Add static prototype.
386 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
389 * init.c (compiler_error): Don't prototype.
390 (member_init_ok_or_else): Const-ify a char*.
391 (build_java_class_ref): Add static prototype.
393 * lex.c (compiler_error): Don't prototype.
394 (get_time_identifier, interface_strcmp, extend_token_buffer,
395 handle_cp_pragma): Const-ify a char*.
396 (is_global, init_filename_times): Add static prototype.
397 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
398 (compiler_error): Change from fixed args to variable args.
399 (yyerror): Const-ify a char*.
401 * parse.y (cond_stmt_keyword): Const-ify a char*.
402 (parse_decl): Add static prototype.
404 * pt.c (template_args_equal, print_template_context): Likewise.
405 (print_candidates, check_default_tmpl_args): Const-ify a char*.
406 (instantiate_class_template): Likewise.
408 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
410 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
411 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
413 * search.c (lookup_field_info, lookup_member): Likewise.
414 (lookup_member): Cast the first argument of `bzero' to a PTR.
416 * sig.c (compiler_error): Don't prototype.
417 (build_signature_pointer_or_reference_nam): Const-ify a char*.
418 (get_sigtable_name, build_member_function_pointer): Likewise.
420 * tree.c (compiler_error): Don't prototype.
421 (no_linkage_helper, build_srcloc): Add static prototype.
422 (build_vbase_pointer_fields): Const-ify a char*.
423 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
425 * typeck.c (compiler_error): Don't prototype.
426 (convert_for_assignment): Const-ify a char*.
427 (comp_cv_target_types): Add static prototype.
428 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
429 build_component_addr, build_unary_op, convert_for_initialization):
432 * typeck2.c (ack): Add static prototype and change from fixed args
434 (readonly_error, check_for_new_type): Const-ify a char*.
436 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
437 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
438 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
439 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
440 gen_assign, GNU_xref_member): Const-ify a char*.
442 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
444 * gxxint.texi: Remove old discussion on copying virtual bases.
446 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
448 * Make-lang.in: Remove all references to g++.o/g++.c.
451 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
453 * decl2.c (comdat_linkage): Treat vtables like functions.
455 1999-03-25 Mark Mitchell <mark@codesourcery.com>
457 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
459 1999-03-25 Nathan Sidwell <nathan@acm.org>
461 * decl.c (init_decl_processing): Add `signed' type as a synonym
464 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
466 * typeck.c (common_type): Handle cv-qual unification for pointers
469 * decl.c (unqualified_namespace_lookup): Return error_mark_node
471 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
472 * lex.c (do_identifier): If we got error_mark_node, call
475 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
477 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
480 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
482 * decl.c (lookup_name_real): Do nested field lookup regardless of
485 1999-03-24 Mark Mitchell <mark@codesourcery.com>
487 * cp-tree.h (lang_type): Remove has_assignment and
488 has_real_assignment. Add befriending_classes.
489 (TYPE_HAS_ASSIGNMENT): Remove.
490 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
491 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
492 (lang_decl): Document.
493 (DECL_BEFRIENDING_CLASSES): New macro.
494 (FRIEND_NAME): Move declaration to more obvious location.
495 (FRIEND_DECLS): Likewise.
496 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
497 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
498 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
499 (grok_op_properties): Likewise.
500 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
501 (add_friend): Likewise. Don't do weird things with assignment
502 operators. Update DECL_BEFRIENDING_CLASSES.
503 (add_friends): Don't do weird things with assignment operators.
504 (make_friend_class): Likewise. Update
505 CLASSTYPE_BEFRIENDING_CLASSES.
506 * pt.c (instantiate_class_template): Don't set
508 (tsubst_copy): Substitute the TREE_TYPE for more unary
510 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
511 * search.c (protected_accessible_p): New function.
512 (friend_accessible_p): Likewise.
513 (accessible_p): Use them.
515 1999-03-23 Mark Mitchell <mark@codesourcery.com>
517 * pt.c (convert_nontype_argument): Don't create things that aren't
518 PTRMEM_CSTs when applying a qualification conversion to a
521 1999-03-23 Mark Mitchell <mark@codesourcery.com>
523 * Makefile.in (OBJS): Don't mention hash.o.
526 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
528 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
529 * decl.c (expand_static_init): Make sure we don't add any after
532 * decl.c (cp_finish_decl): Move intelligence about handling
533 DECL_COMDAT for variables from here...
534 * decl2.c (comdat_linkage): ...to here.
535 (maybe_make_one_only): Tweak.
536 (import_export_decl): Call comdat_linkage for variables, too.
537 (finish_file): Handle template statics properly.
539 1999-03-22 Mark Mitchell <mark@codesourcery.com>
541 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
542 Document internals of pointer-to-member-functions.
543 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
544 (PFN_FROM_PTRMEMFUNC): Likewise.
545 (build_type_conversion): Remove unused parameter.
546 (build_ptrmemfunc1): Declare.
547 (expand_ptrmemfunc_cst): New function.
548 (delta2_from_ptrmemfunc): Likewise.
549 (pfn_from_ptrmemfunc): Likewise.
550 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
551 build_type_conversion. Use TYPE_PTRMEM_P for readability.
552 (convert_to_reference): Remove unused parameter to
553 build_type_conversion.
554 (ocp_convert): Likewise.
555 (build_user_type_conversion): Likewise.
556 * error.c (dump_expr): Handle NULL pointer-to-member functions.
557 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
558 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
559 open when handling pointer-to-member functions.
560 * pt.c (convert_nontype_argument): Clean up error messages. Be
561 more stringent with pointers-to-members.
562 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
563 (build_unary_op): Tidy ever-so-slightly.
564 (build_conditional_expr): Remove extra parameter to
565 build_type_conversion.
566 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
568 (expand_ptrmemfunc_cst): Define.
569 (delta2_from_ptrmemfunc): Likewise.
570 (pfn_from_ptrmemfunc): Likewise.
572 1999-03-19 Mark Mitchell <mark@codesourcery.com>
574 * init.c (build_member_call): Handle template-id expressions
576 * typeck.c (build_x_function_call): Likewise.
578 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
580 * friend.c (make_friend_class): Avoid core dump when
581 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
583 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
585 * decl.c (start_function): Suppress normal linkage heuristics
586 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
588 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
590 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
591 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
593 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
595 * parse.y (named_complex_class_head_sans_basetype):
596 Do not push a scope for error_mark_node.
597 (maybe_base_class_list): Likewise.
599 * decl.c (start_decl): Check for error_mark_node as a type.
600 Detected by g++.brendan/array-refs.C.
601 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
602 (maybe_build_cleanup_1): Likewise. Detected by
603 g++.jason/incomplete1.C.
605 * tree.c (build_dummy_object): Use void_zero_node instead of the
607 (is_dummy_object): Check for such a node.
608 Detected by g++.bob/inherit1.C
610 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
612 * method.c (old_backref_index): Split out...
613 (flush_repeats): From here. Rename back from try_old_backref.
614 (build_mangled_name): Put back some old-style repeat handling.
616 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
618 * lex.c: Don't include setjmp.h.
619 (parse_float): New static function.
620 (pf_args): New struct.
621 (real_yylex): Use them in call to `do_float_handler'.
623 1999-03-15 Mark Mitchell <mark@markmitchell.com>
625 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
626 * tree.c (layout_basetypes): Not here.
627 * search.c (dfs_search): Remove; no longer used.
629 1999-03-12 Mark Mitchell <mark@markmitchell.com>
631 * decl2.c (validate_nonmember_using_decl): Issue sensible
632 error-messages on bogus qualifiers.
634 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
636 * call.c (add_function_candidate): Fix uninitialized variable.
638 * Makefile.in (search.o): Add dependency on varray.h.
640 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
642 * decl.c (duplicate_decls): Use same_type_p.
643 * method.c (try_old_backref): Renamed from flush_repeats. Use
644 same_type_p. Don't try to handle repeats. Return success.
645 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
646 calls from old-style code, too.
647 (check_ktype): Use same_type_p.
648 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
649 (build_qualified_name): Simplify logic.
650 (process_overload_item): Strip typedefs and quals at the top.
651 (build_mangled_name_for_type_with_Gcode): Remove call to
652 type_canonical_variant.
653 (build_mangled_name): Likewise. Remove support for old-style
654 repeats, which have been disabled since 2.7.2. Don't mess with
656 (build_decl_overload_real): Don't mess with TREE_USED.
658 1999-03-13 Nathan Sidwell <nathan@acm.org>
660 * error.c (cp_printers): Add 'F' escape character.
661 (dump_type_real): Remove TREE_LIST (fnargs) printing.
662 Functionality moved to dump_parameters.
663 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
664 (dump_function_decl): Extend meaning of V parameter. Use
665 dump_parameters and dump_exception_spec.
666 (dump_parameters): New static function.
667 (dump_exception_spec): New static function.
668 (fndecl_as_string): Change argument semantics. Use
669 dump_function_decl directly.
671 * sig.c (build_signature_table_constructor): Use cp_error.
673 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
675 * semantics.c (finish_switch_cond): Handle error cases gracefully.
676 Detected by g++.law/enum5.C.
678 * typeck.c (build_modify_expr): Check for errors after resolving
679 offsets. Detected by g++.brendan/static1.C.
681 * decl.c (complete_array_type): Ignore initial_value if it is an
682 error. Detected by g++.benjamin/17930.C.
684 * typeck2.c (process_init_constructor): Return error if one argument
685 is in error. Detected by g++.benjamin/13478.C.
687 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
689 * decl.c (select_decl): Allow class templates when we need types.
690 * decl2.c (ambiguous_decl): Likewise.
692 1999-03-12 Mark Mitchell <mark@markmitchell.com>
694 * lex.c (do_identifier): Correct call to enforce_access.
695 * search.c (accessible_p): Tweak comment.
697 1999-03-10 Mark Mitchell <mark@markmitchell.com>
699 * semantics.c (begin_class_definition): Call build_self_reference.
700 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
702 * search.c (assert_canonical_unmarked): Fix typo in prototype.
704 * search.c (dfs_canonical_queue): New function.
705 (dfs_assert_unmarked_p): Likewise.
706 (assert_canonical_unmarked): Likewise.
707 (access_in_type): Use it.
708 (accessible_p): Likewise. Walk the whole tree when umarking.
710 * sig.c (build_signature_table_constructor): Use accessible_p
711 instead of compute_access.
713 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
715 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
717 1999-03-09 Mark Mitchell <mark@markmitchell.com>
719 * cp-tree.h (flag_access_control): Declare.
720 (TREE_VIA_PPUBLIC): Document.
721 (DECL_NONSTATIC_MEMBER_P): New macro.
722 (enforce_access): Return an indication of whether or not access
724 (build_self_reference): Change prototype.
725 (compute_access): Replace with ...
726 (accessible_p): New function.
727 (dfs_walk): Change prototype.
728 (dfs_unmark): Likewise.
730 * call.c (enforce_access): Use accessible_p.
731 * class.c (build_self_reference): Insert the declaration into the
732 list of members for this type, and make it public.
733 * decl.c (xref_basetypes): Avoid ill-timed recursion.
734 * init.c (build_offset_ref): Use lookup_member, not three separate
735 name-lookups. Call enforce_access rather than checking for
736 illegal accesses here.
737 (resolve_offset_ref): Likewise.
738 * lex.c (do_identifier): Likewise.
739 * method.c (hack_identifier): Likewise.
740 * parse.y (self_reference): Remove.
741 (opt_component_decl_list): Don't use it.
742 * parse.c: Regenerated.
743 * pt.c (print_candidates): Generalize to handle lists of
744 overloaded functions.
745 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
747 (get_template_base): Use new calling convention for dfs_walk.
748 * search.c: Include varray.h. Add prototypes.
749 (dfs_walk): Accept a data pointer to pass to the work functions.
750 All callers changed. All work functions changed.
751 (breadth_first_search): Rename to bfs_walk, and make consistent
753 (dfs_walk_real): New function.
754 (canonical_binfo): New function.
755 (context_for_name_lookup): Likewise.
756 (shared_marked_p): Likewise.
757 (shared_unmarked_p): Likewise.
758 (lokup_field_queue_p): Likewise.
759 (lookup_field_r): Generalize to handle both functions and fields.
760 (lookup_field): Just call lookup_member.
761 (lookup_fnfields): Likewise.
762 (lookup_member): Move body of lookup_field here and generalize.
763 (dfs_accessible_queue_p): Likewise.
764 (dfs_accessible_p): Likewise.
765 (dfs_access_in_type): Likewise.
766 (access_in_type): Likewise.
767 (compute_access): Remove, and replace with ...
768 (accessible_p): New function.
769 (vbase_types): Remove.
770 (vbase_decl_ptr_intermediate): Likewise.
771 (vbase_decl_ptr): Likewise.
772 (vbase_init_result): Likewise.
773 (closed_envelopes): Likewise.
776 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
778 * call.c (add_function_candidate): Check for proper number of args
779 before checking the validity of those args.
781 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
783 * cp-tree.h (struct lang_type): Add anon_union field.
784 (ANON_UNION_TYPE_P): Use it instead of examining type.
785 (SET_ANON_UNION_TYPE_P): New macro.
786 * decl.c (check_tag_decl): Use it.
788 * search.c (compute_access): Handle non-type contexts earlier, and
791 * tree.c (build_exception_variant): Use copy_to_permanent.
793 * decl2.c (setup_initp): Give statics with no priority the default
795 (do_dtors, do_ctors, finish_file): Remove special handling of
796 non-prioritized statics.
798 1999-03-05 Mark Mitchell <mark@markmitchell.com>
800 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
801 * decl.c (make_typename_type): Don't issue an error if an
802 immediate lookup fails; it migt be resolved later.
803 * friend.c (is_friend): Add comment.
804 * search.c (breadth_first_search): Add POSTFN and DATA
805 parameters. Tidy. All callers changed.
806 (lookup_field_queue_p): New function.
807 (lookup_field_r): Likewise.
808 (lookup_field_post): Likewise.
809 (lookup_field): Use them, via breadth_first_search, instead of
811 (compute_access): Robustify.
812 (lookup_fnfield_info): New structure.
814 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
816 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
818 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
820 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
823 * decl2.c (import_export_class): Also return if
824 CLASSTYPE_INTERFACE_ONLY is set.
826 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
828 * decl.c (push_overloaded_decl): Only overwrite the old binding if
830 * decl2.c (do_local_using_decl): Fix loop termination.
832 1999-03-02 Mark Mitchell <mark@markmitchell.com>
834 * cp-tree.h (determine_specialization): Don't declare.
835 * pt.c (determine_specialization): Make it static. Eliminate
836 complain parameter. Note that decl is always non-NULL now, and
837 simplify accordingly.
839 * decl.c (maybe_push_to_top_level): Always call
840 push_cp_function_context.
841 (pop_from_top_level): Always call pop_cp_function_context.
843 1999-02-26 Nathan Sidwell <nathan@acm.org>
845 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
847 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
848 * init.c (build_new_1): Extra arg to complete_type_or_else.
849 (build_delete): Likewise.
850 * typeck.c (require_complete_type): Likewise.
851 (pointer_int_sum): Likewise.
852 (pointer_diff): Likewise.
853 (build_component_ref): Likewise.
855 * typeck2.c (incomplete_type_error): Always use cp_error.
856 Show declaration of undefined type, if appropriate.
857 Deal with UNKNOWN_TYPE nodes.
859 * typeck.c (require_complete_type): Use TYPE_SIZE as
860 size_zero_node to mean incomplete type.
861 (require_complete_type_in_void): New function.
862 (build_compound_expr): Call complete_type_in_void for LHS.
863 (build_c_cast): Call complete_type_in_void for void cast.
864 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
865 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
866 require_complete_type_in_void. Call it.
867 * cp-tree.h (require_complete_type_in_void): Prototype new function.
869 * typeck.c (convert_arguments): Use alternative format for
870 function decls. Don't require_complete_type here. Simplify
872 (convert_for_initialization): Don't require_complete_type on RHS yet.
873 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
875 * call.c (build_over_call): Cope with qualified void return type.
876 * semantics.c (finish_call_expr): Likewise.
877 * typeck.c (build_function_call_real): Likewise.
878 (c_expand_return): Likewise.
879 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
881 * call.c (print_z_candidates): Use alternate print format, to be
882 consistent with (pt.c) print_candidates.
883 * method.c (hack_identifier): List candidate members.
884 * search.c (lookup_field): Build ambiguous list, and show it, if
887 1999-02-26 Mark Mitchell <mark@markmitchell.com>
889 * typeck.c (decay_conversion): Don't confuse constant array
890 variables with their initializers.
892 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
894 * pt.c (regenerate_decl_from_template): Tweak for clarity.
895 (instantiate_decl): Mark a decl instantiated before regenerating
896 it to avoid recursion.
897 * tree.c (mapcar): Don't call decl_constant_value unless we know
898 something is TREE_READONLY_DECL_P.
900 * class.c (check_for_override): Don't stop checking when we find
901 the first overridden function. Delete #if 0'd code.
902 * search.c (get_matching_virtual): Likewise.
904 1999-02-25 Richard Henderson <rth@cygnus.com>
906 * lang-specs.h: Define __FAST_MATH__ when appropriate.
908 1999-02-24 Mike Stump <mrs@wrs.com>
910 * typeck.c (convert_for_assignment): Allow boolean integral constant
911 expressions to convert to null pointer.
913 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
915 * decl.c (lookup_namespace_name): Resolve namespace aliases.
917 * class.c (push_nested_class): Allow namespaces.
919 * decl2.c (set_decl_namespace): Add friendp parameter.
920 * decl.c (grokfndecl): Pass it.
921 (grokvardecl): Likewise.
922 * cp-tree.h: Change declaration.
924 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
926 * pt.c (tsubst): Allow an array of explicit size zero.
928 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
930 * errfn.c: Change varargs code to look like toplev.c.
932 * method.c (process_modifiers): Don't prepend 'U' for char or
935 1999-02-20 Craig Burley <craig@jcb-sc.com>
937 * Make-lang.in (cplib2.ready): Don't consider updating
938 cplib2 stuff if the current directory isn't writable, as
939 it won't work (such as during a `make install').
941 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
943 * decl2.c (start_objects): Make file scope constructors and
944 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
945 ASM_OUTPUT_DESTRUCTOR are defined.
947 1999-02-19 Mark Mitchell <mark@markmitchell.com>
949 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
950 (fn_type_unification): Adjust prototype.
951 (lookup_fnfields_1): Declare.
952 * call.c (add_template_candidate_real): Adjust call to
954 * class.c (add_method): Don't allow duplicate declarations of
955 constructors or destructors.
956 (resolve_address_of_overloaded_function): Remove unused variable.
957 Adjust call to fn_type_unification.
958 * decl.c (grokfndecl): Be more robust in the face of illegal
960 * decl2.c (check_classfn): Remove hokey handling of member
962 * pt.c (determine_specialization): Improve comments. Adjust to
963 handle template argument deduction as per the standard.
964 (check_explicit_specialization): Fix comment spacing. Handle
965 type-conversion operators correctly. Improve error-recovery.
966 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
967 (get_bindings_real): Simplify handling of static members.
968 * search.c (lookup_fnfields_1): Make it have external linkage.
969 * typeck.c (compparms): Fix comment.
970 (build_unary_op): Don't try to figure out which template
971 specialization is being referred to when when the address-of
972 operator is used with a template function.
974 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
976 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
977 keyword to match an analogous change at the top level.
979 * tree.c (lvalue_or_else): Likewise.
981 1999-02-17 Mark Mitchell <mark@markmitchell.com>
983 * decl.c (xref_basetypes): Comment.
984 * pt.c (instantiate_class_template): Use xref_basetypes.
986 1999-02-16 Mark Mitchell <mark@markmitchell.com>
988 * cp-tree.h (tsubst): Change prototype.
989 (tsubst_expr): Likewise.
990 (tsubst_copy): Likewise.
991 (type_unification): Remove prototype.
992 * call.c (convert_default_arg): Adjust call to tsubst_expr.
993 * class.c (resolve_address_of_overloaded_function): Just use
995 * decl.c (grokdeclarator): Adjust call to tsubst.
996 * method.c (build_template_parm_names): Likewise.
997 * pt.c (GTB_VIA_VIRTUAL): New macro.
998 (GTB_IGNORE_TYPE): Likewise.
999 (resolve_overloaded_unification): Add `complain' parameter.
1000 (try_one_overload): Likewise.
1001 (tsubst_template_arg_vector): Likewise.
1002 (tsubst_template_parms): Likewise.
1003 (tsubst_aggr_type): Likewise.
1004 (tsubst_arg_types): Likewise.
1005 (tsubst_call_declarator_parms): Likewise.
1006 (unify): Remove explicit_mask.
1007 (type_unification_real): Likewise.
1008 (get_template_base_recursive): Likewise.
1009 (coerce_template_template_parms): Provide prototype.
1010 (tsubst_function_type): Likewise.
1011 (try_class_unification): New function.
1012 All callers changed to use new complain parameter.
1013 (get_template_base): Use try_class_unification.
1014 (unify): Adjust handling of classes derived from template types.
1015 (fn_type_unification): Substitute explicit arguments before
1018 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1020 * decl.c (pushdecl): Remove dead code.
1022 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
1024 * decl2.c (finish_objects): Fix code I missed in previous change.
1026 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
1028 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
1029 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
1031 * pt.c (maybe_process_partial_specialization): Complain about
1032 'template <>' on non-specialization.
1034 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
1036 * decl.c (grokdeclarator): Catch wierd declarators.
1037 * decl2.c (finish_file): Don't abort because of namespace parsing
1039 (check_decl_namespace): Remove.
1041 1999-02-09 Mark Mitchell <mark@markmitchell.com>
1043 * cp-tree.h (get_template_base): Don't declare.
1044 (dfs_walk): Declare.
1045 (dfs_unmark): Likewise.
1046 (markedp): Likewise.
1047 * pt.c (unify): Remove duplicate declaration. Pass tparms and
1048 targs to get_template_base.
1049 (get_template_base_recursive): Move here from search.c. Check to
1050 see that the base found can be instantiated to form the desired
1052 (get_template_base): Likewise.
1053 (get_class_bindings): Simplify.
1054 * search.c (get_template_base_recursive): Move to pt.c.
1055 (get_template_base): Likewise.
1056 (markedp): Make it global.
1057 (dfs_walk): Likewise.
1058 (dfs_unmark): Likewise.
1060 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
1062 * pt.c (maybe_process_partial_specialization): Complain about
1063 specialization in wrong namespace.
1064 * tree.c (decl_namespace_context): New fn.
1066 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1068 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
1069 * pt.c (coerce_template_template_parms): Handle nested
1070 template template parameters.
1072 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
1074 * typeck2.c: Update email addresses.
1076 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1078 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
1081 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
1083 * lex.c (retrofit_lang_decl): Split out...
1084 (build_lang_decl): From here.
1085 * decl.c (pushdecl): Call it for functions generated by the middle
1086 end that don't have DECL_LANG_SPECIFIC.
1087 * cp-tree.h: Declare it.
1089 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
1090 (start_objects, finish_objects): Only use special
1091 init_priority code if the user specified a priority.
1092 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
1095 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
1097 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
1098 mkstemp.o. Get them from libiberty now.
1099 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
1101 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1103 * decl2.c (lang_decode_option): Use read_integral_parameter.
1105 1999-02-01 Mark Mitchell <mark@markmitchell.com>
1107 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
1108 before calling complete_type_or_else.
1110 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1112 * input.c (inline): Don't define, its handled by system.h.
1114 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
1116 * decl2.c: Don't define flag_no_ident here. Don't process
1118 * cp-tree.h: Don't declare flag_no_ident here.
1119 * lang-specs.h: Map -Qn to -fno-ident.
1121 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
1123 * cp-tree.h (struct tree_binding): Replace scope field with a union.
1124 (BINDING_SCOPE): Adjust.
1125 * decl.c (BINDING_LEVEL): Adjust.
1127 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
1129 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
1132 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
1135 * tree.c (equal_functions): Fix name in prototype.
1137 * decl.c (push_local_binding): Add FLAGS argument.
1138 (pushdecl, push_overloaded_decl): Pass it.
1139 * decl2.c (do_local_using_decl): Likewise.
1140 * cp-tree.h: Adjust prototype.
1141 * decl.c (poplevel): Fix logic.
1143 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
1144 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
1145 (cat_namespace_levels): Don't loop forever.
1147 1999-01-25 Richard Henderson <rth@cygnus.com>
1149 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
1151 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
1153 * class.c (resolve_address_of_overloaded_function): Mark the
1154 chosen function used.
1156 * call.c (build_call): Make sure that a function coming in has
1157 been marked used already.
1158 * decl.c (expand_static_init): Call mark_used instead of
1160 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
1161 alloc_eh_object, expand_throw): Likewise.
1162 * init.c (build_builtin_delete_call): Likewise.
1163 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
1164 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
1165 expand_generic_desc): Likewise.
1167 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
1169 * tree.c (equal_functions): New function.
1170 (ovl_member): Call it.
1172 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
1174 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
1176 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
1178 * decl.c (decls_match): Return 1 if old and new are identical.
1179 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
1181 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
1183 * decl.c (start_function): Make member functions one_only on windows.
1184 * decl2.c (import_export_decl): Likewise.
1186 * decl.c (grokdeclarator): Don't complain about implicit int in
1187 a system header. Change same-name field check to not complain in
1188 a system header instead of within extern "C".
1190 1999-01-21 Mark Mitchell <mark@markmitchell.com>
1192 * cp-tree.h (PUSH_GLOBAL): New macro.
1193 (PUSH_LOCAL): Likewise.
1194 (PUSH_USING): Likewise.
1195 (namespace_bindings_p): Declare.
1196 (push_overloaded_decl): Likewise.
1197 * decl.c (push_overloaded_decl): Don't make it static. Check for
1198 illegal declarations after using declarations here.
1199 (namespace_bindings_p): Likewise.
1200 (duplicate_decls): Don't consider declarations from different
1201 namespaces to be the same.
1202 (pushdecl): Use symbolic PUSH_ constants in calls to
1203 push_overloaded_decl.
1204 (push_overloaded_decl_1): Likewise.
1205 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
1206 (do_nonmember_using_decl): Check for illegal using declarations
1207 after ordinary declarations here.
1208 (do_local_using_decl): Call pushdecl to insert declarations.
1210 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
1212 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
1214 1999-01-21 Mark Mitchell <mark@markmitchell.com>
1216 * tree.c (build_cplus_array_type_1): Don't call build_array_type
1217 for types involving template parameters.
1219 * cp-tree.h (PARM_DECL_EXPR): Delete.
1220 (convert_default_arg): Change prototype.
1221 (check_default_argument): Declare.
1222 (search_tree): Likewise.
1223 * call.c (convert_default_arg): Take the function to which the
1224 default argument belongs as a parameter, and do any necessary
1225 instantiation here, instead of ...
1226 (build_over_call): Here.
1227 * decl.c (local_variable_p): New function.
1228 (check_default_argument): Likewise, split out and tidied from ...
1230 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
1231 * pt.c (tsubst_call_declarator_parms): New function.
1232 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
1233 with CALL_EXPRs, rather than trying to be clever.
1234 (tsubst): Use tsubst_call_declarator_parms.
1235 * tree.c (search_tree): Don't make it static.
1236 * typeck.c (convert_arguments): Use new interface to
1237 convert_default_arg.
1239 1999-01-20 Mark Mitchell <mark@markmitchell.com>
1241 * error.c (dump_function_decl): Don't print the argument types for
1242 a function when the verbosity level is negative.
1244 * call.c (build_over_call): Check format attributes at call-time.
1246 * pt.c (tsubst_copy): Fix comment.
1247 (unify): Don't allow unification with variable-sized arrays.
1249 * semantics.c (finish_stmt_expr): When processing a template make
1250 the BIND_EXPR long-lived.
1252 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
1254 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
1255 (import_export_vtable): Not here.
1257 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
1259 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
1260 non-static member function.
1262 1999-01-18 Nathan Sidwell <nathan@acm.org>
1264 * class.c (instantiate_type): Only diagnose illegal address of member
1265 function if complaining.
1267 * decl.c (lookup_name_real): Remove duplicate code.
1269 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
1271 * tree.c (copy_template_template_parm): Use permanent_obstack.
1273 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1275 * pt.c (unify): Remove restrictions on deduction of argument
1276 of template template parameters.
1278 1999-01-18 Nathan Sidwell <nathan@acm.org>
1280 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
1282 * class.c (resolve_address_of_overloaded_function): Show list of
1283 all candidates, when none of them match.
1285 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
1287 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
1288 definition of 'casting away const' in reinterpret_cast<>.
1290 1999-01-18 Graham <grahams@rcp.co.uk>
1292 * cvt.c: Add include for decl.h, remove extern for
1293 static_aggregates which is now provided by decl.h.
1295 * Makefile.in (cvt.o): Add dependency for decl.h and missing
1296 dependencies for convert.h and flags.h.
1298 1999-01-18 Nathan Sidwell <nathan@acm.org>
1300 * decl2.c (do_dtors): Set current location to that of the
1301 decl, for sensible diagnostics and debugging.
1302 (check_classfn): Issue `incomplete type' error, if
1303 class is not defined.
1305 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
1307 * cp-tree.h: Add prototype for bound_pmf_p.
1309 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
1310 Manfred Hollstein <manfred@s-direktnet.de>
1312 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
1315 1999-01-16 Nathan Sidwell <nathan@acm.org>
1317 * cp-tree.h (struct lang_type): Added has_mutable flag.
1318 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
1319 (TYPE_HAS_MUTABLE_P): New macro to read it.
1320 (cp_has_mutable_p): Prototype for new function.
1321 * class.c (finish_struct_1): Set has_mutable from members.
1322 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
1323 it contains a mutable.
1324 * typeck.c (cp_has_mutable_p): New function.
1326 1999-01-15 Mark Mitchell <mark@markmitchell.com>
1328 * pt.c (process_template_parm): Ignore top-level qualifiers on
1329 non-type parameters.
1331 * decl.c (start_function): Use current_function_parms in the call
1332 to require_complete_type_for_parms, not the probably empty
1335 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
1337 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
1339 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
1340 that we don't suppress the other copies.
1341 * lex.c (handle_cp_pragma): Likewise.
1343 1999-01-13 Mark Mitchell <mark@markmitchell.com>
1345 * decl.c (grokdeclarator): Undo 1998-12-14 change.
1346 * tree.c (build_cplus_array_type_1): Likewise.
1347 * pt.c (instantiate_class_template): Remove misleading comment.
1348 (tsubst_aggr_type): Substitute if there are template parameters,
1349 regardless of whether or not they use template arguments.
1350 (unify): Likewise, but for unification.
1352 1999-01-12 Richard Henderson <rth@cygnus.com>
1354 * cp-tree.h (flag_permissive): Declare extern.
1356 1999-01-06 Mark Mitchell <mark@markmitchell.com>
1358 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
1360 (lang_type): Add is_partial_instantiation. Decrease width of
1362 (PARTIAL_INSTANTIATION_P): New macro.
1363 (OPERATOR_TYPENAME_P): Remove.
1364 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
1365 OPERATOR_TYPENAME_P.
1366 (grok_op_properties): Likewise.
1367 * friend.c (do_friend): Handle friends that are member functions
1369 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
1370 * pt.c (instantiate_class_template): Rework for clarity. Avoid
1371 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
1372 any more partial instantiation than is absolutely necessary for
1373 implicit typename. Set PARTIAL_INSTANTIATION_P.
1374 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
1375 * semantics.c (begin_class_definition): Handle partial
1376 specializations of a type that was previously partially
1379 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
1381 * g++spec.c (LIBSTDCXX): Provide default definition.
1382 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
1384 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1386 * Make-lang.in (g++.o): Depend on prefix.h.
1388 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
1390 * tree.c (bound_pmf_p): New fn.
1391 * typeck.c (build_c_cast): Use it.
1393 * decl.c (grok_op_properties): Use same_type_p.
1395 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1397 * Makefile.in (cvt.o): Depend on toplev.h.
1399 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
1401 * cvt.c: Include toplev.h.
1403 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
1406 * init.c (expand_vec_init): Initialize variable `itype'.
1408 * lex.c (yyerror): Cast the argument passed to a ctype function to
1411 * method.c (build_mangled_C9x_name): Wrap prototype and definition
1412 in "HOST_BITS_PER_WIDE_INT >= 64".
1414 * typeck.c (build_binary_op): Mark parameter `convert_p' with
1417 1998-12-22 Mark Mitchell <mark@markmitchell.com>
1419 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
1420 * tree.c (build_exception_variant): Don't crash on empty throw
1423 1998-12-18 DJ Delorie <dj@cygnus.com>
1425 * cvt.c (convert_to_reference): Check for both error_mark_node
1426 and NULL_NODE after call to convert_for_initialization.
1428 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
1430 * error.c (interesting_scope_p): New fn.
1431 (dump_simple_decl): Use it.
1432 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
1433 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
1435 1998-12-16 Mark Mitchell <mark@markmitchell.com>
1437 * class.c (resolve_address_of_overloaded_function): Do conversion
1438 to correct type here, rather than ...
1439 (instantiate_type): Here.
1441 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
1442 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
1443 (decl_template_parm_p): Remove.
1444 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
1446 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
1447 * pt.c (push_inline_template_parms_recursive): Set it.
1448 (decl_template_parm_p): Remove.
1449 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
1450 (process_template_parm): Set it.
1452 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
1454 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
1455 if configured with cpplib.
1457 1998-12-15 Mark Mitchell <mark@markmitchell.com>
1459 * decl.c (poplevel): Make sure ns_binding is initialized.
1461 * decl.c (finish_function): Undo inadvertent change in previous
1464 1998-12-14 Mark Mitchell <mark@markmitchell.com>
1466 * class.c (pushclass): Tweak handling of class-level bindings.
1467 (resolve_address_of_overloaded_function): Update pointer-to-member
1469 (instantiate_type): Likewise.
1470 * cvt.c (cp_convert_to_pointer): Likewise.
1471 * decl.c (pop_binding): Take the DECL to pop, not just the name.
1472 Deal with `struct stat' hack.
1473 (binding_level): Add to documentation.
1474 (push_binding): Clear BINDING_TYPE.
1475 (add_binding): New function.
1476 (push_local_binding): Use it.
1477 (push_class_binding): Likewise.
1478 (poplevel): Adjust calls to pop_binding.
1479 (poplevel_class): Likewise.
1480 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
1481 declarations to current binding level.
1482 (push_class_level_binding): Likewise.
1483 (push_overloaded_decl): Adjust handling of OVERLOADs in local
1485 (lookup_namespace_name): Don't crash when confronted with a
1487 (lookup_name_real): Do `struct stat' hack in local binding
1489 (build_ptrmemfunc_type): Adjust documentation.
1490 (grokdeclarator): Don't avoid building real array types when
1491 processing templates unless really necessary.
1492 (finish_method): Adjust calls to pop_binding.
1493 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
1494 not reparse_decl_as_expr.
1495 (build_expr_from_tree): Deal with a template-id as the function to
1496 call in a METHOD_CALL_EXPR.
1497 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
1498 (maybe_adjust_types_For_deduction): Don't do peculiar things with
1500 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
1501 pointer-to-member types where necessary.
1502 * tree.c (build_cplus_array_type_1): Don't avoid building real
1503 array types when processing templates unless really necessary.
1504 (build_exception_variant): Compare the exception lists correctly.
1506 1998-12-13 Mark Mitchell <mark@markmitchell.com>
1508 * cp-tree.def (CPLUS_BINDING): Update documentation.
1509 * cp-tree.h (LOCAL_BINDING_P): New macro.
1510 (lang_identifier): Rename local_value to bindings.
1511 (tree_binding): Make `scope' of type `void*', not `tree'.
1512 (BINDING_SCOPE): Update documentation.
1513 (IDENTIFIER_LOCAL_VALUE): Remove.
1514 (IDENTIFIER_CLASS_VALUE): Document.
1515 (IDENTIFIER_BINDING): New macro.
1516 (IDENTIFIER_VALUE): Likewise.
1517 (TIME_IDENTIFIER_TIME): Likewise.
1518 (TIME_IDENTIFIER_FILEINFO): Likewise.
1519 (IMPLICIT_TYPENAME_P): Likewise.
1520 (set_identifier_local_value): Remove.
1521 (push_local_binding): New function.
1522 (push_class_binding): Likewise.
1523 * class.c (pushclass): Update comments; use push_class_binding.
1524 * decl.c (set_identifier_local_value_with_scope): Remove.
1525 (set_identifier_local_value): Likewise.
1526 (push_binding): New function.
1527 (pop_binding): Likewise.
1528 (binding_level): Update documentation. Remove shadowed.
1529 (BINDING_LEVEL): New macro.
1530 (free_binding_nodes): New variable.
1531 (poplevel): Adjust for new name-lookup scheme. Don't mess up
1532 BLOCK_VARs when doing for-scope extension. Remove effectively
1534 (pushlevel_class): Tweak formatting.
1535 (poplevel_class): Adjust for new name-lookup scheme.
1536 (print_binding_level): Likewise.
1537 (store_bindings): Likewise.
1538 (pushdecl): Likewise.
1539 (pushdecl_class_level): Likewise.
1540 (push_class_level_binding): Likewise.
1541 (push_overloaded_decl): Update comments. Adjust for new
1543 (lookup_name_real): Likewise.
1544 (lookup_name_current_level): Likewise.
1545 (cp_finish_decl): Likewise.
1546 (require_complete_types_for_parms): Likewise. Remove misleading
1548 (grok_parms): Likewise. Don't call
1549 require_complete_types_for_parms here.
1550 (grok_ctor_properties): Don't treat templates as copy
1552 (grop_op_properties): Or as assignment operators.
1553 (start_function): Document. Adjust for new name-lookup scheme.
1554 (finish_function): Likewise.
1555 * decl2.c (do_local_using_decl): Use push_local_binding.
1556 * lex.c (begin_definition_of_inclass_inline): New function, split
1558 (do_pending_inlines): Here, and ...
1559 (process_next_inline): Here.
1560 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
1561 (init_filename_times): Likewise.
1562 (extract_interface_info): Likewise.
1563 (ste_typedecl_interface_info): Likewise.
1564 (check_newline): Likewise.
1565 (dump_time_statistics): Likewise.
1566 (handle_cp_pragma): Likewise.
1567 (do_identifier): Adjust for new name-lookup scheme.
1568 * parse.y (function_try_block): Return ctor_initializer_opt value.
1570 (fn.defpen): Pass appropriate values to start_function.
1571 (pending_inline): Use functor_try_block value, and pass
1572 appropriate values to finish_function.
1573 * pt.c (is_member_template): Update documentation; remove handling
1574 of FUNCTION_DECLs. As per name, this function should deal only in
1576 (decl_template_parm_p): Change name of olddecl parameter to decl.
1577 (check_template_shadow): Adjust for new name-lookup scheme.
1578 (lookup_template_class): Likewise.
1579 (tsubst_decl): Tweak so as not to confuse member templates with
1580 copy constructors and assignment operators.
1581 (unify): Handle UNION_TYPEs.
1582 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
1583 (lang_print_xnode): Adjust for new name-lookup scheme.
1584 * typeck.c (mark_addressable): Likewise.
1585 (c_expand_return): Likewise.
1587 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
1589 * decl.c (grokdeclarator): Allow field with same name as class
1592 * decl.c (lookup_name_real): Don't limit field lookup to types.
1593 * class.c (check_member_decl_is_same_in_complete_scope): No error
1594 if icv and x are the same.
1595 * lex.c (do_identifier): Tweak error message.
1597 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1599 * decl.c (start_enum): Use push_obstacks, not
1600 end_temporary_allocation.
1601 (finish_enum): Call pop_obstacks.
1603 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1605 * class.c (instantiate_type): Return error_mark_node rather than
1608 1998-12-09 Mark Mitchell <mark@markmitchell.com>
1610 * cp-tree.h (most_specialized_instantiation): New function.
1611 (print_candidates): Likewise.
1612 * class.c (validate_lhs): Remove.
1613 (resolve_address_of_overloaded_function): New function, split out
1614 and then substantially reworked, from ...
1615 (instantiate_type): Use it. Simplify.
1616 * cvt.c (convert_to_reference): Complain when caller has indicated
1617 that's the right thing to do. Don't crash if instantiate_type
1619 * pt.c: Substitute `parameters' for `paramters' throughout.
1620 (print_candidates): Don't make it static.
1621 (most_specialized_instantiation): Split out from ...
1622 (most_specialized): Here.
1624 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
1626 * lex.c (lang_init_options): Initialize cpplib.
1627 * decl2.c (parse_options,cpp_initialized): Removed.
1628 (lang_decode_option): Move initialization of cpplib to
1631 1998-12-09 Mark Mitchell <mark@markmitchell.com>
1633 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
1634 well as the TYPE_DECL, when a typedef name is assigned to a
1635 previously anonymous type.
1637 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
1639 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
1640 __cp_eh_info for getting the eh info pointer. Add table_index to
1642 (push_eh_cleanup): Don't increment 'handlers' data field.
1643 (process_start_catch_block): Don't set the 'caught' field.
1645 * cp/exception.cc (CP_EH_INFO): New macro for getting the
1646 exception info pointer within library routines.
1647 (__cp_eh_info): Use CP_EH_INFO.
1648 (__start_cp_handler): Get exception info pointer, set caught field,
1649 and increment the handlers field. Avoids this being done by handlers.
1650 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
1651 (uncaught_exception): Use CP_EH_INFO macro.
1653 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
1655 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
1657 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
1659 * lex.c (check_newline): Add support for \ as `natural'
1660 characters in file names in #line to be consistent with #include
1661 handling. We support escape processing in the # 1 "..." version of
1662 the command. See also support in cp/lex.c.
1664 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
1666 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
1669 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
1671 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
1673 * error.c (dump_simple_decl): Also print namespace context.
1674 (dump_function_decl): Likewise.
1676 * decl2.c (ambiguous_decl): Don't print old value if it's
1679 * decl.c (lookup_name_real): Fix handling of local types shadowed
1680 by a non-type decl. Remove obsolete code.
1681 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
1683 * lang-options.h: Add -fpermissive.
1684 * decl2.c: Likewise.
1685 * cp-tree.h: Add flag_permissive.
1686 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
1687 were specified, set flag_pedantic_errors.
1688 * call.c (build_over_call): Turn dropped qualifier messages
1690 * cvt.c (convert_to_reference): Likewise.
1691 * typeck.c (convert_for_assignment): Likewise.
1693 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
1695 * decl2.c (coerce_new_type): Use same_type_p.
1696 (coerce_delete_type): Likewise.
1698 * call.c (check_dtor_name): Return 1, not error_mark_node.
1700 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
1702 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
1703 if MULTIPLE_SYMBOL_SPACES.
1705 * pt.c (check_template_shadow): New fn.
1706 * decl2.c (grokfield): Use it.
1707 * decl.c (pushdecl): Likewise.
1708 (pushdecl_class_level): Likewise.
1709 (start_method): Likewise.
1710 (xref_tag): Don't try to use 't' if we're defining.
1712 * call.c (check_dtor_name): Just return an error_mark_node.
1713 * pt.c (lookup_template_class): Complain about using non-template here.
1714 * parse.y (apparent_template_type): Not here.
1716 * pt.c (check_explicit_specialization): Complain about specialization
1719 * lang-options.h: Add -f{no-,}implicit-inline-templates.
1721 * pt.c (convert_nontype_argument): Don't assume that any integer
1722 argument is intended to be a constant-expression.
1724 1998-12-03 Mark Mitchell <mark@markmitchell.com>
1726 * class.c (handle_using_decl): Fix comment. Don't lookup
1727 constructors in base classes.
1728 (validate_lhs): Fix typo in comment.
1729 * search.c (lookup_field_1): Don't return a USING_DECL.
1731 * cp-tree.h (DECL_ACCESS): Improve documentation.
1733 * decl.c (expand_static_init): Don't set the initialization-done
1734 flag until the initialization is done.
1736 1998-12-02 Mark Mitchell <mark@markmitchell.com>
1738 * decl2.c (validate_nonmember_using_decl): Complain about using
1739 declarations for class members.
1741 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
1743 * typeck2.c (process_init_constructor): Use same_type_p.
1745 * decl.c (check_tag_decl): Don't warn about null decl inside a
1748 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
1750 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
1751 (resolve_overloaded_unification): Strip baselinks.
1753 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1755 * g++spec.c: Don't prototype xmalloc.
1757 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
1759 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
1761 * decl.c (check_tag_decl): Do complain about null friend decl at
1764 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1766 * lex.c (make_lang_type): Clear the whole struct lang_type, not
1767 only the first multiple of sizeof (int).
1769 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
1771 * decl.c (start_decl): An explicit specialization of a static data
1772 member is only a definition if it has an initializer.
1774 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
1775 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
1777 * init.c (expand_default_init): Check for DIRECT_BIND instead of
1780 * call.c (build_over_call): Use build_decl.
1782 * except.c (expand_throw): Just use convert, not
1783 build_reinterpret_cast.
1785 * lex.c (handle_generic_pragma): Use token_buffer.
1787 * decl.c (check_tag_decl): Don't complain about null friend decl.
1789 1998-11-24 Dave Pitts <dpitts@cozx.com>
1791 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
1793 * lex.c (check_newline): Use ISALPHA.
1794 (readescape): Use ISGRAPH.
1795 (yyerror): Use ISGRAPH.
1797 1998-11-24 Nathan Sidwell <nathan@acm.org>
1799 * search.c (get_abstract_virtuals): Do not use initial
1800 CLASSTYPE_ABSTRACT_VIRTUALS.
1801 * typeck2.c (abstract_virtuals_error): Show location of abstract
1803 * call.c (build_new_method_call): Use
1804 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
1805 * class.c (finish_struct_bits): Don't bother working out whether
1806 get_abstract_virtuals will do anything, just do it.
1808 1998-11-24 Graham <grahams@rcp.co.uk>
1810 * typeck.c (build_component_ref): Remove unused statement.
1812 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
1814 * class.c (add_method): Catch invalid overloads.
1816 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
1817 * search.c (lookup_conversions): Handle getting real OVERLOADs.
1818 (add_conversions): Likewise. Revert last change.
1819 * call.c (add_conv_candidate): Pass totype to add_candidate instead
1820 of fn. Don't add a new candidate if the last one was for the same
1822 (print_z_candidates): Handle getting a type as a function.
1823 (joust): If we got two conversion candidates to the same type,
1825 (build_object_call): Lose 'templates'.
1826 (build_user_type_conversion_1): Handle getting real OVERLOADs.
1828 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1830 * typeck2.c (process_init_constructor): If there are elements
1831 that don't have initializers and they need to have constructors
1832 run, supply them with initializers.
1834 * class.c (finish_struct_1): A class with a 0-width bitfield is
1837 1998-11-23 Mark Mitchell <mark@markmitchell.com>
1839 * pt.c (instantiate_class_template): Don't try to figure out what
1840 specialization to use for a partial instantiation. Correct
1841 typos in a couple of comments. Avoid calling uses_template_parms
1844 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
1846 * method.c (process_overload_item): Add call to
1847 build_mangled_C9x_name for intTI_type_nodes.
1848 (build_mangled_C9x_name): Add prototype, define.
1849 * decl.c (init_decl_processing): Add names for
1852 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1854 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
1856 * class.c (finish_struct_1): Set things up for 0-width bitfields
1857 like we do for others.
1859 * decl.c (check_tag_decl): New fn.
1860 (shadow_tag): Split out from here.
1861 * decl2.c (grok_x_components): Call it.
1863 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
1865 * decl.c: Lose warn_about_return_type.
1866 (grokdeclarator): Always complain about implicit int, except for
1869 * decl.c (tag_name): New fn.
1870 (xref_tag): Complain about using typedef-name after class-key.
1872 * init.c (expand_vec_init): Also keep going if from_array.
1874 * tree.c (is_overloaded_fn): Also handle the output of
1877 * decl.c (grokdeclarator): Use constructor_name when comparing
1878 field name against enclosing class.
1879 * class.c (finish_struct_anon): Likewise.
1881 1998-11-22 Mark Mitchell <mark@markmitchell.com>
1883 * decl.c (poplevel): Remove code to handle KEEP == 2.
1884 (finish_function): Don't confuse BLOCK-order when
1885 processing a destructor.
1887 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1889 * decl.c (require_complete_types_for_parms): Call layout_decl
1890 after we've completed the type.
1892 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
1894 * decl2.c (validate_nonmember_using_decl): Allow using templates
1895 from the global namespace.
1897 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1899 Handle specifying template args to member function templates.
1900 * tree.c (build_overload): Always create an OVERLOAD for a template.
1901 * search.c (add_conversions): Handle finding an OVERLOAD.
1902 * decl2.c (check_classfn): Likewise.
1903 * lex.c (identifier_type): See through a baselink.
1904 * parse.y (do_id): Don't call do_identifier if we got a baselink.
1905 * class.c (instantiate_type, case TREE_LIST): Recurse.
1907 * decl.c (grokdeclarator): Allow a boolean constant for array
1908 bounds, odd as that sounds.
1910 * pt.c (unify): Be more strict about non-type parms, except for
1912 (UNIFY_ALLOW_INTEGER): New macro.
1914 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
1916 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
1918 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
1920 * semantics.c (begin_class_definition): Call
1921 maybe_process_partial_specialization before push_template_decl.
1922 Don't call push_template_decl for a specialization.
1923 * search.c (lookup_field): Do return a member template class.
1924 * decl2.c (handle_class_head): Handle member template classes.
1926 * decl.c (grokdeclarator): A parm type need not be complete.
1928 * pt.c (convert_nontype_argument): Fix thinko.
1930 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1932 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
1933 (global_delete_fndecl): New variable.
1934 * decl.c (global_delete_fndecl): Define it.
1935 (init_decl_processing): Set it.
1936 * init.c (build_builtin_delete_call): Use it.
1937 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
1940 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1942 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
1945 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
1946 * call.c (build_object_call): Also support references to functions.
1947 * typeck.c (convert_for_initialization): Don't decay a function
1948 if the target is a reference to function.
1950 * search.c (add_conversions): Get all the overloads from a class.
1952 * decl.c (grok_ctor_properties): Complain about any constructor
1953 that will take a single arg of the class type by value.
1955 * typeck2.c (build_functional_cast): Can't create objects of
1956 abstract classes this way.
1957 * cvt.c (ocp_convert): Likewise.
1959 * decl.c (grokfndecl): Member functions of local classes are not
1962 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1964 * Make-lang.in (cc1plus): Add dependency on hash.o.
1966 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1968 * search.c (get_abstract_virtuals): Complain about virtuals with
1970 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
1971 with no final overrider.
1972 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
1973 on virtuals with no final overrider.
1975 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
1977 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
1980 * friend.c (do_friend): Don't set_mangled_name_for_decl.
1982 * class.c (finish_struct_anon): Complain about non-fields.
1983 * decl2.c (build_anon_union_vars): Likewise.
1985 * decl.c (grokdeclarator): Normal data members can't have the same
1986 name as the class, either.
1987 * class.c (finish_struct_anon): Neither can members of an
1990 1998-11-17 Mark Mitchell <mark@markmitchell.com>
1992 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
1993 (TYPE_BINFO): Likewise.
1994 (IS_AGGR_TYPE): Tweak.
1995 (SET_IS_AGGR_TYPE): New macro.
1996 (CLASS_TYPE_P): Tweak.
1997 (lang_type): Group mark bitfields together. Remove linenum.
1998 (CLASSTYPE_SOURCE_LINE): Remove macro.
1999 (CLASSTYPE_MARKED_N): New macro.
2000 (SET_CLASSTYPE_MARKED_N): Likewise.
2001 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
2002 (CLASS_TYPE_MARKED_*): Use them.
2003 (SET_CLASSTYPE_MARKED_*): Likewise.
2004 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
2005 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
2006 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
2007 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
2008 * class.c (class_cache_obstack): New variable.
2009 (class_cache_firstobj): Likewise.
2010 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
2011 (pushclass): Free the cache, when appropriate.
2013 (maybe_push_cache_obstack): Use class_cache_obstack.
2014 * decl.c (include hash.h).
2015 (typename_hash): New function.
2016 (typename_compare): Likewise.
2017 (build_typename_type): Check the hash table to avoid creating
2019 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
2020 (grokdeclarator): Use CLASS_TYPE_P.
2021 (xref_basetypes): Likewise.
2022 (start_function): Likewise. Don't put current_class_ref on the
2024 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
2026 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
2027 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
2028 fields for types other than class types. Do clear TYPE_ALIAS_SET
2029 for types other than class types, though.
2030 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
2031 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2032 * pt.c (process_template_parm): Don't set
2033 CLASSTYPE_GOT_SEMICOLON.
2034 (lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2035 Coerce arguments on the momentary obstack.
2036 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2037 (instantiate_class_template): Calculate template arguments on the
2038 momentary obstack. Tidy.
2039 (tsubst_template_arg_vector): Use make_temp_vec.
2040 (tsubst_aggr_type): Put template arguments on the momentary
2042 (tsubst_decl): Likewise.
2043 (tsubst): Copy the array bounds index to the permanent obstack
2044 before building index types. Use new macros.
2045 (unify): Use new macros.
2046 (do_type_instantiation): Likewise.
2047 * search.c (lookup_fnfields_1): Use new macros.
2048 (dfs_pushdecls): Build envelopes on the cache obstack.
2049 (dfs_compress_decls): Use new macros.
2050 (push_class_decls): Build on the cache obstack.
2051 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
2052 * sign.c (build_signature_pointer_or_reference_type): Use
2054 * tree.c (make_binfo): Check CLASS_TYPE_P.
2055 (copy_template_template_parm): Adjust.
2056 (make_temp_vec): Use push_expression_obstack.
2057 * typeck.c (complete_type): Use new macros.
2058 (comptypes): Likewise.
2060 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
2062 * pt.c (tsubst): Add diagnostics for invalid array, reference
2063 and pointer to member types.
2065 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
2067 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
2069 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
2072 * parse.y (structsp): Fix cut-and-paste error.
2074 * init.c (build_new): Complain about non-integral size.
2076 * parse.y (unary_expr): Complain about defining types in sizeof.
2078 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
2080 * rtti.c (build_x_typeid): Complain about typeid without
2081 including <typeinfo>.
2082 (get_typeid): Likewise. Complain about typeid of incomplete type.
2083 (get_tinfo_fn_dynamic): Likewise.
2084 (get_typeid_1): Not static anymore.
2085 * except.c (build_eh_type_type): Use get_typeid_1.
2087 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
2088 ambiguous or private bases. Fix warning for reference cast.
2090 1998-11-16 Mark Mitchell <mark@markmitchell.com>
2092 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
2093 * decl.c (duplicate_decls): Remove special-case code to deal with
2094 template friends, and just do the obvious thing.
2095 * pt.c (register_specialization): Tweak for clarity, and also to
2096 clear DECL_INITIAL for an instantiation before it is merged with a
2098 (check_explicit_specialization): Fix indentation.
2099 (tsubst_friend_function): Handle both definitions in friend
2100 declaration and outside friend declarations.
2101 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
2102 (regenerate_decl_from_template): Tweak accordingly.
2103 (instantiate_decl): Likewise.
2105 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
2107 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
2108 member function reference to error.
2109 * cvt.c (ocp_convert): Complain about converting an overloaded
2112 * init.c (build_offset_ref): Just return a lone static member
2115 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
2118 * typeck.c (build_binary_op_nodefault): Improve error handling.
2120 * decl.c (grokfndecl): Complain about making 'main' a template.
2122 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
2124 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
2125 TYPE_DECL in a template.
2127 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
2129 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
2131 * decl.c (struct cp_function): Add named_label_uses.
2132 (push_cp_function_context): Save it.
2133 (pop_cp_function_context): Restore it.
2134 (define_label): Also complain about jumping into the scope of
2135 non-POD objects that don't have constructors.
2136 * tree.c (pod_type_p): New fn.
2138 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
2139 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
2140 (get_tinfo_fn): Not here.
2141 * repo.c (repo_get_id): Abort if we get called for an incomplete
2144 1998-11-13 Mark Mitchell <mark@markmitchell.com>
2146 * except.c (expand_throw): Make sure first argument to
2147 __cp_push_exception is of type `void*' to avoid spurious error
2150 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
2152 * pt.c (try_one_overload): Take orig_targs again. Only check for
2153 mismatches against them; we don't care what a previous call found.
2154 (resolve_overloaded_unification): Adjust.
2156 * search.c (lookup_field): Don't return anything for a non-type
2157 field from a dependent type.
2158 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
2159 in an array declarator.
2160 (start_decl): Push into the class before looking for the field.
2162 1998-11-08 Mark Mitchell <mark@markmitchell.com>
2164 * method.c (build_overload_value): Handle REFERENCE_TYPE.
2166 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
2168 * decl.c (grokdeclarator): Allow namespace-scoped members if they
2171 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
2173 * pt.c (tsubst_decl): Don't mess with the global value of an
2174 un-mangled DECL_ASSEMBLER_NAME.
2176 1998-11-03 Christopher Faylor <cgf@cygnus.com>
2178 * decl.c (init_decl_processing): Remove CYGWIN conditional
2179 since CYGWIN is now able to deal with trapping signals.
2181 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2183 * cp-tree.h: Don't include gansidecl.h.
2184 * exception.cc: Include gansidecl.h (since we don't include config.h)
2185 * g++spec.c: Don't include gansidecl.h.
2187 1998-11-06 Mark Mitchell <mark@markmitchell.com>
2189 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
2191 (DECL_DEFINED_IN_CLASS_P): New macro.
2192 (TEMPLATE_PARMS_FOR_INLINE): Document.
2193 (check_static_variable_definition): New function.
2194 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
2196 (check_static_variable_definition): Split out from ...
2197 (grokdeclarator): Here.
2198 * pt.c (check_default_tmpl_args): New function, split out from ...
2199 (push_template_decl_real): Here.
2200 (instantiate_template): Fix comment.
2202 1998-11-04 Mark Mitchell <mark@markmitchell.com>
2204 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
2205 (CP_TYPE_VOLATILE_P): Likewise.
2206 (CP_TYPE_RESTRICT_P): Likewise.
2208 1998-11-03 Mark Mitchell <mark@markmitchell.com>
2210 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
2212 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
2214 * class.c (instantiate_type): Be more helpful.
2216 * decl2.c (import_export_decl): Call import_export_class.
2218 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
2219 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
2220 * pt.c (tsubst_copy): Likewise.
2222 1998-11-02 Mark Mitchell <mark@markmitchell.com>
2224 * init.c (expand_vec_init): Fix off-by-one error.
2226 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
2228 * parse.y (apparent_template_type): New type.
2229 (named_complex_class_head_sans_basetype): Use it.
2230 * Makefile.in (CONFLICTS): One new conflict.
2231 * parse.c: Regenerated.
2233 1998-11-01 Mark Mitchell <mark@markmitchell.com>
2235 * cp-tree.h (COMPARE_STRICT): New macro.
2236 (COMPARE_BASE): Likewise.
2237 (COMPARE_RELAXED): Likewise.
2238 (COMPARE_REDECLARATION): Likewise.
2239 (same_type_p): Likewise.
2240 (same_or_base_type_p): Likewise.
2241 * call.c (standard_conversion): Use them, in place of comptypes
2242 with numeric arguments.
2243 (reference_binding): Likewise.
2244 (convert_like): Likewise.
2245 (build_over_call): Likewise.
2246 (is_subseq): Likewise.
2247 (is_properly_derived_from): Likewise.
2248 (compare_ics): Likewise.
2250 * class.c (delete_duplicate_fields_1): Likewise.
2251 (resolves_to_fixed_type_p): Likewise.
2252 (instantiate_type): Likewise. Remove #if 0'd code.
2253 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
2254 (pushdecl): Likewise.
2255 (lookup_name_real): Likewise.
2256 (grokdeclarator): Likewise. Check for illegal array declarations.
2257 (grokparms): Likewise.
2258 (grok_op_properties): Likewise.
2259 * decl2.c (check_classfn): Likewise.
2260 * friend.c (is_friend): Likewise.
2261 (make_friend_class): Likewise.
2262 * init.c (expand_aggr_init): Likewise.
2263 (expand_vec_init): Likewise.
2264 * pt.c (is_member_template_class): Remove declaration.
2265 (is_specialization_of): Use COMPARE_* and new macros.
2266 (comp_template_parms): Likewise.
2267 (convert_nontype_argument): Likewise.
2268 (coerce_template_template_parms): Likewise.
2269 (template_args_equal): Likewise.
2270 (lookup_template_class): Likewise.
2271 (type_unification_real): Likewise.
2273 (get_bindings_real): Likewise.
2274 * search.c (covariant_return_p): Likewise.
2275 (get_matching_virtual): Likewise.
2276 * sig.c (match_method_types): Likewise.
2277 * tree.c (vec_binfo_member): Likewise.
2278 (cp_tree_equal): Likewise.
2279 * typeck.c (common_type): Likewise.
2280 (comp_array_types): Likewise. Get issues involving unknown array
2282 (comptypes): Update comments. Use new flags.
2283 (comp_target_types): Use new macros.
2284 (compparms): Likewise.
2285 (comp_target_parms): Likewise.
2286 (string_conv_p): Likewise.
2287 (build_component_ref): Likewise.
2288 (build_indirect_ref): Likewise.
2289 (build_conditional_expr): Likewise.
2290 (build_static_cast): Likewise.
2291 (build_reinterpret_cast): Likewise.
2292 (build_const_cast): Likewise.
2293 (build_modify_expr): Likewise.
2294 (convert_for_assignment): Likewise.
2295 (comp_ptr_ttypes_real): Likewise.
2296 (ptr_reasonably_similar): Likewise.
2297 (comp_ptr_ttypes_const): Likewise.
2299 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
2301 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
2303 1998-10-30 Mark Mitchell <mark@markmitchell.com>
2305 * decl2.c (delete_sanity): Pass integer_zero_node, not
2306 integer_two_node, to build_vec_delete.
2307 * init.c (build_array_eh_cleanup): Remove.
2308 (expand_vec_init_try_block): New function.
2309 (expand_vec_init_catch_clause): Likewise.
2310 (build_vec_delete_1): Don't deal with case that auto_delete_vec
2311 might be integer_two_node anymore.
2312 (expand_vec_init): Rework for initialization-correctness and
2313 exception-correctness.
2314 * typeck2.c (process_init_constructor): Make mutual exclusivity
2315 of cases more obvious.
2317 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
2319 * decl.c (lookup_name_real): OK, only warn if not lexing.
2320 Simplify suggested fix.
2322 * cp-tree.h (IDENTIFIER_MARKED): New macro.
2323 * search.c (lookup_conversions): Use breadth_first_search.
2324 (add_conversions): Avoid adding two conversions to the same type.
2325 (breadth_first_search): Work with base binfos, rather
2326 than binfos and base indices.
2327 (get_virtual_destructor): Adjust.
2328 (tree_has_any_destructor_p): Adjust.
2329 (get_matching_virtual): Adjust.
2331 * pt.c (push_template_decl_real): Generalize check for incorrect
2332 number of template parms.
2333 (is_member_template_class): #if 0.
2335 1998-10-29 Richard Henderson <rth@cygnus.com>
2337 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
2340 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
2342 * lex.c: Call check_newline from lang_init always. After
2343 calling cpp_start_read, set yy_cur and yy_lim to read from the
2344 cpplib token buffer.
2346 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
2348 * class.c (instantiate_type): Don't consider templates for a normal
2351 * class.c (finish_struct_1): Don't complain about non-copy
2352 assignment ops in union members.
2354 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
2355 (prepare_fresh_vtable): Likewise.
2356 (finish_struct_1): Don't call import_export_class.
2357 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
2358 (finish_prevtable_vardecl): Lose.
2359 (finish_file): Don't call it.
2360 * pt.c (instantiate_class_template): Likewise.
2361 * cp-tree.h: Remove it.
2363 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
2364 * decl.c (finish_function): Not here.
2365 (start_function): Do set DECL_INITIAL.
2367 * pt.c (push_template_decl_real): Complain about default template
2368 args for enclosing classes.
2370 * call.c (add_function_candidate): Treat conversion functions
2371 as coming from the argument's class.
2372 * cp-tree.h (DECL_CONV_FN_P): New fn.
2373 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
2374 * class.c (add_method): Use DECL_CONV_FN_P.
2375 * decl2.c (check_classfn): Likewise.
2376 * error.c (dump_function_name): Likewise.
2377 (dump_function_decl): Likewise.
2378 * pt.c (fn_type_unification): Likewise.
2379 * search.c (add_conversions): Likewise.
2381 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
2383 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
2384 * method.c (hack_identifier): Also check for using RESULT_DECL
2387 1998-10-27 Mark Mitchell <mark@markmitchell.com>
2389 * decl.c (grokdeclarator): Use type_quals, rather than constp,
2392 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
2394 * call.c (standard_conversion): instantiate_type here.
2395 (reference_binding): And here.
2396 (implicit_conversion): Not here.
2397 (build_op_delete_call): No need to cons up an OVERLOAD.
2398 * cvt.c (cp_convert_to_pointer): instantiate_type here.
2399 (convert_to_reference): And here.
2400 * decl.c (grok_reference_init): Not here.
2401 (grokparms): Or here.
2402 * typeck2.c (digest_init): Or here.
2403 * typeck.c (decay_conversion): Take the address of overloaded
2405 (require_instantiated_type): Lose.
2406 (convert_arguments): Don't handle unknown types here.
2407 (build_c_cast): Likewise.
2408 (build_binary_op): Gut.
2409 (build_conditional_expr): Don't require_instantiated_type.
2410 (build_modify_expr): Likewise.
2411 (build_static_cast): Don't instantiate_type.
2412 (build_reinterpret_cast): Likewise.
2413 (build_const_cast): Likewise.
2414 (convert_for_initialization): Likewise.
2415 (build_ptrmemfunc): Use type_unknown_p.
2416 (convert_for_assignment): Also do default_conversion on overloaded
2417 functions. Hand them off to ocp_convert.
2419 1998-10-26 Mark Mitchell <mark@markmitchell.com>
2421 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
2422 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
2424 * class.c (finish_struct_1): Use build_cplus_array_type to build
2426 * decl.c (init_decl_processing): Likewise.
2427 * except.c (expand_end_eh_spec): Likewise.
2428 * search.c (expand_upcast_fixups): Simplify very slightly.
2430 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2432 * decl.c (grokdeclarator): Complain about a variable using
2433 constructor syntax coming back null from start_decl.
2435 * friend.c (make_friend_class): Complain about trying to make
2436 a non-class type a friend.
2438 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
2439 (start_function): Not here.
2441 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
2443 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
2445 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2447 * typeck2.c (process_init_constructor): Only skip anonymous fields
2448 if they are bitfields.
2450 * cp-tree.def (TYPEOF_TYPE): New code.
2451 * error.c (dump_type_real): Handle it.
2452 * pt.c (tsubst): Likewise.
2453 * tree.c (search_tree): Likewise.
2454 * semantics.c (finish_typeof): New fn.
2455 * parse.y (typespec): Use it.
2456 * cp-tree.h: Declare it.
2458 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
2460 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
2462 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
2464 * typeck.c (convert_arguments): Don't handle pmf references
2467 * init.c (build_member_call): Don't try to convert to the base type
2468 if it's ambiguous or pedantic.
2470 * typeck2.c (check_for_new_type): Only depend on pedantic for
2473 1998-10-25 Mark Mitchell <mark@markmitchell.com>
2475 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
2476 non-converting constructors.
2478 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
2480 * gxxint.texi: Correct documentation for n, N, Q, and B.
2482 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
2484 * parse.y (condition): Convert VAR_DECL from reference to indirect
2487 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
2489 * exception.cc (__cp_pop_exception): Free the original exception
2490 value, not the potentially coerced one.
2492 1998-10-23 Mark Mitchell <mark@markmitchell.com>
2494 * Makefile.in (hash.h): Run gperf when necessary.
2496 * cp-tree.h (CP_TYPE_READONLY): Remove.
2497 (CP_TYPE_VOLATILE): Likewise.
2498 (CP_TYPE_QUALS): New macro.
2499 (CP_TYPE_CONST_P): Likewise.
2500 (CP_TYPE_VOLATILE_P): Likewise.
2501 (CP_TYPE_RESTRICT_P): Likewise.
2502 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
2503 (cp_build_type_variant): Rename to ...
2504 (cp_build_qualified_type): New function.
2505 (c_apply_type_quals_to_decl): Declare.
2506 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
2507 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
2508 (cp_type_qual_from_rid): New function.
2509 (compparms): Remove unused parameter. All callers changed.
2510 (cp_type_quals): New function.
2511 (at_least_as_qualified_p): Likewise.
2512 (more_qualified_p): Likewise.
2514 * call.c (standard_conversion): Replace calls to
2515 cp_build_type_variant with cp_build_qualified_type. Use
2516 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
2517 compare them. Use CP_TYPE_* macros to check qualifiers.
2518 (reference_binding): Likewise.
2519 (implicit_conversion): Likewise.
2520 (add_builtin_candidates): Likewise.
2521 (build_over_call): Likewise.
2522 * class.c (overrides): Compare all qualifiers, not just `const',
2523 on method declarations.
2524 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
2525 (convert_pointer_to_real): Likewise.
2526 (type_promotes_to): Likewise.
2527 * decl.c (check_for_uninitialized_const_var): New function.
2528 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
2529 (cp_finish_decl): Use check_for_uninitialized_const_var.
2530 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
2532 (grok_ctor_properties): Likewise.
2533 (grok_op_properties): Likewise.
2534 (start_function): Likewise.
2535 (rever_static_member_fn): Likewise.
2536 * decl2.c (grok_method_quals): Likewise.
2537 (grokfield): Likewise.
2538 * error.c (dump_readonly_or_volatile): Rename to ...
2539 (dump_qualifiers): New function. Handle `restrict'.
2540 (dump_type_real): Use it.
2541 (dump_aggr_type): Likewise.
2542 (dump_type_prefix): Likewise.
2543 (dump_type_suffix): Likewise.
2544 (dump_function_decl): Likewise.
2545 (cv_as_string): Likewise.
2546 * gxx.gperf: Add __restrict and __restrict__.
2547 * gxxint.texi: Document `u' as used for `__restrict', and a few
2548 other previously undocumented codes.
2549 * hash.h: Regenerated.
2550 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
2551 (build_member_call): Likewise.
2552 (build_new_1): Likewise.
2553 * lex.c (init_parse): Add entry for RID_RESTRICT.
2554 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
2555 (cp_type_qual_from_rid): Define.
2556 * lex.h (enum rid): Add RID_RESTRICT.
2557 * method.c (process_modifiers): Deal with `restrict'.
2558 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
2559 * parse.c: Regenerated.
2560 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
2561 (tsubst_aggr_type): Likewise.
2563 (check_cv_quals_for_unify): Likewise.
2565 * rtti.c (init_rtti_processing): Likewise.
2566 (build_headof): Likewise.
2567 (get_tinfo_var): Likewise.
2568 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
2569 (expand_class_desc): Likewise.
2570 (expand_attr_desc): Likewise.
2571 (synthesize_tinfo_fn): Likewise.
2572 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
2573 (get_matching_virtual): Likewise.
2574 (expand_upcast_fixups): Likewise.
2575 * sig.c (build_signature_pointer_or_reference_name): Take
2576 type_quals, not constp and volatilep.
2577 (build_signature_pointer_or_reference_type): Likewise.
2578 (match_method_types): More CP_TYPE_QUALS conversion, etc.
2579 (build_signature_pointer_constructor): Likewise.
2580 (build_signature_method_call): Likewise.
2581 * tree.c (build_cplus_array_type): Likewise.
2582 (cp_build_type_variant): Rename to ...
2583 (cp_build_qualified_type): New function. Deal with `__restrict'.
2584 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
2585 (build_exception_variant): Likewise.
2587 * typeck.c (qualif_type): Likewise.
2588 (common_type): Likewise.
2589 (comptypes): Likewise.
2590 (comp_cv_target_types): Likewise.
2591 (at_least_as_qualified_p): Define.
2592 (more_qualified_p): Likewise.
2593 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
2594 (compparms): Likewise.
2595 (inline_conversion): Likewise.
2596 (string_conv_p): Likewise.
2597 (build_component_ref): Likewise.
2598 (build_indirect_ref): Likewise.
2599 (build_array_ref): Likewise.
2600 (build_unary_op): Likewise.
2601 (build_conditional_expr): Likewise.
2602 (build_static_cast): Likewise.
2603 (build_c_cast): Likewise.
2604 (build_modify_expr): Likewise.
2605 (convert_For_assignment): Likewise.
2606 (comp_ptr_ttypes_real): Likewise.
2607 (cp_type_quals): New function.
2609 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
2611 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
2612 (CP_TYPE_VOLATILE): Likewise.
2613 * decl.c (grokdeclarator): Use them.
2614 * tree.c (canonical_type_variant): Likewise.
2616 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
2618 * parse.y (named_class_head): Push into class while parsing the
2620 * decl2.c (push_scope, pop_scope): New functions.
2621 * cp-tree.h: Declare them.
2622 * init.c (build_new_1): Delay cleanup until end of full expression.
2624 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
2626 * typeck.c (build_component_ref): Use of a type here is an error.
2628 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
2630 Revamp references to member functions.
2631 * method.c (hack_identifier): Call build_component_ref for a
2632 reference to a member function.
2633 * typeck.c (build_component_ref): Only return a single function
2634 if it's static. Otherwise, return a COMPONENT_REF.
2635 (build_x_function_call): Handle a COMPONENT_REF.
2636 (build_unary_op): Handle all unknown-type things.
2637 * decl2.c (arg_assoc): Handle COMPONENT_REF.
2638 * class.c (instantiate_type): Complain if the function we get is a
2639 nonstatic member function. Remove code for finding "compatible"
2641 * pt.c (tsubst_copy): Handle NOP_EXPR.
2642 * tree.c (build_dummy_object): New fn.
2643 (maybe_dummy_object): New fn.
2644 (is_dummy_object): New fn.
2645 * cp-tree.h: Declare them.
2646 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
2647 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
2648 * init.c (build_member_call): Use maybe_dummy_object and
2650 (build_offset_ref): Use maybe_dummy_object.
2651 (resolve_offset_ref): Use is_dummy_object.
2652 * typeck.c (build_x_function_call): Call build_dummy_object.
2653 (unary_complex_lvalue): Call is_dummy_object.
2655 * typeck.c (build_component_addr): Make sure field is a field.
2657 * call.c (build_new_op): Delete obsolete code.
2659 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
2661 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
2663 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
2664 std if std is ignored.
2666 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
2668 * decl.c (grokvardecl): Fix thinko.
2670 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2673 * parse.y (fn.def2): Fix 'attrs' format.
2675 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
2677 * Makefile.in (CONFLICTS): Update.
2678 * parse.y (expr_or_declarator_intern): New rule.
2679 (expr_or_declarator, direct_notype_declarator, primary,
2680 functional_cast): Use it.
2681 (notype_declarator_intern): New rule.
2682 (notype_declarator, complex_notype_declarator): Use it.
2684 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
2686 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
2687 (grokvardecl): Likewise.
2689 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2691 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
2692 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
2694 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
2696 * pt.c (process_partial_specialization): Cast 1st argument of
2699 * tree.c (build_base_fields): Cast `base_align' to (int) when
2700 comparing against one.
2702 1998-10-16 Mark Mitchell <mark@markmitchell.com>
2704 * decl.c (lookup_name_real): Handle template parameters for member
2705 templates where said parameters have the same name as the
2708 * decl.c (expand_static_init): Build cleanups before entering the
2709 anonymous function used to do them to avoid access-checking
2712 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
2713 accidentally removed by previous change, and make DECL_RTL here.
2714 * class.c (add_method): Don't make DECL_RTL here.
2716 * pt.c (for_each_template_parm): Don't examine uninstantiated
2719 1998-10-16 Dave Brolley <brolley@cygnus.com>
2721 * lex.c (real_yylex): Fix unaligned access of wchar_t.
2723 1998-10-16 Mark Mitchell <mark@markmitchell.com>
2725 * class.c (add_method): Fix documentation to reflect previous
2726 changes. Check for duplicate method declarations here.
2727 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
2728 correctly; such things never match.
2729 (grokfndecl): Don't look for duplicate methods here.
2730 * decl2.c (check_classfn): Don't assume names are mangled.
2731 Don't add bogus member function declarations to a class before the
2732 class type is complete.
2733 (grokfield): Reformat error message.
2734 * method.c (set_mangled_name_for_decl): Don't mangle names while
2735 processing_template_decl.
2737 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
2739 * typeck.c (build_indirect_ref): Complain about a pointer to data
2741 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
2743 * init.c (resolve_offset_ref): Don't undo the above.
2745 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
2746 (struct lang_decl_flags): Add `bitfield'.
2747 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
2749 * decl2.c (grokbitfield, grok_alignof): Likewise.
2750 * init.c (build_offset_ref): Likewise.
2751 * typeck.c (build_component_addr, expr_sizeof): Likewise.
2752 * cvt.c (build_up_reference): Don't crash if taking the address
2753 returns error_mark_node.
2755 * decl.c (grokfndecl): Also check ctype when checking for ::main().
2757 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
2759 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
2761 (grokdeclarator): Instead of here.
2762 * friend.c (do_friend): Lose special handling of ::main and
2764 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
2766 * spew.c (yylex): Clear looking_for_typename if we got
2769 1998-10-15 Mark Mitchell <mark@markmitchell.com>
2771 * class.c (maybe_warn_about_overly_private_class): Improve error
2772 messages for class with only private constructors.
2774 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
2775 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
2776 (build_typename_type): New function.
2777 * decl.c (build_typename_type): Broken out from ...
2778 (make_typename_type): Use it.
2779 * search.c (lookup_field): Likewise.
2781 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2783 * pt.c (convert_nontype_argument): Check against type_referred_to.
2784 * decl.c (grokvardecl): Check for declarator name before building
2785 DECL_ASSEMBLER_NAME.
2787 1998-10-14 Mark Mitchell <mark@markmitchell.com>
2789 * pt.c (lookup_template_class): Add comment.
2790 (instantiate_class_template): Don't mark the _TYPE node for
2791 member class templates as an instantiation.
2793 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
2795 * decl.c (grokfndecl): Fix my thinko.
2797 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
2799 * tinfo2.cc (fast_compare): Remove.
2800 (before): Just use strcmp.
2801 * tinfo.cc (operator==): Just use strcmp.
2803 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
2805 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
2808 1998-10-13 Mark Mitchell <mark@markmitchell.com>
2810 * cp-tree.h (specializations_of_same_template_p): Remove.
2811 * search.c (get_template_base): Don't use it.
2812 (get_template_base_recursive): Likewise.
2813 * pt.c (specializations_of_same_template_p): Remove.
2814 (unify): Don't use it.
2815 (lookup_template_class): Find the correct parent when setting
2816 CLASSTYPE_TI_TEMPLATE.
2818 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2820 * tinfo.cc (operator==): Always compare names.
2822 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2824 * decl.c (start_function): Fix cut-and-paste error.
2826 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2828 * inc/typeinfo: Add #pragma interface.
2829 (operator!=): Just call operator==.
2830 * tinfo.cc: Add #pragma implementation.
2831 (operator==): Move from inc/typeinfo and tinfo2.cc.
2832 Check __COMMON_UNRELIABLE instead of _WIN32.
2834 * typeck2.c (my_friendly_abort): Add URL.
2836 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
2838 * decl.c (start_method): Added extra parameter for attributes.
2839 * cp-tree.h (start_method): Update prototype.
2840 * parse.y (fn.def2): Update start_method parameter list.
2842 1998-10-11 Mark Mitchell <mark@markmitchell.com>
2844 * cp-tree.h (specializations_of_same_template_p): Declare.
2845 * pt.c (specializations_of_same_template_p): New function.
2847 * search.c (get_template_base): Use it.
2848 (get_template_base_recursive): Likewise.
2850 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
2852 * decl2.c (start_objects): Add new variable `joiner' and
2853 initialize it properly.
2855 1998-10-09 Mark Mitchell <mark@markmitchell.com>
2857 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
2858 change to vtable types.
2860 * cvt.c (ocp_convert): Avoid infinite recursion caused by
2863 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
2865 * pt.c (resolve_overloaded_unification): New fn.
2866 (try_one_overload): Likewise.
2867 (unify): Don't fail on unknown type.
2868 (type_unification_real): Likewise. Use resolve_overloaded_unification
2869 to handle an overloaded argument.
2870 (template_args_equal): Split out...
2871 (comp_template_args): From here.
2872 (determine_specialization): Also allow a template with more
2873 parms than were explicitly specified.
2874 * cp-tree.h: Add template_args_equal.
2875 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
2877 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
2879 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
2882 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
2884 * typeck.c (unsigned_type): Only return TItype nodes when
2885 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2886 (signed_type): Likewise.
2887 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
2888 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2889 (init_decl_processing): Only create TItype nodes when
2890 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2891 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
2892 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2894 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2896 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
2897 (gxx.gperf): Update comments describing invocation flags.
2898 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
2900 1998-10-07 Mark Mitchell <mark@markmitchell.com>
2902 * class.c (finish_struct_1): Add commentary on previous change.
2904 * cp-tree.h (vtbl_ptr_type_node): New variable.
2905 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
2906 already of the right type.
2907 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
2908 Simplify code to grow vtable.
2909 * decl.c (vtbl_ptr_type_node): Define.
2910 (init_decl_processing): Initialize it.
2912 1998-10-06 Mark Mitchell <mark@markmitchell.com>
2914 * cp-tree.def (PTRMEM_CST): New tree node.
2915 * cp-tree.h (ptrmem_cst): New type.
2916 (lang_type): Remove local_typedecls.
2917 (dummy): Increase to 12 bits from 11.
2918 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
2919 (PTRMEM_CST_CLASS): New macro.
2920 (PTRMEM_CST_MEMBER): Likewise.
2921 (current_access_specifier): New variable.
2922 (current_class_type): Remove duplicate declaration.
2923 (finish_struct): Change prototype.
2924 (unreverse_member_declarations): New function.
2925 (pushdecl_class_level): Change prototype.
2926 (grok_enum_decls): Remove.
2927 (fixup_anonymous_union): New function.
2928 (grok_x_components): Change prototype.
2929 (tsubst_chain): Remove.
2930 (finish_member_template_decl): Likewise.
2931 (check_explicit_specialization): Fix indentation.
2932 (finish_class_definition): Change prototype.
2933 (finish_member_class_template): Likewise.
2934 (finish_member_declaration): New function.
2935 (check_multiple_declarators): Likewise.
2936 * class.c (class_stack_node_t): New type.
2937 (current_class_base): Remove.
2938 (current_class_stack): Change type.
2939 (current_access_specifier): New variable.
2940 (grow_method): Remove.
2941 (check_member_decl_is_same_in_complete_scope): Break out from
2943 (make_method_vec): New function.
2944 (free_method_vec): Likewise.
2945 (add_implicitly_declared_members): Break out from finish_struct_1.
2946 (free_method_vecs): New variable.
2947 (add_method): Rework for direct use from parser.
2948 (handle_using_decl): Watch for NULL_TREE while iterating through
2949 CLASSTYPE_METHOD_VEC.
2950 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
2951 just do some error-checking.
2952 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
2953 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
2954 (finish_struct): Change prototype. Simplify; fields and methods
2955 are already set up at this point.
2956 (init_class_processing): Set up current_class_stack.
2957 (pushclass): Save current_access_specifier.
2958 (popclass): Restore it.
2959 (currently_open_class): Simplify.
2960 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
2961 * decl.c (saved_scope): Add access_specifier.
2962 (maybe_push_to_top_level): Save it.
2963 (pop_from_top_level): Restore it.
2964 (maybe_process_template_type_declaration): Use
2965 finish_member_declaration.
2966 (pushtag): Likewise.
2967 (pushdecl_class_level): Don't return a value.
2968 (fixup_anonymous_union): Break out from grok_x_components.
2969 (shadow_tag): Use it.
2970 (xref_tag): Complain about using an elaborated type specifier to
2971 reference a template type parameter or typedef name.
2972 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2973 (current_local_enum): Remove.
2974 (build_enumerator): Call finish_member_declaration.
2975 (grok_enum_decls): Remove.
2976 * decl2.c (grok_x_components): Simplify.
2977 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
2978 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2979 (merge_functions): Add to comment.
2980 (arg_assoc_type): Prototype.
2981 (arg_assoc): Pass as many arguments as there are parameters.
2982 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
2984 * expr.c (cpls_expand_expr): Remove dead code. Handle
2986 * friend.c (do_friend): Lookup friends when in nested classes.
2988 * init.c (build_offset_ref): Do lookup even for classes that are
2989 only partially defined.
2990 (decl_constant_value): Remove dead code.
2991 * method.c (build_overload_value): Remove hack where by TYPE was
2992 not a TYPE. Handle PTRMEM_CST.
2993 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
2995 * parse.y (components, notype_components, component_decl,
2996 component_decl_1, component_declarator, component_declarator0):
2997 Now all are itype rather than ttype. Rework to add members to
2999 (typesqpecqual_reserved): Use check_multiple_declarators.
3000 (structsp): Update class to finish_class_definition.
3001 (do_xref_defn): Unsplit into named_class_head.
3002 (access_specifier): Set current_access_specifier.
3003 * pt.c (set_current_access_from_decl): New function.
3004 (finish_member_template_decl): Don't take the parameters.
3005 (comp_template_args): Make more robust.
3006 (lookup_template_class): Don't use current_local_enum.
3007 (for_each_template_parm): Handle PTRMEM_CST.
3008 (instantiate_class_template): Use set_current_access_from_decl,
3009 finish_member_declaration and unreverse_member_declarations. Set
3010 lineno/input_filename before generating implicit member functions.
3011 (type_unification_real): Don't assume back-unification happens
3012 only for the last argument.
3013 (regenerate_decl_from_template): Call pushclass a bit earlier.
3014 (tsubst_chain): Remove.
3015 (tsubst_enum): Use set_current_access_from_decl.
3016 (set_mangled_name_for_template_decl): Fix indentation.
3017 * search.c (lookup_fnfields_1): Change iteration through
3018 CLASSTYPE_METHOD_VEC.
3019 (dfs_pushdecls): Likewise.
3020 (dfs_compress_decls): Likewise.
3021 (add_conversions): Likewise.
3022 * semantics.c (finish_class_definition): Don't take components.
3023 Change call to finish_struct.
3024 (finish_member_declaration): New function.
3025 (finish_member_class_template): Don't take template parameters.
3026 Change call to grok_x_components. Call finish_member_template_decl.
3027 (check_multiple_declarators): New function.
3028 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
3029 a passed in fieldlist.
3030 * tree.c (search_tree): Handle PTRMEM_CST.
3032 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
3033 INTEGER_CSTs, for pointer-to-data members.
3035 * call.c (resolve_args): Resolve template specializations, if
3038 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3040 * Makefile.in (spew.o): Depend on toplev.h.
3042 * call.c (compare_ics): Initialize variables `deref_from_type2',
3043 `deref_to_type1' and `deref_to_type2'.
3045 * except.c (get_eh_type): Hide prototype and definition.
3046 (process_start_catch_block_old): Remove unused static prototype.
3048 * pt.c (tsubst_decl): Initialize variable `argvec'.
3050 * spew.c: Include toplev.h.
3052 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
3054 * pt.c (instantiate_decl): Do save and restore file position.
3056 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
3058 * method.c (build_decl_overload_real): Clear
3059 numeric_output_need_bar after __.
3061 1998-10-05 Nathan Sidwell <nathan@acm.org>
3063 * call.c (build_new_method_call): Issue 'incomplete type' error,
3064 if class is not defined.
3066 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3068 * call.c (build_object_call): Move declaration of variable
3069 `fn' into the scope where it is used. Don't access variable
3070 `fn' when it is uninitialized, instead use `fns'.
3072 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3074 * errfn.c (cp_thing): Print buf as a string not as a printf format
3075 to avoid problems with the operator%. Consequently, `%%' sequences
3076 in format are copied as `%' in buf.
3078 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
3080 * pt.c (pop_tinst_level): Call extract_interface_info.
3081 (instantiate_decl): Don't save and restore file position.
3083 * decl.c (cp_finish_decl): Make statics in extern inlines and
3084 templates common, if possible and the target doesn't support weak
3087 * decl.c (grokdeclarator): Remove redundant calls to
3088 build_type_variant and some duplicated code.
3089 * sig.c (build_signature_reference_type): Only take the type parm.
3090 (build_signature_pointer_type): Likewise.
3091 * tree.c (build_cplus_method_type): Adjust.
3092 * cp-tree.h: Update.
3094 1998-10-04 Mark Mitchell <mark@markmitchell.com>
3096 * call.c (build_over_call): Make pedwarns about dropped qualifiers
3097 into full-fledged errors.
3098 * cvt.c (convert_to_reference): Likewise.
3099 * typeck.c (convert_for_assignment): Likewise.
3101 * search.c (expand_upcast_vtables): In addition to unsetting
3102 TREE_READONLY, remove top-level const type qualifier.
3104 1998-10-03 Mark Mitchell <mark@markmitchell.com>
3106 * class.c (current_class_ptr, current_class_ref): Clarify
3108 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
3109 NOP type conversions.
3110 * decl.c (decls_match): Use comptypes directly; ignore
3111 qualifiers on the DECL.
3112 (duplicate_decls): Remove qualifier checks on DECL.
3113 (grokdeclarator): Make the type built up include top-level
3115 * decl2.c (do_dtors): Fix spelling error.
3116 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
3117 when printing type information.
3118 * init.c (build_new_1): Add documentation. Deal with the fact
3119 that type of allocated memory now contains qualifiers.
3120 * lex.c (is_global): Improve error-recovery.
3121 * sig.c (build_member_function_pointer): Don't cast away const
3122 on fields of sigtable_entry_type.
3123 * tree.c (lvalue_type): Don't look at top-level qualifiers on
3125 * typeck.c (decay_conversion): Likewise.
3126 (build_component_ref): Make sure the type of the COMPONENT_REF
3127 contains top-level qualifiers, as appropriate. Improve
3129 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
3130 (build_array_ref): Likewise.
3131 (build_unary_op): Improve error-recovery.
3132 (unary_complex_lvalue): Make taking the address a bound member
3133 function an error, not a sorry.
3134 (build_conditional_expr): Look at the type qualifiers, not the
3135 qualifiers on the expression itself.
3137 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
3139 * decl2.c (merge_functions): Remove duplicates.
3141 * decl2.c: Add -f{no-,}implicit-inline-templates.
3142 (import_export_decl): Check it.
3144 * decl.c (lookup_name_real): Template parms also take precedence
3145 over implicit typename. Only warn if yylex.
3147 * typeck.c (build_conditional_expr): Only fold if ifexp is an
3150 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
3153 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
3155 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
3156 * class.c (build_vbase_pointer): Use it.
3157 * rtti.c (expand_class_desc): Likewise.
3158 * tree.c (build_vbase_pointer_fields): Likewise.
3160 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
3162 * decl.c (start_decl): Add invocation of
3163 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
3164 (start_function): Add invocation of
3165 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
3167 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
3168 HANDLE_GENERIC_PRAGMAS.
3170 1998-09-28 Anthony Green <green@cygnus.com>
3172 * semantics.c (finish_asm_stmt): Always permit volatile asms.
3174 1998-09-28 Mark Mitchell <mark@markmitchell.com>
3176 * decl.c (grokdeclarator): Tighten checks for invalid
3177 destructors. Improve error-messages and error-recovery.
3178 * decl2.c (check_classfn): Don't assume that mangled destructor
3179 names contain type information.
3181 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
3183 * search.c (get_base_distance): Remove assert.
3185 * decl2.c (build_anon_union_vars): Don't process a field with no
3187 (finish_anon_union): Also complain about local anon unions with no
3190 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3192 * decl.c (lookup_namespace_name): If the name is a namespace,
3193 return it immediately.
3195 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3197 * cp-tree.h (define_case_label): Remove unused parameter.
3198 (check_java_method): Likewise.
3199 (grokclassfn): Likewise.
3200 (expand_aggr_init): Likewise.
3201 (build_x_delete): Likewise.
3202 (maybe_end_member_template_processing): Likewise.
3203 (unshare_base_binfos): Add prototype.
3204 (string_conv_p): Likewise.
3205 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
3207 * cvt.c (build_up_reference): Remove unused parameter
3208 `checkconst', all callers changed.
3209 (build_type_conversion): Mark parameter `code' with
3211 (build_expr_type_conversion): Initialize variable `conv'.
3213 * decl.c (push_namespace): Initialize variable `d'.
3214 (define_case_label): Remove unused parameter `decl', all callers
3217 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
3218 `argc' with ATTRIBUTE_UNUSED.
3219 (grokclassfn): Remove unused parameter `cname', all callers
3221 (check_java_method): Likewise for parameter `ctype'.
3222 (copy_assignment_arg_p): Mark parameter `virtualp' with
3224 (finish_prevtable_vardecl): Likewise for parameter `prev'.
3226 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
3228 * init.c (expand_aggr_init_1): Remove unused parameter
3229 `alias_this', all callers changed.
3230 (expand_aggr_init): Likewise.
3231 (expand_default_init): Likewise.
3232 (build_new_1): Initialize variable `susp'.
3233 (build_x_delete): Remove unused parameter `type', all callers
3236 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
3238 (readescape): Use (unsigned) value in shift.
3239 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
3240 comparing to a signed quantity.
3242 * pt.c (maybe_end_member_template_processing): Remove unused
3243 parameter `decl', all callers changed.
3244 (check_explicit_specialization): Add braces around empty body in
3246 (current_template_args): Initialize variable `args'.
3247 (lookup_template_class): Likewise for variable `prev_local_enum'.
3248 (tsubst_decl): Likewise for variable `r'.
3249 (set_mangled_name_for_template_decl): Initialize variable
3252 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
3253 Likewise for variable `i'.
3254 (yylex): Initialize variable `trrr'.
3256 * typeck.c (compparms): Mark variable `strict' with
3259 * xref.c (simplify_type): Cast argument of ctype function to
3262 1998-09-24 Mark Mitchell <mark@markmitchell.com>
3264 * cp-tree.h (language_lvalue_valid): Remove.
3265 * decl.c (grokdeclarator): Don't disallow references to functions.
3266 * tree.c (lvalue_p_1): New function, combining duplicated
3269 (real_lvalue_p): Likewise.
3270 * typeck.c (language_lvalue_valid): Remove.
3271 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
3272 they don't have TREE_READONLY set.
3273 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
3275 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
3277 * spew.c (yylex): Give diagnostic.
3278 * hash.h (is_reserved_word): Add export.
3279 * gxx.gperf: Likewise.
3280 * lex.h (rid): Add RID_EXPORT.
3281 * lex.c (init_parse): Likewise.
3283 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
3285 * friend.c (do_friend): Make warning a full sentence.
3287 1998-09-22 Mark Mitchell <mark@markmitchell.com>
3289 * parse.y (component_decl_list): Improve error-recovery.
3291 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
3293 * decl.c (make_typename_type): Move error to point where name
3294 variable can be used by dump_type.
3296 1998-09-22 Mark Mitchell <mark@markmitchell.com>
3298 * decl.c (grokfndecl): Improve error-recovery.
3299 * decl2.c (grokfield): Likewise.
3300 * pt.c (finish_member_template_decl): Likewise.
3302 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
3304 * method.c (hack_identifier): Finding multiple members is always
3307 1998-09-21 Per Bothner <bothner@cygnus.com>
3309 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
3311 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
3313 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
3315 1998-09-20 Mark Mitchell <mark@markmitchell.com>
3317 * class.c (maybe_warn_about_overly_private_class): Reformat.
3319 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
3321 * exception.cc (__cplus_type_matcher): Realign some code.
3323 1998-09-16 Mark Mitchell <mark@markmitchell.com>
3325 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
3326 (tinfo2.o): Likewise.
3327 (exception.o): Likewise.
3329 (opnew.o): Likewise.
3330 (opnewnt.o): Likewise.
3331 (opvnew.o): Likewise.
3332 (opvnewnt.o): Likewise.
3333 (opdel.o): Likewise.
3334 (opdelnt.o): Likewise.
3335 (opvdel.o): Likewise.
3336 (opvdelnt.o): Likewise.
3338 1998-09-16 Richard Henderson <rth@cygnus.com>
3340 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
3342 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
3344 * call.c (build_field_call): Handle static data members too.
3346 * typeck.c (comptypes): When comparing pointer types, check
3347 whether referred types match even in strictest modes.
3349 1998-09-15 Mark Mitchell <mark@markmitchell.com>
3351 * cp-tree.h: Revert previous change.
3352 (finish_struct_methods): Remove declaration.
3353 * class.c: Revert previous change.
3354 (maybe_warn_about_overly_private_class): New function.
3355 (finish_struct_methods): Declare here, and make static. Remove
3356 unnecessary parameters. Tidy slightly. Use
3357 maybe_warn_about_overly_private_class.
3358 (finish_struct_1): Adjust. Remove check for private constructors,
3360 (finish_struct): Adjust.
3362 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
3364 * except.c (expand_start_catch_block): No need to check for new
3366 (process_start_catch_block_old): Deleted.
3367 (process_start_catch_block): Add call to start_decl_1().
3368 (expand_end_catch_block): Add call to end_catch_handler().
3369 * exception.cc (__cplus_type_matcher): Only check the exception
3370 language if there is an exception table.
3372 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
3374 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
3375 as used to prevent conflicts with virtual function tables.
3377 1998-09-14 Mark Mitchell <mark@markmitchell.com>
3379 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
3380 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
3381 * class.c (maybe_class_too_private_p): New function.
3382 (finish_struct_methods): Use it.
3383 (finish_struct_1): Likewise.
3384 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
3387 * pt.c (check_specialization_scope): Fix spelling error.
3388 (check_explicit_specialization): Remove code to handle explicit
3389 specializations in class scope; they are now correctly diagnosed
3392 1998-09-10 Mark Mitchell <mark@markmitchell.com>
3394 * decl.c (pushdecl): Don't copy types if the
3395 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
3398 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3400 * class.c (get_enclosing_class): New function.
3401 (is_base_of_enclosing_class): Likewise.
3402 * cp-tree.h (get_enclosing_class): Declare.
3403 (is_base_of_enclosing_class): Likewise.
3404 * pt.c (coerce_template_parms): Use them.
3406 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
3408 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
3409 null to decide whether to use it.
3411 * error.c (dump_type_real): Handle NAMESPACE_DECL.
3412 * parse.y (base_class.1): Avoid crash on error.
3414 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
3416 * decl.c (make_typename_type): If context is a namespace, the code
3419 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
3421 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
3423 1998-09-08 Mark Mitchell <mark@markmitchell.com>
3425 * cp-tree.h (anonymous_namespace_name): Declare.
3426 * decl.c: Define it.
3427 (push_namespace): Use anonymous_namespace_name, rather than local
3429 * error.c (dump_decl): If a namespace is named
3430 anonymous_namespace_name, call it {anonymous}.
3432 * decl.c (grokparms): Distinguish between references and pointers
3435 1998-09-08 Richard Henderson <rth@cygnus.com>
3436 Mark Mitchell <mark@markmitchell.com>
3438 * pt.c (process_partial_specialization): Consistently allocate
3439 and zero tpd.parms based on ntparms. Use tpd2.parms, not
3440 tpd.parms, where appropriate.
3442 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
3444 * Makefile.in (INCLUDES): Update after recent toplevel gcc
3447 1998-09-05 Mark Mitchell <mark@markmitchell.com>
3449 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
3450 * class.c (finish_struct): Remove hackery to deal with explicit
3451 specializations in class scope.
3452 * decl.c (grokfndecl): Improve error-recovery.
3453 * decl2.c (grokfield): Likewise.
3454 * pt.c (check_specialization_scope): New function.
3455 (begin_specialization): Call it.
3456 (process_partial_specialization): New function, split out from
3457 push_template_decl. Check partial specializations more
3459 (push_template_decl): Call it.
3460 (check_explicit_specialization): Don't attempt to handle explicit
3461 specializations in class scope.
3462 (template_parm_data): Document. Add current_arg and
3463 arg_uses_template_parms.
3464 (mark_template_parm): Set it.
3465 (tsubst_arg_types): Remove unused variable.
3466 * semantics.c (begin_class_definition): Tweak.
3468 1998-09-04 Mark Mitchell <mark@markmitchell.com>
3470 * inc/typeinfo (type_info::type_info(const char*)): Make
3473 * cp-tree.h (hash_tree_cons_simple): New macro.
3474 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
3475 (coerce_template_parms): Use make_temp_vec, instead of
3476 make_tree_vec. Document this behavior.
3477 (lookup_template_class): Likewise.
3478 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
3479 Remove dead code (and add assertion to check its deadness). Fix
3480 bug w.r.t. exception specifications.
3482 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
3484 * decl2.c (import_export_vtable): Always make artificials comdat.
3485 (import_export_decl): Likewise.
3486 * pt.c (mark_decl_instantiated): Likewise.
3488 1998-09-03 Mark Mitchell <mark@markmitchell.com>
3490 * cp-tree.h (finish_globally_qualified_member_call_expr):
3492 (finish_qualified_call_expr).
3493 * semantics.c: Likewise.
3494 * parse.y (primary): Use it.
3495 * method.c (hack_identifier): Remove redundant code.
3497 * init.c (resolve_offset_ref): Call convert_from_reference to
3498 handle members of reference type. Improve error recovery.
3500 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
3502 * cp-tree.h: Declare warn_nontemplate_friend.
3503 * decl2.c (lang_decode_option): Set.
3504 * lang-options.h: Add -Wnon-template-friend.
3505 * friend.c (do_friend): Use to toggle non-template function warning.
3507 1998-09-03 Mark Mitchell <mark@markmitchell.com>
3509 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
3510 corresponding INTEGER_CSTs when processing_template_decl.
3511 * pt.c (tsubst_enum): Tweak accordingly.
3513 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3515 * decl.c (pushdecl_class_level): Add warning here.
3518 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
3520 * cvt.c (convert_pointer_to_real): Tidy.
3521 * search.c (get_base_distance_recursive): Simplify.
3522 (get_base_distance): Likewise.
3524 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
3527 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
3529 * lex.c (check_newline): Call HANDLE_PRAGMA before
3530 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
3531 if unknown pragmas are encountered.
3532 (handle_sysv_pragma): Interpret return code from
3533 handle_pragma_token (). Return success/failure indication rather
3534 than next unprocessed character.
3535 (pragma_getc): New function: retrieves characters from the
3536 input stream. Defined when HANDLE_PRAGMA is defined.
3537 (pragma_ungetc): New function: replaces characters back into the
3538 input stream. Defined when HANDLE_PRAGMA is defined.
3540 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3542 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
3543 * class.c (build_vtable_entry_ref): Likewise.
3545 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3547 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
3548 * decl2.c (import_export_decl): Likewise.
3549 * pt.c (instantiate_decl): Use it.
3551 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3553 * decl.c (lookup_name_real): Also do implicit typename thing for
3554 artificial TYPE_DECLs.
3555 * search.c (lookup_field): Likewise.
3556 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
3557 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
3558 (enter_scope_of): Extract type from implicit typename.
3559 (begin_class_definition): Likewise.
3560 * lex.c (identifier_type): Handle implicit typename when checking
3563 * cp-tree.h: Declare flag_strict_prototype.
3564 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
3566 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
3567 specified, set it to the value of pedantic.
3569 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3571 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
3573 1998-08-31 Mark Mitchell <mark@markmitchell.com>
3575 * decl.c (finish_enum): Handle member enums of classes declared in
3578 * decl2.c (grok_x_components): Strip attributes before calling
3581 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
3583 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
3584 -fenum-int-equivalence and -fno-nonnull-objects.
3585 * class.c (check_for_override): Remove support for -fall-virtual.
3586 (finish_struct_1): Likewise.
3587 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
3588 * typeck.c (build_binary_op_nodefault): Likewise.
3589 * cvt.c (ocp_convert): Likewise.
3590 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
3591 * class.c (build_vbase_path): Likewise.
3593 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
3595 * Makefile.in (INTERFACE): New, set to 1.
3597 1998-08-30 Mark Mitchell <mark@markmitchell.com>
3599 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
3600 comparing with global_namespace.
3601 (dump_aggr_type): Likewise.
3603 * decl.c (grokfndecl): Issue error on declaration of friend
3604 templates with explicit template arguments.
3606 * pt.c (convert_template_argument): New function, split out
3608 (coerce_template_parms): Here.
3609 (tsubst): Attempt better error-recovery.
3611 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
3613 * pt.c (decl_template_parm_p): Add checks for
3614 TEMPLATE_TEMPLATE_PARM.
3616 1998-08-28 Mark Mitchell <mark@markmitchell.com>
3618 * lex.c (do_identifier): Fix thinko in previous change.
3620 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
3622 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
3623 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
3625 1998-08-28 Richard Henderson <rth@cygnus.com>
3627 Add support for discarding unused virtual functions.
3628 * lang-options.h: Add -fvtable-gc.
3629 * cp-tree.h: Add flag_vtable_gc.
3630 * decl2.c (output_vtable_inherit): New fn.
3631 (finish_vtable_vardecl): Call it.
3632 * class.c (build_vtable_entry_ref): New fn.
3633 (build_vtbl_ref): Call it.
3635 1998-08-28 Mark Mitchell <mark@markmitchell.com>
3637 * cp-tree.h (build_enumerator): Take the enumeration type as a
3639 * decl.c (finish_enum): Don't set the TREE_TYPE for the
3640 enumeration constant values if we're processing_template_decls.
3641 Don't set the type for the CONST_DECLs either; that's done in
3643 (build_enumerator): Take the enumeration type as a
3645 * lex.c (do_identifier): Don't resolve enumeration constants while
3646 processing template declarations, even if they happen to be
3647 TEMPLATE_PARM_INDEXs.
3649 * parse.y (current_enum_type): New variable.
3650 (primary): Don't allow statement-expression in local classes just
3651 as we don't in global classes.
3652 (structsp): Use current_enum_type.
3653 (enum_list): Likewise.
3654 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
3655 finish_enum; they no longer occur.
3657 * cp-tree.h (finish_base_specifier): New function.
3658 * parse.y (base_class): Use it.
3659 * semantics.c (finish_base_specifier): Define it.
3661 * parse.y (structsp): Warn on use of typename outside of template
3664 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
3666 * lex.c (handle_cp_pragma): Remove #pragma vtable.
3667 * lang-options.h: Remove +e options.
3668 * decl2.c (lang_decode_option): Likewise.
3669 (import_export_vtable): Don't check write_virtuals.
3670 (finish_vtable_vardecl, finish_file): Likewise.
3671 * search.c (dfs_debug_mark): Likewise.
3672 * semantics.c (begin_class_definition): Likewise.
3673 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
3675 * call.c (build_over_call): Check flag_elide_constructors.
3676 * decl2.c: flag_elide_constructors defaults to 1.
3677 * typeck.c (convert_arguments): Remove return_loc parm.
3678 (build_function_call_real): Adjust.
3680 * search.c: Tear out all mi_matrix and memoize code.
3681 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
3682 * lang-options.h: Remove documentation for -fhandle-exceptions,
3683 -fmemoize-lookups and -fsave-memoized.
3684 * cp-tree.h: Lose mi_matrix and memoize support.
3685 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
3686 * class.c: Lose struct class_level.
3687 (pushclass, popclass): Lose memoize support.
3688 * init.c (build_offset_ref): Likewise.
3690 Never change BINFO_INHERITANCE_CHAIN.
3691 * init.c (emit_base_init): Change modification of
3692 BINFO_INHERITANCE_CHAIN to an assert.
3693 * search.c (get_base_distance_recursive): Likewise.
3694 (get_base_distance): Likewise.
3695 (lookup_member): Likewise.
3696 (convert_pointer_to_single_level): Likewise.
3697 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
3698 (lookup_fnfields): Likewise.
3699 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
3700 (unshare_base_binfos): Don't call propagate_binfo_offsets.
3701 (layout_basetypes): Call propagate_binfo_offsets instead of
3702 unshare_base_binfos.
3703 * decl.c (xref_basetypes): Call unshare_base_binfos.
3704 * pt.c (instantiate_class_template): Likewise.
3705 * tree.c (reverse_path): Remove 'copy' parm; always make a
3707 * class.c (build_vbase_path): Just call it.
3708 * search.c (compute_access): Likewise. Don't re-reverse.
3710 1998-08-27 Mark Mitchell <mark@markmitchell.com>
3712 * class.c (build_vbase_path): Use reverse_path.
3713 (finish_base_struct): Move warnings for inaccessible bases to
3715 (modify_one_vtable): Remove check of TREE_USED (binfo).
3716 (fixup_vtable_deltas1): Likewise.
3717 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
3718 (xref_tag): Remove binfos parameter.
3719 (make_binfo): Remove chain parameter.
3720 (reverse_path): Add copy parameter.
3721 * decl.c (init_decl_processing): Change calls to xref_tag.
3722 (xref_tag): Remove binfos parameter.
3723 (xref_basetypes): Change calls to make_binfo.
3724 * decl2.c (grok_x_components): Change calls to xref_tag.
3725 (handle_class_head): Likewise.
3726 * friend.c (do_friend): Likewise.
3727 * lex.c (make_lang_type): Change calls to make_binfo.
3728 * parse.y (structsp): Change calls to xref_tag.
3729 (named_complex_class_head_sans_basetype): Likewise.
3730 (named_class_head): Likewise.
3731 * rtti.c (init_rtti_processing): Likewise.
3732 * search.c (compute_access): Change calls to reverse_path.
3733 (dfs_get_vbase_types): Change calls to make_binfo.
3734 (get_vbase_types): Remove dead code.
3735 * tree.c (unshare_base_binfos): Change calls to make_binfo.
3736 (layout_basetypes): Warn here about inaccessible bases.
3737 (make_binfo): Remove chain parameter.
3738 (reverse_path): Add copy parameter.
3740 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
3742 * class.c: #if 0 complete_type_p.
3743 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
3744 * method.c (process_overload_item): Likewise.
3745 * typeck.c (comp_target_types): Likewise.
3747 Stop sharing binfos for indirect virtual bases.
3748 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
3749 (layout_basetypes): Likewise.
3750 (unshare_base_binfos): Copy vbases, too.
3751 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
3752 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
3753 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
3754 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
3755 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
3756 reference to BINFO_VIA_PUBLIC.
3757 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
3758 (push_class_decls): Use them.
3759 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
3760 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
3762 1998-08-27 Mark Mitchell <mark@markmitchell.com>
3764 * decl.c (build_enumerator): Set DECL_CONTEXT for the
3767 1998-08-26 Mark Mitchell <mark@markmitchell.com>
3769 * cp-tree.h (finish_enum): Change prototype.
3770 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
3771 VALUES parameter. Don't try to compute mins/maxs if
3772 processing_template_decl.
3773 * parse.y (structsp): Use new calling sequence for finish_enum.
3774 * pt.c (tsubst_enum): Likewise. Take the new type as input.
3775 (lookup_template_class): Remove unused variables. Tweak.
3776 Register enums on instantiation list before substituting
3777 enumeration constants.
3778 (tsubst_decl): Remove unused variables.
3779 (regenerate_decl_from_template): Likewise.
3781 * decl.c (duplicate_decls): Don't obliterate the
3782 DECL_TEMPLATE_INFO for a template if we're not replacing it with
3785 * lex.c (do_identifier): Fix typo in comment.
3787 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3789 * errfn.c: Remove stdarg.h/varargs.h.
3792 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
3794 * pt.c (tsubst_copy): Only do typename overloading on an
3795 IDENTIFIER_NODE that happens to look like a typename if it actually
3796 has a type for us to use.
3798 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
3800 * typeck.c (comp_cv_target_types): Split out...
3801 (comp_target_types): From here. Don't allow cv-qual changes under
3802 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
3803 (build_ptrmemfunc): Pass 1 to nptrs.
3804 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
3806 1998-08-25 Mark Mitchell <mark@markmitchell.com>
3808 * search.c (dependent_base_p): Don't compare a binfo to
3809 current_class_type; use the TREE_TYPE of the binfo instead.
3811 * cp-tree.h (CLASS_TYPE_P): Revise definition.
3813 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
3815 * decl.c (duplicate_decls): Don't complain about different
3816 exceptions from an internal decl even if pedantic.
3818 * typeck.c (convert_for_assignment): Converting from pm of vbase
3819 to derived is an error, not a sorry.
3821 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
3822 * class.c (fixed_type_or_null): Rename from
3823 resolves_to_fixed_type_p. Return the dynamic type of the
3824 expression, if fixed, or null.
3825 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
3826 does not match the static type.
3827 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
3828 resolves_to_fixed_type_p again.
3830 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3832 * pt.c (tsubst_decl): Move special case code for dealing with
3833 tricky friend templates here from ...
3834 (regenerate_decl_from_template): Here.
3836 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3838 * decl.c (start_decl): Remove redundant linkage check.
3840 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
3842 * typeck.c (c_expand_return): Handle the case that valtype
3843 is wider than the functions return type.
3845 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3847 * cp-tree.h (CLASS_TYPE_P): New macro.
3848 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
3849 * pt.c (process_template_parm): Undo previous change.
3851 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
3853 * cp-tree.h: Declare.
3854 * pt.c (decl_template_parm_p): New function.
3855 * decl.c (pushdecl): Check decls for redeclaring template parms.
3856 (xref_tag): Make redeclaration an error, print decl.
3857 * decl2.c (grokfield): Check field_decls for redeclaration as well.
3859 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3861 * parse.y (primary): Fix up the type of string constants.
3863 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3865 * typeck.c (convert_for_initialization): Move check for odd uses
3866 of NULL to avoid duplicate warnings.
3868 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3870 * tree.c (lvalue_type): Fix for arrays.
3871 * typeck.c (string_conv_p): New fn.
3872 (convert_for_assignment): Use it.
3873 (build_unary_op): Use lvalue_type.
3874 * call.c (standard_conversion, convert_like): Use string_conv_p.
3875 (add_function_candidate): Use lvalue_type.
3876 * cvt.c (convert_to_reference): Likewise.
3877 * decl2.c (lang_decode_option): Ignore -traditional.
3878 * decl.c (init_decl_processing): flag_writable_strings inhibits
3881 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
3883 * lang-options.h (lang_options): Add fconst-strings to the list
3885 * decl2.c (lang_f_options, lang_decode_option): Likewise.
3887 1998-08-24 Nathan Sidwell <nathan@acm.org>
3889 * lex.c (real_yylex): Don't warn about long long constants if
3890 we're allowing long long.
3892 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3894 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
3895 accessing bindings directly.
3897 * search.c (my_tree_cons): Reimplement.
3899 * lang-specs.h: Remove __HONOR_STD.
3900 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
3902 1998-08-23 Mark Mitchell <mark@markmitchell.com>
3904 * decl.c (grokdeclarator): Complain about in-class initialization
3905 of aggregates and/or references.
3906 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
3907 TEMPLATE_TYPE_PARMs.
3909 * decl2.c (grok_array_decl): Add comment.
3910 (mark_used): Don't instantiate an explicit instantiation.
3911 * friend.c (make_friend_class): Remove bogus comment. Fix check
3912 for partial specializations.
3913 * pt.c (check_explicit_specialization): Don't
3914 SET_DECL_EXPLICIT_INSTANTIATION here.
3915 (mark_decl_instantiated): Or here.
3916 (do_decl_instantiation): Do it here, instead. Add checks for
3917 duplicate explicit instantiations, etc. Tidy.
3918 (do_type_instantiation): Likewise.
3919 (instantiate_decl): Improve comments. Complain about explicit
3920 instantiations where no definition is available.
3922 * cp-tree.h (ansi_null_node): Remove.
3923 * call.c (build_over_call): Warn about converting NULL to an
3925 * cvt.c (build_expr_type_conversion): Likewise. Use
3926 null_ptr_cst_p instead of expanding it inline.
3927 * decl.c (ansi_null_node): Remove.
3928 (init_decl_processing): Make null_node always have integral type.
3929 * except.c (build_throw): Warn about converting NULL to an
3931 * lex.c (init_parse): Remove handling of ansi_null_node.
3932 * pt.c (type_unification_real): Don't convert NULL to void* type.
3933 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
3934 (convert_for_assignment): Warn about converting NULL to an
3936 (convert_for_initialization): Likewise.
3938 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3940 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
3941 * pt.c (coerce_template_parms): Use no_linkage_check.
3942 * decl.c (grokvardecl): Likewise.
3943 (grokfndecl): Likewise. Members of anonymous types have no linkage.
3945 * method.c (process_overload_item): Remove useless code.
3947 1998-08-20 Per Bothner <bothner@cygnus.com>
3949 Handle new'ing of Java classes.
3950 * init.c (build_class_classref): New function.
3951 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
3952 constructor does not return this; don't need to exception-protect.
3954 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
3955 * decl2.c (acceptable_java_type): Handle template-derived types.
3957 1998-08-20 Per Bothner <bothner@cygnus.com>
3959 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
3961 1998-08-20 Mark Mitchell <mark@markmitchell.com>
3963 * decl.c (duplicate_decls): Always merge the old and new patterns
3964 for templates, regardless of whether or not the new one has
3965 DECL_INITIAL. Don't throw away specializations. Merge
3967 * pt.c (tsubst_decl): Use the right pattern when calculating the
3968 complete args for a new template instance.
3969 (do_decl_instantiation): Fix typo in comment.
3970 (regenerate_decl_from_template): Deal with tricky friend template
3972 (instantiate_decl): Likewise.
3974 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
3976 * init.c (build_builtin_delete_call): Add missing assemble_external
3979 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3981 * parse.y (notype_unqualified_id): Also accept ~A<int>.
3983 1998-08-19 Mark Mitchell <mark@markmitchell.com>
3985 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
3987 * except.c (build_throw): Warn when NULL is thrown, even with
3988 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
3991 * cp-tree.h (ansi_null_node): New variable.
3992 * decl.c (ansi_null_node): New variable.
3993 (init_decl_processing): Initialize its type.
3994 * lex.c (init_parse): Initialize its value. Use ansi_null_node
3995 for null_node in non-ANSI mode.
3996 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
3997 place of null_node to avoid spurious errors.
3999 1998-08-17 Mark Mitchell <mark@markmitchell.com>
4001 * cp-tree.h (enter_scope_of): New function.
4002 * parse.y (complex_direct_notype_declarator): Use it.
4003 * semantics.c (enter_scope_of): New function.
4005 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
4007 * decl.c (grokparms): No, here.
4009 * decl.c (grokdeclarator): Catch parm with pointer to array of
4010 unknown bound here...
4011 * method.c (process_overload_item): ...not here.
4013 * gxxint.texi: Remove obsolete documentation of overloading code.
4015 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
4016 * class.c (finish_struct_bits): Likewise.
4018 * tree.c (lvalue_type): Fix for arrays.
4019 * typeck.c (build_unary_op): Use lvalue_type.
4020 * call.c (add_function_candidate): Likewise.
4021 * cvt.c (convert_to_reference): Likewise.
4023 * decl2.c (lang_decode_option): Ignore -traditional.
4025 * init.c (build_offset_ref): Don't mess with error_mark_node.
4026 * lex.c (do_scoped_id): Use cp_error.
4028 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
4030 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
4032 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
4034 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
4036 * cp-tree.h (set_identifier_local_value): Provide prototype.
4038 * decl2.c (do_namespace_alias): Remove unused variables `binding'
4041 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
4043 * Makefile.in: Rename BBISON to BISON so that it can be properly
4044 inherited from the parent makefile.
4046 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
4048 * lang-options.h: Add -finit-priority.
4049 * decl2.c: Likewise. Check flag_init_priority instead of
4052 * decl2.c (setup_initp): New fn.
4053 (start_objects, finish_objects, do_ctors): Handle init_priority.
4054 (do_dtors, finish_file): Likewise.
4056 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
4058 * pt.c (tsubst_copy): Hush warning.
4060 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
4062 1998-08-12 Mark Mitchell <mark@markmitchell.com>
4064 * pt.c (print_template_context): Don't abort when instantiating a
4067 * decl.c (grokdeclarator): Issue errors on namespace qualified
4068 declarators in parameter lists or in class scope.
4070 1998-08-09 Mark Mitchell <mark@markmitchell.com>
4072 * pt.c (check_explicit_specialization): Don't abort on bogus
4073 explicit instantiations.
4075 1998-08-07 Mark Mitchell <mark@markmitchell.com>
4077 * typeck.c (require_complete_type): Use complete_type_or_else.
4078 (complete_type_or_else): Always return NULL_TREE on failure, as
4081 * pt.c (tsubst_aggr_type): Prototype.
4082 (tsubst_decl): New function, split out from tsubst. Set
4083 input_filename and lineno as appropriate.
4084 (pop_tinst_level): Restore the file and line number saved in
4086 (instantiate_class_template): Set input_filename and lineno as
4088 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
4089 context for a TYPENAME_TYPE is complete.
4091 * decl2.c (grokbitfield): Issue errors on bitfields declared with
4093 (do_dtors): As in do_ctors, pretend to be a member of the same
4094 class as a static data member while generating a call to its
4097 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
4098 conversions, even in complex virtual base class hierarchies.
4100 1998-08-06 Mark Mitchell <mark@markmitchell.com>
4102 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
4103 (TYPE_TEMPLATE_INFO): Likewise.
4104 (SET_TYPE_TEMPLATE_INFO): Likewise.
4105 (ENUM_TI_TEMPLATE): Likewise.
4106 (ENUM_TI_ARGS): Likewise.
4107 (lookup_nested_type_by_name): Remove.
4108 * decl.c (maybe_process_template_type_declaration): Handle enums.
4109 (start_enum): Don't check for primary-template enum declarations
4111 (finish_enum): Clean up, document. Make sure template enum
4112 constants get the correct type.
4113 (build_enumerator): Copy initializers for template enumerations,
4115 (grok_enum_decls): Document.
4116 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
4117 better. Build LOOKUP_EXPRs for local variables, even if they are
4119 * pt.c (tsubst_enum): Remove field_chain parameter.
4120 (template_class_depth): Include the depth of surrounding function
4122 (push_template_decl): Check for primary-template enum declarations
4123 here. Deal with enumeration templates.
4124 (lookup_template_class): Likewise.
4125 (for_each_template_parm): Likewise.
4126 (instantiate_class_template): Don't call tsubst_enum directly,
4127 call tsubst instead, to instantiate enums. Deal with all
4128 field_chain issues here, not in tsubst_enum.
4129 (lookup_nested_type_by_name): Remove.
4130 (tsubst_aggr_type): Revise handling of enumeration types.
4132 (tsubst_copy): Likewise.
4133 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
4135 1998-08-04 Mark Mitchell <mark@markmitchell.com>
4137 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
4138 uses template parameters.
4139 * method.c (build_template_parm_names): Use the full set of
4140 template arguments for tsubst'ing.
4141 (build_overload_identifier): Pass the full set of template
4142 arguments to build_template_parm_names, not just the
4144 * pt.c (TMPL_ARGS_DEPTH): Define using
4145 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
4146 (NUM_TMPL_ARGS): New macro.
4147 (add_outermost_template_args): Deal with the case where the outer
4148 args will be completely discarded.
4149 (coerce_template_parms): Use the full set of template arguments
4150 for tsubst'ing. Simplify. Add some asserts. Improve
4152 (lookup_template_class): Pass the full set of template arguments
4153 to coerce_template_parms.
4154 (tsubst): Add assertion.
4155 (do_type_instantiation): Don't instantiate member template
4158 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
4159 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
4161 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
4163 * method.c (set_mangled_name_for_decl): Change return type to void.
4165 * decl.c (lookup_name_real): A namespace-level decl takes priority
4166 over implicit typename. Avoid doing the same lookup twice.
4168 * search.c (dependent_base_p): New fn.
4169 (dfs_pushdecls, dfs_compress_decls): Use it.
4171 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
4172 virtual functions if the type doesn't have any.
4174 1998-08-03 Mark Mitchell <mark@markmitchell.com>
4176 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
4177 uses template parameters.
4179 1998-08-02 Mark Mitchell <mark@markmitchell.com>
4181 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
4182 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
4183 * lex.c (do_identifier): Don't use a second argument, or a type,
4184 when building LOOKUP_EXPRs.
4185 (do_identifier): Likewise.
4186 (do_scoped_id): Likewise.
4187 * method.c (hack_identifier): Improve error message.
4188 * pt.c (lookup_template_function): Don't needlessly call
4189 copy_to_permanent or build_min.
4190 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
4192 (do_decl_instantiation): Improve error message.
4193 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
4194 (build_min): Copy the type to the permanent obstack, too.
4196 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
4198 * init.c (init_init_processing): Remove BI* handling.
4199 (build_builtin_call): Remove.
4200 (build_builtin_delete_call): New fn.
4201 (build_delete): Use it.
4203 1998-07-31 Mark Mitchell <mark@markmitchell.com>
4205 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
4206 (maybe_check_template_type): New function.
4207 * decl.c (maybe_process_template_type_declaration): New function,
4208 split out from pushtag Call maybe_check_template_type.
4209 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
4210 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
4211 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
4212 * pt.c (template_class_depth_real): Generalization of ...
4213 (template_class_depth): Use it.
4214 (register_specialization): Use duplicate_decls for duplicate
4215 declarations of specializations.
4216 (maybe_check_template_type): New function.
4217 (push_template_decl_real): Fix comment.
4218 (convert_nontype_argument): Likewise.
4219 (lookup_template_class): Likewise. Avoid an infinite loop on
4221 (tsubst_friend_function): Fix comment.
4222 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
4224 * semantics.c (begin_function_definition): Use
4225 reset_specialization to note that template headers don't apply
4226 directly to declarations after the opening curly for a function.
4228 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
4230 * decl.c (push_overloaded_decl): Use current_namespace instead of
4231 DECL_CONTEXT (decl) to determine where we go.
4233 * decl.c (lookup_name_real): Fix typo.
4235 1998-07-28 Mark Mitchell <mark@markmitchell.com>
4237 * friend.c (is_friend): Be lenient with member functions to deal
4238 with nested friends.
4240 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
4242 * class.c (finish_struct_1): Convert integer_zero_node to
4243 ssizetype before passing it to set_rtti_entry.
4244 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
4245 of any size to a pointer.
4247 1998-07-27 Mark Mitchell <mark@markmitchell.com>
4249 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
4250 (build_template_decl_overload): Remove.
4251 (set_mangled_name_for_decl): New function.
4252 (innermost_args): Remove is_spec parameter.
4253 (most_specialized, most_specialized_class): Remove declarations.
4254 (lookup_template_class): Add entering_scope parameter.
4255 (maybe_process_partial_specialization): New function.
4256 (finish_template_decl): Likewise.
4257 (finish_template_type): Likewise.
4258 * class.c (finish_struct): Clean up processing of member template
4260 * decl.c (pushtag): Fix formatting.
4261 (lookup_tag): Improve handling of pseudo-global levels.
4262 (make_typename_type): Adjust call to lookup_template_class.
4263 (shadow_tag): Use maybe_process_partial_specialization.
4264 (xref_tag): Improve handling of member friends.
4265 (start_function): Call push_nested_class before
4266 push_template_decl. Don't call push_template_decl for
4268 * decl2.c (grok_x_components): Don't call xref_tag for
4269 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
4270 (grokclassfn): Use set_mangled_name_for_decl.
4271 (arg_assoc_class): Adjust call to innermost_args.
4272 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
4273 * error.c (dump_function_name): Improve printing of template
4275 * friend.c (is_friend): Don't compare types of decls to determine
4276 friendship, unless flag_guiding_decls.
4277 (make_friend_class): Partial specializations cannot be friends.
4278 (do_friend): Use set_mangled_name_for_decl. Call
4279 push_template_decl_real instead of push_template_decl.
4280 * method.c (build_decl_overload_real): Remove prototype. Give it
4282 (build_overload_identififer): Adjust call to innermost_args.
4283 (build_template_decl_overload): Remove.
4284 (set_mangled_name_for_decl): New function.
4285 * parse.y (.finish_template_type): New non-terminal.
4286 (template_def): Use finish_template_decl. Use template_extdef
4288 (template_extdef, template_datadef): New non-terminals, containing
4289 only those rules for things which can be templates.
4291 (template_type, self_template_type): Use .finish_template_type.
4292 (named_class_head): Use maybe_process_partial_specialization.
4293 * pt.c (mangle_class_name_for_template): Remove context parameter.
4294 (get_class_bindings): Remove outer_args parameter.
4295 (complete_template_args): Remove.
4296 (add_outermost_template_args): New function.
4297 (register_specialization): Return the specialization.
4298 (unregister_specialization): New function.
4299 (tsubst_template_parms): Likewise.
4300 (most_specialized, most_specialized_class): Prototype here as
4302 (original_template): Rename to most_general_template.
4303 (tsubst_template_parms): New function.
4304 (set_mangled_name_for_template_decl): Likewise.
4305 (TMPL_ARGS_DEPTH): New macro.
4306 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
4307 (TMPL_ARGS_LEVEL): New macro.
4308 (SET_TMPL_ARGS_LEVEL): Likewise.
4309 (TMPL_ARG): Likewise.
4310 (SET_TMPL_ARG): Likewise.
4311 (TMPL_ARGS_DEPTH): Likewise.
4312 (finish_member_template_decl): Use finish_template_decl.
4313 (maybe_process_partial_specialization): New function, split out
4315 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
4316 (maybe_begin_member_template_processing): Use new macros.
4317 (is_member_template): Likewise.
4318 (is_member_template_class): Likewise.
4319 (add_to_template_args): Likewise. Deal with multiple levels of
4321 (maybe_process_partial_specialization): New function.
4322 (retrieve_specialization): Add consistency check.
4323 (determine_specialization): Return full argument list.
4324 (check_explicit_specialization): Tweak friend handling. Use full
4325 argument lists. Simplify.
4326 (current_template_args): Use new macros.
4327 (push_template_decl_real): Change ill-named mainargs to specargs.
4328 Check that a partial specialization actually specializes at least
4329 one parameter. Improve friend handling. Modify for full
4331 (classtype_mangled_name): Don't mangle the names of
4333 (lookup_template_class): Add entering_scope parameter. Use it to
4334 avoid finding a template type when an instantiation is required.
4335 Simplify. Use full template arguments.
4336 (tsubst_friend_function): Use unregister_specialization. Use new
4337 macros. Use full template arguments.
4338 (tsubst_friend_class): Substitute, using tsubst_template_parms,
4339 into the template parameters before passing them to
4340 redeclare_class_template.
4341 (instantiate_class_template): Simplify. Use full template
4342 arguments. Adjust calls to get_class_bindings. Use
4343 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
4344 (innermost_args): Use new macros.
4345 (tsubst_aggr_type): New function, split out from tsubst.
4346 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
4347 conventions for lookup_template_class. Refine handling of partial
4348 instantiations. Remove calls to complete_template_args.
4349 Simplify. Add consistency checks. Use set_mangled_name_for_decl
4350 and set_mangled_name_for_template_decl.
4351 (tsubst_copy): Use tsubst_aggr_type.
4352 (instantiate_template): Use full template arguments.
4353 (more_specialized): Improve formatting.
4354 (more_specialized_class): Adjust calls to get_class_bindings.
4355 (get_bindings_real): Don't call complete_template_args.
4356 (most_specialized): Don't overwrite input; create a new list.
4357 (most_specialized_class): Use most_general_template.
4358 (regenerate_decl_from_template): Use unregister_specialization.
4359 Use full template arguments.
4360 (instantiate_decl): Use full template arguments.
4361 (set_mangled_name_for_template_decl): New function.
4362 * semantics.c (begin_class_definition): Use
4363 maybe_process_partial_specialization.
4364 (finish_member_class_template): New function.
4365 (finish_template_decl): Likewise.
4366 (finish_template_type): Likewise.
4367 (typeck.c): Don't crash after issuing a compiler_error.
4368 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
4370 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
4372 * typeck2.c (build_functional_cast): Handle default-initialization.
4374 * call.c (build_over_call): Pass 1 to popclass.
4376 * parse.y (direct_notype_declarator): Add precedence declaration
4377 to notype_unqualified_id case.
4378 * Makefile.in (EXPECT): Adjust.
4380 * tree.c (ovl_member): Fix for single function in OVL.
4382 1998-07-27 Dave Brolley <brolley@cygnus.com>
4384 * c-lex.c (yylex): Fix boundary conditions in character literal and
4385 string literal loops.
4387 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
4389 * decl.c (lookup_name_real): OK, do return the from_obj value
4390 unless got_object depends on template parms.
4392 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
4394 * pt.c (coerce_template_parms): Also complain about local enums.
4396 * cp-tree.h: Add prototype for set_identifier_local_value.
4397 * decl.c (set_identifier_local_value_with_scope): Make static,
4399 * search.c (covariant_return_p): Likewise.
4400 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
4402 * call.c (build_method_call): Only pull out the type of a destructor
4403 if it's a template type parm.
4404 * decl.c (lookup_name_real): Never return the from_obj value.
4406 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
4408 * except.c (process_start_catch_block_old): Call start_decl_1 for
4410 * decl.c (start_decl_1): Avoid duplicate error.
4412 * init.c (expand_default_init): Only perform the initialization if
4413 it will do something.
4415 1998-07-23 H.J. Lu (hjl@gnu.org)
4417 * parse.y (base_class): Check for invalid base class.
4419 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
4421 * decl2.c (import_export_template): Fold in...
4422 (import_export_class): ...to here. Handle dllimport/export.
4424 * class.c (build_vtable): Pass at_eof to import_export_vtable.
4425 (prepare_fresh_vtable): Likewise.
4426 * decl2.c (import_export_class): Split out...
4427 (finish_prevtable_vardecl): From here.
4428 * class.c (finish_struct_1): Call import_export_class if at_eof.
4430 * decl.c (start_function): #if 0 mysterious code I wrote and have
4432 * rtti.c (get_tinfo_fn): If this is for a class type, set
4435 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
4437 * inc/exception: Change terminate and unexpected to ().
4439 * parse.y (named_class_head_sans_basetype_defn): A
4440 named_class_head_sans_basetype followed by '{' or ':' is a defn.
4442 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
4444 * tree.c (canonical_type_variant): New fn to handle arrays.
4445 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
4446 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
4447 * method.c (process_overload_item): Use build_overload_value for
4450 1998-07-20 Dave Brolley <brolley@cygnus.com>
4452 * lex.c (mbchar.h): #include it.
4453 (GET_ENVIRONMENT): New macro.
4454 (init_parse): Set character set based on LANG environment variable.
4455 (real_yylex): Handle multibyte characters in character literals.
4456 (real_yylex): Handle multibyte characters in string literals.
4458 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
4460 * lex.c (do_identifier): Look for class value even if we don't
4461 have a global value. Do implicit declaration if parsing is 2.
4462 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
4465 1998-07-19 Mark Mitchell <mark@markmitchell.com>
4467 * decl.c (pushtag): Revert previous change.
4468 * pt.c (lookup_template_class): Don't put out debugging
4469 information for types that use template parameters.
4471 * decl.c (pushtag): Don't put out debugging information for
4472 compiler-generated typedefs.
4474 * error.c (dump_type_real): Don't crash when presented with
4475 intQI_type_node or the like.
4477 * semantics.c (finish_translation_unit): Fix spelling error in
4480 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
4482 * decl.c (lookup_name_real): Pull out single function here.
4483 (select_decl): Not here.
4484 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
4486 * decl.c (qualify_lookup): Tweak again.
4488 * pt.c (lookup_template_class): Don't mess with the context of the
4490 * decl2.c (current_decl_namespace): Remove special handling for
4493 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
4494 a member template specialization.
4496 * tree.c (ovl_member): Use decls_match to compare functions.
4497 * decl.c (decls_match): Check the context of a function.
4499 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
4500 in Koenig lookup support rules.
4501 * semantics.c (finish_call_expr): Handle the new cases.
4503 * typeck.c (build_x_function_call): Handle overloaded methods.
4505 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
4507 1998-07-16 Mark Mitchell <mark@markmitchell.com>
4509 * semantics.c (finish_object_call_expr): Revert previous change.
4510 * call.c (build_new_method_call): Likewise. Instead, convert
4511 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
4513 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
4515 * decl.c (qualify_lookup): Handle templates.
4517 * decl2.c (do_using_directive): Don't pass ancestor.
4518 * decl.c (push_using_directive): Calculate ancestor.
4520 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
4521 * decl.c (pushdecl): Move type shadowing handling from here...
4522 (duplicate_decls): ...to here.
4523 * decl.c (set_identifier_local_value_with_scope): New fn.
4525 (set_identifier_local_value, lookup_type_current_level): New fns.
4526 * decl2.c (do_local_using_decl): Handle types and binding level
4529 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
4530 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
4531 (lookup_namespace_name): Likewise.
4532 * typeck.c (build_unary_op): Not here anymore.
4534 * decl2.c (do_class_using_decl): Make sure we get an identifier.
4535 * class.c (handle_using_decl): Ignore TYPE_DECLs.
4537 * decl.c (qualify_lookup): New fn.
4538 (lookup_name_real): Use it.
4540 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4542 * decl2.c (add_using_namespace): When directly using a namespace
4543 that was indirect before, promote it.
4545 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
4546 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
4547 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
4548 * decl.c (select_decl): Replace two flag parameters by one.
4549 (unqualified_namespace_lookup): Likewise, pass flag.
4550 (lookup_flags): New function.
4551 (lookup_name_real): Compute flags, pass them.
4552 (lookup_namespace_name): Call with zero-flag.
4553 * decl2.c (ambiguous_decl): Add flag parameter, complain only
4555 (lookup_using_namespace, qualified_lookup_using_namespace):
4556 Add flag parameter, pass them through.
4557 * lex.c (do_scoped_id): Call with zero-flag.
4559 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
4561 * typeck.c (convert_for_assignment): Use comptypes.
4563 1998-07-16 Mark Mitchell <mark@markmitchell.com>
4565 * semantics.c (finish_object_call_expr): Move test for the
4566 function called being a TYPE_DECL to ...
4567 * call.c (build_new_method_call): Here.
4569 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4571 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
4572 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
4574 * lex.c (looking_for_typename): Don't initialize.
4576 * decl2.c (ambiguous_decl): Clarify error message.
4578 * decl.c (push_using_directive): Iterate over namespaces used
4581 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4583 * decl2.c (add_using_namespace): Iterate over namespaces used
4586 * decl.c (lookup_name_real): Accept namespace aliases as locals.
4587 (cat_namespace_levels): Ignore aliases.
4588 (duplicate_decls): Ignore duplicate aliases.
4589 * decl2.c (do_namespace_alias): Process block level namespace
4590 aliases. Store alias with pushdecl. Remove odr errors.
4591 * parse.y (namespace_alias): New non-terminal.
4594 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4596 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
4597 Handle TEMPLATE_TYPE_PARM.
4598 (arg_assoc): Rewrite.
4600 * pt.c (complete_template_args): Don't look at the context unless
4603 * method.c (build_decl_overload_real): Fix namespace handling.
4605 * typeck.c (build_unary_op): Extract a lone function from an
4608 * call.c (build_scoped_method_call): Handle getting a namespace
4609 for basetype in a destructor call.
4610 (check_dtor_name): Handle enums.
4612 * parse.y (using_directive): New nonterminal.
4613 (extdef, simple_stmt): Use it.
4615 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4617 * decl2.c (add_function): Move error message ...
4618 (arg_assoc_namespace): ... from here.
4620 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
4622 * parse.y (namespace_qualifier): Fix multiple level handling.
4623 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
4624 (arg_assoc): Don't skip the first argument of a function.
4626 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
4628 * search.c (my_tree_cons): Clean up.
4630 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
4632 * call.c (joust): Don't warn about "confusing" conversions to the
4635 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4637 * class.c (push_nested_class): Complain about namespaces.
4638 * decl.c (start_decl): Enter the object's namespace.
4639 (cp_finish_decl): Leave it.
4640 (grokdeclarator): Likewise.
4641 * decl2.c (check_decl_namespace): New function.
4642 (finish_file): Call it.
4643 * parse.y (complex_direct_notype_declarator): Set complexity
4644 of namespace-qualified ids to -1, enter the namespace.
4646 * method.c (build_template_decl_overload): Expect _DECL as first
4647 parameter. Put context temporarily into current_namespace.
4648 * pt.c (check_explicit_specialization): Change caller.
4651 * init.c (build_offset_ref): Call mark_used and
4652 convert_from_reference for namespace members.
4654 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
4656 * search.c (my_tree_cons): The bitfield is at index 2.
4658 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
4660 * lang-options.h: Format changed to work with new --help support
4663 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
4665 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
4666 Do Koenig lookup in CALL_EXPR.
4667 (arg_assoc): Handle error_mark.
4668 * lex.c (is_global): New function.
4669 (do_identifier): Expect arguments for Koenig lookup.
4670 * parse.y (primary): Add rules for calls of unqualified function calls.
4671 (do_id): Change call of do_identifier.
4672 * pt.c (finish_stmt_expr): Likewise.
4673 * semantics.c (finish_id_expr): Likewise.
4674 (finish_call_expr): Add integer parameter to indicate
4675 argument-dependent lookup.
4677 * decl.c (struct binding_level): New field using_directives.
4678 (push_using_decl): Not sorry anymore.
4679 (push_using_directive): New function.
4680 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
4681 (unqualified_namespace_lookup): New function, code from ...
4682 (lookup_name_real): ... here.
4683 * decl2.c (lookup_using_namespace): Pass using list instead of
4685 (validate_nonmember_using_decl): New function.
4686 (do_nonmember_using_decl): New function.
4687 (do_toplevel_using_decl): Use them.
4688 (do_local_using_decl): New function.
4689 (do_using_directive): Support block-level directives.
4690 * parse.y (simple_stmt): Support using declarations and
4692 (namespace_qualifier, namespace_using_decl): New non-terminals.
4694 * xref.c (classname): New function.
4695 (GNU_xref_hier): Change class and base parameters to tree.
4696 * decl.c (xref_baseypes): Change caller.
4697 * friend.c (make_friend_class): Likewise.
4699 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4701 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
4704 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
4705 template template parameter, record its use.
4706 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
4707 its template arguments if exists.
4709 * pt.c (coerce_template_template_parms): New function equivalent
4710 to coerce_template_parms when IS_TMPL_PARM is true.
4711 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
4712 all callers changed.
4714 (coerce_template_parms): Access ARGLIST properly when creating a
4715 new vector. Only accept implicit TYPE_DECL as valid argument for
4716 a template template parameter when it is a base class of
4717 current_class_type. Don't display error message when COMPLAIN is
4720 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
4722 * repo.c (get_base_filename): Use file_name_nondirectory.
4723 (open_repo_file): Likewise.
4724 * cp-tree.h (file_name_nondirectory): Add prototype.
4726 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
4728 * friend.c (do_friend): Pull the identifier out of declarator.
4729 Use cp_error and friends.
4730 * decl2.c (qualified_lookup_using_namespace): Fix call to
4732 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
4733 (grokvardecl): Use DECL_CLASS_SCOPE_P.
4734 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
4735 * class.c (warn_hidden): Fix for OVERLOAD.
4736 From grahams@rcp.co.uk:
4737 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
4738 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
4740 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
4742 * g++.1 (-traditional): Remove duplicated documentation.
4744 1998-07-11 Mark Mitchell <mark@markmitchell.com>
4746 * method.c (flush_repeats): Add nrepeats parameter.
4747 (issue_nrepeats): Likewise.
4748 (is_back_referenceable_type): New function. Don't back-reference
4749 TEMPLATE_TYPE_PARMs as well as simple types like integers.
4750 (build_mangled_name_for_type): Likewise.
4751 (build_mangled_name_for_type_with_Gcode): Likewise.
4753 (nrepeats): Likewise.
4754 (Nrepeats): Likewise.
4755 (start_squangling): Don't clear the variables removed above.
4756 (end_squangling): Likewise.
4757 (flush_repeats): Tidy. Use nrepeats parameter rather than
4759 (issue_nrepeats): Likewise, but with nrepeats global. Use
4760 is_backreferenceable_type.
4761 (build_overload_nested_name): Tidy. Add comment. Use
4762 build_mangled_name_for_type.
4763 (build_underscore_int): Comment.
4764 (build_overload_scope_ref): Use build_mangled_name_for_type.
4765 (build_overload_int): Likewise.
4766 (build_template_template_parm_names): Tidy.
4767 (build_template_parm_names): Use build_mangled_name_for_type.
4768 (build_overload_identifier): Add comments.
4769 (build_mangled_name_for_type_with_Gcode): Split out from
4771 (build_mangled_name_for_type): Use it.
4772 (build_mangled_name): Rework to use build_mangled_name_for_type
4773 and to not use global nrepeats/Nrepeats. Tidy.
4774 (process_modifiers): Tidy.
4775 (check_btype): Use is_backreferenceable_type. Add comment.
4776 Rename `node' to `type'.
4777 (process_overload_item): Set numeric_output_need_bar here.
4778 Use build_mangled_name_for_type. Tidy.
4779 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
4780 build_mangled_name_for_type.
4782 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
4785 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
4787 * cp-tree.h (warn_long_long): Define.
4788 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
4789 warning "ANSI C++ does not support `long long'".
4790 * decl2.c (warn_long_long): Define.
4791 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
4793 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
4795 * decl.c (xref_tag): Handle attributes between 'class' and name.
4796 * parse.y (aggr): Likewise.
4797 * semantics.c (finish_class_definition): Likewise.
4798 * Makefile.in (EXPECTED): Adjust.
4800 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
4801 * decl2.c: Define them.
4802 (lang_decode_option): Handle them.
4803 * lang-options.h: Add -foptional-diags.
4804 * class.c (finish_struct): Don't complain about multiple meanings of
4805 name if -fno-optional-diags.
4806 * decl.c (pushdecl_class_level): Likewise.
4807 * lex.c (real_yylex): Check warn_multichar.
4809 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
4811 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
4813 * tree.c (make_binfo): Fix length.
4815 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
4817 * decl2.c (lang_decode_option): Remove warn_template_debugging.
4818 * lang-options.h: Likewise.
4820 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4822 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
4823 (process_start_catch_block): Likewise for variables
4824 `false_label_rtx', `call_rtx' and `return_value_rtx'.
4826 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
4828 * tree.c (build_srcloc): Make sure we allocate this node on the
4831 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
4833 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
4834 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
4835 (lang_specific_driver): Only add -lm automatically if need_math is
4838 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
4840 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
4842 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4844 * Makefile.in (EXPR_H): New dependency variable.
4845 (decl2.o): Depend on $(EXPR_H).
4846 (typeck.o): Likewise.
4850 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
4852 * decl.c (start_enum): Put local enums on permanent_obstack.
4854 1998-06-25 Mark Mitchell <mark@markmitchell.com>
4856 * cp-tree.h (c_get_alias_set): Declare.
4857 * decl.c (init_decl_processing): Set lang_get_alias_set.
4859 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
4861 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
4862 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
4863 flag for all function decls which are in the exception table.
4864 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
4865 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
4866 code is emitted for any referenced rtti function.
4868 1998-06-25 Dave Brolley <brolley@cygnus.com>
4870 * lang-specs.h: Use new | syntax to eliminate
4871 string concatenation.
4873 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
4875 * cp-tree.h (CP_DECL_CONTEXT): New macro.
4876 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
4877 * method.c (build_overload_nested_name): Likewise.
4878 * sig.c (build_signature_pointer_or_reference_type): Don't set
4881 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4883 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
4884 * cp-tree.h (FROB_CONTEXT): New macro.
4885 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
4886 * decl.c (namespace_binding): Replace NULL_TREE with
4888 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
4889 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
4891 * decl.c (pushtag): Use FROB_CONTEXT.
4892 (pushdecl, make_typename_type, define_function, grokdeclarator):
4894 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
4895 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
4897 * decl2.c (decl_namespace): Return global_namespace if no context.
4898 * method.c (build_overload_nested_name): Expect null as context.
4899 * pt.c (mangle_class_name_for_template): Do nothing for null
4901 (lookup_template_class): Allow for null id_context.
4903 1998-06-25 Richard Henderson <rth@cygnus.com>
4905 * method.c (emit_thunk): Set current_function_is_thunk for the
4906 ASM_OUTPUT_MI_THUNK case as well.
4908 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4910 * exception.cc (__cplus_type_matcher): Get a match_info pointer
4911 instead of an exception table entry as a parameter.
4913 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4915 * parse.y (function_try_block): Don't call start_catch_handler.
4916 * except.c (call_eh_info): Remove coerced field from declaration.
4917 (build_eh_type_type_ref): New function to create an address of a
4918 rtti function for the new style exception tables.
4919 (expand_start_catch_block): Split function, this contains the
4921 (process_start_catch_block_old): New function to perform the rest
4922 of expand_start_catch_block under old style exceptions.
4923 (process_start_catch_block_old): New function to perform the rest
4924 of expand_start_catch_block under new style exceptions.
4925 (expand_end_catch_block): Only pop the false label off the stack under
4926 the old style of exceptions.
4927 * semantics.c (finish_try_block): Don't call start_catch_handler.
4928 * exception.cc (struct cp_eh_info): Add original_value field.
4929 (__cplus_type_matcher): Perform type matching on the original exception
4930 value, and if we have a match, set the current value.
4931 (__cp_push_exception): Set the original exception value.
4933 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
4935 * call.c (joust): Fix confusing conversion warning.
4937 * call.c (build_op_delete_call): Add placement parm. Check
4938 LOOKUP_SPECULATIVELY.
4939 * cp-tree.h, decl2.c, init.c: Adjust.
4940 * decl.c (finish_function): Use it.
4942 * pt.c (tsubst): Diagnose creating void fields or variables.
4944 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4946 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
4948 * cp-tree.h (check_dtor_name): Add prototype.
4950 * init.c (expand_member_init): Remove unused variables
4951 `ptr_type_node', `parm' and `rval'.
4953 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
4955 (lang_print_xnode): Likewise.
4957 * typeck2.c (enum_name_string): Cast argument to sprintf to long
4958 and use %ld specifier.
4960 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
4961 specifier in call to fprintf.
4962 (GNU_xref_member): Cast argument to sprintf to int.
4964 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4966 * typeck2.c (pop_init_level): Warn about implicit zero initialization
4969 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4971 * cp-tree.h: Prototype function `check_java_method'.
4973 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4975 * class.c (finish_struct): Make conflicting use of id a pedwarn.
4976 * decl.c (pushdecl_class_level): Likewise.
4978 1998-06-17 Mark Mitchell <mark@markmitchell.com>
4980 * pt.c (convert_nontype_argument): Issue an error when presented
4981 with an integer (real) constant that cannot be simplified to an
4984 * cp-tree.h (c_get_alias_set): Remove declaration added in
4985 1998-06-13 change that should never have been checked in.
4987 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4989 * typeck.c (build_binary_op_nodefault): Change % in format strings
4992 * decl.c (grokvardecl): Don't build_static_name for decls that
4993 aren't at namespace scope.
4995 * init.c (perform_member_init): Catch default-initialization of
4998 1998-06-17 Mark Mitchell <mark@markmitchell.com>
5000 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
5002 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
5004 * method.c (hack_identifier): Complain about getting a namespace
5006 * typeck.c (decay_conversion): Remove check for namespaces.
5007 * typeck2.c (incomplete_type_error): Likewise.
5008 * parse.y (template_arg): Add PTYPENAME expansion.
5010 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
5012 * decl.c (grokvardecl): Don't build external assembler names for
5013 TYPENAMEs in other namespaces as there is no declarator.
5014 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
5015 info from DECL_CONTEXT if it is NULL.
5017 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
5019 * call.c (check_dtor_name): Split out.
5020 (build_scoped_method_call): Use it.
5021 (build_method_call): Use it.
5022 * init.c (build_offset_ref): Use it.
5024 * typeck.c (build_static_cast): Fix handling of pointers to members.
5026 * decl.c (finish_function): Just return nothing from a constructor.
5027 * typeck.c (c_expand_return): Complain about returning a void
5028 expression from a destructor.
5030 1998-06-13 Mark Mitchell <mark@markmitchell.com>
5032 * class.c (alter_access): Accept a BINFO explaining how to get
5033 from the entity whose accessed is being altered to the type doing
5035 (handle_using_decl): New function containing code split out from ...
5036 (finish_struct_1): Here.
5038 * cp-tree.h (complete_type_or_else): Declare.
5039 * init.c (build_new_1, build_delete): Use it.
5040 * typeck.c (require_complete_type): Use complete_type, rather than
5041 expanding it inline.
5042 (complete_type_or_else): New function.
5043 (build_component_ref): Use it.
5044 (pointer_int_sum): Make sure the type pointed to is complete.
5045 (pointer_diff): Likewise.
5047 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
5050 * search.c (get_matching_virtual): Note that member templates
5051 cannot override virtual functions.
5053 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
5055 * pt.c (check_explicit_specialization): If DECLARATOR turned into
5056 an error_mark_node from lookup_template_function, return the same.
5057 (determine_specialization): Also make sure TEMPLATE_ID isn't an
5058 error_mark_node, before we try to read its operands.
5059 * decl.c (grokdeclarator): If we got an error_mark_node from
5060 check_explicit_specialization, just return it right back.
5062 1998-06-12 Mark Mitchell <mark@markmitchell.com>
5064 * class.c (instantiate_type): Don't treat template-ids that don't
5065 specify any template arguments as equivalent to ordinary
5066 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
5067 pointer-to-members for member templates. Tidy slightly.
5068 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
5069 * init.c (build_offset_ref): Handle template-ids like ordinary
5070 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
5071 offset part of the OFFSET_REF.
5072 * typeck.c (build_unary_op): Change check for unknown types to
5073 look for OFFSET_REFs, not SCOPE_REFs.
5075 1998-06-11 Mark Mitchell <mark@markmitchell.com>
5077 * pt.c (is_member_template_class): New function.
5078 (push_template_decl_real): Use it.
5080 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
5082 * friend.c (do_friend): Add support for nested classes using
5083 member functions of the enclosing class as friends.
5085 1998-06-10 Mark Mitchell <mark@markmitchell.com>
5087 * call.c (convert_default_arg): Make global, not static.
5088 (convert_arg_for_ellipsis): Split out from ...
5089 (build_over_call): Here.
5090 * cp-tree.h (convert_default_arg); Declare.
5091 (convert_arg_to_ellipsis): Likewise.
5092 (do_member_init): Remove.
5093 * init.c (do_member_init): Remove; this code is dead.
5094 (expand_member_init): Remove much of this code; it is dead.
5095 * typeck.c (convert_arguments): Use convert_default_arg and
5096 convert_arg_for_ellipsis, rather than duplicating here.
5098 * call.c (convert_like): Don't fail silently if
5099 build_user_type_conversion fails. Always return error_mark_node
5102 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5104 * search.c (covariant_return_p): Complain about ambiguous base.
5106 * typeck.c (build_component_ref): Diagnose ref to nested type.
5108 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
5110 * decl.c (grokparms): Check that INIT isn't an error_mark_node
5111 before giving error about invalid type for default arg.
5113 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5115 * call.c (build_method_call): Fix thinko.
5117 1998-06-10 Dave Brolley <brolley@cygnus.com>
5119 * decl2.c (lang_decode_option): New argc/argv interface.
5120 * cp-tree.h (lang_decode_option): New argc/argv interface.
5121 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
5122 specified for cpplib-enabled compilers.
5123 * lex.c (lang_init): Don't check_newline for cpplib.
5124 (init_parse): Don't initialize cpplib here.
5126 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
5128 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
5129 piece before checking DECL_MUTABLE_P.
5131 1998-06-10 John Carr <jfc@mit.edu>
5133 * tree.c (debug_binfo): Make printf format match arguments.
5135 * error.c (OB_PUTI): Make printf format match arguments.
5137 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
5139 * init.c (perform_member_init): Handle default-initialization.
5141 * except.c (build_throw): Handle throwing NULL.
5143 * typeck.c (build_x_function_call): Use resolve_offset_ref.
5145 * search.c (compute_access): Only strip an anonymous union
5148 * call.c (add_builtin_candidates): Tweak.
5150 * cvt.c (build_expr_type_conversion): Restore code for conversion
5152 * decl2.c (delete_sanity): Use it. Clean up.
5154 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
5156 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
5158 * typeck.c (c_expand_return): Don't warn about void expressions on
5159 return statements in functions returning void.
5161 1998-06-09 Mark Mitchell <mark@markmitchell.com>
5163 * pt.c (fn_type_unification): Revise documentation. Tidy.
5164 (type_unification): Likewise.
5166 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
5168 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
5170 * parse.y (function_try_block): Rename expand_start_catch, and delete
5172 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
5175 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
5177 * search.c (lookup_member): New fn.
5178 * class.c (finish_struct_1): Use it.
5179 * decl.c (lookup_name_real): Use it.
5181 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5183 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
5185 * cp-tree.h: Add prototype for `maybe_print_template_context' and
5186 `maybe_make_one_only'.
5188 * decl.c (auto_function): Remove unused variable `decl'.
5190 * decl2.c: Include dwarf2out.h and dwarfout.h.
5192 * lex.c: Remove redundant declarations of `set_float_handler' and
5195 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
5197 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
5198 time flag. Call __cp_eh_info instead of __cp_exception_info.
5199 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
5200 (__cp_exception_info): Return offset into cp_eh_info structure to
5201 match what use to be the start of this structure.
5202 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
5203 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
5205 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
5206 __cp_eh_info instead of __cp_exception_info.
5208 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
5210 * decl.c (cp_finish_decl): Disable inlining of extern inlines
5211 with static variables.
5213 1998-06-08 Mark Mitchell <mark@markmitchell.com>
5215 * init.c (build_offset_ref): Correct previous change to use build,
5218 1998-06-07 Mark Mitchell <mark@markmitchell.com>
5220 * class.c (instantiate_type): Handle pointer-to-members where the
5221 member is a template.
5222 * init.c (build_offset_ref): Likewise.
5223 * typeck.c (build_unary_op): Likewise.
5225 1998-06-07 Richard Henderson <rth@cygnus.com>
5227 * lex.c (lang_init_options): New function.
5228 (lang_init): Remove flag_exceptions == 2 hack.
5230 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
5232 * search.c (envelope_add_decl): Tweak for implicit typename.
5234 * call.c (joust): Also warn about confusing conversion op/constructor
5235 overload resolution.
5237 * spew.c (yylex): Also return the TYPE_DECL if got_object.
5238 Don't clear got_object after '~'.
5239 * call.c (build_scoped_method_call): Tweak destructor handling.
5240 (build_method_call): Likewise.
5241 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
5242 TYPE_MAIN_VARIANT for destructors.
5243 * semantics.c (finish_object_call_expr): Complain about calling a
5246 1998-06-05 Per Bothner <bothner@cygnus.com>
5248 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
5249 Define - update needed by gcc.c change.
5251 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
5253 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
5255 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5257 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
5258 * decl.c (lookup_name_real): Add namespaces_only parameter.
5259 If set, return only NAMESPACE_DECLs.
5260 (select_decl): Likewise.
5261 (identifier_type_value): Give additional parameter.
5262 (lookup_name_nonclass): Likewise.
5263 (lookup_name): Likewise.
5264 (find_binding): Skip namespace aliases.
5265 (binding_for_name): Likewise.
5266 (push_namespace): Check for namespace aliases.
5267 (lookup_name_namespace_only): New function.
5268 (begin_only_namespace_names, end_only_namespace_names): New functions.
5269 * decl2.c (set_decl_namespace): Skip namespace aliases.
5270 (do_using_directive): Likewise.
5271 (do_namespace_alias): Produce namespace aliases, fix alias
5273 * error.c (dump_decl): Support SCOPE_REF.
5274 * parse.y (extdef): Wrap lookup with namespace_only for namespace
5275 aliases and using declarations.
5277 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
5279 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
5281 * error.c (dump_expr): Clean up NEW_EXPR case.
5283 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
5285 Suggested by Brendan Kehoe
5286 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
5287 treat it as using ::decl.
5289 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
5291 * tree.c (mapcar): Support NEW_EXPR.
5293 * error.c (dump_expr): Support NEW_EXPR.
5295 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
5297 * method.c (make_thunk): Use overload machinery to make name.
5298 * search.c (covariant_return_p): New fn.
5299 (get_matching_virtual): Use it.
5301 * init.c (build_new_1): Fix check for void.
5303 1998-06-01 Per Bothner <bothner@cygnus.com>
5305 * cp-tree.h (TYPE_FOR_JAVA): New macro.
5306 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
5307 java_int_type_node, java_long_type_node, java_float_type_node,
5308 java_double_type_node, java_char_type_node, java_boolean_type_node):
5309 New "primitive" types, with predefined names __java_byte etc.
5310 (record_builtin_java_type): New function.
5311 (init_decl_processing): Make Java types with record_builtin_java_type.
5312 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
5313 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
5314 (grokfndecl): Call check_java_method for Java classes.
5315 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
5316 (process_overload_item): Match types against specific
5317 java_XX_type_node types, rather than using is_java_type.
5318 * class.c (finish_struct_1): Don't add default copy constructor
5319 or operator= if TYPE_FOR_JAVA.
5320 (pop_lang_conext): Restore strict_prototyp proper if Java.
5321 * decl2.c (acceptable_java_type, check_java_method): New functions.
5322 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
5323 (tsubst): Move common statement after if statement.
5324 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
5326 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
5328 * pt.c (for_each_template_parm): Use first_rtl_op.
5330 * tree.c (build_cplus_array_type_1): Also check index_type for
5333 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
5335 * pt.c (tsubst): Always copy BINFO_BASETYPES.
5337 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
5339 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
5342 1998-05-29 Mark Mitchell <mark@markmitchell.com>
5344 * decl.c (grokdeclarator): Don't complain about in-class
5345 initialization of static consts if we don't really know the type
5348 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
5350 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
5351 * method.c (build_destructor_name): New fn.
5352 * decl2.c (maybe_retrofit_in_chrg): Split out...
5353 (grokclassfn): From here. Reorganize.
5354 * decl.c (grok_ctor_properties): Make sure ctors for types with
5355 vbases have the in_chrg parm.
5356 * pt.c (instantiate_class_template): Update
5357 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
5359 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
5361 1998-05-28 Mark Mitchell <mark@markmitchell.com>
5363 * pt.c (instantiate_decl): Make test for whether or not static
5364 variables should be instantiated early match its comment.
5366 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
5368 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
5370 (start_function): Call check_default_args.
5371 * decl2.c (grokfield): Don't call check_default_args.
5372 (check_default_args): Use cp_error_at.
5373 * lex.c (do_pending_defargs): Call check_default_args.
5375 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
5377 * call.c (build_method_call): Make sure get_type_value returns
5378 something before we try to use its TYPE_MAIN_VARIANT.
5379 (build_scoped_method_call): Likewise.
5381 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
5383 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
5384 initialize an array.
5386 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
5389 * friend.c (do_friend): Clarify template warning.
5391 1998-05-27 Mark Mitchell <mark@markmitchell.com>
5393 * decl.c (shadow_label): Don't treat decls as identifiers.
5394 (maybe_push_to_top_level): Clear shadowed_labels.
5396 * pt.c (instantiate_decl): Reset lineno and filename after calling
5397 regenerate_decl_from_template.
5399 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
5402 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
5404 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
5406 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5408 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
5409 (convert_nontype_argument): Handle cases when nontype template
5410 parameters become classes after substitution.
5412 1998-05-26 Mark Mitchell <mark@markmitchell.com>
5414 * friend.c (is_friend): Use comptypes, rather than == to compare
5415 types. Modify for new representation of template friends.
5416 (make_friend_class): Likewise.
5417 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
5418 (instantiate_class_template): Deal with template friends.
5420 * decl.c (store_parm_decls): Remove redundant call to
5421 expand_main_function.
5423 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
5425 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
5428 1998-05-26 Per Bothner <bothner@cygnus.com>
5430 * language_as_string: Handle lang_java.
5432 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
5434 * decl.c (pushdecl): Don't copy the type_decl.
5436 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5438 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
5440 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
5442 * parse.y (complex_direct_notype_declarator): Use $1 to access
5443 scope of notype_qualified_id.
5445 1998-05-26 Dave Brolley <brolley@cygnus.com>
5447 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
5448 (init_parse): Initialize cpplib interface.
5450 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
5453 1998-05-26 Mark Mitchell <mark@markmitchell.com>
5455 * decl.c (pushtag): Avoid crashing on erroneous input.
5457 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5459 * decl.c (push_namespace): Only produce one unique name for
5460 anonymous namespaces.
5461 (get_unique_name): Remove.
5463 1998-05-25 Mark Mitchell <mark@markmitchell.com>
5465 * call.c (tourney): Don't do any extra comparisons.
5467 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
5469 * cp-tree.h (processing_template_parmlist): Declare.
5470 * decl.c (pushtag): Don't call push_template_decl when we
5472 * pt.c (processing_template_parmlist): New variable.
5473 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
5474 (complete_template_args): Use it.
5475 (add_to_template_args): Likewise.
5476 (innermost_args): Likewise.
5478 (begin_template_parm_list): Use processing_template_parmlist.
5479 (end_template_parm_list): Likewise.
5481 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5482 * decl.c (grokdeclarator): Use it.
5483 * decl2.c (grok_x_components): Likewise.
5484 * init.c (initializing_context): Likewise.
5485 * method.c (do_build_copy_constructor): Likewise.
5486 (do_build_assign_ref): Likewise.
5487 * search.c (compute_access): Likewise.
5488 * typeck.c (build_component_ref): Likewise.
5490 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
5491 unnamed type a typedef name "for linkage purposes".
5493 * pt.c (lookup_template_class): Don't look at
5494 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
5496 * method.c (build_overload_int): Handle error cases gracefully.
5498 * pt.c (instantiate_decl): Handle static member variables
5501 * pt.c (tsubst): Use the tsubst'd type when producing new
5502 TEMPLATE_PARM_INDEX nodes.
5504 1998-05-24 Mark Mitchell <mark@markmitchell.com>
5506 * tree.c (cp_tree_equal): Handle pointers to member functions.
5508 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
5509 sure the type of the REF_BIND is a reference type.
5510 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
5511 target_type for clarity.
5513 * parse.y (xcond): Move call to condition_conversion ...
5514 * semantics.c (finish_for_cond): Here.
5515 * parse.c: Regenerated.
5517 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
5519 * decl.c (push_namespace): Namespaces have type void.
5520 * typeck2.c (incomplete_type_error): Complain about namespace
5522 * typeck.c (decay_conversion): Likewise.
5524 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5526 * error.c (dump_expr): Support namespaces.
5528 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
5530 * cp-tree.def: Add SRCLOC.
5531 * cp-tree.h: Add struct tree_srcloc and accessor macros.
5532 * tree.c (build_srcloc, build_srcloc_here): New fns.
5533 * pt.c (add_pending_template): Use build_srcloc_here.
5534 (push_tinst_level): Update last_template_error_tick before erroring.
5535 (instantiate_decl): Restore lineno and input_filename before
5536 calling add_pending_template.
5537 * decl2.c (finish_file): Set up lineno and input_filename for
5540 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5542 * decl.c (lang_print_error_function): New fn.
5543 (init_decl_processing): Set print_error_function to use it.
5544 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
5546 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
5549 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
5550 copy-initialization.
5552 * class.c (build_vtable_entry): Use int_fits_type_p.
5553 (build_vtable): Pass a signed offset to build_vtable_entry.
5554 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
5555 set_rtti_entry): Likewise.
5557 1998-05-22 Per Bothner <bothner@cygnus.com>
5559 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
5560 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
5562 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5564 * pt.c (print_template_context): Use fprintf instead of cp_error.
5566 * pt.c (determine_specialization): Just return an error_mark_node.
5567 Also print the decl we want in error messages. If we complain,
5568 return error_mark_node.
5569 (tsubst_friend_function): Set lineno and input_filename so
5570 error messages will be useful.
5571 (instantiate_template): Just return an error_mark_node.
5572 (check_explicit_specialization): Don't mess with a returned
5575 * pt.c (print_template_context): Add new argument.
5576 (maybe_print_template_context): New fn.
5577 (push_tinst_level): Increment tinst_level_tick.
5578 (pop_tinst_level): Likewise.
5579 * errfn.c (cp_thing): Call maybe_print_template_context. Use
5580 xrealloc instead of xmalloc.
5582 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
5584 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5586 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
5587 if the template we looked up is the same as the one we already
5590 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
5592 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
5593 (cpp_reader,parse_in): Add for cpplib.
5594 (check_newline): Call handle_sysv_pragma with new interface.
5595 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
5597 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
5598 (sub_getch): Call GETC for cpplib.
5600 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
5601 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
5603 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
5605 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5607 * decl2.c (maybe_make_one_only): New fn.
5608 (import_export_vtable): Use it.
5609 (import_export_decl): Likewise.
5610 * pt.c (mark_decl_instantiated): Likewise.
5612 1998-05-21 Mark Mitchell <mmitchell@usa.net>
5614 * decl2.c (find_representative_member): Rename to ...
5615 (build_anon_union_vars): New function.
5616 (finish_anon_union): Fix stupidity of previous change.
5618 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
5620 * decl.c (grokfndecl): Handle definition of specialization in
5623 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
5625 1998-05-20 Mark Mitchell <mmitchell@usa.net>
5627 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
5628 to look for type declarations.
5629 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
5630 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
5631 (finish_member_class_template): Declare.
5632 * decl.c (pushtag): Put member class templates on the
5633 CLASSTYPE_TAGS list, just as for ordinary member classes.
5634 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
5635 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
5636 IDENTIFIER_NAMESPACE_VALUEs.
5637 * parse.y (component_decl): Move code to ...
5638 * semantics.c (finish_member_class_template): New function.
5639 Don't put member class templates on the list of components for a
5641 * parse.c: Regenerated.
5642 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
5643 In fact, don't use DECL_CONTEXT at all here.
5645 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
5647 * decl.c (record_unknown_type): New function.
5648 (init_decl_processing): Call it for the unknown and global type
5651 1998-05-20 Mark Mitchell <mmitchell@usa.net>
5653 * decl2.c (find_representative_member): New function.
5654 (finish_anon_union): Use it.
5656 * cp-tree.h (MAIN_NAME_P): New macro.
5657 (DECL_MAIN_P): Likwise.
5658 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
5659 (grokfndecl): Use the new macros.
5660 (grokdeclarator): Likewise.
5661 (start_function): Likewise.
5662 (store_parm_decls): Likewise.
5663 (finsh_function): Likewise.
5664 * friend.c (do_friend): Likewise.
5665 * typeck.c (build_function_call_real): Likewise.
5666 (build_unary_op): Likewise.
5668 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
5670 * decl2.c (start_objects, finish_objects, do_dtors,
5671 do_ctors): Split out from...
5672 (finish_file): ...here.
5674 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
5676 * tree.c (is_overloaded_fn): Don't abort on placeholders from
5679 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
5681 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
5683 * error.c (dump_expr): Handle an ARROW_EXPR.
5685 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
5687 * decl.c (saveable_obstack): Declare.
5688 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
5689 declare, if necessary.
5691 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
5693 * call.c (compare_qual): Remove.
5695 (is_properly_derived_from): New function.
5696 (maybe_handle_ref_bind): Likewise.
5697 (maybe_handle_implicit_object): Likewise.
5698 (compare_ics): Modify substantially to bring into conformance with
5700 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
5701 (comp_cv_qualification): Declare.
5702 (comp_cv_qual_signature): Likewise.
5703 * typeck.c (comp_cv_qualification): Likewise.
5704 (comp_cv_qual_signature): Likewise.
5706 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5708 * Makefile.in (parse.o): Depend on toplev.h.
5710 * class.c (typecode_p): Remove prototype and definition.
5712 * cp-tree.h (currently_open_class, is_empty_class, member_p):
5715 * decl.c (push_overloaded_decl_top_level): Remove prototype and
5718 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
5719 in call to `cp_thing'.
5720 (cp_warning): Likewise for function pointer `warning'.
5722 * except.c (do_function_call): Remove prototype and definition.
5723 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
5725 * method.c (is_java_type): Add prototype and make it static.
5727 * parse.y: Include toplev.h.
5729 * pt.c (type_unification): Remove unused variable `arg'.
5730 (instantiate_decl): Likewise for `save_ti'.
5732 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
5734 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
5736 * init.c (build_member_call): Handle template_ids.
5737 * parse.y (primary): Add global_scope template_id.
5739 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
5741 * decl2.c (get_sentry): Use end_temporary_allocation.
5742 Don't declare permanent_obstack.
5744 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
5746 * parse.y (.finish_new_placement): New non-terminal.
5747 (unary_expr, new_type_id): Use it.
5748 * parse.c: Regenerated.
5750 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
5752 * pt.c (redeclare_class_template): Say where the original definition
5753 of the template-parameter's default argument appeared.
5755 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
5757 * call.c (build_over_call): Tweak empty class handling.
5759 * decl.c (make_typename_type): Use currently_open_class.
5761 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
5763 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5765 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
5766 for a type unless it is one.
5768 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
5770 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
5772 * Makefile.in (program_transform_name, objdir): Define.
5774 * Makefile.in (BISON): Use bison from the build tree if it exists.
5777 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5779 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
5781 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
5783 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
5785 * call.c (build_scoped_method_call): Likewise.
5787 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
5789 * init.c (build_new_1): Call suspend_momentary around the creation
5790 of values that must be saved for exception handling.
5791 * parse.y (.build_new_placement): New non-terminal.
5792 (unary_expr, new_placement): Use it.
5793 * parse.c: Regenerated.
5795 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
5797 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
5800 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
5803 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
5805 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
5807 * decl.c (start_decl): Revert problem change.
5809 * Makefile.in (CONFLICTS): Fix.
5811 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5813 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
5815 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
5817 * class.c (finish_struct_1): Use BINFO_SIZE.
5819 * decl.c (start_decl): Use 'tem'.
5821 Thu May 14 16:30:47 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5823 * exception.cc: Include eh-common.h.
5824 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
5825 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
5826 (__cp_push_exception): Initialize eh_info struct as well.
5827 * except.c: Remove local structs and include eh-common.h.
5828 (init_exception_processing): Set language and version codes.
5829 (call_eh_info): Add presence of eh_info to runtime description of
5831 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
5832 * semantics.c (finish_try_block): Call start_catch_block() and
5834 * parse.y (function_try_block): Call start_catch_block() and
5837 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
5839 * typeck.c (original_type): New function.
5840 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
5841 to see if they're actually the same.
5842 * cp-tree.h (original_type): Declare.
5844 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5846 * Makefile.in (lex.o): Depend on output.h.
5848 * call.c (add_function_candidate): Remove unused variable `cand'.
5849 (add_conv_candidate): Likewise.
5850 (build_builtin_candidate): Likewise.
5852 * cp-tree.h: Add prototype for `types_overlap_p'.
5854 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
5856 * decl2.c (merge_functions): Remove unused variables `tmp' and
5859 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
5860 (code_as_string): Likewise.
5861 (language_as_string): Likewise.
5862 (parm_as_string): Likewise.
5863 (op_as_string): Likewise.
5864 (assop_as_string): Likewise.
5865 (cv_as_string): Likewise.
5867 * lex.c: Include output.h.
5869 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
5871 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
5874 * tinfo.cc (__class_type_info::dcast): Change the type of variable
5875 `i' from int to size_t.
5877 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
5880 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
5882 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
5883 DECL_NAMESPACE_SCOPE_P.
5884 (lang_decl_name): Likewise.
5885 * pt.c (tsubst_friend_function, tsubst): Likewise.
5886 * decl.c (pushdecl, redeclaration_error_message, start_decl,
5887 cp_finish_decl, start_function): Likewise.
5888 * class.c (finish_struct_1): Likewise.
5889 * call.c (build_over_call): Likewise.
5890 (compare_ics): Use DERIVED_FROM_P.
5892 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
5894 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
5895 * method.c (build_mangled_name): Use it.
5896 (build_decl_overload_real): Likewise.
5898 * error.c (dump_simple_decl): New function, broken out from ...
5899 (dump_decl): Use it.
5901 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
5903 * ptree.c (lang_print_xnode): Add missing `break'.
5905 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
5907 * call.c (add_template_candidate): Adjust for changes to
5908 fn_type_unification.
5909 (add_template_candidate_real): Likewise.
5910 (add_template_conv_candidate): Likewise.
5911 (build_user_type_conversion_1): Likewise.
5912 (build_new_function_call): Likewise.
5913 (build_object_call): Likewise.
5914 (build_new_op): Likewise.
5915 (build_new_method_call): Likewise.
5916 * class.c (instantiate_type): Likewise.
5917 * cp-tree.h (unification_kind_t): New type.
5918 (fn_type_unification): Adjust prototype.
5919 (type_unificaiton): Likewise.
5920 * pt.c (UNIFY_ALLOW_NONE): New macro.
5921 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
5922 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
5923 (UNIFY_ALLOW_DERIVED): Likewise.
5924 (unify): Change prototype.
5925 (maybe_adjust_types_for_deduction): New function.
5926 (check_cv_quals_for_unify): Likewise.
5927 (determine_specialization): Adjust.
5928 (fn_type_unification): Likewise.
5929 (type_unification): Likewise.
5930 (type_unification_real): Likewise. Use
5931 maybe_adjust_types_for_deduction. Fix mishandling of
5932 back-unification of template functions passed as arguments. Pass
5933 appropriate combination of UNIFY_ALLOW_* to unify.
5934 (unify): Remove unused NTPARMS parameter. Use
5935 check_cv_quals_for_unify. Remove bogus code that allowed
5936 too-generous unification in order to adhere more closely to standard.
5937 (get_bindings_real): Adjust.
5938 (get_class_bindings): Likewise.
5940 * method.c (build_overload_identifier): Only use the innermost
5941 template arguments when mangling.
5942 * pt.c (tsubst_template_argument_vector): New function.
5943 (complete_template_args): Deal with the situation where the
5944 extra_args contain more than one level of arguments.
5945 (lookup_template_class): Deal with member template classes, which
5946 may have more than one level of arguments.
5947 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
5948 Improve handling of member template classes. Use
5949 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
5950 tsubst_template_argument_vector where appropriate.
5951 (regenerate_decl_from_template): Break out from ...
5952 (instantiate_decl): Here.
5954 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
5955 * parse.h: Regenerated.
5956 * parse.c: Really regenerated.
5958 * cp-tree.h (finish_unary_op_expr): New function.
5959 (finish_id_expr): Likewise.
5960 (begin_new_placement): Likewise.
5961 (finish_new_placement): Likewise.
5962 (finish_declarator): Likewise.
5963 (finish_translation_unit): Likewise.
5964 (finish_parmlist): Likewise.
5965 (begin_class_definition): Likewise.
5966 (finish_class_definition): Likewise.
5967 (finish_default_args): Likewise.
5968 (finish_inline_definitions): Likewise.
5969 * parse.y (GCC_ASM_KEYWORD): Remove.
5970 (TYPENAME_ELLIPSIS): Likewise.
5971 * parse.c: Regenerated.
5972 Use new functions in semantics.c in the actions for many rules.
5973 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
5974 * hash.h: Regenerated.
5975 * semantics.c (finish_expr_stmt): Allow NULL expr.
5976 (finish_unary_op_expr): New function, containing
5977 code previously in parse.y.
5978 (finish_id_expr): Likewise.
5979 (begin_new_placement): Likewise.
5980 (finish_new_placement): Likewise.
5981 (finish_declarator): Likewise.
5982 (finish_translation_unit): Likewise.
5983 (finish_parmlist): Likewise.
5984 (begin_class_definition): Likewise.
5985 (finish_class_definition): Likewise.
5986 (finish_default_args): Likewise.
5987 (finish_inline_definitions): Likewise.
5989 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
5991 * typeck.c (build_c_cast): Don't decay arrays and functions to
5992 pointer type when converting to a class type.
5994 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
5996 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
5997 (DECL_CLASS_SCOPE_P): Likewise.
5999 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
6001 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
6002 * decl2.c (constructor_name_full): Likewise.
6004 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
6006 * tree.c (mapcar): Add OVERLOAD support.
6008 * init.c (resolve_offset_ref): We must use basetype_path before we
6009 destroy it with a call to convert_pointer_to.
6011 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6013 * class.c (currently_open_class): New fn.
6014 * decl.c (lookup_name_real): Use it.
6015 * search.c (lookup_field): Likewise.
6017 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
6019 * cp-tree.def (OVERLOAD): New node.
6020 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
6021 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
6022 (NAMESPACE_BINDING): Remove.
6023 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
6025 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
6027 (tree_overload): New struct.
6028 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
6029 (REAL_IDENTIFIER_TYPE_VALUE): Define.
6030 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
6031 (lang_decl_flags): Remove in_namespace.
6032 (lang_decl): Remove chain.
6033 (DECL_CHAIN, DECL_NAMESPACE): Remove.
6034 (flag_honor_std): Declare extern.
6035 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
6036 namespace_binding, set_namespace_binding,
6037 lookup_function_nonclass, cat_namespace_levels,
6038 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
6039 scratch_ovl_cons, ovl_member, build_overload): Declare.
6040 (decl_list_length, get_namespace_id, current_namespace_id,
6041 overloaded_globals_p): Remove.
6042 (lookup_using_namespace, qualified_lookup_using_namespace): Change
6044 (push_scratch_obstack): New macro.
6045 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
6046 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
6048 (build_new_function_call): Iterate using OVL_CHAIN.
6049 Print DECL_NAME in when reporting ambiguities.
6050 (build_object_call): Iterate using OVL_NEXT for fns, convs.
6051 (build_new_op): Call lookup_function_nonclass.
6052 Iterate using OVL_NEXT.
6053 (build_op_delete_call): Change detection of members.
6054 Do not wrap TREE_LIST around fields and single global functions.
6055 (build_over_call): Don't push a class level if the context is a
6057 (build_new_method_call): Iterate using OVL_NEXT.
6058 * class.c (add_method): Chain overloaded members using
6059 build_overload. Remove copying of method.
6060 (grow_method): When iterating through the obstack, expect OVERLOAD
6061 nodes. Chain overload members.
6062 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
6063 nodes in call to get_baselinks.
6064 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
6065 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
6066 fdecls that are OVERLOAD nodes.
6067 (validate_lhs): New function.
6068 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
6069 code. Use DECL_NAME in error messages. Split code between global
6070 and member function processing.
6071 * decl.c (global_type_node): New static variable.
6072 (in_std): New global.
6073 (struct binding_level): New field usings.
6074 (resume_binding_level): Assert that we are not in a class.
6075 (toplevel_bindings_p): Just check for namespace_p or
6077 (resume_level): Remove.
6078 (find_binding): New function.
6079 (binding_for_name): Call it.
6080 (namespace_binding, set_namespace_binding): New functions.
6081 (push_namespace): Associate binding level with new namespace,
6082 resume_binding_level for existing namespace. Remove old code.
6083 Fake std by counting.
6084 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
6085 (maybe_push_to_top_level): Save current namespace.
6086 (pop_from_top_level): Restore saved namespace.
6087 (pop_namespace): Call suspend_binding_level. Remove old code.
6088 (cat_namespace_levels): New function.
6089 (set_identifier_type_value_with_scope): For namespace bindings,
6090 set BINDING_TYPE, and use global_type_node.
6091 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
6092 (identifier_type_value): New function.
6093 (pushtag): If no context, use current_namespace.
6094 (duplicate_decls): Don't process DECL_CHAIN.
6095 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
6096 already set. Never reset it to NULL_TREE. Lookup global variables
6097 in their namespace. Push overloaded templates if they are on
6099 (pushdecl_namespace_level): New function.
6100 (pushdecl_top_level): Implement using pushdecl_namespace_level.
6101 (pushdecl_using_decl): New function.
6102 (overloaded_globals_p): Remove.
6103 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
6104 them. Use namespace_binding and set_namespace_value.
6105 (redeclaration_error_message): Complain if the declarations come
6106 from different namespaces.
6107 (lookup_tag): On namespace level, look in the BINDING_TYPE.
6108 (lookup_namespace_name): Pass tree_bindings from stack. Remove
6110 (select_decl): New function.
6111 (lookup_name_real): Call it for qualified and unqualified lookup.
6112 Pass tree_bindings from the stack.
6113 If prefer_type is 1, also accept namespaces.
6114 (lookup_function_nonclass): New function.
6115 (init_decl_processing): Set the binding level of the global
6116 namespace to global_binding_level.
6117 Build a proper type list for __builtin_apply.
6118 Initialize std_node to "fake std" if flag_honor_std is set.
6119 Initialize global_type_node.
6120 Allocated bad_alloc in namespace std if flag_honor_std.
6121 (define_function): Set the DECL_CONTEXT to the current_namespace.
6122 (start_decl): A namespace is not considered as a context here. If
6123 the DECL_CONTEXT is a namespace, push the decl.
6124 (cp_finish_decl): Check for namespaces used as initializers.
6125 (grokfndecl): Add namespace parameter. Remove processing of
6127 (grokvardecl): Add namespace parameter.
6128 (grokdeclarator): Process SCOPEs that are namespaces. For
6129 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
6130 (start_function): Check for contexts that are namespaces.
6131 Set context for declarations that have not been pushed.
6132 (store_parm_decls): Check for ::main only.
6133 (finish_function): Likewise.
6134 (start_method): Check for contexts that are namespaces.
6135 (start_method): Remove DECL_CHAIN processing.
6136 * decl2.c (flag_honor_std): Declare.
6137 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
6138 (decl_namespace_list): New static global.
6139 (grok_x_components): Ignore namespaces as type contexts.
6140 (check_classfn): Expect OVERLOAD nodes.
6141 (grokfield): Remove DECL_CHAIN processing.
6142 (finish_file): Call cat_namespace_levels.
6143 (merge_functions): New function.
6144 (ambiguous_decl): Rewrite.
6145 (lookup_using_namespace): Produce tree_bindings.
6146 (qualified_lookup_using_namespace): Likewise.
6147 (set_decl_namespace, decl_namespace, current_decl_namespace,
6148 push_decl_namespace, pop_decl_namespace): New functions.
6149 (arg_lookup): New struct.
6150 (add_function, arg_assoc_namespace, arg_assoc_class,
6151 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
6153 (get_namespace_id, current_namespace_id): Remove.
6154 (do_toplevel_using_decl): Rewrite.
6155 (do_class_using_decl): Complain about namespace qualifiers.
6156 (do_using_directive): Sorry if not on namespace level. Complain
6157 about unknown namespaces.
6158 * error.c (dump_aggr_type): Check for namespace contexts.
6159 * except.c (init_exception_processing): Push terminate into std.
6160 * friend.c (is_friend): A namespace is not a context, here.
6161 * init.c (expand_member_init): Remove DECL_CHAIN processing.
6162 (build_offset_ref): Process OVERLOAD nodes.
6163 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
6164 * lex.c (identifier_type): Loop using OVL_CHAIN.
6165 (see_typename): Set looking_for_typename to 2.
6166 (real_yylex): Likewise.
6167 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
6168 (do_scoped_id): Expect OVERLOAD nodes.
6169 Change calling convention for qualified_lookup_using_namespace.
6170 (build_lang_decl): Don't set in_namespace anymore.
6171 * method.c (typevec_size): New global.
6172 (build_overload_nested_name): Return if global_namespace.
6173 Otherwise, always expect a declaration context.
6174 (build_qualified_name): Likewise.
6175 Make sure we don't write beyond typevec_size.
6176 (build_decl_overload_real): Likewise.
6177 Allocate one extra slot for the namespace.
6178 (hack_identifier): Mark code dead.
6179 Process OVERLOAD and NAMESPACE_DECL nodes.
6180 * parse.y (program): Pop namespaces until in global namespace.
6181 (extdef): In a using-declaration, don't discard the identifier if
6182 there is no declaration.
6183 (left_curly): Ignore type contexts which are namespaces.
6184 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
6186 * pt.c (template_class_depth): Expect types to be namespaces.
6187 (determine_specialization): Simplify by expecting OVERLOAD nodes.
6188 (push_template_decl): Push into namespace level.
6189 Reset ctx if it is a namespace.
6190 Set DECL_CONTEXT to current_namespace if not set already.
6191 Ignore real contexts that are namespaces.
6192 (mangle_class_name_for_template): Skip global_namespace.
6193 Mangle other namespaces as declarations.
6194 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
6195 (lookup_template_class): Push into namespace of context.
6196 If the context is a namespace, set it to global_namespace.
6197 Use id_context for mangling.
6198 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
6199 (tsubst_friend_function): Ignore namespace contexts.
6200 Push into namespace level.
6201 (tsubst): Handle NAMESPACE_DECL nodes.
6202 Remove DECL_CHAIN processing.
6203 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
6204 * ptree.c (print_lang_identifier): Print bindings.
6205 (lang_print_xnode): Print OVERLOAD nodes.
6206 * rtti.c (init_rtti_processing): Push type_info into std.
6207 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
6208 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
6209 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
6210 lookup_fnfields_here): Likewise.
6211 Process all nodes, instead of going through TREE_CHAIN.
6212 * sig.c (build_signature_pointer_or_reference_type): Set context
6213 to global_namespace.
6214 (build_signature_table_constructor): Expect OVERLOAD nodes.
6215 * spew.c (yylex): Save old setting of looking_for_typename.
6216 * tree.c (decl_list_length): Remove.
6217 (binding_init): New function.
6218 (count_functions): Rewrite.
6219 (is_overloaded_fn): Expect OVERLOAD nodes.
6220 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
6221 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
6222 ovl_member): New functions.
6223 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
6224 (type_unknown_p): Likewise.
6225 (require_instantiated_type): Likewise.
6226 (build_component_ref): Declare code dead.
6227 (build_x_function_call): Create and expect OVERLOAD nodes.
6228 (build_function_call_real): Check for ::main only.
6229 (build_unary_op): Likewise. Expect OVERLOAD nodes.
6230 (convert_for_assignment): Check for TREE_LIST before accessing
6232 * decl.c (duplicate_decls): Check for namespace bindings instead
6234 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
6235 lookup_name_current_level, start_decl, xref_tag,
6236 finish_enum): Likewise.
6237 * init.c (build_offset_ref): Likewise.
6238 * search.c (lookup_field): Likewise.
6239 (lookup_fnfields): Likewise.
6240 (dfs_debug_mark): Likewise.
6241 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
6242 (poplevel_class, pop_from_top_level): Likewise.
6243 * decl2.c (finish_method): Likewise.
6244 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
6245 * decl.c (record_builtin_type): Likewise.
6246 (init_decl_processing, grokfndecl): Likewise.
6247 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
6248 (make_lang_type): Likewise.
6249 * parse.y (make_thunk): Likewise.
6250 * pt.c (tsubst): Likewise.
6251 * tree.c (debug_binfo): Likewise.
6252 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
6253 tinfo2.cc, inc/new.h: Add std qualifications.
6254 * inc/new: Wrap with namespace std if __HONOR_STD.
6255 * inc/typeinfo: Likewise.
6257 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
6259 * call.c (build_user_type_conversion_1): Handle second_conv
6260 properly for templates.
6262 Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
6264 * method.c (build_decl_overload_real): Set TREE_USED flag to
6265 zero for build_type_variants nodes as well.
6267 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
6269 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
6271 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
6273 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
6274 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
6275 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
6276 xref.o): Add toplev.h dependencies.
6278 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
6280 * errfn.c (cp_error, cp_warning): Remove declarations for
6281 error and warning respectively.
6283 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6285 * error.c: Convert to using ctype macros defined in system.h.
6286 * method.c: Likewise.
6288 * lex.c: Likewise. Also remove redundant system header stuff.
6290 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
6292 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
6293 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
6294 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
6295 xref.c: Add include of toplev.h.
6297 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
6299 * tree.c (perm_manip): Also regenerate the RTL of an extern.
6300 (copy_to_permanent): Use end_temporary_allocation.
6302 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
6304 * init.c (expand_vec_init): The initialization of each array
6305 element is a full-expression.
6307 Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
6309 * method.c (build_mangled_name): Add a call to build_type_variant
6310 to get the right type.
6312 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
6314 * Makefile.in: Add .SUFFIXES.
6316 * cp-tree.def: Remove NAMESPACE_DECL.
6318 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
6320 * call.c (build_over_call): Do evaluate arg even if it has empty
6322 * decl.c (start_function): Don't push a member function.
6324 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
6326 * Makefile.in (g++FAQ.info): Put -o option before input file.
6328 Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
6330 * gxxint.texi: Add info for squangling codes K and B.
6332 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
6334 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
6335 the expression in templates.
6336 (finish_stmt_expr): Likewise.
6338 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
6340 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
6342 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
6344 * decl.c (maybe_push_to_top_level): Always clear
6345 current_template_parms and processing_template_decl.
6346 (pushtag): Remove check of current_class_type and some comments,
6347 since maybe_push_to_top_level no longer creates confusion.
6349 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
6351 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
6352 (DECL_CLASS_TEMPLATE_P): Likewise.
6353 (DECL_PRIMARY_TEMPLATE): Likewise.
6354 (PRIMARY_TEMPLATE_P): Use it.
6355 (push_template_decl_real): New function.
6356 (redeclare_class_template): Take new template parameters as
6358 (is_specialization_of): New function.
6359 (comp_template_args): Declare.
6360 * decl.c (pushtag): Handle friend template classes.
6361 (xref_tag): Likewise. Use new calling convention for
6362 redeclare_class_template.
6363 * decl2.c (grok_x_components): Handle friend templates.
6364 * friend.c (is_friend): Use is_specialization_of where
6365 appropriate. Deal with friend class templates.
6366 (make_friend_class): Let a class template be friends with itself.
6367 * pt.c (comp_template_args): Remove declaration.
6368 (tsubst_friend_class): New function.
6369 (push_template_decl_real): New function.
6370 (push_template_decl): Use it.
6371 (redeclare_class_template): Adjust for new calling convention.
6372 (comp_template_args): Give it external linkage.
6373 (instantiate_class_type): Use tsubst_friend_class to deal
6374 with friend templates.
6375 * typeck.c (comptypes): Use comp_template_args, rather than
6376 expanding it inline.
6377 * parse.y (component_decl): Handle a nested template type
6378 like other component type declarations.
6380 * pt.c (check_explicit_specialization): Handle overloaded
6381 constructors correctly.
6383 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
6384 (lookup_template_class): Use it.
6386 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
6388 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
6389 * cp-tree.h: Add WRAPPER support.
6390 * call.c (add_candidate): Split out from add_*_candidate fns.
6391 (build_over_call): Take the candidate instead of function and args.
6392 Enforce access control here. Emit overload warnings here.
6393 (add_warning): New fn.
6394 (joust): Add WARN parm. If not set, call add_warning instead of
6395 printing a warning. Re-enable some warnings.
6397 (convert_like): Adjust.
6398 (build_new_op): Adjust.
6399 (build_new_function_call): Adjust.
6400 (build_user_type_conversion_1): Adjust.
6401 (USER_CONV_FN): Adjust.
6402 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
6403 build_int_wrapper): New fns.
6405 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
6407 * pt.c (unify): Fix typo in previous change.
6409 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6411 * error.c (dump_type_real): Declare canonical_name.
6413 * typeck.c (comp_target_types): Fix PMFs.
6415 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
6417 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
6418 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
6421 * pt.c (tsubst): Decrease the template-level of
6422 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
6423 TEMPLATE_PARM_INDEX.
6424 (template_decl_level): New function.
6425 (unify): Make sure to record unifications for template
6426 parameters, even when the parameters exactly match the arguments.
6427 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
6428 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
6429 aren't from the level we're currently working on.
6431 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
6433 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
6435 * decl2.c (check_member_template): Set DECL_IGNORED for member
6436 class templates, too.
6438 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
6440 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6442 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
6444 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
6446 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
6447 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
6448 (init_decl_processing): Handle TI types.
6449 * typeck.c (unsigned_type, signed_type): Handle TI types.
6451 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
6453 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
6454 New local added_libraries. Increment count when add library to
6457 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
6459 * cp-tree.h (type_as_string_real): New function.
6460 * pt.c (mangle_class_name_for_template): Use it.
6461 * error.c (dump_aggr_type): Change prototype.
6462 (dump_type_prefix): Likewise.
6463 (dump_type_suffix): Likewise.
6464 (dump_type_real): Convert from dump_type. If desired, the
6465 "canonica" name of a typedef, i.e., the name of the underlying
6466 type, can be printed.
6467 (dump_type): Call dump_type_real.
6469 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
6471 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
6473 * typeck.c (comp_target_types): Tweak pedantic case.
6474 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
6475 Return -1 or 1 instead of 1 or 2.
6476 (compparms): Remove STRICT handling.
6477 (convert_for_assignment): Fix handling of pmfs.
6479 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
6481 * typeck.c (comp_target_types): Handle references like pointers.
6482 (comp_target_parms): Note that return code from comp_target_types
6483 can be negative to indicate failure.
6485 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6487 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
6488 which requires a working target compiler to build.
6490 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
6492 * tree.c (avoid_overlap): Add prototype.
6494 * spew.c (num_tokens): Add prototype.
6495 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
6497 * search.c (dfs_check_overlap): Add prototype.
6498 (dfs_no_overlap_yet): Likewise.
6500 * pt.c (original_template): Add prototype.
6501 (inline_needs_template_parms): Likewise.
6502 (push_inline_template_parms_recursive): Likewise.
6503 (retrieve_specialization, register_specialization): Likewise.
6504 (print_candidates, reduce_template_parm_level): Likewise.
6505 (build_template_decl, mark_template_parm): Likewise.
6506 (tsubst_friend_function, get_bindings_real): Likewise.
6508 * method.c (start_squangling): Add prototype.
6509 (end_squangling, check_ktype, issue_ktype): Likewise.
6510 (build_overloaded_scope_ref, check_btype): Likewise.
6511 (build_mangled_template_parm_index): Likewise.
6513 * lex.c (init_cpp_parse): Add prototype.
6514 (handle_cp_pragma, handle_sysv_pragma): Likewise.
6515 (reduce_cmp, token_cmp): Likewise.
6517 * except.c (call_eh_info): Add prototype.
6518 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
6519 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
6521 * decl2.c (is_namespace_ancestor): Add prototype.
6522 (namespace_ancestor, add_using_namespace): Likewise.
6523 (ambiguous_decl): Likewise.
6525 * decl.c (indent): Add prototype.
6527 * call.c (add_template_candidate_real): Add prototype.
6529 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
6531 * decl2.c (build_expr_from_tree): Just return a PMF.
6533 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
6535 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
6536 when doing initializations.
6538 * pt.c (unify): Use comptypes to compare type args.
6540 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
6542 * decl.c (duplicate_decls): Fix check for when it's safe to free
6545 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
6548 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
6550 * pt.c (build_template_parm_index): Add prototype.
6552 * search.c (my_tree_cons): Don't clear words outside the
6553 newly allocated node.
6555 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
6557 * lex.c (init_parse): Now returns char* containing the filename.
6559 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
6560 Jeff Law <law@cygnus.com>
6562 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
6565 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6567 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
6569 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6571 * decl.c (duplicate_decls): Don't warn for redundant decls if
6572 friend: let add_friend take care of it.
6574 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6576 * sig.c (build_signature_pointer_constructor): Don't set
6577 TREE_HAS_CONSTRUCTOR for a signature pointer.
6578 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
6579 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
6581 * typeck.c (build_unary_op): Only allow taking the address of a
6583 * typeck2.c (digest_init): Simplify.
6584 (store_init_value): Don't pedwarn about using { } for pmfs.
6586 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
6588 * cp-tree.h (start_decl): Update prototype.
6589 * decl.c (start_decl): Like the C version, new parameters
6590 for the attributes. Call cplus_decl_attributes here,
6591 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
6592 (grokdeclarator): Pass NULL for new start_decl arguments.
6593 * pt.c (tsubst_expr): Likewise.
6594 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
6595 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
6596 * lex.c (build_lang_decl): Add lang_name_java.
6597 * class.c (push_lang_context): Add lang_name_java.
6598 * method.c (build_mangled_name): Check for is_java_type.
6600 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6602 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
6603 * call.c (build_scoped_method_call): Check for TREE_CODE for
6604 VOID_TYPE instead of type == void_type_node.
6605 (build_method_call): Likewise.
6606 * decl.c (lookup_name_real): Likewise.
6607 (grokdeclarator): Likewise.
6608 (start_decl): Likewise.
6609 (grokparms): Likewise.
6610 (start_function): Likewise.
6611 (finish_function): Likewise.
6612 (start_method): Likewise.
6614 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
6616 * lex.c (finput): New variable.
6617 (init_cpp_parse): Renamed from init_parse.
6618 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
6619 (finish_parse): New function.
6620 * cp-tree.h (init_lex, init_parse): Remove declarations.
6622 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
6624 * call.c (build_call): Still evaluate the actual argument.
6625 * class.c (is_empty_class): Update for -fnew-abi.
6627 * decl2.c: -fnew-abi implies -fsquangle.
6629 * method.c (do_build_assign_ref): Don't do anything to copy
6631 (do_build_copy_constructor): Likewise.
6632 * call.c (build_over_call): Likewise.
6634 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6636 * tree.c (avoid_overlap): Return a value.
6638 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
6640 * method.c (check_btype): Add missing argument to xrealloc.
6641 (check_ktype): Likewise.
6643 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6645 Implement empty base optimization.
6646 * class.c (finish_struct_1): Add vbase fields earlier. Set
6647 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
6648 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
6649 (types_overlap_p): New fn.
6650 * tree.c (avoid_overlap): New fn.
6651 (build_base_fields): Use it to avoid overlapping empty bases.
6652 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
6654 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
6656 Re-implement allocation of base class subobjects.
6657 * tree.c (unshare_base_binfos): New fn.
6658 (layout_basetypes): Use it. Now handles offsets of both virtual and
6659 non-virtual bases, after layout_type.
6660 (layout_vbasetypes): Remove.
6661 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
6662 (build_vbase_pointer_fields): Split out from old layout_basetypes.
6663 * class.c (finish_base_struct): Lose offset handling code.
6664 Move nonvdtor warning here. Don't mess with t_binfo anymore.
6665 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
6666 * cp-tree.h: Adjust.
6668 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
6670 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
6671 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
6672 * class.c (duplicate_tag_error): Likewise.
6673 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
6674 * tree.c (layout_vbasetypes): Update from layout_record, remove
6675 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
6676 (layout_basetypes): Likewise.
6678 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
6680 * class.c, Make sure system.h is included just after config.h.
6681 Delete lingering stdio and errno references too.
6682 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
6684 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
6686 * friend.c (is_friend): Fix access control for local classes.
6688 * class.c (is_empty_class): New fn.
6689 * call.c (build_call): Don't pass empty class objects to a function.
6691 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
6693 * call.c (build_over_call): Do name resolution for default
6694 arguments of function templates in the scope of the templates.
6696 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
6698 * call.c: Include system.h. Remove includes, declarations and
6699 defines provided by system.h.
6700 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
6701 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
6702 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
6703 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
6704 * typeck2.c, xref.c: Likewise.
6705 * Makefile.in: Dependencies updated as appropriate.
6706 * Make-lang.in: Likewise.
6708 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
6710 * pt.c (fn_type_unification): Allow incomplete unification without
6711 an immediate error message.
6713 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6715 * tree.c (member_p): New fn.
6716 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
6717 initializing class members.
6719 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
6720 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
6722 * call.c (build_method_call): Handle non-scoped destructors, too.
6723 * pt.c (tsubst_copy): Likewise.
6725 * pt.c (print_template_context): Split out...
6726 (push_tinst_level): ...from here.
6728 * friend.c (is_friend): Don't pass a type to decl_function_context.
6730 * typeck.c (convert_for_initialization): Always hand off
6731 conversions to class type.
6733 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6735 * friend.c (is_friend): Local classes have the same access as the
6738 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
6740 * typeck.c (expand_target_expr): Delete dead function.
6742 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
6744 * repo.c (save_string): Delete dead function.
6746 * method.c (thunk_printable_name): Delete dead function.
6748 * lex.c (yynextch): Delete dead function.
6750 * expr.c (tree_extract_aggr_init): #if 0 out.
6752 * except.c (do_unwind): Delete dead function.
6753 (easy_expand_asm): Likewise.
6755 * cvt.c (build_conversion_type_1): Delete dead function.
6757 * cp-tree.h (push_expression_obstack): Declare.
6759 * call.c (source_type): #if 0 out.
6761 * class.c (alter_access): Remove unused label. Add braces
6762 around empty else clause.
6764 * lex.c (yyprint): Fix argument to printf.
6766 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
6768 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
6770 * pt.c (instantiate_class_template): Make sure template
6771 arguments are permanent.
6772 * init.c (resolve_offset_ref): Don't go looking around in
6775 * semantics.c: Add routines to handle expressions, and some
6776 declaration processing.
6777 * parse.y: Use them.
6778 (current_class_depth): Move declaration to cp-tree.h.
6779 * parse.c: Regenerated.
6780 * cp-tree.h: Use them.
6781 (current_class_depth): Declare.
6782 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
6784 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
6786 * error.c (dump_decl): Be a bit more explicit with template
6787 type arguments, when verbose.
6789 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
6791 * inc/exception: Reorder closing braces.
6793 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
6795 * pt.c (redeclare_class_template): New function.
6796 * cp_tree.h (redeclare_class_template): Declare it.
6797 * decl.c (xref_tag): Use it.
6799 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
6801 * call.c (build_over_call): Check IS_AGGR_TYPE, not
6803 * typeck.c (convert_arguments): Likewise.
6805 * decl.c (grokdeclarator): Remove const and volatile from type after
6806 setting constp and volatilep.
6808 * class.c (finish_struct_1): Don't warn about bool bitfield larger
6811 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
6813 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
6815 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
6817 * call.c (build_object_call): Complain about ambiguous operator(),
6818 rather that crashing.
6819 (build_new_op): Likewise.
6820 (build_op_delete_call): Likewise.
6822 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
6824 * cvt.c (perform_qualification_conversions): Use comp_target_types
6825 instead of comp_ptr_ttypes.
6827 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
6829 * cp-tree.h (enforce_access): Declare.
6830 * call.c (enforce_access): Make it extern, not static.
6831 * class.c (alter_access): Use enforce_access; modify code for ISO
6832 compliance, rather than ARM rules.
6834 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6836 * cp-tree.h: Fix typo.
6838 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
6840 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
6841 if (aggregate_value_p (type)).
6843 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
6845 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
6847 * tree.c (mapcar): When dealing with a DECL, use it's constant
6849 * pt.c (lookup_template_class): Don't mangle the names of template
6850 classes whose arguments are unknown.
6852 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
6854 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
6856 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
6858 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
6860 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
6861 boolean_type_node to 1.
6863 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
6865 * error.c (dump_expr): Remove unused variable `l'.
6867 * pt.c (for_each_template_parm): New function, created by
6868 converting uses_template_parms.
6869 (tree_fn_t): New typedef.
6870 (uses_template_parms): Use it.
6871 (mark_template_parm): New function.
6872 (push_template_decl): Check that the argument list of a partial
6873 specialization uses all the template parameters.
6875 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
6876 with it; we might want it for debugging.
6877 * cp-tree.h (type_unification): Change interface.
6878 * class.c (finish_struct_1): Skip nested template types, just like
6879 ordinary nested types.
6880 (instantiate_type): Use new interface to type_unification.
6881 * lex.c (init_lex): Add __sz as opname for sizeof.
6882 * method.c (build_overload_scope_ref): New function.
6883 (build_overload_int): Handle complex expressions. Set
6884 numeric_output_need_bar if necessary.
6885 (build_overload_value): Handle non-PARM_DECL nodes; this
6886 routine is now used by build_overload_int. Remove some
6887 assignments to numeric_output_need_bar. Use
6888 build_overload_scope_ref.
6889 (build_qualified_name): Note that some template mangled names end
6890 with digits, and set numeric_output_need_bar appropriately. Use
6891 build_underscore_int.
6892 * pt.c (unify): Change interface.
6893 (type_unification_real): Likewise.
6894 (determine_specialization): Use new interfaces.
6895 (tsubst): Deal gracefully with situations in which the argument
6896 vector is not fully filled.
6897 (fn_type_unification): Use new interfaces.
6898 (type_unification): Likewise. Remove NOP_EXPR hack.
6899 (type_unification_real): Likewise.
6900 (unify): Likewise. Deal with unification of complex expressions.
6902 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6904 * pt.c (complete_template_args): Initialize skip properly.
6906 * decl.c (make_typename_type): Revert.
6907 (make_implicit_typename): Remove.
6908 (lookup_name_real): Don't call it. Call lookup_field if we see a
6909 TYPE_DECL from a template base.
6910 * search.c (lookup_field): Do implicit typename stuff.
6912 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
6913 Geoff Noer <noer@cygnus.com>
6915 * Makefile.in: Various fixes for building cygwin32 native toolchains.
6916 * Make-lang.in: Likewise.
6918 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6920 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
6922 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
6924 * decl.c (make_implicit_typename): Rewrite removed code.
6925 (make_typename_type): Call it if the type we look up comes from
6926 a base that uses template parms.
6928 * pt.c (complete_template_args): Rewrite.
6929 (tsubst, FUNCTION_DECL): Use it.
6931 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
6933 * semantics.c (finish_asm_stmt): Fix combine strings. Call
6934 c_expand_asm_operands () if output_operands, input_operands or
6935 clobbers is not NULL_TREE.
6937 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6939 * pt.c (complete_template_args): New function.
6940 (get_bindings): Deal with specializations of function templates
6941 with return type containing parameters from outer class
6943 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
6944 substitute arguments and compose a new type.
6946 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
6948 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
6951 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6953 * decl.c (make_implicit_typename): Lose useless code.
6955 * call.c (standard_conversion): Handle A* -> const A* properly.
6957 * pt.c (get_bindings_real): Rename from get_bindings. Add
6959 (get_bindings): Pass 1.
6960 (get_bindings_overload): Pass 0.
6962 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
6964 * pt.c (check_explicit_specialization): When reverting a static
6965 member function, also remove the `this' parameter from
6966 last_function_parms.
6968 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6970 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
6973 * decl.c (store_bindings): Use free_binding_vecs.
6974 (pop_from_top_level): Likewise.
6976 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
6978 * decl.c (make_implicit_typename): Only change the type of a
6981 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
6983 * semantics.c: New file, containing routines to perform the
6984 semantic phase of parsing.
6986 * pt.c (tsubst_expr): Likewise.
6987 * cp-tree.h: Declare the various functions in semantics.c.
6988 Provide macros to access _STMT tree nodes.
6989 * cp-tree.def: Add ASM_STMT tree node.
6990 * Makefile.in, Make-lang.in: Add dependencies on and for
6993 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
6995 * pt.c (push_template_decl): Only check primary templates.
6997 * pt.c (check_explicit_specialization): Complain about default args
6998 in explicit specialization.
7000 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
7001 constructor_declarator.
7003 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
7005 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
7006 has no overloaded operator ->.
7008 * call.c (build_field_call): Don't crash when presented with a
7009 field that is actually a nested type.
7011 * decl.c (pushtag): Deal with friend class injection in local
7014 * call.c (build_object_call): Don't crash if OBJ is a
7015 pointer-to-member-function.
7017 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
7019 * pt.c (push_template_decl): Complain about template with C linkage,
7020 anonymous template class.
7022 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
7024 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
7025 * search.c: Likewise.
7027 * lex.c (do_pending_defargs): Only call
7028 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
7030 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
7032 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
7034 * parse.y: Deal with CONSTRUCTORS in new_initializers.
7036 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
7038 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
7039 closely mimics the behavior in parse.y.
7040 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
7041 into a compound statement.
7043 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
7045 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
7046 * pt.c (inline_needs_template_parms): New fn.
7047 (original_template): New fn.
7048 (push_inline_template_parms_recursive): New fn.
7049 (maybe_begin_member_template_processing): Use them.
7050 (maybe_end_member_template_processing): Likewise.
7051 (is_member_or_friend_template): Rename to is_member_template.
7052 Member functions of local classes are never member templates.
7054 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7056 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
7057 added in the class scope to catch redefinition error.
7059 * pt.c (reduce_template_parm_level): Also copy
7060 the DECL_TEMPLATE_PARMS field.
7062 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
7064 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
7065 reduced-level template type parameter.
7067 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
7069 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
7070 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
7071 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
7072 * decl.c (duplicate_decls): Propagate it.
7073 * typeck2.c (abstract_virtuals_error): Use two loops to emit
7074 abstract virtual functions and virtual functions which need a
7075 final overrider separately.
7077 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
7079 * lang-specs.h: Properly put brackets around array elements in
7082 * typeck.c (build_binary_op_nodefault): Correctly place parens around
7083 && and || in expression.
7085 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
7087 * call.c (default_parm_conversions): Remove prototype definition.
7088 (build_method_call): Remove unused variable result.
7090 * cvt.c (ocp_convert): Remove unused variable conversion.
7092 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
7094 * except.c (do_unwind): #if 0 definition of unused variables fcall
7097 * expr.c (extract_scalar_init): #if 0 prototype and function
7100 * init.c (expand_aggr_init_1): Remove unused variable init_type.
7101 (build_new_1): Remove unused variable t.
7103 * pt.c (instantiate_class_template): Remove unused variable newtag;
7104 cast called function return value to void.
7105 (do_decl_instantiation): Remove unused variables name and fn.
7107 * tree.c (get_type_decl): Add default return to shut up compiler from
7108 complaining control reaches end of non-void function.
7110 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
7112 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
7114 * call.c (default_parm_conversions): Remove prototype definition.
7115 (build_method_call): Remove unused variable result.
7116 (build_over_call): Add default case in enumeration switch.
7118 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
7120 * decl2.c (lang_decode_option): Change j's type to size_t.
7122 * tree.c (layout_vbasetypes): record_align and desired_align are of
7123 type unsigned int; const_size and nonvirtual_const_size likewise.
7125 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
7127 * parse.y (new_initializer): Make sure all initializers are
7130 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
7132 * decl2.c (import_export_decl): Mark tinfo functions for
7133 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
7135 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
7137 * method.c: Fix typo.
7139 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7143 * method.c: Include "system.h" to get stdlib.h, stdio.h,
7144 ctype.h, string.h, etc.
7145 (issue_nrepeats): Add default case in enumeration switch.
7146 (check_btype): Likewise.
7147 (process_overload_item): Likewise.
7151 * method.c: Include "system.h" to get stdlib.h, stdio.h,
7152 ctype.h, string.h, etc.
7153 (issue_nrepeats): Add default case in enumeration switch.
7154 (check_btype): Likewise.
7155 (process_overload_item): Likewise.
7157 * Makefile.in (method.o): Depend on system.h.
7160 * Makefile.in (method.o): Depend on system.h.
7163 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7165 * lex.c (do_scoped_id): Fix parenthesizing.
7167 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
7169 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
7170 FLAG_RTTI is unset, initialize type info machinery and continue
7171 with FLAG_RTTI enabled.
7172 (get_typeid): Likewise.
7174 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
7176 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
7179 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
7181 * pt.c (finish_member_template_decl): Deal more gracefully with
7182 invalid declarations.
7184 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
7186 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
7187 cp-tree.h: Clean up more old overloading code, old RTTI code, and
7188 some formatting quirks.
7190 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
7191 method.c, pt.c, ptree.c, typeck.c: Remove support for
7192 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
7194 * Makefile.in: Adjust.
7196 * pt.c (unify): Don't allow reduced cv-quals when strict.
7198 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
7199 *type_unification* and unify.
7201 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
7203 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
7204 (nested_name_specifier): And add it before this use.
7205 (typename_sub0): And this use. Also add use without the keyword.
7206 (typename_sub1): Likewise.
7207 * pt.c (instantiate_class_template): Don't actually instantiate
7208 anything if our type uses template parms.
7210 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
7212 * decl.c (start_function): Don't call temporary_allocation for a
7215 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7217 * pt.c (instantiate_class_template): Don't mess with friends if
7218 our type uses template parms.
7220 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
7222 * parse.y (nested_name_specifier): Use explicit_template_type.
7223 (typename_sub): Allow a template_type, an explicit_template_type,
7224 or an implicit template type at the end.
7225 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
7226 * decl.c (make_typename_type): Handle template-id where the name
7228 * call.c (build_scoped_method_call): Handle member template
7230 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
7231 destructor is represented by the type.
7233 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
7234 * parse.y (nested_name_specifier): Add 'template' case.
7235 (explicit_template_type): New rule.
7236 (typename_sub): Use it.
7237 * decl.c (make_typename_type): Handle getting a template-id for NAME.
7238 * pt.c (tsubst): Likewise.
7240 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
7242 * pt.c (add_to_template_args): Fix thinko.
7243 (instantiate_class_template): Call it later.
7245 * pt.c (get_class_bindings): Add outer_args parm.
7246 (most_specialized_class): Likewise.
7247 (instantiate_class_template): Pass it.
7248 (more_specialized_class): Likewise.
7249 (lookup_template_class): Get context from template if none
7251 (finish_member_template_decl): Don't do anything with a
7252 partial specialization.
7253 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
7255 * class.c (finish_struct): Member class templates have already been
7256 checked for name clashes.
7257 * decl.c (pushdecl_with_scope): Handle pushing at class level.
7259 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
7261 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
7262 (tsubst, *_PARM): Support multiple levels of template classes.
7263 (instantiate_class_template): Look up the pattern from the
7265 (lookup_template_class): Handle getting a template for d1.
7266 (push_template_decl): Correct setting of 'primary'.
7267 (reduce_template_parm_level): Add 'levels' parm.
7268 (finish_member_template_decl): Support member class templates.
7269 (template_class_depth): Handle multiple levels.
7270 * parse.y (component_decl_1, fn.def2): Remove member template case.
7271 (component_decl): Add member template cases.
7272 * decl2.c (check_member_template): We now handle member template
7274 * decl.c (pushtag): Handle member templates.
7275 * method.c (do_inline_function_hair): Don't touch
7276 IDENTIFIER_GLOBAL_VALUE.
7277 * init.c (build_offset_ref): If name isn't an identifier, just
7279 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
7281 * typeck.c (get_delta_difference): Do adjust for conversions to
7282 and from virtual base.
7284 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
7286 * typeck.c (get_delta_difference): Give hard error for conversion
7289 * cp-tree.h: Tweak formatting.
7291 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
7293 * decl.c (push_namespace): Handle redeclaration error.
7295 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
7296 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
7297 (NAMESPACE_BINDING): New macro.
7298 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
7301 * pt.c (push_template_decl): Use innermost_args.
7303 * decl.c (get_unique_name): Tweak from earlier in the name.
7305 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
7307 * cp-tree.def: Add CPLUS_BINDING node.
7308 * cp-tree.h (tree_binding): New struct.
7309 (BINDING_SCOPE, BINDING_VALUE): New macros.
7310 (current_namespace, global_namespace): Declare extern.
7311 (struct lang_decl_flags): New field in_namespace.
7312 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
7313 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
7314 (TREE_INDIRECT_USING): New macro.
7315 * decl2.c (current_namespace, global_namespace): Declare. The
7316 value is a NAMESPACE_DECL now, not a TREE_LIST.
7317 (is_namespace_ancestor, namespace_ancestor): New static functions.
7318 (add_using_namespace, ambiguous_decl): Likewise.
7319 (lookup_using_namespace): New support function for lookup_name.
7320 (qualified_lookup_using_namespace): New support function for
7321 do_scoped_id and lookup_namespace_name.
7322 (get_namespace_id): Mark as obsolete.
7323 (current_namespace_id): Likewise.
7324 (do_namespace_alias): Implement.
7325 (do_using_directive): Implement as call to add_using_namespace.
7326 * decl.c (binding_for_name): New function.
7327 (push_namespace, pop_namespace): Implement.
7328 (push_decl): Don't install a FUNCTION_DECL in the global branch.
7329 (lookup_namespace_name): Implement using qualified lookup.
7330 (lookup_name_real): For global scoping, lookup in
7331 global_namespace. For namespace scoping, lookup in given
7332 namespace. For unscoped lookup, iterate over namespace,
7333 considering using directives.
7334 (init_decl_processing): Initialize global_namespace.
7335 (grokvardecl): Build assembler name as static name for globals.
7336 (grokdeclarator): Remove old namespace mangling.
7337 (xref_tag): When installing a global binding for the
7338 tag, make sure we have an identifier.
7339 * method.c (build_overload_nested_name): Mangle namespaces.
7340 (build_qualified_name): Likewise.
7341 (build_decl_overload_real): Likewise.
7342 * lex.c (build_lang_decl): Set namespace for new declaration to
7344 (do_scoped_id): Find global names in global or current
7345 namespace, or using qualified namespace lookup, depending on
7347 * init.c (build_member_call): When scope is namespace, use
7348 build_x_function_call instead.
7349 (build_offset_ref): When scope is namespace, collapse processing
7350 to lookup_namespace_name instead.
7351 * error.c (dump_decl): Support NAMESPACE_DECL.
7352 * decl.c (pushdecl): Bind globals to current namespace.
7353 (push_overloaded_decl): Likewise.
7354 (lookup_tag): Likewise.
7355 (lookup_name_current_level): Likewise.
7356 (xref_tag): Likewise.
7357 (start_function): Likewise.
7358 * lex.c (do_identifier): Likewise.
7359 (identifier_typedecl_value): Likewise.
7360 (real_yylex): Likewise.
7361 * method.c (do_inline_function_hair): Likewise.
7362 * parse.y (unscoped): Likewise.
7363 * pt.c (check_explicit_specialization): Likewise.
7364 (lookup_template_class): Likewise.
7365 * rtti.c (call_void_fn): Likewise.
7366 * sig.c (build_sigtable): Likewise.
7367 * ptree.c (lang_print_xnode): New function.
7369 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
7371 * pt.c (instantiate_class_template): Don't instantiate if pedantic
7372 and the args use template parms.
7374 * pt.c (push_tinst_level): If the instantiation uses template parms,
7376 * decl.c (xref_basetypes): Do call complete_type for basetypes
7377 that involve template parameters.
7379 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
7381 * typeck2.c (process_init_constructor): Fix labeled init check.
7383 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
7385 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
7386 argument to tsubst and friends.
7388 * pt.c (tsubst, FUNCTION_DECL): Tidy.
7390 * typeck.c (build_x_function_call): Handle static member function
7391 templates like non-templates. Handle friend templates like normal
7393 * pt.c (tsubst, *_PARM): Don't use orig_level.
7394 (get_bindings): Don't call add_to_template_args.
7395 (instantiate_template): Likewise.
7396 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
7397 * ptree.c (print_lang_type): Print index/level for template parms.
7399 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
7401 * Make-lang.in (cc1plus): Note that cc1plus depends on
7402 cp/cp-tree.h and cp/cp-tree.def.
7404 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
7405 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
7406 position in a template parameter list.
7407 * cp-tree.h (template_parm_index): New structure, used as the tree
7408 structure for a TEMPLATE_PARM_INDEX.
7409 (TEMPLATE_PARM_IDX): New macro.
7410 (TEMPLATE_PARM_LEVEL): Likewise.
7411 (TEMPLATE_PARM_DESCENDANTS): Likewise.
7412 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
7413 (TEMPLATE_PARM_DECL): Likewise.
7414 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
7415 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
7416 (TEMPLATE_TYPE_DECL): Likewise.
7417 (TEMPLATE_CONST_IDX): Remove.
7418 (TEMPLATE_CONST_LEVEL): Likewise.
7419 (TEMPLATE_CONST_SET_INFO): Likewise.
7420 (TEMPLATE_TYPE_SET_INFO): Likewise.
7421 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
7423 (TEMPLATE_TYPE_LEVEL): Likewise.
7424 * decl.c (decls_match): Call comp_template_parms, rather than
7425 expanding it inline.
7426 (duplicate_decls): If two template declarations are being merged,
7427 then their TEMPLATE_INFOs should be merged as well.
7428 (grokfndecl): Save template-id information when declaring a friend
7429 with explicit template arguments. Pass arguments to
7430 check_explicit_specialization via correct convention; at some
7431 point check_explicit_specialization changed, but these call-sites
7433 (grokdeclarator): Tidy up slightly.
7434 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
7435 two template functions with the same DECL_ASSEMBLER_NAME the same,
7436 since the names are not yet mangled.
7437 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
7438 TEMPLATE_CONST_PARM.
7439 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
7440 decl for a non-type parameter, rather than printing `<tparm ...>'.
7441 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
7442 (do_friend): Deal with template friends.
7443 * lex.c (do_pending_inlines): Call
7444 maybe_begin_member_template_processing, rather than
7445 conditionally calling begin_member_template_processing.
7446 (process_next_inline): Likewise. Call
7447 maybe_end_member_template_processing, rather than
7448 conditionally calling end_member_template_processing.
7449 (do_pending_defargs): Likewise.
7450 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
7451 TEMPLATE_CONST_PARM.
7452 * method.c (build_mangled_template_parm_index): New function.
7453 (build_overload_value): Use it.
7454 (build_overload_name): Likewise.
7455 * pt.c (finish_member_template_decl): Allow friend declarations.
7456 (template_class_depth): New function.
7457 (is_member_template): Rename, and modify, to become...
7458 (is_member_or_friend_template): New function.
7459 (end_member_template_processing): Rename, and modify, to become...
7460 (maybe_end_member_template_processing).
7461 (build_template_parm_index): New function.
7462 (reduce_template_parm_level): New function.
7463 (process_template_parm): Modify to use build_template_parm_index.
7464 (push_template_decl): Deal with friend templates.
7465 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
7466 TEMPLATE_CONST_PARM.
7467 (tsubst_friend_function): New function.
7468 (instantiate_class_template): Generate the DECL_FRIENDLIST
7469 for a new instantiation by using tsubst_friend_function rather
7471 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
7472 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
7473 appropriate new macros. Use reduce_template_parm_level to
7474 generate lower-level template parameters. Handle tsubst'ing into
7475 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
7476 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
7477 templates. Similarly for the template parameters for a new
7479 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
7480 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
7481 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
7482 (get_bindings): Call add_to_template_args if necessary.
7483 (instantiate_decl): Handle instantiations of friend templates.
7484 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
7485 TEMPLATE_TYPE_PARM as a list of fields; it's not!
7486 * spew.c (yylex): Do a little manual constant propagation to
7489 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
7491 * error.c: Include sys/types.h.
7493 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
7495 * method.c (build_mangled_name): Start CPP directives in column zero.
7497 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
7499 * typeck2.c (process_init_constructor): Sorry about non-trivial
7500 labeled initializers.
7501 * parse.y (initlist): Re-enable labeled initializers.
7503 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7505 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
7506 all callers changed. Rely on the new parameter instead of arg
7507 being a TREE_LIST when determine whether we are working inside
7508 template template parameter. Clean up is_type test.
7510 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
7512 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
7513 * typeck2.c (initializer_constant_valid_p): Allow conversions
7514 between pointers and references.
7516 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
7518 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
7519 if pedantic || warn_pointer_arith.
7521 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7523 * pt.c (unify): Handle TEMPLATE_DECL.
7525 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
7527 * cp-tree.h (strip_attrs): Remove decl.
7529 1998-02-18 Doug Evans <devans@cygnus.com>
7531 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
7532 Update olddecl's attributes too.
7533 (strip_attrs): Remove function.
7534 * typeck.c (common_type): Call merge_machine_type_attributes.
7536 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
7538 * parse.y (initdcl0_innards): New grammar symbol.
7539 (nomods_initdecls, nomods_initdcl0): Change type from itype to
7540 none, since the resulting value is never used.
7541 (parse_decl): New function.
7542 (datadef): Remove redundant actions.
7543 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
7544 * parse.c: Regenerated.
7546 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
7548 * parse.y (simple_stmt): Use getdecls() to check for decl.
7550 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
7552 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
7554 (c++.install-common): Install c++filt properly as native or as cross
7556 (c++.uninstall): Add c++filt.
7558 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7560 * call.c (standard_conversion): Fix multi-level ptr conversions.
7562 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
7564 * init.c (build_new): Propagate error_mark_node up.
7566 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
7568 * parse.y (simple_stmt): If the condition isn't a declaration,
7569 start the controlled block after the test.
7571 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7573 * call.c (build_over_call): Convert builtin abs, labs and fabs to
7575 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
7578 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7580 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
7582 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7584 * cp-tree.h: Add access_protected_virtual_node.
7585 * class.c (init_class_processing): Initialize it.
7586 * decl.c (xref_basetypes): Use it.
7587 * parse.y (base_class_access_list): Likewise.
7589 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
7590 (c++.install-common): Install c++filt.
7592 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7594 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
7596 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
7598 * call.c (reference_binding): Use comptypes when comparing
7599 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
7601 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
7603 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
7604 (really_overloaded_fn): Move check here from is_overloaded_fn.
7605 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
7607 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
7609 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
7612 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
7614 * cp-tree.h (push_template_decl): Return the decl passed in, or an
7615 equivalent duplicate.
7616 * decl.c (pushtag): Use the return value from push_template_decl.
7617 (duplicate_decls): When duplicating a template declaration, merge
7618 the DECL_TEMPLATE_RESULTs as well.
7619 (make_implicit_typename): Don't try to dive into typename types to
7620 find a context for making a new implicit typename.
7621 (start_decl): Use the return value from push_template_decl.
7622 (grokdeclarator): Complain about declarations list `const operator
7623 int'. Since we don't correctly handle in-class initializations of
7624 non-static data members, complain about this (now illegal)
7625 practice. Issue an error for initializations of non-const statics
7626 since that is illegal as well, and since we don't handle that case
7628 (start_function): Use the return value from push_template_decl.
7629 (start_method): Likewise.
7630 * decl2.c (grokfield): Likewise. Since the change to
7631 grokdeclarator ensures that all initialized fields are in fact
7632 static, remove a redundant test for TREE_PUBLIC.
7633 * parse.y (initlist): Disable labeled initializers since they do
7634 not work as per the documentation, and since they do not use the
7635 same syntax as the C front end.
7636 * pt.c (push_template_decl): Return the decl passed in, or an
7637 equivalent duplicate.
7638 (lookup_template_class): When searching in a nested context,
7639 use the right arguments.
7640 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
7641 * typeck.c (build_component_ref): Assign the correct type to the
7642 result of build_vfn_ref.
7644 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
7646 * pt.c (convert_nontype_argument): Fix typo.
7647 (check_explicit_specialization): Allow old-style specialization
7648 of class template members.
7650 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
7651 Manfred Hollstein <manfred@s-direktnet.de>
7653 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
7654 when deciding to override DECL_ASSEMBLER_NAME.
7656 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
7658 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
7659 * cp-tree.h (flag_do_squangling): Add declaration.
7660 * lang-options.h: Add -fsquangle and -fno-squangle.
7661 * method.c: Add macros and static variables for squangling.
7662 (build_overload_name): Rename to build_mangled_name, add logic for B
7663 compression, and split into process_modifiers and
7664 process_overload_item.
7665 (process_modifiers): New function, to handle constant, reference,
7667 (process_overload_item): New function, handles issue of type codes.
7668 (build_overload_name): New function, start squangling and call
7670 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
7671 (start_squangling): New function to initialize squangling structs.
7672 (end_squangling): New function to destroy squangling structs.
7673 (nrepeats): Rename variable to Nrepeats.
7674 (issue_nrepeats): New function for issuing 'n' type repeats.
7675 (check_ktype): New function to check for type K name compression.
7676 (build_overload_nested_name): Add a check for K name compression.
7677 (build_qualified_name): Add a check for K name compression and don't
7678 use DECL_ASSEMBLER_NAME when squangling is on.
7679 (check_btype): New function, checks for B type compression.
7680 (build_static_name, build_decl_overload_real): Initiate squangling.
7681 (build_typename_overload, build_overload_with_type): Initiate
7684 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
7686 * method.c (make_thunk): Avoid name buffer overflow.
7688 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
7690 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
7691 don't define them yet.
7693 * parse.y (nomods_initdcl0): Add constructor_declarator case.
7695 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7697 * config-lang.in (diff_excludes): Use basename only.
7699 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
7701 * tinfo2.cc: Add tinfo for signed char.
7703 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
7705 * search.c (compute_access): Handle protected constructors in derived
7706 classes as accessible.
7708 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
7710 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
7711 Call convert_from_reference sooner.
7713 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
7715 * cvt.c (ocp_convert): Obtain the constant values from constant
7716 decls even if the destination type is the same as the type of the
7719 * decl2.c (finish_file): Make sure that static inlines with
7720 definitions are not marked DECL_EXTERNAL before returning.
7722 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7724 * decl.c: Lose arg_looking_for_template.
7725 (lookup_name_real): Likewise.
7726 * parse.y: Lose processing_template_arg, template_arg1.
7727 (primary): Likewise.
7728 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
7730 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7732 * error.c (dump_decl): Fix type of default arguments for template
7733 template parameters and nontype template parameters.
7734 * parse.y (template_parm): Handle invalid default template
7735 template arguments here.
7737 * parse.y (template_parm): Use template_arg instead of PTYPENAME
7738 for default template template argument.
7739 * pt.c (coerce_template_parms): Merge default template argument
7740 codes. Can treat RECORD_TYPE as template name if it is implicitly
7741 created. Fix argument index in error message.
7742 * typeck.c (comptypes): Merge template argument comparison codes in
7743 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
7745 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
7747 * lex.c (file_name_nondirectory): Also check for '/'.
7749 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
7751 * parse.y (primary): Deal with statement-expressions in
7753 * pt.c (tsubst_copy): Handle BIND_EXPR.
7754 * tree.c (mapcar): Likewise.
7756 * call.c (add_template_candidate_real): Pass extra parameter to
7757 fn_type_unification.
7758 * cp-tree.h (fn_type_unification): Add parameter.
7759 * pt.c (fn_type_unification): Add additional parameter to deal with
7760 static member functions.
7761 (get_bindings): Deal with static member functions.
7763 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
7764 (revert_static_member_fn): Declare.
7765 * decl.c (revert_static_member_fn): Remove declaration. Change
7766 linkage from internal to external.
7767 (cp_finish_decl): Deal with virtual functions in classes local to
7769 * decl2.c (finish_file): Don't forget to emit increment/decrement
7770 expressions in initializers for file-scope variables.
7771 * parse.y (typename_sub2): If the typename doesn't names a
7772 template, rather than a type, issue an error message.
7773 * pt.c (check_explicit_specialization): Handle specializations of
7774 static member functions.
7775 (coerce_template_parms): Handle offset references to lists of
7777 * search.c (note_debug_info_needed): Don't crash when handed a
7778 type which is being defined.
7779 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
7780 that can happen with some illegal code.
7782 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7784 * call.c (user_harshness): Initialize `code' to 0.
7785 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
7786 (null_ptr_cst_p): Add parentheses around && within ||.
7787 (standard_conversion): Likewise.
7788 (z_candidate): Likewise.
7789 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
7790 (build_object_call): Likewise for `mem_args'.
7791 (build_new_op): Likewise for `mem_arglist'. Add `return' from
7792 default case in enumeration switch.
7794 * class.c (build_vtable_entry): Add explicit braces to avoid
7796 (build_class_init_list): Likewise.
7797 (finish_struct_1): Initialize `width' to 0.
7798 (instantiate_type): Initialize `name' to NULL_TREE. Add
7799 explicit braces to avoid ambiguous `else'.
7801 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
7804 * decl.c (grok_reference_init): Eliminate unused parameter, all
7806 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
7807 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
7808 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
7809 (grokdeclarator): Add parentheses around && within ||. Add
7810 explicit braces to avoid ambiguous `else'.
7811 (grokparms): Initialize `type' to NULL_TREE.
7812 (xref_tag): Remove unused label `just_return'.
7813 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
7814 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
7815 (hack_incomplete_structures): Add parentheses around assignment
7816 used as truth value.
7818 * decl2.c (coerce_delete_type): Hide definition of `e3'.
7820 * error.c: Include <stdlib.h>.
7821 (dump_expr): Change the type of `i' to size_t. Remove unused
7824 * except.c (init_exception_processing): Remove unused variable `d'.
7825 (expand_throw): Likewise for `label'.
7827 * friend.c (add_friends): Add explicit braces to avoid ambiguous
7830 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
7831 (sort_base_init): Likewise for `binfo'.
7832 (expand_member_init): Likewise for `rval'.
7833 (build_member_call): Add parentheses around assignment used as
7835 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
7836 (build_new): Initialize `nelts' to NULL_TREE. Initialize
7837 `old_immediate_size_expand' to 0.
7838 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
7839 (build_vec_delete_1): Remove unused variable `block'.
7840 (expand_vec_init): Initialize `itype' to NULL_TREE.
7842 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
7843 declaration of `index' and `rindex' with autoconf macros.
7844 (reinit_parse_for_expr): Remove unused variables
7845 `look_for_semicolon' and `look_for_lbrac'.
7846 (cons_up_default_function): Initialize `args' to NULL_TREE.
7847 (readescape): Initialize `firstdig' to 0.
7848 (real_yylex): Add parentheses around assignment used as truth value.
7850 * method.c: Include <strings.h> if we don't have <string.h>.
7851 Protect declaration of `index' with autoconf macro.
7853 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
7854 Initialize `type' to NULL_TREE.
7855 (structsp): Remove unused variable `id'.
7857 * pt.c (coerce_template_parms): Add explicit braces to avoid
7859 (lookup_template_class): Initialize `template' to NULL_TREE.
7860 (instantiate_class_template): Remove unused variable `name' and `e'.
7861 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
7862 (do_poplevel): Initialize `saved_warn_unused' to 0.
7863 (type_unification): Remove unused varable `parm'.
7864 (unify): Likewise for `j'.
7866 * repo.c (init_repo): Add parentheses around assignment used as
7868 (finish_repo): Remove unused varable `p'.
7870 * search.c (get_binfo): Initialize `type' to NULL_TREE.
7871 (get_base_distance): Likewise.
7872 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
7873 and `new_v' to NULL_TREE.
7874 (lookup_fnfields): Likewise for `rval_binfo_h'.
7875 (breadth_first_search): Add parentheses around assignment used as
7877 (get_template_base): Initialize `type' to NULL_TREE.
7879 * sig.c (append_signature_fields): Initialize `last_mfptr' to
7881 (build_signature_table_constructor): Likewise for
7882 `last_rhs_field', `pfn' and `vt_off'.
7883 (build_sigtable): Likewise for `init'.
7885 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
7886 (propagate_binfo_offsets): Likewise for `delta'.
7887 (hash_tree_cons): Initialize hashcode to 0.
7888 (can_free): Likewise for `size'.
7889 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
7891 * typeck.c (convert_sequence): Hide prototype.
7892 (common_type): Add explicit braces to avoid ambiguous `else'.
7893 (comp_target_types): Likewise.
7894 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
7895 (build_function_call_real): Add explicit braces to avoid ambiguous
7897 (convert_arguments): Initialize `called_thing' to 0.
7898 (convert_for_initialization): Initialize `savew' and `savee' to 0.
7900 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
7901 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
7902 (build_x_arrow): Likewise for `last_rval'.
7904 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
7906 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
7908 * decl.c (init_decl_processing): Use set_sizetype.
7909 * decl2.c (sizetype): Don't declare.
7910 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
7911 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
7912 (build_component_addr, unary_complex_lvalue): Likewise.
7913 * rtti.c (expand_class_desc): Likewise.
7914 * class.c (get_vfield_offset): Likewise.
7916 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
7918 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
7919 early to avoid bogus error. Handle overloaded function
7920 names provided as template arguments correctly.
7921 (coerce_template_parms): Don't mishandle overloaded functions when
7922 dealing with template template parameters.
7923 (lookup_template_class): Issue an error message, rather than
7924 crashing, when the TYPE_DECL provided is not a template type.
7926 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
7928 * class.c (instantiate_type): Don't just return a known type if
7931 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
7933 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
7934 since that code could never be reached.
7936 * error.c (dump_decl): Avoid aborting in the midst of printing an
7937 error message about an illegal template declaration.
7939 * parse.y (structsp): Print an error message, rather than crashing,
7940 when a class-head does not name a class.
7942 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
7943 template arguments as a g++ extension.
7945 * cp-tree.def (ALIGNOF_EXPR): New tree code.
7946 * decl2.c (grok_alignof): If processing_template_decl, just store
7948 * typeck.c (c_alignof): Likewise.
7949 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
7950 * error.c (dump_expr): Likewise.
7951 * pt.c (tsubst_copy): Likewise.
7952 * tree.c (cp_tree_equal): Likewise.
7953 * pt.c (uses_template_parms): Correctly determine whether or not a
7954 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
7955 folding can be done.
7957 * cp-tree.h (grok_enum_decls): Remove type parameter.
7958 * decl.c (grok_enum_decls): Likewise.
7959 * decl2.c (grok_x_components): Call grok_enum_decls
7960 unconditionally, since it will do nothing if there is no
7961 current_local_enum. Use the new calling sequence.
7962 * pt.c (tsubst_enum): Use the new calling sequence for
7965 * decl.c (start_function): Make member functions of local classes
7966 in extern inline functions have comdat linkage here...
7967 (grokdeclarator): Rather than here.
7969 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
7971 * pt.c (convert_nontype_argument): Use decl_constant_value.
7973 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
7975 * call.c (add_template_candidate_real): New function.
7976 (add_template_candidate): Use it.
7977 (add_template_conv_candidate): Likewise.
7978 (joust): Pass extra argument to more_specialized.
7979 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
7980 (is_local_class): Remove.
7981 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
7982 * cp-tree.h (is_local_class): Remove.
7983 (perform_array_to_pointer_conversion): Likewise.
7984 (finish_member_template_decl): Add.
7985 (check_explicit_specialization): Return a tree, not an int.
7986 (more_specialized): Take additional argument.
7987 (get_bindings): Likewise.
7988 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
7989 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7990 (perform_array_to_pointer_conversion): Remove.
7991 * decl.c (saved_scope): Add processing_specialization,
7992 processing_explicit_instantiation fields.
7993 (maybe_push_to_top_level): Save them.
7994 (pop_from_top_level): Restore them.
7995 (grokfndecl): Use new return value from
7996 check_explicit_specialization.
7997 (start_decl): Don't check flag_guiding_decls before pushing
7999 (cp_finish_decl): Remove previous (bogus) change.
8000 (grok_declarator): Use decl_function_context rather than
8002 * decl2.c (finish_file): Pass extra argument to get_bindings.
8003 (build_expr_from_tree): Let build_x_component_ref check
8004 validity of arguments rather than doing it here.
8005 * lex.c (cons_up_default_function): Remove code fooling with
8006 processing_specialization, processing_explicit_instantiation
8007 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
8008 * method.c (build_overload_identifier): Mangle local classes in
8009 template functions correctly.
8010 * parse.y (finish_member_template_decl): Move to pt.c.
8011 * pt.c (finish_member_template_decl): Moved here from parse.y.
8012 (print_candidates): New function.
8013 (determine_specialization): Change interface. Properly look for
8014 most specialized versions of template candidates.
8015 (check_explicit_specialization): Fully process explicit
8017 (push_template_decl): Avoid looking at CLASSTYPE fields in
8019 (determine_overloaded_function): Remove.
8020 (convert_nontype_argument): Change name from
8021 convert_nontype_parameter. Use determine_overloaded_function
8022 instead of instantiate_type.
8023 (mangle_class_name_for_template): Handle type contexts as well as
8025 (classtype_mangled_name): Likewise.
8026 (lookup_template_class): Likewise.
8028 (more_specialized): Take explict template arguments as a
8030 (most_specialized): Likewise.
8031 (get_bindings): Likewise. Check that return types match before
8032 proclaiming a function a match.
8033 (do_decl_instantiation): Remove code searching for function to
8034 instantiate; that is now done in check_explicit_specialization.
8035 (add_maybe_template): Pass extra argument to get_bindings.
8036 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
8038 * typeck.c (build_component_ref): Check for invalid arguments.
8040 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
8042 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
8043 return_target and call_target are equivalent.
8045 * pt.c (type_unification_real): Just accept function parms that
8046 don't use any template parms.
8048 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8050 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
8051 unset DECL_NOT_REALLY_EXTERN.
8053 * parse.y (typename_sub*): Fix std::.
8055 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
8057 * error.c (dump_decl): Fix type default template args.
8058 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
8060 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
8062 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
8063 (file_name_nondirectory): Use.
8065 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8067 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
8068 that are not really present. Substitute default arguments in
8069 template template arguments. Correctly convert TEMPLATE_DECL to
8070 TEMPLATE_TEMPLATE_PARM.
8071 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
8072 are no longer treated specially here.
8073 * parse.y (template_template_parm): Fix copy error.
8074 * decl.c (grokdeclarator): Warn about missing `typename' for nested
8075 type created from template template parameters.
8076 * parse.y (bad_parm): Likewise
8078 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
8079 (push_nested_class): Likewise.
8080 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
8081 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
8082 (copy_template_template_parm): Declare.
8083 * decl.c (arg_looking_for_template): New variable.
8084 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
8085 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
8086 node if arg_looking_for_template is nonzero.
8087 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
8088 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
8089 (grokdeclarator): Handle TEMPLATE_DECL.
8090 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
8091 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
8092 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
8093 (dump_decl): Handle unnamed template type parameters.
8094 Handle template template parameters.
8095 (dump_function_name): Handle template template parameters.
8096 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
8097 Handle TEMPLATE_TEMPLATE_PARM.
8098 * method.c (build_template_template_parm_names): New function.
8099 (build_template_parm_names): Handle TEMPLATE_DECL.
8100 (build_overload_nested_name, build_overload_name):
8101 Handle TEMPLATE_TEMPLATE_PARM.
8102 * parse.y (maybe_identifier): New nonterminal.
8103 (template_type_parm): Use it.
8104 (template_template_parm, template_arg1): New nonterminal.
8105 (template_parm): Add template_template_parm rules.
8106 (template_arg): Set processing_template_arg.
8107 (template_arg1): Rules moved from template_arg.
8108 (primary, nonnested_type): Set arg_looking_for_template if we are
8109 processing template arguments.
8110 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
8111 (process_template_parm): Handle template template parameters.
8112 (coerce_template_parms, comp_template_args): Likewise.
8113 (mangle_class_name_for_template, lookup_template_class): Likewise.
8114 (uses_template_parms): Handle TEMPLATE_DECL and
8115 TEMPLATE_TEMPLATE_PARM.
8116 (current_template_args): Handle TEMPLATE_DECL.
8117 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
8118 * search.c (dfs_walk, dfs_record_inheritance):
8119 Handle TEMPLATE_TEMPLATE_PARM.
8120 * tree.c (copy_template_template_parm): New function.
8121 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
8122 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
8124 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
8126 * decl.c (start_decl): Don't allow duplicate definitions of static
8129 * call.c (build_user_type_conversion_1): Handle user-defined
8130 template conversion operators correctly.
8132 * decl2.c (build_expr_from_tree): Issue an error message if the
8133 object in a COMPONENT_REF is a TEMPLATE_DECL.
8135 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
8137 * class.c (is_local_class): New function.
8138 * cp-tree.h (is_local_class): Declare it.
8139 (last_tree): Likewise.
8140 (begin_tree): Likewise.
8141 (end_tree): Likewise.
8142 (lookup_template_class): Change prototype.
8143 * decl.c (cp_finish_decl): Check for NULL where necessary.
8144 Consider FUNCTION_DECLS to declare objects with top-level binding,
8145 when calling make_decl_rtl.
8146 (grokdeclarator): Give members of local classes internal linkage.
8147 (start_function): Remove declaration of last_tree.
8148 (finish_function): Set flag_keep_inline_functions around call to
8149 rest_of_compilation if we are processing a member function in a
8151 (start_method): Call push_template_decl for member functions of
8152 local classes in template functions.
8153 * decl2.c (import_export_decl): Don't give external linkage to
8154 instantiations of templates with internal linkage.
8155 * parse.y (last_tree): Remove declaration.
8156 (template_type): Pass extra parameter to lookup_template_class.
8157 (self_template_type): Likewise.
8158 (structsp): Move call to reset_specialization into left_curly.
8159 (left_curly): Call reset_specialization, and begin_tree.
8160 * pt.c (saved_trees): New variable.
8161 (mangle_class_name_for_template): Change prototype. Use
8162 additional function context to name local classes in templates
8164 (classtype_mangled_name): Pass the context.
8165 (push_template_decl): Handle local classes and templates, and
8166 member functions for such classes.
8167 (convert_nontype_parameter): Fix handling of pointer-to-member
8169 (lookup_template_class): Handle local classes in templates.
8170 (tsubst): Likewise. Don't assume that template instantiations
8171 have external linkage; pay attention to the template declaration.
8172 (mark_decl_instantiated): Likewise.
8173 (begin_tree): New function.
8174 (end_tree): Likewise.
8176 * decl.c (xref_basetypes): Don't call complete_type for basetypes
8177 that involve template parameters; that can lead to infinite
8178 recursion unnecessarily.
8180 * pt.c (register_specialization): Do not register specializations
8181 that aren't ready to be registered yet.
8182 (check_explicit_specialization): Handle explicit specialization of
8183 constructors and destructors.
8184 (build_template_decl): New function.
8185 (push_template_delc): Handle out-of-class specializations of
8188 * pt.c (check_explicit_specialization): Set up the template
8189 information before registering the specialization.
8190 (coerce_template_parms): Fix thinko.
8191 (tsubst): Handle specializations of member templates correctly.
8193 * class.c (finish_struct_methods): Remove calls to
8194 check_explicit_specialization from here.
8195 (finish_struct): And insert them here.
8196 * cp-tree.h (perform_qualification_conversions): New function.
8197 (perform_array_to_pointer_conversion): Likewise.
8198 (begin_explicit_instantiation): Likewise.
8199 (end_explicit_instantiation): Likewise.
8200 (determine_specialization): Renamed from
8201 determine_explicit_specialization.
8202 (comp_template_parms): New function.
8203 (processing_explicit_instantiation): New variable.
8204 * cvt.c (perform_qualification_conversions): New function.
8205 (perform_array_to_pointer_conversion): Likewise.
8206 * decl.c (duplicate_decls): Don't consider template functions
8207 alike unless they have the same parameters. Refine handling of
8208 instantiation/specialization mismatches.
8209 (start_decl): Don't call pushdecl for template specializations,
8210 since they don't affect overloading.
8211 (start_function): Likewise.
8212 (grokfndecl): Call check_explicit_specialization a little later.
8213 Don't call duplicate_decls for memberm template specializations.
8214 (grokdeclarator): Don't update template_count for classes that are
8215 themselves specializations. Remove use of `2' as parameter to
8216 grokfndecl since that value isn't used.
8217 * lex.c (cons_up_default_function): Save and restore
8218 processing_explicit_instantiation around calls to grokfield.
8219 * parse.y (finish_member_template_decl): New function.
8220 (component_decl_1): Use it.
8221 (fn.def2): Likewise.
8222 (template_arg_list_opt): New nonterminal.
8223 (template_type): Use it.
8224 (self_template_type): Likewise.
8225 (template_id): Likewise.
8226 (object_template_id): Likewise.
8227 (notype_template_declarator): Likwise.
8228 (begin_explicit_instantiation): Likewise.
8229 (end_explicit_instantiation): Likewise.
8230 (explicit_instantiation): Use them.
8231 * pt.c (coerce_template_parms): Add parameters.
8232 (processing_explicit_instantiation): New variable.
8233 (convert_nontype_parameter): New function.
8234 (determine_overloaded_function): Likewise.
8235 (begin_explicit_instantiation): Likewise.
8236 (end_explicit_instantiation): Likewise.
8237 (retrieve_specialization): Likewise.
8238 (register_specialization): Likewise.
8239 (processing_explicit_specialization): Removed.
8240 (determine_specialization): Handle specializations of member
8241 functions of template class instantiations.
8242 (check_explicit_specialization): Refine to conform to standard.
8243 (comp_template_parms): New function.
8244 (coerce_template_parms): Call convert_nontype_parameter.
8245 (tsubst): Refine handling of member templates. Use
8246 register_specialization.
8247 (instantiate_template): Use retrieve_specialization.
8248 (do_decl_instantiation): Likewise.
8249 (instantiate_decl): Likewise.
8250 (type_unification): Improve handling of explict template
8252 * tree.c (mapcar): Return error_mark_node, rather than aborting,
8253 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
8254 * typeck.c (build_unary_op): Call determine_specialization, rather
8255 than determine_explicit_specialization.
8257 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
8259 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
8261 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8263 * error.c (dump_decl): For enum tags, output the tag, not its value.
8265 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
8267 * decl.c (init_decl_processing): Only call init_rtti_processing
8270 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
8272 * init.c (build_new_1): Split out from build_new.
8273 (build_new): Just return a NEW_EXPR.
8274 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
8276 * decl2.c (get_temp_regvar): Tweak.
8278 * cp-tree.h (TREE_CALLS_NEW): Comment out.
8279 * class.c (resolves_to_fixed_type_p): Remove use.
8280 * method.c (build_opfncall): Likewise.
8281 * call.c (build_new_op): Likewise.
8283 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
8285 * exception.cc (__eh_alloc, __eh_free): New fns.
8286 (__cp_push_exception, __cp_pop_exception): Use them.
8287 (__uncatch_exception): Call terminate here if no exception.
8288 * except.c (build_terminate_handler): New fn.
8289 (expand_start_catch_block): Use it.
8290 (expand_exception_blocks): Likewise.
8291 (alloc_eh_object): New fn.
8292 (expand_throw): Use it. Protect exception init with terminate.
8293 * typeck.c (build_modify_expr): Remove code that ignores trivial
8296 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8298 * call.c (add_builtin_candidate): Add default case in enumeration
8300 (build_new_op): Likewise.
8301 (convert_like): Likewise.
8302 * cvt.c (build_expr_type_conversion): Likewise.
8303 * tree.c (real_lvalue_p): Likewise.
8304 (lvalue_p): Likewise.
8305 (cp_tree_equal): Likewise.
8306 * typeck.c (comptypes): Likewise.
8307 (build_component_ref): Likewise.
8308 (build_function_call_real): Likewise.
8309 (build_binary_op_nodefault): Likewise.
8310 (build_unary_op): Likewise.
8311 (build_modify_expr): Likewise.
8312 * typeck2.c (initializer_constant_valid_p): Likewise.
8314 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
8316 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
8318 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
8320 * pt.c (coerce_template_parms): Make sure to digest_init if
8323 * decl.c (duplicate_decls): Make the newdecl virtual if the
8324 olddecl was, just as is done with other attributes of olddecl.
8326 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
8328 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
8329 address of an OFFSET_REF.
8331 * cp-tree.def: Add AGGR_INIT_EXPR.
8332 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
8333 AGGR_INIT_EXPR where appropriate.
8334 * expr.c (cplus_expand_expr): Likewise. Simplify.
8336 * decl2.c (finish_file): Remove call to register_exception_table.
8338 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8340 * pt.c (instantiate_class_template): Don't do injection when
8341 processing_template_decl is true, as pollutes current_binding_level
8344 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
8346 * pt.c (maybe_fold_nontype_arg): Add prototype.
8348 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8350 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
8351 * error.c (dump_expr): Likewise.
8353 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8355 * typeck.c (build_function_call_real): Remove "inline called before
8356 definition" pedwarn.
8358 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
8360 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8362 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
8364 * pt.c (type_unification_real): Change __null to type void* with
8367 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
8369 * call.c (implicit_conversion): Don't call
8370 build_user_type_conversion_1 with a NULL expr, since it will
8373 * pt.c (unify): Don't try to unify array bounds if either array is
8376 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8378 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
8379 Replace extern decls with casts.
8381 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
8382 Update last_parm_cleanup_insn.
8383 (store_after_parms): Remove.
8384 * cp-tree.h: Adjust.
8386 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
8388 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
8389 (finish_file): Check DECL_COMDAT instead of weak|one_only.
8390 (import_export_vtable): Use make_decl_one_only instead of
8391 comdat_linkage for win32 tweak.
8392 (import_export_decl): Likewise.
8393 * pt.c (mark_decl_instantiated): Likewise.
8395 * decl2.c (finish_file): Lose handling of templates in pending_statics.
8397 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
8399 * decl2.c (finish_file): Lose call to expand_builtin_throw.
8400 * except.c (expand_builtin_throw): Remove.
8401 * cp-tree.h: Remove ptr_ptr_type_node.
8404 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
8406 * decl.c (ptr_ptr_type_node): Define.
8407 (init_decl_processing): Initialize it.
8408 * cp-tree.h: Declare it.
8409 * exception.cc (__cp_exception_info): Use __get_eh_info.
8410 (__cp_push_exception): Likewise.
8411 (__cp_pop_exception): Likewise.
8413 From Scott Snyder <snyder@d0sgif.fnal.gov>:
8414 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
8416 (init_exception_processing): Removed saved_pc initialization.
8418 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
8420 * pt.c (instantiate_decl): Defer all templates but inline functions.
8422 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8424 * init.c (expand_vec_init): Don't fold a list of parameters.
8426 * decl.c (copy_args_p): Handle copy elision for types with virtual
8428 * call.c (build_over_call): Likewise.
8430 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
8432 * pt.c (lookup_template_function): Copy the template arguments,
8433 not just the list containing them, to the permanent obstack.
8435 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
8437 * except.c (expand_start_catch_block): suspend_momentary for the
8440 * error.c (dump_decl): Handle LOOKUP_EXPR.
8442 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
8444 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
8445 permanent obstack if we are processing a template decl.
8446 * typeck.c (build_static_cast): Likewise.
8447 (build_const_cast): Likewise.
8448 (build_reinterpret_cast): Likewise.
8450 * pt.c (coerce_template_parms): Coerce some expressions, even
8451 when processing_template_decl.
8453 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8455 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
8456 handling of pointer difference expressions.
8458 * typeck.c (comp_target_types): Comparison of function/method types
8459 is independent of nptrs.
8461 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
8463 * pt.c (tsubst): Avoid creating pointer to reference and
8464 reference to reference types.
8466 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
8468 * parse.y (do_id): New nonterminal.
8469 (template_id): Use it.
8471 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
8473 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
8474 * spew.c (yylex): Don't do_identifier here.
8475 * decl2.c (build_expr_from_tree): Revert last change.
8477 * decl2.c (build_expr_from_tree): Expand the name for a method call.
8478 * parse.y (object_template_id): Don't try to take the DECL_NAME.
8480 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
8482 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
8484 * call.c (build_op_delete_call): Adjust.
8486 * except.c (expand_end_catch_block): Lose rethrow region.
8487 (expand_start_catch_block): Likewise.
8488 (expand_end_catch_block): Don't expand_leftover_cleanups.
8490 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8492 * pt.c (tsubst): Remove tree_cons call (places redundant info into
8493 DECL_TEMPLATE_INSTANTIATION).
8495 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
8497 * tree.c (is_overloaded_fn): Handle getting a fn template.
8498 (really_overloaded_fn): Likewise.
8499 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
8500 * pt.c (check_explicit_specialization): Tweak.
8501 (determine_explicit_specialization): Tweak.
8503 * tree.c, cp-tree.h (get_target_expr): New fn.
8505 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
8507 * pt.c (check_explicit_specialization): Fix misspelling in
8508 diagnostic: `preceeded'.
8509 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
8512 1997-12-02 Mark Mitchell <mmitchell@usa.net>
8514 * pt.c (determine_explicit_specialization): Avoid an internal
8515 error for bad specializations.
8517 * method.c (build_overload_value): Handle SCOPE_REF.
8519 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
8521 * class.c (prepare_fresh_vtable): Enable even more complex MI
8524 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
8526 * exception.cc (__check_eh_spec): Optimize a bit.
8528 * exception.cc (__cp_pop_exception): Lose handler arg.
8529 * except.c (do_pop_exception): Likewise.
8530 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
8531 (expand_end_catch_block): Likewise.
8533 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8535 * pt.c (check_explicit_specialization): Complain about using a
8536 template-id for a non-specialization.
8538 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
8540 * repo.c: Prototype rindex only if needed.
8543 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8545 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
8547 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
8549 * typeck.c (build_const_cast): Handle references here instead of
8550 handing off to convert_to_reference.
8552 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
8553 TerminateFunctionCall.
8554 (init_exception_processing): Likewise. Terminate et al are now
8555 the fns, not ADDR_EXPRs.
8556 (various): Lose redundant assemble_external calls.
8557 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
8559 * cp-tree.h (struct lang_decl_flags): Add comdat.
8560 (DECL_COMDAT): New macro.
8561 * decl.c (duplicate_decls): Propagate it.
8562 (cp_finish_decl): Handle it.
8563 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
8565 * class.c: Remove static pending_hard_virtuals.
8566 (add_virtual_function): Take pointers to pending_virtuals
8567 and pending_hard_virtuals.
8568 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
8570 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
8572 * decl2.c (import_export_vtable): If we support one_only but not
8573 weak symbols, mark instantiated template vtables one_only.
8574 (import_export_decl): Likewise for tinfo functions.
8575 (finish_vtable_vardecl): Also write out vtables from explicitly
8576 instantiated template classes.
8577 * pt.c (mark_class_instantiated): Revert last change.
8579 * except.c (expand_throw): Call mark_used on the destructor.
8581 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
8583 * lex.c (lang_init): Enable flag_exceptions by default if no
8584 command line switch was specified.
8586 1997-11-26 Mark Mitchell <mmitchell@usa.net>
8588 * pt.c (unify): Handle `void' template parameters in
8591 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
8593 * rtti.c (build_dynamic_cast): Handle template case here.
8594 (build_dynamic_cast_1): Not here.
8596 * typeck2.c (digest_init): Make copies where appropriate.
8598 * decl2.c (delete_sanity): resolve_offset_ref.
8600 * except.c: Call terminate without caching so many bits.
8602 * except.c (expand_start_catch_block): Fix catching a reference
8605 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8607 * init.c (build_new): Copy size to the saveable obstack.
8609 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
8610 TRY_CATCH_EXPR for now.
8612 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8614 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
8615 has DECL_LANG_SPECIFIC.
8617 * exception.cc (struct cp_eh_info): Add handlers field.
8618 (__cp_push_exception): Initialize it.
8619 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
8620 (__throw_bad_exception): Remove.
8621 * except.c (call_eh_info): Add handlers field.
8622 (get_eh_handlers): New fn.
8623 (push_eh_cleanup): Increment handlers.
8625 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
8627 * except.c (expand_start_eh_spec): Use the try/catch code.
8628 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
8629 doing everything inline.
8630 (init_exception_processing): throw_type_match now takes
8631 const void pointers.
8632 * exception.cc (__check_eh_spec): New fn.
8633 * inc/exception: Neither terminate nor unexpected return.
8634 * decl.c: Make const_ptr_type_node public.
8635 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
8637 * except.c (expand_start_catch_block): We only need the rethrow
8638 region for non-sjlj exceptions.
8639 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
8641 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
8643 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
8644 (various.o): Likewise.
8645 * inc/new: Add placement deletes. Add throw specs for default new.
8646 * new.cc (set_new_handler): Move here from libgcc2.
8647 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
8648 (new): Move from libgcc2. Throw bad_alloc.
8649 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
8650 * decl.c (init_decl_processing): Update exception specs on new and
8653 * method.c (build_decl_overload_real): Don't mess with global
8656 * init.c (build_new): Check for null throw spec, not nothrow_t.
8658 * decl.c (duplicate_decls): Don't complain about different exceptions
8659 from an internal declaration.
8661 * call.c (build_op_delete_call): Fix check for member fns again.
8663 * decl2.c (import_export_decl): Interface hackery affects
8664 virtual synthesized methods.
8666 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8668 * decl.c (start_decl): Don't just complain about a mismatched
8671 * decl.c (make_implicit_typename): Handle case where t is not
8672 actually from context.
8673 * tree.c (get_type_decl): Lose identifier case.
8674 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
8675 * parse.y (nonnested_type): Just use lookup_name.
8676 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
8678 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
8680 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
8681 T was built in C language context (for example, by
8682 output_func_start_profiler).
8684 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
8686 * decl.c (make_implicit_typename): New fn.
8687 (lookup_name_real): Use it. Use current_class_type as the context.
8689 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
8691 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
8693 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8695 * friend.c (do_friend): Warn about non-template friends in templates.
8697 * call.c (build_op_delete_call): Fix handling of inherited delete.
8699 * search.c (dfs_record_inheritance): Ignore template type parms.
8701 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
8703 * call.c (build_new_op): Fix copy error.
8704 (build_op_new_call): New fn.
8705 (build_op_delete_call): New fn.
8706 * cp-tree.h: Declare them.
8707 * init.c (build_new): Use them. Support placement delete.
8708 (build_x_delete): Use build_op_delete_call.
8709 (build_delete): Likewise.
8710 * decl2.c (delete_sanity): Likewise.
8711 (coerce_delete_type): Don't complain about placement delete.
8713 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8715 * call.c (build_new_function_call): Remove unused 'obj' parm.
8716 * cp-tree.h, typeck.c: Adjust.
8718 * init.c (build_new): Make the cleanup last longer.
8719 (expand_vec_init): Call do_pending_stack_adjust.
8721 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
8723 * pt.c (do_type_instantiation): Fix typo.
8724 (mark_class_instantiated): If we support one_only but not weak
8725 symbols, don't mark this as known.
8727 * init.c (build_new): Handle vec delete in EH cleanup.
8729 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8731 * call.c (build_method_call): Call complete_type before checking
8734 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
8736 * decl.c (add_block_current_level): Delete.
8737 * init.c (build_vec_delete_1): Delete build_block and
8738 add_block_current_level calls.
8740 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
8742 * init.c (build_new): Handle freeing allocated memory when the
8745 * call.c (build_new_method_call): Fix flags arg.
8747 * pt.c (do_type_instantiation): Don't try to instantiate
8749 (mark_decl_instantiated): If we support one_only but not
8750 weak symbols, mark this one_only.
8751 * decl2.c (import_export_vtable): Don't defer handling of vtables
8752 if MULTIPLE_SYMBOL_SPACES.
8754 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8756 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
8758 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
8760 * except.c (do_pop_exception): Return a value.
8762 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
8764 * call.c (build_new_method_call): Handle getting a
8765 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
8766 if we got template parms.
8767 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
8769 * decl2.c (build_expr_from_tree): Tweak last change.
8770 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
8771 (maybe_fold_nontype_arg): Split out from tsubst_copy.
8772 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
8774 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8776 * pt.c (tsubst_copy): Handle explicit template arguments in
8778 * typeck.c (build_x_function_call): Likewise.
8779 * decl2.c (build_expr_from_tree): Lookup function name if it
8782 * pt.c (tsubst): Instantiate template functions properly when
8783 template parameter does not appear in function arguments and return
8785 (comp_template_args): Handle member templates required by tsubst.
8787 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8789 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
8792 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8794 * pt.c (coerce_template_parms): Tweak error message.
8796 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
8797 return type defaults to `int', even if there are storage-class
8800 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8802 Complete nested exception support.
8803 * except.c (do_pop_exception): Split out...
8804 (push_eh_cleanup): From here. Handle the EH region by hand.
8805 (expand_start_catch_block): Add a new level for the catch parm.
8806 Move the rethrow region outside the two cleanup regions.
8807 Protect the initializer for the catch parm with terminate.
8808 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
8809 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
8810 popping off the middle of the stack.
8811 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
8812 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
8813 (build_cplus_new): Only wrap CALL_EXPRs.
8814 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
8815 the constructor call.
8817 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8819 * Make-lang.in (c++.distdir): Make inc subdirectory.
8821 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8823 * decl2.c (finish_file): Put back some code.
8825 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8827 * decl2.c (finish_file): Remove redundant code.
8828 * method.c (emit_thunk): Don't let the backend defer generic thunks.
8830 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
8832 * except.c (call_eh_info): Split out...
8833 (push_eh_info): From here.
8834 (expand_builtin_throw): Use it.
8835 (expand_start_catch_block): Move region start back.
8837 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
8839 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
8840 (real_yylex): Record wide strings using target endianness, not host.
8842 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
8844 * repo.c (rindex): Add decl unconditionally.
8845 (get_base_filename, open_repo_file): Don't cast rindex.
8846 * xref.c (rindex): Add decl unconditionally.
8847 (index): Remove unused decl.
8848 (open_xref_file): Don't cast rindex.
8850 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8852 * class.c (build_vbase_path): Propagate the result type properly.
8854 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
8856 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
8857 remaining use of saved_throw_type with a call to get_eh_type.
8859 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
8861 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
8862 (file_name_nondirectory): New function, doing the same as the macro.
8863 (set_typedecl_interface_info): Use it instead of the macro.
8864 (check_newline): Likewise.
8865 (handle_cp_pragma): Likewise.
8867 * repo.c (get_base_filename): Cast result of rindex to char*.
8868 (open_repo_file): Likewise.
8869 * xref.c (open_xref_file): Likewise.
8870 * error.c (dump_char): Make its arg int, not char.
8872 * except.c (push_eh_info): Pass the number of fields - 1 down, not
8873 the exact number of fields.
8875 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8877 Support for nested exceptions.
8878 * tinfo2.cc (__is_pointer): New fn.
8879 * exception.cc (struct cp_eh_info): Define.
8880 (__cp_exception_info, __uncatch_exception): New fns.
8881 (__cp_push_exception, __cp_pop_exception): New fns.
8882 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
8884 (init_exception_processing): Likewise. __eh_pc is now external.
8885 (push_eh_info): New fn.
8886 (get_eh_{info,value,type,caught}): New fns.
8887 (push_eh_cleanup): Just call __cp_pop_exception.
8888 (expand_start_catch_block): Use push_eh_info. Start the eh region
8890 (expand_end_eh_spec): Use push_eh_info.
8891 (expand_throw): Call __cp_push_exception to set up the exception info.
8892 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
8894 (expand_builtin_throw): Don't refer to empty_fndecl.
8896 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
8898 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
8900 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
8902 * method.c (build_template_parm_names, build_decl_overload_real):
8903 Add static to definitions.
8904 * pt.c (add_to_template_args, note_template_header,
8905 processing_explicit_specialization, type_unification_real): Likewise.
8906 ({determine,check}_explicit_specialization): Use a single string for
8909 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
8911 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
8912 (expand_end_catch_block): Likewise.
8913 (expand_end_eh_spec): Likewise.
8915 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
8917 * decl.c (duplicate_decls): Handle template specializations
8919 * error.c (dump_function_name): Fix printing of specializations of
8920 member functions that are not member templates.
8921 * cp-tree.h (processing_specialization): Make global.
8922 * pt.c (processing_specialization): Likewise.
8923 * lex.c (cons_up_default_function): Save and restore
8924 processing_specialization to avoid confusion.
8926 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8928 * decl.c (init_decl_processing): Give null_node unknown* type.
8929 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
8930 (common_type): Likewise.
8931 * error.c (args_as_string): Recognize null_node.
8933 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8935 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
8936 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
8938 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
8940 * Make-lang.in (g++): Include prefix.o.
8942 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
8944 * pt.c (determine_explicit_specialization): Initialize "dummy"
8945 to keep Purify quiet.
8947 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8949 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
8950 (build_overload_int): Not here.
8952 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
8954 * class.c (build_type_pathname): Remove.
8955 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
8957 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
8959 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
8960 &&label GNU extension.
8962 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
8964 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
8965 so as to avoid incorrect manglings.
8966 * method.c (build_decl_overload_real): Don't mangle return types
8969 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8971 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
8972 scratch_tree_cons): Define as macros for now.
8973 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
8974 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
8975 typeck2.c: Use them and the expression_obstack variants.
8977 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8979 * decl.c (store_return_init): Allow classes with explicit ctors to
8980 be used with the named return values extension.
8982 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
8984 * pt.c (instantiate_decl): Fix previous change.
8986 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8988 * pt.c (tsubst): Fix thinko.
8989 (instantiate_decl): Really use the original template.
8991 * call.c (build_new_method_call): Use simple constructor_name for
8994 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
8996 * method.c (build_underscore_int): Don't use ANSI specific
8999 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9001 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
9002 for our key method; it might have been inlined by -O3.
9004 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
9006 * decl.c (make_typename_type): Do not try to call lookup_field for
9007 non-aggregate types.
9009 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
9011 * typeck.c (build_reinterpret_cast): Tweak.
9013 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
9015 * typeck.c (build_reinterpret_cast): Converting a void pointer
9016 to function pointer with a reinterpret_cast produces a warning
9017 if -pedantic is issued.
9019 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9021 * typeck.c (c_expand_return): Don't warn about returning a
9022 reference-type variable as a reference.
9024 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9026 * method.c (build_static_name): Fix typo.
9028 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
9030 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
9031 OLDDECL before we try to do DECL_USE_TEMPLATE.
9033 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9035 * decl.c (duplicate_decls): Don't warn about template instances.
9037 * typeck.c (mark_addressable): Lose ancient code that unsets
9040 * pt.c (do_decl_instantiation): Lose support for instantiating
9043 * call.c (build_new_function_call): Fix handling of null explicit
9045 (build_new_method_call): Likewise.
9047 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
9049 * method.c (build_underscore_int): Fix typo.
9051 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
9053 * tree.c (print_lang_statistics): #if 0 call to
9054 print_inline_obstack_statistics until its definition is checked in.
9056 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9058 * decl2.c (finish_file): Move dump_tree_statistics to end.
9060 * pt.c (instantiate_decl): Look for the original template.
9061 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
9062 of member templates.
9064 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9066 * Makefile.in (g++FAQ.*): New rules.
9067 (CONFLICTS): Update.
9068 * g++FAQ.texi: Moved from libg++.
9070 * parse.y (PFUNCNAME): Only specify the type once.
9072 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
9074 * lex.c (real_yylex): Clean up the code to fully behave the way
9075 the c-lex.c parser does for complex and real numbers.
9077 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9079 * method.c (build_decl_overload_real): Reformat.
9081 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
9083 * method.c (synthesize_method): If at_eof, determine our linkage.
9085 1997-09-29 Paul Eggert <eggert@twinsun.com>
9087 * lex.c (real_yylex): Treat `$' just like `_', except issue a
9088 diagnostic if !dollars_in_ident or if pedantic.
9090 * lang-specs.h (@c++): -ansi no longer implies -$.
9092 * decl2.c (lang_decode_option):
9093 -traditional and -ansi now do not mess with
9096 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
9098 * Makefile.in (parse.o, decl.o): Also depend on
9099 $(srcdir)/../except.h $(srcdir)/../output.h.
9100 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
9101 $(srcdir)/../except.h $(srcdir)/../output.h.
9102 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
9105 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
9107 * expr.c (cplus_expand_expr): Make it static.
9109 * decl2.c, init.c, typeck.c: Include "expr.h".
9110 (expand_expr): Use proper values when calling the function.
9112 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
9114 * lang-options.h: New -Wold-style-cast flag.
9115 * cp-tree.h (warn_old_style_cast): New variable.
9116 * decl2.c (warn_old_style_cast): Likewise..
9117 (lang_decode_option): Support -Wold-style-cast.
9118 (reparse_absdcl_as_casts): Produce old-style-cast warning.
9120 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9122 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
9123 TREE_USED, reset value based on already_used.
9125 * init.c (expand_member_init): Revert change.
9127 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9129 * cp-tree.h, decl.c, decl2.c, pt.c:
9130 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
9132 * decl2.c (lang_decode_option): Add missing ;.
9134 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9136 * friend.c (do_friend): Disable injection for all template-derived
9138 * decl2.c (lang_decode_option): Handle -fguiding-decls.
9139 * parse.y (notype_template_declarator): New nonterminal.
9140 (direct_notype_declarator): Use it.
9141 (complex_direct_notype_declarator): Likewise.
9142 (object_template_id): Accept any kind of identifier after TEMPLATE.
9143 (notype_qualified_id): Don't add template declarators here.
9145 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
9148 * call.c (add_template_candidate): Add explicit_targs parameter.
9149 (build_scoped_method_call): Use it.
9150 (build_overload_call_real): Likewise.
9151 (build_user_type_conversion_1): Likewise.
9152 (build_new_function_call): Likewise.
9153 (build_object_call): Likewise.
9154 (build_new_op): Likewise.
9155 (build_new_method_call): Likewise.
9156 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
9157 (build_new_method_call): Likewise.
9159 * class.c (finish_struct_methods): Add specialization pass to
9160 determine which methods were specializing which other methods.
9161 (instantiate_type): Handle TEMPLATE_ID_EXPR.
9164 * call.c (add_template_candidate): Add explicit_targs parameter.
9165 (build_scoped_method_call): Use it.
9166 (build_overload_call_real): Likewise.
9167 (build_user_type_conversion_1): Likewise.
9168 (build_new_function_call): Likewise.
9169 (build_object_call): Likewise.
9170 (build_new_op): Likewise.
9171 (build_new_method_call): Likewise.
9172 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
9173 (build_new_method_call): Likewise.
9177 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
9179 * class.c (finish_struct_methods): Add specialization pass to
9180 determine which methods were specializing which other methods.
9181 (instantiate_type): Handle TEMPLATE_ID_EXPR.
9185 * cp-tree.h (name_mangling_version): New variable.
9187 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
9189 * cp-tree.h (name_mangling_version): New variable.
9191 (flag_guiding_decls): Likewise.
9193 (build_template_decl_overload): New function.
9194 (begin_specialization): Likewise.
9195 (reset_specialization): Likewise.
9196 (end_specialization): Likewise.
9197 (determine_explicit_specialization): Likewise.
9198 (check_explicit_specialization): Likewise.
9199 (lookup_template_function): Likewise.
9200 (fn_type_unification): Add explicit_targs parameter.
9201 (type_unification): Likewise.
9203 * decl.c (duplicate_decls): Add smarts for explicit
9205 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
9207 (grokfndecl): Call check_explicit_specialization.
9209 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
9210 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
9211 (check_classfn): Handle specializations.
9213 (build_template_decl_overload): New function.
9214 (begin_specialization): Likewise.
9215 (reset_specialization): Likewise.
9216 (end_specialization): Likewise.
9217 (determine_explicit_specialization): Likewise.
9218 (check_explicit_specialization): Likewise.
9219 (lookup_template_function): Likewise.
9220 (fn_type_unification): Add explicit_targs parameter.
9221 (type_unification): Likewise.
9223 * decl.c (duplicate_decls): Add smarts for explicit
9225 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
9227 (grokfndecl): Call check_explicit_specialization.
9229 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
9230 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
9231 (check_classfn): Handle specializations.
9235 * error.c (dump_function_name): Print specialization arguments.
9237 * error.c (dump_function_name): Print specialization arguments.
9241 * friend.c (do_friend): Don't call pushdecl for template
9244 * friend.c (do_friend): Don't call pushdecl for template
9249 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
9251 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
9253 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
9255 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
9257 and -fno-guiding-decls.
9260 * lex.c (identifier_type): Return PFUNCNAME for template function
9264 * lex.c (identifier_type): Return PFUNCNAME for template function
9269 * method.c (build_decl_overload_real): New function.
9270 (build_template_parm_names): New function.
9271 (build_overload_identifier): Use it.
9272 (build_underscore_int): New function.
9273 (build_overload_int): Use it. Add levels for template
9275 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
9276 (build_overload_nested_names): Handle template type parameters.
9277 (build_template_decl_overload): New function.
9279 * parse.y (YYSTYPE): New ntype member.
9280 (nested_name_specifier): Use it.
9281 (nested_name_specifier_1): Likewise.
9282 (PFUNCNAME): New token.
9283 (template_id, object_template_id): New non-terminals.
9284 (template_parm_list): Note specializations.
9285 (template_def): Likewise.
9286 (structsp): Likewise.
9287 (fn.def2): Handle member template specializations.
9288 (component_decl_1): Likewise.
9289 (direct_notype_declarator): Handle template-ids.
9290 (component_decl_1): Likewise.
9291 (direct_notype_declarator): Handle template-ids.
9292 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
9294 * pt.c (processing_specializations): New variable.
9295 (template_header_count): Likewise.
9296 (type_unification_real): New function.
9297 (processing_explicit_specialization): Likewise.
9298 (note_template_header): Likewise.
9299 (is_member_template): Handle specializations.
9300 (end_template_decl): Call reset_specialization.
9301 (push_template_decl): Handle member template specializations.
9303 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
9304 (instantiate_template): Handle specializations.
9305 (instantiate_decl): Likewise.
9306 (fn_type_unification): Handle explicit_targs.
9307 (type_unification): Likewise. Allow incomplete unification
9308 without an error message, if allow_incomplete.
9309 (get_bindings): Use new calling sequence for fn_type_unification.
9311 * spew.c (yylex): Handle PFUNCNAME.
9313 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
9314 (really_overloaded_fn): Likewise.
9315 (get_first_fn): Handle function templates.
9317 * typeck.c (build_x_function_call): Use really_overloaded_fn.
9318 Handle TEMPLATE_ID_EXPR.
9319 (build_x_unary_op): Likewise.
9320 (build_unary_op): Likewise.
9321 (mark_addressable): Templates whose address is taken are marked
9325 * method.c (build_decl_overload_real): New function.
9326 (build_template_parm_names): New function.
9327 (build_overload_identifier): Use it.
9328 (build_underscore_int): New function.
9329 (build_overload_int): Use it. Add levels for template
9331 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
9332 (build_overload_nested_names): Handle template type parameters.
9333 (build_template_decl_overload): New function.
9335 * parse.y (YYSTYPE): New ntype member.
9336 (nested_name_specifier): Use it.
9337 (nested_name_specifier_1): Likewise.
9338 (PFUNCNAME): New token.
9339 (template_id, object_template_id): New non-terminals.
9340 (template_parm_list): Note specializations.
9341 (template_def): Likewise.
9342 (structsp): Likewise.
9343 (fn.def2): Handle member template specializations.
9344 (component_decl_1): Likewise.
9345 (direct_notype_declarator): Handle template-ids.
9346 (component_decl_1): Likewise.
9347 (direct_notype_declarator): Handle template-ids.
9348 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
9350 * pt.c (processing_specializations): New variable.
9351 (template_header_count): Likewise.
9352 (type_unification_real): New function.
9353 (processing_explicit_specialization): Likewise.
9354 (note_template_header): Likewise.
9355 (is_member_template): Handle specializations.
9356 (end_template_decl): Call reset_specialization.
9357 (push_template_decl): Handle member template specializations.
9359 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
9360 (instantiate_template): Handle specializations.
9361 (instantiate_decl): Likewise.
9362 (fn_type_unification): Handle explicit_targs.
9363 (type_unification): Likewise. Allow incomplete unification
9364 without an error message, if allow_incomplete.
9365 (get_bindings): Use new calling sequence for fn_type_unification.
9367 * spew.c (yylex): Handle PFUNCNAME.
9369 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
9370 (really_overloaded_fn): Likewise.
9371 (get_first_fn): Handle function templates.
9373 * typeck.c (build_x_function_call): Use really_overloaded_fn.
9374 Handle TEMPLATE_ID_EXPR.
9375 (build_x_unary_op): Likewise.
9376 (build_unary_op): Likewise.
9377 (mark_addressable): Templates whose address is taken are marked
9381 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9383 * decl.c (init_decl_processing): Declare __builtin_constant_p as
9384 accepting any kind of type, not only int.
9386 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9388 * search.c (get_matching_virtual): Notice virtual bases when sorrying
9389 about covariant returns.
9391 * parse.y (member_init): Also imply typename here. Remove ancient
9392 extension for initializing base members.
9394 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9396 Handle multi-level typenames and implicit typename in base list.
9397 * parse.y (typename_sub{,[0-2]}): New rules.
9398 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
9399 (nonnested_type): New rule.
9400 (complete_type_name): Use it.
9401 (base_class.1): Use typename_sub and nonnested_type.
9402 (nested_name_specifier): Don't elide std:: here.
9403 * decl.c (make_typename_type): Handle getting a type for NAME.
9404 (lookup_name_real): Turn std:: into :: here.
9406 Rvalue conversions were removed in London.
9407 * call.c (is_subseq): Don't consider lvalue transformations.
9408 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
9409 (joust): Re-enable ?: kludge.
9411 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
9413 * decl.c (start_function): Up warning of no return type to be a
9416 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9418 * init.c (expand_member_init): Don't set TREE_USED.
9419 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
9420 set,don't clear TREE_USED wholesale.
9422 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
9424 * call.c (build_over_call): Do require_complete_type before
9427 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
9429 * search.c (lookup_field): Call complete_type in all cases.
9431 * decl.c (finish_function): Just warn about flowing off the end.
9433 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9435 * decl.c (grokparms): Don't bash a permanent list node if we're
9438 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
9440 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
9442 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9444 * call.c (build_new_op): Give better error for syntactically
9445 correct, but semantically invalid, use of undeclared template.
9447 * call.c (compare_qual): Handle pmfs.
9449 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
9450 after the exception spec.
9452 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9454 * call.c (null_ptr_cst_p): Integer type, not integral type.
9456 * call.c (joust): Disable warnings until they can be moved to the
9459 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
9461 * Makefile.in, config-lang.in: Convert to autoconf.
9463 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
9465 * decl.c (lookup_name_real): Add implicit 'typename' to types from
9468 * pt.c (most_specialized_class): Fix typo.
9469 (tsubst): Move constant folding to TREE_VEC case.
9471 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
9473 * pt.c (do_poplevel): Don't warn about unused local variables
9474 while processing_template_decl since we don't always know whether
9475 or not they will need constructing/destructing.
9477 * pt.c (uses_template_parms): Check the values of an enumeration
9478 type to make sure they don't depend on template parms.
9480 * decl.c (make_typename_type): Don't lookup the field if the
9481 context uses template parms, even if we're not
9482 processing_template_decl at the moment.
9484 * pt.c (coerce_template_parms): Avoid looking at the
9485 TYPE_LANG_DECL portion of a typename type, since there won't be
9487 (tsubst): Do constant folding as necessary to make sure that
9488 arguments passed to lookup_template_class really are constants.
9490 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
9492 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
9493 * decl2.c (finish_file): Only register exception tables if we
9496 * decl.c (init_decl_processing): Add __builtin_[fs]p.
9498 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9500 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
9502 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
9504 * error.c (dump_decl): Avoid crashing when presented with a
9505 uninitialized constant, as can occur with a template parameter.
9506 (dump_expr): Make sure that there are enough levels of
9507 current_template_parms before we start diving through them.
9509 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
9511 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
9514 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9516 * except.c (expand_throw): Call build_delete for all
9517 exception types, not just objects with destructors.
9519 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
9521 * decl.c (current_local_enum): Remove static.
9522 * pt.c (tsubst_enum): Save and restore value of current_local_enum
9523 in case template is expanded in enum decl.
9524 (instantiate_class_template) : Use new tsubst_enum signature.
9525 (tsubst_expr): Likewise.
9527 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
9529 * pt.c (begin_member_template_processing): Take a function as
9530 argument, not a set of template arguments. Use the template
9531 parameters, rather than the arguments. Handle non-type parameters
9532 correctly. Push a binding level for the parameters so that multiple
9533 member templates using the same parameter names can be declared.
9534 (end_member_template_processing): Pop the binding level.
9535 (push_template_decl): Mark member templates as static when
9538 * lex.c (do_pending_inlines): Pass the function, not its template
9539 arguments, to begin_member_template_processing.
9540 (process_next_inline): Likewise.
9541 (do_pending_defargs): Likewise.
9543 * error.c (dump_expr): Obtain the correct declaration for a
9544 TEMPLATE_CONST_PARM.
9546 * call.c (add_template_conv_candidate): New function.
9547 (build_object_call): Handle member templates, as done in the other
9550 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
9552 * decl.c (replace_defag): Undo previous change.
9553 * lex.c (do_pending_defargs): Deal with member templates.
9555 * pt.c (is_member_template): Avoid crashing when passed a
9556 non-function argument.
9558 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
9560 * class.c (grow_method): Remove check for redeclaration.
9562 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
9564 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
9565 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
9566 (PRIMARY_TEMPLATE_P): Use it.
9567 * call.c (build_overload_call_real): Use it.
9568 * class.c (instantiate_type): Likewise.
9569 * decl.c (decls_match): Likewise.
9570 * method.c (build_overload_identifier): Likewise.
9571 * pt.c (push_template_decl): Likewise.
9572 (classtype_mangled_name): Likewise.
9573 (lookup_template_class): Likewise.
9575 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
9576 DECL_NTPARMS to conform to usage elsewhere.
9577 * call.c (add_template_candidate): Likewise.
9578 * class.c (instantiate_type): Likewise.
9579 * pt.c (instantiate_template): Likewise.
9580 (get_bindings): Likewise.
9582 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
9585 * pt.c (unify): Undo changes to allow multiple levels of template
9587 (type_unification): Likewise.
9588 (fn_type_unification): Likewise.
9589 (get_class_bindings): Likewise.
9590 * cp-tree.h (Likewise).
9592 * decl.c (replace_defarg): Check that the type of the default
9593 parameter does not invlove a template type before complaining
9594 about the initialization.
9596 * error.c (dump_expr): Deal with template constant parameters in
9597 member templates correctly.
9599 * pt.c (is_member_template): Deal with class specializations
9601 (tsubst): Handle "partial instantiation" of member templates
9604 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
9606 * pt.c (type_unification): Change calling sequence to allow for
9607 multiple levels of template parameters.
9608 (tsubst_expr): Likewise.
9610 (tsubst_copy): Likewise.
9611 (instantiate_template): Likewise.
9613 * call.c (build_overload_call_real): Use it.
9614 (add_builtin_candidate): Use it.
9615 (build_new_method_call): Use it.
9616 * class.c (instantiate_type): Use it.
9617 * decl.c (grokdeclarator): Use it.
9618 * decl2.c (finish_file): Use it.
9619 * method.c (build_overload_identifier): Use it.
9621 * call.c (add_template_candidate): Add additional parameter for
9622 the function return type. Call fn_type_unification istead of
9624 (build_user_type_conversion_1): Handle member templates.
9625 (build_new_function_call): Likewise.
9626 (build_new_op): Likewise.
9627 (build_new_method_call): Likewise.
9629 * class.c (grow_method): Don't give an error message indicating
9630 that two member templates with the same name are ambiguous.
9631 (finish_struct): Treat member template functions just like member
9634 * cp-tree.h (check_member_template): Add declaration.
9635 (begin_member_template_processing): Likewise.
9636 (end_member_template_processing): Likewise.
9637 (fn_type_unification): Likewise.
9638 (is_member_template): Likewise.
9639 (tsubst): Change prototype.
9640 (tsubst_expr): Likewise.
9641 (tsubst_copy): Likewise.
9642 (instantiate_template): Likewise.
9643 (get_bindings): Likewise.
9645 * decl.c (decls_match): Handle multiple levels of template
9647 (pushdecl): Handle template type params just like other type
9649 (push_class_level_binding): Return immediately if the
9650 class_binding_level is NULL.
9651 (grokfndecl): If check_classfn() returns a member_template, use
9652 the result of the template, not the template itself.
9654 * decl2.c (check_member_template): New function. Check to see
9655 that the entity declared to be a member template can be one.
9656 (check_classfn): Allow redeclaration of member template functions
9657 with different types; the new functions can be specializations or
9658 explicit instantiations.
9660 * error.c (dump_decl): Handle multiple levels of template
9662 (dump_function_decl): Update to handle function templates.
9664 * lex.c (do_pending_inlines): Set up template parameter context
9665 for member templates.
9666 (process_next_inline): Likewise.
9668 * method.c (build_overload_identifier): Adjust for multiple levels
9669 of template parameters.
9671 * parse.y (fn.def2): Add member templates.
9672 (component_decl_1): Likewise.
9674 * pt.c (begin_member_template_processing): New function.
9675 (end_member_template_processing): Likewise.
9676 (is_member_template): Likewise.
9677 (fn_type_unification): Likewise.
9678 (current_template_parms): Return a vector of all the template
9679 parms, not just the innermost level of parms.
9680 (push_template_decl): Deal with the possibility of member
9682 (lookup_template_class): Likewise.
9683 (uses_template_parms): Likewise.
9684 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
9685 TEMPLATE_CONST_PARM to deal with multiple levels of template
9686 arguments. Add processing of TEMPLATE_DECL to produce new
9687 TEMPLATE_DECLs from old ones.
9688 (do_decl_instantiation): Handle member templates.
9690 * search.c (lookup_fnfields_1): Handle member template conversion
9693 * tree.c (cp_tree_equal): Check the levels, as well as the
9694 indices, of TEMPLATE_CONST_PARMs.
9696 * typeck.c (comptypes): Check the levels, as well as the indices,
9697 fo TEMPLATE_TYPE_PARMs.
9698 (build_x_function_call): Treat member templates like member
9701 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9703 * typeck.c (c_expand_return): Always convert_for_initialization
9704 before checking for returning a pointer to local.
9706 * pt.c (type_unification): If strict and the function parm doesn't
9707 use template parms, just compare types.
9709 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
9711 * method.c (build_overloaded_value): Replace direct call
9712 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
9714 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9716 * typeck.c (convert_arguments): Don't arbitrarily choose the first
9717 of a set of overloaded functions.
9719 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9721 * lex.c (real_yylex): Don't elide __FUNCTION__.
9723 * method.c (build_overload_value): Add in_template parm.
9724 (build_overload_int): Likewise.
9725 (build_overload_identifier): Pass it.
9727 * decl.c (duplicate_decls): Don't bash a previous template
9728 definition with a redeclaration.
9730 * pt.c (unify): float doesn't match double.
9732 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
9733 TYPE_DECL. Handle getting non-template types.
9734 * parse.y (explicit_instantiation): Use typespec instead of
9737 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
9739 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
9741 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
9743 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
9744 (compare_ics): Likewise.
9746 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9748 * call.c (joust): Warn about choosing one conversion op over
9749 another because of 'this' argument when the other return type is
9751 (source_type): New fn.
9753 * call.c (build_new_op): Strip leading REF_BIND from first operand
9754 to builtin operator.
9756 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
9759 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9761 * call.c (null_ptr_cst_p): Remove support for (void*)0.
9763 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
9765 * typeck.c (expand_target_expr): Make definition match declaration.
9767 * class.c (get_basefndecls): Make definition match declaration.
9769 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
9771 * input.c (sub_getch): Eventually give up and release the input file.
9773 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
9776 * call.c (joust): Tweak message.
9778 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
9780 * error.c (type_as_string): Put const/volatile on template type
9781 parameters where appropriate.
9783 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
9785 * call.c (strictly_better): Make arguments unsigned ints.
9787 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
9789 * lex.c (real_yylex): Refer to __complex instead of complex.
9791 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
9793 * lex.c (real_yylex): Don't use getc directly.
9795 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9797 * call.c (is_subseq): Don't try to be clever.
9799 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
9801 * parse.y, pt.c: Include "except.h".
9802 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
9803 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
9804 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
9805 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
9808 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9810 * decl2.c (mark_vtable_entries): Instead of replacing pure
9811 virtuals with a reference to __pure_virtual, copy the decl and
9814 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9816 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
9818 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
9820 * pt.c (instantiate_class_template): Call repo_template_used
9821 before finish_prevtable_vardecl.
9823 * call.c (is_subseq): New fn.
9824 (compare_ics): Use it.
9826 * repo.c (finish_repo): Don't crash on no args.
9828 * parse.y (named_complex_class_head_sans_basetype): Handle
9829 explicit global scope.
9830 * decl2.c (handle_class_head): New fn.
9832 * pt.c (unify): Add CONST_DECL case.
9834 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9836 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
9838 * cp-tree.h (report_type_mismatch): Add prototype.
9839 * call.c (build_overload_call_real): Remove erroneous fourth
9840 argument to report_type_mismatch.
9841 (build_user_type_conversion_1): Remove erroneous second arg to
9843 (build_new_function_call): Likewise.
9844 (build_object_call): Likewise.
9845 (build_new_op): Likewise.
9846 (build_new_method_call): Likewise.
9848 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9850 * error.c (dump_decl): Don't bother processing a function with no
9853 * method.c (emit_thunk): Call init_function_start in the macro case.
9855 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
9857 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
9858 defined and used to set flag_vtable_thunks.
9860 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9862 * parse.y: Don't clear the inlines from their obstack until they've
9865 * decl.c (duplicate_decls): Don't complain about exception
9866 specification mismatch if flag_exceptions is off.
9868 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
9870 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
9872 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
9874 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
9875 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
9876 Include <stdio.h> before include files that formerly used STDIO_PROTO.
9878 * decl.c, g++spec.c, lex.c, method.c, repo.c:
9879 Include "config.h" first, as per autoconf manual.
9881 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9883 * decl.c (duplicate_decls): Tweak wording.
9884 * lex.c (do_pending_defargs): Don't die if we see a default arg
9885 that isn't a DEFAULT_ARG.
9886 * error.c (dump_expr): Handle DEFAULT_ARG.
9888 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
9889 * lang-options.h: Add -fhandle-exceptions.
9891 * class.c (build_vtable): Vtables are artificial.
9892 (prepare_fresh_vtable): Likewise.
9894 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9896 * cvt.c (ocp_convert): After converting to the target type, set
9897 LOOKUP_NO_CONVERSION.
9899 * call.c (joust): Warn about potentially confusing promotion rules
9901 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
9903 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
9905 * exception.cc: Declare __terminate_func with noreturn attribute.
9907 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
9909 * parse.y: Break out eat_saved_input, handle errors.
9910 (function_try_block): Use compstmt instead of compstmt_or_error.
9912 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9914 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
9916 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9918 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
9919 existence of cc1plus check whether $(LANGUAGES) contains C++.
9921 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9923 * method.c (do_build_copy_constructor): When copying an anonymous
9924 union member loop around to handle nested anonymous unions. Use
9925 the offset of the member relative to the outer structure, not the
9928 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9930 * call.c (resolve_args): New fn.
9931 (build_new_function_call): Use it.
9932 (build_object_call): Likewise.
9933 (build_new_method_call): Likewise.
9935 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9937 * call.c (build_over_call): tsubst all default parms from templates.
9939 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9941 * decl.c (struct cp_function): Add static_labelno.
9942 (push_cp_function_context): Save it.
9943 (pop_cp_function_context): Restore it.
9945 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9947 * typeck.c (build_component_ref_1): Convert from reference.
9949 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9951 * parse.y (current_declspecs, prefix_attributes): Initialize to
9954 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
9955 before we try to force it to be a TREE_LIST.
9956 (decl): Make sure $1.t is non-nil.
9958 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9960 * pt.c (uses_template_parms): Handle template first-parse codes.
9962 * decl.c (cp_finish_decl): Only warn about user-defined statics.
9964 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9966 * pt.c (unify): Handle BOOLEAN_TYPE.
9968 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
9969 * pt.c (tsubst): Don't set it.
9970 * call.c (build_over_call): Use uses_template_parms.
9972 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9974 * method.c (build_overload_nested_name): Use static_labelno
9975 instead of var_labelno.
9976 (build_qualified_name): New fn.
9977 (build_overload_name): Split out from here.
9978 (build_static_name): Use build_qualified_name.
9979 * decl.c (cp_finish_decl): Statics in extern inline functions
9980 have comdat linkage.
9981 (start_function): Initialize static_labelno.
9983 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9985 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
9986 before "all member functions in class [] are private".
9988 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9990 * lex.c (do_scoped_id): convert_from_reference.
9991 * init.c (build_offset_ref): Likewise.
9993 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9995 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
9997 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9999 * typeck.c (get_member_function_from_ptrfunc): Promote index
10002 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10004 * tree.c (layout_basetypes): Move non-virtual destructor warning.
10005 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
10007 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10009 * decl.c (grokdeclarator): Call add_defarg_fn for the function
10011 * lex.c (add_defarg_fn): Adjust.
10012 (do_pending_defargs): Adjust. Don't skip the first parm.
10014 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
10016 * decl.c (build_enumerator): Global enumerators are also readonly.
10018 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
10019 (build_dynamic_cast): Call it and convert_from_reference.
10021 * lex.c (add_defarg_fn): New fn.
10022 (snarf_defarg): Don't add to defarg_types.
10023 (do_pending_defargs): Lose defarg_types. All fns we process now
10025 * decl.c (grokfndecl): Call add_defarg_fn.
10027 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
10028 * cp-tree.def: Add DEFAULT_ARG.
10029 * spew.c (yylex): Call snarf_defarg as appropriate.
10030 * parse.y: New tokens DEFARG and DEFARG_MARKER.
10031 (defarg_again, pending_defargs, defarg, defarg1): New rules.
10032 (structsp): Use pending_defargs.
10033 (parms, full_parm): Use defarg.
10034 * lex.c (init_lex): Initialize inline_text_firstobj.
10035 (do_pending_inlines): Never pass the obstack to feed_input.
10036 (process_next_inline): Call end_input instead of restore_pending_input.
10037 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
10038 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
10039 * input.c (end_input): New fn.
10040 (sub_getch): At the end of some fed input, just keep returning EOF
10041 until someone calls end_input.
10042 Remove 'obstack' field from struct input_source.
10043 * decl.c (grokparms): Handle DEFAULT_ARG.
10044 (replace_defarg): New fn.
10045 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
10047 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10049 * call.c (implicit_conversion): If nothing else works, try binding
10050 an rvalue to a reference.
10052 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
10054 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
10055 ifndef for Cygwin32 to include SIGSEGV.
10057 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10059 * class.c (finish_struct_1): Only complain about pointers without
10060 copy stuff if there are any constructors.
10062 * rtti.c (build_dynamic_cast): Call complete_type on the types.
10064 * decl.c (grokfndecl): If the function we chose doesn't actually
10067 * decl2.c (grokclassfn): Don't specify 'const int' for the
10068 artificial destructor parm.
10070 * pt.c (type_unification): If we are called recursively, nothing
10073 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
10075 * decl.c (init_decl_processing): Stop trying to catch signals
10076 other than SIGABRT since the Cygwin32 library doesn't support
10077 them correctly yet. This fixes a situation in which g++ causes
10078 a hang on SIGSEGVs and other such signals in our Win32-hosted
10081 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
10083 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
10085 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10087 * typeck2.c (store_init_value): Always return the value if our
10088 type needs constructing.
10090 * method.c (hack_identifier): Convert class statics from
10093 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10095 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
10097 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
10099 * typeck.c (c_expand_return): Make sure we clean up temporaries at
10100 the end of return x;
10102 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10104 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
10106 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
10108 * except.c (expand_builtin_throw): Add support
10109 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
10111 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10113 * repo.c (extract_string): Null-terminate.
10115 * cp-tree.h (TI_SPEC_INFO): New macro.
10116 (CLASSTYPE_TI_SPEC_INFO): New macro.
10117 * pt.c (push_template_decl): Correctly determine # of template parms
10120 * call.c (compare_ics): Really fix 'this' conversions.
10122 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
10125 * pt.c (push_template_decl): Complain about mismatch in # of
10126 template parms between a class template and a member template.
10128 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10130 * method.c (synthesize_method): You can't call
10131 function_cannot_inline_p after finish_function.
10132 * decl.c (finish_function): Turn on flag_inline_functions and turn
10133 off DECL_INLINE before handing a synthesized method to the
10136 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10138 * method.c (synthesize_method): Remove July 30 change to never set
10139 DECL_INLINE if at_eof.
10141 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
10143 * xref.c (GNU_xref_member): Ensure that the node has a
10144 decl_lang_specific part before checking DECL_FRIEND_P.
10146 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10148 * pt.c (instantiate_class_template): Diagnose non-class types used
10151 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10153 * typeck.c (build_conditional_expr): Use convert_for_initialization
10154 instead of convert_and_check.
10156 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10158 * parse.y (typespec): Don't pedwarn for typeof.
10160 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
10162 * repo.c (finish_repo): Only check changes if we would write a
10165 * call.c (compare_ics): Fix handling of 'this' conversions.
10167 * pt.c (do_decl_instantiation): Support static data too. Rename
10168 from do_function_instantiation.
10169 * cp-tree.h: Adjust.
10172 * repo.c (extract_string): New fn.
10173 (get_base_filename): Use it.
10174 (init_repo): Compare old args with current args.
10176 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
10178 * Makefile.in, Make-lang.in: Protect C-ls with a comment
10179 character, idea from Paul Eggert <eggert@twinsun.com>.
10181 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
10183 * typeck.c (c_expand_return): Be more persistent in looking for
10186 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
10187 pointer to reference.
10189 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
10191 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10193 * init.c (build_member_call, build_offset_ref):
10194 Use do_scoped_id instead of do_identifier.
10196 * cvt.c (convert): Remove bogosity.
10198 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10200 * cvt.c (build_up_reference): Do checks of ARGTYPE and
10201 TARGET_TYPE before trying to use get_binfo.
10203 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
10205 * cvt.c (build_up_reference): Call get_binfo to get access control.
10207 * decl2.c (import_export_decl): If we don't support weaks, leave
10210 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
10212 * except.c (expand_builtin_throw): Add support for machines that
10213 cannot access globals after throw's epilogue when
10214 -fno-sjlj-exceptions is used.
10216 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
10218 * parse.y: 'std::' becomes '::'.
10219 * lex.c (real_yylex): Remove 'namespace' warning.
10220 * init.c (build_member_call): Ignore 'std::'.
10221 (build_offset_ref): Likewise.
10222 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
10223 (do_toplevel_using_decl): Ignore 'using std::whatever'.
10224 * decl.c (push_namespace): Just sorry.
10225 (pop_namespace): Nop.
10226 (init_decl_processing): Declare std namespace.
10228 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10230 * search.c (push_class_decls): A name which ambiguously refers to
10231 several instantiations of the same template just refers to the
10234 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
10236 * decl.c (build_enumerator): Fix problem with unsigned long
10237 enumerated values being smashed to ints, causing overflow
10238 when computing next enumerated value (for enum values around
10241 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
10243 * typeck.c (build_component_ref): Only call mark_used on a decl.
10245 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10247 * typeck.c (build_c_cast): Make the check for a ptr to function
10248 more specific before possible default_conversion call.
10250 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
10252 * except.c (expand_exception_blocks): Simplify and fix and make
10253 sure we don't end a region in a sequence, as expand_end_bindings
10256 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
10258 * except.c (init_exception_processing): Mark terminate as not
10259 returning so that the optimizer can optimize better.
10261 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
10263 * cvt.c (convert): Don't do any extra work, if we can avoid it
10266 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
10268 * *.[chy]: Change cp_convert to ocp_convert, change convert to
10269 cp_convert. convert is now reserved for the backend, and doesn't
10270 have the semantics a frontend person should ever want.
10272 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
10274 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
10275 Lose -traditional support.
10277 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10279 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
10281 * parse.y (self_reference): Do it for templates, too.
10282 * class.c (pushclass): Don't overload_template_name; the alias
10283 generated by build_self_reference serves the same purpose.
10285 * tree.c (list_hash): Make static, take more args.
10286 (list_hash_lookup): Likewise.
10287 (list_hash_add): Make static.
10288 (list_hash_canon): Lose.
10289 (hash_tree_cons): Only build a new node if one isn't already in the
10291 (hash_tree_chain): Use hash_tree_cons.
10292 * cp-tree.h: Adjust.
10293 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
10294 of calling lookup_name.
10296 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10298 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
10299 doesn't refer to the CONST_DECLs.
10301 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
10303 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
10305 (expand_class_desc): Convert the last argument to a sizetype.
10307 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10309 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
10310 __real__): Add reswords.
10311 * hash.h: Regenerate.
10312 * lex.h (rid): Add RID_COMPLEX.
10313 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
10314 * lex.c (init_lex): Add building of RID_COMPLEX.
10315 (real_yylex): General cleanup in line with what c-lex.c also has,
10316 sans the cruft for traditional; add handling of SPEC_IMAG, complex
10317 types, and imaginary numeric constants.
10318 * parse.y (REALPART, IMAGPART): Add tokens.
10319 (unary_expr): Add REALPART and IMAGPART rules.
10320 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
10321 * decl.c (complex_{integer,float,double,long}_type_node): Define
10323 (init_decl_processing): Set up the types.
10324 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
10325 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
10326 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
10327 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
10328 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
10330 * method.c (build_overload_name): Add handling of the different
10331 COMPLEX_TYPEs, prefixing them with `J'.
10332 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
10333 as a template parm.
10334 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
10335 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
10336 (mapcar): Handle COMPLEX_CST.
10337 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
10338 (common_type): Add code for complex types.
10339 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
10340 (convert_for_assignment): Likewise.
10341 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
10343 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
10345 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
10346 tsubst_expr, as it might try to do overload resolution.
10348 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
10350 * pt.c (instantiate_class_template): Oops.
10352 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10354 * cp-tree.def: Add TAG_DEFN.
10355 * pt.c (tsubst_enum): New fn.
10356 (instantiate_class_template): Use it.
10357 (tsubst_expr): Support TAG_DEFN.
10358 (tsubst): Support local enums.
10359 (tsubst_copy): Likewise.
10360 * decl.c (finish_enum): Likewise.
10361 (start_enum): If this is a local enum, switch to permanent_obstack.
10363 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
10365 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
10366 (finish_function): Put the base init code for constructors just
10367 after the parm cleanup insns.
10368 (struct cp_function): Add last_parm_cleanup_insn.
10369 (push_cp_function_context): Likewise.
10370 (pop_cp_function_context): Likewise.
10372 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10374 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
10376 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10378 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
10379 for THUNK_FNDECL before we switch to temporary allocation.
10381 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
10383 * call.c (build_new_op): Handle null arg2 for ?:.
10385 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
10387 * except.c (expand_exception_blocks): Ensure that we flow through
10388 the end of the exception region for the exception specification.
10389 Move exception region for the exception specification in, so that
10390 it doesn't protect the parm cleanup. Remove some obsolete code.
10391 * decl.c (store_parm_decls): Likewise.
10392 (finish_function): Likewise.
10394 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
10396 * init.c (build_new): Fix nothrow handling.
10398 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10400 * init.c (emit_base_init): Don't warn about the initialization
10401 list for an artificial member.
10403 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10405 * expr.c (do_case): Handle !START case for the error msg.
10407 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
10409 * decl2.c, lang-options.h: New option -Weffc++.
10410 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
10413 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
10414 to MULTIPLE_SYMBOL_SPACES.
10416 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
10418 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
10420 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
10422 * typeck.c (c_expand_return): Don't complain about returning void
10423 to void in an artificial function.
10424 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
10425 don't set DECL_RESULT, set DECL_ARTIFICIAL.
10426 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
10428 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
10430 * init.c (init_decl_processing): Add support for setjmp/longjmp based
10431 exception handling.
10432 * except.c (init_exception_processing): Likewise.
10433 (expand_end_catch_block): Likewise.
10434 (expand_exception_blocks): Likewise.
10435 (expand_throw): Likewise.
10436 * exception.cc (__default_terminate): Likewise.
10438 * init.c (perform_member_init): Use new method of expr level
10439 cleanups, instead of cleanups_this_call and friends.
10440 (emit_base_init): Likewise.
10441 (expand_aggr_vbase_init_1): Likewise.
10442 (expand_vec_init): Likewise.
10443 * decl.c (cp_finish_decl): Likewise.
10444 (expand_static_init): Likewise.
10445 (store_parm_decls): Likewise.
10446 (cplus_expand_expr_stmt): Likewise.
10447 * decl2.c (finish_file): Likewise.
10449 * Make-lang.in (exception.o): Ok to compile with -O now.
10451 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
10452 we know it will be done later by the backend.
10454 * decl2.c (lang_f_options): Remove support for short temps.
10455 * lang-options.h: Likewise.
10457 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10459 * tree.c (varargs_function_p): New fn.
10460 * method.c (emit_thunk): Replace broken generic code with code to
10461 generate a heavyweight thunk function.
10463 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
10465 * pt.c (process_template_parm): pedwarn about floating-point parms.
10467 * decl.c (grokdeclarator): inline no longer implies static.
10469 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
10471 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
10473 * class.c (check_for_override): The signature of an overriding
10474 function is not changed.
10476 * call.c (build_over_call): Move setting of conv into the loop.
10477 Note: this change, along with the related changes of the 18th thru
10478 the 20th of April, fix an infinite loop problem in conversions.
10480 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
10482 * call.c (build_user_type_conversion_1): Really ignore rvalue
10483 conversions when looking for a REFERENCE_TYPE.
10485 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
10486 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
10487 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
10488 (build_unary_op): Likewise.
10489 * call.c (build_over_call): See through a CONVERT_EXPR around the
10490 ADDR_EXPR for on a temporary.
10491 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
10492 the ADDR_EXPR for a local variable.
10494 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
10496 * call.c (build_user_type_conversion_1): If we're trying to
10497 convert to a REFERENCE_TYPE, only consider lvalue conversions.
10498 (build_new_function_call): Print candidates.
10499 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
10500 (reference_binding): Binding a temporary of a reference-related type
10503 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10505 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
10506 * tinfo2.cc (type_info::before): Likewise.
10508 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
10510 * call.c (implicit_conversion): Oops.
10512 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
10514 * call.c (implicit_conversion): Try to find a reference conversion
10515 before binding a const reference to a temporary.
10517 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
10519 * exception.cc (__default_unexpected): Call terminate by default,
10520 so that if the user overrides terminate, the correct function will
10523 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
10525 * parse.y (left_curly): Avoid trying to use any fields of
10526 error_mark_node, as there aren't any.
10528 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
10530 * lex.c (do_identifier): Avoid breaking on overloaded methods
10531 as default arguments.
10533 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
10535 * call.c (add_template_candidate): Initialize the variable "dummy".
10537 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
10539 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
10540 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
10542 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10544 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
10545 (debug_binfo): Delete decl, not needed.
10547 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
10548 promotes_to_aggr_type): Delete fns.
10549 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
10550 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
10551 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
10553 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
10555 * friend.c (is_friend_type): Delete fn.
10556 * cp-tree.h (is_friend_type): Delete decl.
10558 * decl.c (original_result_rtx, double_ftype_double,
10559 double_ftype_double_double, int_ftype_int, long_ftype_long,
10560 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
10561 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
10563 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
10565 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
10567 * decl.c (pushdecl_nonclass_level): #if 0, unused.
10568 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
10570 * lex.c (reinit_lang_specific): #if 0, unused.
10571 * cp-tree.h (reinit_lang_specific): #if 0 decl.
10573 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
10574 * cp-tree.h (revert_static_member_fn): Delete decl.
10576 * class.c (root_lang_context_p): Delete fn.
10577 * cp-tree.h (root_lang_context_p): Delete decl.
10579 * decl.c (set_current_level_tags_transparency): #if 0, unused.
10580 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
10582 * lex.c (set_vardecl_interface_info): Make static.
10583 * cp-tree.h (set_vardecl_interface_info): Delete decl.
10585 * call.c (find_scoped_type): Make static.
10586 * cp-tree.h (find_scoped_type): Delete decl.
10588 * search.c (convert_pointer_to_vbase): Make static.
10589 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
10591 * decl.c (const_ptr_type_node): Likewise.
10592 * cp-tree.h (const_ptr_type_node): Delete decl.
10594 * typeck.c (common_base_type): Make static.
10595 * cp-tree.h (common_base_types): Delete erroneous decl.
10597 * pt.c (classtype_mangled_name): Make static.
10598 * cp-tree.h (classtype_mangled_name): Delete decl.
10600 * lex.c (check_newline): Make static.
10601 * cp-tree.h (check_newline): Delete decl.
10603 * typeck.c (build_x_array_ref): Delete fn, same idea as
10605 * cp-tree.h (build_x_array_ref): Delete decl.
10607 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
10609 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
10611 * class.c (build_vtable_entry): Make static.
10612 * cp-tree.h (build_vtable_entry): Delete decl.
10614 * class.c (build_vbase_pointer): Make static.
10615 * cp-tree.h (build_vbase_pointer): Delete decl.
10617 * sig.c (build_sptr_ref): Add forward decl and make static.
10618 * cp-tree.h (build_sptr_ref): Delete decl.
10620 * call.c (build_new_method_call): Add forward decl and make static.
10621 * cp-tree.h (build_new_method_call): Delete decl.
10623 * call.c (build_object_call): Make static.
10624 * class.c (check_for_override, complete_type_p, mark_overriders):
10626 * decl.c (cp_function_chain): Likewise.
10627 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
10629 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
10631 * tree.c (build_cplus_array_type_1): Likewise.
10632 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
10633 (comp_target_parms): Likewise.
10635 * init.c (build_builtin_call): Make static.
10636 * cp-tree.h (build_builtin_call): Delete decl.
10638 * typeck.c (binary_op_error): Delete decl.
10639 * cp-tree.h (binary_op_error): Likewise.
10641 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10643 * call.c (build_method_call): Compare against error_mark_node
10644 directly, rather than the ERROR_MARK tree code.
10645 * cvt.c (cp_convert): Likewise.
10646 * decl.c (print_binding_level): Likewise.
10647 (duplicate_decls): Likewise.
10648 (grokdeclarator): Likewise.
10649 (grokdeclarator): Likewise.
10650 * init.c (expand_aggr_init_1): Likewise.
10651 (decl_constant_value): Likewise.
10652 * method.c (build_opfncall): Likewise.
10653 (hack_identifier): Likewise.
10654 * typeck.c (build_modify_expr): Likewise.
10656 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
10658 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10660 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
10662 * pt.c (coerce_template_parms): Add new error message.
10664 * method.c (build_overload_value): Implement name mangling for
10665 floating-point template arguments.
10667 * method.c (build_overload_int, icat, dicat): Fix mangling of template
10668 arguments whose absolute value doesn't fit in a signed word.
10670 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10672 * friend.c: New file; put all of the friend stuff in here.
10673 * init.c: Instead of here.
10674 * Makefile.in (CXX_OBJS): Add friend.o.
10675 (friend.o): Add dependencies.
10676 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
10678 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
10680 * call.c (build_scoped_method_call): Complain if the scope isn't a
10683 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10685 * parse.y (left_curly): Don't crash on erroneous type.
10687 * init.c (build_delete): Fix type of ref.
10689 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10691 * search.c (get_vbase_1): Renamed from get_vbase.
10692 (get_vbase): Wrapper, now non-static.
10693 (convert_pointer_to_vbase): Now static.
10695 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
10696 * init.c (build_delete): Pass one.
10697 (build_partial_cleanup_for): Use build_scoped_method_call.
10698 * decl.c (finish_function): Pass a binfo.
10700 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10702 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
10704 * typeck.c (build_c_cast): Lose other reference to flag.
10706 * call.c (build_field_call): Don't look for [cd]tor_identifier.
10707 * decl2.c (delete_sanity): Remove meaningless use of
10708 LOOKUP_HAS_IN_CHARGE.
10709 * decl.c (finish_function): Use build_scoped_method_call instead
10710 of build_delete for running vbase dtors.
10711 * init.c (build_delete): Call overload resolution code instead of
10712 duplicating it badly.
10714 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
10716 * call.c (build_over_call): Call mark_used before trying to elide
10719 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
10721 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10723 * typeck.c (build_modify_expr): Always pedwarn for a cast to
10724 non-reference used as an lvalue.
10726 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10728 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
10730 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10732 * parse.y (handler): Fix template typo.
10734 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10736 * error.c (lang_decl_name): New fn.
10737 * tree.c (lang_printable_name): Use it.
10739 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
10741 * g++spec.c: Include config.h so that we can catch bzero #defines
10742 from the config file.
10744 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
10746 * new1.cc: Include a declaration for malloc, to avoid warning, and
10747 avoid lossing on systems that require one (ones that define malloc
10750 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10752 * decl2.c (max_tinst_depth): New variable.
10753 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
10755 * pt.c (max_tinst_depth): Variable moved.
10756 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
10759 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
10761 * decl.c (xref_basetypes): Allow a base class that depends on
10762 template parms to be incomplete.
10764 * decl2.c (build_expr_from_tree): Support typeid(type).
10765 * rtti.c (get_typeid): Support templates.
10766 (expand_si_desc, expand_class_desc): Fix string length.
10767 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
10769 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
10771 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
10773 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
10775 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10777 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
10778 smashes together template and non-template decls of the same
10781 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
10783 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
10785 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10787 * decl.c (duplicate_decls): Next route, pedwarn about different
10788 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
10790 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10792 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
10793 (struct lang_type): Delete has_default_implementation member.
10794 Increase dummy to 21.
10795 * decl.c (start_method): Delete usage.
10797 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
10798 store_after_parms, start_decl_1, auto_function): Add decls.
10799 (get_arglist_len_in_bytes, declare_implicit_exception,
10800 have_exceptions_p, make_type_decl, typedecl_for_tag,
10801 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
10802 build_component_type_expr, cplus_exception_name,
10803 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
10804 * call.c (build_this): Make static.
10805 (is_complete): Likewise.
10806 (implicit_conversion): Likewise.
10807 (reference_binding): Likewise.
10808 (standard_conversion): Likewise.
10809 (strip_top_quals): Likewise.
10810 (non_reference): Likewise.
10811 (build_conv): Likewise.
10812 (user_harshness): Likewise.
10813 (rank_for_ideal): Likewise.
10814 * decl.c (start_decl_1): Delete forward decl.
10815 (push_decl_level): Make static.
10816 (resume_binding_level): Make static.
10817 (namespace_bindings_p): Make static.
10818 (declare_namespace_level): Make static.
10819 (lookup_name_real): Make static.
10820 (duplicate_decls): Make static. Take register off NEWDECL and
10821 OLDDECL parm decls.
10822 * decl2.c (get_sentry): Make static.
10823 (temp_name_p): Delete fn.
10824 * except.c (auto_function): Delete decl.
10825 * lex.c (handle_{cp,sysv}_pragma): Make static.
10826 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
10827 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
10828 * pt.c (tsubst_expr_values): Make static.
10829 * rtti.c (combine_strings): Delete decl.
10831 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10833 * pt.c (push_template_decl): Handle getting a typedef.
10835 * call.c (build_new_function_call): Complain about void arg.
10837 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10839 * decl.c (duplicate_decls): Give pedwarn of different exceptions
10840 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
10842 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
10844 * except.c (expand_throw): Don't expand the cleanup tree here,
10845 since we are not going to write the rtl out. Fixes problem with
10848 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
10850 * Make-lang.in: Add $(exeext) as necessary.
10852 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
10854 * parse.y (handler_seq): Must have at least one catch clause.
10856 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10858 * call.c (add_builtin_candidate): Restore ?: hack.
10860 * decl.c (grok_op_properties): More warnings.
10862 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10864 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
10865 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
10867 * decl.c (duplicate_decls): Scale back to a warning, and only do
10870 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
10872 * decl.c (duplicate_decls): pedwarn mismatched exception
10875 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
10877 * call.c (build_new_method_call): Don't display the invisible
10878 argument for controlling virtual bases.
10880 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
10882 * new: Add nothrow new and delete, bad_alloc and throw specifications
10884 * decl.c (init_decl_processing): Add throw specification for delete.
10885 * new.cc (nothrow): Define.
10886 * lex.c (real_yylex): Removing warning that throw and friends are
10888 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
10889 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
10890 * Make-lang.in: Add new{1,2}.{cc,o}.
10892 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10894 * lex.c (cons_up_default_function): Fix return type of synth op=.
10896 * init.c (emit_base_init): Add warnings for uninitialized members
10899 * decl.c (xref_basetypes): Add warning for non-polymorphic type
10900 with destructor used as base type.
10902 * decl.c (grok_op_properties): Add warning for op= returning void.
10903 * typeck.c (c_expand_return): Add warning for op= returning anything
10906 * class.c (finish_struct_1): Add warning for class with pointers
10907 but not copy ctor or copy op=.
10909 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
10910 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
10911 (instantiate_template): If -fexternal-templates, add this
10912 instantiation to pending_templates.
10914 * decl2.c (copy_assignment_arg_p): Disable old hack to support
10917 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
10919 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
10921 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
10923 * call.c (standard_conversion): Handle getting references. Tack
10924 on RVALUE_CONV here. Do it for non-class types, too.
10925 (reference_binding): Pass references to standard_conversion.
10926 (implicit_conversion): Likewise.
10927 (add_builtin_candidate): Disable one ?: kludge.
10928 (convert_like): Handle RVALUE_CONVs for non-class types.
10929 (joust): Disable the other ?: kludge.
10931 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10933 * decl.c (init_decl_processing): Add code to build up common
10934 function types beforehand, to avoid creation then removal of
10935 things already in the hash table.
10937 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10939 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
10942 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
10943 current_template_parms.
10945 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
10947 * search.c (lookup_field): Don't return a function, check want_type.
10949 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10951 * init.c (build_new): Make sure PLACEMENT has a type.
10953 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10955 * init.c (build_new): Support new (nothrow).
10957 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10959 * pt.c (instantiate_decl): Also do push_to_top_level before setting
10962 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
10963 * pt.c (tsubst): Defer instantiation of default args.
10964 * call.c (build_over_call): Until here.
10966 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10968 * search.c (lookup_field): Make sure we have an
10969 IDENTIFIER_CLASS_VALUE before we try to return it.
10971 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10973 * call.c (build_method_call): Delete unused var PARM.
10974 (build_overload_call_real): Likewise.
10975 (build_object_call): Delete unused var P.
10976 (build_new_op): Likewise.
10977 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
10978 var definitions, which are never used.
10979 (shadow_tag): Delete unused var FN.
10980 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
10981 * init.c (build_new): Delete unused var ALLOC_TEMP.
10982 * method.c (hack_identifier): Delete unused var CONTEXT.
10983 (do_build_copy_constructor): Delete unused var NAME.
10984 (synthesize_method): Delete unused var BASE.
10985 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
10986 * rtti.c (build_headof): Delete unused var VPTR.
10987 (get_typeid): Delete unused var T.
10988 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
10990 (build_ptrmemfunc): Delete unused vars U and NINDEX.
10991 * typeck2.c (build_functional_cast): Delete unused var BINFO.
10993 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
10995 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
10996 things in a type being defined.
10997 * decl.c (finish_enum): Reverse the values so that they are in
11000 * pt.c (instantiate_class_template): Don't initialize
11001 BINFO_BASETYPES until the vector is filled out.
11002 (unify): Don't abort on conflicting bindings, just fail.
11003 (instantiate_decl): Do push_tinst_level before any tsubsting.
11005 * method.c (build_overload_value): Handle getting a
11006 TEMPLATE_CONST_PARM for a pointer.
11008 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
11010 * init.c (expand_member_init): Don't give 'not a base' error for
11013 * pt.c (instantiate_decl): Call import_export_decl later.
11015 * pt.c (instantiate_class_template): Return a value.
11017 * parse.y (extension): New rule for __extension__.
11018 (extdef, unary_expr, decl, component_decl): Use it.
11020 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
11022 * class.c (base_binfo): Remove unused base_has_virtual member.
11023 (finish_base_struct): Likewise.
11024 (finish_struct_1): Likewise.
11026 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
11028 * search.c (expand_upcast_fixups): Fix bogus code generation
11029 problem where the generated code uses the wrong index into the
11030 runtime built vtable on the stack. Old code could clobber random
11033 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
11035 * init.c (perform_member_init): Make sure the partial EH cleanups
11036 live on the function_obstack.
11038 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
11040 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
11041 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
11043 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
11045 * decl.c (grokvardecl): Avoid ANSI style initialization.
11047 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
11049 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
11051 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
11053 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
11055 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11057 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
11058 arguments we compare against. Start the count of I at 1, not 0,
11059 since argv[0] is still the command.
11061 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
11063 * lang-specs.h: Accept .cp as an C++ extension.
11065 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11067 * cp-tree.h (ptr_reasonably_similar): Add decl.
11069 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11071 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
11072 pointer. New local SPECBITS with the parm's value.
11073 (grokdeclarator): Pass &specbits down.
11075 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
11076 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
11078 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
11079 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
11081 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
11082 not an error_mark_node.
11084 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11086 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
11087 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
11089 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11091 * decl.c (grokdeclarator): When giving an anonymous struct a name,
11092 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
11095 * typeck2.c (build_m_component_ref): If component is a pointer
11096 to data member, resolve the OFFSET_REF now.
11098 * call.c (convert_like): Don't go into infinite recursion.
11100 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
11102 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
11103 * tree.c (layout_basetypes): And on the vbase ptr.
11105 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11107 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
11108 CHAR_TYPE_SIZE so bool is always the same size as another type.
11110 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
11112 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
11114 * decl2.c (grok_x_components): Remove synthesized methods from
11115 TYPE_METHODS of an anonymous union, complain about member
11117 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
11119 (finish_function): Just clear the DECL_RTL of our arguments.
11121 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11123 * decl2.c (finish_file): Emit DWARF debugging info for static data
11126 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
11128 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
11130 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
11133 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11135 * Make-lang.in (g++-cross$(exeext)): Fix typo.
11137 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11139 Make the g++ driver now be a standalone program, rather than one
11140 that tries to run the gcc driver after munging up the options.
11141 * Make-lang.in (g++.c, g++spec.o): New rules.
11142 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
11144 (g++$(exeext)): New rule, based on xgcc rule.
11145 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
11146 * g++spec.c: New file.
11147 * g++.c: Removed file.
11149 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
11151 * cvt.c (build_up_reference): Arrange for any temporary values
11152 that have been keep in registers until now to be put into memory.
11154 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11156 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
11157 that make -j3 bootstrap works better.
11159 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
11161 * decl.c (pushtag): Do pushdecl for anon tags.
11163 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
11165 * typeck.c (c_expand_return): Fix logic.
11166 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
11168 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
11170 * g++.c (main): Make sure arglist has a final NULL entry. Add
11171 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
11172 stdin/stdout of the invoked program are redirected to
11175 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11177 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
11179 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
11181 * init.c (resolve_offset_ref): Handle obj.vfn better.
11182 * typeck.c (build_component_ref): Set TREE_TYPE on result from
11185 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
11187 * typeck.c (convert_for_assignment): Also handle anachronistic
11188 implicit conversions from (::*)() to cv void*.
11189 * cvt.c (cp_convert_to_pointer): Likewise.
11191 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11193 * lex.c (handle_cp_pragma): Fix bogus warning.
11195 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
11197 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
11198 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
11200 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11202 * class.c (finish_struct_1): Support DWARF2_DEBUG.
11203 * search.c (dfs_debug_mark): Likewise.
11204 * decl2.c (finish_vtable_vardecl): Likewise.
11205 * decl.c (pushtag, finish_enum): Likewise.
11206 * lex.c (check_newline): Use debug_* instead of calling *out
11207 functions directly.
11209 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11211 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
11212 on some picky hosts.
11214 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11216 * class.c (finish_struct_1): A class has a non-trivial copy
11217 constructor if it has virtual functions.
11219 * cvt.c (cp_convert): Always call a constructor.
11221 * call.c (reference_binding): Still tack on a REF_BIND
11222 for bad conversions.
11223 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
11225 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
11226 (c_expand_return): Likewise.
11227 * typeck2.c (digest_init): Likewise for { }.
11228 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
11229 * cvt.c (cp_convert): Handle failure better.
11231 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11233 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
11234 of GCC be path-relative.
11236 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11238 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
11239 it does need choose-temp.o and pexecute.o.
11241 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11243 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
11244 that we still use it.
11245 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
11247 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11249 * init.c (expand_default_init): Avoid calling constructors to
11250 initialize reference temps.
11252 * cvt.c (convert_to_reference): Fix.
11254 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11256 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
11257 (convert_to_reference): Likewise.
11258 * typeck.c (convert_for_initialization): Likewise.
11259 * init.c (expand_default_init): Likewise.
11260 (expand_aggr_init_1): Likewise.
11261 * cp-tree.h (CONV_NONCONVERTING): Lose.
11262 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
11264 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
11266 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
11268 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
11270 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11272 * init.c (expand_aggr_init_1): Don't crash on non-constructor
11275 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11277 * g++.c: Include gansidecl.h.
11278 (VPROTO, PVPROTO, VA_START): Delete.
11279 (choose_temp_base_try, choose_temp_base, perror_exec,
11280 run_dos) [__MSDOS__]: Delete fns.
11281 (pfatal_with_name): Delete fn.
11282 (temp_filename): Declare like in gcc.c.
11283 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
11284 (error_count, signal_count): Define.
11285 (error): Delete both definitions.
11286 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
11287 (pfatal_pexecute): Add fn from gcc.c.
11288 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
11289 code to use the pexecute stuff also used by gcc.c.
11290 (MIN_FATAL_STATUS): Define.
11291 * Make-lang.in (g++): Add dependency on and linking with
11292 choose-temp.o and pexecute.o.
11294 * cp-tree.h: Include gansidecl.h.
11295 (STDIO_PROTO): Delete #undef/#define.
11296 * cvt.c (NULL): Delete #undef/#define.
11297 * expr.c (NULL): Likewise.
11298 * init.c (NULL): Likewise.
11299 * rtti.c (NULL): Likewise.
11300 * xref.c (NULL): Likewise.
11302 * cp-tree.h (build_user_type_conversion): Add prototype.
11303 * call.c (build_user_type_conversion): Delete prototype. Correct
11304 decl of FLAGS arg to be an int.
11305 * cvt.c (build_user_type_conversion): Likewise.
11307 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
11309 * cp-tree.def: Add TRY_BLOCK and HANDLER.
11310 * except.c (expand_start_catch_block): Support templates.
11311 * parse.y (try_block, handler_seq): Likewise.
11312 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
11314 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11316 * pt.c (current_template_args): New fn.
11317 (push_template_decl): Use it.
11318 * decl.c (grokdeclarator): Use it.
11320 * decl2.c (build_expr_from_tree): Dereference ref vars.
11322 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
11323 the decl-specifier-seq.
11325 * decl.c (grok_op_properties): Don't force the type of a conversion
11326 op to be complete. Don't warn about converting to the same type
11327 for template instantiations.
11329 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
11332 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
11334 * typeck.c (get_delta_difference): Remove previous bogusness.
11335 Don't give errors if force is set.
11337 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11339 * decl2.c (finish_file): Don't emit debug info.
11340 * decl.c (pushdecl): Lose obsolete code.
11341 (grokdeclarator): Still do the long long thing after complaining.
11342 * search.c (note_debug_info_needed): Don't do anything if we're in a
11344 * method.c (synthesize_method): For non-local classes,
11345 push_to_top_level first.
11347 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
11349 * typeck.c (get_delta_difference): Add no_error parameter.
11350 (build_ptrmemfunc): Call get_delta_difference with no_error set;
11351 we don't want error messages when converting unrelated
11352 pointer-to-member functions.
11354 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
11356 * error.c (dump_expr): Improve the wording on error messages that
11357 involve pointer to member functions.
11359 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
11361 * cvt.c (cp_convert_to_pointer): Move code for conversions from
11362 (::*)() to void* or (*)() up a bit, so that we can convert from
11363 METHOD_TYPEs as well.
11365 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11367 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
11368 There are no 'member' types.
11369 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
11370 (build_x_typeid): Handle errors.
11372 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
11374 * typeck.c (convert_for_assignment): Handle anachronistic implicit
11375 conversions from (::*)() to void* or (*)().
11376 * cvt.c (cp_convert_to_pointer): Likewise.
11377 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
11378 conversions from here.
11379 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
11380 * lang-options.h: Likewise.
11381 * decl2.c (warn_pmf2ptr): Define.
11382 * cp-tree.h: Declare it.
11383 * typeck2.c (digest_init): Allow pmfs down into
11384 convert_for_initialization.
11386 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11388 * typeck.c (c_expand_return): Fix for returning overloaded fn.
11390 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11392 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
11393 * decl.c (grok_reference_init): Pass DIRECT_BIND.
11394 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
11396 * call.c (convert_like): Don't pass INDIRECT_BIND.
11397 * typeck.c (convert_arguments): Likewise.
11398 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
11400 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
11402 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
11403 similar code in build_up_ref.
11404 * cvt.c (build_up_reference): Drastically simplify.
11406 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
11408 * typeck.c (signed_or_unsigned_type): If the given type already
11409 as the correct signedness, then just return it.
11411 * typeck.c ({un,}signed_type): If can't do anything, call
11412 signed_or_unsigned_type.
11414 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
11416 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
11417 current_class_type is NULL.
11419 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
11421 * class.c (finish_struct_1): Avoid empty structs by adding a field
11422 so layout_type gets the mode right.
11424 * typeck.c (c_expand_return): Drastically simplify.
11426 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
11428 * typeck.c (decay_conversion): Handle overloaded methods.
11430 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
11432 * call.c (build_over_call): A TARGET_EXPR has side-effects.
11434 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
11436 * cvt.c (convert_to_pointer_force): Add code to support pointer to
11437 member function to pointer to function conversions.
11438 * init.c (resolve_offset_ref): Add code to allow faked up objects,
11439 ignoring them if they are not used, and giving an error, if they
11441 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
11442 code, and so that we can give an error, if we needed an object,
11443 and one was not provided.
11444 (build_c_cast): Don't call default_conversion when we want to
11445 convert to pointer to function from a METHOD_TYPE.
11447 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11449 * Make-lang.in (cplib2.ready): Fix logic.
11451 * decl.c (shadow_tag): Only complain about non-artificial function
11454 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
11456 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
11458 * expr.c (cplus_expand_expr): Pre-tweak call_target like
11459 expand_inline_function would.
11461 * pt.c (mark_decl_instantiated): If extern_p, call
11462 mark_inline_for_output.
11464 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
11466 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
11469 * typeck.c (get_delta_difference): Fix wording, as we can be used
11470 for pointer to data members.
11472 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
11474 * pt.c (tsubst): If the function decl isn't a member of this
11475 template, return a copy of the decl (including copying the
11476 lang-specific part) so we don't hose ourselves later.
11478 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11480 * class.c (finish_struct): Remove DWARF-specific tag handling.
11481 * decl.c (pushtag): Likewise.
11482 (finish_function): Always clear DECL_ARGUMENTS on function decls with
11484 * decl2.c (finish_file): Emit DWARF debugging info for static data
11487 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
11489 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
11490 isn't the same as the new one before we whack it.
11492 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
11494 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
11495 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
11496 warn_traditional and warn_strict_prototypes; remove ancient
11497 'overload' code; remove references to flag_traditional.
11499 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
11501 * input.c (sub_getch): Handle 8-bit characters in string literals.
11503 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
11505 * tree.c (mapcar): Handle CONSTRUCTORs.
11506 (copy_to_permanent): Handle expression_obstack properly.
11508 * Make-lang.in (cplib2.txt): Also depend on the headers.
11510 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
11512 (expand_class_desc): Use USItype for offset field.
11513 * tinfo.h (struct __class_type_info): Likewise.
11515 * method.c (build_overload_int): TYPE_PRECISION should be applied
11518 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
11520 * call.c (build_new_op): A COND_EXPR involving void must be a
11523 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11525 * typeck.c (build_x_component_ref): New fn.
11526 (build_object_ref): Use it.
11527 * parse.y (primary): Use it.
11528 * decl2.c (build_expr_from_tree): Use it.
11529 * cp-tree.h: Declare it.
11531 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
11532 * error.c (dump_type_suffix): Handle variable arrays.
11534 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11536 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
11538 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11540 * decl.c (lookup_name_real): Don't try to look up anything in a
11543 * tinfo2.cc (__throw_type_match_rtti): Oops.
11545 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11547 * Make-lang.in (exception.o): Use -fno-PIC for now.
11549 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11551 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
11553 (get_tinfo_fn_dynamic): Extracted from build_typeid.
11554 * tinfo2.cc (__dynamic_cast): Adjust.
11556 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
11557 (build_x_typeid): Likewise.
11559 * parse.y: Call build_x_typeid instead of build_typeid.
11560 * cp-tree.def: Add TYPEID_EXPR.
11561 * pt.c (tsubst_copy): Handle typeid.
11562 * decl2.c (build_expr_from_tree): Likewise.
11563 * rtti.c (build_x_typeid): Throw bad_typeid from here.
11564 (build_typeid): Not here.
11565 * cp-tree.h: Declare build_x_typeid.
11567 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
11569 * call.c (convert_like): Pull out constant values.
11571 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
11573 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11575 * decl.c (init_decl_processing): Create short int types before
11576 creating size_t in case a machine description needs to use
11577 unsigned short for size_t.
11579 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11581 * Make-lang.in (exception.o): Turn off pic.
11583 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
11584 type, multi-level ptr conversions.
11586 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
11587 (throw_bad_cast): Use it.
11588 (throw_bad_typeid): New fn.
11589 (build_typeid): Throw bad_typeid as needed.
11591 (synthesize_tinfo_fn): Handle functions and arrays before checking
11594 * Remove .h from standard C++ headers, add new.h, move into inc
11597 * exception*: Remove pointer from object, constructors. Add
11598 default exception::what that uses type_info::name. Add
11599 __throw_bad_typeid.
11601 * init.c (build_new): Don't add a cookie to new (void *) T[2].
11603 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
11605 * Make-lang.in: Building C++ code depends on cc1plus.
11607 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11609 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
11610 a HOST_WIDE_INT, not a tree.
11612 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
11614 * exception.cc: Don't include <stdlib.h>.
11616 * Make-lang.in (c++.clean): Remove cplib2.*.
11618 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
11620 * parse.y (component_decl_1, component_costructor_declarator case):
11621 Pass attributes/prefix_attributes in tree list.
11623 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
11625 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
11627 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11629 * lex.c (do_identifier): Don't do deferred lookup in a template
11632 * typeck2.c (store_init_value): Oops.
11634 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
11635 New files for C++ lang-support library.
11636 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
11637 (CXX_LIB2FUNCS): Define.
11638 And rules for building the C++ lang-support code.
11639 * config-lang.in (headers): Define.
11640 (lib2funcs): Define.
11642 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11644 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
11646 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
11647 * typeck2.c (store_init_value): Check for initializing pmf with { }
11649 (process_init_constructor): Not here.
11651 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11653 * pt.c (begin_template_parm_list): Increment
11654 processing_template_decl here.
11655 (end_template_parm_list): Not here.
11656 (process_template_parm): No need to add 1 to it now.
11657 * *.c: Use processing_template_decl instead of current_template_parms
11658 to check for being in a template.
11660 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
11661 (tsubst_copy): Handle CONSTRUCTOR.
11662 (instantiate_decl): Set up context properly for variables.
11663 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
11664 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
11666 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11668 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
11670 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11672 * method.c (make_thunk): Call comdat_linkage before setting the
11675 * decl2.c (comdat_linkage): Use make_decl_one_only.
11676 (import_export_decl): Likewise.
11677 * decl.c (init_decl_processing): Check supports_one_only instead of
11680 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11682 * decl2.c (grokfield): Tighten checking for access decls.
11684 * decl.c (make_typename_type): Resolve references to
11685 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
11686 (lookup_name_real): Types that depend on a template parameter get
11687 an implicit 'typename' unless they're in the current scope.
11688 (start_decl_1): We don't care about incomplete types that depend
11689 on a template parm.
11690 (grokdeclarator): Resolve 'typename's in the type specifier that
11691 refer to members of the current scope.
11693 * call.c (build_over_call): Remove 'inline called before
11694 definition' diagnostic.
11695 (build_method_call): Likewise.
11696 * decl.c (duplicate_decls): Downgrade 'used before declared
11697 inline' to a warning, only with -Winline.
11699 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
11701 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
11703 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11705 * call.c (build_method_call): When calling a signature
11706 default implementation, as in other cases, let instance_ptr simply
11709 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
11711 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
11713 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
11715 * except.c (expand_start_catch_block): Add a pushlevel so that -g
11716 works on hppa and SPARC.
11718 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11720 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
11722 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11724 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
11725 before testing whether it's a signature.
11727 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11729 * call.c (build_new_method_call): Don't complain about signature
11730 pointers and references not being an aggr type.
11731 (build_this): If a signature pointer or reference was passed in,
11733 (build_new_method_call): If instance is a signature pointer, set
11734 basetype to the signature type of instance.
11735 * sig.c (build_signature_method_call): Deleted basetype and
11736 instance parameters, they can be found as the DECL_CONTEXT of
11737 function and as the first argument passed in.
11738 * cp-tree.h: Changed declaration of build_signature_method_call.
11739 * call.c (build_method_call): Deleted first two arguments in call
11740 of build_signature_method_call.
11741 (build_over_call): Added call to build_signature_method_call.
11743 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11745 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
11748 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11750 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
11752 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
11754 * except.c (expand_start_try_stmts): Move to except.c in the backend.
11755 (expand_end_try_stmts): Remove.
11757 * init.c (perform_member_init): Use add_partial_entry () instead
11758 of directly manipulating lists.
11759 (emit_base_init): Likewise.
11761 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
11763 * except.c (expand_exception_blocks): Always make sure USE and
11764 CLOBBER insns that came at the end still do, the backend relies
11767 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
11769 * call.c (build_over_call): We can only use a TARGET_EXPR of the
11772 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
11774 * cvt.c (convert_to_reference): Revert last change, don't complain
11775 about temp without target decl.
11777 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
11779 * decl.c (grokdeclarator): Don't core dump when void() is given.
11781 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
11783 * decl.c (copy_args_p): Don't crash.
11785 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
11787 * pt.c (tsubst): And support template args inside the exception
11790 * pt.c (tsubst): Add support for exception specifications in
11791 template functions.
11793 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
11795 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
11797 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
11798 (start_function): Likewise.
11799 (start_method): Likewise.
11800 (grokfield): Likewise.
11801 (make_call_declarator): Add throw spec parameter.
11802 (set_quals_and_spec): Add routine.
11803 * lex.c (set_quals_and_spec): Likewise.
11804 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
11805 * decl.c (shadow_tag): Eliminate the throw spec parameter to
11807 (groktypename): Likewise.
11808 (start_decl): Eliminate the throw spec parameter. Eliminate the
11809 throw spec parameter to grokdeclarator. Eliminate the throw spec
11810 field in DECL_STMT.
11811 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
11812 (grokfndecl): Remove useless set of raises.
11813 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
11814 the throw spec parameter to start_decl. Pull the throw spec out
11815 of the call declarator.
11816 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
11817 (start_function): Eliminate the throw spec parameter. Eliminate
11818 the throw spec parameter to grokdeclarator.
11819 (start_method): Likewise.
11820 * decl2.c (grokfield): Likewise.
11821 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
11822 (grokoptypename): Likewise.
11823 (finish_file): Eliminate the throw spec parameter to
11824 start_function. Add throw spec to make_call_declarator.
11825 * except.c (init_exception_processing): Add throw spec to
11826 make_call_declarator. Eliminate the throw spec parameter to
11828 (expand_start_catch_block): Eliminate the throw spec parameter to
11830 (expand_builtin_throw): Add throw spec to make_call_declarator.
11831 Eliminate the throw spec parameter to start_function.
11832 (start_anon_func): Likewise.
11833 * lex.c (make_call_declarator): Add throw spec parameter.
11834 (set_quals_and_spec): New routine.
11835 (cons_up_default_function): Add throw spec to make_call_declarator.
11836 Eliminate the throw spec parameter to grokfield.
11837 * method.c (synthesize_method): Eliminate the throw spec parameter
11839 * pt.c (process_template_parm): Eliminate the throw spec parameter
11841 (tsubst): Add throw spec to make_call_declarator.
11842 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
11843 (do_function_instantiation): Eliminate the throw spec parameter to
11844 grokdeclarator. Eliminate the throw spec parameter to
11846 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
11848 * parse.y (datadef): Remove non-winning optimization.
11850 (fndef): Remove ambiguous error productions uncovered by grammar
11852 (constructor_declarator): Add exception_specification_opt here.
11853 (component_constructor_declarator): Likewise.
11854 (direct_after_type_declarator): Likewise.
11855 (complex_direct_notype_declarator): Likewise.
11856 (direct_abstract_declarator): Likewise.
11857 (fn.def1): Remove exception_specification_opt.
11858 (fn.def2): Likewise.
11859 (condition): Likewise.
11860 (initdcl0): Likewise.
11861 (initdcl): Likewise.
11862 (notype_initdcl0): Likewise.
11863 (nomods_initdcl0): Likewise.
11864 (component_decl_1): Likewise.
11865 (component_declarator): Likewise.
11866 (after_type_component_declarator0): Likewise.
11867 (after_type_component_declarator): Likewise.
11868 (notype_component_declarator): Likewise.
11870 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11872 * call.c (build_over_call): Also use an INIT_EXPR when
11873 initializing anything from an rvalue.
11875 * call.c (build_over_call): Call stabilize_reference when building
11876 an INIT_EXPR instead of calling the copy ctor.
11878 * call.c (joust): Extend the previous change to all comparisons.
11880 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
11881 NO_LINKAGE_HEURISTICS.
11883 * decl2.c (finish_file): Emit any statics that weren't already.
11885 * typeck.c (build_static_cast): Implement.
11886 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
11887 * decl.c (grokparms): Use can_convert_arg instead of
11888 implicit_conversion directly.
11889 (copy_args_p): New fn.
11890 * cvt.c (convert_to_reference): Don't complain about temp with
11892 (build_up_reference): Handle TARGET_EXPRs.
11893 * call.c (build_over_call): Elide unnecessary temps.
11894 (can_convert*): Use new overloading code.
11896 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
11898 * call.c: Move TYPE_PTR*_MACROS ...
11899 * cp-tree.h: To here.
11900 * typeck.c (build_reinterpret_cast): Implement.
11902 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
11904 (joust): If we're comparing a function to a builtin and the worst
11905 conversion for the builtin is worse than the worst conversion for the
11906 function, take the function.
11908 * typeck.c (build_const_cast): Implement.
11909 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
11910 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
11912 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
11914 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
11915 too early. Make sure we explode if exprtype turns out to be a
11916 NULL_TREE when it shouldn't be.
11918 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
11920 * cp-tree.h: New routine make_call_declarator.
11921 * lex.c (make_call_declarator): Define it.
11922 * except.c (init_exception_processing): Use it.
11923 (expand_builtin_throw): Likewise.
11924 (start_anon_func): Likewise.
11925 * decl2.c (finish_file): Likewise.
11926 * lex.c (cons_up_default_function): Likewise.
11927 * parse.y: Likewise.
11928 * pt.c (tsubst): Likewise.
11930 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
11932 * decl2.c (groktypefield): Remove unused code.
11934 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
11936 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
11937 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
11938 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
11939 nonempty_cv_qualifiers.
11942 * lex.c (make_pointer_declarator): Change type_quals into
11944 (make_reference_declarator): Likewise.
11946 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11948 * decl.c (start_function): Only check interface_* for templates
11949 with flag_alt_external_templates.
11951 * call.c (build_new_op): Check for comparison of different enum types.
11952 (build_over_call): Fix arg # output.
11954 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
11956 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
11958 * call.c (build_new_op): Check for erroneous args.
11960 * call.c (build_new_method_call): Add missing args to cp_error.
11962 * tree.c (error_type): Don't print reference-to-array.
11964 * typeck.c (convert_for_assignment): Don't say contravariance for
11967 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11969 * call.c (build_over_call): Diagnose bad convs for `this'.
11971 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
11974 * call.c (convert_like): Handle bad convs.
11975 (build_over_call): Handle bad convs better.
11977 * decl2.c: -fansi-overloading is now the default.
11979 * call.c (build_new_method_call): Check for erroneous args.
11981 * pt.c (instantiate_class_template): Propagate
11982 TYPE_USES_MULTIPLE_INHERITANCE.
11984 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
11986 * call.c (enforce_access): Add static to routine.
11988 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11990 * call.c (build_user_type_conversion_1): Fix bad handling.
11991 (compare_ics): Likewise.
11993 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11995 * call.c (standard_conversion): Oops.
11997 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
11999 * g++.c: Update test for win32 (&& ! cygwin32).
12001 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12003 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
12004 (ptr_reasonably_similar): New fn.
12005 * call.c (BAD_RANK): New rank.
12006 (ICS_BAD_FLAG): New macro.
12007 (standard_conversion): Handle almost-right pointer conversions.
12008 (reference_binding): Handle bad rvalue bindings.
12009 (add_*_candidate): Stuff.
12010 (build_over_call): Pass bad conversions to convert_for_initialization.
12011 (compare_ics): Handle bad convs.
12014 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
12016 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
12017 integer_type_node when computing pointer offsets.
12019 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12021 * tree.c (lvalue_type): New fn.
12022 (error_type): New fn.
12023 * call.c (op_error): Use error_type.
12024 (add_conv_candidate): Use lvalue_type.
12025 (add_builtin_candidates): Likewise.
12026 * error.c (args_as_string): Use error_type.
12028 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12030 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
12031 (tsubst): Not here.
12033 * decl.c (init_decl_processing): With -ansi, __null's type is the
12034 signed integral type with the same number of bits as a pointer.
12035 Introduce a new variable null_node for it.
12036 * cp-tree.h: Adjust.
12037 * call.c (null_ptr_cst_p): Adjust.
12039 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
12041 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
12044 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12046 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
12047 fns of classes without virtual functions.
12049 * call.c (add_function_candidate): Handle `this' specially.
12050 (compare_ics): Likewise.
12052 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
12054 * typeck.c (build_conditional_expr): Fix handling of __null.
12056 * decl2.c (comdat_linkage): New fn.
12057 (import_export_vtable): Use it.
12058 (import_export_decl): Use it.
12059 * method.c (make_thunk): Use it.
12061 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12063 * pt.c (end_template_decl): If we don't actually have parms, return.
12064 * parse.y (template_header): Accept 'template <>'.
12066 * errfn.c: Allow 5 args.
12068 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12070 * tree.c (make_temp_vec): New fn.
12071 * pt.c (push_template_decl): Handle partial specs.
12072 (instantiate_class_template): Likewise.
12073 (more_specialized): Use get_bindings.
12074 (more_specialized_class): New fn.
12075 (get_class_bindings): New fn.
12076 (most_specialized_class): New fn.
12077 (do_function_instantiation): List candidates for ambiguous case.
12078 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
12079 (shadow_tag): Call push_template_decl for partial specializations.
12080 * parse.y: Likewise.
12081 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
12082 DECL_TEMPLATE_MEMBERS.
12083 * call.c (print_z_candidates): Reduce duplication.
12085 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12087 * decl2.c (lang_decode_option): Allow -fansi-overloading.
12089 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12091 * pt.c (get_bindings): New fn.
12092 (most_specialized): Likewise.
12093 (do_function_instantiation): Use them.
12094 (add_maybe_template): New fn.
12095 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
12096 * call.c (build_new_op): Handle guiding decls.
12097 (build_new_function_call): Likewise.
12098 * decl2.c (finish_file): Likewise.
12100 * decl2.c (mark_used): Do synthesis here.
12101 * call.c (build_method_call): Not here.
12102 (build_over_call): Or here.
12103 * typeck.c (build_function_call_real): Or here.
12104 * tree.c (bot_manip): Call mark_used on functions used in default
12107 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12109 * decl2.c (import_export_vtable): Delete code that disabled vtable
12110 heuristic on systems with ASM_OUTPUT_EXTERNAL.
12112 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12114 * typeck.c (build_x_function_call): Handle static call context
12117 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
12118 the function, not its outer block.
12120 * call.c (build_field_call): Pass fields on to build_opfncall
12121 regardless of TYPE_OVERLOADS_CALL_EXPR.
12122 (build_method_call): Pass on to build_new_method_call sooner.
12124 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
12126 * class.c (instantiate_type): Don't put a POINTER_TYPE to
12127 METHOD_TYPE on an expression. Also make a copy of rhs instead of
12130 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12132 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
12133 (add_builtin_candidate): Don't take enums for ++.
12134 (build_new_method_call): Handle non-aggregates and field calls.
12135 Move new overloading code from...
12138 * decl.c (grokparms): Don't check default args in templates.
12140 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
12142 * cvt.c (build_new_op): Fix args to build_unary_op.
12143 (add_builtin_candidates): Don't call type_promotes_to on float.
12145 * decl.c (grokparms): Check the type of the default arg.
12147 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
12148 returning NULL_TREE.
12150 * typeck.c (build_x_binary_op): Avoid doing extra work.
12151 (build_x_unary_op): Likewise.
12152 (build_x_conditional_expr): Likewise.
12153 * cvt.c (build_over_call): Return.
12154 (add_builtin_candidate): Fix MEMBER_REF.
12155 (build_new_op): Likewise.
12157 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
12159 * method.c (build_overload_name): Put bug fix into code but leave
12160 disabled for now so we can be bug compatible with older releases
12161 that do repeats incorrectly. In the future, we can enable it.
12163 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
12165 * cvt.c (convert_like): Don't call build_cplus_new twice.
12167 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
12168 Control new overloading code with -fansi-overloading.
12170 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12172 * cvt.c (build_over_call): Call build_cplus_new.
12173 * call.c (build_method_call): Likewise.
12174 * typeck.c (build_function_call_real): Likewise.
12175 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
12176 the COND_EXPR in a TARGET_EXPR so they use the same slot.
12178 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
12180 * typeck.c (complete_type): Propagate
12181 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
12183 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
12185 * cvt.c (joust): More ?: kludging. Sigh.
12186 (build_over_call): Don't try to synthesize global fns.
12188 * search.c (lookup_conversions): Use binfo marking.
12190 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
12192 * search.c (build_mi_matrix): Use the correct value of cid
12193 when determining the new mi_size.
12195 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
12197 * cvt.c (add_builtin_candidates): Do consider type conversion ops
12198 for the first parms of += et al.
12199 (strip_top_quals): New fn.
12200 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
12201 (implicit_conversion): Likewise.
12202 (add_builtin_candidates): Be careful about arrays.
12203 (build_new_method_call): Handle vtable optimization.
12205 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
12207 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
12208 * cvt.c (reference_binding): Use it.
12209 (implicit_conversion): Use it.
12210 (add_builtin_candidate, COND_EXPR): Use it.
12212 * cvt.c (build_new_function_call): Check for error args.
12214 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
12216 * gxx.gperf: Add __null.
12217 * hash.h: Regenerate.
12218 * lex.h: Add RID_NULL.
12219 * lex.c (init_lex): Create null_pointer_node here, stick it in
12221 * decl.c (init_decl_processing): Still set its type here.
12222 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
12223 (convert_to_pointer_force): Likewise.
12224 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
12226 * call.c (convert_harshness): Use null_ptr_cst_p.
12227 * typeck.c (convert_for_assignment): Likewise. Don't produce
12230 * error.c (args_as_string): Handle lists of actual args, too.
12231 * cvt.c (null_ptr_cst): Support (void*)0 for now.
12232 (build_user_type_conversion_1): Improve diagnostics.
12233 (build_new_function_call): Likewise.
12234 (build_object_call): Likewise.
12235 (build_new_method_call): Likewise. Move call before def diagnostic...
12236 (build_over_call): Here.
12238 * cvt.c (build_new_method_call): Don't complain about no match if
12239 LOOKUP_SPECULATIVELY.
12240 (build_over_call): Fix 'this' for virtual fn.
12241 (build_new_method_call): Add diagnostic.
12243 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12245 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
12246 constructors to be passed in.
12247 (build_over_call): Likewise.
12248 (build_user_type_conversion_1): Pass them in.
12249 (convert_like): Likewise.
12250 (build_object_call): Handle overloaded conversions.
12251 (build_over_call): Pass the right args to build_vfn_ref.
12252 (standard_conversion): Fix pmf convs.
12253 (joust): Handle comparing statics and non-statics.
12254 (build_new_method_call): New fn.
12255 * call.c (build_method_call): Call it if NEW_OVER.
12257 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
12259 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
12262 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
12264 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
12265 instead of just maybe_build_cleanup so that we deallocate the
12268 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12270 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
12271 * cp-tree.h (finish_prevtable_vardecl): Add decl.
12273 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
12275 * pt.c (instantiate_class_template): Call complete_type. Also, if
12276 we're at the end of the file and we just instantiated a template
12277 class with a vtable, call finish_prevtable_vardecl.
12279 * error.c (dump_decl): Don't explode (or explode more gracefully
12280 as appropriate) if the object being dumped has a null type.
12281 (dump_expr): Likewise.
12283 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
12284 by counting the number of nodes that we'll need before allocating
12286 (lookup_fnfields): Fix comment.
12287 (breadth_first_search): Fix comment.
12289 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
12291 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
12293 * class.c (finish_struct): Call cplus_decl_attributes here.
12294 (finish_struct_1): Not here.
12295 * cp-tree.h: Adjust.
12297 * pt.c (type_unification): New parameter STRICT.
12298 (unify): If STRICT, don't allow cv addition or base deduction.
12299 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
12301 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12303 * search.c (get_template_base{_recursive}): New fns.
12304 * pt.c (more_specialized): New fn.
12305 (do_function_instantiation): Use it.
12306 (unify): Handle base deduction.
12307 * cvt.c (joust): Use more_specialized.
12308 Don't arbitrarily choose between non-builtin candidates.
12309 (build_over_call): Call require_complete_type.
12311 * decl.c (start_function): Statics are static even in a #pragma
12314 * decl2.c (import_export_vtable): Disable vtable heuristic on
12315 systems with ASM_OUTPUT_EXTERNAL.
12317 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
12318 (standard_conversion): No std conv to enum type.
12320 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
12323 * cvt.c (reference_binding): Bind directly to a base subobject of
12326 * cvt.c (build_new_op): Enforce access control.
12328 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
12330 * typeck2.c (process_init_constructor): When scanning the
12331 union for a named field, skip things that aren't FIELD_DECLs.
12333 * method.c (synthesize_method): Don't scan fndecl's rtl if
12334 we're at the end of the file; just assume the function can't
12337 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12339 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
12342 * cvt.c (build_user_type_conversion_1): Handle overloaded
12345 * cvt.c (add_builtin_candidates): Don't consider type conversion
12346 operators for the first parameter of operator=.
12348 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
12350 * typeck.c (complete_type): Only call layout_type if we're not
12351 expanding a template.
12353 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
12355 * cvt.c (compare_ics): Oops.
12357 * cvt.c (op_error): Oops.
12359 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
12360 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
12361 (build_conv): Use them.
12362 (implicit_conversion): Use them.
12363 (convert_like): Handle them.
12364 (build_new_op): Handle builtin COND_EXPR again.
12365 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
12366 in lists of types for COND_EXPR.
12367 (add_builtin_candidate): Add enum candidates for COND_EXPR.
12369 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
12371 * typeck.c (build_modify_expr): Always attempt to build a call to
12372 the assignment operator, even if we're using a default one.
12373 (convert_for_initialization): Call complete_type.
12375 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12377 * cvt.c (reference_binding): A REF_BIND gets the reference type.
12378 (implicit_conversion): Likewise.
12379 (convert_like): Likewise.
12380 (compare_ics): Likewise.
12381 (compare_qual): Likewise.
12382 (print_z_candidates): Handle no candidates.
12383 (build_new_op): Don't handle builtin COND_EXPR for now.
12385 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
12387 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
12389 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12391 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
12393 * cvt.c (build_builtin_candidate): Oops.
12394 (build_new_op): Oops.
12396 * method.c (build_opfncall): Pass COND_EXPR on.
12397 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
12398 (add_builtin_candidate{,s}): Likewise.
12399 (add_builtin_candidates): Likewise.
12400 (print_z_candidates, op_error, build_new_op): Likewise.
12401 (type_decays_to): New fn.
12402 * lex.c (init_lex): Just say ?: for COND_EXPR.
12404 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12406 * typeck.c (complete_type): Call layout_type rather than building
12409 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
12410 only use ptrdiff_t.
12412 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12414 * cvt.c: Always compile the new overloading code (but don't use it).
12415 (implicit_conversion): Add a BASE_CONV when converting to
12416 the same class type.
12417 (convert_like): Handle BASE_CONV.
12419 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12421 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
12422 (add_builtin_candidate): Likewise.
12425 * typeck.c (build_x_function_call): Try an operator function
12426 whenever we call an object of class type.
12427 * method.c (build_opfncall): Pass CALL_EXPRs through.
12428 * cvt.c (implicit_conversion): Do const-ref case first.
12429 (add_conv_candidate, build_object_call, op_error): New fns.
12430 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
12431 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
12432 builtin candidates.
12433 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
12434 Fall back on preincrement handling. Use op_error.
12436 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
12437 an error_mark_node.
12438 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
12441 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
12443 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
12445 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
12447 * typeck.c (build_component_ref_1): Use build_component_ref
12448 instead of open coding it here.
12450 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12452 * g++.c (main): Don't link with -lg++.
12455 * cvt.c (convert_to_reference): Don't use convert_from_reference on
12456 result of build_type_conversion.
12457 (cp_convert): Only call build_method_call for ctors if
12458 build_type_conversion failed.
12459 (ptr_complete_ob): New function.
12460 (TYPE_PTR{,OB,MEM}_P): New macros.
12461 ({add,build}_builtin_candidate{,s}): New functions.
12462 (print_z_candidates): Handle builtins.
12463 (build_user_type_conversion_1): Don't use conversion fns for
12464 converting to a base type.
12465 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
12466 (build_user_type_conversion): Use convert_from_reference.
12467 (build_new_op): New function.
12468 (build_over_call): Fix handling of methods.
12469 (compare_ics): Handle AMBIG_CONV properly.
12470 * typeck2.c: Increment abort count.
12471 * method.c (build_opfncall): Forward most requests to build_new_op.
12472 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
12474 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12476 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
12477 invalid second argument to dump_expr_list.
12479 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
12481 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
12483 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
12485 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
12488 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
12490 * typeck2.c (process_init_constructor): New pedwarn for using { }
12491 to initialize a pointer to member function.
12492 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
12493 we can avoid the new error.
12495 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
12497 * typeck.c (build_ptrmemfunc1): New function to hide details of
12498 pointer to member functions better.
12500 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
12502 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
12503 methods into the actual method, as we know the implied object is
12506 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12508 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
12509 inside a system header.
12511 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
12513 * call.c (build_method_call): Call complete_type on the
12516 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
12518 * typeck.c (build_component_ref): Always build up an OFFSET_REF
12519 for obj_ptr->func so that we can know which object to use in a
12522 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
12524 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
12525 around things. Also improve maintainability.
12527 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
12529 * decl.c (grokdeclarator): Check for overflow when evaluating an
12532 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12534 * cvt.c (cp_convert): Don't check for ambiguity with constructor
12537 * typeck.c (build_x_function_call): Pass function overload
12538 questions to new overloading code if NEW_OVER.
12539 * init.c (expand_aggr_init_1): Only check for type conversion ops
12540 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
12541 Don't check for ambiguity with constructor if NEW_OVER.
12542 * cvt.c (convert_to_reference): Dereference the result of a type
12543 conversion operator.
12544 (build_conv): Propagate ICS_USER_FLAG.
12545 (implicit_conversion): Call instantiate_type.
12546 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
12547 (add_function_candidate): Fix cv-quals on argtype.
12548 (print_z_candidates): New function.
12549 (build_new_function_call): Call it.
12550 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
12551 consider non-converting constructors.
12552 Call print_z_candidates.
12553 Return an AMBIG_CONV for an ambiguous conversion.
12554 (build_user_type_conversion): Handle AMBIG_CONV.
12555 (convert_like): Fix test for building TARGET_EXPR.
12556 Call instantiate_type.
12557 Handle AMBIG_CONV and LVALUE_CONV.
12558 (build_over_call): Handle 0 args and ellipsis.
12559 * cp-tree.def: Add AMBIG_CONV.
12561 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
12563 * decl.c (lookup_name_real): If we find mem in obj when parsing
12564 `obj->mem', make sure we return the right value.
12566 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
12568 * search.c (get_base_distance): Call complete_type.
12570 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
12572 * decl.c (store_bindings): Make static.
12574 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12576 * init.c (expand_aggr_init_1): Don't check type conversions if
12579 * cvt.c (z_candidate): Put back template field.
12580 (add_function_candidate): Set it.
12581 (add_template_candidate): Likewise.
12583 (compare_qual): Handle references and pointers to members.
12584 (compare_ics): Handle reference bindings.
12586 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
12588 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
12590 * call.c (compute_conversion_costs): Call complete_type.
12592 * tree.c (vec_binfo_member): Use comptypes instead of comparing
12593 pointers, so we can handle template parameters.
12595 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
12597 * cvt.c (cp_convert_to_pointer): We have to call complete_type
12598 here; let's make it explicit instead of a side effect of an
12601 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12603 * cvt.c (z_candidate): Remove template field.
12604 (reference_binding): Handle binding to temporary.
12605 (implicit_conversion): Likewise.
12606 (add_function_candidate): Handle artificial constructor parms.
12607 Handle functions with too few parms.
12608 (add_template_candidate): New function.
12609 (build_user_type_conversion_1): Handle constructors.
12610 (convert_like): Likewise.
12611 (build_over_call): Likewise.
12612 (build_new_function_call): Support templates.
12613 (compare_ics): Fix reference, inheritance handling.
12615 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
12617 * decl.c: Add signed_size_zero_node.
12618 (init_decl_processing): Build it.
12619 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
12620 when we're trying to make a negative delta.
12622 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12624 Stop doing this damn index==strchr variable name confusion.
12625 * class.c (add_virtual_function): Change local var INDEX to be
12627 (add_method): Likewise.
12628 * lex.c (print_parse_statistics): Likewise.
12629 * search.c (make_memoized_table_entry): Likewise.
12630 (lookup_fnfields_here): Likewise.
12631 (lookup_field): Likewise.
12632 (lookup_fnfields): Likewise.
12633 (get_baselinks): Likewise.
12634 * sig.c (build_signature_table_constructor): Likewise.
12635 (build_signature_method_call): Likewise.
12636 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
12637 (get_member_function_from_ptrfunc): Likewise.
12638 (build_ptrmemfunc): Change local var INDEX to be IDX.
12639 (c_expand_start_case): Likewise.
12641 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12643 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
12644 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
12645 (convert_to_reference): Use build_type_conversion to convert to
12646 the reference type directly.
12647 (standard_conversion): Fix void* case, non-conversions.
12648 (reference_binding): Fix expr == 0 case, non-conversions.
12649 (convert_like): Support REF_BIND.
12650 (compare_qual): Split out from compare_ics.
12651 (compare_ics): Use it, handle icses with only a qual_conv.
12653 * init.c (expand_vec_init): Don't crash if decl is NULL.
12655 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
12657 * mpw-config.in: New file, configury for Mac MPW.
12658 * mpw-make.sed: New file, makefile editing for MPW.
12660 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12662 * pt.c (instantiate_class_template): Call repo_template_used.
12664 * search.c (lookup_conversions): Only lookup conversions in
12667 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12669 * cp-tree.def: Renamed from tree.def, to avoid confusion with
12671 * cp-tree.h, lex.c: Include cp-tree.def.
12672 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
12674 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
12676 * init.c (build_vec_delete_1): Call complete_type.
12678 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
12680 * except.c (start_anon_func): Make sure anonymous functions are
12683 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12685 * decl.c (finish_function): If function_depth > 1, set nested.
12687 * decl2.c (grokbitfield): Revert Bob's change.
12688 * class.c (finish_struct_1): Fix handling of named bitfield widths.
12690 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
12692 * pt.c (add_pending_template): Handle types.
12693 (lookup_template_class): With -fexternal-templates, just add the class
12694 to pending_templates instead of instantiating it now.
12695 * decl2.c (finish_file): Handle types in pending_templates.
12697 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
12699 * decl2.c (grokbitfield): Handle constant decls appropriately.
12700 Give an appropriate error message now instead of spewing core
12703 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12705 * decl2.c: Don't turn on thunks by default for now.
12707 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
12709 * typeck.c (complete_type): Handle error_mark_node.
12710 (common_type, OFFSET_TYPE): Handle template_type_parms.
12712 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12714 * pt.c (instantiate_decl): If at_eof, call import_export_decl
12715 regardless of DECL_INLINE.
12717 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
12719 * class.c (finish_struct_bits): Copy TYPE_SIZE.
12721 * rtti.c (build_dynamic_cast): Support templates.
12722 * tree.def: Support DYNAMIC_CAST_EXPR.
12723 * pt.c (tsubst_copy): Likewise.
12724 * decl2.c (build_expr_from_tree): Likewise.
12726 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12728 * typeck.c (build_static_cast): Support templates.
12729 (build_const_cast): Likewise.
12730 * tree.def: Support CONST/STATIC_CAST_EXPR.
12731 * pt.c (tsubst_copy): Likewise.
12732 * decl2.c (build_expr_from_tree): Likewise.
12734 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12736 * decl2.c (finish_vtable_vardecl): Don't trust
12737 TREE_SYMBOL_REFERENCED for vtables of local classes.
12739 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12741 * pt.c (tsubst_copy): Handle operator T.
12743 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12745 * init.c (build_delete): Move creation of PARMS inside test of
12746 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
12748 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
12750 * typeck.c (build_conditional_expr): Don't assume that
12751 the arguments to ?: are always pointers or records.
12753 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12755 * decl2.c (import_export_decl): Still emit static/weak/comdat
12756 copies of inline template functions with -fno-implicit-templates.
12758 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
12760 * init.c (build_delete): Determine the complete basetype
12761 path to the destructor we're calling.
12763 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
12765 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
12766 initialize the enum, because we really and truly don't know where
12768 (start_enum): Don't copy integer_zero_node because
12769 build_enumerator will do it.
12771 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12773 * decl.c (finish_function): Do access control on base destructors.
12775 * pt.c (tsubst, case FUNCTION_DECL): Set up
12776 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
12779 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
12781 * cvt.c (build_up_reference): If we have already extended the
12782 lifetime of the temporary, don't try it again.
12783 * typeck.c (c_expand_return): Don't try and convert the return
12784 value twice when we want a reference, once is enough.
12786 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
12788 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
12789 LOOKUP_ONLYCONVERTING at all for now.
12791 * search.c (add_conversions): Put the conversion function in
12792 TREE_VALUE, the basetype in TREE_PURPOSE.
12793 * cvt.c (build_type_conversion): Adjust.
12794 * cvt.c (build_expr_type_conversion): Adjust.
12795 * call.c (user_harshness): Adjust.
12797 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
12799 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
12802 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
12804 * except.c (expand_start_catch_block): Add a dummy region, if we
12805 get an error, so that we can avoid core dumping later.
12807 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
12809 * cp-tree.h (OFFSET_REF): Remove.
12810 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
12811 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
12812 * init.c (expand_aggr_init_1): Likewise.
12813 (build_new): Likewise.
12814 * typeck.c (expand_target_expr): Likewise.
12816 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12818 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
12821 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
12823 * cvt.c (build_up_reference): Redo how and when temporaries are
12825 * decl.c (grok_reference_init): Don't try and be smart about
12828 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
12830 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
12831 (TARGET_EXPR...), now that it has 4 arguments.
12832 * tree.c (build_cplus_new): Likewise.
12834 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12836 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
12838 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
12839 * decl.c (struct saved_scope): Remove named_labels,
12840 {base,member}_init_list.
12841 (maybe_push_to_top_level): Don't set them. Call
12842 push_cp_function_context if appropriate.
12843 (pop_from_top_level): Likewise.
12845 * method.c (do_build_assign_ref): Remove obsolete check of
12846 TYPE_HAS_ASSIGN_REF (basetype).
12848 * decl.c (grokfndecl): Diagnose user definition of
12849 implicitly-declared methods.
12851 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
12853 * method.c (do_build_copy_constructor): Add code to give
12854 meaningful error messages instead of crashing.
12855 (do_build_assign_ref): Don't synthesize assignment operators for
12856 classes containing reference or const members.
12858 * class.c (struct base_info): Remove cant_synth_copy_ctor
12859 and cant_synth_asn_ref.
12860 (finish_base_struct): Remove the code that tries to conditionalize
12861 synthesis of copy constructors & assignment operators based on
12862 access permissions. Instead, let it fail when it tries to
12863 synthesize the copy constructor. This will give meaningful error
12864 messages instead of silently generating code to perform a bitcopy.
12866 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
12868 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
12869 determining types for constant values.
12871 * decl.c (struct named_label_list): Use instead of stuffing
12872 random items into a TREE_LIST node.
12873 (named_label_uses): Use the new struct.
12874 (poplevel): Likewise.
12875 (lookup_label): Likewise.
12876 (define_label): Add an error message to tell the user the line
12877 where the goto is located in addition to the destination of the
12879 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
12881 (finish_function): Likewise.
12883 (start_decl): Complain about defining a static data member
12884 in a different type from which it was declared.
12886 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12888 * cvt.c (build_expr_type_conversion): Adjust.
12890 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12892 * call.c (build_method_call): Always convert 'this' to the
12895 * search.c (add_conversions): Put the conversion function in
12896 TREE_VALUE, the type in TREE_PURPOSE.
12897 * cvt.c (build_type_conversion): Adjust.
12898 * call.c (user_harshness): Adjust.
12900 * method.c (emit_thunk): Call temporary_allocation and
12901 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
12903 * tree.c (build_cplus_array_type): Handle tweaking of
12904 TYPE_MAIN_VARIANT here.
12905 * typeck.c (common_type): Not here.
12907 * typeck.c (complete_type): Only try to complete an array type if
12910 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
12912 * decl.c (grokvardecl): Call complete_type.
12913 (grokdeclarator): Call complete_type for PARM_DECLs.
12915 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12917 * pt.c (instantiate_class_template): Re-set
12918 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
12920 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
12922 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
12923 smart enough to do it right.
12924 * tree.c (cp_expand_decl_cleanup): Likewise.
12925 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
12926 cp_expand_decl_cleanup.
12927 (store_parm_decls): Likewise.
12928 (hack_incomplete_structures): Likewise.
12929 * except.c (push_eh_cleanup): Likewise.
12931 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
12933 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
12934 frontend to the backend where it belongs.
12935 * tree.c (unsave_expr): Likewise.
12936 (unsave_expr_now): Likewise.
12937 * tree.def (UNSAVE_EXPR): Likewise.
12938 * cp-tree.h (unsave_expr): Likewise.
12939 (unsave_expr_now): Likewise.
12941 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
12943 * init.c (emit_base_init): Make sure the partial EH cleanups live
12944 on the function_obstack.
12946 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
12948 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
12949 when checking for pointer types.
12951 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12953 * pt.c (instantiate_class_template): Remove obsolete check for
12954 access declarations.
12956 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
12958 * call.c (build_overload_call): Simplify calls to
12959 build_overload_call by removing last parameter.
12960 (build_method_call): Likewise.
12961 * cp-tree.h: Likewise.
12962 * method.c (build_opfncall): Likewise.
12963 * typeck.c (build_x_function_call): Likewise.
12965 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
12967 * call.c (default_parm_conversions): Factor out common code.
12968 (build_method_call): Use it.
12969 (build_overload_call_real): Use it.
12971 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
12973 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
12974 but pedwarn as the code is bogus.
12975 * typeck.c (decay_conversion): Likewise.
12976 (build_function_call_real): Use build_addr_func instead of
12977 default_conversion. Don't allow pointer-to-method functions down
12979 (build_unary_op): Use real pointer-to-member functions instead of
12981 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
12982 (convert_for_assignment): Removed some obsolete code.
12983 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
12984 build_x_function_call instead of current_class_ptr. Only call
12985 digest_init once on an initializer, we do this just checking
12987 (build_expr_from_tree): Pass current_class_ref to
12988 build_x_function_call instead of current_class_ptr.
12989 * init.c (build_member_call): Likewise.
12990 * pase.y: Likewise.
12991 * error.c (dump_expr): Handle OFFSET_REFs better.
12992 * pt.c (unify): Handle pointer-to-member functions better.
12993 * decl.c (finish_function): Clear out current_class_ref just like
12994 we do for current_class_ptr.
12996 * typeck.c (get_delta_difference): Handle virtual bases better.
12998 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13000 * sig.c (build_signature_table_constructor): Use the delta for
13001 the original basetype for this virtual function with thunks.
13002 (build_signature_method_call): We still need to adjust 'this'
13005 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
13007 * call.c (build_addr_func): New routine. Used to get the `real'
13008 address of a function or a method. Needed to avoid getting a
13009 pointer-to-member function.
13010 (build_call): New routine to build CALL_EXPRs.
13011 (build_method_call): Use it.
13012 * cvt.c (convert_to_aggr): Likewise.
13013 * typeck.c (build_function_call_real): Likewise.
13014 * sig.c (build_signature_table_constructor): Use build_addr_func.
13015 * cp-tree.h (build_call, build_addr_func): Declare them.
13017 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
13019 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
13020 * parse.y: Remove uses of LOOKUP_AGGR.
13022 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
13024 * *.[chy]: Rename current_class_decl to current_class_ptr, and
13025 C_C_D to current_class_ref.
13027 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13029 * call.c (convert_harshness): Tighten up pointer conversions.
13031 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
13033 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
13034 (finish_file): Likewise.
13036 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13038 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
13040 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
13043 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13045 * decl2.c: Turn on thunks by default where supported.
13047 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
13049 * cp-tree.h (build_overload_call_maybe): Removed.
13050 * call.c (build_overload_call_real): Invert meaning of last arg to
13051 be require_complete.
13052 (build_overload_call): Likewise.
13053 * typeck.c (build_x_function_call): Use build_overload_call_real
13054 instead of build_overload_call_maybe.
13056 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13058 * decl2.c (finish_file): Don't try to emit functions that haven't
13061 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13063 * decl2.c (finish_vtable_vardecl): Oops.
13065 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
13066 Also store the bindings from previous_class_values.
13067 (pop_from_top_level): Restore them.
13069 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13071 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
13072 symbol has been referenced.
13073 (finish_file): Re-join synthesis/vtable loop with inline emission
13074 loop, disable inlining when an inline is output.
13076 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
13078 * except.c (init_exception_processing): Setup saved_in_catch.
13079 (push_eh_cleanup): Reset __eh_in_catch.
13080 (expand_start_catch_block): Set __eh_in_catch.
13082 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
13084 * except.c (push_eh_cleanup): Add tracking for whether or not we
13085 have an active exception object.
13086 (expand_builtin_throw): Use it to make sure a rethrow without an
13087 exception object is caught.
13089 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13091 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
13094 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13096 * decl2.c (finish_file): Also use sentries for vars with
13097 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
13100 * lex.c (handle_cp_pragma): Disable #pragma
13101 interface/implementation if SUPPORTS_ONE_ONLY > 1.
13103 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
13105 * method.c (emit_thunk): Wrap default case in
13106 temporary/permanent_allocation.
13108 * method.c (make_thunk): Use DECL_ONE_ONLY.
13109 (emit_thunk): Call assemble_end_function.
13111 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13113 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
13114 (import_export_decl): Likewise.
13115 (finish_prevtable_vardecl): Disable vtable hack if
13116 SUPPORTS_ONE_ONLY > 1.
13118 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
13120 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
13121 PREDECREMENT_EXPRs take two arguments, not one.
13123 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
13125 * class.c (build_vtable_entry): Don't build thunks for abstract
13128 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
13131 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13133 * class.c (set_rtti_entry): Use size_zero_node.
13134 (build_vtable): Likewise.
13136 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
13138 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
13139 (prepare_fresh_vtable): Likewise.
13141 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
13143 * method.c (emit_thunk): Call mark_used on the target function.
13145 * call.c (build_method_call): Don't warn about pending templates.
13147 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13149 * decl2.c (finish_file): Fix list walking logic.
13151 * typeck2.c (check_for_new_type): Only warn if -pedantic.
13153 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
13155 * class.c (finish_struct_1): Remove old code for
13156 dont_allow_type_definitions.
13157 * cp-tree.h: Likewise.
13158 * spew.c: Make sure cp-tree.h is included before parse.h, so the
13159 definition of flagged_type_tree is found before it is used.
13161 * parse.y: Added the ftype member to the type union, and changed a
13162 number of rules to use it instead of ttype. Added calls to
13163 check_for_new_type() as appropriate.
13164 * typeck2.c (check_for_new_type): New function for checking
13165 if a newly defined type appears in the specified tree.
13166 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
13167 for check_for_new_type().
13169 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
13171 * decl2.c (finish_file): Only use a sentry if the decl is public.
13173 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
13174 don't pass LOOKUP_ONLYCONVERTING.
13176 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
13178 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
13179 properly keeps track of const and volatile type modifiers.
13181 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
13183 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
13184 * pt.c (comp_template_args): Use it.
13186 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
13187 assemble_external for artificial function decls.
13189 * decl.c (cp_finish_decl): Oops.
13191 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
13193 * decl2.c (import_export_decl): Put static data member templates
13194 into common storage, or make them weak, depending on whether they
13195 are dynamically or statically initialized.
13196 (get_sentry): New function.
13197 (finish_file): Do import_export_decl for static data members before
13198 building the init/fini functions. Don't init/fini a variable that's
13199 EXTERNAL. Use a sentry for variables in common. Fix mismatching
13200 push/pop_temp_slots.
13201 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
13202 expand_static_init thang.
13203 * method.c (get_id_2): New function.
13205 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
13207 * parse.y (empty_parms): Make sure we use C++-style prototypes
13208 when we're declaring member functions.
13210 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13212 * Makefile.in (CONFLICTS): 16 s/r conflicts.
13213 * parse.y (self_template_type): New nonterminal.
13215 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13217 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
13219 * parse.y (base_class.1): Allow 'typename foo::bar'.
13221 * lex.c (check_newline): Remove #pragma code that plays with the
13222 input stream, since we now deal with tokens. Clear nextchar when
13224 (handle_cp_pragma): Use real_yylex.
13225 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
13228 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
13230 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
13232 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13234 * parse.y: New token SELFNAME for potential constructor.
13235 * spew.c (yylex): Handle it.
13236 * lex.c (identifier_type): Produce it.
13238 * parse.y (complete_type_name): In :: case, don't push class binding.
13239 (complex_type_name): Likewise.
13241 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
13243 * typeck.c (build_reinterpret_cast): Handle pointer to member
13246 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13248 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
13250 (check_newline): Put the vtable/unit/implementation/interface pragma
13251 code into handle_cp_pragma, replacing it with a call.
13252 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
13253 args. Get the next token after handling the pragma token.
13255 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
13257 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
13258 (convert_to_pointer_force): Likewise.
13260 * init.c (build_new): Fix array new without -fcheck-new.
13262 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
13264 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
13265 tree.c: Lose TYPE_NESTED_NAME.
13267 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
13270 * tree.def: Add VEC_INIT_EXPR.
13271 * expr.c (cplus_expand_expr): Handle it.
13272 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
13273 the extra file-scope symbol nastiness.
13275 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13277 * method.c (make_thunk): Thunks are static.
13278 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
13280 * decl2.c (mark_vtable_entries): Emit thunks as needed.
13281 (finish_file): Don't emit them here.
13283 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13285 * rtti.c (build_dynamic_cast): Handle null pointers.
13286 (ifnonnull): New function.
13288 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
13290 * call.c (build_method_call): Remember the original basetype we
13291 were called with. Give an error message instead of trying
13292 (incorrectly) to call a non-static member function through a
13293 non-inherited class.
13295 * search.c (expand_upcast_fixups): Mark the new fixup as
13298 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13300 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
13302 * class.c (set_rtti_entry): Fix for thunks.
13304 * decl2.c (import_export_decl): Still emit typeinfo fns for
13305 cv-variants of builtin types.
13307 * rtti.c (expand_class_desc): Set up base_info_type_node here.
13308 (init_rtti_processing): Instead of here.
13310 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
13312 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
13313 (build_typeid): Only complain about taking dynamic typeid without
13316 * decl2.c: flag_rtti defaults to 1.
13318 * rtti.c (get_tinfo_var): The general class case is now smaller.
13319 (init_rtti_processing): Pack the latter three fields of base_info
13322 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
13324 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
13326 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
13328 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
13329 (push_memoized_context): Split out code to undefer pop_type_level to
13330 (clear_memoized_cache): here.
13331 (pop_memoized_context): We can only handle one layer of deferral of
13332 pop_type_level so clear the cache, if there was a previous level.
13334 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13336 * rtti.c (init_rtti_processing): Build up base_info_type_node.
13337 (expand_class_desc): Use one pointer to an array of base_info
13338 structs, passed using a CONSTRUCTOR.
13340 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
13342 * class.c (build_vbase_path): Remove block extern for
13343 flag_assume_nonnull_objects here.
13344 (build_vfn_ref): Split out functionality into build_vtbl_ref.
13345 (build_vtbl_ref): New routine.
13346 (build_vtable): Set up rtti info here.
13347 (add_virtual_function): Note in CLASSTYPE_RTTI the best
13348 place where we can get the rtti pointers from to avoid having to
13349 search around for a place.
13350 (finish_base_struct): Likewise.
13351 (finish_struct_1): Likewise. Never create totally new vtables
13352 with totally new vtable pointers for rtti. Disable code to layout
13353 vtable pointers better until we want to break binary
13355 * rtti.c (build_headof_sub): New routine to convert down to a
13356 sub-object that has an rtti pointer in the vtable.
13357 (build_headof): Use it. Also, use build_vtbl_ref now to be more
13359 (build_dynamic_cast): Make sure we have saved it, if we need to.
13360 * search.c (dfs_init_vbase_pointers): Disable code that deals with
13361 a more efficient vtable layout, enable later.
13362 * call.c (flag_assume_nonnull_objects): Moved declaration to
13363 * cp-tree.h: here. Declare build_vtbl_ref.
13364 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
13365 function calls that want a tree.
13367 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13369 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
13370 other X subobjects in the most derived type. Ack.
13372 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
13373 get_typeid will do it for us.
13374 (get_typeid_1): Break out call-building for expand_*_desc to use.
13375 (get_typeid): Call it.
13376 (expand_*_desc): Likewise.
13377 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
13379 (init_decl_processing): Lose builtin_type_tdescs lossage.
13380 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
13382 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
13384 * pt.c (tsubst): When calling set_nested_typename, use
13385 TYPE_NESTED_NAME (current_class_type) instead of
13386 current_class_name.
13388 * decl.c (pushdecl): Likewise.
13389 (pushdecl_class_level): Likewise.
13390 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
13391 set_nested_typename.
13393 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
13395 * rtti.c (synthesize_tinfo_fn): Handle arrays.
13397 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
13399 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
13401 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
13402 (init_rtti_processing): Lose bad_cast_type.
13403 (build_dynamic_cast): Use throw_bad_cast.
13405 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
13407 * decl2.c (finish_file): Don't synthesize artificial functions
13408 that are external and not inline.
13410 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
13412 * decl2.c (finish_file): Handle having new inlines added to
13413 saved_inlines by synthesis.
13415 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
13417 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13419 RTTI rewrite to initialize nodes as needed, not require that
13420 users #include <typeinfo>, complete functionality and reduce wasted
13422 * rtti.c (init_rtti_processing): New fn.
13423 (build_typeid): The vtable entry is now a function.
13424 (get_tinfo_var): New fn.
13425 (get_tinfo_fn): Likewise.
13426 (get_typeid): Use it.
13427 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
13428 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
13430 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
13431 (synthesize_tinfo_fn): New fn.
13432 * method.c (build_t_desc_overload): Lose.
13433 (build_overload_with_type): More generic.
13434 * decl.c (init_decl_processing): Call init_rtti_processing.
13435 * class.c (set_rtti_entry): Use get_tinfo_fn.
13436 * decl2.c (mark_vtable_entries): Mark the rtti function.
13437 (finish_prevtable_vardecl): Don't build_t_desc.
13438 (import_export_decl): Handle tinfo functions.
13439 (finish_file): Likewise.
13440 * typeck.c (inline_conversion): New fn.
13441 (build_function_call_real): Use it.
13442 * cp-tree.h: Add decls.
13444 * method.c (hack_identifier): Also convert component_refs from
13447 * lex.c (cons_up_default_function): Use the type, not the name, in
13450 * decl2.c (import_export_vtable): Fix weak vtables.
13452 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
13454 * search.c (get_base_distance_recursive): Fix access checks for
13457 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13459 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
13461 (convert_harshness): Add prototypes wrapped by PROTO.
13462 * decl2.c (grok_function_init): Likewise.
13463 (do_toplevel_using_decl): Change to void return type.
13464 * class.c (build_vtable_entry): Remove decl of make_thunk.
13465 (merge_overrides): Fix order of arg definitions.
13466 (finish_vtbls): Likewise.
13467 (fixup_vtable_deltas): Likewise.
13468 (modify_all_direct_vtables): Likewise.
13469 (modify_all_indirect_vtables): Likewise.
13470 * search.c (get_base_distance_recursive): Likewise.
13471 (get_abstract_virtuals_1): Likewise.
13472 (fixup_virtual_upcast_offsets): Likewise.
13473 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
13474 * init.c (perform_member_init): Fix order of arg definitions.
13475 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
13476 * cp-tree.h (make_thunk): Add decl.
13477 (overload_template_name, push_template_decl): Add decls.
13478 (do_toplevel_using_decl): Change to void return type.
13479 (vec_binfo_member): Add decl.
13481 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13483 * typeck.c (mark_addressable, convert_for_assignment,
13484 convert_for_initialization, pointer_int_sum, pointer_diff,
13485 unary_complex_lvalue): Add prototypes wrapped by PROTO.
13486 (convert_sequence): #if 0 fn decl, since definition also is.
13488 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
13490 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
13491 cast to pointer types for type searching.
13493 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13495 * typeck.c (get_delta_difference): Use cp_error, not error, in the
13496 case where BINFO == 0.
13498 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
13500 * call.c (build_method_call): Fix wording of error messages so
13501 constructors come out right.
13503 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
13505 * decl.c (push_overloaded_decl): Don't warn about hidden
13506 constructors when both the type and the function are declared
13507 in a system header file.
13509 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
13511 * class.c (finish_struct_1): Propagate the TYPE_PACKED
13512 flag for the type to the type's fields.
13514 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13516 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
13518 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
13520 * class.c (base_info, finish_base_struct): Replace
13521 needs_virtual_dtor with base_has_virtual.
13523 (finish_struct_1): Remove the old code that tried to make default
13524 destructors virtual. Use base_has_virtual when checking if we need
13525 to add a vtable entry for the rtti code.
13527 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13529 * pt.c (push_template_decl): Complain about template decl with
13530 inappropriate declaration.
13532 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
13534 * typeck.c (build_x_unary_op): Remove bogus check for taking
13535 the address of a member function.
13537 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13539 * parse.y (constructor_declarator): Only push the class if
13540 we are not already in the class.
13542 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
13544 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
13545 Add additional argument to INIT_CUMULATIVE_ARGS.
13547 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13549 * decl.c (shadow_tag): Fix error about anon union with methods.
13551 * parse.y (self_reference): Only generate a self-reference if this
13552 is a non-template class.
13553 (opt.component_decl_list): Only use it if it was generated.
13555 * parse.y (component_decl_1): Use constructor_declarator.
13556 (fn.def2): Likewise.
13557 (notype_component_declarator0): Likewise.
13559 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
13561 * typeck.c (build_x_unary_op): Add checks for taking the address
13562 of a TARGET_EXPR or of a member function, and give appropriate
13565 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13567 * pt.c (process_template_parm): Allow template type parms to be
13568 used as types for template const parms.
13570 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
13572 * init.c (expand_vec_init): Ensure the eh cleanups are on the
13575 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13577 * decl.c (lookup_name_real): Be even more picky about the
13578 ambiguous lookup warning.
13579 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
13580 * parse.y (constructor_declarator): Rather than here.
13582 * parse.y (constructor_declarator): New nonterminal.
13584 (explicit_instantiation): Likewise.
13586 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13588 Add implicit declaration of class name at class scope.
13589 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
13590 * parse.y (self_reference): New nonterminal.
13591 (opt.component_decl_list): Use it.
13592 (fn.def1): Add nested_name_specifier type_name cases.
13593 * class.c (build_self_reference): New function.
13594 (finish_struct): Handle access_default later, move self-reference
13596 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
13597 * cp-tree.h: Adjust.
13599 * pt.c (do_function_instantiation): Separate handling of member
13600 functions and non-member functions properly.
13602 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13604 * pt.c (process_template_parm): Improve error for 'volatile class K'.
13606 * class.c (finish_struct_1): Check the right slot for destructors.
13608 * decl.c (start_enum): Complain about enum templates.
13610 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
13612 * init.c (resolve_offset_ref): Offset pointers to member data by one.
13613 * typeck.c (unary_complex_lvalue): Likewise.
13615 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
13617 * typeck.c (c_expand_return): Check for a returned local
13618 array name, similar to the check for an ADDR_EXPR.
13620 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13622 * decl.c (cp_finish_decl): Don't build cleanups for static
13625 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
13627 * typeck.c (build_modify_expr): Fix error messages to be more
13629 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
13630 assignment operators.
13631 * error.c (assop_as_string): Likewise. Add support for `%Q' for
13632 assignment operators.
13634 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
13636 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
13637 give an error if initialized. pedwarn about nested type with the
13638 same name as its enclosing class.
13640 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
13642 * typeck.c (require_complete_type): Be sure to instantiate the
13643 MAIN_VARIANT of the type.
13645 * decl2.c (finish_file): Instantiate pending templates before
13646 processing static constructors and destructors.
13648 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
13651 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
13653 * decl2.c (delete_sanity): If error_mark_node is passed
13654 in as an expression, quit while we're ahead.
13656 * decl.c (grokdeclarator): Give an error message if `friend'
13657 is combined with any storage class specifiers.
13659 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
13661 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
13662 definition of nonexistent nested type.
13664 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
13665 not to say 'typedef'.
13667 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13669 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
13670 * search.c (dfs_walk, dfs_init_vbase_pointers,
13671 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
13672 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
13674 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
13676 * except.c (build_throw): Support minimal parse.
13677 * pt.c (tsubst_copy): Support THROW_EXPR.
13678 * decl2.c (build_expr_from_tree): Likewise.
13680 * pt.c (mangle_class_name_for_template): Always allocate
13683 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
13685 * cvt.c (cp_convert_to_pointer): Give an appropriate error
13686 when trying to cast from an incomplete type.
13688 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13690 * pt.c (instantiate_class_template): Don't bother setting up
13691 CLASSTYPE_TAGS explicitly, as the nested types will add
13694 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
13696 * decl.c (shadow_tag): Remove old error check for usage of
13697 an enum without a previous declaration.
13698 (xref_tag): Add error message about usage of enums without a
13699 previous declaration.
13701 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13703 * lex.c (do_identifier): Only do name consistency check if we're
13706 * pt.c (push_template_decl): Don't crash if we get a member defn
13707 that doesn't match.
13709 * decl.c (xref_tag_from_type): New function to do an xref without
13710 always having to figure out code_type_node.
13711 * cp-tree.h: Declare it.
13712 * pt.c (instantiate_class_template): Use it for friend classes.
13713 (lookup_template_class): Use it.
13715 * typeck2.c (build_functional_cast): Pull out a single parm before
13716 passing it to build_c_cast.
13718 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
13720 * expr.c (do_case): Give an error message if a pointer is
13721 given as a case value.
13723 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13725 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
13728 * lex.c (cons_up_default_function): Really, now, interface hackery
13729 does not apply to synthesized methods.
13731 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
13733 * call.c (build_method_call): Ctors and dtors now have special names
13734 with respect to lookups.
13735 * class.c (add_method): Likewise.
13736 (grow_method): Likewise.
13737 (finish_struct_methods): Likewise.
13738 (warn_hidden): Likewise.
13739 (finish_struct_1): Likewise.
13740 * cvt.c (convert_to_reference): Likewise.
13741 (convert_to_aggr): Likewise.
13742 (cp_convert): Likewise.
13743 * decl2.c (check_classfn): Likewise.
13744 * init.c (expand_member_init): Likewise.
13745 (expand_default_init): Likewise.
13746 (expand_aggr_init_1): Likewise.
13747 (build_offset_ref): Likewise.
13748 (build_new): Likewise.
13749 (build_delete): Likewise.
13750 * lex.c (do_inline_function_hair): Likewise.
13751 * search.c (lookup_field_1): Likewise.
13752 (lookup_fnfields_here): Likewise.
13753 (lookup_field): Likewise.
13754 (lookup_fnfields): Likewise.
13755 (get_virtual_destructor): Likewise.
13756 (dfs_debug_mark): Likewise.
13757 (dfs_pushdecls): Likewise.
13758 (dfs_compress_decls): Likewise.
13759 * tree.c (layout_basetypes): Likewise.
13760 * typeck.c (build_component_ref): Likewise.
13761 (build_x_function_call): Likewise.
13762 (build_modify_expr): Likewise.
13763 (convert_for_initialization): Likewise.
13764 (build_functional_cast): Likewise.
13765 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
13768 * decl.c (ctor_identifier): New.
13769 (dtor_identifier): New.
13770 (init_decl_processing): Set them.
13772 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
13774 * typeck.c (build_component_ref): Don't get confused by fields whose
13775 context has no type name, like pointer to member functions.
13777 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
13779 * decl.c (grokdeclarator): Handle typedef without declarator.
13781 * pt.c (tsubst): Handle SCOPE_REF in declarator.
13783 * parse.y (bad_parm): Catch another case of missing `typename'.
13785 * lex.c (yyprint): Handle TYPE_DECLs.
13787 * decl.c (start_function): Don't try to be clever.
13789 * lex.c: Lose compiler_error_with_decl.
13790 * typeck2.c: Lose error_with_aggr_type.
13791 (incomplete_type_error): Use cp_* instead of old functions.
13792 (readonly_error): Likewise.
13793 * typeck.c (convert_arguments): Likewise.
13794 * search.c (lookup_nested_field): Likewise.
13795 * method.c (make_thunk): Likewise.
13796 * decl.c (grokparms): Likewise.
13797 * cp-tree.h: Update.
13799 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
13802 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
13804 * method.c (build_opfncall): When deleting a pointer to an
13805 array, build a new pointer to the tree past any ARRAY_TYPE
13808 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13810 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
13812 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13814 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
13817 * decl.c (finish_function): Don't set nested based on
13818 hack_decl_function_context.
13819 * parse.y (function_try_block): Check for nested function.
13820 (pending_inlines): Likewise.
13822 * decl2.c (build_expr_from_tree): If a unary op already has a
13823 type, just return it.
13825 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
13827 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
13828 (finish_file): Check the return value of walk_vtables.
13829 (finish_prevtable_vardecl): Return int.
13830 (finish_vtable_vardecl): Likewise.
13831 (prune_vtable_vardecl): Likewise.
13832 * lex.c (set_vardecl_interface_info): Likewise.
13833 * cp-tree.h: Adjust return types.
13835 * class.c (delete_duplicate_fields_1): Don't complain about
13836 duplicate nested types if they're the same type.
13837 (finish_struct): Remove check for duplicate.
13838 * decl2.c (grokfield): Don't check for typedef of anonymous type.
13840 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13842 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
13844 * decl.c (grokdeclarator): Lose special handling of class-level
13845 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
13846 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
13848 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
13850 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
13852 * search.c (compute_access): Fix handling of anonymous union
13854 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
13855 from anonymous unions to their members.
13857 * typeck.c (build_x_function_call): For static member functions,
13858 hand off to build_member_call.
13860 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
13862 * typeck.c (build_component_ref): Handle OFFSET_REFs.
13864 * init.c (expand_vec_init): Fix init == 0 case.
13866 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13868 * init.c (build_new): pedwarn about init and array new.
13869 (expand_vec_init): Handle lists, use convert_for_initialization.
13871 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
13872 when converting to an aggregate type.
13873 * cvt.c (cp_convert): Pass it through.
13875 * typeck.c (build_conditional_expr): Handle user-defined
13876 conversions to slightly different types.
13878 * decl.c (grokdeclarator): Force an array type in a parm to be
13881 * decl2.c (do_using_directive): Sorry.
13882 (do_namespace_alias): Likewise.
13883 * lex.c (real_yylex): Warn about using the `namespace' keyword.
13885 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13887 * parse.y (datadef): Move call to note_list_got_semicolon up.
13889 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
13891 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
13893 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
13895 * decl.c (cp_finish_decl): The exception regions have to be
13896 nested, not overlapping. We start the exception region for a
13897 decl, after it has been fully built, and all temporaries for it
13898 have been cleaned up.
13900 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
13902 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
13904 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13906 * tree.def: Add RETURN_INIT.
13907 * pt.c (instantiate_decl): Handle RETURN_INIT.
13908 * decl.c (store_return_init): Handle minimal_parse_mode.
13910 * tree.c (cp_build_type_variant): Just return an error_mark_node.
13911 * decl.c (make_typename_type): Don't try to get the file and line
13913 * typeck.c (comptypes): Handle TYPENAME_TYPE.
13915 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
13917 * decl.c (poplevel): Make sure we clear out and restore old local
13918 non-VAR_DECL values by default when they go out of scope.
13920 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13922 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
13923 referring to addresses of variables and functions.
13925 * error.c (dump_expr): Support SIZEOF_EXPR.
13927 * init.c (do_friend): Use the return value of check_classfn.
13929 * typeck.c (convert_arguments): Call complete_type.
13931 * method.c (hack_identifier): After giving an error, set value to
13934 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
13936 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
13937 lossage for local classes.
13938 * cp-tree.h: Declare it.
13939 * decl.c (lookup_name_real): Evil, painful hack for local classes.
13940 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
13941 Use hack_decl_function_context.
13942 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
13943 (start_function): Use hack_decl_function_context.
13944 (finish_function): Likewise.
13945 * method.c (synthesize_method): Likewise.
13946 * lex.c (process_next_inline): Likewise.
13947 (do_pending_inlines): Likewise.
13948 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
13951 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
13953 * sig.c (build_signature_pointer_or_reference_type): Align
13954 signature pointers/references on 8-byte boundaries so they can be
13955 grabbed 2 words at a time on a Sparc.
13957 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
13959 * method.c (hack_identifier): Requiring a static chain is now a
13961 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
13964 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13966 * init.c (build_offset_ref): Call complete_type.
13968 * decl.c (pop_from_top_level): Always pop previous_class_type.
13970 * parse.y: Handle multiple decls in a for-init-statement.
13971 * pt.c (tsubst_expr): Likewise.
13973 * pt.c (tsubst): Use tsubst_expr for the second operand of an
13976 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
13977 (poplevel_class): Set it here.
13978 (pop_from_top_level): Pop it here if we're returning to class scope.
13979 * class.c (pushclass): Don't set it here.
13981 * decl.c (maybe_push_to_top_level): Save current_template_parms,
13982 and clear it if !pseudo.
13983 (pop_from_top_level): Restore it.
13985 * decl2.c (finish_file): Push the dummy each time we walk the list
13988 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
13989 something for CAST_EXPR.
13991 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13993 * cvt.c (cp_convert): Warn about implicit conversion of the
13994 address of a function to bool, as it is always true.
13996 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13998 * typeck.c (c_expand_return): Fix warning for local externs returned.
14000 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14002 * tree.c (mapcar): Propagate const and volatile properly.
14004 * typeck.c (complete_type): Be sure to instantiate the
14005 MAIN_VARIANT of the type.
14007 * method.c (synthesize_method): Class interface hackery does not
14008 apply to synthesized methods.
14010 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
14012 * pt.c (comp_template_args): Use comptypes rather than just
14013 checking for TEMPLATE_TYPE_PARM equivalence.
14015 * typeck.c (build_x_function_call): Call complete_type before
14016 checking TYPE_OVERLOADS_CALL_EXPR.
14018 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
14020 * g++.c (main): Check also for new define ALT_LIBM.
14022 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14024 * pt.c (instantiate_class_template): If we don't have a pattern
14026 (coerce_template_parms): If we see a local class, bail.
14028 * decl.c (grok_reference_init): Make sure there's a type before
14031 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
14032 (push_template_decl): Likewise.
14034 * parse.y (named_class_head): Set
14035 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
14037 * decl.c (xref_tag): Diagnose redeclaration of template
14038 type-parameter name.
14040 * error.c (dump_type): Handle anonymous template type parms.
14042 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
14044 (coerce_template_parms): Likewise.
14046 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
14048 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
14049 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
14051 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14053 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
14054 before trying to get its STUB_DECL.
14055 (coerce_template_parms): Likewise.
14057 * parse.y (template_type_parm): If they didn't use 'class',
14058 pretend they did after giving an error.
14060 * pt.c (coerce_template_parms): Diagnose use of local class.
14062 * decl.c (grok_reference_init): Use instantiate_type.
14064 * error.c (dump_expr): Handle TEMPLATE_DECLs.
14066 * parse.y (named_class_head): Diagnose mismatching types and tags.
14068 * decl.c (pushdecl): Type decls and class templates clash with
14069 artificial type decls, not hide them.
14071 * decl.c (redeclaration_error_message): Diagnose redefinition of
14072 templates properly.
14073 (duplicate_decls): Diagnose disallowed overloads for template
14076 * decl.c (start_decl): Call complete_type before checking for a
14079 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
14081 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
14083 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14085 * decl.c (grok_op_properties): Don't check for operator++(int) in
14088 * tree.c (perm_manip): Return a copy of variable and function
14089 decls with external linkage.
14091 * tree.def: Change some of the min tree codes to type "1".
14092 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
14093 * method.c (build_overload_int): Emit something arbitrary for
14094 anything but an INTEGER_CST if we're in a template.
14096 * decl.c (cp_finish_decl): Call complete_type before deciding
14097 whether or not to lay out the decl.
14099 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
14101 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14103 * typeck2.c (build_x_arrow): Call complete_type.
14105 * pt.c (add_pending_template): Broken out.
14106 (lookup_template_class): If -fexternal-templates, call it for all
14107 the methods of implemented types.
14108 (instantiate_class_template): Instead of instantiating them here.
14109 (instantiate_decl): Handle -fexternal-templates earlier.
14111 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14113 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
14114 memoized lookup stuff inside GATHER_STATISTICS.
14116 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14118 * decl.c (start_decl): Complain about array of incomplete type
14120 (grokdeclarator): Not here.
14122 * parse.y (template_parm): Expand full_parm inline so we can set
14123 the rule's precedence.
14125 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
14126 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
14127 * decl2.c (grokbitfield): Don't check for integer constant here.
14128 * class.c (finish_struct_1): Check here.
14130 * decl.c (define_label): Make the min decl go on permanent_obstack.
14132 * pt.c (unify): Don't handle CONST_DECLs.
14133 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
14134 (tsubst_copy): Likewise.
14136 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
14137 CONST_DECL for a template parm.
14139 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14141 * decl.c (grokdeclarator): Complain about array of incomplete type
14143 (start_decl_1): Not here.
14145 * pt.c (tsubst): Handle pointer-to-function declarators.
14147 * method.c (hack_identifier): If pedantic, diagnose local class
14148 methods that require a static chain.
14150 * decl.c (grok_op_properties): No longer static.
14151 * cp-tree.h: Declare it.
14152 * pt.c (tsubst): Call it for operators.
14153 Use tsubst_copy for TREE_VECs.
14155 * parse.y (template_arg): The expr has precedence like '>'.
14157 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
14159 * pt.c (coerce_template_parms): Don't coerce an expression using
14161 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
14162 (tsubst): Don't use build_index_2_type if the max_value uses template
14164 * method.c (build_overload_int): Emit something arbitrary for an
14165 expression using template parms.
14167 * parse.y (template_close_bracket): New non-terminal to catch use
14168 of '>>' instead of '> >' in template class names.
14169 (template_type): Use it.
14170 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
14172 * tree.def: Add CAST_EXPR.
14173 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
14174 CONVERT_EXPR for minimal_parse_mode.
14175 * typeck.c (build_c_cast): Likewise.
14176 * pt.c (tsubst_copy): Likewise.
14177 * decl2.c (build_expr_from_tree): Likewise.
14178 * error.c (dump_expr): Likewise.
14180 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14182 * except.c (SetTerminate, SetUnexpected): Put back global vars.
14183 (init_exception_processing): Put back decl/init of
14184 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
14185 fns from libstdc++.
14187 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
14188 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
14190 * cp-tree.h (declare_uninstantiated_type_level,
14191 uninstantiated_type_level_p): Delete prototypes.
14193 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14195 * pt.c (tsubst_expr): Add default return.
14197 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14199 * error.c (fndecl_as_string): Delete unused arg CNAME.
14200 * sig.c (build_signature_table_constructor,
14201 build_signature_method_call): Fix calls.
14203 * class.c (the_null_vtable_entry): Delete var definition.
14204 (init_class_processing): Delete tree the_null_vtable_entry init.
14205 * decl.c (no_print_{functions, builtins}): Declare as static.
14206 (__tp_desc_type_node): #if 0 var definition.
14207 (init_type_desc): #if 0 init of __tp_desc_type_node.
14208 (vb_off_identifier): Move var decl into init_decl_processing.
14209 (current_function_assigns_this): Declare as static.
14210 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
14211 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
14212 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
14213 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
14214 * init.c (BI_header_type, BI_header_size): Declare as static.
14215 * pt.c (template_classes): Delete unused var.
14216 (add_pending_template): Delete decl for non-existent fn.
14217 (lookup_template_class): Delete vars CODE and TAG_CODE.
14218 (instantiate_template): Delete unused var TARGS.
14219 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
14221 (__tp_desc_type_node): #if 0 var decl.
14222 (fndecl_as_string): Fix prototype.
14224 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14226 * tree.def: Add GOTO_STMT.
14227 * pt.c (tsubst_expr): Support goto and labels.
14228 * decl.c (define_label): Support minimal parsing.
14229 * parse.y (simple_stmt): Likewise.
14231 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14233 * xref.c (GNU_xref_member): Only define/set var I if
14234 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
14236 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
14237 (GNU_xref_end): Fix call.
14238 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
14239 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
14241 * tree.c (build_exception_variant): Delete unused vars I, A, T,
14243 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
14244 (mapcar): Delete unused var CODE.
14245 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
14246 (break_out_cleanups): Fix call.
14247 (bot_manip): Likewise.
14248 * call.c (build_method_call): Likewise.
14249 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
14251 * typeck.c (unary_complex_lvalue, build_modify_expr,
14252 convert_for_initialization): Likewise.
14253 * typeck2.c (build_functional_cast): Likewise.
14254 * cp-tree.h (build_cplus_new): Fix prototype.
14256 * repo.c (open_repo_file): Delete unused var Q.
14257 (repo_compile_flags, repo_template_declared,
14258 repo_template_defined, repo_class_defined, repo_inline_used,
14259 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
14260 (repo_get_id, repo_vtable_used): Declare as static.
14261 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
14264 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
14266 * parse.y (pending_inlines): Add function_try_block case.
14268 * pt.c (unify): Fix for template const parms.
14270 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14272 * lex.c (extract_interface_info): Delete forward decl.
14273 (default_copy_constructor_body, default_assign_ref_body): Delete
14274 decls for non-existent functions.
14275 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
14276 (init_lex): Delete setting them.
14277 (cons_up_default_function): Delete unused vars FUNC_BUF,
14278 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
14279 #if 0'd synth code.
14280 (toplevel, expression_obstack): Delete unused extern decls.
14281 (tree_node_kind): Delete unused enum.
14282 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
14284 (tree_node_kind_names): Delete unused extern decl.
14285 (synth_obstack): Delete unused var.
14286 (init_lex): Don't set it.
14287 (init_parse): Add decl before use.
14288 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
14289 (current_unit_{name, language}): Delete unused vars.
14290 (check_newline): Don't bother setting them, just accept the #pragma.
14291 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
14292 (current_unit_{name, language}): Delete decls.
14294 * search.c: Wrap all of the memoized functions, macros, and
14295 variables inside #ifdef GATHER_STATISTICS.
14296 (lookup_field, lookup_fnfields): Likewise.
14297 (init_search_processing): Likewise.
14298 (reinit_search_statistics): Wrap whole function.
14299 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
14301 * decl.c (finish_function): Only call pop_memoized_context if
14302 GATHER_STATISTICS is defined.
14303 (start_function): Likewise for push_memoized_context.
14304 * class.c (pushclass, popclass): Likewise.
14306 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
14307 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
14309 * cvt.c (cp_convert): Delete unused local var FORM.
14310 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
14313 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14315 * pt.c (do_poplevel): Oops; really return what we get from
14316 poplevel this time.
14318 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14320 * cp-tree.h (is_aggr_type): Add prototype.
14322 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
14323 * method.c ({push,pop}_cp_function_context): Delete decls.
14324 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
14325 (SetUnexpected, SetTerminate): Delete unused vars.
14326 (init_exception_processing): Don't set SetUnexpected or
14327 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
14328 (output_exception_table_entry): Delete unused array LABEL.
14329 (expand_internal_throw): Delete unused var PARAMS.
14330 (expand_start_catch_block): Delete unused var CLEANUP.
14331 (emit_exception_table): Delete unused var EH_NODE_DECL.
14332 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
14333 GOTO_UNWIND_AND_THROW. Don't set them.
14334 (end_eh_unwinder): Add top decl.
14335 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
14336 (exception_section, push_rtl_perm, do_function_call,
14337 lang_interim_eh, push_eh_cleanup, eh_outer_context,
14338 expand_end_eh_spec, end_eh_unwinder): Declare as static.
14339 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
14340 throw_used): Likewise.
14341 * cp-tree.h (expand_end_eh_spec): Delete prototype.
14343 * search.c (dfs_mark, dfs_mark_vtable_path,
14344 dfs_unmark_vtable_path, dfs_mark_new_vtable,
14345 dfs_unmark_new_vtable, dfs_clear_search_slot,
14346 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
14347 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
14348 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
14350 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
14351 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
14352 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
14353 Only define #ifdef GATHER_STATISTICS.
14354 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
14356 (vbase_decl): Delete var definition.
14357 (init_search): Delete old decl.
14358 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
14359 never actually used.
14360 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
14361 (get_base_distance_recursive): Delete unused fourth arg
14362 BASETYPE_PATH. Fix call .
14363 (get_base_distance): Fix call.
14364 (push_class_decls): Delete unused var ID.
14365 (make_memoized_table_entry): Declare as static.
14366 (breadth_first_search): Declare as static.
14367 (tree_has_any_destructor_p): Declare as static.
14368 (pop_class_decls): Delete unused arg pop_class_decls.
14369 * class.c (popclass): Fix call to pop_class_decls.
14370 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
14371 tree_has_any_destructor_p): Delete prototypes.
14373 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
14374 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
14375 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
14376 (build_user_desc): Delete unused var T.
14377 (build_class_desc): Delete unused vars T and OFF.
14378 (build_t_desc): Delete unused var NAME_STRING.
14379 (build_headof): Make static.
14380 (get_bad_cast_node): Likewise.
14381 (get_def_to_follow): Likewise.
14382 * cp-tree.h (init_type_desc): Add prototype.
14383 (build_headof): Remove prototype.
14385 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14387 * pt.c (tsubst): Only look for matching decls at file scope for
14388 non-member functions.
14390 * call.c (build_scoped_method_call): Handle scoped destructor
14391 calls in templates.
14393 * decl.c (*_top_level): Also save previous_class_values.
14395 * pt.c (tsubst_expr): Support do {} while loops.
14396 * parse.y (simple_stmt): Likewise.
14397 * tree.def: Likewise.
14399 * method.c (build_overload_identifier): For a class nested in a
14400 template class, don't mangle in the template parms from our
14403 * lex.c, cp-tree.h: Remove support for template instantiations in
14404 the pending_inlines code.
14405 * pt.c: Remove dead functions and unused arguments.
14406 (uses_template_parms): TYPENAME_TYPEs always use template parms.
14407 * parse.y: Stop passing anything to end_template_decl.
14408 * tree.c (print_lang_statistics): Only print tinst info #ifdef
14411 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14413 * init.c (expand_recursive_init{,_1}): Delete decls.
14414 (sort_member_init): Delete unused var INIT.
14415 (emit_base_init): Delete unused var X.
14416 (build_offset_ref): Delete unused var CNAME.
14417 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
14418 (emit_base_init): Delete unused local var BASE. Delete extern
14419 decl of IN_CHARGE_IDENTIFIER.
14420 (build_delete): Delete unused local var VIRTUAL_SIZE.
14422 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
14423 (build_delete): Fix call.
14424 * decl2.c (delete_sanity): Likewise.
14425 * cp-tree.h (build_vec_delete): Update prototype.
14427 * typeck.c (common_base_type): Delete unused var TMP.
14428 (build_binary_op): Delete local var ARGS_SAVE.
14429 (build_array_ref): Delete unused var ITYPE.
14430 (c_expand_return): Delete unused var USE_TEMP.
14432 * typeck.c (compexcepttypes): Delete unused arg STRICT.
14433 (comptypes): Fix calls.
14434 * decl.c (duplicate_decls): Likewise.
14435 * cp-tree.h (compexcepttypes): Delete extra arg.
14437 * decl2.c (check_classfn): Delete unused second arg CNAME.
14438 * decl.c (start_decl, grokfndecl): Fix calls.
14439 * init.c (do_friend): Likewise.
14440 * cp-tree.h (check_classfn): Update prototype.
14442 * cp-tree.h (signature_error, import_export_vtable,
14443 append_signature_fields, id_in_current_class, mark_used,
14444 copy_assignment_arg_p): Add decls.
14445 * decl2.c (mark_used): Delete decl.
14447 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
14449 * class.c (get_vtable_entry): Disable unused function.
14450 (doing_hard_virtuals): Delete unused static global var.
14451 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
14452 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
14453 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
14454 (modify_one_vtable): Delete unused var OLD_RTTI.
14455 (finish_struct_anon): Delete unused vars OFFSET and X.
14456 (finish_struct_bits): Delete unused var METHOD_VEC.
14457 (get_basefndecls): Delete unused var PURPOSE. Delete unused
14458 for-scope local variable METHODS.
14460 * call.c (user_harshness): Delete unused/unneeded arg PARM.
14461 (ideal_candidate): Delete unused args BASETYPE and PARMS.
14462 (build_method_call): Delete unused args passed into ideal_candidate.
14463 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
14464 * cp-tree.h (synthesize_method): Add decl.
14466 * decl.c (note_level_for_for): Give void return type.
14467 (pushdecl_nonclass_level): Likewise.
14468 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
14469 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
14470 (suspend_binding_level): Delete unused var LEVEL.
14471 (duplicate_decls): Delete unused var CTYPE.
14472 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
14473 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
14475 (grokdeclarator): Delete unused var C.
14476 (grokdeclarator): Delete unused var SIZE_VARIES.
14477 (grokparms): Delete unused var SAW_VOID.
14478 (start_function): Delete unused var OLDDECL.
14479 (cplus_expand_expr_stmt): Delete unused var
14480 REMOVE_IMPLICIT_IMMEDIATELY.
14482 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
14484 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
14486 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14488 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
14489 (build_min_nt): Likewise.
14490 * pt.c (do_pushlevel): Emit line note.
14491 (do_poplevel): Return what we get from poplevel.
14492 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
14493 * parse.y: Use do_pushlevel and do_poplevel.
14494 * cp-tree.h: Declare do_poplevel.
14496 * cp-tree.h: Declare at_eof.
14497 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
14498 * decl2.c (import_export_decl): Renamed from import_export_inline.
14499 (finish_file): Call it to do interface handling for statics.
14500 * pt.c (tsubst_copy): Call mark_used on variables and functions
14503 * decl2.c (finish_file): Don't emit statics we can't generate.
14504 * pt.c (instantiate_decl): Don't set interface on instantiations
14507 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
14508 * tree.c (print_lang_statistics): Print max template depth.
14509 * pt.c (push_tinst_level): Dump entire instantiation context.
14510 (instantiate_class_template): Use it and pop_tinst_level.
14511 (instantiate_decl): Likewise.
14513 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
14514 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
14516 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14518 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
14519 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
14520 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
14521 the new template implementation.
14523 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14525 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
14527 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
14529 * decl.c (cp_finish_decl): Delay emitting the debug information for
14530 a typedef that has been installed as the canonical typedef, if the
14531 type has not yet been defined.
14533 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14535 * decl2.c (grokfield): Still call pop_nested_class for access decls.
14537 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14539 * decl.c (lookup_label): Call label_rtx.
14541 * decl.c (make_binding_level): New function.
14542 (pushlevel, pushlevel_class): Call it instead of explicit
14543 duplicate calls to xmalloc.
14545 * decl.c (init_decl_processing): Delete useless build_pointer_type
14548 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
14549 (sizet_ftype_string): Delete variable.
14550 (init_decl_processing): Add built-in functions fabsf, fabsl,
14551 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
14552 variable strlen_ftype, used for strlen.
14554 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14556 * decl.c (push_to_top_level): Start from current_binding_level
14557 again for now; the stl hacks depend on g++ being broken in this
14558 way, and it'll be fixed in the template rewrite.
14560 * tree.def: Add USING_DECL.
14561 * decl2.c (do_class_using_decl): Implement.
14562 (grokfield): Pass access decls off to do_class_using_decl instead of
14564 * error.c (dump_decl): Handle USING_DECLs.
14565 * decl.c (grokdeclarator): Remove code for handling access decls.
14566 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
14567 as access decls for now.
14568 (finish_struct): Don't check USING_DECLs for other uses of the name.
14570 * search.c (get_matching_virtual): Use cp_error_at.
14572 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14574 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
14576 (self_promoting_args_p): Move the check that TYPE is non-nil
14577 before trying to look at its main variant.
14578 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
14580 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
14582 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
14583 (do_friend): Delete call to xref_friend.
14584 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
14586 * typeck.c (convert_sequence): #if 0 unused function.
14588 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
14589 be in decl_in_memory_p.
14590 (decl_in_memory_p): Delete decl.
14591 * expr.c (decl_in_memory_p): Delete fn.
14592 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
14594 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
14596 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14598 * class.c (finish_struct_1): Check for a pure-specifier on a
14599 non-virtual function here.
14601 * decl2.c (grok_function_init): Don't check whether the function
14603 (grokfield): Don't call check_for_override here.
14605 * decl.c (push_to_top_level): Start from inner_binding_level,
14606 check class_shadowed in class levels.
14608 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
14610 * decl.c (resume_level): Ignore things that don't have names, instead
14613 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14615 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
14617 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
14619 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
14622 * parse.y (complete_type_name): Bind global_scope earlier.
14623 (complex_type_name): Likewise.
14624 (qualified_type_name): Remove.
14626 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
14628 * decl.c (grokfndecl): Move code that looks for virtuals in base
14630 * class.c (check_for_override): ... to a new function.
14631 (finish_struct_1): Call it.
14633 * cp-tree.h: Declare warn_sign_compare.
14635 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
14636 rather than extra_warnings to decide whether to warn about
14637 comparison of signed and unsigned.
14639 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
14640 implies -Wsign-compare. -Wall doesn't imply -W.
14642 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
14644 * typeck.c (build_component_ref): Fix to handle anon unions in base
14647 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14649 * class.c (resolves_to_fixed_type_p): Delete code dealing with
14650 a WITH_CLEANUP_EXPR, since we don't generate them any more.
14651 * cvt.c (build_up_reference): Likewise.
14652 * decl.c (grok_reference_init): Likewise.
14653 (cp_finish_decl): Likewise.
14654 * error.c (dump_expr): Likewise.
14655 * tree.c (real_lvalue_p): Likewise.
14656 (lvalue_p): Likewise.
14657 (build_cplus_new): Likewise.
14658 (unsave_expr_now): Likewise.
14659 * typeck.c (unary_complex_lvalue, build_modify_expr,
14660 c_expand_return): Likewise.
14662 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14664 Make the C++ front-end pay attention to attributes for structures.
14665 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
14667 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
14668 Take out old round_up_size use and setting the DECL_ALIGN possibly
14669 using it. Take out setting of TYPE_ALIGN to round_up_size, which
14670 can override what the attribute set.
14671 * cp-tree.h (finish_struct): Update prototype.
14672 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
14673 attributes to finish_struct.
14674 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
14675 value down into finish_struct.
14676 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
14678 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
14680 * decl.c (poplevel): Re-word dead for local handling.
14681 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
14682 (cp_finish_decl): If is_for_scope, check for duplicates so
14683 we can disable is_for_scope. Otherwise, preserve_temp_slots.
14685 * lex.c (do_identifier): Use global binding in preference of
14686 dead for local variable.
14688 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
14690 * init.c (initializing_context): Handle anon union changes, the
14691 context where fields of anon unions can be initialized now has to be
14692 found by walking up the TYPE_CONTEXT chain.
14694 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
14696 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
14697 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
14698 (obscure_complex_init): If bss is supported, always set
14699 DECL_INITIAL to error_mark_node.
14701 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14703 * init.c (is_friend): Make sure there's a context before we see if
14706 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
14708 * init.c (is_friend): Classes are not friendly with nested classes.
14710 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
14712 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
14713 and record its result.
14715 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
14717 * class.c (finish_struct_anon): Switch around code to not move anon
14718 union elements around, nor mess up their contexts, nor offsets,
14719 instead we now build up the right number of COMPONENT_REFs for all
14720 the anon unions that may be present at build_component_ref time.
14721 * typeck.c (lookup_anon_field): New routine to handle field lookup
14722 on fields without names. We find them, based upon their unique type
14724 * typeck.c (build_component_ref): Allow FIELD_DECL components.
14725 Handle finding components in anonymous unions, and ensure that a
14726 COMPONENT_REF is built for each level as necessary.
14728 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
14730 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
14731 code that ensures that copy ctors are used if appropriate.
14733 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14735 * init.c (build_vec_delete): Only give an error if base isn't an
14738 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
14740 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
14741 (yylex): If we see `new', keep slurping.
14743 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
14745 * class.c (finish_struct_1): Move code for handling anon unions...
14746 (finish_struct_anon): to here. Fixup so that we do the offset
14747 calculations right, and so that the fields are physically moved to
14748 the containers's chain.
14750 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14752 * decl.c (grokdeclarator): Avoid trying to get an operand off an
14755 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
14757 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
14758 POINTER_SIZE to agree with expr.c.
14760 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
14762 * search.c (lookup_field): Don't report ambiguities if protect is 0,
14763 instead return NULL_TREE.
14765 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
14767 * class.c (finish_struct_1): Call warn_hidden if we want warnings
14768 about overloaded virtual functions.
14769 (warn_hidden): New routine to warn of virtual functions that are
14770 hidden by other virtual functions, that are not overridden.
14771 (get_basefndecls): New routine, used by warn_hidden.
14772 (mark_overriders): New routine, used by warn_hidden.
14773 * search.c (get_matching_virtual): Remove old warning that just
14776 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14778 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
14780 * typeck.c (null_ptr_cst_p): Delete unused fn.
14781 (build_function_call_maybe): Delete unused fn.
14783 * expr.c (extract_init): #if 0 the code after unconditional return 0
14786 Delete old cadillac code.
14787 * edsel.c: Remove file.
14788 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
14789 * Makefile.in (CXX_OBJS): Delete edsel.o.
14790 (edsel.o): Delete rule.
14791 * cp-tree.h (flag_cadillac): Delete var decl.
14792 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
14793 * decl2.c (flag_cadillac): Delete var definition.
14794 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
14795 (grokfield): Delete code depending on flag_cadillac.
14796 (finish_anon_union): Likewise.
14797 * class.c (finish_struct_1): Likewise.
14798 (pushclass): Likewise.
14799 (popclass): Likewise.
14800 (push_lang_context): Likewise.
14801 (pop_lang_context): Likewise.
14802 * decl.c (init_decl_processing): Likewise.
14803 (start_decl): Likewise.
14804 (cp_finish_decl): Likewise.
14805 (xref_tag): Likewise.
14806 (finish_enum): Likewise.
14807 (start_function): Likewise.
14808 (finish_function): Likewise.
14809 (finish_stmt): Likewise.
14810 * lex.c (lang_init): Likewise.
14811 (check_newline): Likewise.
14813 * lex.c (do_pending_inlines): Delete synthesized method kludge.
14815 Delete defunct, ancient garbage collection implementation.
14816 * rtti.c: New file with the RTTI stuff from gc.c.
14817 * gc.c: Removed file (moved the remaining stuff into rtti.c).
14818 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
14819 (rtti.o): New rule, replacing gc.o.
14820 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
14821 * cp-tree.h: Delete gc-related fn decls.
14822 (DECL_GC_OFFSET): Delete macro.
14823 (flag_gc): Delete extern decl.
14824 * decl.c (current_function_obstack_index): Delete var decl.
14825 (current_function_obstack_usage): Delete var decl.
14826 (start_function): Delete clearing of current_function_obstack_index
14827 and current_function_obstack_usage.
14828 (init_decl_processing): Delete code relying on -fgc.
14829 Delete call to init_gc_processing.
14830 (cp_finish_decl): Delete calls to build_static_gc_entry and
14831 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
14832 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
14833 and to expand_expr of a __gc_main call.
14834 (maybe_gc_cleanup): Delete var decl.
14835 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
14836 * decl2.c (flag_gc): Delete var decl.
14837 (lang_f_options): Delete offering of -fgc.
14838 (lang_decode_option): Delete -fgc and -fno-gc handling.
14839 (get_temp_regvar): Delete gc code.
14840 * init.c (build_new): Delete gc code.
14841 * lex.c (init_lex): Delete checking of flag_gc.
14843 * typeck.c (convert_arguments): Delete gc code.
14844 (build_component_addr): Delete -fgc warning.
14845 (build_modify_expr): Delete gc code.
14847 * decl2.c (build_push_scope): Delete fn.
14848 * cp-tree.h (build_push_scope): Delete decl.
14850 * search.c (clear_search_slots): Delete fn.
14851 * cp-tree.h (clear_search_slots): Delete decl.
14853 * search.c (tree_needs_constructor_p): Delete fn.
14854 * cp-tree.h (tree_needs_constructor_p): Delete decl.
14856 * tree.c (id_cmp): Delete fn.
14858 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
14859 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
14861 * tree.c (decl_value_member): Delete fn.
14862 * cp-tree.h (decl_value_member): Delete decl.
14864 * tree.c (list_hash_lookup_or_cons): Delete fn.
14865 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
14867 * method.c (cplus_exception_name): Delete fn.
14868 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
14870 * spew.c (shift_tokens): Delete fn.
14872 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14874 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
14876 * parse.y: Likewise.
14878 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14880 * tree.c (build_cplus_staticfn_type): Delete function definition;
14882 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
14884 * tree.c (virtual_member): Delete function definition; never used.
14885 * cp-tree.h (virtual_member): Delete decl.
14887 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
14889 * typeck.c (build_component_ref): Handle getting vbase pointers
14890 out of complex multiple inheritance better.
14892 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
14894 * typeck.c (build_object_ref): Make sure we use the real type, not
14895 any reference type.
14897 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
14899 * tree.c (build_exception_variant): Don't create new types if we
14900 don't have to, also build new types on the right obstack.
14902 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14904 * decl.c (store_bindings): Split out from push_to_top_level.
14905 (push_to_top_level): Call it for b->type_shadowed on class binding
14908 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
14910 * search.c (expand_upcast_fixups): Fix so that offsets stored in
14911 vbase_offsets are always right. Fixes a problem where virtual base
14912 upcasting and downcasting could be wrong during conversions on this
14913 during virtual function dispatch at ctor/dtor time when dynamic
14914 vtable fixups for deltas are needed. This only sounds easier than
14916 (fixup_virtual_upcast_offsets): Change to reflect new calling
14917 convention for expand_upcast_fixups.
14919 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14921 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
14922 check that it's usable as the bitfield width.
14924 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14926 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
14927 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
14928 only ever used for functions in it.
14930 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14932 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
14933 (nested_type): Likewise.
14934 (nested_name_specifier): Use lastiddecl.
14936 * decl.c (grokdeclarator): Adjust accordingly.
14937 * init.c (expand_member_init): Likewise.
14938 * parse.y (base_class): Likewise.
14939 * typeck2.c (build_functional_cast): Likewise.
14941 * typeck2.c (build_functional_cast): Fill in name after we've
14942 checked for non-aggr type.
14944 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
14946 * decl2.c (warn_pointer_arith): Default to on.
14948 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14950 * lex.c (is_rid): New function.
14951 * decl.c (grokdeclarator): Diagnose reserved words used as
14954 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14956 * tree.c (get_decl_list): Don't lose cv-quals.
14958 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
14959 typespecs used as declarator-ids.
14961 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
14963 * decl.c (poplevel): When poping a level, don't give a warning for
14964 any subblocks that already exist.
14966 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14968 * typeck.c (build_object_ref): Finish what I started.
14970 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
14972 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
14974 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
14977 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14979 * decl.c (xref_tag): Handle passing a type in directly.
14981 * parse.y (qualified_type_name): Pull out the type.
14982 (nested_type): Likewise.
14983 Take types directly instead of as identifiers.
14984 * call.c (build_scoped_method_call): Take types directly instead of
14986 * decl.c (xref_basetypes): Likewise.
14987 * init.c (expand_member_init): Likewise.
14988 (build_member_call): Likewise.
14989 (build_offset_ref): Likewise.
14990 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
14991 * method.c (do_build_assign_ref): Likewise.
14992 * decl.c (grokdeclarator): Handle a type appearing as the
14993 declarator-id for constructors.
14994 * method.c (do_build_copy_constructor): current_base_init_list now
14995 uses the types directly, not their names.
14996 * init.c (sort_base_init): Likewise.
14997 (expand_member_init): Likewise.
14998 * init.c (is_aggr_type): New function, like is_aggr_typedef.
15000 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
15002 * tree.c (layout_basetypes): Call build_lang_field_decl instead
15003 of build_lang_decl if first arg is a FIELD_DECL.
15005 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15007 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
15009 * except.c (expand_start_catch_block): Set TREE_USED to avoid
15010 warnings about the catch handler.
15012 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
15014 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
15015 expand_target_expr.
15017 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15019 Fix access control to use trees rather than integers.
15020 * class.c (access_{default, public, protected, private,
15021 default_virtual, public_virtual, private_virtual}_node): Add
15023 (init_class_processing): Do creation of those nodes.
15024 * cp-tree.h (access_type): Delete enum decl.
15025 (access_{default, public, protected, private, default_virtual,
15026 public_virtual, private_virtual}_node): Add decls.
15027 (compute_access): Change return type.
15028 * search.c (compute_access): Have tree return type, instead of enum.
15029 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
15030 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
15031 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
15032 * parse.y (VISSPEC): Make ttype rather than itype.
15033 (base_class_access_list): Likewise.
15034 * *.[cy]: Change all refs of `access_public' to `access_public_node',
15036 * call.c (build_method_call): Make ACCESS be a tree.
15037 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
15038 * cvt.c (convert_to_aggr): Likewise.
15039 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
15041 * method.c (hack_identifier): Likewise.
15042 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
15044 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
15046 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
15047 frontend, and make it more consistent with respect to
15048 warn_pointer_arith.
15050 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
15052 * decl.c (pushdecl): Check for duplicate parameter names.
15054 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
15056 * decl.c (expand_static_init): Call assemble_external for atexit.
15058 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
15060 * except.c (do_unwind): Remove some generated dead code.
15061 (eh_outer_context): New routine, factor out some common code from
15062 expand_builtin_throw and end_eh_unwinder. Add code to do return
15063 address masking for the PA.
15064 (expand_builtin_throw): Use eh_outer_context instead of open coding
15066 (end_eh_unwinder): Likewise.
15068 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
15070 * except.c (expand_throw): Call assemble_external for __empty, if we
15073 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
15075 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
15076 NORMAL_RETURN_ADDR_OFFSET.
15077 (end_eh_unwinder): Likewise.
15079 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
15081 * gc.c (build_dynamic_cast): Make sure we don't cast away const
15082 when dealing with references, and make sure we handle dynamic
15083 casting to a cv qualified reference.
15085 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
15087 * except.c (struct eh_context): New structure top hold eh context
15089 (push_eh_context): New routine.
15090 (pop_eh_context): Likewise.
15091 * decl.c (push_cp_function_context): Use them.
15092 (pop_cp_function_context): Likewise.
15094 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
15096 * decl2.c (finish_file): Also prune uninteresting functions in the
15097 inline emission loop.
15099 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
15101 * sig.c (build_signature_table_constructor): Mark functions
15102 in the signature as referenced.
15104 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
15106 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
15107 the inline emission stuff.
15109 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
15111 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
15113 * lang-options.h: Add -f{no-,}weak.
15114 * decl.c (init_decl_processing): If the target does not support weak
15115 symbols, don't use them.
15116 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
15118 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
15120 * init.c (expand_member_init): warning for base init after members.
15122 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
15124 * cvt.c (build_expr_type_conversion): Don't convert to a reference
15127 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
15129 * method.c (report_type_mismatch): Improve wording for volatile
15132 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
15134 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
15135 expand_assignment, as the later doesn't handle things that have
15136 copy constructors well. The compiler would do bitwise copying,
15137 instead of ctor calling in some cases.
15139 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
15141 * g++.c (my_strerror): Return "cannot access" if errno is 0.
15142 (pfatal_with_name, perror_exec): Don't assume that
15143 the returned value from my_strerror contains no '%'s.
15145 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
15147 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
15149 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
15150 TYPE_METHODS/TREE_CHAIN mean what they used to.
15151 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
15152 instead of TYPE_METHODS.
15153 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
15154 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
15155 * cp-tree.h (CLASSTYPE_METHODS): Lose.
15156 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
15158 (struct lang_decl): Lose next_method field.
15159 (DECL_NEXT_METHOD): Lose.
15160 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
15161 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
15163 (finish_struct_methods): Don't mess with the TREE_CHAINs in
15166 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
15169 * call.c (build_method_call): Synthesize here even when not inlining.
15170 * typeck.c (build_function_call_real): Likewise.
15172 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
15174 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
15175 == DBX_DEBUG, call dbxout_start_new_source_file and
15176 dbxout_resume_previous_source_file when appropriate.
15178 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
15180 * except.c (start_anon_func): Push to the top level.
15181 (end_anon_func): Pop from the top level.
15183 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
15185 * cp-tree.h (build_cleanup): New routine to build cleanups.
15186 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
15187 call at ctor time and use atexit to run it later.
15188 * decl2.c (build_cleanup): New routine, taken from finish_file.
15189 (finish_file): Use build_cleanup instead, and don't put function
15190 local statics in global dtor list.
15192 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
15194 * except.c (expand_throw): Ensure that we have cleanups, if we try
15195 and expand cleanups.
15197 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
15199 * except.c (expand_throw): Add logic to manage dynamic cleanups for
15201 (expand_end_catch_block): Use the magic of expand_goto, instead of
15202 emit_jump so that we get the cleanup for any catch clause parameter
15203 and the cleanup for the exception object. Update to reflect label
15205 (push_eh_cleanup): New routine to register a cleanup for an
15207 (empty_fndecl): Used to default cleanup actions to
15209 (init_exception_processing): Setup empty_fndecl. Setup
15211 (expand_start_catch_block): Update to reflect label changes. Call
15212 push_eh_object to register the cleanup for the EH object.
15213 (start_anon_func): New routine to start building lambda expressions
15215 (end_anon_func): New routine to end them.
15216 (struct labelNode): Change so that we can use tree labels, or rtx
15218 (saved_cleanup): Object to check for dynamic cleanups for the
15219 exception handling object.
15220 (push_label_entry): Change so that we can use tree labels, or rtx
15222 (pop_label_entry): Likewise.
15223 (top_label_entry): Likewise.
15224 (expand_start_all_catch): Use tree label instead of rtx label, so
15225 that we can get the magic of expand_goto.
15226 (expand_end_all_catch): Update to reflect label changes.
15228 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
15230 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
15231 building_cleanup logic, as we now use UNSAVE_EXPRs.
15232 * cp-tree.h (unsave_expr): Declare it.
15233 * decl.c (building_cleanup): Remove.
15234 (maybe_build_cleanup): Remove building_cleanup logic, and use
15235 UNSAVE_EXPR instead.
15237 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
15239 * gc.c (build_t_desc): Update error message to say <typeinfo>.
15241 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15243 * decl.c (pushdecl): Only warn about shadowing a local variable if
15244 warn_shadow is true.
15246 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
15248 * typeck.c (build_binary_op_nodefault): Added warning about
15249 comparisons between different enum types with -Wall, unless
15250 -fenum-int-equiv set.
15252 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
15254 * class.c (finish_struct_1): Skip down to the inner type in
15255 multidimensional arrays. Ensures ctors will be made for types that
15258 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
15260 * decl.c (last_dtor_insn): New to track the last compiler generated
15262 (store_parm_decls): Set it.
15263 (finish_function): Use it to see if the dtor is empty. Avoid doing
15264 vtable setup all the time, if we can.
15265 (struct cp_function): Add last_dtor_insn.
15266 (push_cp_function_context): Save it.
15267 (pop_cp_function_context): Restore it.
15269 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
15271 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
15274 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
15276 * typeck.c (expand_target_expr): Make sure targets get put into the
15277 current temp_slot_level, so that the free_temp_slots call will reuse
15280 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
15282 * class.c (finish_struct_1): Delay delta fixups for virtual bases
15283 until after we have done the hard virtuals, to avoid a bogus `every
15284 virtual function must have a unique final overrider' for virtual
15285 functions that are only overridden by hard virtuals.
15287 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
15289 * pt.c (do_function_instantiation): Don't try to find a file-scope
15290 template for a member function.
15292 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
15294 * g++.c (main): Add handling of -nodefaultlibs.
15296 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
15298 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
15299 distinguish between direct bindings of reference variables, and
15300 indirect bindings of reference variables.
15301 * cvt.c (build_up_reference): Use it.
15302 * typeck.c (convert_arguments): Use it to indicate this is an
15304 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
15305 as they are unused.
15306 (expand_static_init): Likewise.
15307 (cplus_expand_expr_stmt): Likewise.
15308 * decl2.c (finish_file): Likewise.
15309 * init.c (perform_member_init): Likewise.
15310 (emit_base_init): Likewise.
15311 (expand_aggr_vbase_init_1): Likewise.
15313 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15315 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
15316 get a DECL_LANG_SPECIFIC node.
15317 * cp-tree.h (lang_decl_flags): Add new member `level'.
15318 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
15319 decl_flags level member.
15321 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15323 * call.c (build_method_call): Make sure instance has a
15324 TYPE_LANG_SPECIFIC node before we dive into it.
15326 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
15328 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
15330 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
15332 * decl.c (duplicate_decls): When smashing decls, smash staticness in
15335 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
15337 * decl.c (poplevel): Handle the merging of subblocks of cleanups
15338 when finishing blocks that have already been created (usually due to
15339 the fixup goto code). Fixes bad debugging information.
15341 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
15343 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
15344 that's not a list of overloaded functions.
15346 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15348 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
15349 before trying to use DECL_ABSTRACT_VIRTUAL_P.
15351 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
15353 * decl2.c (mark_used): New function for hooking into setting of
15354 TREE_USED on decls.
15355 * call.c (build_method_call): Use it.
15356 * class.c (instantiate_type): Likewise.
15357 * init.c (build_offset_ref): Likewise. Don't call assemble_external
15358 for all like-named functions.
15359 * method.c (hack_identifier): Likewise.
15360 (emit_thunk): Don't call assemble_external.
15361 (make_thunk): Create thunk as a FUNCTION_DECL so that it
15362 gets the right mode and ENCODE_SECTION_INFO works.
15364 * parse.y: Use mark_used. Pass operator names to do_identifier.
15365 * lex.c (do_identifier): Handle operator names.
15367 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
15369 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15371 * errfn.c: Include stdio.h.
15372 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
15374 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
15376 * typeck2.c (digest_init): Always convert initializers to the
15379 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
15381 * init.c (member_init_ok_or_else): Don't allow member initializers
15382 for indirect members, as it is invalid.
15384 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15386 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
15388 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
15390 * parse.y (for.init.statement): Catch compound statements inside for
15391 initializations, if we're being pedantic.
15393 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
15395 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
15398 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
15400 * error.c (dump_expr): Don't core dump when a boolean expression is
15401 used as a default argument.
15403 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
15405 * class.c (finish_struct_bits): Check aggregate_value_p instead of
15408 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
15410 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
15411 BLKmode type that would otherwise be returned in registers.
15413 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15415 * g++.c (WITHLIBC): New macro.
15416 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
15417 saw_libc and pass it at the end if it was set.
15419 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
15421 * parse.y (fn.def1): Call split_specs_attrs in
15422 declmods notype_declarator case.