1 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
3 * decl.c (start_decl): Use 'tem'.
5 Thu May 14 16:30:47 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
7 * exception.cc: Include eh-common.h.
8 (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
9 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10 (__cp_push_exception): Initialize eh_info struct as well.
11 * except.c: Remove local structs and include eh-common.h.
12 (init_exception_processing): Set language and version codes.
13 (call_eh_info): add presence of eh_info to runtime description of
15 (expand_end_eh_spec): call start_catch_block() and end_catch_block().
16 * semantics.c (finish_try_block): call start_catch_block() and
18 * parse.y (function_try_block): call start_catch_block() and
21 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
23 * typeck.c (original_type): New function.
24 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
25 to see if they're actually the same.
26 * cp-tree.h (original_type): Declare.
28 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
30 * Makefile.in (lex.o): Depend on output.h.
32 * call.c (add_function_candidate): Remove unused variable `cand'.
33 (add_conv_candidate): Likewise.
34 (build_builtin_candidate): Likewise.
36 * cp-tree.h: Add prototype for `types_overlap_p'.
38 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
40 * decl2.c (merge_functions): Remove unused variables `tmp' and
43 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
44 (code_as_string): Likewise.
45 (language_as_string): Likewise.
46 (parm_as_string): Likewise.
47 (op_as_string): Likewise.
48 (assop_as_string): Likewise.
49 (cv_as_string): Likewise.
51 * lex.c: Include output.h.
53 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
55 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
58 * tinfo.cc (__class_type_info::dcast): Change the type of variable
59 `i' from int to size_t.
61 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
64 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
66 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
67 DECL_NAMESPACE_SCOPE_P.
68 (lang_decl_name): Likewise.
69 * pt.c (tsubst_friend_function, tsubst): Likewise.
70 * decl.c (pushdecl, redeclaration_error_message, start_decl,
71 cp_finish_decl, start_function): Likewise.
72 * class.c (finish_struct_1): Likewise.
73 * call.c (build_over_call): Likewise.
74 (compare_ics): Use DERIVED_FROM_P.
76 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
78 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
79 * method.c (build_mangled_name): Use it.
80 (build_decl_overload_real): Likewise.
82 * error.c (dump_simple_decl): New function, broken out from ...
85 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
87 * ptree.c (lang_print_xnode): Add missing `break'.
89 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
91 * call.c (add_template_candidate): Adjust for changes to
93 (add_template_candidate_real): Likewise.
94 (add_template_conv_candidate): Likewise.
95 (build_user_type_conversion_1): Likewise.
96 (build_new_function_call): Likewise.
97 (build_object_call): Likewise.
98 (build_new_op): Likewise.
99 (build_new_method_call): Likewise.
100 * class.c (instantiate_type): Likewise.
101 * cp-tree.h (unification_kind_t): New type.
102 (fn_type_unification): Adjust prototype.
103 (type_unificaiton): Likewise.
104 * pt.c (UNIFY_ALLOW_NONE): New macro.
105 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
106 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
107 (UNIFY_ALLOW_DERIVED): Likewise.
108 (unify): Change prototype.
109 (maybe_adjust_types_for_deduction): New function.
110 (check_cv_quals_for_unify): Likewise.
111 (determine_specialization): Adjust.
112 (fn_type_unification): Likewise.
113 (type_unification): Likewise.
114 (type_unification_real): Likewise. Use
115 maybe_adjust_types_for_deduction. Fix mishandling of
116 back-unification of template functions passed as arguments. Pass
117 appropriate combination of UNIFY_ALLOW_* to unify.
118 (unify): Remove unused NTPARMS parameter. Use
119 check_cv_quals_for_unify. Remove bogus code that allowed
120 too-generous unification in order to adhere more closely to standard.
121 (get_bindings_real): Adjust.
122 (get_class_bindings): Likewise.
124 * method.c (build_overload_identifier): Only use the innermost
125 template arguments when mangling.
126 * pt.c (tsubst_template_argument_vector): New function.
127 (complete_template_args): Deal with the situation where the
128 extra_args contain more than one level of arguments.
129 (lookup_template_class): Deal with member template classes, which
130 may have more than one level of arguments.
131 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
132 Improve handling of member template classes. Use
133 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
134 tsubst_template_argument_vector where appropriate.
135 (regenerate_decl_from_template): Break out from ...
136 (instantiate_decl): Here.
138 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
139 * parse.h: Regenerated.
140 * parse.c: Really regenerated.
142 * cp-tree.h (finish_unary_op_expr): New function.
143 (finish_id_expr): Likewise.
144 (begin_new_placement): Likewise.
145 (finish_new_placement): Likewise.
146 (finish_declarator): Likewise.
147 (finish_translation_unit): Likewise.
148 (finish_parmlist): Likewise.
149 (begin_class_definition): Likewise.
150 (finish_class_definition): Likewise.
151 (finish_default_args): Likewise.
152 (finish_inline_definitions): Likewise.
153 * parse.y (GCC_ASM_KEYWORD): Remove.
154 (TYPENAME_ELLIPSIS): Likewise.
155 * parse.c: Regenerated.
156 Use new functions in semantics.c in the actions for many rules.
157 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
158 * hash.h: Regenerated.
159 * semantics.c (finish_expr_stmt): Allow NULL expr.
160 (finish_unary_op_expr): New function, containing
161 code previously in parse.y.
162 (finish_id_expr): Likewise.
163 (begin_new_placement): Likewise.
164 (finish_new_placement): Likewise.
165 (finish_declarator): Likewise.
166 (finish_translation_unit): Likewise.
167 (finish_parmlist): Likewise.
168 (begin_class_definition): Likewise.
169 (finish_class_definition): Likewise.
170 (finish_default_args): Likewise.
171 (finish_inline_definitions): Likewise.
173 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
175 * typeck.c (build_c_cast): Don't decay arrays and functions to
176 pointer type when converting to a class type.
178 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
180 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
181 (DECL_CLASS_SCOPE_P): Likewise.
183 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
185 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
186 * decl2.c (constructor_name_full): Likewise.
188 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
190 * tree.c (mapcar): Add OVERLOAD support.
192 * init.c (resolve_offset_ref): We must use basetype_path before we
193 destroy it with a call to convert_pointer_to.
195 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
197 * class.c (currently_open_class): New fn.
198 * decl.c (lookup_name_real): Use it.
199 * search.c (lookup_field): Likewise.
201 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
203 * cp-tree.def (OVERLOAD): New node.
204 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
205 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
206 (NAMESPACE_BINDING): Remove.
207 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
209 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
211 (tree_overload): New struct.
212 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
213 (REAL_IDENTIFIER_TYPE_VALUE): Define.
214 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
215 (lang_decl_flags): Remove in_namespace.
216 (lang_decl): Remove chain.
217 (DECL_CHAIN, DECL_NAMESPACE): Remove.
218 (flag_honor_std): Declare extern.
219 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
220 namespace_binding, set_namespace_binding,
221 lookup_function_nonclass, cat_namespace_levels,
222 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
223 scratch_ovl_cons, ovl_member, build_overload): Declare.
224 (decl_list_length, get_namespace_id, current_namespace_id,
225 overloaded_globals_p): Remove.
226 (lookup_using_namespace, qualified_lookup_using_namespace): Change
228 (push_scratch_obstack): New macro.
229 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
230 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
232 (build_new_function_call): Iterate using OVL_CHAIN.
233 Print DECL_NAME in when reporting ambiguities.
234 (build_object_call): Iterate using OVL_NEXT for fns, convs.
235 (build_new_op): Call lookup_function_nonclass.
236 Iterate using OVL_NEXT.
237 (build_op_delete_call): Change detection of members.
238 Do not wrap TREE_LIST around fields and single global functions.
239 (build_over_call): Don't push a class level if the context is a
241 (build_new_method_call): Iterate using OVL_NEXT.
242 * class.c (add_method): Chain overloaded members using
243 build_overload. Remove copying of method.
244 (grow_method): When iterating through the obstack, expect OVERLOAD
245 nodes. Chain overload members.
246 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
247 nodes in call to get_baselinks.
248 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
249 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
250 fdecls that are OVERLOAD nodes.
251 (validate_lhs): New function.
252 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
253 code. Use DECL_NAME in error messages. Split code between global
254 and member function processing.
255 * decl.c (global_type_node): New static variable.
256 (in_std): New global.
257 (struct binding_level): New field usings.
258 (resume_binding_level): Assert that we are not in a class.
259 (toplevel_bindings_p): Just check for namespace_p or
261 (resume_level): Remove.
262 (find_binding): New function.
263 (binding_for_name): Call it.
264 (namespace_binding, set_namespace_binding): New functions.
265 (push_namespace): Associate binding level with new namespace,
266 resume_binding_level for existing namespace. Remove old code.
267 Fake std by counting.
268 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
269 (maybe_push_to_top_level): Save current namespace.
270 (pop_from_top_level): Restore saved namespace.
271 (pop_namespace): Call suspend_binding_level. Remove old code.
272 (cat_namespace_levels): New function.
273 (set_identifier_type_value_with_scope): For namespace bindings,
274 set BINDING_TYPE, and use global_type_node.
275 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
276 (identifier_type_value): New function.
277 (pushtag): If no context, use current_namespace.
278 (duplicate_decls): Don't process DECL_CHAIN.
279 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
280 already set. Never reset it to NULL_TREE. Lookup global variables
281 in their namespace. Push overloaded templates if they are on
283 (pushdecl_namespace_level): New function.
284 (pushdecl_top_level): Implement using pushdecl_namespace_level.
285 (pushdecl_using_decl): New function.
286 (overloaded_globals_p): Remove.
287 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
288 them. Use namespace_binding and set_namespace_value.
289 (redeclaration_error_message): Complain if the declarations come
290 from different namespaces.
291 (lookup_tag): On namespace level, look in the BINDING_TYPE.
292 (lookup_namespace_name): Pass tree_bindings from stack. Remove
294 (select_decl): New function.
295 (lookup_name_real): Call it for qualified and unqualified lookup.
296 Pass tree_bindings from the stack.
297 If prefer_type is 1, also accept namespaces.
298 (lookup_function_nonclass): New function.
299 (init_decl_processing): Set the binding level of the global
300 namespace to global_binding_level.
301 Build a proper type list for __builtin_apply.
302 Initialize std_node to "fake std" if flag_honor_std is set.
303 Initialize global_type_node.
304 Allocated bad_alloc in namespace std if flag_honor_std.
305 (define_function): Set the DECL_CONTEXT to the current_namespace.
306 (start_decl): A namespace is not considered as a context here. If
307 the DECL_CONTEXT is a namespace, push the decl.
308 (cp_finish_decl): Check for namespaces used as initializers.
309 (grokfndecl): Add namespace parameter. Remove processing of
311 (grokvardecl): Add namespace parameter.
312 (grokdeclarator): Process SCOPEs that are namespaces. For
313 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
314 (start_function): Check for contexts that are namespaces.
315 Set context for declarations that have not been pushed.
316 (store_parm_decls): Check for ::main only.
317 (finish_function): Likewise.
318 (start_method): Check for contexts that are namespaces.
319 (start_method): Remove DECL_CHAIN processing.
320 * decl2.c (flag_honor_std): Declare.
321 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
322 (decl_namespace_list): New static global.
323 (grok_x_components): Ignore namespaces as type contexts.
324 (check_classfn): Expect OVERLOAD nodes.
325 (grokfield): Remove DECL_CHAIN processing.
326 (finish_file): Call cat_namespace_levels.
327 (merge_functions): New function.
328 (ambiguous_decl): Rewrite.
329 (lookup_using_namespace): Produce tree_bindings.
330 (qualified_lookup_using_namespace): Likewise.
331 (set_decl_namespace, decl_namespace, current_decl_namespace,
332 push_decl_namespace, pop_decl_namespace): New functions.
333 (arg_lookup): New struct.
334 (add_function, arg_assoc_namespace, arg_assoc_class,
335 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
337 (get_namespace_id, current_namespace_id): Remove.
338 (do_toplevel_using_decl): Rewrite.
339 (do_class_using_decl): Complain about namespace qualifiers.
340 (do_using_directive): Sorry if not on namespace level. Complain
341 about unknown namespaces.
342 * error.c (dump_aggr_type): Check for namespace contexts.
343 * except.c (init_exception_processing): Push terminate into std.
344 * friend.c (is_friend): A namespace is not a context, here.
345 * init.c (expand_member_init): Remove DECL_CHAIN processing.
346 (build_offset_ref): Process OVERLOAD nodes.
347 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
348 * lex.c (identifier_type): Loop using OVL_CHAIN.
349 (see_typename): Set looking_for_typename to 2.
350 (real_yylex): Likewise.
351 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
352 (do_scoped_id): Expect OVERLOAD nodes.
353 Change calling convention for qualified_lookup_using_namespace.
354 (build_lang_decl): Don't set in_namespace anymore.
355 * method.c (typevec_size): New global.
356 (build_overload_nested_name): Return if global_namespace.
357 Otherwise, always expect a declaration context.
358 (build_qualified_name): Likewise.
359 Make sure we don't write beyond typevec_size.
360 (build_decl_overload_real): Likewise.
361 Allocate one extra slot for the namespace.
362 (hack_identifier): Mark code dead.
363 Process OVERLOAD and NAMESPACE_DECL nodes.
364 * parse.y (program): Pop namespaces until in global namespace.
365 (extdef): In a using-declaration, don't discard the identifier if
366 there is no declaration.
367 (left_curly): Ignore type contexts which are namespaces.
368 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
370 * pt.c (template_class_depth): Expect types to be namespaces.
371 (determine_specialization): Simplify by expecting OVERLOAD nodes.
372 (push_template_decl): Push into namespace level.
373 Reset ctx if it is a namespace.
374 Set DECL_CONTEXT to current_namespace if not set already.
375 Ignore real contexts that are namespaces.
376 (mangle_class_name_for_template): Skip global_namespace.
377 Mangle other namepaces as declarations.
378 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
379 (lookup_template_class): Push into namespace of context.
380 If the context is a namespace, set it to global_namespace.
381 Use id_context for mangling.
382 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
383 (tsubst_friend_function): Ignore namespace contexts.
384 Push into namespace level.
385 (tsubst): Handle NAMESPACE_DECL nodes.
386 Remove DECL_CHAIN processing.
387 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
388 * ptree.c (print_lang_identifier): Print bindings.
389 (lang_print_xnode): Print OVERLOAD nodes.
390 * rtti.c (init_rtti_processing): Push type_info into std.
391 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
392 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
393 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
394 lookup_fnfields_here): Likewise.
395 Process all nodes, instead of going through TREE_CHAIN.
396 * sig.c (build_signature_pointer_or_reference_type): Set context
398 (build_signature_table_constructor): Expect OVERLOAD nodes.
399 * spew.c (yylex): Save old setting of looking_for_typename.
400 * tree.c (decl_list_length): Remove.
401 (binding_init): New function.
402 (count_functions): Rewrite.
403 (is_overloaded_fn): Expect OVERLOAD nodes.
404 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
405 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
406 ovl_member): New functions.
407 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
408 (type_unknown_p): Likewise.
409 (require_instantiated_type): Likewise.
410 (build_component_ref): Declare code dead.
411 (build_x_function_call): Create and expect OVERLOAD nodes.
412 (build_function_call_real): Check for ::main only.
413 (build_unary_op): Likewise. Expect OVERLOAD nodes.
414 (convert_for_assignment): Check for TREE_LIST before accessing
416 * decl.c (duplicate_decls): Check for namespace bindings instead
418 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
419 lookup_name_current_level, start_decl, xref_tag,
420 finish_enum): Likewise.
421 * init.c (build_offset_ref): Likewise.
422 * search.c (lookup_field): Likewise.
423 (lookup_fnfields): Likewise.
424 (dfs_debug_mark): Likewise.
425 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
426 (poplevel_class, pop_from_top_level): Likewise.
427 * decl2.c (finish_method): Likewise.
428 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
429 * decl.c (record_builtin_type): Likewise.
430 (init_decl_processing, grokfndecl): Likewise.
431 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
432 (make_lang_type): Likewise.
433 * parse.y (make_thunk): Likewise.
434 * pt.c (tsubst): Likewise.
435 * tree.c (debug_binfo): Likewise.
436 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
437 tinfo2.cc, inc/new.h: Add std qualifications.
438 * inc/new: Wrap with namespace std if __HONOR_STD.
439 * inc/typeinfo: Likewise.
441 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
443 * call.c (build_user_type_conversion_1): Handle second_conv
444 properly for templates.
446 Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
448 * method.c (build_decl_overload_real): Set TREE_USED flag to
449 zero for build_type_variants nodes as well.
451 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
453 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
455 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
457 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
458 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
459 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
460 xref.o): Add toplev.h dependencies.
462 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
464 * errfn.c (cp_error, cp_warning): Remove declarations for
465 error and warning respectively.
467 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
469 * error.c: Convert to using ctype macros defined in system.h.
470 * method.c: Likewise.
472 * lex.c: Likewise. Also remove redundant system header stuff.
474 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
476 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
477 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
478 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
479 xref.c: Add include of toplev.h.
481 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
483 * tree.c (perm_manip): Also regenerate the RTL of an extern.
484 (copy_to_permanent): Use end_temporary_allocation.
486 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
488 * init.c (expand_vec_init): The initialization of each array
489 element is a full-expression.
491 Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
493 * method.c (build_mangled_name): Add a call to build_type_variant
494 to get the right type.
496 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
498 * Makefile.in: Add .SUFFIXES.
500 * cp-tree.def: Remove NAMESPACE_DECL.
502 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
504 * call.c (build_over_call): Do evaluate arg even if it has empty
506 * decl.c (start_function): Don't push a member function.
508 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
510 * Makefile.in (g++FAQ.info): Put -o option before input file.
512 Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
514 * gxxint.texi: Add info for squangling codes K and B.
516 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
518 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
519 the expression in templates.
520 (finish_stmt_expr): Likewise.
522 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
524 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
526 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
528 * decl.c (maybe_push_to_top_level): Always clear
529 current_template_parms and processing_template_decl.
530 (pushtag): Remove check of current_class_type and some comments,
531 since maybe_push_to_top_level no longer creates confusion.
533 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
535 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
536 (DECL_CLASS_TEMPLATE_P): Likewise.
537 (DECL_PRIMARY_TEMPLATE): Likewise.
538 (PRIMARY_TEMPLATE_P): Use it.
539 (push_template_decl_real): New function.
540 (redeclare_class_template): Take new template parameters as
542 (is_specialization_of): New function.
543 (comp_template_args): Declare.
544 * decl.c (pushtag): Handle friend template classes.
545 (xref_tag): Likewise. Use new calling convention for
546 redeclare_class_template.
547 * decl2.c (grok_x_components): Handle friend templates.
548 * friend.c (is_friend): Use is_specialization_of where
549 appropriate. Deal with friend class templates.
550 (make_friend_class): Let a class template be friends with itself.
551 * pt.c (comp_template_args): Remove declaration.
552 (tsubst_friend_class): New function.
553 (push_template_decl_real): New function.
554 (push_template_decl): Use it.
555 (redeclare_class_template): Adjust for new calling convention.
556 (comp_template_args): Give it external linkage.
557 (instantiate_class_type): Use tsubst_friend_class to deal
558 with friend templates.
559 * typeck.c (comptypes): Use comp_template_args, rather than
561 * parse.y (component_decl): Handle a nested template type
562 like other component type declarations.
564 * pt.c (check_explicit_specialization): Handle overloaded
565 constructors correctly.
567 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
568 (lookup_template_class): Use it.
570 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
572 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
573 * cp-tree.h: Add WRAPPER support.
574 * call.c (add_candidate): Split out from add_*_candidate fns.
575 (build_over_call): Take the candidate instead of function and args.
576 Enforce access control here. Emit overload warnings here.
577 (add_warning): New fn.
578 (joust): Add WARN parm. If not set, call add_warning instead of
579 printing a warning. Reenable some warnings.
581 (convert_like): Adjust.
582 (build_new_op): Adjust.
583 (build_new_function_call): Adjust.
584 (build_user_type_conversion_1): Adjust.
585 (USER_CONV_FN): Adjust.
586 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
587 build_int_wrapper): New fns.
589 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
591 * pt.c (unify): Fix typo in previous change.
593 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
595 * error.c (dump_type_real): Declare canonical_name.
597 * typeck.c (comp_target_types): Fix PMFs.
599 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
601 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
602 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
605 * pt.c (tsubst): Decrease the template-level of
606 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
608 (template_decl_level): New function.
609 (unify): Make sure to record unifications for template
610 parameters, even when the parameters exactly match the arguments.
611 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
612 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
613 aren't from the level we're currently working on.
615 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
617 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
619 * decl2.c (check_member_template): Set DECL_IGNORED for member
620 class templates, too.
622 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
624 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
626 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
628 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
630 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
631 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
632 (init_decl_processing): Handle TI types.
633 * typeck.c (unsigned_type, signed_type): Handle TI types.
635 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
637 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
638 New local added_libraries. Increment count when add library to
641 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
643 * cp-tree.h (type_as_string_real): New function.
644 * pt.c (mangle_class_name_for_template): Use it.
645 * error.c (dump_aggr_type): Change prototype.
646 (dump_type_prefix): Likewise.
647 (dump_type_suffix): Likewise.
648 (dump_type_real): Convert from dump_type. If desired, the
649 "canonica" name of a typedef, i.e., the name of the underlying
650 type, can be printed.
651 (dump_type): Call dump_type_real.
653 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
655 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
657 * typeck.c (comp_target_types): Tweak pedantic case.
658 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
659 Return -1 or 1 instead of 1 or 2.
660 (compparms): Remove STRICT handling.
661 (convert_for_assignment): Fix handling of pmfs.
663 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
665 * typeck.c (comp_target_types): Handle references like pointers.
666 (comp_target_parms): Note that return code from comp_target_types
667 can be negative to indicate failure.
669 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
671 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
672 which requires a working target compiler to build.
674 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
676 * tree.c (avoid_overlap): Add prototype.
678 * spew.c (num_tokens): Add prototype.
679 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
681 * search.c (dfs_check_overlap): Add prototype.
682 (dfs_no_overlap_yet): Likewise.
684 * pt.c (original_template): Add prototype.
685 (inline_needs_template_parms): Likewise.
686 (push_inline_template_parms_recursive): Likewise.
687 (retrieve_specialization, register_specialization): Likewise.
688 (print_candidates, reduce_template_parm_level): Likewise.
689 (build_template_decl, mark_template_parm): Likewise.
690 (tsubst_friend_function, get_bindings_real): Likewise.
692 * method.c (start_squangling): Add prototype.
693 (end_squangling, check_ktype, issue_ktype): Likewise.
694 (build_overloaded_scope_ref, check_btype): Likewise.
695 (build_mangled_template_parm_index): Likewise.
697 * lex.c (init_cpp_parse): Add prototype.
698 (handle_cp_pragma, handle_sysv_pragma): Likewise.
699 (reduce_cmp, token_cmp): Likewise.
701 * except.c (call_eh_info): Add prototype.
702 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
703 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
705 * decl2.c (is_namespace_ancestor): Add prototype.
706 (namespace_ancestor, add_using_namespace): Likewise.
707 (ambiguous_decl): Likewise.
709 * decl.c (indent): Add prototype.
711 * call.c (add_template_candidate_real): Add prototype.
713 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
715 * decl2.c (build_expr_from_tree): Just return a PMF.
717 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
719 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
720 when doing initializations.
722 * pt.c (unify): Use comptypes to compare type args.
724 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
726 * decl.c (duplicate_decls): Fix check for when it's safe to free
729 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
732 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
734 * pt.c (build_template_parm_index): Add prototype.
736 * search.c (my_tree_cons): Don't clear words outside the
737 newly allocated node.
739 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
741 * lex.c (init_parse): Now returns char* containing the filename.
743 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
744 Jeff Law <law@cygnus.com>
746 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
749 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
751 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
753 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
755 * decl.c (duplicate_decls): Don't warn for redundant decls if
756 friend: let add_friend take care of it.
758 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
760 * sig.c (build_signature_pointer_constructor): Don't set
761 TREE_HAS_CONSTRUCTOR for a signature pointer.
762 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
763 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
765 * typeck.c (build_unary_op): Only allow taking the address of a
767 * typeck2.c (digest_init): Simplify.
768 (store_init_value): Don't pedwarn about using { } for pmfs.
770 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
772 * cp-tree.h (start_decl): Update prototype.
773 * decl.c (start_decl): Like the C version, new parameters
774 for the attributes. Call cplus_decl_attributes here,
775 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
776 (grokdeclarator): Pass NULL for new start_decl arguments.
777 * pt.c (tsubst_expr): Likewise.
778 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
779 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
780 * lex.c (build_lang_decl): Add lang_name_java.
781 * class.c (push_lang_context): Add lang_name_java.
782 * method.c (build_mangled_name): Check for is_java_type.
784 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
786 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
787 * call.c (build_scoped_method_call): Check for TREE_CODE for
788 VOID_TYPE instead of type == void_type_node.
789 (build_method_call): Ditto.
790 * decl.c (lookup_name_real): Ditto.
791 (grokdeclarator): Ditto.
794 (start_function): Ditto.
795 (finish_function): Ditto.
796 (start_method): Ditto.
798 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
800 * lex.c (finput): New variable.
801 (init_cpp_parse): Renamed from init_parse.
802 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
803 (finish_parse): New function.
804 * cp-tree.h (init_lex, init_parse): Remove declarations.
806 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
808 * call.c (build_call): Still evaluate the actual argument.
809 * class.c (is_empty_class): Update for -fnew-abi.
811 * decl2.c: -fnew-abi implies -fsquangle.
813 * method.c (do_build_assign_ref): Don't do anything to copy
815 (do_build_copy_constructor): Likewise.
816 * call.c (build_over_call): Likewise.
818 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
820 * tree.c (avoid_overlap): Return a value.
822 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
824 * method.c (check_btype): Add missing argument to xrealloc.
825 (check_ktype): Likewise.
827 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
829 Implement empty base optimization.
830 * class.c (finish_struct_1): Add vbase fields earlier. Set
831 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
832 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
833 (types_overlap_p): New fn.
834 * tree.c (avoid_overlap): New fn.
835 (build_base_fields): Use it to avoid overlapping empty bases.
836 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
838 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
840 Re-implement allocation of base class subobjects.
841 * tree.c (unshare_base_binfos): New fn.
842 (layout_basetypes): Use it. Now handles offsets of both virtual and
843 non-virtual bases, after layout_type.
844 (layout_vbasetypes): Remove.
845 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
846 (build_vbase_pointer_fields): Split out from old layout_basetypes.
847 * class.c (finish_base_struct): Lose offset handling code.
848 Move nonvdtor warning here. Don't mess with t_binfo anymore.
849 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
852 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
854 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
855 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
856 * class.c (duplicate_tag_error): Likewise.
857 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
858 * tree.c (layout_vbasetypes): Update from layout_record, remove
859 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
860 (layout_basetypes): Likewise.
862 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
864 * class.c, Make sure system.h is included just after config.h.
865 Delete lingering stdio and errno references too.
866 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
868 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
870 * friend.c (is_friend): Fix access control for local classes.
872 * class.c (is_empty_class): New fn.
873 * call.c (build_call): Don't pass empty class objects to a function.
875 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
877 * call.c (build_over_call): Do name resolution for default
878 arguments of function templates in the scope of the templates.
880 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
882 * call.c: Include system.h. Remove includes, declarations and
883 defines provided by system.h.
884 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
885 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
886 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
887 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
888 * typeck2.c, xref.c: Likewise.
889 * Makefile.in: Dependencies updated as appropriate.
890 * Make-lang.in: Likewise.
892 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
894 * pt.c (fn_type_unification): Allow incomplete unification without
895 an immediate error message.
897 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
899 * tree.c (member_p): New fn.
900 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
901 initializing class members.
903 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
904 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
906 * call.c (build_method_call): Handle non-scoped destructors, too.
907 * pt.c (tsubst_copy): Likewise.
909 * pt.c (print_template_context): Split out...
910 (push_tinst_level): ...from here.
912 * friend.c (is_friend): Don't pass a type to decl_function_context.
914 * typeck.c (convert_for_initialization): Always hand off
915 conversions to class type.
917 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
919 * friend.c (is_friend): Local classes have the same access as the
922 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
924 * typeck.c (expand_target_expr): Delete dead function.
926 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
928 * repo.c (save_string): Delete dead function.
930 * method.c (thunk_printable_name): Delete dead function.
932 * lex.c (yynextch): Delete dead function.
934 * expr.c (tree_extract_aggr_init): #if 0 out.
936 * except.c (do_unwind): Delete dead function.
937 (easy_expand_asm): Likewise.
939 * cvt.c (build_conversion_type_1): Delete dead function.
941 * cp-tree.h (push_expression_obstack): Declare.
943 * call.c (source_type): #if 0 out.
945 * class.c (alter_access): Remove unused label. Add braces
946 around empty else clause.
948 * lex.c (yyprint): Fix argument to printf.
950 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
952 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
954 * pt.c (instantiate_class_template): Make sure template
955 arguments are permanent.
956 * init.c (resolve_offset_ref): Don't go looking around in
959 * semantics.c: Add routines to handle expressions, and some
960 declaration processing.
962 (current_class_depth): Move declaration to cp-tree.h.
963 * parse.c: Regenerated.
964 * cp-tree.h: Use them.
965 (current_class_depth): Declare.
966 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
968 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
970 * error.c (dump_decl): Be a bit more explicit with template
971 type arguments, when verbose.
973 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
975 * inc/exception: Reorder closing braces.
977 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
979 * pt.c (redeclare_class_template): New function.
980 * cp_tree.h (redeclare_class_template): Declare it.
981 * decl.c (xref_tag): Use it.
983 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
985 * call.c (build_over_call): Check IS_AGGR_TYPE, not
987 * typeck.c (convert_arguments): Likewise.
989 * decl.c (grokdeclarator): Remove const and volatile from type after
990 setting constp and volatilep.
992 * class.c (finish_struct_1): Don't warn about bool bitfield larger
995 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
997 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
999 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
1001 * call.c (build_object_call): Complain about ambiguous operator(),
1002 rather that crashing.
1003 (build_new_op): Likewise.
1004 (build_op_delete_call): Likewise.
1006 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
1008 * cvt.c (perform_qualification_conversions): Use comp_target_types
1009 instead of comp_ptr_ttypes.
1011 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
1013 * cp-tree.h (enforce_access): Declare.
1014 * call.c (enforce_access): Make it extern, not static.
1015 * class.c (alter_access): Use enforce_access; modify code for ISO
1016 compliance, rather than ARM rules.
1018 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1020 * cp-tree.h: Fix typo.
1022 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
1024 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
1025 if (aggregate_value_p (type)).
1027 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
1029 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
1031 * tree.c (mapcar): When dealing with a DECL, use it's constant
1033 * pt.c (lookup_template_class): Don't mangle the names of template
1034 classes whose arguments are unknown.
1036 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
1038 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
1040 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
1042 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
1044 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
1045 boolean_type_node to 1.
1047 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
1049 * error.c (dump_expr): Remove unused variable `l'.
1051 * pt.c (for_each_template_parm): New function, created by
1052 converting uses_template_parms.
1053 (tree_fn_t): New typedef.
1054 (uses_template_parms): Use it.
1055 (mark_template_parm): New function.
1056 (push_template_decl): Check that the argument list of a partial
1057 specialization uses all the template parameters.
1059 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
1060 with it; we might want it for debugging.
1061 * cp-tree.h (type_unification): Change interface.
1062 * class.c (finish_struct_1): Skip nested template types, just like
1063 ordinary nested types.
1064 (instantiate_type): Use new interface to type_unification.
1065 * lex.c (init_lex): Add __sz as opname for sizeof.
1066 * method.c (build_overload_scope_ref): New function.
1067 (build_overload_int): Handle complex expressions. Set
1068 numeric_output_need_bar if necessary.
1069 (build_overload_value): Handle non-PARM_DECL nodes; this
1070 routine is now used by build_overload_int. Remove some
1071 assignments to numeric_output_need_bar. Use
1072 build_overload_scope_ref.
1073 (build_qualified_name): Note that some template mangled names end
1074 with digits, and set numeric_output_need_bar appropriately. Use
1075 build_underscore_int.
1076 * pt.c (unify): Change interface.
1077 (type_unification_real): Likewise.
1078 (determine_specialization): Use new interfaces.
1079 (tsubst): Deal gracefully with situations in which the argument
1080 vector is not fully filled.
1081 (fn_type_unification): Use new interfaces.
1082 (type_unification): Likewise. Remove NOP_EXPR hack.
1083 (type_unification_real): Likewise.
1084 (unify): Likewise. Deal with unification of complex expresions.
1086 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
1088 * pt.c (complete_template_args): Initialize skip properly.
1090 * decl.c (make_typename_type): Revert.
1091 (make_implicit_typename): Remove.
1092 (lookup_name_real): Don't call it. Call lookup_field if we see a
1093 TYPE_DECL from a template base.
1094 * search.c (lookup_field): Do implicit typename stuff.
1096 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
1097 Geoff Noer <noer@cygnus.com>
1099 * Makefile.in: Various fixes for building cygwin32 native toolchains.
1100 * Make-lang.in: Likewise.
1102 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1104 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
1106 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
1108 * decl.c (make_implicit_typename): Rewrite removed code.
1109 (make_typename_type): Call it if the type we look up comes from
1110 a base that uses template parms.
1112 * pt.c (complete_template_args): Rewrite.
1113 (tsubst, FUNCTION_DECL): Use it.
1115 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
1117 * semantics.c (finish_asm_stmt): Fix combine strings. Call
1118 c_expand_asm_operands () if output_operands, input_operands or
1119 clobbers is not NULL_TREE.
1121 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1123 * pt.c (complete_template_args): New function.
1124 (get_bindings): Deal with specializations of function templates
1125 with return type containing parameters from outer class
1127 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
1128 substitute arguments and compose a new type.
1130 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
1132 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
1135 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
1137 * decl.c (make_implicit_typename): Lose useless code.
1139 * call.c (standard_conversion): Handle A* -> const A* properly.
1141 * pt.c (get_bindings_real): Rename from get_bindings. Add
1143 (get_bindings): Pass 1.
1144 (get_bindings_overload): Pass 0.
1146 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
1148 * pt.c (check_explicit_specialization): When reverting a static
1149 member function, also remove the `this' parameter from
1150 last_function_parms.
1152 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
1154 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
1157 * decl.c (store_bindings): Use free_binding_vecs.
1158 (pop_from_top_level): Likewise.
1160 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
1162 * decl.c (make_implicit_typename): Only change the type of a
1165 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
1167 * semantics.c: New file, containing routines to perform the
1168 semantic phase of parsing.
1170 * pt.c (tsubst_expr): Likewise.
1171 * cp-tree.h: Declare the various functions in semantics.c.
1172 Provide macros to access _STMT tree nodes.
1173 * cp-tree.def: Add ASM_STMT tree node.
1174 * Makefile.in, Make-lang.in: Add dependencies on and for
1177 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
1179 * pt.c (push_template_decl): Only check primary templates.
1181 * pt.c (check_explicit_specialization): Complain about default args
1182 in explicit specialization.
1184 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
1185 constructor_declarator.
1187 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
1189 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
1190 has no overloaded operator ->.
1192 * call.c (build_field_call): Don't crash when presented with a
1193 field that is actually a nested type.
1195 * decl.c (pushtag): Deal with friend class injection in local
1198 * call.c (build_object_call): Don't crash if OBJ is a
1199 pointer-to-member-function.
1201 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
1203 * pt.c (push_template_decl): Complain about template with C linkage,
1204 anonymous template class.
1206 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
1208 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
1209 * search.c: Likewise.
1211 * lex.c (do_pending_defargs): Only call
1212 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
1214 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
1216 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
1218 * parse.y: Deal with CONSTRUCTORS in new_initializers.
1220 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
1222 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
1223 closely mimics the behavior in parse.y.
1224 (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
1225 into a compound statement.
1227 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
1229 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
1230 * pt.c (inline_needs_template_parms): New fn.
1231 (original_template): New fn.
1232 (push_inline_template_parms_recursive): New fn.
1233 (maybe_begin_member_template_processing): Use them.
1234 (maybe_end_member_template_processing): Likewise.
1235 (is_member_or_friend_template): Rename to is_member_template.
1236 Member functions of local classes are never member templates.
1238 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1240 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
1241 added in the class scope to catch redefinition error.
1243 * pt.c (reduce_template_parm_level): Also copy
1244 the DECL_TEMPLATE_PARMS field.
1246 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
1248 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
1249 reduced-level template type parameter.
1251 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
1253 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
1254 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
1255 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
1256 * decl.c (duplicate_decls): Propagate it.
1257 * typeck2.c (abstract_virtuals_error): Use two loops to emit
1258 abstract virtual functions and virtual functions which need a
1259 final overrider separately.
1261 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
1263 * lang-specs.h: Properly put brackets around array elements in
1266 * typeck.c (build_binary_op_nodefault): Correctly place parens around
1267 && and || in expression.
1269 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
1271 * call.c (default_parm_conversions): Remove prototype definition.
1272 (build_method_call): Remove unused variable result.
1274 * cvt.c (ocp_convert): Remove unused variable conversion.
1276 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
1278 * except.c (do_unwind): #if 0 definition of unused variables fcall
1281 * expr.c (extract_scalar_init): #if 0 prototype and function
1284 * init.c (expand_aggr_init_1): Remove unused variable init_type.
1285 (build_new_1): Remove unused variable t.
1287 * pt.c (instantiate_class_template): Remove unused variable newtag;
1288 cast called function return value to void.
1289 (do_decl_instantiation): Remove unused variables name and fn.
1291 * tree.c (get_type_decl): Add default return to shut up compiler from
1292 complaining control reaches end of non-void function.
1294 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
1296 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
1298 * call.c (default_parm_conversions): Remove prototype definition.
1299 (build_method_call): Remove unused variable result.
1300 (build_over_call): Add default case in enumeration switch.
1302 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
1304 * decl2.c (lang_decode_option): Change j's type to size_t.
1306 * tree.c (layout_vbasetypes): record_align and desired_align are of
1307 type unsigned int; const_size and nonvirtual_const_size likewise.
1309 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
1311 * parse.y (new_initializer): Make sure all initializers are
1314 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
1316 * decl2.c (import_export_decl): Mark tinfo functions for
1317 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
1319 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
1321 * method.c: Fix typo.
1323 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1325 * method.c: Include "system.h" to get stdlib.h, stdio.h,
1326 ctype.h, string.h, etc.
1327 (issue_nrepeats): Add default case in enumeration switch.
1328 (check_btype): Likewise.
1329 (process_overload_item): Likewise.
1331 * Makefile.in (method.o): Depend on system.h.
1333 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1335 * lex.c (do_scoped_id): Fix parenthesizing.
1337 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
1339 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
1340 FLAG_RTTI is unset, initialize type info machinery and continue
1341 with FLAG_RTTI enabled.
1342 (get_typeid): Ditto.
1344 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
1346 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
1349 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
1351 * pt.c (finish_member_template_decl): Deal more gracefully with
1352 invalid declarations.
1354 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
1356 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
1357 cp-tree.h: Clean up more old overloading code, old RTTI code, and
1358 some formatting quirks.
1360 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
1361 method.c, pt.c, ptree.c, typeck.c: Remove support for
1362 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
1364 * Makefile.in: Adjust.
1366 * pt.c (unify): Don't allow reduced cv-quals when strict.
1368 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
1369 *type_unification* and unify.
1371 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
1373 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
1374 (nested_name_specifier): And add it before this use.
1375 (typename_sub0): And this use. Also add use without the keyword.
1376 (typename_sub1): Likewise.
1377 * pt.c (instantiate_class_template): Don't actually instantiate
1378 anything if our type uses template parms.
1380 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
1382 * decl.c (start_function): Don't call temporary_allocation for a
1385 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
1387 * pt.c (instantiate_class_template): Don't mess with friends if
1388 our type uses template parms.
1390 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
1392 * parse.y (nested_name_specifier): Use explicit_template_type.
1393 (typename_sub): Allow a template_type, an explicit_template_type,
1394 or an implicit template type at the end.
1395 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
1396 * decl.c (make_typename_type): Handle template-id where the name
1398 * call.c (build_scoped_method_call): Handle member template
1400 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
1401 destructor is represented by the type.
1403 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
1404 * parse.y (nested_name_specifier): Add 'template' case.
1405 (explicit_template_type): New rule.
1406 (typename_sub): Use it.
1407 * decl.c (make_typename_type): Handle getting a template-id for NAME.
1408 * pt.c (tsubst): Likewise.
1410 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
1412 * pt.c (add_to_template_args): Fix thinko.
1413 (instantiate_class_template): Call it later.
1415 * pt.c (get_class_bindings): Add outer_args parm.
1416 (most_specialized_class): Likewise.
1417 (instantiate_class_template): Pass it.
1418 (more_specialized_class): Likewise.
1419 (lookup_template_class): Get context from template if none
1421 (finish_member_template_decl): Don't do anything with a
1422 partial specialization.
1423 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
1425 * class.c (finish_struct): Member class templates have already been
1426 checked for name clashes.
1427 * decl.c (pushdecl_with_scope): Handle pushing at class level.
1429 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
1431 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
1432 (tsubst, *_PARM): Support multiple levels of template classes.
1433 (instantiate_class_template): Look up the pattern from the
1435 (lookup_template_class): Handle getting a template for d1.
1436 (push_template_decl): Correct setting of 'primary'.
1437 (reduce_template_parm_level): Add 'levels' parm.
1438 (finish_member_template_decl): Support member class templates.
1439 (template_class_depth): Handle multiple levels.
1440 * parse.y (component_decl_1, fn.def2): Remove member template case.
1441 (component_decl): Add member template cases.
1442 * decl2.c (check_member_template): We now handle member template
1444 * decl.c (pushtag): Handle member templates.
1445 * method.c (do_inline_function_hair): Don't touch
1446 IDENTIFIER_GLOBAL_VALUE.
1447 * init.c (build_offset_ref): If name isn't an identifier, just
1449 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
1451 * typeck.c (get_delta_difference): Do adjust for conversions to
1452 and from virtual base.
1454 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
1456 * typeck.c (get_delta_difference): Give hard error for conversion
1459 * cp-tree.h: Tweak formatting.
1461 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
1463 * decl.c (push_namespace): Handle redeclaration error.
1465 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
1466 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
1467 (NAMESPACE_BINDING): New macro.
1468 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
1471 * pt.c (push_template_decl): Use innermost_args.
1473 * decl.c (get_unique_name): Tweak from earlier in the name.
1475 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
1477 * cp-tree.def: Add CPLUS_BINDING node.
1478 * cp-tree.h (tree_binding): new struct
1479 (BINDING_SCOPE, BINDING_VALUE): new macros
1480 (current_namespace, global_namespace): declare extern
1481 (struct lang_decl_flags): new field in_namespace
1482 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
1483 (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
1484 (TREE_INDIRECT_USING): new macro
1485 * decl2.c (current_namespace, global_namespace): Declare. The
1486 value is a NAMESPACE_DECL now, not a TREE_LIST.
1487 (is_namespace_ancestor, namespace_ancestor):new static functions.
1488 (add_using_namespace, ambiguous_decl): likewise.
1489 (lookup_using_namespace): new support function for lookup_name.
1490 (qualified_lookup_using_namespace): new support function for
1491 do_scoped_id and lookup_namespace_name
1492 (get_namespace_id): mark as obsolete.
1493 (current_namespace_id): Likewise.
1494 (do_namespace_alias): Implement.
1495 (do_using_directive): Implement as call to add_using_namespace.
1496 * decl.c (binding_for_name): new function.
1497 (push_namespace, pop_namespace): implement.
1498 (push_decl): don't install a FUNCTION_DECL in the global branch.
1499 (lookup_namespace_name): implement using qualified lookup.
1500 (lookup_name_real): For global scoping, lookup in
1501 global_namespace. For namespace scoping, lookup in given
1502 namespace. For unscoped lookup, iterate over namespace,
1503 considering using directives.
1504 (init_decl_processing): initialize global_namespace.
1505 (grokvardecl): Build assembler name as static name for globals.
1506 (grokdeclarator): Remove old namespace mangling.
1507 (xref_tag): When installing a global binding for the
1508 tag, make sure we have an identifier.
1509 * method.c (build_overload_nested_name): mangle namespaces.
1510 (build_qualified_name): Likewise.
1511 (build_decl_overload_real): Likewise.
1512 * lex.c (build_lang_decl): set namespace for new declaration to
1514 (do_scoped_id): find global names in global or current
1515 namespace, or using qualified namespace lookup, depending on
1517 * init.c (build_member_call): When scope is namespace, use
1518 build_x_function_call instead.
1519 (build_offset_ref): When scope is namespace, collapse processing
1520 to lookup_namespace_name instead.
1521 * error.c (dump_decl): Support NAMESPACE_DECL.
1522 * decl.c (pushdecl): Bind globals to current namespace.
1523 (push_overloaded_decl): Likewise.
1524 (lookup_tag): Likewise.
1525 (lookup_name_current_level): Likewise.
1526 (xref_tag): Likewise.
1527 (start_function): Likewise.
1528 * lex.c (do_identifier): Likewise.
1529 (identifier_typedecl_value): Likewise.
1530 (real_yylex): Likewise.
1531 * method.c (do_inline_function_hair): Likewise.
1532 * parse.y (unscoped): Likewise.
1533 * pt.c (check_explicit_specialization): Likewise.
1534 (lookup_template_class): Likewise.
1535 * rtti.c (call_void_fn): Likewise.
1536 * sig.c (build_sigtable): Likewise.
1537 * ptree.c (lang_print_xnode): New function.
1539 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
1541 * pt.c (instantiate_class_template): Don't instantiate if pedantic
1542 and the args use template parms.
1544 * pt.c (push_tinst_level): If the instantiaton uses template parms,
1546 * decl.c (xref_basetypes): Do call complete_type for basetypes
1547 that involve template parameters.
1549 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
1551 * typeck2.c (process_init_constructor): Fix labeled init check.
1553 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
1555 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
1556 argument to tsubst and friends.
1558 * pt.c (tsubst, FUNCTION_DECL): Tidy.
1560 * typeck.c (build_x_function_call): Handle static member function
1561 templates like non-templates. Handle friend templates like normal
1563 * pt.c (tsubst, *_PARM): Don't use orig_level.
1564 (get_bindings): Don't call add_to_template_args.
1565 (instantiate_template): Likewise.
1566 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
1567 * ptree.c (print_lang_type): Print index/level for template parms.
1569 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
1571 * Make-lang.in (cc1plus): Note that cc1plus depends on
1572 cp/cp-tree.h and cp/cp-tree.def.
1574 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
1575 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
1576 position in a template parameter list.
1577 * cp-tree.h (template_parm_index): New structure, used as the tree
1578 structure for a TEMPLATE_PARM_INDEX.
1579 (TEMPLATE_PARM_IDX): New macro.
1580 (TEMPLATE_PARM_LEVEL): Likewise.
1581 (TEMPLATE_PARM_DESCENDANTS): Likewise.
1582 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
1583 (TEMPLATE_PARM_DECL): Likewise.
1584 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1585 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
1586 (TEMPLATE_TYPE_DECL): Likewise.
1587 (TEMPLATE_CONST_IDX): Remove.
1588 (TEMPLATE_CONST_LEVEL): Likewise.
1589 (TEMPLATE_CONST_SET_INFO): Likewise.
1590 (TEMPLATE_TYPE_SET_INFO): Likewise.
1591 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
1593 (TEMPLATE_TYPE_LEVEL): Likewise.
1594 * decl.c (decls_match): Call comp_template_parms, rather than
1595 expanding it inline.
1596 (duplicate_decls): If two template declarations are being merged,
1597 then their TEMPLATE_INFOs should be merged as well.
1598 (grokfndecl): Save template-id information when declaring a friend
1599 with explicit template arguments. Pass arguments to
1600 check_explicit_specialization via correct convention; at some
1601 point check_explicit_specialization changed, but these call-sites
1603 (grokdeclarator): Tidy up slightly.
1604 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
1605 two template functions with the same DECL_ASSEMBLER_NAME the same,
1606 since the names are not yet mangled.
1607 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
1608 TEMPLATE_CONST_PARM.
1609 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
1610 decl for a non-type parameter, rather than printing `<tparm ...>'.
1611 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
1612 (do_friend): Deal with template friends.
1613 * lex.c (do_pending_inlines): Call
1614 maybe_begin_member_template_processing, rather than
1615 conditionally calling begin_member_template_processing.
1616 (process_next_inline): Likewise. Call
1617 maybe_end_member_template_processing, rather than
1618 conditionally calling end_member_template_processing.
1619 (do_pending_defargs): Likewise.
1620 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
1621 TEMPLATE_CONST_PARM.
1622 * method.c (build_mangled_template_parm_index): New function.
1623 (build_overload_value): Use it.
1624 (build_overload_name): Likewise.
1625 * pt.c (finish_member_template_decl): Allow friend declarations.
1626 (template_class_depth): New function.
1627 (is_member_template): Rename, and modify, to become...
1628 (is_member_or_friend_template): New function.
1629 (end_member_template_processing): Rename, and modify, to become...
1630 (maybe_end_member_template_processing).
1631 (build_template_parm_index): New function.
1632 (reduce_template_parm_level): New function.
1633 (process_template_parm): Modify to use build_template_parm_index.
1634 (push_template_decl): Deal with friend templates.
1635 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
1636 TEMPLATE_CONST_PARM.
1637 (tsubst_friend_function): New function.
1638 (instantiate_class_template): Generate the DECL_FRIENDLIST
1639 for a new instantiation by using tsubst_friend_function rather
1641 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
1642 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
1643 appropriate new macros. Use reduce_template_parm_level to
1644 generate lower-level template parameters. Handle tsubst'ing into
1645 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
1646 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
1647 templates. Similarly for the template parameters for a new
1649 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
1650 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
1651 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
1652 (get_bindings): Call add_to_template_args if necessary.
1653 (instantiate_decl): Handle instantiations of friend templates.
1654 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
1655 TEMPLATE_TYPE_PARM as a list of fields; it's not!
1656 * spew.c (yylex): Do a little manual constant propogation to
1659 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
1661 * error.c: Include sys/types.h.
1663 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
1665 * method.c (build_mangled_name): Start CPP directives in column zero.
1667 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
1669 * typeck2.c (process_init_constructor): Sorry about non-trivial
1670 labeled initializers.
1671 * parse.y (initlist): Reenable labeled initializers.
1673 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1675 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
1676 all callers changed. Rely on the new parameter instead of arg
1677 being a TREE_LIST when determine whether we are working inside
1678 template template parameter. Clean up is_type test.
1680 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
1682 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
1683 * typeck2.c (initializer_constant_valid_p): Allow conversions
1684 between pointers and refrerences.
1686 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
1688 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
1689 if pedantic || warn_pointer_arith.
1691 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1693 * pt.c (unify): Handle TEMPLATE_DECL.
1695 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
1697 * cp-tree.h (strip_attrs): Remove decl.
1699 1998-02-18 Doug Evans <devans@cygnus.com>
1701 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
1702 Update olddecl's attributes too.
1703 (strip_attrs): Remove function.
1704 * typeck.c (common_type): Call merge_machine_type_attributes.
1706 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
1708 * parse.y (initdcl0_innards): New grammar symbol.
1709 (nomods_initdecls, nomods_initdcl0): Change type from itype to
1710 none, since the resulting value is never used.
1711 (parse_decl): New function.
1712 (datadef): Remove redundant actions.
1713 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
1714 * parse.c: Regenerated.
1716 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
1718 * parse.y (simple_stmt): Use getdecls() to check for decl.
1720 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
1722 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
1724 (c++.install-common): Install c++filt properly as native or as cross
1726 (c++.uninstall): Add c++filt.
1728 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
1730 * call.c (standard_conversion): Fix multi-level ptr conversions.
1732 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
1734 * init.c (build_new): Propagate error_mark_node up.
1736 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
1738 * parse.y (simple_stmt): If the condition isn't a declaration,
1739 start the controlled block after the test.
1741 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1743 * call.c (build_over_call): Convert builtin abs, labs and fabs to
1745 * decl.c (init_decl_processing): Reenable abs, labs and fabs as
1748 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
1750 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
1752 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
1754 * cp-tree.h: Add access_protected_virtual_node.
1755 * class.c (init_class_processing): Initialize it.
1756 * decl.c (xref_basetypes): Use it.
1757 * parse.y (base_class_access_list): Likewise.
1759 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
1760 (c++.install-common): Install c++filt.
1762 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1764 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
1766 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
1768 * call.c (reference_binding): Use comptypes when comparing
1769 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
1771 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
1773 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
1774 (really_overloaded_fn): Move check here from is_overloaded_fn.
1775 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
1777 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
1779 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
1782 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
1784 * cp-tree.h (push_template_decl): Return the decl passed in, or an
1785 equivalent duplicate.
1786 * decl.c (pushtag): Use the return value from push_template_decl.
1787 (duplicate_decls): When duplicating a template declaration, merge
1788 the DECL_TEMPLATE_RESULTs as well.
1789 (make_implicit_typename): Don't try to dive into typename types to
1790 find a context for making a new implicit typename.
1791 (start_decl): Use the return value from push_template_decl.
1792 (grokdeclarator): Complain about declarations list `const operator
1793 int'. Since we don't correctly handle in-class initializations of
1794 non-static data members, complain about this (now illegal)
1795 practice. Issue an error for initializations of non-const statics
1796 since that is illegal as well, and since we don't handle that case
1798 (start_function): Use the return value from push_template_decl.
1799 (start_method): Likewise.
1800 * decl2.c (grokfield): Likewise. Since the change to
1801 grokdeclarator ensures that all initialized fields are in fact
1802 static, remove a redundant test for TREE_PUBLIC.
1803 * parse.y (initlist): Disable labeled initializers since they do
1804 not work as per the documentation, and since they do not use the
1805 same syntax as the C front end.
1806 * pt.c (push_template_decl): Return the decl passed in, or an
1807 equivalent duplicate.
1808 (lookup_template_class): When searching in a nested context,
1809 use the right arguments.
1810 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
1811 * typeck.c (build_component_ref): Assign the correct type to the
1812 result of build_vfn_ref.
1814 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
1816 * pt.c (convert_nontype_argument): Fix typo.
1817 (check_explicit_specialization): Allow old-style specialization
1818 of class template members.
1820 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
1821 Manfred Hollstein <manfred@s-direktnet.de>
1823 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
1824 when deciding to override DECL_ASSEMBLER_NAME.
1826 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
1828 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
1829 * cp-tree.h (flag_do_squangling): Add declaration.
1830 * lang-options.h: Add -fsquangle and -fno-squangle.
1831 * method.c: Add macros and static variables for squangling.
1832 (build_overload_name): Rename to build_mangled_name, add logic for B
1833 compression, and split into process_modifiers and
1834 process_overload_item.
1835 (process_modifiers): New function, to handle constant, reference,
1837 (process_overload_item): New function, handles issue of type codes.
1838 (build_overload_name): New function, start squangling and call
1840 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
1841 (start_squangling): New function to initialize squangling structs.
1842 (end_squangling): New function to destroy squangling structs.
1843 (nrepeats): Rename variable to Nrepeats.
1844 (issue_nrepeats): New function for issuing 'n' type repeats.
1845 (check_ktype): New function to check for type K name compression.
1846 (build_overload_nested_name): Add a check for K name compression.
1847 (build_qualified_name): Add a check for K name compression and don't
1848 use DECL_ASSEMBLER_NAME when squangling is on.
1849 (check_btype): New function, checks for B type compression.
1850 (build_static_name, build_decl_overload_real): Initiate squangling.
1851 (build_typename_overload, build_overload_with_type): Initiate
1854 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
1856 * method.c (make_thunk): Avoid name buffer overflow.
1858 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
1860 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
1861 don't define them yet.
1863 * parse.y (nomods_initdcl0): Add constructor_declarator case.
1865 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1867 * config-lang.in (diff_excludes): Use basename only.
1869 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
1871 * tinfo2.cc: Add tinfo for signed char.
1873 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
1875 * search.c (compute_access): Handle protected constructors in derived
1876 classes as accessible.
1878 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
1880 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
1881 Call convert_from_reference sooner.
1883 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
1885 * cvt.c (ocp_convert): Obtain the constant values from constant
1886 decls even if the destination type is the same as the type of the
1889 * decl2.c (finish_file): Make sure that static inlines with
1890 definitions are not marked DECL_EXTERNAL before returning.
1892 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
1894 * decl.c: Lose arg_looking_for_template.
1895 (lookup_name_real): Likewise.
1896 * parse.y: Lose processing_template_arg, template_arg1
1897 (primary): Likewise.
1898 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
1900 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1902 * error.c (dump_decl): Fix type of default arguments for template
1903 template parameters and nontype template parameters.
1904 * parse.y (template_parm): Handle invalid default template
1905 template arguments here.
1907 * parse.y (template_parm): Use template_arg instead of PTYPENAME
1908 for default template template argument.
1909 * pt.c (coerce_template_parms): Merge default template argument
1910 codes. Can treat RECORD_TYPE as template name if it is implicitly
1911 created. Fix argument index in error message.
1912 * typeck.c (comptypes): Merge template argument comparison codes in
1913 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
1915 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
1917 * lex.c (file_name_nondirectory): Also check for '/'.
1919 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
1921 * parse.y (primary): Deal with statement-expressions in
1923 * pt.c (tsubst_copy): Handle BIND_EXPR.
1924 * tree.c (mapcar): Likewise.
1926 * call.c (add_template_candidate_real): Pass extra parameter to
1927 fn_type_unification.
1928 * cp-tree.h (fn_type_unification): Add parameter.
1929 * pt.c (fn_type_unification): Add additional parameter to deal with
1930 static member functions.
1931 (get_bindings): Deal with static member functions.
1933 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
1934 (revert_static_member_fn): Declare.
1935 * decl.c (revert_static_member_fn): Remove declaration. Change
1936 linkage from internal to external.
1937 (cp_finish_decl): Deal with virtual functions in classes local to
1939 * decl2.c (finish_file): Don't forget to emit increment/decrement
1940 expressions in initializers for file-scope variables.
1941 * parse.y (typename_sub2): If the typename doesn't names a
1942 template, rather than a type, issue an error message.
1943 * pt.c (check_explicit_specialization): Handle specializations of
1944 static member functions.
1945 (coerce_template_parms): Handle offset references to lists of
1947 * search.c (note_debug_info_needed): Don't crash when handed a
1948 type which is being defined.
1949 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
1950 that can happen with some illegal code.
1952 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1954 * call.c (user_harshness): Initialize `code' to 0.
1955 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
1956 (null_ptr_cst_p): Add parentheses around && within ||.
1957 (standard_conversion): Likewise.
1958 (z_candidate): Likewise.
1959 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
1960 (build_object_call): Likewise for `mem_args'.
1961 (build_new_op): Likewise for `mem_arglist'. Add `return' from
1962 default case in enumeration switch.
1964 * class.c (build_vtable_entry): Add explicit braces to avoid
1966 (build_class_init_list): Likewise.
1967 (finish_struct_1): Initialize `width' to 0.
1968 (instantiate_type): Initialize `name' to NULL_TREE. Add
1969 explicit braces to avoid ambiguous `else'.
1971 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
1974 * decl.c (grok_reference_init): Eliminate unused parameter, all
1976 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
1977 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
1978 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
1979 (grokdeclarator): Add parentheses around && within ||. Add
1980 explicit braces to avoid ambiguous `else'.
1981 (grokparms): Initialize `type' to NULL_TREE.
1982 (xref_tag): Remove unused label `just_return'.
1983 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
1984 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
1985 (hack_incomplete_structures): Add parentheses around assignment
1986 used as truth value.
1988 * decl2.c (coerce_delete_type): Hide definition of `e3'.
1990 * error.c: Include <stdlib.h>.
1991 (dump_expr): Change the type of `i' to size_t. Remove unused
1994 * except.c (init_exception_processing): Remove unused variable `d'.
1995 (expand_throw): Likewise for `label'.
1997 * friend.c (add_friends): Add explicit braces to avoid ambiguous
2000 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
2001 (sort_base_init): Likewise for `binfo'.
2002 (expand_member_init): Likewise for `rval'.
2003 (build_member_call): Add parentheses around assignment used as
2005 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
2006 (build_new): Initialize `nelts' to NULL_TREE. Initialize
2007 `old_immediate_size_expand' to 0.
2008 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
2009 (build_vec_delete_1): Remove unused variable `block'.
2010 (expand_vec_init): Initialize `itype' to NULL_TREE.
2012 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
2013 declaration of `index' and `rindex' with autoconf macros.
2014 (reinit_parse_for_expr): Remove unused variables
2015 `look_for_semicolon' and `look_for_lbrac'.
2016 (cons_up_default_function): Initialize `args' to NULL_TREE.
2017 (readescape): Initialize `firstdig' to 0.
2018 (real_yylex): Add parentheses around assignment used as truth value.
2020 * method.c: Include <strings.h> if we don't have <string.h>.
2021 Protect declaration of `index' with autoconf macro.
2023 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
2024 Initialize `type' to NULL_TREE.
2025 (structsp): Remove unused variable `id'.
2027 * pt.c (coerce_template_parms): Add explicit braces to avoid
2029 (lookup_template_class): Initialize `template' to NULL_TREE.
2030 (instantiate_class_template): Remove unused variable `name' and `e'.
2031 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
2032 (do_poplevel): Initialize `saved_warn_unused' to 0.
2033 (type_unification): Remove unused varable `parm'.
2034 (unify): Likewise for `j'.
2036 * repo.c (init_repo): Add parentheses around assignment used as
2038 (finish_repo): Remove unused varable `p'.
2040 * search.c (get_binfo): Initiize `type' to NULL_TREE.
2041 (get_base_distance): Likewise.
2042 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
2043 and `new_v' to NULL_TREE.
2044 (lookup_fnfields): Likewise for `rval_binfo_h'.
2045 (breadth_first_search): Add parentheses around assignment used as
2047 (get_template_base): Initialize `type' to NULL_TREE.
2049 * sig.c (append_signature_fields): Initialize `last_mfptr' to
2051 (build_signature_table_constructor): Likewise for
2052 `last_rhs_field', `pfn' and `vt_off'.
2053 (build_sigtable): Likewise for `init'.
2055 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
2056 (propagate_binfo_offsets): Likewise for `delta'.
2057 (hash_tree_cons): Initialize hashcode to 0.
2058 (can_free): Likewise for `size'.
2059 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
2061 * typeck.c (convert_sequence): Hide prototype.
2062 (common_type): Add explicit braces to avoid ambiguous `else'.
2063 (comp_target_types): Likewise.
2064 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
2065 (build_function_call_real): Add explicit braces to avoid ambiguous
2067 (convert_arguments): Initialize `called_thing' to 0.
2068 (convert_for_initialization): Initialize `savew' and `savee' to 0.
2070 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
2071 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
2072 (build_x_arrow): Likewise for `last_rval'.
2074 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
2076 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
2078 * decl.c (init_decl_processing): Use set_sizetype.
2079 * decl2.c (sizetype): Don't declare.
2080 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
2081 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
2082 (build_component_addr, unary_complex_lvalue): Likewise.
2083 * rtti.c (expand_class_desc): Likewise.
2084 * class.c (get_vfield_offset): Likewise.
2086 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
2088 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
2089 early to avoid bogus error. Handle overloaded function
2090 names provided as template arguments correctly.
2091 (coerce_template_parms): Don't mishandle overloaded functions when
2092 dealing with template template parameters.
2093 (lookup_template_class): Issue an error message, rather than
2094 crashing, when the TYPE_DECL provided is not a template type.
2096 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
2098 * class.c (instantiate_type): Don't just return a known type if
2101 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
2103 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
2104 since that code could never be reached.
2106 * error.c (dump_decl): Avoid aborting in the midst of printing an
2107 error message about an illegal template declaration.
2109 * parse.y (structsp): Print an error message, rather than crashing,
2110 when a class-head does not name a class.
2112 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
2113 template arguments as a g++ extension.
2115 * cp-tree.def (ALIGNOF_EXPR): New tree code.
2116 * decl2.c (grok_alignof): If processing_template_decl, just store
2118 * typeck.c (c_alignof): Likewise.
2119 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
2120 * error.c (dump_expr): Likewise.
2121 * pt.c (tsubst_copy): Likewise.
2122 * tree.c (cp_tree_equal): Likewise.
2123 * pt.c (uses_template_parms): Correctly determine whether or not a
2124 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
2125 folding can be done.
2127 * cp-tree.h (grok_enum_decls): Remove type parameter.
2128 * decl.c (grok_enum_decls): Likewise.
2129 * decl2.c (grok_x_components): Call grok_enum_decls
2130 unconditionally, since it will do nothing if there is no
2131 current_local_enum. Use the new calling sequence.
2132 * pt.c (tsubst_enum): Use the new calling sequence for
2135 * decl.c (start_function): Make member functions of local classes
2136 in extern inline functions have comdat linkage here...
2137 (grokdeclarator): Rather than here.
2139 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
2141 * pt.c (convert_nontype_argument): Use decl_constant_value.
2143 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
2145 * call.c (add_template_candidate_real): New function.
2146 (add_template_candidate): Use it.
2147 (add_template_conv_candidate): Likewise.
2148 (joust): Pass extra argument to more_specialized.
2149 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
2150 (is_local_class): Remove.
2151 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
2152 * cp-tree.h (is_local_class): Remove.
2153 (perform_array_to_pointer_conversion): Likewise.
2154 (finish_member_template_decl): Add.
2155 (check_explicit_specialization): Return a tree, not an int.
2156 (more_specialized): Take additional argument.
2157 (get_bindings): Likewise.
2158 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
2159 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2160 (perform_array_to_pointer_conversion): Remove.
2161 * decl.c (saved_scope): Add processing_specialization,
2162 processing_explicit_instantiation fields.
2163 (maybe_push_to_top_level): Save them.
2164 (pop_from_top_level): Restore them.
2165 (grokfndecl): Use new return value from
2166 check_explicit_specialization.
2167 (start_decl): Don't check flag_guiding_decls before pushing
2169 (cp_finish_decl): Remove previous (bogus) change.
2170 (grok_declarator): Use decl_function_context rather than
2172 * decl2.c (finish_file): Pass extra argument to get_bindings.
2173 (build_expr_from_tree): Let build_x_component_ref check
2174 validity of arguments rather than doing it here.
2175 * lex.c (cons_up_default_function): Remove code fooling with
2176 processing_specialization, processing_explicit_instantiation
2177 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
2178 * method.c (build_overload_identifier): Mangle local classes in
2179 template functions correctly.
2180 * parse.y (finish_member_template_decl): Move to pt.c.
2181 * pt.c (finish_member_template_decl): Moved here from parse.y.
2182 (print_candidates): New function.
2183 (determine_specialization): Change interface. Properly look for
2184 most specialized versions of template candidates.
2185 (check_explicit_specialization): Fully process explicit
2187 (push_template_decl): Avoid looking at CLASSTYPE fields in
2189 (determine_overloaded_function): Remove.
2190 (convert_nontype_argument): Change name from
2191 convert_nontype_parameter. Use determine_overloaded_function
2192 instead of instantiate_type.
2193 (mangle_class_name_for_template): Handle type contexts as well as
2195 (classtype_mangled_name): Likewise.
2196 (lookup_template_class): Likewise.
2198 (more_specialized): Take explict template arguments as a
2200 (most_specialized): Likewise.
2201 (get_bindings): Likewise. Check that return types match before
2202 proclaiming a function a match.
2203 (do_decl_instantiation): Remove code searching for function to
2204 instantiate; that is now done in check_explicit_specialization.
2205 (add_maybe_template): Pass extra argument to get_bindings.
2206 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
2208 * typeck.c (build_component_ref): Check for invalid arguments.
2210 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
2212 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
2213 return_target and call_target are equivalent.
2215 * pt.c (type_unification_real): Just accept function parms that
2216 don't use any template parms.
2218 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
2220 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
2221 unset DECL_NOT_REALLY_EXTERN.
2223 * parse.y (typename_sub*): Fix std::.
2225 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
2227 * error.c (dump_decl): Fix type default template args.
2228 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
2230 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
2232 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
2233 (file_name_nondirectory): Use.
2235 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2237 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
2238 that are not really present. Substitute default arguments in
2239 template template arguments. Correctly convert TEMPLATE_DECL to
2240 TEMPLATE_TEMPLATE_PARM.
2241 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
2242 are no longer treated specially here.
2243 * parse.y (template_template_parm): Fix copy error.
2244 * decl.c (grokdeclarator): Warn about missing `typename' for nested
2245 type created from template template parameters.
2246 * parse.y (bad_parm): Likewise
2248 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
2249 (push_nested_class): Likewise.
2250 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
2251 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
2252 (copy_template_template_parm): Declare.
2253 * decl.c (arg_looking_for_template): New variable.
2254 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
2255 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
2256 node if arg_looking_for_template is nonzero.
2257 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
2258 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
2259 (grokdeclarator): Handle TEMPLATE_DECL.
2260 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
2261 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
2262 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
2263 (dump_decl): Handle unnamed template type parameters.
2264 Handle template template parameters.
2265 (dump_function_name): Handle template template parameters.
2266 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
2267 Handle TEMPLATE_TEMPLATE_PARM.
2268 * method.c (build_template_template_parm_names): New function.
2269 (build_template_parm_names): Handle TEMPLATE_DECL.
2270 (build_overload_nested_name, build_overload_name):
2271 Handle TEMPLATE_TEMPLATE_PARM.
2272 * parse.y (maybe_identifier): New nonterminal.
2273 (template_type_parm): Use it.
2274 (template_template_parm, template_arg1): New nonterminal.
2275 (template_parm): Add template_template_parm rules.
2276 (template_arg): Set processing_template_arg.
2277 (template_arg1): Rules moved from template_arg.
2278 (primary, nonnested_type): Set arg_looking_for_template if we are
2279 processing template arguments.
2280 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
2281 (process_template_parm): Handle template template parameters.
2282 (coerce_template_parms, comp_template_args): Likewise.
2283 (mangle_class_name_for_template, lookup_template_class): Likewise.
2284 (uses_template_parms): Handle TEMPLATE_DECL and
2285 TEMPLATE_TEMPLATE_PARM.
2286 (current_template_args): Handle TEMPLATE_DECL.
2287 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
2288 * search.c (dfs_walk, dfs_record_inheritance):
2289 Handle TEMPLATE_TEMPLATE_PARM.
2290 * tree.c (copy_template_template_parm): New function.
2291 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
2292 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
2294 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
2296 * decl.c (start_decl): Don't allow duplicate definitions of static
2299 * call.c (build_user_type_conversion_1): Handle user-defined
2300 template conversion operators correctly.
2302 * decl2.c (build_expr_from_tree): Issue an error message if the
2303 object in a COMPONENT_REF is a TEMPLATE_DECL.
2305 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
2307 * class.c (is_local_class): New function.
2308 * cp-tree.h (is_local_class): Declare it.
2309 (last_tree): Likewise.
2310 (begin_tree): Likewise.
2311 (end_tree): Likewise.
2312 (lookup_template_class): Change prototype.
2313 * decl.c (cp_finish_decl): Check for NULL where necesary.
2314 Consider FUNCTION_DECLS to declare objects with top-level binding,
2315 when calling make_decl_rtl.
2316 (grokdeclarator): Give members of local classes internal linkage.
2317 (start_function): Remove declaration of last_tree.
2318 (finish_function): Set flag_keep_inline_functions around call to
2319 rest_of_compilation if we are processing a member function in a
2321 (start_method): Call push_template_decl for member functions of
2322 local classes in template functions.
2323 * decl2.c (import_export_decl): Don't give external linkage to
2324 instantiations of templates with internal linkage.
2325 * parse.y (last_tree): Remove declaration.
2326 (template_type): Pass extra parameter to lookup_template_class.
2327 (self_template_type): Likewise.
2328 (structsp): Move call to reset_specialization into left_curly.
2329 (left_curly): Call reset_specialization, and begin_tree.
2330 * pt.c (saved_trees): New variable.
2331 (mangle_class_name_for_template): Change prototype. Use
2332 additional function context to name local classes in templates
2334 (classtype_mangled_name): Pass the context.
2335 (push_template_decl): Handle local classes and templates, and
2336 member functions for such classes.
2337 (convert_nontype_parameter): Fix handling of pointer-to-member
2339 (lookup_template_class): Handle local classes in templates.
2340 (tsubst): Likewise. Don't assume that template instantiations
2341 have external linkage; pay attention to the template declaration.
2342 (mark_decl_instantiated): Likewise.
2343 (begin_tree): New function.
2344 (end_tree): Likewise.
2346 * decl.c (xref_basetypes): Don't call complete_type for basetypes
2347 that involve template parameters; that can lead to infinite
2348 recursion unnecessarily.
2350 * pt.c (register_specialization): Do not register specializations
2351 that aren't ready to be registered yet.
2352 (check_explicit_specialization): Handle explicit specialization of
2353 constructors and destructors.
2354 (build_template_decl): New function.
2355 (push_template_delc): Handle out-of-class specializations of
2358 * pt.c (check_explicit_specialization): Set up the template
2359 information before registering the specialization.
2360 (coerce_template_parms): Fix thinko.
2361 (tsubst): Handle specializations of member templates correctly.
2363 * class.c (finish_struct_methods): Remove calls to
2364 check_explicit_specialization from here.
2365 (finish_struct): And insert them here.
2366 * cp-tree.h (perform_qualification_conversions): New function.
2367 (perform_array_to_pointer_conversion): Likewise.
2368 (begin_explicit_instantiation): Likewise.
2369 (end_explicit_instantiation): Likewise.
2370 (determine_specialization): Renamed from
2371 determine_explicit_specialization.
2372 (comp_template_parms): New function.
2373 (processing_explicit_instantiation): New variable.
2374 * cvt.c (perform_qualification_conversions): New function.
2375 (perform_array_to_pointer_conversion): Likewise.
2376 * decl.c (duplicate_decls): Don't consider template functions
2377 alike unless they have the same parameters. Refine handling of
2378 instantiation/specialization mismatches.
2379 (start_decl): Don't call pushdecl for template specializations,
2380 since they don't affect overloading.
2381 (start_function): Likewise
2382 (grokfndecl): Call check_explicit_specialization a little later.
2383 Don't call duplicate_decls for memberm template specializations.
2384 (grokdeclarator): Don't update template_count for classes that are
2385 themselves specializations. Remove use of `2' as parameter to
2386 grokfndecl since that value isn't used.
2387 * lex.c (cons_up_default_function): Save and restore
2388 processing_explicit_instantiation around calls to grokfield.
2389 * parse.y (finish_member_template_decl): New function.
2390 (component_decl_1): Use it.
2391 (fn.def2): Likewise.
2392 (template_arg_list_opt): New nonterminal.
2393 (template_type): Use it.
2394 (self_template_type): Likewise.
2395 (template_id): Likewise.
2396 (object_template_id): Likewise.
2397 (notype_template_declarator): Likwise.
2398 (begin_explicit_instantiation): Likewise.
2399 (end_explicit_instantiation): Likewise.
2400 (explicit_instantiation): Use them.
2401 * pt.c (coerce_template_parms): Add parameters.
2402 (processing_explicit_instantiation): New variable.
2403 (convert_nontype_parameter): New function.
2404 (determine_overloaded_function): Likewise.
2405 (begin_explicit_instantiation): Likewise.
2406 (end_explicit_instantiation): Likewise.
2407 (retrieve_specialization): Likewise.
2408 (register_specialization): Likewise.
2409 (processing_explicit_specialization): Removed.
2410 (determine_specialization): Handle specializations of member
2411 functions of template class instantiations.
2412 (check_explicit_specialization): Refine to conform to standard.
2413 (comp_template_parms): New function.
2414 (coerce_template_parms): Call convert_nontype_parameter.
2415 (tsubst): Refine handling of member templates. Use
2416 register_specialization.
2417 (instantiate_template): Use retrieve_specialization.
2418 (do_decl_instantiation): Likewise.
2419 (instantiate_decl): Likewise.
2420 (type_unification): Improve handling of explict template
2422 * tree.c (mapcar): Return error_mark_node, rather than aborting,
2423 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
2424 * typeck.c (build_unary_op): Call determine_specialization, rather
2425 than determine_explicit_specialization.
2427 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
2429 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
2431 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2433 * error.c (dump_decl): For enum tags, output the tag, not its value.
2435 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
2437 * decl.c (init_decl_processing): Only call init_rtti_processing
2440 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
2442 * init.c (build_new_1): Split out from build_new.
2443 (build_new): Just return a NEW_EXPR.
2444 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
2446 * decl2.c (get_temp_regvar): Tweak.
2448 * cp-tree.h (TREE_CALLS_NEW): Comment out.
2449 * class.c (resolves_to_fixed_type_p): Remove use.
2450 * method.c (build_opfncall): Likewise.
2451 * call.c (build_new_op): Likewise.
2453 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
2455 * exception.cc (__eh_alloc, __eh_free): New fns.
2456 (__cp_push_exception, __cp_pop_exception): Use them.
2457 (__uncatch_exception): Call terminate here if no exception.
2458 * except.c (build_terminate_handler): New fn.
2459 (expand_start_catch_block): Use it.
2460 (expand_exception_blocks): Likewise.
2461 (alloc_eh_object): New fn.
2462 (expand_throw): Use it. Protect exception init with terminate.
2463 * typeck.c (build_modify_expr): Remove code that ignores trivial
2466 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2468 * call.c (add_builtin_candidate): Add default case in enumeration
2470 (build_new_op): Likewise.
2471 (convert_like): Likewise.
2472 * cvt.c (build_expr_type_conversion): Likewise.
2473 * tree.c (real_lvalue_p): Likewise.
2474 (lvalue_p): Likewise.
2475 (cp_tree_equal): Likewise.
2476 * typeck.c (comptypes): Likewise.
2477 (build_component_ref): Likewise.
2478 (build_function_call_real): Likewise.
2479 (build_binary_op_nodefault): Likewise.
2480 (build_unary_op): Likewise.
2481 (build_modify_expr): Likewise.
2482 * typeck2.c (initializer_constant_valid_p): Likewise.
2484 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
2486 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
2488 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
2490 * pt.c (coerce_template_parms): Make sure to digest_init if
2493 * decl.c (duplicate_decls): Make the newdecl virtual if the
2494 olddecl was, just as is done with other attributes of olddecl.
2496 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
2498 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
2499 address of an OFFSET_REF.
2501 * cp-tree.def: Add AGGR_INIT_EXPR.
2502 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
2503 AGGR_INIT_EXPR where appropriate.
2504 * expr.c (cplus_expand_expr): Likewise. Simplify.
2506 * decl2.c (finish_file): Remove call to register_exception_table.
2508 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2510 * pt.c (instantiate_class_template): Don't do injection when
2511 processing_template_decl is true, as pollutes current_binding_level
2514 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
2516 * pt.c (maybe_fold_nontype_arg): Add prototype.
2518 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2520 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
2521 * error.c (dump_expr): Likewise.
2523 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
2525 * typeck.c (build_function_call_real): Remove "inline called before
2526 definition" pedwarn.
2528 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
2530 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2532 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
2534 * pt.c (type_unification_real): Change __null to type void* with
2537 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
2539 * call.c (implicit_conversion): Don't call
2540 build_user_type_conversion_1 with a NULL expr, since it will
2543 * pt.c (unify): Don't try to unify array bounds if either array is
2546 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2548 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
2549 Replace extern decls with casts.
2551 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
2552 Update last_parm_cleanup_insn.
2553 (store_after_parms): Remove.
2554 * cp-tree.h: Adjust.
2556 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2558 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
2559 (finish_file): Check DECL_COMDAT instead of weak|one_only.
2560 (import_export_vtable): Use make_decl_one_only instead of
2561 comdat_linkage for win32 tweak.
2562 (import_export_decl): Likewise.
2563 * pt.c (mark_decl_instantiated): Likewise.
2565 * decl2.c (finish_file): Lose handling of templates in pending_statics.
2567 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
2569 * decl2.c (finish_file): Lose call to expand_builtin_throw.
2570 * except.c (expand_builtin_throw): Remove.
2571 * cp-tree.h: Remove ptr_ptr_type_node.
2574 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
2576 * decl.c (ptr_ptr_type_node): Define.
2577 (init_decl_processing): Initialize it.
2578 * cp-tree.h: Declare it.
2579 * exception.cc (__cp_exception_info): Use __get_eh_info.
2580 (__cp_push_exception): Ditto.
2581 (__cp_pop_exception): Ditto.
2583 From Scott Snyder <snyder@d0sgif.fnal.gov>:
2584 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
2586 (init_exception_processing): Removed saved_pc initialization.
2588 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
2590 * pt.c (instantiate_decl): Defer all templates but inline functions.
2592 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
2594 * init.c (expand_vec_init): Don't fold a list of parameters.
2596 * decl.c (copy_args_p): Handle copy elision for types with virtual
2598 * call.c (build_over_call): Likewise.
2600 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
2602 * pt.c (lookup_template_function): Copy the template arguments,
2603 not just the list containing them, to the permanent obstack.
2605 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
2607 * except.c (expand_start_catch_block): suspend_momentary for the
2610 * error.c (dump_decl): Handle LOOKUP_EXPR.
2612 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
2614 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
2615 permanent obstack if we are processing a template decl.
2616 * typeck.c (build_static_cast): Likewise.
2617 (build_const_cast): Likewise.
2618 (build_reinterpret_cast): Likewise.
2620 * pt.c (coerce_template_parms): Coerce some expressions, even
2621 when processing_template_decl.
2623 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2625 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
2626 handling of pointer difference expressions.
2628 * typeck.c (comp_target_types): Comparison of function/method types
2629 is independent of nptrs.
2631 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
2633 * pt.c (tsubst): Avoid creating pointer to reference and
2634 reference to reference types.
2636 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2638 * parse.y (do_id): New nonterminal.
2639 (template_id): Use it.
2641 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
2643 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
2644 * spew.c (yylex): Don't do_identifier here.
2645 * decl2.c (build_expr_from_tree): Revert last change.
2647 * decl2.c (build_expr_from_tree): Expand the name for a method call.
2648 * parse.y (object_template_id): Don't try to take the DECL_NAME.
2650 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
2652 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
2654 * call.c (build_op_delete_call): Adjust.
2656 * except.c (expand_end_catch_block): Lose rethrow region.
2657 (expand_start_catch_block): Likewise.
2658 (expand_end_catch_block): Don't expand_leftover_cleanups.
2660 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2662 * pt.c (tsubst): Remove tree_cons call (places redundant info into
2663 DECL_TEMPLATE_INSTANTIATION).
2665 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
2667 * tree.c (is_overloaded_fn): Handle getting a fn template.
2668 (really_overloaded_fn): Likewise.
2669 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
2670 * pt.c (check_explicit_specialization): Tweak.
2671 (determine_explicit_specialization): Tweak.
2673 * tree.c, cp-tree.h (get_target_expr): New fn.
2675 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
2677 * pt.c (check_explicit_specialization): Fix misspelling in
2678 diagnostic: `preceeded'.
2679 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
2682 1997-12-02 Mark Mitchell <mmitchell@usa.net>
2684 * pt.c (determine_explicit_specialization): Avoid an internal
2685 error for bad specializations.
2687 * method.c (build_overload_value): Handle SCOPE_REF.
2689 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
2691 * class.c (prepare_fresh_vtable): Enable even more complex MI
2694 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
2696 * exception.cc (__check_eh_spec): Optimize a bit.
2698 * exception.cc (__cp_pop_exception): Lose handler arg.
2699 * except.c (do_pop_exception): Likewise.
2700 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
2701 (expand_end_catch_block): Likewise.
2703 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2705 * pt.c (check_explicit_specialization): Complain about using a
2706 template-id for a non-specialization.
2708 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
2710 * repo.c: Prototype rindex only if needed.
2713 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2715 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
2717 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
2719 * typeck.c (build_const_cast): Handle references here instead of
2720 handing off to convert_to_reference.
2722 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
2723 TerminateFunctionCall.
2724 (init_exception_processing): Likewise. Terminate et al are now
2725 the fns, not ADDR_EXPRs.
2726 (various): Lose redundant assemble_external calls.
2727 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
2729 * cp-tree.h (struct lang_decl_flags): Add comdat.
2730 (DECL_COMDAT): New macro.
2731 * decl.c (duplicate_decls): Propagate it.
2732 (cp_finish_decl): Handle it.
2733 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
2735 * class.c: Remove static pending_hard_virtuals.
2736 (add_virtual_function): Take pointers to pending_virtuals
2737 and pending_hard_virtuals.
2738 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
2740 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
2742 * decl2.c (import_export_vtable): If we support one_only but not
2743 weak symbols, mark instantiated template vtables one_only.
2744 (import_export_decl): Likewise for tinfo functions.
2745 (finish_vtable_vardecl): Also write out vtables from explicitly
2746 instantiated template classes.
2747 * pt.c (mark_class_instantiated): Revert last change.
2749 * except.c (expand_throw): Call mark_used on the destructor.
2751 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
2753 * lex.c (lang_init): Enable flag_exceptions by default if no
2754 command line switch was specified.
2756 1997-11-26 Mark Mitchell <mmitchell@usa.net>
2758 * pt.c (unify): Handle `void' template parameters in
2761 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
2763 * rtti.c (build_dynamic_cast): Handle template case here.
2764 (build_dynamic_cast_1): Not here.
2766 * typeck2.c (digest_init): Make copies where appropriate.
2768 * decl2.c (delete_sanity): resolve_offset_ref.
2770 * except.c: Call terminate without caching so many bits.
2772 * except.c (expand_start_catch_block): Fix catching a reference
2775 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
2777 * init.c (build_new): Copy size to the saveable obstack.
2779 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
2780 TRY_CATCH_EXPR for now.
2782 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
2784 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
2785 has DECL_LANG_SPECIFIC.
2787 * exception.cc (struct cp_eh_info): Add handlers field.
2788 (__cp_push_exception): Initialize it.
2789 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
2790 (__throw_bad_exception): Remove.
2791 * except.c (call_eh_info): Add handlers field.
2792 (get_eh_handlers): New fn.
2793 (push_eh_cleanup): Increment handlers.
2795 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
2797 * except.c (expand_start_eh_spec): Use the try/catch code.
2798 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
2799 doing everything inline.
2800 (init_exception_processing): throw_type_match now takes
2801 const void pointers.
2802 * exception.cc (__check_eh_spec): New fn.
2803 * inc/exception: Neither terminate nor unexpected return.
2804 * decl.c: Make const_ptr_type_node public.
2805 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
2807 * except.c (expand_start_catch_block): We only need the rethrow
2808 region for non-sjlj exceptions.
2809 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
2811 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
2813 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
2814 (various.o): Likewise.
2815 * inc/new: Add placement deletes. Add throw specs for default new.
2816 * new.cc (set_new_handler): Move here from libgcc2.
2817 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
2818 (new): Move from libgcc2. Throw bad_alloc.
2819 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
2820 * decl.c (init_decl_processing): Update exception specs on new and
2823 * method.c (build_decl_overload_real): Don't mess with global
2826 * init.c (build_new): Check for null throw spec, not nothrow_t.
2828 * decl.c (duplicate_decls): Don't complain about different exceptions
2829 from an internal declaration.
2831 * call.c (build_op_delete_call): Fix check for member fns again.
2833 * decl2.c (import_export_decl): Interface hackery affects
2834 virtual synthesized methods.
2836 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2838 * decl.c (start_decl): Don't just complain about a mismatched
2841 * decl.c (make_implicit_typename): Handle case where t is not
2842 actually from context.
2843 * tree.c (get_type_decl): Lose identifier case.
2844 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
2845 * parse.y (nonnested_type): Just use lookup_name.
2846 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
2848 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
2850 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
2851 T was built in C language context (for example, by
2852 output_func_start_profiler).
2854 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
2856 * decl.c (make_implicit_typename): New fn.
2857 (lookup_name_real): Use it. Use current_class_type as the context.
2859 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
2861 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
2863 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2865 * friend.c (do_friend): Warn about non-template friends in templates.
2867 * call.c (build_op_delete_call): Fix handling of inherited delete.
2869 * search.c (dfs_record_inheritance): Ignore template type parms.
2871 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
2873 * call.c (build_new_op): Fix copy error.
2874 (build_op_new_call): New fn.
2875 (build_op_delete_call): New fn.
2876 * cp-tree.h: Declare them.
2877 * init.c (build_new): Use them. Support placement delete.
2878 (build_x_delete): Use build_op_delete_call.
2879 (build_delete): Likewise.
2880 * decl2.c (delete_sanity): Likewise.
2881 (coerce_delete_type): Don't complain about placement delete.
2883 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
2885 * call.c (build_new_function_call): Remove unused 'obj' parm.
2886 * cp-tree.h, typeck.c: Adjust.
2888 * init.c (build_new): Make the cleanup last longer.
2889 (expand_vec_init): Call do_pending_stack_adjust.
2891 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
2893 * pt.c (do_type_instantiation): Fix typo.
2894 (mark_class_instantiated): If we support one_only but not weak
2895 symbols, don't mark this as known.
2897 * init.c (build_new): Handle vec delete in EH cleanup.
2899 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2901 * call.c (build_method_call): Call complete_type before checking
2904 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
2906 * decl.c (add_block_current_level): Delete.
2907 * init.c (build_vec_delete_1): Delete build_block and
2908 add_block_current_level calls.
2910 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
2912 * init.c (build_new): Handle freeing allocated memory when the
2915 * call.c (build_new_method_call): Fix flags arg.
2917 * pt.c (do_type_instantiation): Don't try to instantiate
2919 (mark_decl_instantiated): If we support one_only but not
2920 weak symbols, mark this one_only.
2921 * decl2.c (import_export_vtable): Don't defer handling of vtables
2922 if MULTIPLE_SYMBOL_SPACES.
2924 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2926 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
2928 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
2930 * except.c (do_pop_exception): Return a value.
2932 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
2934 * call.c (build_new_method_call): Handle getting a
2935 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
2936 if we got template parms.
2937 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
2939 * decl2.c (build_expr_from_tree): Tweak last change.
2940 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
2941 (maybe_fold_nontype_arg): Split out from tsubst_copy.
2942 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
2944 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2946 * pt.c (tsubst_copy): Handle explicit template arguments in
2948 * typeck.c (build_x_function_call): Likewise.
2949 * decl2.c (build_expr_from_tree): Lookup function name if it
2952 * pt.c (tsubst): Instantiate template functions properly when
2953 template parameter does not appear in function arguments and return
2955 (comp_template_args): Handle member templates required by tsubst.
2957 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
2959 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
2962 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2964 * pt.c (coerce_template_parms): Tweak error message.
2966 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
2967 return type defaults to `int', even if there are storage-class
2970 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2972 Complete nested exception support.
2973 * except.c (do_pop_exception): Split out...
2974 (push_eh_cleanup): From here. Handle the EH region by hand.
2975 (expand_start_catch_block): Add a new level for the catch parm.
2976 Move the rethrow region outside the two cleanup regions.
2977 Protect the initializer for the catch parm with terminate.
2978 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
2979 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
2980 popping off the middle of the stack.
2981 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
2982 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
2983 (build_cplus_new): Only wrap CALL_EXPRs.
2984 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
2985 the constructor call.
2987 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2989 * Make-lang.in (c++.distdir): Make inc subdirectory.
2991 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2993 * decl2.c (finish_file): Put back some code.
2995 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2997 * decl2.c (finish_file): Remove redundant code.
2998 * method.c (emit_thunk): Don't let the backend defer generic thunks.
3000 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
3002 * except.c (call_eh_info): Split out...
3003 (push_eh_info): From here.
3004 (expand_builtin_throw): Use it.
3005 (expand_start_catch_block): Move region start back.
3007 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
3009 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
3010 (real_yylex): Record wide strings using target endianness, not host.
3012 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
3014 * repo.c (rindex): Add decl unconditionally.
3015 (get_base_filename, open_repo_file): Don't cast rindex.
3016 * xref.c (rindex): Add decl unconditionally.
3017 (index): Remove unused decl.
3018 (open_xref_file): Don't cast rindex.
3020 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
3022 * class.c (build_vbase_path): Propagate the result type properly.
3024 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
3026 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
3027 remaining use of saved_throw_type with a call to get_eh_type.
3029 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
3031 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
3032 (file_name_nondirectory): New function, doing the same as the macro.
3033 (set_typedecl_interface_info): Use it instead of the macro.
3034 (check_newline): Likewise.
3035 (handle_cp_pragma): Likewise.
3037 * repo.c (get_base_filename): Cast result of rindex to char*.
3038 (open_repo_file): Likewise.
3039 * xref.c (open_xref_file): Likewise.
3040 * error.c (dump_char): Make its arg int, not char.
3042 * except.c (push_eh_info): Pass the number of fields - 1 down, not
3043 the exact number of fields.
3045 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
3047 Support for nested exceptions.
3048 * tinfo2.cc (__is_pointer): New fn.
3049 * exception.cc (struct cp_eh_info): Define.
3050 (__cp_exception_info, __uncatch_exception): New fns.
3051 (__cp_push_exception, __cp_pop_exception): New fns.
3052 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
3054 (init_exception_processing): Likewise. __eh_pc is now external.
3055 (push_eh_info): New fn.
3056 (get_eh_{info,value,type,caught}): New fns.
3057 (push_eh_cleanup): Just call __cp_pop_exception.
3058 (expand_start_catch_block): Use push_eh_info. Start the eh region
3060 (expand_end_eh_spec): Use push_eh_info.
3061 (expand_throw): Call __cp_push_exception to set up the exception info.
3062 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
3064 (expand_builtin_throw): Don't refer to empty_fndecl.
3066 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
3068 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
3070 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
3072 * method.c (build_template_parm_names, build_decl_overload_real):
3073 Add static to definitions.
3074 * pt.c (add_to_template_args, note_template_header,
3075 processing_explicit_specialization, type_unification_real): Likewise.
3076 ({determine,check}_explicit_specialization): Use a single string for
3079 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
3081 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
3082 (expand_end_catch_block): Likewise.
3083 (expand_end_eh_spec): Likewise.
3085 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
3087 * decl.c (duplicate_decls): Handle template specializations
3089 * error.c (dump_function_name): Fix printing of specializations of
3090 member functions that are not member templates.
3091 * cp-tree.h (processing_specialization): Make global.
3092 * pt.c (processing_specialization): Likewise.
3093 * lex.c (cons_up_default_function): Save and restore
3094 processing_specialization to avoid confusion.
3096 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3098 * decl.c (init_decl_processing): Give null_node unknown* type.
3099 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
3100 (common_type): Likewise.
3101 * error.c (args_as_string): Recognize null_node.
3103 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3105 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
3106 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
3108 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
3110 * Make-lang.in (g++): Include prefix.o.
3112 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
3114 * pt.c (determine_explicit_specialization): Initialize "dummy"
3115 to keep Purify quiet.
3117 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3119 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
3120 (build_overload_int): Not here.
3122 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
3124 * class.c (build_type_pathname): Remove.
3125 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
3127 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
3129 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
3130 &&label GNU extension.
3132 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
3134 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
3135 so as to avoid incorrect manglings.
3136 * method.c (build_decl_overload_real): Don't mangle return types
3139 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
3141 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
3142 scratch_tree_cons): Define as macros for now.
3143 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
3144 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
3145 typeck2.c: Use them and the expression_obstack variants.
3147 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3149 * decl.c (store_return_init): Allow classes with explicit ctors to
3150 be used with the named return values extension.
3152 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
3154 * pt.c (instantiate_decl): Fix previous change.
3156 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
3158 * pt.c (tsubst): Fix thinko.
3159 (instantiate_decl): Really use the original template.
3161 * call.c (build_new_method_call): Use simple constructor_name for
3164 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
3166 * method.c (build_underscore_int): Don't use ANSI specific
3169 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3171 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
3172 for our key method; it might have been inlined by -O3.
3174 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
3176 * decl.c (make_typename_type): Do not try to call lookup_field for
3177 non-aggregate types.
3179 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
3181 * typeck.c (build_reinterpret_cast): Tweak.
3183 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
3185 * typeck.c (build_reinterpret_cast): converting a void pointer
3186 to function pointer with a reinterpret_cast produces a warning
3187 if -pedantic is issued
3189 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
3191 * typeck.c (c_expand_return): Don't warn about returning a
3192 reference-type variable as a reference.
3194 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3196 * method.c (build_static_name): Fix typo.
3198 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
3200 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
3201 OLDDECL before we try to do DECL_USE_TEMPLATE.
3203 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3205 * decl.c (duplicate_decls): Don't warn about template instances.
3207 * typeck.c (mark_addressable): Lose ancient code that unsets
3210 * pt.c (do_decl_instantiation): Lose support for instantiating
3213 * call.c (build_new_function_call): Fix handling of null explicit
3215 (build_new_method_call): Likewise.
3217 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
3219 * method.c (build_underscore_int): Fix typo.
3221 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
3223 * tree.c (print_lang_statistics): #if 0 call to
3224 print_inline_obstack_statistics until its definition is checked in.
3226 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3228 * decl2.c (finish_file): Move dump_tree_statistics to end.
3230 * pt.c (instantiate_decl): Look for the original template.
3231 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
3232 of member templates.
3234 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3236 * Makefile.in (g++FAQ.*): New rules.
3237 (CONFLICTS): Update.
3238 * g++FAQ.texi: Moved from libg++.
3240 * parse.y (PFUNCNAME): Only specify the type once.
3242 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
3244 * lex.c (real_yylex): Clean up the code to fully behave the way
3245 the c-lex.c parser does for complex and real numbers.
3247 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3249 * method.c (build_decl_overload_real): Reformat.
3251 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
3253 * method.c (synthesize_method): If at_eof, determine our linkage.
3255 1997-09-29 Paul Eggert <eggert@twinsun.com>
3257 * lex.c (real_yylex): Treat `$' just like `_', except issue a
3258 diagnostic if !dollars_in_ident or if pedantic.
3260 * lang-specs.h (@c++): -ansi no longer implies -$.
3262 * decl2.c (lang_decode_option):
3263 -traditional and -ansi now do not mess with
3266 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3268 * Makefile.in (parse.o, decl.o): Also depend on
3269 $(srcdir)/../except.h $(srcdir)/../output.h.
3270 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
3271 $(srcdir)/../except.h $(srcdir)/../output.h.
3272 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
3275 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
3277 * expr.c (cplus_expand_expr): Make it static.
3279 * decl2.c, init.c, typeck.c: Include "expr.h".
3280 (expand_expr): Use proper values when calling the function.
3282 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
3284 * lang-options.h: new -Wold-style-cast flag.
3285 * cp-tree.h (warn_old_style_cast): new variable.
3286 * decl2.c (warn_old_style_cast): ditto.
3287 (lang_decode_option): support -Wold-style-cast.
3288 (reparse_absdcl_as_casts): produce old-style-cast warning.
3290 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3292 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
3293 TREE_USED, reset value based on already_used.
3295 * init.c (expand_member_init): Revert change.
3297 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
3299 * cp-tree.h, decl.c, decl2.c, pt.c:
3300 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
3302 * decl2.c (lang_decode_option): Add missing ;.
3304 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3306 * friend.c (do_friend): Disable injection for all template-derived
3308 * decl2.c (lang_decode_option): Handle -fguiding-decls.
3309 * parse.y (notype_template_declarator): New nonterminal.
3310 (direct_notype_declarator): Use it.
3311 (complex_direct_notype_declarator): Likewise.
3312 (object_template_id): Accept any kind of identifier after TEMPLATE.
3313 (notype_qualified_id): Don't add template declarators here.
3315 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
3317 * call.c (add_template_candidate): Add explicit_targs parameter.
3318 (build_scoped_method_call): Use it.
3319 (build_overload_call_real): Likewise.
3320 (build_user_type_conversion_1): Likewise.
3321 (build_new_function_call): Likewise.
3322 (build_object_call): Likewise.
3323 (build_new_op): Likewise.
3324 (build_new_method_call): Likewise.
3325 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
3326 (build_new_method_call): Likewise.
3328 * class.c (finish_struct_methods): Add specialization pass to
3329 determine which methods were specializing which other methods.
3330 (instantiate_type): Handle TEMPLATE_ID_EXPR.
3332 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
3334 * cp-tree.h (name_mangling_version): New variable.
3335 (flag_guiding_decls): Likewise.
3336 (build_template_decl_overload): New function.
3337 (begin_specialization): Likewise.
3338 (reset_specialization): Likewise.
3339 (end_specialization): Likewise.
3340 (determine_explicit_specialization): Likewise.
3341 (check_explicit_specialization): Likewise.
3342 (lookup_template_function): Likewise.
3343 (fn_type_unification): Add explicit_targs parameter.
3344 (type_unification): Likewise.
3346 * decl.c (duplicate_decls): Add smarts for explicit
3348 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
3350 (grokfndecl): Call check_explicit_specialization.
3352 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
3353 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
3354 (check_classfn): Handle specializations.
3356 * error.c (dump_function_name): Print specialization arguments.
3358 * friend.c (do_friend): Don't call pushdecl for template
3361 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
3363 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
3364 and -fno-guiding-decls.
3366 * lex.c (identifier_type): Return PFUNCNAME for template function
3369 * method.c (build_decl_overload_real): New function.
3370 (build_template_parm_names): New function.
3371 (build_overload_identifier): Use it.
3372 (build_underscore_int): New function.
3373 (build_overload_int): Use it. Add levels for template
3375 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
3376 (build_overload_nested_names): Handle template type parameters.
3377 (build_template_decl_overload): New function.
3379 * parse.y (YYSTYPE): New ntype member.
3380 (nested_name_specifier): Use it.
3381 (nested_name_specifier_1): Likewise.
3382 (PFUNCNAME): New token.
3383 (template_id, object_template_id): New non-terminals.
3384 (template_parm_list): Note specializations.
3385 (template_def): Likewise.
3386 (structsp): Likewise.
3387 (fn.def2): Handle member template specializations.
3388 (component_decl_1): Likewise.
3389 (direct_notype_declarator): Handle template-ids.
3390 (component_decl_1): Likewise.
3391 (direct_notype_declarator): Handle template-ids.
3392 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
3394 * pt.c (processing_specializations): New variable.
3395 (template_header_count): Likewise.
3396 (type_unification_real): New function.
3397 (processing_explicit_specialization): Likewise.
3398 (note_template_header): Likewise.
3399 (is_member_template): Handle specializations.
3400 (end_template_decl): Call reset_specialization.
3401 (push_template_decl): Handle member template specializations.
3403 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
3404 (instantiate_template): Handle specializations.
3405 (instantiate_decl): Likewise.
3406 (fn_type_unification): Handle explicit_targs.
3407 (type_unification): Likewise. Allow incomplete unification
3408 without an error message, if allow_incomplete.
3409 (get_bindings): Use new calling sequence for fn_type_unification.
3411 * spew.c (yylex): Handle PFUNCNAME.
3413 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
3414 (really_overloaded_fn): Likewise.
3415 (get_first_fn): Handle function templates.
3417 * typeck.c (build_x_function_call): Use really_overloaded_fn.
3418 Handle TEMPLATE_ID_EXPR.
3419 (build_x_unary_op): Likewise.
3420 (build_unary_op): Likewise.
3421 (mark_addressable): Templates whose address is taken are marked
3424 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3426 * decl.c (init_decl_processing): Declare __builtin_constant_p as
3427 accepting any kind of type, not only int.
3429 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
3431 * search.c (get_matching_virtual): Notice virtual bases when sorrying
3432 about covariant returns.
3434 * parse.y (member_init): Also imply typename here. Remove ancient
3435 extension for initializing base members.
3437 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3439 Handle multi-level typenames and implicit typename in base list.
3440 * parse.y (typename_sub{,[0-2]}): New rules.
3441 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
3442 (nonnested_type): New rule.
3443 (complete_type_name): Use it.
3444 (base_class.1): Use typename_sub and nonnested_type.
3445 (nested_name_specifier): Don't elide std:: here.
3446 * decl.c (make_typename_type): Handle getting a type for NAME.
3447 (lookup_name_real): Turn std:: into :: here.
3449 Rvalue conversions were removed in London.
3450 * call.c (is_subseq): Don't consider lvalue transformations.
3451 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
3452 (joust): Reenable ?: kludge.
3454 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
3456 * decl.c (start_function): Up warning of no return type to be a
3459 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3461 * init.c (expand_member_init): Don't set TREE_USED.
3462 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
3463 set,don't clear TREE_USED wholesale.
3465 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
3467 * call.c (build_over_call): Do require_complete_type before
3470 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
3472 * search.c (lookup_field): Call complete_type in all cases.
3474 * decl.c (finish_function): Just warn about flowing off the end.
3476 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3478 * decl.c (grokparms): Don't bash a permanent list node if we're
3481 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
3483 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
3485 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
3487 * call.c (build_new_op): Give better error for syntactically
3488 correct, but semantically invalid, use of undeclared template.
3490 * call.c (compare_qual): Handle pmfs.
3492 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
3493 after the exception spec.
3495 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3497 * call.c (null_ptr_cst_p): Integer type, not integral type.
3499 * call.c (joust): Disable warnings until they can be moved to the
3502 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
3504 * Makefile.in, config-lang.in: Convert to autoconf.
3506 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
3508 * decl.c (lookup_name_real): Add implicit 'typename' to types from
3511 * pt.c (most_specialized_class): Fix typo.
3512 (tsubst): Move constant folding to TREE_VEC case.
3514 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
3516 * pt.c (do_poplevel): Don't warn about unused local variables
3517 while processing_template_decl since we don't always know whether
3518 or not they will need constructing/destructing.
3520 * pt.c (uses_template_parms): Check the values of an enumeration
3521 type to make sure they don't depend on template parms.
3523 * decl.c (make_typename_type): Don't lookup the field if the
3524 context uses template parms, even if we're not
3525 processing_template_decl at the moment.
3527 * pt.c (coerce_template_parms): Avoid looking at the
3528 TYPE_LANG_DECL portion of a typename type, since there won't be
3530 (tsubst): Do constant folding as necessary to make sure that
3531 arguments passed to lookup_template_class really are constants.
3533 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
3535 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
3536 * decl2.c (finish_file): Only register exception tables if we
3539 * decl.c (init_decl_processing): Add __builtin_[fs]p.
3541 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3543 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
3545 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
3547 * error.c (dump_decl): Avoid crashing when presented with a
3548 uninitialized constant, as can occur with a template parameter.
3549 (dump_expr): Make sure that there are enough levels of
3550 current_template_parms before we start diving through them.
3552 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
3554 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
3557 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3559 * except.c (expand_throw): Call build_delete for all
3560 exception types, not just objects with destructors.
3562 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
3564 * decl.c (current_local_enum): Remove static.
3565 * pt.c (tsubst_enum): Save and restore value of current_local_enum
3566 in case template is expanded in enum decl.
3567 (instantiate_class_template) : Use new tsubst_enum signature.
3568 (tsubst_expr): Likewise.
3570 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
3572 * pt.c (begin_member_template_processing): Take a function as
3573 argument, not a set of template arguments. Use the template
3574 parameters, rather than the arguments. Handle non-type parameters
3575 correctly. Push a binding level for the parameters so that multiple
3576 member templates using the same parameter names can be declared.
3577 (end_member_template_processing): Pop the binding level.
3578 (push_template_decl): Mark member templates as static when
3581 * lex.c (do_pending_inlines): Pass the function, not its template
3582 arguments, to begin_member_template_processing.
3583 (process_next_inline): Likewise.
3584 (do_pending_defargs): Likewise.
3586 * error.c (dump_expr): Obtain the correct declaration for a
3587 TEMPLATE_CONST_PARM.
3589 * call.c (add_template_conv_candidate): New function.
3590 (build_object_call): Handle member templates, as done in the other
3593 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
3595 * decl.c (replace_defag): Undo previous change.
3596 * lex.c (do_pending_defargs): Deal with member templates.
3598 * pt.c (is_member_template): Avoid crashing when passed a
3599 non-function argument.
3601 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3603 * class.c (grow_method): Remove check for redeclaration.
3605 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
3607 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
3608 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
3609 (PRIMARY_TEMPLATE_P): Use it.
3610 * call.c (build_overload_call_real): Use it.
3611 * class.c (instantiate_type): Likewise.
3612 * decl.c (decls_match): Likewise.
3613 * method.c (build_overload_identifier): Likewise.
3614 * pt.c (push_template_decl): Likewise.
3615 (classtype_mangled_name): Likewise.
3616 (lookup_template_class): Likewise.
3618 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
3619 DECL_NTPARMS to conform to usage elsewhere.
3620 * call.c (add_template_candidate): Likewise.
3621 * class.c (instantiate_type): Likewise.
3622 * pt.c (instantiate_template): Likewise.
3623 (get_bindings): Likewise.
3625 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
3628 * pt.c (unify): Undo changes to allow multiple levels of template
3630 (type_unification): Likewise.
3631 (fn_type_unification): Likewise.
3632 (get_class_bindings): Likewise.
3633 * cp-tree.h (Likewise).
3635 * decl.c (replace_defarg): Check that the type of the default
3636 parameter does not invlove a template type before complaining
3637 about the initialization.
3639 * error.c (dump_expr): Deal with template constant parameters in
3640 member templates correctly.
3642 * pt.c (is_member_template): Deal with class specializations
3644 (tsubst): Handle "partial instantiation" of member templates
3647 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
3649 * pt.c (type_unification): Change calling squence to allow for
3650 multiple levels of template parameters.
3651 (tsubst_expr): Likewise.
3653 (tsubst_copy): Likewise.
3654 (instantiate_template): Likewise.
3656 * call.c (build_overload_call_real): Use it.
3657 (add_builtin_candidate): Use it.
3658 (build_new_method_call): Use it.
3659 * class.c (instantiate_type): Use it.
3660 * decl.c (grokdeclarator): Use it.
3661 * decl2.c (finish_file): Use it.
3662 * method.c (build_overload_identifier): Use it.
3664 * call.c (add_template_candidate): Add additional parameter for
3665 the function return type. Call fn_type_unification istead of
3667 (build_user_type_conversion_1): Handle member templates.
3668 (build_new_function_call): Likewise.
3669 (build_new_op): Likewise.
3670 (build_new_method_call): Likewise.
3672 * class.c (grow_method): Don't give an error message indicating
3673 that two member templates with the same name are ambiguous.
3674 (finish_struct): Treat member template functions just like member
3677 * cp-tree.h (check_member_template): Add declaration.
3678 (begin_member_template_processing): Likewise.
3679 (end_member_template_processing): Likewise.
3680 (fn_type_unification): Likewise.
3681 (is_member_template): Likewise.
3682 (tsubst): Change prototype.
3683 (tsubst_expr): Likewise.
3684 (tsubst_copy): Likewise.
3685 (instantiate_template): Likewise.
3686 (get_bindings): Likewise.
3688 * decl.c (decls_match): Handle multiple levels of template
3690 (pushdecl): Handle template type params just like other type
3692 (push_class_level_binding): Return immediately if the
3693 class_binding_level is NULL.
3694 (grokfndecl): If check_classfn() returns a member_template, use
3695 the result of the template, not the template itself.
3697 * decl2.c (check_member_template): New function. Check to see
3698 that the entity declared to be a member template can be one.
3699 (check_classfn): Allow redeclaration of member template functions
3700 with different types; the new functions can be specializations or
3701 explicit instantiations.
3703 * error.c (dump_decl): Handle multiple levels of template
3705 (dump_function_decl): Update to handle function templates.
3707 * lex.c (do_pending_inlines): Set up template parameter context
3708 for member templates.
3709 (process_next_inline): Likewise.
3711 * method. (build_overload_identifier): Adjust for multiple levels
3712 of template parameters.
3714 * parse.y (fn.def2): Add member templates.
3715 (component_decl_1): Likewise.
3717 * pt.c (begin_member_template_processing): New function.
3718 (end_member_template_processing): Likewise.
3719 (is_member_template): Likewise.
3720 (fn_type_unification): Likewise.
3721 (current_template_parms): Return a vector of all the template
3722 parms, not just the innermost level of parms.
3723 (push_template_decl): Deal with the possibility of member
3725 (lookup_template_class): Likewise.
3726 (uses_template_parms): Likewise.
3727 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
3728 TEMPLATE_CONST_PARM to deal with multiple levels of template
3729 arguments. Add processing of TEMPLATE_DECL to produce new
3730 TEMPLATE_DECLs from old ones.
3731 (do_decl_instantiation): Handle member templates.
3733 * search.c (lookup_fnfields_1): Handle member template conversion
3736 * tree.c (cp_tree_equal): Check the levels, as well as the
3737 indices, of TEMPLATE_CONST_PARMs.
3739 * typeck.c (comptypes): Check the levels, as well as the indices,
3740 fo TEMPLATE_TYPE_PARMs.
3741 (build_x_function_call): Treat member templates like member
3744 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3746 * typeck.c (c_expand_return): Always convert_for_initialization
3747 before checking for returning a pointer to local.
3749 * pt.c (type_unification): If strict and the function parm doesn't
3750 use template parms, just compare types.
3752 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
3754 * method.c (build_overloaded_value): Replace direct call
3755 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
3757 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
3759 * typeck.c (convert_arguments): Don't arbitrarily choose the first
3760 of a set of overloaded functions.
3762 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3764 * lex.c (real_yylex): Don't elide __FUNCTION__.
3766 * method.c (build_overload_value): Add in_template parm.
3767 (build_overload_int): Likewise.
3768 (build_overload_identifier): Pass it.
3770 * decl.c (duplicate_decls): Don't bash a previous template
3771 definition with a redeclaration.
3773 * pt.c (unify): float doesn't match double.
3775 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
3776 TYPE_DECL. Handle getting non-template types.
3777 * parse.y (explicit_instantiation): Use typespec instead of
3780 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
3782 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
3784 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
3786 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
3787 (compare_ics): Likewise.
3789 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
3791 * call.c (joust): Warn about choosing one conversion op over
3792 another because of 'this' argument when the other return type is
3794 (source_type): New fn.
3796 * call.c (build_new_op): Strip leading REF_BIND from first operand
3797 to builtin operator.
3799 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
3802 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
3804 * call.c (null_ptr_cst_p): Remove support for (void*)0.
3806 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
3808 * typeck.c (expand_target_expr): Make definition match declaration.
3810 * class.c (get_basefndecls): Make definition match declaration.
3812 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
3814 * input.c (sub_getch): Eventually give up and release the input file.
3816 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
3819 * call.c (joust): Tweak message.
3821 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
3823 * error.c (type_as_string): Put const/volatile on template type
3824 parameters where appropriate.
3826 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
3828 * call.c (strictly_better): Make arguments unsigned ints.
3830 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
3832 * lex.c (real_yylex): Refer to __complex instead of complex.
3834 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
3836 * lex.c (real_yylex): Don't use getc directly.
3838 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
3840 * call.c (is_subseq): Don't try to be clever.
3842 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3844 * parse.y, pt.c: Include "except.h".
3845 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
3846 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
3847 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
3848 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
3851 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
3853 * decl2.c (mark_vtable_entries): Instead of replacing pure
3854 virtuals with a reference to __pure_virtual, copy the decl and
3857 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
3859 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
3861 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
3863 * pt.c (instantiate_class_template): Call repo_template_used
3864 before finish_prevtable_vardecl.
3866 * call.c (is_subseq): New fn.
3867 (compare_ics): Use it.
3869 * repo.c (finish_repo): Don't crash on no args.
3871 * parse.y (named_complex_class_head_sans_basetype): Handle
3872 explicit global scope.
3873 * decl2.c (handle_class_head): New fn.
3875 * pt.c (unify): Add CONST_DECL case.
3877 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3879 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
3881 * cp-tree.h (report_type_mismatch): Add prototype.
3882 * call.c (build_overload_call_real): Remove erroneous fourth
3883 argument to report_type_mismatch.
3884 (build_user_type_conversion_1): Remove erroneous second arg to
3886 (build_new_function_call): Likewise.
3887 (build_object_call): Likewise.
3888 (build_new_op): Likewise.
3889 (build_new_method_call): Likewise.
3891 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3893 * error.c (dump_decl): Don't bother processing a function with no
3896 * method.c (emit_thunk): Call init_function_start in the macro case.
3898 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3900 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
3901 defined and used to set flag_vtable_thunks.
3903 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
3905 * parse.y: Don't clear the inlines from their obstack until they've
3908 * decl.c (duplicate_decls): Don't complain about exception
3909 specification mismatch if flag_exceptions is off.
3911 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
3913 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
3915 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
3917 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
3918 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
3919 Include <stdio.h> before include files that formerly used STDIO_PROTO.
3921 * decl.c, g++spec.c, lex.c, method.c, repo.c:
3922 Include "config.h" first, as per autoconf manual.
3924 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3926 * decl.c (duplicate_decls): Tweak wording.
3927 * lex.c (do_pending_defargs): Don't die if we see a default arg
3928 that isn't a DEFAULT_ARG.
3929 * error.c (dump_expr): Handle DEFAULT_ARG.
3931 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
3932 * lang-options.h: Add -fhandle-exceptions.
3934 * class.c (build_vtable): vtables are artificial.
3935 (prepare_fresh_vtable): Likewise.
3937 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3939 * cvt.c (ocp_convert): After converting to the target type, set
3940 LOOKUP_NO_CONVERSION.
3942 * call.c (joust): Warn about potentially confusing promotion rules
3944 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
3946 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
3948 * exception.cc: Declare __terminate_func with noreturn attribute.
3950 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
3952 * parse.y: Break out eat_saved_input, handle errors.
3953 (function_try_block): Use compstmt instead of compstmt_or_error.
3955 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
3957 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
3959 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3961 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
3962 existence of cc1plus check whether $(LANGUAGES) contains C++.
3964 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3966 * method.c (do_build_copy_constructor): When copying an anonymous
3967 union member loop around to handle nested anonymous unions. Use
3968 the offset of the member relative to the outer structure, not the
3971 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3973 * call.c (resolve_args): New fn.
3974 (build_new_function_call): Use it.
3975 (build_object_call): Likewise.
3976 (build_new_method_call): Likewise.
3978 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3980 * call.c (build_over_call): tsubst all default parms from templates.
3982 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3984 * decl.c (struct cp_function): Add static_labelno.
3985 (push_cp_function_context): Save it.
3986 (pop_cp_function_context): Restore it.
3988 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3990 * typeck.c (build_component_ref_1): Convert from reference.
3992 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3994 * parse.y (current_declspecs, prefix_attributes): Initialize to
3997 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
3998 before we try to force it to be a TREE_LIST.
3999 (decl): Make sure $1.t is non-nil.
4001 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
4003 * pt.c (uses_template_parms): Handle template first-parse codes.
4005 * decl.c (cp_finish_decl): Only warn about user-defined statics.
4007 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
4009 * pt.c (unify): Handle BOOLEAN_TYPE.
4011 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
4012 * pt.c (tsubst): Don't set it.
4013 * call.c (build_over_call): Use uses_template_parms.
4015 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
4017 * method.c (build_overload_nested_name): Use static_labelno
4018 instead of var_labelno.
4019 (build_qualified_name): New fn.
4020 (build_overload_name): Split out from here.
4021 (build_static_name): Use build_qualified_name.
4022 * decl.c (cp_finish_decl): Statics in extern inline functions
4023 have comdat linkage.
4024 (start_function): Initialize static_labelno.
4026 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
4028 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
4029 before "all member functions in class [] are private"
4031 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
4033 * lex.c (do_scoped_id): convert_from_reference.
4034 * init.c (build_offset_ref): Likewise.
4036 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
4038 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
4040 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
4042 * typeck.c (get_member_function_from_ptrfunc): Promote index
4045 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
4047 * tree.c (layout_basetypes): Move non-virtual destructor warning.
4048 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
4050 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4052 * decl.c (grokdeclarator): Call add_defarg_fn for the function
4054 * lex.c (add_defarg_fn): Adjust.
4055 (do_pending_defargs): Adjust. Don't skip the first parm.
4057 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
4059 * decl.c (build_enumerator): Global enumerators are also readonly.
4061 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
4062 (build_dynamic_cast): Call it and convert_from_reference.
4064 * lex.c (add_defarg_fn): New fn.
4065 (snarf_defarg): Don't add to defarg_types.
4066 (do_pending_defargs): Lose defarg_types. All fns we process now
4068 * decl.c (grokfndecl): Call add_defarg_fn.
4070 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
4071 * cp-tree.def: Add DEFAULT_ARG.
4072 * spew.c (yylex): Call snarf_defarg as appropriate.
4073 * parse.y: New tokens DEFARG and DEFARG_MARKER.
4074 (defarg_again, pending_defargs, defarg, defarg1): New rules.
4075 (structsp): Use pending_defargs.
4076 (parms, full_parm): Use defarg.
4077 * lex.c (init_lex): Initialize inline_text_firstobj.
4078 (do_pending_inlines): Never pass the obstack to feed_input.
4079 (process_next_inline): Call end_input instead of restore_pending_input.
4080 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
4081 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
4082 * input.c (end_input): New fn.
4083 (sub_getch): At the end of some fed input, just keep returning EOF
4084 until someone calls end_input.
4085 Remove 'obstack' field from struct input_source.
4086 * decl.c (grokparms): Handle DEFAULT_ARG.
4087 (replace_defarg): New fn.
4088 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
4090 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4092 * call.c (implicit_conversion): If nothing else works, try binding
4093 an rvalue to a reference.
4095 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
4097 * decl.c (init_decl_processing): fix Jun 30 patch -- move
4098 ifndef for Cygwin32 to include SIGSEGV.
4100 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4102 * class.c (finish_struct_1): Only complain about pointers without
4103 copy stuff if there are any constructors.
4105 * rtti.c (build_dynamic_cast): Call complete_type on the types.
4107 * decl.c (grokfndecl): If the function we chose doesn't actually
4110 * decl2.c (grokclassfn): Don't specify 'const int' for the
4111 artificial destructor parm.
4113 * pt.c (type_unification): If we are called recursively, nothing
4116 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
4118 * decl.c (init_decl_processing): Stop trying to catch signals
4119 other than SIGABRT since the Cygwin32 library doesn't support
4120 them correctly yet. This fixes a situation in which g++ causes
4121 a hang on SIGSEGVs and other such signals in our Win32-hosted
4124 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
4126 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
4128 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
4130 * typeck2.c (store_init_value): Always return the value if our
4131 type needs constructing.
4133 * method.c (hack_identifier): Convert class statics from
4136 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
4138 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
4140 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
4142 * typeck.c (c_expand_return): Make sure we clean up temporaries at
4143 the end of return x;
4145 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4147 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
4149 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
4151 * except.c (expand_builtin_throw): Add support
4152 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
4154 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
4156 * repo.c (extract_string): Null-terminate.
4158 * cp-tree.h (TI_SPEC_INFO): New macro.
4159 (CLASSTYPE_TI_SPEC_INFO): New macro.
4160 * pt.c (push_template_decl): Correctly determine # of template parms
4163 * call.c (compare_ics): Really fix 'this' conversions.
4165 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
4168 * pt.c (push_template_decl): Complain about mismatch in # of
4169 template parms between a class template and a member template.
4171 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
4173 * method.c (synthesize_method): You can't call
4174 function_cannot_inline_p after finish_function.
4175 * decl.c (finish_function): Turn on flag_inline_functions and turn
4176 off DECL_INLINE before handing a synthesized method to the
4179 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4181 * method.c (synthesize_method): Remove July 30 change to never set
4182 DECL_INLINE if at_eof.
4184 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
4186 * xref.c (GNU_xref_member): Ensure that the node has a
4187 decl_lang_specific part before checking DECL_FRIEND_P.
4189 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4191 * pt.c (instantiate_class_template): Diagnose non-class types used
4194 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
4196 * typeck.c (build_conditional_expr): Use convert_for_initialization
4197 instead of convert_and_check.
4199 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4201 * parse.y (typespec): Don't pedwarn for typeof.
4203 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
4205 * repo.c (finish_repo): Only check changes if we would write a
4208 * call.c (compare_ics): Fix handling of 'this' conversions.
4210 * pt.c (do_decl_instantiation): Support static data too. Rename
4211 from do_function_instantiation.
4212 * cp-tree.h: Adjust.
4215 * repo.c (extract_string): New fn.
4216 (get_base_filename): Use it.
4217 (init_repo): Compare old args with current args.
4219 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
4221 * Makefile.in, Make-lang.in: Protect C-ls with a comment
4222 character, idea from Paul Eggert <eggert@twinsun.com>.
4224 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
4226 * typeck.c (c_expand_return): Be more persistent in looking for
4229 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
4230 pointer to reference.
4232 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
4234 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4236 * init.c (build_member_call, build_offset_ref):
4237 Use do_scoped_id instead of do_identifier.
4239 * cvt.c (convert): Remove bogosity.
4241 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4243 * cvt.c (build_up_reference): Do checks of ARGTYPE and
4244 TARGET_TYPE before trying to use get_binfo.
4246 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
4248 * cvt.c (build_up_reference): Call get_binfo to get access control.
4250 * decl2.c (import_export_decl): If we don't support weaks, leave
4253 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
4255 * except.c (expand_builtin_throw): Add support for machines that
4256 cannot access globals after throw's epilogue when
4257 -fno-sjlj-exceptions is used.
4259 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
4261 * parse.y: 'std::' becomes '::'.
4262 * lex.c (real_yylex): Remove 'namespace' warning.
4263 * init.c (build_member_call): Ignore 'std::'.
4264 (build_offset_ref): Likewise.
4265 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
4266 (do_toplevel_using_decl): Ignore 'using std::whatever'.
4267 * decl.c (push_namespace): Just sorry.
4268 (pop_namespace): Nop.
4269 (init_decl_processing): Declare std namespace.
4271 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
4273 * search.c (push_class_decls): A name which ambiguously refers to
4274 several instantiations of the same template just refers to the
4277 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
4279 * decl.c (build_enumerator): fix problem with unsigned long
4280 enumerated values being smashed to ints, causing overflow
4281 when computing next enumerated value. (for enum values around
4284 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
4286 * typeck.c (build_component_ref): Only call mark_used on a decl.
4288 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4290 * typeck.c (build_c_cast): Make the check for a ptr to function
4291 more specific before possible default_conversion call.
4293 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
4295 * except.c (expand_exception_blocks): Simplify and fix and make
4296 sure we don't end a region in a sequence, as expand_end_bindings
4299 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
4301 * except.c (init_exception_processing): Mark terminate as not
4302 returning so that the optimizer can optimize better.
4304 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
4306 * cvt.c (convert): Don't do any extra work, if we can avoid it
4309 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
4311 * *.[chy]: Change cp_convert to ocp_convert, change convert to
4312 cp_convert. convert is now reserved for the backend, and doesn't
4313 have the semantics a frontend person should ever want.
4315 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
4317 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
4318 Lose -traditional support.
4320 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4322 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
4324 * parse.y (self_reference): Do it for templates, too.
4325 * class.c (pushclass): Don't overload_template_name; the alias
4326 generated by build_self_reference serves the same purpose.
4328 * tree.c (list_hash): Make static, take more args.
4329 (list_hash_lookup): Likewise.
4330 (list_hash_add): Make static.
4331 (list_hash_canon): Lose.
4332 (hash_tree_cons): Only build a new node if one isn't already in the
4334 (hash_tree_chain): Use hash_tree_cons.
4335 * cp-tree.h: Adjust.
4336 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
4337 of calling lookup_name.
4339 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
4341 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
4342 doesn't refer to the CONST_DECLs.
4344 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
4346 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
4348 (expand_class_desc): Convert the last argument to a sizetype.
4350 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4352 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
4353 __real__): Add reswords.
4354 * hash.h: Regenerate.
4355 * lex.h (rid): Add RID_COMPLEX.
4356 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
4357 * lex.c (init_lex): Add building of RID_COMPLEX.
4358 (real_yylex): General cleanup in line with what c-lex.c also has,
4359 sans the cruft for traditional; add handling of SPEC_IMAG, complex
4360 types, and imaginary numeric constants.
4361 * parse.y (REALPART, IMAGPART): Add tokens.
4362 (unary_expr): Add REALPART and IMAGPART rules.
4363 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
4364 * decl.c (complex_{integer,float,double,long}_type_node): Define
4366 (init_decl_processing): Set up the types.
4367 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
4368 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
4369 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4370 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
4371 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
4373 * method.c (build_overload_name): Add handling of the different
4374 COMPLEX_TYPEs, prefixing them with `J'.
4375 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
4377 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
4378 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
4379 (mapcar): Handle COMPLEX_CST.
4380 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
4381 (common_type): Add code for complex types.
4382 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4383 (convert_for_assignment): Likewise.
4384 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
4386 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
4388 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
4389 tsubst_expr, as it might try to do overload resolution.
4391 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
4393 * pt.c (instantiate_class_template): Oops.
4395 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
4397 * cp-tree.def: Add TAG_DEFN.
4398 * pt.c (tsubst_enum): New fn.
4399 (instantiate_class_template): Use it.
4400 (tsubst_expr): Support TAG_DEFN.
4401 (tsubst): Support local enums.
4402 (tsubst_copy): Likewise.
4403 * decl.c (finish_enum): Likewise.
4404 (start_enum): If this is a local enum, switch to permanent_obstack.
4406 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
4408 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
4409 (finish_function): Put the base init code for constructors just
4410 after the parm cleanup insns.
4411 (struct cp_function): Add last_parm_cleanup_insn.
4412 (push_cp_function_context): Likewise.
4413 (pop_cp_function_context): Likewise.
4415 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
4417 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
4419 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4421 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
4422 for THUNK_FNDECL before we switch to temporary allocation.
4424 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
4426 * call.c (build_new_op): Handle null arg2 for ?:.
4428 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
4430 * except.c (expand_exception_blocks): Ensure that we flow through
4431 the end of the exception region for the exception specification.
4432 Move exception region for the exception specification in, so that
4433 it doesn't protect the parm cleanup. Remove some obsolete code.
4434 * decl.c (store_parm_decls): Likewise.
4435 (finish_function): Likewise.
4437 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
4439 * init.c (build_new): Fix nothrow handling.
4441 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4443 * init.c (emit_base_init): Don't warn about the initialization
4444 list for an artificial member.
4446 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4448 * expr.c (do_case): Handle !START case for the error msg.
4450 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
4452 * decl2.c, lang-options.h: New option -Weffc++.
4453 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
4456 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
4457 to MULTIPLE_SYMBOL_SPACES.
4459 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
4461 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
4463 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
4465 * typeck.c (c_expand_return): Don't complain about returning void
4466 to void in an artificial function.
4467 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
4468 don't set DECL_RESULT, set DECL_ARTIFICIAL.
4469 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
4471 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
4473 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
4475 * except.c (init_exception_processing): Likewise.
4476 (expand_end_catch_block): Likewise.
4477 (expand_exception_blocks): Likewise.
4478 (expand_throw): Likewise.
4479 * exception.cc (__default_terminate): Likewise.
4481 * init.c (perform_member_init): Use new method of expr level
4482 cleanups, instead of cleanups_this_call and friends.
4483 (emit_base_init): Likewise.
4484 (expand_aggr_vbase_init_1): Likewise.
4485 (expand_vec_init): Likewise.
4486 * decl.c (cp_finish_decl): Likewise.
4487 (expand_static_init): Likewise.
4488 (store_parm_decls): Likewise.
4489 (cplus_expand_expr_stmt): Likewise.
4490 * decl2.c (finish_file): Likewise.
4492 * Make-lang.in (exception.o): Ok to compile with -O now.
4494 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
4495 we know it will be done later by the backend.
4497 * decl2.c (lang_f_options): Remove support for short temps.
4498 * lang-options.h: Likewise.
4500 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4502 * tree.c (varargs_function_p): New fn.
4503 * method.c (emit_thunk): Replace broken generic code with code to
4504 generate a heavyweight thunk function.
4506 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
4508 * pt.c (process_template_parm): pedwarn about floating-point parms.
4510 * decl.c (grokdeclarator): inline no longer implies static.
4512 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
4514 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
4516 * class.c (check_for_override): The signature of an overriding
4517 function is not changed.
4519 * call.c (build_over_call): Move setting of conv into the loop.
4520 Note: this change, along with the related changes of the 18th thru
4521 the 20th of April, fix an infinite loop problem in conversions.
4523 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
4525 * call.c (build_user_type_conversion_1): Really ignore rvalue
4526 conversions when looking for a REFERENCE_TYPE.
4528 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
4529 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
4530 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
4531 (build_unary_op): Likewise.
4532 * call.c (build_over_call): See through a CONVERT_EXPR around the
4533 ADDR_EXPR for on a temporary.
4534 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
4535 the ADDR_EXPR for a local variable.
4537 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
4539 * call.c (build_user_type_conversion_1): If we're trying to
4540 convert to a REFERENCE_TYPE, only consider lvalue conversions.
4541 (build_new_function_call): Print candidates.
4542 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
4543 (reference_binding): Binding a temporary of a reference-related type
4546 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4548 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
4549 * tinfo2.cc (type_info::before): Likewise.
4551 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
4553 * call.c (implicit_conversion): Oops.
4555 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
4557 * call.c (implicit_conversion): Try to find a reference conversion
4558 before binding a const reference to a temporary.
4560 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
4562 * exception.cc (__default_unexpected): Call terminate by default,
4563 so that if the user overrides terminate, the correct function will
4566 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
4568 * parse.y (left_curly): Avoid trying to use any fields of
4569 error_mark_node, as there aren't any.
4571 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
4573 * lex.c (do_identifier): Avoid breaking on overloaded methods
4574 as default arguments.
4576 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
4578 * call.c (add_template_candidate): Initialize the variable "dummy".
4580 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
4582 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
4583 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
4585 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4587 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
4588 (debug_binfo): Delete decl, not needed.
4590 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
4591 promotes_to_aggr_type): Delete fns.
4592 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
4593 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
4594 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
4596 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
4598 * friend.c (is_friend_type): Delete fn.
4599 * cp-tree.h (is_friend_type): Delete decl.
4601 * decl.c (original_result_rtx, double_ftype_double,
4602 double_ftype_double_double, int_ftype_int, long_ftype_long,
4603 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
4604 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
4606 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
4608 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
4610 * decl.c (pushdecl_nonclass_level): #if 0, unused.
4611 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
4613 * lex.c (reinit_lang_specific): #if 0, unused.
4614 * cp-tree.h (reinit_lang_specific): #if 0 decl.
4616 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
4617 * cp-tree.h (revert_static_member_fn): Delete decl.
4619 * class.c (root_lang_context_p): Delete fn.
4620 * cp-tree.h (root_lang_context_p): Delete decl.
4622 * decl.c (set_current_level_tags_transparency): #if 0, unused.
4623 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
4625 * lex.c (set_vardecl_interface_info): Make static.
4626 * cp-tree.h (set_vardecl_interface_info): Delete decl.
4628 * call.c (find_scoped_type): Make static.
4629 * cp-tree.h (find_scoped_type): Delete decl.
4631 * search.c (convert_pointer_to_vbase): Make static.
4632 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
4634 * decl.c (const_ptr_type_node): Likewise.
4635 * cp-tree.h (const_ptr_type_node): Delete decl.
4637 * typeck.c (common_base_type): Make static.
4638 * cp-tree.h (common_base_types): Delete erroneous decl.
4640 * pt.c (classtype_mangled_name): Make static.
4641 * cp-tree.h (classtype_mangled_name): Delete decl.
4643 * lex.c (check_newline): Make static.
4644 * cp-tree.h (check_newline): Delete decl.
4646 * typeck.c (build_x_array_ref): Delete fn, same idea as
4648 * cp-tree.h (build_x_array_ref): Delete decl.
4650 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
4652 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
4654 * class.c (build_vtable_entry): Make static.
4655 * cp-tree.h (build_vtable_entry): Delete decl.
4657 * class.c (build_vbase_pointer): Make static.
4658 * cp-tree.h (build_vbase_pointer): Delete decl.
4660 * sig.c (build_sptr_ref): Add forward decl and make static.
4661 * cp-tree.h (build_sptr_ref): Delete decl.
4663 * call.c (build_new_method_call): Add forward decl and make static.
4664 * cp-tree.h (build_new_method_call): Delete decl.
4666 * call.c (build_object_call): Make static.
4667 * class.c (check_for_override, complete_type_p, mark_overriders):
4669 * decl.c (cp_function_chain): Likewise.
4670 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
4672 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
4674 * tree.c (build_cplus_array_type_1): Likewise.
4675 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
4676 (comp_target_parms): Likewise.
4678 * init.c (build_builtin_call): Make static.
4679 * cp-tree.h (build_builtin_call): Delete decl.
4681 * typeck.c (binary_op_error): Delete decl.
4682 * cp-tree.h (binary_op_error): Likewise.
4684 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4686 * call.c (build_method_call): Compare against error_mark_node
4687 directly, rather than the ERROR_MARK tree code.
4688 * cvt.c (cp_convert): Likewise.
4689 * decl.c (print_binding_level): Likewise.
4690 (duplicate_decls): Likewise.
4691 (grokdeclarator): Likewise.
4692 (grokdeclarator): Likewise.
4693 * init.c (expand_aggr_init_1): Likewise.
4694 (decl_constant_value): Likewise.
4695 * method.c (build_opfncall): Likewise.
4696 (hack_identifier): Likewise.
4697 * typeck.c (build_modify_expr): Likewise.
4699 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
4701 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4703 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
4705 * pt.c (coerce_template_parms): Add new error message.
4707 * method.c (build_overload_value): Implement name mangling for
4708 floating-point template arguments.
4710 * method.c (build_overload_int, icat, dicat): Fix mangling of template
4711 arguments whose absolute value doesn't fit in a signed word.
4713 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4715 * friend.c: New file; put all of the friend stuff in here.
4716 * init.c: Instead of here.
4717 * Makefile.in (CXX_OBJS): Add friend.o.
4718 (friend.o): Add dependencies.
4719 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
4721 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
4723 * call.c (build_scoped_method_call): Complain if the scope isn't a
4726 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4728 * parse.y (left_curly): Don't crash on erroneous type.
4730 * init.c (build_delete): Fix type of ref.
4732 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
4734 * search.c (get_vbase_1): Renamed from get_vbase.
4735 (get_vbase): Wrapper, now non-static.
4736 (convert_pointer_to_vbase): Now static.
4738 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
4739 * init.c (build_delete): Pass one.
4740 (build_partial_cleanup_for): Use build_scoped_method_call.
4741 * decl.c (finish_function): Pass a binfo.
4743 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4745 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
4747 * typeck.c (build_c_cast): Lose other reference to flag.
4749 * call.c (build_field_call): Don't look for [cd]tor_identifier.
4750 * decl2.c (delete_sanity): Remove meaningless use of
4751 LOOKUP_HAS_IN_CHARGE.
4752 * decl.c (finish_function): Use build_scoped_method_call instead
4753 of build_delete for running vbase dtors.
4754 * init.c (build_delete): Call overload resolution code instead of
4755 duplicating it badly.
4757 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
4759 * call.c (build_over_call): Call mark_used before trying to elide
4762 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
4764 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4766 * typeck.c (build_modify_expr): Always pedwarn for a cast to
4767 non-reference used as an lvalue.
4769 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
4771 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
4773 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
4775 * parse.y (handler): Fix template typo.
4777 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4779 * error.c (lang_decl_name): New fn.
4780 * tree.c (lang_printable_name): Use it.
4782 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
4784 * g++spec.c: Include config.h so that we can catch bzero #defines
4785 from the config file.
4787 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
4789 * new1.cc: Include a declaration for malloc, to avoid warning, and
4790 avoid lossing on systems that require one (ones that define malloc
4793 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4795 * decl2.c (max_tinst_depth): New variable.
4796 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
4798 * pt.c (max_tinst_depth): Variable moved.
4799 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
4802 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
4804 * decl.c (xref_basetypes): Allow a base class that depends on
4805 template parms to be incomplete.
4807 * decl2.c (build_expr_from_tree): Support typeid(type).
4808 * rtti.c (get_typeid): Support templates.
4809 (expand_si_desc, expand_class_desc): Fix string length.
4810 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
4812 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
4814 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
4816 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
4818 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4820 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
4821 smashes together template and non-template decls of the same
4824 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
4826 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
4828 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4830 * decl.c (duplicate_decls): Next route, pedwarn about different
4831 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
4833 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4835 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
4836 (struct lang_type): Delete has_default_implementation member.
4837 Increase dummy to 21.
4838 * decl.c (start_method): Delete usage.
4840 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
4841 store_after_parms, start_decl_1, auto_function): Add decls.
4842 (get_arglist_len_in_bytes, declare_implicit_exception,
4843 have_exceptions_p, make_type_decl, typedecl_for_tag,
4844 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
4845 build_component_type_expr, cplus_exception_name,
4846 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
4847 * call.c (build_this): Make static.
4848 (is_complete): Likewise.
4849 (implicit_conversion): Likewise.
4850 (reference_binding): Likewise.
4851 (standard_conversion): Likewise.
4852 (strip_top_quals): Likewise.
4853 (non_reference): Likewise.
4854 (build_conv): Likewise.
4855 (user_harshness): Likewise.
4856 (rank_for_ideal): Likewise.
4857 * decl.c (start_decl_1): Delete forward decl.
4858 (push_decl_level): Make static.
4859 (resume_binding_level): Make static.
4860 (namespace_bindings_p): Make static.
4861 (declare_namespace_level): Make static.
4862 (lookup_name_real): Make static.
4863 (duplicate_decls): Make static. Take register off NEWDECL and
4865 * decl2.c (get_sentry): Make static.
4866 (temp_name_p): Delete fn.
4867 * except.c (auto_function): Delete decl.
4868 * lex.c (handle_{cp,sysv}_pragma): Make static.
4869 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
4870 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
4871 * pt.c (tsubst_expr_values): Make static.
4872 * rtti.c (combine_strings): Delete decl.
4874 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
4876 * pt.c (push_template_decl): Handle getting a typedef.
4878 * call.c (build_new_function_call): Complain about void arg.
4880 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4882 * decl.c (duplicate_decls): Give pedwarn of different exceptions
4883 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
4885 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
4887 * except.c (expand_throw): Don't expand the cleanup tree here,
4888 since we are not going to write the rtl out. Fixes problem with
4891 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
4893 * Make-lang.in: Add $(exeext) as necessary.
4895 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
4897 * parse.y (handler_seq): Must have at least one catch clause.
4899 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4901 * call.c (add_builtin_candidate): Restore ?: hack.
4903 * decl.c (grok_op_properties): More warnings.
4905 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4907 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
4908 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
4910 * decl.c (duplicate_decls): Scale back to a warning, and only do
4913 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
4915 * decl.c (duplicate_decls): pedwarn mismatched exception
4918 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
4920 * call.c (build_new_method_call): Don't display the invisible
4921 argument for controlling virtual bases.
4923 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
4925 * new: Add nothrow new and delete, bad_alloc and throw specifications
4927 * decl.c (init_decl_processing): Add throw specification for delete.
4928 * new.cc (nothrow): Define.
4929 * lex.c (real_yylex): Removing warning that throw and friends are
4931 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
4932 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
4933 * Make-lang.in: Add new{1,2}.{cc,o}.
4935 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4937 * lex.c (cons_up_default_function): Fix return type of synth op=.
4939 * init.c (emit_base_init): Add warnings for uninitialized members
4942 * decl.c (xref_basetypes): Add warning for non-polymorphic type
4943 with destructor used as base type.
4945 * decl.c (grok_op_properties): Add warning for op= returning void.
4946 * typeck.c (c_expand_return): Add warning for op= returning anything
4949 * class.c (finish_struct_1): Add warning for class with pointers
4950 but not copy ctor or copy op=.
4952 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
4953 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
4954 (instantiate_template): If -fexternal-templates, add this
4955 instantiation to pending_templates.
4957 * decl2.c (copy_assignment_arg_p): Disable old hack to support
4960 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
4962 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
4964 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
4966 * call.c (standard_conversion): Handle getting references. Tack
4967 on RVALUE_CONV here. Do it for non-class types, too.
4968 (reference_binding): Pass references to standard_conversion.
4969 (implicit_conversion): Likewise.
4970 (add_builtin_candidate): Disable one ?: kludge.
4971 (convert_like): Handle RVALUE_CONVs for non-class types.
4972 (joust): Disable the other ?: kludge.
4974 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4976 * decl.c (init_decl_processing): Add code to build up common
4977 function types beforehand, to avoid creation then removal of
4978 things already in the hash table.
4980 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
4982 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
4985 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
4986 current_template_parms.
4988 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
4990 * search.c (lookup_field): Don't return a function, check want_type.
4992 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4994 * init.c (build_new): Make sure PLACEMENT has a type.
4996 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4998 * init.c (build_new): Support new (nothrow).
5000 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
5002 * pt.c (instantiate_decl): Also do push_to_top_level before setting
5005 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
5006 * pt.c (tsubst): Defer instantiation of default args.
5007 * call.c (build_over_call): Until here.
5009 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
5011 * search.c (lookup_field): Make sure we have an
5012 IDENTIFIER_CLASS_VALUE before we try to return it.
5014 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
5016 * call.c (build_method_call): Delete unused var PARM.
5017 (build_overload_call_real): Likewise.
5018 (build_object_call): Delete unused var P.
5019 (build_new_op): Likewise.
5020 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
5021 var definitions, which are never used.
5022 (shadow_tag): Delete unused var FN.
5023 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
5024 * init.c (build_new): Delete unused var ALLOC_TEMP.
5025 * method.c (hack_identifier): Delete unused var CONTEXT.
5026 (do_build_copy_constructor): Delete unused var NAME.
5027 (synthesize_method): Delete unused var BASE.
5028 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
5029 * rtti.c (build_headof): Delete unused var VPTR.
5030 (get_typeid): Delete unused var T.
5031 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
5033 (build_ptrmemfunc): Delete unused vars U and NINDEX.
5034 * typeck2.c (build_functional_cast): Delete unused var BINFO.
5036 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
5038 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
5039 things in a type being defined.
5040 * decl.c (finish_enum): Reverse the values so that they are in
5043 * pt.c (instantiate_class_template): Don't initialize
5044 BINFO_BASETYPES until the vector is filled out.
5045 (unify): Don't abort on conflicting bindings, just fail.
5046 (instantiate_decl): Do push_tinst_level before any tsubsting.
5048 * method.c (build_overload_value): Handle getting a
5049 TEMPLATE_CONST_PARM for a pointer.
5051 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
5053 * init.c (expand_member_init): Don't give 'not a base' error for
5056 * pt.c (instantiate_decl): Call import_export_decl later.
5058 * pt.c (instantiate_class_template): Return a value.
5060 * parse.y (extension): New rule for __extension__.
5061 (extdef, unary_expr, decl, component_decl): Use it.
5063 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
5065 * class.c (base_binfo): Remove unused base_has_virtual member.
5066 (finish_base_struct): Likewise.
5067 (finish_struct_1): Likewise.
5069 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
5071 * search.c (expand_upcast_fixups): Fix bogus code generation
5072 problem where the generated code uses the wrong index into the
5073 runtime built vtable on the stack. Old code could clobber random
5076 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
5078 * init.c (perform_member_init): Make sure the partial EH cleanups
5079 live on the function_obstack.
5081 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
5083 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
5084 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
5086 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
5088 * decl.c (grokvardecl): Avoid ANSI style initialization.
5090 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
5092 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
5094 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
5096 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
5098 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5100 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
5101 arguments we compare against. Start the count of I at 1, not 0,
5102 since argv[0] is still the command.
5104 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
5106 * lang-specs.h: Accept .cp as an C++ extension.
5108 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5110 * cp-tree.h (ptr_reasonably_similar): Add decl.
5112 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5114 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
5115 pointer. New local SPECBITS with the parm's value.
5116 (grokdeclarator): Pass &specbits down.
5118 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
5119 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
5121 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
5122 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
5124 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
5125 not an error_mark_node.
5127 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5129 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
5130 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
5132 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5134 * decl.c (grokdeclarator): When giving an anonymous struct a name,
5135 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
5138 * typeck2.c (build_m_component_ref): If component is a pointer
5139 to data member, resolve the OFFSET_REF now.
5141 * call.c (convert_like): Don't go into infinite recursion.
5143 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
5145 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
5146 * tree.c (layout_basetypes): And on the vbase ptr.
5148 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5150 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
5151 CHAR_TYPE_SIZE so bool is always the same size as another type.
5153 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
5155 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
5157 * decl2.c (grok_x_components): Remove synthesized methods from
5158 TYPE_METHODS of an anonymous union, complain about member
5160 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
5162 (finish_function): Just clear the DECL_RTL of our arguments.
5164 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5166 * decl2.c (finish_file): Emit DWARF debugging info for static data
5169 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
5171 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
5173 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
5176 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5178 * Make-lang.in (g++-cross$(exeext)): Fix typo.
5180 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5182 Make the g++ driver now be a standalone program, rather than one
5183 that tries to run the gcc driver after munging up the options.
5184 * Make-lang.in (g++.c, g++spec.o): New rules.
5185 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
5187 (g++$(exeext)): New rule, based on xgcc rule.
5188 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
5189 * g++spec.c: New file.
5190 * g++.c: Removed file.
5192 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
5194 * cvt.c (build_up_reference): Arrange for any temporary values
5195 that have been keep in registers until now to be put into memory.
5197 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5199 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
5200 that make -j3 bootstrap works better.
5202 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
5204 * decl.c (pushtag): Do pushdecl for anon tags.
5206 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
5208 * typeck.c (c_expand_return): Fix logic.
5209 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
5211 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
5213 * g++.c (main): Make sure arglist has a final NULL entry. Add
5214 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
5215 stdin/stdout of the invoked program are redirected to
5218 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5220 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
5222 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
5224 * init.c (resolve_offset_ref): Handle obj.vfn better.
5225 * typeck.c (build_component_ref): Set TREE_TYPE on result from
5228 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
5230 * typeck.c (convert_for_assignment): Also handle anachronistic
5231 implicit conversions from (::*)() to cv void*.
5232 * cvt.c (cp_convert_to_pointer): Likewise.
5234 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5236 * lex.c (handle_cp_pragma): Fix bogus warning.
5238 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
5240 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
5241 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
5243 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5245 * class.c (finish_struct_1): Support DWARF2_DEBUG.
5246 * search.c (dfs_debug_mark): Likewise.
5247 * decl2.c (finish_vtable_vardecl): Likewise.
5248 * decl.c (pushtag, finish_enum): Likewise.
5249 * lex.c (check_newline): Use debug_* instead of calling *out
5252 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5254 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
5255 on some picky hosts.
5257 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5259 * class.c (finish_struct_1): A class has a non-trivial copy
5260 constructor if it has virtual functions.
5262 * cvt.c (cp_convert): Always call a constructor.
5264 * call.c (reference_binding): Still tack on a REF_BIND
5265 for bad conversions.
5266 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
5268 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
5269 (c_expand_return): Likewise.
5270 * typeck2.c (digest_init): Likewise for { }.
5271 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
5272 * cvt.c (cp_convert): Handle failure better.
5274 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5276 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
5277 of GCC be path-relative.
5279 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5281 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
5282 it does need choose-temp.o and pexecute.o.
5284 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5286 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
5287 that we still use it.
5288 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
5290 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5292 * init.c (expand_default_init): Avoid calling constructors to
5293 initialize reference temps.
5295 * cvt.c (convert_to_reference): Fix.
5297 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5299 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
5300 (convert_to_reference): Likewise.
5301 * typeck.c (convert_for_initialization): Likewise.
5302 * init.c (expand_default_init): Likewise.
5303 (expand_aggr_init_1): Likewise.
5304 * cp-tree.h (CONV_NONCONVERTING): Lose.
5305 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
5307 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
5309 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
5311 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
5313 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5315 * init.c (expand_aggr_init_1): Don't crash on non-constructor
5318 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5320 * g++.c: Include gansidecl.h.
5321 (VPROTO, PVPROTO, VA_START): Delete.
5322 (choose_temp_base_try, choose_temp_base, perror_exec,
5323 run_dos) [__MSDOS__]: Delete fns.
5324 (pfatal_with_name): Delete fn.
5325 (temp_filename): Declare like in gcc.c.
5326 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
5327 (error_count, signal_count): Define.
5328 (error): Delete both definitions.
5329 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
5330 (pfatal_pexecute): Add fn from gcc.c.
5331 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
5332 code to use the pexecute stuff also used by gcc.c.
5333 (MIN_FATAL_STATUS): Define.
5334 * Make-lang.in (g++): Add dependency on and linking with
5335 choose-temp.o and pexecute.o.
5337 * cp-tree.h: Include gansidecl.h.
5338 (STDIO_PROTO): Delete #undef/#define.
5339 * cvt.c (NULL): Delete #undef/#define.
5340 * expr.c (NULL): Likewise.
5341 * init.c (NULL): Likewise.
5342 * rtti.c (NULL): Likewise.
5343 * xref.c (NULL): Likewise.
5345 * cp-tree.h (build_user_type_conversion): Add prototype.
5346 * call.c (build_user_type_conversion): Delete prototype. Correct
5347 decl of FLAGS arg to be an int.
5348 * cvt.c (build_user_type_conversion): Likewise.
5350 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
5352 * cp-tree.def: Add TRY_BLOCK and HANDLER.
5353 * except.c (expand_start_catch_block): Support templates.
5354 * parse.y (try_block, handler_seq): Likewise.
5355 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
5357 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
5359 * pt.c (current_template_args): New fn.
5360 (push_template_decl): Use it.
5361 * decl.c (grokdeclarator): Use it.
5363 * decl2.c (build_expr_from_tree): Dereference ref vars.
5365 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
5366 the decl-specifier-seq.
5368 * decl.c (grok_op_properties): Don't force the type of a conversion
5369 op to be complete. Don't warn about converting to the same type
5370 for template instantiations.
5372 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
5375 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
5377 * typeck.c (get_delta_difference): Remove previous bogusness.
5378 Don't give errors if force is set.
5380 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5382 * decl2.c (finish_file): Don't emit debug info.
5383 * decl.c (pushdecl): Lose obsolete code.
5384 (grokdeclarator): Still do the long long thing after complaining.
5385 * search.c (note_debug_info_needed): Don't do anything if we're in a
5387 * method.c (synthesize_method): For non-local classes,
5388 push_to_top_level first.
5390 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
5392 * typeck.c (get_delta_difference): Add no_error parameter.
5393 (build_ptrmemfunc): Call get_delta_difference with no_error set;
5394 we don't want error messages when converting unrelated
5395 pointer-to-member functions.
5397 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
5399 * error.c (dump_expr): Improve the wording on error messages that
5400 involve pointer to member functions.
5402 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
5404 * cvt.c (cp_convert_to_pointer): Move code for conversions from
5405 (::*)() to void* or (*)() up a bit, so that we can convert from
5406 METHOD_TYPEs as well.
5408 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5410 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
5411 There are no 'member' types.
5412 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
5413 (build_x_typeid): Handle errors.
5415 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
5417 * typeck.c (convert_for_assignment): Handle anachronistic implicit
5418 conversions from (::*)() to void* or (*)().
5419 * cvt.c (cp_convert_to_pointer): Likewise.
5420 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
5421 conversions from here.
5422 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
5423 * lang-options.h: Likewise.
5424 * decl2.c (warn_pmf2ptr): Define.
5425 * cp-tree.h: Declare it.
5426 * typeck2.c (digest_init): Allow pmfs down into
5427 convert_for_initialization.
5429 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
5431 * typeck.c (c_expand_return): Fix for returning overloaded fn.
5433 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5435 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
5436 * decl.c (grok_reference_init): Pass DIRECT_BIND.
5437 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
5439 * call.c (convert_like): Don't pass INDIRECT_BIND.
5440 * typeck.c (convert_arguments): Likewise.
5441 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
5443 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
5445 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
5446 similar code in build_up_ref.
5447 * cvt.c (build_up_reference): Drastically simplify.
5449 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
5451 * typeck.c (signed_or_unsigned_type): If the given type already
5452 as the correct signedness, then just return it.
5454 * typeck.c ({un,}signed_type): If can't do anything, call
5455 signed_or_unsigned_type.
5457 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
5459 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
5460 current_class_type is NULL.
5462 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
5464 * class.c (finish_struct_1): Avoid empty structs by adding a field
5465 so layout_type gets the mode right.
5467 * typeck.c (c_expand_return): Drastically simplify.
5469 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5471 * typeck.c (decay_conversion): Handle overloaded methods.
5473 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
5475 * call.c (build_over_call): A TARGET_EXPR has side-effects.
5477 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
5479 * cvt.c (convert_to_pointer_force): Add code to support pointer to
5480 member function to pointer to function conversions.
5481 * init.c (resolve_offset_ref): Add code to allow faked up objects,
5482 ignoring them if they are not used, and giving an error, if they
5484 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
5485 code, and so that we can give an error, if we needed an object,
5486 and one was not provided.
5487 (build_c_cast): Don't call default_conversion when we want to
5488 convert to pointer to function from a METHOD_TYPE.
5490 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
5492 * Make-lang.in (cplib2.ready): Fix logic.
5494 * decl.c (shadow_tag): Only complain about non-artificial function
5497 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
5499 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
5501 * expr.c (cplus_expand_expr): Pre-tweak call_target like
5502 expand_inline_function would.
5504 * pt.c (mark_decl_instantiated): If extern_p, call
5505 mark_inline_for_output.
5507 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
5509 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
5512 * typeck.c (get_delta_difference): Fix wording, as we can be used
5513 for pointer to data members.
5515 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
5517 * pt.c (tsubst): If the function decl isn't a member of this
5518 template, return a copy of the decl (including copying the
5519 lang-specific part) so we don't hose ourselves later.
5521 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5523 * class.c (finish_struct): Remove DWARF-specific tag handling.
5524 * decl.c (pushtag): Likewise.
5525 (finish_function): Always clear DECL_ARGUMENTS on function decls with
5527 * decl2.c (finish_file): Emit DWARF debugging info for static data
5530 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
5532 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
5533 isn't the same as the new one before we whack it.
5535 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
5537 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
5538 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
5539 warn_traditional and warn_strict_prototypes; remove ancient
5540 'overload' code; remove references to flag_traditional.
5542 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
5544 * input.c (sub_getch): Handle 8-bit characters in string literals.
5546 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
5548 * tree.c (mapcar): Handle CONSTRUCTORs.
5549 (copy_to_permanent): Handle expression_obstack properly.
5551 * Make-lang.in (cplib2.txt): Also depend on the headers.
5553 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
5555 (expand_class_desc): Use USItype for offset field.
5556 * tinfo.h (struct __class_type_info): Likewise.
5558 * method.c (build_overload_int): TYPE_PRECISION should be applied
5561 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
5563 * call.c (build_new_op): A COND_EXPR involving void must be a
5566 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5568 * typeck.c (build_x_component_ref): New fn.
5569 (build_object_ref): Use it.
5570 * parse.y (primary): Use it.
5571 * decl2.c (build_expr_from_tree): Use it.
5572 * cp-tree.h: Declare it.
5574 * decl.c (start_decl): variable-sized arrays cannot be initialized.
5575 * error.c (dump_type_suffix): Handle variable arrays.
5577 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5579 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
5581 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5583 * decl.c (lookup_name_real): Don't try to look up anything in a
5586 * tinfo2.cc (__throw_type_match_rtti): Oops.
5588 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5590 * Make-lang.in (exception.o): Use -fno-PIC for now.
5592 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
5594 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
5596 (get_tinfo_fn_dynamic): Extracted from build_typeid.
5597 * tinfo2.cc (__dynamic_cast): Adjust.
5599 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
5600 (build_x_typeid): Likewise.
5602 * parse.y: Call build_x_typeid instead of build_typeid.
5603 * cp-tree.def: Add TYPEID_EXPR.
5604 * pt.c (tsubst_copy): Handle typeid.
5605 * decl2.c (build_expr_from_tree): Likewise.
5606 * rtti.c (build_x_typeid): Throw bad_typeid from here.
5607 (build_typeid): Not here.
5608 * cp-tree.h: Declare build_x_typeid.
5610 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
5612 * call.c (convert_like): Pull out constant values.
5614 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
5616 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5618 * decl.c (init_decl_processing): Create short int types before
5619 creating size_t in case a machine description needs to use
5620 unsigned short for size_t.
5622 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5624 * Make-lang.in (exception.o): Turn off pic.
5626 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
5627 type, multi-level ptr conversions.
5629 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
5630 (throw_bad_cast): Use it.
5631 (throw_bad_typeid): New fn.
5632 (build_typeid): Throw bad_typeid as needed.
5634 (synthesize_tinfo_fn): Handle functions and arrays before checking
5637 * Remove .h from standard C++ headers, add new.h, move into inc
5640 * exception*: Remove pointer from object, constructors. Add
5641 default exception::what that uses type_info::name. Add
5644 * init.c (build_new): Don't add a cookie to new (void *) T[2].
5646 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
5648 * Make-lang.in: Building C++ code depends on cc1plus.
5650 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5652 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
5653 a HOST_WIDE_INT, not a tree.
5655 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5657 * exception.cc: Don't include <stdlib.h>.
5659 * Make-lang.in (c++.clean): Remove cplib2.*.
5661 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
5663 * parse.y (component_decl_1, component_costructor_declarator case):
5664 Pass attributes/prefix_attributes in tree list.
5666 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
5668 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
5670 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5672 * lex.c (do_identifier): Don't do deferred lookup in a template
5675 * typeck2.c (store_init_value): Oops.
5677 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
5678 New files for C++ lang-support library.
5679 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
5680 (CXX_LIB2FUNCS): Define.
5681 And rules for building the C++ lang-support code.
5682 * config-lang.in (headers): Define.
5683 (lib2funcs): Define.
5685 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5687 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
5689 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
5690 * typeck2.c (store_init_value): Check for initializing pmf with { }
5692 (process_init_constructor): Not here.
5694 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5696 * pt.c (begin_template_parm_list): Increment
5697 processing_template_decl here.
5698 (end_template_parm_list): Not here.
5699 (process_template_parm): No need to add 1 to it now.
5700 * *.c: Use processing_template_decl instead of current_template_parms
5701 to check for being in a template.
5703 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
5704 (tsubst_copy): Handle CONSTRUCTOR.
5705 (instantiate_decl): Set up context properly for variables.
5706 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
5707 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
5709 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5711 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
5713 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5715 * method.c (make_thunk): Call comdat_linkage before setting the
5718 * decl2.c (comdat_linkage): Use make_decl_one_only.
5719 (import_export_decl): Likewise.
5720 * decl.c (init_decl_processing): Check supports_one_only instead of
5723 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
5725 * decl2.c (grokfield): Tighten checking for access decls.
5727 * decl.c (make_typename_type): Resolve references to
5728 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
5729 (lookup_name_real): Types that depend on a template parameter get
5730 an implicit 'typename' unless they're in the current scope.
5731 (start_decl_1): We don't care about incomplete types that depend
5733 (grokdeclarator): Resolve 'typename's in the type specifier that
5734 refer to members of the current scope.
5736 * call.c (build_over_call): Remove 'inline called before
5737 definition' diagnostic.
5738 (build_method_call): Likewise.
5739 * decl.c (duplicate_decls): Downgrade 'used before declared
5740 inline' to a warning, only with -Winline.
5742 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
5744 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
5746 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5748 * call.c (build_method_call): When calling a signature
5749 default implementation, as in other cases, let instance_ptr simply
5752 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
5754 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
5756 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
5758 * except.c (expand_start_catch_block): Add a pushlevel so that -g
5759 works on hppa and SPARC.
5761 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5763 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
5765 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5767 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
5768 before testing whether it's a signature.
5770 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5772 * call.c (build_new_method_call): Don't complain about signature
5773 pointers and references not being an aggr type.
5774 (build_this): If a signature pointer or reference was passed in,
5776 (build_new_method_call): If instance is a signature pointer, set
5777 basetype to the signature type of instance.
5778 * sig.c (build_signature_method_call): Deleted basetype and
5779 instance parameters, they can be found as the DECL_CONTEXT of
5780 function and as the first argument passed in.
5781 * cp-tree.h: Changed declaration of build_signature_method_call.
5782 * call.c (build_method_call): Deleted first two arguments in call
5783 of build_signature_method_call.
5784 (build_over_call): Added call to build_signature_method_call.
5786 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5788 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
5791 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5793 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
5795 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
5797 * except.c (expand_start_try_stmts): Move to except.c in the backend.
5798 (expand_end_try_stmts): Remove.
5800 * init.c (perform_member_init): Use add_partial_entry () instead
5801 of directly manipulating lists.
5802 (emit_base_init): Ditto.
5804 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
5806 * except.c (expand_exception_blocks): Always make sure USE and
5807 CLOBBER insns that came at the end still do, the backend relies
5810 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
5812 * call.c (build_over_call): We can only use a TARGET_EXPR of the
5815 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
5817 * cvt.c (convert_to_reference): Revert last change, don't complain
5818 about temp without target decl.
5820 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
5822 * decl.c (grokdeclarator): Don't core dump when void() is given.
5824 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
5826 * decl.c (copy_args_p): Don't crash.
5828 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
5830 * pt.c (tsubst): And support template args inside the exception
5833 * pt.c (tsubst): Add support for exception specifications in
5836 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
5838 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
5840 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
5841 (start_function): Likewise.
5842 (start_method): Likewise.
5843 (grokfield): Likewise.
5844 (make_call_declarator): Add throw spec parameter.
5845 (set_quals_and_spec): Add routine.
5846 * lex.c (set_quals_and_spec): Likewise.
5847 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
5848 * decl.c (shadow_tag): Eliminate the throw spec parameter to
5850 (groktypename): Likewise.
5851 (start_decl): Eliminate the throw spec parameter. Eliminate the
5852 throw spec parameter to grokdeclarator. Eliminate the throw spec
5854 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
5855 (grokfndecl): Remove useless set of raises.
5856 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
5857 the throw spec parameter to start_decl. Pull the throw spec out
5858 of the call declarator.
5859 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
5860 (start_function): Eliminate the throw spec parameter. Eliminate
5861 the throw spec parameter to grokdeclarator.
5862 (start_method): Likewise.
5863 * decl2.c (grokfield): Likewise.
5864 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
5865 (grokoptypename): Likewise.
5866 (finish_file): Eliminate the throw spec parameter to
5867 start_function. Add throw spec to make_call_declarator.
5868 * except.c (init_exception_processing): Add throw spec to
5869 make_call_declarator. Eliminate the throw spec parameter to
5871 (expand_start_catch_block): Eliminate the throw spec parameter to
5873 (expand_builtin_throw): Add throw spec to make_call_declarator.
5874 Eliminate the throw spec parameter to start_function.
5875 (start_anon_func): Likewise.
5876 * lex.c (make_call_declarator): Add throw spec parameter.
5877 (set_quals_and_spec): New routine.
5878 (cons_up_default_function): Add throw spec to make_call_declarator.
5879 Eliminate the throw spec parameter to grokfield.
5880 * method.c (synthesize_method): Eliminate the throw spec parameter
5882 * pt.c (process_template_parm): Eliminate the throw spec parameter
5884 (tsubst): Add throw spec to make_call_declarator.
5885 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
5886 (do_function_instantiation): Eliminate the throw spec parameter to
5887 grokdeclarator. Eliminate the throw spec parameter to
5889 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
5891 * parse.y (datadef): Remove non-winning optimization.
5893 (fndef): Remove ambiguous error productions uncovered by grammer
5895 (constructor_declarator): Add exception_specification_opt here.
5896 (component_constructor_declarator): Likewise.
5897 (direct_after_type_declarator): Likewise.
5898 (complex_direct_notype_declarator): Likewise.
5899 (direct_abstract_declarator): Likewise.
5900 (fn.def1): Remove exception_specification_opt.
5901 (fn.def2): Likewise.
5902 (condition): Likewise.
5903 (initdcl0): Likewise.
5904 (initdcl): Likewise.
5905 (notype_initdcl0): Likewise.
5906 (nomods_initdcl0): Likewise.
5907 (component_decl_1): Likewise.
5908 (component_declarator): Likewise.
5909 (after_type_component_declarator0): Likewise.
5910 (after_type_component_declarator): Likewise.
5911 (notype_component_declarator): Likewise.
5913 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5915 * call.c (build_over_call): Also use an INIT_EXPR when
5916 initializing anything from an rvalue.
5918 * call.c (build_over_call): Call stabilize_reference when building
5919 an INIT_EXPR instead of calling the copy ctor.
5921 * call.c (joust): Extend the previous change to all comparisons.
5923 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
5924 NO_LINKAGE_HEURISTICS.
5926 * decl2.c (finish_file): Emit any statics that weren't already.
5928 * typeck.c (build_static_cast): Implement.
5929 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
5930 * decl.c (grokparms): Use can_convert_arg instead of
5931 implicit_conversion directly.
5932 (copy_args_p): New fn.
5933 * cvt.c (convert_to_reference): Don't complain about temp with
5935 (build_up_reference): Handle TARGET_EXPRs.
5936 * call.c (build_over_call): Elide unnecessary temps.
5937 (can_convert*): Use new overloading code.
5939 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
5941 * call.c: Move TYPE_PTR*_MACROS ...
5942 * cp-tree.h: To here.
5943 * typeck.c (build_reinterpret_cast): Implement.
5945 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
5947 (joust): If we're comparing a function to a builtin and the worst
5948 conversion for the builtin is worse than the worst conversion for the
5949 function, take the function.
5951 * typeck.c (build_const_cast): Implement.
5952 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
5953 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
5955 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
5957 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
5958 too early. Make sure we explode if exprtype turns out to be a
5959 NULL_TREE when it shouldn't be.
5961 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
5963 * cp-tree.h: New routine make_call_declarator.
5964 * lex.c (make_call_declarator): Define it.
5965 * except.c (init_exception_processing): Use it.
5966 (expand_builtin_throw): Likewise.
5967 (start_anon_func): Likewise.
5968 * decl2.c (finish_file): Likewise.
5969 * lex.c (cons_up_default_function): Likewise.
5970 * parse.y: Likewise.
5971 * pt.c (tsubst): Likewise.
5973 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
5975 * decl2.c (groktypefield): Remove unused code.
5977 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
5979 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
5980 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
5981 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
5982 nonempty_cv_qualifiers.
5985 * lex.c (make_pointer_declarator): Change type_quals into
5987 (make_reference_declarator): Likewise.
5989 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5991 * decl.c (start_function): Only check interface_* for templates
5992 with flag_alt_external_templates.
5994 * call.c (build_new_op): Check for comparison of different enum types.
5995 (build_over_call): Fix arg # output.
5997 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
5999 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
6001 * call.c (build_new_op): Check for erroneous args.
6003 * call.c (build_new_method_call): Add missing args to cp_error.
6005 * tree.c (error_type): Dont print reference-to-array.
6007 * typeck.c (convert_for_assignment): Don't say contravariance for
6010 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
6012 * call.c (build_over_call): Diagnose bad convs for `this'.
6014 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
6017 * call.c (convert_like): Handle bad convs.
6018 (build_over_call): Handle bad convs better.
6020 * decl2.c: -fansi-overloading is now the default.
6022 * call.c (build_new_method_call): Check for erroneous args.
6024 * pt.c (instantiate_class_template): Propagate
6025 TYPE_USES_MULTIPLE_INHERITANCE.
6027 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
6029 * call.c (enforce_access): Add static to routine.
6031 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
6033 * call.c (build_user_type_conversion_1): Fix bad handling.
6034 (compare_ics): Likewise.
6036 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6038 * call.c (standard_conversion): Oops.
6040 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
6042 * g++.c: Update test for win32 (&& ! cygwin32).
6044 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
6046 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
6047 (ptr_reasonably_similar): New fn.
6048 * call.c (BAD_RANK): New rank.
6049 (ICS_BAD_FLAG): New macro.
6050 (standard_conversion): Handle almost-right pointer conversions.
6051 (reference_binding): Handle bad rvalue bindings.
6052 (add_*_candidate): Stuff.
6053 (build_over_call): Pass bad conversions to convert_for_initialization.
6054 (compare_ics): Handle bad convs.
6057 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
6059 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
6060 integer_type_node when computing pointer offsets.
6062 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
6064 * tree.c (lvalue_type): New fn.
6065 (error_type): New fn.
6066 * call.c (op_error): Use error_type.
6067 (add_conv_candidate): Use lvalue_type.
6068 (add_builtin_candidates): Likewise.
6069 * error.c (args_as_string): Use error_type.
6071 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
6073 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
6076 * decl.c (init_decl_processing): With -ansi, __null's type is the
6077 signed integral type with the same number of bits as a pointer.
6078 Introduce a new variable null_node for it.
6079 * cp-tree.h: Adjust.
6080 * call.c (null_ptr_cst_p): Adjust.
6082 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
6084 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
6087 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
6089 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
6090 fns of classes without virtual functions.
6092 * call.c (add_function_candidate): Handle `this' specially.
6093 (compare_ics): Likewise.
6095 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
6097 * typeck.c (build_conditional_expr): Fix handling of __null.
6099 * decl2.c (comdat_linkage): New fn.
6100 (import_export_vtable): Use it.
6101 (import_export_decl): Use it.
6102 * method.c (make_thunk): Use it.
6104 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
6106 * pt.c (end_template_decl): If we don't actually have parms, return.
6107 * parse.y (template_header): Accept 'template <>'.
6109 * errfn.c: Allow 5 args.
6111 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6113 * tree.c (make_temp_vec): New fn.
6114 * pt.c (push_template_decl): Handle partial specs.
6115 (instantiate_class_template): Likewise.
6116 (more_specialized): Use get_bindings.
6117 (more_specialized_class): New fn.
6118 (get_class_bindings): New fn.
6119 (most_specialized_class): New fn.
6120 (do_function_instantiation): List candidates for ambiguous case.
6121 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
6122 (shadow_tag): Call push_template_decl for partial specializations.
6123 * parse.y: Likewise.
6124 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
6125 DECL_TEMPLATE_MEMBERS.
6126 * call.c (print_z_candidates): Reduce duplication.
6128 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6130 * decl2.c (lang_decode_option): Allow -fansi-overloading.
6132 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
6134 * pt.c (get_bindings): New fn.
6135 (most_specialized): Likewise.
6136 (do_function_instantiation): Use them.
6137 (add_maybe_template): New fn.
6138 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
6139 * call.c (build_new_op): Handle guiding decls.
6140 (build_new_function_call): Likewise.
6141 * decl2.c (finish_file): Likewise.
6143 * decl2.c (mark_used): Do synthesis here.
6144 * call.c (build_method_call): Not here.
6145 (build_over_call): Or here.
6146 * typeck.c (build_function_call_real): Or here.
6147 * tree.c (bot_manip): Call mark_used on functions used in default
6150 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6152 * decl2.c (import_export_vtable): Delete code that disabled vtable
6153 heuristic on systems with ASM_OUTPUT_EXTERNAL.
6155 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6157 * typeck.c (build_x_function_call): Handle static call context
6160 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
6161 the function, not its outer block.
6163 * call.c (build_field_call): Pass fields on to build_opfncall
6164 regardless of TYPE_OVERLOADS_CALL_EXPR.
6165 (build_method_call): Pass on to build_new_method_call sooner.
6167 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
6169 * class.c (instantiate_type): Don't put a POINTER_TYPE to
6170 METHOD_TYPE on an expression. Also make a copy of rhs instead of
6173 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
6175 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
6176 (add_builtin_candidate): Don't take enums for ++.
6177 (build_new_method_call): Handle non-aggregates and field calls.
6178 Move new overloading code from...
6181 * decl.c (grokparms): Don't check default args in templates.
6183 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
6185 * cvt.c (build_new_op): Fix args to build_unary_op.
6186 (add_builtin_candidates): Don't call type_promotes_to on float.
6188 * decl.c (grokparms): Check the type of the default arg.
6190 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
6191 returning NULL_TREE.
6193 * typeck.c (build_x_binary_op): Avoid doing extra work.
6194 (build_x_unary_op): Likewise.
6195 (build_x_conditional_expr): Likewise.
6196 * cvt.c (build_over_call): Return.
6197 (add_builtin_candidate): Fix MEMBER_REF.
6198 (build_new_op): Likewise.
6200 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
6202 * method.c (build_overload_name): Put bug fix into code but leave
6203 disabled for now so we can be bug compatible with older releases
6204 that do repeats incorrectly. In the future, we can enable it.
6206 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
6208 * cvt.c (convert_like): Don't call build_cplus_new twice.
6210 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
6211 Control new overloading code with -fansi-overloading.
6213 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6215 * cvt.c (build_over_call): Call build_cplus_new.
6216 * call.c (build_method_call): Likewise.
6217 * typeck.c (build_function_call_real): Likewise.
6218 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
6219 the COND_EXPR in a TARGET_EXPR so they use the same slot.
6221 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
6223 * typeck.c (complete_type): Propagate
6224 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
6226 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
6228 * cvt.c (joust): More ?: kludging. Sigh.
6229 (build_over_call): Don't try to synthesize global fns.
6231 * search.c (lookup_conversions): Use binfo marking.
6233 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
6235 * search.c (build_mi_matrix): Use the correct value of cid
6236 when determining the new mi_size.
6238 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
6240 * cvt.c (add_builtin_candidates): Do consider type conversion ops
6241 for the first parms of += et al.
6242 (strip_top_quals): New fn.
6243 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
6244 (implicit_conversion): Likewise.
6245 (add_builtin_candidates): Be careful about arrays.
6246 (build_new_method_call): Handle vtable optimization.
6248 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
6250 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
6251 * cvt.c (reference_binding): Use it.
6252 (implicit_conversion): Use it.
6253 (add_builtin_candidate, COND_EXPR): Use it.
6255 * cvt.c (build_new_function_call): Check for error args.
6257 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
6259 * gxx.gperf: Add __null.
6260 * hash.h: Regenerate.
6261 * lex.h: Add RID_NULL.
6262 * lex.c (init_lex): Create null_pointer_node here, stick it in
6264 * decl.c (init_decl_processing): Still set its type here.
6265 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
6266 (convert_to_pointer_force): Likewise.
6267 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
6269 * call.c (convert_harshness): Use null_ptr_cst_p.
6270 * typeck.c (convert_for_assignment): Likewise. Don't produce
6273 * error.c (args_as_string): Handle lists of actual args, too.
6274 * cvt.c (null_ptr_cst): Support (void*)0 for now.
6275 (build_user_type_conversion_1): Improve diagnostics.
6276 (build_new_function_call): Likewise.
6277 (build_object_call): Likewise.
6278 (build_new_method_call): Likewise. Move call before def diagnostic...
6279 (build_over_call): Here.
6281 * cvt.c (build_new_method_call): Don't complain about no match if
6282 LOOKUP_SPECULATIVELY.
6283 (build_over_call): Fix 'this' for virtual fn.
6284 (build_new_method_call): Add diagnostic.
6286 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
6288 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
6289 constructors to be passed in.
6290 (build_over_call): Likewise.
6291 (build_user_type_conversion_1): Pass them in.
6292 (convert_like): Likewise.
6293 (build_object_call): Handle overloaded conversions.
6294 (build_over_call): Pass the right args to build_vfn_ref.
6295 (standard_conversion): Fix pmf convs.
6296 (joust): Handle comparing statics and non-statics.
6297 (build_new_method_call): New fn.
6298 * call.c (build_method_call): Call it if NEW_OVER.
6300 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
6302 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
6305 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
6307 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
6308 instead of just maybe_build_cleanup so that we deallocate the
6311 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6313 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
6314 * cp-tree.h (finish_prevtable_vardecl): Add decl.
6316 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
6318 * pt.c (instantiate_class_template): Call complete_type. Also, if
6319 we're at the end of the file and we just instantiated a template
6320 class with a vtable, call finish_prevtable_vardecl.
6322 * error.c (dump_decl): Don't explode (or explode more gracefully
6323 as appropriate) if the object being dumped has a null type.
6324 (dump_expr): Likewise.
6326 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
6327 by counting the number of nodes that we'll need before allocating
6329 (lookup_fnfields): Fix comment.
6330 (breadth_first_search): Fix comment.
6332 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
6334 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
6336 * class.c (finish_struct): Call cplus_decl_attributes here.
6337 (finish_struct_1): Not here.
6338 * cp-tree.h: Adjust.
6340 * pt.c (type_unification): New parameter STRICT.
6341 (unify): If STRICT, don't allow cv addition or base deduction.
6342 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
6344 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
6346 * search.c (get_template_base{_recursive}): New fns.
6347 * pt.c (more_specialized): New fn.
6348 (do_function_instantiation): Use it.
6349 (unify): Handle base deduction.
6350 * cvt.c (joust): Use more_specialized.
6351 Don't arbitrarily choose between non-builtin candidates.
6352 (build_over_call): Call require_complete_type.
6354 * decl.c (start_function): Statics are static even in a #pragma
6357 * decl2.c (import_export_vtable): Disable vtable heuristic on
6358 systems with ASM_OUTPUT_EXTERNAL.
6360 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
6361 (standard_conversion): No std conv to enum type.
6363 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
6366 * cvt.c (reference_binding): Bind directly to a base subobject of
6369 * cvt.c (build_new_op): Enforce access control.
6371 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
6373 * typeck2.c (process_init_constructor): When scanning the
6374 union for a named field, skip things that aren't FIELD_DECLs.
6376 * method.c (synthesize_method): Don't scan fndecl's rtl if
6377 we're at the end of the file; just assume the function can't
6380 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6382 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
6385 * cvt.c (build_user_type_conversion_1): Handle overloaded
6388 * cvt.c (add_builtin_candidates): Don't consider type conversion
6389 operators for the first parameter of operator=.
6391 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
6393 * typeck.c (complete_type): Only call layout_type if we're not
6394 expanding a template.
6396 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
6398 * cvt.c (compare_ics): Oops.
6400 * cvt.c (op_error): Oops.
6402 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
6403 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
6404 (build_conv): Use them.
6405 (implicit_conversion): Use them.
6406 (convert_like): Handle them.
6407 (build_new_op): Handle builtin COND_EXPR again.
6408 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
6409 in lists of types for COND_EXPR.
6410 (add_builtin_candidate): Add enum candidates for COND_EXPR.
6412 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
6414 * typeck.c (build_modify_expr): Always attempt to build a call to
6415 the assignment operator, even if we're using a default one.
6416 (convert_for_initialization): Call complete_type.
6418 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6420 * cvt.c (reference_binding): A REF_BIND gets the reference type.
6421 (implicit_conversion): Likewise.
6422 (convert_like): Likewise.
6423 (compare_ics): Likewise.
6424 (compare_qual): Likewise.
6425 (print_z_candidates): Handle no candidates.
6426 (build_new_op): Don't handle builtin COND_EXPR for now.
6428 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
6430 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
6432 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
6434 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
6436 * cvt.c (build_builtin_candidate): Oops.
6437 (build_new_op): Oops.
6439 * method.c (build_opfncall): Pass COND_EXPR on.
6440 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
6441 (add_builtin_candidate{,s}): Likewise.
6442 (add_builtin_candidates): Likewise.
6443 (print_z_candidates, op_error, build_new_op): Likewise.
6444 (type_decays_to): New fn.
6445 * lex.c (init_lex): Just say ?: for COND_EXPR.
6447 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6449 * typeck.c (complete_type): Call layout_type rather than building
6452 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
6455 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6457 * cvt.c: Always compile the new overloading code (but don't use it).
6458 (implicit_conversion): Add a BASE_CONV when converting to
6459 the same class type.
6460 (convert_like): Handle BASE_CONV.
6462 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6464 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
6465 (add_builtin_candidate): Likewise.
6468 * typeck.c (build_x_function_call): Try an operator function
6469 whenever we call an object of class type.
6470 * method.c (build_opfncall): Pass CALL_EXPRs through.
6471 * cvt.c (implicit_conversion): Do const-ref case first.
6472 (add_conv_candidate, build_object_call, op_error): New fns.
6473 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
6474 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
6476 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
6477 Fall back on preincrement handling. Use op_error.
6479 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
6481 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
6484 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
6486 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
6488 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
6490 * typeck.c (build_component_ref_1): Use build_component_ref
6491 instead of open coding it here.
6493 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
6495 * g++.c (main): Don't link with -lg++.
6498 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
6499 result of build_type_conversion.
6500 (cp_convert): Only call build_method_call for ctors if
6501 build_type_conversion failed.
6502 (ptr_complete_ob): New function.
6503 (TYPE_PTR{,OB,MEM}_P): New macros.
6504 ({add,build}_builtin_candidate{,s}): New functions.
6505 (print_z_candidates): Handle builtins.
6506 (build_user_type_conversion_1): Don't use conversion fns for
6507 converting to a base type.
6508 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
6509 (build_user_type_conversion): Use convert_from_reference.
6510 (build_new_op): New function.
6511 (build_over_call): Fix handling of methods.
6512 (compare_ics): Handle AMBIG_CONV properly.
6513 * typeck2.c: Increment abort count.
6514 * method.c (build_opfncall): Forward most requests to build_new_op.
6515 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
6517 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6519 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
6520 invalid second argument to dump_expr_list.
6522 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
6524 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
6526 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
6528 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
6531 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
6533 * typeck2.c (process_init_constructor): New pedwarn for using { }
6534 to initialize a pointer to member function.
6535 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
6536 we can avoid the new error.
6538 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
6540 * typeck.c (build_ptrmemfunc1): New function to hide details of
6541 pointer to member functions better.
6543 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
6545 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
6546 methods into the actual method, as we know the implied object is
6549 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6551 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
6552 inside a system header.
6554 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
6556 * call.c (build_method_call): Call complete_type on the
6559 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
6561 * typeck.c (build_component_ref): Always build up an OFFSET_REF
6562 for obj_ptr->func so that we can know which object to use in a
6565 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
6567 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
6568 around things. Also improve maintainability.
6570 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
6572 * decl.c (grokdeclarator): Check for overflow when evaluating an
6575 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
6577 * cvt.c (cp_convert): Don't check for ambiguity with constructor
6580 * typeck.c (build_x_function_call): Pass function overload
6581 questions to new overloading code if NEW_OVER.
6582 * init.c (expand_aggr_init_1): Only check for type conversion ops
6583 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
6584 Don't check for ambiguity with constructor if NEW_OVER.
6585 * cvt.c (convert_to_reference): Dereference the result of a type
6586 conversion operator.
6587 (build_conv): Propagate ICS_USER_FLAG.
6588 (implicit_conversion): Call instantiate_type.
6589 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
6590 (add_function_candidate): Fix cv-quals on argtype.
6591 (print_z_candidates): New function.
6592 (build_new_function_call): Call it.
6593 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
6594 consider non-converting constructors.
6595 Call print_z_candidates.
6596 Return an AMBIG_CONV for an ambiguous conversion.
6597 (build_user_type_conversion): Handle AMBIG_CONV.
6598 (convert_like): Fix test for building TARGET_EXPR.
6599 Call instantiate_type.
6600 Handle AMBIG_CONV and LVALUE_CONV.
6601 (build_over_call): Handle 0 args and ellipsis.
6602 * cp-tree.def: Add AMBIG_CONV.
6604 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
6606 * decl.c (lookup_name_real): If we find mem in obj when parsing
6607 `obj->mem', make sure we return the right value.
6609 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
6611 * search.c (get_base_distance): Call complete_type.
6613 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
6615 * decl.c (store_bindings): Make static.
6617 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
6619 * init.c (expand_aggr_init_1): Don't check type conversions if
6622 * cvt.c (z_candidate): Put back template field.
6623 (add_function_candidate): Set it.
6624 (add_template_candidate): Likewise.
6626 (compare_qual): Handle references and pointers to members.
6627 (compare_ics): Handle reference bindings.
6629 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
6631 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
6633 * call.c (compute_conversion_costs): Call complete_type.
6635 * tree.c (vec_binfo_member): Use comptypes instead of comparing
6636 pointers, so we can handle template parameters.
6638 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
6640 * cvt.c (cp_convert_to_pointer): We have to call complete_type
6641 here; let's make it explicit instead of a side effect of an
6644 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
6646 * cvt.c (z_candidate): Remove template field.
6647 (reference_binding): Handle binding to temporary.
6648 (implicit_conversion): Likewise.
6649 (add_function_candidate): Handle artificial constructor parms.
6650 Handle functions with too few parms.
6651 (add_template_candidate): New function.
6652 (build_user_type_conversion_1): Handle constructors.
6653 (convert_like): Likewise.
6654 (build_over_call): Likewise.
6655 (build_new_function_call): Support templates.
6656 (compare_ics): Fix reference, inheritance handling.
6658 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
6660 * decl.c: Add signed_size_zero_node.
6661 (init_decl_processing): Build it.
6662 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
6663 when we're trying to make a negative delta.
6665 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6667 Stop doing this damn index==strchr variable name confusion.
6668 * class.c (add_virtual_function): Change local var INDEX to be
6670 (add_method): Likewise.
6671 * lex.c (print_parse_statistics): Likewise.
6672 * search.c (make_memoized_table_entry): Likewise.
6673 (lookup_fnfields_here): Likewise.
6674 (lookup_field): Likewise.
6675 (lookup_fnfields): Likewise.
6676 (get_baselinks): Likewise.
6677 * sig.c (build_signature_table_constructor): Likewise.
6678 (build_signature_method_call): Likewise.
6679 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
6680 (get_member_function_from_ptrfunc): Likewise.
6681 (build_ptrmemfunc): Change local var INDEX to be IDX.
6682 (c_expand_start_case): Likewise.
6684 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
6686 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
6687 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
6688 (convert_to_reference): Use build_type_conversion to convert to
6689 the reference type directly.
6690 (standard_conversion): Fix void* case, non-conversions.
6691 (reference_binding): Fix expr == 0 case, non-conversions.
6692 (convert_like): Support REF_BIND.
6693 (compare_qual): Split out from compare_ics.
6694 (compare_ics): Use it, handle icses with only a qual_conv.
6696 * init.c (expand_vec_init): Don't crash if decl is NULL.
6698 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
6700 * mpw-config.in: New file, configury for Mac MPW.
6701 * mpw-make.sed: New file, makefile editing for MPW.
6703 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6705 * pt.c (instantiate_class_template): Call repo_template_used.
6707 * search.c (lookup_conversions): Only lookup conversions in
6710 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6712 * cp-tree.def: Renamed from tree.def, to avoid confusion with
6714 * cp-tree.h, lex.c: Include cp-tree.def.
6715 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
6717 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
6719 * init.c (build_vec_delete_1): Call complete_type.
6721 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
6723 * except.c (start_anon_func): Make sure anonymous functions are
6726 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6728 * decl.c (finish_function): If function_depth > 1, set nested.
6730 * decl2.c (grokbitfield): Revert Bob's change.
6731 * class.c (finish_struct_1): Fix handling of named bitfield widths.
6733 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
6735 * pt.c (add_pending_template): Handle types.
6736 (lookup_template_class): With -fexternal-templates, just add the class
6737 to pending_templates instead of instantiating it now.
6738 * decl2.c (finish_file): Handle types in pending_templates.
6740 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
6742 * decl2.c (grokbitfield): Handle constant decls appropriately.
6743 Give an appropriate error message now instead of spewing core
6746 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
6748 * decl2.c: Don't turn on thunks by default for now.
6750 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
6752 * typeck.c (complete_type): Handle error_mark_node.
6753 (common_type, OFFSET_TYPE): Handle template_type_parms.
6755 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
6757 * pt.c (instantiate_decl): If at_eof, call import_export_decl
6758 regardless of DECL_INLINE.
6760 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
6762 * class.c (finish_struct_bits): Copy TYPE_SIZE.
6764 * rtti.c (build_dynamic_cast): Support templates.
6765 * tree.def: Support DYNAMIC_CAST_EXPR.
6766 * pt.c (tsubst_copy): Likewise.
6767 * decl2.c (build_expr_from_tree): Likewise.
6769 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
6771 * typeck.c (build_static_cast): Support templates.
6772 (build_const_cast): Likewise.
6773 * tree.def: Support CONST/STATIC_CAST_EXPR.
6774 * pt.c (tsubst_copy): Likewise.
6775 * decl2.c (build_expr_from_tree): Likewise.
6777 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
6779 * decl2.c (finish_vtable_vardecl): Don't trust
6780 TREE_SYMBOL_REFERENCED for vtables of local classes.
6782 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
6784 * pt.c (tsubst_copy): Handle operator T.
6786 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6788 * init.c (build_delete): Move creation of PARMS inside test of
6789 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
6791 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
6793 * typeck.c (build_conditional_expr): Don't assume that
6794 the arguments to ?: are always pointers or records.
6796 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6798 * decl2.c (import_export_decl): Still emit static/weak/comdat
6799 copies of inline template functions with -fno-implicit-templates.
6801 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
6803 * init.c (build_delete): Determine the complete basetype
6804 path to the destructor we're calling.
6806 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
6808 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
6809 initialize the enum, because we really and truly don't know where
6811 (start_enum): Don't copy integer_zero_node because
6812 build_enumerator will do it.
6814 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
6816 * decl.c (finish_function): Do access control on base destructors.
6818 * pt.c (tsubst, case FUNCTION_DECL): Set up
6819 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
6822 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
6824 * cvt.c (build_up_reference): If we have already extended the
6825 lifetime of the temporary, don't try it again.
6826 * typeck.c (c_expand_return): Don't try and convert the return
6827 value twice when we want a reference, once is enough.
6829 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
6831 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
6832 LOOKUP_ONLYCONVERTING at all for now.
6834 * search.c (add_conversions): Put the conversion function in
6835 TREE_VALUE, the basetype in TREE_PURPOSE.
6836 * cvt.c (build_type_conversion): Adjust.
6837 * cvt.c (build_expr_type_conversion): Adjust.
6838 * call.c (user_harshness): Adjust.
6840 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
6842 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
6845 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
6847 * except.c (expand_start_catch_block): Add a dummy region, if we
6848 get an error, so that we can avoid core dumping later.
6850 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
6852 * cp-tree.h (OFFSET_REF): Remove.
6853 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
6854 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
6855 * init.c (expand_aggr_init_1): Likewise.
6856 (build_new): Likewise.
6857 * typeck.c (expand_target_expr): Likewise.
6859 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6861 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
6864 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
6866 * cvt.c (build_up_reference): Redo how and when temporaries are
6868 * decl.c (grok_reference_init): Don't try and be smart about
6871 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
6873 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
6874 (TARGET_EXPR...), now that it has 4 arguments.
6875 * tree.c (build_cplus_new): Likewise.
6877 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6879 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
6881 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
6882 * decl.c (struct saved_scope): Remove named_labels,
6883 {base,member}_init_list.
6884 (maybe_push_to_top_level): Don't set them. Call
6885 push_cp_function_context if appropriate.
6886 (pop_from_top_level): Likewise.
6888 * method.c (do_build_assign_ref): Remove obsolete check of
6889 TYPE_HAS_ASSIGN_REF (basetype).
6891 * decl.c (grokfndecl): Diagnose user definition of
6892 implicitly-declared methods.
6894 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
6896 * method.c (do_build_copy_constructor): Add code to give
6897 meaningful error messages instead of crashing.
6898 (do_build_assign_ref): Don't synthesize assignment operators for
6899 classes containing reference or const members.
6901 * class.c (struct base_info): Remove cant_synth_copy_ctor
6902 and cant_synth_asn_ref.
6903 (finish_base_struct): Remove the code that tries to conditionalize
6904 synthesis of copy constructors & assignment operators based on
6905 access permissions. Instead, let it fail when it tries to
6906 synthesize the copy constructor. This will give meaningful error
6907 messages instead of silently generating code to perform a bitcopy.
6909 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
6911 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
6912 determining types for constant values.
6914 * decl.c (struct named_label_list): Use instead of stuffing
6915 random items into a TREE_LIST node.
6916 (named_label_uses): Use the new struct.
6917 (poplevel): Likewise.
6918 (lookup_label): Likewise.
6919 (define_label): Add an error message to tell the user the line
6920 where the goto is located in addition to the destination of the
6922 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
6924 (finish_function): Likewise.
6926 (start_decl): Complain about defining a static data member
6927 in a different type from which it was declared.
6929 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6931 * cvt.c (build_expr_type_conversion): Adjust.
6933 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
6935 * call.c (build_method_call): Always convert 'this' to the
6938 * search.c (add_conversions): Put the conversion function in
6939 TREE_VALUE, the type in TREE_PURPOSE.
6940 * cvt.c (build_type_conversion): Adjust.
6941 * call.c (user_harshness): Adjust.
6943 * method.c (emit_thunk): Call temporary_allocation and
6944 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
6946 * tree.c (build_cplus_array_type): Handle tweaking of
6947 TYPE_MAIN_VARIANT here.
6948 * typeck.c (common_type): Not here.
6950 * typeck.c (complete_type): Only try to complete an array type if
6953 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
6955 * decl.c (grokvardecl): Call complete_type.
6956 (grokdeclarator): Call complete_type for PARM_DECLs.
6958 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
6960 * pt.c (instantiate_class_template): Re-set
6961 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
6963 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
6965 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
6966 smart enough to do it right.
6967 * tree.c (cp_expand_decl_cleanup): Likewise.
6968 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
6969 cp_expand_decl_cleanup.
6970 (store_parm_decls): Likewise.
6971 (hack_incomplete_structures): Likewise.
6972 * except.c (push_eh_cleanup): Likewise.
6974 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
6976 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
6977 frontend to the backend where it belongs.
6978 * tree.c (unsave_expr): Likewise.
6979 (unsave_expr_now): Likewise.
6980 * tree.def (UNSAVE_EXPR): Likewise.
6981 * cp-tree.h (unsave_expr): Likewise.
6982 (unsave_expr_now): Likewise.
6984 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
6986 * init.c (emit_base_init): Make sure the partial EH cleanups live
6987 on the function_obstack.
6989 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
6991 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
6992 when checking for pointer types.
6994 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6996 * pt.c (instantiate_class_template): Remove obsolete check for
6997 access declarations.
6999 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
7001 * call.c (build_overload_call): Simplify calls to
7002 build_overload_call by removing last parameter.
7003 (build_method_call): Likewise.
7004 * cp-tree.h: Likewise.
7005 * method.c (build_opfncall): Likewise.
7006 * typeck.c (build_x_function_call): Likewise.
7008 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
7010 * call.c (default_parm_conversions): Factor out common code.
7011 (build_method_call): Use it.
7012 (build_overload_call_real): Use it.
7014 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
7016 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
7017 but pedwarn as the code is bogus.
7018 * typeck.c (decay_conversion): Likewise.
7019 (build_function_call_real): Use build_addr_func instead of
7020 default_conversion. Don't allow pointer-to-method functions down
7022 (build_unary_op): Use real pointer-to-member functions instead of
7024 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
7025 (convert_for_assignment): Removed some obsolete code.
7026 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
7027 build_x_function_call instead of current_class_ptr. Only call
7028 digest_init once on an initializer, we do this just checking
7030 (build_expr_from_tree): Pass current_class_ref to
7031 build_x_function_call instead of current_class_ptr.
7032 * init.c (build_member_call): Likewise.
7034 * error.c (dump_expr): Handle OFFSET_REFs better.
7035 * pt.c (unify): Handle pointer-to-member functions better.
7036 * decl.c (finish_function): Clear out current_class_ref just like
7037 we do for current_class_ptr.
7039 * typeck.c (get_delta_difference): Handle virtual bases better.
7041 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
7043 * sig.c (build_signature_table_constructor): Use the delta for
7044 the original basetype for this virtual function with thunks.
7045 (build_signature_method_call): We still need to adjust 'this'
7048 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
7050 * call.c (build_addr_func): New routine. Used to get the `real'
7051 address of a function or a method. Needed to avoid getting a
7052 pointer-to-member function.
7053 (build_call): New routine to build CALL_EXPRs.
7054 (build_method_call): Use it.
7055 * cvt.c (convert_to_aggr): Likewise.
7056 * typeck.c (build_function_call_real): Likewise.
7057 * sig.c (build_signature_table_constructor): Use build_addr_func.
7058 * cp-tree.h (build_call, build_addr_func): Declare them.
7060 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
7062 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
7063 * parse.y: Remove uses of LOOKUP_AGGR.
7065 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
7067 * *.[chy]: Rename current_class_decl to current_class_ptr, and
7068 C_C_D to current_class_ref.
7070 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
7072 * call.c (convert_harshness): Tighten up pointer conversions.
7074 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
7076 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
7077 (finish_file): Likewise.
7079 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
7081 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
7083 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
7086 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
7088 * decl2.c: Turn on thunks by default where supported.
7090 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
7092 * cp-tree.h (build_overload_call_maybe): Removed.
7093 * call.c (build_overload_call_real): Invert meaning of last arg to
7094 be require_complete.
7095 (build_overload_call): Likewise.
7096 * typeck.c (build_x_function_call): Use build_overload_call_real
7097 instead of build_overload_call_maybe.
7099 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
7101 * decl2.c (finish_file): Don't try to emit functions that haven't
7104 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
7106 * decl2.c (finish_vtable_vardecl): Oops.
7108 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
7109 Also store the bindings from previous_class_values.
7110 (pop_from_top_level): Restore them.
7112 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
7114 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
7115 symbol has been referenced.
7116 (finish_file): Re-join synthesis/vtable loop with inline emission
7117 loop, disable inlining when an inline is output.
7119 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
7121 * except.c (init_exception_processing): Setup saved_in_catch.
7122 (push_eh_cleanup): Reset __eh_in_catch.
7123 (expand_start_catch_block): Set __eh_in_catch.
7125 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
7127 * except.c (push_eh_cleanup): Add tracking for whether or not we
7128 have an active exception object.
7129 (expand_builtin_throw): Use it to make sure a rethrow without an
7130 exception object is caught.
7132 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
7134 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
7137 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
7139 * decl2.c (finish_file): Also use sentries for vars with
7140 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
7143 * lex.c (handle_cp_pragma): Disable #pragma
7144 interface/implementation if SUPPORTS_ONE_ONLY > 1.
7146 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
7148 * method.c (emit_thunk): Wrap default case in
7149 temporary/permanent_allocation.
7151 * method.c (make_thunk): Use DECL_ONE_ONLY.
7152 (emit_thunk): Call assemble_end_function.
7154 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7156 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
7157 (import_export_decl): Likewise.
7158 (finish_prevtable_vardecl): Disable vtable hack if
7159 SUPPORTS_ONE_ONLY > 1.
7161 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
7163 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
7164 PREDECREMENT_EXPRs take two arguments, not one.
7166 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
7168 * class.c (build_vtable_entry): Don't build thunks for abstract
7171 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
7174 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
7176 * class.c (set_rtti_entry): Use size_zero_node.
7177 (build_vtable): Likewise.
7179 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
7181 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
7182 (prepare_fresh_vtable): Likewise.
7184 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
7186 * method.c (emit_thunk): Call mark_used on the target function.
7188 * call.c (build_method_call): Don't warn about pending templates.
7190 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
7192 * decl2.c (finish_file): Fix list walking logic.
7194 * typeck2.c (check_for_new_type): Only warn if -pedantic.
7196 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
7198 * class.c (finish_struct_1): Remove old code for
7199 dont_allow_type_definitions.
7200 * cp-tree.h: Likewise.
7201 * spew.c: Make sure cp-tree.h is included before parse.h, so the
7202 definition of flagged_type_tree is found before it is used.
7204 * parse.y: Added the ftype member to the type union, and changed a
7205 number of rules to use it instead of ttype. Added calls to
7206 check_for_new_type() as appropriate.
7207 * typeck2.c (check_for_new_type): New function for checking
7208 if a newly defined type appears in the specified tree.
7209 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
7210 for check_for_new_type().
7212 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
7214 * decl2.c (finish_file): Only use a sentry if the decl is public.
7216 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
7217 don't pass LOOKUP_ONLYCONVERTING.
7219 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
7221 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
7222 properly keeps track of const and volatile type modifiers.
7224 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
7226 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
7227 * pt.c (comp_template_args): Use it.
7229 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
7230 assemble_external for artificial function decls.
7232 * decl.c (cp_finish_decl): Oops.
7234 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
7236 * decl2.c (import_export_decl): Put static data member templates
7237 into common storage, or make them weak, depending on whether they
7238 are dynamically or statically initialized.
7239 (get_sentry): New function.
7240 (finish_file): Do import_export_decl for static data members before
7241 building the init/fini functions. Don't init/fini a variable that's
7242 EXTERNAL. Use a sentry for variables in common. Fix mismatching
7243 push/pop_temp_slots.
7244 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
7245 expand_static_init thang.
7246 * method.c (get_id_2): New function.
7248 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
7250 * parse.y (empty_parms): Make sure we use C++-style prototypes
7251 when we're declaring member functions.
7253 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
7255 * Makefile.in (CONFLICTS): 16 s/r conflicts.
7256 * parse.y (self_template_type): New nonterminal.
7258 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
7260 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
7262 * parse.y (base_class.1): Allow 'typename foo::bar'.
7264 * lex.c (check_newline): Remove #pragma code that plays with the
7265 input stream, since we now deal with tokens. Clear nextchar when
7267 (handle_cp_pragma): Use real_yylex.
7268 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
7271 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
7273 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
7275 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7277 * parse.y: New token SELFNAME for potential constructor.
7278 * spew.c (yylex): Handle it.
7279 * lex.c (identifier_type): Produce it.
7281 * parse.y (complete_type_name): In :: case, don't push class binding.
7282 (complex_type_name): Likewise.
7284 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
7286 * typeck.c (build_reinterpret_cast): Handle pointer to member
7289 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7291 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
7293 (check_newline): Put the vtable/unit/implementation/interface pragma
7294 code into handle_cp_pragma, replacing it with a call.
7295 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
7296 args. Get the next token after handling the pragma token.
7298 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
7300 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
7301 (convert_to_pointer_force): Likewise.
7303 * init.c (build_new): Fix array new without -fcheck-new.
7305 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
7307 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
7308 tree.c: Lose TYPE_NESTED_NAME.
7310 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
7313 * tree.def: Add VEC_INIT_EXPR.
7314 * expr.c (cplus_expand_expr): Handle it.
7315 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
7316 the extra file-scope symbol nastiness.
7318 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7320 * method.c (make_thunk): Thunks are static.
7321 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
7323 * decl2.c (mark_vtable_entries): Emit thunks as needed.
7324 (finish_file): Don't emit them here.
7326 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
7328 * rtti.c (build_dynamic_cast): Handle null pointers.
7329 (ifnonnull): New function.
7331 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
7333 * call.c (build_method_call): Remember the original basetype we
7334 were called with. Give an error message instead of trying
7335 (incorrectly) to call a non-static member function through a
7336 non-inherited class.
7338 * search.c (expand_upcast_fixups): Mark the new fixup as
7341 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7343 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
7345 * class.c (set_rtti_entry): Fix for thunks.
7347 * decl2.c (import_export_decl): Still emit typeinfo fns for
7348 cv-variants of builtin types.
7350 * rtti.c (expand_class_desc): Set up base_info_type_node here.
7351 (init_rtti_processing): Instead of here.
7353 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
7355 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
7356 (build_typeid): Only complain about taking dynamic typeid without
7359 * decl2.c: flag_rtti defaults to 1.
7361 * rtti.c (get_tinfo_var): The general class case is now smaller.
7362 (init_rtti_processing): Pack the latter three fields of base_info
7365 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
7367 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
7369 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
7371 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
7372 (push_memoized_context): Split out code to undefer pop_type_level to
7373 (clear_memoized_cache): here.
7374 (pop_memoized_context): We can only handle one layer of deferral of
7375 pop_type_level so clear the cache, if there was a previous level.
7377 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7379 * rtti.c (init_rtti_processing): Build up base_info_type_node.
7380 (expand_class_desc): Use one pointer to an array of base_info
7381 structs, passed using a CONSTRUCTOR.
7383 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
7385 * class.c (build_vbase_path): Remove block extern for
7386 flag_assume_nonnull_objects here.
7387 (build_vfn_ref): Split out functionality into build_vtbl_ref.
7388 (build_vtbl_ref): New routine.
7389 (build_vtable): Set up rtti info here.
7390 (add_virtual_function): Note in CLASSTYPE_RTTI the best
7391 place where we can get the rtti pointers from to avoid having to
7392 search around for a place.
7393 (finish_base_struct): Likewise.
7394 (finish_struct_1): Likewise. Never create totally new vtables
7395 with totally new vtable pointers for rtti. Disable code to layout
7396 vtable pointers better until we want to break binary
7398 * rtti.c (build_headof_sub): New routine to convert down to a
7399 sub-object that has an rtti pointer in the vtable.
7400 (build_headof): Use it. Also, use build_vtbl_ref now to be more
7402 (build_dynamic_cast): Make sure we have saved it, if we need to.
7403 * search.c (dfs_init_vbase_pointers): Disable code that deals with
7404 a more efficient vtable layout, enable later.
7405 * call.c (flag_assume_nonnull_objects): Moved declaration to
7406 * cp-tree.h: here. Declare build_vtbl_ref.
7407 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
7408 function calls that want a tree.
7410 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
7412 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
7413 other X subobjects in the most derived type. Ack.
7415 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
7416 get_typeid will do it for us.
7417 (get_typeid_1): Break out call-building for expand_*_desc to use.
7418 (get_typeid): Call it.
7419 (expand_*_desc): Likewise.
7420 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
7422 (init_decl_processing): Lose builtin_type_tdescs lossage.
7423 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
7425 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
7427 * pt.c (tsubst): When calling set_nested_typename, use
7428 TYPE_NESTED_NAME (current_class_type) instead of
7431 * decl.c (pushdecl): Likewise.
7432 (pushdecl_class_level): Likewise.
7433 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
7434 set_nested_typename.
7436 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
7438 * rtti.c (synthesize_tinfo_fn): Handle arrays.
7440 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
7442 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
7444 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
7445 (init_rtti_processing): Lose bad_cast_type.
7446 (build_dynamic_cast): Use throw_bad_cast.
7448 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
7450 * decl2.c (finish_file): Don't synthesize artificial functions
7451 that are external and not inline.
7453 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
7455 * decl2.c (finish_file): Handle having new inlines added to
7456 saved_inlines by synthesis.
7458 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
7460 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7462 RTTI rewrite to initialize nodes as needed, not require that
7463 users #include <typeinfo>, complete functionality and reduce wasted
7465 * rtti.c (init_rtti_processing): New fn.
7466 (build_typeid): The vtable entry is now a function.
7467 (get_tinfo_var): New fn.
7468 (get_tinfo_fn): Likewise.
7469 (get_typeid): Use it.
7470 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
7471 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
7473 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
7474 (synthesize_tinfo_fn): New fn.
7475 * method.c (build_t_desc_overload): Lose.
7476 (build_overload_with_type): More generic.
7477 * decl.c (init_decl_processing): Call init_rtti_processing.
7478 * class.c (set_rtti_entry): Use get_tinfo_fn.
7479 * decl2.c (mark_vtable_entries): Mark the rtti function.
7480 (finish_prevtable_vardecl): Don't build_t_desc.
7481 (import_export_decl): Handle tinfo functions.
7482 (finish_file): Likewise.
7483 * typeck.c (inline_conversion): New fn.
7484 (build_function_call_real): Use it.
7485 * cp-tree.h: Add decls.
7487 * method.c (hack_identifier): Also convert component_refs from
7490 * lex.c (cons_up_default_function): Use the type, not the name, in
7493 * decl2.c (import_export_vtable): Fix weak vtables.
7495 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
7497 * search.c (get_base_distance_recursive): Fix access checks for
7500 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7502 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
7504 (convert_harshness): Add prototypes wrapped by PROTO.
7505 * decl2.c (grok_function_init): Likewise.
7506 (do_toplevel_using_decl): Change to void return type.
7507 * class.c (build_vtable_entry): Remove decl of make_thunk.
7508 (merge_overrides): Fix order of arg definitions.
7509 (finish_vtbls): Likewise.
7510 (fixup_vtable_deltas): Likewise.
7511 (modify_all_direct_vtables): Likewise.
7512 (modify_all_indirect_vtables): Likewise.
7513 * search.c (get_base_distance_recursive): Likewise.
7514 (get_abstract_virtuals_1): Likewise.
7515 (fixup_virtual_upcast_offsets): Likewise.
7516 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
7517 * init.c (perform_member_init): Fix order of arg definitions.
7518 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
7519 * cp-tree.h (make_thunk): Add decl.
7520 (overload_template_name, push_template_decl): Add decls.
7521 (do_toplevel_using_decl): Change to void return type.
7522 (vec_binfo_member): Add decl.
7524 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7526 * typeck.c (mark_addressable, convert_for_assignment,
7527 convert_for_initialization, pointer_int_sum, pointer_diff,
7528 unary_complex_lvalue): Add prototypes wrapped by PROTO.
7529 (convert_sequence): #if 0 fn decl, since definition also is.
7531 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
7533 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
7534 cast to pointer types for type searching.
7536 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7538 * typeck.c (get_delta_difference): Use cp_error, not error, in the
7539 case where BINFO == 0.
7541 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
7543 * call.c (build_method_call): Fix wording of error messages so
7544 constructors come out right.
7546 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
7548 * decl.c (push_overloaded_decl): Don't warn about hidden
7549 constructors when both the type and the function are declared
7550 in a system header file.
7552 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
7554 * class.c (finish_struct_1): Propagate the TYPE_PACKED
7555 flag for the type to the type's fields.
7557 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7559 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
7561 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
7563 * class.c (base_info, finish_base_struct): Replace
7564 needs_virtual_dtor with base_has_virtual.
7566 (finish_struct_1): Remove the old code that tried to make default
7567 destructors virtual. Use base_has_virtual when checking if we need
7568 to add a vtable entry for the rtti code.
7570 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
7572 * pt.c (push_template_decl): Complain about template decl with
7573 inappropriate declaration.
7575 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
7577 * typeck.c (build_x_unary_op): Remove bogus check for taking
7578 the address of a member function.
7580 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
7582 * parse.y (constructor_declarator): Only push the class if
7583 we are not already in the class.
7585 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
7587 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
7588 Add additional argument to INIT_CUMULATIVE_ARGS.
7590 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
7592 * decl.c (shadow_tag): Fix error about anon union with methods.
7594 * parse.y (self_reference): Only generate a self-reference if this
7595 is a non-template class.
7596 (opt.component_decl_list): Only use it if it was generated.
7598 * parse.y (component_decl_1): Use constructor_declarator.
7599 (fn.def2): Likewise.
7600 (notype_component_declarator0): Likewise.
7602 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
7604 * typeck.c (build_x_unary_op): Add checks for taking the address
7605 of a TARGET_EXPR or of a member function, and give appropriate
7608 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
7610 * pt.c (process_template_parm): Allow template type parms to be
7611 used as types for template const parms.
7613 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
7615 * init.c (expand_vec_init): Ensure the eh cleanups are on the
7618 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
7620 * decl.c (lookup_name_real): Be even more picky about the
7621 ambiguous lookup warning.
7622 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
7623 * parse.y (constructor_declarator): Rather than here.
7625 * parse.y (constructor_declarator): New nonterminal.
7627 (explicit_instantiation): Likewise.
7629 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7631 Add implicit declaration of class name at class scope.
7632 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
7633 * parse.y (self_reference): New nonterminal.
7634 (opt.component_decl_list): Use it.
7635 (fn.def1): Add nested_name_specifier type_name cases.
7636 * class.c (build_self_reference): New function.
7637 (finish_struct): Handle access_default later, move self-reference
7639 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
7640 * cp-tree.h: Adjust.
7642 * pt.c (do_function_instantiation): Separate handling of member
7643 functions and non-member functions properly.
7645 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
7647 * pt.c (process_template_parm): Improve error for 'volatile class K'.
7649 * class.c (finish_struct_1): Check the right slot for destructors.
7651 * decl.c (start_enum): Complain about enum templates.
7653 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
7655 * init.c (resolve_offset_ref): Offset pointers to member data by one.
7656 * typeck.c (unary_complex_lvalue): Likewise.
7658 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
7660 * typeck.c (c_expand_return): Check for a returned local
7661 array name, similar to the check for an ADDR_EXPR.
7663 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
7665 * decl.c (cp_finish_decl): Don't build cleanups for static
7668 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
7670 * typeck.c (build_modify_expr): Fix error messages to be more
7672 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
7673 assignment operators.
7674 * error.c (assop_as_string): Likewise. Add support for `%Q' for
7675 assignment operators.
7677 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7679 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
7680 give an error if initialized. Pedwarn about nested type with the
7681 same name as its enclosing class.
7683 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
7685 * typeck.c (require_complete_type): Be sure to instantiate the
7686 MAIN_VARIANT of the type.
7688 * decl2.c (finish_file): Instantiate pending templates before
7689 processing static constructors and destructors.
7691 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
7694 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
7696 * decl2.c (delete_sanity): If error_mark_node is passed
7697 in as an expression, quit while we're ahead.
7699 * decl.c (grokdeclarator): Give an error message if `friend'
7700 is combined with any storage class specifiers.
7702 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
7704 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
7705 definition of nonexistent nested type.
7707 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
7708 not to say 'typedef'.
7710 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7712 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
7713 * search.c (dfs_walk, dfs_init_vbase_pointers,
7714 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
7715 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
7717 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
7719 * except.c (build_throw): Support minimal parse.
7720 * pt.c (tsubst_copy): Support THROW_EXPR.
7721 * decl2.c (build_expr_from_tree): Likewise.
7723 * pt.c (mangle_class_name_for_template): Always allocate
7726 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
7728 * cvt.c (cp_convert_to_pointer): Give an appropriate error
7729 when trying to cast from an incomplete type.
7731 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7733 * pt.c (instantiate_class_template): Don't bother setting up
7734 CLASSTYPE_TAGS explicitly, as the nested types will add
7737 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
7739 * decl.c (shadow_tag): Remove old error check for usage of
7740 an enum without a previous declaration.
7741 (xref_tag): Add error message about usage of enums without a
7742 previous declaration.
7744 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
7746 * lex.c (do_identifier): Only do name consistency check if we're
7749 * pt.c (push_template_decl): Don't crash if we get a member defn
7752 * decl.c (xref_tag_from_type): New function to do an xref without
7753 always having to figure out code_type_node.
7754 * cp-tree.h: Declare it.
7755 * pt.c (instantiate_class_template): Use it for friend classes.
7756 (lookup_template_class): Use it.
7758 * typeck2.c (build_functional_cast): Pull out a single parm before
7759 passing it to build_c_cast.
7761 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
7763 * expr.c (do_case): Give an error message if a pointer is
7764 given as a case value.
7766 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
7768 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
7771 * lex.c (cons_up_default_function): Really, now, interface hackery
7772 does not apply to synthesized methods.
7774 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
7776 * call.c (build_method_call): Ctors and dtors now have special names
7777 with respect to lookups.
7778 * class.c (add_method): Likewise.
7779 (grow_method): Likewise.
7780 (finish_struct_methods): Likewise.
7781 (warn_hidden): Likewise.
7782 (finish_struct_1): Likewise.
7783 * cvt.c (convert_to_reference): Likewise.
7784 (convert_to_aggr): Likewise.
7785 (cp_convert): Likewise.
7786 * decl2.c (check_classfn): Likewise.
7787 * init.c (expand_member_init): Likewise.
7788 (expand_default_init): Likewise.
7789 (expand_aggr_init_1): Likewise.
7790 (build_offset_ref): Likewise.
7791 (build_new): Likewise.
7792 (build_delete): Likewise.
7793 * lex.c (do_inline_function_hair): Likewise.
7794 * search.c (lookup_field_1): Likewise.
7795 (lookup_fnfields_here): Likewise.
7796 (lookup_field): Likewise.
7797 (lookup_fnfields): Likewise.
7798 (get_virtual_destructor): Likewise.
7799 (dfs_debug_mark): Likewise.
7800 (dfs_pushdecls): Likewise.
7801 (dfs_compress_decls): Likewise.
7802 * tree.c (layout_basetypes): Likewise.
7803 * typeck.c (build_component_ref): Likewise.
7804 (build_x_function_call): Likewise.
7805 (build_modify_expr): Likewise.
7806 (convert_for_initialization): Likewise.
7807 (build_functional_cast): Likewise.
7808 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
7811 * decl.c (ctor_identifier): New.
7812 (dtor_identifier): New.
7813 (init_decl_processing): Set them.
7815 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
7817 * typeck.c (build_component_ref): Don't get confused by fields whose
7818 context has no type name, like pointer to member functions.
7820 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
7822 * decl.c (grokdeclarator): Handle typedef without declarator.
7824 * pt.c (tsubst): Handle SCOPE_REF in declarator.
7826 * parse.y (bad_parm): Catch another case of missing `typename'.
7828 * lex.c (yyprint): Handle TYPE_DECLs.
7830 * decl.c (start_function): Don't try to be clever.
7832 * lex.c: Lose compiler_error_with_decl.
7833 * typeck2.c: Lose error_with_aggr_type.
7834 (incomplete_type_error): Use cp_* instead of old functions.
7835 (readonly_error): Likewise.
7836 * typeck.c (convert_arguments): Likewise.
7837 * search.c (lookup_nested_field): Likewise.
7838 * method.c (make_thunk): Likewise.
7839 * decl.c (grokparms): Likewise.
7840 * cp-tree.h: Update.
7842 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
7845 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
7847 * method.c (build_opfncall): When deleting a pointer to an
7848 array, build a new pointer to the tree past any ARRAY_TYPE
7851 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7853 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
7855 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
7857 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
7860 * decl.c (finish_function): Don't set nested based on
7861 hack_decl_function_context.
7862 * parse.y (function_try_block): Check for nested function.
7863 (pending_inlines): Likewise.
7865 * decl2.c (build_expr_from_tree): If a unary op already has a
7866 type, just return it.
7868 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
7870 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
7871 (finish_file): Check the return value of walk_vtables.
7872 (finish_prevtable_vardecl): Return int.
7873 (finish_vtable_vardecl): Likewise.
7874 (prune_vtable_vardecl): Likewise.
7875 * lex.c (set_vardecl_interface_info): Likewise.
7876 * cp-tree.h: Adjust return types.
7878 * class.c (delete_duplicate_fields_1): Don't complain about
7879 duplicate nested types if they're the same type.
7880 (finish_struct): Remove check for duplicate.
7881 * decl2.c (grokfield): Don't check for typedef of anonymous type.
7883 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
7885 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
7887 * decl.c (grokdeclarator): Lose special handling of class-level
7888 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
7889 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
7891 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
7893 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
7895 * search.c (compute_access): Fix handling of anonymous union
7897 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
7898 from anonymous unions to their members.
7900 * typeck.c (build_x_function_call): For static member functions,
7901 hand off to build_member_call.
7903 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
7905 * typeck.c (build_component_ref): Handle OFFSET_REFs.
7907 * init.c (expand_vec_init): Fix init == 0 case.
7909 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
7911 * init.c (build_new): Pedwarn about init and array new.
7912 (expand_vec_init): Handle lists, use convert_for_initialization.
7914 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
7915 when converting to an aggregate type.
7916 * cvt.c (cp_convert): Pass it through.
7918 * typeck.c (build_conditional_expr): Handle user-defined
7919 conversions to slightly different types.
7921 * decl.c (grokdeclarator): Force an array type in a parm to be
7924 * decl2.c (do_using_directive): Sorry.
7925 (do_namespace_alias): Likewise.
7926 * lex.c (real_yylex): Warn about using the `namespace' keyword.
7928 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7930 * parse.y (datadef): Move call to note_list_got_semicolon up.
7932 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
7934 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
7936 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
7938 * decl.c (cp_finish_decl): The exception regions have to be
7939 nested, not overlapping. We start the exception region for a
7940 decl, after it has been fully built, and all temporaries for it
7941 have been cleaned up.
7943 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
7945 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
7947 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
7949 * tree.def: Add RETURN_INIT.
7950 * pt.c (instantiate_decl): Handle RETURN_INIT.
7951 * decl.c (store_return_init): Handle minimal_parse_mode.
7953 * tree.c (cp_build_type_variant): Just return an error_mark_node.
7954 * decl.c (make_typename_type): Don't try to get the file and line
7956 * typeck.c (comptypes): Handle TYPENAME_TYPE.
7958 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
7960 * decl.c (poplevel): Make sure we clear out and restore old local
7961 non-VAR_DECL values by default when they go out of scope.
7963 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
7965 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
7966 referring to addresses of variables and functions.
7968 * error.c (dump_expr): Support SIZEOF_EXPR.
7970 * init.c (do_friend): Use the return value of check_classfn.
7972 * typeck.c (convert_arguments): Call complete_type.
7974 * method.c (hack_identifier): After giving an error, set value to
7977 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
7979 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
7980 lossage for local classes.
7981 * cp-tree.h: Declare it.
7982 * decl.c (lookup_name_real): Evil, painful hack for local classes.
7983 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
7984 Use hack_decl_function_context.
7985 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
7986 (start_function): Use hack_decl_function_context.
7987 (finish_function): Likewise.
7988 * method.c (synthesize_method): Likewise.
7989 * lex.c (process_next_inline): Likewise.
7990 (do_pending_inlines): Likewise.
7991 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
7994 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
7996 * sig.c (build_signature_pointer_or_reference_type): Align
7997 signature pointers/references on 8-byte boundaries so they can be
7998 grabbed 2 words at a time on a Sparc.
8000 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
8002 * method.c (hack_identifier): Requiring a static chain is now a
8004 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
8007 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
8009 * init.c (build_offset_ref): Call complete_type.
8011 * decl.c (pop_from_top_level): Always pop previous_class_type.
8013 * parse.y: Handle multiple decls in a for-init-statement.
8014 * pt.c (tsubst_expr): Likewise.
8016 * pt.c (tsubst): Use tsubst_expr for the second operand of an
8019 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
8020 (poplevel_class): Set it here.
8021 (pop_from_top_level): Pop it here if we're returning to class scope.
8022 * class.c (pushclass): Don't set it here.
8024 * decl.c (maybe_push_to_top_level): Save current_template_parms,
8025 and clear it if !pseudo.
8026 (pop_from_top_level): Restore it.
8028 * decl2.c (finish_file): Push the dummy each time we walk the list
8031 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
8032 something for CAST_EXPR.
8034 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
8036 * cvt.c (cp_convert): Warn about implicit conversion of the
8037 address of a function to bool, as it is always true.
8039 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
8041 * typeck.c (c_expand_return): Fix warning for local externs returned.
8043 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
8045 * tree.c (mapcar): Propagate const and volatile properly.
8047 * typeck.c (complete_type): Be sure to instantiate the
8048 MAIN_VARIANT of the type.
8050 * method.c (synthesize_method): Class interface hackery does not
8051 apply to synthesized methods.
8053 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
8055 * pt.c (comp_template_args): Use comptypes rather than just
8056 checking for TEMPLATE_TYPE_PARM equivalence.
8058 * typeck.c (build_x_function_call): Call complete_type before
8059 checking TYPE_OVERLOADS_CALL_EXPR.
8061 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
8063 * g++.c (main): Check also for new define ALT_LIBM.
8065 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
8067 * pt.c (instantiate_class_template): If we don't have a pattern
8069 (coerce_template_parms): If we see a local class, bail.
8071 * decl.c (grok_reference_init): Make sure there's a type before
8074 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
8075 (push_template_decl): Likewise.
8077 * parse.y (named_class_head): Set
8078 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
8080 * decl.c (xref_tag): Diagnose redeclaration of template
8081 type-parameter name.
8083 * error.c (dump_type): Handle anonymous template type parms.
8085 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
8087 (coerce_template_parms): Likewise.
8089 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
8091 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
8092 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
8094 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
8096 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
8097 before trying to get its STUB_DECL.
8098 (coerce_template_parms): Likewise.
8100 * parse.y (template_type_parm): If they didn't use 'class',
8101 pretend they did after giving an error.
8103 * pt.c (coerce_template_parms): Diagnose use of local class.
8105 * decl.c (grok_reference_init): Use instantiate_type.
8107 * error.c (dump_expr): Handle TEMPLATE_DECLs.
8109 * parse.y (named_class_head): Diagnose mismatching types and tags.
8111 * decl.c (pushdecl): Type decls and class templates clash with
8112 artificial type decls, not hide them.
8114 * decl.c (redeclaration_error_message): Diagnose redefinition of
8116 (duplicate_decls): Diagnose disallowed overloads for template
8119 * decl.c (start_decl): Call complete_type before checking for a
8122 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
8124 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
8126 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8128 * decl.c (grok_op_properties): Don't check for operator++(int) in
8131 * tree.c (perm_manip): Return a copy of variable and function
8132 decls with external linkage.
8134 * tree.def: Change some of the min tree codes to type "1".
8135 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
8136 * method.c (build_overload_int): Emit something arbitrary for
8137 anything but an INTEGER_CST if we're in a template.
8139 * decl.c (cp_finish_decl): Call complete_type before deciding
8140 whether or not to lay out the decl.
8142 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
8144 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
8146 * typeck2.c (build_x_arrow): Call complete_type.
8148 * pt.c (add_pending_template): Broken out.
8149 (lookup_template_class): If -fexternal-templates, call it for all
8150 the methods of implemented types.
8151 (instantiate_class_template): Instead of instantiating them here.
8152 (instantiate_decl): Handle -fexternal-templates earlier.
8154 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8156 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
8157 memoized lookup stuff inside GATHER_STATISTICS.
8159 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
8161 * decl.c (start_decl): Complain about array of incomplete type
8163 (grokdeclarator): Not here.
8165 * parse.y (template_parm): Expand full_parm inline so we can set
8166 the rule's precedence.
8168 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
8169 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
8170 * decl2.c (grokbitfield): Don't check for integer constant here.
8171 * class.c (finish_struct_1): Check here.
8173 * decl.c (define_label): Make the min decl go on permanent_obstack.
8175 * pt.c (unify): Don't handle CONST_DECLs.
8176 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
8177 (tsubst_copy): Likewise.
8179 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
8180 CONST_DECL for a template parm.
8182 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
8184 * decl.c (grokdeclarator): Complain about array of incomplete type
8186 (start_decl_1): Not here.
8188 * pt.c (tsubst): Handle pointer-to-function declarators.
8190 * method.c (hack_identifier): If pedantic, diagnose local class
8191 methods that require a static chain.
8193 * decl.c (grok_op_properties): No longer static.
8194 * cp-tree.h: Declare it.
8195 * pt.c (tsubst): Call it for operators.
8196 Use tsubst_copy for TREE_VECs.
8198 * parse.y (template_arg): The expr has precedence like '>'.
8200 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
8202 * pt.c (coerce_template_parms): Don't coerce an expression using
8204 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
8205 (tsubst): Don't use build_index_2_type if the max_value uses template
8207 * method.c (build_overload_int): Emit something arbitrary for an
8208 expression using template parms.
8210 * parse.y (template_close_bracket): New non-terminal to catch use
8211 of '>>' instead of '> >' in template class names.
8212 (template_type): Use it.
8213 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
8215 * tree.def: Add CAST_EXPR.
8216 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
8217 CONVERT_EXPR for minimal_parse_mode.
8218 * typeck.c (build_c_cast): Likewise.
8219 * pt.c (tsubst_copy): Likewise.
8220 * decl2.c (build_expr_from_tree): Likewise.
8221 * error.c (dump_expr): Likewise.
8223 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8225 * except.c (SetTerminate, SetUnexpected): Put back global vars.
8226 (init_exception_processing): Put back decl/init of
8227 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
8230 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
8231 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
8233 * cp-tree.h (declare_uninstantiated_type_level,
8234 uninstantiated_type_level_p): Delete prototypes.
8236 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
8238 * pt.c (tsubst_expr): Add default return.
8240 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8242 * error.c (fndecl_as_string): Delete unused arg CNAME.
8243 * sig.c (build_signature_table_constructor,
8244 build_signature_method_call): Fix calls.
8246 * class.c (the_null_vtable_entry): Delete var definition.
8247 (init_class_processing): Delete tree the_null_vtable_entry init.
8248 * decl.c (no_print_{functions, builtins}): Declare as static.
8249 (__tp_desc_type_node): #if 0 var definition.
8250 (init_type_desc): #if 0 init of __tp_desc_type_node.
8251 (vb_off_identifier): Move var decl into init_decl_processing.
8252 (current_function_assigns_this): Declare as static.
8253 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
8254 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
8255 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
8256 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
8257 * init.c (BI_header_type, BI_header_size): Declare as static.
8258 * pt.c (template_classes): Delete unused var.
8259 (add_pending_template): Delete decl for non-existent fn.
8260 (lookup_template_class): Delete vars CODE and TAG_CODE.
8261 (instantiate_template): Delete unused var TARGS.
8262 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
8264 (__tp_desc_type_node): #if 0 var decl.
8265 (fndecl_as_string): Fix prototype.
8267 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
8269 * tree.def: Add GOTO_STMT.
8270 * pt.c (tsubst_expr): Support goto and labels.
8271 * decl.c (define_label): Support minimal parsing.
8272 * parse.y (simple_stmt): Likewise.
8274 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8276 * xref.c (GNU_xref_member): Only define/set var I if
8277 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
8279 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
8280 (GNU_xref_end): Fix call.
8281 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
8282 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
8284 * tree.c (build_exception_variant): Delete unused vars I, A, T,
8286 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
8287 (mapcar): Delete unused var CODE.
8288 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
8289 (break_out_cleanups): Fix call.
8290 (bot_manip): Likewise.
8291 * call.c (build_method_call): Likewise.
8292 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
8294 * typeck.c (unary_complex_lvalue, build_modify_expr,
8295 convert_for_initialization): Likewise.
8296 * typeck2.c (build_functional_cast): Likewise.
8297 * cp-tree.h (build_cplus_new): Fix prototype.
8299 * repo.c (open_repo_file): Delete unused var Q.
8300 (repo_compile_flags, repo_template_declared,
8301 repo_template_defined, repo_class_defined, repo_inline_used,
8302 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
8303 (repo_get_id, repo_vtable_used): Declare as static.
8304 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
8307 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
8309 * parse.y (pending_inlines): Add function_try_block case.
8311 * pt.c (unify): Fix for template const parms.
8313 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8315 * lex.c (extract_interface_info): Delete forward decl.
8316 (default_copy_constructor_body, default_assign_ref_body): Delete
8317 decls for non-existent functions.
8318 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
8319 (init_lex): Delete setting them.
8320 (cons_up_default_function): Delete unused vars FUNC_BUF,
8321 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
8323 (toplevel, expression_obstack): Delete unused extern decls.
8324 (tree_node_kind): Delete unused enum.
8325 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
8327 (tree_node_kind_names): Delete unused extern decl.
8328 (synth_obstack): Delete unused var.
8329 (init_lex): Don't set it.
8330 (init_parse): Add decl before use.
8331 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
8332 (current_unit_{name, language}): Delete unused vars.
8333 (check_newline): Don't bother setting them, just accept the #pragma.
8334 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
8335 (current_unit_{name, language}): Delete decls.
8337 * search.c: Wrap all of the memoized functions, macros, and
8338 variables inside #ifdef GATHER_STATISTICS.
8339 (lookup_field, lookup_fnfields): Likewise.
8340 (init_search_processing): Likewise.
8341 (reinit_search_statistics): Wrap whole function.
8342 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
8344 * decl.c (finish_function): Only call pop_memoized_context if
8345 GATHER_STATISTICS is defined.
8346 (start_function): Likewise for push_memoized_context.
8347 * class.c (pushclass, popclass): Likewise.
8349 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
8350 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
8352 * cvt.c (cp_convert): Delete unused local var FORM.
8353 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
8356 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8358 * pt.c (do_poplevel): Oops; really return what we get from
8361 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8363 * cp-tree.h (is_aggr_type): Add prototype.
8365 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
8366 * method.c ({push,pop}_cp_function_context): Delete decls.
8367 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
8368 (SetUnexpected, SetTerminate): Delete unused vars.
8369 (init_exception_processing): Don't set SetUnexpected or
8370 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
8371 (output_exception_table_entry): Delete unused array LABEL.
8372 (expand_internal_throw): Delete unused var PARAMS.
8373 (expand_start_catch_block): Delete unused var CLEANUP.
8374 (emit_exception_table): Delete unused var EH_NODE_DECL.
8375 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
8376 GOTO_UNWIND_AND_THROW. Don't set them.
8377 (end_eh_unwinder): Add top decl.
8378 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
8379 (exception_section, push_rtl_perm, do_function_call,
8380 lang_interim_eh, push_eh_cleanup, eh_outer_context,
8381 expand_end_eh_spec, end_eh_unwinder): Declare as static.
8382 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
8383 throw_used): Likewise.
8384 * cp-tree.h (expand_end_eh_spec): Delete prototype.
8386 * search.c (dfs_mark, dfs_mark_vtable_path,
8387 dfs_unmark_vtable_path, dfs_mark_new_vtable,
8388 dfs_unmark_new_vtable, dfs_clear_search_slot,
8389 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
8390 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
8391 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
8393 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
8394 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
8395 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
8396 Only define #ifdef GATHER_STATISTICS.
8397 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
8399 (vbase_decl): Delete var definition.
8400 (init_search): Delete old decl.
8401 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
8402 never actually used.
8403 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
8404 (get_base_distance_recursive): Delete unused fourth arg
8405 BASETYPE_PATH. Fix call .
8406 (get_base_distance): Fix call.
8407 (push_class_decls): Delete unused var ID.
8408 (make_memoized_table_entry): Declare as static.
8409 (breadth_first_search): Declare as static.
8410 (tree_has_any_destructor_p): Declare as static.
8411 (pop_class_decls): Delete unused arg pop_class_decls.
8412 * class.c (popclass): Fix call to pop_class_decls.
8413 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
8414 tree_has_any_destructor_p): Delete prototypes.
8416 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
8417 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
8418 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
8419 (build_user_desc): Delete unused var T.
8420 (build_class_desc): Delete unused vars T and OFF.
8421 (build_t_desc): Delete unused var NAME_STRING.
8422 (build_headof): Make static.
8423 (get_bad_cast_node): Likewise.
8424 (get_def_to_follow): Likewise.
8425 * cp-tree.h (init_type_desc): Add prototype.
8426 (build_headof): Remove prototype.
8428 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
8430 * pt.c (tsubst): Only look for matching decls at file scope for
8431 non-member functions.
8433 * call.c (build_scoped_method_call): Handle scoped destructor
8436 * decl.c (*_top_level): Also save previous_class_values.
8438 * pt.c (tsubst_expr): Support do {} while loops.
8439 * parse.y (simple_stmt): Likewise.
8440 * tree.def: Likewise.
8442 * method.c (build_overload_identifier): For a class nested in a
8443 template class, don't mangle in the template parms from our
8446 * lex.c, cp-tree.h: Remove support for template instantiations in
8447 the pending_inlines code.
8448 * pt.c: Remove dead functions and unused arguments.
8449 (uses_template_parms): TYPENAME_TYPEs always use template parms.
8450 * parse.y: Stop passing anything to end_template_decl.
8451 * tree.c (print_lang_statistics): Only print tinst info #ifdef
8454 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8456 * init.c (expand_recursive_init{,_1}): Delete decls.
8457 (sort_member_init): Delete unused var INIT.
8458 (emit_base_init): Delete unused var X.
8459 (build_offset_ref): Delete unused var CNAME.
8460 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
8461 (emit_base_init): Delete unused local var BASE. Delete extern
8462 decl of IN_CHARGE_IDENTIFIER.
8463 (build_delete): Delete unused local var VIRTUAL_SIZE.
8465 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
8466 (build_delete): Fix call.
8467 * decl2.c (delete_sanity): Likewise.
8468 * cp-tree.h (build_vec_delete): Update prototype.
8470 * typeck.c (common_base_type): Delete unused var TMP.
8471 (build_binary_op): Delete local var ARGS_SAVE.
8472 (build_array_ref): Delete unused var ITYPE.
8473 (c_expand_return): Delete unused var USE_TEMP.
8475 * typeck.c (compexcepttypes): Delete unused arg STRICT.
8476 (comptypes): Fix calls.
8477 * decl.c (duplicate_decls): Likewise.
8478 * cp-tree.h (compexcepttypes): Delete extra arg.
8480 * decl2.c (check_classfn): Delete unused second arg CNAME.
8481 * decl.c (start_decl, grokfndecl): Fix calls.
8482 * init.c (do_friend): Likewise.
8483 * cp-tree.h (check_classfn): Update prototype.
8485 * cp-tree.h (signature_error, import_export_vtable,
8486 append_signature_fields, id_in_current_class, mark_used,
8487 copy_assignment_arg_p): Add decls.
8488 * decl2.c (mark_used): Delete decl.
8490 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
8492 * class.c (get_vtable_entry): Diable unused function.
8493 (doing_hard_virtuals): Delete unused static global var.
8494 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
8495 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
8496 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
8497 (modify_one_vtable): Delete unused var OLD_RTTI.
8498 (finish_struct_anon): Delete unused vars OFFSET and X.
8499 (finish_struct_bits): Delete unused var METHOD_VEC.
8500 (get_basefndecls): Delete unused var PURPOSE. Delete unused
8501 for-scope local variable METHODS.
8503 * call.c (user_harshness): Delete unused/unneeded arg PARM.
8504 (ideal_candidate): Delete unused args BASETYPE and PARMS.
8505 (build_method_call): Delete unused args passed into ideal_candidate.
8506 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
8507 * cp-tree.h (synthesize_method): Add decl.
8509 * decl.c (note_level_for_for): Give void return type.
8510 (pushdecl_nonclass_level): Likewise.
8511 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
8512 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
8513 (suspend_binding_level): Delete unused var LEVEL.
8514 (duplicate_decls): Delete unused var CTYPE.
8515 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
8516 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
8518 (grokdeclarator): Delete unused var C.
8519 (grokdeclarator): Delete unused var SIZE_VARIES.
8520 (grokparms): Delete unused var SAW_VOID.
8521 (start_function): Delete unused var OLDDECL.
8522 (cplus_expand_expr_stmt): Delete unused var
8523 REMOVE_IMPLICIT_IMMEDIATELY.
8525 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
8527 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
8529 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
8531 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
8532 (build_min_nt): Likewise.
8533 * pt.c (do_pushlevel): Emit line note.
8534 (do_poplevel): Return what we get from poplevel.
8535 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
8536 * parse.y: Use do_pushlevel and do_poplevel.
8537 * cp-tree.h: Declare do_poplevel.
8539 * cp-tree.h: Declare at_eof.
8540 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
8541 * decl2.c (import_export_decl): Renamed from import_export_inline.
8542 (finish_file): Call it to do interface handling for statics.
8543 * pt.c (tsubst_copy): Call mark_used on variables and functions
8546 * decl2.c (finish_file): Don't emit statics we can't generate.
8547 * pt.c (instantiate_decl): Don't set interface on instantiations
8550 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
8551 * tree.c (print_lang_statistics): Print max template depth.
8552 * pt.c (push_tinst_level): Dump entire instantiation context.
8553 (instantiate_class_template): Use it and pop_tinst_level.
8554 (instantiate_decl): Likewise.
8556 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
8557 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
8559 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
8561 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
8562 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
8563 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
8564 the new template implementation.
8566 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8568 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
8570 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
8572 * decl.c (cp_finish_decl): Delay emitting the debug information for
8573 a typedef that has been installed as the canonical typedef, if the
8574 type has not yet been defined.
8576 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
8578 * decl2.c (grokfield): Still call pop_nested_class for access decls.
8580 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8582 * decl.c (lookup_label): Call label_rtx.
8584 * decl.c (make_binding_level): New function.
8585 (pushlevel, pushlevel_class): Call it instead of explicit
8586 duplicate calls to xmalloc.
8588 * decl.c (init_decl_processing): Delete useless build_pointer_type
8591 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
8592 (sizet_ftype_string): Delete variable.
8593 (init_decl_processing): Add built-in functions fabsf, fabsl,
8594 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
8595 variable strlen_ftype, used for strlen.
8597 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
8599 * decl.c (push_to_top_level): Start from current_binding_level
8600 again for now; the stl hacks depend on g++ being broken in this
8601 way, and it'll be fixed in the template rewrite.
8603 * tree.def: Add USING_DECL.
8604 * decl2.c (do_class_using_decl): Implement.
8605 (grokfield): Pass access decls off to do_class_using_decl instead of
8607 * error.c (dump_decl): Handle USING_DECLs.
8608 * decl.c (grokdeclarator): Remove code for handling access decls.
8609 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
8610 as access decls for now.
8611 (finish_struct): Don't check USING_DECLs for other uses of the name.
8613 * search.c (get_matching_virtual): Use cp_error_at.
8615 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8617 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
8619 (self_promoting_args_p): Move the check that TYPE is non-nil
8620 before trying to look at its main variant.
8621 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
8623 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
8625 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
8626 (do_friend): Delete call to xref_friend.
8627 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
8629 * typeck.c (convert_sequence): #if 0 unused function.
8631 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
8632 be in decl_in_memory_p.
8633 (decl_in_memory_p): Delete decl.
8634 * expr.c (decl_in_memory_p): Delete fn.
8635 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
8637 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
8639 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
8641 * class.c (finish_struct_1): Check for a pure-specifier on a
8642 non-virtual function here.
8644 * decl2.c (grok_function_init): Don't check whether the function
8646 (grokfield): Don't call check_for_override here.
8648 * decl.c (push_to_top_level): Start from inner_binding_level,
8649 check class_shadowed in class levels.
8651 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
8653 * decl.c (resume_level): Ignore things that don't have names, instead
8656 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8658 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
8660 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
8662 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
8665 * parse.y (complete_type_name): Bind global_scope earlier.
8666 (complex_type_name): Likewise.
8667 (qualified_type_name): Remove.
8669 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
8671 * decl.c (grokfndecl): Move code that looks for virtuals in base
8673 * class.c (check_for_override): ... to a new function.
8674 (finish_struct_1): Call it.
8676 * cp-tree.h: Declare warn_sign_compare.
8678 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
8679 rather than extra_warnings to decide whether to warn about
8680 comparison of signed and unsigned.
8682 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
8683 implies -Wsign-compare. -Wall doesn't imply -W.
8685 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
8687 * typeck.c (build_component_ref): Fix to handle anon unions in base
8690 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8692 * class.c (resolves_to_fixed_type_p): Delete code dealing with
8693 a WITH_CLEANUP_EXPR, since we don't generate them any more.
8694 * cvt.c (build_up_reference): Likewise.
8695 * decl.c (grok_reference_init): Likewise.
8696 (cp_finish_decl): Likewise.
8697 * error.c (dump_expr): Likewise.
8698 * tree.c (real_lvalue_p): Likewise.
8699 (lvalue_p): Likewise.
8700 (build_cplus_new): Likewise.
8701 (unsave_expr_now): Likewise.
8702 * typeck.c (unary_complex_lvalue, build_modify_expr,
8703 c_expand_return): Likewise.
8705 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8707 Make the C++ front-end pay attention to attributes for structures.
8708 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
8710 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
8711 Take out old round_up_size use and setting the DECL_ALIGN possibly
8712 using it. Take out setting of TYPE_ALIGN to round_up_size, which
8713 can override what the attribute set.
8714 * cp-tree.h (finish_struct): Update prototype.
8715 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
8716 attributes to finish_struct.
8717 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
8718 value down into finish_struct.
8719 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
8721 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
8723 * decl.c (poplevel): Re-word dead for local handling.
8724 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
8725 (cp_finish_decl): If is_for_scope, check for duplicates so
8726 we can disable is_for_scope. Otherwise, preserve_temp_slots.
8728 * lex.c (do_identifier): Use global binding in preference of
8729 dead for local variable.
8731 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
8733 * init.c (initializing_context): Handle anon union changes, the
8734 context where fields of anon unions can be initialized now has to be
8735 found by walking up the TYPE_CONTEXT chain.
8737 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
8739 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
8740 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
8741 (obscure_complex_init): If bss is supported, always set
8742 DECL_INITIAL to error_mark_node.
8744 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8746 * init.c (is_friend): Make sure there's a context before we see if
8749 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
8751 * init.c (is_friend): Classes are not friendly with nested classes.
8753 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
8755 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
8756 and record its result.
8758 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
8760 * class.c (finish_struct_anon): Switch around code to not move anon
8761 union elements around, nor mess up their contexts, nor offsets,
8762 instead we now build up the right number of COMPONENT_REFs for all
8763 the anon unions that may be present at build_component_ref time.
8764 * typeck.c (lookup_anon_field): New routine to handle field lookup
8765 on fields without names. We find them, based upon their unique type
8767 * typeck.c (build_component_ref): Allow FIELD_DECL components.
8768 Handle finding components in anonymous unions, and ensure that a
8769 COMPONENT_REF is built for each level as necessary.
8771 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
8773 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
8774 code that ensures that copy ctors are used if appropriate.
8776 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8778 * init.c (build_vec_delete): Only give an error if base isn't an
8781 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
8783 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
8784 (yylex): If we see `new', keep slurping.
8786 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
8788 * class.c (finish_struct_1): Move code for handling anon unions...
8789 (finish_struct_anon): to here. Fixup so that we do the offset
8790 calculations right, and so that the fields are physically moved to
8791 the containers's chain.
8793 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8795 * decl.c (grokdeclarator): Avoid trying to get an operand off an
8798 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
8800 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
8801 POINTER_SIZE to agree with expr.c.
8803 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
8805 * search.c (lookup_field): Don't report ambiguities if protect is 0,
8806 instead return NULL_TREE.
8808 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
8810 * class.c (finish_struct_1): Call warn_hidden if we want warnings
8811 about overloaded virtual functions.
8812 (warn_hidden): New routine to warn of virtual functions that are
8813 hidden by other virtual functions, that are not overridden.
8814 (get_basefndecls): New routine, used by warn_hidden.
8815 (mark_overriders): New routine, used by warn_hidden.
8816 * search.c (get_matching_virtual): Remove old warning that just
8819 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8821 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
8823 * typeck.c (null_ptr_cst_p): Delete unused fn.
8824 (build_function_call_maybe): Delete unused fn.
8826 * expr.c (extract_init): #if 0 the code after unconditional return 0
8829 Delete old cadillac code.
8830 * edsel.c: Remove file.
8831 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
8832 * Makefile.in (CXX_OBJS): Delete edsel.o.
8833 (edsel.o): Delete rule.
8834 * cp-tree.h (flag_cadillac): Delete var decl.
8835 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
8836 * decl2.c (flag_cadillac): Delete var definition.
8837 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
8838 (grokfield): Delete code depending on flag_cadillac.
8839 (finish_anon_union): Likewise.
8840 * class.c (finish_struct_1): Likewise.
8841 (pushclass): Likewise.
8842 (popclass): Likewise.
8843 (push_lang_context): Likewise.
8844 (pop_lang_context): Likewise.
8845 * decl.c (init_decl_processing): Likewise.
8846 (start_decl): Likewise.
8847 (cp_finish_decl): Likewise.
8848 (xref_tag): Likewise.
8849 (finish_enum): Likewise.
8850 (start_function): Likewise.
8851 (finish_function): Likewise.
8852 (finish_stmt): Likewise.
8853 * lex.c (lang_init): Likewise.
8854 (check_newline): Likewise.
8856 * lex.c (do_pending_inlines): Delete synthesized method kludge.
8858 Delete defunct, ancient garbage collection implementation.
8859 * rtti.c: New file with the RTTI stuff from gc.c.
8860 * gc.c: Removed file (moved the remaining stuff into rtti.c).
8861 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
8862 (rtti.o): New rule, replacing gc.o.
8863 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
8864 * cp-tree.h: Delete gc-related fn decls.
8865 (DECL_GC_OFFSET): Delete macro.
8866 (flag_gc): Delete extern decl.
8867 * decl.c (current_function_obstack_index): Delete var decl.
8868 (current_function_obstack_usage): Delete var decl.
8869 (start_function): Delete clearing of current_function_obstack_index
8870 and current_function_obstack_usage.
8871 (init_decl_processing): Delete code relying on -fgc.
8872 Delete call to init_gc_processing.
8873 (cp_finish_decl): Delete calls to build_static_gc_entry and
8874 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
8875 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
8876 and to expand_expr of a __gc_main call.
8877 (maybe_gc_cleanup): Delete var decl.
8878 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
8879 * decl2.c (flag_gc): Delete var decl.
8880 (lang_f_options): Delete offering of -fgc.
8881 (lang_decode_option): Delete -fgc and -fno-gc handling.
8882 (get_temp_regvar): Delete gc code.
8883 * init.c (build_new): Delete gc code.
8884 * lex.c (init_lex): Delete checking of flag_gc.
8886 * typeck.c (convert_arguments): Delete gc code.
8887 (build_component_addr): Delete -fgc warning.
8888 (build_modify_expr): Delete gc code.
8890 * decl2.c (build_push_scope): Delete fn.
8891 * cp-tree.h (build_push_scope): Delete decl.
8893 * search.c (clear_search_slots): Delete fn.
8894 * cp-tree.h (clear_search_slots): Delete decl.
8896 * search.c (tree_needs_constructor_p): Delete fn.
8897 * cp-tree.h (tree_needs_constructor_p): Delete decl.
8899 * tree.c (id_cmp): Delete fn.
8901 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
8902 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
8904 * tree.c (decl_value_member): Delete fn.
8905 * cp-tree.h (decl_value_member): Delete decl.
8907 * tree.c (list_hash_lookup_or_cons): Delete fn.
8908 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
8910 * method.c (cplus_exception_name): Delete fn.
8911 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
8913 * spew.c (shift_tokens): Delete fn.
8915 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
8917 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
8919 * parse.y: Likewise.
8921 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8923 * tree.c (build_cplus_staticfn_type): Delete function definition;
8925 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
8927 * tree.c (virtual_member): Delete function definition; never used.
8928 * cp-tree.h (virtual_member): Delete decl.
8930 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
8932 * typeck.c (build_component_ref): Handle getting vbase pointers
8933 out of complex multiple inheritance better.
8935 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
8937 * typeck.c (build_object_ref): Make sure we use the real type, not
8940 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
8942 * tree.c (build_exception_variant): Don't create new types if we
8943 don't have to, also build new types on the right obstack.
8945 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8947 * decl.c (store_bindings): Split out from push_to_top_level.
8948 (push_to_top_level): Call it for b->type_shadowed on class binding
8951 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
8953 * search.c (expand_upcast_fixups): Fix so that offsets stored in
8954 vbase_offsets are always right. Fixes a problem where virtual base
8955 upcasting and downcasting could be wrong during conversions on this
8956 during virtual function dispatch at ctor/dtor time when dynamic
8957 vtable fixups for deltas are needed. This only sounds easier than
8959 (fixup_virtual_upcast_offsets): Change to reflect new calling
8960 convention for expand_upcast_fixups.
8962 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8964 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
8965 check that it's usable as the bitfield width.
8967 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8969 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
8970 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
8971 only ever used for functions in it.
8973 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
8975 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
8976 (nested_type): Likewise.
8977 (nested_name_specifier): Use lastiddecl.
8979 * decl.c (grokdeclarator): Adjust accordingly.
8980 * init.c (expand_member_init): Likewise.
8981 * parse.y (base_class): Likewise.
8982 * typeck2.c (build_functional_cast): Likewise.
8984 * typeck2.c (build_functional_cast): Fill in name after we've
8985 checked for non-aggr type.
8987 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
8989 * decl2.c (warn_pointer_arith): Default to on.
8991 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
8993 * lex.c (is_rid): New function.
8994 * decl.c (grokdeclarator): Diagnose reserved words used as
8997 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
8999 * tree.c (get_decl_list): Don't lose cv-quals.
9001 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
9002 typespecs used as declarator-ids.
9004 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
9006 * decl.c (poplevel): When poping a level, don't give a warning for
9007 any subblocks that already exist.
9009 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
9011 * typeck.c (build_object_ref): Finish what I started.
9013 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
9015 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
9017 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9020 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
9022 * decl.c (xref_tag): Handle passing a type in directly.
9024 * parse.y (qualified_type_name): Pull out the type.
9025 (nested_type): Likewise.
9026 Take types directly instead of as identifiers.
9027 * call.c (build_scoped_method_call): Take types directly instead of
9029 * decl.c (xref_basetypes): Likewise.
9030 * init.c (expand_member_init): Likewise.
9031 (build_member_call): Likewise.
9032 (build_offset_ref): Likewise.
9033 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
9034 * method.c (do_build_assign_ref): Likewise.
9035 * decl.c (grokdeclarator): Handle a type appearing as the
9036 declarator-id for constructors.
9037 * method.c (do_build_copy_constructor): current_base_init_list now
9038 uses the types directly, not their names.
9039 * init.c (sort_base_init): Likewise.
9040 (expand_member_init): Likewise.
9041 * init.c (is_aggr_type): New function, like is_aggr_typedef.
9043 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
9045 * tree.c (layout_basetypes): Call build_lang_field_decl instead
9046 of build_lang_decl if first arg is a FIELD_DECL.
9048 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9050 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
9052 * except.c (expand_start_catch_block): Set TREE_USED to avoid
9053 warnings about the catch handler.
9055 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
9057 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9060 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9062 Fix access control to use trees rather than integers.
9063 * class.c (access_{default, public, protected, private,
9064 default_virtual, public_virtual, private_virtual}_node): Add
9066 (init_class_processing): Do creation of those nodes.
9067 * cp-tree.h (access_type): Delete enum decl.
9068 (access_{default, public, protected, private, default_virtual,
9069 public_virtual, private_virtual}_node): Add decls.
9070 (compute_access): Change return type.
9071 * search.c (compute_access): Have tree return type, instead of enum.
9072 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
9073 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
9074 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
9075 * parse.y (VISSPEC): Make ttype rather than itype.
9076 (base_class_access_list): Likewise.
9077 * *.[cy]: Change all refs of `access_public' to `access_public_node',
9079 * call.c (build_method_call): Make ACCESS be a tree.
9080 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
9081 * cvt.c (convert_to_aggr): Likewise.
9082 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
9084 * method.c (hack_identifier): Likewise.
9085 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
9087 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
9089 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
9090 frontend, and make it more consistent with respect to
9093 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
9095 * decl.c (pushdecl): Check for duplicate parameter names.
9097 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
9099 * decl.c (expand_static_init): Call assemble_external for atexit.
9101 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
9103 * except.c (do_unwind): Remove some generated dead code.
9104 (eh_outer_context): New routine, factor out some common code from
9105 expand_builtin_throw and end_eh_unwinder. Add code to do return
9106 address masking for the PA.
9107 (expand_builtin_throw): Use eh_outer_context instead of open coding
9109 (end_eh_unwinder): Likewise.
9111 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
9113 * except.c (expand_throw): Call assemble_external for __empty, if we
9116 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
9118 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
9119 NORMAL_RETURN_ADDR_OFFSET.
9120 (end_eh_unwinder): Likewise.
9122 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
9124 * gc.c (build_dynamic_cast): Make sure we don't cast away const
9125 when dealing with references, and make sure we handle dynamic
9126 casting to a cv qualified reference.
9128 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
9130 * except.c (struct eh_context): New structure top hold eh context
9132 (push_eh_context): New routine.
9133 (pop_eh_context): Likewise.
9134 * decl.c (push_cp_function_context): Use them.
9135 (pop_cp_function_context): Likewise.
9137 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
9139 * decl2.c (finish_file): Also prune uninteresting functions in the
9140 inline emission loop.
9142 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
9144 * sig.c (build_signature_table_constructor): Mark functions
9145 in the signature as referenced.
9147 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
9149 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
9150 the inline emission stuff.
9152 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
9154 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9156 * lang-options.h: Add -f{no-,}weak.
9157 * decl.c (init_decl_processing): If the target does not support weak
9158 symbols, don't use them.
9159 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
9161 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
9163 * init.c (expand_member_init): warning for base init after members.
9165 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
9167 * cvt.c (build_expr_type_conversion): Don't convert to a reference
9170 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
9172 * method.c (report_type_mismatch): Improve wording for volatile
9175 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
9177 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9178 expand_assignment, as the later doesn't handle things that have
9179 copy constructors well. The compiler would do bitwise copying,
9180 instead of ctor calling in some cases.
9182 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
9184 * g++.c (my_strerror): Return "cannot access" if errno is 0.
9185 (pfatal_with_name, perror_exec): Don't assume that
9186 the returned value from my_strerror contains no '%'s.
9188 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
9190 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
9192 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
9193 TYPE_METHODS/TREE_CHAIN mean what they used to.
9194 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
9195 instead of TYPE_METHODS.
9196 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
9197 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
9198 * cp-tree.h (CLASSTYPE_METHODS): Lose.
9199 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
9201 (struct lang_decl): Lose next_method field.
9202 (DECL_NEXT_METHOD): Lose.
9203 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
9204 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
9206 (finish_struct_methods): Don't mess with the TREE_CHAINs in
9209 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
9212 * call.c (build_method_call): Synthesize here even when not inlining.
9213 * typeck.c (build_function_call_real): Likewise.
9215 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
9217 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
9218 == DBX_DEBUG, call dbxout_start_new_source_file and
9219 dbxout_resume_previous_source_file when appropriate.
9221 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
9223 * except.c (start_anon_func): Push to the top level.
9224 (end_anon_func): Pop from the top level.
9226 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
9228 * cp-tree.h (build_cleanup): New routine to build cleanups.
9229 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
9230 call at ctor time and use atexit to run it later.
9231 * decl2.c (build_cleanup): New routine, taken from finish_file.
9232 (finish_file): Use build_cleanup instead, and don't put function
9233 local statics in global dtor list.
9235 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
9237 * except.c (expand_throw): Ensure that we have cleanups, if we try
9238 and expand cleanups.
9240 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
9242 * except.c (expand_throw): Add logic to manage dynamic cleanups for
9244 (expand_end_catch_block): Use the magic of expand_goto, instead of
9245 emit_jump so that we get the cleanup for any catch clause parameter
9246 and the cleanup for the exception object. Update to reflect label
9248 (push_eh_cleanup): New routine to register a cleanup for an
9250 (empty_fndecl): Used to default cleanup actions to
9252 (init_exception_processing): Setup empty_fndecl. Setup
9254 (expand_start_catch_block): Update to reflect label changes. Call
9255 push_eh_object to register the cleanup for the EH object.
9256 (start_anon_func): New routine to start building lambda expressions
9258 (end_anon_func): New routine to end them.
9259 (struct labelNode): Change so that we can use tree labels, or rtx
9261 (saved_cleanup): Object to check for dynamic cleanups for the
9262 exception handling object.
9263 (push_label_entry): Change so that we can use tree labels, or rtx
9265 (pop_label_entry): Likewise.
9266 (top_label_entry): Likewise.
9267 (expand_start_all_catch): Use tree label instead of rtx label, so
9268 that we can get the magic of expand_goto.
9269 (expand_end_all_catch): Update to reflect label changes.
9271 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
9273 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
9274 building_cleanup logic, as we now use UNSAVE_EXPRs.
9275 * cp-tree.h (unsave_expr): Declare it.
9276 * decl.c (building_cleanup): Remove.
9277 (maybe_build_cleanup): Remove building_cleanup logic, and use
9278 UNSAVE_EXPR instead.
9280 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
9282 * gc.c (build_t_desc): Update error message to say <typeinfo>.
9284 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9286 * decl.c (pushdecl): Only warn about shadowing a local variable if
9287 warn_shadow is true.
9289 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
9291 * typeck.c (build_binary_op_nodefault): Added warning about
9292 comparisons between different enum types with -Wall, unless
9293 -fenum-int-equiv set.
9295 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
9297 * class.c (finish_struct_1): Skip down to the inner type in
9298 multidimensional arrays. Ensures ctors will be made for types that
9301 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
9303 * decl.c (last_dtor_insn): New to track the last compiler generated
9305 (store_parm_decls): Set it.
9306 (finish_function): Use it to see if the dtor is empty. Avoid doing
9307 vtable setup all the time, if we can.
9308 (struct cp_function): Add last_dtor_insn.
9309 (push_cp_function_context): Save it.
9310 (pop_cp_function_context): Restore it.
9312 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
9314 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9317 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
9319 * typeck.c (expand_target_expr): Make sure targets get put into the
9320 current temp_slot_level, so that the free_temp_slots call will reuse
9323 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
9325 * class.c (finish_struct_1): Delay delta fixups for virtual bases
9326 until after we have done the hard virtuals, to avoid a bogus `every
9327 virtual function must have a unique final overrider' for virtual
9328 functions that are only overridden by hard virtuals.
9330 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
9332 * pt.c (do_function_instantiation): Don't try to find a file-scope
9333 template for a member function.
9335 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
9337 * g++.c (main): Add handling of -nodefaultlibs.
9339 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
9341 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
9342 distinguish between direct bindings of reference variables, and
9343 indirect bindings of reference variables.
9344 * cvt.c (build_up_reference): Use it.
9345 * typeck.c (convert_arguments): Use it to indicate this is an
9347 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
9349 (expand_static_init): Likewise.
9350 (cplus_expand_expr_stmt): Likewise.
9351 * decl2.c (finish_file): Likewise.
9352 * init.c (perform_member_init): Likewise.
9353 (emit_base_init): Likewise.
9354 (expand_aggr_vbase_init_1): Likewise.
9356 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9358 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
9359 get a DECL_LANG_SPECIFIC node.
9360 * cp-tree.h (lang_decl_flags): Add new member `level'.
9361 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
9362 decl_flags level member.
9364 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9366 * call.c (build_method_call): Make sure instance has a
9367 TYPE_LANG_SPECIFIC node before we dive into it.
9369 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
9371 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
9373 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
9375 * decl.c (duplicate_decls): When smashing decls, smash staticness in
9378 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
9380 * decl.c (poplevel): Handle the merging of subblocks of cleanups
9381 when finishing blocks that have already been created (usually due to
9382 the fixup goto code). Fixes bad debugging information.
9384 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
9386 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
9387 that's not a list of overloaded functions.
9389 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9391 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
9392 before trying to use DECL_ABSTRACT_VIRTUAL_P.
9394 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
9396 * decl2.c (mark_used): New function for hooking into setting of
9398 * call.c (build_method_call): Use it.
9399 * class.c (instantiate_type): Likewise.
9400 * init.c (build_offset_ref): Likewise. Don't call assemble_external
9401 for all like-named functions.
9402 * method.c (hack_identifier): Likewise.
9403 (emit_thunk): Don't call assemble_external.
9404 (make_thunk): Create thunk as a FUNCTION_DECL so that it
9405 gets the right mode and ENCODE_SECTION_INFO works.
9407 * parse.y: Use mark_used. Pass operator names to do_identifier.
9408 * lex.c (do_identifier): Handle operator names.
9410 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
9412 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9414 * errfn.c: Include stdio.h.
9415 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
9417 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
9419 * typeck2.c (digest_init): Always convert initializers to the
9422 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
9424 * init.c (member_init_ok_or_else): Don't allow member initializers
9425 for indirect members, as it is invalid.
9427 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9429 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
9431 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
9433 * parse.y (for.init.statement): Catch compound statements inside for
9434 initializations, if we're being pedantic.
9436 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
9438 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
9441 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
9443 * error.c (dump_expr): Don't core dump when a boolean expression is
9444 used as a default argument.
9446 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
9448 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9451 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
9453 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
9454 BLKmode type that would otherwise be returned in registers.
9456 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9458 * g++.c (WITHLIBC): New macro.
9459 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
9460 saw_libc and pass it at the end if it was set.
9462 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9464 * parse.y (fn.def1): Call split_specs_attrs in
9465 declmods notype_declarator case.
9467 Use a consistent time stamp format in ChangeLog entries.
9468 Not everyone has Emacs 20 yet, so stick with Emacs 19 format for now.
9471 add-log-time-format: current-time-string