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