]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
* ptree.c (lang_print_xnode): Add missing `break'.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
08362e16
MM
1Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
2
3 * ptree.c (lang_print_xnode): Add missing `break'.
4
9b2e5e22
MM
5Mon May 11 10:09:16 1998 Mark Mitchell <mmitchell@usa.net>
6
7 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8
89ad74a3
MM
9Mon May 11 07:16:30 1998 Mark Mitchell <mmitchell@usa.net>
10
830bfa74
MM
11 * call.c (add_template_candidate): Adjust for changes to
12 fn_type_unification.
13 (add_template_candidate_real): Likewise.
14 (add_template_conv_candidate): Likewise.
15 (build_user_type_conversion_1): Likewise.
16 (build_new_function_call): Likewise.
17 (build_object_call): Likewise.
18 (build_new_op): Likewise.
19 (build_new_method_call): Likewise.
20 * class.c (instantiate_type): Likewise.
21 * cp-tree.h (unification_kind_t): New type.
22 (fn_type_unification): Adjust prototype.
23 (type_unificaiton): Likewise.
24 * pt.c (UNIFY_ALLOW_NONE): New macro.
25 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
26 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
27 (UNIFY_ALLOW_DERIVED): Likewise.
28 (unify): Change prototype.
29 (maybe_adjust_types_for_deduction): New function.
30 (check_cv_quals_for_unify): Likewise.
31 (determine_specialization): Adjust.
32 (fn_type_unification): Likewise.
33 (type_unification): Likewise.
34 (type_unification_real): Likewise. Use
35 maybe_adjust_types_for_deduction. Fix mishandling of
36 back-unification of template functions passed as arguments. Pass
37 appropriate combination of UNIFY_ALLOW_* to unify.
38 (unify): Remove unused NTPARMS parameter. Use
39 check_cv_quals_for_unify. Remove bogus code that allowed
40 too-generous unification in order to adhere more closely to standard.
41 (get_bindings_real): Adjust.
42 (get_class_bindings): Likewise.
43
44 * method.c (build_overload_identifier): Only use the innermost
45 template arguments when mangling.
46 * pt.c (tsubst_template_argument_vector): New function.
47 (complete_template_args): Deal with the situation where the
48 extra_args contain more than one level of arguments.
49 (lookup_template_class): Deal with member template classes, which
50 may have more than one level of arguments.
51 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
52 Improve handling of member template classes. Use
53 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
54 tsubst_template_argument_vector where appropriate.
55 (regenerate_decl_from_template): Break out from ...
56 (instantiate_decl): Here.
57
89ad74a3
MM
58 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
59 * parse.h: Regenerated.
60 * parse.c: Really regenerated.
61
ce4a0391
MM
62Mon May 11 00:03:34 1998 Mark Mitchell <mmitchell@usa.net>
63
64 * cp-tree.h (finish_unary_op_expr): New function.
65 (finish_id_expr): Likewise.
66 (begin_new_placement): Likewise.
67 (finish_new_placement): Likewise.
68 (finish_declarator): Likewise.
69 (finish_translation_unit): Likewise.
70 (finish_parmlist): Likewise.
71 (begin_class_definition): Likewise.
72 (finish_class_definition): Likewise.
73 (finish_default_args): Likewise.
74 (finish_inline_definitions): Likewise.
75 * parse.y (GCC_ASM_KEYWORD): Remove.
76 (TYPENAME_ELLIPSIS): Likewise.
77 * parse.c: Regenerated.
78 Use new functions in semantics.c in the actions for many rules.
79 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
80 * hash.h: Regenerated.
81 * semantics.c (finish_expr_stmt): Allow NULL expr.
82 (finish_unary_op_expr): New function, containing
83 code previously in parse.y.
84 (finish_id_expr): Likewise.
85 (begin_new_placement): Likewise.
86 (finish_new_placement): Likewise.
87 (finish_declarator): Likewise.
88 (finish_translation_unit): Likewise.
89 (finish_parmlist): Likewise.
90 (begin_class_definition): Likewise.
91 (finish_class_definition): Likewise.
92 (finish_default_args): Likewise.
93 (finish_inline_definitions): Likewise.
94
4785faf1
MM
95Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
96
97 * typeck.c (build_c_cast): Don't decay arrays and functions to
98 pointer type when converting to a class type.
99
b3854d0e
JM
100Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
101
102 * cp-tree.h (DECL_NAMESPACE_SCOPE): New macro.
103 (DECL_CLASS_SCOPE): Likewise.
104
42c7b807
JM
105Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
106
107 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
108 * decl2.c (constructor_name_full): Likewise.
109
110Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
111
112 * tree.c (mapcar): Add OVERLOAD support.
113
114 * init.c (resolve_offset_ref): We must use basetype_path before we
115 destroy it with a call to convert_pointer_to.
116
b9082e8a
JM
117Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
118
119 * class.c (currently_open_class): New fn.
120 * decl.c (lookup_name_real): Use it.
121 * search.c (lookup_field): Likewise.
122
123Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
2c73f9f5
ML
124
125 * cp-tree.def (OVERLOAD): New node.
126 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
127 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
128 (NAMESPACE_BINDING): Remove.
129 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
130 namespace_binding.
131 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
132 Define.
133 (tree_overload): New struct.
134 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
135 (REAL_IDENTIFIER_TYPE_VALUE): Define.
136 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
137 (lang_decl_flags): Remove in_namespace.
138 (lang_decl): Remove chain.
139 (DECL_CHAIN, DECL_NAMESPACE): Remove.
140 (flag_honor_std): Declare extern.
141 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
142 namespace_binding, set_namespace_binding,
143 lookup_function_nonclass, cat_namespace_levels,
144 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
145 scratch_ovl_cons, ovl_member, build_overload): Declare.
146 (decl_list_length, get_namespace_id, current_namespace_id,
147 overloaded_globals_p): Remove.
148 (lookup_using_namespace, qualified_lookup_using_namespace): Change
149 return type.
150 (push_scratch_obstack): New macro.
151 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
152 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
153 convs, fns.
154 (build_new_function_call): Iterate using OVL_CHAIN.
155 Print DECL_NAME in when reporting ambiguities.
156 (build_object_call): Iterate using OVL_NEXT for fns, convs.
157 (build_new_op): Call lookup_function_nonclass.
158 Iterate using OVL_NEXT.
159 (build_op_delete_call): Change detection of members.
160 Do not wrap TREE_LIST around fields and single global functions.
161 (build_over_call): Don't push a class level if the context is a
162 namespace.
163 (build_new_method_call): Iterate using OVL_NEXT.
164 * class.c (add_method): Chain overloaded members using
165 build_overload. Remove copying of method.
166 (grow_method): When iterating through the obstack, expect OVERLOAD
167 nodes. Chain overload members.
168 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
169 nodes in call to get_baselinks.
170 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
171 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
172 fdecls that are OVERLOAD nodes.
173 (validate_lhs): New function.
174 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
175 code. Use DECL_NAME in error messages. Split code between global
176 and member function processing.
177 * decl.c (global_type_node): New static variable.
178 (in_std): New global.
179 (struct binding_level): New field usings.
180 (resume_binding_level): Assert that we are not in a class.
181 (toplevel_bindings_p): Just check for namespace_p or
182 pseudo_global.
183 (resume_level): Remove.
184 (find_binding): New function.
185 (binding_for_name): Call it.
186 (namespace_binding, set_namespace_binding): New functions.
187 (push_namespace): Associate binding level with new namespace,
188 resume_binding_level for existing namespace. Remove old code.
189 Fake std by counting.
190 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
191 (maybe_push_to_top_level): Save current namespace.
192 (pop_from_top_level): Restore saved namespace.
193 (pop_namespace): Call suspend_binding_level. Remove old code.
194 (cat_namespace_levels): New function.
195 (set_identifier_type_value_with_scope): For namespace bindings,
196 set BINDING_TYPE, and use global_type_node.
197 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
198 (identifier_type_value): New function.
199 (pushtag): If no context, use current_namespace.
200 (duplicate_decls): Don't process DECL_CHAIN.
201 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
202 already set. Never reset it to NULL_TREE. Lookup global variables
203 in their namespace. Push overloaded templates if they are on
204 namespace level.
205 (pushdecl_namespace_level): New function.
206 (pushdecl_top_level): Implement using pushdecl_namespace_level.
207 (pushdecl_using_decl): New function.
208 (overloaded_globals_p): Remove.
209 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
210 them. Use namespace_binding and set_namespace_value.
211 (redeclaration_error_message): Complain if the declarations come
212 from different namespaces.
213 (lookup_tag): On namespace level, look in the BINDING_TYPE.
214 (lookup_namespace_name): Pass tree_bindings from stack. Remove
215 old code.
216 (select_decl): New function.
217 (lookup_name_real): Call it for qualified and unqualified lookup.
218 Pass tree_bindings from the stack.
219 If prefer_type is 1, also accept namespaces.
220 (lookup_function_nonclass): New function.
221 (init_decl_processing): Set the binding level of the global
222 namespace to global_binding_level.
223 Build a proper type list for __builtin_apply.
224 Initialize std_node to "fake std" if flag_honor_std is set.
225 Initialize global_type_node.
226 Allocated bad_alloc in namespace std if flag_honor_std.
227 (define_function): Set the DECL_CONTEXT to the current_namespace.
228 (start_decl): A namespace is not considered as a context here. If
229 the DECL_CONTEXT is a namespace, push the decl.
230 (cp_finish_decl): Check for namespaces used as initializers.
231 (grokfndecl): Add namespace parameter. Remove processing of
232 DECL_CHAIN.
233 (grokvardecl): Add namespace parameter.
234 (grokdeclarator): Process SCOPEs that are namespaces. For
235 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
236 (start_function): Check for contexts that are namespaces.
237 Set context for declarations that have not been pushed.
238 (store_parm_decls): Check for ::main only.
239 (finish_function): Likewise.
240 (start_method): Check for contexts that are namespaces.
241 (start_method): Remove DECL_CHAIN processing.
242 * decl2.c (flag_honor_std): Declare.
243 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
244 (decl_namespace_list): New static global.
245 (grok_x_components): Ignore namespaces as type contexts.
246 (check_classfn): Expect OVERLOAD nodes.
247 (grokfield): Remove DECL_CHAIN processing.
248 (finish_file): Call cat_namespace_levels.
249 (merge_functions): New function.
250 (ambiguous_decl): Rewrite.
251 (lookup_using_namespace): Produce tree_bindings.
252 (qualified_lookup_using_namespace): Likewise.
253 (set_decl_namespace, decl_namespace, current_decl_namespace,
254 push_decl_namespace, pop_decl_namespace): New functions.
255 (arg_lookup): New struct.
256 (add_function, arg_assoc_namespace, arg_assoc_class,
257 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
258 New functions.
259 (get_namespace_id, current_namespace_id): Remove.
260 (do_toplevel_using_decl): Rewrite.
261 (do_class_using_decl): Complain about namespace qualifiers.
262 (do_using_directive): Sorry if not on namespace level. Complain
263 about unknown namespaces.
264 * error.c (dump_aggr_type): Check for namespace contexts.
265 * except.c (init_exception_processing): Push terminate into std.
266 * friend.c (is_friend): A namespace is not a context, here.
267 * init.c (expand_member_init): Remove DECL_CHAIN processing.
268 (build_offset_ref): Process OVERLOAD nodes.
269 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
270 * lex.c (identifier_type): Loop using OVL_CHAIN.
271 (see_typename): Set looking_for_typename to 2.
272 (real_yylex): Likewise.
273 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
274 (do_scoped_id): Expect OVERLOAD nodes.
275 Change calling convention for qualified_lookup_using_namespace.
276 (build_lang_decl): Don't set in_namespace anymore.
277 * method.c (typevec_size): New global.
278 (build_overload_nested_name): Return if global_namespace.
279 Otherwise, always expect a declaration context.
280 (build_qualified_name): Likewise.
281 Make sure we don't write beyond typevec_size.
282 (build_decl_overload_real): Likewise.
283 Allocate one extra slot for the namespace.
284 (hack_identifier): Mark code dead.
285 Process OVERLOAD and NAMESPACE_DECL nodes.
286 * parse.y (program): Pop namespaces until in global namespace.
287 (extdef): In a using-declaration, don't discard the identifier if
288 there is no declaration.
289 (left_curly): Ignore type contexts which are namespaces.
290 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
291 used as scope.
292 * pt.c (template_class_depth): Expect types to be namespaces.
293 (determine_specialization): Simplify by expecting OVERLOAD nodes.
294 (push_template_decl): Push into namespace level.
295 Reset ctx if it is a namespace.
296 Set DECL_CONTEXT to current_namespace if not set already.
297 Ignore real contexts that are namespaces.
298 (mangle_class_name_for_template): Skip global_namespace.
299 Mangle other namepaces as declarations.
300 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
301 (lookup_template_class): Push into namespace of context.
302 If the context is a namespace, set it to global_namespace.
303 Use id_context for mangling.
304 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
305 (tsubst_friend_function): Ignore namespace contexts.
306 Push into namespace level.
307 (tsubst): Handle NAMESPACE_DECL nodes.
308 Remove DECL_CHAIN processing.
309 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
310 * ptree.c (print_lang_identifier): Print bindings.
311 (lang_print_xnode): Print OVERLOAD nodes.
312 * rtti.c (init_rtti_processing): Push type_info into std.
313 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
314 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
315 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
316 lookup_fnfields_here): Likewise.
317 Process all nodes, instead of going through TREE_CHAIN.
318 * sig.c (build_signature_pointer_or_reference_type): Set context
319 to global_namespace.
320 (build_signature_table_constructor): Expect OVERLOAD nodes.
321 * spew.c (yylex): Save old setting of looking_for_typename.
322 * tree.c (decl_list_length): Remove.
323 (binding_init): New function.
324 (count_functions): Rewrite.
325 (is_overloaded_fn): Expect OVERLOAD nodes.
326 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
327 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
328 ovl_member): New functions.
329 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
330 (type_unknown_p): Likewise.
331 (require_instantiated_type): Likewise.
332 (build_component_ref): Declare code dead.
333 (build_x_function_call): Create and expect OVERLOAD nodes.
334 (build_function_call_real): Check for ::main only.
335 (build_unary_op): Likewise. Expect OVERLOAD nodes.
336 (convert_for_assignment): Check for TREE_LIST before accessing
337 TREE_VALUE.
338 * decl.c (duplicate_decls): Check for namespace bindings instead
339 of global bindings.
340 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
341 lookup_name_current_level, start_decl, xref_tag,
342 finish_enum): Likewise.
343 * init.c (build_offset_ref): Likewise.
344 * search.c (lookup_field): Likewise.
345 (lookup_fnfields): Likewise.
346 (dfs_debug_mark): Likewise.
347 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
348 (poplevel_class, pop_from_top_level): Likewise.
349 * decl2.c (finish_method): Likewise.
350 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
351 * decl.c (record_builtin_type): Likewise.
352 (init_decl_processing, grokfndecl): Likewise.
353 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
354 (make_lang_type): Likewise.
355 * parse.y (make_thunk): Likewise.
356 * pt.c (tsubst): Likewise.
357 * tree.c (debug_binfo): Likewise.
358 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
359 tinfo2.cc, inc/new.h: Add std qualifications.
360 * inc/new: Wrap with namespace std if __HONOR_STD.
361 * inc/typeinfo: Likewise.
362
749adefd
JM
363Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
364
365 * call.c (build_user_type_conversion_1): Handle second_conv
366 properly for templates.
367
3474f462
AM
368Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
369
370 * method.c (build_decl_overload_real): Set TREE_USED flag to
371 zero for build_type_variants nodes as well.
372
98134cad
JM
373Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
374
375 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
376
dc9c80a2
JW
377Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
378
379 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
380 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
381 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
382 xref.o): Add toplev.h dependencies.
383
2c261fc0
JL
384Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
385
386 * errfn.c (cp_error, cp_warning): Remove declarations for
387 error and warning respectively.
388
faa25e97
KG
389Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
390
391 * error.c: Convert to using ctype macros defined in system.h.
392 * method.c: Likewise.
393 * xref.c: Likewise.
394 * lex.c: Likewise. Also remove redundant system header stuff.
395
06b88790
RL
396Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
397
178e196e
RL
398 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
399 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
400 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
401 xref.c: Add include of toplev.h.
06b88790 402
73c9f270
JM
403Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
404
405 * tree.c (perm_manip): Also regenerate the RTL of an extern.
406 (copy_to_permanent): Use end_temporary_allocation.
407
0fac6b0b
JM
408Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
409
410 * init.c (expand_vec_init): The initialization of each array
411 element is a full-expression.
412
664f169d
AM
413Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
414
3474f462
AM
415 * method.c (build_mangled_name): Add a call to build_type_variant
416 to get the right type.
664f169d 417
2addbe1d
JM
418Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
419
420 * Makefile.in: Add .SUFFIXES.
421
422 * cp-tree.def: Remove NAMESPACE_DECL.
423
959d8796
JM
424Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
425
426 * call.c (build_over_call): Do evaluate arg even if it has empty
427 class type.
428 * decl.c (start_function): Don't push a member function.
429
c1879238
JW
430Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
431
432 * Makefile.in (g++FAQ.info): Put -o option before input file.
433
61fbdb55
AM
434Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
435
436 * gxxint.texi: Add info for squangling codes K and B.
437
b69b1501
MM
438Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
439
440 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
441 the expression in templates.
442 (finish_stmt_expr): Likewise.
443
9ac1d79d
BK
4441998-04-28 Brendan Kehoe <brendan@cygnus.com>
445
446 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
447
eae97bd9
MM
448Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
449
450 * decl.c (maybe_push_to_top_level): Always clear
451 current_template_parms and processing_template_decl.
452 (pushtag): Remove check of current_class_type and some comments,
453 since maybe_push_to_top_level no longer creates confusion.
454
42da2fd8
MM
455Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
456
6757edfe
MM
457 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
458 (DECL_CLASS_TEMPLATE_P): Likewise.
459 (DECL_PRIMARY_TEMPLATE): Likewise.
460 (PRIMARY_TEMPLATE_P): Use it.
461 (push_template_decl_real): New function.
462 (redeclare_class_template): Take new template parameters as
463 input.
464 (is_specialization_of): New function.
465 (comp_template_args): Declare.
466 * decl.c (pushtag): Handle friend template classes.
467 (xref_tag): Likewise. Use new calling convention for
468 redeclare_class_template.
469 * decl2.c (grok_x_components): Handle friend templates.
470 * friend.c (is_friend): Use is_specialization_of where
471 appropriate. Deal with friend class templates.
472 (make_friend_class): Let a class template be friends with itself.
473 * pt.c (comp_template_args): Remove declaration.
474 (tsubst_friend_class): New function.
475 (push_template_decl_real): New function.
476 (push_template_decl): Use it.
477 (redeclare_class_template): Adjust for new calling convention.
478 (comp_template_args): Give it external linkage.
479 (instantiate_class_type): Use tsubst_friend_class to deal
480 with friend templates.
481 * typeck.c (comptypes): Use comp_template_args, rather than
482 expanding it inline.
483 * parse.y (component_decl): Handle a nested template type
484 like other component type declarations.
485
42da2fd8
MM
486 * pt.c (check_explicit_specialization): Handle overloaded
487 constructors correctly.
488
a2b60a0e
MM
489 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
490 (lookup_template_class): Use it.
491
5ffe581d
JM
492Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
493
494 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
495 * cp-tree.h: Add WRAPPER support.
496 * call.c (add_candidate): Split out from add_*_candidate fns.
497 (build_over_call): Take the candidate instead of function and args.
498 Enforce access control here. Emit overload warnings here.
499 (add_warning): New fn.
500 (joust): Add WARN parm. If not set, call add_warning instead of
501 printing a warning. Reenable some warnings.
502 (tourney): Pass it.
503 (convert_like): Adjust.
504 (build_new_op): Adjust.
505 (build_new_function_call): Adjust.
506 (build_user_type_conversion_1): Adjust.
507 (USER_CONV_FN): Adjust.
508 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
509 build_int_wrapper): New fns.
510
2e925bfc
MM
511Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
512
513 * pt.c (unify): Fix typo in previous change.
514
bec17cf3
JM
515Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
516
6df38d6d
JM
517 * error.c (dump_type_real): Declare canonical_name.
518
bec17cf3
JM
519 * typeck.c (comp_target_types): Fix PMFs.
520
43ee49e8
MM
521Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
522
523 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
524 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
525 TEMPLATE_DECL.
526
db2767b6
MM
527 * pt.c (tsubst): Decrease the template-level of
528 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
529 TEMPLATE_PARM_INDEX.
530 (template_decl_level): New function.
531 (unify): Make sure to record unifications for template
532 parameters, even when the parameters exactly match the arguments.
533 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
534 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
535 aren't from the level we're currently working on.
536
fb1653e1
MM
537Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
538
539 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
540
1701f21e
MM
541 * decl2.c (check_member_template): Set DECL_IGNORED for member
542 class templates, too.
543
61cd1234
MM
544 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
545
2c587395
BK
546Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
547
548 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
549
f7554e8c
JL
550Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
551
552 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
553 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
554 (init_decl_processing): Handle TI types.
555 * typeck.c (unsigned_type, signed_type): Handle TI types.
556
84914634
JW
557Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
558
559 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
560 New local added_libraries. Increment count when add library to
561 arglist.
562
294471c3
MM
563Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
564
565 * cp-tree.h (type_as_string_real): New function.
566 * pt.c (mangle_class_name_for_template): Use it.
567 * error.c (dump_aggr_type): Change prototype.
568 (dump_type_prefix): Likewise.
569 (dump_type_suffix): Likewise.
570 (dump_type_real): Convert from dump_type. If desired, the
571 "canonica" name of a typedef, i.e., the name of the underlying
572 type, can be printed.
573 (dump_type): Call dump_type_real.
574
9577319f
JM
575Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
576
577 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
578
579 * typeck.c (comp_target_types): Tweak pedantic case.
580 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
581 Return -1 or 1 instead of 1 or 2.
582 (compparms): Remove STRICT handling.
dbf51904 583 (convert_for_assignment): Fix handling of pmfs.
9577319f
JM
584
585Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
586
587 * typeck.c (comp_target_types): Handle references like pointers.
588 (comp_target_parms): Note that return code from comp_target_types
589 can be negative to indicate failure.
590
da372c07
AS
591Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
592
593 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
594 which requires a working target compiler to build.
595
69ac77ce
JL
596Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
597
598 * tree.c (avoid_overlap): Add prototype.
599
600 * spew.c (num_tokens): Add prototype.
601 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
602
603 * search.c (dfs_check_overlap): Add prototype.
604 (dfs_no_overlap_yet): Likewise.
605
606 * pt.c (original_template): Add prototype.
607 (inline_needs_template_parms): Likewise.
608 (push_inline_template_parms_recursive): Likewise.
609 (retrieve_specialization, register_specialization): Likewise.
610 (print_candidates, reduce_template_parm_level): Likewise.
611 (build_template_decl, mark_template_parm): Likewise.
612 (tsubst_friend_function, get_bindings_real): Likewise.
613
614 * method.c (start_squangling): Add prototype.
615 (end_squangling, check_ktype, issue_ktype): Likewise.
616 (build_overloaded_scope_ref, check_btype): Likewise.
617 (build_mangled_template_parm_index): Likewise.
618
619 * lex.c (init_cpp_parse): Add prototype.
620 (handle_cp_pragma, handle_sysv_pragma): Likewise.
621 (reduce_cmp, token_cmp): Likewise.
622
623 * except.c (call_eh_info): Add prototype.
624 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
625 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
626
627 * decl2.c (is_namespace_ancestor): Add prototype.
628 (namespace_ancestor, add_using_namespace): Likewise.
629 (ambiguous_decl): Likewise.
630
631 * decl.c (indent): Add prototype.
632
633 * call.c (add_template_candidate_real): Add prototype.
634
2fcdec57
JM
635Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
636
637 * decl2.c (build_expr_from_tree): Just return a PMF.
638
2b6815ea
MM
639Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
640
641 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
642 when doing initializations.
643
9577319f
JM
644 * pt.c (unify): Use comptypes to compare type args.
645
3a56f0ab
JM
646Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
647
648 * decl.c (duplicate_decls): Fix check for when it's safe to free
649 the new decl.
650
651 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
652 to type_as_string.
3a56f0ab 653
472295b8
JL
654Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
655
3bea7da8
JL
656 * pt.c (build_template_parm_index): Add prototype.
657
472295b8
JL
658 * search.c (my_tree_cons): Don't clear words outside the
659 newly allocated node.
660
a755ad1c
DB
661Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
662
663 * lex.c (init_parse): Now returns char* containing the filename.
664
9932d281
JC
665Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
666 Jeff Law <law@cygnus.com>
667
668 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
669 than a pointer.
670
f5963e61
JL
671Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
672
673 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
674
d74ce43a
BK
675Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
676
677 * decl.c (duplicate_decls): Don't warn for redundant decls if
678 friend: let add_friend take care of it.
679
dc26f471
JM
680Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
681
682 * sig.c (build_signature_pointer_constructor): Don't set
683 TREE_HAS_CONSTRUCTOR for a signature pointer.
684 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
685 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
686 here, too.
687 * typeck.c (build_unary_op): Only allow taking the address of a
688 real constructor.
689 * typeck2.c (digest_init): Simplify.
690 (store_init_value): Don't pedwarn about using { } for pmfs.
691
fcad5cf5
BK
692Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
693
694 * cp-tree.h (start_decl): Update prototype.
695 * decl.c (start_decl): Like the C version, new parameters
696 for the attributes. Call cplus_decl_attributes here,
697 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
698 (grokdeclarator): Pass NULL for new start_decl arguments.
699 * pt.c (tsubst_expr): Likewise.
700 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
701 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
702 * lex.c (build_lang_decl): Add lang_name_java.
703 * class.c (push_lang_context): Add lang_name_java.
704 * method.c (build_mangled_name): Check for is_java_type.
705
706Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
707
708 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
709 * call.c (build_scoped_method_call): Check for TREE_CODE for
710 VOID_TYPE instead of type == void_type_node.
711 (build_method_call): Ditto.
712 * decl.c (lookup_name_real): Ditto.
713 (grokdeclarator): Ditto.
714 (start_decl): Ditto.
715 (grokparms): Ditto.
716 (start_function): Ditto.
717 (finish_function): Ditto.
718 (start_method): Ditto.
719
2b2a3531
DB
720Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
721
722 * lex.c (finput): New variable.
723 (init_cpp_parse): Renamed from init_parse.
724 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
725 (finish_parse): New function.
726 * cp-tree.h (init_lex, init_parse): Remove declarations.
727
a59ca936
JM
728Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
729
730 * call.c (build_call): Still evaluate the actual argument.
731 * class.c (is_empty_class): Update for -fnew-abi.
732
733 * decl2.c: -fnew-abi implies -fsquangle.
734
735 * method.c (do_build_assign_ref): Don't do anything to copy
736 an empty class.
737 (do_build_copy_constructor): Likewise.
738 * call.c (build_over_call): Likewise.
739
80cd3eca
JM
740Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
741
742 * tree.c (avoid_overlap): Return a value.
743
e06e4d45
JL
744Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
745
746 * method.c (check_btype): Add missing argument to xrealloc.
747 (check_ktype): Likewise.
748
9a71c18b
JM
749Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
750
732dcb6f
JM
751 Implement empty base optimization.
752 * class.c (finish_struct_1): Add vbase fields earlier. Set
753 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
754 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
755 (types_overlap_p): New fn.
756 * tree.c (avoid_overlap): New fn.
757 (build_base_fields): Use it to avoid overlapping empty bases.
758 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
759
b3e401c2
JM
760 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
761
9a71c18b
JM
762 Re-implement allocation of base class subobjects.
763 * tree.c (unshare_base_binfos): New fn.
764 (layout_basetypes): Use it. Now handles offsets of both virtual and
765 non-virtual bases, after layout_type.
766 (layout_vbasetypes): Remove.
767 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
768 (build_vbase_pointer_fields): Split out from old layout_basetypes.
769 * class.c (finish_base_struct): Lose offset handling code.
770 Move nonvdtor warning here. Don't mess with t_binfo anymore.
771 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
772 * cp-tree.h: Adjust.
773
0b41abe6
JM
774Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
775
776 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
777 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
778 * class.c (duplicate_tag_error): Likewise.
779 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
780 * tree.c (layout_vbasetypes): Update from layout_record, remove
781 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
782 (layout_basetypes): Likewise.
783
e7a587ef
JL
784Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
785
786 * class.c, Make sure system.h is included just after config.h.
787 Delete lingering stdio and errno references too.
9a71c18b 788 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
e7a587ef 789
570221c2
JM
790Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
791
792 * friend.c (is_friend): Fix access control for local classes.
793
794 * class.c (is_empty_class): New fn.
795 * call.c (build_call): Don't pass empty class objects to a function.
796
59581da6
MM
797Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
798
799 * call.c (build_over_call): Do name resolution for default
800 arguments of function templates in the scope of the templates.
801
8d052bc7
JL
802Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
803
804 * call.c: Include system.h. Remove includes, declarations and
805 defines provided by system.h.
806 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
807 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
808 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
809 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
810 * typeck2.c, xref.c: Likewise.
811 * Makefile.in: Dependencies updated as appropriate.
812 * Make-lang.in: Likewise.
813
7cd55873
MM
814Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
815
816 * pt.c (fn_type_unification): Allow incomplete unification without
817 an immediate error message.
818
7bae46f4
JM
819Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
820
f94ae2f5
JM
821 * tree.c (member_p): New fn.
822 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
823 initializing class members.
824
825 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
826 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
827
7bae46f4
JM
828 * call.c (build_method_call): Handle non-scoped destructors, too.
829 * pt.c (tsubst_copy): Likewise.
830
831 * pt.c (print_template_context): Split out...
832 (push_tinst_level): ...from here.
833
834 * friend.c (is_friend): Don't pass a type to decl_function_context.
835
836 * typeck.c (convert_for_initialization): Always hand off
837 conversions to class type.
838
d50c6443
JM
839Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
840
841 * friend.c (is_friend): Local classes have the same access as the
842 enclosing function.
843
430bb96b
JL
844Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
845
77f484de
JL
846 * typeck.c (expand_target_expr): Delete dead function.
847
769467b9
JL
848 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
849
850 * repo.c (save_string): Delete dead function.
851
214922f8
JL
852 * method.c (thunk_printable_name): Delete dead function.
853
6d83a977
JL
854 * lex.c (yynextch): Delete dead function.
855
994ac65b
JL
856 * expr.c (tree_extract_aggr_init): #if 0 out.
857
942632ac
JL
858 * except.c (do_unwind): Delete dead function.
859 (easy_expand_asm): Likewise.
860
228fab4a
JL
861 * cvt.c (build_conversion_type_1): Delete dead function.
862
00c493f2
JL
863 * cp-tree.h (push_expression_obstack): Declare.
864
3a87a9f5
JL
865 * call.c (source_type): #if 0 out.
866
430bb96b
JL
867 * class.c (alter_access): Remove unused label. Add braces
868 around empty else clause.
869
870 * lex.c (yyprint): Fix argument to printf.
871
b4c4a9ec
MM
872Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
873
874 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
875
876 * pt.c (instantiate_class_template): Make sure template
877 arguments are permanent.
878 * init.c (resolve_offset_ref): Don't go looking around in
879 template types.
880
881 * semantics.c: Add routines to handle expressions, and some
882 declaration processing.
883 * parse.y: Use them.
884 (current_class_depth): Move declaration to cp-tree.h.
885 * parse.c: Regenerated.
886 * cp-tree.h: Use them.
887 (current_class_depth): Declare.
888 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
889
a9936d39
MM
890Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
891
892 * error.c (dump_decl): Be a bit more explicit with template
893 type arguments, when verbose.
894
fae4153b
JM
895Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
896
897 * inc/exception: Reorder closing braces.
898
7fe6899f
MM
899Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
900
901 * pt.c (redeclare_class_template): New function.
902 * cp_tree.h (redeclare_class_template): Declare it.
903 * decl.c (xref_tag): Use it.
904
18922a6b
JM
905Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
906
b3e4ff59
JM
907 * call.c (build_over_call): Check IS_AGGR_TYPE, not
908 TYPE_LANG_SPECIFIC.
909 * typeck.c (convert_arguments): Likewise.
910
18922a6b
JM
911 * decl.c (grokdeclarator): Remove const and volatile from type after
912 setting constp and volatilep.
913
914 * class.c (finish_struct_1): Don't warn about bool bitfield larger
915 than one bit.
916
49bf0d6f
MM
917Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
918
919 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
920
734e8cc5
MM
921Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
922
923 * call.c (build_object_call): Complain about ambiguous operator(),
924 rather that crashing.
925 (build_new_op): Likewise.
926 (build_op_delete_call): Likewise.
927
17b75c91
MM
928Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
929
930 * cvt.c (perform_qualification_conversions): Use comp_target_types
931 instead of comp_ptr_ttypes.
932
38afd588
MM
933Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
934
935 * cp-tree.h (enforce_access): Declare.
936 * call.c (enforce_access): Make it extern, not static.
937 * class.c (alter_access): Use enforce_access; modify code for ISO
938 compliance, rather than ARM rules.
939
e4959d7c
KL
940Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
941
942 * cp-tree.h: Fix typo.
943
97e7cbe4
JM
944Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
945
6b4e8391
JM
946 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
947 if (aggregate_value_p (type)).
948
97e7cbe4
JM
949 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
950
d2298965
MM
951Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
952
953 * tree.c (mapcar): When dealing with a DECL, use it's constant
954 value, if any.
955 * pt.c (lookup_template_class): Don't mangle the names of template
956 classes whose arguments are unknown.
957
958 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
959
bc6ecde7
BK
960Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
961
962 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
963
964Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
965
966 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
967 boolean_type_node to 1.
968
050367a3
MM
969Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
970
971 * error.c (dump_expr): Remove unused variable `l'.
972
973 * pt.c (for_each_template_parm): New function, created by
974 converting uses_template_parms.
975 (tree_fn_t): New typedef.
976 (uses_template_parms): Use it.
977 (mark_template_parm): New function.
978 (push_template_decl): Check that the argument list of a partial
979 specialization uses all the template parameters.
980
981 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
982 with it; we might want it for debugging.
983 * cp-tree.h (type_unification): Change interface.
984 * class.c (finish_struct_1): Skip nested template types, just like
985 ordinary nested types.
986 (instantiate_type): Use new interface to type_unification.
987 * lex.c (init_lex): Add __sz as opname for sizeof.
988 * method.c (build_overload_scope_ref): New function.
989 (build_overload_int): Handle complex expressions. Set
990 numeric_output_need_bar if necessary.
991 (build_overload_value): Handle non-PARM_DECL nodes; this
992 routine is now used by build_overload_int. Remove some
993 assignments to numeric_output_need_bar. Use
994 build_overload_scope_ref.
995 (build_qualified_name): Note that some template mangled names end
996 with digits, and set numeric_output_need_bar appropriately. Use
997 build_underscore_int.
998 * pt.c (unify): Change interface.
999 (type_unification_real): Likewise.
1000 (determine_specialization): Use new interfaces.
1001 (tsubst): Deal gracefully with situations in which the argument
1002 vector is not fully filled.
1003 (fn_type_unification): Use new interfaces.
1004 (type_unification): Likewise. Remove NOP_EXPR hack.
1005 (type_unification_real): Likewise.
1006 (unify): Likewise. Deal with unification of complex expresions.
1007
b3709d9b
JM
1008Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
1009
9c65eeca
JM
1010 * pt.c (complete_template_args): Initialize skip properly.
1011
b3709d9b
JM
1012 * decl.c (make_typename_type): Revert.
1013 (make_implicit_typename): Remove.
1014 (lookup_name_real): Don't call it. Call lookup_field if we see a
1015 TYPE_DECL from a template base.
1016 * search.c (lookup_field): Do implicit typename stuff.
1017
a73cab0f
NC
1018Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
1019 Geoff Noer <noer@cygnus.com>
1020
1021 * Makefile.in: Various fixes for building cygwin32 native toolchains.
1022 * Make-lang.in: Likewise.
1023
362badb0
KL
1024Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1025
1026 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
1027
e6f1275f
JM
1028Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
1029
1107c4b3
JM
1030 * decl.c (make_implicit_typename): Rewrite removed code.
1031 (make_typename_type): Call it if the type we look up comes from
1032 a base that uses template parms.
1033
e6f1275f
JM
1034 * pt.c (complete_template_args): Rewrite.
1035 (tsubst, FUNCTION_DECL): Use it.
1036
1037Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
1038
1039 * semantics.c (finish_asm_stmt): Fix combine strings. Call
1040 c_expand_asm_operands () if output_operands, input_operands or
1041 clobbers is not NULL_TREE.
1042
1043Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1044
1045 * pt.c (complete_template_args): New function.
1046 (get_bindings): Deal with specializations of function templates
1047 with return type containing parameters from outer class
1048 templates.
1049 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
1050 substitute arguments and compose a new type.
1051
ff369548
MM
1052Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
1053
1054 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
1055 FUNCTION_DECLs.
1056
76b9a14d
JM
1057Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
1058
9d703598
JM
1059 * decl.c (make_implicit_typename): Lose useless code.
1060
4d50dd69
JM
1061 * call.c (standard_conversion): Handle A* -> const A* properly.
1062
76b9a14d
JM
1063 * pt.c (get_bindings_real): Rename from get_bindings. Add
1064 check_rettype parm.
1065 (get_bindings): Pass 1.
1066 (get_bindings_overload): Pass 0.
1067
366c0f1e
MM
1068Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
1069
1070 * pt.c (check_explicit_specialization): When reverting a static
1071 member function, also remove the `this' parameter from
1072 last_function_parms.
1073
78957a2a
JM
1074Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
1075
0978790f
JM
1076 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
1077 a function context.
1078
78957a2a
JM
1079 * decl.c (store_bindings): Use free_binding_vecs.
1080 (pop_from_top_level): Likewise.
1081
74ef3b26
JM
1082Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
1083
1084 * decl.c (make_implicit_typename): Only change the type of a
1085 TYPENAME_TYPE.
1086
ad321293
MM
1087Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
1088
1089 * semantics.c: New file, containing routines to perform the
1090 semantic phase of parsing.
1091 * parse.y: Use it.
1092 * pt.c (tsubst_expr): Likewise.
1093 * cp-tree.h: Declare the various functions in semantics.c.
1094 Provide macros to access _STMT tree nodes.
1095 * cp-tree.def: Add ASM_STMT tree node.
1096 * Makefile.in, Make-lang.in: Add dependencies on and for
1097 semantics.c.
1098
ef76081a
JM
1099Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
1100
83566abf
JM
1101 * pt.c (push_template_decl): Only check primary templates.
1102
670960ac
JM
1103 * pt.c (check_explicit_specialization): Complain about default args
1104 in explicit specialization.
1105
ef76081a
JM
1106 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
1107 constructor_declarator.
1108
297dcfb3
MM
1109Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
1110
1111 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
1112 has no overloaded operator ->.
1113
1114 * call.c (build_field_call): Don't crash when presented with a
1115 field that is actually a nested type.
1116
1117 * decl.c (pushtag): Deal with friend class injection in local
1118 classes.
1119
1120 * call.c (build_object_call): Don't crash if OBJ is a
1121 pointer-to-member-function.
1122
c7dfe584
JM
1123Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
1124
1125 * pt.c (push_template_decl): Complain about template with C linkage,
1126 anonymous template class.
1127
22531e51
JM
1128Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
1129
1130 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
1131 * search.c: Likewise.
1132
1133 * lex.c (do_pending_defargs): Only call
1134 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
1135
1136 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
1137
8b1616ad
MM
1138Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
1139
1140 * parse.y: Deal with CONSTRUCTORS in new_initializers.
1141
544c188d
MM
1142Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
1143
1144 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
1145 closely mimics the behavior in parse.y.
1146 (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
1147 into a compound statement.
1148
cae40af6
JM
1149Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
1150
1151 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
1152 * pt.c (inline_needs_template_parms): New fn.
1153 (original_template): New fn.
1154 (push_inline_template_parms_recursive): New fn.
1155 (maybe_begin_member_template_processing): Use them.
1156 (maybe_end_member_template_processing): Likewise.
1157 (is_member_or_friend_template): Rename to is_member_template.
1158 Member functions of local classes are never member templates.
1159
1160Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1161
1162 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
1163 added in the class scope to catch redefinition error.
1164
1165 * pt.c (reduce_template_parm_level): Also copy
1166 the DECL_TEMPLATE_PARMS field.
1167
debf0b88
MM
1168Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
1169
1170 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
1171 reduced-level template type parameter.
1172
4099c493
MH
1173Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
1174
1175 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
1176 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
1177 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
1178 * decl.c (duplicate_decls): Propagate it.
1179 * typeck2.c (abstract_virtuals_error): Use two loops to emit
1180 abstract virtual functions and virtual functions which need a
1181 final overrider separately.
1182
9c318306
MH
1183Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
1184
cae40af6
JM
1185 * lang-specs.h: Properly put brackets around array elements in
1186 initializer.
9c318306
MH
1187
1188 * typeck.c (build_binary_op_nodefault): Correctly place parens around
1189 && and || in expression.
1190
56c5d8bf
MH
1191Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
1192
1193 * call.c (default_parm_conversions): Remove prototype definition.
1194 (build_method_call): Remove unused variable result.
1195
1196 * cvt.c (ocp_convert): Remove unused variable conversion.
1197
1198 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
1199
1200 * except.c (do_unwind): #if 0 definition of unused variables fcall
1201 and next_pc.
1202
cae40af6
JM
1203 * expr.c (extract_scalar_init): #if 0 prototype and function
1204 definition.
56c5d8bf
MH
1205
1206 * init.c (expand_aggr_init_1): Remove unused variable init_type.
1207 (build_new_1): Remove unused variable t.
1208
1209 * pt.c (instantiate_class_template): Remove unused variable newtag;
1210 cast called function return value to void.
1211 (do_decl_instantiation): Remove unused variables name and fn.
1212
1213 * tree.c (get_type_decl): Add default return to shut up compiler from
1214 complaining control reaches end of non-void function.
1215
1216 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
1217
93a46d8d
MH
1218Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
1219
1220 * call.c (default_parm_conversions): Remove prototype definition.
1221 (build_method_call): Remove unused variable result.
1222 (build_over_call): Add default case in enumeration switch.
1223
85066503
MH
1224Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
1225
1226 * decl2.c (lang_decode_option): Change j's type to size_t.
1227
1228 * tree.c (layout_vbasetypes): record_align and desired_align are of
1229 type unsigned int; const_size and nonvirtual_const_size likewise.
1230
070d3be3
MM
1231Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
1232
1233 * parse.y (new_initializer): Make sure all initializers are
1234 lists.
1235
af9c2d8a
MM
1236Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
1237
1238 * decl2.c (import_export_decl): Mark tinfo functions for
1239 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
1240
e817b5e3
JL
1241Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
1242
1243 * method.c: Fix typo.
1244
3e81fe04
KG
1245Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1246
1247 * method.c: Include "system.h" to get stdlib.h, stdio.h,
1248 ctype.h, string.h, etc.
1249 (issue_nrepeats): Add default case in enumeration switch.
1250 (check_btype): Likewise.
1251 (process_overload_item): Likewise.
1252
1253 * Makefile.in (method.o): Depend on system.h.
1254
d574824c
AS
1255Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1256
1257 * lex.c (do_scoped_id): Fix parenthesizing.
1258
5427d758
MT
1259Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
1260
1261 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
1262 FLAG_RTTI is unset, initialize type info machinery and continue
1263 with FLAG_RTTI enabled.
1264 (get_typeid): Ditto.
1265
8f279ed7
JM
1266Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
1267
1268 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
1269 from B.
1270
a1da6cba
MM
1271Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
1272
1273 * pt.c (finish_member_template_decl): Deal more gracefully with
1274 invalid declarations.
1275
3b3ba9f0
JM
1276Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
1277
8f279ed7
JM
1278 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
1279 cp-tree.h: Clean up more old overloading code, old RTTI code, and
1280 some formatting quirks.
1281
277294d7
JM
1282 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
1283 method.c, pt.c, ptree.c, typeck.c: Remove support for
1284 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
1285 * class.h: Remove.
1286 * Makefile.in: Adjust.
1287
49432171
JM
1288 * pt.c (unify): Don't allow reduced cv-quals when strict.
1289
3b3ba9f0
JM
1290 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
1291 *type_unification* and unify.
1292
2604412d
JM
1293Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
1294
1295 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
1296 (nested_name_specifier): And add it before this use.
1297 (typename_sub0): And this use. Also add use without the keyword.
1298 (typename_sub1): Likewise.
1299 * pt.c (instantiate_class_template): Don't actually instantiate
1300 anything if our type uses template parms.
1301
948edfa7
JW
1302Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
1303
1304 * decl.c (start_function): Don't call temporary_allocation for a
1305 nested function.
1306
574817a2
JM
1307Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
1308
1309 * pt.c (instantiate_class_template): Don't mess with friends if
1310 our type uses template parms.
1311
b2b7d40a
JM
1312Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
1313
11686454
JM
1314 * parse.y (nested_name_specifier): Use explicit_template_type.
1315 (typename_sub): Allow a template_type, an explicit_template_type,
1316 or an implicit template type at the end.
1317 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
1318 * decl.c (make_typename_type): Handle template-id where the name
1319 is a TEMPLATE_DECL.
1320 * call.c (build_scoped_method_call): Handle member template
1321 destructor call.
1322 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
1323 destructor is represented by the type.
1324
b2b7d40a
JM
1325 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
1326 * parse.y (nested_name_specifier): Add 'template' case.
1327 (explicit_template_type): New rule.
1328 (typename_sub): Use it.
1329 * decl.c (make_typename_type): Handle getting a template-id for NAME.
1330 * pt.c (tsubst): Likewise.
1331
8d019cef
JM
1332Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
1333
db897306
JM
1334 * pt.c (add_to_template_args): Fix thinko.
1335 (instantiate_class_template): Call it later.
1336
8d019cef
JM
1337 * pt.c (get_class_bindings): Add outer_args parm.
1338 (most_specialized_class): Likewise.
1339 (instantiate_class_template): Pass it.
1340 (more_specialized_class): Likewise.
1341 (lookup_template_class): Get context from template if none
1342 was specified.
1343 (finish_member_template_decl): Don't do anything with a
1344 partial specialization.
1345 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
1346 AGGREGATE_TYPE_P.
1347 * class.c (finish_struct): Member class templates have already been
1348 checked for name clashes.
1349 * decl.c (pushdecl_with_scope): Handle pushing at class level.
1350
93cdc044
JM
1351Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
1352
1353 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
1354 (tsubst, *_PARM): Support multiple levels of template classes.
1355 (instantiate_class_template): Look up the pattern from the
1356 original template.
1357 (lookup_template_class): Handle getting a template for d1.
1358 (push_template_decl): Correct setting of 'primary'.
1359 (reduce_template_parm_level): Add 'levels' parm.
1360 (finish_member_template_decl): Support member class templates.
1361 (template_class_depth): Handle multiple levels.
1362 * parse.y (component_decl_1, fn.def2): Remove member template case.
1363 (component_decl): Add member template cases.
1364 * decl2.c (check_member_template): We now handle member template
1365 classes.
1366 * decl.c (pushtag): Handle member templates.
1367 * method.c (do_inline_function_hair): Don't touch
1368 IDENTIFIER_GLOBAL_VALUE.
1369 * init.c (build_offset_ref): If name isn't an identifier, just
1370 return it.
1371 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
1372
1373 * typeck.c (get_delta_difference): Do adjust for conversions to
1374 and from virtual base.
1375
32e02ee0
JM
1376Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
1377
1378 * typeck.c (get_delta_difference): Give hard error for conversion
1379 from virtual base.
1380
1381 * cp-tree.h: Tweak formatting.
1382
30394414
JM
1383Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
1384
1385 * decl.c (push_namespace): Handle redeclaration error.
1386
1387 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
1388 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
1389 (NAMESPACE_BINDING): New macro.
1390 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
1391 * *.c: Use them.
1392
1393 * pt.c (push_template_decl): Use innermost_args.
1394
1395 * decl.c (get_unique_name): Tweak from earlier in the name.
1396
1397Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
1398
1399 * cp-tree.def: Add CPLUS_BINDING node.
1400 * cp-tree.h (tree_binding): new struct
1401 (BINDING_SCOPE, BINDING_VALUE): new macros
1402 (current_namespace, global_namespace): declare extern
1403 (struct lang_decl_flags): new field in_namespace
1404 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
1405 (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
1406 (TREE_INDIRECT_USING): new macro
1407 * decl2.c (current_namespace, global_namespace): Declare. The
1408 value is a NAMESPACE_DECL now, not a TREE_LIST.
1409 (is_namespace_ancestor, namespace_ancestor):new static functions.
1410 (add_using_namespace, ambiguous_decl): likewise.
1411 (lookup_using_namespace): new support function for lookup_name.
1412 (qualified_lookup_using_namespace): new support function for
1413 do_scoped_id and lookup_namespace_name
1414 (get_namespace_id): mark as obsolete.
1415 (current_namespace_id): Likewise.
1416 (do_namespace_alias): Implement.
1417 (do_using_directive): Implement as call to add_using_namespace.
1418 * decl.c (binding_for_name): new function.
1419 (push_namespace, pop_namespace): implement.
1420 (push_decl): don't install a FUNCTION_DECL in the global branch.
1421 (lookup_namespace_name): implement using qualified lookup.
1422 (lookup_name_real): For global scoping, lookup in
1423 global_namespace. For namespace scoping, lookup in given
1424 namespace. For unscoped lookup, iterate over namespace,
1425 considering using directives.
1426 (init_decl_processing): initialize global_namespace.
1427 (grokvardecl): Build assembler name as static name for globals.
1428 (grokdeclarator): Remove old namespace mangling.
1429 (xref_tag): When installing a global binding for the
1430 tag, make sure we have an identifier.
1431 * method.c (build_overload_nested_name): mangle namespaces.
1432 (build_qualified_name): Likewise.
1433 (build_decl_overload_real): Likewise.
1434 * lex.c (build_lang_decl): set namespace for new declaration to
1435 current_namespace.
1436 (do_scoped_id): find global names in global or current
1437 namespace, or using qualified namespace lookup, depending on
1438 context.
1439 * init.c (build_member_call): When scope is namespace, use
1440 build_x_function_call instead.
1441 (build_offset_ref): When scope is namespace, collapse processing
1442 to lookup_namespace_name instead.
1443 * error.c (dump_decl): Support NAMESPACE_DECL.
1444 * decl.c (pushdecl): Bind globals to current namespace.
1445 (push_overloaded_decl): Likewise.
1446 (lookup_tag): Likewise.
1447 (lookup_name_current_level): Likewise.
1448 (xref_tag): Likewise.
1449 (start_function): Likewise.
1450 * lex.c (do_identifier): Likewise.
1451 (identifier_typedecl_value): Likewise.
1452 (real_yylex): Likewise.
1453 * method.c (do_inline_function_hair): Likewise.
1454 * parse.y (unscoped): Likewise.
1455 * pt.c (check_explicit_specialization): Likewise.
1456 (lookup_template_class): Likewise.
1457 * rtti.c (call_void_fn): Likewise.
1458 * sig.c (build_sigtable): Likewise.
1459 * ptree.c (lang_print_xnode): New function.
1460
8adf5b5e
JM
1461Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
1462
1463 * pt.c (instantiate_class_template): Don't instantiate if pedantic
1464 and the args use template parms.
1465
1466 * pt.c (push_tinst_level): If the instantiaton uses template parms,
1467 fail silently.
1468 * decl.c (xref_basetypes): Do call complete_type for basetypes
1469 that involve template parameters.
1470
6c3e25eb
JM
1471Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
1472
1473 * typeck2.c (process_init_constructor): Fix labeled init check.
1474
f7d98d58
JM
1475Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
1476
1477 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
1478 argument to tsubst and friends.
f84b4be9 1479
a221d52f
JM
1480 * pt.c (tsubst, FUNCTION_DECL): Tidy.
1481
f84b4be9
JM
1482 * typeck.c (build_x_function_call): Handle static member function
1483 templates like non-templates. Handle friend templates like normal
1484 function templates.
1485 * pt.c (tsubst, *_PARM): Don't use orig_level.
1486 (get_bindings): Don't call add_to_template_args.
1487 (instantiate_template): Likewise.
1488 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
1489 * ptree.c (print_lang_type): Print index/level for template parms.
1490
1491Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
1492
1493 * Make-lang.in (cc1plus): Note that cc1plus depends on
1494 cp/cp-tree.h and cp/cp-tree.def.
1495
1496 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
1497 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
1498 position in a template parameter list.
1499 * cp-tree.h (template_parm_index): New structure, used as the tree
1500 structure for a TEMPLATE_PARM_INDEX.
1501 (TEMPLATE_PARM_IDX): New macro.
1502 (TEMPLATE_PARM_LEVEL): Likewise.
1503 (TEMPLATE_PARM_DESCENDANTS): Likewise.
1504 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
1505 (TEMPLATE_PARM_DECL): Likewise.
1506 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1507 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
1508 (TEMPLATE_TYPE_DECL): Likewise.
1509 (TEMPLATE_CONST_IDX): Remove.
1510 (TEMPLATE_CONST_LEVEL): Likewise.
1511 (TEMPLATE_CONST_SET_INFO): Likewise.
1512 (TEMPLATE_TYPE_SET_INFO): Likewise.
1513 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
1514 node.
1515 (TEMPLATE_TYPE_LEVEL): Likewise.
1516 * decl.c (decls_match): Call comp_template_parms, rather than
1517 expanding it inline.
1518 (duplicate_decls): If two template declarations are being merged,
1519 then their TEMPLATE_INFOs should be merged as well.
1520 (grokfndecl): Save template-id information when declaring a friend
1521 with explicit template arguments. Pass arguments to
1522 check_explicit_specialization via correct convention; at some
1523 point check_explicit_specialization changed, but these call-sites
1524 did not.
1525 (grokdeclarator): Tidy up slightly.
1526 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
1527 two template functions with the same DECL_ASSEMBLER_NAME the same,
1528 since the names are not yet mangled.
1529 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
1530 TEMPLATE_CONST_PARM.
1531 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
1532 decl for a non-type parameter, rather than printing `<tparm ...>'.
1533 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
1534 (do_friend): Deal with template friends.
1535 * lex.c (do_pending_inlines): Call
1536 maybe_begin_member_template_processing, rather than
1537 conditionally calling begin_member_template_processing.
1538 (process_next_inline): Likewise. Call
1539 maybe_end_member_template_processing, rather than
1540 conditionally calling end_member_template_processing.
1541 (do_pending_defargs): Likewise.
1542 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
1543 TEMPLATE_CONST_PARM.
1544 * method.c (build_mangled_template_parm_index): New function.
1545 (build_overload_value): Use it.
1546 (build_overload_name): Likewise.
1547 * pt.c (finish_member_template_decl): Allow friend declarations.
1548 (template_class_depth): New function.
1549 (is_member_template): Rename, and modify, to become...
1550 (is_member_or_friend_template): New function.
1551 (end_member_template_processing): Rename, and modify, to become...
1552 (maybe_end_member_template_processing).
1553 (build_template_parm_index): New function.
1554 (reduce_template_parm_level): New function.
1555 (process_template_parm): Modify to use build_template_parm_index.
f84b4be9
JM
1556 (push_template_decl): Deal with friend templates.
1557 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
1558 TEMPLATE_CONST_PARM.
1559 (tsubst_friend_function): New function.
1560 (instantiate_class_template): Generate the DECL_FRIENDLIST
1561 for a new instantiation by using tsubst_friend_function rather
1562 than just tsubst.
1563 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
1564 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
1565 appropriate new macros. Use reduce_template_parm_level to
1566 generate lower-level template parameters. Handle tsubst'ing into
1567 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
1568 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
1569 templates. Similarly for the template parameters for a new
1570 template.
1571 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
1572 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
1573 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
1574 (get_bindings): Call add_to_template_args if necessary.
1575 (instantiate_decl): Handle instantiations of friend templates.
1576 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
1577 TEMPLATE_TYPE_PARM as a list of fields; it's not!
1578 * spew.c (yylex): Do a little manual constant propogation to
1579 clarify the code.
1580
e30416cf
JL
1581Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
1582
1583 * error.c: Include sys/types.h.
1584
2fc11007
JL
1585Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
1586
1587 * method.c (build_mangled_name): Start CPP directives in column zero.
1588
c8fcb331
JM
1589Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
1590
1591 * typeck2.c (process_init_constructor): Sorry about non-trivial
1592 labeled initializers.
1593 * parse.y (initlist): Reenable labeled initializers.
1594
de575009
KL
1595Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1596
1597 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
1598 all callers changed. Rely on the new parameter instead of arg
1599 being a TREE_LIST when determine whether we are working inside
1600 template template parameter. Clean up is_type test.
1601
31bcaa20
JM
1602Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
1603
1604 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
1605 * typeck2.c (initializer_constant_valid_p): Allow conversions
1606 between pointers and refrerences.
1607
e62d5b58
BK
16081998-02-19 Brendan Kehoe <brendan@cygnus.com>
1609
1610 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
1611 if pedantic || warn_pointer_arith.
1612
027905b4
KL
1613Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1614
1615 * pt.c (unify): Handle TEMPLATE_DECL.
1616
3dc888ad
BK
16171998-02-18 Brendan Kehoe <brendan@cygnus.com>
1618
1619 * cp-tree.h (strip_attrs): Remove decl.
1620
d9525bec
BK
16211998-02-18 Doug Evans <devans@cygnus.com>
1622
1623 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
1624 Update olddecl's attributes too.
1625 (strip_attrs): Remove function.
1626 * typeck.c (common_type): Call merge_machine_type_attributes.
1627
153305b0
MM
1628Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
1629
1630 * parse.y (initdcl0_innards): New grammar symbol.
1631 (nomods_initdecls, nomods_initdcl0): Change type from itype to
1632 none, since the resulting value is never used.
1633 (parse_decl): New function.
1634 (datadef): Remove redundant actions.
1635 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
1636 * parse.c: Regenerated.
1637
beb31faa
JM
1638Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
1639
1640 * parse.y (simple_stmt): Use getdecls() to check for decl.
1641
5b477224
MH
1642Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
1643
1644 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
1645 macros.
1646 (c++.install-common): Install c++filt properly as native or as cross
1647 variant.
1648 (c++.uninstall): Add c++filt.
1649
798eed5e 1650Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6bc7be5f 1651
798eed5e 1652 * call.c (standard_conversion): Fix multi-level ptr conversions.
6bc7be5f 1653
80170791
MS
1654Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
1655
1656 * init.c (build_new): Propagate error_mark_node up.
1657
440a6c2a
JM
1658Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
1659
1660 * parse.y (simple_stmt): If the condition isn't a declaration,
1661 start the controlled block after the test.
1662
387c47a3
AS
1663Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1664
1665 * call.c (build_over_call): Convert builtin abs, labs and fabs to
1666 tree-codes.
1667 * decl.c (init_decl_processing): Reenable abs, labs and fabs as
1668 builtins.
1669
2dbfb418
JM
1670Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
1671
1672 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
1673
d8b55a76
JM
1674Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
1675
1676 * cp-tree.h: Add access_protected_virtual_node.
1677 * class.c (init_class_processing): Initialize it.
1678 * decl.c (xref_basetypes): Use it.
1679 * parse.y (base_class_access_list): Likewise.
1680
1681 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
1682 (c++.install-common): Install c++filt.
1683
ea957dd5
BK
1684Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1685
1686 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
1687
153305b0
MM
1688Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
1689
1690 * call.c (reference_binding): Use comptypes when comparing
1691 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
1692
06ab59df
MM
1693Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
1694
1695 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
1696 (really_overloaded_fn): Move check here from is_overloaded_fn.
1697 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
1698
153305b0
MM
1699Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
1700
1701 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
1702 conversions.
1703
3ac3d9ea
MM
1704Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
1705
1706 * cp-tree.h (push_template_decl): Return the decl passed in, or an
1707 equivalent duplicate.
1708 * decl.c (pushtag): Use the return value from push_template_decl.
1709 (duplicate_decls): When duplicating a template declaration, merge
1710 the DECL_TEMPLATE_RESULTs as well.
1711 (make_implicit_typename): Don't try to dive into typename types to
1712 find a context for making a new implicit typename.
1713 (start_decl): Use the return value from push_template_decl.
1714 (grokdeclarator): Complain about declarations list `const operator
1715 int'. Since we don't correctly handle in-class initializations of
1716 non-static data members, complain about this (now illegal)
1717 practice. Issue an error for initializations of non-const statics
1718 since that is illegal as well, and since we don't handle that case
1719 correctly either.
1720 (start_function): Use the return value from push_template_decl.
1721 (start_method): Likewise.
1722 * decl2.c (grokfield): Likewise. Since the change to
1723 grokdeclarator ensures that all initialized fields are in fact
1724 static, remove a redundant test for TREE_PUBLIC.
1725 * parse.y (initlist): Disable labeled initializers since they do
1726 not work as per the documentation, and since they do not use the
1727 same syntax as the C front end.
1728 * pt.c (push_template_decl): Return the decl passed in, or an
1729 equivalent duplicate.
1730 (lookup_template_class): When searching in a nested context,
1731 use the right arguments.
1732 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
1733 * typeck.c (build_component_ref): Assign the correct type to the
1734 result of build_vfn_ref.
1735
c29c4e23 1736Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
c6f2ed0d 1737
c29c4e23
JM
1738 * pt.c (convert_nontype_argument): Fix typo.
1739 (check_explicit_specialization): Allow old-style specialization
c6f2ed0d
JM
1740 of class template members.
1741
71cc65bd
JM
1742Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
1743 Manfred Hollstein <manfred@s-direktnet.de>
1744
1745 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
1746 when deciding to override DECL_ASSEMBLER_NAME.
1747
727e39c7
AM
1748Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
1749
1750 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
727e39c7 1751 * cp-tree.h (flag_do_squangling): Add declaration.
727e39c7 1752 * lang-options.h: Add -fsquangle and -fno-squangle.
727e39c7
AM
1753 * method.c: Add macros and static variables for squangling.
1754 (build_overload_name): Rename to build_mangled_name, add logic for B
71cc65bd
JM
1755 compression, and split into process_modifiers and
1756 process_overload_item.
727e39c7
AM
1757 (process_modifiers): New function, to handle constant, reference,
1758 and pointer types.
1759 (process_overload_item): New function, handles issue of type codes.
1760 (build_overload_name): New function, start squangling and call
1761 build_mangled_name.
1762 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
1763 (start_squangling): New function to initialize squangling structs.
1764 (end_squangling): New function to destroy squangling structs.
1765 (nrepeats): Rename variable to Nrepeats.
1766 (issue_nrepeats): New function for issuing 'n' type repeats.
1767 (check_ktype): New function to check for type K name compression.
1768 (build_overload_nested_name): Add a check for K name compression.
1769 (build_qualified_name): Add a check for K name compression and don't
1770 use DECL_ASSEMBLER_NAME when squangling is on.
1771 (check_btype): New function, checks for B type compression.
1772 (build_static_name, build_decl_overload_real): Initiate squangling.
1773 (build_typename_overload, build_overload_with_type): Initiate
1774 squangling
1775
aea955a2
SS
1776Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
1777
1778 * method.c (make_thunk): Avoid name buffer overflow.
1779
bd0f14dc
JM
1780Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
1781
1782 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
1783 don't define them yet.
ced68160
JM
1784
1785 * parse.y (nomods_initdcl0): Add constructor_declarator case.
1786
e5e809f4
JL
1787Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1788
1789 * config-lang.in (diff_excludes): Use basename only.
1790
d60846c7
JM
1791Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
1792
1793 * tinfo2.cc: Add tinfo for signed char.
1794
eabb2eba
MS
1795Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
1796
1797 * search.c (compute_access): Handle protected constructors in derived
1798 classes as accessible.
1799
2a66ec2b
JM
1800Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
1801
1802 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
1803 Call convert_from_reference sooner.
1804
9c0d0367
MM
1805Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
1806
1807 * cvt.c (ocp_convert): Obtain the constant values from constant
1808 decls even if the destination type is the same as the type of the
1809 decl.
1810
1811 * decl2.c (finish_file): Make sure that static inlines with
1812 definitions are not marked DECL_EXTERNAL before returning.
1813
cf776105
JM
1814Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
1815
1816 * decl.c: Lose arg_looking_for_template.
1817 (lookup_name_real): Likewise.
1818 * parse.y: Lose processing_template_arg, template_arg1
1819 (primary): Likewise.
1820 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
1821
e7e66632
KL
1822Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1823
1824 * error.c (dump_decl): Fix type of default arguments for template
1825 template parameters and nontype template parameters.
1826 * parse.y (template_parm): Handle invalid default template
1827 template arguments here.
1828
1829 * parse.y (template_parm): Use template_arg instead of PTYPENAME
1830 for default template template argument.
1831 * pt.c (coerce_template_parms): Merge default template argument
1832 codes. Can treat RECORD_TYPE as template name if it is implicitly
1833 created. Fix argument index in error message.
1834 * typeck.c (comptypes): Merge template argument comparison codes in
1835 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
1836
e95d117b
MK
1837Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
1838
1839 * lex.c (file_name_nondirectory): Also check for '/'.
1840
8857f91e
MM
1841Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
1842
67da3287
MM
1843 * parse.y (primary): Deal with statement-expressions in
1844 templates.
1845 * pt.c (tsubst_copy): Handle BIND_EXPR.
1846 * tree.c (mapcar): Likewise.
1847
d7684f2d
MM
1848 * call.c (add_template_candidate_real): Pass extra parameter to
1849 fn_type_unification.
1850 * cp-tree.h (fn_type_unification): Add parameter.
1851 * pt.c (fn_type_unification): Add additional parameter to deal with
1852 static member functions.
1853 (get_bindings): Deal with static member functions.
1854
8857f91e
MM
1855 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
1856 (revert_static_member_fn): Declare.
1857 * decl.c (revert_static_member_fn): Remove declaration. Change
1858 linkage from internal to external.
1859 (cp_finish_decl): Deal with virtual functions in classes local to
1860 template functions.
1861 * decl2.c (finish_file): Don't forget to emit increment/decrement
1862 expressions in initializers for file-scope variables.
1863 * parse.y (typename_sub2): If the typename doesn't names a
1864 template, rather than a type, issue an error message.
1865 * pt.c (check_explicit_specialization): Handle specializations of
1866 static member functions.
1867 (coerce_template_parms): Handle offset references to lists of
1868 member functions.
1869 * search.c (note_debug_info_needed): Don't crash when handed a
1870 type which is being defined.
1871 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
1872 that can happen with some illegal code.
1873
a703fb38
KG
1874Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1875
1876 * call.c (user_harshness): Initialize `code' to 0.
1877 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
1878 (null_ptr_cst_p): Add parentheses around && within ||.
1879 (standard_conversion): Likewise.
1880 (z_candidate): Likewise.
1881 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
1882 (build_object_call): Likewise for `mem_args'.
1883 (build_new_op): Likewise for `mem_arglist'. Add `return' from
1884 default case in enumeration switch.
1885
1886 * class.c (build_vtable_entry): Add explicit braces to avoid
1887 ambiguous `else'.
1888 (build_class_init_list): Likewise.
1889 (finish_struct_1): Initialize `width' to 0.
1890 (instantiate_type): Initialize `name' to NULL_TREE. Add
1891 explicit braces to avoid ambiguous `else'.
1892
1893 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
1894 `else'.
1895
1896 * decl.c (grok_reference_init): Eliminate unused parameter, all
1897 callers changed.
1898 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
1899 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
1900 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
1901 (grokdeclarator): Add parentheses around && within ||. Add
1902 explicit braces to avoid ambiguous `else'.
1903 (grokparms): Initialize `type' to NULL_TREE.
1904 (xref_tag): Remove unused label `just_return'.
1905 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
1906 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
1907 (hack_incomplete_structures): Add parentheses around assignment
1908 used as truth value.
1909
1910 * decl2.c (coerce_delete_type): Hide definition of `e3'.
1911
1912 * error.c: Include <stdlib.h>.
1913 (dump_expr): Change the type of `i' to size_t. Remove unused
1914 label `error'.
1915
1916 * except.c (init_exception_processing): Remove unused variable `d'.
1917 (expand_throw): Likewise for `label'.
1918
1919 * friend.c (add_friends): Add explicit braces to avoid ambiguous
1920 `else'.
1921
1922 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
1923 (sort_base_init): Likewise for `binfo'.
1924 (expand_member_init): Likewise for `rval'.
1925 (build_member_call): Add parentheses around assignment used as
1926 truth value.
1927 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
1928 (build_new): Initialize `nelts' to NULL_TREE. Initialize
1929 `old_immediate_size_expand' to 0.
1930 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
1931 (build_vec_delete_1): Remove unused variable `block'.
1932 (expand_vec_init): Initialize `itype' to NULL_TREE.
1933
1934 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
1935 declaration of `index' and `rindex' with autoconf macros.
1936 (reinit_parse_for_expr): Remove unused variables
1937 `look_for_semicolon' and `look_for_lbrac'.
1938 (cons_up_default_function): Initialize `args' to NULL_TREE.
1939 (readescape): Initialize `firstdig' to 0.
1940 (real_yylex): Add parentheses around assignment used as truth value.
1941
1942 * method.c: Include <strings.h> if we don't have <string.h>.
1943 Protect declaration of `index' with autoconf macro.
1944
1945 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
1946 Initialize `type' to NULL_TREE.
1947 (structsp): Remove unused variable `id'.
1948
1949 * pt.c (coerce_template_parms): Add explicit braces to avoid
1950 ambiguous `else'.
1951 (lookup_template_class): Initialize `template' to NULL_TREE.
1952 (instantiate_class_template): Remove unused variable `name' and `e'.
1953 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
1954 (do_poplevel): Initialize `saved_warn_unused' to 0.
1955 (type_unification): Remove unused varable `parm'.
1956 (unify): Likewise for `j'.
1957
1958 * repo.c (init_repo): Add parentheses around assignment used as
1959 truth value.
1960 (finish_repo): Remove unused varable `p'.
1961
1962 * search.c (get_binfo): Initiize `type' to NULL_TREE.
1963 (get_base_distance): Likewise.
1964 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
1965 and `new_v' to NULL_TREE.
1966 (lookup_fnfields): Likewise for `rval_binfo_h'.
1967 (breadth_first_search): Add parentheses around assignment used as
1968 truth value.
1969 (get_template_base): Initialize `type' to NULL_TREE.
1970
1971 * sig.c (append_signature_fields): Initialize `last_mfptr' to
1972 NULL_TREE.
1973 (build_signature_table_constructor): Likewise for
1974 `last_rhs_field', `pfn' and `vt_off'.
1975 (build_sigtable): Likewise for `init'.
1976
1977 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
1978 (propagate_binfo_offsets): Likewise for `delta'.
1979 (hash_tree_cons): Initialize hashcode to 0.
1980 (can_free): Likewise for `size'.
1981 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
1982
1983 * typeck.c (convert_sequence): Hide prototype.
1984 (common_type): Add explicit braces to avoid ambiguous `else'.
1985 (comp_target_types): Likewise.
1986 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
1987 (build_function_call_real): Add explicit braces to avoid ambiguous
1988 `else'.
1989 (convert_arguments): Initialize `called_thing' to 0.
1990 (convert_for_initialization): Initialize `savew' and `savee' to 0.
1991
1992 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
1993 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
1994 (build_x_arrow): Likewise for `last_rval'.
1995
1996 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
1997
f5426d1e
R
1998Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
1999
2000 * decl.c (init_decl_processing): Use set_sizetype.
2001 * decl2.c (sizetype): Don't declare.
2002 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
2003 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
2004 (build_component_addr, unary_complex_lvalue): Likewise.
2005 * rtti.c (expand_class_desc): Likewise.
2006 * class.c (get_vfield_offset): Likewise.
2007
7bf2682f
MM
2008Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
2009
2010 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
2011 early to avoid bogus error. Handle overloaded function
2012 names provided as template arguments correctly.
2013 (coerce_template_parms): Don't mishandle overloaded functions when
2014 dealing with template template parameters.
2015 (lookup_template_class): Issue an error message, rather than
2016 crashing, when the TYPE_DECL provided is not a template type.
2017
abff8e06
JM
2018Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
2019
2020 * class.c (instantiate_type): Don't just return a known type if
2021 it's wrong.
2022
86052cc3
JM
2023Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
2024
abff8e06
JM
2025 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
2026 since that code could never be reached.
2027
2028 * error.c (dump_decl): Avoid aborting in the midst of printing an
2029 error message about an illegal template declaration.
2030
2031 * parse.y (structsp): Print an error message, rather than crashing,
2032 when a class-head does not name a class.
2033
2034 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
2035 template arguments as a g++ extension.
2036
2037 * cp-tree.def (ALIGNOF_EXPR): New tree code.
2038 * decl2.c (grok_alignof): If processing_template_decl, just store
2039 the expression.
2040 * typeck.c (c_alignof): Likewise.
2041 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
2042 * error.c (dump_expr): Likewise.
2043 * pt.c (tsubst_copy): Likewise.
2044 * tree.c (cp_tree_equal): Likewise.
2045 * pt.c (uses_template_parms): Correctly determine whether or not a
2046 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
2047 folding can be done.
2048
86052cc3
JM
2049 * cp-tree.h (grok_enum_decls): Remove type parameter.
2050 * decl.c (grok_enum_decls): Likewise.
2051 * decl2.c (grok_x_components): Call grok_enum_decls
2052 unconditionally, since it will do nothing if there is no
2053 current_local_enum. Use the new calling sequence.
2054 * pt.c (tsubst_enum): Use the new calling sequence for
2055 grok_enum_decls.
2056
2057 * decl.c (start_function): Make member functions of local classes
2058 in extern inline functions have comdat linkage here...
2059 (grokdeclarator): Rather than here.
2060
2061Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
2062
2063 * pt.c (convert_nontype_argument): Use decl_constant_value.
2064
e1467ff2
MM
2065Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
2066
2067 * call.c (add_template_candidate_real): New function.
2068 (add_template_candidate): Use it.
2069 (add_template_conv_candidate): Likewise.
2070 (joust): Pass extra argument to more_specialized.
2071 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
2072 (is_local_class): Remove.
2073 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
2074 * cp-tree.h (is_local_class): Remove.
2075 (perform_array_to_pointer_conversion): Likewise.
2076 (finish_member_template_decl): Add.
2077 (check_explicit_specialization): Return a tree, not an int.
2078 (more_specialized): Take additional argument.
2079 (get_bindings): Likewise.
86052cc3 2080 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
e1467ff2
MM
2081 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2082 (perform_array_to_pointer_conversion): Remove.
2083 * decl.c (saved_scope): Add processing_specialization,
2084 processing_explicit_instantiation fields.
2085 (maybe_push_to_top_level): Save them.
2086 (pop_from_top_level): Restore them.
2087 (grokfndecl): Use new return value from
2088 check_explicit_specialization.
2089 (start_decl): Don't check flag_guiding_decls before pushing
2090 decls.
2091 (cp_finish_decl): Remove previous (bogus) change.
2092 (grok_declarator): Use decl_function_context rather than
2093 is_local_class.
2094 * decl2.c (finish_file): Pass extra argument to get_bindings.
2095 (build_expr_from_tree): Let build_x_component_ref check
2096 validity of arguments rather than doing it here.
2097 * lex.c (cons_up_default_function): Remove code fooling with
2098 processing_specialization, processing_explicit_instantiation
2099 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
2100 * method.c (build_overload_identifier): Mangle local classes in
2101 template functions correctly.
2102 * parse.y (finish_member_template_decl): Move to pt.c.
2103 * pt.c (finish_member_template_decl): Moved here from parse.y.
2104 (print_candidates): New function.
2105 (determine_specialization): Change interface. Properly look for
2106 most specialized versions of template candidates.
2107 (check_explicit_specialization): Fully process explicit
2108 instantiations.
2109 (push_template_decl): Avoid looking at CLASSTYPE fields in
2110 FUNCTION_DECLS.
2111 (determine_overloaded_function): Remove.
2112 (convert_nontype_argument): Change name from
2113 convert_nontype_parameter. Use determine_overloaded_function
2114 instead of instantiate_type.
2115 (mangle_class_name_for_template): Handle type contexts as well as
2116 function contexts.
2117 (classtype_mangled_name): Likewise.
2118 (lookup_template_class): Likewise.
2119 (tsubst): Likewise.
2120 (more_specialized): Take explict template arguments as a
2121 parameter.
2122 (most_specialized): Likewise.
2123 (get_bindings): Likewise. Check that return types match before
2124 proclaiming a function a match.
2125 (do_decl_instantiation): Remove code searching for function to
2126 instantiate; that is now done in check_explicit_specialization.
2127 (add_maybe_template): Pass extra argument to get_bindings.
2128 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
2129 implementation.
2130 * typeck.c (build_component_ref): Check for invalid arguments.
2131
343c89cd
JM
2132Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
2133
56841f01
JM
2134 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
2135 return_target and call_target are equivalent.
2136
343c89cd 2137 * pt.c (type_unification_real): Just accept function parms that
56841f01 2138 don't use any template parms.
343c89cd 2139
d3959d60
JM
2140Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
2141
be343556
JM
2142 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
2143 unset DECL_NOT_REALLY_EXTERN.
2144
d3959d60
JM
2145 * parse.y (typename_sub*): Fix std::.
2146
67c2a928
JM
2147Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
2148
2149 * error.c (dump_decl): Fix type default template args.
2150 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
2151
ab535dac
MK
2152Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
2153
2154 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
2155 (file_name_nondirectory): Use.
2156
73b0fce8
KL
2157Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2158
2159 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
d1fefbce 2160 that are not really present. Substitute default arguments in
73b0fce8
KL
2161 template template arguments. Correctly convert TEMPLATE_DECL to
2162 TEMPLATE_TEMPLATE_PARM.
2163 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
2164 are no longer treated specially here.
2165 * parse.y (template_template_parm): Fix copy error.
2166 * decl.c (grokdeclarator): Warn about missing `typename' for nested
2167 type created from template template parameters.
2168 * parse.y (bad_parm): Likewise
2169
2170 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
2171 (push_nested_class): Likewise.
2172 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
2173 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
2174 (copy_template_template_parm): Declare.
2175 * decl.c (arg_looking_for_template): New variable.
2176 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
2177 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
2178 node if arg_looking_for_template is nonzero.
2179 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
2180 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
2181 (grokdeclarator): Handle TEMPLATE_DECL.
2182 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
2183 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
2184 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
2185 (dump_decl): Handle unnamed template type parameters.
2186 Handle template template parameters.
2187 (dump_function_name): Handle template template parameters.
2188 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
2189 Handle TEMPLATE_TEMPLATE_PARM.
2190 * method.c (build_template_template_parm_names): New function.
2191 (build_template_parm_names): Handle TEMPLATE_DECL.
2192 (build_overload_nested_name, build_overload_name):
2193 Handle TEMPLATE_TEMPLATE_PARM.
2194 * parse.y (maybe_identifier): New nonterminal.
2195 (template_type_parm): Use it.
2196 (template_template_parm, template_arg1): New nonterminal.
2197 (template_parm): Add template_template_parm rules.
2198 (template_arg): Set processing_template_arg.
2199 (template_arg1): Rules moved from template_arg.
2200 (primary, nonnested_type): Set arg_looking_for_template if we are
2201 processing template arguments.
2202 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
2203 (process_template_parm): Handle template template parameters.
2204 (coerce_template_parms, comp_template_args): Likewise.
2205 (mangle_class_name_for_template, lookup_template_class): Likewise.
2206 (uses_template_parms): Handle TEMPLATE_DECL and
2207 TEMPLATE_TEMPLATE_PARM.
2208 (current_template_args): Handle TEMPLATE_DECL.
2209 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
2210 * search.c (dfs_walk, dfs_record_inheritance):
2211 Handle TEMPLATE_TEMPLATE_PARM.
2212 * tree.c (copy_template_template_parm): New function.
2213 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
2214 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
2215
75650646
MM
2216Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
2217
2218 * decl.c (start_decl): Don't allow duplicate definitions of static
2219 data members.
2220
2221 * call.c (build_user_type_conversion_1): Handle user-defined
2222 template conversion operators correctly.
2223
2224 * decl2.c (build_expr_from_tree): Issue an error message if the
2225 object in a COMPONENT_REF is a TEMPLATE_DECL.
2226
2227 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
2228
2229 * class.c (is_local_class): New function.
2230 * cp-tree.h (is_local_class): Declare it.
2231 (last_tree): Likewise.
2232 (begin_tree): Likewise.
2233 (end_tree): Likewise.
2234 (lookup_template_class): Change prototype.
2235 * decl.c (cp_finish_decl): Check for NULL where necesary.
2236 Consider FUNCTION_DECLS to declare objects with top-level binding,
2237 when calling make_decl_rtl.
2238 (grokdeclarator): Give members of local classes internal linkage.
2239 (start_function): Remove declaration of last_tree.
2240 (finish_function): Set flag_keep_inline_functions around call to
2241 rest_of_compilation if we are processing a member function in a
2242 local class.
2243 (start_method): Call push_template_decl for member functions of
2244 local classes in template functions.
2245 * decl2.c (import_export_decl): Don't give external linkage to
2246 instantiations of templates with internal linkage.
2247 * parse.y (last_tree): Remove declaration.
2248 (template_type): Pass extra parameter to lookup_template_class.
2249 (self_template_type): Likewise.
2250 (structsp): Move call to reset_specialization into left_curly.
2251 (left_curly): Call reset_specialization, and begin_tree.
2252 * pt.c (saved_trees): New variable.
2253 (mangle_class_name_for_template): Change prototype. Use
2254 additional function context to name local classes in templates
2255 correctly.
2256 (classtype_mangled_name): Pass the context.
2257 (push_template_decl): Handle local classes and templates, and
2258 member functions for such classes.
2259 (convert_nontype_parameter): Fix handling of pointer-to-member
2260 constants.
2261 (lookup_template_class): Handle local classes in templates.
2262 (tsubst): Likewise. Don't assume that template instantiations
2263 have external linkage; pay attention to the template declaration.
2264 (mark_decl_instantiated): Likewise.
2265 (begin_tree): New function.
2266 (end_tree): Likewise.
2267
2268 * decl.c (xref_basetypes): Don't call complete_type for basetypes
2269 that involve template parameters; that can lead to infinite
2270 recursion unnecessarily.
2271
2272 * pt.c (register_specialization): Do not register specializations
2273 that aren't ready to be registered yet.
2274 (check_explicit_specialization): Handle explicit specialization of
2275 constructors and destructors.
2276 (build_template_decl): New function.
2277 (push_template_delc): Handle out-of-class specializations of
2278 member templates.
2279
2280 * pt.c (check_explicit_specialization): Set up the template
2281 information before registering the specialization.
2282 (coerce_template_parms): Fix thinko.
2283 (tsubst): Handle specializations of member templates correctly.
2284
2285 * class.c (finish_struct_methods): Remove calls to
2286 check_explicit_specialization from here.
2287 (finish_struct): And insert them here.
2288 * cp-tree.h (perform_qualification_conversions): New function.
2289 (perform_array_to_pointer_conversion): Likewise.
2290 (begin_explicit_instantiation): Likewise.
2291 (end_explicit_instantiation): Likewise.
2292 (determine_specialization): Renamed from
2293 determine_explicit_specialization.
2294 (comp_template_parms): New function.
2295 (processing_explicit_instantiation): New variable.
2296 * cvt.c (perform_qualification_conversions): New function.
2297 (perform_array_to_pointer_conversion): Likewise.
2298 * decl.c (duplicate_decls): Don't consider template functions
2299 alike unless they have the same parameters. Refine handling of
2300 instantiation/specialization mismatches.
2301 (start_decl): Don't call pushdecl for template specializations,
2302 since they don't affect overloading.
2303 (start_function): Likewise
2304 (grokfndecl): Call check_explicit_specialization a little later.
2305 Don't call duplicate_decls for memberm template specializations.
2306 (grokdeclarator): Don't update template_count for classes that are
2307 themselves specializations. Remove use of `2' as parameter to
2308 grokfndecl since that value isn't used.
2309 * lex.c (cons_up_default_function): Save and restore
2310 processing_explicit_instantiation around calls to grokfield.
2311 * parse.y (finish_member_template_decl): New function.
2312 (component_decl_1): Use it.
2313 (fn.def2): Likewise.
2314 (template_arg_list_opt): New nonterminal.
2315 (template_type): Use it.
2316 (self_template_type): Likewise.
2317 (template_id): Likewise.
2318 (object_template_id): Likewise.
2319 (notype_template_declarator): Likwise.
2320 (begin_explicit_instantiation): Likewise.
2321 (end_explicit_instantiation): Likewise.
2322 (explicit_instantiation): Use them.
2323 * pt.c (coerce_template_parms): Add parameters.
2324 (processing_explicit_instantiation): New variable.
2325 (convert_nontype_parameter): New function.
2326 (determine_overloaded_function): Likewise.
2327 (begin_explicit_instantiation): Likewise.
2328 (end_explicit_instantiation): Likewise.
2329 (retrieve_specialization): Likewise.
2330 (register_specialization): Likewise.
2331 (processing_explicit_specialization): Removed.
2332 (determine_specialization): Handle specializations of member
2333 functions of template class instantiations.
2334 (check_explicit_specialization): Refine to conform to standard.
2335 (comp_template_parms): New function.
2336 (coerce_template_parms): Call convert_nontype_parameter.
2337 (tsubst): Refine handling of member templates. Use
2338 register_specialization.
2339 (instantiate_template): Use retrieve_specialization.
2340 (do_decl_instantiation): Likewise.
2341 (instantiate_decl): Likewise.
2342 (type_unification): Improve handling of explict template
2343 arguments.
2344 * tree.c (mapcar): Return error_mark_node, rather than aborting,
2345 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
2346 * typeck.c (build_unary_op): Call determine_specialization, rather
2347 than determine_explicit_specialization.
2348
f62aa8f3
JM
2349Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
2350
2351 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
2352
224c649b
BH
2353Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2354
2355 * error.c (dump_decl): For enum tags, output the tag, not its value.
2356
1737fe20
BK
23571998-01-13 Brendan Kehoe <brendan@cygnus.com>
2358
2359 * decl.c (init_decl_processing): Only call init_rtti_processing
2360 FLAG_RTTI is set.
2361
a0d5fba7
JM
2362Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
2363
2364 * init.c (build_new_1): Split out from build_new.
2365 (build_new): Just return a NEW_EXPR.
2366 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
2367
2368 * decl2.c (get_temp_regvar): Tweak.
2369
2370 * cp-tree.h (TREE_CALLS_NEW): Comment out.
2371 * class.c (resolves_to_fixed_type_p): Remove use.
2372 * method.c (build_opfncall): Likewise.
2373 * call.c (build_new_op): Likewise.
2374
f4a23343
JM
2375Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
2376
2377 * exception.cc (__eh_alloc, __eh_free): New fns.
2378 (__cp_push_exception, __cp_pop_exception): Use them.
2379 (__uncatch_exception): Call terminate here if no exception.
2380 * except.c (build_terminate_handler): New fn.
2381 (expand_start_catch_block): Use it.
2382 (expand_exception_blocks): Likewise.
2383 (alloc_eh_object): New fn.
2384 (expand_throw): Use it. Protect exception init with terminate.
2385 * typeck.c (build_modify_expr): Remove code that ignores trivial
2386 methods.
2387
7f85441b
KG
2388Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2389
2390 * call.c (add_builtin_candidate): Add default case in enumeration
2391 switch.
2392 (build_new_op): Likewise.
2393 (convert_like): Likewise.
2394 * cvt.c (build_expr_type_conversion): Likewise.
2395 * tree.c (real_lvalue_p): Likewise.
2396 (lvalue_p): Likewise.
2397 (cp_tree_equal): Likewise.
2398 * typeck.c (comptypes): Likewise.
2399 (build_component_ref): Likewise.
2400 (build_function_call_real): Likewise.
2401 (build_binary_op_nodefault): Likewise.
2402 (build_unary_op): Likewise.
2403 (build_modify_expr): Likewise.
2404 * typeck2.c (initializer_constant_valid_p): Likewise.
2405
f9fc59e8
NC
2406Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
2407
2408 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
2409
864b83b9
MM
2410Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
2411
6ba4439c
MM
2412 * pt.c (coerce_template_parms): Make sure to digest_init if
2413 possible.
2414
864b83b9
MM
2415 * decl.c (duplicate_decls): Make the newdecl virtual if the
2416 olddecl was, just as is done with other attributes of olddecl.
2417
02531345
JM
2418Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
2419
4cac9464
JM
2420 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
2421 address of an OFFSET_REF.
2422
02531345
JM
2423 * cp-tree.def: Add AGGR_INIT_EXPR.
2424 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
2425 AGGR_INIT_EXPR where appropriate.
2426 * expr.c (cplus_expand_expr): Likewise. Simplify.
2427
2428 * decl2.c (finish_file): Remove call to register_exception_table.
2429
4f4da4e9
BK
2430Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2431
2432 * pt.c (instantiate_class_template): Don't do injection when
2433 processing_template_decl is true, as pollutes current_binding_level
2434 for base classes.
2435
840b09b4
PS
2436Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
2437
2438 * pt.c (maybe_fold_nontype_arg): Add prototype.
2439
6748b643
JM
2440Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2441
2442 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
2443 * error.c (dump_expr): Likewise.
2444
4bfc4dda
JM
2445Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
2446
2447 * typeck.c (build_function_call_real): Remove "inline called before
2448 definition" pedwarn.
2449
2450 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
2451
5c0ad672
JM
2452Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2453
2454 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
2455
2456 * pt.c (type_unification_real): Change __null to type void* with
2457 a warning.
2458
3042d5be
MM
2459Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
2460
2461 * call.c (implicit_conversion): Don't call
2462 build_user_type_conversion_1 with a NULL expr, since it will
2463 crash.
2464
2465 * pt.c (unify): Don't try to unify array bounds if either array is
2466 unbounded.
2467
9664b89e
JM
2468Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2469
2470 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
2471 Replace extern decls with casts.
2472
2473 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
2474 Update last_parm_cleanup_insn.
2475 (store_after_parms): Remove.
2476 * cp-tree.h: Adjust.
2477
ab23f787
JM
2478Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2479
2480 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
2481 (finish_file): Check DECL_COMDAT instead of weak|one_only.
2482 (import_export_vtable): Use make_decl_one_only instead of
2483 comdat_linkage for win32 tweak.
2484 (import_export_decl): Likewise.
2485 * pt.c (mark_decl_instantiated): Likewise.
2486
2487 * decl2.c (finish_file): Lose handling of templates in pending_statics.
2488
0776059e
JM
2489Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
2490
2491 * decl2.c (finish_file): Lose call to expand_builtin_throw.
2492 * except.c (expand_builtin_throw): Remove.
2493 * cp-tree.h: Remove ptr_ptr_type_node.
2494 * decl.c: Likewise.
2495
154bba13
TT
2496Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
2497
2498 * decl.c (ptr_ptr_type_node): Define.
2499 (init_decl_processing): Initialize it.
2500 * cp-tree.h: Declare it.
2501 * exception.cc (__cp_exception_info): Use __get_eh_info.
2502 (__cp_push_exception): Ditto.
2503 (__cp_pop_exception): Ditto.
2504
2505 From Scott Snyder <snyder@d0sgif.fnal.gov>:
2506 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
2507 saved_pc.
2508 (init_exception_processing): Removed saved_pc initialization.
2509
c4ae3f91
JM
2510Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
2511
2512 * pt.c (instantiate_decl): Defer all templates but inline functions.
2513
67437d5b
JM
2514Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
2515
eb291d05
JM
2516 * init.c (expand_vec_init): Don't fold a list of parameters.
2517
67437d5b
JM
2518 * decl.c (copy_args_p): Handle copy elision for types with virtual
2519 bases.
2520 * call.c (build_over_call): Likewise.
2521
4de02abd
MM
2522Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
2523
2524 * pt.c (lookup_template_function): Copy the template arguments,
2525 not just the list containing them, to the permanent obstack.
2526
0fb9f1c3
JM
2527Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
2528
2b8b44d8
JM
2529 * except.c (expand_start_catch_block): suspend_momentary for the
2530 terminate handler.
2531
0fb9f1c3
JM
2532 * error.c (dump_decl): Handle LOOKUP_EXPR.
2533
2534Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
2535
2536 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
2537 permanent obstack if we are processing a template decl.
2538 * typeck.c (build_static_cast): Likewise.
2539 (build_const_cast): Likewise.
2540 (build_reinterpret_cast): Likewise.
2541
2542 * pt.c (coerce_template_parms): Coerce some expressions, even
2543 when processing_template_decl.
2544
79a7c7fa
JM
2545Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2546
2547 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
2548 handling of pointer difference expressions.
2549
2550 * typeck.c (comp_target_types): Comparison of function/method types
2551 is independent of nptrs.
2552
2553Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
2554
2555 * pt.c (tsubst): Avoid creating pointer to reference and
2556 reference to reference types.
2557
46422d6c
JM
2558Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2559
2560 * parse.y (do_id): New nonterminal.
2561 (template_id): Use it.
2562
7211716d
JM
2563Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
2564
2565 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
2566 * spew.c (yylex): Don't do_identifier here.
2567 * decl2.c (build_expr_from_tree): Revert last change.
2568
2569 * decl2.c (build_expr_from_tree): Expand the name for a method call.
2570 * parse.y (object_template_id): Don't try to take the DECL_NAME.
2571
e701eb4d
JM
2572Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
2573
2face519
JM
2574 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
2575 alloc_expr.
2576 * call.c (build_op_delete_call): Adjust.
2577
e701eb4d
JM
2578 * except.c (expand_end_catch_block): Lose rethrow region.
2579 (expand_start_catch_block): Likewise.
2580 (expand_end_catch_block): Don't expand_leftover_cleanups.
2581
53d4d75f
BK
2582Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2583
2584 * pt.c (tsubst): Remove tree_cons call (places redundant info into
2585 DECL_TEMPLATE_INSTANTIATION).
2586
aa36c081
JM
2587Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
2588
2589 * tree.c (is_overloaded_fn): Handle getting a fn template.
2590 (really_overloaded_fn): Likewise.
2591 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
2592 * pt.c (check_explicit_specialization): Tweak.
2593 (determine_explicit_specialization): Tweak.
2594
2595 * tree.c, cp-tree.h (get_target_expr): New fn.
2596
956d6950
JL
2597Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
2598
2599 * pt.c (check_explicit_specialization): Fix misspelling in
2600 diagnostic: `preceeded'.
2601 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
2602 `conversiona'.
2603
aa36c081
JM
26041997-12-02 Mark Mitchell <mmitchell@usa.net>
2605
2606 * pt.c (determine_explicit_specialization): Avoid an internal
2607 error for bad specializations.
2608
2609 * method.c (build_overload_value): Handle SCOPE_REF.
2610
de35891e
JM
2611Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
2612
2613 * class.c (prepare_fresh_vtable): Enable even more complex MI
2614 vtable names.
2615
2616Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
2617
2618 * exception.cc (__check_eh_spec): Optimize a bit.
2619
2620 * exception.cc (__cp_pop_exception): Lose handler arg.
2621 * except.c (do_pop_exception): Likewise.
2622 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
2623 (expand_end_catch_block): Likewise.
2624
74cd8397
JM
2625Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2626
2627 * pt.c (check_explicit_specialization): Complain about using a
2628 template-id for a non-specialization.
2629
956d6950
JL
2630Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
2631
2632 * repo.c: Prototype rindex only if needed.
2633 * xref.c: Likewise.
2634
74cd8397
JM
2635Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2636
2637 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
2638
aa598818
JM
2639Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
2640
c2840dfb
JM
2641 * typeck.c (build_const_cast): Handle references here instead of
2642 handing off to convert_to_reference.
2643
fb98cff6
JM
2644 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
2645 TerminateFunctionCall.
2646 (init_exception_processing): Likewise. Terminate et al are now
2647 the fns, not ADDR_EXPRs.
2648 (various): Lose redundant assemble_external calls.
2649 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
2650
77be6f82
JM
2651 * cp-tree.h (struct lang_decl_flags): Add comdat.
2652 (DECL_COMDAT): New macro.
2653 * decl.c (duplicate_decls): Propagate it.
2654 (cp_finish_decl): Handle it.
2655 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
2656
aa598818
JM
2657 * class.c: Remove static pending_hard_virtuals.
2658 (add_virtual_function): Take pointers to pending_virtuals
2659 and pending_hard_virtuals.
2660 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
2661
e872bb7a
JM
2662Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
2663
eb773359
JM
2664 * decl2.c (import_export_vtable): If we support one_only but not
2665 weak symbols, mark instantiated template vtables one_only.
2666 (import_export_decl): Likewise for tinfo functions.
2667 (finish_vtable_vardecl): Also write out vtables from explicitly
2668 instantiated template classes.
2669 * pt.c (mark_class_instantiated): Revert last change.
2670
e872bb7a
JM
2671 * except.c (expand_throw): Call mark_used on the destructor.
2672
956d6950
JL
2673Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
2674
2675 * lex.c (lang_init): Enable flag_exceptions by default if no
2676 command line switch was specified.
2677
5ad5a526
MM
26781997-11-26 Mark Mitchell <mmitchell@usa.net>
2679
2680 * pt.c (unify): Handle `void' template parameters in
2681 specializations.
2682
92f5c135
JM
2683Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
2684
328d03d7
JM
2685 * rtti.c (build_dynamic_cast): Handle template case here.
2686 (build_dynamic_cast_1): Not here.
2687
19754d4c
JM
2688 * typeck2.c (digest_init): Make copies where appropriate.
2689
2690 * decl2.c (delete_sanity): resolve_offset_ref.
2691
e5e809f4
JL
2692 * except.c: Call terminate without caching so many bits.
2693
92f5c135
JM
2694 * except.c (expand_start_catch_block): Fix catching a reference
2695 to pointer.
2696
2697Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
2698
2699 * init.c (build_new): Copy size to the saveable obstack.
2700
2701 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
2702 TRY_CATCH_EXPR for now.
2703
20b90169
JM
2704Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
2705
9b493293
JM
2706 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
2707 has DECL_LANG_SPECIFIC.
2708
20b90169
JM
2709 * exception.cc (struct cp_eh_info): Add handlers field.
2710 (__cp_push_exception): Initialize it.
2711 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
2712 (__throw_bad_exception): Remove.
2713 * except.c (call_eh_info): Add handlers field.
2714 (get_eh_handlers): New fn.
2715 (push_eh_cleanup): Increment handlers.
2716
25d5eb3f
JM
2717Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
2718
6c20b7e9
JM
2719 * except.c (expand_start_eh_spec): Use the try/catch code.
2720 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
2721 doing everything inline.
2722 (init_exception_processing): throw_type_match now takes
2723 const void pointers.
2724 * exception.cc (__check_eh_spec): New fn.
2725 * inc/exception: Neither terminate nor unexpected return.
2726 * decl.c: Make const_ptr_type_node public.
2727 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
2728
25d5eb3f
JM
2729 * except.c (expand_start_catch_block): We only need the rethrow
2730 region for non-sjlj exceptions.
2731 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
2732
047f64a3
JM
2733Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
2734
ced78d8b
JM
2735 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
2736 (various.o): Likewise.
2737 * inc/new: Add placement deletes. Add throw specs for default new.
2738 * new.cc (set_new_handler): Move here from libgcc2.
2739 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
2740 (new): Move from libgcc2. Throw bad_alloc.
2741 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
2742 * decl.c (init_decl_processing): Update exception specs on new and
2743 delete.
2744
047f64a3
JM
2745 * method.c (build_decl_overload_real): Don't mess with global
2746 placement delete.
2747
2748 * init.c (build_new): Check for null throw spec, not nothrow_t.
2749
2750 * decl.c (duplicate_decls): Don't complain about different exceptions
2751 from an internal declaration.
2752
2753 * call.c (build_op_delete_call): Fix check for member fns again.
2754
2755 * decl2.c (import_export_decl): Interface hackery affects
2756 virtual synthesized methods.
2757
5951f637
JM
2758Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2759
f2d773a2
JM
2760 * decl.c (start_decl): Don't just complain about a mismatched
2761 scope, fix it.
2762
5951f637
JM
2763 * decl.c (make_implicit_typename): Handle case where t is not
2764 actually from context.
2765 * tree.c (get_type_decl): Lose identifier case.
2766 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
2767 * parse.y (nonnested_type): Just use lookup_name.
2768 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
2769
2770Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
2771
2772 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
2773 T was built in C language context (for example, by
2774 output_func_start_profiler).
2775
bd2a82a6
JM
2776Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
2777
2778 * decl.c (make_implicit_typename): New fn.
2779 (lookup_name_real): Use it. Use current_class_type as the context.
2780
8baa713c
BH
2781Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
2782
2783 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
2784
37130ac3
JM
2785Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2786
2787 * friend.c (do_friend): Warn about non-template friends in templates.
2788
2789 * call.c (build_op_delete_call): Fix handling of inherited delete.
2790
2791 * search.c (dfs_record_inheritance): Ignore template type parms.
2792
da4768fe
JM
2793Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
2794
2795 * call.c (build_new_op): Fix copy error.
2796 (build_op_new_call): New fn.
2797 (build_op_delete_call): New fn.
2798 * cp-tree.h: Declare them.
2799 * init.c (build_new): Use them. Support placement delete.
2800 (build_x_delete): Use build_op_delete_call.
2801 (build_delete): Likewise.
2802 * decl2.c (delete_sanity): Likewise.
2803 (coerce_delete_type): Don't complain about placement delete.
2804
2bb14213
JM
2805Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
2806
9babbf20
JM
2807 * call.c (build_new_function_call): Remove unused 'obj' parm.
2808 * cp-tree.h, typeck.c: Adjust.
2809
2bb14213
JM
2810 * init.c (build_new): Make the cleanup last longer.
2811 (expand_vec_init): Call do_pending_stack_adjust.
2812
a7d87521
JM
2813Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
2814
2815 * pt.c (do_type_instantiation): Fix typo.
2816 (mark_class_instantiated): If we support one_only but not weak
2817 symbols, don't mark this as known.
2818
2bd3bc6f 2819 * init.c (build_new): Handle vec delete in EH cleanup.
a7d87521 2820
6d2b1bee
BK
2821Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2822
2823 * call.c (build_method_call): Call complete_type before checking
2824 for destructor.
2825
69f9c1f6
JW
2826Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
2827
2828 * decl.c (add_block_current_level): Delete.
2829 * init.c (build_vec_delete_1): Delete build_block and
2830 add_block_current_level calls.
2831
1f109f0f
JM
2832Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
2833
2834 * init.c (build_new): Handle freeing allocated memory when the
2835 constructor throws.
2836
2837 * call.c (build_new_method_call): Fix flags arg.
2838
2839 * pt.c (do_type_instantiation): Don't try to instantiate
2840 member templates.
2841 (mark_decl_instantiated): If we support one_only but not
2842 weak symbols, mark this one_only.
2843 * decl2.c (import_export_vtable): Don't defer handling of vtables
2844 if MULTIPLE_SYMBOL_SPACES.
2845
0b3ca5ee
JM
2846Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2847
2848 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
2849
c0700ea5
JM
2850Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
2851
2852 * except.c (do_pop_exception): Return a value.
2853
00d3396f
JM
2854Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
2855
2856 * call.c (build_new_method_call): Handle getting a
2857 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
2858 if we got template parms.
2859 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
2860 not just the args.
2861 * decl2.c (build_expr_from_tree): Tweak last change.
2862 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
2863 (maybe_fold_nontype_arg): Split out from tsubst_copy.
2864 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
2865
2866Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2867
2868 * pt.c (tsubst_copy): Handle explicit template arguments in
2869 function calls.
2870 * typeck.c (build_x_function_call): Likewise.
2871 * decl2.c (build_expr_from_tree): Lookup function name if it
2872 hasn't been done.
2873
2874 * pt.c (tsubst): Instantiate template functions properly when
2875 template parameter does not appear in function arguments and return
2876 type.
2877 (comp_template_args): Handle member templates required by tsubst.
2878
343fdf03
JM
2879Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
2880
2881 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
2882 previous change.
2883
2884Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2885
2886 * pt.c (coerce_template_parms): Tweak error message.
2887
2888 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
2889 return type defaults to `int', even if there are storage-class
2890 specifiers.
2891
c7ae64f2
JM
2892Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2893
2894 Complete nested exception support.
2895 * except.c (do_pop_exception): Split out...
2896 (push_eh_cleanup): From here. Handle the EH region by hand.
2897 (expand_start_catch_block): Add a new level for the catch parm.
2898 Move the rethrow region outside the two cleanup regions.
2899 Protect the initializer for the catch parm with terminate.
2900 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
2901 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
2902 popping off the middle of the stack.
2903 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
2904 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
2905 (build_cplus_new): Only wrap CALL_EXPRs.
2906 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
2907 the constructor call.
2908
2909Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2910
2911 * Make-lang.in (c++.distdir): Make inc subdirectory.
2912
bd871063
JM
2913Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2914
2915 * decl2.c (finish_file): Put back some code.
2916
4d6efa25
JM
2917Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
2918
2919 * decl2.c (finish_file): Remove redundant code.
2920 * method.c (emit_thunk): Don't let the backend defer generic thunks.
2921
95e8dcba
JM
2922Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
2923
2924 * except.c (call_eh_info): Split out...
2925 (push_eh_info): From here.
2926 (expand_builtin_throw): Use it.
2927 (expand_start_catch_block): Move region start back.
2928
30c317f5
DE
2929Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
2930
2931 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
2932 (real_yylex): Record wide strings using target endianness, not host.
2933
a8a63732
BK
29341997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
2935
2936 * repo.c (rindex): Add decl unconditionally.
2937 (get_base_filename, open_repo_file): Don't cast rindex.
2938 * xref.c (rindex): Add decl unconditionally.
2939 (index): Remove unused decl.
2940 (open_xref_file): Don't cast rindex.
2941
b9ddcfac
JM
2942Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2943
2944 * class.c (build_vbase_path): Propagate the result type properly.
2945
5a0fa1de
BK
29461997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
2947
55e0182b
BK
2948 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
2949 remaining use of saved_throw_type with a call to get_eh_type.
2950
29511997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
2952
b2bb2710
BK
2953 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
2954 (file_name_nondirectory): New function, doing the same as the macro.
2955 (set_typedecl_interface_info): Use it instead of the macro.
2956 (check_newline): Likewise.
2957 (handle_cp_pragma): Likewise.
2958
2959 * repo.c (get_base_filename): Cast result of rindex to char*.
2960 (open_repo_file): Likewise.
2961 * xref.c (open_xref_file): Likewise.
2962 * error.c (dump_char): Make its arg int, not char.
2963
cf9d67e3
BK
2964 * except.c (push_eh_info): Pass the number of fields - 1 down, not
2965 the exact number of fields.
2966
6874c264
JM
2967Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
2968
2969 Support for nested exceptions.
2970 * tinfo2.cc (__is_pointer): New fn.
2971 * exception.cc (struct cp_eh_info): Define.
2972 (__cp_exception_info, __uncatch_exception): New fns.
2973 (__cp_push_exception, __cp_pop_exception): New fns.
2974 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
2975 Lose empty_fndecl.
2976 (init_exception_processing): Likewise. __eh_pc is now external.
2977 (push_eh_info): New fn.
2978 (get_eh_{info,value,type,caught}): New fns.
2979 (push_eh_cleanup): Just call __cp_pop_exception.
2980 (expand_start_catch_block): Use push_eh_info. Start the eh region
2981 sooner.
2982 (expand_end_eh_spec): Use push_eh_info.
2983 (expand_throw): Call __cp_push_exception to set up the exception info.
2984 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
2985 when we rethrow.
2986 (expand_builtin_throw): Don't refer to empty_fndecl.
2987
7b4f18a3
JM
2988Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
2989
2990 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
2991
4966381a
BK
29921997-10-22 Brendan Kehoe <brendan@cygnus.com>
2993
2994 * method.c (build_template_parm_names, build_decl_overload_real):
2995 Add static to definitions.
2996 * pt.c (add_to_template_args, note_template_header,
2997 processing_explicit_specialization, type_unification_real): Likewise.
2998 ({determine,check}_explicit_specialization): Use a single string for
2999 error messages.
3000
92b96838
JM
3001Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
3002
3003 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
3004 (expand_end_catch_block): Likewise.
3005 (expand_end_eh_spec): Likewise.
3006
92eca640
MM
3007Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
3008
3009 * decl.c (duplicate_decls): Handle template specializations
3010 correctly.
3011 * error.c (dump_function_name): Fix printing of specializations of
3012 member functions that are not member templates.
3013 * cp-tree.h (processing_specialization): Make global.
3014 * pt.c (processing_specialization): Likewise.
3015 * lex.c (cons_up_default_function): Save and restore
3016 processing_specialization to avoid confusion.
3017
a6967cc0
JM
3018Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3019
3020 * decl.c (init_decl_processing): Give null_node unknown* type.
3021 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
3022 (common_type): Likewise.
3023 * error.c (args_as_string): Recognize null_node.
e9a25f70
JL
3024
3025Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3026
3027 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
3028 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
3029
3030 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
3031
3032 * Make-lang.in (g++): Include prefix.o.
a6967cc0 3033
bdd7e652
JG
3034Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
3035
3036 * pt.c (determine_explicit_specialization): Initialize "dummy"
3037 to keep Purify quiet.
3038
2636fde4
JM
3039Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3040
3041 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
3042 (build_overload_int): Not here.
3043
3044Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
3045
3046 * class.c (build_type_pathname): Remove.
3047 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
3048
32066e1a
BK
30491997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
3050
3051 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
3052 &&label GNU extension.
3053
1f06b267
MM
3054Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
3055
3056 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
3057 so as to avoid incorrect manglings.
3058 * method.c (build_decl_overload_real): Don't mangle return types
3059 for constructors.
3060
e66d884e
JM
3061Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
3062
3063 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
3064 scratch_tree_cons): Define as macros for now.
3065 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
3066 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
3067 typeck2.c: Use them and the expression_obstack variants.
dae1d6f6 3068
e66d884e 3069Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
dae1d6f6 3070
e66d884e
JM
3071 * decl.c (store_return_init): Allow classes with explicit ctors to
3072 be used with the named return values extension.
dae1d6f6 3073
7ac63bca
JM
3074Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
3075
3076 * pt.c (instantiate_decl): Fix previous change.
3077
fee23f54
JM
3078Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
3079
3080 * pt.c (tsubst): Fix thinko.
3081 (instantiate_decl): Really use the original template.
3082
3083 * call.c (build_new_method_call): Use simple constructor_name for
3084 error messages.
3085
c8907853
JL
3086Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
3087
3088 * method.c (build_underscore_int): Don't use ANSI specific
3089 features.
3090
3bd1e206
JM
3091Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3092
3093 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
3094 for our key method; it might have been inlined by -O3.
3095
ffb690bd
JM
3096Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
3097
3098 * decl.c (make_typename_type): Do not try to call lookup_field for
3099 non-aggregate types.
3100
3101Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
3102
3103 * typeck.c (build_reinterpret_cast): Tweak.
3104
3105Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
3106
3107 * typeck.c (build_reinterpret_cast): converting a void pointer
3108 to function pointer with a reinterpret_cast produces a warning
3109 if -pedantic is issued
3110
3111Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
3112
3113 * typeck.c (c_expand_return): Don't warn about returning a
3114 reference-type variable as a reference.
3115
a6f02587
JM
3116Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
3117
3118 * method.c (build_static_name): Fix typo.
3119
31201997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
3121
3122 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
3123 OLDDECL before we try to do DECL_USE_TEMPLATE.
3124
c32381b1
JM
3125Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3126
3127 * decl.c (duplicate_decls): Don't warn about template instances.
3128
3129 * typeck.c (mark_addressable): Lose ancient code that unsets
3130 DECL_EXTERNAL.
3131
3132 * pt.c (do_decl_instantiation): Lose support for instantiating
3133 non-templates.
3134
3135 * call.c (build_new_function_call): Fix handling of null explicit
3136 template args.
3137 (build_new_method_call): Likewise.
3138
3139Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
3140
3141 * method.c (build_underscore_int): Fix typo.
3142
3f2270ec
BK
31431997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
3144
3145 * tree.c (print_lang_statistics): #if 0 call to
3146 print_inline_obstack_statistics until its definition is checked in.
3147
27bb8339
JM
3148Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3149
c32381b1
JM
3150 * decl2.c (finish_file): Move dump_tree_statistics to end.
3151
27bb8339
JM
3152 * pt.c (instantiate_decl): Look for the original template.
3153 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
3154 of member templates.
3155
5408ce78
JM
3156Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3157
3158 * Makefile.in (g++FAQ.*): New rules.
3159 (CONFLICTS): Update.
3160 * g++FAQ.texi: Moved from libg++.
3161
3162 * parse.y (PFUNCNAME): Only specify the type once.
3163
a3f44a13
BK
31641997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
3165
3166 * lex.c (real_yylex): Clean up the code to fully behave the way
3167 the c-lex.c parser does for complex and real numbers.
3168
5a45bc3e
JM
3169Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3170
3171 * method.c (build_decl_overload_real): Reformat.
3172
b7067a12
JM
3173Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
3174
3175 * method.c (synthesize_method): If at_eof, determine our linkage.
3176
4f6140be
PE
31771997-09-29 Paul Eggert <eggert@twinsun.com>
3178
3179 * lex.c (real_yylex): Treat `$' just like `_', except issue a
3180 diagnostic if !dollars_in_ident or if pedantic.
3181
3182 * lang-specs.h (@c++): -ansi no longer implies -$.
3183
3184 * decl2.c (lang_decode_option):
3185 -traditional and -ansi now do not mess with
3186 dollars_in_ident.
3187
9f617717
L
3188Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3189
3190 * Makefile.in (parse.o, decl.o): Also depend on
3191 $(srcdir)/../except.h $(srcdir)/../output.h.
3192 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
3193 $(srcdir)/../except.h $(srcdir)/../output.h.
3194 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
3195 ../insn-codes.h.
3196
3197 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
3198
3199 * expr.c (cplus_expand_expr): Make it static.
3200
3201 * decl2.c, init.c, typeck.c: Include "expr.h".
3202 (expand_expr): Use proper values when calling the function.
3203
0c4b14c4
JM
3204Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
3205
3206 * lang-options.h: new -Wold-style-cast flag.
3207 * cp-tree.h (warn_old_style_cast): new variable.
3208 * decl2.c (warn_old_style_cast): ditto.
3209 (lang_decode_option): support -Wold-style-cast.
3210 (reparse_absdcl_as_casts): produce old-style-cast warning.
3211
3212Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3213
3214 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
3215 TREE_USED, reset value based on already_used.
3216
3217 * init.c (expand_member_init): Revert change.
3218
893de33c
JM
3219Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
3220
3221 * cp-tree.h, decl.c, decl2.c, pt.c:
3222 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
3223
3224 * decl2.c (lang_decode_option): Add missing ;.
3225
386b8a85
JM
3226Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3227
3228 * friend.c (do_friend): Disable injection for all template-derived
3229 decls.
3230 * decl2.c (lang_decode_option): Handle -fguiding-decls.
3231 * parse.y (notype_template_declarator): New nonterminal.
3232 (direct_notype_declarator): Use it.
3233 (complex_direct_notype_declarator): Likewise.
3234 (object_template_id): Accept any kind of identifier after TEMPLATE.
3235 (notype_qualified_id): Don't add template declarators here.
3236
3237Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
3238
3239 * call.c (add_template_candidate): Add explicit_targs parameter.
3240 (build_scoped_method_call): Use it.
3241 (build_overload_call_real): Likewise.
3242 (build_user_type_conversion_1): Likewise.
3243 (build_new_function_call): Likewise.
3244 (build_object_call): Likewise.
3245 (build_new_op): Likewise.
3246 (build_new_method_call): Likewise.
3247 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
3248 (build_new_method_call): Likewise.
3249
3250 * class.c (finish_struct_methods): Add specialization pass to
3251 determine which methods were specializing which other methods.
3252 (instantiate_type): Handle TEMPLATE_ID_EXPR.
3253
3254 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
3255
3256 * cp-tree.h (name_mangling_version): New variable.
3257 (flag_guiding_decls): Likewise.
3258 (build_template_decl_overload): New function.
3259 (begin_specialization): Likewise.
3260 (reset_specialization): Likewise.
3261 (end_specialization): Likewise.
3262 (determine_explicit_specialization): Likewise.
3263 (check_explicit_specialization): Likewise.
3264 (lookup_template_function): Likewise.
3265 (fn_type_unification): Add explicit_targs parameter.
3266 (type_unification): Likewise.
3267
3268 * decl.c (duplicate_decls): Add smarts for explicit
3269 specializations.
3270 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
3271 specializations.
3272 (grokfndecl): Call check_explicit_specialization.
3273
3274 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
3275 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
3276 (check_classfn): Handle specializations.
3277
3278 * error.c (dump_function_name): Print specialization arguments.
3279
3280 * friend.c (do_friend): Don't call pushdecl for template
3281 instantiations.
3282
3283 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
3284
3285 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
3286 and -fno-guiding-decls.
3287
3288 * lex.c (identifier_type): Return PFUNCNAME for template function
3289 names.
3290
3291 * method.c (build_decl_overload_real): New function.
3292 (build_template_parm_names): New function.
3293 (build_overload_identifier): Use it.
3294 (build_underscore_int): New function.
3295 (build_overload_int): Use it. Add levels for template
3296 parameters.
3297 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
3298 (build_overload_nested_names): Handle template type parameters.
3299 (build_template_decl_overload): New function.
3300
3301 * parse.y (YYSTYPE): New ntype member.
3302 (nested_name_specifier): Use it.
3303 (nested_name_specifier_1): Likewise.
3304 (PFUNCNAME): New token.
3305 (template_id, object_template_id): New non-terminals.
3306 (template_parm_list): Note specializations.
3307 (template_def): Likewise.
3308 (structsp): Likewise.
3309 (fn.def2): Handle member template specializations.
3310 (component_decl_1): Likewise.
3311 (direct_notype_declarator): Handle template-ids.
3312 (component_decl_1): Likewise.
3313 (direct_notype_declarator): Handle template-ids.
3314 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
3315
3316 * pt.c (processing_specializations): New variable.
3317 (template_header_count): Likewise.
3318 (type_unification_real): New function.
3319 (processing_explicit_specialization): Likewise.
3320 (note_template_header): Likewise.
3321 (is_member_template): Handle specializations.
3322 (end_template_decl): Call reset_specialization.
3323 (push_template_decl): Handle member template specializations.
3324 (tsubst): Likewise.
3325 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
3326 (instantiate_template): Handle specializations.
3327 (instantiate_decl): Likewise.
3328 (fn_type_unification): Handle explicit_targs.
3329 (type_unification): Likewise. Allow incomplete unification
3330 without an error message, if allow_incomplete.
3331 (get_bindings): Use new calling sequence for fn_type_unification.
3332
3333 * spew.c (yylex): Handle PFUNCNAME.
3334
3335 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
3336 (really_overloaded_fn): Likewise.
3337 (get_first_fn): Handle function templates.
3338
3339 * typeck.c (build_x_function_call): Use really_overloaded_fn.
3340 Handle TEMPLATE_ID_EXPR.
3341 (build_x_unary_op): Likewise.
3342 (build_unary_op): Likewise.
3343 (mark_addressable): Templates whose address is taken are marked
3344 as used.
3345
b9620d0e
AS
33461997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3347
3348 * decl.c (init_decl_processing): Declare __builtin_constant_p as
3349 accepting any kind of type, not only int.
3350
405a745b
JM
3351Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
3352
1052cd65
JM
3353 * search.c (get_matching_virtual): Notice virtual bases when sorrying
3354 about covariant returns.
3355
405a745b
JM
3356 * parse.y (member_init): Also imply typename here. Remove ancient
3357 extension for initializing base members.
3358
653cc74a
JM
3359Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3360
3361 Handle multi-level typenames and implicit typename in base list.
3362 * parse.y (typename_sub{,[0-2]}): New rules.
3363 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
3364 (nonnested_type): New rule.
3365 (complete_type_name): Use it.
3366 (base_class.1): Use typename_sub and nonnested_type.
3367 (nested_name_specifier): Don't elide std:: here.
3368 * decl.c (make_typename_type): Handle getting a type for NAME.
3369 (lookup_name_real): Turn std:: into :: here.
3370
3371 Rvalue conversions were removed in London.
3372 * call.c (is_subseq): Don't consider lvalue transformations.
3373 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
3374 (joust): Reenable ?: kludge.
3375
59f1f2c4
BK
33761997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
3377
3378 * decl.c (start_function): Up warning of no return type to be a
3379 pedwarn.
3380
249555b0
BK
3381Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3382
3383 * init.c (expand_member_init): Don't set TREE_USED.
3384 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
3385 set,don't clear TREE_USED wholesale.
3386
b82b76c6
JM
3387Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
3388
3389 * call.c (build_over_call): Do require_complete_type before
3390 build_cplus_new.
3391
238109cd
JM
3392Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
3393
3394 * search.c (lookup_field): Call complete_type in all cases.
3395
3396 * decl.c (finish_function): Just warn about flowing off the end.
3397
66f2e88d
JM
3398Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3399
3400 * decl.c (grokparms): Don't bash a permanent list node if we're
3401 in a function.
3402
8552680f
BK
34031997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
3404
3405 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
3406
5c825fc2
JM
3407Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
3408
d5467e20
JM
3409 * call.c (build_new_op): Give better error for syntactically
3410 correct, but semantically invalid, use of undeclared template.
3411
549121cd
JM
3412 * call.c (compare_qual): Handle pmfs.
3413
5c825fc2
JM
3414 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
3415 after the exception spec.
3416
18a7cd24
JM
3417Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3418
5168dcfc
JM
3419 * call.c (null_ptr_cst_p): Integer type, not integral type.
3420
18a7cd24
JM
3421 * call.c (joust): Disable warnings until they can be moved to the
3422 right place.
3423
0520f6c0
PB
3424Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
3425
3426 * Makefile.in, config-lang.in: Convert to autoconf.
3427
85b71cf2
JM
3428Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
3429
3430 * decl.c (lookup_name_real): Add implicit 'typename' to types from
3431 base classes.
3432
3433 * pt.c (most_specialized_class): Fix typo.
3434 (tsubst): Move constant folding to TREE_VEC case.
3435
3436Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
3437
3438 * pt.c (do_poplevel): Don't warn about unused local variables
3439 while processing_template_decl since we don't always know whether
3440 or not they will need constructing/destructing.
3441
3442 * pt.c (uses_template_parms): Check the values of an enumeration
3443 type to make sure they don't depend on template parms.
3444
3445 * decl.c (make_typename_type): Don't lookup the field if the
3446 context uses template parms, even if we're not
3447 processing_template_decl at the moment.
3448
3449 * pt.c (coerce_template_parms): Avoid looking at the
3450 TYPE_LANG_DECL portion of a typename type, since there won't be
3451 one.
3452 (tsubst): Do constant folding as necessary to make sure that
3453 arguments passed to lookup_template_class really are constants.
3454
ca55abae
JM
3455Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
3456
3457 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
3458 * decl2.c (finish_file): Only register exception tables if we
3459 need to.
3460
3461 * decl.c (init_decl_processing): Add __builtin_[fs]p.
3462
2ca340ae
JM
3463Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3464
3465 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
3466
03555413
MM
3467Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
3468
3469 * error.c (dump_decl): Avoid crashing when presented with a
81e98a98
JM
3470 uninitialized constant, as can occur with a template parameter.
3471 (dump_expr): Make sure that there are enough levels of
3472 current_template_parms before we start diving through them.
03555413 3473
b0d75c1e
BK
34741997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
3475
3476 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
3477 c-typeck.c.
3478
a2676865
JM
3479Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3480
3481 * except.c (expand_throw): Call build_delete for all
3482 exception types, not just objects with destructors.
3483
b3d5a58b
JG
3484Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
3485
3486 * decl.c (current_local_enum): Remove static.
3487 * pt.c (tsubst_enum): Save and restore value of current_local_enum
3488 in case template is expanded in enum decl.
3489 (instantiate_class_template) : Use new tsubst_enum signature.
3490 (tsubst_expr): Likewise.
3491
786b5245
MM
3492Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
3493
3494 * pt.c (begin_member_template_processing): Take a function as
3495 argument, not a set of template arguments. Use the template
3496 parameters, rather than the arguments. Handle non-type parameters
3497 correctly. Push a binding level for the parameters so that multiple
3498 member templates using the same parameter names can be declared.
3499 (end_member_template_processing): Pop the binding level.
3500 (push_template_decl): Mark member templates as static when
3501 appropriate.
3502
3503 * lex.c (do_pending_inlines): Pass the function, not its template
3504 arguments, to begin_member_template_processing.
3505 (process_next_inline): Likewise.
3506 (do_pending_defargs): Likewise.
3507
3508 * error.c (dump_expr): Obtain the correct declaration for a
3509 TEMPLATE_CONST_PARM.
3510
3511 * call.c (add_template_conv_candidate): New function.
3512 (build_object_call): Handle member templates, as done in the other
3513 build_ functions.
3514
aa5f3bad
MM
3515Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
3516
3517 * decl.c (replace_defag): Undo previous change.
3518 * lex.c (do_pending_defargs): Deal with member templates.
3519
3520 * pt.c (is_member_template): Avoid crashing when passed a
3521 non-function argument.
3522
98c1c668
JM
3523Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
3524
3525 * class.c (grow_method): Remove check for redeclaration.
3526
a2676865
JM
3527Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
3528
3529 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
3530 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
3531 (PRIMARY_TEMPLATE_P): Use it.
3532 * call.c (build_overload_call_real): Use it.
3533 * class.c (instantiate_type): Likewise.
3534 * decl.c (decls_match): Likewise.
3535 * method.c (build_overload_identifier): Likewise.
3536 * pt.c (push_template_decl): Likewise.
3537 (classtype_mangled_name): Likewise.
3538 (lookup_template_class): Likewise.
3539
3540 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
3541 DECL_NTPARMS to conform to usage elsewhere.
3542 * call.c (add_template_candidate): Likewise.
3543 * class.c (instantiate_type): Likewise.
3544 * pt.c (instantiate_template): Likewise.
3545 (get_bindings): Likewise.
3546
3547 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
3548 is_member_template.
3549
3550 * pt.c (unify): Undo changes to allow multiple levels of template
3551 parameters.
3552 (type_unification): Likewise.
3553 (fn_type_unification): Likewise.
3554 (get_class_bindings): Likewise.
3555 * cp-tree.h (Likewise).
3556
3557 * decl.c (replace_defarg): Check that the type of the default
3558 parameter does not invlove a template type before complaining
3559 about the initialization.
3560
3561 * error.c (dump_expr): Deal with template constant parameters in
3562 member templates correctly.
3563
3564 * pt.c (is_member_template): Deal with class specializations
3565 correctly.
3566 (tsubst): Handle "partial instantiation" of member templates
3567 correctly.
3568
98c1c668
JM
3569Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
3570
3571 * pt.c (type_unification): Change calling squence to allow for
3572 multiple levels of template parameters.
3573 (tsubst_expr): Likewise.
3574 (tsubst): Likewise.
3575 (tsubst_copy): Likewise.
3576 (instantiate_template): Likewise.
3577 (unify): Likewise.
3578 * call.c (build_overload_call_real): Use it.
3579 (add_builtin_candidate): Use it.
3580 (build_new_method_call): Use it.
3581 * class.c (instantiate_type): Use it.
3582 * decl.c (grokdeclarator): Use it.
3583 * decl2.c (finish_file): Use it.
3584 * method.c (build_overload_identifier): Use it.
3585
3586 * call.c (add_template_candidate): Add additional parameter for
3587 the function return type. Call fn_type_unification istead of
3588 type_unification.
3589 (build_user_type_conversion_1): Handle member templates.
3590 (build_new_function_call): Likewise.
3591 (build_new_op): Likewise.
3592 (build_new_method_call): Likewise.
3593
3594 * class.c (grow_method): Don't give an error message indicating
3595 that two member templates with the same name are ambiguous.
3596 (finish_struct): Treat member template functions just like member
3597 functions.
3598
3599 * cp-tree.h (check_member_template): Add declaration.
3600 (begin_member_template_processing): Likewise.
3601 (end_member_template_processing): Likewise.
3602 (fn_type_unification): Likewise.
3603 (is_member_template): Likewise.
3604 (tsubst): Change prototype.
3605 (tsubst_expr): Likewise.
3606 (tsubst_copy): Likewise.
3607 (instantiate_template): Likewise.
3608 (get_bindings): Likewise.
3609
3610 * decl.c (decls_match): Handle multiple levels of template
3611 parameters.
3612 (pushdecl): Handle template type params just like other type
3613 declarations.
3614 (push_class_level_binding): Return immediately if the
3615 class_binding_level is NULL.
3616 (grokfndecl): If check_classfn() returns a member_template, use
3617 the result of the template, not the template itself.
3618
3619 * decl2.c (check_member_template): New function. Check to see
3620 that the entity declared to be a member template can be one.
3621 (check_classfn): Allow redeclaration of member template functions
3622 with different types; the new functions can be specializations or
3623 explicit instantiations.
3624
3625 * error.c (dump_decl): Handle multiple levels of template
3626 parameters.
3627 (dump_function_decl): Update to handle function templates.
3628
3629 * lex.c (do_pending_inlines): Set up template parameter context
3630 for member templates.
3631 (process_next_inline): Likewise.
3632
3633 * method. (build_overload_identifier): Adjust for multiple levels
3634 of template parameters.
3635
3636 * parse.y (fn.def2): Add member templates.
3637 (component_decl_1): Likewise.
3638
3639 * pt.c (begin_member_template_processing): New function.
3640 (end_member_template_processing): Likewise.
3641 (is_member_template): Likewise.
3642 (fn_type_unification): Likewise.
3643 (current_template_parms): Return a vector of all the template
3644 parms, not just the innermost level of parms.
3645 (push_template_decl): Deal with the possibility of member
3646 templates.
3647 (lookup_template_class): Likewise.
3648 (uses_template_parms): Likewise.
3649 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
3650 TEMPLATE_CONST_PARM to deal with multiple levels of template
3651 arguments. Add processing of TEMPLATE_DECL to produce new
3652 TEMPLATE_DECLs from old ones.
3653 (do_decl_instantiation): Handle member templates.
3654
3655 * search.c (lookup_fnfields_1): Handle member template conversion
3656 operators.
3657
3658 * tree.c (cp_tree_equal): Check the levels, as well as the
3659 indices, of TEMPLATE_CONST_PARMs.
3660
3661 * typeck.c (comptypes): Check the levels, as well as the indices,
3662 fo TEMPLATE_TYPE_PARMs.
3663 (build_x_function_call): Treat member templates like member
3664 functions.
3665
03e70705
JM
3666Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3667
c1bc6829
JM
3668 * typeck.c (c_expand_return): Always convert_for_initialization
3669 before checking for returning a pointer to local.
3670
03e70705
JM
3671 * pt.c (type_unification): If strict and the function parm doesn't
3672 use template parms, just compare types.
3673
3674Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
3d015f46
KE
3675
3676 * method.c (build_overloaded_value): Replace direct call
3677 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
3678
056c014d
JM
3679Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
3680
3681 * typeck.c (convert_arguments): Don't arbitrarily choose the first
3682 of a set of overloaded functions.
3683
ca79f85d
JM
3684Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
3685
056c014d
JM
3686 * lex.c (real_yylex): Don't elide __FUNCTION__.
3687
37dac039
JM
3688 * method.c (build_overload_value): Add in_template parm.
3689 (build_overload_int): Likewise.
3690 (build_overload_identifier): Pass it.
3691
3692 * decl.c (duplicate_decls): Don't bash a previous template
3693 definition with a redeclaration.
3694
ca79f85d
JM
3695 * pt.c (unify): float doesn't match double.
3696
3697 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
3698 TYPE_DECL. Handle getting non-template types.
3699 * parse.y (explicit_instantiation): Use typespec instead of
3700 aggr template_type.
3701
3702Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
3703
3704 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
3705
238109cd 3706Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
7e3af374 3707
03e70705
JM
3708 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
3709 (compare_ics): Likewise.
238109cd
JM
3710
3711Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
03e70705
JM
3712
3713 * call.c (joust): Warn about choosing one conversion op over
3714 another because of 'this' argument when the other return type is
3715 better.
3716 (source_type): New fn.
3717
7e3af374
JM
3718 * call.c (build_new_op): Strip leading REF_BIND from first operand
3719 to builtin operator.
3720
3721 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
3722 use its RTL.
3723
8e69329a
JM
3724Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
3725
3726 * call.c (null_ptr_cst_p): Remove support for (void*)0.
3727
5ddc28a5
JL
3728Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
3729
bdcaf773
JL
3730 * typeck.c (expand_target_expr): Make definition match declaration.
3731
5ddc28a5
JL
3732 * class.c (get_basefndecls): Make definition match declaration.
3733
922ddba4
JM
3734Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
3735
818045b6
JM
3736 * input.c (sub_getch): Eventually give up and release the input file.
3737
3738 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
3739 right place.
3740
922ddba4
JM
3741 * call.c (joust): Tweak message.
3742
3743Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
3744
3745 * error.c (type_as_string): Put const/volatile on template type
3746 parameters where appropriate.
3747
4c9e597b
JL
3748Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
3749
3750 * call.c (strictly_better): Make arguments unsigned ints.
3751
8eeda2ec
JM
3752Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
3753
3754 * lex.c (real_yylex): Refer to __complex instead of complex.
3755
8975416c
R
3756Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
3757
3758 * lex.c (real_yylex): Don't use getc directly.
3759
49c249e1
JM
3760Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
3761
3762 * call.c (is_subseq): Don't try to be clever.
3763
3764Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3765
3766 * parse.y, pt.c: Include "except.h".
3767 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
3768 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
3769 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
3770 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
3771 prototyping.
3772
3773Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
3774
3775 * decl2.c (mark_vtable_entries): Instead of replacing pure
3776 virtuals with a reference to __pure_virtual, copy the decl and
3777 change the RTL.
3778
f62dbf03
JM
3779Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
3780
f017f649
JM
3781 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
3782
3783 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
3784
fe4e8851
JM
3785 * pt.c (instantiate_class_template): Call repo_template_used
3786 before finish_prevtable_vardecl.
3787
f62dbf03
JM
3788 * call.c (is_subseq): New fn.
3789 (compare_ics): Use it.
3790
3791 * repo.c (finish_repo): Don't crash on no args.
3792
3793 * parse.y (named_complex_class_head_sans_basetype): Handle
3794 explicit global scope.
3795 * decl2.c (handle_class_head): New fn.
3796
3797 * pt.c (unify): Add CONST_DECL case.
3798
da20811c
JM
3799Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3800
3801 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
3802
3803 * cp-tree.h (report_type_mismatch): Add prototype.
3804 * call.c (build_overload_call_real): Remove erroneous fourth
3805 argument to report_type_mismatch.
3806 (build_user_type_conversion_1): Remove erroneous second arg to
3807 tourney.
3808 (build_new_function_call): Likewise.
3809 (build_object_call): Likewise.
3810 (build_new_op): Likewise.
3811 (build_new_method_call): Likewise.
3812
3813Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3814
3815 * error.c (dump_decl): Don't bother processing a function with no
3816 DECL_LANG_SPECIFIC.
3817
3818 * method.c (emit_thunk): Call init_function_start in the macro case.
3819
3820Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
3821
3822 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
3823 defined and used to set flag_vtable_thunks.
3824
3825Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
3826
3827 * parse.y: Don't clear the inlines from their obstack until they've
3828 all been processed.
3829
3830 * decl.c (duplicate_decls): Don't complain about exception
3831 specification mismatch if flag_exceptions is off.
3832
3833Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
3834
3835 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
3836
3837Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
3838
3839 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
3840 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
3841 Include <stdio.h> before include files that formerly used STDIO_PROTO.
3842
3843 * decl.c, g++spec.c, lex.c, method.c, repo.c:
3844 Include "config.h" first, as per autoconf manual.
3845
3846Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
3847
3848 * decl.c (duplicate_decls): Tweak wording.
3849 * lex.c (do_pending_defargs): Don't die if we see a default arg
3850 that isn't a DEFAULT_ARG.
3851 * error.c (dump_expr): Handle DEFAULT_ARG.
3852
3853 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
3854 * lang-options.h: Add -fhandle-exceptions.
3855
3856 * class.c (build_vtable): vtables are artificial.
3857 (prepare_fresh_vtable): Likewise.
3858
3859Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3860
3861 * cvt.c (ocp_convert): After converting to the target type, set
3862 LOOKUP_NO_CONVERSION.
3863
3864 * call.c (joust): Warn about potentially confusing promotion rules
3865 with -Wsign-promo.
3866 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
3867
3868Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
3869
3870 * exception.cc: Declare __terminate_func with noreturn attribute.
3871
8dff1027
MS
3872Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
3873
3874 * parse.y: Break out eat_saved_input, handle errors.
da20811c 3875 (function_try_block): Use compstmt instead of compstmt_or_error.
8dff1027
MS
3876
3877Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
3878
3879 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
3880
3881Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3882
3883 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
3884 existence of cc1plus check whether $(LANGUAGES) contains C++.
3885
3886Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3887
3888 * method.c (do_build_copy_constructor): When copying an anonymous
3889 union member loop around to handle nested anonymous unions. Use
3890 the offset of the member relative to the outer structure, not the
3891 union.
3892
86e6f22f
JM
3893Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3894
3895 * call.c (resolve_args): New fn.
3896 (build_new_function_call): Use it.
3897 (build_object_call): Likewise.
3898 (build_new_method_call): Likewise.
3899
3900Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
3901
3902 * call.c (build_over_call): tsubst all default parms from templates.
3903
42976354
BK
3904Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
3905
3906 * decl.c (struct cp_function): Add static_labelno.
3907 (push_cp_function_context): Save it.
3908 (pop_cp_function_context): Restore it.
3909
3910Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
3911
3912 * typeck.c (build_component_ref_1): Convert from reference.
3913
3914Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3915
3916 * parse.y (current_declspecs, prefix_attributes): Initialize to
3917 NULL_TREE.
3918
3919 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
3920 before we try to force it to be a TREE_LIST.
3921 (decl): Make sure $1.t is non-nil.
3922
3923Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
3924
3925 * pt.c (uses_template_parms): Handle template first-parse codes.
3926
3927 * decl.c (cp_finish_decl): Only warn about user-defined statics.
3928
3929Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
3930
3931 * pt.c (unify): Handle BOOLEAN_TYPE.
3932
3933 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
3934 * pt.c (tsubst): Don't set it.
3935 * call.c (build_over_call): Use uses_template_parms.
3936
3937Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
3938
3939 * method.c (build_overload_nested_name): Use static_labelno
3940 instead of var_labelno.
3941 (build_qualified_name): New fn.
3942 (build_overload_name): Split out from here.
3943 (build_static_name): Use build_qualified_name.
3944 * decl.c (cp_finish_decl): Statics in extern inline functions
3945 have comdat linkage.
3946 (start_function): Initialize static_labelno.
3947
3948Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
3949
3950 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
3951 before "all member functions in class [] are private"
3952
3953Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
3954
3955 * lex.c (do_scoped_id): convert_from_reference.
3956 * init.c (build_offset_ref): Likewise.
3957
42976354
BK
3958Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
3959
3960 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
3961
3962Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
3963
3964 * typeck.c (get_member_function_from_ptrfunc): Promote index
3965 before saving it.
3966
3967Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
3968
3969 * tree.c (layout_basetypes): Move non-virtual destructor warning.
3970 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
3971
3972Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
3973
3974 * decl.c (grokdeclarator): Call add_defarg_fn for the function
3975 type, too.
3976 * lex.c (add_defarg_fn): Adjust.
3977 (do_pending_defargs): Adjust. Don't skip the first parm.
3978
3979Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
3980
3981 * decl.c (build_enumerator): Global enumerators are also readonly.
3982
3983 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
3984 (build_dynamic_cast): Call it and convert_from_reference.
3985
3986 * lex.c (add_defarg_fn): New fn.
3987 (snarf_defarg): Don't add to defarg_types.
3988 (do_pending_defargs): Lose defarg_types. All fns we process now
3989 have defargs.
3990 * decl.c (grokfndecl): Call add_defarg_fn.
3991
3992 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
3993 * cp-tree.def: Add DEFAULT_ARG.
3994 * spew.c (yylex): Call snarf_defarg as appropriate.
3995 * parse.y: New tokens DEFARG and DEFARG_MARKER.
3996 (defarg_again, pending_defargs, defarg, defarg1): New rules.
3997 (structsp): Use pending_defargs.
3998 (parms, full_parm): Use defarg.
3999 * lex.c (init_lex): Initialize inline_text_firstobj.
4000 (do_pending_inlines): Never pass the obstack to feed_input.
4001 (process_next_inline): Call end_input instead of restore_pending_input.
4002 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
4003 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
4004 * input.c (end_input): New fn.
4005 (sub_getch): At the end of some fed input, just keep returning EOF
4006 until someone calls end_input.
4007 Remove 'obstack' field from struct input_source.
4008 * decl.c (grokparms): Handle DEFAULT_ARG.
4009 (replace_defarg): New fn.
4010 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
4011
4012Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4013
4014 * call.c (implicit_conversion): If nothing else works, try binding
4015 an rvalue to a reference.
4016
4017Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
4018
4019 * decl.c (init_decl_processing): fix Jun 30 patch -- move
4020 ifndef for Cygwin32 to include SIGSEGV.
4021
7834ab39
MS
4022Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4023
4024 * class.c (finish_struct_1): Only complain about pointers without
4025 copy stuff if there are any constructors.
4026
4027 * rtti.c (build_dynamic_cast): Call complete_type on the types.
4028
4029 * decl.c (grokfndecl): If the function we chose doesn't actually
4030 match, die.
4031
4032 * decl2.c (grokclassfn): Don't specify 'const int' for the
4033 artificial destructor parm.
4034
4035 * pt.c (type_unification): If we are called recursively, nothing
4036 decays.
4037
4038Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
4039
42976354
BK
4040 * decl.c (init_decl_processing): Stop trying to catch signals
4041 other than SIGABRT since the Cygwin32 library doesn't support
4042 them correctly yet. This fixes a situation in which g++ causes
4043 a hang on SIGSEGVs and other such signals in our Win32-hosted
4044 tools.
7834ab39
MS
4045
4046Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
4047
4048 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
4049
4050Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
4051
4052 * typeck2.c (store_init_value): Always return the value if our
4053 type needs constructing.
4054
4055 * method.c (hack_identifier): Convert class statics from
4056 reference, too.
4057
4058Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
4059
4060 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
4061
b88c08b6
MS
4062Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
4063
4064 * typeck.c (c_expand_return): Make sure we clean up temporaries at
4065 the end of return x;
4066
4067Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4068
4069 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
4070
6633d636
MS
4071Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
4072
4073 * except.c (expand_builtin_throw): Add support
4074 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
4075
4076Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
4077
4078 * repo.c (extract_string): Null-terminate.
4079
4080 * cp-tree.h (TI_SPEC_INFO): New macro.
4081 (CLASSTYPE_TI_SPEC_INFO): New macro.
4082 * pt.c (push_template_decl): Correctly determine # of template parms
4083 for partial specs.
4084
4085 * call.c (compare_ics): Really fix 'this' conversions.
4086
4087 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
4088 non-template fn.
4089
4090 * pt.c (push_template_decl): Complain about mismatch in # of
4091 template parms between a class template and a member template.
4092
4093Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
4094
4095 * method.c (synthesize_method): You can't call
4096 function_cannot_inline_p after finish_function.
4097 * decl.c (finish_function): Turn on flag_inline_functions and turn
4098 off DECL_INLINE before handing a synthesized method to the
4099 backend.
4100
4101Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4102
4103 * method.c (synthesize_method): Remove July 30 change to never set
4104 DECL_INLINE if at_eof.
4105
4106Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
4107
4108 * xref.c (GNU_xref_member): Ensure that the node has a
4109 decl_lang_specific part before checking DECL_FRIEND_P.
4110
4111Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4112
4113 * pt.c (instantiate_class_template): Diagnose non-class types used
4114 as bases.
4115
4116Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
4117
4118 * typeck.c (build_conditional_expr): Use convert_for_initialization
4119 instead of convert_and_check.
4120
4121Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4122
4123 * parse.y (typespec): Don't pedwarn for typeof.
4124
4125Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
4126
4127 * repo.c (finish_repo): Only check changes if we would write a
4128 repo file.
4129
4130 * call.c (compare_ics): Fix handling of 'this' conversions.
4131
4132 * pt.c (do_decl_instantiation): Support static data too. Rename
4133 from do_function_instantiation.
4134 * cp-tree.h: Adjust.
4135 * parse.y: Adjust.
4136
4137 * repo.c (extract_string): New fn.
4138 (get_base_filename): Use it.
4139 (init_repo): Compare old args with current args.
4140
4141Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
4142
4143 * Makefile.in, Make-lang.in: Protect C-ls with a comment
4144 character, idea from Paul Eggert <eggert@twinsun.com>.
4145
4146Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
4147
4148 * typeck.c (c_expand_return): Be more persistent in looking for
4149 returned temps.
4150
4151 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
4152 pointer to reference.
4153
4154 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
4155
4156Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4157
4158 * init.c (build_member_call, build_offset_ref):
4159 Use do_scoped_id instead of do_identifier.
4160
4161 * cvt.c (convert): Remove bogosity.
4162
4163Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4164
4165 * cvt.c (build_up_reference): Do checks of ARGTYPE and
4166 TARGET_TYPE before trying to use get_binfo.
4167
4168Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
4169
4170 * cvt.c (build_up_reference): Call get_binfo to get access control.
4171
4172 * decl2.c (import_export_decl): If we don't support weaks, leave
4173 statics undefined.
4174
4175Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
4176
4177 * except.c (expand_builtin_throw): Add support for machines that
4178 cannot access globals after throw's epilogue when
4179 -fno-sjlj-exceptions is used.
4180
4181Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
4182
4183 * parse.y: 'std::' becomes '::'.
4184 * lex.c (real_yylex): Remove 'namespace' warning.
4185 * init.c (build_member_call): Ignore 'std::'.
4186 (build_offset_ref): Likewise.
4187 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
4188 (do_toplevel_using_decl): Ignore 'using std::whatever'.
4189 * decl.c (push_namespace): Just sorry.
4190 (pop_namespace): Nop.
4191 (init_decl_processing): Declare std namespace.
4192
013bc8af
MS
4193Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
4194
4195 * search.c (push_class_decls): A name which ambiguously refers to
4196 several instantiations of the same template just refers to the
4197 template.
4198
4199Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
4200
4201 * decl.c (build_enumerator): fix problem with unsigned long
4202 enumerated values being smashed to ints, causing overflow
4203 when computing next enumerated value. (for enum values around
4204 MAX_VAL).
4205
4206Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
4207
4208 * typeck.c (build_component_ref): Only call mark_used on a decl.
4209
4210Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4211
4212 * typeck.c (build_c_cast): Make the check for a ptr to function
4213 more specific before possible default_conversion call.
4214
e00737d2
MS
4215Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
4216
4217 * except.c (expand_exception_blocks): Simplify and fix and make
4218 sure we don't end a region in a sequence, as expand_end_bindings
4219 doesn't like it.
4220
4221Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
4222
4223 * except.c (init_exception_processing): Mark terminate as not
4224 returning so that the optimizer can optimize better.
4225
37c46b43
MS
4226Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
4227
4228 * cvt.c (convert): Don't do any extra work, if we can avoid it
4229 easily.
4230
4231Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
4232
4233 * *.[chy]: Change cp_convert to ocp_convert, change convert to
4234 cp_convert. convert is now reserved for the backend, and doesn't
4235 have the semantics a frontend person should ever want.
4236
4237Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
4238
4239 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
4240 Lose -traditional support.
4241
4242Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4243
4244 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
4245
4246 * parse.y (self_reference): Do it for templates, too.
4247 * class.c (pushclass): Don't overload_template_name; the alias
4248 generated by build_self_reference serves the same purpose.
4249
4250 * tree.c (list_hash): Make static, take more args.
4251 (list_hash_lookup): Likewise.
4252 (list_hash_add): Make static.
4253 (list_hash_canon): Lose.
4254 (hash_tree_cons): Only build a new node if one isn't already in the
4255 hashtable.
4256 (hash_tree_chain): Use hash_tree_cons.
4257 * cp-tree.h: Adjust.
4258 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
4259 of calling lookup_name.
4260
4261Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
4262
4263 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
4264 doesn't refer to the CONST_DECLs.
4265
4266Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
4267
4268 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
4269 is bigger.
4270 (expand_class_desc): Convert the last argument to a sizetype.
4271
4272Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4273
4274 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
4275 __real__): Add reswords.
4276 * hash.h: Regenerate.
4277 * lex.h (rid): Add RID_COMPLEX.
4278 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
8eeda2ec 4279 * lex.c (init_lex): Add building of RID_COMPLEX.
37c46b43
MS
4280 (real_yylex): General cleanup in line with what c-lex.c also has,
4281 sans the cruft for traditional; add handling of SPEC_IMAG, complex
4282 types, and imaginary numeric constants.
4283 * parse.y (REALPART, IMAGPART): Add tokens.
4284 (unary_expr): Add REALPART and IMAGPART rules.
4285 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
4286 * decl.c (complex_{integer,float,double,long}_type_node): Define
4287 types.
4288 (init_decl_processing): Set up the types.
4289 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
4290 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
4291 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4292 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
4293 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
4294 COMPLEX_TYPE case.
4295 * method.c (build_overload_name): Add handling of the different
4296 COMPLEX_TYPEs, prefixing them with `J'.
4297 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
4298 as a template parm.
4299 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
4300 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
4301 (mapcar): Handle COMPLEX_CST.
4302 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
4303 (common_type): Add code for complex types.
4304 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4305 (convert_for_assignment): Likewise.
4306 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
4307
4308Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
4309
4310 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
4311 tsubst_expr, as it might try to do overload resolution.
4312
b87692e5
MS
4313Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
4314
4315 * pt.c (instantiate_class_template): Oops.
4316
4317Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
4318
4319 * cp-tree.def: Add TAG_DEFN.
4320 * pt.c (tsubst_enum): New fn.
4321 (instantiate_class_template): Use it.
4322 (tsubst_expr): Support TAG_DEFN.
4323 (tsubst): Support local enums.
4324 (tsubst_copy): Likewise.
4325 * decl.c (finish_enum): Likewise.
4326 (start_enum): If this is a local enum, switch to permanent_obstack.
4327
4328Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
4329
4330 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
4331 (finish_function): Put the base init code for constructors just
4332 after the parm cleanup insns.
4333 (struct cp_function): Add last_parm_cleanup_insn.
4334 (push_cp_function_context): Likewise.
4335 (pop_cp_function_context): Likewise.
4336
4337Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
4338
4339 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
4340
4341Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4342
4343 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
4344 for THUNK_FNDECL before we switch to temporary allocation.
4345
beb53fb8
JM
4346Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
4347
4348 * call.c (build_new_op): Handle null arg2 for ?:.
4349
eb448459
MS
4350Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
4351
4352 * except.c (expand_exception_blocks): Ensure that we flow through
37c46b43
MS
4353 the end of the exception region for the exception specification.
4354 Move exception region for the exception specification in, so that
4355 it doesn't protect the parm cleanup. Remove some obsolete code.
4356 * decl.c (store_parm_decls): Likewise.
eb448459
MS
4357 (finish_function): Likewise.
4358
4359Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
4360
4361 * init.c (build_new): Fix nothrow handling.
4362
4363Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4364
4365 * init.c (emit_base_init): Don't warn about the initialization
4366 list for an artificial member.
4367
4368Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4369
4370 * expr.c (do_case): Handle !START case for the error msg.
4371
4372Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
4373
4374 * decl2.c, lang-options.h: New option -Weffc++.
4375 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
4376 to -Weffc++.
4377
4378 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
37c46b43 4379 to MULTIPLE_SYMBOL_SPACES.
eb448459
MS
4380
4381Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
4382
4383 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
4384
4385 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
4386
4387 * typeck.c (c_expand_return): Don't complain about returning void
4388 to void in an artificial function.
4389 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
4390 don't set DECL_RESULT, set DECL_ARTIFICIAL.
4391 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
4392
eb66be0e
MS
4393Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
4394
4395 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
4396 exception handling.
4397 * except.c (init_exception_processing): Likewise.
4398 (expand_end_catch_block): Likewise.
4399 (expand_exception_blocks): Likewise.
4400 (expand_throw): Likewise.
4401 * exception.cc (__default_terminate): Likewise.
4402
4403 * init.c (perform_member_init): Use new method of expr level
37c46b43 4404 cleanups, instead of cleanups_this_call and friends.
eb66be0e
MS
4405 (emit_base_init): Likewise.
4406 (expand_aggr_vbase_init_1): Likewise.
4407 (expand_vec_init): Likewise.
4408 * decl.c (cp_finish_decl): Likewise.
4409 (expand_static_init): Likewise.
4410 (store_parm_decls): Likewise.
4411 (cplus_expand_expr_stmt): Likewise.
4412 * decl2.c (finish_file): Likewise.
4413
4414 * Make-lang.in (exception.o): Ok to compile with -O now.
4415
4416 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
4417 we know it will be done later by the backend.
4418
4419 * decl2.c (lang_f_options): Remove support for short temps.
4420 * lang-options.h: Likewise.
4421
4422Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4423
4424 * tree.c (varargs_function_p): New fn.
4425 * method.c (emit_thunk): Replace broken generic code with code to
37c46b43 4426 generate a heavyweight thunk function.
eb66be0e
MS
4427
4428Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
4429
4430 * pt.c (process_template_parm): pedwarn about floating-point parms.
4431
4432 * decl.c (grokdeclarator): inline no longer implies static.
4433
4434 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
4435
4436Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
4437
4438 * class.c (check_for_override): The signature of an overriding
37c46b43 4439 function is not changed.
eb66be0e
MS
4440
4441 * call.c (build_over_call): Move setting of conv into the loop.
da20811c
JM
4442 Note: this change, along with the related changes of the 18th thru
4443 the 20th of April, fix an infinite loop problem in conversions.
eb66be0e
MS
4444
4445Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
4446
4447 * call.c (build_user_type_conversion_1): Really ignore rvalue
37c46b43 4448 conversions when looking for a REFERENCE_TYPE.
eb66be0e
MS
4449
4450 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
4451 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
4452 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
4453 (build_unary_op): Likewise.
4454 * call.c (build_over_call): See through a CONVERT_EXPR around the
37c46b43 4455 ADDR_EXPR for on a temporary.
eb66be0e 4456 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
37c46b43 4457 the ADDR_EXPR for a local variable.
eb66be0e
MS
4458
4459Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
4460
4461 * call.c (build_user_type_conversion_1): If we're trying to
37c46b43 4462 convert to a REFERENCE_TYPE, only consider lvalue conversions.
eb66be0e
MS
4463 (build_new_function_call): Print candidates.
4464 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
4465 (reference_binding): Binding a temporary of a reference-related type
4466 is BAD.
4467
4468Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4469
4470 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
4471 * tinfo2.cc (type_info::before): Likewise.
4472
4473Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
4474
4475 * call.c (implicit_conversion): Oops.
4476
4477Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
4478
4479 * call.c (implicit_conversion): Try to find a reference conversion
37c46b43 4480 before binding a const reference to a temporary.
eb66be0e
MS
4481
4482Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
4483
4484 * exception.cc (__default_unexpected): Call terminate by default,
4485 so that if the user overrides terminate, the correct function will
4486 be called.
4487
bd6dd845
MS
4488Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
4489
4490 * parse.y (left_curly): Avoid trying to use any fields of
eb66be0e 4491 error_mark_node, as there aren't any.
bd6dd845
MS
4492
4493Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
4494
4495 * lex.c (do_identifier): Avoid breaking on overloaded methods
4496 as default arguments.
4497
4498Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
4499
eb66be0e 4500 * call.c (add_template_candidate): Initialize the variable "dummy".
bd6dd845
MS
4501
4502Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
4503
4504 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
4505 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
4506
4507Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4508
4509 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
4510 (debug_binfo): Delete decl, not needed.
4511
4512 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
4513 promotes_to_aggr_type): Delete fns.
4514 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
4515 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
4516 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
4517
4518 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
4519
4520 * friend.c (is_friend_type): Delete fn.
4521 * cp-tree.h (is_friend_type): Delete decl.
4522
4523 * decl.c (original_result_rtx, double_ftype_double,
4524 double_ftype_double_double, int_ftype_int, long_ftype_long,
4525 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
4526 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
4527
4528 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
4529 fwd decls.
4530 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
4531
4532 * decl.c (pushdecl_nonclass_level): #if 0, unused.
4533 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
4534
4535 * lex.c (reinit_lang_specific): #if 0, unused.
4536 * cp-tree.h (reinit_lang_specific): #if 0 decl.
4537
4538 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
4539 * cp-tree.h (revert_static_member_fn): Delete decl.
4540
4541 * class.c (root_lang_context_p): Delete fn.
4542 * cp-tree.h (root_lang_context_p): Delete decl.
4543
4544 * decl.c (set_current_level_tags_transparency): #if 0, unused.
4545 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
4546
4547 * lex.c (set_vardecl_interface_info): Make static.
4548 * cp-tree.h (set_vardecl_interface_info): Delete decl.
4549
4550 * call.c (find_scoped_type): Make static.
4551 * cp-tree.h (find_scoped_type): Delete decl.
4552
4553 * search.c (convert_pointer_to_vbase): Make static.
4554 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
4555
4556 * decl.c (const_ptr_type_node): Likewise.
4557 * cp-tree.h (const_ptr_type_node): Delete decl.
4558
4559 * typeck.c (common_base_type): Make static.
4560 * cp-tree.h (common_base_types): Delete erroneous decl.
4561
4562 * pt.c (classtype_mangled_name): Make static.
4563 * cp-tree.h (classtype_mangled_name): Delete decl.
4564
4565 * lex.c (check_newline): Make static.
4566 * cp-tree.h (check_newline): Delete decl.
4567
4568 * typeck.c (build_x_array_ref): Delete fn, same idea as
4569 grok_array_decl.
4570 * cp-tree.h (build_x_array_ref): Delete decl.
4571
4572 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
4573 copy_lang_decl.
4574 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
4575
4576 * class.c (build_vtable_entry): Make static.
4577 * cp-tree.h (build_vtable_entry): Delete decl.
4578
4579 * class.c (build_vbase_pointer): Make static.
4580 * cp-tree.h (build_vbase_pointer): Delete decl.
4581
4582 * sig.c (build_sptr_ref): Add forward decl and make static.
4583 * cp-tree.h (build_sptr_ref): Delete decl.
4584
4585 * call.c (build_new_method_call): Add forward decl and make static.
4586 * cp-tree.h (build_new_method_call): Delete decl.
4587
4588 * call.c (build_object_call): Make static.
4589 * class.c (check_for_override, complete_type_p, mark_overriders):
4590 Likewise.
4591 * decl.c (cp_function_chain): Likewise.
4592 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
4593 Likewise.
4594 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
4595 Likewise.
4596 * tree.c (build_cplus_array_type_1): Likewise.
4597 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
4598 (comp_target_parms): Likewise.
4599
4600 * init.c (build_builtin_call): Make static.
4601 * cp-tree.h (build_builtin_call): Delete decl.
4602
4603 * typeck.c (binary_op_error): Delete decl.
4604 * cp-tree.h (binary_op_error): Likewise.
4605
4606Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4607
4608 * call.c (build_method_call): Compare against error_mark_node
4609 directly, rather than the ERROR_MARK tree code.
4610 * cvt.c (cp_convert): Likewise.
4611 * decl.c (print_binding_level): Likewise.
4612 (duplicate_decls): Likewise.
4613 (grokdeclarator): Likewise.
4614 (grokdeclarator): Likewise.
4615 * init.c (expand_aggr_init_1): Likewise.
4616 (decl_constant_value): Likewise.
4617 * method.c (build_opfncall): Likewise.
4618 (hack_identifier): Likewise.
4619 * typeck.c (build_modify_expr): Likewise.
4620
4621 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
4622
4623Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4624
4625 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
4626
4627 * pt.c (coerce_template_parms): Add new error message.
4628
4629 * method.c (build_overload_value): Implement name mangling for
4630 floating-point template arguments.
4631
4632 * method.c (build_overload_int, icat, dicat): Fix mangling of template
4633 arguments whose absolute value doesn't fit in a signed word.
4634
4635Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4636
4637 * friend.c: New file; put all of the friend stuff in here.
4638 * init.c: Instead of here.
4639 * Makefile.in (CXX_OBJS): Add friend.o.
4640 (friend.o): Add dependencies.
4641 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
4642
4643Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
4644
4645 * call.c (build_scoped_method_call): Complain if the scope isn't a
eb66be0e 4646 base.
bd6dd845
MS
4647
4648Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4649
4650 * parse.y (left_curly): Don't crash on erroneous type.
4651
4652 * init.c (build_delete): Fix type of ref.
4653
4654Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
4655
4656 * search.c (get_vbase_1): Renamed from get_vbase.
4657 (get_vbase): Wrapper, now non-static.
4658 (convert_pointer_to_vbase): Now static.
4659
4660 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
4661 * init.c (build_delete): Pass one.
4662 (build_partial_cleanup_for): Use build_scoped_method_call.
4663 * decl.c (finish_function): Pass a binfo.
4664
4665Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4666
4667 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
4668
4669 * typeck.c (build_c_cast): Lose other reference to flag.
4670
4671 * call.c (build_field_call): Don't look for [cd]tor_identifier.
4672 * decl2.c (delete_sanity): Remove meaningless use of
eb66be0e 4673 LOOKUP_HAS_IN_CHARGE.
bd6dd845 4674 * decl.c (finish_function): Use build_scoped_method_call instead
eb66be0e 4675 of build_delete for running vbase dtors.
bd6dd845 4676 * init.c (build_delete): Call overload resolution code instead of
eb66be0e 4677 duplicating it badly.
bd6dd845 4678
2ba25f50
MS
4679Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
4680
4681 * call.c (build_over_call): Call mark_used before trying to elide
4682 the call.
4683
4684 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
4685
4686Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4687
4688 * typeck.c (build_modify_expr): Always pedwarn for a cast to
4689 non-reference used as an lvalue.
4690
4691Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
4692
4693 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
4694
4695Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
4696
4697 * parse.y (handler): Fix template typo.
4698
4699Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4700
4701 * error.c (lang_decl_name): New fn.
4702 * tree.c (lang_printable_name): Use it.
4703
4704Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
4705
4706 * g++spec.c: Include config.h so that we can catch bzero #defines
4707 from the config file.
4708
e9f32eb5
MS
4709Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
4710
4711 * new1.cc: Include a declaration for malloc, to avoid warning, and
eb66be0e
MS
4712 avoid lossing on systems that require one (ones that define malloc
4713 in xm.h).
e9f32eb5
MS
4714
4715Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4716
4717 * decl2.c (max_tinst_depth): New variable.
4718 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
4719 option.
4720 * pt.c (max_tinst_depth): Variable moved.
4721 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
4722 as legal.
4723
4724Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
4725
4726 * decl.c (xref_basetypes): Allow a base class that depends on
eb66be0e 4727 template parms to be incomplete.
e9f32eb5
MS
4728
4729 * decl2.c (build_expr_from_tree): Support typeid(type).
4730 * rtti.c (get_typeid): Support templates.
4731 (expand_si_desc, expand_class_desc): Fix string length.
4732 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
4733
312e7d50
JM
4734Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
4735
4736 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
4737
4738 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
4739
4740Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
4741
4742 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
eb66be0e
MS
4743 smashes together template and non-template decls of the same
4744 signature.
312e7d50 4745
824b9a4c
MS
4746Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
4747
824b9a4c
MS
4748 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
4749
4750Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4751
4752 * decl.c (duplicate_decls): Next route, pedwarn about different
4753 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
4754
4755Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4756
4757 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
4758 (struct lang_type): Delete has_default_implementation member.
4759 Increase dummy to 21.
4760 * decl.c (start_method): Delete usage.
4761
4762 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
4763 store_after_parms, start_decl_1, auto_function): Add decls.
4764 (get_arglist_len_in_bytes, declare_implicit_exception,
4765 have_exceptions_p, make_type_decl, typedecl_for_tag,
4766 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
4767 build_component_type_expr, cplus_exception_name,
4768 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
4769 * call.c (build_this): Make static.
4770 (is_complete): Likewise.
4771 (implicit_conversion): Likewise.
4772 (reference_binding): Likewise.
4773 (standard_conversion): Likewise.
4774 (strip_top_quals): Likewise.
4775 (non_reference): Likewise.
4776 (build_conv): Likewise.
4777 (user_harshness): Likewise.
4778 (rank_for_ideal): Likewise.
4779 * decl.c (start_decl_1): Delete forward decl.
4780 (push_decl_level): Make static.
4781 (resume_binding_level): Make static.
4782 (namespace_bindings_p): Make static.
4783 (declare_namespace_level): Make static.
4784 (lookup_name_real): Make static.
4785 (duplicate_decls): Make static. Take register off NEWDECL and
4786 OLDDECL parm decls.
4787 * decl2.c (get_sentry): Make static.
4788 (temp_name_p): Delete fn.
4789 * except.c (auto_function): Delete decl.
4790 * lex.c (handle_{cp,sysv}_pragma): Make static.
4791 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
4792 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
4793 * pt.c (tsubst_expr_values): Make static.
4794 * rtti.c (combine_strings): Delete decl.
4795
4796Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
4797
4798 * pt.c (push_template_decl): Handle getting a typedef.
4799
4800 * call.c (build_new_function_call): Complain about void arg.
4801
4802Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4803
4804 * decl.c (duplicate_decls): Give pedwarn of different exceptions
4805 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
4806
4807Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
4808
4809 * except.c (expand_throw): Don't expand the cleanup tree here,
eb66be0e
MS
4810 since we are not going to write the rtl out. Fixes problem with
4811 -g -O on SPARC.
824b9a4c
MS
4812
4813Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
4814
4815 * Make-lang.in: Add $(exeext) as necessary.
4816
4817Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
4818
4819 * parse.y (handler_seq): Must have at least one catch clause.
4820
4821Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
4822
4823 * call.c (add_builtin_candidate): Restore ?: hack.
4824
4825 * decl.c (grok_op_properties): More warnings.
4826
4827Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4828
4829 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
4830 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
4831
4832 * decl.c (duplicate_decls): Scale back to a warning, and only do
4833 'em if -pedantic.
4834
4835Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
4836
4837 * decl.c (duplicate_decls): pedwarn mismatched exception
eb66be0e 4838 specifications.
824b9a4c
MS
4839
4840Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
4841
4842 * call.c (build_new_method_call): Don't display the invisible
eb66be0e 4843 argument for controlling virtual bases.
824b9a4c
MS
4844
4845Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
4846
4847 * new: Add nothrow new and delete, bad_alloc and throw specifications
4848 for delete.
4849 * decl.c (init_decl_processing): Add throw specification for delete.
4850 * new.cc (nothrow): Define.
4851 * lex.c (real_yylex): Removing warning that throw and friends are
4852 keywords.
4853 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
4854 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
4855 * Make-lang.in: Add new{1,2}.{cc,o}.
4856
4857Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
4858
4859 * lex.c (cons_up_default_function): Fix return type of synth op=.
4860
4861 * init.c (emit_base_init): Add warnings for uninitialized members
eb66be0e 4862 and bases.
824b9a4c
MS
4863
4864 * decl.c (xref_basetypes): Add warning for non-polymorphic type
eb66be0e 4865 with destructor used as base type.
824b9a4c
MS
4866
4867 * decl.c (grok_op_properties): Add warning for op= returning void.
4868 * typeck.c (c_expand_return): Add warning for op= returning anything
4869 other than *this.
4870
4871 * class.c (finish_struct_1): Add warning for class with pointers
eb66be0e 4872 but not copy ctor or copy op=.
824b9a4c
MS
4873
4874 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
4875 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
4876 (instantiate_template): If -fexternal-templates, add this
eb66be0e 4877 instantiation to pending_templates.
824b9a4c
MS
4878
4879 * decl2.c (copy_assignment_arg_p): Disable old hack to support
eb66be0e 4880 Booch components.
824b9a4c
MS
4881
4882Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
4883
4884 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
4885
de22184b
MS
4886Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
4887
4888 * call.c (standard_conversion): Handle getting references. Tack
eb66be0e 4889 on RVALUE_CONV here. Do it for non-class types, too.
de22184b
MS
4890 (reference_binding): Pass references to standard_conversion.
4891 (implicit_conversion): Likewise.
4892 (add_builtin_candidate): Disable one ?: kludge.
4893 (convert_like): Handle RVALUE_CONVs for non-class types.
4894 (joust): Disable the other ?: kludge.
4895
4896Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4897
4898 * decl.c (init_decl_processing): Add code to build up common
4899 function types beforehand, to avoid creation then removal of
4900 things already in the hash table.
4901
4902Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
4903
4904 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
eb66be0e 4905 the arguments.
de22184b
MS
4906
4907 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
eb66be0e 4908 current_template_parms.
de22184b
MS
4909
4910Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
4911
4912 * search.c (lookup_field): Don't return a function, check want_type.
4913
4914Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4915
4916 * init.c (build_new): Make sure PLACEMENT has a type.
4917
4918Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
4919
4920 * init.c (build_new): Support new (nothrow).
4921
4922Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
4923
4924 * pt.c (instantiate_decl): Also do push_to_top_level before setting
4925 up DECL_INITIAL.
4926
4927 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
4928 * pt.c (tsubst): Defer instantiation of default args.
4929 * call.c (build_over_call): Until here.
4930
4931Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4932
4933 * search.c (lookup_field): Make sure we have an
4934 IDENTIFIER_CLASS_VALUE before we try to return it.
4935
4936Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
4937
4938 * call.c (build_method_call): Delete unused var PARM.
4939 (build_overload_call_real): Likewise.
4940 (build_object_call): Delete unused var P.
4941 (build_new_op): Likewise.
4942 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
4943 var definitions, which are never used.
4944 (shadow_tag): Delete unused var FN.
4945 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
4946 * init.c (build_new): Delete unused var ALLOC_TEMP.
4947 * method.c (hack_identifier): Delete unused var CONTEXT.
4948 (do_build_copy_constructor): Delete unused var NAME.
4949 (synthesize_method): Delete unused var BASE.
4950 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
4951 * rtti.c (build_headof): Delete unused var VPTR.
4952 (get_typeid): Delete unused var T.
4953 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
4954 and ORIG_OP2.
4955 (build_ptrmemfunc): Delete unused vars U and NINDEX.
4956 * typeck2.c (build_functional_cast): Delete unused var BINFO.
4957
4958Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
4959
4960 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
4961 things in a type being defined.
4962 * decl.c (finish_enum): Reverse the values so that they are in
4963 the correct order.
4964
4965 * pt.c (instantiate_class_template): Don't initialize
eb66be0e 4966 BINFO_BASETYPES until the vector is filled out.
de22184b
MS
4967 (unify): Don't abort on conflicting bindings, just fail.
4968 (instantiate_decl): Do push_tinst_level before any tsubsting.
4969
4970 * method.c (build_overload_value): Handle getting a
eb66be0e 4971 TEMPLATE_CONST_PARM for a pointer.
de22184b
MS
4972
4973Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
4974
4975 * init.c (expand_member_init): Don't give 'not a base' error for
eb66be0e 4976 templates.
de22184b
MS
4977
4978 * pt.c (instantiate_decl): Call import_export_decl later.
4979
4980 * pt.c (instantiate_class_template): Return a value.
4981
4982 * parse.y (extension): New rule for __extension__.
4983 (extdef, unary_expr, decl, component_decl): Use it.
4984
4985Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
4986
4987 * class.c (base_binfo): Remove unused base_has_virtual member.
4988 (finish_base_struct): Likewise.
4989 (finish_struct_1): Likewise.
4990
4991Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
4992
4993 * search.c (expand_upcast_fixups): Fix bogus code generation
4994 problem where the generated code uses the wrong index into the
4995 runtime built vtable on the stack. Old code could clobber random
4996 stack values.
4997
4998Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
4999
5000 * init.c (perform_member_init): Make sure the partial EH cleanups
eb66be0e 5001 live on the function_obstack.
de22184b 5002
f7da6097
MS
5003Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
5004
5005 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
5006 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
5007
5008Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
5009
5010 * decl.c (grokvardecl): Avoid ANSI style initialization.
5011
5012Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
5013
5014 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
5015
5016Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
5017
5018 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
5019
1bf2b2d2
BK
5020Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5021
5022 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
5023 arguments we compare against. Start the count of I at 1, not 0,
5024 since argv[0] is still the command.
5025
f7da6097
MS
5026Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
5027
5028 * lang-specs.h: Accept .cp as an C++ extension.
5029
d2e5ee5c
MS
5030Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5031
5032 * cp-tree.h (ptr_reasonably_similar): Add decl.
5033
5034Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5035
5036 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
5037 pointer. New local SPECBITS with the parm's value.
5038 (grokdeclarator): Pass &specbits down.
5039
5040 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
5041 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
5042
5043 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
5044 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
5045
5046 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
5047 not an error_mark_node.
5048
5049Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5050
5051 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
5052 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
5053
5054Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5055
5056 * decl.c (grokdeclarator): When giving an anonymous struct a name,
5057 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
5058 not affected).
5059
5060 * typeck2.c (build_m_component_ref): If component is a pointer
5061 to data member, resolve the OFFSET_REF now.
5062
5063 * call.c (convert_like): Don't go into infinite recursion.
5064
5065 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
5066
5067 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
5068 * tree.c (layout_basetypes): And on the vbase ptr.
5069
5070Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5071
5072 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
5073 CHAR_TYPE_SIZE so bool is always the same size as another type.
5074
5075 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
5076
5077Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
5078
5079 * decl2.c (grok_x_components): Remove synthesized methods from
eb66be0e
MS
5080 TYPE_METHODS of an anonymous union, complain about member
5081 functions.
d2e5ee5c
MS
5082 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
5083 anonymous unions.
5084 (finish_function): Just clear the DECL_RTL of our arguments.
5085
5086Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5087
5088 * decl2.c (finish_file): Emit DWARF debugging info for static data
5089 members.
5090
5091 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
5092
5093Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
5094
5095 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
eb66be0e 5096 IDENTIFIER_NODE.
d2e5ee5c
MS
5097
5098Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5099
5100 * Make-lang.in (g++-cross$(exeext)): Fix typo.
5101
5102Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5103
5104 Make the g++ driver now be a standalone program, rather than one
5105 that tries to run the gcc driver after munging up the options.
5106 * Make-lang.in (g++.c, g++spec.o): New rules.
5107 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
5108 added.
5109 (g++$(exeext)): New rule, based on xgcc rule.
5110 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
5111 * g++spec.c: New file.
5112 * g++.c: Removed file.
5113
5114Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
5115
5116 * cvt.c (build_up_reference): Arrange for any temporary values
5117 that have been keep in registers until now to be put into memory.
5118
faf5394a 5119Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9a3b49ac 5120
faf5394a
MS
5121 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
5122 that make -j3 bootstrap works better.
9a3b49ac 5123
faf5394a
MS
5124Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
5125
5126 * decl.c (pushtag): Do pushdecl for anon tags.
5127
5128Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
5129
5130 * typeck.c (c_expand_return): Fix logic.
5131 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
5132
faf5394a
MS
5133Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
5134
5135 * g++.c (main): Make sure arglist has a final NULL entry. Add
eb66be0e
MS
5136 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
5137 stdin/stdout of the invoked program are redirected to
5138 nowheresville.
faf5394a
MS
5139
5140Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5141
5142 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
5143
5144Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
5145
5146 * init.c (resolve_offset_ref): Handle obj.vfn better.
5147 * typeck.c (build_component_ref): Set TREE_TYPE on result from
5148 build_vfn_ref.
5149
5150Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
5151
5152 * typeck.c (convert_for_assignment): Also handle anachronistic
5153 implicit conversions from (::*)() to cv void*.
5154 * cvt.c (cp_convert_to_pointer): Likewise.
5155
5156Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5157
5158 * lex.c (handle_cp_pragma): Fix bogus warning.
5159
5160Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
5161
5162 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
eb66be0e 5163 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
faf5394a
MS
5164
5165Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5166
5167 * class.c (finish_struct_1): Support DWARF2_DEBUG.
5168 * search.c (dfs_debug_mark): Likewise.
5169 * decl2.c (finish_vtable_vardecl): Likewise.
5170 * decl.c (pushtag, finish_enum): Likewise.
5171 * lex.c (check_newline): Use debug_* instead of calling *out
eb66be0e 5172 functions directly.
faf5394a
MS
5173
5174Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5175
5176 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
5177 on some picky hosts.
5178
5179Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5180
5181 * class.c (finish_struct_1): A class has a non-trivial copy
eb66be0e 5182 constructor if it has virtual functions.
faf5394a
MS
5183
5184 * cvt.c (cp_convert): Always call a constructor.
5185
5186 * call.c (reference_binding): Still tack on a REF_BIND
eb66be0e 5187 for bad conversions.
faf5394a
MS
5188 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
5189
5190 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
5191 (c_expand_return): Likewise.
5192 * typeck2.c (digest_init): Likewise for { }.
5193 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
5194 * cvt.c (cp_convert): Handle failure better.
5195
5196Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5197
5198 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
5199 of GCC be path-relative.
5200
5201Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5202
5203 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
5204 it does need choose-temp.o and pexecute.o.
5205
5206Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5207
5208 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
5209 that we still use it.
5210 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
5211
5212Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5213
5214 * init.c (expand_default_init): Avoid calling constructors to
5215 initialize reference temps.
5216
5217 * cvt.c (convert_to_reference): Fix.
5218
5219Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5220
5221 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
5222 (convert_to_reference): Likewise.
5223 * typeck.c (convert_for_initialization): Likewise.
5224 * init.c (expand_default_init): Likewise.
5225 (expand_aggr_init_1): Likewise.
5226 * cp-tree.h (CONV_NONCONVERTING): Lose.
5227 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
5228 * *.c: Adjust.
5229 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
5230
5231Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
5232
5233 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
5234
5235Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5236
5237 * init.c (expand_aggr_init_1): Don't crash on non-constructor
5238 TARGET_EXPR.
5239
5240Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5241
5242 * g++.c: Include gansidecl.h.
5243 (VPROTO, PVPROTO, VA_START): Delete.
5244 (choose_temp_base_try, choose_temp_base, perror_exec,
5245 run_dos) [__MSDOS__]: Delete fns.
5246 (pfatal_with_name): Delete fn.
5247 (temp_filename): Declare like in gcc.c.
5248 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
5249 (error_count, signal_count): Define.
5250 (error): Delete both definitions.
5251 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
5252 (pfatal_pexecute): Add fn from gcc.c.
5253 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
5254 code to use the pexecute stuff also used by gcc.c.
5255 (MIN_FATAL_STATUS): Define.
5256 * Make-lang.in (g++): Add dependency on and linking with
5257 choose-temp.o and pexecute.o.
5258
5259 * cp-tree.h: Include gansidecl.h.
5260 (STDIO_PROTO): Delete #undef/#define.
5261 * cvt.c (NULL): Delete #undef/#define.
5262 * expr.c (NULL): Likewise.
5263 * init.c (NULL): Likewise.
5264 * rtti.c (NULL): Likewise.
5265 * xref.c (NULL): Likewise.
5266
5267 * cp-tree.h (build_user_type_conversion): Add prototype.
5268 * call.c (build_user_type_conversion): Delete prototype. Correct
5269 decl of FLAGS arg to be an int.
5270 * cvt.c (build_user_type_conversion): Likewise.
5271
5272Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
5273
5274 * cp-tree.def: Add TRY_BLOCK and HANDLER.
5275 * except.c (expand_start_catch_block): Support templates.
5276 * parse.y (try_block, handler_seq): Likewise.
5277 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9a3b49ac
MS
5278
5279Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
5280
5281 * pt.c (current_template_args): New fn.
5282 (push_template_decl): Use it.
5283 * decl.c (grokdeclarator): Use it.
5284
5285 * decl2.c (build_expr_from_tree): Dereference ref vars.
5286
5287 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
5288 the decl-specifier-seq.
5289
5290 * decl.c (grok_op_properties): Don't force the type of a conversion
5291 op to be complete. Don't warn about converting to the same type
5292 for template instantiations.
5293
5294 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
5295 methods.
5296
5297Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
5298
5299 * typeck.c (get_delta_difference): Remove previous bogusness.
5300 Don't give errors if force is set.
5301
5302Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5303
5304 * decl2.c (finish_file): Don't emit debug info.
d2e5ee5c 5305 * decl.c (pushdecl): Lose obsolete code.
9a3b49ac 5306 (grokdeclarator): Still do the long long thing after complaining.
d2e5ee5c
MS
5307 * search.c (note_debug_info_needed): Don't do anything if we're in a
5308 template.
9a3b49ac 5309 * method.c (synthesize_method): For non-local classes,
eb66be0e 5310 push_to_top_level first.
9a3b49ac
MS
5311
5312Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
5313
5314 * typeck.c (get_delta_difference): Add no_error parameter.
5315 (build_ptrmemfunc): Call get_delta_difference with no_error set;
eb66be0e
MS
5316 we don't want error messages when converting unrelated
5317 pointer-to-member functions.
9a3b49ac
MS
5318
5319Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
5320
5321 * error.c (dump_expr): Improve the wording on error messages that
5322 involve pointer to member functions.
5323
5324Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
5325
5326 * cvt.c (cp_convert_to_pointer): Move code for conversions from
eb66be0e 5327 (::*)() to void* or (*)() up a bit, so that we can convert from
9a3b49ac
MS
5328 METHOD_TYPEs as well.
5329
5330Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5331
5332 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
5333 There are no 'member' types.
5334 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
5335 (build_x_typeid): Handle errors.
5336
5337Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
5338
5339 * typeck.c (convert_for_assignment): Handle anachronistic implicit
5340 conversions from (::*)() to void* or (*)().
5341 * cvt.c (cp_convert_to_pointer): Likewise.
5342 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
5343 conversions from here.
5344 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
5345 * lang-options.h: Likewise.
5346 * decl2.c (warn_pmf2ptr): Define.
5347 * cp-tree.h: Declare it.
5348 * typeck2.c (digest_init): Allow pmfs down into
5349 convert_for_initialization.
5350
5351Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
5352
5353 * typeck.c (c_expand_return): Fix for returning overloaded fn.
5354
5355Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5356
5357 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
5358 * decl.c (grok_reference_init): Pass DIRECT_BIND.
5359 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
eb66be0e 5360 DIRECT_BIND.
9a3b49ac
MS
5361 * call.c (convert_like): Don't pass INDIRECT_BIND.
5362 * typeck.c (convert_arguments): Likewise.
5363 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
5364
5365Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
5366
5367 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
eb66be0e 5368 similar code in build_up_ref.
9a3b49ac
MS
5369 * cvt.c (build_up_reference): Drastically simplify.
5370
691c003d
MS
5371Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
5372
5373 * typeck.c (signed_or_unsigned_type): If the given type already
5374 as the correct signedness, then just return it.
5375
eb66be0e
MS
5376 * typeck.c ({un,}signed_type): If can't do anything, call
5377 signed_or_unsigned_type.
691c003d
MS
5378
5379Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
5380
5381 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
5382 current_class_type is NULL.
5383
5384Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
5385
5386 * class.c (finish_struct_1): Avoid empty structs by adding a field
eb66be0e 5387 so layout_type gets the mode right.
691c003d
MS
5388
5389 * typeck.c (c_expand_return): Drastically simplify.
5390
5391Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5392
5393 * typeck.c (decay_conversion): Handle overloaded methods.
5394
5395Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
5396
5397 * call.c (build_over_call): A TARGET_EXPR has side-effects.
5398
f49422da
MS
5399Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
5400
5401 * cvt.c (convert_to_pointer_force): Add code to support pointer to
eb66be0e 5402 member function to pointer to function conversions.
f49422da 5403 * init.c (resolve_offset_ref): Add code to allow faked up objects,
eb66be0e
MS
5404 ignoring them if they are not used, and giving an error, if they
5405 are needed.
f49422da 5406 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
eb66be0e
MS
5407 code, and so that we can give an error, if we needed an object,
5408 and one was not provided.
f49422da 5409 (build_c_cast): Don't call default_conversion when we want to
eb66be0e 5410 convert to pointer to function from a METHOD_TYPE.
f49422da
MS
5411
5412Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
5413
5414 * Make-lang.in (cplib2.ready): Fix logic.
5415
5416 * decl.c (shadow_tag): Only complain about non-artificial function
eb66be0e 5417 members.
f49422da
MS
5418
5419 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
5420
5421Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
5422
5423 * expr.c (cplus_expand_expr): Pre-tweak call_target like
eb66be0e 5424 expand_inline_function would.
f49422da
MS
5425
5426 * pt.c (mark_decl_instantiated): If extern_p, call
eb66be0e 5427 mark_inline_for_output.
f49422da 5428
3d4683cb
MS
5429Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
5430
5431 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
5432 pmd conversions.
5433
5434 * typeck.c (get_delta_difference): Fix wording, as we can be used
5435 for pointer to data members.
5436
5437Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
5438
5439 * pt.c (tsubst): If the function decl isn't a member of this
eb66be0e
MS
5440 template, return a copy of the decl (including copying the
5441 lang-specific part) so we don't hose ourselves later.
3d4683cb
MS
5442
5443Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5444
5445 * class.c (finish_struct): Remove DWARF-specific tag handling.
5446 * decl.c (pushtag): Likewise.
5447 (finish_function): Always clear DECL_ARGUMENTS on function decls with
5448 no saved RTX.
5449 * decl2.c (finish_file): Emit DWARF debugging info for static data
5450 members.
5451
5452Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
5453
5454 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
5455 isn't the same as the new one before we whack it.
5456
5457Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
5458
5459 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
eb66be0e
MS
5460 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
5461 warn_traditional and warn_strict_prototypes; remove ancient
5462 'overload' code; remove references to flag_traditional.
3d4683cb 5463
5156628f
MS
5464Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
5465
5466 * input.c (sub_getch): Handle 8-bit characters in string literals.
5467
5468Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
5469
5470 * tree.c (mapcar): Handle CONSTRUCTORs.
5471 (copy_to_permanent): Handle expression_obstack properly.
5472
5473 * Make-lang.in (cplib2.txt): Also depend on the headers.
5474
5475 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
eb66be0e 5476 INT_TYPE_SIZE.
5156628f
MS
5477 (expand_class_desc): Use USItype for offset field.
5478 * tinfo.h (struct __class_type_info): Likewise.
5479
5480 * method.c (build_overload_int): TYPE_PRECISION should be applied
eb66be0e 5481 to types.
5156628f
MS
5482
5483Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
5484
5485 * call.c (build_new_op): A COND_EXPR involving void must be a
5486 builtin.
5487
5488Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5489
5490 * typeck.c (build_x_component_ref): New fn.
5491 (build_object_ref): Use it.
5492 * parse.y (primary): Use it.
5493 * decl2.c (build_expr_from_tree): Use it.
5494 * cp-tree.h: Declare it.
5495
5496 * decl.c (start_decl): variable-sized arrays cannot be initialized.
5497 * error.c (dump_type_suffix): Handle variable arrays.
5498
5499Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5500
5501 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
5502
5503Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5504
5505 * decl.c (lookup_name_real): Don't try to look up anything in a
eb66be0e 5506 TYPENAME_TYPE.
5156628f
MS
5507
5508 * tinfo2.cc (__throw_type_match_rtti): Oops.
5509
5510Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5511
5512 * Make-lang.in (exception.o): Use -fno-PIC for now.
5513
5514Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
5515
5516 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
eb66be0e 5517 calling them.
5156628f
MS
5518 (get_tinfo_fn_dynamic): Extracted from build_typeid.
5519 * tinfo2.cc (__dynamic_cast): Adjust.
5520
5521 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
5522 (build_x_typeid): Likewise.
5523
5524 * parse.y: Call build_x_typeid instead of build_typeid.
5525 * cp-tree.def: Add TYPEID_EXPR.
5526 * pt.c (tsubst_copy): Handle typeid.
5527 * decl2.c (build_expr_from_tree): Likewise.
5528 * rtti.c (build_x_typeid): Throw bad_typeid from here.
5529 (build_typeid): Not here.
5530 * cp-tree.h: Declare build_x_typeid.
5531
5532Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
5533
5534 * call.c (convert_like): Pull out constant values.
5535
5536 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
5537
5538Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5539
5540 * decl.c (init_decl_processing): Create short int types before
5541 creating size_t in case a machine description needs to use
5542 unsigned short for size_t.
5543
5544Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5545
5546 * Make-lang.in (exception.o): Turn off pic.
5547
5548 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
5549 type, multi-level ptr conversions.
5550
5551 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
5552 (throw_bad_cast): Use it.
5553 (throw_bad_typeid): New fn.
5554 (build_typeid): Throw bad_typeid as needed.
5555 Use build_call.
5556 (synthesize_tinfo_fn): Handle functions and arrays before checking
5557 for cv-quals.
5558
5559 * Remove .h from standard C++ headers, add new.h, move into inc
eb66be0e 5560 subdirectory.
5156628f
MS
5561
5562 * exception*: Remove pointer from object, constructors. Add
eb66be0e
MS
5563 default exception::what that uses type_info::name. Add
5564 __throw_bad_typeid.
5156628f
MS
5565
5566 * init.c (build_new): Don't add a cookie to new (void *) T[2].
5567
5568Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
5569
5570 * Make-lang.in: Building C++ code depends on cc1plus.
5571
5572Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5573
5574 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
5575 a HOST_WIDE_INT, not a tree.
5576
5577Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5578
5579 * exception.cc: Don't include <stdlib.h>.
5580
5581 * Make-lang.in (c++.clean): Remove cplib2.*.
5582
5583Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
5584
5585 * parse.y (component_decl_1, component_costructor_declarator case):
5586 Pass attributes/prefix_attributes in tree list.
5587
5588Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
5589
5590 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
5591
5592Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5593
5594 * lex.c (do_identifier): Don't do deferred lookup in a template
eb66be0e 5595 header.
5156628f
MS
5596
5597 * typeck2.c (store_init_value): Oops.
5598
5599 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
5600 New files for C++ lang-support library.
5601 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
5602 (CXX_LIB2FUNCS): Define.
5603 And rules for building the C++ lang-support code.
5604 * config-lang.in (headers): Define.
5605 (lib2funcs): Define.
5606
5607Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5608
5609 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
5610 digest_init.
5611 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
5612 * typeck2.c (store_init_value): Check for initializing pmf with { }
5613 here.
5614 (process_init_constructor): Not here.
5615
5616Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5617
5618 * pt.c (begin_template_parm_list): Increment
eb66be0e 5619 processing_template_decl here.
5156628f
MS
5620 (end_template_parm_list): Not here.
5621 (process_template_parm): No need to add 1 to it now.
5622 * *.c: Use processing_template_decl instead of current_template_parms
5623 to check for being in a template.
5624
5625 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
5626 (tsubst_copy): Handle CONSTRUCTOR.
5627 (instantiate_decl): Set up context properly for variables.
5628 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
5629 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
5630
5631Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5632
5633 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
5634
7fcdf4c2
MS
5635Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
5636
5637 * method.c (make_thunk): Call comdat_linkage before setting the
eb66be0e 5638 TREE_CODE.
7fcdf4c2
MS
5639
5640 * decl2.c (comdat_linkage): Use make_decl_one_only.
5641 (import_export_decl): Likewise.
5642 * decl.c (init_decl_processing): Check supports_one_only instead of
5643 SUPPORTS_WEAK.
5644
5645Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
5646
5647 * decl2.c (grokfield): Tighten checking for access decls.
5648
5649 * decl.c (make_typename_type): Resolve references to
eb66be0e 5650 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
7fcdf4c2 5651 (lookup_name_real): Types that depend on a template parameter get
eb66be0e 5652 an implicit 'typename' unless they're in the current scope.
7fcdf4c2 5653 (start_decl_1): We don't care about incomplete types that depend
eb66be0e 5654 on a template parm.
7fcdf4c2 5655 (grokdeclarator): Resolve 'typename's in the type specifier that
eb66be0e 5656 refer to members of the current scope.
7fcdf4c2
MS
5657
5658 * call.c (build_over_call): Remove 'inline called before
eb66be0e 5659 definition' diagnostic.
7fcdf4c2
MS
5660 (build_method_call): Likewise.
5661 * decl.c (duplicate_decls): Downgrade 'used before declared
eb66be0e 5662 inline' to a warning, only with -Winline.
7fcdf4c2
MS
5663
5664Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
5665
5666 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
5667
c11b6f21
MS
5668Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5669
5670 * call.c (build_method_call): When calling a signature
5671 default implementation, as in other cases, let instance_ptr simply
5672 be instance.
5673
5674Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
5675
5676 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
5677
5678Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
5679
5680 * except.c (expand_start_catch_block): Add a pushlevel so that -g
eb66be0e 5681 works on hppa and SPARC.
c11b6f21
MS
5682
5683Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5684
5685 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
5686
5687Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5688
5689 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
5690 before testing whether it's a signature.
5691
5692Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
5693
5694 * call.c (build_new_method_call): Don't complain about signature
5695 pointers and references not being an aggr type.
5696 (build_this): If a signature pointer or reference was passed in,
5697 just return it.
5698 (build_new_method_call): If instance is a signature pointer, set
5699 basetype to the signature type of instance.
5700 * sig.c (build_signature_method_call): Deleted basetype and
5701 instance parameters, they can be found as the DECL_CONTEXT of
5702 function and as the first argument passed in.
5703 * cp-tree.h: Changed declaration of build_signature_method_call.
5704 * call.c (build_method_call): Deleted first two arguments in call
5705 of build_signature_method_call.
5706 (build_over_call): Added call to build_signature_method_call.
5707
5708Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
5709
5710 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
eb66be0e 5711 target_expr.
c11b6f21
MS
5712
5713Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5714
5715 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
5716
9ffa2541
BM
5717Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
5718
5719 * except.c (expand_start_try_stmts): Move to except.c in the backend.
5720 (expand_end_try_stmts): Remove.
5721
5722 * init.c (perform_member_init): Use add_partial_entry () instead
5723 of directly manipulating lists.
5724 (emit_base_init): Ditto.
5725
c11b6f21
MS
5726Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
5727
5728 * except.c (expand_exception_blocks): Always make sure USE and
eb66be0e
MS
5729 CLOBBER insns that came at the end still do, the backend relies
5730 upon this.
c11b6f21
MS
5731
5732Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
5733
5734 * call.c (build_over_call): We can only use a TARGET_EXPR of the
eb66be0e 5735 right type.
c11b6f21
MS
5736
5737Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
5738
5739 * cvt.c (convert_to_reference): Revert last change, don't complain
eb66be0e 5740 about temp without target decl.
c11b6f21
MS
5741
5742Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
5743
5744 * decl.c (grokdeclarator): Don't core dump when void() is given.
5745
5746Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
5747
5748 * decl.c (copy_args_p): Don't crash.
5749
5750Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
5751
5752 * pt.c (tsubst): And support template args inside the exception
eb66be0e 5753 specification.
c11b6f21
MS
5754
5755 * pt.c (tsubst): Add support for exception specifications in
eb66be0e 5756 template functions.
c11b6f21
MS
5757
5758Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
5759
5760 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
eb66be0e 5761 fields now.
c11b6f21
MS
5762 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
5763 (start_function): Likewise.
5764 (start_method): Likewise.
5765 (grokfield): Likewise.
5766 (make_call_declarator): Add throw spec parameter.
5767 (set_quals_and_spec): Add routine.
5768 * lex.c (set_quals_and_spec): Likewise.
5769 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
5770 * decl.c (shadow_tag): Eliminate the throw spec parameter to
eb66be0e 5771 grokdeclarator.
c11b6f21
MS
5772 (groktypename): Likewise.
5773 (start_decl): Eliminate the throw spec parameter. Eliminate the
eb66be0e
MS
5774 throw spec parameter to grokdeclarator. Eliminate the throw spec
5775 field in DECL_STMT.
c11b6f21
MS
5776 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
5777 (grokfndecl): Remove useless set of raises.
5778 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
eb66be0e
MS
5779 the throw spec parameter to start_decl. Pull the throw spec out
5780 of the call declarator.
c11b6f21
MS
5781 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
5782 (start_function): Eliminate the throw spec parameter. Eliminate
eb66be0e 5783 the throw spec parameter to grokdeclarator.
c11b6f21
MS
5784 (start_method): Likewise.
5785 * decl2.c (grokfield): Likewise.
5786 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
5787 (grokoptypename): Likewise.
5788 (finish_file): Eliminate the throw spec parameter to
eb66be0e 5789 start_function. Add throw spec to make_call_declarator.
c11b6f21 5790 * except.c (init_exception_processing): Add throw spec to
eb66be0e
MS
5791 make_call_declarator. Eliminate the throw spec parameter to
5792 start_decl.
c11b6f21 5793 (expand_start_catch_block): Eliminate the throw spec parameter to
eb66be0e 5794 grokdeclarator.
c11b6f21
MS
5795 (expand_builtin_throw): Add throw spec to make_call_declarator.
5796 Eliminate the throw spec parameter to start_function.
5797 (start_anon_func): Likewise.
5798 * lex.c (make_call_declarator): Add throw spec parameter.
5799 (set_quals_and_spec): New routine.
5800 (cons_up_default_function): Add throw spec to make_call_declarator.
5801 Eliminate the throw spec parameter to grokfield.
5802 * method.c (synthesize_method): Eliminate the throw spec parameter
eb66be0e 5803 to start_function.
c11b6f21 5804 * pt.c (process_template_parm): Eliminate the throw spec parameter
eb66be0e 5805 to grokdeclarator.
c11b6f21
MS
5806 (tsubst): Add throw spec to make_call_declarator.
5807 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
5808 (do_function_instantiation): Eliminate the throw spec parameter to
eb66be0e
MS
5809 grokdeclarator. Eliminate the throw spec parameter to
5810 start_function.
c11b6f21 5811 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
eb66be0e 5812 to start_function.
c11b6f21
MS
5813 * parse.y (datadef): Remove non-winning optimization.
5814 (decl): Likewise.
5815 (fndef): Remove ambiguous error productions uncovered by grammer
eb66be0e 5816 fixing.
c11b6f21
MS
5817 (constructor_declarator): Add exception_specification_opt here.
5818 (component_constructor_declarator): Likewise.
5819 (direct_after_type_declarator): Likewise.
5820 (complex_direct_notype_declarator): Likewise.
5821 (direct_abstract_declarator): Likewise.
5822 (fn.def1): Remove exception_specification_opt.
5823 (fn.def2): Likewise.
5824 (condition): Likewise.
5825 (initdcl0): Likewise.
5826 (initdcl): Likewise.
5827 (notype_initdcl0): Likewise.
5828 (nomods_initdcl0): Likewise.
5829 (component_decl_1): Likewise.
5830 (component_declarator): Likewise.
5831 (after_type_component_declarator0): Likewise.
5832 (after_type_component_declarator): Likewise.
5833 (notype_component_declarator): Likewise.
5834
5835Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5836
5837 * call.c (build_over_call): Also use an INIT_EXPR when
eb66be0e 5838 initializing anything from an rvalue.
c11b6f21
MS
5839
5840 * call.c (build_over_call): Call stabilize_reference when building
eb66be0e 5841 an INIT_EXPR instead of calling the copy ctor.
c11b6f21
MS
5842
5843 * call.c (joust): Extend the previous change to all comparisons.
5844
5845 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
5846 NO_LINKAGE_HEURISTICS.
5847
5848 * decl2.c (finish_file): Emit any statics that weren't already.
5849
5850 * typeck.c (build_static_cast): Implement.
5851 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
5852 * decl.c (grokparms): Use can_convert_arg instead of
eb66be0e 5853 implicit_conversion directly.
c11b6f21
MS
5854 (copy_args_p): New fn.
5855 * cvt.c (convert_to_reference): Don't complain about temp with
eb66be0e 5856 static_cast.
c11b6f21
MS
5857 (build_up_reference): Handle TARGET_EXPRs.
5858 * call.c (build_over_call): Elide unnecessary temps.
5859 (can_convert*): Use new overloading code.
5860
5861Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
5862
5863 * call.c: Move TYPE_PTR*_MACROS ...
5864 * cp-tree.h: To here.
5865 * typeck.c (build_reinterpret_cast): Implement.
5866
5867 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
eb66be0e 5868 ptr_complete_ob.
c11b6f21
MS
5869 (joust): If we're comparing a function to a builtin and the worst
5870 conversion for the builtin is worse than the worst conversion for the
5871 function, take the function.
5872
5873 * typeck.c (build_const_cast): Implement.
5874 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
5875 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
5876
5877Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
5878
5879 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
eb66be0e
MS
5880 too early. Make sure we explode if exprtype turns out to be a
5881 NULL_TREE when it shouldn't be.
c11b6f21
MS
5882
5883Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
5884
5885 * cp-tree.h: New routine make_call_declarator.
5886 * lex.c (make_call_declarator): Define it.
5887 * except.c (init_exception_processing): Use it.
5888 (expand_builtin_throw): Likewise.
5889 (start_anon_func): Likewise.
5890 * decl2.c (finish_file): Likewise.
5891 * lex.c (cons_up_default_function): Likewise.
5892 * parse.y: Likewise.
5893 * pt.c (tsubst): Likewise.
5894
5895Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
5896
5897 * decl2.c (groktypefield): Remove unused code.
5898
5899Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
5900
5901 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
5902 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
5903 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
5904 nonempty_cv_qualifiers.
5905 * hash.h: Rebuild.
5906
5907 * lex.c (make_pointer_declarator): Change type_quals into
eb66be0e 5908 cv_qualifiers.
c11b6f21
MS
5909 (make_reference_declarator): Likewise.
5910
d11ad92e
MS
5911Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5912
5913 * decl.c (start_function): Only check interface_* for templates
eb66be0e 5914 with flag_alt_external_templates.
d11ad92e
MS
5915
5916 * call.c (build_new_op): Check for comparison of different enum types.
5917 (build_over_call): Fix arg # output.
5918
5919 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
5920
5921Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
5922
5923 * call.c (build_new_op): Check for erroneous args.
5924
5925 * call.c (build_new_method_call): Add missing args to cp_error.
5926
5927 * tree.c (error_type): Dont print reference-to-array.
5928
5929 * typeck.c (convert_for_assignment): Don't say contravariance for
eb66be0e 5930 removing const.
d11ad92e
MS
5931
5932Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
5933
5934 * call.c (build_over_call): Diagnose bad convs for `this'.
5935
5936 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
5937 on _ctor_arg.
5938
5939 * call.c (convert_like): Handle bad convs.
5940 (build_over_call): Handle bad convs better.
5941
5942 * decl2.c: -fansi-overloading is now the default.
5943
5944 * call.c (build_new_method_call): Check for erroneous args.
5945
5946 * pt.c (instantiate_class_template): Propagate
eb66be0e 5947 TYPE_USES_MULTIPLE_INHERITANCE.
d11ad92e
MS
5948
5949Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
5950
5951 * call.c (enforce_access): Add static to routine.
5952
5953Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
5954
5955 * call.c (build_user_type_conversion_1): Fix bad handling.
5956 (compare_ics): Likewise.
5957
5958Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
5959
5960 * call.c (standard_conversion): Oops.
5961
5962Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
5963
5964 * g++.c: Update test for win32 (&& ! cygwin32).
5965
5966Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
5967
5968 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
5969 (ptr_reasonably_similar): New fn.
5970 * call.c (BAD_RANK): New rank.
5971 (ICS_BAD_FLAG): New macro.
5972 (standard_conversion): Handle almost-right pointer conversions.
5973 (reference_binding): Handle bad rvalue bindings.
5974 (add_*_candidate): Stuff.
5975 (build_over_call): Pass bad conversions to convert_for_initialization.
5976 (compare_ics): Handle bad convs.
5977 (joust): Likewise.
5978
5979Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
5980
5981 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
5982 integer_type_node when computing pointer offsets.
5983
5984Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
5985
5986 * tree.c (lvalue_type): New fn.
5987 (error_type): New fn.
5988 * call.c (op_error): Use error_type.
5989 (add_conv_candidate): Use lvalue_type.
5990 (add_builtin_candidates): Likewise.
5991 * error.c (args_as_string): Use error_type.
5992
5993Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
5994
5995 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
5996 (tsubst): Not here.
5997
5998 * decl.c (init_decl_processing): With -ansi, __null's type is the
5999 signed integral type with the same number of bits as a pointer.
6000 Introduce a new variable null_node for it.
6001 * cp-tree.h: Adjust.
6002 * call.c (null_ptr_cst_p): Adjust.
6003
6004Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
6005
6006 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
eb66be0e 6007 optimize.
d11ad92e
MS
6008
6009Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
6010
6011 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
eb66be0e 6012 fns of classes without virtual functions.
d11ad92e
MS
6013
6014 * call.c (add_function_candidate): Handle `this' specially.
6015 (compare_ics): Likewise.
6016
6017Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
6018
6019 * typeck.c (build_conditional_expr): Fix handling of __null.
6020
6021 * decl2.c (comdat_linkage): New fn.
6022 (import_export_vtable): Use it.
6023 (import_export_decl): Use it.
6024 * method.c (make_thunk): Use it.
6025
73aad9b9
JM
6026Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
6027
6028 * pt.c (end_template_decl): If we don't actually have parms, return.
6029 * parse.y (template_header): Accept 'template <>'.
6030
6031 * errfn.c: Allow 5 args.
6032
6033Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6034
6035 * tree.c (make_temp_vec): New fn.
6036 * pt.c (push_template_decl): Handle partial specs.
d11ad92e 6037 (instantiate_class_template): Likewise.
73aad9b9
JM
6038 (more_specialized): Use get_bindings.
6039 (more_specialized_class): New fn.
6040 (get_class_bindings): New fn.
6041 (most_specialized_class): New fn.
6042 (do_function_instantiation): List candidates for ambiguous case.
6043 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
6044 (shadow_tag): Call push_template_decl for partial specializations.
d11ad92e 6045 * parse.y: Likewise.
73aad9b9 6046 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
eb66be0e 6047 DECL_TEMPLATE_MEMBERS.
73aad9b9
JM
6048 * call.c (print_z_candidates): Reduce duplication.
6049
6050Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6051
6052 * decl2.c (lang_decode_option): Allow -fansi-overloading.
6053
6054Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
6055
6056 * pt.c (get_bindings): New fn.
d11ad92e 6057 (most_specialized): Likewise.
73aad9b9
JM
6058 (do_function_instantiation): Use them.
6059 (add_maybe_template): New fn.
6060 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
6061 * call.c (build_new_op): Handle guiding decls.
d11ad92e
MS
6062 (build_new_function_call): Likewise.
6063 * decl2.c (finish_file): Likewise.
73aad9b9
JM
6064
6065 * decl2.c (mark_used): Do synthesis here.
6066 * call.c (build_method_call): Not here.
6067 (build_over_call): Or here.
6068 * typeck.c (build_function_call_real): Or here.
6069 * tree.c (bot_manip): Call mark_used on functions used in default
eb66be0e 6070 args.
73aad9b9 6071
2eee5e3a
MM
6072Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6073
6074 * decl2.c (import_export_vtable): Delete code that disabled vtable
eb66be0e 6075 heuristic on systems with ASM_OUTPUT_EXTERNAL.
2eee5e3a 6076
c73964b2
MS
6077Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6078
6079 * typeck.c (build_x_function_call): Handle static call context
6080 better.
6081
6082 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
eb66be0e 6083 the function, not its outer block.
c73964b2
MS
6084
6085 * call.c (build_field_call): Pass fields on to build_opfncall
eb66be0e 6086 regardless of TYPE_OVERLOADS_CALL_EXPR.
c73964b2
MS
6087 (build_method_call): Pass on to build_new_method_call sooner.
6088
6089 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
6090 gives us.
6091 * class.c (instantiate_type): Don't put a POINTER_TYPE to
eb66be0e 6092 METHOD_TYPE on an expression. Also make a copy of rhs instead of
c73964b2
MS
6093 modifying it.
6094
6095Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
6096
6097 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
6098 (add_builtin_candidate): Don't take enums for ++.
6099 (build_new_method_call): Handle non-aggregates and field calls.
6100 Move new overloading code from...
6101 * cvt.c: Here.
6102
6103 * decl.c (grokparms): Don't check default args in templates.
6104
6105Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
6106
6107 * cvt.c (build_new_op): Fix args to build_unary_op.
6108 (add_builtin_candidates): Don't call type_promotes_to on float.
6109
6110 * decl.c (grokparms): Check the type of the default arg.
6111
6112 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
6113 returning NULL_TREE.
6114
6115 * typeck.c (build_x_binary_op): Avoid doing extra work.
d11ad92e
MS
6116 (build_x_unary_op): Likewise.
6117 (build_x_conditional_expr): Likewise.
c73964b2
MS
6118 * cvt.c (build_over_call): Return.
6119 (add_builtin_candidate): Fix MEMBER_REF.
d11ad92e 6120 (build_new_op): Likewise.
c73964b2
MS
6121
6122Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
6123
6124 * method.c (build_overload_name): Put bug fix into code but leave
eb66be0e
MS
6125 disabled for now so we can be bug compatible with older releases
6126 that do repeats incorrectly. In the future, we can enable it.
c73964b2
MS
6127
6128Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
6129
6130 * cvt.c (convert_like): Don't call build_cplus_new twice.
6131
6132 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
6133 Control new overloading code with -fansi-overloading.
6134
6135Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6136
6137 * cvt.c (build_over_call): Call build_cplus_new.
d11ad92e
MS
6138 * call.c (build_method_call): Likewise.
6139 * typeck.c (build_function_call_real): Likewise.
c73964b2
MS
6140 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
6141 the COND_EXPR in a TARGET_EXPR so they use the same slot.
6142
6143 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
6144 recursive calls.
6145 * typeck.c (complete_type): Propagate
eb66be0e 6146 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
c73964b2
MS
6147
6148Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
6149
6150 * cvt.c (joust): More ?: kludging. Sigh.
6151 (build_over_call): Don't try to synthesize global fns.
6152
6153 * search.c (lookup_conversions): Use binfo marking.
6154
6155Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
6156
6157 * search.c (build_mi_matrix): Use the correct value of cid
6158 when determining the new mi_size.
6159
6160Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
6161
6162 * cvt.c (add_builtin_candidates): Do consider type conversion ops
6163 for the first parms of += et al.
6164 (strip_top_quals): New fn.
6165 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
d11ad92e 6166 (implicit_conversion): Likewise.
c73964b2
MS
6167 (add_builtin_candidates): Be careful about arrays.
6168 (build_new_method_call): Handle vtable optimization.
6169
6170Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
6171
6172 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
6173 * cvt.c (reference_binding): Use it.
6174 (implicit_conversion): Use it.
6175 (add_builtin_candidate, COND_EXPR): Use it.
6176
6177 * cvt.c (build_new_function_call): Check for error args.
6178
6179 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
6180
6181 * gxx.gperf: Add __null.
6182 * hash.h: Regenerate.
6183 * lex.h: Add RID_NULL.
6184 * lex.c (init_lex): Create null_pointer_node here, stick it in
eb66be0e 6185 RID_NULL.
c73964b2
MS
6186 * decl.c (init_decl_processing): Still set its type here.
6187 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
d11ad92e 6188 (convert_to_pointer_force): Likewise.
c73964b2
MS
6189 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
6190 if (! pedantic).
6191 * call.c (convert_harshness): Use null_ptr_cst_p.
d11ad92e 6192 * typeck.c (convert_for_assignment): Likewise. Don't produce
c73964b2
MS
6193 null_pointer_node.
6194
6195 * error.c (args_as_string): Handle lists of actual args, too.
6196 * cvt.c (null_ptr_cst): Support (void*)0 for now.
6197 (build_user_type_conversion_1): Improve diagnostics.
6198 (build_new_function_call): Likewise.
6199 (build_object_call): Likewise.
6200 (build_new_method_call): Likewise. Move call before def diagnostic...
6201 (build_over_call): Here.
6202
6203 * cvt.c (build_new_method_call): Don't complain about no match if
eb66be0e 6204 LOOKUP_SPECULATIVELY.
c73964b2
MS
6205 (build_over_call): Fix 'this' for virtual fn.
6206 (build_new_method_call): Add diagnostic.
6207
6208Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
6209
6210 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
eb66be0e 6211 constructors to be passed in.
c73964b2
MS
6212 (build_over_call): Likewise.
6213 (build_user_type_conversion_1): Pass them in.
6214 (convert_like): Likewise.
6215 (build_object_call): Handle overloaded conversions.
6216 (build_over_call): Pass the right args to build_vfn_ref.
6217 (standard_conversion): Fix pmf convs.
6218 (joust): Handle comparing statics and non-statics.
6219 (build_new_method_call): New fn.
6220 * call.c (build_method_call): Call it if NEW_OVER.
6221
6222Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
6223
6224 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
eb66be0e 6225 %D instead.
c73964b2
MS
6226
6227Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
6228
6229 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
eb66be0e
MS
6230 instead of just maybe_build_cleanup so that we deallocate the
6231 thrown object.
c73964b2
MS
6232
6233Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6234
6235 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
6236 * cp-tree.h (finish_prevtable_vardecl): Add decl.
6237
14548a19
MS
6238Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
6239
c73964b2 6240 * pt.c (instantiate_class_template): Call complete_type. Also, if
eb66be0e
MS
6241 we're at the end of the file and we just instantiated a template
6242 class with a vtable, call finish_prevtable_vardecl.
c73964b2 6243
14548a19 6244 * error.c (dump_decl): Don't explode (or explode more gracefully
eb66be0e 6245 as appropriate) if the object being dumped has a null type.
d11ad92e 6246 (dump_expr): Likewise.
14548a19
MS
6247
6248 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
eb66be0e
MS
6249 by counting the number of nodes that we'll need before allocating
6250 the array.
14548a19
MS
6251 (lookup_fnfields): Fix comment.
6252 (breadth_first_search): Fix comment.
6253
6254Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
6255
6256 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
eb66be0e 6257 TYPE_ALIGN.
14548a19
MS
6258 * class.c (finish_struct): Call cplus_decl_attributes here.
6259 (finish_struct_1): Not here.
6260 * cp-tree.h: Adjust.
6261
6262 * pt.c (type_unification): New parameter STRICT.
6263 (unify): If STRICT, don't allow cv addition or base deduction.
6264 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
6265
6266Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
6267
6268 * search.c (get_template_base{_recursive}): New fns.
6269 * pt.c (more_specialized): New fn.
6270 (do_function_instantiation): Use it.
6271 (unify): Handle base deduction.
6272 * cvt.c (joust): Use more_specialized.
6273 Don't arbitrarily choose between non-builtin candidates.
6274 (build_over_call): Call require_complete_type.
6275
6276 * decl.c (start_function): Statics are static even in a #pragma
eb66be0e 6277 interface file.
14548a19
MS
6278
6279 * decl2.c (import_export_vtable): Disable vtable heuristic on
eb66be0e 6280 systems with ASM_OUTPUT_EXTERNAL.
14548a19
MS
6281
6282 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
6283 (standard_conversion): No std conv to enum type.
6284
6285 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
6286 for ptm's.
6287
6288 * cvt.c (reference_binding): Bind directly to a base subobject of
eb66be0e 6289 a class rvalue.
14548a19
MS
6290
6291 * cvt.c (build_new_op): Enforce access control.
6292
6293Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
6294
6295 * typeck2.c (process_init_constructor): When scanning the
6296 union for a named field, skip things that aren't FIELD_DECLs.
6297
6298 * method.c (synthesize_method): Don't scan fndecl's rtl if
6299 we're at the end of the file; just assume the function can't
6300 be inlined.
6301
6302Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6303
6304 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
eb66be0e 6305 it failed.
14548a19
MS
6306
6307 * cvt.c (build_user_type_conversion_1): Handle overloaded
eb66be0e 6308 conversion ops.
14548a19
MS
6309
6310 * cvt.c (add_builtin_candidates): Don't consider type conversion
eb66be0e 6311 operators for the first parameter of operator=.
14548a19
MS
6312
6313Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
6314
6315 * typeck.c (complete_type): Only call layout_type if we're not
eb66be0e 6316 expanding a template.
14548a19
MS
6317
6318Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
6319
6320 * cvt.c (compare_ics): Oops.
6321
6322 * cvt.c (op_error): Oops.
6323
6324 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
6325 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
6326 (build_conv): Use them.
6327 (implicit_conversion): Use them.
6328 (convert_like): Handle them.
6329 (build_new_op): Handle builtin COND_EXPR again.
6330 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
6331 in lists of types for COND_EXPR.
6332 (add_builtin_candidate): Add enum candidates for COND_EXPR.
6333
6334Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
6335
6336 * typeck.c (build_modify_expr): Always attempt to build a call to
eb66be0e 6337 the assignment operator, even if we're using a default one.
14548a19
MS
6338 (convert_for_initialization): Call complete_type.
6339
6340Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6341
6342 * cvt.c (reference_binding): A REF_BIND gets the reference type.
6343 (implicit_conversion): Likewise.
6344 (convert_like): Likewise.
6345 (compare_ics): Likewise.
6346 (compare_qual): Likewise.
6347 (print_z_candidates): Handle no candidates.
6348 (build_new_op): Don't handle builtin COND_EXPR for now.
6349
6350Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
6351
6352 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
6353
6354Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
6355
6356 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
6357
6358 * cvt.c (build_builtin_candidate): Oops.
6359 (build_new_op): Oops.
6360
6361 * method.c (build_opfncall): Pass COND_EXPR on.
6362 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
6363 (add_builtin_candidate{,s}): Likewise.
6364 (add_builtin_candidates): Likewise.
6365 (print_z_candidates, op_error, build_new_op): Likewise.
6366 (type_decays_to): New fn.
6367 * lex.c (init_lex): Just say ?: for COND_EXPR.
6368
6369Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6370
6371 * typeck.c (complete_type): Call layout_type rather than building
eb66be0e 6372 a new array type.
14548a19
MS
6373
6374 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
eb66be0e 6375 only use ptrdiff_t.
14548a19
MS
6376
6377Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6378
6379 * cvt.c: Always compile the new overloading code (but don't use it).
6380 (implicit_conversion): Add a BASE_CONV when converting to
eb66be0e 6381 the same class type.
14548a19
MS
6382 (convert_like): Handle BASE_CONV.
6383
6384Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6385
6386 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
6387 (add_builtin_candidate): Likewise.
6388
6389 NEW_OVER changes:
6390 * typeck.c (build_x_function_call): Try an operator function
eb66be0e 6391 whenever we call an object of class type.
14548a19
MS
6392 * method.c (build_opfncall): Pass CALL_EXPRs through.
6393 * cvt.c (implicit_conversion): Do const-ref case first.
6394 (add_conv_candidate, build_object_call, op_error): New fns.
6395 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
6396 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
6397 builtin candidates.
6398 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
6399 Fall back on preincrement handling. Use op_error.
6400 Handle warn_synth.
6401 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
6402 an error_mark_node.
6403 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
6404 properly.
6405
6406Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
6407
6408 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
6409
6410Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
6411
6412 * typeck.c (build_component_ref_1): Use build_component_ref
6413 instead of open coding it here.
6414
6415Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
6416
6417 * g++.c (main): Don't link with -lg++.
6418
6419 NEW_OVER changes:
6420 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
eb66be0e 6421 result of build_type_conversion.
14548a19
MS
6422 (cp_convert): Only call build_method_call for ctors if
6423 build_type_conversion failed.
6424 (ptr_complete_ob): New function.
6425 (TYPE_PTR{,OB,MEM}_P): New macros.
6426 ({add,build}_builtin_candidate{,s}): New functions.
6427 (print_z_candidates): Handle builtins.
6428 (build_user_type_conversion_1): Don't use conversion fns for
6429 converting to a base type.
6430 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
6431 (build_user_type_conversion): Use convert_from_reference.
6432 (build_new_op): New function.
6433 (build_over_call): Fix handling of methods.
6434 (compare_ics): Handle AMBIG_CONV properly.
6435 * typeck2.c: Increment abort count.
6436 * method.c (build_opfncall): Forward most requests to build_new_op.
6437 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
6438
6439Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6440
6441 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
6442 invalid second argument to dump_expr_list.
6443
594740f3
MS
6444Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
6445
6446 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
6447
6448Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
6449
6450 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
6451 ASSEMBLE_EXTERNAL.
6452
6453Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
6454
6455 * typeck2.c (process_init_constructor): New pedwarn for using { }
6456 to initialize a pointer to member function.
6457 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
6458 we can avoid the new error.
6459
6460Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
6461
6462 * typeck.c (build_ptrmemfunc1): New function to hide details of
6463 pointer to member functions better.
6464
6465Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
6466
6467 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
6468 methods into the actual method, as we know the implied object is
6469 not used.
6470
6471Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6472
6473 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
6474 inside a system header.
6475
6476Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
6477
6478 * call.c (build_method_call): Call complete_type on the
6479 instance type.
6480
6481Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
6482
6483 * typeck.c (build_component_ref): Always build up an OFFSET_REF
6484 for obj_ptr->func so that we can know which object to use in a
6485 method call.
6486
6487Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
6488
6489 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
6490 around things. Also improve maintainability.
6491
6492Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
6493
6494 * decl.c (grokdeclarator): Check for overflow when evaluating an
eb66be0e 6495 array dimension.
594740f3
MS
6496
6497Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
6498
6499 * cvt.c (cp_convert): Don't check for ambiguity with constructor
eb66be0e 6500 if NEW_OVER.
594740f3
MS
6501
6502 * typeck.c (build_x_function_call): Pass function overload
eb66be0e 6503 questions to new overloading code if NEW_OVER.
594740f3 6504 * init.c (expand_aggr_init_1): Only check for type conversion ops
eb66be0e
MS
6505 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
6506 Don't check for ambiguity with constructor if NEW_OVER.
594740f3 6507 * cvt.c (convert_to_reference): Dereference the result of a type
eb66be0e 6508 conversion operator.
594740f3
MS
6509 (build_conv): Propagate ICS_USER_FLAG.
6510 (implicit_conversion): Call instantiate_type.
6511 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
6512 (add_function_candidate): Fix cv-quals on argtype.
6513 (print_z_candidates): New function.
6514 (build_new_function_call): Call it.
6515 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
6516 consider non-converting constructors.
6517 Call print_z_candidates.
6518 Return an AMBIG_CONV for an ambiguous conversion.
6519 (build_user_type_conversion): Handle AMBIG_CONV.
6520 (convert_like): Fix test for building TARGET_EXPR.
6521 Call instantiate_type.
6522 Handle AMBIG_CONV and LVALUE_CONV.
6523 (build_over_call): Handle 0 args and ellipsis.
6524 * cp-tree.def: Add AMBIG_CONV.
6525
e92cc029
MS
6526Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
6527
6528 * decl.c (lookup_name_real): If we find mem in obj when parsing
eb66be0e 6529 `obj->mem', make sure we return the right value.
e92cc029
MS
6530
6531Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
6532
6533 * search.c (get_base_distance): Call complete_type.
6534
6535Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
6536
6537 * decl.c (store_bindings): Make static.
6538
6539Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
6540
6541 * init.c (expand_aggr_init_1): Don't check type conversions if
eb66be0e 6542 NEW_OVER.
e92cc029
MS
6543
6544 * cvt.c (z_candidate): Put back template field.
6545 (add_function_candidate): Set it.
6546 (add_template_candidate): Likewise.
6547 (joust): Use it.
6548 (compare_qual): Handle references and pointers to members.
6549 (compare_ics): Handle reference bindings.
6550
6551 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
6552
6553Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
6554
6555 * call.c (compute_conversion_costs): Call complete_type.
6556
6557 * tree.c (vec_binfo_member): Use comptypes instead of comparing
eb66be0e 6558 pointers, so we can handle template parameters.
e92cc029
MS
6559
6560Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
6561
6562 * cvt.c (cp_convert_to_pointer): We have to call complete_type
6563 here; let's make it explicit instead of a side effect of an
6564 error check.
6565
6566Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
6567
6568 * cvt.c (z_candidate): Remove template field.
6569 (reference_binding): Handle binding to temporary.
6570 (implicit_conversion): Likewise.
6571 (add_function_candidate): Handle artificial constructor parms.
6572 Handle functions with too few parms.
6573 (add_template_candidate): New function.
6574 (build_user_type_conversion_1): Handle constructors.
6575 (convert_like): Likewise.
6576 (build_over_call): Likewise.
6577 (build_new_function_call): Support templates.
6578 (compare_ics): Fix reference, inheritance handling.
6579
6580Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
6581
6582 * decl.c: Add signed_size_zero_node.
6583 (init_decl_processing): Build it.
6584 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
eb66be0e 6585 when we're trying to make a negative delta.
e92cc029
MS
6586
6587Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6588
6589 Stop doing this damn index==strchr variable name confusion.
6590 * class.c (add_virtual_function): Change local var INDEX to be
6591 named IDX.
6592 (add_method): Likewise.
6593 * lex.c (print_parse_statistics): Likewise.
6594 * search.c (make_memoized_table_entry): Likewise.
6595 (lookup_fnfields_here): Likewise.
6596 (lookup_field): Likewise.
6597 (lookup_fnfields): Likewise.
6598 (get_baselinks): Likewise.
6599 * sig.c (build_signature_table_constructor): Likewise.
6600 (build_signature_method_call): Likewise.
6601 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
6602 (get_member_function_from_ptrfunc): Likewise.
6603 (build_ptrmemfunc): Change local var INDEX to be IDX.
6604 (c_expand_start_case): Likewise.
6605
6606Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
6607
6608 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
eb66be0e 6609 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
e92cc029 6610 (convert_to_reference): Use build_type_conversion to convert to
eb66be0e 6611 the reference type directly.
e92cc029
MS
6612 (standard_conversion): Fix void* case, non-conversions.
6613 (reference_binding): Fix expr == 0 case, non-conversions.
6614 (convert_like): Support REF_BIND.
6615 (compare_qual): Split out from compare_ics.
6616 (compare_ics): Use it, handle icses with only a qual_conv.
6617
6618 * init.c (expand_vec_init): Don't crash if decl is NULL.
6619
6620Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
6621
6622 * mpw-config.in: New file, configury for Mac MPW.
6623 * mpw-make.sed: New file, makefile editing for MPW.
6624
6625Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6626
6627 * pt.c (instantiate_class_template): Call repo_template_used.
6628
6629 * search.c (lookup_conversions): Only lookup conversions in
eb66be0e 6630 complete types.
e92cc029
MS
6631
6632Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6633
6634 * cp-tree.def: Renamed from tree.def, to avoid confusion with
6635 gcc's tree.def.
6636 * cp-tree.h, lex.c: Include cp-tree.def.
6637 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
6638
6639Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
6640
6641 * init.c (build_vec_delete_1): Call complete_type.
6642
6643Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
6644
6645 * except.c (start_anon_func): Make sure anonymous functions are
eb66be0e 6646 never external.
e92cc029
MS
6647
6648Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6649
6650 * decl.c (finish_function): If function_depth > 1, set nested.
6651
6652 * decl2.c (grokbitfield): Revert Bob's change.
6653 * class.c (finish_struct_1): Fix handling of named bitfield widths.
6654
6655Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
6656
6657 * pt.c (add_pending_template): Handle types.
6658 (lookup_template_class): With -fexternal-templates, just add the class
6659 to pending_templates instead of instantiating it now.
6660 * decl2.c (finish_file): Handle types in pending_templates.
6661
6662Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
6663
6664 * decl2.c (grokbitfield): Handle constant decls appropriately.
eb66be0e
MS
6665 Give an appropriate error message now instead of spewing core
6666 later.
e92cc029
MS
6667
6668Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
6669
6670 * decl2.c: Don't turn on thunks by default for now.
6671
6672Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
6673
6674 * typeck.c (complete_type): Handle error_mark_node.
6675 (common_type, OFFSET_TYPE): Handle template_type_parms.
6676
6677Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
6678
6679 * pt.c (instantiate_decl): If at_eof, call import_export_decl
eb66be0e 6680 regardless of DECL_INLINE.
e92cc029
MS
6681
6682 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
6683
6684 * class.c (finish_struct_bits): Copy TYPE_SIZE.
6685
6686 * rtti.c (build_dynamic_cast): Support templates.
6687 * tree.def: Support DYNAMIC_CAST_EXPR.
6688 * pt.c (tsubst_copy): Likewise.
6689 * decl2.c (build_expr_from_tree): Likewise.
6690
6691Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
6692
6693 * typeck.c (build_static_cast): Support templates.
6694 (build_const_cast): Likewise.
6695 * tree.def: Support CONST/STATIC_CAST_EXPR.
6696 * pt.c (tsubst_copy): Likewise.
6697 * decl2.c (build_expr_from_tree): Likewise.
6698
6699Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
6700
6701 * decl2.c (finish_vtable_vardecl): Don't trust
eb66be0e 6702 TREE_SYMBOL_REFERENCED for vtables of local classes.
e92cc029
MS
6703
6704Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
6705
6706 * pt.c (tsubst_copy): Handle operator T.
6707
6708Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6709
6710 * init.c (build_delete): Move creation of PARMS inside test of
6711 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
6712
6713Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
6714
6715 * typeck.c (build_conditional_expr): Don't assume that
6716 the arguments to ?: are always pointers or records.
6717
6718Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6719
6720 * decl2.c (import_export_decl): Still emit static/weak/comdat
eb66be0e 6721 copies of inline template functions with -fno-implicit-templates.
e92cc029
MS
6722
6723Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
6724
6725 * init.c (build_delete): Determine the complete basetype
6726 path to the destructor we're calling.
6727
6728Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
6729
6730 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
eb66be0e
MS
6731 initialize the enum, because we really and truly don't know where
6732 it came from.
e92cc029 6733 (start_enum): Don't copy integer_zero_node because
eb66be0e 6734 build_enumerator will do it.
e92cc029
MS
6735
6736Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
6737
6738 * decl.c (finish_function): Do access control on base destructors.
6739
6740 * pt.c (tsubst, case FUNCTION_DECL): Set up
eb66be0e
MS
6741 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
6742 hose us.
e92cc029
MS
6743
6744Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
6745
6746 * cvt.c (build_up_reference): If we have already extended the
eb66be0e 6747 lifetime of the temporary, don't try it again.
e92cc029
MS
6748 * typeck.c (c_expand_return): Don't try and convert the return
6749 value twice when we want a reference, once is enough.
6750
a0128b67
MS
6751Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
6752
6753 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
eb66be0e 6754 LOOKUP_ONLYCONVERTING at all for now.
a0128b67
MS
6755
6756 * search.c (add_conversions): Put the conversion function in
eb66be0e 6757 TREE_VALUE, the basetype in TREE_PURPOSE.
a0128b67
MS
6758 * cvt.c (build_type_conversion): Adjust.
6759 * cvt.c (build_expr_type_conversion): Adjust.
6760 * call.c (user_harshness): Adjust.
6761
6762Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
6763
6764 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
eb66be0e 6765 backend's benefit.
a0128b67 6766
14548a19
MS
6767Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
6768
6769 * except.c (expand_start_catch_block): Add a dummy region, if we
6770 get an error, so that we can avoid core dumping later.
6771
a0128b67
MS
6772Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
6773
6774 * cp-tree.h (OFFSET_REF): Remove.
6775 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
6776 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
d11ad92e
MS
6777 * init.c (expand_aggr_init_1): Likewise.
6778 (build_new): Likewise.
6779 * typeck.c (expand_target_expr): Likewise.
a0128b67
MS
6780
6781Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6782
6783 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
eb66be0e 6784 TARGET_EXPR.
a0128b67 6785
e349ee73
MS
6786Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
6787
6788 * cvt.c (build_up_reference): Redo how and when temporaries are
6789 created.
6790 * decl.c (grok_reference_init): Don't try and be smart about
6791 running cleanups.
6792
6793Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
6794
6795 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
6796 (TARGET_EXPR...), now that it has 4 arguments.
d11ad92e 6797 * tree.c (build_cplus_new): Likewise.
e349ee73
MS
6798
6799Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
6800
6801 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
6802
6803 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
6804 * decl.c (struct saved_scope): Remove named_labels,
6805 {base,member}_init_list.
6806 (maybe_push_to_top_level): Don't set them. Call
6807 push_cp_function_context if appropriate.
6808 (pop_from_top_level): Likewise.
6809
6810 * method.c (do_build_assign_ref): Remove obsolete check of
6811 TYPE_HAS_ASSIGN_REF (basetype).
6812
6813 * decl.c (grokfndecl): Diagnose user definition of
eb66be0e 6814 implicitly-declared methods.
e349ee73
MS
6815
6816Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
6817
6818 * method.c (do_build_copy_constructor): Add code to give
eb66be0e
MS
6819 meaningful error messages instead of crashing.
6820 (do_build_assign_ref): Don't synthesize assignment operators for
6821 classes containing reference or const members.
e349ee73
MS
6822
6823 * class.c (struct base_info): Remove cant_synth_copy_ctor
6824 and cant_synth_asn_ref.
6825 (finish_base_struct): Remove the code that tries to conditionalize
eb66be0e
MS
6826 synthesis of copy constructors & assignment operators based on
6827 access permissions. Instead, let it fail when it tries to
6828 synthesize the copy constructor. This will give meaningful error
6829 messages instead of silently generating code to perform a bitcopy.
e349ee73
MS
6830
6831Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
6832
6833 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
eb66be0e 6834 determining types for constant values.
e349ee73
MS
6835
6836 * decl.c (struct named_label_list): Use instead of stuffing
6837 random items into a TREE_LIST node.
6838 (named_label_uses): Use the new struct.
d11ad92e
MS
6839 (poplevel): Likewise.
6840 (lookup_label): Likewise.
e349ee73 6841 (define_label): Add an error message to tell the user the line
eb66be0e
MS
6842 where the goto is located in addition to the destination of the
6843 goto.
e349ee73
MS
6844 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
6845 named_label_uses.
d11ad92e 6846 (finish_function): Likewise.
e349ee73
MS
6847
6848 (start_decl): Complain about defining a static data member
6849 in a different type from which it was declared.
6850
6851Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6852
6853 * cvt.c (build_expr_type_conversion): Adjust.
6854
6855Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
6856
6857 * call.c (build_method_call): Always convert 'this' to the
eb66be0e 6858 appropriate type.
e349ee73
MS
6859
6860 * search.c (add_conversions): Put the conversion function in
eb66be0e 6861 TREE_VALUE, the type in TREE_PURPOSE.
e349ee73
MS
6862 * cvt.c (build_type_conversion): Adjust.
6863 * call.c (user_harshness): Adjust.
6864
6865 * method.c (emit_thunk): Call temporary_allocation and
eb66be0e 6866 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
e349ee73
MS
6867
6868 * tree.c (build_cplus_array_type): Handle tweaking of
eb66be0e 6869 TYPE_MAIN_VARIANT here.
e349ee73
MS
6870 * typeck.c (common_type): Not here.
6871
6872 * typeck.c (complete_type): Only try to complete an array type if
eb66be0e 6873 it has a domain.
e349ee73
MS
6874
6875Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
6876
6877 * decl.c (grokvardecl): Call complete_type.
6878 (grokdeclarator): Call complete_type for PARM_DECLs.
6879
6880Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
6881
6882 * pt.c (instantiate_class_template): Re-set
eb66be0e 6883 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
e349ee73
MS
6884
6885Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
6886
6887 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
6888 smart enough to do it right.
d11ad92e 6889 * tree.c (cp_expand_decl_cleanup): Likewise.
e349ee73
MS
6890 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
6891 cp_expand_decl_cleanup.
d11ad92e
MS
6892 (store_parm_decls): Likewise.
6893 (hack_incomplete_structures): Likewise.
6894 * except.c (push_eh_cleanup): Likewise.
e349ee73
MS
6895
6896Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
6897
6898 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
6899 frontend to the backend where it belongs.
d11ad92e
MS
6900 * tree.c (unsave_expr): Likewise.
6901 (unsave_expr_now): Likewise.
6902 * tree.def (UNSAVE_EXPR): Likewise.
6903 * cp-tree.h (unsave_expr): Likewise.
6904 (unsave_expr_now): Likewise.
e349ee73
MS
6905
6906Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
6907
6908 * init.c (emit_base_init): Make sure the partial EH cleanups live
6909 on the function_obstack.
6910
ce122a86
MS
6911Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
6912
6913 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
6914 when checking for pointer types.
6915
6916Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
6917
6918 * pt.c (instantiate_class_template): Remove obsolete check for
eb66be0e 6919 access declarations.
ce122a86
MS
6920
6921Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
6922
6923 * call.c (build_overload_call): Simplify calls to
6924 build_overload_call by removing last parameter.
d11ad92e
MS
6925 (build_method_call): Likewise.
6926 * cp-tree.h: Likewise.
6927 * method.c (build_opfncall): Likewise.
6928 * typeck.c (build_x_function_call): Likewise.
ce122a86
MS
6929
6930Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
6931
6932 * call.c (default_parm_conversions): Factor out common code.
6933 (build_method_call): Use it.
6934 (build_overload_call_real): Use it.
6935
4ac14744
MS
6936Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
6937
6938 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
6939 but pedwarn as the code is bogus.
d11ad92e 6940 * typeck.c (decay_conversion): Likewise.
4ac14744
MS
6941 (build_function_call_real): Use build_addr_func instead of
6942 default_conversion. Don't allow pointer-to-method functions down
6943 here.
6944 (build_unary_op): Use real pointer-to-member functions instead of
6945 fake ones.
6946 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
6947 (convert_for_assignment): Removed some obsolete code.
6948 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
6949 build_x_function_call instead of current_class_ptr. Only call
6950 digest_init once on an initializer, we do this just checking
6951 TREE_TYPE.
6952 (build_expr_from_tree): Pass current_class_ref to
6953 build_x_function_call instead of current_class_ptr.
d11ad92e
MS
6954 * init.c (build_member_call): Likewise.
6955 * pase.y: Likewise.
4ac14744
MS
6956 * error.c (dump_expr): Handle OFFSET_REFs better.
6957 * pt.c (unify): Handle pointer-to-member functions better.
6958 * decl.c (finish_function): Clear out current_class_ref just like
6959 we do for current_class_ptr.
6960
6961 * typeck.c (get_delta_difference): Handle virtual bases better.
6962
6963Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
6964
6965 * sig.c (build_signature_table_constructor): Use the delta for
6966 the original basetype for this virtual function with thunks.
6967 (build_signature_method_call): We still need to adjust 'this'
6968 with thunks.
6969
6970Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
6971
6972 * call.c (build_addr_func): New routine. Used to get the `real'
6973 address of a function or a method. Needed to avoid getting a
6974 pointer-to-member function.
6975 (build_call): New routine to build CALL_EXPRs.
6976 (build_method_call): Use it.
d11ad92e
MS
6977 * cvt.c (convert_to_aggr): Likewise.
6978 * typeck.c (build_function_call_real): Likewise.
4ac14744
MS
6979 * sig.c (build_signature_table_constructor): Use build_addr_func.
6980 * cp-tree.h (build_call, build_addr_func): Declare them.
6981
6982Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
6983
6984 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
6985 * parse.y: Remove uses of LOOKUP_AGGR.
6986
6987Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
6988
6989 * *.[chy]: Rename current_class_decl to current_class_ptr, and
6990 C_C_D to current_class_ref.
6991
6992Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6993
6994 * call.c (convert_harshness): Tighten up pointer conversions.
6995
6996Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
6997
6998 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
6999 (finish_file): Likewise.
7000
7001Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
7002
7003 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
7004
7005 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
eb66be0e 7006 code.
4ac14744
MS
7007
7008Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
7009
7010 * decl2.c: Turn on thunks by default where supported.
7011
4dabb379
MS
7012Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
7013
7014 * cp-tree.h (build_overload_call_maybe): Removed.
7015 * call.c (build_overload_call_real): Invert meaning of last arg to
7016 be require_complete.
d11ad92e 7017 (build_overload_call): Likewise.
4dabb379
MS
7018 * typeck.c (build_x_function_call): Use build_overload_call_real
7019 instead of build_overload_call_maybe.
7020
a50f0918
MS
7021Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
7022
7023 * decl2.c (finish_file): Don't try to emit functions that haven't
eb66be0e 7024 been compiled.
a50f0918
MS
7025
7026Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
7027
7028 * decl2.c (finish_vtable_vardecl): Oops.
7029
7030 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
eb66be0e 7031 Also store the bindings from previous_class_values.
a50f0918
MS
7032 (pop_from_top_level): Restore them.
7033
7034Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
7035
7036 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
eb66be0e 7037 symbol has been referenced.
a50f0918
MS
7038 (finish_file): Re-join synthesis/vtable loop with inline emission
7039 loop, disable inlining when an inline is output.
7040
7041Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
7042
7043 * except.c (init_exception_processing): Setup saved_in_catch.
7044 (push_eh_cleanup): Reset __eh_in_catch.
7045 (expand_start_catch_block): Set __eh_in_catch.
7046
7047Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
7048
7049 * except.c (push_eh_cleanup): Add tracking for whether or not we
7050 have an active exception object.
7051 (expand_builtin_throw): Use it to make sure a rethrow without an
7052 exception object is caught.
7053
7054Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
7055
7056 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
eb66be0e 7057 cache.
a50f0918 7058
809c8c30
JM
7059Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
7060
7061 * decl2.c (finish_file): Also use sentries for vars with
eb66be0e
MS
7062 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
7063 created).
809c8c30
JM
7064
7065 * lex.c (handle_cp_pragma): Disable #pragma
eb66be0e 7066 interface/implementation if SUPPORTS_ONE_ONLY > 1.
809c8c30
JM
7067
7068Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
7069
7070 * method.c (emit_thunk): Wrap default case in
eb66be0e 7071 temporary/permanent_allocation.
809c8c30
JM
7072
7073 * method.c (make_thunk): Use DECL_ONE_ONLY.
7074 (emit_thunk): Call assemble_end_function.
7075
46b02c6d
MS
7076Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7077
7078 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
d11ad92e 7079 (import_export_decl): Likewise.
46b02c6d
MS
7080 (finish_prevtable_vardecl): Disable vtable hack if
7081 SUPPORTS_ONE_ONLY > 1.
7082
7083Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
7084
7085 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
7086 PREDECREMENT_EXPRs take two arguments, not one.
7087
7088Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
7089
7090 * class.c (build_vtable_entry): Don't build thunks for abstract
eb66be0e 7091 virtuals.
46b02c6d
MS
7092
7093 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
eb66be0e 7094 frontend.
46b02c6d
MS
7095
7096Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
7097
7098 * class.c (set_rtti_entry): Use size_zero_node.
d11ad92e 7099 (build_vtable): Likewise.
46b02c6d
MS
7100
7101Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
7102
7103 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
d11ad92e 7104 (prepare_fresh_vtable): Likewise.
46b02c6d
MS
7105
7106Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
7107
7108 * method.c (emit_thunk): Call mark_used on the target function.
7109
7110 * call.c (build_method_call): Don't warn about pending templates.
7111
c7690c68
JM
7112Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
7113
7114 * decl2.c (finish_file): Fix list walking logic.
7115
46b02c6d
MS
7116 * typeck2.c (check_for_new_type): Only warn if -pedantic.
7117
7118Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
7119
7120 * class.c (finish_struct_1): Remove old code for
7121 dont_allow_type_definitions.
d11ad92e 7122 * cp-tree.h: Likewise.
46b02c6d
MS
7123 * spew.c: Make sure cp-tree.h is included before parse.h, so the
7124 definition of flagged_type_tree is found before it is used.
d11ad92e 7125 * lex.c: Likewise.
46b02c6d 7126 * parse.y: Added the ftype member to the type union, and changed a
eb66be0e 7127 number of rules to use it instead of ttype. Added calls to
46b02c6d
MS
7128 check_for_new_type() as appropriate.
7129 * typeck2.c (check_for_new_type): New function for checking
7130 if a newly defined type appears in the specified tree.
7131 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
7132 for check_for_new_type().
7133
67d743fe
MS
7134Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
7135
c7690c68
JM
7136 * decl2.c (finish_file): Only use a sentry if the decl is public.
7137
67d743fe
MS
7138 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
7139 don't pass LOOKUP_ONLYCONVERTING.
7140
7141Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
7142
7143 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
7144 properly keeps track of const and volatile type modifiers.
7145
7146Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
7147
7148 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
7149 * pt.c (comp_template_args): Use it.
7150
7151 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
7152 assemble_external for artificial function decls.
7153
7154 * decl.c (cp_finish_decl): Oops.
7155
7156Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
7157
7158 * decl2.c (import_export_decl): Put static data member templates
eb66be0e
MS
7159 into common storage, or make them weak, depending on whether they
7160 are dynamically or statically initialized.
67d743fe
MS
7161 (get_sentry): New function.
7162 (finish_file): Do import_export_decl for static data members before
7163 building the init/fini functions. Don't init/fini a variable that's
7164 EXTERNAL. Use a sentry for variables in common. Fix mismatching
7165 push/pop_temp_slots.
7166 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
eb66be0e 7167 expand_static_init thang.
67d743fe
MS
7168 * method.c (get_id_2): New function.
7169
7170Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
7171
7172 * parse.y (empty_parms): Make sure we use C++-style prototypes
eb66be0e 7173 when we're declaring member functions.
67d743fe
MS
7174
7175Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
7176
7177 * Makefile.in (CONFLICTS): 16 s/r conflicts.
7178 * parse.y (self_template_type): New nonterminal.
7179
a80e4195
MS
7180Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
7181
7182 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
eb66be0e 7183 name.
a80e4195
MS
7184 * parse.y (base_class.1): Allow 'typename foo::bar'.
7185
7186 * lex.c (check_newline): Remove #pragma code that plays with the
eb66be0e
MS
7187 input stream, since we now deal with tokens. Clear nextchar when
7188 we're done.
a80e4195
MS
7189 (handle_cp_pragma): Use real_yylex.
7190 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
7191 in one place.
7192
7193 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
7194
7195 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
7196
7197Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7198
7199 * parse.y: New token SELFNAME for potential constructor.
7200 * spew.c (yylex): Handle it.
7201 * lex.c (identifier_type): Produce it.
7202
7203 * parse.y (complete_type_name): In :: case, don't push class binding.
d11ad92e 7204 (complex_type_name): Likewise.
a80e4195
MS
7205
7206Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
7207
7208 * typeck.c (build_reinterpret_cast): Handle pointer to member
eb66be0e 7209 functions.
a80e4195
MS
7210
7211Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
7212
7213 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
eb66be0e 7214 pragmas.
f72bbc37 7215 (check_newline): Put the vtable/unit/implementation/interface pragma
eb66be0e 7216 code into handle_cp_pragma, replacing it with a call.
f72bbc37 7217 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
eb66be0e 7218 args. Get the next token after handling the pragma token.
a80e4195
MS
7219
7220Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
7221
7222 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
d11ad92e 7223 (convert_to_pointer_force): Likewise.
a80e4195
MS
7224
7225 * init.c (build_new): Fix array new without -fcheck-new.
7226
7227Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
7228
7229 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
7230 tree.c: Lose TYPE_NESTED_NAME.
7231
7232 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
7233 as identifiers.
7234
7235 * tree.def: Add VEC_INIT_EXPR.
7236 * expr.c (cplus_expand_expr): Handle it.
7237 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
eb66be0e 7238 the extra file-scope symbol nastiness.
a80e4195
MS
7239
7240Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7241
7242 * method.c (make_thunk): Thunks are static.
7243 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
7244
7245 * decl2.c (mark_vtable_entries): Emit thunks as needed.
7246 (finish_file): Don't emit them here.
7247
7248Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
7249
7250 * rtti.c (build_dynamic_cast): Handle null pointers.
7251 (ifnonnull): New function.
f72bbc37 7252
6b5fbb55
MS
7253Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
7254
a80e4195 7255 * call.c (build_method_call): Remember the original basetype we
eb66be0e
MS
7256 were called with. Give an error message instead of trying
7257 (incorrectly) to call a non-static member function through a
7258 non-inherited class.
a80e4195 7259
6b5fbb55
MS
7260 * search.c (expand_upcast_fixups): Mark the new fixup as
7261 DECL_ARTIFICIAL.
7262
7263Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7264
7265 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
7266
7267 * class.c (set_rtti_entry): Fix for thunks.
7268
7269 * decl2.c (import_export_decl): Still emit typeinfo fns for
7270 cv-variants of builtin types.
7271
7272 * rtti.c (expand_class_desc): Set up base_info_type_node here.
7273 (init_rtti_processing): Instead of here.
7274
7275Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
7276
7277 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
7278 (build_typeid): Only complain about taking dynamic typeid without
7279 -frtti.
7280
7281 * decl2.c: flag_rtti defaults to 1.
7282
7283 * rtti.c (get_tinfo_var): The general class case is now smaller.
7284 (init_rtti_processing): Pack the latter three fields of base_info
7285 into 32 bits.
7286
7287Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
7288
7289 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
7290
7291Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
7292
7293 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
7294 (push_memoized_context): Split out code to undefer pop_type_level to
7295 (clear_memoized_cache): here.
7296 (pop_memoized_context): We can only handle one layer of deferral of
7297 pop_type_level so clear the cache, if there was a previous level.
7298
7299Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7300
7301 * rtti.c (init_rtti_processing): Build up base_info_type_node.
7302 (expand_class_desc): Use one pointer to an array of base_info
7303 structs, passed using a CONSTRUCTOR.
7304
7305Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
7306
7307 * class.c (build_vbase_path): Remove block extern for
7308 flag_assume_nonnull_objects here.
7309 (build_vfn_ref): Split out functionality into build_vtbl_ref.
7310 (build_vtbl_ref): New routine.
7311 (build_vtable): Set up rtti info here.
7312 (add_virtual_function): Note in CLASSTYPE_RTTI the best
7313 place where we can get the rtti pointers from to avoid having to
7314 search around for a place.
d11ad92e
MS
7315 (finish_base_struct): Likewise.
7316 (finish_struct_1): Likewise. Never create totally new vtables
7317 with totally new vtable pointers for rtti. Disable code to layout
7318 vtable pointers better until we want to break binary
7319 compatibility.
6b5fbb55
MS
7320 * rtti.c (build_headof_sub): New routine to convert down to a
7321 sub-object that has an rtti pointer in the vtable.
7322 (build_headof): Use it. Also, use build_vtbl_ref now to be more
7323 maintainable.
7324 (build_dynamic_cast): Make sure we have saved it, if we need to.
7325 * search.c (dfs_init_vbase_pointers): Disable code that deals with
7326 a more efficient vtable layout, enable later.
7327 * call.c (flag_assume_nonnull_objects): Moved declaration to
7328 * cp-tree.h: here. Declare build_vtbl_ref.
7329 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
7330 function calls that want a tree.
7331
7332Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
7333
7334 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
eb66be0e 7335 other X subobjects in the most derived type. Ack.
6b5fbb55
MS
7336
7337 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
eb66be0e 7338 get_typeid will do it for us.
6b5fbb55
MS
7339 (get_typeid_1): Break out call-building for expand_*_desc to use.
7340 (get_typeid): Call it.
d11ad92e 7341 (expand_*_desc): Likewise.
6b5fbb55 7342 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
eb66be0e 7343 and void *.
6b5fbb55
MS
7344 (init_decl_processing): Lose builtin_type_tdescs lossage.
7345 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
7346
7347Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
7348
7349 * pt.c (tsubst): When calling set_nested_typename, use
eb66be0e
MS
7350 TYPE_NESTED_NAME (current_class_type) instead of
7351 current_class_name.
6b5fbb55 7352
d11ad92e
MS
7353 * decl.c (pushdecl): Likewise.
7354 (pushdecl_class_level): Likewise.
6b5fbb55
MS
7355 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
7356 set_nested_typename.
7357
7358Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
7359
7360 * rtti.c (synthesize_tinfo_fn): Handle arrays.
7361
7362 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
7363
7364Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
7365
7366 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
7367 (init_rtti_processing): Lose bad_cast_type.
7368 (build_dynamic_cast): Use throw_bad_cast.
7369
7370 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
7371
7372 * decl2.c (finish_file): Don't synthesize artificial functions
eb66be0e 7373 that are external and not inline.
6b5fbb55
MS
7374
7375 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
7376
7377 * decl2.c (finish_file): Handle having new inlines added to
eb66be0e 7378 saved_inlines by synthesis.
6b5fbb55
MS
7379
7380 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
7381
7382Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7383
7384 RTTI rewrite to initialize nodes as needed, not require that
7385 users #include <typeinfo>, complete functionality and reduce wasted
7386 space.
7387 * rtti.c (init_rtti_processing): New fn.
7388 (build_typeid): The vtable entry is now a function.
7389 (get_tinfo_var): New fn.
d11ad92e 7390 (get_tinfo_fn): Likewise.
6b5fbb55
MS
7391 (get_typeid): Use it.
7392 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
7393 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
7394 points __rtti_*.
7395 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
7396 (synthesize_tinfo_fn): New fn.
7397 * method.c (build_t_desc_overload): Lose.
7398 (build_overload_with_type): More generic.
7399 * decl.c (init_decl_processing): Call init_rtti_processing.
7400 * class.c (set_rtti_entry): Use get_tinfo_fn.
7401 * decl2.c (mark_vtable_entries): Mark the rtti function.
7402 (finish_prevtable_vardecl): Don't build_t_desc.
7403 (import_export_decl): Handle tinfo functions.
d11ad92e 7404 (finish_file): Likewise.
6b5fbb55
MS
7405 * typeck.c (inline_conversion): New fn.
7406 (build_function_call_real): Use it.
7407 * cp-tree.h: Add decls.
7408
7409 * method.c (hack_identifier): Also convert component_refs from
eb66be0e 7410 references.
6b5fbb55
MS
7411
7412 * lex.c (cons_up_default_function): Use the type, not the name, in
eb66be0e 7413 declspecs.
6b5fbb55
MS
7414
7415 * decl2.c (import_export_vtable): Fix weak vtables.
7416
7417Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
7418
7419 * search.c (get_base_distance_recursive): Fix access checks for
eb66be0e 7420 protected bases.
6b5fbb55
MS
7421
7422Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7423
7424 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
7425 cp-tree.h.
7426 (convert_harshness): Add prototypes wrapped by PROTO.
7427 * decl2.c (grok_function_init): Likewise.
7428 (do_toplevel_using_decl): Change to void return type.
7429 * class.c (build_vtable_entry): Remove decl of make_thunk.
7430 (merge_overrides): Fix order of arg definitions.
7431 (finish_vtbls): Likewise.
7432 (fixup_vtable_deltas): Likewise.
7433 (modify_all_direct_vtables): Likewise.
7434 (modify_all_indirect_vtables): Likewise.
7435 * search.c (get_base_distance_recursive): Likewise.
7436 (get_abstract_virtuals_1): Likewise.
7437 (fixup_virtual_upcast_offsets): Likewise.
7438 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
7439 * init.c (perform_member_init): Fix order of arg definitions.
7440 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
7441 * cp-tree.h (make_thunk): Add decl.
7442 (overload_template_name, push_template_decl): Add decls.
7443 (do_toplevel_using_decl): Change to void return type.
7444 (vec_binfo_member): Add decl.
7445
cdf5b885
MS
7446Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7447
7448 * typeck.c (mark_addressable, convert_for_assignment,
7449 convert_for_initialization, pointer_int_sum, pointer_diff,
7450 unary_complex_lvalue): Add prototypes wrapped by PROTO.
7451 (convert_sequence): #if 0 fn decl, since definition also is.
7452
7453Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
7454
7455 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
7456 cast to pointer types for type searching.
7457
7458Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7459
7460 * typeck.c (get_delta_difference): Use cp_error, not error, in the
7461 case where BINFO == 0.
7462
7463Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
7464
7465 * call.c (build_method_call): Fix wording of error messages so
7466 constructors come out right.
7467
7468Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
7469
7470 * decl.c (push_overloaded_decl): Don't warn about hidden
7471 constructors when both the type and the function are declared
7472 in a system header file.
7473
c91a56d2
MS
7474Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
7475
7476 * class.c (finish_struct_1): Propagate the TYPE_PACKED
7477 flag for the type to the type's fields.
7478
7479Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7480
7481 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
7482
7483Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
7484
7485 * class.c (base_info, finish_base_struct): Replace
7486 needs_virtual_dtor with base_has_virtual.
7487
7488 (finish_struct_1): Remove the old code that tried to make default
eb66be0e
MS
7489 destructors virtual. Use base_has_virtual when checking if we need
7490 to add a vtable entry for the rtti code.
c91a56d2
MS
7491
7492Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
7493
7494 * pt.c (push_template_decl): Complain about template decl with
eb66be0e 7495 inappropriate declaration.
c91a56d2
MS
7496
7497Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
7498
7499 * typeck.c (build_x_unary_op): Remove bogus check for taking
7500 the address of a member function.
7501
7502Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
7503
7504 * parse.y (constructor_declarator): Only push the class if
7505 we are not already in the class.
7506
7507Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
7508
7509 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
7510 Add additional argument to INIT_CUMULATIVE_ARGS.
7511
c91a56d2
MS
7512Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
7513
7514 * decl.c (shadow_tag): Fix error about anon union with methods.
7515
7516 * parse.y (self_reference): Only generate a self-reference if this
eb66be0e 7517 is a non-template class.
c91a56d2
MS
7518 (opt.component_decl_list): Only use it if it was generated.
7519
7520 * parse.y (component_decl_1): Use constructor_declarator.
d11ad92e
MS
7521 (fn.def2): Likewise.
7522 (notype_component_declarator0): Likewise.
c91a56d2
MS
7523
7524Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
7525
7526 * typeck.c (build_x_unary_op): Add checks for taking the address
7527 of a TARGET_EXPR or of a member function, and give appropriate
7528 warnings.
7529
7530Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
7531
7532 * pt.c (process_template_parm): Allow template type parms to be
eb66be0e 7533 used as types for template const parms.
c91a56d2
MS
7534
7535Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
7536
7537 * init.c (expand_vec_init): Ensure the eh cleanups are on the
7538 function_obstack.
7539
7540Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
7541
7542 * decl.c (lookup_name_real): Be even more picky about the
eb66be0e 7543 ambiguous lookup warning.
c91a56d2
MS
7544 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
7545 * parse.y (constructor_declarator): Rather than here.
7546
7547 * parse.y (constructor_declarator): New nonterminal.
7548 (fn.def1): Use it.
d11ad92e 7549 (explicit_instantiation): Likewise.
c91a56d2
MS
7550
7551Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7552
7553 Add implicit declaration of class name at class scope.
7554 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
7555 * parse.y (self_reference): New nonterminal.
7556 (opt.component_decl_list): Use it.
7557 (fn.def1): Add nested_name_specifier type_name cases.
7558 * class.c (build_self_reference): New function.
7559 (finish_struct): Handle access_default later, move self-reference
7560 decl to the end.
7561 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
7562 * cp-tree.h: Adjust.
7563
7564 * pt.c (do_function_instantiation): Separate handling of member
eb66be0e 7565 functions and non-member functions properly.
c91a56d2
MS
7566
7567Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
7568
7569 * pt.c (process_template_parm): Improve error for 'volatile class K'.
7570
7571 * class.c (finish_struct_1): Check the right slot for destructors.
7572
7573 * decl.c (start_enum): Complain about enum templates.
7574
7575Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
7576
7577 * init.c (resolve_offset_ref): Offset pointers to member data by one.
d11ad92e 7578 * typeck.c (unary_complex_lvalue): Likewise.
c91a56d2
MS
7579
7580Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
7581
7582 * typeck.c (c_expand_return): Check for a returned local
7583 array name, similar to the check for an ADDR_EXPR.
7584
7585Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
7586
7587 * decl.c (cp_finish_decl): Don't build cleanups for static
eb66be0e 7588 variables here.
c91a56d2
MS
7589
7590Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
7591
7592 * typeck.c (build_modify_expr): Fix error messages to be more
7593 accurate.
7594 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
7595 assignment operators.
d11ad92e 7596 * error.c (assop_as_string): Likewise. Add support for `%Q' for
c91a56d2
MS
7597 assignment operators.
7598
909e536a
MS
7599Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
7600
c91a56d2 7601 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
eb66be0e
MS
7602 give an error if initialized. Pedwarn about nested type with the
7603 same name as its enclosing class.
c91a56d2 7604
909e536a
MS
7605 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
7606
7607 * typeck.c (require_complete_type): Be sure to instantiate the
eb66be0e 7608 MAIN_VARIANT of the type.
909e536a
MS
7609
7610 * decl2.c (finish_file): Instantiate pending templates before
eb66be0e 7611 processing static constructors and destructors.
909e536a
MS
7612
7613 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
eb66be0e 7614 unless at_eof.
909e536a
MS
7615
7616Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
7617
7618 * decl2.c (delete_sanity): If error_mark_node is passed
7619 in as an expression, quit while we're ahead.
7620
7621 * decl.c (grokdeclarator): Give an error message if `friend'
7622 is combined with any storage class specifiers.
7623
fc378698
MS
7624Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
7625
7626 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
eb66be0e 7627 definition of nonexistent nested type.
fc378698
MS
7628
7629 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
eb66be0e 7630 not to say 'typedef'.
fc378698
MS
7631
7632Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7633
7634 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
7635 * search.c (dfs_walk, dfs_init_vbase_pointers,
7636 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
7637 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
7638
7639Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
7640
7641 * except.c (build_throw): Support minimal parse.
7642 * pt.c (tsubst_copy): Support THROW_EXPR.
d11ad92e 7643 * decl2.c (build_expr_from_tree): Likewise.
fc378698
MS
7644
7645 * pt.c (mangle_class_name_for_template): Always allocate
eb66be0e 7646 scratch_firstobj.
fc378698
MS
7647
7648Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
7649
7650 * cvt.c (cp_convert_to_pointer): Give an appropriate error
7651 when trying to cast from an incomplete type.
7652
7653Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7654
7655 * pt.c (instantiate_class_template): Don't bother setting up
eb66be0e
MS
7656 CLASSTYPE_TAGS explicitly, as the nested types will add
7657 themselves.
fc378698
MS
7658
7659Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
7660
7661 * decl.c (shadow_tag): Remove old error check for usage of
7662 an enum without a previous declaration.
7663 (xref_tag): Add error message about usage of enums without a
7664 previous declaration.
7665
7666Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
7667
7668 * lex.c (do_identifier): Only do name consistency check if we're
eb66be0e 7669 parsing.
fc378698
MS
7670
7671 * pt.c (push_template_decl): Don't crash if we get a member defn
7672 that doesn't match.
7673
7674 * decl.c (xref_tag_from_type): New function to do an xref without
eb66be0e 7675 always having to figure out code_type_node.
fc378698
MS
7676 * cp-tree.h: Declare it.
7677 * pt.c (instantiate_class_template): Use it for friend classes.
eb66be0e 7678 (lookup_template_class): Use it.
fc378698
MS
7679
7680 * typeck2.c (build_functional_cast): Pull out a single parm before
eb66be0e 7681 passing it to build_c_cast.
fc378698
MS
7682
7683Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
7684
7685 * expr.c (do_case): Give an error message if a pointer is
7686 given as a case value.
7687
7688Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
7689
7690 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
eb66be0e 7691 an overload list.
fc378698
MS
7692
7693 * lex.c (cons_up_default_function): Really, now, interface hackery
eb66be0e 7694 does not apply to synthesized methods.
fc378698
MS
7695
7696Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
7697
7698 * call.c (build_method_call): Ctors and dtors now have special names
7699 with respect to lookups.
d11ad92e
MS
7700 * class.c (add_method): Likewise.
7701 (grow_method): Likewise.
7702 (finish_struct_methods): Likewise.
7703 (warn_hidden): Likewise.
7704 (finish_struct_1): Likewise.
7705 * cvt.c (convert_to_reference): Likewise.
7706 (convert_to_aggr): Likewise.
7707 (cp_convert): Likewise.
7708 * decl2.c (check_classfn): Likewise.
7709 * init.c (expand_member_init): Likewise.
7710 (expand_default_init): Likewise.
7711 (expand_aggr_init_1): Likewise.
7712 (build_offset_ref): Likewise.
7713 (build_new): Likewise.
7714 (build_delete): Likewise.
7715 * lex.c (do_inline_function_hair): Likewise.
7716 * search.c (lookup_field_1): Likewise.
7717 (lookup_fnfields_here): Likewise.
7718 (lookup_field): Likewise.
7719 (lookup_fnfields): Likewise.
7720 (get_virtual_destructor): Likewise.
7721 (dfs_debug_mark): Likewise.
7722 (dfs_pushdecls): Likewise.
7723 (dfs_compress_decls): Likewise.
7724 * tree.c (layout_basetypes): Likewise.
7725 * typeck.c (build_component_ref): Likewise.
7726 (build_x_function_call): Likewise.
7727 (build_modify_expr): Likewise.
7728 (convert_for_initialization): Likewise.
7729 (build_functional_cast): Likewise.
7730 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
fc378698
MS
7731 (CTOR_NAME): New.
7732 (DTOR_NAME): New.
7733 * decl.c (ctor_identifier): New.
7734 (dtor_identifier): New.
7735 (init_decl_processing): Set them.
7736
7737Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
7738
7739 * typeck.c (build_component_ref): Don't get confused by fields whose
7740 context has no type name, like pointer to member functions.
7741
7742Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
7743
7744 * decl.c (grokdeclarator): Handle typedef without declarator.
7745
7746 * pt.c (tsubst): Handle SCOPE_REF in declarator.
7747
7748 * parse.y (bad_parm): Catch another case of missing `typename'.
7749
7750 * lex.c (yyprint): Handle TYPE_DECLs.
7751
7752 * decl.c (start_function): Don't try to be clever.
7753
7754 * lex.c: Lose compiler_error_with_decl.
7755 * typeck2.c: Lose error_with_aggr_type.
7756 (incomplete_type_error): Use cp_* instead of old functions.
d11ad92e
MS
7757 (readonly_error): Likewise.
7758 * typeck.c (convert_arguments): Likewise.
7759 * search.c (lookup_nested_field): Likewise.
7760 * method.c (make_thunk): Likewise.
7761 * decl.c (grokparms): Likewise.
fc378698
MS
7762 * cp-tree.h: Update.
7763
7764 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
eb66be0e 7765 and value.
fc378698
MS
7766
7767Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
7768
7769 * method.c (build_opfncall): When deleting a pointer to an
7770 array, build a new pointer to the tree past any ARRAY_TYPE
7771 nodes.
7772
7773Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7774
7775 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
7776
7777Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
7778
7779 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
eb66be0e 7780 and ! DECL_INLINE.
fc378698
MS
7781
7782 * decl.c (finish_function): Don't set nested based on
eb66be0e 7783 hack_decl_function_context.
fc378698 7784 * parse.y (function_try_block): Check for nested function.
d11ad92e 7785 (pending_inlines): Likewise.
fc378698
MS
7786
7787 * decl2.c (build_expr_from_tree): If a unary op already has a
eb66be0e 7788 type, just return it.
fc378698
MS
7789
7790 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
7791
7792 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
7793 (finish_file): Check the return value of walk_vtables.
7794 (finish_prevtable_vardecl): Return int.
d11ad92e
MS
7795 (finish_vtable_vardecl): Likewise.
7796 (prune_vtable_vardecl): Likewise.
7797 * lex.c (set_vardecl_interface_info): Likewise.
fc378698
MS
7798 * cp-tree.h: Adjust return types.
7799
7800 * class.c (delete_duplicate_fields_1): Don't complain about
eb66be0e 7801 duplicate nested types if they're the same type.
fc378698
MS
7802 (finish_struct): Remove check for duplicate.
7803 * decl2.c (grokfield): Don't check for typedef of anonymous type.
7804
7805Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
7806
7807 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
7808
7809 * decl.c (grokdeclarator): Lose special handling of class-level
eb66be0e
MS
7810 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
7811 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
fc378698
MS
7812
7813 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
7814
7815 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
7816
7817 * search.c (compute_access): Fix handling of anonymous union
eb66be0e 7818 members.
fc378698 7819 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
eb66be0e 7820 from anonymous unions to their members.
fc378698
MS
7821
7822 * typeck.c (build_x_function_call): For static member functions,
eb66be0e 7823 hand off to build_member_call.
fc378698
MS
7824
7825Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
7826
7827 * typeck.c (build_component_ref): Handle OFFSET_REFs.
7828
7829 * init.c (expand_vec_init): Fix init == 0 case.
7830
7831Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
7832
7833 * init.c (build_new): Pedwarn about init and array new.
eb291d05 7834 (expand_vec_init): Handle lists, use convert_for_initialization.
fc378698
MS
7835
7836 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
eb66be0e 7837 when converting to an aggregate type.
fc378698
MS
7838 * cvt.c (cp_convert): Pass it through.
7839
7840 * typeck.c (build_conditional_expr): Handle user-defined
eb66be0e 7841 conversions to slightly different types.
fc378698
MS
7842
7843 * decl.c (grokdeclarator): Force an array type in a parm to be
eb66be0e 7844 permanent.
fc378698
MS
7845
7846 * decl2.c (do_using_directive): Sorry.
d11ad92e 7847 (do_namespace_alias): Likewise.
fc378698
MS
7848 * lex.c (real_yylex): Warn about using the `namespace' keyword.
7849
7850Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
7851
7852 * parse.y (datadef): Move call to note_list_got_semicolon up.
7853
934c6b13
MS
7854Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
7855
7856 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
7857
7858Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
7859
7860 * decl.c (cp_finish_decl): The exception regions have to be
7861 nested, not overlapping. We start the exception region for a
7862 decl, after it has been fully built, and all temporaries for it
7863 have been cleaned up.
7864
7865Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
7866
7867 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
7868
e76a2646
MS
7869Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
7870
7871 * tree.def: Add RETURN_INIT.
7872 * pt.c (instantiate_decl): Handle RETURN_INIT.
7873 * decl.c (store_return_init): Handle minimal_parse_mode.
7874
7875 * tree.c (cp_build_type_variant): Just return an error_mark_node.
7876 * decl.c (make_typename_type): Don't try to get the file and line
eb66be0e 7877 of an identifier.
e76a2646
MS
7878 * typeck.c (comptypes): Handle TYPENAME_TYPE.
7879
7880Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
7881
7882 * decl.c (poplevel): Make sure we clear out and restore old local
7883 non-VAR_DECL values by default when they go out of scope.
7884
7885Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
7886
7887 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
eb66be0e 7888 referring to addresses of variables and functions.
e76a2646
MS
7889
7890 * error.c (dump_expr): Support SIZEOF_EXPR.
7891
7892 * init.c (do_friend): Use the return value of check_classfn.
7893
7894 * typeck.c (convert_arguments): Call complete_type.
7895
7896 * method.c (hack_identifier): After giving an error, set value to
eb66be0e 7897 error_mark_node.
e76a2646
MS
7898
7899Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
7900
7901 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
eb66be0e 7902 lossage for local classes.
e76a2646
MS
7903 * cp-tree.h: Declare it.
7904 * decl.c (lookup_name_real): Evil, painful hack for local classes.
7905 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
7906 Use hack_decl_function_context.
7907 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
7908 (start_function): Use hack_decl_function_context.
d11ad92e
MS
7909 (finish_function): Likewise.
7910 * method.c (synthesize_method): Likewise.
7911 * lex.c (process_next_inline): Likewise.
7912 (do_pending_inlines): Likewise.
e76a2646 7913 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
eb66be0e 7914 done with it.
e76a2646
MS
7915
7916Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
7917
7918 * sig.c (build_signature_pointer_or_reference_type): Align
7919 signature pointers/references on 8-byte boundaries so they can be
7920 grabbed 2 words at a time on a Sparc.
7921
7922Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
7923
7924 * method.c (hack_identifier): Requiring a static chain is now a
eb66be0e 7925 hard error.
e76a2646 7926 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
eb66be0e 7927 functions.
e76a2646
MS
7928
7929Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7930
7931 * init.c (build_offset_ref): Call complete_type.
7932
7933 * decl.c (pop_from_top_level): Always pop previous_class_type.
7934
7935 * parse.y: Handle multiple decls in a for-init-statement.
d11ad92e 7936 * pt.c (tsubst_expr): Likewise.
e76a2646
MS
7937
7938 * pt.c (tsubst): Use tsubst_expr for the second operand of an
eb66be0e 7939 ARRAY_REF.
e76a2646
MS
7940
7941 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
7942 (poplevel_class): Set it here.
7943 (pop_from_top_level): Pop it here if we're returning to class scope.
7944 * class.c (pushclass): Don't set it here.
7945
7946 * decl.c (maybe_push_to_top_level): Save current_template_parms,
eb66be0e 7947 and clear it if !pseudo.
e76a2646
MS
7948 (pop_from_top_level): Restore it.
7949
7950 * decl2.c (finish_file): Push the dummy each time we walk the list
eb66be0e 7951 of vtables.
e76a2646
MS
7952
7953 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
eb66be0e 7954 something for CAST_EXPR.
e76a2646
MS
7955
7956Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
7957
7958 * cvt.c (cp_convert): Warn about implicit conversion of the
7959 address of a function to bool, as it is always true.
7960
7961Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
7962
7963 * typeck.c (c_expand_return): Fix warning for local externs returned.
7964
7965Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
7966
7967 * tree.c (mapcar): Propagate const and volatile properly.
7968
7969 * typeck.c (complete_type): Be sure to instantiate the
eb66be0e 7970 MAIN_VARIANT of the type.
e76a2646
MS
7971
7972 * method.c (synthesize_method): Class interface hackery does not
7973 apply to synthesized methods.
7974
7975Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
7976
7977 * pt.c (comp_template_args): Use comptypes rather than just
eb66be0e 7978 checking for TEMPLATE_TYPE_PARM equivalence.
e76a2646
MS
7979
7980 * typeck.c (build_x_function_call): Call complete_type before
eb66be0e 7981 checking TYPE_OVERLOADS_CALL_EXPR.
e76a2646 7982
7ea63af7
MH
7983Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
7984
7985 * g++.c (main): Check also for new define ALT_LIBM.
7986
ec255269
MS
7987Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7988
7989 * pt.c (instantiate_class_template): If we don't have a pattern
eb66be0e 7990 yet, that's OK.
ec255269
MS
7991 (coerce_template_parms): If we see a local class, bail.
7992
7993 * decl.c (grok_reference_init): Make sure there's a type before
eb66be0e 7994 checking its code.
ec255269
MS
7995
7996 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
d11ad92e 7997 (push_template_decl): Likewise.
ec255269
MS
7998
7999 * parse.y (named_class_head): Set
eb66be0e 8000 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
ec255269
MS
8001
8002 * decl.c (xref_tag): Diagnose redeclaration of template
eb66be0e 8003 type-parameter name.
ec255269
MS
8004
8005 * error.c (dump_type): Handle anonymous template type parms.
8006
8007 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
eb66be0e 8008 TYPE_STUB_DECL.
d11ad92e 8009 (coerce_template_parms): Likewise.
ec255269
MS
8010
8011Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
8012
8013 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
8014 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
8015
8016Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
8017
8018 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
eb66be0e 8019 before trying to get its STUB_DECL.
d11ad92e 8020 (coerce_template_parms): Likewise.
ec255269
MS
8021
8022 * parse.y (template_type_parm): If they didn't use 'class',
eb66be0e 8023 pretend they did after giving an error.
ec255269
MS
8024
8025 * pt.c (coerce_template_parms): Diagnose use of local class.
8026
8027 * decl.c (grok_reference_init): Use instantiate_type.
8028
8029 * error.c (dump_expr): Handle TEMPLATE_DECLs.
8030
8031 * parse.y (named_class_head): Diagnose mismatching types and tags.
8032
8033 * decl.c (pushdecl): Type decls and class templates clash with
eb66be0e 8034 artificial type decls, not hide them.
ec255269
MS
8035
8036 * decl.c (redeclaration_error_message): Diagnose redefinition of
eb66be0e 8037 templates properly.
ec255269
MS
8038 (duplicate_decls): Diagnose disallowed overloads for template
8039 functions, too.
8040
8041 * decl.c (start_decl): Call complete_type before checking for a
eb66be0e 8042 destructor.
ec255269
MS
8043
8044 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
8045
8046 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
8047
5566b478
MS
8048Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8049
ec255269 8050 * decl.c (grok_op_properties): Don't check for operator++(int) in
eb66be0e 8051 a template.
ec255269
MS
8052
8053 * tree.c (perm_manip): Return a copy of variable and function
eb66be0e 8054 decls with external linkage.
ec255269
MS
8055
8056 * tree.def: Change some of the min tree codes to type "1".
8057 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
8058 * method.c (build_overload_int): Emit something arbitrary for
eb66be0e 8059 anything but an INTEGER_CST if we're in a template.
ec255269
MS
8060
8061 * decl.c (cp_finish_decl): Call complete_type before deciding
eb66be0e 8062 whether or not to lay out the decl.
ec255269 8063
5566b478
MS
8064 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
8065
8066Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
8067
8068 * typeck2.c (build_x_arrow): Call complete_type.
8069
8070 * pt.c (add_pending_template): Broken out.
eb66be0e
MS
8071 (lookup_template_class): If -fexternal-templates, call it for all
8072 the methods of implemented types.
5566b478
MS
8073 (instantiate_class_template): Instead of instantiating them here.
8074 (instantiate_decl): Handle -fexternal-templates earlier.
8075
8076Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8077
8078 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
8079 memoized lookup stuff inside GATHER_STATISTICS.
8080
8081Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
8082
8083 * decl.c (start_decl): Complain about array of incomplete type
8084 here.
8085 (grokdeclarator): Not here.
8086
8087 * parse.y (template_parm): Expand full_parm inline so we can set
eb66be0e 8088 the rule's precedence.
5566b478
MS
8089
8090 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
8091 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
8092 * decl2.c (grokbitfield): Don't check for integer constant here.
8093 * class.c (finish_struct_1): Check here.
8094
8095 * decl.c (define_label): Make the min decl go on permanent_obstack.
8096
8097 * pt.c (unify): Don't handle CONST_DECLs.
8098 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
d11ad92e 8099 (tsubst_copy): Likewise.
5566b478
MS
8100
8101 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
eb66be0e 8102 CONST_DECL for a template parm.
5566b478
MS
8103
8104Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
8105
8106 * decl.c (grokdeclarator): Complain about array of incomplete type
8107 here.
8108 (start_decl_1): Not here.
8109
8110 * pt.c (tsubst): Handle pointer-to-function declarators.
8111
8112 * method.c (hack_identifier): If pedantic, diagnose local class
eb66be0e 8113 methods that require a static chain.
5566b478
MS
8114
8115 * decl.c (grok_op_properties): No longer static.
8116 * cp-tree.h: Declare it.
8117 * pt.c (tsubst): Call it for operators.
8118 Use tsubst_copy for TREE_VECs.
8119
8120 * parse.y (template_arg): The expr has precedence like '>'.
8121
8122Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
8123
8124 * pt.c (coerce_template_parms): Don't coerce an expression using
eb66be0e 8125 template parms.
5566b478
MS
8126 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
8127 (tsubst): Don't use build_index_2_type if the max_value uses template
8128 parms.
8129 * method.c (build_overload_int): Emit something arbitrary for an
eb66be0e 8130 expression using template parms.
5566b478
MS
8131
8132 * parse.y (template_close_bracket): New non-terminal to catch use
eb66be0e 8133 of '>>' instead of '> >' in template class names.
5566b478
MS
8134 (template_type): Use it.
8135 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
8136
8137 * tree.def: Add CAST_EXPR.
8138 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
eb66be0e 8139 CONVERT_EXPR for minimal_parse_mode.
d11ad92e
MS
8140 * typeck.c (build_c_cast): Likewise.
8141 * pt.c (tsubst_copy): Likewise.
8142 * decl2.c (build_expr_from_tree): Likewise.
8143 * error.c (dump_expr): Likewise.
5566b478
MS
8144
8145Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8146
8147 * except.c (SetTerminate, SetUnexpected): Put back global vars.
8148 (init_exception_processing): Put back decl/init of
8149 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
8150 fns from libstdc++.
8151
8152 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
8153 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
8154 Delete unused fns.
8155 * cp-tree.h (declare_uninstantiated_type_level,
8156 uninstantiated_type_level_p): Delete prototypes.
8157
8158Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
8159
8160 * pt.c (tsubst_expr): Add default return.
8161
8162Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8163
8164 * error.c (fndecl_as_string): Delete unused arg CNAME.
8165 * sig.c (build_signature_table_constructor,
8166 build_signature_method_call): Fix calls.
8167
8168 * class.c (the_null_vtable_entry): Delete var definition.
8169 (init_class_processing): Delete tree the_null_vtable_entry init.
8170 * decl.c (no_print_{functions, builtins}): Declare as static.
8171 (__tp_desc_type_node): #if 0 var definition.
8172 (init_type_desc): #if 0 init of __tp_desc_type_node.
8173 (vb_off_identifier): Move var decl into init_decl_processing.
8174 (current_function_assigns_this): Declare as static.
8175 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
8176 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
8177 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
8178 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
8179 * init.c (BI_header_type, BI_header_size): Declare as static.
8180 * pt.c (template_classes): Delete unused var.
8181 (add_pending_template): Delete decl for non-existent fn.
8182 (lookup_template_class): Delete vars CODE and TAG_CODE.
8183 (instantiate_template): Delete unused var TARGS.
8184 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
8185 Delete decls.
8186 (__tp_desc_type_node): #if 0 var decl.
8187 (fndecl_as_string): Fix prototype.
8188
8189Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
8190
8191 * tree.def: Add GOTO_STMT.
8192 * pt.c (tsubst_expr): Support goto and labels.
8193 * decl.c (define_label): Support minimal parsing.
d11ad92e 8194 * parse.y (simple_stmt): Likewise.
5566b478
MS
8195
8196Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8197
8198 * xref.c (GNU_xref_member): Only define/set var I if
8199 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
8200 used.
8201 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
8202 (GNU_xref_end): Fix call.
8203 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
8204 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
8205
8206 * tree.c (build_exception_variant): Delete unused vars I, A, T,
8207 T2, and CNAME.
8208 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
8209 (mapcar): Delete unused var CODE.
8210 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
8211 (break_out_cleanups): Fix call.
8212 (bot_manip): Likewise.
8213 * call.c (build_method_call): Likewise.
8214 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
8215 Likewise.
8216 * typeck.c (unary_complex_lvalue, build_modify_expr,
8217 convert_for_initialization): Likewise.
8218 * typeck2.c (build_functional_cast): Likewise.
8219 * cp-tree.h (build_cplus_new): Fix prototype.
8220
8221 * repo.c (open_repo_file): Delete unused var Q.
8222 (repo_compile_flags, repo_template_declared,
8223 repo_template_defined, repo_class_defined, repo_inline_used,
8224 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
8225 (repo_get_id, repo_vtable_used): Declare as static.
8226 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
8227 prototypes.
8228
8229Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
8230
8231 * parse.y (pending_inlines): Add function_try_block case.
8232
8233 * pt.c (unify): Fix for template const parms.
8234
8235Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8236
8237 * lex.c (extract_interface_info): Delete forward decl.
8238 (default_copy_constructor_body, default_assign_ref_body): Delete
8239 decls for non-existent functions.
8240 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
8241 (init_lex): Delete setting them.
8242 (cons_up_default_function): Delete unused vars FUNC_BUF,
8243 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
8244 #if 0'd synth code.
8245 (toplevel, expression_obstack): Delete unused extern decls.
8246 (tree_node_kind): Delete unused enum.
8247 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
8248 GATHER_STATISTICS.
8249 (tree_node_kind_names): Delete unused extern decl.
8250 (synth_obstack): Delete unused var.
8251 (init_lex): Don't set it.
8252 (init_parse): Add decl before use.
8253 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
8254 (current_unit_{name, language}): Delete unused vars.
8255 (check_newline): Don't bother setting them, just accept the #pragma.
8256 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
8257 (current_unit_{name, language}): Delete decls.
8258
8259 * search.c: Wrap all of the memoized functions, macros, and
8260 variables inside #ifdef GATHER_STATISTICS.
8261 (lookup_field, lookup_fnfields): Likewise.
8262 (init_search_processing): Likewise.
8263 (reinit_search_statistics): Wrap whole function.
8264 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
8265
8266 * decl.c (finish_function): Only call pop_memoized_context if
8267 GATHER_STATISTICS is defined.
8268 (start_function): Likewise for push_memoized_context.
8269 * class.c (pushclass, popclass): Likewise.
8270
8271 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
8272 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
8273
8274 * cvt.c (cp_convert): Delete unused local var FORM.
8275 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
8276 prototypes.
8277
8278Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8279
8280 * pt.c (do_poplevel): Oops; really return what we get from
eb66be0e 8281 poplevel this time.
5566b478
MS
8282
8283Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8284
8285 * cp-tree.h (is_aggr_type): Add prototype.
8286
8287 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
8288 * method.c ({push,pop}_cp_function_context): Delete decls.
8289 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
8290 (SetUnexpected, SetTerminate): Delete unused vars.
8291 (init_exception_processing): Don't set SetUnexpected or
8292 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
8293 (output_exception_table_entry): Delete unused array LABEL.
8294 (expand_internal_throw): Delete unused var PARAMS.
8295 (expand_start_catch_block): Delete unused var CLEANUP.
8296 (emit_exception_table): Delete unused var EH_NODE_DECL.
8297 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
8298 GOTO_UNWIND_AND_THROW. Don't set them.
8299 (end_eh_unwinder): Add top decl.
8300 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
8301 (exception_section, push_rtl_perm, do_function_call,
8302 lang_interim_eh, push_eh_cleanup, eh_outer_context,
8303 expand_end_eh_spec, end_eh_unwinder): Declare as static.
8304 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
8305 throw_used): Likewise.
8306 * cp-tree.h (expand_end_eh_spec): Delete prototype.
8307
8308 * search.c (dfs_mark, dfs_mark_vtable_path,
8309 dfs_unmark_vtable_path, dfs_mark_new_vtable,
8310 dfs_unmark_new_vtable, dfs_clear_search_slot,
8311 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
8312 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
8313 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
8314 functions.
8315 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
8316 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
8317 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
8318 Only define #ifdef GATHER_STATISTICS.
8319 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
8320 is defined.
8321 (vbase_decl): Delete var definition.
8322 (init_search): Delete old decl.
8323 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
8324 never actually used.
8325 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
8326 (get_base_distance_recursive): Delete unused fourth arg
8327 BASETYPE_PATH. Fix call .
8328 (get_base_distance): Fix call.
8329 (push_class_decls): Delete unused var ID.
8330 (make_memoized_table_entry): Declare as static.
8331 (breadth_first_search): Declare as static.
8332 (tree_has_any_destructor_p): Declare as static.
8333 (pop_class_decls): Delete unused arg pop_class_decls.
8334 * class.c (popclass): Fix call to pop_class_decls.
8335 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
8336 tree_has_any_destructor_p): Delete prototypes.
8337
8338 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
8339 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
8340 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
8341 (build_user_desc): Delete unused var T.
8342 (build_class_desc): Delete unused vars T and OFF.
8343 (build_t_desc): Delete unused var NAME_STRING.
8344 (build_headof): Make static.
8345 (get_bad_cast_node): Likewise.
8346 (get_def_to_follow): Likewise.
8347 * cp-tree.h (init_type_desc): Add prototype.
8348 (build_headof): Remove prototype.
8349
8350Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
8351
8352 * pt.c (tsubst): Only look for matching decls at file scope for
eb66be0e 8353 non-member functions.
5566b478
MS
8354
8355 * call.c (build_scoped_method_call): Handle scoped destructor
eb66be0e 8356 calls in templates.
5566b478
MS
8357
8358 * decl.c (*_top_level): Also save previous_class_values.
8359
8360 * pt.c (tsubst_expr): Support do {} while loops.
d11ad92e
MS
8361 * parse.y (simple_stmt): Likewise.
8362 * tree.def: Likewise.
5566b478
MS
8363
8364 * method.c (build_overload_identifier): For a class nested in a
eb66be0e
MS
8365 template class, don't mangle in the template parms from our
8366 context.
5566b478
MS
8367
8368 * lex.c, cp-tree.h: Remove support for template instantiations in
eb66be0e 8369 the pending_inlines code.
5566b478
MS
8370 * pt.c: Remove dead functions and unused arguments.
8371 (uses_template_parms): TYPENAME_TYPEs always use template parms.
8372 * parse.y: Stop passing anything to end_template_decl.
8373 * tree.c (print_lang_statistics): Only print tinst info #ifdef
eb66be0e 8374 GATHER_STATISTICS.
5566b478
MS
8375
8376Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8377
8378 * init.c (expand_recursive_init{,_1}): Delete decls.
8379 (sort_member_init): Delete unused var INIT.
8380 (emit_base_init): Delete unused var X.
8381 (build_offset_ref): Delete unused var CNAME.
8382 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
8383 (emit_base_init): Delete unused local var BASE. Delete extern
8384 decl of IN_CHARGE_IDENTIFIER.
8385 (build_delete): Delete unused local var VIRTUAL_SIZE.
8386
8387 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
8388 (build_delete): Fix call.
8389 * decl2.c (delete_sanity): Likewise.
8390 * cp-tree.h (build_vec_delete): Update prototype.
8391
8392 * typeck.c (common_base_type): Delete unused var TMP.
8393 (build_binary_op): Delete local var ARGS_SAVE.
8394 (build_array_ref): Delete unused var ITYPE.
8395 (c_expand_return): Delete unused var USE_TEMP.
8396
8397 * typeck.c (compexcepttypes): Delete unused arg STRICT.
8398 (comptypes): Fix calls.
8399 * decl.c (duplicate_decls): Likewise.
8400 * cp-tree.h (compexcepttypes): Delete extra arg.
8401
8402 * decl2.c (check_classfn): Delete unused second arg CNAME.
8403 * decl.c (start_decl, grokfndecl): Fix calls.
8404 * init.c (do_friend): Likewise.
8405 * cp-tree.h (check_classfn): Update prototype.
8406
8407 * cp-tree.h (signature_error, import_export_vtable,
8408 append_signature_fields, id_in_current_class, mark_used,
8409 copy_assignment_arg_p): Add decls.
8410 * decl2.c (mark_used): Delete decl.
8411
8412 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
8413
8414 * class.c (get_vtable_entry): Diable unused function.
8415 (doing_hard_virtuals): Delete unused static global var.
8416 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
8417 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
8418 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
8419 (modify_one_vtable): Delete unused var OLD_RTTI.
8420 (finish_struct_anon): Delete unused vars OFFSET and X.
8421 (finish_struct_bits): Delete unused var METHOD_VEC.
8422 (get_basefndecls): Delete unused var PURPOSE. Delete unused
8423 for-scope local variable METHODS.
8424
8425 * call.c (user_harshness): Delete unused/unneeded arg PARM.
8426 (ideal_candidate): Delete unused args BASETYPE and PARMS.
8427 (build_method_call): Delete unused args passed into ideal_candidate.
8428 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
8429 * cp-tree.h (synthesize_method): Add decl.
8430
8431 * decl.c (note_level_for_for): Give void return type.
8432 (pushdecl_nonclass_level): Likewise.
8433 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
8434 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
8435 (suspend_binding_level): Delete unused var LEVEL.
8436 (duplicate_decls): Delete unused var CTYPE.
8437 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
8438 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
8439 PTR_ENDLINK.
8440 (grokdeclarator): Delete unused var C.
8441 (grokdeclarator): Delete unused var SIZE_VARIES.
8442 (grokparms): Delete unused var SAW_VOID.
8443 (start_function): Delete unused var OLDDECL.
8444 (cplus_expand_expr_stmt): Delete unused var
8445 REMOVE_IMPLICIT_IMMEDIATELY.
8446
8447 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
8448
8449 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
8450
8451Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
8452
8453 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
d11ad92e 8454 (build_min_nt): Likewise.
5566b478
MS
8455 * pt.c (do_pushlevel): Emit line note.
8456 (do_poplevel): Return what we get from poplevel.
8457 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
8458 * parse.y: Use do_pushlevel and do_poplevel.
8459 * cp-tree.h: Declare do_poplevel.
8460
8461 * cp-tree.h: Declare at_eof.
8462 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
8463 * decl2.c (import_export_decl): Renamed from import_export_inline.
8464 (finish_file): Call it to do interface handling for statics.
8465 * pt.c (tsubst_copy): Call mark_used on variables and functions
eb66be0e 8466 used here.
5566b478
MS
8467
8468 * decl2.c (finish_file): Don't emit statics we can't generate.
8469 * pt.c (instantiate_decl): Don't set interface on instantiations
eb66be0e 8470 we can't generate.
5566b478
MS
8471
8472 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
8473 * tree.c (print_lang_statistics): Print max template depth.
8474 * pt.c (push_tinst_level): Dump entire instantiation context.
8475 (instantiate_class_template): Use it and pop_tinst_level.
d11ad92e 8476 (instantiate_decl): Likewise.
5566b478
MS
8477
8478 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
eb66be0e 8479 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
5566b478
MS
8480
8481Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
8482
8483 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
eb66be0e
MS
8484 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
8485 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
8486 the new template implementation.
5566b478
MS
8487
8488Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8489
8490 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
8491
cffa8729
MS
8492Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
8493
8494 * decl.c (cp_finish_decl): Delay emitting the debug information for
8495 a typedef that has been installed as the canonical typedef, if the
8496 type has not yet been defined.
8497
8498Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
8499
8500 * decl2.c (grokfield): Still call pop_nested_class for access decls.
8501
8502Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8503
8504 * decl.c (lookup_label): Call label_rtx.
8505
8506 * decl.c (make_binding_level): New function.
8507 (pushlevel, pushlevel_class): Call it instead of explicit
8508 duplicate calls to xmalloc.
8509
8510 * decl.c (init_decl_processing): Delete useless build_pointer_type
8511 call.
8512
8513 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
8514 (sizet_ftype_string): Delete variable.
8515 (init_decl_processing): Add built-in functions fabsf, fabsl,
8516 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
8517 variable strlen_ftype, used for strlen.
8518
8519Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
8520
8521 * decl.c (push_to_top_level): Start from current_binding_level
eb66be0e
MS
8522 again for now; the stl hacks depend on g++ being broken in this
8523 way, and it'll be fixed in the template rewrite.
cffa8729
MS
8524
8525 * tree.def: Add USING_DECL.
8526 * decl2.c (do_class_using_decl): Implement.
8527 (grokfield): Pass access decls off to do_class_using_decl instead of
8528 grokdeclarator.
8529 * error.c (dump_decl): Handle USING_DECLs.
8530 * decl.c (grokdeclarator): Remove code for handling access decls.
8531 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
eb66be0e 8532 as access decls for now.
cffa8729
MS
8533 (finish_struct): Don't check USING_DECLs for other uses of the name.
8534
8535 * search.c (get_matching_virtual): Use cp_error_at.
8536
8537Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8538
8539 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
8540 match c-typeck.c.
8541 (self_promoting_args_p): Move the check that TYPE is non-nil
8542 before trying to look at its main variant.
8543 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
8544
8545 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
8546 Delete macros.
8547 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
8548 (do_friend): Delete call to xref_friend.
8549 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
8550
8551 * typeck.c (convert_sequence): #if 0 unused function.
8552
8553 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
8554 be in decl_in_memory_p.
8555 (decl_in_memory_p): Delete decl.
8556 * expr.c (decl_in_memory_p): Delete fn.
8557 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
8558
8559 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
8560
8561Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
8562
8563 * class.c (finish_struct_1): Check for a pure-specifier on a
eb66be0e 8564 non-virtual function here.
cffa8729
MS
8565
8566 * decl2.c (grok_function_init): Don't check whether the function
eb66be0e 8567 is virtual here.
cffa8729
MS
8568 (grokfield): Don't call check_for_override here.
8569
8570 * decl.c (push_to_top_level): Start from inner_binding_level,
eb66be0e 8571 check class_shadowed in class levels.
cffa8729
MS
8572
8573Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
8574
8575 * decl.c (resume_level): Ignore things that don't have names, instead
8576 of core dumping.
8577
8578Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8579
8580 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
8581
8582Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
8583
8584 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
eb66be0e 8585 synthesized dtor.
cffa8729
MS
8586
8587 * parse.y (complete_type_name): Bind global_scope earlier.
d11ad92e 8588 (complex_type_name): Likewise.
cffa8729
MS
8589 (qualified_type_name): Remove.
8590
2ee887f2
MS
8591Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
8592
8593 * decl.c (grokfndecl): Move code that looks for virtuals in base
eb66be0e 8594 classes...
cffa8729 8595 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
8596 (finish_struct_1): Call it.
8597
8598 * cp-tree.h: Declare warn_sign_compare.
8599
8600 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
eb66be0e
MS
8601 rather than extra_warnings to decide whether to warn about
8602 comparison of signed and unsigned.
2ee887f2
MS
8603
8604 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
eb66be0e 8605 implies -Wsign-compare. -Wall doesn't imply -W.
2ee887f2
MS
8606
8607Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
8608
8609 * typeck.c (build_component_ref): Fix to handle anon unions in base
8610 classes as well.
8611
8612Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8613
8614 * class.c (resolves_to_fixed_type_p): Delete code dealing with
8615 a WITH_CLEANUP_EXPR, since we don't generate them any more.
8616 * cvt.c (build_up_reference): Likewise.
8617 * decl.c (grok_reference_init): Likewise.
8618 (cp_finish_decl): Likewise.
8619 * error.c (dump_expr): Likewise.
8620 * tree.c (real_lvalue_p): Likewise.
8621 (lvalue_p): Likewise.
8622 (build_cplus_new): Likewise.
8623 (unsave_expr_now): Likewise.
8624 * typeck.c (unary_complex_lvalue, build_modify_expr,
8625 c_expand_return): Likewise.
8626
8627Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8628
8629 Make the C++ front-end pay attention to attributes for structures.
8630 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
8631 finish_struct_1.
eb66be0e 8632 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
2ee887f2
MS
8633 Take out old round_up_size use and setting the DECL_ALIGN possibly
8634 using it. Take out setting of TYPE_ALIGN to round_up_size, which
8635 can override what the attribute set.
8636 * cp-tree.h (finish_struct): Update prototype.
8637 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
8638 attributes to finish_struct.
8639 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
8640 value down into finish_struct.
8641 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
8642
8643Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
8644
8645 * decl.c (poplevel): Re-word dead for local handling.
8646 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
8647 (cp_finish_decl): If is_for_scope, check for duplicates so
8648 we can disable is_for_scope. Otherwise, preserve_temp_slots.
8649
8650 * lex.c (do_identifier): Use global binding in preference of
8651 dead for local variable.
8652
8653Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
8654
8655 * init.c (initializing_context): Handle anon union changes, the
8656 context where fields of anon unions can be initialized now has to be
8657 found by walking up the TYPE_CONTEXT chain.
8658
8659Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
8660
8661 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
8662 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
8663 (obscure_complex_init): If bss is supported, always set
8664 DECL_INITIAL to error_mark_node.
8665
8666Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8667
8668 * init.c (is_friend): Make sure there's a context before we see if
8669 it's an aggr type.
8670
8671Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
8672
8673 * init.c (is_friend): Classes are not friendly with nested classes.
8674
8675Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
8676
8677 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
8678 and record its result.
8679
9e9ff709
MS
8680Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
8681
8682 * class.c (finish_struct_anon): Switch around code to not move anon
8683 union elements around, nor mess up their contexts, nor offsets,
8684 instead we now build up the right number of COMPONENT_REFs for all
8685 the anon unions that may be present at build_component_ref time.
8686 * typeck.c (lookup_anon_field): New routine to handle field lookup
8687 on fields without names. We find them, based upon their unique type
8688 instead.
8689 * typeck.c (build_component_ref): Allow FIELD_DECL components.
8690 Handle finding components in anonymous unions, and ensure that a
8691 COMPONENT_REF is built for each level as necessary.
8692
8693Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
8694
8695 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
8696 code that ensures that copy ctors are used if appropriate.
8697
8698Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8699
8700 * init.c (build_vec_delete): Only give an error if base isn't an
8701 error_mark_node.
8702
8703Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
8704
8705 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
8706 (yylex): If we see `new', keep slurping.
8707
8708Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
8709
8710 * class.c (finish_struct_1): Move code for handling anon unions...
8711 (finish_struct_anon): to here. Fixup so that we do the offset
8712 calculations right, and so that the fields are physically moved to
8713 the containers's chain.
8714
8715Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8716
8717 * decl.c (grokdeclarator): Avoid trying to get an operand off an
8718 identifier node.
8719
8720Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
8721
8722 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
8723 POINTER_SIZE to agree with expr.c.
8724
8725Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
8726
8727 * search.c (lookup_field): Don't report ambiguities if protect is 0,
8728 instead return NULL_TREE.
8729
8730Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
8731
8732 * class.c (finish_struct_1): Call warn_hidden if we want warnings
8733 about overloaded virtual functions.
8734 (warn_hidden): New routine to warn of virtual functions that are
8735 hidden by other virtual functions, that are not overridden.
8736 (get_basefndecls): New routine, used by warn_hidden.
8737 (mark_overriders): New routine, used by warn_hidden.
8738 * search.c (get_matching_virtual): Remove old warning that just
8739 isn't very useful.
8740
8741Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8742
8743 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
8744
8745 * typeck.c (null_ptr_cst_p): Delete unused fn.
8746 (build_function_call_maybe): Delete unused fn.
8747
8748 * expr.c (extract_init): #if 0 the code after unconditional return 0
8749 for now.
8750
8751 Delete old cadillac code.
8752 * edsel.c: Remove file.
8753 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
8754 * Makefile.in (CXX_OBJS): Delete edsel.o.
8755 (edsel.o): Delete rule.
8756 * cp-tree.h (flag_cadillac): Delete var decl.
8757 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
8758 * decl2.c (flag_cadillac): Delete var definition.
8759 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
8760 (grokfield): Delete code depending on flag_cadillac.
8761 (finish_anon_union): Likewise.
8762 * class.c (finish_struct_1): Likewise.
8763 (pushclass): Likewise.
8764 (popclass): Likewise.
8765 (push_lang_context): Likewise.
8766 (pop_lang_context): Likewise.
8767 * decl.c (init_decl_processing): Likewise.
8768 (start_decl): Likewise.
8769 (cp_finish_decl): Likewise.
8770 (xref_tag): Likewise.
8771 (finish_enum): Likewise.
8772 (start_function): Likewise.
8773 (finish_function): Likewise.
8774 (finish_stmt): Likewise.
8775 * lex.c (lang_init): Likewise.
8776 (check_newline): Likewise.
8777
8778 * lex.c (do_pending_inlines): Delete synthesized method kludge.
8779
8780 Delete defunct, ancient garbage collection implementation.
8781 * rtti.c: New file with the RTTI stuff from gc.c.
8782 * gc.c: Removed file (moved the remaining stuff into rtti.c).
8783 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
8784 (rtti.o): New rule, replacing gc.o.
8785 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
8786 * cp-tree.h: Delete gc-related fn decls.
8787 (DECL_GC_OFFSET): Delete macro.
8788 (flag_gc): Delete extern decl.
8789 * decl.c (current_function_obstack_index): Delete var decl.
8790 (current_function_obstack_usage): Delete var decl.
8791 (start_function): Delete clearing of current_function_obstack_index
8792 and current_function_obstack_usage.
8793 (init_decl_processing): Delete code relying on -fgc.
8794 Delete call to init_gc_processing.
8795 (cp_finish_decl): Delete calls to build_static_gc_entry and
8796 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
8797 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
8798 and to expand_expr of a __gc_main call.
8799 (maybe_gc_cleanup): Delete var decl.
8800 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
8801 * decl2.c (flag_gc): Delete var decl.
8802 (lang_f_options): Delete offering of -fgc.
8803 (lang_decode_option): Delete -fgc and -fno-gc handling.
8804 (get_temp_regvar): Delete gc code.
8805 * init.c (build_new): Delete gc code.
8806 * lex.c (init_lex): Delete checking of flag_gc.
8807
8808 * typeck.c (convert_arguments): Delete gc code.
8809 (build_component_addr): Delete -fgc warning.
8810 (build_modify_expr): Delete gc code.
8811
8812 * decl2.c (build_push_scope): Delete fn.
8813 * cp-tree.h (build_push_scope): Delete decl.
8814
8815 * search.c (clear_search_slots): Delete fn.
8816 * cp-tree.h (clear_search_slots): Delete decl.
8817
8818 * search.c (tree_needs_constructor_p): Delete fn.
8819 * cp-tree.h (tree_needs_constructor_p): Delete decl.
8820
8821 * tree.c (id_cmp): Delete fn.
8822
8823 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
8824 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
8825
8826 * tree.c (decl_value_member): Delete fn.
8827 * cp-tree.h (decl_value_member): Delete decl.
8828
8829 * tree.c (list_hash_lookup_or_cons): Delete fn.
8830 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
8831
8832 * method.c (cplus_exception_name): Delete fn.
8833 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
8834
8835 * spew.c (shift_tokens): Delete fn.
8836
8837Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
8838
8839 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
8840 to cp_finish_decl.
d11ad92e 8841 * parse.y: Likewise.
9e9ff709
MS
8842
8843Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8844
8845 * tree.c (build_cplus_staticfn_type): Delete function definition;
8846 never used.
8847 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
8848
8849 * tree.c (virtual_member): Delete function definition; never used.
8850 * cp-tree.h (virtual_member): Delete decl.
8851
45537677
MS
8852Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
8853
8854 * typeck.c (build_component_ref): Handle getting vbase pointers
8855 out of complex multiple inheritance better.
8856
8857Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
8858
8859 * typeck.c (build_object_ref): Make sure we use the real type, not
8860 any reference type.
8861
8862Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
8863
8864 * tree.c (build_exception_variant): Don't create new types if we
8865 don't have to, also build new types on the right obstack.
8866
8867Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
8868
8869 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
8870 (push_to_top_level): Call it for b->type_shadowed on class binding
8871 levels.
45537677
MS
8872
8873Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
8874
8875 * search.c (expand_upcast_fixups): Fix so that offsets stored in
8876 vbase_offsets are always right. Fixes a problem where virtual base
8877 upcasting and downcasting could be wrong during conversions on this
8878 during virtual function dispatch at ctor/dtor time when dynamic
8879 vtable fixups for deltas are needed. This only sounds easier than
8880 it is. :-)
8881 (fixup_virtual_upcast_offsets): Change to reflect new calling
8882 convention for expand_upcast_fixups.
8883
8884Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8885
8886 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
8887 check that it's usable as the bitfield width.
8888
8889Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8890
8891 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
8892 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
8893 only ever used for functions in it.
8894
8895Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
8896
8897 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
d11ad92e 8898 (nested_type): Likewise.
45537677
MS
8899 (nested_name_specifier): Use lastiddecl.
8900
8901 * decl.c (grokdeclarator): Adjust accordingly.
d11ad92e
MS
8902 * init.c (expand_member_init): Likewise.
8903 * parse.y (base_class): Likewise.
8904 * typeck2.c (build_functional_cast): Likewise.
45537677
MS
8905
8906 * typeck2.c (build_functional_cast): Fill in name after we've
8907 checked for non-aggr type.
8908
be99da77
MS
8909Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
8910
8911 * decl2.c (warn_pointer_arith): Default to on.
8912
8913Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
8914
8915 * lex.c (is_rid): New function.
8916 * decl.c (grokdeclarator): Diagnose reserved words used as
8917 declarator-ids.
8918
8919Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
8920
8921 * tree.c (get_decl_list): Don't lose cv-quals.
8922
8923 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
8924 typespecs used as declarator-ids.
8925
8926Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
8927
8928 * decl.c (poplevel): When poping a level, don't give a warning for
8929 any subblocks that already exist.
8930
8931Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
8932
8933 * typeck.c (build_object_ref): Finish what I started.
8934
8935 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
8936
8937 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
8938
8939 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 8940 scope.
be99da77
MS
8941
8942Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
8943
8944 * decl.c (xref_tag): Handle passing a type in directly.
8945
8946 * parse.y (qualified_type_name): Pull out the type.
d11ad92e 8947 (nested_type): Likewise.
be99da77
MS
8948 Take types directly instead of as identifiers.
8949 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709 8950 as identifiers.
d11ad92e
MS
8951 * decl.c (xref_basetypes): Likewise.
8952 * init.c (expand_member_init): Likewise.
8953 (build_member_call): Likewise.
8954 (build_offset_ref): Likewise.
8955 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
8956 * method.c (do_build_assign_ref): Likewise.
be99da77
MS
8957 * decl.c (grokdeclarator): Handle a type appearing as the
8958 declarator-id for constructors.
8959 * method.c (do_build_copy_constructor): current_base_init_list now
8960 uses the types directly, not their names.
d11ad92e
MS
8961 * init.c (sort_base_init): Likewise.
8962 (expand_member_init): Likewise.
be99da77 8963 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77 8964
d11ad92e 8965Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
be99da77
MS
8966
8967 * tree.c (layout_basetypes): Call build_lang_field_decl instead
8968 of build_lang_decl if first arg is a FIELD_DECL.
be99da77
MS
8969
8970Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8971
8972 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
8973 non-empty.
8974 * except.c (expand_start_catch_block): Set TREE_USED to avoid
8975 warnings about the catch handler.
8976
8977Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
8978
8979 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 8980 expand_target_expr.
be99da77
MS
8981
8982Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
8983
8984 Fix access control to use trees rather than integers.
8985 * class.c (access_{default, public, protected, private,
8986 default_virtual, public_virtual, private_virtual}_node): Add
8987 definitions.
8988 (init_class_processing): Do creation of those nodes.
8989 * cp-tree.h (access_type): Delete enum decl.
8990 (access_{default, public, protected, private, default_virtual,
8991 public_virtual, private_virtual}_node): Add decls.
8992 (compute_access): Change return type.
8993 * search.c (compute_access): Have tree return type, instead of enum.
8994 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
8995 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
8996 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
8997 * parse.y (VISSPEC): Make ttype rather than itype.
8998 (base_class_access_list): Likewise.
8999 * *.[cy]: Change all refs of `access_public' to `access_public_node',
9000 etc.
9001 * call.c (build_method_call): Make ACCESS be a tree.
9002 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
9003 * cvt.c (convert_to_aggr): Likewise.
9004 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
9005 Likewise.
9006 * method.c (hack_identifier): Likewise.
9007 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
9008
9009Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
9010
9011 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
9012 frontend, and make it more consistent with respect to
9013 warn_pointer_arith.
9014
9015Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
9016
9017 * decl.c (pushdecl): Check for duplicate parameter names.
9018
9019Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
9020
9021 * decl.c (expand_static_init): Call assemble_external for atexit.
9022
9023Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
9024
9025 * except.c (do_unwind): Remove some generated dead code.
9026 (eh_outer_context): New routine, factor out some common code from
9027 expand_builtin_throw and end_eh_unwinder. Add code to do return
9028 address masking for the PA.
9029 (expand_builtin_throw): Use eh_outer_context instead of open coding
9030 it here.
d11ad92e 9031 (end_eh_unwinder): Likewise.
be99da77
MS
9032
9033Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
9034
9035 * except.c (expand_throw): Call assemble_external for __empty, if we
9036 use it.
9037
21451173
MS
9038Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
9039
9040 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
9041 NORMAL_RETURN_ADDR_OFFSET.
d11ad92e 9042 (end_eh_unwinder): Likewise.
21451173
MS
9043
9044Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
9045
9046 * gc.c (build_dynamic_cast): Make sure we don't cast away const
9047 when dealing with references, and make sure we handle dynamic
9048 casting to a cv qualified reference.
9049
9050Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
9051
9052 * except.c (struct eh_context): New structure top hold eh context
9053 information.
9054 (push_eh_context): New routine.
d11ad92e 9055 (pop_eh_context): Likewise.
21451173 9056 * decl.c (push_cp_function_context): Use them.
d11ad92e 9057 (pop_cp_function_context): Likewise.
21451173
MS
9058
9059Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
9060
9061 * decl2.c (finish_file): Also prune uninteresting functions in the
9062 inline emission loop.
9063
d11ad92e 9064Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21451173
MS
9065
9066 * sig.c (build_signature_table_constructor): Mark functions
9067 in the signature as referenced.
9068
9069Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
9070
9071 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
9072 the inline emission stuff.
9073
72b7eeff
MS
9074Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
9075
9076 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 9077 weak symbols.
72b7eeff
MS
9078 * lang-options.h: Add -f{no-,}weak.
9079 * decl.c (init_decl_processing): If the target does not support weak
9080 symbols, don't use them.
9081 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
9082
9083Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
9084
9085 * init.c (expand_member_init): warning for base init after members.
9086
72b7eeff
MS
9087Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
9088
9089 * cvt.c (build_expr_type_conversion): Don't convert to a reference
9090 type.
9091
9092Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
9093
9094 * method.c (report_type_mismatch): Improve wording for volatile
9095 mismatches.
9096
9097Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
9098
9099 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 9100 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
9101 copy constructors well. The compiler would do bitwise copying,
9102 instead of ctor calling in some cases.
9103
9104Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
9105
9106 * g++.c (my_strerror): Return "cannot access" if errno is 0.
9107 (pfatal_with_name, perror_exec): Don't assume that
9108 the returned value from my_strerror contains no '%'s.
9109 (concat): Remove.
9110 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
9111
9112Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
9113
9114 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
9115 TYPE_METHODS/TREE_CHAIN mean what they used to.
9116 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
9117 instead of TYPE_METHODS.
9118 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
d11ad92e 9119 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
72b7eeff
MS
9120 * cp-tree.h (CLASSTYPE_METHODS): Lose.
9121 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
9122 TYPE_METHODS.
9123 (struct lang_decl): Lose next_method field.
9124 (DECL_NEXT_METHOD): Lose.
9125 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
9126 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
9127 anymore.
9128 (finish_struct_methods): Don't mess with the TREE_CHAINs in
9129 fn_fields.
9130
9131 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
9132 vector.
9133
9134 * call.c (build_method_call): Synthesize here even when not inlining.
d11ad92e 9135 * typeck.c (build_function_call_real): Likewise.
72b7eeff
MS
9136
9137Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
9138
9139 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
9140 == DBX_DEBUG, call dbxout_start_new_source_file and
9141 dbxout_resume_previous_source_file when appropriate.
9142
9143Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
9144
9145 * except.c (start_anon_func): Push to the top level.
9146 (end_anon_func): Pop from the top level.
9147
9148Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
9149
9150 * cp-tree.h (build_cleanup): New routine to build cleanups.
9151 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
9152 call at ctor time and use atexit to run it later.
9153 * decl2.c (build_cleanup): New routine, taken from finish_file.
9154 (finish_file): Use build_cleanup instead, and don't put function
9155 local statics in global dtor list.
9156
9157Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
9158
9159 * except.c (expand_throw): Ensure that we have cleanups, if we try
9160 and expand cleanups.
9161
9162Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
9163
9164 * except.c (expand_throw): Add logic to manage dynamic cleanups for
9165 the EH object.
9166 (expand_end_catch_block): Use the magic of expand_goto, instead of
9167 emit_jump so that we get the cleanup for any catch clause parameter
9168 and the cleanup for the exception object. Update to reflect label
9169 changes.
9170 (push_eh_cleanup): New routine to register a cleanup for an
9171 exception object.
9e9ff709 9172 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
9173 nothing.
9174 (init_exception_processing): Setup empty_fndecl. Setup
9175 saved_cleanup.
9176 (expand_start_catch_block): Update to reflect label changes. Call
9177 push_eh_object to register the cleanup for the EH object.
9178 (start_anon_func): New routine to start building lambda expressions
9179 from trees.
9180 (end_anon_func): New routine to end them.
9181 (struct labelNode): Change so that we can use tree labels, or rtx
9182 labels.
9183 (saved_cleanup): Object to check for dynamic cleanups for the
9184 exception handling object.
9185 (push_label_entry): Change so that we can use tree labels, or rtx
9186 labels.
d11ad92e
MS
9187 (pop_label_entry): Likewise.
9188 (top_label_entry): Likewise.
72b7eeff
MS
9189 (expand_start_all_catch): Use tree label instead of rtx label, so
9190 that we can get the magic of expand_goto.
9191 (expand_end_all_catch): Update to reflect label changes.
9192
9193 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
9194 use UNSAVE_EXPRs.
9195 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
9196 building_cleanup logic, as we now use UNSAVE_EXPRs.
9197 * cp-tree.h (unsave_expr): Declare it.
9198 * decl.c (building_cleanup): Remove.
9199 (maybe_build_cleanup): Remove building_cleanup logic, and use
9200 UNSAVE_EXPR instead.
9201
9202Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
9203
9204 * gc.c (build_t_desc): Update error message to say <typeinfo>.
9205
9206Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9207
9208 * decl.c (pushdecl): Only warn about shadowing a local variable if
9209 warn_shadow is true.
9210
9211Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
9212
9213 * typeck.c (build_binary_op_nodefault): Added warning about
9214 comparisons between different enum types with -Wall, unless
9215 -fenum-int-equiv set.
9216
9217Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
9218
9219 * class.c (finish_struct_1): Skip down to the inner type in
9220 multidimensional arrays. Ensures ctors will be made for types that
9221 need constructing.
9222
9223Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
9224
9225 * decl.c (last_dtor_insn): New to track the last compiler generated
9226 insn in a dtor.
9227 (store_parm_decls): Set it.
9228 (finish_function): Use it to see if the dtor is empty. Avoid doing
9229 vtable setup all the time, if we can.
9230 (struct cp_function): Add last_dtor_insn.
9231 (push_cp_function_context): Save it.
9232 (pop_cp_function_context): Restore it.
9233
9234Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
9235
9236 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 9237 warnings.
72b7eeff
MS
9238
9239Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
9240
9241 * typeck.c (expand_target_expr): Make sure targets get put into the
9242 current temp_slot_level, so that the free_temp_slots call will reuse
9243 them.
9244
9245Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
9246
9247 * class.c (finish_struct_1): Delay delta fixups for virtual bases
9248 until after we have done the hard virtuals, to avoid a bogus `every
9249 virtual function must have a unique final overrider' for virtual
9250 functions that are only overridden by hard virtuals.
9251
9252Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
9253
9254 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 9255 template for a member function.
72b7eeff
MS
9256
9257Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
9258
9259 * g++.c (main): Add handling of -nodefaultlibs.
9260
9261Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
9262
9263 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
9264 distinguish between direct bindings of reference variables, and
9265 indirect bindings of reference variables.
9266 * cvt.c (build_up_reference): Use it.
9267 * typeck.c (convert_arguments): Use it to indicate this is an
9268 indirect binding.
9269 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
9270 as they are unused.
d11ad92e
MS
9271 (expand_static_init): Likewise.
9272 (cplus_expand_expr_stmt): Likewise.
9273 * decl2.c (finish_file): Likewise.
9274 * init.c (perform_member_init): Likewise.
9275 (emit_base_init): Likewise.
9276 (expand_aggr_vbase_init_1): Likewise.
72b7eeff 9277
72b7eeff
MS
9278Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9279
9280 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
9281 get a DECL_LANG_SPECIFIC node.
9282 * cp-tree.h (lang_decl_flags): Add new member `level'.
9283 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
9284 decl_flags level member.
9285
9286Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9287
9288 * call.c (build_method_call): Make sure instance has a
9289 TYPE_LANG_SPECIFIC node before we dive into it.
9290
d11ad92e 9291Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
72b7eeff
MS
9292
9293 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
9294
9295Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
9296
9297 * decl.c (duplicate_decls): When smashing decls, smash staticness in
9298 the usual way.
9299
9300Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
9301
9302 * decl.c (poplevel): Handle the merging of subblocks of cleanups
9303 when finishing blocks that have already been created (usually due to
9304 the fixup goto code). Fixes bad debugging information.
9305
9306Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
9307
9308 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
9309 that's not a list of overloaded functions.
9310
9311Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9312
9313 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
9314 before trying to use DECL_ABSTRACT_VIRTUAL_P.
9315
9316Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
9317
9318 * decl2.c (mark_used): New function for hooking into setting of
9319 TREE_USED on decls.
9320 * call.c (build_method_call): Use it.
d11ad92e
MS
9321 * class.c (instantiate_type): Likewise.
9322 * init.c (build_offset_ref): Likewise. Don't call assemble_external
72b7eeff 9323 for all like-named functions.
d11ad92e 9324 * method.c (hack_identifier): Likewise.
72b7eeff
MS
9325 (emit_thunk): Don't call assemble_external.
9326 (make_thunk): Create thunk as a FUNCTION_DECL so that it
9327 gets the right mode and ENCODE_SECTION_INFO works.
9328
9329 * parse.y: Use mark_used. Pass operator names to do_identifier.
9330 * lex.c (do_identifier): Handle operator names.
9331
9332 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
9333
72b7eeff
MS
9334Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9335
9336 * errfn.c: Include stdio.h.
9337 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
9338
9339Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
9340
9341 * typeck2.c (digest_init): Always convert initializers to the
9342 right type.
9343
9344Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
9345
9346 * init.c (member_init_ok_or_else): Don't allow member initializers
9347 for indirect members, as it is invalid.
9348
9349Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9350
9351 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
9352
9353Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
9354
9355 * parse.y (for.init.statement): Catch compound statements inside for
9356 initializations, if we're being pedantic.
9357
9358Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
9359
9360 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
9361 looking for.
9362
9363Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
9364
9365 * error.c (dump_expr): Don't core dump when a boolean expression is
9366 used as a default argument.
9367
9368Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
9369
9370 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 9371 RETURN_IN_MEMORY.
72b7eeff
MS
9372
9373Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
9374
9375 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
9376 BLKmode type that would otherwise be returned in registers.
9377
9378Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9379
9380 * g++.c (WITHLIBC): New macro.
9381 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
9382 saw_libc and pass it at the end if it was set.
9383
9384Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
9385
9386 * parse.y (fn.def1): Call split_specs_attrs in
9387 declmods notype_declarator case.
7b8dd497
JL
9388\f
9389Use a consistent time stamp format in ChangeLog entries.
9390Not everyone has Emacs 20 yet, so stick with Emacs 19 format for now.
9391
9392Local Variables:
9393add-log-time-format: current-time-string
9394End:
This page took 1.322492 seconds and 5 git commands to generate.