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