Various fixes for -Wall problems from Kaveh. See ChangeLog for details.
[gcc.git] / gcc / cp / ChangeLog
1 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2
3 * call.c (user_harshness): Initialize `code' to 0.
4 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
5 (null_ptr_cst_p): Add parentheses around && within ||.
6 (standard_conversion): Likewise.
7 (z_candidate): Likewise.
8 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
9 (build_object_call): Likewise for `mem_args'.
10 (build_new_op): Likewise for `mem_arglist'. Add `return' from
11 default case in enumeration switch.
12
13 * class.c (build_vtable_entry): Add explicit braces to avoid
14 ambiguous `else'.
15 (build_class_init_list): Likewise.
16 (finish_struct_1): Initialize `width' to 0.
17 (instantiate_type): Initialize `name' to NULL_TREE. Add
18 explicit braces to avoid ambiguous `else'.
19
20 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
21 `else'.
22
23 * decl.c (grok_reference_init): Eliminate unused parameter, all
24 callers changed.
25 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
26 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
27 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
28 (grokdeclarator): Add parentheses around && within ||. Add
29 explicit braces to avoid ambiguous `else'.
30 (grokparms): Initialize `type' to NULL_TREE.
31 (xref_tag): Remove unused label `just_return'.
32 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
33 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
34 (hack_incomplete_structures): Add parentheses around assignment
35 used as truth value.
36
37 * decl2.c (coerce_delete_type): Hide definition of `e3'.
38
39 * error.c: Include <stdlib.h>.
40 (dump_expr): Change the type of `i' to size_t. Remove unused
41 label `error'.
42
43 * except.c (init_exception_processing): Remove unused variable `d'.
44 (expand_throw): Likewise for `label'.
45
46 * friend.c (add_friends): Add explicit braces to avoid ambiguous
47 `else'.
48
49 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
50 (sort_base_init): Likewise for `binfo'.
51 (expand_member_init): Likewise for `rval'.
52 (build_member_call): Add parentheses around assignment used as
53 truth value.
54 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
55 (build_new): Initialize `nelts' to NULL_TREE. Initialize
56 `old_immediate_size_expand' to 0.
57 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
58 (build_vec_delete_1): Remove unused variable `block'.
59 (expand_vec_init): Initialize `itype' to NULL_TREE.
60
61 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
62 declaration of `index' and `rindex' with autoconf macros.
63 (reinit_parse_for_expr): Remove unused variables
64 `look_for_semicolon' and `look_for_lbrac'.
65 (cons_up_default_function): Initialize `args' to NULL_TREE.
66 (readescape): Initialize `firstdig' to 0.
67 (real_yylex): Add parentheses around assignment used as truth value.
68
69 * method.c: Include <strings.h> if we don't have <string.h>.
70 Protect declaration of `index' with autoconf macro.
71
72 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
73 Initialize `type' to NULL_TREE.
74 (structsp): Remove unused variable `id'.
75
76 * pt.c (coerce_template_parms): Add explicit braces to avoid
77 ambiguous `else'.
78 (lookup_template_class): Initialize `template' to NULL_TREE.
79 (instantiate_class_template): Remove unused variable `name' and `e'.
80 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
81 (do_poplevel): Initialize `saved_warn_unused' to 0.
82 (type_unification): Remove unused varable `parm'.
83 (unify): Likewise for `j'.
84
85 * repo.c (init_repo): Add parentheses around assignment used as
86 truth value.
87 (finish_repo): Remove unused varable `p'.
88
89 * search.c (get_binfo): Initiize `type' to NULL_TREE.
90 (get_base_distance): Likewise.
91 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
92 and `new_v' to NULL_TREE.
93 (lookup_fnfields): Likewise for `rval_binfo_h'.
94 (breadth_first_search): Add parentheses around assignment used as
95 truth value.
96 (get_template_base): Initialize `type' to NULL_TREE.
97
98 * sig.c (append_signature_fields): Initialize `last_mfptr' to
99 NULL_TREE.
100 (build_signature_table_constructor): Likewise for
101 `last_rhs_field', `pfn' and `vt_off'.
102 (build_sigtable): Likewise for `init'.
103
104 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
105 (propagate_binfo_offsets): Likewise for `delta'.
106 (hash_tree_cons): Initialize hashcode to 0.
107 (can_free): Likewise for `size'.
108 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
109
110 * typeck.c (convert_sequence): Hide prototype.
111 (common_type): Add explicit braces to avoid ambiguous `else'.
112 (comp_target_types): Likewise.
113 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
114 (build_function_call_real): Add explicit braces to avoid ambiguous
115 `else'.
116 (convert_arguments): Initialize `called_thing' to 0.
117 (convert_for_initialization): Initialize `savew' and `savee' to 0.
118
119 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
120 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
121 (build_x_arrow): Likewise for `last_rval'.
122
123 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
124
125 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
126
127 * decl.c (init_decl_processing): Use set_sizetype.
128 * decl2.c (sizetype): Don't declare.
129 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
130 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
131 (build_component_addr, unary_complex_lvalue): Likewise.
132 * rtti.c (expand_class_desc): Likewise.
133 * class.c (get_vfield_offset): Likewise.
134
135 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
136
137 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
138 early to avoid bogus error. Handle overloaded function
139 names provided as template arguments correctly.
140 (coerce_template_parms): Don't mishandle overloaded functions when
141 dealing with template template parameters.
142 (lookup_template_class): Issue an error message, rather than
143 crashing, when the TYPE_DECL provided is not a template type.
144
145 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
146
147 * class.c (instantiate_type): Don't just return a known type if
148 it's wrong.
149
150 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
151
152 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
153 since that code could never be reached.
154
155 * error.c (dump_decl): Avoid aborting in the midst of printing an
156 error message about an illegal template declaration.
157
158 * parse.y (structsp): Print an error message, rather than crashing,
159 when a class-head does not name a class.
160
161 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
162 template arguments as a g++ extension.
163
164 * cp-tree.def (ALIGNOF_EXPR): New tree code.
165 * decl2.c (grok_alignof): If processing_template_decl, just store
166 the expression.
167 * typeck.c (c_alignof): Likewise.
168 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
169 * error.c (dump_expr): Likewise.
170 * pt.c (tsubst_copy): Likewise.
171 * tree.c (cp_tree_equal): Likewise.
172 * pt.c (uses_template_parms): Correctly determine whether or not a
173 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
174 folding can be done.
175
176 * cp-tree.h (grok_enum_decls): Remove type parameter.
177 * decl.c (grok_enum_decls): Likewise.
178 * decl2.c (grok_x_components): Call grok_enum_decls
179 unconditionally, since it will do nothing if there is no
180 current_local_enum. Use the new calling sequence.
181 * pt.c (tsubst_enum): Use the new calling sequence for
182 grok_enum_decls.
183
184 * decl.c (start_function): Make member functions of local classes
185 in extern inline functions have comdat linkage here...
186 (grokdeclarator): Rather than here.
187
188 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
189
190 * pt.c (convert_nontype_argument): Use decl_constant_value.
191
192 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
193
194 * call.c (add_template_candidate_real): New function.
195 (add_template_candidate): Use it.
196 (add_template_conv_candidate): Likewise.
197 (joust): Pass extra argument to more_specialized.
198 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
199 (is_local_class): Remove.
200 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
201 * cp-tree.h (is_local_class): Remove.
202 (perform_array_to_pointer_conversion): Likewise.
203 (finish_member_template_decl): Add.
204 (check_explicit_specialization): Return a tree, not an int.
205 (more_specialized): Take additional argument.
206 (get_bindings): Likewise.
207 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
208 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
209 (perform_array_to_pointer_conversion): Remove.
210 * decl.c (saved_scope): Add processing_specialization,
211 processing_explicit_instantiation fields.
212 (maybe_push_to_top_level): Save them.
213 (pop_from_top_level): Restore them.
214 (grokfndecl): Use new return value from
215 check_explicit_specialization.
216 (start_decl): Don't check flag_guiding_decls before pushing
217 decls.
218 (cp_finish_decl): Remove previous (bogus) change.
219 (grok_declarator): Use decl_function_context rather than
220 is_local_class.
221 * decl2.c (finish_file): Pass extra argument to get_bindings.
222 (build_expr_from_tree): Let build_x_component_ref check
223 validity of arguments rather than doing it here.
224 * lex.c (cons_up_default_function): Remove code fooling with
225 processing_specialization, processing_explicit_instantiation
226 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
227 * method.c (build_overload_identifier): Mangle local classes in
228 template functions correctly.
229 * parse.y (finish_member_template_decl): Move to pt.c.
230 * pt.c (finish_member_template_decl): Moved here from parse.y.
231 (print_candidates): New function.
232 (determine_specialization): Change interface. Properly look for
233 most specialized versions of template candidates.
234 (check_explicit_specialization): Fully process explicit
235 instantiations.
236 (push_template_decl): Avoid looking at CLASSTYPE fields in
237 FUNCTION_DECLS.
238 (determine_overloaded_function): Remove.
239 (convert_nontype_argument): Change name from
240 convert_nontype_parameter. Use determine_overloaded_function
241 instead of instantiate_type.
242 (mangle_class_name_for_template): Handle type contexts as well as
243 function contexts.
244 (classtype_mangled_name): Likewise.
245 (lookup_template_class): Likewise.
246 (tsubst): Likewise.
247 (more_specialized): Take explict template arguments as a
248 parameter.
249 (most_specialized): Likewise.
250 (get_bindings): Likewise. Check that return types match before
251 proclaiming a function a match.
252 (do_decl_instantiation): Remove code searching for function to
253 instantiate; that is now done in check_explicit_specialization.
254 (add_maybe_template): Pass extra argument to get_bindings.
255 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
256 implementation.
257 * typeck.c (build_component_ref): Check for invalid arguments.
258
259 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
260
261 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
262 return_target and call_target are equivalent.
263
264 * pt.c (type_unification_real): Just accept function parms that
265 don't use any template parms.
266
267 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
268
269 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
270 unset DECL_NOT_REALLY_EXTERN.
271
272 * parse.y (typename_sub*): Fix std::.
273
274 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
275
276 * error.c (dump_decl): Fix type default template args.
277 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
278
279 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
280
281 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
282 (file_name_nondirectory): Use.
283
284 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
285
286 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
287 that are not really present. Substitute default arguments in
288 template template arguments. Correctly convert TEMPLATE_DECL to
289 TEMPLATE_TEMPLATE_PARM.
290 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
291 are no longer treated specially here.
292 * parse.y (template_template_parm): Fix copy error.
293 * decl.c (grokdeclarator): Warn about missing `typename' for nested
294 type created from template template parameters.
295 * parse.y (bad_parm): Likewise
296
297 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
298 (push_nested_class): Likewise.
299 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
300 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
301 (copy_template_template_parm): Declare.
302 * decl.c (arg_looking_for_template): New variable.
303 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
304 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
305 node if arg_looking_for_template is nonzero.
306 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
307 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
308 (grokdeclarator): Handle TEMPLATE_DECL.
309 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
310 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
311 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
312 (dump_decl): Handle unnamed template type parameters.
313 Handle template template parameters.
314 (dump_function_name): Handle template template parameters.
315 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
316 Handle TEMPLATE_TEMPLATE_PARM.
317 * method.c (build_template_template_parm_names): New function.
318 (build_template_parm_names): Handle TEMPLATE_DECL.
319 (build_overload_nested_name, build_overload_name):
320 Handle TEMPLATE_TEMPLATE_PARM.
321 * parse.y (maybe_identifier): New nonterminal.
322 (template_type_parm): Use it.
323 (template_template_parm, template_arg1): New nonterminal.
324 (template_parm): Add template_template_parm rules.
325 (template_arg): Set processing_template_arg.
326 (template_arg1): Rules moved from template_arg.
327 (primary, nonnested_type): Set arg_looking_for_template if we are
328 processing template arguments.
329 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
330 (process_template_parm): Handle template template parameters.
331 (coerce_template_parms, comp_template_args): Likewise.
332 (mangle_class_name_for_template, lookup_template_class): Likewise.
333 (uses_template_parms): Handle TEMPLATE_DECL and
334 TEMPLATE_TEMPLATE_PARM.
335 (current_template_args): Handle TEMPLATE_DECL.
336 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
337 * search.c (dfs_walk, dfs_record_inheritance):
338 Handle TEMPLATE_TEMPLATE_PARM.
339 * tree.c (copy_template_template_parm): New function.
340 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
341 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
342
343 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
344
345 * decl.c (start_decl): Don't allow duplicate definitions of static
346 data members.
347
348 * call.c (build_user_type_conversion_1): Handle user-defined
349 template conversion operators correctly.
350
351 * decl2.c (build_expr_from_tree): Issue an error message if the
352 object in a COMPONENT_REF is a TEMPLATE_DECL.
353
354 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
355
356 * class.c (is_local_class): New function.
357 * cp-tree.h (is_local_class): Declare it.
358 (last_tree): Likewise.
359 (begin_tree): Likewise.
360 (end_tree): Likewise.
361 (lookup_template_class): Change prototype.
362 * decl.c (cp_finish_decl): Check for NULL where necesary.
363 Consider FUNCTION_DECLS to declare objects with top-level binding,
364 when calling make_decl_rtl.
365 (grokdeclarator): Give members of local classes internal linkage.
366 (start_function): Remove declaration of last_tree.
367 (finish_function): Set flag_keep_inline_functions around call to
368 rest_of_compilation if we are processing a member function in a
369 local class.
370 (start_method): Call push_template_decl for member functions of
371 local classes in template functions.
372 * decl2.c (import_export_decl): Don't give external linkage to
373 instantiations of templates with internal linkage.
374 * parse.y (last_tree): Remove declaration.
375 (template_type): Pass extra parameter to lookup_template_class.
376 (self_template_type): Likewise.
377 (structsp): Move call to reset_specialization into left_curly.
378 (left_curly): Call reset_specialization, and begin_tree.
379 * pt.c (saved_trees): New variable.
380 (mangle_class_name_for_template): Change prototype. Use
381 additional function context to name local classes in templates
382 correctly.
383 (classtype_mangled_name): Pass the context.
384 (push_template_decl): Handle local classes and templates, and
385 member functions for such classes.
386 (convert_nontype_parameter): Fix handling of pointer-to-member
387 constants.
388 (lookup_template_class): Handle local classes in templates.
389 (tsubst): Likewise. Don't assume that template instantiations
390 have external linkage; pay attention to the template declaration.
391 (mark_decl_instantiated): Likewise.
392 (begin_tree): New function.
393 (end_tree): Likewise.
394
395 * decl.c (xref_basetypes): Don't call complete_type for basetypes
396 that involve template parameters; that can lead to infinite
397 recursion unnecessarily.
398
399 * pt.c (register_specialization): Do not register specializations
400 that aren't ready to be registered yet.
401 (check_explicit_specialization): Handle explicit specialization of
402 constructors and destructors.
403 (build_template_decl): New function.
404 (push_template_delc): Handle out-of-class specializations of
405 member templates.
406
407 * pt.c (check_explicit_specialization): Set up the template
408 information before registering the specialization.
409 (coerce_template_parms): Fix thinko.
410 (tsubst): Handle specializations of member templates correctly.
411
412 * class.c (finish_struct_methods): Remove calls to
413 check_explicit_specialization from here.
414 (finish_struct): And insert them here.
415 * cp-tree.h (perform_qualification_conversions): New function.
416 (perform_array_to_pointer_conversion): Likewise.
417 (begin_explicit_instantiation): Likewise.
418 (end_explicit_instantiation): Likewise.
419 (determine_specialization): Renamed from
420 determine_explicit_specialization.
421 (comp_template_parms): New function.
422 (processing_explicit_instantiation): New variable.
423 * cvt.c (perform_qualification_conversions): New function.
424 (perform_array_to_pointer_conversion): Likewise.
425 * decl.c (duplicate_decls): Don't consider template functions
426 alike unless they have the same parameters. Refine handling of
427 instantiation/specialization mismatches.
428 (start_decl): Don't call pushdecl for template specializations,
429 since they don't affect overloading.
430 (start_function): Likewise
431 (grokfndecl): Call check_explicit_specialization a little later.
432 Don't call duplicate_decls for memberm template specializations.
433 (grokdeclarator): Don't update template_count for classes that are
434 themselves specializations. Remove use of `2' as parameter to
435 grokfndecl since that value isn't used.
436 * lex.c (cons_up_default_function): Save and restore
437 processing_explicit_instantiation around calls to grokfield.
438 * parse.y (finish_member_template_decl): New function.
439 (component_decl_1): Use it.
440 (fn.def2): Likewise.
441 (template_arg_list_opt): New nonterminal.
442 (template_type): Use it.
443 (self_template_type): Likewise.
444 (template_id): Likewise.
445 (object_template_id): Likewise.
446 (notype_template_declarator): Likwise.
447 (begin_explicit_instantiation): Likewise.
448 (end_explicit_instantiation): Likewise.
449 (explicit_instantiation): Use them.
450 * pt.c (coerce_template_parms): Add parameters.
451 (processing_explicit_instantiation): New variable.
452 (convert_nontype_parameter): New function.
453 (determine_overloaded_function): Likewise.
454 (begin_explicit_instantiation): Likewise.
455 (end_explicit_instantiation): Likewise.
456 (retrieve_specialization): Likewise.
457 (register_specialization): Likewise.
458 (processing_explicit_specialization): Removed.
459 (determine_specialization): Handle specializations of member
460 functions of template class instantiations.
461 (check_explicit_specialization): Refine to conform to standard.
462 (comp_template_parms): New function.
463 (coerce_template_parms): Call convert_nontype_parameter.
464 (tsubst): Refine handling of member templates. Use
465 register_specialization.
466 (instantiate_template): Use retrieve_specialization.
467 (do_decl_instantiation): Likewise.
468 (instantiate_decl): Likewise.
469 (type_unification): Improve handling of explict template
470 arguments.
471 * tree.c (mapcar): Return error_mark_node, rather than aborting,
472 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
473 * typeck.c (build_unary_op): Call determine_specialization, rather
474 than determine_explicit_specialization.
475
476 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
477
478 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
479
480 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
481
482 * error.c (dump_decl): For enum tags, output the tag, not its value.
483
484 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
485
486 * decl.c (init_decl_processing): Only call init_rtti_processing
487 FLAG_RTTI is set.
488
489 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
490
491 * init.c (build_new_1): Split out from build_new.
492 (build_new): Just return a NEW_EXPR.
493 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
494
495 * decl2.c (get_temp_regvar): Tweak.
496
497 * cp-tree.h (TREE_CALLS_NEW): Comment out.
498 * class.c (resolves_to_fixed_type_p): Remove use.
499 * method.c (build_opfncall): Likewise.
500 * call.c (build_new_op): Likewise.
501
502 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
503
504 * exception.cc (__eh_alloc, __eh_free): New fns.
505 (__cp_push_exception, __cp_pop_exception): Use them.
506 (__uncatch_exception): Call terminate here if no exception.
507 * except.c (build_terminate_handler): New fn.
508 (expand_start_catch_block): Use it.
509 (expand_exception_blocks): Likewise.
510 (alloc_eh_object): New fn.
511 (expand_throw): Use it. Protect exception init with terminate.
512 * typeck.c (build_modify_expr): Remove code that ignores trivial
513 methods.
514
515 Mon Dec 22 17:46:17 1997 Mark Mitchell <mmitchell@usa.net>
516
517 * method.c (build_overload_name): Fix mangling for __null.
518
519 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
520
521 * call.c (add_builtin_candidate): Add default case in enumeration
522 switch.
523 (build_new_op): Likewise.
524 (convert_like): Likewise.
525 * cvt.c (build_expr_type_conversion): Likewise.
526 * tree.c (real_lvalue_p): Likewise.
527 (lvalue_p): Likewise.
528 (cp_tree_equal): Likewise.
529 * typeck.c (comptypes): Likewise.
530 (build_component_ref): Likewise.
531 (build_function_call_real): Likewise.
532 (build_binary_op_nodefault): Likewise.
533 (build_unary_op): Likewise.
534 (build_modify_expr): Likewise.
535 * typeck2.c (initializer_constant_valid_p): Likewise.
536
537 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
538
539 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
540
541 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
542
543 * pt.c (coerce_template_parms): Make sure to digest_init if
544 possible.
545
546 * decl.c (duplicate_decls): Make the newdecl virtual if the
547 olddecl was, just as is done with other attributes of olddecl.
548
549 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
550
551 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
552 address of an OFFSET_REF.
553
554 * cp-tree.def: Add AGGR_INIT_EXPR.
555 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
556 AGGR_INIT_EXPR where appropriate.
557 * expr.c (cplus_expand_expr): Likewise. Simplify.
558
559 * decl2.c (finish_file): Remove call to register_exception_table.
560
561 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
562
563 * pt.c (instantiate_class_template): Don't do injection when
564 processing_template_decl is true, as pollutes current_binding_level
565 for base classes.
566
567 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
568
569 * pt.c (maybe_fold_nontype_arg): Add prototype.
570
571 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
572
573 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
574 * error.c (dump_expr): Likewise.
575
576 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
577
578 * typeck.c (build_function_call_real): Remove "inline called before
579 definition" pedwarn.
580
581 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
582
583 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
584
585 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
586
587 * pt.c (type_unification_real): Change __null to type void* with
588 a warning.
589
590 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
591
592 * call.c (implicit_conversion): Don't call
593 build_user_type_conversion_1 with a NULL expr, since it will
594 crash.
595
596 * pt.c (unify): Don't try to unify array bounds if either array is
597 unbounded.
598
599 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
600
601 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
602 Replace extern decls with casts.
603
604 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
605 Update last_parm_cleanup_insn.
606 (store_after_parms): Remove.
607 * cp-tree.h: Adjust.
608
609 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
610
611 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
612 (finish_file): Check DECL_COMDAT instead of weak|one_only.
613 (import_export_vtable): Use make_decl_one_only instead of
614 comdat_linkage for win32 tweak.
615 (import_export_decl): Likewise.
616 * pt.c (mark_decl_instantiated): Likewise.
617
618 * decl2.c (finish_file): Lose handling of templates in pending_statics.
619
620 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
621
622 * decl2.c (finish_file): Lose call to expand_builtin_throw.
623 * except.c (expand_builtin_throw): Remove.
624 * cp-tree.h: Remove ptr_ptr_type_node.
625 * decl.c: Likewise.
626
627 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
628
629 * decl.c (ptr_ptr_type_node): Define.
630 (init_decl_processing): Initialize it.
631 * cp-tree.h: Declare it.
632 * exception.cc (__cp_exception_info): Use __get_eh_info.
633 (__cp_push_exception): Ditto.
634 (__cp_pop_exception): Ditto.
635
636 From Scott Snyder <snyder@d0sgif.fnal.gov>:
637 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
638 saved_pc.
639 (init_exception_processing): Removed saved_pc initialization.
640
641 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
642
643 * pt.c (instantiate_decl): Defer all templates but inline functions.
644
645 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
646
647 * init.c (expand_vec_init): Don't fold a list of parameters.
648
649 * decl.c (copy_args_p): Handle copy elision for types with virtual
650 bases.
651 * call.c (build_over_call): Likewise.
652
653 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
654
655 * pt.c (lookup_template_function): Copy the template arguments,
656 not just the list containing them, to the permanent obstack.
657
658 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
659
660 * except.c (expand_start_catch_block): suspend_momentary for the
661 terminate handler.
662
663 * error.c (dump_decl): Handle LOOKUP_EXPR.
664
665 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
666
667 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
668 permanent obstack if we are processing a template decl.
669 * typeck.c (build_static_cast): Likewise.
670 (build_const_cast): Likewise.
671 (build_reinterpret_cast): Likewise.
672
673 * pt.c (coerce_template_parms): Coerce some expressions, even
674 when processing_template_decl.
675
676 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
677
678 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
679 handling of pointer difference expressions.
680
681 * typeck.c (comp_target_types): Comparison of function/method types
682 is independent of nptrs.
683
684 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
685
686 * pt.c (tsubst): Avoid creating pointer to reference and
687 reference to reference types.
688
689 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
690
691 * parse.y (do_id): New nonterminal.
692 (template_id): Use it.
693
694 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
695
696 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
697 * spew.c (yylex): Don't do_identifier here.
698 * decl2.c (build_expr_from_tree): Revert last change.
699
700 * decl2.c (build_expr_from_tree): Expand the name for a method call.
701 * parse.y (object_template_id): Don't try to take the DECL_NAME.
702
703 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
704
705 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
706 alloc_expr.
707 * call.c (build_op_delete_call): Adjust.
708
709 * except.c (expand_end_catch_block): Lose rethrow region.
710 (expand_start_catch_block): Likewise.
711 (expand_end_catch_block): Don't expand_leftover_cleanups.
712
713 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
714
715 * pt.c (tsubst): Remove tree_cons call (places redundant info into
716 DECL_TEMPLATE_INSTANTIATION).
717
718 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
719
720 * tree.c (is_overloaded_fn): Handle getting a fn template.
721 (really_overloaded_fn): Likewise.
722 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
723 * pt.c (check_explicit_specialization): Tweak.
724 (determine_explicit_specialization): Tweak.
725
726 * tree.c, cp-tree.h (get_target_expr): New fn.
727
728 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
729
730 * pt.c (check_explicit_specialization): Fix misspelling in
731 diagnostic: `preceeded'.
732 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
733 `conversiona'.
734
735 1997-12-02 Mark Mitchell <mmitchell@usa.net>
736
737 * pt.c (determine_explicit_specialization): Avoid an internal
738 error for bad specializations.
739
740 * method.c (build_overload_value): Handle SCOPE_REF.
741
742 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
743
744 * class.c (prepare_fresh_vtable): Enable even more complex MI
745 vtable names.
746
747 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
748
749 * exception.cc (__check_eh_spec): Optimize a bit.
750
751 * exception.cc (__cp_pop_exception): Lose handler arg.
752 * except.c (do_pop_exception): Likewise.
753 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
754 (expand_end_catch_block): Likewise.
755
756 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
757
758 * pt.c (check_explicit_specialization): Complain about using a
759 template-id for a non-specialization.
760
761 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
762
763 * repo.c: Prototype rindex only if needed.
764 * xref.c: Likewise.
765
766 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
767
768 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
769
770 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
771
772 * typeck.c (build_const_cast): Handle references here instead of
773 handing off to convert_to_reference.
774
775 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
776 TerminateFunctionCall.
777 (init_exception_processing): Likewise. Terminate et al are now
778 the fns, not ADDR_EXPRs.
779 (various): Lose redundant assemble_external calls.
780 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
781
782 * cp-tree.h (struct lang_decl_flags): Add comdat.
783 (DECL_COMDAT): New macro.
784 * decl.c (duplicate_decls): Propagate it.
785 (cp_finish_decl): Handle it.
786 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
787
788 * class.c: Remove static pending_hard_virtuals.
789 (add_virtual_function): Take pointers to pending_virtuals
790 and pending_hard_virtuals.
791 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
792
793 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
794
795 * decl2.c (import_export_vtable): If we support one_only but not
796 weak symbols, mark instantiated template vtables one_only.
797 (import_export_decl): Likewise for tinfo functions.
798 (finish_vtable_vardecl): Also write out vtables from explicitly
799 instantiated template classes.
800 * pt.c (mark_class_instantiated): Revert last change.
801
802 * except.c (expand_throw): Call mark_used on the destructor.
803
804 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
805
806 * lex.c (lang_init): Enable flag_exceptions by default if no
807 command line switch was specified.
808
809 1997-11-26 Mark Mitchell <mmitchell@usa.net>
810
811 * pt.c (unify): Handle `void' template parameters in
812 specializations.
813
814 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
815
816 * rtti.c (build_dynamic_cast): Handle template case here.
817 (build_dynamic_cast_1): Not here.
818
819 * typeck2.c (digest_init): Make copies where appropriate.
820
821 * decl2.c (delete_sanity): resolve_offset_ref.
822
823 * except.c (expand_start_catch_block): Fix catching a reference
824 to pointer.
825
826 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
827
828 * init.c (build_new): Copy size to the saveable obstack.
829
830 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
831 TRY_CATCH_EXPR for now.
832
833 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
834
835 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
836 has DECL_LANG_SPECIFIC.
837
838 * exception.cc (struct cp_eh_info): Add handlers field.
839 (__cp_push_exception): Initialize it.
840 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
841 (__throw_bad_exception): Remove.
842 * except.c (call_eh_info): Add handlers field.
843 (get_eh_handlers): New fn.
844 (push_eh_cleanup): Increment handlers.
845
846 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
847
848 * except.c (expand_start_eh_spec): Use the try/catch code.
849 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
850 doing everything inline.
851 (init_exception_processing): throw_type_match now takes
852 const void pointers.
853 * exception.cc (__check_eh_spec): New fn.
854 * inc/exception: Neither terminate nor unexpected return.
855 * decl.c: Make const_ptr_type_node public.
856 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
857
858 * except.c (expand_start_catch_block): We only need the rethrow
859 region for non-sjlj exceptions.
860 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
861
862 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
863
864 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
865 (various.o): Likewise.
866 * inc/new: Add placement deletes. Add throw specs for default new.
867 * new.cc (set_new_handler): Move here from libgcc2.
868 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
869 (new): Move from libgcc2. Throw bad_alloc.
870 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
871 * decl.c (init_decl_processing): Update exception specs on new and
872 delete.
873
874 * method.c (build_decl_overload_real): Don't mess with global
875 placement delete.
876
877 * init.c (build_new): Check for null throw spec, not nothrow_t.
878
879 * decl.c (duplicate_decls): Don't complain about different exceptions
880 from an internal declaration.
881
882 * call.c (build_op_delete_call): Fix check for member fns again.
883
884 * decl2.c (import_export_decl): Interface hackery affects
885 virtual synthesized methods.
886
887 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
888
889 * decl.c (start_decl): Don't just complain about a mismatched
890 scope, fix it.
891
892 * decl.c (make_implicit_typename): Handle case where t is not
893 actually from context.
894 * tree.c (get_type_decl): Lose identifier case.
895 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
896 * parse.y (nonnested_type): Just use lookup_name.
897 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
898
899 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
900
901 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
902 T was built in C language context (for example, by
903 output_func_start_profiler).
904
905 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
906
907 * decl.c (make_implicit_typename): New fn.
908 (lookup_name_real): Use it. Use current_class_type as the context.
909
910 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
911
912 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
913
914 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
915
916 * friend.c (do_friend): Warn about non-template friends in templates.
917
918 * call.c (build_op_delete_call): Fix handling of inherited delete.
919
920 * search.c (dfs_record_inheritance): Ignore template type parms.
921
922 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
923
924 * call.c (build_new_op): Fix copy error.
925 (build_op_new_call): New fn.
926 (build_op_delete_call): New fn.
927 * cp-tree.h: Declare them.
928 * init.c (build_new): Use them. Support placement delete.
929 (build_x_delete): Use build_op_delete_call.
930 (build_delete): Likewise.
931 * decl2.c (delete_sanity): Likewise.
932 (coerce_delete_type): Don't complain about placement delete.
933
934 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
935
936 * call.c (build_new_function_call): Remove unused 'obj' parm.
937 * cp-tree.h, typeck.c: Adjust.
938
939 * init.c (build_new): Make the cleanup last longer.
940 (expand_vec_init): Call do_pending_stack_adjust.
941
942 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
943
944 * pt.c (do_type_instantiation): Fix typo.
945 (mark_class_instantiated): If we support one_only but not weak
946 symbols, don't mark this as known.
947
948 * init.c (build_new): Handle vec delete in EH cleanup.
949
950 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
951
952 * call.c (build_method_call): Call complete_type before checking
953 for destructor.
954
955 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
956
957 * decl.c (add_block_current_level): Delete.
958 * init.c (build_vec_delete_1): Delete build_block and
959 add_block_current_level calls.
960
961 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
962
963 * init.c (build_new): Handle freeing allocated memory when the
964 constructor throws.
965
966 * call.c (build_new_method_call): Fix flags arg.
967
968 * pt.c (do_type_instantiation): Don't try to instantiate
969 member templates.
970 (mark_decl_instantiated): If we support one_only but not
971 weak symbols, mark this one_only.
972 * decl2.c (import_export_vtable): Don't defer handling of vtables
973 if MULTIPLE_SYMBOL_SPACES.
974
975 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
976
977 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
978
979 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
980
981 * except.c (do_pop_exception): Return a value.
982
983 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
984
985 * call.c (build_new_method_call): Handle getting a
986 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
987 if we got template parms.
988 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
989 not just the args.
990 * decl2.c (build_expr_from_tree): Tweak last change.
991 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
992 (maybe_fold_nontype_arg): Split out from tsubst_copy.
993 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
994
995 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
996
997 * pt.c (tsubst_copy): Handle explicit template arguments in
998 function calls.
999 * typeck.c (build_x_function_call): Likewise.
1000 * decl2.c (build_expr_from_tree): Lookup function name if it
1001 hasn't been done.
1002
1003 * pt.c (tsubst): Instantiate template functions properly when
1004 template parameter does not appear in function arguments and return
1005 type.
1006 (comp_template_args): Handle member templates required by tsubst.
1007
1008 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
1009
1010 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
1011 previous change.
1012
1013 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
1014
1015 * pt.c (coerce_template_parms): Tweak error message.
1016
1017 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
1018 return type defaults to `int', even if there are storage-class
1019 specifiers.
1020
1021 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
1022
1023 Complete nested exception support.
1024 * except.c (do_pop_exception): Split out...
1025 (push_eh_cleanup): From here. Handle the EH region by hand.
1026 (expand_start_catch_block): Add a new level for the catch parm.
1027 Move the rethrow region outside the two cleanup regions.
1028 Protect the initializer for the catch parm with terminate.
1029 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
1030 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
1031 popping off the middle of the stack.
1032 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
1033 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
1034 (build_cplus_new): Only wrap CALL_EXPRs.
1035 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
1036 the constructor call.
1037
1038 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1039
1040 * Make-lang.in (c++.distdir): Make inc subdirectory.
1041
1042 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
1043
1044 * decl2.c (finish_file): Put back some code.
1045
1046 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
1047
1048 * decl2.c (finish_file): Remove redundant code.
1049 * method.c (emit_thunk): Don't let the backend defer generic thunks.
1050
1051 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
1052
1053 * except.c (call_eh_info): Split out...
1054 (push_eh_info): From here.
1055 (expand_builtin_throw): Use it.
1056 (expand_start_catch_block): Move region start back.
1057
1058 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
1059
1060 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
1061 (real_yylex): Record wide strings using target endianness, not host.
1062
1063 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
1064
1065 * repo.c (rindex): Add decl unconditionally.
1066 (get_base_filename, open_repo_file): Don't cast rindex.
1067 * xref.c (rindex): Add decl unconditionally.
1068 (index): Remove unused decl.
1069 (open_xref_file): Don't cast rindex.
1070
1071 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
1072
1073 * class.c (build_vbase_path): Propagate the result type properly.
1074
1075 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
1076
1077 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
1078 remaining use of saved_throw_type with a call to get_eh_type.
1079
1080 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
1081
1082 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
1083 (file_name_nondirectory): New function, doing the same as the macro.
1084 (set_typedecl_interface_info): Use it instead of the macro.
1085 (check_newline): Likewise.
1086 (handle_cp_pragma): Likewise.
1087
1088 * repo.c (get_base_filename): Cast result of rindex to char*.
1089 (open_repo_file): Likewise.
1090 * xref.c (open_xref_file): Likewise.
1091 * error.c (dump_char): Make its arg int, not char.
1092
1093 * except.c (push_eh_info): Pass the number of fields - 1 down, not
1094 the exact number of fields.
1095
1096 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
1097
1098 Support for nested exceptions.
1099 * tinfo2.cc (__is_pointer): New fn.
1100 * exception.cc (struct cp_eh_info): Define.
1101 (__cp_exception_info, __uncatch_exception): New fns.
1102 (__cp_push_exception, __cp_pop_exception): New fns.
1103 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
1104 Lose empty_fndecl.
1105 (init_exception_processing): Likewise. __eh_pc is now external.
1106 (push_eh_info): New fn.
1107 (get_eh_{info,value,type,caught}): New fns.
1108 (push_eh_cleanup): Just call __cp_pop_exception.
1109 (expand_start_catch_block): Use push_eh_info. Start the eh region
1110 sooner.
1111 (expand_end_eh_spec): Use push_eh_info.
1112 (expand_throw): Call __cp_push_exception to set up the exception info.
1113 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
1114 when we rethrow.
1115 (expand_builtin_throw): Don't refer to empty_fndecl.
1116
1117 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
1118
1119 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
1120
1121 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
1122
1123 * method.c (build_template_parm_names, build_decl_overload_real):
1124 Add static to definitions.
1125 * pt.c (add_to_template_args, note_template_header,
1126 processing_explicit_specialization, type_unification_real): Likewise.
1127 ({determine,check}_explicit_specialization): Use a single string for
1128 error messages.
1129
1130 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
1131
1132 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
1133 (expand_end_catch_block): Likewise.
1134 (expand_end_eh_spec): Likewise.
1135
1136 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
1137
1138 * decl.c (duplicate_decls): Handle template specializations
1139 correctly.
1140 * error.c (dump_function_name): Fix printing of specializations of
1141 member functions that are not member templates.
1142 * cp-tree.h (processing_specialization): Make global.
1143 * pt.c (processing_specialization): Likewise.
1144 * lex.c (cons_up_default_function): Save and restore
1145 processing_specialization to avoid confusion.
1146
1147 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
1148
1149 * decl.c (init_decl_processing): Give null_node unknown* type.
1150 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
1151 (common_type): Likewise.
1152 * error.c (args_as_string): Recognize null_node.
1153
1154 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1155
1156 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
1157 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
1158
1159 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
1160
1161 * Make-lang.in (g++): Include prefix.o.
1162
1163 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
1164
1165 * pt.c (determine_explicit_specialization): Initialize "dummy"
1166 to keep Purify quiet.
1167
1168 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
1169
1170 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
1171 (build_overload_int): Not here.
1172
1173 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
1174
1175 * class.c (build_type_pathname): Remove.
1176 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
1177
1178 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
1179
1180 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
1181 &&label GNU extension.
1182
1183 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
1184
1185 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
1186 so as to avoid incorrect manglings.
1187 * method.c (build_decl_overload_real): Don't mangle return types
1188 for constructors.
1189
1190 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
1191
1192 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
1193 scratch_tree_cons): Define as macros for now.
1194 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
1195 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
1196 typeck2.c: Use them and the expression_obstack variants.
1197
1198 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1199
1200 * decl.c (store_return_init): Allow classes with explicit ctors to
1201 be used with the named return values extension.
1202
1203 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
1204
1205 * pt.c (instantiate_decl): Fix previous change.
1206
1207 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
1208
1209 * pt.c (tsubst): Fix thinko.
1210 (instantiate_decl): Really use the original template.
1211
1212 * call.c (build_new_method_call): Use simple constructor_name for
1213 error messages.
1214
1215 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
1216
1217 * method.c (build_underscore_int): Don't use ANSI specific
1218 features.
1219
1220 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
1221
1222 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
1223 for our key method; it might have been inlined by -O3.
1224
1225 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
1226
1227 * decl.c (make_typename_type): Do not try to call lookup_field for
1228 non-aggregate types.
1229
1230 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
1231
1232 * typeck.c (build_reinterpret_cast): Tweak.
1233
1234 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
1235
1236 * typeck.c (build_reinterpret_cast): converting a void pointer
1237 to function pointer with a reinterpret_cast produces a warning
1238 if -pedantic is issued
1239
1240 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
1241
1242 * typeck.c (c_expand_return): Don't warn about returning a
1243 reference-type variable as a reference.
1244
1245 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
1246
1247 * method.c (build_static_name): Fix typo.
1248
1249 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
1250
1251 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
1252 OLDDECL before we try to do DECL_USE_TEMPLATE.
1253
1254 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
1255
1256 * decl.c (duplicate_decls): Don't warn about template instances.
1257
1258 * typeck.c (mark_addressable): Lose ancient code that unsets
1259 DECL_EXTERNAL.
1260
1261 * pt.c (do_decl_instantiation): Lose support for instantiating
1262 non-templates.
1263
1264 * call.c (build_new_function_call): Fix handling of null explicit
1265 template args.
1266 (build_new_method_call): Likewise.
1267
1268 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
1269
1270 * method.c (build_underscore_int): Fix typo.
1271
1272 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
1273
1274 * tree.c (print_lang_statistics): #if 0 call to
1275 print_inline_obstack_statistics until its definition is checked in.
1276
1277 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
1278
1279 * decl2.c (finish_file): Move dump_tree_statistics to end.
1280
1281 * pt.c (instantiate_decl): Look for the original template.
1282 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
1283 of member templates.
1284
1285 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
1286
1287 * Makefile.in (g++FAQ.*): New rules.
1288 (CONFLICTS): Update.
1289 * g++FAQ.texi: Moved from libg++.
1290
1291 * parse.y (PFUNCNAME): Only specify the type once.
1292
1293 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
1294
1295 * lex.c (real_yylex): Clean up the code to fully behave the way
1296 the c-lex.c parser does for complex and real numbers.
1297
1298 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
1299
1300 * method.c (build_decl_overload_real): Reformat.
1301
1302 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
1303
1304 * method.c (synthesize_method): If at_eof, determine our linkage.
1305
1306 1997-09-29 Paul Eggert <eggert@twinsun.com>
1307
1308 * lex.c (real_yylex): Treat `$' just like `_', except issue a
1309 diagnostic if !dollars_in_ident or if pedantic.
1310
1311 * lang-specs.h (@c++): -ansi no longer implies -$.
1312
1313 * decl2.c (lang_decode_option):
1314 -traditional and -ansi now do not mess with
1315 dollars_in_ident.
1316
1317 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
1318
1319 * Makefile.in (parse.o, decl.o): Also depend on
1320 $(srcdir)/../except.h $(srcdir)/../output.h.
1321 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
1322 $(srcdir)/../except.h $(srcdir)/../output.h.
1323 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
1324 ../insn-codes.h.
1325
1326 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
1327
1328 * expr.c (cplus_expand_expr): Make it static.
1329
1330 * decl2.c, init.c, typeck.c: Include "expr.h".
1331 (expand_expr): Use proper values when calling the function.
1332
1333 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
1334
1335 * lang-options.h: new -Wold-style-cast flag.
1336 * cp-tree.h (warn_old_style_cast): new variable.
1337 * decl2.c (warn_old_style_cast): ditto.
1338 (lang_decode_option): support -Wold-style-cast.
1339 (reparse_absdcl_as_casts): produce old-style-cast warning.
1340
1341 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1342
1343 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
1344 TREE_USED, reset value based on already_used.
1345
1346 * init.c (expand_member_init): Revert change.
1347
1348 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
1349
1350 * cp-tree.h, decl.c, decl2.c, pt.c:
1351 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
1352
1353 * decl2.c (lang_decode_option): Add missing ;.
1354
1355 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
1356
1357 * friend.c (do_friend): Disable injection for all template-derived
1358 decls.
1359 * decl2.c (lang_decode_option): Handle -fguiding-decls.
1360 * parse.y (notype_template_declarator): New nonterminal.
1361 (direct_notype_declarator): Use it.
1362 (complex_direct_notype_declarator): Likewise.
1363 (object_template_id): Accept any kind of identifier after TEMPLATE.
1364 (notype_qualified_id): Don't add template declarators here.
1365
1366 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
1367
1368 * call.c (add_template_candidate): Add explicit_targs parameter.
1369 (build_scoped_method_call): Use it.
1370 (build_overload_call_real): Likewise.
1371 (build_user_type_conversion_1): Likewise.
1372 (build_new_function_call): Likewise.
1373 (build_object_call): Likewise.
1374 (build_new_op): Likewise.
1375 (build_new_method_call): Likewise.
1376 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
1377 (build_new_method_call): Likewise.
1378
1379 * class.c (finish_struct_methods): Add specialization pass to
1380 determine which methods were specializing which other methods.
1381 (instantiate_type): Handle TEMPLATE_ID_EXPR.
1382
1383 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
1384
1385 * cp-tree.h (name_mangling_version): New variable.
1386 (flag_guiding_decls): Likewise.
1387 (build_template_decl_overload): New function.
1388 (begin_specialization): Likewise.
1389 (reset_specialization): Likewise.
1390 (end_specialization): Likewise.
1391 (determine_explicit_specialization): Likewise.
1392 (check_explicit_specialization): Likewise.
1393 (lookup_template_function): Likewise.
1394 (fn_type_unification): Add explicit_targs parameter.
1395 (type_unification): Likewise.
1396
1397 * decl.c (duplicate_decls): Add smarts for explicit
1398 specializations.
1399 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
1400 specializations.
1401 (grokfndecl): Call check_explicit_specialization.
1402
1403 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
1404 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
1405 (check_classfn): Handle specializations.
1406
1407 * error.c (dump_function_name): Print specialization arguments.
1408
1409 * friend.c (do_friend): Don't call pushdecl for template
1410 instantiations.
1411
1412 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
1413
1414 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
1415 and -fno-guiding-decls.
1416
1417 * lex.c (identifier_type): Return PFUNCNAME for template function
1418 names.
1419
1420 * method.c (build_decl_overload_real): New function.
1421 (build_template_parm_names): New function.
1422 (build_overload_identifier): Use it.
1423 (build_underscore_int): New function.
1424 (build_overload_int): Use it. Add levels for template
1425 parameters.
1426 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
1427 (build_overload_nested_names): Handle template type parameters.
1428 (build_template_decl_overload): New function.
1429
1430 * parse.y (YYSTYPE): New ntype member.
1431 (nested_name_specifier): Use it.
1432 (nested_name_specifier_1): Likewise.
1433 (PFUNCNAME): New token.
1434 (template_id, object_template_id): New non-terminals.
1435 (template_parm_list): Note specializations.
1436 (template_def): Likewise.
1437 (structsp): Likewise.
1438 (fn.def2): Handle member template specializations.
1439 (component_decl_1): Likewise.
1440 (direct_notype_declarator): Handle template-ids.
1441 (component_decl_1): Likewise.
1442 (direct_notype_declarator): Handle template-ids.
1443 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
1444
1445 * pt.c (processing_specializations): New variable.
1446 (template_header_count): Likewise.
1447 (type_unification_real): New function.
1448 (processing_explicit_specialization): Likewise.
1449 (note_template_header): Likewise.
1450 (is_member_template): Handle specializations.
1451 (end_template_decl): Call reset_specialization.
1452 (push_template_decl): Handle member template specializations.
1453 (tsubst): Likewise.
1454 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
1455 (instantiate_template): Handle specializations.
1456 (instantiate_decl): Likewise.
1457 (fn_type_unification): Handle explicit_targs.
1458 (type_unification): Likewise. Allow incomplete unification
1459 without an error message, if allow_incomplete.
1460 (get_bindings): Use new calling sequence for fn_type_unification.
1461
1462 * spew.c (yylex): Handle PFUNCNAME.
1463
1464 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
1465 (really_overloaded_fn): Likewise.
1466 (get_first_fn): Handle function templates.
1467
1468 * typeck.c (build_x_function_call): Use really_overloaded_fn.
1469 Handle TEMPLATE_ID_EXPR.
1470 (build_x_unary_op): Likewise.
1471 (build_unary_op): Likewise.
1472 (mark_addressable): Templates whose address is taken are marked
1473 as used.
1474
1475 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1476
1477 * decl.c (init_decl_processing): Declare __builtin_constant_p as
1478 accepting any kind of type, not only int.
1479
1480 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
1481
1482 * search.c (get_matching_virtual): Notice virtual bases when sorrying
1483 about covariant returns.
1484
1485 * parse.y (member_init): Also imply typename here. Remove ancient
1486 extension for initializing base members.
1487
1488 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
1489
1490 Handle multi-level typenames and implicit typename in base list.
1491 * parse.y (typename_sub{,[0-2]}): New rules.
1492 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
1493 (nonnested_type): New rule.
1494 (complete_type_name): Use it.
1495 (base_class.1): Use typename_sub and nonnested_type.
1496 (nested_name_specifier): Don't elide std:: here.
1497 * decl.c (make_typename_type): Handle getting a type for NAME.
1498 (lookup_name_real): Turn std:: into :: here.
1499
1500 Rvalue conversions were removed in London.
1501 * call.c (is_subseq): Don't consider lvalue transformations.
1502 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
1503 (joust): Reenable ?: kludge.
1504
1505 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
1506
1507 * decl.c (start_function): Up warning of no return type to be a
1508 pedwarn.
1509
1510 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1511
1512 * init.c (expand_member_init): Don't set TREE_USED.
1513 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
1514 set,don't clear TREE_USED wholesale.
1515
1516 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
1517
1518 * call.c (build_over_call): Do require_complete_type before
1519 build_cplus_new.
1520
1521 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
1522
1523 * search.c (lookup_field): Call complete_type in all cases.
1524
1525 * decl.c (finish_function): Just warn about flowing off the end.
1526
1527 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
1528
1529 * decl.c (grokparms): Don't bash a permanent list node if we're
1530 in a function.
1531
1532 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
1533
1534 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
1535
1536 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
1537
1538 * call.c (build_new_op): Give better error for syntactically
1539 correct, but semantically invalid, use of undeclared template.
1540
1541 * call.c (compare_qual): Handle pmfs.
1542
1543 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
1544 after the exception spec.
1545
1546 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
1547
1548 * call.c (null_ptr_cst_p): Integer type, not integral type.
1549
1550 * call.c (joust): Disable warnings until they can be moved to the
1551 right place.
1552
1553 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
1554
1555 * Makefile.in, config-lang.in: Convert to autoconf.
1556
1557 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
1558
1559 * decl.c (lookup_name_real): Add implicit 'typename' to types from
1560 base classes.
1561
1562 * pt.c (most_specialized_class): Fix typo.
1563 (tsubst): Move constant folding to TREE_VEC case.
1564
1565 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
1566
1567 * pt.c (do_poplevel): Don't warn about unused local variables
1568 while processing_template_decl since we don't always know whether
1569 or not they will need constructing/destructing.
1570
1571 * pt.c (uses_template_parms): Check the values of an enumeration
1572 type to make sure they don't depend on template parms.
1573
1574 * decl.c (make_typename_type): Don't lookup the field if the
1575 context uses template parms, even if we're not
1576 processing_template_decl at the moment.
1577
1578 * pt.c (coerce_template_parms): Avoid looking at the
1579 TYPE_LANG_DECL portion of a typename type, since there won't be
1580 one.
1581 (tsubst): Do constant folding as necessary to make sure that
1582 arguments passed to lookup_template_class really are constants.
1583
1584 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
1585
1586 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
1587 * decl2.c (finish_file): Only register exception tables if we
1588 need to.
1589
1590 * decl.c (init_decl_processing): Add __builtin_[fs]p.
1591
1592 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
1593
1594 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
1595
1596 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
1597
1598 * error.c (dump_decl): Avoid crashing when presented with a
1599 uninitialized constant, as can occur with a template parameter.
1600 (dump_expr): Make sure that there are enough levels of
1601 current_template_parms before we start diving through them.
1602
1603 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
1604
1605 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
1606 c-typeck.c.
1607
1608 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1609
1610 * except.c (expand_throw): Call build_delete for all
1611 exception types, not just objects with destructors.
1612
1613 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
1614
1615 * decl.c (current_local_enum): Remove static.
1616 * pt.c (tsubst_enum): Save and restore value of current_local_enum
1617 in case template is expanded in enum decl.
1618 (instantiate_class_template) : Use new tsubst_enum signature.
1619 (tsubst_expr): Likewise.
1620
1621 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
1622
1623 * pt.c (begin_member_template_processing): Take a function as
1624 argument, not a set of template arguments. Use the template
1625 parameters, rather than the arguments. Handle non-type parameters
1626 correctly. Push a binding level for the parameters so that multiple
1627 member templates using the same parameter names can be declared.
1628 (end_member_template_processing): Pop the binding level.
1629 (push_template_decl): Mark member templates as static when
1630 appropriate.
1631
1632 * lex.c (do_pending_inlines): Pass the function, not its template
1633 arguments, to begin_member_template_processing.
1634 (process_next_inline): Likewise.
1635 (do_pending_defargs): Likewise.
1636
1637 * error.c (dump_expr): Obtain the correct declaration for a
1638 TEMPLATE_CONST_PARM.
1639
1640 * call.c (add_template_conv_candidate): New function.
1641 (build_object_call): Handle member templates, as done in the other
1642 build_ functions.
1643
1644 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
1645
1646 * decl.c (replace_defag): Undo previous change.
1647 * lex.c (do_pending_defargs): Deal with member templates.
1648
1649 * pt.c (is_member_template): Avoid crashing when passed a
1650 non-function argument.
1651
1652 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
1653
1654 * class.c (grow_method): Remove check for redeclaration.
1655
1656 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
1657
1658 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
1659 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
1660 (PRIMARY_TEMPLATE_P): Use it.
1661 * call.c (build_overload_call_real): Use it.
1662 * class.c (instantiate_type): Likewise.
1663 * decl.c (decls_match): Likewise.
1664 * method.c (build_overload_identifier): Likewise.
1665 * pt.c (push_template_decl): Likewise.
1666 (classtype_mangled_name): Likewise.
1667 (lookup_template_class): Likewise.
1668
1669 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
1670 DECL_NTPARMS to conform to usage elsewhere.
1671 * call.c (add_template_candidate): Likewise.
1672 * class.c (instantiate_type): Likewise.
1673 * pt.c (instantiate_template): Likewise.
1674 (get_bindings): Likewise.
1675
1676 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
1677 is_member_template.
1678
1679 * pt.c (unify): Undo changes to allow multiple levels of template
1680 parameters.
1681 (type_unification): Likewise.
1682 (fn_type_unification): Likewise.
1683 (get_class_bindings): Likewise.
1684 * cp-tree.h (Likewise).
1685
1686 * decl.c (replace_defarg): Check that the type of the default
1687 parameter does not invlove a template type before complaining
1688 about the initialization.
1689
1690 * error.c (dump_expr): Deal with template constant parameters in
1691 member templates correctly.
1692
1693 * pt.c (is_member_template): Deal with class specializations
1694 correctly.
1695 (tsubst): Handle "partial instantiation" of member templates
1696 correctly.
1697
1698 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
1699
1700 * pt.c (type_unification): Change calling squence to allow for
1701 multiple levels of template parameters.
1702 (tsubst_expr): Likewise.
1703 (tsubst): Likewise.
1704 (tsubst_copy): Likewise.
1705 (instantiate_template): Likewise.
1706 (unify): Likewise.
1707 * call.c (build_overload_call_real): Use it.
1708 (add_builtin_candidate): Use it.
1709 (build_new_method_call): Use it.
1710 * class.c (instantiate_type): Use it.
1711 * decl.c (grokdeclarator): Use it.
1712 * decl2.c (finish_file): Use it.
1713 * method.c (build_overload_identifier): Use it.
1714
1715 * call.c (add_template_candidate): Add additional parameter for
1716 the function return type. Call fn_type_unification istead of
1717 type_unification.
1718 (build_user_type_conversion_1): Handle member templates.
1719 (build_new_function_call): Likewise.
1720 (build_new_op): Likewise.
1721 (build_new_method_call): Likewise.
1722
1723 * class.c (grow_method): Don't give an error message indicating
1724 that two member templates with the same name are ambiguous.
1725 (finish_struct): Treat member template functions just like member
1726 functions.
1727
1728 * cp-tree.h (check_member_template): Add declaration.
1729 (begin_member_template_processing): Likewise.
1730 (end_member_template_processing): Likewise.
1731 (fn_type_unification): Likewise.
1732 (is_member_template): Likewise.
1733 (tsubst): Change prototype.
1734 (tsubst_expr): Likewise.
1735 (tsubst_copy): Likewise.
1736 (instantiate_template): Likewise.
1737 (get_bindings): Likewise.
1738
1739 * decl.c (decls_match): Handle multiple levels of template
1740 parameters.
1741 (pushdecl): Handle template type params just like other type
1742 declarations.
1743 (push_class_level_binding): Return immediately if the
1744 class_binding_level is NULL.
1745 (grokfndecl): If check_classfn() returns a member_template, use
1746 the result of the template, not the template itself.
1747
1748 * decl2.c (check_member_template): New function. Check to see
1749 that the entity declared to be a member template can be one.
1750 (check_classfn): Allow redeclaration of member template functions
1751 with different types; the new functions can be specializations or
1752 explicit instantiations.
1753
1754 * error.c (dump_decl): Handle multiple levels of template
1755 parameters.
1756 (dump_function_decl): Update to handle function templates.
1757
1758 * lex.c (do_pending_inlines): Set up template parameter context
1759 for member templates.
1760 (process_next_inline): Likewise.
1761
1762 * method. (build_overload_identifier): Adjust for multiple levels
1763 of template parameters.
1764
1765 * parse.y (fn.def2): Add member templates.
1766 (component_decl_1): Likewise.
1767
1768 * pt.c (begin_member_template_processing): New function.
1769 (end_member_template_processing): Likewise.
1770 (is_member_template): Likewise.
1771 (fn_type_unification): Likewise.
1772 (current_template_parms): Return a vector of all the template
1773 parms, not just the innermost level of parms.
1774 (push_template_decl): Deal with the possibility of member
1775 templates.
1776 (lookup_template_class): Likewise.
1777 (uses_template_parms): Likewise.
1778 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
1779 TEMPLATE_CONST_PARM to deal with multiple levels of template
1780 arguments. Add processing of TEMPLATE_DECL to produce new
1781 TEMPLATE_DECLs from old ones.
1782 (do_decl_instantiation): Handle member templates.
1783
1784 * search.c (lookup_fnfields_1): Handle member template conversion
1785 operators.
1786
1787 * tree.c (cp_tree_equal): Check the levels, as well as the
1788 indices, of TEMPLATE_CONST_PARMs.
1789
1790 * typeck.c (comptypes): Check the levels, as well as the indices,
1791 fo TEMPLATE_TYPE_PARMs.
1792 (build_x_function_call): Treat member templates like member
1793 functions.
1794
1795 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
1796
1797 * typeck.c (c_expand_return): Always convert_for_initialization
1798 before checking for returning a pointer to local.
1799
1800 * pt.c (type_unification): If strict and the function parm doesn't
1801 use template parms, just compare types.
1802
1803 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
1804
1805 * method.c (build_overloaded_value): Replace direct call
1806 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
1807
1808 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
1809
1810 * typeck.c (convert_arguments): Don't arbitrarily choose the first
1811 of a set of overloaded functions.
1812
1813 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
1814
1815 * lex.c (real_yylex): Don't elide __FUNCTION__.
1816
1817 * method.c (build_overload_value): Add in_template parm.
1818 (build_overload_int): Likewise.
1819 (build_overload_identifier): Pass it.
1820
1821 * decl.c (duplicate_decls): Don't bash a previous template
1822 definition with a redeclaration.
1823
1824 * pt.c (unify): float doesn't match double.
1825
1826 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
1827 TYPE_DECL. Handle getting non-template types.
1828 * parse.y (explicit_instantiation): Use typespec instead of
1829 aggr template_type.
1830
1831 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
1832
1833 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
1834
1835 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
1836
1837 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
1838 (compare_ics): Likewise.
1839
1840 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
1841
1842 * call.c (joust): Warn about choosing one conversion op over
1843 another because of 'this' argument when the other return type is
1844 better.
1845 (source_type): New fn.
1846
1847 * call.c (build_new_op): Strip leading REF_BIND from first operand
1848 to builtin operator.
1849
1850 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
1851 use its RTL.
1852
1853 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
1854
1855 * call.c (null_ptr_cst_p): Remove support for (void*)0.
1856
1857 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
1858
1859 * typeck.c (expand_target_expr): Make definition match declaration.
1860
1861 * class.c (get_basefndecls): Make definition match declaration.
1862
1863 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
1864
1865 * input.c (sub_getch): Eventually give up and release the input file.
1866
1867 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
1868 right place.
1869
1870 * call.c (joust): Tweak message.
1871
1872 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
1873
1874 * error.c (type_as_string): Put const/volatile on template type
1875 parameters where appropriate.
1876
1877 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
1878
1879 * call.c (strictly_better): Make arguments unsigned ints.
1880
1881 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
1882
1883 * lex.c (real_yylex): Refer to __complex instead of complex.
1884
1885 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
1886
1887 * lex.c (real_yylex): Don't use getc directly.
1888
1889 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
1890
1891 * call.c (is_subseq): Don't try to be clever.
1892
1893 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
1894
1895 * parse.y, pt.c: Include "except.h".
1896 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
1897 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
1898 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
1899 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
1900 prototyping.
1901
1902 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
1903
1904 * decl2.c (mark_vtable_entries): Instead of replacing pure
1905 virtuals with a reference to __pure_virtual, copy the decl and
1906 change the RTL.
1907
1908 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
1909
1910 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
1911
1912 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
1913
1914 * pt.c (instantiate_class_template): Call repo_template_used
1915 before finish_prevtable_vardecl.
1916
1917 * call.c (is_subseq): New fn.
1918 (compare_ics): Use it.
1919
1920 * repo.c (finish_repo): Don't crash on no args.
1921
1922 * parse.y (named_complex_class_head_sans_basetype): Handle
1923 explicit global scope.
1924 * decl2.c (handle_class_head): New fn.
1925
1926 * pt.c (unify): Add CONST_DECL case.
1927
1928 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
1929
1930 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
1931
1932 * cp-tree.h (report_type_mismatch): Add prototype.
1933 * call.c (build_overload_call_real): Remove erroneous fourth
1934 argument to report_type_mismatch.
1935 (build_user_type_conversion_1): Remove erroneous second arg to
1936 tourney.
1937 (build_new_function_call): Likewise.
1938 (build_object_call): Likewise.
1939 (build_new_op): Likewise.
1940 (build_new_method_call): Likewise.
1941
1942 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
1943
1944 * error.c (dump_decl): Don't bother processing a function with no
1945 DECL_LANG_SPECIFIC.
1946
1947 * method.c (emit_thunk): Call init_function_start in the macro case.
1948
1949 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
1950
1951 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
1952 defined and used to set flag_vtable_thunks.
1953
1954 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
1955
1956 * parse.y: Don't clear the inlines from their obstack until they've
1957 all been processed.
1958
1959 * decl.c (duplicate_decls): Don't complain about exception
1960 specification mismatch if flag_exceptions is off.
1961
1962 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
1963
1964 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
1965
1966 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
1967
1968 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
1969 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
1970 Include <stdio.h> before include files that formerly used STDIO_PROTO.
1971
1972 * decl.c, g++spec.c, lex.c, method.c, repo.c:
1973 Include "config.h" first, as per autoconf manual.
1974
1975 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
1976
1977 * decl.c (duplicate_decls): Tweak wording.
1978 * lex.c (do_pending_defargs): Don't die if we see a default arg
1979 that isn't a DEFAULT_ARG.
1980 * error.c (dump_expr): Handle DEFAULT_ARG.
1981
1982 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
1983 * lang-options.h: Add -fhandle-exceptions.
1984
1985 * class.c (build_vtable): vtables are artificial.
1986 (prepare_fresh_vtable): Likewise.
1987
1988 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
1989
1990 * cvt.c (ocp_convert): After converting to the target type, set
1991 LOOKUP_NO_CONVERSION.
1992
1993 * call.c (joust): Warn about potentially confusing promotion rules
1994 with -Wsign-promo.
1995 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
1996
1997 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
1998
1999 * exception.cc: Declare __terminate_func with noreturn attribute.
2000
2001 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
2002
2003 * parse.y: Break out eat_saved_input, handle errors.
2004 (function_try_block): Use compstmt instead of compstmt_or_error.
2005
2006 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
2007
2008 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
2009
2010 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2011
2012 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
2013 existence of cc1plus check whether $(LANGUAGES) contains C++.
2014
2015 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2016
2017 * method.c (do_build_copy_constructor): When copying an anonymous
2018 union member loop around to handle nested anonymous unions. Use
2019 the offset of the member relative to the outer structure, not the
2020 union.
2021
2022 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
2023
2024 * call.c (resolve_args): New fn.
2025 (build_new_function_call): Use it.
2026 (build_object_call): Likewise.
2027 (build_new_method_call): Likewise.
2028
2029 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
2030
2031 * call.c (build_over_call): tsubst all default parms from templates.
2032
2033 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
2034
2035 * decl.c (struct cp_function): Add static_labelno.
2036 (push_cp_function_context): Save it.
2037 (pop_cp_function_context): Restore it.
2038
2039 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
2040
2041 * typeck.c (build_component_ref_1): Convert from reference.
2042
2043 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2044
2045 * parse.y (current_declspecs, prefix_attributes): Initialize to
2046 NULL_TREE.
2047
2048 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
2049 before we try to force it to be a TREE_LIST.
2050 (decl): Make sure $1.t is non-nil.
2051
2052 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
2053
2054 * pt.c (uses_template_parms): Handle template first-parse codes.
2055
2056 * decl.c (cp_finish_decl): Only warn about user-defined statics.
2057
2058 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
2059
2060 * pt.c (unify): Handle BOOLEAN_TYPE.
2061
2062 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
2063 * pt.c (tsubst): Don't set it.
2064 * call.c (build_over_call): Use uses_template_parms.
2065
2066 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
2067
2068 * method.c (build_overload_nested_name): Use static_labelno
2069 instead of var_labelno.
2070 (build_qualified_name): New fn.
2071 (build_overload_name): Split out from here.
2072 (build_static_name): Use build_qualified_name.
2073 * decl.c (cp_finish_decl): Statics in extern inline functions
2074 have comdat linkage.
2075 (start_function): Initialize static_labelno.
2076
2077 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2078
2079 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
2080 before "all member functions in class [] are private"
2081
2082 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
2083
2084 * lex.c (do_scoped_id): convert_from_reference.
2085 * init.c (build_offset_ref): Likewise.
2086
2087 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
2088
2089 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
2090
2091 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
2092
2093 * typeck.c (get_member_function_from_ptrfunc): Promote index
2094 before saving it.
2095
2096 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
2097
2098 * tree.c (layout_basetypes): Move non-virtual destructor warning.
2099 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
2100
2101 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2102
2103 * decl.c (grokdeclarator): Call add_defarg_fn for the function
2104 type, too.
2105 * lex.c (add_defarg_fn): Adjust.
2106 (do_pending_defargs): Adjust. Don't skip the first parm.
2107
2108 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
2109
2110 * decl.c (build_enumerator): Global enumerators are also readonly.
2111
2112 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
2113 (build_dynamic_cast): Call it and convert_from_reference.
2114
2115 * lex.c (add_defarg_fn): New fn.
2116 (snarf_defarg): Don't add to defarg_types.
2117 (do_pending_defargs): Lose defarg_types. All fns we process now
2118 have defargs.
2119 * decl.c (grokfndecl): Call add_defarg_fn.
2120
2121 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
2122 * cp-tree.def: Add DEFAULT_ARG.
2123 * spew.c (yylex): Call snarf_defarg as appropriate.
2124 * parse.y: New tokens DEFARG and DEFARG_MARKER.
2125 (defarg_again, pending_defargs, defarg, defarg1): New rules.
2126 (structsp): Use pending_defargs.
2127 (parms, full_parm): Use defarg.
2128 * lex.c (init_lex): Initialize inline_text_firstobj.
2129 (do_pending_inlines): Never pass the obstack to feed_input.
2130 (process_next_inline): Call end_input instead of restore_pending_input.
2131 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
2132 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
2133 * input.c (end_input): New fn.
2134 (sub_getch): At the end of some fed input, just keep returning EOF
2135 until someone calls end_input.
2136 Remove 'obstack' field from struct input_source.
2137 * decl.c (grokparms): Handle DEFAULT_ARG.
2138 (replace_defarg): New fn.
2139 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
2140
2141 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2142
2143 * call.c (implicit_conversion): If nothing else works, try binding
2144 an rvalue to a reference.
2145
2146 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
2147
2148 * decl.c (init_decl_processing): fix Jun 30 patch -- move
2149 ifndef for Cygwin32 to include SIGSEGV.
2150
2151 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
2152
2153 * class.c (finish_struct_1): Only complain about pointers without
2154 copy stuff if there are any constructors.
2155
2156 * rtti.c (build_dynamic_cast): Call complete_type on the types.
2157
2158 * decl.c (grokfndecl): If the function we chose doesn't actually
2159 match, die.
2160
2161 * decl2.c (grokclassfn): Don't specify 'const int' for the
2162 artificial destructor parm.
2163
2164 * pt.c (type_unification): If we are called recursively, nothing
2165 decays.
2166
2167 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
2168
2169 * decl.c (init_decl_processing): Stop trying to catch signals
2170 other than SIGABRT since the Cygwin32 library doesn't support
2171 them correctly yet. This fixes a situation in which g++ causes
2172 a hang on SIGSEGVs and other such signals in our Win32-hosted
2173 tools.
2174
2175 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
2176
2177 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
2178
2179 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
2180
2181 * typeck2.c (store_init_value): Always return the value if our
2182 type needs constructing.
2183
2184 * method.c (hack_identifier): Convert class statics from
2185 reference, too.
2186
2187 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
2188
2189 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
2190
2191 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
2192
2193 * typeck.c (c_expand_return): Make sure we clean up temporaries at
2194 the end of return x;
2195
2196 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2197
2198 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
2199
2200 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
2201
2202 * except.c (expand_builtin_throw): Add support
2203 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
2204
2205 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2206
2207 * repo.c (extract_string): Null-terminate.
2208
2209 * cp-tree.h (TI_SPEC_INFO): New macro.
2210 (CLASSTYPE_TI_SPEC_INFO): New macro.
2211 * pt.c (push_template_decl): Correctly determine # of template parms
2212 for partial specs.
2213
2214 * call.c (compare_ics): Really fix 'this' conversions.
2215
2216 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
2217 non-template fn.
2218
2219 * pt.c (push_template_decl): Complain about mismatch in # of
2220 template parms between a class template and a member template.
2221
2222 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2223
2224 * method.c (synthesize_method): You can't call
2225 function_cannot_inline_p after finish_function.
2226 * decl.c (finish_function): Turn on flag_inline_functions and turn
2227 off DECL_INLINE before handing a synthesized method to the
2228 backend.
2229
2230 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2231
2232 * method.c (synthesize_method): Remove July 30 change to never set
2233 DECL_INLINE if at_eof.
2234
2235 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
2236
2237 * xref.c (GNU_xref_member): Ensure that the node has a
2238 decl_lang_specific part before checking DECL_FRIEND_P.
2239
2240 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
2241
2242 * pt.c (instantiate_class_template): Diagnose non-class types used
2243 as bases.
2244
2245 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
2246
2247 * typeck.c (build_conditional_expr): Use convert_for_initialization
2248 instead of convert_and_check.
2249
2250 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2251
2252 * parse.y (typespec): Don't pedwarn for typeof.
2253
2254 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
2255
2256 * repo.c (finish_repo): Only check changes if we would write a
2257 repo file.
2258
2259 * call.c (compare_ics): Fix handling of 'this' conversions.
2260
2261 * pt.c (do_decl_instantiation): Support static data too. Rename
2262 from do_function_instantiation.
2263 * cp-tree.h: Adjust.
2264 * parse.y: Adjust.
2265
2266 * repo.c (extract_string): New fn.
2267 (get_base_filename): Use it.
2268 (init_repo): Compare old args with current args.
2269
2270 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
2271
2272 * Makefile.in, Make-lang.in: Protect C-ls with a comment
2273 character, idea from Paul Eggert <eggert@twinsun.com>.
2274
2275 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
2276
2277 * typeck.c (c_expand_return): Be more persistent in looking for
2278 returned temps.
2279
2280 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
2281 pointer to reference.
2282
2283 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
2284
2285 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
2286
2287 * init.c (build_member_call, build_offset_ref):
2288 Use do_scoped_id instead of do_identifier.
2289
2290 * cvt.c (convert): Remove bogosity.
2291
2292 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2293
2294 * cvt.c (build_up_reference): Do checks of ARGTYPE and
2295 TARGET_TYPE before trying to use get_binfo.
2296
2297 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
2298
2299 * cvt.c (build_up_reference): Call get_binfo to get access control.
2300
2301 * decl2.c (import_export_decl): If we don't support weaks, leave
2302 statics undefined.
2303
2304 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
2305
2306 * except.c (expand_builtin_throw): Add support for machines that
2307 cannot access globals after throw's epilogue when
2308 -fno-sjlj-exceptions is used.
2309
2310 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
2311
2312 * parse.y: 'std::' becomes '::'.
2313 * lex.c (real_yylex): Remove 'namespace' warning.
2314 * init.c (build_member_call): Ignore 'std::'.
2315 (build_offset_ref): Likewise.
2316 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
2317 (do_toplevel_using_decl): Ignore 'using std::whatever'.
2318 * decl.c (push_namespace): Just sorry.
2319 (pop_namespace): Nop.
2320 (init_decl_processing): Declare std namespace.
2321
2322 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
2323
2324 * search.c (push_class_decls): A name which ambiguously refers to
2325 several instantiations of the same template just refers to the
2326 template.
2327
2328 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
2329
2330 * decl.c (build_enumerator): fix problem with unsigned long
2331 enumerated values being smashed to ints, causing overflow
2332 when computing next enumerated value. (for enum values around
2333 MAX_VAL).
2334
2335 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
2336
2337 * typeck.c (build_component_ref): Only call mark_used on a decl.
2338
2339 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2340
2341 * typeck.c (build_c_cast): Make the check for a ptr to function
2342 more specific before possible default_conversion call.
2343
2344 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
2345
2346 * except.c (expand_exception_blocks): Simplify and fix and make
2347 sure we don't end a region in a sequence, as expand_end_bindings
2348 doesn't like it.
2349
2350 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
2351
2352 * except.c (init_exception_processing): Mark terminate as not
2353 returning so that the optimizer can optimize better.
2354
2355 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
2356
2357 * cvt.c (convert): Don't do any extra work, if we can avoid it
2358 easily.
2359
2360 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
2361
2362 * *.[chy]: Change cp_convert to ocp_convert, change convert to
2363 cp_convert. convert is now reserved for the backend, and doesn't
2364 have the semantics a frontend person should ever want.
2365
2366 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
2367
2368 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
2369 Lose -traditional support.
2370
2371 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2372
2373 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
2374
2375 * parse.y (self_reference): Do it for templates, too.
2376 * class.c (pushclass): Don't overload_template_name; the alias
2377 generated by build_self_reference serves the same purpose.
2378
2379 * tree.c (list_hash): Make static, take more args.
2380 (list_hash_lookup): Likewise.
2381 (list_hash_add): Make static.
2382 (list_hash_canon): Lose.
2383 (hash_tree_cons): Only build a new node if one isn't already in the
2384 hashtable.
2385 (hash_tree_chain): Use hash_tree_cons.
2386 * cp-tree.h: Adjust.
2387 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
2388 of calling lookup_name.
2389
2390 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
2391
2392 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
2393 doesn't refer to the CONST_DECLs.
2394
2395 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
2396
2397 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
2398 is bigger.
2399 (expand_class_desc): Convert the last argument to a sizetype.
2400
2401 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2402
2403 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
2404 __real__): Add reswords.
2405 * hash.h: Regenerate.
2406 * lex.h (rid): Add RID_COMPLEX.
2407 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
2408 * lex.c (init_lex): Add building of RID_COMPLEX.
2409 (real_yylex): General cleanup in line with what c-lex.c also has,
2410 sans the cruft for traditional; add handling of SPEC_IMAG, complex
2411 types, and imaginary numeric constants.
2412 * parse.y (REALPART, IMAGPART): Add tokens.
2413 (unary_expr): Add REALPART and IMAGPART rules.
2414 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
2415 * decl.c (complex_{integer,float,double,long}_type_node): Define
2416 types.
2417 (init_decl_processing): Set up the types.
2418 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
2419 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
2420 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
2421 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
2422 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
2423 COMPLEX_TYPE case.
2424 * method.c (build_overload_name): Add handling of the different
2425 COMPLEX_TYPEs, prefixing them with `J'.
2426 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
2427 as a template parm.
2428 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
2429 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
2430 (mapcar): Handle COMPLEX_CST.
2431 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
2432 (common_type): Add code for complex types.
2433 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
2434 (convert_for_assignment): Likewise.
2435 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
2436
2437 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
2438
2439 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
2440 tsubst_expr, as it might try to do overload resolution.
2441
2442 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
2443
2444 * pt.c (instantiate_class_template): Oops.
2445
2446 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
2447
2448 * cp-tree.def: Add TAG_DEFN.
2449 * pt.c (tsubst_enum): New fn.
2450 (instantiate_class_template): Use it.
2451 (tsubst_expr): Support TAG_DEFN.
2452 (tsubst): Support local enums.
2453 (tsubst_copy): Likewise.
2454 * decl.c (finish_enum): Likewise.
2455 (start_enum): If this is a local enum, switch to permanent_obstack.
2456
2457 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
2458
2459 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
2460 (finish_function): Put the base init code for constructors just
2461 after the parm cleanup insns.
2462 (struct cp_function): Add last_parm_cleanup_insn.
2463 (push_cp_function_context): Likewise.
2464 (pop_cp_function_context): Likewise.
2465
2466 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
2467
2468 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
2469
2470 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2471
2472 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
2473 for THUNK_FNDECL before we switch to temporary allocation.
2474
2475 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
2476
2477 * call.c (build_new_op): Handle null arg2 for ?:.
2478
2479 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
2480
2481 * except.c (expand_exception_blocks): Ensure that we flow through
2482 the end of the exception region for the exception specification.
2483 Move exception region for the exception specification in, so that
2484 it doesn't protect the parm cleanup. Remove some obsolete code.
2485 * decl.c (store_parm_decls): Likewise.
2486 (finish_function): Likewise.
2487
2488 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
2489
2490 * init.c (build_new): Fix nothrow handling.
2491
2492 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2493
2494 * init.c (emit_base_init): Don't warn about the initialization
2495 list for an artificial member.
2496
2497 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2498
2499 * expr.c (do_case): Handle !START case for the error msg.
2500
2501 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
2502
2503 * decl2.c, lang-options.h: New option -Weffc++.
2504 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
2505 to -Weffc++.
2506
2507 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
2508 to MULTIPLE_SYMBOL_SPACES.
2509
2510 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
2511
2512 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
2513
2514 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
2515
2516 * typeck.c (c_expand_return): Don't complain about returning void
2517 to void in an artificial function.
2518 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
2519 don't set DECL_RESULT, set DECL_ARTIFICIAL.
2520 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
2521
2522 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
2523
2524 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
2525 exception handling.
2526 * except.c (init_exception_processing): Likewise.
2527 (expand_end_catch_block): Likewise.
2528 (expand_exception_blocks): Likewise.
2529 (expand_throw): Likewise.
2530 * exception.cc (__default_terminate): Likewise.
2531
2532 * init.c (perform_member_init): Use new method of expr level
2533 cleanups, instead of cleanups_this_call and friends.
2534 (emit_base_init): Likewise.
2535 (expand_aggr_vbase_init_1): Likewise.
2536 (expand_vec_init): Likewise.
2537 * decl.c (cp_finish_decl): Likewise.
2538 (expand_static_init): Likewise.
2539 (store_parm_decls): Likewise.
2540 (cplus_expand_expr_stmt): Likewise.
2541 * decl2.c (finish_file): Likewise.
2542
2543 * Make-lang.in (exception.o): Ok to compile with -O now.
2544
2545 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
2546 we know it will be done later by the backend.
2547
2548 * decl2.c (lang_f_options): Remove support for short temps.
2549 * lang-options.h: Likewise.
2550
2551 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
2552
2553 * tree.c (varargs_function_p): New fn.
2554 * method.c (emit_thunk): Replace broken generic code with code to
2555 generate a heavyweight thunk function.
2556
2557 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
2558
2559 * pt.c (process_template_parm): pedwarn about floating-point parms.
2560
2561 * decl.c (grokdeclarator): inline no longer implies static.
2562
2563 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
2564
2565 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
2566
2567 * class.c (check_for_override): The signature of an overriding
2568 function is not changed.
2569
2570 * call.c (build_over_call): Move setting of conv into the loop.
2571 Note: this change, along with the related changes of the 18th thru
2572 the 20th of April, fix an infinite loop problem in conversions.
2573
2574 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
2575
2576 * call.c (build_user_type_conversion_1): Really ignore rvalue
2577 conversions when looking for a REFERENCE_TYPE.
2578
2579 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
2580 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
2581 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
2582 (build_unary_op): Likewise.
2583 * call.c (build_over_call): See through a CONVERT_EXPR around the
2584 ADDR_EXPR for on a temporary.
2585 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
2586 the ADDR_EXPR for a local variable.
2587
2588 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
2589
2590 * call.c (build_user_type_conversion_1): If we're trying to
2591 convert to a REFERENCE_TYPE, only consider lvalue conversions.
2592 (build_new_function_call): Print candidates.
2593 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
2594 (reference_binding): Binding a temporary of a reference-related type
2595 is BAD.
2596
2597 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2598
2599 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
2600 * tinfo2.cc (type_info::before): Likewise.
2601
2602 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
2603
2604 * call.c (implicit_conversion): Oops.
2605
2606 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
2607
2608 * call.c (implicit_conversion): Try to find a reference conversion
2609 before binding a const reference to a temporary.
2610
2611 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
2612
2613 * exception.cc (__default_unexpected): Call terminate by default,
2614 so that if the user overrides terminate, the correct function will
2615 be called.
2616
2617 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
2618
2619 * parse.y (left_curly): Avoid trying to use any fields of
2620 error_mark_node, as there aren't any.
2621
2622 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
2623
2624 * lex.c (do_identifier): Avoid breaking on overloaded methods
2625 as default arguments.
2626
2627 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
2628
2629 * call.c (add_template_candidate): Initialize the variable "dummy".
2630
2631 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
2632
2633 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
2634 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
2635
2636 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2637
2638 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
2639 (debug_binfo): Delete decl, not needed.
2640
2641 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
2642 promotes_to_aggr_type): Delete fns.
2643 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
2644 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
2645 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
2646
2647 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
2648
2649 * friend.c (is_friend_type): Delete fn.
2650 * cp-tree.h (is_friend_type): Delete decl.
2651
2652 * decl.c (original_result_rtx, double_ftype_double,
2653 double_ftype_double_double, int_ftype_int, long_ftype_long,
2654 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
2655 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
2656
2657 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
2658 fwd decls.
2659 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
2660
2661 * decl.c (pushdecl_nonclass_level): #if 0, unused.
2662 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
2663
2664 * lex.c (reinit_lang_specific): #if 0, unused.
2665 * cp-tree.h (reinit_lang_specific): #if 0 decl.
2666
2667 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
2668 * cp-tree.h (revert_static_member_fn): Delete decl.
2669
2670 * class.c (root_lang_context_p): Delete fn.
2671 * cp-tree.h (root_lang_context_p): Delete decl.
2672
2673 * decl.c (set_current_level_tags_transparency): #if 0, unused.
2674 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
2675
2676 * lex.c (set_vardecl_interface_info): Make static.
2677 * cp-tree.h (set_vardecl_interface_info): Delete decl.
2678
2679 * call.c (find_scoped_type): Make static.
2680 * cp-tree.h (find_scoped_type): Delete decl.
2681
2682 * search.c (convert_pointer_to_vbase): Make static.
2683 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
2684
2685 * decl.c (const_ptr_type_node): Likewise.
2686 * cp-tree.h (const_ptr_type_node): Delete decl.
2687
2688 * typeck.c (common_base_type): Make static.
2689 * cp-tree.h (common_base_types): Delete erroneous decl.
2690
2691 * pt.c (classtype_mangled_name): Make static.
2692 * cp-tree.h (classtype_mangled_name): Delete decl.
2693
2694 * lex.c (check_newline): Make static.
2695 * cp-tree.h (check_newline): Delete decl.
2696
2697 * typeck.c (build_x_array_ref): Delete fn, same idea as
2698 grok_array_decl.
2699 * cp-tree.h (build_x_array_ref): Delete decl.
2700
2701 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
2702 copy_lang_decl.
2703 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
2704
2705 * class.c (build_vtable_entry): Make static.
2706 * cp-tree.h (build_vtable_entry): Delete decl.
2707
2708 * class.c (build_vbase_pointer): Make static.
2709 * cp-tree.h (build_vbase_pointer): Delete decl.
2710
2711 * sig.c (build_sptr_ref): Add forward decl and make static.
2712 * cp-tree.h (build_sptr_ref): Delete decl.
2713
2714 * call.c (build_new_method_call): Add forward decl and make static.
2715 * cp-tree.h (build_new_method_call): Delete decl.
2716
2717 * call.c (build_object_call): Make static.
2718 * class.c (check_for_override, complete_type_p, mark_overriders):
2719 Likewise.
2720 * decl.c (cp_function_chain): Likewise.
2721 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
2722 Likewise.
2723 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
2724 Likewise.
2725 * tree.c (build_cplus_array_type_1): Likewise.
2726 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
2727 (comp_target_parms): Likewise.
2728
2729 * init.c (build_builtin_call): Make static.
2730 * cp-tree.h (build_builtin_call): Delete decl.
2731
2732 * typeck.c (binary_op_error): Delete decl.
2733 * cp-tree.h (binary_op_error): Likewise.
2734
2735 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2736
2737 * call.c (build_method_call): Compare against error_mark_node
2738 directly, rather than the ERROR_MARK tree code.
2739 * cvt.c (cp_convert): Likewise.
2740 * decl.c (print_binding_level): Likewise.
2741 (duplicate_decls): Likewise.
2742 (grokdeclarator): Likewise.
2743 (grokdeclarator): Likewise.
2744 * init.c (expand_aggr_init_1): Likewise.
2745 (decl_constant_value): Likewise.
2746 * method.c (build_opfncall): Likewise.
2747 (hack_identifier): Likewise.
2748 * typeck.c (build_modify_expr): Likewise.
2749
2750 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
2751
2752 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2753
2754 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
2755
2756 * pt.c (coerce_template_parms): Add new error message.
2757
2758 * method.c (build_overload_value): Implement name mangling for
2759 floating-point template arguments.
2760
2761 * method.c (build_overload_int, icat, dicat): Fix mangling of template
2762 arguments whose absolute value doesn't fit in a signed word.
2763
2764 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2765
2766 * friend.c: New file; put all of the friend stuff in here.
2767 * init.c: Instead of here.
2768 * Makefile.in (CXX_OBJS): Add friend.o.
2769 (friend.o): Add dependencies.
2770 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
2771
2772 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
2773
2774 * call.c (build_scoped_method_call): Complain if the scope isn't a
2775 base.
2776
2777 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
2778
2779 * parse.y (left_curly): Don't crash on erroneous type.
2780
2781 * init.c (build_delete): Fix type of ref.
2782
2783 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
2784
2785 * search.c (get_vbase_1): Renamed from get_vbase.
2786 (get_vbase): Wrapper, now non-static.
2787 (convert_pointer_to_vbase): Now static.
2788
2789 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
2790 * init.c (build_delete): Pass one.
2791 (build_partial_cleanup_for): Use build_scoped_method_call.
2792 * decl.c (finish_function): Pass a binfo.
2793
2794 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2795
2796 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
2797
2798 * typeck.c (build_c_cast): Lose other reference to flag.
2799
2800 * call.c (build_field_call): Don't look for [cd]tor_identifier.
2801 * decl2.c (delete_sanity): Remove meaningless use of
2802 LOOKUP_HAS_IN_CHARGE.
2803 * decl.c (finish_function): Use build_scoped_method_call instead
2804 of build_delete for running vbase dtors.
2805 * init.c (build_delete): Call overload resolution code instead of
2806 duplicating it badly.
2807
2808 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
2809
2810 * call.c (build_over_call): Call mark_used before trying to elide
2811 the call.
2812
2813 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
2814
2815 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2816
2817 * typeck.c (build_modify_expr): Always pedwarn for a cast to
2818 non-reference used as an lvalue.
2819
2820 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
2821
2822 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
2823
2824 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
2825
2826 * parse.y (handler): Fix template typo.
2827
2828 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
2829
2830 * error.c (lang_decl_name): New fn.
2831 * tree.c (lang_printable_name): Use it.
2832
2833 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
2834
2835 * g++spec.c: Include config.h so that we can catch bzero #defines
2836 from the config file.
2837
2838 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
2839
2840 * new1.cc: Include a declaration for malloc, to avoid warning, and
2841 avoid lossing on systems that require one (ones that define malloc
2842 in xm.h).
2843
2844 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
2845
2846 * decl2.c (max_tinst_depth): New variable.
2847 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
2848 option.
2849 * pt.c (max_tinst_depth): Variable moved.
2850 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
2851 as legal.
2852
2853 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
2854
2855 * decl.c (xref_basetypes): Allow a base class that depends on
2856 template parms to be incomplete.
2857
2858 * decl2.c (build_expr_from_tree): Support typeid(type).
2859 * rtti.c (get_typeid): Support templates.
2860 (expand_si_desc, expand_class_desc): Fix string length.
2861 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
2862
2863 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
2864
2865 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
2866
2867 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
2868
2869 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
2870
2871 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
2872 smashes together template and non-template decls of the same
2873 signature.
2874
2875 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
2876
2877 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
2878
2879 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2880
2881 * decl.c (duplicate_decls): Next route, pedwarn about different
2882 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
2883
2884 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2885
2886 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
2887 (struct lang_type): Delete has_default_implementation member.
2888 Increase dummy to 21.
2889 * decl.c (start_method): Delete usage.
2890
2891 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
2892 store_after_parms, start_decl_1, auto_function): Add decls.
2893 (get_arglist_len_in_bytes, declare_implicit_exception,
2894 have_exceptions_p, make_type_decl, typedecl_for_tag,
2895 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
2896 build_component_type_expr, cplus_exception_name,
2897 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
2898 * call.c (build_this): Make static.
2899 (is_complete): Likewise.
2900 (implicit_conversion): Likewise.
2901 (reference_binding): Likewise.
2902 (standard_conversion): Likewise.
2903 (strip_top_quals): Likewise.
2904 (non_reference): Likewise.
2905 (build_conv): Likewise.
2906 (user_harshness): Likewise.
2907 (rank_for_ideal): Likewise.
2908 * decl.c (start_decl_1): Delete forward decl.
2909 (push_decl_level): Make static.
2910 (resume_binding_level): Make static.
2911 (namespace_bindings_p): Make static.
2912 (declare_namespace_level): Make static.
2913 (lookup_name_real): Make static.
2914 (duplicate_decls): Make static. Take register off NEWDECL and
2915 OLDDECL parm decls.
2916 * decl2.c (get_sentry): Make static.
2917 (temp_name_p): Delete fn.
2918 * except.c (auto_function): Delete decl.
2919 * lex.c (handle_{cp,sysv}_pragma): Make static.
2920 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
2921 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
2922 * pt.c (tsubst_expr_values): Make static.
2923 * rtti.c (combine_strings): Delete decl.
2924
2925 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
2926
2927 * pt.c (push_template_decl): Handle getting a typedef.
2928
2929 * call.c (build_new_function_call): Complain about void arg.
2930
2931 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2932
2933 * decl.c (duplicate_decls): Give pedwarn of different exceptions
2934 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
2935
2936 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
2937
2938 * except.c (expand_throw): Don't expand the cleanup tree here,
2939 since we are not going to write the rtl out. Fixes problem with
2940 -g -O on SPARC.
2941
2942 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
2943
2944 * Make-lang.in: Add $(exeext) as necessary.
2945
2946 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
2947
2948 * parse.y (handler_seq): Must have at least one catch clause.
2949
2950 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
2951
2952 * call.c (add_builtin_candidate): Restore ?: hack.
2953
2954 * decl.c (grok_op_properties): More warnings.
2955
2956 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
2957
2958 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
2959 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
2960
2961 * decl.c (duplicate_decls): Scale back to a warning, and only do
2962 'em if -pedantic.
2963
2964 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
2965
2966 * decl.c (duplicate_decls): pedwarn mismatched exception
2967 specifications.
2968
2969 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
2970
2971 * call.c (build_new_method_call): Don't display the invisible
2972 argument for controlling virtual bases.
2973
2974 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
2975
2976 * new: Add nothrow new and delete, bad_alloc and throw specifications
2977 for delete.
2978 * decl.c (init_decl_processing): Add throw specification for delete.
2979 * new.cc (nothrow): Define.
2980 * lex.c (real_yylex): Removing warning that throw and friends are
2981 keywords.
2982 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
2983 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
2984 * Make-lang.in: Add new{1,2}.{cc,o}.
2985
2986 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
2987
2988 * lex.c (cons_up_default_function): Fix return type of synth op=.
2989
2990 * init.c (emit_base_init): Add warnings for uninitialized members
2991 and bases.
2992
2993 * decl.c (xref_basetypes): Add warning for non-polymorphic type
2994 with destructor used as base type.
2995
2996 * decl.c (grok_op_properties): Add warning for op= returning void.
2997 * typeck.c (c_expand_return): Add warning for op= returning anything
2998 other than *this.
2999
3000 * class.c (finish_struct_1): Add warning for class with pointers
3001 but not copy ctor or copy op=.
3002
3003 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
3004 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
3005 (instantiate_template): If -fexternal-templates, add this
3006 instantiation to pending_templates.
3007
3008 * decl2.c (copy_assignment_arg_p): Disable old hack to support
3009 Booch components.
3010
3011 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
3012
3013 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
3014
3015 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
3016
3017 * call.c (standard_conversion): Handle getting references. Tack
3018 on RVALUE_CONV here. Do it for non-class types, too.
3019 (reference_binding): Pass references to standard_conversion.
3020 (implicit_conversion): Likewise.
3021 (add_builtin_candidate): Disable one ?: kludge.
3022 (convert_like): Handle RVALUE_CONVs for non-class types.
3023 (joust): Disable the other ?: kludge.
3024
3025 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3026
3027 * decl.c (init_decl_processing): Add code to build up common
3028 function types beforehand, to avoid creation then removal of
3029 things already in the hash table.
3030
3031 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
3032
3033 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
3034 the arguments.
3035
3036 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
3037 current_template_parms.
3038
3039 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
3040
3041 * search.c (lookup_field): Don't return a function, check want_type.
3042
3043 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3044
3045 * init.c (build_new): Make sure PLACEMENT has a type.
3046
3047 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
3048
3049 * init.c (build_new): Support new (nothrow).
3050
3051 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
3052
3053 * pt.c (instantiate_decl): Also do push_to_top_level before setting
3054 up DECL_INITIAL.
3055
3056 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
3057 * pt.c (tsubst): Defer instantiation of default args.
3058 * call.c (build_over_call): Until here.
3059
3060 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3061
3062 * search.c (lookup_field): Make sure we have an
3063 IDENTIFIER_CLASS_VALUE before we try to return it.
3064
3065 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
3066
3067 * call.c (build_method_call): Delete unused var PARM.
3068 (build_overload_call_real): Likewise.
3069 (build_object_call): Delete unused var P.
3070 (build_new_op): Likewise.
3071 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
3072 var definitions, which are never used.
3073 (shadow_tag): Delete unused var FN.
3074 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
3075 * init.c (build_new): Delete unused var ALLOC_TEMP.
3076 * method.c (hack_identifier): Delete unused var CONTEXT.
3077 (do_build_copy_constructor): Delete unused var NAME.
3078 (synthesize_method): Delete unused var BASE.
3079 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
3080 * rtti.c (build_headof): Delete unused var VPTR.
3081 (get_typeid): Delete unused var T.
3082 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
3083 and ORIG_OP2.
3084 (build_ptrmemfunc): Delete unused vars U and NINDEX.
3085 * typeck2.c (build_functional_cast): Delete unused var BINFO.
3086
3087 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
3088
3089 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
3090 things in a type being defined.
3091 * decl.c (finish_enum): Reverse the values so that they are in
3092 the correct order.
3093
3094 * pt.c (instantiate_class_template): Don't initialize
3095 BINFO_BASETYPES until the vector is filled out.
3096 (unify): Don't abort on conflicting bindings, just fail.
3097 (instantiate_decl): Do push_tinst_level before any tsubsting.
3098
3099 * method.c (build_overload_value): Handle getting a
3100 TEMPLATE_CONST_PARM for a pointer.
3101
3102 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
3103
3104 * init.c (expand_member_init): Don't give 'not a base' error for
3105 templates.
3106
3107 * pt.c (instantiate_decl): Call import_export_decl later.
3108
3109 * pt.c (instantiate_class_template): Return a value.
3110
3111 * parse.y (extension): New rule for __extension__.
3112 (extdef, unary_expr, decl, component_decl): Use it.
3113
3114 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
3115
3116 * class.c (base_binfo): Remove unused base_has_virtual member.
3117 (finish_base_struct): Likewise.
3118 (finish_struct_1): Likewise.
3119
3120 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
3121
3122 * search.c (expand_upcast_fixups): Fix bogus code generation
3123 problem where the generated code uses the wrong index into the
3124 runtime built vtable on the stack. Old code could clobber random
3125 stack values.
3126
3127 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
3128
3129 * init.c (perform_member_init): Make sure the partial EH cleanups
3130 live on the function_obstack.
3131
3132 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
3133
3134 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
3135 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
3136
3137 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
3138
3139 * decl.c (grokvardecl): Avoid ANSI style initialization.
3140
3141 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
3142
3143 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
3144
3145 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
3146
3147 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
3148
3149 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3150
3151 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
3152 arguments we compare against. Start the count of I at 1, not 0,
3153 since argv[0] is still the command.
3154
3155 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
3156
3157 * lang-specs.h: Accept .cp as an C++ extension.
3158
3159 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3160
3161 * cp-tree.h (ptr_reasonably_similar): Add decl.
3162
3163 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3164
3165 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
3166 pointer. New local SPECBITS with the parm's value.
3167 (grokdeclarator): Pass &specbits down.
3168
3169 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
3170 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
3171
3172 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
3173 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
3174
3175 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
3176 not an error_mark_node.
3177
3178 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3179
3180 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
3181 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
3182
3183 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3184
3185 * decl.c (grokdeclarator): When giving an anonymous struct a name,
3186 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
3187 not affected).
3188
3189 * typeck2.c (build_m_component_ref): If component is a pointer
3190 to data member, resolve the OFFSET_REF now.
3191
3192 * call.c (convert_like): Don't go into infinite recursion.
3193
3194 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
3195
3196 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
3197 * tree.c (layout_basetypes): And on the vbase ptr.
3198
3199 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
3200
3201 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
3202 CHAR_TYPE_SIZE so bool is always the same size as another type.
3203
3204 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
3205
3206 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
3207
3208 * decl2.c (grok_x_components): Remove synthesized methods from
3209 TYPE_METHODS of an anonymous union, complain about member
3210 functions.
3211 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
3212 anonymous unions.
3213 (finish_function): Just clear the DECL_RTL of our arguments.
3214
3215 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3216
3217 * decl2.c (finish_file): Emit DWARF debugging info for static data
3218 members.
3219
3220 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
3221
3222 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
3223
3224 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
3225 IDENTIFIER_NODE.
3226
3227 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3228
3229 * Make-lang.in (g++-cross$(exeext)): Fix typo.
3230
3231 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3232
3233 Make the g++ driver now be a standalone program, rather than one
3234 that tries to run the gcc driver after munging up the options.
3235 * Make-lang.in (g++.c, g++spec.o): New rules.
3236 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
3237 added.
3238 (g++$(exeext)): New rule, based on xgcc rule.
3239 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
3240 * g++spec.c: New file.
3241 * g++.c: Removed file.
3242
3243 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
3244
3245 * cvt.c (build_up_reference): Arrange for any temporary values
3246 that have been keep in registers until now to be put into memory.
3247
3248 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3249
3250 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
3251 that make -j3 bootstrap works better.
3252
3253 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
3254
3255 * decl.c (pushtag): Do pushdecl for anon tags.
3256
3257 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
3258
3259 * typeck.c (c_expand_return): Fix logic.
3260 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
3261
3262 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
3263
3264 * g++.c (main): Make sure arglist has a final NULL entry. Add
3265 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
3266 stdin/stdout of the invoked program are redirected to
3267 nowheresville.
3268
3269 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3270
3271 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
3272
3273 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
3274
3275 * init.c (resolve_offset_ref): Handle obj.vfn better.
3276 * typeck.c (build_component_ref): Set TREE_TYPE on result from
3277 build_vfn_ref.
3278
3279 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
3280
3281 * typeck.c (convert_for_assignment): Also handle anachronistic
3282 implicit conversions from (::*)() to cv void*.
3283 * cvt.c (cp_convert_to_pointer): Likewise.
3284
3285 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3286
3287 * lex.c (handle_cp_pragma): Fix bogus warning.
3288
3289 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
3290
3291 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
3292 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
3293
3294 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3295
3296 * class.c (finish_struct_1): Support DWARF2_DEBUG.
3297 * search.c (dfs_debug_mark): Likewise.
3298 * decl2.c (finish_vtable_vardecl): Likewise.
3299 * decl.c (pushtag, finish_enum): Likewise.
3300 * lex.c (check_newline): Use debug_* instead of calling *out
3301 functions directly.
3302
3303 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3304
3305 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
3306 on some picky hosts.
3307
3308 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
3309
3310 * class.c (finish_struct_1): A class has a non-trivial copy
3311 constructor if it has virtual functions.
3312
3313 * cvt.c (cp_convert): Always call a constructor.
3314
3315 * call.c (reference_binding): Still tack on a REF_BIND
3316 for bad conversions.
3317 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
3318
3319 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
3320 (c_expand_return): Likewise.
3321 * typeck2.c (digest_init): Likewise for { }.
3322 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
3323 * cvt.c (cp_convert): Handle failure better.
3324
3325 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3326
3327 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
3328 of GCC be path-relative.
3329
3330 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3331
3332 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
3333 it does need choose-temp.o and pexecute.o.
3334
3335 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3336
3337 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
3338 that we still use it.
3339 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
3340
3341 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3342
3343 * init.c (expand_default_init): Avoid calling constructors to
3344 initialize reference temps.
3345
3346 * cvt.c (convert_to_reference): Fix.
3347
3348 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
3349
3350 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
3351 (convert_to_reference): Likewise.
3352 * typeck.c (convert_for_initialization): Likewise.
3353 * init.c (expand_default_init): Likewise.
3354 (expand_aggr_init_1): Likewise.
3355 * cp-tree.h (CONV_NONCONVERTING): Lose.
3356 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
3357 * *.c: Adjust.
3358 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
3359
3360 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
3361
3362 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
3363
3364 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3365
3366 * init.c (expand_aggr_init_1): Don't crash on non-constructor
3367 TARGET_EXPR.
3368
3369 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3370
3371 * g++.c: Include gansidecl.h.
3372 (VPROTO, PVPROTO, VA_START): Delete.
3373 (choose_temp_base_try, choose_temp_base, perror_exec,
3374 run_dos) [__MSDOS__]: Delete fns.
3375 (pfatal_with_name): Delete fn.
3376 (temp_filename): Declare like in gcc.c.
3377 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
3378 (error_count, signal_count): Define.
3379 (error): Delete both definitions.
3380 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
3381 (pfatal_pexecute): Add fn from gcc.c.
3382 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
3383 code to use the pexecute stuff also used by gcc.c.
3384 (MIN_FATAL_STATUS): Define.
3385 * Make-lang.in (g++): Add dependency on and linking with
3386 choose-temp.o and pexecute.o.
3387
3388 * cp-tree.h: Include gansidecl.h.
3389 (STDIO_PROTO): Delete #undef/#define.
3390 * cvt.c (NULL): Delete #undef/#define.
3391 * expr.c (NULL): Likewise.
3392 * init.c (NULL): Likewise.
3393 * rtti.c (NULL): Likewise.
3394 * xref.c (NULL): Likewise.
3395
3396 * cp-tree.h (build_user_type_conversion): Add prototype.
3397 * call.c (build_user_type_conversion): Delete prototype. Correct
3398 decl of FLAGS arg to be an int.
3399 * cvt.c (build_user_type_conversion): Likewise.
3400
3401 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
3402
3403 * cp-tree.def: Add TRY_BLOCK and HANDLER.
3404 * except.c (expand_start_catch_block): Support templates.
3405 * parse.y (try_block, handler_seq): Likewise.
3406 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
3407
3408 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
3409
3410 * pt.c (current_template_args): New fn.
3411 (push_template_decl): Use it.
3412 * decl.c (grokdeclarator): Use it.
3413
3414 * decl2.c (build_expr_from_tree): Dereference ref vars.
3415
3416 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
3417 the decl-specifier-seq.
3418
3419 * decl.c (grok_op_properties): Don't force the type of a conversion
3420 op to be complete. Don't warn about converting to the same type
3421 for template instantiations.
3422
3423 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
3424 methods.
3425
3426 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
3427
3428 * typeck.c (get_delta_difference): Remove previous bogusness.
3429 Don't give errors if force is set.
3430
3431 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3432
3433 * decl2.c (finish_file): Don't emit debug info.
3434 * decl.c (pushdecl): Lose obsolete code.
3435 (grokdeclarator): Still do the long long thing after complaining.
3436 * search.c (note_debug_info_needed): Don't do anything if we're in a
3437 template.
3438 * method.c (synthesize_method): For non-local classes,
3439 push_to_top_level first.
3440
3441 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
3442
3443 * typeck.c (get_delta_difference): Add no_error parameter.
3444 (build_ptrmemfunc): Call get_delta_difference with no_error set;
3445 we don't want error messages when converting unrelated
3446 pointer-to-member functions.
3447
3448 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
3449
3450 * error.c (dump_expr): Improve the wording on error messages that
3451 involve pointer to member functions.
3452
3453 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
3454
3455 * cvt.c (cp_convert_to_pointer): Move code for conversions from
3456 (::*)() to void* or (*)() up a bit, so that we can convert from
3457 METHOD_TYPEs as well.
3458
3459 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3460
3461 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
3462 There are no 'member' types.
3463 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
3464 (build_x_typeid): Handle errors.
3465
3466 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
3467
3468 * typeck.c (convert_for_assignment): Handle anachronistic implicit
3469 conversions from (::*)() to void* or (*)().
3470 * cvt.c (cp_convert_to_pointer): Likewise.
3471 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
3472 conversions from here.
3473 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
3474 * lang-options.h: Likewise.
3475 * decl2.c (warn_pmf2ptr): Define.
3476 * cp-tree.h: Declare it.
3477 * typeck2.c (digest_init): Allow pmfs down into
3478 convert_for_initialization.
3479
3480 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
3481
3482 * typeck.c (c_expand_return): Fix for returning overloaded fn.
3483
3484 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3485
3486 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
3487 * decl.c (grok_reference_init): Pass DIRECT_BIND.
3488 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
3489 DIRECT_BIND.
3490 * call.c (convert_like): Don't pass INDIRECT_BIND.
3491 * typeck.c (convert_arguments): Likewise.
3492 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
3493
3494 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
3495
3496 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
3497 similar code in build_up_ref.
3498 * cvt.c (build_up_reference): Drastically simplify.
3499
3500 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
3501
3502 * typeck.c (signed_or_unsigned_type): If the given type already
3503 as the correct signedness, then just return it.
3504
3505 * typeck.c ({un,}signed_type): If can't do anything, call
3506 signed_or_unsigned_type.
3507
3508 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
3509
3510 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
3511 current_class_type is NULL.
3512
3513 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
3514
3515 * class.c (finish_struct_1): Avoid empty structs by adding a field
3516 so layout_type gets the mode right.
3517
3518 * typeck.c (c_expand_return): Drastically simplify.
3519
3520 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3521
3522 * typeck.c (decay_conversion): Handle overloaded methods.
3523
3524 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
3525
3526 * call.c (build_over_call): A TARGET_EXPR has side-effects.
3527
3528 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
3529
3530 * cvt.c (convert_to_pointer_force): Add code to support pointer to
3531 member function to pointer to function conversions.
3532 * init.c (resolve_offset_ref): Add code to allow faked up objects,
3533 ignoring them if they are not used, and giving an error, if they
3534 are needed.
3535 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
3536 code, and so that we can give an error, if we needed an object,
3537 and one was not provided.
3538 (build_c_cast): Don't call default_conversion when we want to
3539 convert to pointer to function from a METHOD_TYPE.
3540
3541 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
3542
3543 * Make-lang.in (cplib2.ready): Fix logic.
3544
3545 * decl.c (shadow_tag): Only complain about non-artificial function
3546 members.
3547
3548 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
3549
3550 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
3551
3552 * expr.c (cplus_expand_expr): Pre-tweak call_target like
3553 expand_inline_function would.
3554
3555 * pt.c (mark_decl_instantiated): If extern_p, call
3556 mark_inline_for_output.
3557
3558 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
3559
3560 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
3561 pmd conversions.
3562
3563 * typeck.c (get_delta_difference): Fix wording, as we can be used
3564 for pointer to data members.
3565
3566 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
3567
3568 * pt.c (tsubst): If the function decl isn't a member of this
3569 template, return a copy of the decl (including copying the
3570 lang-specific part) so we don't hose ourselves later.
3571
3572 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
3573
3574 * class.c (finish_struct): Remove DWARF-specific tag handling.
3575 * decl.c (pushtag): Likewise.
3576 (finish_function): Always clear DECL_ARGUMENTS on function decls with
3577 no saved RTX.
3578 * decl2.c (finish_file): Emit DWARF debugging info for static data
3579 members.
3580
3581 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
3582
3583 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
3584 isn't the same as the new one before we whack it.
3585
3586 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
3587
3588 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
3589 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
3590 warn_traditional and warn_strict_prototypes; remove ancient
3591 'overload' code; remove references to flag_traditional.
3592
3593 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
3594
3595 * input.c (sub_getch): Handle 8-bit characters in string literals.
3596
3597 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
3598
3599 * tree.c (mapcar): Handle CONSTRUCTORs.
3600 (copy_to_permanent): Handle expression_obstack properly.
3601
3602 * Make-lang.in (cplib2.txt): Also depend on the headers.
3603
3604 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
3605 INT_TYPE_SIZE.
3606 (expand_class_desc): Use USItype for offset field.
3607 * tinfo.h (struct __class_type_info): Likewise.
3608
3609 * method.c (build_overload_int): TYPE_PRECISION should be applied
3610 to types.
3611
3612 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
3613
3614 * call.c (build_new_op): A COND_EXPR involving void must be a
3615 builtin.
3616
3617 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3618
3619 * typeck.c (build_x_component_ref): New fn.
3620 (build_object_ref): Use it.
3621 * parse.y (primary): Use it.
3622 * decl2.c (build_expr_from_tree): Use it.
3623 * cp-tree.h: Declare it.
3624
3625 * decl.c (start_decl): variable-sized arrays cannot be initialized.
3626 * error.c (dump_type_suffix): Handle variable arrays.
3627
3628 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3629
3630 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
3631
3632 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3633
3634 * decl.c (lookup_name_real): Don't try to look up anything in a
3635 TYPENAME_TYPE.
3636
3637 * tinfo2.cc (__throw_type_match_rtti): Oops.
3638
3639 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3640
3641 * Make-lang.in (exception.o): Use -fno-PIC for now.
3642
3643 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
3644
3645 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
3646 calling them.
3647 (get_tinfo_fn_dynamic): Extracted from build_typeid.
3648 * tinfo2.cc (__dynamic_cast): Adjust.
3649
3650 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
3651 (build_x_typeid): Likewise.
3652
3653 * parse.y: Call build_x_typeid instead of build_typeid.
3654 * cp-tree.def: Add TYPEID_EXPR.
3655 * pt.c (tsubst_copy): Handle typeid.
3656 * decl2.c (build_expr_from_tree): Likewise.
3657 * rtti.c (build_x_typeid): Throw bad_typeid from here.
3658 (build_typeid): Not here.
3659 * cp-tree.h: Declare build_x_typeid.
3660
3661 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
3662
3663 * call.c (convert_like): Pull out constant values.
3664
3665 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
3666
3667 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3668
3669 * decl.c (init_decl_processing): Create short int types before
3670 creating size_t in case a machine description needs to use
3671 unsigned short for size_t.
3672
3673 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3674
3675 * Make-lang.in (exception.o): Turn off pic.
3676
3677 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
3678 type, multi-level ptr conversions.
3679
3680 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
3681 (throw_bad_cast): Use it.
3682 (throw_bad_typeid): New fn.
3683 (build_typeid): Throw bad_typeid as needed.
3684 Use build_call.
3685 (synthesize_tinfo_fn): Handle functions and arrays before checking
3686 for cv-quals.
3687
3688 * Remove .h from standard C++ headers, add new.h, move into inc
3689 subdirectory.
3690
3691 * exception*: Remove pointer from object, constructors. Add
3692 default exception::what that uses type_info::name. Add
3693 __throw_bad_typeid.
3694
3695 * init.c (build_new): Don't add a cookie to new (void *) T[2].
3696
3697 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
3698
3699 * Make-lang.in: Building C++ code depends on cc1plus.
3700
3701 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3702
3703 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
3704 a HOST_WIDE_INT, not a tree.
3705
3706 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3707
3708 * exception.cc: Don't include <stdlib.h>.
3709
3710 * Make-lang.in (c++.clean): Remove cplib2.*.
3711
3712 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
3713
3714 * parse.y (component_decl_1, component_costructor_declarator case):
3715 Pass attributes/prefix_attributes in tree list.
3716
3717 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
3718
3719 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
3720
3721 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3722
3723 * lex.c (do_identifier): Don't do deferred lookup in a template
3724 header.
3725
3726 * typeck2.c (store_init_value): Oops.
3727
3728 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
3729 New files for C++ lang-support library.
3730 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
3731 (CXX_LIB2FUNCS): Define.
3732 And rules for building the C++ lang-support code.
3733 * config-lang.in (headers): Define.
3734 (lib2funcs): Define.
3735
3736 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
3737
3738 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
3739 digest_init.
3740 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
3741 * typeck2.c (store_init_value): Check for initializing pmf with { }
3742 here.
3743 (process_init_constructor): Not here.
3744
3745 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
3746
3747 * pt.c (begin_template_parm_list): Increment
3748 processing_template_decl here.
3749 (end_template_parm_list): Not here.
3750 (process_template_parm): No need to add 1 to it now.
3751 * *.c: Use processing_template_decl instead of current_template_parms
3752 to check for being in a template.
3753
3754 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
3755 (tsubst_copy): Handle CONSTRUCTOR.
3756 (instantiate_decl): Set up context properly for variables.
3757 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
3758 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
3759
3760 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3761
3762 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
3763
3764 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
3765
3766 * method.c (make_thunk): Call comdat_linkage before setting the
3767 TREE_CODE.
3768
3769 * decl2.c (comdat_linkage): Use make_decl_one_only.
3770 (import_export_decl): Likewise.
3771 * decl.c (init_decl_processing): Check supports_one_only instead of
3772 SUPPORTS_WEAK.
3773
3774 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
3775
3776 * decl2.c (grokfield): Tighten checking for access decls.
3777
3778 * decl.c (make_typename_type): Resolve references to
3779 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
3780 (lookup_name_real): Types that depend on a template parameter get
3781 an implicit 'typename' unless they're in the current scope.
3782 (start_decl_1): We don't care about incomplete types that depend
3783 on a template parm.
3784 (grokdeclarator): Resolve 'typename's in the type specifier that
3785 refer to members of the current scope.
3786
3787 * call.c (build_over_call): Remove 'inline called before
3788 definition' diagnostic.
3789 (build_method_call): Likewise.
3790 * decl.c (duplicate_decls): Downgrade 'used before declared
3791 inline' to a warning, only with -Winline.
3792
3793 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
3794
3795 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
3796
3797 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
3798
3799 * call.c (build_method_call): When calling a signature
3800 default implementation, as in other cases, let instance_ptr simply
3801 be instance.
3802
3803 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
3804
3805 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
3806
3807 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
3808
3809 * except.c (expand_start_catch_block): Add a pushlevel so that -g
3810 works on hppa and SPARC.
3811
3812 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3813
3814 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
3815
3816 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
3817
3818 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
3819 before testing whether it's a signature.
3820
3821 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
3822
3823 * call.c (build_new_method_call): Don't complain about signature
3824 pointers and references not being an aggr type.
3825 (build_this): If a signature pointer or reference was passed in,
3826 just return it.
3827 (build_new_method_call): If instance is a signature pointer, set
3828 basetype to the signature type of instance.
3829 * sig.c (build_signature_method_call): Deleted basetype and
3830 instance parameters, they can be found as the DECL_CONTEXT of
3831 function and as the first argument passed in.
3832 * cp-tree.h: Changed declaration of build_signature_method_call.
3833 * call.c (build_method_call): Deleted first two arguments in call
3834 of build_signature_method_call.
3835 (build_over_call): Added call to build_signature_method_call.
3836
3837 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
3838
3839 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
3840 target_expr.
3841
3842 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3843
3844 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
3845
3846 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
3847
3848 * except.c (expand_start_try_stmts): Move to except.c in the backend.
3849 (expand_end_try_stmts): Remove.
3850
3851 * init.c (perform_member_init): Use add_partial_entry () instead
3852 of directly manipulating lists.
3853 (emit_base_init): Ditto.
3854
3855 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
3856
3857 * except.c (expand_exception_blocks): Always make sure USE and
3858 CLOBBER insns that came at the end still do, the backend relies
3859 upon this.
3860
3861 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
3862
3863 * call.c (build_over_call): We can only use a TARGET_EXPR of the
3864 right type.
3865
3866 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
3867
3868 * cvt.c (convert_to_reference): Revert last change, don't complain
3869 about temp without target decl.
3870
3871 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
3872
3873 * decl.c (grokdeclarator): Don't core dump when void() is given.
3874
3875 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
3876
3877 * decl.c (copy_args_p): Don't crash.
3878
3879 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
3880
3881 * pt.c (tsubst): And support template args inside the exception
3882 specification.
3883
3884 * pt.c (tsubst): Add support for exception specifications in
3885 template functions.
3886
3887 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
3888
3889 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
3890 fields now.
3891 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
3892 (start_function): Likewise.
3893 (start_method): Likewise.
3894 (grokfield): Likewise.
3895 (make_call_declarator): Add throw spec parameter.
3896 (set_quals_and_spec): Add routine.
3897 * lex.c (set_quals_and_spec): Likewise.
3898 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
3899 * decl.c (shadow_tag): Eliminate the throw spec parameter to
3900 grokdeclarator.
3901 (groktypename): Likewise.
3902 (start_decl): Eliminate the throw spec parameter. Eliminate the
3903 throw spec parameter to grokdeclarator. Eliminate the throw spec
3904 field in DECL_STMT.
3905 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
3906 (grokfndecl): Remove useless set of raises.
3907 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
3908 the throw spec parameter to start_decl. Pull the throw spec out
3909 of the call declarator.
3910 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
3911 (start_function): Eliminate the throw spec parameter. Eliminate
3912 the throw spec parameter to grokdeclarator.
3913 (start_method): Likewise.
3914 * decl2.c (grokfield): Likewise.
3915 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
3916 (grokoptypename): Likewise.
3917 (finish_file): Eliminate the throw spec parameter to
3918 start_function. Add throw spec to make_call_declarator.
3919 * except.c (init_exception_processing): Add throw spec to
3920 make_call_declarator. Eliminate the throw spec parameter to
3921 start_decl.
3922 (expand_start_catch_block): Eliminate the throw spec parameter to
3923 grokdeclarator.
3924 (expand_builtin_throw): Add throw spec to make_call_declarator.
3925 Eliminate the throw spec parameter to start_function.
3926 (start_anon_func): Likewise.
3927 * lex.c (make_call_declarator): Add throw spec parameter.
3928 (set_quals_and_spec): New routine.
3929 (cons_up_default_function): Add throw spec to make_call_declarator.
3930 Eliminate the throw spec parameter to grokfield.
3931 * method.c (synthesize_method): Eliminate the throw spec parameter
3932 to start_function.
3933 * pt.c (process_template_parm): Eliminate the throw spec parameter
3934 to grokdeclarator.
3935 (tsubst): Add throw spec to make_call_declarator.
3936 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
3937 (do_function_instantiation): Eliminate the throw spec parameter to
3938 grokdeclarator. Eliminate the throw spec parameter to
3939 start_function.
3940 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
3941 to start_function.
3942 * parse.y (datadef): Remove non-winning optimization.
3943 (decl): Likewise.
3944 (fndef): Remove ambiguous error productions uncovered by grammer
3945 fixing.
3946 (constructor_declarator): Add exception_specification_opt here.
3947 (component_constructor_declarator): Likewise.
3948 (direct_after_type_declarator): Likewise.
3949 (complex_direct_notype_declarator): Likewise.
3950 (direct_abstract_declarator): Likewise.
3951 (fn.def1): Remove exception_specification_opt.
3952 (fn.def2): Likewise.
3953 (condition): Likewise.
3954 (initdcl0): Likewise.
3955 (initdcl): Likewise.
3956 (notype_initdcl0): Likewise.
3957 (nomods_initdcl0): Likewise.
3958 (component_decl_1): Likewise.
3959 (component_declarator): Likewise.
3960 (after_type_component_declarator0): Likewise.
3961 (after_type_component_declarator): Likewise.
3962 (notype_component_declarator): Likewise.
3963
3964 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3965
3966 * call.c (build_over_call): Also use an INIT_EXPR when
3967 initializing anything from an rvalue.
3968
3969 * call.c (build_over_call): Call stabilize_reference when building
3970 an INIT_EXPR instead of calling the copy ctor.
3971
3972 * call.c (joust): Extend the previous change to all comparisons.
3973
3974 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
3975 NO_LINKAGE_HEURISTICS.
3976
3977 * decl2.c (finish_file): Emit any statics that weren't already.
3978
3979 * typeck.c (build_static_cast): Implement.
3980 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
3981 * decl.c (grokparms): Use can_convert_arg instead of
3982 implicit_conversion directly.
3983 (copy_args_p): New fn.
3984 * cvt.c (convert_to_reference): Don't complain about temp with
3985 static_cast.
3986 (build_up_reference): Handle TARGET_EXPRs.
3987 * call.c (build_over_call): Elide unnecessary temps.
3988 (can_convert*): Use new overloading code.
3989
3990 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
3991
3992 * call.c: Move TYPE_PTR*_MACROS ...
3993 * cp-tree.h: To here.
3994 * typeck.c (build_reinterpret_cast): Implement.
3995
3996 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
3997 ptr_complete_ob.
3998 (joust): If we're comparing a function to a builtin and the worst
3999 conversion for the builtin is worse than the worst conversion for the
4000 function, take the function.
4001
4002 * typeck.c (build_const_cast): Implement.
4003 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
4004 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
4005
4006 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
4007
4008 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
4009 too early. Make sure we explode if exprtype turns out to be a
4010 NULL_TREE when it shouldn't be.
4011
4012 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
4013
4014 * cp-tree.h: New routine make_call_declarator.
4015 * lex.c (make_call_declarator): Define it.
4016 * except.c (init_exception_processing): Use it.
4017 (expand_builtin_throw): Likewise.
4018 (start_anon_func): Likewise.
4019 * decl2.c (finish_file): Likewise.
4020 * lex.c (cons_up_default_function): Likewise.
4021 * parse.y: Likewise.
4022 * pt.c (tsubst): Likewise.
4023
4024 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
4025
4026 * decl2.c (groktypefield): Remove unused code.
4027
4028 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
4029
4030 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
4031 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
4032 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
4033 nonempty_cv_qualifiers.
4034 * hash.h: Rebuild.
4035
4036 * lex.c (make_pointer_declarator): Change type_quals into
4037 cv_qualifiers.
4038 (make_reference_declarator): Likewise.
4039
4040 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
4041
4042 * decl.c (start_function): Only check interface_* for templates
4043 with flag_alt_external_templates.
4044
4045 * call.c (build_new_op): Check for comparison of different enum types.
4046 (build_over_call): Fix arg # output.
4047
4048 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
4049
4050 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
4051
4052 * call.c (build_new_op): Check for erroneous args.
4053
4054 * call.c (build_new_method_call): Add missing args to cp_error.
4055
4056 * tree.c (error_type): Dont print reference-to-array.
4057
4058 * typeck.c (convert_for_assignment): Don't say contravariance for
4059 removing const.
4060
4061 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
4062
4063 * call.c (build_over_call): Diagnose bad convs for `this'.
4064
4065 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
4066 on _ctor_arg.
4067
4068 * call.c (convert_like): Handle bad convs.
4069 (build_over_call): Handle bad convs better.
4070
4071 * decl2.c: -fansi-overloading is now the default.
4072
4073 * call.c (build_new_method_call): Check for erroneous args.
4074
4075 * pt.c (instantiate_class_template): Propagate
4076 TYPE_USES_MULTIPLE_INHERITANCE.
4077
4078 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
4079
4080 * call.c (enforce_access): Add static to routine.
4081
4082 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
4083
4084 * call.c (build_user_type_conversion_1): Fix bad handling.
4085 (compare_ics): Likewise.
4086
4087 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
4088
4089 * call.c (standard_conversion): Oops.
4090
4091 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
4092
4093 * g++.c: Update test for win32 (&& ! cygwin32).
4094
4095 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
4096
4097 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
4098 (ptr_reasonably_similar): New fn.
4099 * call.c (BAD_RANK): New rank.
4100 (ICS_BAD_FLAG): New macro.
4101 (standard_conversion): Handle almost-right pointer conversions.
4102 (reference_binding): Handle bad rvalue bindings.
4103 (add_*_candidate): Stuff.
4104 (build_over_call): Pass bad conversions to convert_for_initialization.
4105 (compare_ics): Handle bad convs.
4106 (joust): Likewise.
4107
4108 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
4109
4110 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
4111 integer_type_node when computing pointer offsets.
4112
4113 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
4114
4115 * tree.c (lvalue_type): New fn.
4116 (error_type): New fn.
4117 * call.c (op_error): Use error_type.
4118 (add_conv_candidate): Use lvalue_type.
4119 (add_builtin_candidates): Likewise.
4120 * error.c (args_as_string): Use error_type.
4121
4122 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
4123
4124 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
4125 (tsubst): Not here.
4126
4127 * decl.c (init_decl_processing): With -ansi, __null's type is the
4128 signed integral type with the same number of bits as a pointer.
4129 Introduce a new variable null_node for it.
4130 * cp-tree.h: Adjust.
4131 * call.c (null_ptr_cst_p): Adjust.
4132
4133 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
4134
4135 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
4136 optimize.
4137
4138 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
4139
4140 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
4141 fns of classes without virtual functions.
4142
4143 * call.c (add_function_candidate): Handle `this' specially.
4144 (compare_ics): Likewise.
4145
4146 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
4147
4148 * typeck.c (build_conditional_expr): Fix handling of __null.
4149
4150 * decl2.c (comdat_linkage): New fn.
4151 (import_export_vtable): Use it.
4152 (import_export_decl): Use it.
4153 * method.c (make_thunk): Use it.
4154
4155 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
4156
4157 * pt.c (end_template_decl): If we don't actually have parms, return.
4158 * parse.y (template_header): Accept 'template <>'.
4159
4160 * errfn.c: Allow 5 args.
4161
4162 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
4163
4164 * tree.c (make_temp_vec): New fn.
4165 * pt.c (push_template_decl): Handle partial specs.
4166 (instantiate_class_template): Likewise.
4167 (more_specialized): Use get_bindings.
4168 (more_specialized_class): New fn.
4169 (get_class_bindings): New fn.
4170 (most_specialized_class): New fn.
4171 (do_function_instantiation): List candidates for ambiguous case.
4172 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
4173 (shadow_tag): Call push_template_decl for partial specializations.
4174 * parse.y: Likewise.
4175 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
4176 DECL_TEMPLATE_MEMBERS.
4177 * call.c (print_z_candidates): Reduce duplication.
4178
4179 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4180
4181 * decl2.c (lang_decode_option): Allow -fansi-overloading.
4182
4183 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
4184
4185 * pt.c (get_bindings): New fn.
4186 (most_specialized): Likewise.
4187 (do_function_instantiation): Use them.
4188 (add_maybe_template): New fn.
4189 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
4190 * call.c (build_new_op): Handle guiding decls.
4191 (build_new_function_call): Likewise.
4192 * decl2.c (finish_file): Likewise.
4193
4194 * decl2.c (mark_used): Do synthesis here.
4195 * call.c (build_method_call): Not here.
4196 (build_over_call): Or here.
4197 * typeck.c (build_function_call_real): Or here.
4198 * tree.c (bot_manip): Call mark_used on functions used in default
4199 args.
4200
4201 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4202
4203 * decl2.c (import_export_vtable): Delete code that disabled vtable
4204 heuristic on systems with ASM_OUTPUT_EXTERNAL.
4205
4206 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
4207
4208 * typeck.c (build_x_function_call): Handle static call context
4209 better.
4210
4211 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
4212 the function, not its outer block.
4213
4214 * call.c (build_field_call): Pass fields on to build_opfncall
4215 regardless of TYPE_OVERLOADS_CALL_EXPR.
4216 (build_method_call): Pass on to build_new_method_call sooner.
4217
4218 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
4219 gives us.
4220 * class.c (instantiate_type): Don't put a POINTER_TYPE to
4221 METHOD_TYPE on an expression. Also make a copy of rhs instead of
4222 modifying it.
4223
4224 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
4225
4226 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
4227 (add_builtin_candidate): Don't take enums for ++.
4228 (build_new_method_call): Handle non-aggregates and field calls.
4229 Move new overloading code from...
4230 * cvt.c: Here.
4231
4232 * decl.c (grokparms): Don't check default args in templates.
4233
4234 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
4235
4236 * cvt.c (build_new_op): Fix args to build_unary_op.
4237 (add_builtin_candidates): Don't call type_promotes_to on float.
4238
4239 * decl.c (grokparms): Check the type of the default arg.
4240
4241 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
4242 returning NULL_TREE.
4243
4244 * typeck.c (build_x_binary_op): Avoid doing extra work.
4245 (build_x_unary_op): Likewise.
4246 (build_x_conditional_expr): Likewise.
4247 * cvt.c (build_over_call): Return.
4248 (add_builtin_candidate): Fix MEMBER_REF.
4249 (build_new_op): Likewise.
4250
4251 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
4252
4253 * method.c (build_overload_name): Put bug fix into code but leave
4254 disabled for now so we can be bug compatible with older releases
4255 that do repeats incorrectly. In the future, we can enable it.
4256
4257 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
4258
4259 * cvt.c (convert_like): Don't call build_cplus_new twice.
4260
4261 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
4262 Control new overloading code with -fansi-overloading.
4263
4264 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
4265
4266 * cvt.c (build_over_call): Call build_cplus_new.
4267 * call.c (build_method_call): Likewise.
4268 * typeck.c (build_function_call_real): Likewise.
4269 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
4270 the COND_EXPR in a TARGET_EXPR so they use the same slot.
4271
4272 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
4273 recursive calls.
4274 * typeck.c (complete_type): Propagate
4275 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
4276
4277 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
4278
4279 * cvt.c (joust): More ?: kludging. Sigh.
4280 (build_over_call): Don't try to synthesize global fns.
4281
4282 * search.c (lookup_conversions): Use binfo marking.
4283
4284 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
4285
4286 * search.c (build_mi_matrix): Use the correct value of cid
4287 when determining the new mi_size.
4288
4289 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
4290
4291 * cvt.c (add_builtin_candidates): Do consider type conversion ops
4292 for the first parms of += et al.
4293 (strip_top_quals): New fn.
4294 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
4295 (implicit_conversion): Likewise.
4296 (add_builtin_candidates): Be careful about arrays.
4297 (build_new_method_call): Handle vtable optimization.
4298
4299 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
4300
4301 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
4302 * cvt.c (reference_binding): Use it.
4303 (implicit_conversion): Use it.
4304 (add_builtin_candidate, COND_EXPR): Use it.
4305
4306 * cvt.c (build_new_function_call): Check for error args.
4307
4308 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
4309
4310 * gxx.gperf: Add __null.
4311 * hash.h: Regenerate.
4312 * lex.h: Add RID_NULL.
4313 * lex.c (init_lex): Create null_pointer_node here, stick it in
4314 RID_NULL.
4315 * decl.c (init_decl_processing): Still set its type here.
4316 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
4317 (convert_to_pointer_force): Likewise.
4318 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
4319 if (! pedantic).
4320 * call.c (convert_harshness): Use null_ptr_cst_p.
4321 * typeck.c (convert_for_assignment): Likewise. Don't produce
4322 null_pointer_node.
4323
4324 * error.c (args_as_string): Handle lists of actual args, too.
4325 * cvt.c (null_ptr_cst): Support (void*)0 for now.
4326 (build_user_type_conversion_1): Improve diagnostics.
4327 (build_new_function_call): Likewise.
4328 (build_object_call): Likewise.
4329 (build_new_method_call): Likewise. Move call before def diagnostic...
4330 (build_over_call): Here.
4331
4332 * cvt.c (build_new_method_call): Don't complain about no match if
4333 LOOKUP_SPECULATIVELY.
4334 (build_over_call): Fix 'this' for virtual fn.
4335 (build_new_method_call): Add diagnostic.
4336
4337 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
4338
4339 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
4340 constructors to be passed in.
4341 (build_over_call): Likewise.
4342 (build_user_type_conversion_1): Pass them in.
4343 (convert_like): Likewise.
4344 (build_object_call): Handle overloaded conversions.
4345 (build_over_call): Pass the right args to build_vfn_ref.
4346 (standard_conversion): Fix pmf convs.
4347 (joust): Handle comparing statics and non-statics.
4348 (build_new_method_call): New fn.
4349 * call.c (build_method_call): Call it if NEW_OVER.
4350
4351 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
4352
4353 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
4354 %D instead.
4355
4356 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
4357
4358 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
4359 instead of just maybe_build_cleanup so that we deallocate the
4360 thrown object.
4361
4362 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4363
4364 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
4365 * cp-tree.h (finish_prevtable_vardecl): Add decl.
4366
4367 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
4368
4369 * pt.c (instantiate_class_template): Call complete_type. Also, if
4370 we're at the end of the file and we just instantiated a template
4371 class with a vtable, call finish_prevtable_vardecl.
4372
4373 * error.c (dump_decl): Don't explode (or explode more gracefully
4374 as appropriate) if the object being dumped has a null type.
4375 (dump_expr): Likewise.
4376
4377 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
4378 by counting the number of nodes that we'll need before allocating
4379 the array.
4380 (lookup_fnfields): Fix comment.
4381 (breadth_first_search): Fix comment.
4382
4383 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
4384
4385 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
4386 TYPE_ALIGN.
4387 * class.c (finish_struct): Call cplus_decl_attributes here.
4388 (finish_struct_1): Not here.
4389 * cp-tree.h: Adjust.
4390
4391 * pt.c (type_unification): New parameter STRICT.
4392 (unify): If STRICT, don't allow cv addition or base deduction.
4393 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
4394
4395 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
4396
4397 * search.c (get_template_base{_recursive}): New fns.
4398 * pt.c (more_specialized): New fn.
4399 (do_function_instantiation): Use it.
4400 (unify): Handle base deduction.
4401 * cvt.c (joust): Use more_specialized.
4402 Don't arbitrarily choose between non-builtin candidates.
4403 (build_over_call): Call require_complete_type.
4404
4405 * decl.c (start_function): Statics are static even in a #pragma
4406 interface file.
4407
4408 * decl2.c (import_export_vtable): Disable vtable heuristic on
4409 systems with ASM_OUTPUT_EXTERNAL.
4410
4411 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
4412 (standard_conversion): No std conv to enum type.
4413
4414 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
4415 for ptm's.
4416
4417 * cvt.c (reference_binding): Bind directly to a base subobject of
4418 a class rvalue.
4419
4420 * cvt.c (build_new_op): Enforce access control.
4421
4422 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
4423
4424 * typeck2.c (process_init_constructor): When scanning the
4425 union for a named field, skip things that aren't FIELD_DECLs.
4426
4427 * method.c (synthesize_method): Don't scan fndecl's rtl if
4428 we're at the end of the file; just assume the function can't
4429 be inlined.
4430
4431 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
4432
4433 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
4434 it failed.
4435
4436 * cvt.c (build_user_type_conversion_1): Handle overloaded
4437 conversion ops.
4438
4439 * cvt.c (add_builtin_candidates): Don't consider type conversion
4440 operators for the first parameter of operator=.
4441
4442 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
4443
4444 * typeck.c (complete_type): Only call layout_type if we're not
4445 expanding a template.
4446
4447 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4448
4449 * cvt.c (compare_ics): Oops.
4450
4451 * cvt.c (op_error): Oops.
4452
4453 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
4454 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
4455 (build_conv): Use them.
4456 (implicit_conversion): Use them.
4457 (convert_like): Handle them.
4458 (build_new_op): Handle builtin COND_EXPR again.
4459 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
4460 in lists of types for COND_EXPR.
4461 (add_builtin_candidate): Add enum candidates for COND_EXPR.
4462
4463 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
4464
4465 * typeck.c (build_modify_expr): Always attempt to build a call to
4466 the assignment operator, even if we're using a default one.
4467 (convert_for_initialization): Call complete_type.
4468
4469 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4470
4471 * cvt.c (reference_binding): A REF_BIND gets the reference type.
4472 (implicit_conversion): Likewise.
4473 (convert_like): Likewise.
4474 (compare_ics): Likewise.
4475 (compare_qual): Likewise.
4476 (print_z_candidates): Handle no candidates.
4477 (build_new_op): Don't handle builtin COND_EXPR for now.
4478
4479 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
4480
4481 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
4482
4483 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
4484
4485 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
4486
4487 * cvt.c (build_builtin_candidate): Oops.
4488 (build_new_op): Oops.
4489
4490 * method.c (build_opfncall): Pass COND_EXPR on.
4491 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
4492 (add_builtin_candidate{,s}): Likewise.
4493 (add_builtin_candidates): Likewise.
4494 (print_z_candidates, op_error, build_new_op): Likewise.
4495 (type_decays_to): New fn.
4496 * lex.c (init_lex): Just say ?: for COND_EXPR.
4497
4498 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4499
4500 * typeck.c (complete_type): Call layout_type rather than building
4501 a new array type.
4502
4503 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
4504 only use ptrdiff_t.
4505
4506 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4507
4508 * cvt.c: Always compile the new overloading code (but don't use it).
4509 (implicit_conversion): Add a BASE_CONV when converting to
4510 the same class type.
4511 (convert_like): Handle BASE_CONV.
4512
4513 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
4514
4515 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
4516 (add_builtin_candidate): Likewise.
4517
4518 NEW_OVER changes:
4519 * typeck.c (build_x_function_call): Try an operator function
4520 whenever we call an object of class type.
4521 * method.c (build_opfncall): Pass CALL_EXPRs through.
4522 * cvt.c (implicit_conversion): Do const-ref case first.
4523 (add_conv_candidate, build_object_call, op_error): New fns.
4524 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
4525 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
4526 builtin candidates.
4527 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
4528 Fall back on preincrement handling. Use op_error.
4529 Handle warn_synth.
4530 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
4531 an error_mark_node.
4532 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
4533 properly.
4534
4535 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
4536
4537 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
4538
4539 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
4540
4541 * typeck.c (build_component_ref_1): Use build_component_ref
4542 instead of open coding it here.
4543
4544 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
4545
4546 * g++.c (main): Don't link with -lg++.
4547
4548 NEW_OVER changes:
4549 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
4550 result of build_type_conversion.
4551 (cp_convert): Only call build_method_call for ctors if
4552 build_type_conversion failed.
4553 (ptr_complete_ob): New function.
4554 (TYPE_PTR{,OB,MEM}_P): New macros.
4555 ({add,build}_builtin_candidate{,s}): New functions.
4556 (print_z_candidates): Handle builtins.
4557 (build_user_type_conversion_1): Don't use conversion fns for
4558 converting to a base type.
4559 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
4560 (build_user_type_conversion): Use convert_from_reference.
4561 (build_new_op): New function.
4562 (build_over_call): Fix handling of methods.
4563 (compare_ics): Handle AMBIG_CONV properly.
4564 * typeck2.c: Increment abort count.
4565 * method.c (build_opfncall): Forward most requests to build_new_op.
4566 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
4567
4568 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4569
4570 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
4571 invalid second argument to dump_expr_list.
4572
4573 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
4574
4575 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
4576
4577 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
4578
4579 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
4580 ASSEMBLE_EXTERNAL.
4581
4582 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
4583
4584 * typeck2.c (process_init_constructor): New pedwarn for using { }
4585 to initialize a pointer to member function.
4586 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
4587 we can avoid the new error.
4588
4589 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
4590
4591 * typeck.c (build_ptrmemfunc1): New function to hide details of
4592 pointer to member functions better.
4593
4594 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
4595
4596 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
4597 methods into the actual method, as we know the implied object is
4598 not used.
4599
4600 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4601
4602 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
4603 inside a system header.
4604
4605 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
4606
4607 * call.c (build_method_call): Call complete_type on the
4608 instance type.
4609
4610 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
4611
4612 * typeck.c (build_component_ref): Always build up an OFFSET_REF
4613 for obj_ptr->func so that we can know which object to use in a
4614 method call.
4615
4616 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
4617
4618 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
4619 around things. Also improve maintainability.
4620
4621 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
4622
4623 * decl.c (grokdeclarator): Check for overflow when evaluating an
4624 array dimension.
4625
4626 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
4627
4628 * cvt.c (cp_convert): Don't check for ambiguity with constructor
4629 if NEW_OVER.
4630
4631 * typeck.c (build_x_function_call): Pass function overload
4632 questions to new overloading code if NEW_OVER.
4633 * init.c (expand_aggr_init_1): Only check for type conversion ops
4634 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
4635 Don't check for ambiguity with constructor if NEW_OVER.
4636 * cvt.c (convert_to_reference): Dereference the result of a type
4637 conversion operator.
4638 (build_conv): Propagate ICS_USER_FLAG.
4639 (implicit_conversion): Call instantiate_type.
4640 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
4641 (add_function_candidate): Fix cv-quals on argtype.
4642 (print_z_candidates): New function.
4643 (build_new_function_call): Call it.
4644 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
4645 consider non-converting constructors.
4646 Call print_z_candidates.
4647 Return an AMBIG_CONV for an ambiguous conversion.
4648 (build_user_type_conversion): Handle AMBIG_CONV.
4649 (convert_like): Fix test for building TARGET_EXPR.
4650 Call instantiate_type.
4651 Handle AMBIG_CONV and LVALUE_CONV.
4652 (build_over_call): Handle 0 args and ellipsis.
4653 * cp-tree.def: Add AMBIG_CONV.
4654
4655 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
4656
4657 * decl.c (lookup_name_real): If we find mem in obj when parsing
4658 `obj->mem', make sure we return the right value.
4659
4660 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
4661
4662 * search.c (get_base_distance): Call complete_type.
4663
4664 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
4665
4666 * decl.c (store_bindings): Make static.
4667
4668 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
4669
4670 * init.c (expand_aggr_init_1): Don't check type conversions if
4671 NEW_OVER.
4672
4673 * cvt.c (z_candidate): Put back template field.
4674 (add_function_candidate): Set it.
4675 (add_template_candidate): Likewise.
4676 (joust): Use it.
4677 (compare_qual): Handle references and pointers to members.
4678 (compare_ics): Handle reference bindings.
4679
4680 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
4681
4682 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
4683
4684 * call.c (compute_conversion_costs): Call complete_type.
4685
4686 * tree.c (vec_binfo_member): Use comptypes instead of comparing
4687 pointers, so we can handle template parameters.
4688
4689 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
4690
4691 * cvt.c (cp_convert_to_pointer): We have to call complete_type
4692 here; let's make it explicit instead of a side effect of an
4693 error check.
4694
4695 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
4696
4697 * cvt.c (z_candidate): Remove template field.
4698 (reference_binding): Handle binding to temporary.
4699 (implicit_conversion): Likewise.
4700 (add_function_candidate): Handle artificial constructor parms.
4701 Handle functions with too few parms.
4702 (add_template_candidate): New function.
4703 (build_user_type_conversion_1): Handle constructors.
4704 (convert_like): Likewise.
4705 (build_over_call): Likewise.
4706 (build_new_function_call): Support templates.
4707 (compare_ics): Fix reference, inheritance handling.
4708
4709 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
4710
4711 * decl.c: Add signed_size_zero_node.
4712 (init_decl_processing): Build it.
4713 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
4714 when we're trying to make a negative delta.
4715
4716 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4717
4718 Stop doing this damn index==strchr variable name confusion.
4719 * class.c (add_virtual_function): Change local var INDEX to be
4720 named IDX.
4721 (add_method): Likewise.
4722 * lex.c (print_parse_statistics): Likewise.
4723 * search.c (make_memoized_table_entry): Likewise.
4724 (lookup_fnfields_here): Likewise.
4725 (lookup_field): Likewise.
4726 (lookup_fnfields): Likewise.
4727 (get_baselinks): Likewise.
4728 * sig.c (build_signature_table_constructor): Likewise.
4729 (build_signature_method_call): Likewise.
4730 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
4731 (get_member_function_from_ptrfunc): Likewise.
4732 (build_ptrmemfunc): Change local var INDEX to be IDX.
4733 (c_expand_start_case): Likewise.
4734
4735 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
4736
4737 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
4738 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
4739 (convert_to_reference): Use build_type_conversion to convert to
4740 the reference type directly.
4741 (standard_conversion): Fix void* case, non-conversions.
4742 (reference_binding): Fix expr == 0 case, non-conversions.
4743 (convert_like): Support REF_BIND.
4744 (compare_qual): Split out from compare_ics.
4745 (compare_ics): Use it, handle icses with only a qual_conv.
4746
4747 * init.c (expand_vec_init): Don't crash if decl is NULL.
4748
4749 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
4750
4751 * mpw-config.in: New file, configury for Mac MPW.
4752 * mpw-make.sed: New file, makefile editing for MPW.
4753
4754 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
4755
4756 * pt.c (instantiate_class_template): Call repo_template_used.
4757
4758 * search.c (lookup_conversions): Only lookup conversions in
4759 complete types.
4760
4761 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4762
4763 * cp-tree.def: Renamed from tree.def, to avoid confusion with
4764 gcc's tree.def.
4765 * cp-tree.h, lex.c: Include cp-tree.def.
4766 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
4767
4768 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
4769
4770 * init.c (build_vec_delete_1): Call complete_type.
4771
4772 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
4773
4774 * except.c (start_anon_func): Make sure anonymous functions are
4775 never external.
4776
4777 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
4778
4779 * decl.c (finish_function): If function_depth > 1, set nested.
4780
4781 * decl2.c (grokbitfield): Revert Bob's change.
4782 * class.c (finish_struct_1): Fix handling of named bitfield widths.
4783
4784 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4785
4786 * pt.c (add_pending_template): Handle types.
4787 (lookup_template_class): With -fexternal-templates, just add the class
4788 to pending_templates instead of instantiating it now.
4789 * decl2.c (finish_file): Handle types in pending_templates.
4790
4791 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
4792
4793 * decl2.c (grokbitfield): Handle constant decls appropriately.
4794 Give an appropriate error message now instead of spewing core
4795 later.
4796
4797 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
4798
4799 * decl2.c: Don't turn on thunks by default for now.
4800
4801 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
4802
4803 * typeck.c (complete_type): Handle error_mark_node.
4804 (common_type, OFFSET_TYPE): Handle template_type_parms.
4805
4806 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
4807
4808 * pt.c (instantiate_decl): If at_eof, call import_export_decl
4809 regardless of DECL_INLINE.
4810
4811 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
4812
4813 * class.c (finish_struct_bits): Copy TYPE_SIZE.
4814
4815 * rtti.c (build_dynamic_cast): Support templates.
4816 * tree.def: Support DYNAMIC_CAST_EXPR.
4817 * pt.c (tsubst_copy): Likewise.
4818 * decl2.c (build_expr_from_tree): Likewise.
4819
4820 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
4821
4822 * typeck.c (build_static_cast): Support templates.
4823 (build_const_cast): Likewise.
4824 * tree.def: Support CONST/STATIC_CAST_EXPR.
4825 * pt.c (tsubst_copy): Likewise.
4826 * decl2.c (build_expr_from_tree): Likewise.
4827
4828 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
4829
4830 * decl2.c (finish_vtable_vardecl): Don't trust
4831 TREE_SYMBOL_REFERENCED for vtables of local classes.
4832
4833 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
4834
4835 * pt.c (tsubst_copy): Handle operator T.
4836
4837 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4838
4839 * init.c (build_delete): Move creation of PARMS inside test of
4840 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
4841
4842 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
4843
4844 * typeck.c (build_conditional_expr): Don't assume that
4845 the arguments to ?: are always pointers or records.
4846
4847 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
4848
4849 * decl2.c (import_export_decl): Still emit static/weak/comdat
4850 copies of inline template functions with -fno-implicit-templates.
4851
4852 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
4853
4854 * init.c (build_delete): Determine the complete basetype
4855 path to the destructor we're calling.
4856
4857 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
4858
4859 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
4860 initialize the enum, because we really and truly don't know where
4861 it came from.
4862 (start_enum): Don't copy integer_zero_node because
4863 build_enumerator will do it.
4864
4865 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
4866
4867 * decl.c (finish_function): Do access control on base destructors.
4868
4869 * pt.c (tsubst, case FUNCTION_DECL): Set up
4870 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
4871 hose us.
4872
4873 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
4874
4875 * cvt.c (build_up_reference): If we have already extended the
4876 lifetime of the temporary, don't try it again.
4877 * typeck.c (c_expand_return): Don't try and convert the return
4878 value twice when we want a reference, once is enough.
4879
4880 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
4881
4882 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
4883 LOOKUP_ONLYCONVERTING at all for now.
4884
4885 * search.c (add_conversions): Put the conversion function in
4886 TREE_VALUE, the basetype in TREE_PURPOSE.
4887 * cvt.c (build_type_conversion): Adjust.
4888 * cvt.c (build_expr_type_conversion): Adjust.
4889 * call.c (user_harshness): Adjust.
4890
4891 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
4892
4893 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
4894 backend's benefit.
4895
4896 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
4897
4898 * except.c (expand_start_catch_block): Add a dummy region, if we
4899 get an error, so that we can avoid core dumping later.
4900
4901 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
4902
4903 * cp-tree.h (OFFSET_REF): Remove.
4904 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
4905 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
4906 * init.c (expand_aggr_init_1): Likewise.
4907 (build_new): Likewise.
4908 * typeck.c (expand_target_expr): Likewise.
4909
4910 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4911
4912 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
4913 TARGET_EXPR.
4914
4915 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
4916
4917 * cvt.c (build_up_reference): Redo how and when temporaries are
4918 created.
4919 * decl.c (grok_reference_init): Don't try and be smart about
4920 running cleanups.
4921
4922 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
4923
4924 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
4925 (TARGET_EXPR...), now that it has 4 arguments.
4926 * tree.c (build_cplus_new): Likewise.
4927
4928 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
4929
4930 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
4931
4932 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
4933 * decl.c (struct saved_scope): Remove named_labels,
4934 {base,member}_init_list.
4935 (maybe_push_to_top_level): Don't set them. Call
4936 push_cp_function_context if appropriate.
4937 (pop_from_top_level): Likewise.
4938
4939 * method.c (do_build_assign_ref): Remove obsolete check of
4940 TYPE_HAS_ASSIGN_REF (basetype).
4941
4942 * decl.c (grokfndecl): Diagnose user definition of
4943 implicitly-declared methods.
4944
4945 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
4946
4947 * method.c (do_build_copy_constructor): Add code to give
4948 meaningful error messages instead of crashing.
4949 (do_build_assign_ref): Don't synthesize assignment operators for
4950 classes containing reference or const members.
4951
4952 * class.c (struct base_info): Remove cant_synth_copy_ctor
4953 and cant_synth_asn_ref.
4954 (finish_base_struct): Remove the code that tries to conditionalize
4955 synthesis of copy constructors & assignment operators based on
4956 access permissions. Instead, let it fail when it tries to
4957 synthesize the copy constructor. This will give meaningful error
4958 messages instead of silently generating code to perform a bitcopy.
4959
4960 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
4961
4962 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
4963 determining types for constant values.
4964
4965 * decl.c (struct named_label_list): Use instead of stuffing
4966 random items into a TREE_LIST node.
4967 (named_label_uses): Use the new struct.
4968 (poplevel): Likewise.
4969 (lookup_label): Likewise.
4970 (define_label): Add an error message to tell the user the line
4971 where the goto is located in addition to the destination of the
4972 goto.
4973 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
4974 named_label_uses.
4975 (finish_function): Likewise.
4976
4977 (start_decl): Complain about defining a static data member
4978 in a different type from which it was declared.
4979
4980 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
4981
4982 * cvt.c (build_expr_type_conversion): Adjust.
4983
4984 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
4985
4986 * call.c (build_method_call): Always convert 'this' to the
4987 appropriate type.
4988
4989 * search.c (add_conversions): Put the conversion function in
4990 TREE_VALUE, the type in TREE_PURPOSE.
4991 * cvt.c (build_type_conversion): Adjust.
4992 * call.c (user_harshness): Adjust.
4993
4994 * method.c (emit_thunk): Call temporary_allocation and
4995 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
4996
4997 * tree.c (build_cplus_array_type): Handle tweaking of
4998 TYPE_MAIN_VARIANT here.
4999 * typeck.c (common_type): Not here.
5000
5001 * typeck.c (complete_type): Only try to complete an array type if
5002 it has a domain.
5003
5004 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
5005
5006 * decl.c (grokvardecl): Call complete_type.
5007 (grokdeclarator): Call complete_type for PARM_DECLs.
5008
5009 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
5010
5011 * pt.c (instantiate_class_template): Re-set
5012 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
5013
5014 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
5015
5016 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
5017 smart enough to do it right.
5018 * tree.c (cp_expand_decl_cleanup): Likewise.
5019 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
5020 cp_expand_decl_cleanup.
5021 (store_parm_decls): Likewise.
5022 (hack_incomplete_structures): Likewise.
5023 * except.c (push_eh_cleanup): Likewise.
5024
5025 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
5026
5027 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
5028 frontend to the backend where it belongs.
5029 * tree.c (unsave_expr): Likewise.
5030 (unsave_expr_now): Likewise.
5031 * tree.def (UNSAVE_EXPR): Likewise.
5032 * cp-tree.h (unsave_expr): Likewise.
5033 (unsave_expr_now): Likewise.
5034
5035 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
5036
5037 * init.c (emit_base_init): Make sure the partial EH cleanups live
5038 on the function_obstack.
5039
5040 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
5041
5042 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
5043 when checking for pointer types.
5044
5045 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
5046
5047 * pt.c (instantiate_class_template): Remove obsolete check for
5048 access declarations.
5049
5050 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
5051
5052 * call.c (build_overload_call): Simplify calls to
5053 build_overload_call by removing last parameter.
5054 (build_method_call): Likewise.
5055 * cp-tree.h: Likewise.
5056 * method.c (build_opfncall): Likewise.
5057 * typeck.c (build_x_function_call): Likewise.
5058
5059 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
5060
5061 * call.c (default_parm_conversions): Factor out common code.
5062 (build_method_call): Use it.
5063 (build_overload_call_real): Use it.
5064
5065 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
5066
5067 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
5068 but pedwarn as the code is bogus.
5069 * typeck.c (decay_conversion): Likewise.
5070 (build_function_call_real): Use build_addr_func instead of
5071 default_conversion. Don't allow pointer-to-method functions down
5072 here.
5073 (build_unary_op): Use real pointer-to-member functions instead of
5074 fake ones.
5075 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
5076 (convert_for_assignment): Removed some obsolete code.
5077 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
5078 build_x_function_call instead of current_class_ptr. Only call
5079 digest_init once on an initializer, we do this just checking
5080 TREE_TYPE.
5081 (build_expr_from_tree): Pass current_class_ref to
5082 build_x_function_call instead of current_class_ptr.
5083 * init.c (build_member_call): Likewise.
5084 * pase.y: Likewise.
5085 * error.c (dump_expr): Handle OFFSET_REFs better.
5086 * pt.c (unify): Handle pointer-to-member functions better.
5087 * decl.c (finish_function): Clear out current_class_ref just like
5088 we do for current_class_ptr.
5089
5090 * typeck.c (get_delta_difference): Handle virtual bases better.
5091
5092 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
5093
5094 * sig.c (build_signature_table_constructor): Use the delta for
5095 the original basetype for this virtual function with thunks.
5096 (build_signature_method_call): We still need to adjust 'this'
5097 with thunks.
5098
5099 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
5100
5101 * call.c (build_addr_func): New routine. Used to get the `real'
5102 address of a function or a method. Needed to avoid getting a
5103 pointer-to-member function.
5104 (build_call): New routine to build CALL_EXPRs.
5105 (build_method_call): Use it.
5106 * cvt.c (convert_to_aggr): Likewise.
5107 * typeck.c (build_function_call_real): Likewise.
5108 * sig.c (build_signature_table_constructor): Use build_addr_func.
5109 * cp-tree.h (build_call, build_addr_func): Declare them.
5110
5111 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
5112
5113 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
5114 * parse.y: Remove uses of LOOKUP_AGGR.
5115
5116 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
5117
5118 * *.[chy]: Rename current_class_decl to current_class_ptr, and
5119 C_C_D to current_class_ref.
5120
5121 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
5122
5123 * call.c (convert_harshness): Tighten up pointer conversions.
5124
5125 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
5126
5127 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
5128 (finish_file): Likewise.
5129
5130 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
5131
5132 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
5133
5134 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
5135 code.
5136
5137 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5138
5139 * decl2.c: Turn on thunks by default where supported.
5140
5141 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
5142
5143 * cp-tree.h (build_overload_call_maybe): Removed.
5144 * call.c (build_overload_call_real): Invert meaning of last arg to
5145 be require_complete.
5146 (build_overload_call): Likewise.
5147 * typeck.c (build_x_function_call): Use build_overload_call_real
5148 instead of build_overload_call_maybe.
5149
5150 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
5151
5152 * decl2.c (finish_file): Don't try to emit functions that haven't
5153 been compiled.
5154
5155 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
5156
5157 * decl2.c (finish_vtable_vardecl): Oops.
5158
5159 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
5160 Also store the bindings from previous_class_values.
5161 (pop_from_top_level): Restore them.
5162
5163 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
5164
5165 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
5166 symbol has been referenced.
5167 (finish_file): Re-join synthesis/vtable loop with inline emission
5168 loop, disable inlining when an inline is output.
5169
5170 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
5171
5172 * except.c (init_exception_processing): Setup saved_in_catch.
5173 (push_eh_cleanup): Reset __eh_in_catch.
5174 (expand_start_catch_block): Set __eh_in_catch.
5175
5176 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
5177
5178 * except.c (push_eh_cleanup): Add tracking for whether or not we
5179 have an active exception object.
5180 (expand_builtin_throw): Use it to make sure a rethrow without an
5181 exception object is caught.
5182
5183 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
5184
5185 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
5186 cache.
5187
5188 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
5189
5190 * decl2.c (finish_file): Also use sentries for vars with
5191 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
5192 created).
5193
5194 * lex.c (handle_cp_pragma): Disable #pragma
5195 interface/implementation if SUPPORTS_ONE_ONLY > 1.
5196
5197 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
5198
5199 * method.c (emit_thunk): Wrap default case in
5200 temporary/permanent_allocation.
5201
5202 * method.c (make_thunk): Use DECL_ONE_ONLY.
5203 (emit_thunk): Call assemble_end_function.
5204
5205 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
5206
5207 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
5208 (import_export_decl): Likewise.
5209 (finish_prevtable_vardecl): Disable vtable hack if
5210 SUPPORTS_ONE_ONLY > 1.
5211
5212 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
5213
5214 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
5215 PREDECREMENT_EXPRs take two arguments, not one.
5216
5217 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
5218
5219 * class.c (build_vtable_entry): Don't build thunks for abstract
5220 virtuals.
5221
5222 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
5223 frontend.
5224
5225 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
5226
5227 * class.c (set_rtti_entry): Use size_zero_node.
5228 (build_vtable): Likewise.
5229
5230 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
5231
5232 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
5233 (prepare_fresh_vtable): Likewise.
5234
5235 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
5236
5237 * method.c (emit_thunk): Call mark_used on the target function.
5238
5239 * call.c (build_method_call): Don't warn about pending templates.
5240
5241 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
5242
5243 * decl2.c (finish_file): Fix list walking logic.
5244
5245 * typeck2.c (check_for_new_type): Only warn if -pedantic.
5246
5247 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
5248
5249 * class.c (finish_struct_1): Remove old code for
5250 dont_allow_type_definitions.
5251 * cp-tree.h: Likewise.
5252 * spew.c: Make sure cp-tree.h is included before parse.h, so the
5253 definition of flagged_type_tree is found before it is used.
5254 * lex.c: Likewise.
5255 * parse.y: Added the ftype member to the type union, and changed a
5256 number of rules to use it instead of ttype. Added calls to
5257 check_for_new_type() as appropriate.
5258 * typeck2.c (check_for_new_type): New function for checking
5259 if a newly defined type appears in the specified tree.
5260 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
5261 for check_for_new_type().
5262
5263 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
5264
5265 * decl2.c (finish_file): Only use a sentry if the decl is public.
5266
5267 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
5268 don't pass LOOKUP_ONLYCONVERTING.
5269
5270 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
5271
5272 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
5273 properly keeps track of const and volatile type modifiers.
5274
5275 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
5276
5277 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
5278 * pt.c (comp_template_args): Use it.
5279
5280 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
5281 assemble_external for artificial function decls.
5282
5283 * decl.c (cp_finish_decl): Oops.
5284
5285 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
5286
5287 * decl2.c (import_export_decl): Put static data member templates
5288 into common storage, or make them weak, depending on whether they
5289 are dynamically or statically initialized.
5290 (get_sentry): New function.
5291 (finish_file): Do import_export_decl for static data members before
5292 building the init/fini functions. Don't init/fini a variable that's
5293 EXTERNAL. Use a sentry for variables in common. Fix mismatching
5294 push/pop_temp_slots.
5295 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
5296 expand_static_init thang.
5297 * method.c (get_id_2): New function.
5298
5299 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
5300
5301 * parse.y (empty_parms): Make sure we use C++-style prototypes
5302 when we're declaring member functions.
5303
5304 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5305
5306 * Makefile.in (CONFLICTS): 16 s/r conflicts.
5307 * parse.y (self_template_type): New nonterminal.
5308
5309 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
5310
5311 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
5312 name.
5313 * parse.y (base_class.1): Allow 'typename foo::bar'.
5314
5315 * lex.c (check_newline): Remove #pragma code that plays with the
5316 input stream, since we now deal with tokens. Clear nextchar when
5317 we're done.
5318 (handle_cp_pragma): Use real_yylex.
5319 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
5320 in one place.
5321
5322 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
5323
5324 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
5325
5326 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
5327
5328 * parse.y: New token SELFNAME for potential constructor.
5329 * spew.c (yylex): Handle it.
5330 * lex.c (identifier_type): Produce it.
5331
5332 * parse.y (complete_type_name): In :: case, don't push class binding.
5333 (complex_type_name): Likewise.
5334
5335 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
5336
5337 * typeck.c (build_reinterpret_cast): Handle pointer to member
5338 functions.
5339
5340 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5341
5342 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
5343 pragmas.
5344 (check_newline): Put the vtable/unit/implementation/interface pragma
5345 code into handle_cp_pragma, replacing it with a call.
5346 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
5347 args. Get the next token after handling the pragma token.
5348
5349 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
5350
5351 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
5352 (convert_to_pointer_force): Likewise.
5353
5354 * init.c (build_new): Fix array new without -fcheck-new.
5355
5356 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
5357
5358 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
5359 tree.c: Lose TYPE_NESTED_NAME.
5360
5361 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
5362 as identifiers.
5363
5364 * tree.def: Add VEC_INIT_EXPR.
5365 * expr.c (cplus_expand_expr): Handle it.
5366 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
5367 the extra file-scope symbol nastiness.
5368
5369 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
5370
5371 * method.c (make_thunk): Thunks are static.
5372 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
5373
5374 * decl2.c (mark_vtable_entries): Emit thunks as needed.
5375 (finish_file): Don't emit them here.
5376
5377 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
5378
5379 * rtti.c (build_dynamic_cast): Handle null pointers.
5380 (ifnonnull): New function.
5381
5382 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
5383
5384 * call.c (build_method_call): Remember the original basetype we
5385 were called with. Give an error message instead of trying
5386 (incorrectly) to call a non-static member function through a
5387 non-inherited class.
5388
5389 * search.c (expand_upcast_fixups): Mark the new fixup as
5390 DECL_ARTIFICIAL.
5391
5392 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5393
5394 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
5395
5396 * class.c (set_rtti_entry): Fix for thunks.
5397
5398 * decl2.c (import_export_decl): Still emit typeinfo fns for
5399 cv-variants of builtin types.
5400
5401 * rtti.c (expand_class_desc): Set up base_info_type_node here.
5402 (init_rtti_processing): Instead of here.
5403
5404 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
5405
5406 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
5407 (build_typeid): Only complain about taking dynamic typeid without
5408 -frtti.
5409
5410 * decl2.c: flag_rtti defaults to 1.
5411
5412 * rtti.c (get_tinfo_var): The general class case is now smaller.
5413 (init_rtti_processing): Pack the latter three fields of base_info
5414 into 32 bits.
5415
5416 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
5417
5418 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
5419
5420 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
5421
5422 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
5423 (push_memoized_context): Split out code to undefer pop_type_level to
5424 (clear_memoized_cache): here.
5425 (pop_memoized_context): We can only handle one layer of deferral of
5426 pop_type_level so clear the cache, if there was a previous level.
5427
5428 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5429
5430 * rtti.c (init_rtti_processing): Build up base_info_type_node.
5431 (expand_class_desc): Use one pointer to an array of base_info
5432 structs, passed using a CONSTRUCTOR.
5433
5434 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
5435
5436 * class.c (build_vbase_path): Remove block extern for
5437 flag_assume_nonnull_objects here.
5438 (build_vfn_ref): Split out functionality into build_vtbl_ref.
5439 (build_vtbl_ref): New routine.
5440 (build_vtable): Set up rtti info here.
5441 (add_virtual_function): Note in CLASSTYPE_RTTI the best
5442 place where we can get the rtti pointers from to avoid having to
5443 search around for a place.
5444 (finish_base_struct): Likewise.
5445 (finish_struct_1): Likewise. Never create totally new vtables
5446 with totally new vtable pointers for rtti. Disable code to layout
5447 vtable pointers better until we want to break binary
5448 compatibility.
5449 * rtti.c (build_headof_sub): New routine to convert down to a
5450 sub-object that has an rtti pointer in the vtable.
5451 (build_headof): Use it. Also, use build_vtbl_ref now to be more
5452 maintainable.
5453 (build_dynamic_cast): Make sure we have saved it, if we need to.
5454 * search.c (dfs_init_vbase_pointers): Disable code that deals with
5455 a more efficient vtable layout, enable later.
5456 * call.c (flag_assume_nonnull_objects): Moved declaration to
5457 * cp-tree.h: here. Declare build_vtbl_ref.
5458 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
5459 function calls that want a tree.
5460
5461 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5462
5463 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
5464 other X subobjects in the most derived type. Ack.
5465
5466 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
5467 get_typeid will do it for us.
5468 (get_typeid_1): Break out call-building for expand_*_desc to use.
5469 (get_typeid): Call it.
5470 (expand_*_desc): Likewise.
5471 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
5472 and void *.
5473 (init_decl_processing): Lose builtin_type_tdescs lossage.
5474 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
5475
5476 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
5477
5478 * pt.c (tsubst): When calling set_nested_typename, use
5479 TYPE_NESTED_NAME (current_class_type) instead of
5480 current_class_name.
5481
5482 * decl.c (pushdecl): Likewise.
5483 (pushdecl_class_level): Likewise.
5484 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
5485 set_nested_typename.
5486
5487 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
5488
5489 * rtti.c (synthesize_tinfo_fn): Handle arrays.
5490
5491 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
5492
5493 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
5494
5495 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
5496 (init_rtti_processing): Lose bad_cast_type.
5497 (build_dynamic_cast): Use throw_bad_cast.
5498
5499 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
5500
5501 * decl2.c (finish_file): Don't synthesize artificial functions
5502 that are external and not inline.
5503
5504 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
5505
5506 * decl2.c (finish_file): Handle having new inlines added to
5507 saved_inlines by synthesis.
5508
5509 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
5510
5511 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5512
5513 RTTI rewrite to initialize nodes as needed, not require that
5514 users #include <typeinfo>, complete functionality and reduce wasted
5515 space.
5516 * rtti.c (init_rtti_processing): New fn.
5517 (build_typeid): The vtable entry is now a function.
5518 (get_tinfo_var): New fn.
5519 (get_tinfo_fn): Likewise.
5520 (get_typeid): Use it.
5521 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
5522 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
5523 points __rtti_*.
5524 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
5525 (synthesize_tinfo_fn): New fn.
5526 * method.c (build_t_desc_overload): Lose.
5527 (build_overload_with_type): More generic.
5528 * decl.c (init_decl_processing): Call init_rtti_processing.
5529 * class.c (set_rtti_entry): Use get_tinfo_fn.
5530 * decl2.c (mark_vtable_entries): Mark the rtti function.
5531 (finish_prevtable_vardecl): Don't build_t_desc.
5532 (import_export_decl): Handle tinfo functions.
5533 (finish_file): Likewise.
5534 * typeck.c (inline_conversion): New fn.
5535 (build_function_call_real): Use it.
5536 * cp-tree.h: Add decls.
5537
5538 * method.c (hack_identifier): Also convert component_refs from
5539 references.
5540
5541 * lex.c (cons_up_default_function): Use the type, not the name, in
5542 declspecs.
5543
5544 * decl2.c (import_export_vtable): Fix weak vtables.
5545
5546 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
5547
5548 * search.c (get_base_distance_recursive): Fix access checks for
5549 protected bases.
5550
5551 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5552
5553 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
5554 cp-tree.h.
5555 (convert_harshness): Add prototypes wrapped by PROTO.
5556 * decl2.c (grok_function_init): Likewise.
5557 (do_toplevel_using_decl): Change to void return type.
5558 * class.c (build_vtable_entry): Remove decl of make_thunk.
5559 (merge_overrides): Fix order of arg definitions.
5560 (finish_vtbls): Likewise.
5561 (fixup_vtable_deltas): Likewise.
5562 (modify_all_direct_vtables): Likewise.
5563 (modify_all_indirect_vtables): Likewise.
5564 * search.c (get_base_distance_recursive): Likewise.
5565 (get_abstract_virtuals_1): Likewise.
5566 (fixup_virtual_upcast_offsets): Likewise.
5567 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
5568 * init.c (perform_member_init): Fix order of arg definitions.
5569 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
5570 * cp-tree.h (make_thunk): Add decl.
5571 (overload_template_name, push_template_decl): Add decls.
5572 (do_toplevel_using_decl): Change to void return type.
5573 (vec_binfo_member): Add decl.
5574
5575 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5576
5577 * typeck.c (mark_addressable, convert_for_assignment,
5578 convert_for_initialization, pointer_int_sum, pointer_diff,
5579 unary_complex_lvalue): Add prototypes wrapped by PROTO.
5580 (convert_sequence): #if 0 fn decl, since definition also is.
5581
5582 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
5583
5584 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
5585 cast to pointer types for type searching.
5586
5587 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5588
5589 * typeck.c (get_delta_difference): Use cp_error, not error, in the
5590 case where BINFO == 0.
5591
5592 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
5593
5594 * call.c (build_method_call): Fix wording of error messages so
5595 constructors come out right.
5596
5597 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
5598
5599 * decl.c (push_overloaded_decl): Don't warn about hidden
5600 constructors when both the type and the function are declared
5601 in a system header file.
5602
5603 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
5604
5605 * class.c (finish_struct_1): Propagate the TYPE_PACKED
5606 flag for the type to the type's fields.
5607
5608 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5609
5610 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
5611
5612 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
5613
5614 * class.c (base_info, finish_base_struct): Replace
5615 needs_virtual_dtor with base_has_virtual.
5616
5617 (finish_struct_1): Remove the old code that tried to make default
5618 destructors virtual. Use base_has_virtual when checking if we need
5619 to add a vtable entry for the rtti code.
5620
5621 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
5622
5623 * pt.c (push_template_decl): Complain about template decl with
5624 inappropriate declaration.
5625
5626 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
5627
5628 * typeck.c (build_x_unary_op): Remove bogus check for taking
5629 the address of a member function.
5630
5631 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5632
5633 * parse.y (constructor_declarator): Only push the class if
5634 we are not already in the class.
5635
5636 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
5637
5638 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
5639 Add additional argument to INIT_CUMULATIVE_ARGS.
5640
5641 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
5642
5643 * decl.c (shadow_tag): Fix error about anon union with methods.
5644
5645 * parse.y (self_reference): Only generate a self-reference if this
5646 is a non-template class.
5647 (opt.component_decl_list): Only use it if it was generated.
5648
5649 * parse.y (component_decl_1): Use constructor_declarator.
5650 (fn.def2): Likewise.
5651 (notype_component_declarator0): Likewise.
5652
5653 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
5654
5655 * typeck.c (build_x_unary_op): Add checks for taking the address
5656 of a TARGET_EXPR or of a member function, and give appropriate
5657 warnings.
5658
5659 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
5660
5661 * pt.c (process_template_parm): Allow template type parms to be
5662 used as types for template const parms.
5663
5664 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
5665
5666 * init.c (expand_vec_init): Ensure the eh cleanups are on the
5667 function_obstack.
5668
5669 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
5670
5671 * decl.c (lookup_name_real): Be even more picky about the
5672 ambiguous lookup warning.
5673 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
5674 * parse.y (constructor_declarator): Rather than here.
5675
5676 * parse.y (constructor_declarator): New nonterminal.
5677 (fn.def1): Use it.
5678 (explicit_instantiation): Likewise.
5679
5680 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
5681
5682 Add implicit declaration of class name at class scope.
5683 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
5684 * parse.y (self_reference): New nonterminal.
5685 (opt.component_decl_list): Use it.
5686 (fn.def1): Add nested_name_specifier type_name cases.
5687 * class.c (build_self_reference): New function.
5688 (finish_struct): Handle access_default later, move self-reference
5689 decl to the end.
5690 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
5691 * cp-tree.h: Adjust.
5692
5693 * pt.c (do_function_instantiation): Separate handling of member
5694 functions and non-member functions properly.
5695
5696 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
5697
5698 * pt.c (process_template_parm): Improve error for 'volatile class K'.
5699
5700 * class.c (finish_struct_1): Check the right slot for destructors.
5701
5702 * decl.c (start_enum): Complain about enum templates.
5703
5704 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
5705
5706 * init.c (resolve_offset_ref): Offset pointers to member data by one.
5707 * typeck.c (unary_complex_lvalue): Likewise.
5708
5709 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
5710
5711 * typeck.c (c_expand_return): Check for a returned local
5712 array name, similar to the check for an ADDR_EXPR.
5713
5714 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
5715
5716 * decl.c (cp_finish_decl): Don't build cleanups for static
5717 variables here.
5718
5719 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
5720
5721 * typeck.c (build_modify_expr): Fix error messages to be more
5722 accurate.
5723 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
5724 assignment operators.
5725 * error.c (assop_as_string): Likewise. Add support for `%Q' for
5726 assignment operators.
5727
5728 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
5729
5730 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
5731 give an error if initialized. Pedwarn about nested type with the
5732 same name as its enclosing class.
5733
5734 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
5735
5736 * typeck.c (require_complete_type): Be sure to instantiate the
5737 MAIN_VARIANT of the type.
5738
5739 * decl2.c (finish_file): Instantiate pending templates before
5740 processing static constructors and destructors.
5741
5742 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
5743 unless at_eof.
5744
5745 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
5746
5747 * decl2.c (delete_sanity): If error_mark_node is passed
5748 in as an expression, quit while we're ahead.
5749
5750 * decl.c (grokdeclarator): Give an error message if `friend'
5751 is combined with any storage class specifiers.
5752
5753 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
5754
5755 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
5756 definition of nonexistent nested type.
5757
5758 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
5759 not to say 'typedef'.
5760
5761 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5762
5763 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
5764 * search.c (dfs_walk, dfs_init_vbase_pointers,
5765 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
5766 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
5767
5768 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
5769
5770 * except.c (build_throw): Support minimal parse.
5771 * pt.c (tsubst_copy): Support THROW_EXPR.
5772 * decl2.c (build_expr_from_tree): Likewise.
5773
5774 * pt.c (mangle_class_name_for_template): Always allocate
5775 scratch_firstobj.
5776
5777 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
5778
5779 * cvt.c (cp_convert_to_pointer): Give an appropriate error
5780 when trying to cast from an incomplete type.
5781
5782 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
5783
5784 * pt.c (instantiate_class_template): Don't bother setting up
5785 CLASSTYPE_TAGS explicitly, as the nested types will add
5786 themselves.
5787
5788 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
5789
5790 * decl.c (shadow_tag): Remove old error check for usage of
5791 an enum without a previous declaration.
5792 (xref_tag): Add error message about usage of enums without a
5793 previous declaration.
5794
5795 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
5796
5797 * lex.c (do_identifier): Only do name consistency check if we're
5798 parsing.
5799
5800 * pt.c (push_template_decl): Don't crash if we get a member defn
5801 that doesn't match.
5802
5803 * decl.c (xref_tag_from_type): New function to do an xref without
5804 always having to figure out code_type_node.
5805 * cp-tree.h: Declare it.
5806 * pt.c (instantiate_class_template): Use it for friend classes.
5807 (lookup_template_class): Use it.
5808
5809 * typeck2.c (build_functional_cast): Pull out a single parm before
5810 passing it to build_c_cast.
5811
5812 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
5813
5814 * expr.c (do_case): Give an error message if a pointer is
5815 given as a case value.
5816
5817 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
5818
5819 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
5820 an overload list.
5821
5822 * lex.c (cons_up_default_function): Really, now, interface hackery
5823 does not apply to synthesized methods.
5824
5825 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
5826
5827 * call.c (build_method_call): Ctors and dtors now have special names
5828 with respect to lookups.
5829 * class.c (add_method): Likewise.
5830 (grow_method): Likewise.
5831 (finish_struct_methods): Likewise.
5832 (warn_hidden): Likewise.
5833 (finish_struct_1): Likewise.
5834 * cvt.c (convert_to_reference): Likewise.
5835 (convert_to_aggr): Likewise.
5836 (cp_convert): Likewise.
5837 * decl2.c (check_classfn): Likewise.
5838 * init.c (expand_member_init): Likewise.
5839 (expand_default_init): Likewise.
5840 (expand_aggr_init_1): Likewise.
5841 (build_offset_ref): Likewise.
5842 (build_new): Likewise.
5843 (build_delete): Likewise.
5844 * lex.c (do_inline_function_hair): Likewise.
5845 * search.c (lookup_field_1): Likewise.
5846 (lookup_fnfields_here): Likewise.
5847 (lookup_field): Likewise.
5848 (lookup_fnfields): Likewise.
5849 (get_virtual_destructor): Likewise.
5850 (dfs_debug_mark): Likewise.
5851 (dfs_pushdecls): Likewise.
5852 (dfs_compress_decls): Likewise.
5853 * tree.c (layout_basetypes): Likewise.
5854 * typeck.c (build_component_ref): Likewise.
5855 (build_x_function_call): Likewise.
5856 (build_modify_expr): Likewise.
5857 (convert_for_initialization): Likewise.
5858 (build_functional_cast): Likewise.
5859 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
5860 (CTOR_NAME): New.
5861 (DTOR_NAME): New.
5862 * decl.c (ctor_identifier): New.
5863 (dtor_identifier): New.
5864 (init_decl_processing): Set them.
5865
5866 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
5867
5868 * typeck.c (build_component_ref): Don't get confused by fields whose
5869 context has no type name, like pointer to member functions.
5870
5871 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
5872
5873 * decl.c (grokdeclarator): Handle typedef without declarator.
5874
5875 * pt.c (tsubst): Handle SCOPE_REF in declarator.
5876
5877 * parse.y (bad_parm): Catch another case of missing `typename'.
5878
5879 * lex.c (yyprint): Handle TYPE_DECLs.
5880
5881 * decl.c (start_function): Don't try to be clever.
5882
5883 * lex.c: Lose compiler_error_with_decl.
5884 * typeck2.c: Lose error_with_aggr_type.
5885 (incomplete_type_error): Use cp_* instead of old functions.
5886 (readonly_error): Likewise.
5887 * typeck.c (convert_arguments): Likewise.
5888 * search.c (lookup_nested_field): Likewise.
5889 * method.c (make_thunk): Likewise.
5890 * decl.c (grokparms): Likewise.
5891 * cp-tree.h: Update.
5892
5893 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
5894 and value.
5895
5896 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
5897
5898 * method.c (build_opfncall): When deleting a pointer to an
5899 array, build a new pointer to the tree past any ARRAY_TYPE
5900 nodes.
5901
5902 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
5903
5904 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
5905
5906 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
5907
5908 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
5909 and ! DECL_INLINE.
5910
5911 * decl.c (finish_function): Don't set nested based on
5912 hack_decl_function_context.
5913 * parse.y (function_try_block): Check for nested function.
5914 (pending_inlines): Likewise.
5915
5916 * decl2.c (build_expr_from_tree): If a unary op already has a
5917 type, just return it.
5918
5919 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
5920
5921 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
5922 (finish_file): Check the return value of walk_vtables.
5923 (finish_prevtable_vardecl): Return int.
5924 (finish_vtable_vardecl): Likewise.
5925 (prune_vtable_vardecl): Likewise.
5926 * lex.c (set_vardecl_interface_info): Likewise.
5927 * cp-tree.h: Adjust return types.
5928
5929 * class.c (delete_duplicate_fields_1): Don't complain about
5930 duplicate nested types if they're the same type.
5931 (finish_struct): Remove check for duplicate.
5932 * decl2.c (grokfield): Don't check for typedef of anonymous type.
5933
5934 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
5935
5936 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
5937
5938 * decl.c (grokdeclarator): Lose special handling of class-level
5939 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
5940 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
5941
5942 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
5943
5944 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
5945
5946 * search.c (compute_access): Fix handling of anonymous union
5947 members.
5948 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
5949 from anonymous unions to their members.
5950
5951 * typeck.c (build_x_function_call): For static member functions,
5952 hand off to build_member_call.
5953
5954 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
5955
5956 * typeck.c (build_component_ref): Handle OFFSET_REFs.
5957
5958 * init.c (expand_vec_init): Fix init == 0 case.
5959
5960 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
5961
5962 * init.c (build_new): Pedwarn about init and array new.
5963 (expand_vec_init): Handle lists, use convert_for_initialization.
5964
5965 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
5966 when converting to an aggregate type.
5967 * cvt.c (cp_convert): Pass it through.
5968
5969 * typeck.c (build_conditional_expr): Handle user-defined
5970 conversions to slightly different types.
5971
5972 * decl.c (grokdeclarator): Force an array type in a parm to be
5973 permanent.
5974
5975 * decl2.c (do_using_directive): Sorry.
5976 (do_namespace_alias): Likewise.
5977 * lex.c (real_yylex): Warn about using the `namespace' keyword.
5978
5979 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
5980
5981 * parse.y (datadef): Move call to note_list_got_semicolon up.
5982
5983 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
5984
5985 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
5986
5987 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
5988
5989 * decl.c (cp_finish_decl): The exception regions have to be
5990 nested, not overlapping. We start the exception region for a
5991 decl, after it has been fully built, and all temporaries for it
5992 have been cleaned up.
5993
5994 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
5995
5996 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
5997
5998 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
5999
6000 * tree.def: Add RETURN_INIT.
6001 * pt.c (instantiate_decl): Handle RETURN_INIT.
6002 * decl.c (store_return_init): Handle minimal_parse_mode.
6003
6004 * tree.c (cp_build_type_variant): Just return an error_mark_node.
6005 * decl.c (make_typename_type): Don't try to get the file and line
6006 of an identifier.
6007 * typeck.c (comptypes): Handle TYPENAME_TYPE.
6008
6009 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
6010
6011 * decl.c (poplevel): Make sure we clear out and restore old local
6012 non-VAR_DECL values by default when they go out of scope.
6013
6014 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
6015
6016 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
6017 referring to addresses of variables and functions.
6018
6019 * error.c (dump_expr): Support SIZEOF_EXPR.
6020
6021 * init.c (do_friend): Use the return value of check_classfn.
6022
6023 * typeck.c (convert_arguments): Call complete_type.
6024
6025 * method.c (hack_identifier): After giving an error, set value to
6026 error_mark_node.
6027
6028 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
6029
6030 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
6031 lossage for local classes.
6032 * cp-tree.h: Declare it.
6033 * decl.c (lookup_name_real): Evil, painful hack for local classes.
6034 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
6035 Use hack_decl_function_context.
6036 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
6037 (start_function): Use hack_decl_function_context.
6038 (finish_function): Likewise.
6039 * method.c (synthesize_method): Likewise.
6040 * lex.c (process_next_inline): Likewise.
6041 (do_pending_inlines): Likewise.
6042 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
6043 done with it.
6044
6045 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
6046
6047 * sig.c (build_signature_pointer_or_reference_type): Align
6048 signature pointers/references on 8-byte boundaries so they can be
6049 grabbed 2 words at a time on a Sparc.
6050
6051 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
6052
6053 * method.c (hack_identifier): Requiring a static chain is now a
6054 hard error.
6055 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
6056 functions.
6057
6058 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6059
6060 * init.c (build_offset_ref): Call complete_type.
6061
6062 * decl.c (pop_from_top_level): Always pop previous_class_type.
6063
6064 * parse.y: Handle multiple decls in a for-init-statement.
6065 * pt.c (tsubst_expr): Likewise.
6066
6067 * pt.c (tsubst): Use tsubst_expr for the second operand of an
6068 ARRAY_REF.
6069
6070 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
6071 (poplevel_class): Set it here.
6072 (pop_from_top_level): Pop it here if we're returning to class scope.
6073 * class.c (pushclass): Don't set it here.
6074
6075 * decl.c (maybe_push_to_top_level): Save current_template_parms,
6076 and clear it if !pseudo.
6077 (pop_from_top_level): Restore it.
6078
6079 * decl2.c (finish_file): Push the dummy each time we walk the list
6080 of vtables.
6081
6082 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
6083 something for CAST_EXPR.
6084
6085 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
6086
6087 * cvt.c (cp_convert): Warn about implicit conversion of the
6088 address of a function to bool, as it is always true.
6089
6090 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
6091
6092 * typeck.c (c_expand_return): Fix warning for local externs returned.
6093
6094 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
6095
6096 * tree.c (mapcar): Propagate const and volatile properly.
6097
6098 * typeck.c (complete_type): Be sure to instantiate the
6099 MAIN_VARIANT of the type.
6100
6101 * method.c (synthesize_method): Class interface hackery does not
6102 apply to synthesized methods.
6103
6104 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
6105
6106 * pt.c (comp_template_args): Use comptypes rather than just
6107 checking for TEMPLATE_TYPE_PARM equivalence.
6108
6109 * typeck.c (build_x_function_call): Call complete_type before
6110 checking TYPE_OVERLOADS_CALL_EXPR.
6111
6112 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
6113
6114 * g++.c (main): Check also for new define ALT_LIBM.
6115
6116 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6117
6118 * pt.c (instantiate_class_template): If we don't have a pattern
6119 yet, that's OK.
6120 (coerce_template_parms): If we see a local class, bail.
6121
6122 * decl.c (grok_reference_init): Make sure there's a type before
6123 checking its code.
6124
6125 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
6126 (push_template_decl): Likewise.
6127
6128 * parse.y (named_class_head): Set
6129 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
6130
6131 * decl.c (xref_tag): Diagnose redeclaration of template
6132 type-parameter name.
6133
6134 * error.c (dump_type): Handle anonymous template type parms.
6135
6136 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
6137 TYPE_STUB_DECL.
6138 (coerce_template_parms): Likewise.
6139
6140 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
6141
6142 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
6143 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
6144
6145 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
6146
6147 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
6148 before trying to get its STUB_DECL.
6149 (coerce_template_parms): Likewise.
6150
6151 * parse.y (template_type_parm): If they didn't use 'class',
6152 pretend they did after giving an error.
6153
6154 * pt.c (coerce_template_parms): Diagnose use of local class.
6155
6156 * decl.c (grok_reference_init): Use instantiate_type.
6157
6158 * error.c (dump_expr): Handle TEMPLATE_DECLs.
6159
6160 * parse.y (named_class_head): Diagnose mismatching types and tags.
6161
6162 * decl.c (pushdecl): Type decls and class templates clash with
6163 artificial type decls, not hide them.
6164
6165 * decl.c (redeclaration_error_message): Diagnose redefinition of
6166 templates properly.
6167 (duplicate_decls): Diagnose disallowed overloads for template
6168 functions, too.
6169
6170 * decl.c (start_decl): Call complete_type before checking for a
6171 destructor.
6172
6173 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
6174
6175 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
6176
6177 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
6178
6179 * decl.c (grok_op_properties): Don't check for operator++(int) in
6180 a template.
6181
6182 * tree.c (perm_manip): Return a copy of variable and function
6183 decls with external linkage.
6184
6185 * tree.def: Change some of the min tree codes to type "1".
6186 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
6187 * method.c (build_overload_int): Emit something arbitrary for
6188 anything but an INTEGER_CST if we're in a template.
6189
6190 * decl.c (cp_finish_decl): Call complete_type before deciding
6191 whether or not to lay out the decl.
6192
6193 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
6194
6195 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
6196
6197 * typeck2.c (build_x_arrow): Call complete_type.
6198
6199 * pt.c (add_pending_template): Broken out.
6200 (lookup_template_class): If -fexternal-templates, call it for all
6201 the methods of implemented types.
6202 (instantiate_class_template): Instead of instantiating them here.
6203 (instantiate_decl): Handle -fexternal-templates earlier.
6204
6205 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6206
6207 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
6208 memoized lookup stuff inside GATHER_STATISTICS.
6209
6210 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6211
6212 * decl.c (start_decl): Complain about array of incomplete type
6213 here.
6214 (grokdeclarator): Not here.
6215
6216 * parse.y (template_parm): Expand full_parm inline so we can set
6217 the rule's precedence.
6218
6219 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
6220 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
6221 * decl2.c (grokbitfield): Don't check for integer constant here.
6222 * class.c (finish_struct_1): Check here.
6223
6224 * decl.c (define_label): Make the min decl go on permanent_obstack.
6225
6226 * pt.c (unify): Don't handle CONST_DECLs.
6227 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
6228 (tsubst_copy): Likewise.
6229
6230 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
6231 CONST_DECL for a template parm.
6232
6233 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
6234
6235 * decl.c (grokdeclarator): Complain about array of incomplete type
6236 here.
6237 (start_decl_1): Not here.
6238
6239 * pt.c (tsubst): Handle pointer-to-function declarators.
6240
6241 * method.c (hack_identifier): If pedantic, diagnose local class
6242 methods that require a static chain.
6243
6244 * decl.c (grok_op_properties): No longer static.
6245 * cp-tree.h: Declare it.
6246 * pt.c (tsubst): Call it for operators.
6247 Use tsubst_copy for TREE_VECs.
6248
6249 * parse.y (template_arg): The expr has precedence like '>'.
6250
6251 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
6252
6253 * pt.c (coerce_template_parms): Don't coerce an expression using
6254 template parms.
6255 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
6256 (tsubst): Don't use build_index_2_type if the max_value uses template
6257 parms.
6258 * method.c (build_overload_int): Emit something arbitrary for an
6259 expression using template parms.
6260
6261 * parse.y (template_close_bracket): New non-terminal to catch use
6262 of '>>' instead of '> >' in template class names.
6263 (template_type): Use it.
6264 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
6265
6266 * tree.def: Add CAST_EXPR.
6267 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
6268 CONVERT_EXPR for minimal_parse_mode.
6269 * typeck.c (build_c_cast): Likewise.
6270 * pt.c (tsubst_copy): Likewise.
6271 * decl2.c (build_expr_from_tree): Likewise.
6272 * error.c (dump_expr): Likewise.
6273
6274 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6275
6276 * except.c (SetTerminate, SetUnexpected): Put back global vars.
6277 (init_exception_processing): Put back decl/init of
6278 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
6279 fns from libstdc++.
6280
6281 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
6282 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
6283 Delete unused fns.
6284 * cp-tree.h (declare_uninstantiated_type_level,
6285 uninstantiated_type_level_p): Delete prototypes.
6286
6287 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
6288
6289 * pt.c (tsubst_expr): Add default return.
6290
6291 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6292
6293 * error.c (fndecl_as_string): Delete unused arg CNAME.
6294 * sig.c (build_signature_table_constructor,
6295 build_signature_method_call): Fix calls.
6296
6297 * class.c (the_null_vtable_entry): Delete var definition.
6298 (init_class_processing): Delete tree the_null_vtable_entry init.
6299 * decl.c (no_print_{functions, builtins}): Declare as static.
6300 (__tp_desc_type_node): #if 0 var definition.
6301 (init_type_desc): #if 0 init of __tp_desc_type_node.
6302 (vb_off_identifier): Move var decl into init_decl_processing.
6303 (current_function_assigns_this): Declare as static.
6304 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
6305 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
6306 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
6307 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
6308 * init.c (BI_header_type, BI_header_size): Declare as static.
6309 * pt.c (template_classes): Delete unused var.
6310 (add_pending_template): Delete decl for non-existent fn.
6311 (lookup_template_class): Delete vars CODE and TAG_CODE.
6312 (instantiate_template): Delete unused var TARGS.
6313 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
6314 Delete decls.
6315 (__tp_desc_type_node): #if 0 var decl.
6316 (fndecl_as_string): Fix prototype.
6317
6318 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
6319
6320 * tree.def: Add GOTO_STMT.
6321 * pt.c (tsubst_expr): Support goto and labels.
6322 * decl.c (define_label): Support minimal parsing.
6323 * parse.y (simple_stmt): Likewise.
6324
6325 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6326
6327 * xref.c (GNU_xref_member): Only define/set var I if
6328 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
6329 used.
6330 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
6331 (GNU_xref_end): Fix call.
6332 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
6333 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
6334
6335 * tree.c (build_exception_variant): Delete unused vars I, A, T,
6336 T2, and CNAME.
6337 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
6338 (mapcar): Delete unused var CODE.
6339 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
6340 (break_out_cleanups): Fix call.
6341 (bot_manip): Likewise.
6342 * call.c (build_method_call): Likewise.
6343 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
6344 Likewise.
6345 * typeck.c (unary_complex_lvalue, build_modify_expr,
6346 convert_for_initialization): Likewise.
6347 * typeck2.c (build_functional_cast): Likewise.
6348 * cp-tree.h (build_cplus_new): Fix prototype.
6349
6350 * repo.c (open_repo_file): Delete unused var Q.
6351 (repo_compile_flags, repo_template_declared,
6352 repo_template_defined, repo_class_defined, repo_inline_used,
6353 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
6354 (repo_get_id, repo_vtable_used): Declare as static.
6355 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
6356 prototypes.
6357
6358 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
6359
6360 * parse.y (pending_inlines): Add function_try_block case.
6361
6362 * pt.c (unify): Fix for template const parms.
6363
6364 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6365
6366 * lex.c (extract_interface_info): Delete forward decl.
6367 (default_copy_constructor_body, default_assign_ref_body): Delete
6368 decls for non-existent functions.
6369 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
6370 (init_lex): Delete setting them.
6371 (cons_up_default_function): Delete unused vars FUNC_BUF,
6372 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
6373 #if 0'd synth code.
6374 (toplevel, expression_obstack): Delete unused extern decls.
6375 (tree_node_kind): Delete unused enum.
6376 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
6377 GATHER_STATISTICS.
6378 (tree_node_kind_names): Delete unused extern decl.
6379 (synth_obstack): Delete unused var.
6380 (init_lex): Don't set it.
6381 (init_parse): Add decl before use.
6382 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
6383 (current_unit_{name, language}): Delete unused vars.
6384 (check_newline): Don't bother setting them, just accept the #pragma.
6385 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
6386 (current_unit_{name, language}): Delete decls.
6387
6388 * search.c: Wrap all of the memoized functions, macros, and
6389 variables inside #ifdef GATHER_STATISTICS.
6390 (lookup_field, lookup_fnfields): Likewise.
6391 (init_search_processing): Likewise.
6392 (reinit_search_statistics): Wrap whole function.
6393 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
6394
6395 * decl.c (finish_function): Only call pop_memoized_context if
6396 GATHER_STATISTICS is defined.
6397 (start_function): Likewise for push_memoized_context.
6398 * class.c (pushclass, popclass): Likewise.
6399
6400 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
6401 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
6402
6403 * cvt.c (cp_convert): Delete unused local var FORM.
6404 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
6405 prototypes.
6406
6407 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
6408
6409 * pt.c (do_poplevel): Oops; really return what we get from
6410 poplevel this time.
6411
6412 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6413
6414 * cp-tree.h (is_aggr_type): Add prototype.
6415
6416 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
6417 * method.c ({push,pop}_cp_function_context): Delete decls.
6418 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
6419 (SetUnexpected, SetTerminate): Delete unused vars.
6420 (init_exception_processing): Don't set SetUnexpected or
6421 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
6422 (output_exception_table_entry): Delete unused array LABEL.
6423 (expand_internal_throw): Delete unused var PARAMS.
6424 (expand_start_catch_block): Delete unused var CLEANUP.
6425 (emit_exception_table): Delete unused var EH_NODE_DECL.
6426 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
6427 GOTO_UNWIND_AND_THROW. Don't set them.
6428 (end_eh_unwinder): Add top decl.
6429 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
6430 (exception_section, push_rtl_perm, do_function_call,
6431 lang_interim_eh, push_eh_cleanup, eh_outer_context,
6432 expand_end_eh_spec, end_eh_unwinder): Declare as static.
6433 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
6434 throw_used): Likewise.
6435 * cp-tree.h (expand_end_eh_spec): Delete prototype.
6436
6437 * search.c (dfs_mark, dfs_mark_vtable_path,
6438 dfs_unmark_vtable_path, dfs_mark_new_vtable,
6439 dfs_unmark_new_vtable, dfs_clear_search_slot,
6440 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
6441 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
6442 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
6443 functions.
6444 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
6445 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
6446 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
6447 Only define #ifdef GATHER_STATISTICS.
6448 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
6449 is defined.
6450 (vbase_decl): Delete var definition.
6451 (init_search): Delete old decl.
6452 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
6453 never actually used.
6454 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
6455 (get_base_distance_recursive): Delete unused fourth arg
6456 BASETYPE_PATH. Fix call .
6457 (get_base_distance): Fix call.
6458 (push_class_decls): Delete unused var ID.
6459 (make_memoized_table_entry): Declare as static.
6460 (breadth_first_search): Declare as static.
6461 (tree_has_any_destructor_p): Declare as static.
6462 (pop_class_decls): Delete unused arg pop_class_decls.
6463 * class.c (popclass): Fix call to pop_class_decls.
6464 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
6465 tree_has_any_destructor_p): Delete prototypes.
6466
6467 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
6468 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
6469 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
6470 (build_user_desc): Delete unused var T.
6471 (build_class_desc): Delete unused vars T and OFF.
6472 (build_t_desc): Delete unused var NAME_STRING.
6473 (build_headof): Make static.
6474 (get_bad_cast_node): Likewise.
6475 (get_def_to_follow): Likewise.
6476 * cp-tree.h (init_type_desc): Add prototype.
6477 (build_headof): Remove prototype.
6478
6479 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
6480
6481 * pt.c (tsubst): Only look for matching decls at file scope for
6482 non-member functions.
6483
6484 * call.c (build_scoped_method_call): Handle scoped destructor
6485 calls in templates.
6486
6487 * decl.c (*_top_level): Also save previous_class_values.
6488
6489 * pt.c (tsubst_expr): Support do {} while loops.
6490 * parse.y (simple_stmt): Likewise.
6491 * tree.def: Likewise.
6492
6493 * method.c (build_overload_identifier): For a class nested in a
6494 template class, don't mangle in the template parms from our
6495 context.
6496
6497 * lex.c, cp-tree.h: Remove support for template instantiations in
6498 the pending_inlines code.
6499 * pt.c: Remove dead functions and unused arguments.
6500 (uses_template_parms): TYPENAME_TYPEs always use template parms.
6501 * parse.y: Stop passing anything to end_template_decl.
6502 * tree.c (print_lang_statistics): Only print tinst info #ifdef
6503 GATHER_STATISTICS.
6504
6505 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6506
6507 * init.c (expand_recursive_init{,_1}): Delete decls.
6508 (sort_member_init): Delete unused var INIT.
6509 (emit_base_init): Delete unused var X.
6510 (build_offset_ref): Delete unused var CNAME.
6511 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
6512 (emit_base_init): Delete unused local var BASE. Delete extern
6513 decl of IN_CHARGE_IDENTIFIER.
6514 (build_delete): Delete unused local var VIRTUAL_SIZE.
6515
6516 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
6517 (build_delete): Fix call.
6518 * decl2.c (delete_sanity): Likewise.
6519 * cp-tree.h (build_vec_delete): Update prototype.
6520
6521 * typeck.c (common_base_type): Delete unused var TMP.
6522 (build_binary_op): Delete local var ARGS_SAVE.
6523 (build_array_ref): Delete unused var ITYPE.
6524 (c_expand_return): Delete unused var USE_TEMP.
6525
6526 * typeck.c (compexcepttypes): Delete unused arg STRICT.
6527 (comptypes): Fix calls.
6528 * decl.c (duplicate_decls): Likewise.
6529 * cp-tree.h (compexcepttypes): Delete extra arg.
6530
6531 * decl2.c (check_classfn): Delete unused second arg CNAME.
6532 * decl.c (start_decl, grokfndecl): Fix calls.
6533 * init.c (do_friend): Likewise.
6534 * cp-tree.h (check_classfn): Update prototype.
6535
6536 * cp-tree.h (signature_error, import_export_vtable,
6537 append_signature_fields, id_in_current_class, mark_used,
6538 copy_assignment_arg_p): Add decls.
6539 * decl2.c (mark_used): Delete decl.
6540
6541 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
6542
6543 * class.c (get_vtable_entry): Diable unused function.
6544 (doing_hard_virtuals): Delete unused static global var.
6545 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
6546 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
6547 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
6548 (modify_one_vtable): Delete unused var OLD_RTTI.
6549 (finish_struct_anon): Delete unused vars OFFSET and X.
6550 (finish_struct_bits): Delete unused var METHOD_VEC.
6551 (get_basefndecls): Delete unused var PURPOSE. Delete unused
6552 for-scope local variable METHODS.
6553
6554 * call.c (user_harshness): Delete unused/unneeded arg PARM.
6555 (ideal_candidate): Delete unused args BASETYPE and PARMS.
6556 (build_method_call): Delete unused args passed into ideal_candidate.
6557 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
6558 * cp-tree.h (synthesize_method): Add decl.
6559
6560 * decl.c (note_level_for_for): Give void return type.
6561 (pushdecl_nonclass_level): Likewise.
6562 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
6563 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
6564 (suspend_binding_level): Delete unused var LEVEL.
6565 (duplicate_decls): Delete unused var CTYPE.
6566 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
6567 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
6568 PTR_ENDLINK.
6569 (grokdeclarator): Delete unused var C.
6570 (grokdeclarator): Delete unused var SIZE_VARIES.
6571 (grokparms): Delete unused var SAW_VOID.
6572 (start_function): Delete unused var OLDDECL.
6573 (cplus_expand_expr_stmt): Delete unused var
6574 REMOVE_IMPLICIT_IMMEDIATELY.
6575
6576 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
6577
6578 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
6579
6580 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
6581
6582 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
6583 (build_min_nt): Likewise.
6584 * pt.c (do_pushlevel): Emit line note.
6585 (do_poplevel): Return what we get from poplevel.
6586 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
6587 * parse.y: Use do_pushlevel and do_poplevel.
6588 * cp-tree.h: Declare do_poplevel.
6589
6590 * cp-tree.h: Declare at_eof.
6591 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
6592 * decl2.c (import_export_decl): Renamed from import_export_inline.
6593 (finish_file): Call it to do interface handling for statics.
6594 * pt.c (tsubst_copy): Call mark_used on variables and functions
6595 used here.
6596
6597 * decl2.c (finish_file): Don't emit statics we can't generate.
6598 * pt.c (instantiate_decl): Don't set interface on instantiations
6599 we can't generate.
6600
6601 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
6602 * tree.c (print_lang_statistics): Print max template depth.
6603 * pt.c (push_tinst_level): Dump entire instantiation context.
6604 (instantiate_class_template): Use it and pop_tinst_level.
6605 (instantiate_decl): Likewise.
6606
6607 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
6608 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
6609
6610 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
6611
6612 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
6613 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
6614 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
6615 the new template implementation.
6616
6617 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6618
6619 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
6620
6621 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
6622
6623 * decl.c (cp_finish_decl): Delay emitting the debug information for
6624 a typedef that has been installed as the canonical typedef, if the
6625 type has not yet been defined.
6626
6627 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
6628
6629 * decl2.c (grokfield): Still call pop_nested_class for access decls.
6630
6631 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6632
6633 * decl.c (lookup_label): Call label_rtx.
6634
6635 * decl.c (make_binding_level): New function.
6636 (pushlevel, pushlevel_class): Call it instead of explicit
6637 duplicate calls to xmalloc.
6638
6639 * decl.c (init_decl_processing): Delete useless build_pointer_type
6640 call.
6641
6642 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
6643 (sizet_ftype_string): Delete variable.
6644 (init_decl_processing): Add built-in functions fabsf, fabsl,
6645 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
6646 variable strlen_ftype, used for strlen.
6647
6648 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
6649
6650 * decl.c (push_to_top_level): Start from current_binding_level
6651 again for now; the stl hacks depend on g++ being broken in this
6652 way, and it'll be fixed in the template rewrite.
6653
6654 * tree.def: Add USING_DECL.
6655 * decl2.c (do_class_using_decl): Implement.
6656 (grokfield): Pass access decls off to do_class_using_decl instead of
6657 grokdeclarator.
6658 * error.c (dump_decl): Handle USING_DECLs.
6659 * decl.c (grokdeclarator): Remove code for handling access decls.
6660 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
6661 as access decls for now.
6662 (finish_struct): Don't check USING_DECLs for other uses of the name.
6663
6664 * search.c (get_matching_virtual): Use cp_error_at.
6665
6666 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6667
6668 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
6669 match c-typeck.c.
6670 (self_promoting_args_p): Move the check that TYPE is non-nil
6671 before trying to look at its main variant.
6672 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
6673
6674 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
6675 Delete macros.
6676 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
6677 (do_friend): Delete call to xref_friend.
6678 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
6679
6680 * typeck.c (convert_sequence): #if 0 unused function.
6681
6682 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
6683 be in decl_in_memory_p.
6684 (decl_in_memory_p): Delete decl.
6685 * expr.c (decl_in_memory_p): Delete fn.
6686 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
6687
6688 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
6689
6690 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
6691
6692 * class.c (finish_struct_1): Check for a pure-specifier on a
6693 non-virtual function here.
6694
6695 * decl2.c (grok_function_init): Don't check whether the function
6696 is virtual here.
6697 (grokfield): Don't call check_for_override here.
6698
6699 * decl.c (push_to_top_level): Start from inner_binding_level,
6700 check class_shadowed in class levels.
6701
6702 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
6703
6704 * decl.c (resume_level): Ignore things that don't have names, instead
6705 of core dumping.
6706
6707 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6708
6709 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
6710
6711 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
6712
6713 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
6714 synthesized dtor.
6715
6716 * parse.y (complete_type_name): Bind global_scope earlier.
6717 (complex_type_name): Likewise.
6718 (qualified_type_name): Remove.
6719
6720 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
6721
6722 * decl.c (grokfndecl): Move code that looks for virtuals in base
6723 classes...
6724 * class.c (check_for_override): ... to a new function.
6725 (finish_struct_1): Call it.
6726
6727 * cp-tree.h: Declare warn_sign_compare.
6728
6729 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
6730 rather than extra_warnings to decide whether to warn about
6731 comparison of signed and unsigned.
6732
6733 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
6734 implies -Wsign-compare. -Wall doesn't imply -W.
6735
6736 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
6737
6738 * typeck.c (build_component_ref): Fix to handle anon unions in base
6739 classes as well.
6740
6741 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6742
6743 * class.c (resolves_to_fixed_type_p): Delete code dealing with
6744 a WITH_CLEANUP_EXPR, since we don't generate them any more.
6745 * cvt.c (build_up_reference): Likewise.
6746 * decl.c (grok_reference_init): Likewise.
6747 (cp_finish_decl): Likewise.
6748 * error.c (dump_expr): Likewise.
6749 * tree.c (real_lvalue_p): Likewise.
6750 (lvalue_p): Likewise.
6751 (build_cplus_new): Likewise.
6752 (unsave_expr_now): Likewise.
6753 * typeck.c (unary_complex_lvalue, build_modify_expr,
6754 c_expand_return): Likewise.
6755
6756 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6757
6758 Make the C++ front-end pay attention to attributes for structures.
6759 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
6760 finish_struct_1.
6761 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
6762 Take out old round_up_size use and setting the DECL_ALIGN possibly
6763 using it. Take out setting of TYPE_ALIGN to round_up_size, which
6764 can override what the attribute set.
6765 * cp-tree.h (finish_struct): Update prototype.
6766 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
6767 attributes to finish_struct.
6768 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
6769 value down into finish_struct.
6770 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
6771
6772 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
6773
6774 * decl.c (poplevel): Re-word dead for local handling.
6775 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
6776 (cp_finish_decl): If is_for_scope, check for duplicates so
6777 we can disable is_for_scope. Otherwise, preserve_temp_slots.
6778
6779 * lex.c (do_identifier): Use global binding in preference of
6780 dead for local variable.
6781
6782 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
6783
6784 * init.c (initializing_context): Handle anon union changes, the
6785 context where fields of anon unions can be initialized now has to be
6786 found by walking up the TYPE_CONTEXT chain.
6787
6788 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
6789
6790 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
6791 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
6792 (obscure_complex_init): If bss is supported, always set
6793 DECL_INITIAL to error_mark_node.
6794
6795 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6796
6797 * init.c (is_friend): Make sure there's a context before we see if
6798 it's an aggr type.
6799
6800 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
6801
6802 * init.c (is_friend): Classes are not friendly with nested classes.
6803
6804 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
6805
6806 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
6807 and record its result.
6808
6809 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
6810
6811 * class.c (finish_struct_anon): Switch around code to not move anon
6812 union elements around, nor mess up their contexts, nor offsets,
6813 instead we now build up the right number of COMPONENT_REFs for all
6814 the anon unions that may be present at build_component_ref time.
6815 * typeck.c (lookup_anon_field): New routine to handle field lookup
6816 on fields without names. We find them, based upon their unique type
6817 instead.
6818 * typeck.c (build_component_ref): Allow FIELD_DECL components.
6819 Handle finding components in anonymous unions, and ensure that a
6820 COMPONENT_REF is built for each level as necessary.
6821
6822 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
6823
6824 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
6825 code that ensures that copy ctors are used if appropriate.
6826
6827 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6828
6829 * init.c (build_vec_delete): Only give an error if base isn't an
6830 error_mark_node.
6831
6832 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
6833
6834 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
6835 (yylex): If we see `new', keep slurping.
6836
6837 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
6838
6839 * class.c (finish_struct_1): Move code for handling anon unions...
6840 (finish_struct_anon): to here. Fixup so that we do the offset
6841 calculations right, and so that the fields are physically moved to
6842 the containers's chain.
6843
6844 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6845
6846 * decl.c (grokdeclarator): Avoid trying to get an operand off an
6847 identifier node.
6848
6849 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
6850
6851 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
6852 POINTER_SIZE to agree with expr.c.
6853
6854 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
6855
6856 * search.c (lookup_field): Don't report ambiguities if protect is 0,
6857 instead return NULL_TREE.
6858
6859 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
6860
6861 * class.c (finish_struct_1): Call warn_hidden if we want warnings
6862 about overloaded virtual functions.
6863 (warn_hidden): New routine to warn of virtual functions that are
6864 hidden by other virtual functions, that are not overridden.
6865 (get_basefndecls): New routine, used by warn_hidden.
6866 (mark_overriders): New routine, used by warn_hidden.
6867 * search.c (get_matching_virtual): Remove old warning that just
6868 isn't very useful.
6869
6870 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6871
6872 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
6873
6874 * typeck.c (null_ptr_cst_p): Delete unused fn.
6875 (build_function_call_maybe): Delete unused fn.
6876
6877 * expr.c (extract_init): #if 0 the code after unconditional return 0
6878 for now.
6879
6880 Delete old cadillac code.
6881 * edsel.c: Remove file.
6882 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
6883 * Makefile.in (CXX_OBJS): Delete edsel.o.
6884 (edsel.o): Delete rule.
6885 * cp-tree.h (flag_cadillac): Delete var decl.
6886 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
6887 * decl2.c (flag_cadillac): Delete var definition.
6888 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
6889 (grokfield): Delete code depending on flag_cadillac.
6890 (finish_anon_union): Likewise.
6891 * class.c (finish_struct_1): Likewise.
6892 (pushclass): Likewise.
6893 (popclass): Likewise.
6894 (push_lang_context): Likewise.
6895 (pop_lang_context): Likewise.
6896 * decl.c (init_decl_processing): Likewise.
6897 (start_decl): Likewise.
6898 (cp_finish_decl): Likewise.
6899 (xref_tag): Likewise.
6900 (finish_enum): Likewise.
6901 (start_function): Likewise.
6902 (finish_function): Likewise.
6903 (finish_stmt): Likewise.
6904 * lex.c (lang_init): Likewise.
6905 (check_newline): Likewise.
6906
6907 * lex.c (do_pending_inlines): Delete synthesized method kludge.
6908
6909 Delete defunct, ancient garbage collection implementation.
6910 * rtti.c: New file with the RTTI stuff from gc.c.
6911 * gc.c: Removed file (moved the remaining stuff into rtti.c).
6912 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
6913 (rtti.o): New rule, replacing gc.o.
6914 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
6915 * cp-tree.h: Delete gc-related fn decls.
6916 (DECL_GC_OFFSET): Delete macro.
6917 (flag_gc): Delete extern decl.
6918 * decl.c (current_function_obstack_index): Delete var decl.
6919 (current_function_obstack_usage): Delete var decl.
6920 (start_function): Delete clearing of current_function_obstack_index
6921 and current_function_obstack_usage.
6922 (init_decl_processing): Delete code relying on -fgc.
6923 Delete call to init_gc_processing.
6924 (cp_finish_decl): Delete calls to build_static_gc_entry and
6925 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
6926 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
6927 and to expand_expr of a __gc_main call.
6928 (maybe_gc_cleanup): Delete var decl.
6929 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
6930 * decl2.c (flag_gc): Delete var decl.
6931 (lang_f_options): Delete offering of -fgc.
6932 (lang_decode_option): Delete -fgc and -fno-gc handling.
6933 (get_temp_regvar): Delete gc code.
6934 * init.c (build_new): Delete gc code.
6935 * lex.c (init_lex): Delete checking of flag_gc.
6936
6937 * typeck.c (convert_arguments): Delete gc code.
6938 (build_component_addr): Delete -fgc warning.
6939 (build_modify_expr): Delete gc code.
6940
6941 * decl2.c (build_push_scope): Delete fn.
6942 * cp-tree.h (build_push_scope): Delete decl.
6943
6944 * search.c (clear_search_slots): Delete fn.
6945 * cp-tree.h (clear_search_slots): Delete decl.
6946
6947 * search.c (tree_needs_constructor_p): Delete fn.
6948 * cp-tree.h (tree_needs_constructor_p): Delete decl.
6949
6950 * tree.c (id_cmp): Delete fn.
6951
6952 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
6953 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
6954
6955 * tree.c (decl_value_member): Delete fn.
6956 * cp-tree.h (decl_value_member): Delete decl.
6957
6958 * tree.c (list_hash_lookup_or_cons): Delete fn.
6959 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
6960
6961 * method.c (cplus_exception_name): Delete fn.
6962 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
6963
6964 * spew.c (shift_tokens): Delete fn.
6965
6966 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
6967
6968 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
6969 to cp_finish_decl.
6970 * parse.y: Likewise.
6971
6972 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
6973
6974 * tree.c (build_cplus_staticfn_type): Delete function definition;
6975 never used.
6976 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
6977
6978 * tree.c (virtual_member): Delete function definition; never used.
6979 * cp-tree.h (virtual_member): Delete decl.
6980
6981 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
6982
6983 * typeck.c (build_component_ref): Handle getting vbase pointers
6984 out of complex multiple inheritance better.
6985
6986 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
6987
6988 * typeck.c (build_object_ref): Make sure we use the real type, not
6989 any reference type.
6990
6991 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
6992
6993 * tree.c (build_exception_variant): Don't create new types if we
6994 don't have to, also build new types on the right obstack.
6995
6996 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
6997
6998 * decl.c (store_bindings): Split out from push_to_top_level.
6999 (push_to_top_level): Call it for b->type_shadowed on class binding
7000 levels.
7001
7002 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
7003
7004 * search.c (expand_upcast_fixups): Fix so that offsets stored in
7005 vbase_offsets are always right. Fixes a problem where virtual base
7006 upcasting and downcasting could be wrong during conversions on this
7007 during virtual function dispatch at ctor/dtor time when dynamic
7008 vtable fixups for deltas are needed. This only sounds easier than
7009 it is. :-)
7010 (fixup_virtual_upcast_offsets): Change to reflect new calling
7011 convention for expand_upcast_fixups.
7012
7013 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7014
7015 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
7016 check that it's usable as the bitfield width.
7017
7018 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7019
7020 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
7021 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
7022 only ever used for functions in it.
7023
7024 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
7025
7026 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
7027 (nested_type): Likewise.
7028 (nested_name_specifier): Use lastiddecl.
7029
7030 * decl.c (grokdeclarator): Adjust accordingly.
7031 * init.c (expand_member_init): Likewise.
7032 * parse.y (base_class): Likewise.
7033 * typeck2.c (build_functional_cast): Likewise.
7034
7035 * typeck2.c (build_functional_cast): Fill in name after we've
7036 checked for non-aggr type.
7037
7038 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
7039
7040 * decl2.c (warn_pointer_arith): Default to on.
7041
7042 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
7043
7044 * lex.c (is_rid): New function.
7045 * decl.c (grokdeclarator): Diagnose reserved words used as
7046 declarator-ids.
7047
7048 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
7049
7050 * tree.c (get_decl_list): Don't lose cv-quals.
7051
7052 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
7053 typespecs used as declarator-ids.
7054
7055 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
7056
7057 * decl.c (poplevel): When poping a level, don't give a warning for
7058 any subblocks that already exist.
7059
7060 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
7061
7062 * typeck.c (build_object_ref): Finish what I started.
7063
7064 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
7065
7066 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
7067
7068 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
7069 scope.
7070
7071 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
7072
7073 * decl.c (xref_tag): Handle passing a type in directly.
7074
7075 * parse.y (qualified_type_name): Pull out the type.
7076 (nested_type): Likewise.
7077 Take types directly instead of as identifiers.
7078 * call.c (build_scoped_method_call): Take types directly instead of
7079 as identifiers.
7080 * decl.c (xref_basetypes): Likewise.
7081 * init.c (expand_member_init): Likewise.
7082 (build_member_call): Likewise.
7083 (build_offset_ref): Likewise.
7084 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
7085 * method.c (do_build_assign_ref): Likewise.
7086 * decl.c (grokdeclarator): Handle a type appearing as the
7087 declarator-id for constructors.
7088 * method.c (do_build_copy_constructor): current_base_init_list now
7089 uses the types directly, not their names.
7090 * init.c (sort_base_init): Likewise.
7091 (expand_member_init): Likewise.
7092 * init.c (is_aggr_type): New function, like is_aggr_typedef.
7093
7094 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
7095
7096 * tree.c (layout_basetypes): Call build_lang_field_decl instead
7097 of build_lang_decl if first arg is a FIELD_DECL.
7098
7099 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7100
7101 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
7102 non-empty.
7103 * except.c (expand_start_catch_block): Set TREE_USED to avoid
7104 warnings about the catch handler.
7105
7106 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
7107
7108 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
7109 expand_target_expr.
7110
7111 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
7112
7113 Fix access control to use trees rather than integers.
7114 * class.c (access_{default, public, protected, private,
7115 default_virtual, public_virtual, private_virtual}_node): Add
7116 definitions.
7117 (init_class_processing): Do creation of those nodes.
7118 * cp-tree.h (access_type): Delete enum decl.
7119 (access_{default, public, protected, private, default_virtual,
7120 public_virtual, private_virtual}_node): Add decls.
7121 (compute_access): Change return type.
7122 * search.c (compute_access): Have tree return type, instead of enum.
7123 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
7124 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
7125 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
7126 * parse.y (VISSPEC): Make ttype rather than itype.
7127 (base_class_access_list): Likewise.
7128 * *.[cy]: Change all refs of `access_public' to `access_public_node',
7129 etc.
7130 * call.c (build_method_call): Make ACCESS be a tree.
7131 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
7132 * cvt.c (convert_to_aggr): Likewise.
7133 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
7134 Likewise.
7135 * method.c (hack_identifier): Likewise.
7136 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
7137
7138 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
7139
7140 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
7141 frontend, and make it more consistent with respect to
7142 warn_pointer_arith.
7143
7144 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
7145
7146 * decl.c (pushdecl): Check for duplicate parameter names.
7147
7148 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
7149
7150 * decl.c (expand_static_init): Call assemble_external for atexit.
7151
7152 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
7153
7154 * except.c (do_unwind): Remove some generated dead code.
7155 (eh_outer_context): New routine, factor out some common code from
7156 expand_builtin_throw and end_eh_unwinder. Add code to do return
7157 address masking for the PA.
7158 (expand_builtin_throw): Use eh_outer_context instead of open coding
7159 it here.
7160 (end_eh_unwinder): Likewise.
7161
7162 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
7163
7164 * except.c (expand_throw): Call assemble_external for __empty, if we
7165 use it.
7166
7167 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
7168
7169 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
7170 NORMAL_RETURN_ADDR_OFFSET.
7171 (end_eh_unwinder): Likewise.
7172
7173 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
7174
7175 * gc.c (build_dynamic_cast): Make sure we don't cast away const
7176 when dealing with references, and make sure we handle dynamic
7177 casting to a cv qualified reference.
7178
7179 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
7180
7181 * except.c (struct eh_context): New structure top hold eh context
7182 information.
7183 (push_eh_context): New routine.
7184 (pop_eh_context): Likewise.
7185 * decl.c (push_cp_function_context): Use them.
7186 (pop_cp_function_context): Likewise.
7187
7188 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
7189
7190 * decl2.c (finish_file): Also prune uninteresting functions in the
7191 inline emission loop.
7192
7193 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
7194
7195 * sig.c (build_signature_table_constructor): Mark functions
7196 in the signature as referenced.
7197
7198 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
7199
7200 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
7201 the inline emission stuff.
7202
7203 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
7204
7205 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
7206 weak symbols.
7207 * lang-options.h: Add -f{no-,}weak.
7208 * decl.c (init_decl_processing): If the target does not support weak
7209 symbols, don't use them.
7210 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
7211
7212 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
7213
7214 * init.c (expand_member_init): warning for base init after members.
7215
7216 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
7217
7218 * cvt.c (build_expr_type_conversion): Don't convert to a reference
7219 type.
7220
7221 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
7222
7223 * method.c (report_type_mismatch): Improve wording for volatile
7224 mismatches.
7225
7226 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
7227
7228 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
7229 expand_assignment, as the later doesn't handle things that have
7230 copy constructors well. The compiler would do bitwise copying,
7231 instead of ctor calling in some cases.
7232
7233 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
7234
7235 * g++.c (my_strerror): Return "cannot access" if errno is 0.
7236 (pfatal_with_name, perror_exec): Don't assume that
7237 the returned value from my_strerror contains no '%'s.
7238 (concat): Remove.
7239 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
7240
7241 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
7242
7243 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
7244 TYPE_METHODS/TREE_CHAIN mean what they used to.
7245 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
7246 instead of TYPE_METHODS.
7247 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
7248 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
7249 * cp-tree.h (CLASSTYPE_METHODS): Lose.
7250 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
7251 TYPE_METHODS.
7252 (struct lang_decl): Lose next_method field.
7253 (DECL_NEXT_METHOD): Lose.
7254 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
7255 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
7256 anymore.
7257 (finish_struct_methods): Don't mess with the TREE_CHAINs in
7258 fn_fields.
7259
7260 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
7261 vector.
7262
7263 * call.c (build_method_call): Synthesize here even when not inlining.
7264 * typeck.c (build_function_call_real): Likewise.
7265
7266 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
7267
7268 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
7269 == DBX_DEBUG, call dbxout_start_new_source_file and
7270 dbxout_resume_previous_source_file when appropriate.
7271
7272 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
7273
7274 * except.c (start_anon_func): Push to the top level.
7275 (end_anon_func): Pop from the top level.
7276
7277 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
7278
7279 * cp-tree.h (build_cleanup): New routine to build cleanups.
7280 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
7281 call at ctor time and use atexit to run it later.
7282 * decl2.c (build_cleanup): New routine, taken from finish_file.
7283 (finish_file): Use build_cleanup instead, and don't put function
7284 local statics in global dtor list.
7285
7286 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
7287
7288 * except.c (expand_throw): Ensure that we have cleanups, if we try
7289 and expand cleanups.
7290
7291 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
7292
7293 * except.c (expand_throw): Add logic to manage dynamic cleanups for
7294 the EH object.
7295 (expand_end_catch_block): Use the magic of expand_goto, instead of
7296 emit_jump so that we get the cleanup for any catch clause parameter
7297 and the cleanup for the exception object. Update to reflect label
7298 changes.
7299 (push_eh_cleanup): New routine to register a cleanup for an
7300 exception object.
7301 (empty_fndecl): Used to default cleanup actions to
7302 nothing.
7303 (init_exception_processing): Setup empty_fndecl. Setup
7304 saved_cleanup.
7305 (expand_start_catch_block): Update to reflect label changes. Call
7306 push_eh_object to register the cleanup for the EH object.
7307 (start_anon_func): New routine to start building lambda expressions
7308 from trees.
7309 (end_anon_func): New routine to end them.
7310 (struct labelNode): Change so that we can use tree labels, or rtx
7311 labels.
7312 (saved_cleanup): Object to check for dynamic cleanups for the
7313 exception handling object.
7314 (push_label_entry): Change so that we can use tree labels, or rtx
7315 labels.
7316 (pop_label_entry): Likewise.
7317 (top_label_entry): Likewise.
7318 (expand_start_all_catch): Use tree label instead of rtx label, so
7319 that we can get the magic of expand_goto.
7320 (expand_end_all_catch): Update to reflect label changes.
7321
7322 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
7323 use UNSAVE_EXPRs.
7324 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
7325 building_cleanup logic, as we now use UNSAVE_EXPRs.
7326 * cp-tree.h (unsave_expr): Declare it.
7327 * decl.c (building_cleanup): Remove.
7328 (maybe_build_cleanup): Remove building_cleanup logic, and use
7329 UNSAVE_EXPR instead.
7330
7331 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
7332
7333 * gc.c (build_t_desc): Update error message to say <typeinfo>.
7334
7335 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7336
7337 * decl.c (pushdecl): Only warn about shadowing a local variable if
7338 warn_shadow is true.
7339
7340 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
7341
7342 * typeck.c (build_binary_op_nodefault): Added warning about
7343 comparisons between different enum types with -Wall, unless
7344 -fenum-int-equiv set.
7345
7346 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
7347
7348 * class.c (finish_struct_1): Skip down to the inner type in
7349 multidimensional arrays. Ensures ctors will be made for types that
7350 need constructing.
7351
7352 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
7353
7354 * decl.c (last_dtor_insn): New to track the last compiler generated
7355 insn in a dtor.
7356 (store_parm_decls): Set it.
7357 (finish_function): Use it to see if the dtor is empty. Avoid doing
7358 vtable setup all the time, if we can.
7359 (struct cp_function): Add last_dtor_insn.
7360 (push_cp_function_context): Save it.
7361 (pop_cp_function_context): Restore it.
7362
7363 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
7364
7365 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
7366 warnings.
7367
7368 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
7369
7370 * typeck.c (expand_target_expr): Make sure targets get put into the
7371 current temp_slot_level, so that the free_temp_slots call will reuse
7372 them.
7373
7374 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
7375
7376 * class.c (finish_struct_1): Delay delta fixups for virtual bases
7377 until after we have done the hard virtuals, to avoid a bogus `every
7378 virtual function must have a unique final overrider' for virtual
7379 functions that are only overridden by hard virtuals.
7380
7381 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
7382
7383 * pt.c (do_function_instantiation): Don't try to find a file-scope
7384 template for a member function.
7385
7386 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
7387
7388 * g++.c (main): Add handling of -nodefaultlibs.
7389
7390 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
7391
7392 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
7393 distinguish between direct bindings of reference variables, and
7394 indirect bindings of reference variables.
7395 * cvt.c (build_up_reference): Use it.
7396 * typeck.c (convert_arguments): Use it to indicate this is an
7397 indirect binding.
7398 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
7399 as they are unused.
7400 (expand_static_init): Likewise.
7401 (cplus_expand_expr_stmt): Likewise.
7402 * decl2.c (finish_file): Likewise.
7403 * init.c (perform_member_init): Likewise.
7404 (emit_base_init): Likewise.
7405 (expand_aggr_vbase_init_1): Likewise.
7406
7407 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7408
7409 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
7410 get a DECL_LANG_SPECIFIC node.
7411 * cp-tree.h (lang_decl_flags): Add new member `level'.
7412 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
7413 decl_flags level member.
7414
7415 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7416
7417 * call.c (build_method_call): Make sure instance has a
7418 TYPE_LANG_SPECIFIC node before we dive into it.
7419
7420 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
7421
7422 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
7423
7424 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
7425
7426 * decl.c (duplicate_decls): When smashing decls, smash staticness in
7427 the usual way.
7428
7429 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
7430
7431 * decl.c (poplevel): Handle the merging of subblocks of cleanups
7432 when finishing blocks that have already been created (usually due to
7433 the fixup goto code). Fixes bad debugging information.
7434
7435 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
7436
7437 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
7438 that's not a list of overloaded functions.
7439
7440 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7441
7442 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
7443 before trying to use DECL_ABSTRACT_VIRTUAL_P.
7444
7445 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
7446
7447 * decl2.c (mark_used): New function for hooking into setting of
7448 TREE_USED on decls.
7449 * call.c (build_method_call): Use it.
7450 * class.c (instantiate_type): Likewise.
7451 * init.c (build_offset_ref): Likewise. Don't call assemble_external
7452 for all like-named functions.
7453 * method.c (hack_identifier): Likewise.
7454 (emit_thunk): Don't call assemble_external.
7455 (make_thunk): Create thunk as a FUNCTION_DECL so that it
7456 gets the right mode and ENCODE_SECTION_INFO works.
7457
7458 * parse.y: Use mark_used. Pass operator names to do_identifier.
7459 * lex.c (do_identifier): Handle operator names.
7460
7461 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
7462
7463 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7464
7465 * errfn.c: Include stdio.h.
7466 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
7467
7468 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
7469
7470 * typeck2.c (digest_init): Always convert initializers to the
7471 right type.
7472
7473 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
7474
7475 * init.c (member_init_ok_or_else): Don't allow member initializers
7476 for indirect members, as it is invalid.
7477
7478 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7479
7480 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
7481
7482 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
7483
7484 * parse.y (for.init.statement): Catch compound statements inside for
7485 initializations, if we're being pedantic.
7486
7487 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
7488
7489 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
7490 looking for.
7491
7492 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
7493
7494 * error.c (dump_expr): Don't core dump when a boolean expression is
7495 used as a default argument.
7496
7497 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
7498
7499 * class.c (finish_struct_bits): Check aggregate_value_p instead of
7500 RETURN_IN_MEMORY.
7501
7502 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
7503
7504 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
7505 BLKmode type that would otherwise be returned in registers.
7506
7507 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7508
7509 * g++.c (WITHLIBC): New macro.
7510 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
7511 saw_libc and pass it at the end if it was set.
7512
7513 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7514
7515 * parse.y (fn.def1): Call split_specs_attrs in
7516 declmods notype_declarator case.
7517 \f
7518 Use a consistent time stamp format in ChangeLog entries.
7519 Not everyone has Emacs 20 yet, so stick with Emacs 19 format for now.
7520
7521 Local Variables:
7522 add-log-time-format: current-time-string
7523 End: