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