]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Don't assume a SUBREG can not conflict with a MEM
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
bd6dd845
MS
1Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
2
3 * parse.y (left_curly): Avoid trying to use any fields of
4 error_mark_node, as there aren't any.
5
6Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
7
8 * lex.c (do_identifier): Avoid breaking on overloaded methods
9 as default arguments.
10
11Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
12
13 * call.c (add_template_candidate): Initialize the variable "dummy".
14
15Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
16
17 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
18 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19
20Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
21
22 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
23 (debug_binfo): Delete decl, not needed.
24
25 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
26 promotes_to_aggr_type): Delete fns.
27 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
28 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
29 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
30
31 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
32
33 * friend.c (is_friend_type): Delete fn.
34 * cp-tree.h (is_friend_type): Delete decl.
35
36 * decl.c (original_result_rtx, double_ftype_double,
37 double_ftype_double_double, int_ftype_int, long_ftype_long,
38 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
39 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
40
41 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
42 fwd decls.
43 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
44
45 * decl.c (pushdecl_nonclass_level): #if 0, unused.
46 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
47
48 * lex.c (reinit_lang_specific): #if 0, unused.
49 * cp-tree.h (reinit_lang_specific): #if 0 decl.
50
51 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
52 * cp-tree.h (revert_static_member_fn): Delete decl.
53
54 * class.c (root_lang_context_p): Delete fn.
55 * cp-tree.h (root_lang_context_p): Delete decl.
56
57 * decl.c (set_current_level_tags_transparency): #if 0, unused.
58 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
59
60 * lex.c (set_vardecl_interface_info): Make static.
61 * cp-tree.h (set_vardecl_interface_info): Delete decl.
62
63 * call.c (find_scoped_type): Make static.
64 * cp-tree.h (find_scoped_type): Delete decl.
65
66 * search.c (convert_pointer_to_vbase): Make static.
67 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
68
69 * decl.c (const_ptr_type_node): Likewise.
70 * cp-tree.h (const_ptr_type_node): Delete decl.
71
72 * typeck.c (common_base_type): Make static.
73 * cp-tree.h (common_base_types): Delete erroneous decl.
74
75 * pt.c (classtype_mangled_name): Make static.
76 * cp-tree.h (classtype_mangled_name): Delete decl.
77
78 * lex.c (check_newline): Make static.
79 * cp-tree.h (check_newline): Delete decl.
80
81 * typeck.c (build_x_array_ref): Delete fn, same idea as
82 grok_array_decl.
83 * cp-tree.h (build_x_array_ref): Delete decl.
84
85 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
86 copy_lang_decl.
87 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
88
89 * class.c (build_vtable_entry): Make static.
90 * cp-tree.h (build_vtable_entry): Delete decl.
91
92 * class.c (build_vbase_pointer): Make static.
93 * cp-tree.h (build_vbase_pointer): Delete decl.
94
95 * sig.c (build_sptr_ref): Add forward decl and make static.
96 * cp-tree.h (build_sptr_ref): Delete decl.
97
98 * call.c (build_new_method_call): Add forward decl and make static.
99 * cp-tree.h (build_new_method_call): Delete decl.
100
101 * call.c (build_object_call): Make static.
102 * class.c (check_for_override, complete_type_p, mark_overriders):
103 Likewise.
104 * decl.c (cp_function_chain): Likewise.
105 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
106 Likewise.
107 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
108 Likewise.
109 * tree.c (build_cplus_array_type_1): Likewise.
110 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
111 (comp_target_parms): Likewise.
112
113 * init.c (build_builtin_call): Make static.
114 * cp-tree.h (build_builtin_call): Delete decl.
115
116 * typeck.c (binary_op_error): Delete decl.
117 * cp-tree.h (binary_op_error): Likewise.
118
119Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
120
121 * call.c (build_method_call): Compare against error_mark_node
122 directly, rather than the ERROR_MARK tree code.
123 * cvt.c (cp_convert): Likewise.
124 * decl.c (print_binding_level): Likewise.
125 (duplicate_decls): Likewise.
126 (grokdeclarator): Likewise.
127 (grokdeclarator): Likewise.
128 * init.c (expand_aggr_init_1): Likewise.
129 (decl_constant_value): Likewise.
130 * method.c (build_opfncall): Likewise.
131 (hack_identifier): Likewise.
132 * typeck.c (build_modify_expr): Likewise.
133
134 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
135
136Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
137
138 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
139
140 * pt.c (coerce_template_parms): Add new error message.
141
142 * method.c (build_overload_value): Implement name mangling for
143 floating-point template arguments.
144
145 * method.c (build_overload_int, icat, dicat): Fix mangling of template
146 arguments whose absolute value doesn't fit in a signed word.
147
148Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
149
150 * friend.c: New file; put all of the friend stuff in here.
151 * init.c: Instead of here.
152 * Makefile.in (CXX_OBJS): Add friend.o.
153 (friend.o): Add dependencies.
154 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
155
156Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
157
158 * call.c (build_scoped_method_call): Complain if the scope isn't a
159 base.
160
161Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
162
163 * parse.y (left_curly): Don't crash on erroneous type.
164
165 * init.c (build_delete): Fix type of ref.
166
167Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
168
169 * search.c (get_vbase_1): Renamed from get_vbase.
170 (get_vbase): Wrapper, now non-static.
171 (convert_pointer_to_vbase): Now static.
172
173 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
174 * init.c (build_delete): Pass one.
175 (build_partial_cleanup_for): Use build_scoped_method_call.
176 * decl.c (finish_function): Pass a binfo.
177
178Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
179
180 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
181
182 * typeck.c (build_c_cast): Lose other reference to flag.
183
184 * call.c (build_field_call): Don't look for [cd]tor_identifier.
185 * decl2.c (delete_sanity): Remove meaningless use of
186 LOOKUP_HAS_IN_CHARGE.
187 * decl.c (finish_function): Use build_scoped_method_call instead
188 of build_delete for running vbase dtors.
189 * init.c (build_delete): Call overload resolution code instead of
190 duplicating it badly.
191
2ba25f50
MS
192Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
193
194 * call.c (build_over_call): Call mark_used before trying to elide
195 the call.
196
197 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
198
199Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
200
201 * typeck.c (build_modify_expr): Always pedwarn for a cast to
202 non-reference used as an lvalue.
203
204Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
205
206 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
207
208Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
209
210 * parse.y (handler): Fix template typo.
211
212Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
213
214 * error.c (lang_decl_name): New fn.
215 * tree.c (lang_printable_name): Use it.
216
217Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
218
219 * g++spec.c: Include config.h so that we can catch bzero #defines
220 from the config file.
221
e9f32eb5
MS
222Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
223
224 * new1.cc: Include a declaration for malloc, to avoid warning, and
225 avoid lossing on systems that require one (ones that define malloc
226 in xm.h).
227
228Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
229
230 * decl2.c (max_tinst_depth): New variable.
231 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
232 option.
233 * pt.c (max_tinst_depth): Variable moved.
234 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
235 as legal.
236
237Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
238
239 * decl.c (xref_basetypes): Allow a base class that depends on
240 template parms to be incomplete.
241
242 * decl2.c (build_expr_from_tree): Support typeid(type).
243 * rtti.c (get_typeid): Support templates.
244 (expand_si_desc, expand_class_desc): Fix string length.
245 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
246
312e7d50
JM
247Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
248
249 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
250
251 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
252
253Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
254
255 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
256 smashes together template and non-template decls of the same
257 signature.
258
824b9a4c
MS
259Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
260
824b9a4c
MS
261 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
262
263Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
264
265 * decl.c (duplicate_decls): Next route, pedwarn about different
266 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
267
268Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
269
270 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
271 (struct lang_type): Delete has_default_implementation member.
272 Increase dummy to 21.
273 * decl.c (start_method): Delete usage.
274
275 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
276 store_after_parms, start_decl_1, auto_function): Add decls.
277 (get_arglist_len_in_bytes, declare_implicit_exception,
278 have_exceptions_p, make_type_decl, typedecl_for_tag,
279 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
280 build_component_type_expr, cplus_exception_name,
281 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
282 * call.c (build_this): Make static.
283 (is_complete): Likewise.
284 (implicit_conversion): Likewise.
285 (reference_binding): Likewise.
286 (standard_conversion): Likewise.
287 (strip_top_quals): Likewise.
288 (non_reference): Likewise.
289 (build_conv): Likewise.
290 (user_harshness): Likewise.
291 (rank_for_ideal): Likewise.
292 * decl.c (start_decl_1): Delete forward decl.
293 (push_decl_level): Make static.
294 (resume_binding_level): Make static.
295 (namespace_bindings_p): Make static.
296 (declare_namespace_level): Make static.
297 (lookup_name_real): Make static.
298 (duplicate_decls): Make static. Take register off NEWDECL and
299 OLDDECL parm decls.
300 * decl2.c (get_sentry): Make static.
301 (temp_name_p): Delete fn.
302 * except.c (auto_function): Delete decl.
303 * lex.c (handle_{cp,sysv}_pragma): Make static.
304 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
305 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
306 * pt.c (tsubst_expr_values): Make static.
307 * rtti.c (combine_strings): Delete decl.
308
309Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
310
311 * pt.c (push_template_decl): Handle getting a typedef.
312
313 * call.c (build_new_function_call): Complain about void arg.
314
315Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
316
317 * decl.c (duplicate_decls): Give pedwarn of different exceptions
318 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
319
320Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
321
322 * except.c (expand_throw): Don't expand the cleanup tree here,
323 since we are not going to write the rtl out. Fixes problem with
324 -g -O on SPARC.
325
326Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
327
328 * Make-lang.in: Add $(exeext) as necessary.
329
330Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
331
332 * parse.y (handler_seq): Must have at least one catch clause.
333
334Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
335
336 * call.c (add_builtin_candidate): Restore ?: hack.
337
338 * decl.c (grok_op_properties): More warnings.
339
340Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
341
342 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
343 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
344
345 * decl.c (duplicate_decls): Scale back to a warning, and only do
346 'em if -pedantic.
347
348Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
349
350 * decl.c (duplicate_decls): pedwarn mismatched exception
351 specifications.
352
353Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
354
355 * call.c (build_new_method_call): Don't display the invisible
356 argument for controlling virtual bases.
357
358Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
359
360 * new: Add nothrow new and delete, bad_alloc and throw specifications
361 for delete.
362 * decl.c (init_decl_processing): Add throw specification for delete.
363 * new.cc (nothrow): Define.
364 * lex.c (real_yylex): Removing warning that throw and friends are
365 keywords.
366 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
367 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
368 * Make-lang.in: Add new{1,2}.{cc,o}.
369
370Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
371
372 * lex.c (cons_up_default_function): Fix return type of synth op=.
373
374 * init.c (emit_base_init): Add warnings for uninitialized members
375 and bases.
376
377 * decl.c (xref_basetypes): Add warning for non-polymorphic type
378 with destructor used as base type.
379
380 * decl.c (grok_op_properties): Add warning for op= returning void.
381 * typeck.c (c_expand_return): Add warning for op= returning anything
382 other than *this.
383
384 * class.c (finish_struct_1): Add warning for class with pointers
385 but not copy ctor or copy op=.
386
387 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
388 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
389 (instantiate_template): If -fexternal-templates, add this
390 instantiation to pending_templates.
391
392 * decl2.c (copy_assignment_arg_p): Disable old hack to support
393 Booch components.
394
395Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
396
397 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
398
de22184b
MS
399Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
400
401 * call.c (standard_conversion): Handle getting references. Tack
402 on RVALUE_CONV here. Do it for non-class types, too.
403 (reference_binding): Pass references to standard_conversion.
404 (implicit_conversion): Likewise.
405 (add_builtin_candidate): Disable one ?: kludge.
406 (convert_like): Handle RVALUE_CONVs for non-class types.
407 (joust): Disable the other ?: kludge.
408
409Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
410
411 * decl.c (init_decl_processing): Add code to build up common
412 function types beforehand, to avoid creation then removal of
413 things already in the hash table.
414
415Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
416
417 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
418 the arguments.
419
420 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
421 current_template_parms.
422
423Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
424
425 * search.c (lookup_field): Don't return a function, check want_type.
426
427Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
428
429 * init.c (build_new): Make sure PLACEMENT has a type.
430
431Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
432
433 * init.c (build_new): Support new (nothrow).
434
435Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
436
437 * pt.c (instantiate_decl): Also do push_to_top_level before setting
438 up DECL_INITIAL.
439
440 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
441 * pt.c (tsubst): Defer instantiation of default args.
442 * call.c (build_over_call): Until here.
443
444Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
445
446 * search.c (lookup_field): Make sure we have an
447 IDENTIFIER_CLASS_VALUE before we try to return it.
448
449Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
450
451 * call.c (build_method_call): Delete unused var PARM.
452 (build_overload_call_real): Likewise.
453 (build_object_call): Delete unused var P.
454 (build_new_op): Likewise.
455 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
456 var definitions, which are never used.
457 (shadow_tag): Delete unused var FN.
458 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
459 * init.c (build_new): Delete unused var ALLOC_TEMP.
460 * method.c (hack_identifier): Delete unused var CONTEXT.
461 (do_build_copy_constructor): Delete unused var NAME.
462 (synthesize_method): Delete unused var BASE.
463 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
464 * rtti.c (build_headof): Delete unused var VPTR.
465 (get_typeid): Delete unused var T.
466 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
467 and ORIG_OP2.
468 (build_ptrmemfunc): Delete unused vars U and NINDEX.
469 * typeck2.c (build_functional_cast): Delete unused var BINFO.
470
471Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
472
473 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
474 things in a type being defined.
475 * decl.c (finish_enum): Reverse the values so that they are in
476 the correct order.
477
478 * pt.c (instantiate_class_template): Don't initialize
479 BINFO_BASETYPES until the vector is filled out.
480 (unify): Don't abort on conflicting bindings, just fail.
481 (instantiate_decl): Do push_tinst_level before any tsubsting.
482
483 * method.c (build_overload_value): Handle getting a
484 TEMPLATE_CONST_PARM for a pointer.
485
486Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
487
488 * init.c (expand_member_init): Don't give 'not a base' error for
489 templates.
490
491 * pt.c (instantiate_decl): Call import_export_decl later.
492
493 * pt.c (instantiate_class_template): Return a value.
494
495 * parse.y (extension): New rule for __extension__.
496 (extdef, unary_expr, decl, component_decl): Use it.
497
498Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
499
500 * class.c (base_binfo): Remove unused base_has_virtual member.
501 (finish_base_struct): Likewise.
502 (finish_struct_1): Likewise.
503
504Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
505
506 * search.c (expand_upcast_fixups): Fix bogus code generation
507 problem where the generated code uses the wrong index into the
508 runtime built vtable on the stack. Old code could clobber random
509 stack values.
510
511Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
512
513 * init.c (perform_member_init): Make sure the partial EH cleanups
514 live on the function_obstack.
515
f7da6097
MS
516Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
517
518 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
519 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
520
521Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
522
523 * decl.c (grokvardecl): Avoid ANSI style initialization.
524
525Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
526
527 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
528
529Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
530
531 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
532
1bf2b2d2
BK
533Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
534
535 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
536 arguments we compare against. Start the count of I at 1, not 0,
537 since argv[0] is still the command.
538
f7da6097
MS
539Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
540
541 * lang-specs.h: Accept .cp as an C++ extension.
542
d2e5ee5c
MS
543Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
544
545 * cp-tree.h (ptr_reasonably_similar): Add decl.
546
547Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
548
549 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
550 pointer. New local SPECBITS with the parm's value.
551 (grokdeclarator): Pass &specbits down.
552
553 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
554 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
555
556 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
557 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
558
559 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
560 not an error_mark_node.
561
562Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
563
564 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
565 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
566
567Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
568
569 * decl.c (grokdeclarator): When giving an anonymous struct a name,
570 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
571 not affected).
572
573 * typeck2.c (build_m_component_ref): If component is a pointer
574 to data member, resolve the OFFSET_REF now.
575
576 * call.c (convert_like): Don't go into infinite recursion.
577
578 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
579
580 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
581 * tree.c (layout_basetypes): And on the vbase ptr.
582
583Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
584
585 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
586 CHAR_TYPE_SIZE so bool is always the same size as another type.
587
588 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
589
590Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
591
592 * decl2.c (grok_x_components): Remove synthesized methods from
593 TYPE_METHODS of an anonymous union, complain about member
594 functions.
595 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
596 anonymous unions.
597 (finish_function): Just clear the DECL_RTL of our arguments.
598
599Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
600
601 * decl2.c (finish_file): Emit DWARF debugging info for static data
602 members.
603
604 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
605
606Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
607
608 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
609 IDENTIFIER_NODE.
610
611Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
612
613 * Make-lang.in (g++-cross$(exeext)): Fix typo.
614
615Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
616
617 Make the g++ driver now be a standalone program, rather than one
618 that tries to run the gcc driver after munging up the options.
619 * Make-lang.in (g++.c, g++spec.o): New rules.
620 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
621 added.
622 (g++$(exeext)): New rule, based on xgcc rule.
623 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
624 * g++spec.c: New file.
625 * g++.c: Removed file.
626
627Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
628
629 * cvt.c (build_up_reference): Arrange for any temporary values
630 that have been keep in registers until now to be put into memory.
631
faf5394a 632Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9a3b49ac 633
faf5394a
MS
634 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
635 that make -j3 bootstrap works better.
9a3b49ac 636
faf5394a
MS
637Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
638
639 * decl.c (pushtag): Do pushdecl for anon tags.
640
641Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
642
643 * typeck.c (c_expand_return): Fix logic.
644 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
645
faf5394a
MS
646Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
647
648 * g++.c (main): Make sure arglist has a final NULL entry. Add
649 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
650 stdin/stdout of the invoked program are redirected to
651 nowheresville.
652
653Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
654
655 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
656
657Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
658
659 * init.c (resolve_offset_ref): Handle obj.vfn better.
660 * typeck.c (build_component_ref): Set TREE_TYPE on result from
661 build_vfn_ref.
662
663Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
664
665 * typeck.c (convert_for_assignment): Also handle anachronistic
666 implicit conversions from (::*)() to cv void*.
667 * cvt.c (cp_convert_to_pointer): Likewise.
668
669Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
670
671 * lex.c (handle_cp_pragma): Fix bogus warning.
672
673Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
674
675 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
676 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
677
678Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
679
680 * class.c (finish_struct_1): Support DWARF2_DEBUG.
681 * search.c (dfs_debug_mark): Likewise.
682 * decl2.c (finish_vtable_vardecl): Likewise.
683 * decl.c (pushtag, finish_enum): Likewise.
684 * lex.c (check_newline): Use debug_* instead of calling *out
685 functions directly.
686
687Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
688
689 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
690 on some picky hosts.
691
692Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
693
694 * class.c (finish_struct_1): A class has a non-trivial copy
695 constructor if it has virtual functions.
696
697 * cvt.c (cp_convert): Always call a constructor.
698
699 * call.c (reference_binding): Still tack on a REF_BIND
700 for bad conversions.
701 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
702
703 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
704 (c_expand_return): Likewise.
705 * typeck2.c (digest_init): Likewise for { }.
706 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
707 * cvt.c (cp_convert): Handle failure better.
708
709Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
710
711 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
712 of GCC be path-relative.
713
714Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
715
716 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
717 it does need choose-temp.o and pexecute.o.
718
719Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
720
721 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
722 that we still use it.
723 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
724
725Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
726
727 * init.c (expand_default_init): Avoid calling constructors to
728 initialize reference temps.
729
730 * cvt.c (convert_to_reference): Fix.
731
732Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
733
734 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
735 (convert_to_reference): Likewise.
736 * typeck.c (convert_for_initialization): Likewise.
737 * init.c (expand_default_init): Likewise.
738 (expand_aggr_init_1): Likewise.
739 * cp-tree.h (CONV_NONCONVERTING): Lose.
740 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
741 * *.c: Adjust.
742 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
743
744Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
745
746 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
747
748Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
749
750 * init.c (expand_aggr_init_1): Don't crash on non-constructor
751 TARGET_EXPR.
752
753Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
754
755 * g++.c: Include gansidecl.h.
756 (VPROTO, PVPROTO, VA_START): Delete.
757 (choose_temp_base_try, choose_temp_base, perror_exec,
758 run_dos) [__MSDOS__]: Delete fns.
759 (pfatal_with_name): Delete fn.
760 (temp_filename): Declare like in gcc.c.
761 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
762 (error_count, signal_count): Define.
763 (error): Delete both definitions.
764 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
765 (pfatal_pexecute): Add fn from gcc.c.
766 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
767 code to use the pexecute stuff also used by gcc.c.
768 (MIN_FATAL_STATUS): Define.
769 * Make-lang.in (g++): Add dependency on and linking with
770 choose-temp.o and pexecute.o.
771
772 * cp-tree.h: Include gansidecl.h.
773 (STDIO_PROTO): Delete #undef/#define.
774 * cvt.c (NULL): Delete #undef/#define.
775 * expr.c (NULL): Likewise.
776 * init.c (NULL): Likewise.
777 * rtti.c (NULL): Likewise.
778 * xref.c (NULL): Likewise.
779
780 * cp-tree.h (build_user_type_conversion): Add prototype.
781 * call.c (build_user_type_conversion): Delete prototype. Correct
782 decl of FLAGS arg to be an int.
783 * cvt.c (build_user_type_conversion): Likewise.
784
785Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
786
787 * cp-tree.def: Add TRY_BLOCK and HANDLER.
788 * except.c (expand_start_catch_block): Support templates.
789 * parse.y (try_block, handler_seq): Likewise.
790 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9a3b49ac
MS
791
792Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
793
794 * pt.c (current_template_args): New fn.
795 (push_template_decl): Use it.
796 * decl.c (grokdeclarator): Use it.
797
798 * decl2.c (build_expr_from_tree): Dereference ref vars.
799
800 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
801 the decl-specifier-seq.
802
803 * decl.c (grok_op_properties): Don't force the type of a conversion
804 op to be complete. Don't warn about converting to the same type
805 for template instantiations.
806
807 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
808 methods.
809
810Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
811
812 * typeck.c (get_delta_difference): Remove previous bogusness.
813 Don't give errors if force is set.
814
815Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
816
817 * decl2.c (finish_file): Don't emit debug info.
d2e5ee5c 818 * decl.c (pushdecl): Lose obsolete code.
9a3b49ac 819 (grokdeclarator): Still do the long long thing after complaining.
d2e5ee5c
MS
820 * search.c (note_debug_info_needed): Don't do anything if we're in a
821 template.
9a3b49ac
MS
822 * method.c (synthesize_method): For non-local classes,
823 push_to_top_level first.
824
825Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
826
827 * typeck.c (get_delta_difference): Add no_error parameter.
828 (build_ptrmemfunc): Call get_delta_difference with no_error set;
829 we don't want error messages when converting unrelated
830 pointer-to-member functions.
831
832Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
833
834 * error.c (dump_expr): Improve the wording on error messages that
835 involve pointer to member functions.
836
837Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
838
839 * cvt.c (cp_convert_to_pointer): Move code for conversions from
840 (::*)() to void* or (*)() up a bit, so that we can convert from
841 METHOD_TYPEs as well.
842
843Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
844
845 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
846 There are no 'member' types.
847 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
848 (build_x_typeid): Handle errors.
849
850Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
851
852 * typeck.c (convert_for_assignment): Handle anachronistic implicit
853 conversions from (::*)() to void* or (*)().
854 * cvt.c (cp_convert_to_pointer): Likewise.
855 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
856 conversions from here.
857 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
858 * lang-options.h: Likewise.
859 * decl2.c (warn_pmf2ptr): Define.
860 * cp-tree.h: Declare it.
861 * typeck2.c (digest_init): Allow pmfs down into
862 convert_for_initialization.
863
864Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
865
866 * typeck.c (c_expand_return): Fix for returning overloaded fn.
867
868Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
869
870 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
871 * decl.c (grok_reference_init): Pass DIRECT_BIND.
872 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
873 DIRECT_BIND.
874 * call.c (convert_like): Don't pass INDIRECT_BIND.
875 * typeck.c (convert_arguments): Likewise.
876 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
877
878Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
879
880 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
881 similar code in build_up_ref.
882 * cvt.c (build_up_reference): Drastically simplify.
883
691c003d
MS
884Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
885
886 * typeck.c (signed_or_unsigned_type): If the given type already
887 as the correct signedness, then just return it.
888
889 * typeck.c ({un,}signed_type): If can't do anything, call
890 signed_or_unsigned_type.
891
892Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
893
894 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
895 current_class_type is NULL.
896
897Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
898
899 * class.c (finish_struct_1): Avoid empty structs by adding a field
900 so layout_type gets the mode right.
901
902 * typeck.c (c_expand_return): Drastically simplify.
903
904Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
905
906 * typeck.c (decay_conversion): Handle overloaded methods.
907
908Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
909
910 * call.c (build_over_call): A TARGET_EXPR has side-effects.
911
f49422da
MS
912Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
913
914 * cvt.c (convert_to_pointer_force): Add code to support pointer to
915 member function to pointer to function conversions.
916 * init.c (resolve_offset_ref): Add code to allow faked up objects,
917 ignoring them if they are not used, and giving an error, if they
918 are needed.
919 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
920 code, and so that we can give an error, if we needed an object,
921 and one was not provided.
922 (build_c_cast): Don't call default_conversion when we want to
923 convert to pointer to function from a METHOD_TYPE.
924
925Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
926
927 * Make-lang.in (cplib2.ready): Fix logic.
928
929 * decl.c (shadow_tag): Only complain about non-artificial function
930 members.
931
932 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
933
934Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
935
936 * expr.c (cplus_expand_expr): Pre-tweak call_target like
937 expand_inline_function would.
938
939 * pt.c (mark_decl_instantiated): If extern_p, call
940 mark_inline_for_output.
941
3d4683cb
MS
942Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
943
944 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
945 pmd conversions.
946
947 * typeck.c (get_delta_difference): Fix wording, as we can be used
948 for pointer to data members.
949
950Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
951
952 * pt.c (tsubst): If the function decl isn't a member of this
953 template, return a copy of the decl (including copying the
954 lang-specific part) so we don't hose ourselves later.
955
956Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
957
958 * class.c (finish_struct): Remove DWARF-specific tag handling.
959 * decl.c (pushtag): Likewise.
960 (finish_function): Always clear DECL_ARGUMENTS on function decls with
961 no saved RTX.
962 * decl2.c (finish_file): Emit DWARF debugging info for static data
963 members.
964
965Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
966
967 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
968 isn't the same as the new one before we whack it.
969
970Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
971
972 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
973 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
974 warn_traditional and warn_strict_prototypes; remove ancient
975 'overload' code; remove references to flag_traditional.
976
5156628f
MS
977Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
978
979 * input.c (sub_getch): Handle 8-bit characters in string literals.
980
981Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
982
983 * tree.c (mapcar): Handle CONSTRUCTORs.
984 (copy_to_permanent): Handle expression_obstack properly.
985
986 * Make-lang.in (cplib2.txt): Also depend on the headers.
987
988 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
989 INT_TYPE_SIZE.
990 (expand_class_desc): Use USItype for offset field.
991 * tinfo.h (struct __class_type_info): Likewise.
992
993 * method.c (build_overload_int): TYPE_PRECISION should be applied
994 to types.
995
996Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
997
998 * call.c (build_new_op): A COND_EXPR involving void must be a
999 builtin.
1000
1001Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1002
1003 * typeck.c (build_x_component_ref): New fn.
1004 (build_object_ref): Use it.
1005 * parse.y (primary): Use it.
1006 * decl2.c (build_expr_from_tree): Use it.
1007 * cp-tree.h: Declare it.
1008
1009 * decl.c (start_decl): variable-sized arrays cannot be initialized.
1010 * error.c (dump_type_suffix): Handle variable arrays.
1011
1012Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1013
1014 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
1015
1016Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1017
1018 * decl.c (lookup_name_real): Don't try to look up anything in a
1019 TYPENAME_TYPE.
1020
1021 * tinfo2.cc (__throw_type_match_rtti): Oops.
1022
1023Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1024
1025 * Make-lang.in (exception.o): Use -fno-PIC for now.
1026
1027Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1028
1029 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
1030 calling them.
1031 (get_tinfo_fn_dynamic): Extracted from build_typeid.
1032 * tinfo2.cc (__dynamic_cast): Adjust.
1033
1034 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
1035 (build_x_typeid): Likewise.
1036
1037 * parse.y: Call build_x_typeid instead of build_typeid.
1038 * cp-tree.def: Add TYPEID_EXPR.
1039 * pt.c (tsubst_copy): Handle typeid.
1040 * decl2.c (build_expr_from_tree): Likewise.
1041 * rtti.c (build_x_typeid): Throw bad_typeid from here.
1042 (build_typeid): Not here.
1043 * cp-tree.h: Declare build_x_typeid.
1044
1045Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
1046
1047 * call.c (convert_like): Pull out constant values.
1048
1049 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
1050
1051Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1052
1053 * decl.c (init_decl_processing): Create short int types before
1054 creating size_t in case a machine description needs to use
1055 unsigned short for size_t.
1056
1057Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
1058
1059 * Make-lang.in (exception.o): Turn off pic.
1060
1061 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
1062 type, multi-level ptr conversions.
1063
1064 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
1065 (throw_bad_cast): Use it.
1066 (throw_bad_typeid): New fn.
1067 (build_typeid): Throw bad_typeid as needed.
1068 Use build_call.
1069 (synthesize_tinfo_fn): Handle functions and arrays before checking
1070 for cv-quals.
1071
1072 * Remove .h from standard C++ headers, add new.h, move into inc
1073 subdirectory.
1074
1075 * exception*: Remove pointer from object, constructors. Add
1076 default exception::what that uses type_info::name. Add
1077 __throw_bad_typeid.
1078
1079 * init.c (build_new): Don't add a cookie to new (void *) T[2].
1080
1081Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
1082
1083 * Make-lang.in: Building C++ code depends on cc1plus.
1084
1085Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1086
1087 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
1088 a HOST_WIDE_INT, not a tree.
1089
1090Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
1091
1092 * exception.cc: Don't include <stdlib.h>.
1093
1094 * Make-lang.in (c++.clean): Remove cplib2.*.
1095
1096Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
1097
1098 * parse.y (component_decl_1, component_costructor_declarator case):
1099 Pass attributes/prefix_attributes in tree list.
1100
1101Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
1102
1103 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
1104
1105Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1106
1107 * lex.c (do_identifier): Don't do deferred lookup in a template
1108 header.
1109
1110 * typeck2.c (store_init_value): Oops.
1111
1112 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
1113 New files for C++ lang-support library.
1114 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
1115 (CXX_LIB2FUNCS): Define.
1116 And rules for building the C++ lang-support code.
1117 * config-lang.in (headers): Define.
1118 (lib2funcs): Define.
1119
1120Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1121
1122 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
1123 digest_init.
1124 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
1125 * typeck2.c (store_init_value): Check for initializing pmf with { }
1126 here.
1127 (process_init_constructor): Not here.
1128
1129Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1130
1131 * pt.c (begin_template_parm_list): Increment
1132 processing_template_decl here.
1133 (end_template_parm_list): Not here.
1134 (process_template_parm): No need to add 1 to it now.
1135 * *.c: Use processing_template_decl instead of current_template_parms
1136 to check for being in a template.
1137
1138 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
1139 (tsubst_copy): Handle CONSTRUCTOR.
1140 (instantiate_decl): Set up context properly for variables.
1141 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
1142 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
1143
1144Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1145
1146 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
1147
7fcdf4c2
MS
1148Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1149
1150 * method.c (make_thunk): Call comdat_linkage before setting the
1151 TREE_CODE.
1152
1153 * decl2.c (comdat_linkage): Use make_decl_one_only.
1154 (import_export_decl): Likewise.
1155 * decl.c (init_decl_processing): Check supports_one_only instead of
1156 SUPPORTS_WEAK.
1157
1158Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1159
1160 * decl2.c (grokfield): Tighten checking for access decls.
1161
1162 * decl.c (make_typename_type): Resolve references to
1163 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
1164 (lookup_name_real): Types that depend on a template parameter get
1165 an implicit 'typename' unless they're in the current scope.
1166 (start_decl_1): We don't care about incomplete types that depend
1167 on a template parm.
1168 (grokdeclarator): Resolve 'typename's in the type specifier that
1169 refer to members of the current scope.
1170
1171 * call.c (build_over_call): Remove 'inline called before
1172 definition' diagnostic.
1173 (build_method_call): Likewise.
1174 * decl.c (duplicate_decls): Downgrade 'used before declared
1175 inline' to a warning, only with -Winline.
1176
1177Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
1178
1179 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
1180
c11b6f21
MS
1181Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1182
1183 * call.c (build_method_call): When calling a signature
1184 default implementation, as in other cases, let instance_ptr simply
1185 be instance.
1186
1187Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
1188
1189 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
1190
1191Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
1192
1193 * except.c (expand_start_catch_block): Add a pushlevel so that -g
1194 works on hppa and SPARC.
1195
1196Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1197
1198 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
1199
1200Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1201
1202 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
1203 before testing whether it's a signature.
1204
1205Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
1206
1207 * call.c (build_new_method_call): Don't complain about signature
1208 pointers and references not being an aggr type.
1209 (build_this): If a signature pointer or reference was passed in,
1210 just return it.
1211 (build_new_method_call): If instance is a signature pointer, set
1212 basetype to the signature type of instance.
1213 * sig.c (build_signature_method_call): Deleted basetype and
1214 instance parameters, they can be found as the DECL_CONTEXT of
1215 function and as the first argument passed in.
1216 * cp-tree.h: Changed declaration of build_signature_method_call.
1217 * call.c (build_method_call): Deleted first two arguments in call
1218 of build_signature_method_call.
1219 (build_over_call): Added call to build_signature_method_call.
1220
1221Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1222
1223 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
1224 target_expr.
1225
1226Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1227
1228 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
1229
9ffa2541
BM
1230Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
1231
1232 * except.c (expand_start_try_stmts): Move to except.c in the backend.
1233 (expand_end_try_stmts): Remove.
1234
1235 * init.c (perform_member_init): Use add_partial_entry () instead
1236 of directly manipulating lists.
1237 (emit_base_init): Ditto.
1238
c11b6f21
MS
1239Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
1240
1241 * except.c (expand_exception_blocks): Always make sure USE and
1242 CLOBBER insns that came at the end still do, the backend relies
1243 upon this.
1244
1245Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
1246
1247 * call.c (build_over_call): We can only use a TARGET_EXPR of the
1248 right type.
1249
1250Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1251
1252 * cvt.c (convert_to_reference): Revert last change, don't complain
1253 about temp without target decl.
1254
1255Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
1256
1257 * decl.c (grokdeclarator): Don't core dump when void() is given.
1258
1259Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
1260
1261 * decl.c (copy_args_p): Don't crash.
1262
1263Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
1264
1265 * pt.c (tsubst): And support template args inside the exception
1266 specification.
1267
1268 * pt.c (tsubst): Add support for exception specifications in
1269 template functions.
1270
1271Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
1272
1273 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
1274 fields now.
1275 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
1276 (start_function): Likewise.
1277 (start_method): Likewise.
1278 (grokfield): Likewise.
1279 (make_call_declarator): Add throw spec parameter.
1280 (set_quals_and_spec): Add routine.
1281 * lex.c (set_quals_and_spec): Likewise.
1282 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
1283 * decl.c (shadow_tag): Eliminate the throw spec parameter to
1284 grokdeclarator.
1285 (groktypename): Likewise.
1286 (start_decl): Eliminate the throw spec parameter. Eliminate the
1287 throw spec parameter to grokdeclarator. Eliminate the throw spec
1288 field in DECL_STMT.
1289 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
1290 (grokfndecl): Remove useless set of raises.
1291 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
1292 the throw spec parameter to start_decl. Pull the throw spec out
1293 of the call declarator.
1294 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
1295 (start_function): Eliminate the throw spec parameter. Eliminate
1296 the throw spec parameter to grokdeclarator.
1297 (start_method): Likewise.
1298 * decl2.c (grokfield): Likewise.
1299 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
1300 (grokoptypename): Likewise.
1301 (finish_file): Eliminate the throw spec parameter to
1302 start_function. Add throw spec to make_call_declarator.
1303 * except.c (init_exception_processing): Add throw spec to
1304 make_call_declarator. Eliminate the throw spec parameter to
1305 start_decl.
1306 (expand_start_catch_block): Eliminate the throw spec parameter to
1307 grokdeclarator.
1308 (expand_builtin_throw): Add throw spec to make_call_declarator.
1309 Eliminate the throw spec parameter to start_function.
1310 (start_anon_func): Likewise.
1311 * lex.c (make_call_declarator): Add throw spec parameter.
1312 (set_quals_and_spec): New routine.
1313 (cons_up_default_function): Add throw spec to make_call_declarator.
1314 Eliminate the throw spec parameter to grokfield.
1315 * method.c (synthesize_method): Eliminate the throw spec parameter
1316 to start_function.
1317 * pt.c (process_template_parm): Eliminate the throw spec parameter
1318 to grokdeclarator.
1319 (tsubst): Add throw spec to make_call_declarator.
1320 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
1321 (do_function_instantiation): Eliminate the throw spec parameter to
1322 grokdeclarator. Eliminate the throw spec parameter to
1323 start_function.
1324 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
1325 to start_function.
1326 * parse.y (datadef): Remove non-winning optimization.
1327 (decl): Likewise.
1328 (fndef): Remove ambiguous error productions uncovered by grammer
1329 fixing.
1330 (constructor_declarator): Add exception_specification_opt here.
1331 (component_constructor_declarator): Likewise.
1332 (direct_after_type_declarator): Likewise.
1333 (complex_direct_notype_declarator): Likewise.
1334 (direct_abstract_declarator): Likewise.
1335 (fn.def1): Remove exception_specification_opt.
1336 (fn.def2): Likewise.
1337 (condition): Likewise.
1338 (initdcl0): Likewise.
1339 (initdcl): Likewise.
1340 (notype_initdcl0): Likewise.
1341 (nomods_initdcl0): Likewise.
1342 (component_decl_1): Likewise.
1343 (component_declarator): Likewise.
1344 (after_type_component_declarator0): Likewise.
1345 (after_type_component_declarator): Likewise.
1346 (notype_component_declarator): Likewise.
1347
1348Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1349
1350 * call.c (build_over_call): Also use an INIT_EXPR when
1351 initializing anything from an rvalue.
1352
1353 * call.c (build_over_call): Call stabilize_reference when building
1354 an INIT_EXPR instead of calling the copy ctor.
1355
1356 * call.c (joust): Extend the previous change to all comparisons.
1357
1358 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
1359 NO_LINKAGE_HEURISTICS.
1360
1361 * decl2.c (finish_file): Emit any statics that weren't already.
1362
1363 * typeck.c (build_static_cast): Implement.
1364 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
1365 * decl.c (grokparms): Use can_convert_arg instead of
1366 implicit_conversion directly.
1367 (copy_args_p): New fn.
1368 * cvt.c (convert_to_reference): Don't complain about temp with
1369 static_cast.
1370 (build_up_reference): Handle TARGET_EXPRs.
1371 * call.c (build_over_call): Elide unnecessary temps.
1372 (can_convert*): Use new overloading code.
1373
1374Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
1375
1376 * call.c: Move TYPE_PTR*_MACROS ...
1377 * cp-tree.h: To here.
1378 * typeck.c (build_reinterpret_cast): Implement.
1379
1380 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
1381 ptr_complete_ob.
1382 (joust): If we're comparing a function to a builtin and the worst
1383 conversion for the builtin is worse than the worst conversion for the
1384 function, take the function.
1385
1386 * typeck.c (build_const_cast): Implement.
1387 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
1388 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
1389
1390Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
1391
1392 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
1393 too early. Make sure we explode if exprtype turns out to be a
1394 NULL_TREE when it shouldn't be.
1395
1396Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
1397
1398 * cp-tree.h: New routine make_call_declarator.
1399 * lex.c (make_call_declarator): Define it.
1400 * except.c (init_exception_processing): Use it.
1401 (expand_builtin_throw): Likewise.
1402 (start_anon_func): Likewise.
1403 * decl2.c (finish_file): Likewise.
1404 * lex.c (cons_up_default_function): Likewise.
1405 * parse.y: Likewise.
1406 * pt.c (tsubst): Likewise.
1407
1408Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
1409
1410 * decl2.c (groktypefield): Remove unused code.
1411
1412Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
1413
1414 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
1415 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
1416 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
1417 nonempty_cv_qualifiers.
1418 * hash.h: Rebuild.
1419
1420 * lex.c (make_pointer_declarator): Change type_quals into
1421 cv_qualifiers.
1422 (make_reference_declarator): Likewise.
1423
d11ad92e
MS
1424Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1425
1426 * decl.c (start_function): Only check interface_* for templates
1427 with flag_alt_external_templates.
1428
1429 * call.c (build_new_op): Check for comparison of different enum types.
1430 (build_over_call): Fix arg # output.
1431
1432 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
1433
1434Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
1435
1436 * call.c (build_new_op): Check for erroneous args.
1437
1438 * call.c (build_new_method_call): Add missing args to cp_error.
1439
1440 * tree.c (error_type): Dont print reference-to-array.
1441
1442 * typeck.c (convert_for_assignment): Don't say contravariance for
1443 removing const.
1444
1445Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
1446
1447 * call.c (build_over_call): Diagnose bad convs for `this'.
1448
1449 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
1450 on _ctor_arg.
1451
1452 * call.c (convert_like): Handle bad convs.
1453 (build_over_call): Handle bad convs better.
1454
1455 * decl2.c: -fansi-overloading is now the default.
1456
1457 * call.c (build_new_method_call): Check for erroneous args.
1458
1459 * pt.c (instantiate_class_template): Propagate
1460 TYPE_USES_MULTIPLE_INHERITANCE.
1461
1462Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
1463
1464 * call.c (enforce_access): Add static to routine.
1465
1466Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1467
1468 * call.c (build_user_type_conversion_1): Fix bad handling.
1469 (compare_ics): Likewise.
1470
1471Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1472
1473 * call.c (standard_conversion): Oops.
1474
1475Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
1476
1477 * g++.c: Update test for win32 (&& ! cygwin32).
1478
1479Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
1480
1481 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
1482 (ptr_reasonably_similar): New fn.
1483 * call.c (BAD_RANK): New rank.
1484 (ICS_BAD_FLAG): New macro.
1485 (standard_conversion): Handle almost-right pointer conversions.
1486 (reference_binding): Handle bad rvalue bindings.
1487 (add_*_candidate): Stuff.
1488 (build_over_call): Pass bad conversions to convert_for_initialization.
1489 (compare_ics): Handle bad convs.
1490 (joust): Likewise.
1491
1492Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
1493
1494 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
1495 integer_type_node when computing pointer offsets.
1496
1497Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
1498
1499 * tree.c (lvalue_type): New fn.
1500 (error_type): New fn.
1501 * call.c (op_error): Use error_type.
1502 (add_conv_candidate): Use lvalue_type.
1503 (add_builtin_candidates): Likewise.
1504 * error.c (args_as_string): Use error_type.
1505
1506Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1507
1508 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
1509 (tsubst): Not here.
1510
1511 * decl.c (init_decl_processing): With -ansi, __null's type is the
1512 signed integral type with the same number of bits as a pointer.
1513 Introduce a new variable null_node for it.
1514 * cp-tree.h: Adjust.
1515 * call.c (null_ptr_cst_p): Adjust.
1516
1517Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
1518
1519 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
1520 optimize.
1521
1522Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
1523
1524 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
1525 fns of classes without virtual functions.
1526
1527 * call.c (add_function_candidate): Handle `this' specially.
1528 (compare_ics): Likewise.
1529
1530Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
1531
1532 * typeck.c (build_conditional_expr): Fix handling of __null.
1533
1534 * decl2.c (comdat_linkage): New fn.
1535 (import_export_vtable): Use it.
1536 (import_export_decl): Use it.
1537 * method.c (make_thunk): Use it.
1538
73aad9b9
JM
1539Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1540
1541 * pt.c (end_template_decl): If we don't actually have parms, return.
1542 * parse.y (template_header): Accept 'template <>'.
1543
1544 * errfn.c: Allow 5 args.
1545
1546Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
1547
1548 * tree.c (make_temp_vec): New fn.
1549 * pt.c (push_template_decl): Handle partial specs.
d11ad92e 1550 (instantiate_class_template): Likewise.
73aad9b9
JM
1551 (more_specialized): Use get_bindings.
1552 (more_specialized_class): New fn.
1553 (get_class_bindings): New fn.
1554 (most_specialized_class): New fn.
1555 (do_function_instantiation): List candidates for ambiguous case.
1556 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
1557 (shadow_tag): Call push_template_decl for partial specializations.
d11ad92e 1558 * parse.y: Likewise.
73aad9b9
JM
1559 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
1560 DECL_TEMPLATE_MEMBERS.
1561 * call.c (print_z_candidates): Reduce duplication.
1562
1563Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1564
1565 * decl2.c (lang_decode_option): Allow -fansi-overloading.
1566
1567Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
1568
1569 * pt.c (get_bindings): New fn.
d11ad92e 1570 (most_specialized): Likewise.
73aad9b9
JM
1571 (do_function_instantiation): Use them.
1572 (add_maybe_template): New fn.
1573 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
1574 * call.c (build_new_op): Handle guiding decls.
d11ad92e
MS
1575 (build_new_function_call): Likewise.
1576 * decl2.c (finish_file): Likewise.
73aad9b9
JM
1577
1578 * decl2.c (mark_used): Do synthesis here.
1579 * call.c (build_method_call): Not here.
1580 (build_over_call): Or here.
1581 * typeck.c (build_function_call_real): Or here.
1582 * tree.c (bot_manip): Call mark_used on functions used in default
1583 args.
1584
2eee5e3a
MM
1585Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1586
1587 * decl2.c (import_export_vtable): Delete code that disabled vtable
1588 heuristic on systems with ASM_OUTPUT_EXTERNAL.
1589
c73964b2
MS
1590Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1591
1592 * typeck.c (build_x_function_call): Handle static call context
1593 better.
1594
1595 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
1596 the function, not its outer block.
1597
1598 * call.c (build_field_call): Pass fields on to build_opfncall
1599 regardless of TYPE_OVERLOADS_CALL_EXPR.
1600 (build_method_call): Pass on to build_new_method_call sooner.
1601
1602 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
1603 gives us.
1604 * class.c (instantiate_type): Don't put a POINTER_TYPE to
1605 METHOD_TYPE on an expression. Also make a copy of rhs instead of
1606 modifying it.
1607
1608Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
1609
1610 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
1611 (add_builtin_candidate): Don't take enums for ++.
1612 (build_new_method_call): Handle non-aggregates and field calls.
1613 Move new overloading code from...
1614 * cvt.c: Here.
1615
1616 * decl.c (grokparms): Don't check default args in templates.
1617
1618Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
1619
1620 * cvt.c (build_new_op): Fix args to build_unary_op.
1621 (add_builtin_candidates): Don't call type_promotes_to on float.
1622
1623 * decl.c (grokparms): Check the type of the default arg.
1624
1625 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
1626 returning NULL_TREE.
1627
1628 * typeck.c (build_x_binary_op): Avoid doing extra work.
d11ad92e
MS
1629 (build_x_unary_op): Likewise.
1630 (build_x_conditional_expr): Likewise.
c73964b2
MS
1631 * cvt.c (build_over_call): Return.
1632 (add_builtin_candidate): Fix MEMBER_REF.
d11ad92e 1633 (build_new_op): Likewise.
c73964b2
MS
1634
1635Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
1636
1637 * method.c (build_overload_name): Put bug fix into code but leave
1638 disabled for now so we can be bug compatible with older releases
1639 that do repeats incorrectly. In the future, we can enable it.
1640
1641Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
1642
1643 * cvt.c (convert_like): Don't call build_cplus_new twice.
1644
1645 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
1646 Control new overloading code with -fansi-overloading.
1647
1648Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
1649
1650 * cvt.c (build_over_call): Call build_cplus_new.
d11ad92e
MS
1651 * call.c (build_method_call): Likewise.
1652 * typeck.c (build_function_call_real): Likewise.
c73964b2
MS
1653 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
1654 the COND_EXPR in a TARGET_EXPR so they use the same slot.
1655
1656 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
1657 recursive calls.
1658 * typeck.c (complete_type): Propagate
1659 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
1660
1661Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
1662
1663 * cvt.c (joust): More ?: kludging. Sigh.
1664 (build_over_call): Don't try to synthesize global fns.
1665
1666 * search.c (lookup_conversions): Use binfo marking.
1667
1668Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
1669
1670 * search.c (build_mi_matrix): Use the correct value of cid
1671 when determining the new mi_size.
1672
1673Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
1674
1675 * cvt.c (add_builtin_candidates): Do consider type conversion ops
1676 for the first parms of += et al.
1677 (strip_top_quals): New fn.
1678 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
d11ad92e 1679 (implicit_conversion): Likewise.
c73964b2
MS
1680 (add_builtin_candidates): Be careful about arrays.
1681 (build_new_method_call): Handle vtable optimization.
1682
1683Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
1684
1685 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
1686 * cvt.c (reference_binding): Use it.
1687 (implicit_conversion): Use it.
1688 (add_builtin_candidate, COND_EXPR): Use it.
1689
1690 * cvt.c (build_new_function_call): Check for error args.
1691
1692 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
1693
1694 * gxx.gperf: Add __null.
1695 * hash.h: Regenerate.
1696 * lex.h: Add RID_NULL.
1697 * lex.c (init_lex): Create null_pointer_node here, stick it in
1698 RID_NULL.
1699 * decl.c (init_decl_processing): Still set its type here.
1700 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
d11ad92e 1701 (convert_to_pointer_force): Likewise.
c73964b2
MS
1702 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
1703 if (! pedantic).
1704 * call.c (convert_harshness): Use null_ptr_cst_p.
d11ad92e 1705 * typeck.c (convert_for_assignment): Likewise. Don't produce
c73964b2
MS
1706 null_pointer_node.
1707
1708 * error.c (args_as_string): Handle lists of actual args, too.
1709 * cvt.c (null_ptr_cst): Support (void*)0 for now.
1710 (build_user_type_conversion_1): Improve diagnostics.
1711 (build_new_function_call): Likewise.
1712 (build_object_call): Likewise.
1713 (build_new_method_call): Likewise. Move call before def diagnostic...
1714 (build_over_call): Here.
1715
1716 * cvt.c (build_new_method_call): Don't complain about no match if
1717 LOOKUP_SPECULATIVELY.
1718 (build_over_call): Fix 'this' for virtual fn.
1719 (build_new_method_call): Add diagnostic.
1720
1721Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
1722
1723 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
1724 constructors to be passed in.
1725 (build_over_call): Likewise.
1726 (build_user_type_conversion_1): Pass them in.
1727 (convert_like): Likewise.
1728 (build_object_call): Handle overloaded conversions.
1729 (build_over_call): Pass the right args to build_vfn_ref.
1730 (standard_conversion): Fix pmf convs.
1731 (joust): Handle comparing statics and non-statics.
1732 (build_new_method_call): New fn.
1733 * call.c (build_method_call): Call it if NEW_OVER.
1734
1735Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
1736
1737 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
1738 %D instead.
1739
1740Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
1741
1742 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
1743 instead of just maybe_build_cleanup so that we deallocate the
1744 thrown object.
1745
1746Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1747
1748 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
1749 * cp-tree.h (finish_prevtable_vardecl): Add decl.
1750
14548a19
MS
1751Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
1752
c73964b2
MS
1753 * pt.c (instantiate_class_template): Call complete_type. Also, if
1754 we're at the end of the file and we just instantiated a template
1755 class with a vtable, call finish_prevtable_vardecl.
1756
14548a19
MS
1757 * error.c (dump_decl): Don't explode (or explode more gracefully
1758 as appropriate) if the object being dumped has a null type.
d11ad92e 1759 (dump_expr): Likewise.
14548a19
MS
1760
1761 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
1762 by counting the number of nodes that we'll need before allocating
1763 the array.
1764 (lookup_fnfields): Fix comment.
1765 (breadth_first_search): Fix comment.
1766
1767Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
1768
1769 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
1770 TYPE_ALIGN.
1771 * class.c (finish_struct): Call cplus_decl_attributes here.
1772 (finish_struct_1): Not here.
1773 * cp-tree.h: Adjust.
1774
1775 * pt.c (type_unification): New parameter STRICT.
1776 (unify): If STRICT, don't allow cv addition or base deduction.
1777 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
1778
1779Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
1780
1781 * search.c (get_template_base{_recursive}): New fns.
1782 * pt.c (more_specialized): New fn.
1783 (do_function_instantiation): Use it.
1784 (unify): Handle base deduction.
1785 * cvt.c (joust): Use more_specialized.
1786 Don't arbitrarily choose between non-builtin candidates.
1787 (build_over_call): Call require_complete_type.
1788
1789 * decl.c (start_function): Statics are static even in a #pragma
1790 interface file.
1791
1792 * decl2.c (import_export_vtable): Disable vtable heuristic on
1793 systems with ASM_OUTPUT_EXTERNAL.
1794
1795 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
1796 (standard_conversion): No std conv to enum type.
1797
1798 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
1799 for ptm's.
1800
1801 * cvt.c (reference_binding): Bind directly to a base subobject of
1802 a class rvalue.
1803
1804 * cvt.c (build_new_op): Enforce access control.
1805
1806Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
1807
1808 * typeck2.c (process_init_constructor): When scanning the
1809 union for a named field, skip things that aren't FIELD_DECLs.
1810
1811 * method.c (synthesize_method): Don't scan fndecl's rtl if
1812 we're at the end of the file; just assume the function can't
1813 be inlined.
1814
1815Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1816
1817 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
1818 it failed.
1819
1820 * cvt.c (build_user_type_conversion_1): Handle overloaded
1821 conversion ops.
1822
1823 * cvt.c (add_builtin_candidates): Don't consider type conversion
1824 operators for the first parameter of operator=.
1825
1826Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
1827
1828 * typeck.c (complete_type): Only call layout_type if we're not
1829 expanding a template.
1830
1831Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
1832
1833 * cvt.c (compare_ics): Oops.
1834
1835 * cvt.c (op_error): Oops.
1836
1837 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
1838 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
1839 (build_conv): Use them.
1840 (implicit_conversion): Use them.
1841 (convert_like): Handle them.
1842 (build_new_op): Handle builtin COND_EXPR again.
1843 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
1844 in lists of types for COND_EXPR.
1845 (add_builtin_candidate): Add enum candidates for COND_EXPR.
1846
1847Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
1848
1849 * typeck.c (build_modify_expr): Always attempt to build a call to
1850 the assignment operator, even if we're using a default one.
1851 (convert_for_initialization): Call complete_type.
1852
1853Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1854
1855 * cvt.c (reference_binding): A REF_BIND gets the reference type.
1856 (implicit_conversion): Likewise.
1857 (convert_like): Likewise.
1858 (compare_ics): Likewise.
1859 (compare_qual): Likewise.
1860 (print_z_candidates): Handle no candidates.
1861 (build_new_op): Don't handle builtin COND_EXPR for now.
1862
1863Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
1864
1865 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
1866
1867Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
1868
1869 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
1870
1871 * cvt.c (build_builtin_candidate): Oops.
1872 (build_new_op): Oops.
1873
1874 * method.c (build_opfncall): Pass COND_EXPR on.
1875 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
1876 (add_builtin_candidate{,s}): Likewise.
1877 (add_builtin_candidates): Likewise.
1878 (print_z_candidates, op_error, build_new_op): Likewise.
1879 (type_decays_to): New fn.
1880 * lex.c (init_lex): Just say ?: for COND_EXPR.
1881
1882Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
1883
1884 * typeck.c (complete_type): Call layout_type rather than building
1885 a new array type.
1886
1887 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
1888 only use ptrdiff_t.
1889
1890Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
1891
1892 * cvt.c: Always compile the new overloading code (but don't use it).
1893 (implicit_conversion): Add a BASE_CONV when converting to
1894 the same class type.
1895 (convert_like): Handle BASE_CONV.
1896
1897Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
1898
1899 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
1900 (add_builtin_candidate): Likewise.
1901
1902 NEW_OVER changes:
1903 * typeck.c (build_x_function_call): Try an operator function
1904 whenever we call an object of class type.
1905 * method.c (build_opfncall): Pass CALL_EXPRs through.
1906 * cvt.c (implicit_conversion): Do const-ref case first.
1907 (add_conv_candidate, build_object_call, op_error): New fns.
1908 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
1909 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
1910 builtin candidates.
1911 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
1912 Fall back on preincrement handling. Use op_error.
1913 Handle warn_synth.
1914 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
1915 an error_mark_node.
1916 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
1917 properly.
1918
1919Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
1920
1921 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
1922
1923Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
1924
1925 * typeck.c (build_component_ref_1): Use build_component_ref
1926 instead of open coding it here.
1927
1928Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
1929
1930 * g++.c (main): Don't link with -lg++.
1931
1932 NEW_OVER changes:
1933 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
1934 result of build_type_conversion.
1935 (cp_convert): Only call build_method_call for ctors if
1936 build_type_conversion failed.
1937 (ptr_complete_ob): New function.
1938 (TYPE_PTR{,OB,MEM}_P): New macros.
1939 ({add,build}_builtin_candidate{,s}): New functions.
1940 (print_z_candidates): Handle builtins.
1941 (build_user_type_conversion_1): Don't use conversion fns for
1942 converting to a base type.
1943 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
1944 (build_user_type_conversion): Use convert_from_reference.
1945 (build_new_op): New function.
1946 (build_over_call): Fix handling of methods.
1947 (compare_ics): Handle AMBIG_CONV properly.
1948 * typeck2.c: Increment abort count.
1949 * method.c (build_opfncall): Forward most requests to build_new_op.
1950 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
1951
1952Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1953
1954 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
1955 invalid second argument to dump_expr_list.
1956
594740f3
MS
1957Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
1958
1959 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
1960
1961Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
1962
1963 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
1964 ASSEMBLE_EXTERNAL.
1965
1966Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
1967
1968 * typeck2.c (process_init_constructor): New pedwarn for using { }
1969 to initialize a pointer to member function.
1970 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
1971 we can avoid the new error.
1972
1973Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
1974
1975 * typeck.c (build_ptrmemfunc1): New function to hide details of
1976 pointer to member functions better.
1977
1978Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
1979
1980 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
1981 methods into the actual method, as we know the implied object is
1982 not used.
1983
1984Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
1985
1986 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
1987 inside a system header.
1988
1989Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
1990
1991 * call.c (build_method_call): Call complete_type on the
1992 instance type.
1993
1994Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
1995
1996 * typeck.c (build_component_ref): Always build up an OFFSET_REF
1997 for obj_ptr->func so that we can know which object to use in a
1998 method call.
1999
2000Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
2001
2002 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
2003 around things. Also improve maintainability.
2004
2005Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
2006
2007 * decl.c (grokdeclarator): Check for overflow when evaluating an
2008 array dimension.
2009
2010Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
2011
2012 * cvt.c (cp_convert): Don't check for ambiguity with constructor
2013 if NEW_OVER.
2014
2015 * typeck.c (build_x_function_call): Pass function overload
2016 questions to new overloading code if NEW_OVER.
2017 * init.c (expand_aggr_init_1): Only check for type conversion ops
2018 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
2019 Don't check for ambiguity with constructor if NEW_OVER.
2020 * cvt.c (convert_to_reference): Dereference the result of a type
2021 conversion operator.
2022 (build_conv): Propagate ICS_USER_FLAG.
2023 (implicit_conversion): Call instantiate_type.
2024 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
2025 (add_function_candidate): Fix cv-quals on argtype.
2026 (print_z_candidates): New function.
2027 (build_new_function_call): Call it.
2028 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
2029 consider non-converting constructors.
2030 Call print_z_candidates.
2031 Return an AMBIG_CONV for an ambiguous conversion.
2032 (build_user_type_conversion): Handle AMBIG_CONV.
2033 (convert_like): Fix test for building TARGET_EXPR.
2034 Call instantiate_type.
2035 Handle AMBIG_CONV and LVALUE_CONV.
2036 (build_over_call): Handle 0 args and ellipsis.
2037 * cp-tree.def: Add AMBIG_CONV.
2038
e92cc029
MS
2039Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
2040
2041 * decl.c (lookup_name_real): If we find mem in obj when parsing
2042 `obj->mem', make sure we return the right value.
2043
2044Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
2045
2046 * search.c (get_base_distance): Call complete_type.
2047
2048Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
2049
2050 * decl.c (store_bindings): Make static.
2051
2052Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2053
2054 * init.c (expand_aggr_init_1): Don't check type conversions if
2055 NEW_OVER.
2056
2057 * cvt.c (z_candidate): Put back template field.
2058 (add_function_candidate): Set it.
2059 (add_template_candidate): Likewise.
2060 (joust): Use it.
2061 (compare_qual): Handle references and pointers to members.
2062 (compare_ics): Handle reference bindings.
2063
2064 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
2065
2066Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
2067
2068 * call.c (compute_conversion_costs): Call complete_type.
2069
2070 * tree.c (vec_binfo_member): Use comptypes instead of comparing
2071 pointers, so we can handle template parameters.
2072
2073Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
2074
2075 * cvt.c (cp_convert_to_pointer): We have to call complete_type
2076 here; let's make it explicit instead of a side effect of an
2077 error check.
2078
2079Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2080
2081 * cvt.c (z_candidate): Remove template field.
2082 (reference_binding): Handle binding to temporary.
2083 (implicit_conversion): Likewise.
2084 (add_function_candidate): Handle artificial constructor parms.
2085 Handle functions with too few parms.
2086 (add_template_candidate): New function.
2087 (build_user_type_conversion_1): Handle constructors.
2088 (convert_like): Likewise.
2089 (build_over_call): Likewise.
2090 (build_new_function_call): Support templates.
2091 (compare_ics): Fix reference, inheritance handling.
2092
2093Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
2094
2095 * decl.c: Add signed_size_zero_node.
2096 (init_decl_processing): Build it.
2097 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
2098 when we're trying to make a negative delta.
2099
2100Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2101
2102 Stop doing this damn index==strchr variable name confusion.
2103 * class.c (add_virtual_function): Change local var INDEX to be
2104 named IDX.
2105 (add_method): Likewise.
2106 * lex.c (print_parse_statistics): Likewise.
2107 * search.c (make_memoized_table_entry): Likewise.
2108 (lookup_fnfields_here): Likewise.
2109 (lookup_field): Likewise.
2110 (lookup_fnfields): Likewise.
2111 (get_baselinks): Likewise.
2112 * sig.c (build_signature_table_constructor): Likewise.
2113 (build_signature_method_call): Likewise.
2114 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
2115 (get_member_function_from_ptrfunc): Likewise.
2116 (build_ptrmemfunc): Change local var INDEX to be IDX.
2117 (c_expand_start_case): Likewise.
2118
2119Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2120
2121 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
2122 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
2123 (convert_to_reference): Use build_type_conversion to convert to
2124 the reference type directly.
2125 (standard_conversion): Fix void* case, non-conversions.
2126 (reference_binding): Fix expr == 0 case, non-conversions.
2127 (convert_like): Support REF_BIND.
2128 (compare_qual): Split out from compare_ics.
2129 (compare_ics): Use it, handle icses with only a qual_conv.
2130
2131 * init.c (expand_vec_init): Don't crash if decl is NULL.
2132
2133Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
2134
2135 * mpw-config.in: New file, configury for Mac MPW.
2136 * mpw-make.sed: New file, makefile editing for MPW.
2137
2138Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2139
2140 * pt.c (instantiate_class_template): Call repo_template_used.
2141
2142 * search.c (lookup_conversions): Only lookup conversions in
2143 complete types.
2144
2145Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2146
2147 * cp-tree.def: Renamed from tree.def, to avoid confusion with
2148 gcc's tree.def.
2149 * cp-tree.h, lex.c: Include cp-tree.def.
2150 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
2151
2152Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
2153
2154 * init.c (build_vec_delete_1): Call complete_type.
2155
2156Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
2157
2158 * except.c (start_anon_func): Make sure anonymous functions are
2159 never external.
2160
2161Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2162
2163 * decl.c (finish_function): If function_depth > 1, set nested.
2164
2165 * decl2.c (grokbitfield): Revert Bob's change.
2166 * class.c (finish_struct_1): Fix handling of named bitfield widths.
2167
2168Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
2169
2170 * pt.c (add_pending_template): Handle types.
2171 (lookup_template_class): With -fexternal-templates, just add the class
2172 to pending_templates instead of instantiating it now.
2173 * decl2.c (finish_file): Handle types in pending_templates.
2174
2175Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
2176
2177 * decl2.c (grokbitfield): Handle constant decls appropriately.
2178 Give an appropriate error message now instead of spewing core
2179 later.
2180
2181Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
2182
2183 * decl2.c: Don't turn on thunks by default for now.
2184
2185Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
2186
2187 * typeck.c (complete_type): Handle error_mark_node.
2188 (common_type, OFFSET_TYPE): Handle template_type_parms.
2189
2190Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
2191
2192 * pt.c (instantiate_decl): If at_eof, call import_export_decl
2193 regardless of DECL_INLINE.
2194
2195 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
2196
2197 * class.c (finish_struct_bits): Copy TYPE_SIZE.
2198
2199 * rtti.c (build_dynamic_cast): Support templates.
2200 * tree.def: Support DYNAMIC_CAST_EXPR.
2201 * pt.c (tsubst_copy): Likewise.
2202 * decl2.c (build_expr_from_tree): Likewise.
2203
2204Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2205
2206 * typeck.c (build_static_cast): Support templates.
2207 (build_const_cast): Likewise.
2208 * tree.def: Support CONST/STATIC_CAST_EXPR.
2209 * pt.c (tsubst_copy): Likewise.
2210 * decl2.c (build_expr_from_tree): Likewise.
2211
2212Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2213
2214 * decl2.c (finish_vtable_vardecl): Don't trust
2215 TREE_SYMBOL_REFERENCED for vtables of local classes.
2216
2217Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
2218
2219 * pt.c (tsubst_copy): Handle operator T.
2220
2221Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2222
2223 * init.c (build_delete): Move creation of PARMS inside test of
2224 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
2225
2226Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
2227
2228 * typeck.c (build_conditional_expr): Don't assume that
2229 the arguments to ?: are always pointers or records.
2230
2231Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2232
2233 * decl2.c (import_export_decl): Still emit static/weak/comdat
2234 copies of inline template functions with -fno-implicit-templates.
2235
2236Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
2237
2238 * init.c (build_delete): Determine the complete basetype
2239 path to the destructor we're calling.
2240
2241Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
2242
2243 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
2244 initialize the enum, because we really and truly don't know where
2245 it came from.
2246 (start_enum): Don't copy integer_zero_node because
2247 build_enumerator will do it.
2248
2249Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2250
2251 * decl.c (finish_function): Do access control on base destructors.
2252
2253 * pt.c (tsubst, case FUNCTION_DECL): Set up
2254 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
2255 hose us.
2256
2257Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
2258
2259 * cvt.c (build_up_reference): If we have already extended the
2260 lifetime of the temporary, don't try it again.
2261 * typeck.c (c_expand_return): Don't try and convert the return
2262 value twice when we want a reference, once is enough.
2263
a0128b67
MS
2264Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
2265
2266 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
2267 LOOKUP_ONLYCONVERTING at all for now.
2268
2269 * search.c (add_conversions): Put the conversion function in
2270 TREE_VALUE, the basetype in TREE_PURPOSE.
2271 * cvt.c (build_type_conversion): Adjust.
2272 * cvt.c (build_expr_type_conversion): Adjust.
2273 * call.c (user_harshness): Adjust.
2274
2275Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2276
2277 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
2278 backend's benefit.
2279
14548a19
MS
2280Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
2281
2282 * except.c (expand_start_catch_block): Add a dummy region, if we
2283 get an error, so that we can avoid core dumping later.
2284
a0128b67
MS
2285Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
2286
2287 * cp-tree.h (OFFSET_REF): Remove.
2288 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
2289 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
d11ad92e
MS
2290 * init.c (expand_aggr_init_1): Likewise.
2291 (build_new): Likewise.
2292 * typeck.c (expand_target_expr): Likewise.
a0128b67
MS
2293
2294Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
2295
2296 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
2297 TARGET_EXPR.
2298
e349ee73
MS
2299Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
2300
2301 * cvt.c (build_up_reference): Redo how and when temporaries are
2302 created.
2303 * decl.c (grok_reference_init): Don't try and be smart about
2304 running cleanups.
2305
2306Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
2307
2308 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
2309 (TARGET_EXPR...), now that it has 4 arguments.
d11ad92e 2310 * tree.c (build_cplus_new): Likewise.
e349ee73
MS
2311
2312Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2313
2314 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
2315
2316 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
2317 * decl.c (struct saved_scope): Remove named_labels,
2318 {base,member}_init_list.
2319 (maybe_push_to_top_level): Don't set them. Call
2320 push_cp_function_context if appropriate.
2321 (pop_from_top_level): Likewise.
2322
2323 * method.c (do_build_assign_ref): Remove obsolete check of
2324 TYPE_HAS_ASSIGN_REF (basetype).
2325
2326 * decl.c (grokfndecl): Diagnose user definition of
2327 implicitly-declared methods.
2328
2329Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
2330
2331 * method.c (do_build_copy_constructor): Add code to give
2332 meaningful error messages instead of crashing.
2333 (do_build_assign_ref): Don't synthesize assignment operators for
2334 classes containing reference or const members.
2335
2336 * class.c (struct base_info): Remove cant_synth_copy_ctor
2337 and cant_synth_asn_ref.
2338 (finish_base_struct): Remove the code that tries to conditionalize
2339 synthesis of copy constructors & assignment operators based on
2340 access permissions. Instead, let it fail when it tries to
2341 synthesize the copy constructor. This will give meaningful error
2342 messages instead of silently generating code to perform a bitcopy.
2343
2344Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
2345
2346 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
2347 determining types for constant values.
2348
2349 * decl.c (struct named_label_list): Use instead of stuffing
2350 random items into a TREE_LIST node.
2351 (named_label_uses): Use the new struct.
d11ad92e
MS
2352 (poplevel): Likewise.
2353 (lookup_label): Likewise.
e349ee73
MS
2354 (define_label): Add an error message to tell the user the line
2355 where the goto is located in addition to the destination of the
2356 goto.
2357 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
2358 named_label_uses.
d11ad92e 2359 (finish_function): Likewise.
e349ee73
MS
2360
2361 (start_decl): Complain about defining a static data member
2362 in a different type from which it was declared.
2363
2364Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2365
2366 * cvt.c (build_expr_type_conversion): Adjust.
2367
2368Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2369
2370 * call.c (build_method_call): Always convert 'this' to the
2371 appropriate type.
2372
2373 * search.c (add_conversions): Put the conversion function in
2374 TREE_VALUE, the type in TREE_PURPOSE.
2375 * cvt.c (build_type_conversion): Adjust.
2376 * call.c (user_harshness): Adjust.
2377
2378 * method.c (emit_thunk): Call temporary_allocation and
2379 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
2380
2381 * tree.c (build_cplus_array_type): Handle tweaking of
2382 TYPE_MAIN_VARIANT here.
2383 * typeck.c (common_type): Not here.
2384
2385 * typeck.c (complete_type): Only try to complete an array type if
2386 it has a domain.
2387
2388Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
2389
2390 * decl.c (grokvardecl): Call complete_type.
2391 (grokdeclarator): Call complete_type for PARM_DECLs.
2392
2393Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
2394
2395 * pt.c (instantiate_class_template): Re-set
2396 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
2397
2398Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
2399
2400 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
2401 smart enough to do it right.
d11ad92e 2402 * tree.c (cp_expand_decl_cleanup): Likewise.
e349ee73
MS
2403 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
2404 cp_expand_decl_cleanup.
d11ad92e
MS
2405 (store_parm_decls): Likewise.
2406 (hack_incomplete_structures): Likewise.
2407 * except.c (push_eh_cleanup): Likewise.
e349ee73
MS
2408
2409Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
2410
2411 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
2412 frontend to the backend where it belongs.
d11ad92e
MS
2413 * tree.c (unsave_expr): Likewise.
2414 (unsave_expr_now): Likewise.
2415 * tree.def (UNSAVE_EXPR): Likewise.
2416 * cp-tree.h (unsave_expr): Likewise.
2417 (unsave_expr_now): Likewise.
e349ee73
MS
2418
2419Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
2420
2421 * init.c (emit_base_init): Make sure the partial EH cleanups live
2422 on the function_obstack.
2423
ce122a86
MS
2424Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
2425
2426 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
2427 when checking for pointer types.
2428
2429Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2430
2431 * pt.c (instantiate_class_template): Remove obsolete check for
2432 access declarations.
2433
2434Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
2435
2436 * call.c (build_overload_call): Simplify calls to
2437 build_overload_call by removing last parameter.
d11ad92e
MS
2438 (build_method_call): Likewise.
2439 * cp-tree.h: Likewise.
2440 * method.c (build_opfncall): Likewise.
2441 * typeck.c (build_x_function_call): Likewise.
ce122a86
MS
2442
2443Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
2444
2445 * call.c (default_parm_conversions): Factor out common code.
2446 (build_method_call): Use it.
2447 (build_overload_call_real): Use it.
2448
4ac14744
MS
2449Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
2450
2451 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
2452 but pedwarn as the code is bogus.
d11ad92e 2453 * typeck.c (decay_conversion): Likewise.
4ac14744
MS
2454 (build_function_call_real): Use build_addr_func instead of
2455 default_conversion. Don't allow pointer-to-method functions down
2456 here.
2457 (build_unary_op): Use real pointer-to-member functions instead of
2458 fake ones.
2459 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
2460 (convert_for_assignment): Removed some obsolete code.
2461 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
2462 build_x_function_call instead of current_class_ptr. Only call
2463 digest_init once on an initializer, we do this just checking
2464 TREE_TYPE.
2465 (build_expr_from_tree): Pass current_class_ref to
2466 build_x_function_call instead of current_class_ptr.
d11ad92e
MS
2467 * init.c (build_member_call): Likewise.
2468 * pase.y: Likewise.
4ac14744
MS
2469 * error.c (dump_expr): Handle OFFSET_REFs better.
2470 * pt.c (unify): Handle pointer-to-member functions better.
2471 * decl.c (finish_function): Clear out current_class_ref just like
2472 we do for current_class_ptr.
2473
2474 * typeck.c (get_delta_difference): Handle virtual bases better.
2475
2476Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
2477
2478 * sig.c (build_signature_table_constructor): Use the delta for
2479 the original basetype for this virtual function with thunks.
2480 (build_signature_method_call): We still need to adjust 'this'
2481 with thunks.
2482
2483Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
2484
2485 * call.c (build_addr_func): New routine. Used to get the `real'
2486 address of a function or a method. Needed to avoid getting a
2487 pointer-to-member function.
2488 (build_call): New routine to build CALL_EXPRs.
2489 (build_method_call): Use it.
d11ad92e
MS
2490 * cvt.c (convert_to_aggr): Likewise.
2491 * typeck.c (build_function_call_real): Likewise.
4ac14744
MS
2492 * sig.c (build_signature_table_constructor): Use build_addr_func.
2493 * cp-tree.h (build_call, build_addr_func): Declare them.
2494
2495Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
2496
2497 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
2498 * parse.y: Remove uses of LOOKUP_AGGR.
2499
2500Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
2501
2502 * *.[chy]: Rename current_class_decl to current_class_ptr, and
2503 C_C_D to current_class_ref.
2504
2505Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
2506
2507 * call.c (convert_harshness): Tighten up pointer conversions.
2508
2509Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
2510
2511 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
2512 (finish_file): Likewise.
2513
2514Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
2515
2516 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
2517
2518 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
2519 code.
2520
2521Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
2522
2523 * decl2.c: Turn on thunks by default where supported.
2524
4dabb379
MS
2525Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
2526
2527 * cp-tree.h (build_overload_call_maybe): Removed.
2528 * call.c (build_overload_call_real): Invert meaning of last arg to
2529 be require_complete.
d11ad92e 2530 (build_overload_call): Likewise.
4dabb379
MS
2531 * typeck.c (build_x_function_call): Use build_overload_call_real
2532 instead of build_overload_call_maybe.
2533
a50f0918
MS
2534Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
2535
2536 * decl2.c (finish_file): Don't try to emit functions that haven't
2537 been compiled.
2538
2539Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2540
2541 * decl2.c (finish_vtable_vardecl): Oops.
2542
2543 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
2544 Also store the bindings from previous_class_values.
2545 (pop_from_top_level): Restore them.
2546
2547Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
2548
2549 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
2550 symbol has been referenced.
2551 (finish_file): Re-join synthesis/vtable loop with inline emission
2552 loop, disable inlining when an inline is output.
2553
2554Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
2555
2556 * except.c (init_exception_processing): Setup saved_in_catch.
2557 (push_eh_cleanup): Reset __eh_in_catch.
2558 (expand_start_catch_block): Set __eh_in_catch.
2559
2560Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
2561
2562 * except.c (push_eh_cleanup): Add tracking for whether or not we
2563 have an active exception object.
2564 (expand_builtin_throw): Use it to make sure a rethrow without an
2565 exception object is caught.
2566
2567Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
2568
2569 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
2570 cache.
2571
809c8c30
JM
2572Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
2573
2574 * decl2.c (finish_file): Also use sentries for vars with
2575 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
2576 created).
2577
2578 * lex.c (handle_cp_pragma): Disable #pragma
2579 interface/implementation if SUPPORTS_ONE_ONLY > 1.
2580
2581Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
2582
2583 * method.c (emit_thunk): Wrap default case in
2584 temporary/permanent_allocation.
2585
2586 * method.c (make_thunk): Use DECL_ONE_ONLY.
2587 (emit_thunk): Call assemble_end_function.
2588
46b02c6d
MS
2589Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2590
2591 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
d11ad92e 2592 (import_export_decl): Likewise.
46b02c6d
MS
2593 (finish_prevtable_vardecl): Disable vtable hack if
2594 SUPPORTS_ONE_ONLY > 1.
2595
2596Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
2597
2598 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
2599 PREDECREMENT_EXPRs take two arguments, not one.
2600
2601Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
2602
2603 * class.c (build_vtable_entry): Don't build thunks for abstract
2604 virtuals.
2605
2606 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
2607 frontend.
2608
2609Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
2610
2611 * class.c (set_rtti_entry): Use size_zero_node.
d11ad92e 2612 (build_vtable): Likewise.
46b02c6d
MS
2613
2614Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
2615
2616 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
d11ad92e 2617 (prepare_fresh_vtable): Likewise.
46b02c6d
MS
2618
2619Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
2620
2621 * method.c (emit_thunk): Call mark_used on the target function.
2622
2623 * call.c (build_method_call): Don't warn about pending templates.
2624
c7690c68
JM
2625Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
2626
2627 * decl2.c (finish_file): Fix list walking logic.
2628
46b02c6d
MS
2629 * typeck2.c (check_for_new_type): Only warn if -pedantic.
2630
2631Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
2632
2633 * class.c (finish_struct_1): Remove old code for
2634 dont_allow_type_definitions.
d11ad92e 2635 * cp-tree.h: Likewise.
46b02c6d
MS
2636 * spew.c: Make sure cp-tree.h is included before parse.h, so the
2637 definition of flagged_type_tree is found before it is used.
d11ad92e 2638 * lex.c: Likewise.
46b02c6d
MS
2639 * parse.y: Added the ftype member to the type union, and changed a
2640 number of rules to use it instead of ttype. Added calls to
2641 check_for_new_type() as appropriate.
2642 * typeck2.c (check_for_new_type): New function for checking
2643 if a newly defined type appears in the specified tree.
2644 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
2645 for check_for_new_type().
2646
67d743fe
MS
2647Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
2648
c7690c68
JM
2649 * decl2.c (finish_file): Only use a sentry if the decl is public.
2650
67d743fe
MS
2651 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
2652 don't pass LOOKUP_ONLYCONVERTING.
2653
2654Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
2655
2656 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
2657 properly keeps track of const and volatile type modifiers.
2658
2659Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
2660
2661 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
2662 * pt.c (comp_template_args): Use it.
2663
2664 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
2665 assemble_external for artificial function decls.
2666
2667 * decl.c (cp_finish_decl): Oops.
2668
2669Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2670
2671 * decl2.c (import_export_decl): Put static data member templates
2672 into common storage, or make them weak, depending on whether they
2673 are dynamically or statically initialized.
2674 (get_sentry): New function.
2675 (finish_file): Do import_export_decl for static data members before
2676 building the init/fini functions. Don't init/fini a variable that's
2677 EXTERNAL. Use a sentry for variables in common. Fix mismatching
2678 push/pop_temp_slots.
2679 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
2680 expand_static_init thang.
2681 * method.c (get_id_2): New function.
2682
2683Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
2684
2685 * parse.y (empty_parms): Make sure we use C++-style prototypes
2686 when we're declaring member functions.
2687
2688Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
2689
2690 * Makefile.in (CONFLICTS): 16 s/r conflicts.
2691 * parse.y (self_template_type): New nonterminal.
2692
a80e4195
MS
2693Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
2694
2695 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
2696 name.
2697 * parse.y (base_class.1): Allow 'typename foo::bar'.
2698
2699 * lex.c (check_newline): Remove #pragma code that plays with the
2700 input stream, since we now deal with tokens. Clear nextchar when
2701 we're done.
2702 (handle_cp_pragma): Use real_yylex.
2703 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
2704 in one place.
2705
2706 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
2707
2708 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
2709
2710Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
2711
2712 * parse.y: New token SELFNAME for potential constructor.
2713 * spew.c (yylex): Handle it.
2714 * lex.c (identifier_type): Produce it.
2715
2716 * parse.y (complete_type_name): In :: case, don't push class binding.
d11ad92e 2717 (complex_type_name): Likewise.
a80e4195
MS
2718
2719Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
2720
2721 * typeck.c (build_reinterpret_cast): Handle pointer to member
2722 functions.
2723
2724Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
f72bbc37
BK
2725
2726 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
a80e4195 2727 pragmas.
f72bbc37 2728 (check_newline): Put the vtable/unit/implementation/interface pragma
a80e4195 2729 code into handle_cp_pragma, replacing it with a call.
f72bbc37 2730 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
a80e4195
MS
2731 args. Get the next token after handling the pragma token.
2732
2733Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
2734
2735 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
d11ad92e 2736 (convert_to_pointer_force): Likewise.
a80e4195
MS
2737
2738 * init.c (build_new): Fix array new without -fcheck-new.
2739
2740Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
2741
2742 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
2743 tree.c: Lose TYPE_NESTED_NAME.
2744
2745 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
2746 as identifiers.
2747
2748 * tree.def: Add VEC_INIT_EXPR.
2749 * expr.c (cplus_expand_expr): Handle it.
2750 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
2751 the extra file-scope symbol nastiness.
2752
2753Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
2754
2755 * method.c (make_thunk): Thunks are static.
2756 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
2757
2758 * decl2.c (mark_vtable_entries): Emit thunks as needed.
2759 (finish_file): Don't emit them here.
2760
2761Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
2762
2763 * rtti.c (build_dynamic_cast): Handle null pointers.
2764 (ifnonnull): New function.
f72bbc37 2765
6b5fbb55
MS
2766Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
2767
a80e4195
MS
2768 * call.c (build_method_call): Remember the original basetype we
2769 were called with. Give an error message instead of trying
2770 (incorrectly) to call a non-static member function through a
2771 non-inherited class.
2772
6b5fbb55
MS
2773 * search.c (expand_upcast_fixups): Mark the new fixup as
2774 DECL_ARTIFICIAL.
2775
2776Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2777
2778 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
2779
2780 * class.c (set_rtti_entry): Fix for thunks.
2781
2782 * decl2.c (import_export_decl): Still emit typeinfo fns for
2783 cv-variants of builtin types.
2784
2785 * rtti.c (expand_class_desc): Set up base_info_type_node here.
2786 (init_rtti_processing): Instead of here.
2787
2788Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
2789
2790 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
2791 (build_typeid): Only complain about taking dynamic typeid without
2792 -frtti.
2793
2794 * decl2.c: flag_rtti defaults to 1.
2795
2796 * rtti.c (get_tinfo_var): The general class case is now smaller.
2797 (init_rtti_processing): Pack the latter three fields of base_info
2798 into 32 bits.
2799
2800Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
2801
2802 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
2803
2804Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
2805
2806 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
2807 (push_memoized_context): Split out code to undefer pop_type_level to
2808 (clear_memoized_cache): here.
2809 (pop_memoized_context): We can only handle one layer of deferral of
2810 pop_type_level so clear the cache, if there was a previous level.
2811
2812Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2813
2814 * rtti.c (init_rtti_processing): Build up base_info_type_node.
2815 (expand_class_desc): Use one pointer to an array of base_info
2816 structs, passed using a CONSTRUCTOR.
2817
2818Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
2819
2820 * class.c (build_vbase_path): Remove block extern for
2821 flag_assume_nonnull_objects here.
2822 (build_vfn_ref): Split out functionality into build_vtbl_ref.
2823 (build_vtbl_ref): New routine.
2824 (build_vtable): Set up rtti info here.
2825 (add_virtual_function): Note in CLASSTYPE_RTTI the best
2826 place where we can get the rtti pointers from to avoid having to
2827 search around for a place.
d11ad92e
MS
2828 (finish_base_struct): Likewise.
2829 (finish_struct_1): Likewise. Never create totally new vtables
2830 with totally new vtable pointers for rtti. Disable code to layout
2831 vtable pointers better until we want to break binary
2832 compatibility.
6b5fbb55
MS
2833 * rtti.c (build_headof_sub): New routine to convert down to a
2834 sub-object that has an rtti pointer in the vtable.
2835 (build_headof): Use it. Also, use build_vtbl_ref now to be more
2836 maintainable.
2837 (build_dynamic_cast): Make sure we have saved it, if we need to.
2838 * search.c (dfs_init_vbase_pointers): Disable code that deals with
2839 a more efficient vtable layout, enable later.
2840 * call.c (flag_assume_nonnull_objects): Moved declaration to
2841 * cp-tree.h: here. Declare build_vtbl_ref.
2842 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
2843 function calls that want a tree.
2844
2845Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
2846
2847 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
2848 other X subobjects in the most derived type. Ack.
2849
2850 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
2851 get_typeid will do it for us.
2852 (get_typeid_1): Break out call-building for expand_*_desc to use.
2853 (get_typeid): Call it.
d11ad92e 2854 (expand_*_desc): Likewise.
6b5fbb55
MS
2855 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
2856 and void *.
2857 (init_decl_processing): Lose builtin_type_tdescs lossage.
2858 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
2859
2860Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
2861
2862 * pt.c (tsubst): When calling set_nested_typename, use
2863 TYPE_NESTED_NAME (current_class_type) instead of
2864 current_class_name.
2865
d11ad92e
MS
2866 * decl.c (pushdecl): Likewise.
2867 (pushdecl_class_level): Likewise.
6b5fbb55
MS
2868 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
2869 set_nested_typename.
2870
2871Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
2872
2873 * rtti.c (synthesize_tinfo_fn): Handle arrays.
2874
2875 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
2876
2877Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
2878
2879 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
2880 (init_rtti_processing): Lose bad_cast_type.
2881 (build_dynamic_cast): Use throw_bad_cast.
2882
2883 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
2884
2885 * decl2.c (finish_file): Don't synthesize artificial functions
2886 that are external and not inline.
2887
2888 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
2889
2890 * decl2.c (finish_file): Handle having new inlines added to
2891 saved_inlines by synthesis.
2892
2893 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
2894
2895Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
2896
2897 RTTI rewrite to initialize nodes as needed, not require that
2898 users #include <typeinfo>, complete functionality and reduce wasted
2899 space.
2900 * rtti.c (init_rtti_processing): New fn.
2901 (build_typeid): The vtable entry is now a function.
2902 (get_tinfo_var): New fn.
d11ad92e 2903 (get_tinfo_fn): Likewise.
6b5fbb55
MS
2904 (get_typeid): Use it.
2905 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
2906 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
2907 points __rtti_*.
2908 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
2909 (synthesize_tinfo_fn): New fn.
2910 * method.c (build_t_desc_overload): Lose.
2911 (build_overload_with_type): More generic.
2912 * decl.c (init_decl_processing): Call init_rtti_processing.
2913 * class.c (set_rtti_entry): Use get_tinfo_fn.
2914 * decl2.c (mark_vtable_entries): Mark the rtti function.
2915 (finish_prevtable_vardecl): Don't build_t_desc.
2916 (import_export_decl): Handle tinfo functions.
d11ad92e 2917 (finish_file): Likewise.
6b5fbb55
MS
2918 * typeck.c (inline_conversion): New fn.
2919 (build_function_call_real): Use it.
2920 * cp-tree.h: Add decls.
2921
2922 * method.c (hack_identifier): Also convert component_refs from
2923 references.
2924
2925 * lex.c (cons_up_default_function): Use the type, not the name, in
2926 declspecs.
2927
2928 * decl2.c (import_export_vtable): Fix weak vtables.
2929
2930Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
2931
2932 * search.c (get_base_distance_recursive): Fix access checks for
2933 protected bases.
2934
2935Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2936
2937 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
2938 cp-tree.h.
2939 (convert_harshness): Add prototypes wrapped by PROTO.
2940 * decl2.c (grok_function_init): Likewise.
2941 (do_toplevel_using_decl): Change to void return type.
2942 * class.c (build_vtable_entry): Remove decl of make_thunk.
2943 (merge_overrides): Fix order of arg definitions.
2944 (finish_vtbls): Likewise.
2945 (fixup_vtable_deltas): Likewise.
2946 (modify_all_direct_vtables): Likewise.
2947 (modify_all_indirect_vtables): Likewise.
2948 * search.c (get_base_distance_recursive): Likewise.
2949 (get_abstract_virtuals_1): Likewise.
2950 (fixup_virtual_upcast_offsets): Likewise.
2951 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
2952 * init.c (perform_member_init): Fix order of arg definitions.
2953 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
2954 * cp-tree.h (make_thunk): Add decl.
2955 (overload_template_name, push_template_decl): Add decls.
2956 (do_toplevel_using_decl): Change to void return type.
2957 (vec_binfo_member): Add decl.
2958
cdf5b885
MS
2959Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2960
2961 * typeck.c (mark_addressable, convert_for_assignment,
2962 convert_for_initialization, pointer_int_sum, pointer_diff,
2963 unary_complex_lvalue): Add prototypes wrapped by PROTO.
2964 (convert_sequence): #if 0 fn decl, since definition also is.
2965
2966Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
2967
2968 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
2969 cast to pointer types for type searching.
2970
2971Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2972
2973 * typeck.c (get_delta_difference): Use cp_error, not error, in the
2974 case where BINFO == 0.
2975
2976Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
2977
2978 * call.c (build_method_call): Fix wording of error messages so
2979 constructors come out right.
2980
2981Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
2982
2983 * decl.c (push_overloaded_decl): Don't warn about hidden
2984 constructors when both the type and the function are declared
2985 in a system header file.
2986
c91a56d2
MS
2987Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
2988
2989 * class.c (finish_struct_1): Propagate the TYPE_PACKED
2990 flag for the type to the type's fields.
2991
2992Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
2993
2994 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
2995
2996Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
2997
2998 * class.c (base_info, finish_base_struct): Replace
2999 needs_virtual_dtor with base_has_virtual.
3000
3001 (finish_struct_1): Remove the old code that tried to make default
3002 destructors virtual. Use base_has_virtual when checking if we need
3003 to add a vtable entry for the rtti code.
3004
3005Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
3006
3007 * pt.c (push_template_decl): Complain about template decl with
3008 inappropriate declaration.
3009
3010Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
3011
3012 * typeck.c (build_x_unary_op): Remove bogus check for taking
3013 the address of a member function.
3014
3015Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3016
3017 * parse.y (constructor_declarator): Only push the class if
3018 we are not already in the class.
3019
3020Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
6752b7d4
JL
3021
3022 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
3023 Add additional argument to INIT_CUMULATIVE_ARGS.
3024
c91a56d2
MS
3025Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
3026
3027 * decl.c (shadow_tag): Fix error about anon union with methods.
3028
3029 * parse.y (self_reference): Only generate a self-reference if this
3030 is a non-template class.
3031 (opt.component_decl_list): Only use it if it was generated.
3032
3033 * parse.y (component_decl_1): Use constructor_declarator.
d11ad92e
MS
3034 (fn.def2): Likewise.
3035 (notype_component_declarator0): Likewise.
c91a56d2
MS
3036
3037Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
3038
3039 * typeck.c (build_x_unary_op): Add checks for taking the address
3040 of a TARGET_EXPR or of a member function, and give appropriate
3041 warnings.
3042
3043Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
3044
3045 * pt.c (process_template_parm): Allow template type parms to be
3046 used as types for template const parms.
3047
3048Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
3049
3050 * init.c (expand_vec_init): Ensure the eh cleanups are on the
3051 function_obstack.
3052
3053Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
3054
3055 * decl.c (lookup_name_real): Be even more picky about the
3056 ambiguous lookup warning.
3057 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
3058 * parse.y (constructor_declarator): Rather than here.
3059
3060 * parse.y (constructor_declarator): New nonterminal.
3061 (fn.def1): Use it.
d11ad92e 3062 (explicit_instantiation): Likewise.
c91a56d2
MS
3063
3064Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3065
3066 Add implicit declaration of class name at class scope.
3067 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
3068 * parse.y (self_reference): New nonterminal.
3069 (opt.component_decl_list): Use it.
3070 (fn.def1): Add nested_name_specifier type_name cases.
3071 * class.c (build_self_reference): New function.
3072 (finish_struct): Handle access_default later, move self-reference
3073 decl to the end.
3074 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
3075 * cp-tree.h: Adjust.
3076
3077 * pt.c (do_function_instantiation): Separate handling of member
3078 functions and non-member functions properly.
3079
3080Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3081
3082 * pt.c (process_template_parm): Improve error for 'volatile class K'.
3083
3084 * class.c (finish_struct_1): Check the right slot for destructors.
3085
3086 * decl.c (start_enum): Complain about enum templates.
3087
3088Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
3089
3090 * init.c (resolve_offset_ref): Offset pointers to member data by one.
d11ad92e 3091 * typeck.c (unary_complex_lvalue): Likewise.
c91a56d2
MS
3092
3093Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
3094
3095 * typeck.c (c_expand_return): Check for a returned local
3096 array name, similar to the check for an ADDR_EXPR.
3097
3098Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3099
3100 * decl.c (cp_finish_decl): Don't build cleanups for static
3101 variables here.
3102
3103Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
3104
3105 * typeck.c (build_modify_expr): Fix error messages to be more
3106 accurate.
3107 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
3108 assignment operators.
d11ad92e 3109 * error.c (assop_as_string): Likewise. Add support for `%Q' for
c91a56d2
MS
3110 assignment operators.
3111
909e536a
MS
3112Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
3113
c91a56d2
MS
3114 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
3115 give an error if initialized. Pedwarn about nested type with the
3116 same name as its enclosing class.
3117
909e536a
MS
3118 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
3119
3120 * typeck.c (require_complete_type): Be sure to instantiate the
3121 MAIN_VARIANT of the type.
3122
3123 * decl2.c (finish_file): Instantiate pending templates before
3124 processing static constructors and destructors.
3125
3126 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
3127 unless at_eof.
3128
3129Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
3130
3131 * decl2.c (delete_sanity): If error_mark_node is passed
3132 in as an expression, quit while we're ahead.
3133
3134 * decl.c (grokdeclarator): Give an error message if `friend'
3135 is combined with any storage class specifiers.
3136
fc378698
MS
3137Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
3138
3139 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
3140 definition of nonexistent nested type.
3141
3142 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
3143 not to say 'typedef'.
3144
3145Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3146
3147 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
3148 * search.c (dfs_walk, dfs_init_vbase_pointers,
3149 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
3150 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
3151
3152Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3153
3154 * except.c (build_throw): Support minimal parse.
3155 * pt.c (tsubst_copy): Support THROW_EXPR.
d11ad92e 3156 * decl2.c (build_expr_from_tree): Likewise.
fc378698
MS
3157
3158 * pt.c (mangle_class_name_for_template): Always allocate
3159 scratch_firstobj.
3160
3161Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
3162
3163 * cvt.c (cp_convert_to_pointer): Give an appropriate error
3164 when trying to cast from an incomplete type.
3165
3166Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3167
3168 * pt.c (instantiate_class_template): Don't bother setting up
3169 CLASSTYPE_TAGS explicitly, as the nested types will add
3170 themselves.
3171
3172Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
3173
3174 * decl.c (shadow_tag): Remove old error check for usage of
3175 an enum without a previous declaration.
3176 (xref_tag): Add error message about usage of enums without a
3177 previous declaration.
3178
3179Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3180
3181 * lex.c (do_identifier): Only do name consistency check if we're
3182 parsing.
3183
3184 * pt.c (push_template_decl): Don't crash if we get a member defn
3185 that doesn't match.
3186
3187 * decl.c (xref_tag_from_type): New function to do an xref without
3188 always having to figure out code_type_node.
3189 * cp-tree.h: Declare it.
3190 * pt.c (instantiate_class_template): Use it for friend classes.
3191 (lookup_template_class): Use it.
3192
3193 * typeck2.c (build_functional_cast): Pull out a single parm before
3194 passing it to build_c_cast.
3195
3196Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
3197
3198 * expr.c (do_case): Give an error message if a pointer is
3199 given as a case value.
3200
3201Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
3202
3203 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
3204 an overload list.
3205
3206 * lex.c (cons_up_default_function): Really, now, interface hackery
3207 does not apply to synthesized methods.
3208
3209Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
3210
3211 * call.c (build_method_call): Ctors and dtors now have special names
3212 with respect to lookups.
d11ad92e
MS
3213 * class.c (add_method): Likewise.
3214 (grow_method): Likewise.
3215 (finish_struct_methods): Likewise.
3216 (warn_hidden): Likewise.
3217 (finish_struct_1): Likewise.
3218 * cvt.c (convert_to_reference): Likewise.
3219 (convert_to_aggr): Likewise.
3220 (cp_convert): Likewise.
3221 * decl2.c (check_classfn): Likewise.
3222 * init.c (expand_member_init): Likewise.
3223 (expand_default_init): Likewise.
3224 (expand_aggr_init_1): Likewise.
3225 (build_offset_ref): Likewise.
3226 (build_new): Likewise.
3227 (build_delete): Likewise.
3228 * lex.c (do_inline_function_hair): Likewise.
3229 * search.c (lookup_field_1): Likewise.
3230 (lookup_fnfields_here): Likewise.
3231 (lookup_field): Likewise.
3232 (lookup_fnfields): Likewise.
3233 (get_virtual_destructor): Likewise.
3234 (dfs_debug_mark): Likewise.
3235 (dfs_pushdecls): Likewise.
3236 (dfs_compress_decls): Likewise.
3237 * tree.c (layout_basetypes): Likewise.
3238 * typeck.c (build_component_ref): Likewise.
3239 (build_x_function_call): Likewise.
3240 (build_modify_expr): Likewise.
3241 (convert_for_initialization): Likewise.
3242 (build_functional_cast): Likewise.
3243 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
fc378698
MS
3244 (CTOR_NAME): New.
3245 (DTOR_NAME): New.
3246 * decl.c (ctor_identifier): New.
3247 (dtor_identifier): New.
3248 (init_decl_processing): Set them.
3249
3250Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
3251
3252 * typeck.c (build_component_ref): Don't get confused by fields whose
3253 context has no type name, like pointer to member functions.
3254
3255Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
3256
3257 * decl.c (grokdeclarator): Handle typedef without declarator.
3258
3259 * pt.c (tsubst): Handle SCOPE_REF in declarator.
3260
3261 * parse.y (bad_parm): Catch another case of missing `typename'.
3262
3263 * lex.c (yyprint): Handle TYPE_DECLs.
3264
3265 * decl.c (start_function): Don't try to be clever.
3266
3267 * lex.c: Lose compiler_error_with_decl.
3268 * typeck2.c: Lose error_with_aggr_type.
3269 (incomplete_type_error): Use cp_* instead of old functions.
d11ad92e
MS
3270 (readonly_error): Likewise.
3271 * typeck.c (convert_arguments): Likewise.
3272 * search.c (lookup_nested_field): Likewise.
3273 * method.c (make_thunk): Likewise.
3274 * decl.c (grokparms): Likewise.
fc378698
MS
3275 * cp-tree.h: Update.
3276
3277 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
3278 and value.
3279
3280Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
3281
3282 * method.c (build_opfncall): When deleting a pointer to an
3283 array, build a new pointer to the tree past any ARRAY_TYPE
3284 nodes.
3285
3286Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3287
3288 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
3289
3290Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
3291
3292 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
3293 and ! DECL_INLINE.
3294
3295 * decl.c (finish_function): Don't set nested based on
3296 hack_decl_function_context.
3297 * parse.y (function_try_block): Check for nested function.
d11ad92e 3298 (pending_inlines): Likewise.
fc378698
MS
3299
3300 * decl2.c (build_expr_from_tree): If a unary op already has a
3301 type, just return it.
3302
3303 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
3304
3305 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
3306 (finish_file): Check the return value of walk_vtables.
3307 (finish_prevtable_vardecl): Return int.
d11ad92e
MS
3308 (finish_vtable_vardecl): Likewise.
3309 (prune_vtable_vardecl): Likewise.
3310 * lex.c (set_vardecl_interface_info): Likewise.
fc378698
MS
3311 * cp-tree.h: Adjust return types.
3312
3313 * class.c (delete_duplicate_fields_1): Don't complain about
3314 duplicate nested types if they're the same type.
3315 (finish_struct): Remove check for duplicate.
3316 * decl2.c (grokfield): Don't check for typedef of anonymous type.
3317
3318Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3319
3320 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
3321
3322 * decl.c (grokdeclarator): Lose special handling of class-level
3323 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
3324 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
3325
3326 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
3327
3328 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
3329
3330 * search.c (compute_access): Fix handling of anonymous union
3331 members.
3332 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
3333 from anonymous unions to their members.
3334
3335 * typeck.c (build_x_function_call): For static member functions,
3336 hand off to build_member_call.
3337
3338Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
3339
3340 * typeck.c (build_component_ref): Handle OFFSET_REFs.
3341
3342 * init.c (expand_vec_init): Fix init == 0 case.
3343
3344Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
3345
3346 * init.c (build_new): Pedwarn about init and array new.
3347 (expand_vec_init): Handle lists, use convert_for_initialization
3348
3349 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
3350 when converting to an aggregate type.
3351 * cvt.c (cp_convert): Pass it through.
3352
3353 * typeck.c (build_conditional_expr): Handle user-defined
3354 conversions to slightly different types.
3355
3356 * decl.c (grokdeclarator): Force an array type in a parm to be
3357 permanent.
3358
3359 * decl2.c (do_using_directive): Sorry.
d11ad92e 3360 (do_namespace_alias): Likewise.
fc378698
MS
3361 * lex.c (real_yylex): Warn about using the `namespace' keyword.
3362
3363Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
3364
3365 * parse.y (datadef): Move call to note_list_got_semicolon up.
3366
934c6b13
MS
3367Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
3368
3369 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
3370
3371Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
3372
3373 * decl.c (cp_finish_decl): The exception regions have to be
3374 nested, not overlapping. We start the exception region for a
3375 decl, after it has been fully built, and all temporaries for it
3376 have been cleaned up.
3377
3378Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
3379
3380 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
3381
e76a2646
MS
3382Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
3383
3384 * tree.def: Add RETURN_INIT.
3385 * pt.c (instantiate_decl): Handle RETURN_INIT.
3386 * decl.c (store_return_init): Handle minimal_parse_mode.
3387
3388 * tree.c (cp_build_type_variant): Just return an error_mark_node.
3389 * decl.c (make_typename_type): Don't try to get the file and line
3390 of an identifier.
3391 * typeck.c (comptypes): Handle TYPENAME_TYPE.
3392
3393Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
3394
3395 * decl.c (poplevel): Make sure we clear out and restore old local
3396 non-VAR_DECL values by default when they go out of scope.
3397
3398Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
3399
3400 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
3401 referring to addresses of variables and functions.
3402
3403 * error.c (dump_expr): Support SIZEOF_EXPR.
3404
3405 * init.c (do_friend): Use the return value of check_classfn.
3406
3407 * typeck.c (convert_arguments): Call complete_type.
3408
3409 * method.c (hack_identifier): After giving an error, set value to
3410 error_mark_node.
3411
3412Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3413
3414 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
3415 lossage for local classes.
3416 * cp-tree.h: Declare it.
3417 * decl.c (lookup_name_real): Evil, painful hack for local classes.
3418 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
3419 Use hack_decl_function_context.
3420 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
3421 (start_function): Use hack_decl_function_context.
d11ad92e
MS
3422 (finish_function): Likewise.
3423 * method.c (synthesize_method): Likewise.
3424 * lex.c (process_next_inline): Likewise.
3425 (do_pending_inlines): Likewise.
e76a2646
MS
3426 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
3427 done with it.
3428
3429Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
3430
3431 * sig.c (build_signature_pointer_or_reference_type): Align
3432 signature pointers/references on 8-byte boundaries so they can be
3433 grabbed 2 words at a time on a Sparc.
3434
3435Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
3436
3437 * method.c (hack_identifier): Requiring a static chain is now a
3438 hard error.
3439 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
3440 functions.
3441
3442Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3443
3444 * init.c (build_offset_ref): Call complete_type.
3445
3446 * decl.c (pop_from_top_level): Always pop previous_class_type.
3447
3448 * parse.y: Handle multiple decls in a for-init-statement.
d11ad92e 3449 * pt.c (tsubst_expr): Likewise.
e76a2646
MS
3450
3451 * pt.c (tsubst): Use tsubst_expr for the second operand of an
3452 ARRAY_REF.
3453
3454 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
3455 (poplevel_class): Set it here.
3456 (pop_from_top_level): Pop it here if we're returning to class scope.
3457 * class.c (pushclass): Don't set it here.
3458
3459 * decl.c (maybe_push_to_top_level): Save current_template_parms,
3460 and clear it if !pseudo.
3461 (pop_from_top_level): Restore it.
3462
3463 * decl2.c (finish_file): Push the dummy each time we walk the list
3464 of vtables.
3465
3466 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
3467 something for CAST_EXPR.
3468
3469Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3470
3471 * cvt.c (cp_convert): Warn about implicit conversion of the
3472 address of a function to bool, as it is always true.
3473
3474Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
3475
3476 * typeck.c (c_expand_return): Fix warning for local externs returned.
3477
3478Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
3479
3480 * tree.c (mapcar): Propagate const and volatile properly.
3481
3482 * typeck.c (complete_type): Be sure to instantiate the
3483 MAIN_VARIANT of the type.
3484
3485 * method.c (synthesize_method): Class interface hackery does not
3486 apply to synthesized methods.
3487
3488Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
3489
3490 * pt.c (comp_template_args): Use comptypes rather than just
3491 checking for TEMPLATE_TYPE_PARM equivalence.
3492
3493 * typeck.c (build_x_function_call): Call complete_type before
3494 checking TYPE_OVERLOADS_CALL_EXPR.
3495
7ea63af7
MH
3496Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
3497
3498 * g++.c (main): Check also for new define ALT_LIBM.
3499
ec255269
MS
3500Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
3501
3502 * pt.c (instantiate_class_template): If we don't have a pattern
3503 yet, that's OK.
3504 (coerce_template_parms): If we see a local class, bail.
3505
3506 * decl.c (grok_reference_init): Make sure there's a type before
3507 checking its code.
3508
3509 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
d11ad92e 3510 (push_template_decl): Likewise.
ec255269
MS
3511
3512 * parse.y (named_class_head): Set
3513 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
3514
3515 * decl.c (xref_tag): Diagnose redeclaration of template
3516 type-parameter name.
3517
3518 * error.c (dump_type): Handle anonymous template type parms.
3519
3520 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
3521 TYPE_STUB_DECL.
d11ad92e 3522 (coerce_template_parms): Likewise.
ec255269
MS
3523
3524Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
3525
3526 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
3527 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
3528
3529Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
3530
3531 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
3532 before trying to get its STUB_DECL.
d11ad92e 3533 (coerce_template_parms): Likewise.
ec255269
MS
3534
3535 * parse.y (template_type_parm): If they didn't use 'class',
3536 pretend they did after giving an error.
3537
3538 * pt.c (coerce_template_parms): Diagnose use of local class.
3539
3540 * decl.c (grok_reference_init): Use instantiate_type.
3541
3542 * error.c (dump_expr): Handle TEMPLATE_DECLs.
3543
3544 * parse.y (named_class_head): Diagnose mismatching types and tags.
3545
3546 * decl.c (pushdecl): Type decls and class templates clash with
3547 artificial type decls, not hide them.
3548
3549 * decl.c (redeclaration_error_message): Diagnose redefinition of
3550 templates properly.
3551 (duplicate_decls): Diagnose disallowed overloads for template
3552 functions, too.
3553
3554 * decl.c (start_decl): Call complete_type before checking for a
3555 destructor.
3556
3557 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
3558
3559 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
3560
5566b478
MS
3561Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3562
ec255269
MS
3563 * decl.c (grok_op_properties): Don't check for operator++(int) in
3564 a template.
3565
3566 * tree.c (perm_manip): Return a copy of variable and function
3567 decls with external linkage.
3568
3569 * tree.def: Change some of the min tree codes to type "1".
3570 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
3571 * method.c (build_overload_int): Emit something arbitrary for
3572 anything but an INTEGER_CST if we're in a template.
3573
3574 * decl.c (cp_finish_decl): Call complete_type before deciding
3575 whether or not to lay out the decl.
3576
5566b478
MS
3577 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
3578
3579Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
3580
3581 * typeck2.c (build_x_arrow): Call complete_type.
3582
3583 * pt.c (add_pending_template): Broken out.
3584 (lookup_template_class): If -fexternal-templates, call it for all
3585 the methods of implemented types.
3586 (instantiate_class_template): Instead of instantiating them here.
3587 (instantiate_decl): Handle -fexternal-templates earlier.
3588
3589Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3590
3591 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
3592 memoized lookup stuff inside GATHER_STATISTICS.
3593
3594Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
3595
3596 * decl.c (start_decl): Complain about array of incomplete type
3597 here.
3598 (grokdeclarator): Not here.
3599
3600 * parse.y (template_parm): Expand full_parm inline so we can set
3601 the rule's precedence.
3602
3603 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
3604 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
3605 * decl2.c (grokbitfield): Don't check for integer constant here.
3606 * class.c (finish_struct_1): Check here.
3607
3608 * decl.c (define_label): Make the min decl go on permanent_obstack.
3609
3610 * pt.c (unify): Don't handle CONST_DECLs.
3611 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
d11ad92e 3612 (tsubst_copy): Likewise.
5566b478
MS
3613
3614 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
3615 CONST_DECL for a template parm.
3616
3617Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
3618
3619 * decl.c (grokdeclarator): Complain about array of incomplete type
3620 here.
3621 (start_decl_1): Not here.
3622
3623 * pt.c (tsubst): Handle pointer-to-function declarators.
3624
3625 * method.c (hack_identifier): If pedantic, diagnose local class
3626 methods that require a static chain.
3627
3628 * decl.c (grok_op_properties): No longer static.
3629 * cp-tree.h: Declare it.
3630 * pt.c (tsubst): Call it for operators.
3631 Use tsubst_copy for TREE_VECs.
3632
3633 * parse.y (template_arg): The expr has precedence like '>'.
3634
3635Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
3636
3637 * pt.c (coerce_template_parms): Don't coerce an expression using
3638 template parms.
3639 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
3640 (tsubst): Don't use build_index_2_type if the max_value uses template
3641 parms.
3642 * method.c (build_overload_int): Emit something arbitrary for an
3643 expression using template parms.
3644
3645 * parse.y (template_close_bracket): New non-terminal to catch use
3646 of '>>' instead of '> >' in template class names.
3647 (template_type): Use it.
3648 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
3649
3650 * tree.def: Add CAST_EXPR.
3651 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
3652 CONVERT_EXPR for minimal_parse_mode.
d11ad92e
MS
3653 * typeck.c (build_c_cast): Likewise.
3654 * pt.c (tsubst_copy): Likewise.
3655 * decl2.c (build_expr_from_tree): Likewise.
3656 * error.c (dump_expr): Likewise.
5566b478
MS
3657
3658Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3659
3660 * except.c (SetTerminate, SetUnexpected): Put back global vars.
3661 (init_exception_processing): Put back decl/init of
3662 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
3663 fns from libstdc++.
3664
3665 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
3666 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
3667 Delete unused fns.
3668 * cp-tree.h (declare_uninstantiated_type_level,
3669 uninstantiated_type_level_p): Delete prototypes.
3670
3671Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
3672
3673 * pt.c (tsubst_expr): Add default return.
3674
3675Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3676
3677 * error.c (fndecl_as_string): Delete unused arg CNAME.
3678 * sig.c (build_signature_table_constructor,
3679 build_signature_method_call): Fix calls.
3680
3681 * class.c (the_null_vtable_entry): Delete var definition.
3682 (init_class_processing): Delete tree the_null_vtable_entry init.
3683 * decl.c (no_print_{functions, builtins}): Declare as static.
3684 (__tp_desc_type_node): #if 0 var definition.
3685 (init_type_desc): #if 0 init of __tp_desc_type_node.
3686 (vb_off_identifier): Move var decl into init_decl_processing.
3687 (current_function_assigns_this): Declare as static.
3688 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
3689 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
3690 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
3691 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
3692 * init.c (BI_header_type, BI_header_size): Declare as static.
3693 * pt.c (template_classes): Delete unused var.
3694 (add_pending_template): Delete decl for non-existent fn.
3695 (lookup_template_class): Delete vars CODE and TAG_CODE.
3696 (instantiate_template): Delete unused var TARGS.
3697 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
3698 Delete decls.
3699 (__tp_desc_type_node): #if 0 var decl.
3700 (fndecl_as_string): Fix prototype.
3701
3702Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
3703
3704 * tree.def: Add GOTO_STMT.
3705 * pt.c (tsubst_expr): Support goto and labels.
3706 * decl.c (define_label): Support minimal parsing.
d11ad92e 3707 * parse.y (simple_stmt): Likewise.
5566b478
MS
3708
3709Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3710
3711 * xref.c (GNU_xref_member): Only define/set var I if
3712 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
3713 used.
3714 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
3715 (GNU_xref_end): Fix call.
3716 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
3717 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
3718
3719 * tree.c (build_exception_variant): Delete unused vars I, A, T,
3720 T2, and CNAME.
3721 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
3722 (mapcar): Delete unused var CODE.
3723 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
3724 (break_out_cleanups): Fix call.
3725 (bot_manip): Likewise.
3726 * call.c (build_method_call): Likewise.
3727 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
3728 Likewise.
3729 * typeck.c (unary_complex_lvalue, build_modify_expr,
3730 convert_for_initialization): Likewise.
3731 * typeck2.c (build_functional_cast): Likewise.
3732 * cp-tree.h (build_cplus_new): Fix prototype.
3733
3734 * repo.c (open_repo_file): Delete unused var Q.
3735 (repo_compile_flags, repo_template_declared,
3736 repo_template_defined, repo_class_defined, repo_inline_used,
3737 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
3738 (repo_get_id, repo_vtable_used): Declare as static.
3739 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
3740 prototypes.
3741
3742Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
3743
3744 * parse.y (pending_inlines): Add function_try_block case.
3745
3746 * pt.c (unify): Fix for template const parms.
3747
3748Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3749
3750 * lex.c (extract_interface_info): Delete forward decl.
3751 (default_copy_constructor_body, default_assign_ref_body): Delete
3752 decls for non-existent functions.
3753 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
3754 (init_lex): Delete setting them.
3755 (cons_up_default_function): Delete unused vars FUNC_BUF,
3756 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
3757 #if 0'd synth code.
3758 (toplevel, expression_obstack): Delete unused extern decls.
3759 (tree_node_kind): Delete unused enum.
3760 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
3761 GATHER_STATISTICS.
3762 (tree_node_kind_names): Delete unused extern decl.
3763 (synth_obstack): Delete unused var.
3764 (init_lex): Don't set it.
3765 (init_parse): Add decl before use.
3766 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
3767 (current_unit_{name, language}): Delete unused vars.
3768 (check_newline): Don't bother setting them, just accept the #pragma.
3769 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
3770 (current_unit_{name, language}): Delete decls.
3771
3772 * search.c: Wrap all of the memoized functions, macros, and
3773 variables inside #ifdef GATHER_STATISTICS.
3774 (lookup_field, lookup_fnfields): Likewise.
3775 (init_search_processing): Likewise.
3776 (reinit_search_statistics): Wrap whole function.
3777 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
3778
3779 * decl.c (finish_function): Only call pop_memoized_context if
3780 GATHER_STATISTICS is defined.
3781 (start_function): Likewise for push_memoized_context.
3782 * class.c (pushclass, popclass): Likewise.
3783
3784 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
3785 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
3786
3787 * cvt.c (cp_convert): Delete unused local var FORM.
3788 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
3789 prototypes.
3790
3791Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
3792
3793 * pt.c (do_poplevel): Oops; really return what we get from
3794 poplevel this time.
3795
3796Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3797
3798 * cp-tree.h (is_aggr_type): Add prototype.
3799
3800 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
3801 * method.c ({push,pop}_cp_function_context): Delete decls.
3802 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
3803 (SetUnexpected, SetTerminate): Delete unused vars.
3804 (init_exception_processing): Don't set SetUnexpected or
3805 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
3806 (output_exception_table_entry): Delete unused array LABEL.
3807 (expand_internal_throw): Delete unused var PARAMS.
3808 (expand_start_catch_block): Delete unused var CLEANUP.
3809 (emit_exception_table): Delete unused var EH_NODE_DECL.
3810 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
3811 GOTO_UNWIND_AND_THROW. Don't set them.
3812 (end_eh_unwinder): Add top decl.
3813 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
3814 (exception_section, push_rtl_perm, do_function_call,
3815 lang_interim_eh, push_eh_cleanup, eh_outer_context,
3816 expand_end_eh_spec, end_eh_unwinder): Declare as static.
3817 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
3818 throw_used): Likewise.
3819 * cp-tree.h (expand_end_eh_spec): Delete prototype.
3820
3821 * search.c (dfs_mark, dfs_mark_vtable_path,
3822 dfs_unmark_vtable_path, dfs_mark_new_vtable,
3823 dfs_unmark_new_vtable, dfs_clear_search_slot,
3824 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
3825 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
3826 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
3827 functions.
3828 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
3829 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
3830 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
3831 Only define #ifdef GATHER_STATISTICS.
3832 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
3833 is defined.
3834 (vbase_decl): Delete var definition.
3835 (init_search): Delete old decl.
3836 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
3837 never actually used.
3838 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
3839 (get_base_distance_recursive): Delete unused fourth arg
3840 BASETYPE_PATH. Fix call .
3841 (get_base_distance): Fix call.
3842 (push_class_decls): Delete unused var ID.
3843 (make_memoized_table_entry): Declare as static.
3844 (breadth_first_search): Declare as static.
3845 (tree_has_any_destructor_p): Declare as static.
3846 (pop_class_decls): Delete unused arg pop_class_decls.
3847 * class.c (popclass): Fix call to pop_class_decls.
3848 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
3849 tree_has_any_destructor_p): Delete prototypes.
3850
3851 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
3852 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
3853 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
3854 (build_user_desc): Delete unused var T.
3855 (build_class_desc): Delete unused vars T and OFF.
3856 (build_t_desc): Delete unused var NAME_STRING.
3857 (build_headof): Make static.
3858 (get_bad_cast_node): Likewise.
3859 (get_def_to_follow): Likewise.
3860 * cp-tree.h (init_type_desc): Add prototype.
3861 (build_headof): Remove prototype.
3862
3863Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
3864
3865 * pt.c (tsubst): Only look for matching decls at file scope for
3866 non-member functions.
3867
3868 * call.c (build_scoped_method_call): Handle scoped destructor
3869 calls in templates.
3870
3871 * decl.c (*_top_level): Also save previous_class_values.
3872
3873 * pt.c (tsubst_expr): Support do {} while loops.
d11ad92e
MS
3874 * parse.y (simple_stmt): Likewise.
3875 * tree.def: Likewise.
5566b478
MS
3876
3877 * method.c (build_overload_identifier): For a class nested in a
3878 template class, don't mangle in the template parms from our
3879 context.
3880
3881 * lex.c, cp-tree.h: Remove support for template instantiations in
3882 the pending_inlines code.
3883 * pt.c: Remove dead functions and unused arguments.
3884 (uses_template_parms): TYPENAME_TYPEs always use template parms.
3885 * parse.y: Stop passing anything to end_template_decl.
3886 * tree.c (print_lang_statistics): Only print tinst info #ifdef
3887 GATHER_STATISTICS.
3888
3889Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
3890
3891 * init.c (expand_recursive_init{,_1}): Delete decls.
3892 (sort_member_init): Delete unused var INIT.
3893 (emit_base_init): Delete unused var X.
3894 (build_offset_ref): Delete unused var CNAME.
3895 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
3896 (emit_base_init): Delete unused local var BASE. Delete extern
3897 decl of IN_CHARGE_IDENTIFIER.
3898 (build_delete): Delete unused local var VIRTUAL_SIZE.
3899
3900 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
3901 (build_delete): Fix call.
3902 * decl2.c (delete_sanity): Likewise.
3903 * cp-tree.h (build_vec_delete): Update prototype.
3904
3905 * typeck.c (common_base_type): Delete unused var TMP.
3906 (build_binary_op): Delete local var ARGS_SAVE.
3907 (build_array_ref): Delete unused var ITYPE.
3908 (c_expand_return): Delete unused var USE_TEMP.
3909
3910 * typeck.c (compexcepttypes): Delete unused arg STRICT.
3911 (comptypes): Fix calls.
3912 * decl.c (duplicate_decls): Likewise.
3913 * cp-tree.h (compexcepttypes): Delete extra arg.
3914
3915 * decl2.c (check_classfn): Delete unused second arg CNAME.
3916 * decl.c (start_decl, grokfndecl): Fix calls.
3917 * init.c (do_friend): Likewise.
3918 * cp-tree.h (check_classfn): Update prototype.
3919
3920 * cp-tree.h (signature_error, import_export_vtable,
3921 append_signature_fields, id_in_current_class, mark_used,
3922 copy_assignment_arg_p): Add decls.
3923 * decl2.c (mark_used): Delete decl.
3924
3925 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
3926
3927 * class.c (get_vtable_entry): Diable unused function.
3928 (doing_hard_virtuals): Delete unused static global var.
3929 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
3930 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
3931 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
3932 (modify_one_vtable): Delete unused var OLD_RTTI.
3933 (finish_struct_anon): Delete unused vars OFFSET and X.
3934 (finish_struct_bits): Delete unused var METHOD_VEC.
3935 (get_basefndecls): Delete unused var PURPOSE. Delete unused
3936 for-scope local variable METHODS.
3937
3938 * call.c (user_harshness): Delete unused/unneeded arg PARM.
3939 (ideal_candidate): Delete unused args BASETYPE and PARMS.
3940 (build_method_call): Delete unused args passed into ideal_candidate.
3941 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
3942 * cp-tree.h (synthesize_method): Add decl.
3943
3944 * decl.c (note_level_for_for): Give void return type.
3945 (pushdecl_nonclass_level): Likewise.
3946 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
3947 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
3948 (suspend_binding_level): Delete unused var LEVEL.
3949 (duplicate_decls): Delete unused var CTYPE.
3950 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
3951 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
3952 PTR_ENDLINK.
3953 (grokdeclarator): Delete unused var C.
3954 (grokdeclarator): Delete unused var SIZE_VARIES.
3955 (grokparms): Delete unused var SAW_VOID.
3956 (start_function): Delete unused var OLDDECL.
3957 (cplus_expand_expr_stmt): Delete unused var
3958 REMOVE_IMPLICIT_IMMEDIATELY.
3959
3960 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
3961
3962 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
3963
3964Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
3965
3966 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
d11ad92e 3967 (build_min_nt): Likewise.
5566b478
MS
3968 * pt.c (do_pushlevel): Emit line note.
3969 (do_poplevel): Return what we get from poplevel.
3970 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
3971 * parse.y: Use do_pushlevel and do_poplevel.
3972 * cp-tree.h: Declare do_poplevel.
3973
3974 * cp-tree.h: Declare at_eof.
3975 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
3976 * decl2.c (import_export_decl): Renamed from import_export_inline.
3977 (finish_file): Call it to do interface handling for statics.
3978 * pt.c (tsubst_copy): Call mark_used on variables and functions
3979 used here.
3980
3981 * decl2.c (finish_file): Don't emit statics we can't generate.
3982 * pt.c (instantiate_decl): Don't set interface on instantiations
3983 we can't generate.
3984
3985 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
3986 * tree.c (print_lang_statistics): Print max template depth.
3987 * pt.c (push_tinst_level): Dump entire instantiation context.
3988 (instantiate_class_template): Use it and pop_tinst_level.
d11ad92e 3989 (instantiate_decl): Likewise.
5566b478
MS
3990
3991 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
3992 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
3993
3994Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
3995
3996 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
3997 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
3998 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
3999 the new template implementation.
4000
4001Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4002
4003 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
4004
cffa8729
MS
4005Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
4006
4007 * decl.c (cp_finish_decl): Delay emitting the debug information for
4008 a typedef that has been installed as the canonical typedef, if the
4009 type has not yet been defined.
4010
4011Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
4012
4013 * decl2.c (grokfield): Still call pop_nested_class for access decls.
4014
4015Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4016
4017 * decl.c (lookup_label): Call label_rtx.
4018
4019 * decl.c (make_binding_level): New function.
4020 (pushlevel, pushlevel_class): Call it instead of explicit
4021 duplicate calls to xmalloc.
4022
4023 * decl.c (init_decl_processing): Delete useless build_pointer_type
4024 call.
4025
4026 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
4027 (sizet_ftype_string): Delete variable.
4028 (init_decl_processing): Add built-in functions fabsf, fabsl,
4029 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
4030 variable strlen_ftype, used for strlen.
4031
4032Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
4033
4034 * decl.c (push_to_top_level): Start from current_binding_level
4035 again for now; the stl hacks depend on g++ being broken in this
4036 way, and it'll be fixed in the template rewrite.
4037
4038 * tree.def: Add USING_DECL.
4039 * decl2.c (do_class_using_decl): Implement.
4040 (grokfield): Pass access decls off to do_class_using_decl instead of
4041 grokdeclarator.
4042 * error.c (dump_decl): Handle USING_DECLs.
4043 * decl.c (grokdeclarator): Remove code for handling access decls.
4044 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
4045 as access decls for now.
4046 (finish_struct): Don't check USING_DECLs for other uses of the name.
4047
4048 * search.c (get_matching_virtual): Use cp_error_at.
4049
4050Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4051
4052 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
4053 match c-typeck.c.
4054 (self_promoting_args_p): Move the check that TYPE is non-nil
4055 before trying to look at its main variant.
4056 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
4057
4058 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
4059 Delete macros.
4060 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
4061 (do_friend): Delete call to xref_friend.
4062 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
4063
4064 * typeck.c (convert_sequence): #if 0 unused function.
4065
4066 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
4067 be in decl_in_memory_p.
4068 (decl_in_memory_p): Delete decl.
4069 * expr.c (decl_in_memory_p): Delete fn.
4070 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
4071
4072 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
4073
4074Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
4075
4076 * class.c (finish_struct_1): Check for a pure-specifier on a
4077 non-virtual function here.
4078
4079 * decl2.c (grok_function_init): Don't check whether the function
4080 is virtual here.
4081 (grokfield): Don't call check_for_override here.
4082
4083 * decl.c (push_to_top_level): Start from inner_binding_level,
4084 check class_shadowed in class levels.
4085
4086Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
4087
4088 * decl.c (resume_level): Ignore things that don't have names, instead
4089 of core dumping.
4090
4091Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4092
4093 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
4094
4095Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
4096
4097 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
4098 synthesized dtor.
4099
4100 * parse.y (complete_type_name): Bind global_scope earlier.
d11ad92e 4101 (complex_type_name): Likewise.
cffa8729
MS
4102 (qualified_type_name): Remove.
4103
2ee887f2
MS
4104Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
4105
4106 * decl.c (grokfndecl): Move code that looks for virtuals in base
4107 classes...
cffa8729 4108 * class.c (check_for_override): ... to a new function.
2ee887f2
MS
4109 (finish_struct_1): Call it.
4110
4111 * cp-tree.h: Declare warn_sign_compare.
4112
4113 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
4114 rather than extra_warnings to decide whether to warn about
4115 comparison of signed and unsigned.
4116
4117 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
4118 implies -Wsign-compare. -Wall doesn't imply -W.
4119
4120Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
4121
4122 * typeck.c (build_component_ref): Fix to handle anon unions in base
4123 classes as well.
4124
4125Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4126
4127 * class.c (resolves_to_fixed_type_p): Delete code dealing with
4128 a WITH_CLEANUP_EXPR, since we don't generate them any more.
4129 * cvt.c (build_up_reference): Likewise.
4130 * decl.c (grok_reference_init): Likewise.
4131 (cp_finish_decl): Likewise.
4132 * error.c (dump_expr): Likewise.
4133 * tree.c (real_lvalue_p): Likewise.
4134 (lvalue_p): Likewise.
4135 (build_cplus_new): Likewise.
4136 (unsave_expr_now): Likewise.
4137 * typeck.c (unary_complex_lvalue, build_modify_expr,
4138 c_expand_return): Likewise.
4139
4140Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4141
4142 Make the C++ front-end pay attention to attributes for structures.
4143 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
4144 finish_struct_1.
4145 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
4146 Take out old round_up_size use and setting the DECL_ALIGN possibly
4147 using it. Take out setting of TYPE_ALIGN to round_up_size, which
4148 can override what the attribute set.
4149 * cp-tree.h (finish_struct): Update prototype.
4150 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
4151 attributes to finish_struct.
4152 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
4153 value down into finish_struct.
4154 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
4155
4156Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
4157
4158 * decl.c (poplevel): Re-word dead for local handling.
4159 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
4160 (cp_finish_decl): If is_for_scope, check for duplicates so
4161 we can disable is_for_scope. Otherwise, preserve_temp_slots.
4162
4163 * lex.c (do_identifier): Use global binding in preference of
4164 dead for local variable.
4165
4166Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
4167
4168 * init.c (initializing_context): Handle anon union changes, the
4169 context where fields of anon unions can be initialized now has to be
4170 found by walking up the TYPE_CONTEXT chain.
4171
4172Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
4173
4174 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
4175 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
4176 (obscure_complex_init): If bss is supported, always set
4177 DECL_INITIAL to error_mark_node.
4178
4179Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4180
4181 * init.c (is_friend): Make sure there's a context before we see if
4182 it's an aggr type.
4183
4184Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
4185
4186 * init.c (is_friend): Classes are not friendly with nested classes.
4187
4188Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
4189
4190 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
4191 and record its result.
4192
9e9ff709
MS
4193Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
4194
4195 * class.c (finish_struct_anon): Switch around code to not move anon
4196 union elements around, nor mess up their contexts, nor offsets,
4197 instead we now build up the right number of COMPONENT_REFs for all
4198 the anon unions that may be present at build_component_ref time.
4199 * typeck.c (lookup_anon_field): New routine to handle field lookup
4200 on fields without names. We find them, based upon their unique type
4201 instead.
4202 * typeck.c (build_component_ref): Allow FIELD_DECL components.
4203 Handle finding components in anonymous unions, and ensure that a
4204 COMPONENT_REF is built for each level as necessary.
4205
4206Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
4207
4208 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
4209 code that ensures that copy ctors are used if appropriate.
4210
4211Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4212
4213 * init.c (build_vec_delete): Only give an error if base isn't an
4214 error_mark_node.
4215
4216Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
4217
4218 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
4219 (yylex): If we see `new', keep slurping.
4220
4221Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
4222
4223 * class.c (finish_struct_1): Move code for handling anon unions...
4224 (finish_struct_anon): to here. Fixup so that we do the offset
4225 calculations right, and so that the fields are physically moved to
4226 the containers's chain.
4227
4228Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4229
4230 * decl.c (grokdeclarator): Avoid trying to get an operand off an
4231 identifier node.
4232
4233Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
4234
4235 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
4236 POINTER_SIZE to agree with expr.c.
4237
4238Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
4239
4240 * search.c (lookup_field): Don't report ambiguities if protect is 0,
4241 instead return NULL_TREE.
4242
4243Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
4244
4245 * class.c (finish_struct_1): Call warn_hidden if we want warnings
4246 about overloaded virtual functions.
4247 (warn_hidden): New routine to warn of virtual functions that are
4248 hidden by other virtual functions, that are not overridden.
4249 (get_basefndecls): New routine, used by warn_hidden.
4250 (mark_overriders): New routine, used by warn_hidden.
4251 * search.c (get_matching_virtual): Remove old warning that just
4252 isn't very useful.
4253
4254Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4255
4256 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
4257
4258 * typeck.c (null_ptr_cst_p): Delete unused fn.
4259 (build_function_call_maybe): Delete unused fn.
4260
4261 * expr.c (extract_init): #if 0 the code after unconditional return 0
4262 for now.
4263
4264 Delete old cadillac code.
4265 * edsel.c: Remove file.
4266 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
4267 * Makefile.in (CXX_OBJS): Delete edsel.o.
4268 (edsel.o): Delete rule.
4269 * cp-tree.h (flag_cadillac): Delete var decl.
4270 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
4271 * decl2.c (flag_cadillac): Delete var definition.
4272 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
4273 (grokfield): Delete code depending on flag_cadillac.
4274 (finish_anon_union): Likewise.
4275 * class.c (finish_struct_1): Likewise.
4276 (pushclass): Likewise.
4277 (popclass): Likewise.
4278 (push_lang_context): Likewise.
4279 (pop_lang_context): Likewise.
4280 * decl.c (init_decl_processing): Likewise.
4281 (start_decl): Likewise.
4282 (cp_finish_decl): Likewise.
4283 (xref_tag): Likewise.
4284 (finish_enum): Likewise.
4285 (start_function): Likewise.
4286 (finish_function): Likewise.
4287 (finish_stmt): Likewise.
4288 * lex.c (lang_init): Likewise.
4289 (check_newline): Likewise.
4290
4291 * lex.c (do_pending_inlines): Delete synthesized method kludge.
4292
4293 Delete defunct, ancient garbage collection implementation.
4294 * rtti.c: New file with the RTTI stuff from gc.c.
4295 * gc.c: Removed file (moved the remaining stuff into rtti.c).
4296 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
4297 (rtti.o): New rule, replacing gc.o.
4298 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
4299 * cp-tree.h: Delete gc-related fn decls.
4300 (DECL_GC_OFFSET): Delete macro.
4301 (flag_gc): Delete extern decl.
4302 * decl.c (current_function_obstack_index): Delete var decl.
4303 (current_function_obstack_usage): Delete var decl.
4304 (start_function): Delete clearing of current_function_obstack_index
4305 and current_function_obstack_usage.
4306 (init_decl_processing): Delete code relying on -fgc.
4307 Delete call to init_gc_processing.
4308 (cp_finish_decl): Delete calls to build_static_gc_entry and
4309 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
4310 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
4311 and to expand_expr of a __gc_main call.
4312 (maybe_gc_cleanup): Delete var decl.
4313 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
4314 * decl2.c (flag_gc): Delete var decl.
4315 (lang_f_options): Delete offering of -fgc.
4316 (lang_decode_option): Delete -fgc and -fno-gc handling.
4317 (get_temp_regvar): Delete gc code.
4318 * init.c (build_new): Delete gc code.
4319 * lex.c (init_lex): Delete checking of flag_gc.
4320
4321 * typeck.c (convert_arguments): Delete gc code.
4322 (build_component_addr): Delete -fgc warning.
4323 (build_modify_expr): Delete gc code.
4324
4325 * decl2.c (build_push_scope): Delete fn.
4326 * cp-tree.h (build_push_scope): Delete decl.
4327
4328 * search.c (clear_search_slots): Delete fn.
4329 * cp-tree.h (clear_search_slots): Delete decl.
4330
4331 * search.c (tree_needs_constructor_p): Delete fn.
4332 * cp-tree.h (tree_needs_constructor_p): Delete decl.
4333
4334 * tree.c (id_cmp): Delete fn.
4335
4336 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
4337 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
4338
4339 * tree.c (decl_value_member): Delete fn.
4340 * cp-tree.h (decl_value_member): Delete decl.
4341
4342 * tree.c (list_hash_lookup_or_cons): Delete fn.
4343 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
4344
4345 * method.c (cplus_exception_name): Delete fn.
4346 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
4347
4348 * spew.c (shift_tokens): Delete fn.
4349
4350Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4351
4352 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
4353 to cp_finish_decl.
d11ad92e 4354 * parse.y: Likewise.
9e9ff709
MS
4355
4356Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4357
4358 * tree.c (build_cplus_staticfn_type): Delete function definition;
4359 never used.
4360 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
4361
4362 * tree.c (virtual_member): Delete function definition; never used.
4363 * cp-tree.h (virtual_member): Delete decl.
4364
45537677
MS
4365Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
4366
4367 * typeck.c (build_component_ref): Handle getting vbase pointers
4368 out of complex multiple inheritance better.
4369
4370Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
4371
4372 * typeck.c (build_object_ref): Make sure we use the real type, not
4373 any reference type.
4374
4375Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
4376
4377 * tree.c (build_exception_variant): Don't create new types if we
4378 don't have to, also build new types on the right obstack.
4379
4380Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
4381
4382 * decl.c (store_bindings): Split out from push_to_top_level.
9e9ff709
MS
4383 (push_to_top_level): Call it for b->type_shadowed on class binding
4384 levels.
45537677
MS
4385
4386Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
4387
4388 * search.c (expand_upcast_fixups): Fix so that offsets stored in
4389 vbase_offsets are always right. Fixes a problem where virtual base
4390 upcasting and downcasting could be wrong during conversions on this
4391 during virtual function dispatch at ctor/dtor time when dynamic
4392 vtable fixups for deltas are needed. This only sounds easier than
4393 it is. :-)
4394 (fixup_virtual_upcast_offsets): Change to reflect new calling
4395 convention for expand_upcast_fixups.
4396
4397Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4398
4399 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
4400 check that it's usable as the bitfield width.
4401
4402Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4403
4404 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
4405 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
4406 only ever used for functions in it.
4407
4408Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4409
4410 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
d11ad92e 4411 (nested_type): Likewise.
45537677
MS
4412 (nested_name_specifier): Use lastiddecl.
4413
4414 * decl.c (grokdeclarator): Adjust accordingly.
d11ad92e
MS
4415 * init.c (expand_member_init): Likewise.
4416 * parse.y (base_class): Likewise.
4417 * typeck2.c (build_functional_cast): Likewise.
45537677
MS
4418
4419 * typeck2.c (build_functional_cast): Fill in name after we've
4420 checked for non-aggr type.
4421
be99da77
MS
4422Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
4423
4424 * decl2.c (warn_pointer_arith): Default to on.
4425
4426Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
4427
4428 * lex.c (is_rid): New function.
4429 * decl.c (grokdeclarator): Diagnose reserved words used as
4430 declarator-ids.
4431
4432Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
4433
4434 * tree.c (get_decl_list): Don't lose cv-quals.
4435
4436 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
4437 typespecs used as declarator-ids.
4438
4439Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
4440
4441 * decl.c (poplevel): When poping a level, don't give a warning for
4442 any subblocks that already exist.
4443
4444Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
4445
4446 * typeck.c (build_object_ref): Finish what I started.
4447
4448 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
4449
4450 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
4451
4452 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9e9ff709 4453 scope.
be99da77
MS
4454
4455Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
4456
4457 * decl.c (xref_tag): Handle passing a type in directly.
4458
4459 * parse.y (qualified_type_name): Pull out the type.
d11ad92e 4460 (nested_type): Likewise.
be99da77
MS
4461 Take types directly instead of as identifiers.
4462 * call.c (build_scoped_method_call): Take types directly instead of
9e9ff709 4463 as identifiers.
d11ad92e
MS
4464 * decl.c (xref_basetypes): Likewise.
4465 * init.c (expand_member_init): Likewise.
4466 (build_member_call): Likewise.
4467 (build_offset_ref): Likewise.
4468 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
4469 * method.c (do_build_assign_ref): Likewise.
be99da77
MS
4470 * decl.c (grokdeclarator): Handle a type appearing as the
4471 declarator-id for constructors.
4472 * method.c (do_build_copy_constructor): current_base_init_list now
4473 uses the types directly, not their names.
d11ad92e
MS
4474 * init.c (sort_base_init): Likewise.
4475 (expand_member_init): Likewise.
be99da77 4476 * init.c (is_aggr_type): New function, like is_aggr_typedef.
be99da77 4477
d11ad92e 4478Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
be99da77
MS
4479
4480 * tree.c (layout_basetypes): Call build_lang_field_decl instead
4481 of build_lang_decl if first arg is a FIELD_DECL.
be99da77
MS
4482
4483Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4484
4485 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
4486 non-empty.
4487 * except.c (expand_start_catch_block): Set TREE_USED to avoid
4488 warnings about the catch handler.
4489
4490Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
4491
4492 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9e9ff709 4493 expand_target_expr.
be99da77
MS
4494
4495Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
4496
4497 Fix access control to use trees rather than integers.
4498 * class.c (access_{default, public, protected, private,
4499 default_virtual, public_virtual, private_virtual}_node): Add
4500 definitions.
4501 (init_class_processing): Do creation of those nodes.
4502 * cp-tree.h (access_type): Delete enum decl.
4503 (access_{default, public, protected, private, default_virtual,
4504 public_virtual, private_virtual}_node): Add decls.
4505 (compute_access): Change return type.
4506 * search.c (compute_access): Have tree return type, instead of enum.
4507 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
4508 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
4509 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
4510 * parse.y (VISSPEC): Make ttype rather than itype.
4511 (base_class_access_list): Likewise.
4512 * *.[cy]: Change all refs of `access_public' to `access_public_node',
4513 etc.
4514 * call.c (build_method_call): Make ACCESS be a tree.
4515 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
4516 * cvt.c (convert_to_aggr): Likewise.
4517 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
4518 Likewise.
4519 * method.c (hack_identifier): Likewise.
4520 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
4521
4522Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
4523
4524 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
4525 frontend, and make it more consistent with respect to
4526 warn_pointer_arith.
4527
4528Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
4529
4530 * decl.c (pushdecl): Check for duplicate parameter names.
4531
4532Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
4533
4534 * decl.c (expand_static_init): Call assemble_external for atexit.
4535
4536Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
4537
4538 * except.c (do_unwind): Remove some generated dead code.
4539 (eh_outer_context): New routine, factor out some common code from
4540 expand_builtin_throw and end_eh_unwinder. Add code to do return
4541 address masking for the PA.
4542 (expand_builtin_throw): Use eh_outer_context instead of open coding
4543 it here.
d11ad92e 4544 (end_eh_unwinder): Likewise.
be99da77
MS
4545
4546Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
4547
4548 * except.c (expand_throw): Call assemble_external for __empty, if we
4549 use it.
4550
21451173
MS
4551Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
4552
4553 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
4554 NORMAL_RETURN_ADDR_OFFSET.
d11ad92e 4555 (end_eh_unwinder): Likewise.
21451173
MS
4556
4557Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
4558
4559 * gc.c (build_dynamic_cast): Make sure we don't cast away const
4560 when dealing with references, and make sure we handle dynamic
4561 casting to a cv qualified reference.
4562
4563Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
4564
4565 * except.c (struct eh_context): New structure top hold eh context
4566 information.
4567 (push_eh_context): New routine.
d11ad92e 4568 (pop_eh_context): Likewise.
21451173 4569 * decl.c (push_cp_function_context): Use them.
d11ad92e 4570 (pop_cp_function_context): Likewise.
21451173
MS
4571
4572Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
4573
4574 * decl2.c (finish_file): Also prune uninteresting functions in the
4575 inline emission loop.
4576
d11ad92e 4577Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
21451173
MS
4578
4579 * sig.c (build_signature_table_constructor): Mark functions
4580 in the signature as referenced.
4581
4582Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
4583
4584 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
4585 the inline emission stuff.
4586
72b7eeff
MS
4587Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
4588
4589 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9e9ff709 4590 weak symbols.
72b7eeff
MS
4591 * lang-options.h: Add -f{no-,}weak.
4592 * decl.c (init_decl_processing): If the target does not support weak
4593 symbols, don't use them.
4594 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
4595
4596Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4597
4598 * init.c (expand_member_init): warning for base init after members.
4599
72b7eeff
MS
4600Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4601
4602 * cvt.c (build_expr_type_conversion): Don't convert to a reference
4603 type.
4604
4605Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
4606
4607 * method.c (report_type_mismatch): Improve wording for volatile
4608 mismatches.
4609
4610Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
4611
4612 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9e9ff709 4613 expand_assignment, as the later doesn't handle things that have
72b7eeff
MS
4614 copy constructors well. The compiler would do bitwise copying,
4615 instead of ctor calling in some cases.
4616
4617Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
4618
4619 * g++.c (my_strerror): Return "cannot access" if errno is 0.
4620 (pfatal_with_name, perror_exec): Don't assume that
4621 the returned value from my_strerror contains no '%'s.
4622 (concat): Remove.
4623 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
4624
4625Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
4626
4627 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
4628 TYPE_METHODS/TREE_CHAIN mean what they used to.
4629 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
4630 instead of TYPE_METHODS.
4631 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
d11ad92e 4632 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
72b7eeff
MS
4633 * cp-tree.h (CLASSTYPE_METHODS): Lose.
4634 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
4635 TYPE_METHODS.
4636 (struct lang_decl): Lose next_method field.
4637 (DECL_NEXT_METHOD): Lose.
4638 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
4639 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
4640 anymore.
4641 (finish_struct_methods): Don't mess with the TREE_CHAINs in
4642 fn_fields.
4643
4644 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
4645 vector.
4646
4647 * call.c (build_method_call): Synthesize here even when not inlining.
d11ad92e 4648 * typeck.c (build_function_call_real): Likewise.
72b7eeff
MS
4649
4650Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
4651
4652 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
4653 == DBX_DEBUG, call dbxout_start_new_source_file and
4654 dbxout_resume_previous_source_file when appropriate.
4655
4656Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
4657
4658 * except.c (start_anon_func): Push to the top level.
4659 (end_anon_func): Pop from the top level.
4660
4661Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
4662
4663 * cp-tree.h (build_cleanup): New routine to build cleanups.
4664 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
4665 call at ctor time and use atexit to run it later.
4666 * decl2.c (build_cleanup): New routine, taken from finish_file.
4667 (finish_file): Use build_cleanup instead, and don't put function
4668 local statics in global dtor list.
4669
4670Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
4671
4672 * except.c (expand_throw): Ensure that we have cleanups, if we try
4673 and expand cleanups.
4674
4675Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
4676
4677 * except.c (expand_throw): Add logic to manage dynamic cleanups for
4678 the EH object.
4679 (expand_end_catch_block): Use the magic of expand_goto, instead of
4680 emit_jump so that we get the cleanup for any catch clause parameter
4681 and the cleanup for the exception object. Update to reflect label
4682 changes.
4683 (push_eh_cleanup): New routine to register a cleanup for an
4684 exception object.
9e9ff709 4685 (empty_fndecl): Used to default cleanup actions to
72b7eeff
MS
4686 nothing.
4687 (init_exception_processing): Setup empty_fndecl. Setup
4688 saved_cleanup.
4689 (expand_start_catch_block): Update to reflect label changes. Call
4690 push_eh_object to register the cleanup for the EH object.
4691 (start_anon_func): New routine to start building lambda expressions
4692 from trees.
4693 (end_anon_func): New routine to end them.
4694 (struct labelNode): Change so that we can use tree labels, or rtx
4695 labels.
4696 (saved_cleanup): Object to check for dynamic cleanups for the
4697 exception handling object.
4698 (push_label_entry): Change so that we can use tree labels, or rtx
4699 labels.
d11ad92e
MS
4700 (pop_label_entry): Likewise.
4701 (top_label_entry): Likewise.
72b7eeff
MS
4702 (expand_start_all_catch): Use tree label instead of rtx label, so
4703 that we can get the magic of expand_goto.
4704 (expand_end_all_catch): Update to reflect label changes.
4705
4706 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
4707 use UNSAVE_EXPRs.
4708 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
4709 building_cleanup logic, as we now use UNSAVE_EXPRs.
4710 * cp-tree.h (unsave_expr): Declare it.
4711 * decl.c (building_cleanup): Remove.
4712 (maybe_build_cleanup): Remove building_cleanup logic, and use
4713 UNSAVE_EXPR instead.
4714
4715Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
4716
4717 * gc.c (build_t_desc): Update error message to say <typeinfo>.
4718
4719Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4720
4721 * decl.c (pushdecl): Only warn about shadowing a local variable if
4722 warn_shadow is true.
4723
4724Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
4725
4726 * typeck.c (build_binary_op_nodefault): Added warning about
4727 comparisons between different enum types with -Wall, unless
4728 -fenum-int-equiv set.
4729
4730Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
4731
4732 * class.c (finish_struct_1): Skip down to the inner type in
4733 multidimensional arrays. Ensures ctors will be made for types that
4734 need constructing.
4735
4736Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
4737
4738 * decl.c (last_dtor_insn): New to track the last compiler generated
4739 insn in a dtor.
4740 (store_parm_decls): Set it.
4741 (finish_function): Use it to see if the dtor is empty. Avoid doing
4742 vtable setup all the time, if we can.
4743 (struct cp_function): Add last_dtor_insn.
4744 (push_cp_function_context): Save it.
4745 (pop_cp_function_context): Restore it.
4746
4747Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
4748
4749 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9e9ff709 4750 warnings.
72b7eeff
MS
4751
4752Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
4753
4754 * typeck.c (expand_target_expr): Make sure targets get put into the
4755 current temp_slot_level, so that the free_temp_slots call will reuse
4756 them.
4757
4758Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
4759
4760 * class.c (finish_struct_1): Delay delta fixups for virtual bases
4761 until after we have done the hard virtuals, to avoid a bogus `every
4762 virtual function must have a unique final overrider' for virtual
4763 functions that are only overridden by hard virtuals.
4764
4765Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4766
4767 * pt.c (do_function_instantiation): Don't try to find a file-scope
9e9ff709 4768 template for a member function.
72b7eeff
MS
4769
4770Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
4771
4772 * g++.c (main): Add handling of -nodefaultlibs.
4773
4774Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
4775
4776 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
4777 distinguish between direct bindings of reference variables, and
4778 indirect bindings of reference variables.
4779 * cvt.c (build_up_reference): Use it.
4780 * typeck.c (convert_arguments): Use it to indicate this is an
4781 indirect binding.
4782 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
4783 as they are unused.
d11ad92e
MS
4784 (expand_static_init): Likewise.
4785 (cplus_expand_expr_stmt): Likewise.
4786 * decl2.c (finish_file): Likewise.
4787 * init.c (perform_member_init): Likewise.
4788 (emit_base_init): Likewise.
4789 (expand_aggr_vbase_init_1): Likewise.
72b7eeff 4790
72b7eeff
MS
4791Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4792
4793 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
4794 get a DECL_LANG_SPECIFIC node.
4795 * cp-tree.h (lang_decl_flags): Add new member `level'.
4796 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
4797 decl_flags level member.
4798
4799Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4800
4801 * call.c (build_method_call): Make sure instance has a
4802 TYPE_LANG_SPECIFIC node before we dive into it.
4803
d11ad92e 4804Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
72b7eeff
MS
4805
4806 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
4807
4808Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
4809
4810 * decl.c (duplicate_decls): When smashing decls, smash staticness in
4811 the usual way.
4812
4813Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
4814
4815 * decl.c (poplevel): Handle the merging of subblocks of cleanups
4816 when finishing blocks that have already been created (usually due to
4817 the fixup goto code). Fixes bad debugging information.
4818
4819Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
4820
4821 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
4822 that's not a list of overloaded functions.
4823
4824Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4825
4826 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
4827 before trying to use DECL_ABSTRACT_VIRTUAL_P.
4828
4829Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
4830
4831 * decl2.c (mark_used): New function for hooking into setting of
4832 TREE_USED on decls.
4833 * call.c (build_method_call): Use it.
d11ad92e
MS
4834 * class.c (instantiate_type): Likewise.
4835 * init.c (build_offset_ref): Likewise. Don't call assemble_external
72b7eeff 4836 for all like-named functions.
d11ad92e 4837 * method.c (hack_identifier): Likewise.
72b7eeff
MS
4838 (emit_thunk): Don't call assemble_external.
4839 (make_thunk): Create thunk as a FUNCTION_DECL so that it
4840 gets the right mode and ENCODE_SECTION_INFO works.
4841
4842 * parse.y: Use mark_used. Pass operator names to do_identifier.
4843 * lex.c (do_identifier): Handle operator names.
4844
4845 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
4846
72b7eeff
MS
4847Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4848
4849 * errfn.c: Include stdio.h.
4850 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
4851
4852Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
4853
4854 * typeck2.c (digest_init): Always convert initializers to the
4855 right type.
4856
4857Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
4858
4859 * init.c (member_init_ok_or_else): Don't allow member initializers
4860 for indirect members, as it is invalid.
4861
4862Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4863
4864 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
4865
4866Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
4867
4868 * parse.y (for.init.statement): Catch compound statements inside for
4869 initializations, if we're being pedantic.
4870
4871Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
4872
4873 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
4874 looking for.
4875
4876Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
4877
4878 * error.c (dump_expr): Don't core dump when a boolean expression is
4879 used as a default argument.
4880
4881Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
4882
4883 * class.c (finish_struct_bits): Check aggregate_value_p instead of
9e9ff709 4884 RETURN_IN_MEMORY.
72b7eeff
MS
4885
4886Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
4887
4888 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
4889 BLKmode type that would otherwise be returned in registers.
4890
4891Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4892
4893 * g++.c (WITHLIBC): New macro.
4894 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
4895 saw_libc and pass it at the end if it was set.
4896
4897Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
4898
4899 * parse.y (fn.def1): Call split_specs_attrs in
4900 declmods notype_declarator case.
4901
21451173 4902Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu>
1b898c06
MS
4903
4904 * Version 2.7.2 released.
4905
4906Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com>
4907
4908 * g++.c (pfatal_with_name): Add missing third argument to concat.
4909
e7843f33
MS
4910Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com>
4911
4912 * init.c (expand_aggr_init): Handle cv qualifiers on the object's
4913 type.
4914
21451173 4915Sat Nov 11 08:25:55 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
07674418
MS
4916
4917 * Version 2.7.1 released.
4918
4919Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com>
4920
4921 * call.c (convert_harshness): Handle references to arrays.
4922
4923Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com>
4924
4925 * typeck.c (comp_target_types): Check multi-level pointer
4926 conversions in both directions.
4927
4928Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com>
4929
4930 * parse.y (explicit_instantiation): Fix 'extern template' with no
4931 return type.
4932
4933Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com>
4934
4935 * parse.y (explicit_instantiation): Support automatic instantiation
4936 of constructors.
4937 (named_class_head_*): Support out-of-class definition of nested
4938 types.
4939
f30432d7
MS
4940Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com>
4941
4942 * search.c (envelope_add_decl): New routine. Fix so that
4943 methods are hidden in the same way that other members are.
4944 (dfs_pushdecls): Cleanup and move functionality out of line,
4945 into envelope_add_decl.
4946
4947Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com>
4948
4949 * typeck.c (mark_addressable): Only call assemble_external if we
4950 have started the output file.
4951
4952Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com>
4953
4954 * decl.c (start_function): Fix earlier cv-quals change.
4955
4956Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com>
4957
4958 * parse.y (complex_direct_notype_declarator): Only push the class if
4959 we are not already in the class.
4960
4961Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com>
4962
4963 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
4964 Update olddecl's attributes too.
4965 (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
4966 * typeck.c (common_type): Call merge_machine_type_attributes.
4967
4968Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com>
4969
4970 * typeck.c (mark_addressable): Add missing call to
4971 assemble_external.
4972
f30432d7
MS
4973Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com>
4974
4975 * decl.c (store_parm_decls): Make sure the unwinder start comes
4976 before the exception specification start.
4977 * except.c (expand_exception_blocks): Make sure the unwinder end
4978 comes after the terminate protected catch clause region and after
4979 the end of the exception specification region.
4980
4981Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com>
4982
4983 * lex.c (real_yylex): Fix identifier case for linemode.
4984 (handle_sysv_pragma): Don't abort when we see a pragma we don't
4985 recognize.
4986
4987Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com>
4988
4989 * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
4990 * except.c (init_exception_processing): __throw doesn't take any
4991 arguments.
d11ad92e 4992 (expand_builtin_throw): Likewise. Always use Pmode, instead of SImode
f30432d7
MS
4993 for all pointers. Use expand_builtin_return_addr to unwind the
4994 first level off the stack.
4995 (do_unwind): Always use Pmode, instead of SImode for all pointers.
4996 (expand_exception_blocks): Add a call to end_eh_unwinder.
4997 (start_eh_unwinder, end_eh_unwinder): New routines to build machine
4998 independent stack unwinders for function/method calls.
4999
5000Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com>
5001
5002 * tree.c (unsave_expr_now): Make sure we process the argument list
5003 of any called functions. Fixes incorrect code generation for
5004 cleanups.
5005
5006Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com>
5007
5008 * typeck.c (get_member_function_from_ptrfunc): Save function if it
5009 needs it. Cures core dump on things like (this->*(f()))().
5010
5011Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5012
5013 * decl.c (start_function): Conform to gcc cv-quals convention (no
5014 expression has a cv-qualified type) in RESULT_DECLs.
d11ad92e 5015 * method.c (make_thunk): Likewise.
f30432d7
MS
5016
5017Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com>
5018
5019 * decl.c (pushtag): Add in the namespace name for the tag.
5020
5021Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com>
5022
5023 * parse.y (maybe_base_class_list, base_class_list, base_class,
5024 base_class_access_list): Make sure we see the typenames for base
5025 classes.
5026 * lex.c (see_typename): Instead of failing to see a typename when
5027 there is no next token, perfer a typename, and get the next token.
5028
5029Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com>
5030
5031 * decl.c (init_decl_processing): Add __builtin_expect.
5032
5033Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com>
5034
5035 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
5036 or from pointer to member functions, they must all be handled before
5037 this point.
5038
5039Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5040
5041 * init.c (resolve_offset_ref): Fix wording of non-static member
5042 being referenced as a static.
5043
5044Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5045
5046 * typeck.c (build_indirect_ref): Only bash pointer if we actually
5047 call build_expr_type_conversion.
5048
5049Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com>
5050
5051 * cvt.c (build_expr_type_conversion): Handle conversion from
5052 reference.
5053 * typeck.c (build_indirect_ref): Avoid infinite recursion.
5054
5055Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com>
5056
5057 * decl.c (expand_start_early_try_stmts): New routine to start a try
5058 block at the start of the function, for function-try-blocks.
5059 * cp-tree.h (expand_start_early_try_stmts): Declare it.
5060 * parse.y (function_try_block): Use it, instead of doing it here, as
5061 we don't want to include rtl.h here, as that conflicts with RETURN
5062 in the parser.
5063
5064Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com>
5065
5066 * lex.c (reinit_parse_for_block): Support saving inline
5067 function-try-blocks, uses peekyylex.
5068 * parse.y (eat_saved_input): New rule, permit the parser to see that
5069 END_OF_SAVED_INPUT is ok, as it can see this when parsing the
5070 handlers of a function-try-block.
5071 (fndef): Use it.
5072 (component_decl): Make sure TRY and RETURN can come after fn.def2.
5073 * spew.c (peekyylex): New routine to peek at what will come next.
5074
cf54380f
JM
5075Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5076
f30432d7 5077 * typeck.c (comptypes): Tighten up comparisons of template type
9e9ff709 5078 parms.
f30432d7 5079
cf54380f
JM
5080 * decl.c (duplicate_decls): Turn off whining about virtual functions
5081 redeclared inline for now.
5082
f30432d7
MS
5083Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com>
5084
5085 * decl.c (store_in_parms): New routine to put things before we
5086 put base inits.
5087 * cp-tree.h (store_in_parms): Declare it.
5088 * decl.c (store_parm_decls): Use it to makr sure the starting of the
5089 eh spec comes before base inits.
5090 (finish_function): Use sequences instead of the obsolete
5091 reorder_insns.
5092 * parse.y (fndef): Enhance readability and maintainability. Update
5093 to include function_try_block syntax.
5094 (function_try_block): Add.
5095
5096Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5097
5098 * call.c (convert_harshness): Use comptypes, not ==, to check if
5099 TYPE and PARMTYPE are equivalent on a function type.
5100
d11ad92e 5101Tue Sep 12 17:31:33 1995 Douglas Rupp <drupp@cs.washington.edu>
2453e8d1
DR
5102
5103 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
5104
f30432d7
MS
5105Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com>
5106
5107 * except.c (expand_throw): Never allocate storage for thrown pointer
5108 to objects.
5109
5110Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com>
5111
5112 * except.c (expand_start_catch_block): Pointers to objects come
5113 back from catch matching already dereferenced, don't dereference
5114 again.
5115
5116Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com>
5117
5118 * except.c (expand_throw): Only decay the throw expression, don't do
5119 any default conversions. This is so that one can throw and catch
5120 characters, and not have them match integers.
5121
5122Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com>
5123
5124 * error.c (dump_aggr_type): Deal with anonymous unions that don't
5125 have a TYPE_NAME.
5126
38267a70
BK
5127Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5128
5129 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
5130
f30432d7
MS
5131Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com>
5132
5133 * except.c (expand_end_eh_spec): Handle empty EH specifications.
5134
5135Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com>
5136
5137 * cp-tree.h (expand_start_eh_spec): Declare new routine.
d11ad92e 5138 (expand_end_eh_spec): Likewise.
f30432d7
MS
5139 * decl.c (store_parm_decls): Call expand_start_eh_spec to process
5140 exception specifications.
5141 * except.c (expand_leftover_cleanups): Remove unused parameter.
d11ad92e
MS
5142 (expand_end_catch_block): Likewise.
5143 (expand_exception_blocks): Likewise.
f30432d7
MS
5144 (expand_start_eh_spec): New routine to mark the start of an
5145 exception specification region.
5146 (expand_end_eh_spec): New routine to mark the end of an exception
5147 specification region.
5148 (expand_exception_blocks): Call expand_end_eh_spec to process
5149 exception specifications.
5150
b37d04bc
PB
5151Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com>
5152
5153 * lex.c (do_identifier): Use global binding in preference of
5154 dead for local variable.
5155
f30432d7
MS
5156Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com>
5157
5158 * cp-tree.h (build_exception_variant): Remove used first argument.
d11ad92e
MS
5159 * decl.c (duplicate_decls): Likewise.
5160 (grokfndecl): Likewise.
5161 (revert_static_member_fn): Likewise.
5162 * decl2.c (grok_method_quals): Likewise.
5163 * tree.c (build_exception_variant): Likewise.
5164 * typeck.c (common_type): Likewise.
f30432d7
MS
5165 * decl2.c (grokclassfn): After changing the type, call
5166 build_exception_variant, if necessary.
5167
5168Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com>
5169
5170 * except.c (expand_throw): Run cleanups for the throw expression.
5171
d11ad92e 5172Wed Aug 30 15:24:38 1995 Stephen L. Favor <sfavor@tigger.intecom.com>
f30432d7
MS
5173
5174 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
5175 the store_parm_decls call which does initialization in the emit_*
5176 code concerning label numbering.
5177
5178Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com>
5179
5180 * except.c (expand_internal_throw): Let the frontend be responsible
5181 for managing all frontend EH parameters, the backend routine only
5182 needs to deal with backend values. type and value are no longer
5183 passed to __throw.
d11ad92e
MS
5184 (init_exception_processing): Likewise.
5185 (expand_start_all_catch): Likewise.
5186 (expand_end_all_catch): Likewise.
5187 (expand_leftover_cleanups): Likewise.
5188 (expand_end_catch_block): Likewise.
5189 (expand_builtin_throw): Likewise.
5190 (expand_throw): Likewise.
f30432d7
MS
5191
5192Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5193
5194 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
5195 for a decl.
5196 * decl.c (cp_finish_decl): Use it.
5197
5198Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com>
5199
5200 * except.c (expand_internal_throw): Oops, almost forgot type and
5201 value are now trees.
5202
5203Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5204
5205 Fix the attribute handling to make sure they get noted before we
5206 create the function's RTL, in case they can affect that.
5207 * decl.c (grokfndecl): New arg ATTRLIST. Run
5208 cplus_decl_attributes before creating the decl's rtl.
5209 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
5210 (shadow_tag, groktypename, start_decl, start_method): Pass a
5211 NULL_TREE to grokdeclarator's new last arg.
5212 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
5213 (grokbitfield, grokoptypename): Pass a NULL_TREE to
5214 grokdeclarator's new last arg.
5215 * except.c (expand_start_catch_block): Likewise.
5216 * pt.c (process_template_parm, end_template_decl,
5217 do_function_instantiation): Likewise.
5218 * cp-tree.h (grokfield): Add arg.
5219 (grokdeclarator): Move the prototype from here...
5220 * decl.h: ...to here.
5221 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
5222 ATTRLIST argument.
5223 * parse.y: Create a list for the grokfield arg where appropriate,
5224 and pass it down instead of calling cplus_decl_attributes.
5225
5226Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com>
5227
5228 * except.c: Always allow turning on exception handling. Allow cross
5229 compilations to use EH.
5230
5231Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com>
5232
5233 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
5234 trees, instead of rtxs, and don't depend on using special machine
5235 dependent registers.
d11ad92e
MS
5236 (expand_internal_throw): Likewise.
5237 (init_exception_processing): Likewise.
5238 (expand_start_all_catch): Likewise.
5239 (expand_end_all_catch): Likewise.
5240 (expand_start_catch_block): Likewise.
5241 (expand_leftover_cleanups): Likewise.
5242 (expand_end_catch_block): Likewise.
5243 (expand_builtin_throw): Likewise.
5244 (expand_throw): Likewise.
f30432d7
MS
5245
5246Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5247
5248 * cvt.c (build_expr_type_conversion): Handle conversions to
5249 reference types.
5250
5251Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com>
5252
5253 * except.c (do_unwind): Work around backend bug with -fpic.
5254
fb409a19
PB
5255Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com>
5256
5257 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI
5258 for-scoping, but supports (and warns about) old programs.
5259 Make the new mode (with value 1) the default.
5260 (lang_f_options): The on-value for flag_new_for_scope is now 2.
5261 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
5262 (DECL_SHADOWED_FOR_VAR): Likewise.
5263 * decl.c (struct binding_level): New fields dead_vars_from_for
5264 and is_for_scope.
5265 (note_level_for_for): New function.
5266 (poplevel): Special processing if is_for_scope.
5267 (pushdecl): Warn if for-scope variable shadows local.
5268 * lex.c (do_identifier): Handle old (non-ANSI) for scoping,
5269 and warn if conflicts.
5270 * parse.y (FOR): Call note_level_for_for.
5271
f30432d7
MS
5272Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com>
5273
5274 * decl2.c (import_export_inline): Class interface hackery does not
5275 apply to synthesized methods.
5276
5277Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com>
5278
5279 * search.c (virtual_context): Find the right context more often.
5280 Solves a `recoverable compiler error, fixups for virtual function'
5281 problem.
5282
5283Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com>
5284
5285 * except.c (expand_start_all_catch): Ensure that we always transfer
5286 control to the right EH handler, by rethrowing the end label on the
5287 region, instead of hoping we are nested and falling through.
d11ad92e 5288 (expand_leftover_cleanups): Likewise.
f30432d7
MS
5289 (end_protect): Since we now rethrow the end label, put a
5290 nop after it, so that outer regions are recognized.
5291 * init.c (build_vec_delete_1): New routine to handle most of vector
5292 deleting, all code moved here from build_vec_delete.
5293 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
5294 work.
5295 (expand_vec_init): If the array needs partial destructing, setup an
5296 EH region to handle it.
5297 (build_vec_delete): Move lots of code to build_vec_delete_1, use
5298 build_vec_delete_1 to do the grunt work.
5299
5300Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5301
5302 Handle decl attributes properly for function definitions without
5303 previous attribute-loaded declarations.
5304 * decl.c (start_function): New arg ATTRS. Add a call to
5305 cplus_decl_attributes with it before we create the RTL.
5306 * cp-tree.h (start_function): Update prototype.
5307 * parse.y (fn.def1): Pass ATTRS into start_function instead of
5308 trying to call cplus_decl_attributes too late. Pass a NULL_TREE
5309 for other use.
5310 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
5311 start_function.
5312 * method.c (synthesize_method): Likewise.
5313 * except.c (expand_builtin_throw): Likewise for start on __throw.
5314
5315Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com>
5316
5317 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
5318 This changes -fvtable-thunks vtable layout, so a recompile will be
5319 necessary, if you use -fvtable-thunks.
5320 (get_vtable_entry): Use n, instead of i to be consistent with the
5321 rest of the compiler.
d11ad92e 5322 (get_vtable_entry_n): Likewise.
f30432d7
MS
5323 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
5324 are being used.
d11ad92e 5325 (finish_struct_1): Likewise.
f30432d7
MS
5326 (skip_rtti_stuff): New routine to collapse similar code from many
5327 different parts of the compiler. I think I got them all.
5328 (modify_one_vtable): Use it.
d11ad92e
MS
5329 (fixup_vtable_deltas1): Likewise.
5330 (override_one_vtable): Likewise.
5331 * decl2.c (mark_vtable_entries): Likewise.
5332 * tree.c (debug_binfo): Likewise.
5333 * search.c (expand_upcast_fixups): Likewise.
5334 (get_abstract_virtuals_1): Likewise. Use virtuals, instead of tmp to
f30432d7 5335 consistent with the rest of the compiler.
d11ad92e 5336 (get_abstract_virtuals): Likewise.
f30432d7
MS
5337 * cp-tree.h (skip_rtti_stuff): New routine, declare it.
5338 * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
d11ad92e 5339 (build_typeid): Likewise.
f30432d7
MS
5340 (build_classof): Remove old style way of doing rtti. Remove support
5341 for `classof' and `headof'.
d11ad92e
MS
5342 * gxx.gperf: Likewise.
5343 * hash.h: Likewise.
5344 * parse.y: Likewise.
f30432d7
MS
5345
5346Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com>
5347
5348 * decl.c (start_function): Clear ctor_label and dtor_label.
5349
5350 * class.c (finish_struct_1): Fix handling of access decls.
5351
5352Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5353
5354 * class.c (finish_struct): Only do minimal processing here, so it
5355 can be used for class template definitions, as well.
5356 (finish_struct_1): New function with the rest of the code.
5357
5358Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com>
5359
5360 * class.c (prepare_fresh_vtable): On second though, always build the
5361 offset (see Aug 10 change), unless -fvtable-thunks is given. It
5362 does this by calling the new routine set_rtti_entry.
d11ad92e 5363 (finish_struct): Likewise.
f30432d7
MS
5364 (set_rtti_entry): New routine to update the rtti information at the
5365 start of the vtable.
5366
5367Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5368
5369 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
5370 if it's declared in the C++ language spec.
5371 (dump_function_decl): Likewise.
5372 (dump_function_name): Likewise.
5373 (ident_fndecl): Make sure we got something back from lookup_name.
5374 * decl.c (start_function): Likewise.
5375
5376Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5377
5378 * call.c (build_method_call): Don't call build_new when calling a
5379 constructor without an instance.
5380
5381Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com>
5382
5383 * class.c (prepare_fresh_vtable): Always build the offset to the
5384 complete object, as it doesn't cost much. This allows dynamic_cast
5385 to void * to work when -frtti isn't given.
d11ad92e 5386 (finish_struct): Likewise.
f30432d7
MS
5387
5388Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com>
5389
5390 * except.c (build_eh_type): Split out some functionality to new
5391 routine named build_eh_type_type.
5392 (build_eh_type_type): New routine.
5393 (expand_start_catch_block): Use build_eh_type_type, as we never want
5394 the dynamic type of the catch parameter, just the static type.
5395 Fixes core dumps when -frtti is used and one catchs pointers to
5396 classes.
5397
5398Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com>
5399
5400 * except.c (expand_builtin_throw): Since we now use normal calling
5401 conventions for __throw, we have to remove the first layer off the
5402 stack, so that the next context we search for handlers is the outer
5403 context instead of the context that had the call to __throw, if we
5404 don't immediately find the desired context.
5405
5406Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5407
5408 * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
5409 * cp-tree.h: Update.
5410
5411 * parse.y (template_type_parm): Add support for `typename'.
5412
5413Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com>
5414
5415 * except.c (expand_internal_throw): New internal routine to throw a
5416 value.
5417 (expand_end_all_catch, expand_leftover_cleanups): All throwers
5418 changed to use `expand_internal_throw' instead of jumping to throw
5419 label.
d11ad92e 5420 (expand_end_catch_block, expand_throw): Likewise.
f30432d7
MS
5421 (throw_label): Removed.
5422 (expand_builtin_throw): Changed so that EH parameters are passed by
5423 normal function call conventions. Completes Aug 4th work.
5424
5425Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com>
5426
5427 * cp-tree.h (expand_builtin_throw): Declare it.
5428 * decl2.c (finish_file): Call expand_builtin_throw.
5429 * except.c (make_first_label): Remove.
5430 (init_exception_processing): Don't use a LABEL_REF for throw_label,
5431 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
5432 other functions that don't really appear in those functions. This
5433 solves a problem where cc1plus consumed exponential amounts of
5434 memory when -Wall was used.
5435 (expand_end_all_catch, expand_leftover_cleanups,
5436 expand_end_catch_block, expand_throw): Change all uses of
5437 throw_label to match new style.
5438 (do_unwind): Rename parameter to inner_throw_label, as it is now
5439 different from throw_label. Also, assume that our caller will wrap
5440 the passed label with a LABEL_REF, if needed.
5441 (expand_builtin_throw): Make external, change so that the generated
5442 throw is now a real function.
5443 (expand_exception_blocks): Never generate throw code inside another
5444 function.
5445
5446Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com>
5447
5448 * decl.c (grokdeclarator): Move checking of mutable const objects
5449 and mutable static objects down, as we might decide during parsing
5450 to unset staticp or constp (for example, when const is part of the
5451 object being pointed to).
5452
5453Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com>
5454
5455 * except.c (output_exception_table_entry): Enhance portability to
5456 weird machines.
d11ad92e 5457 (emit_exception_table): Likewise.
f30432d7
MS
5458
5459Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com>
5460
5461 * typeck.c (build_ptrmemfunc): Handle casting of pointer to
5462 non-virtual member functions.
5463
5464Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com>
5465
5466 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
5467 and const T all match.
5468
5469Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com>
5470
5471 * except.c (build_eh_type): Strip cv qualifiers so that const T&,
5472 T&, T and const T all match.
5473
5474Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com>
5475
5476 * except.c: Fix up comments, cleanup code and eliminate exceptNode,
5477 exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
5478 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
5479 InsnSave. Also, numerous speed improvements, and correctness
5480 improvements. Double faulting in all situations should now be
5481 handled correctly.
5482 (expand_start_all_catch): Instead of having many terminate protected
5483 regions, just have one.
5484 (expand_start_catch_block): No longer have to protect
5485 false_label_rtx, as it isn't used for EH region marking.
5486 (expand_end_catch_block): Expand out EH cleanups here by using
5487 expand_leftover_cleanups.
5488 (expand_end_all_catch): Use sequences instead of playing with insn
5489 links directly.
d11ad92e 5490 (expand_exception_blocks): Likewise. Also protect all catch clauses
f30432d7
MS
5491 with one terminate region.
5492
5493Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5494
5495 * method.c (report_type_mismatch): Don't talk about an object
5496 parameter for non-methods.
5497
5498Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5499
5500 * class.c (finish_struct): Catch private and protected members of
5501 anonymous unions here.
5502 * decl2.c (finish_anon_union): And here.
5503 * parse.y: Instead of here.
5504
5505 * errfn.c (ARGSLIST): Support passing four args.
5506 * error.c (cv_as_string): New function.
5507 (cp_printers): Add it.
5508 * call.c (build_method_call): Report 'const' at end of pseudo-decl.
5509
5510 * method.c (report_type_mismatch): Deal with a bad_arg of 0.
5511
5512 * init.c (expand_aggr_init): Handle volatile objects, too.
5513
5514Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5515
5516 * decl.c (struct binding_level): Keep list of incomplete decls.
5517 (print_binding_level): Use list_length to count them.
5518 (pushdecl): Build up the list.
5519 (hack_incomplete_structures): Walk it and prune completed decls.
5520
5521Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5522
5523 * typeck.c (comp_target_types): Don't check const and volatile for
5524 function types.
d11ad92e 5525 (comp_ptr_ttypes_real): Likewise.
f30432d7
MS
5526
5527Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5528
5529 * typeck.c (comp_target_types): Fix.
5530
5531Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com>
5532
5533 * cp-tree.h (unsave_expr_now, build_unsave_expr,
5534 cp_expand_decl_cleanup): Declare new routines.
5535 * decl.c (cp_finish_decl, store_parm_decls,
5536 hack_incomplete_structures): Change all cals from
5537 expand_decl_cleanup to cp_expand_decl_cleanup.
d11ad92e 5538 * gc.c (protect_value_from_gc): Likewise.
f30432d7
MS
5539 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
5540 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
5541 (unsave_expr_now): Backend routine used by tree expander.
5542 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
5543 work around a limitation in the backend. The backend uses the
5544 cleanups multiple times, on disjoint control flows, so we cannot
5545 pass unsaved SAVE_EXPRs to the backend.
5546 * tree.def (UNSAVE_EXPR): New tree code.
5547 * typeck.c (c_expand_return): Move goto/return code up inside
5548 conditional, as we don't always want to do this, we only want to do
5549 this when we don't otherwise finish with this control flow.
5550
5551Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5552
5553 * parse.y (typespec): Only complain about typeof if we're not
5554 getting it from a system header.
5555
5556Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com>
5557
5558 Clean up prefix attribute handling.
5559 * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
5560 (declmods): Likewise.
5561 (all rules that reference typed_declspecs and declmods): Call
5562 split_specs_attrs or strip_attrs to separate declspecs and attrs.
5563 (lang_extdef): Delete resetting of prefix_attributes.
5564 (template_def, notype_declarator rule): Use NULL_TREE for
5565 prefix_attributes.
5566 (condition): Use NULL_TREE for prefix_attributes.
5567 (setattrs): Deleted.
5568 (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
5569 (component_decl): Delete resetting of prefix_attributes.
5570 (component_decl_1, notype_components rule): Use NULL_TREE for
5571 prefix_attributes.
5572 (simple_stmt): Delete resetting of prefix_attributes.
5573
5574Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5575
5576 * call.c (convert_harshness): Deal with reference conversions before
5577 others. Actually do array->pointer decay. Call comp_target_types
5578 with pointer types rather than their targets.
5579
5580 * typeck.c (comp_target_types): Avoid assigning D const * to B *.
5581
5582Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5583
5584 * pt.c (to_be_restored): Move decl to global scope.
5585
5586Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5587
5588 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
5589
5590Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5591
5592 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
5593 to pedwarn.
5594
5595 * pt.c (instantiate_template): Also avoid instantiation if the
5596 function has already been declared to be a specialization.
5597
5598 * decl2.c (check_classfn): Ignore cname argument, and return the
5599 matching function.
5600
5601 * decl.c (start_decl): Handle declarations of member functions
5602 outside of the class (i.e. specialization declarations).
5603
5604Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5605
5606 * class.c (finish_struct): Don't mess with the type of bitfields.
5607
5608 * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
5609
5610Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com>
5611
5612 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
5613 is not a parameter list (TREE_LIST).
5614 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
5615 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
5616 but don't set it otherwise.
5617
5618Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com>
5619
5620 * init.c (expand_default_init): Don't allow two-level conversions
5621 during construction.
5622
5623Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com>
5624
5625 * gc.c (build_headof): The type of dyncasting to a pointer to cv
5626 void, should be pointer to cv void.
5627
5628Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com>
5629
5630 * gc.c (build_dynamic_cast): Allow casting in const.
5631
5632Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com>
5633
5634 * typeck.c (build_const_cast): If we are passed error_mark_node,
5635 return it.
5636
5637Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5638
5639 * class.c (push_nested_class): Make sure TYPE is non-nil.
5640
5641 * cvt.c (type_promotes_to): Watch for error_mark_node on the
5642 incoming TYPE.
5643
5644Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
f65f5f62
GB
5645
5646 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
5647 (SIGTABLE_VB_OFF_NAME): New macro.
5648 (vt_off_identifier): Renamed from offset_identifier.
5649 (vb_off_identifier): Added extern declaration.
5650
5651 * decl.c (vt_off_identifier): Renamed from offset identifier.
5652 (vb_off_identifier): New variable to hold the identifier for the
5653 sigtable field vb_off.
5654 (init_decl_processing): Initialize vb_off_identifier.
5655 Renamed vt_off_identifier from offset_identifier.
5656 * sig.c (build_signature_method_call): Renamed offset_identifier and
5657 local variable offset to vt_off_identifer and vt_off, respecitively.
5658 * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
5659
5660 * decl.c (init_decl_processing): Add vb_off field to
5661 sigtable_entry_type. Reorder fields so that pfn gets properly
5662 aligned at a 64 bit boundary on the Alpha.
5663 * sig.c (build_signature_table_constructor): Build the constructor
5664 according to the new layout. Set the vb_off field to -1 for now.
5665
5666 * decl.c (init_decl_processing): Align sigtable_entry_type on word
5667 boundaries instead of double word boundaries to save space.
5668
f30432d7
MS
5669Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com>
5670
5671 * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
5672
5673Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5674
5675 * parse.y (opt.component_decl_list): Only forbid private/protected
5676 in anonymous unions. We need to make this know when the type is
5677 defined for an object, to not give the error.
5678
5679Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5680
5681 * parse.y (opt.component_decl_list): Don't allow access control
5682 as private or protected for union members.
5683
5684Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com>
5685
5686 * lex.c (check_newline): For 'p' case, move goto skipline line to
5687 before end brace for 'pragma'.
5688
5689Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com>
5690
5691 * g++.1: Tiny updates.
5692
5693Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com>
5694
5695 * decl.c (cp_finish_decl): Only destruct local static variables if
5696 they are constructed, and only construct the first time control
5697 passes completely through its declaration (if not initialized with a
5698 constant-expression).
d11ad92e 5699 (expand_static_init): Likewise.
f30432d7
MS
5700
5701Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5702
5703 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
5704 is a TEMPLATE_TYPE_PARM, give a match.
5705
f30432d7
MS
5706Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com>
5707
5708 * method.c (build_overload_value): Handle encoding of null pointer
5709 constants (or any pointer with a constant numeric value) for
5710 templates.
5711
42783eab
BK
5712Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5713
5714 * call.c (convert_harshness): Add QUAL_CODE when we're faced with
5715 const vs non-const for void conversions.
5716
f30432d7
MS
5717Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com>
5718
5719 * except.c (expand_start_all_catch): Fix problem with finding an
5720 outer nested try block when there is no code to separate it from an
5721 inner try block.
5722
5723Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com>
5724
5725 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
5726 memory please when virtual bases are used.
5727
5728Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com>
5729
5730 * class.c (build_vbase_path): Avoid testing things that cannot be
5731 null to see if they are null.
5732 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
5733 * decl.c (finish_function): Pass a type into the new
5734 convert_pointer_to_vbase instead of a binfo.
5735 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
5736 and convert_pointer_to_real.
5737 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
5738 of the more cryptic call to get_vbase.
5739
e18923b4 5740Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com>
535c9c21
MS
5741
5742 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
5743
f30432d7
MS
5744Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5745
5746 * pt.c (instantiate_template): Don't strip 'this' twice.
5747
5748 * pt.c (coerce_template_parms): Allow null pointer constants.
5749
5750 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
5751 set.
5752
f30432d7
MS
5753Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5754
5755 * decl.c (revert_static_member_fn): Also remove 'this' from
5756 DECL_ARGUMENTS.
5757 * decl2.c (check_classfn): Don't revert this function until we get a
5758 match.
5759
5760Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5761
5762 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
5763
5764Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com>
5765
5766 * decl2.c (finish_file): Handle global vector news.
5767 * init.c (build_new): Encode vector news so that later we will know
5768 how many elements there are.
5769
e18923b4 5770Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
415bfbd0
JM
5771
5772 * expr.c (cplus_expand_expr): Don't mess with temp slots.
5773
f30432d7
MS
5774 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
5775 returns null.
5776
5777 * decl2.c (check_classfn): Use revert_static_member_fn.
5778 * decl.c (revert_static_member_fn): Diagnose static member functions
5779 declared const or volatile.
5780
5781 * decl2.c (grokfield): Check for missing default args here, too.
5782 (check_default_args): Function to do the checking.
5783 * decl.c (pushdecl): Use it.
5784
5785 * decl.c (pushdecl): Don't warn about shadowing a member of `this'
5786 if there is no `this'.
5787
5788Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5789
5790 * call.c (build_method_call): Downgrade 'called before definition'
5791 to a warning, as it ought to go away after Monterey.
5792
5793Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5794
5795 * pt.c (coerce_template_parms): Don't do extra checking on pointer
5796 to member arguments.
5797
5798 * class.c (finish_struct): const and reference members don't prevent
5799 a class from being an aggregate.
5800
5801 * class.c (finish_struct): Signatures are always aggregates.
5802
f7d9d4a8
JM
5803Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5804
f30432d7
MS
5805 * decl2.c (check_classfn): Improve error message.
5806
5807 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
f7d9d4a8 5808
f7522313
JM
5809Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5810
f30432d7 5811 * typeck.c (comptypes): Don't ignore method quals.
f7522313 5812
f30432d7
MS
5813 * class.c (finish_struct): Non-abstract virtuals are always USED.
5814
5815 * decl.c (build_ptrmemfunc_type): The underlying union type isn't
5816 IS_AGGR_TYPE, either.
5817 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
d11ad92e 5818 * cp-tree.h: Likewise.
f30432d7
MS
5819
5820 * cp-tree.h (lang_type): Add aggregate.
5821 (CLASSTYPE_AGGREGATE): New macro.
d11ad92e 5822 (TYPE_NON_AGGREGATE_CLASS): Likewise.
f30432d7
MS
5823 * class.c (finish_struct): Determine whether a class is an
5824 aggregate.
5825 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
5826 TYPE_NEEDS_CONSTRUCTING.
5827 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
5828 subobjects, too.
5829
5830 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
d8f1d487
RK
5831
5832 * decl.c (start_function): For pre-parsed functions, layout all of
5833 the parm decls again.
5834 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
5835 DECL_EXTERNAL.
5836
f30432d7
MS
5837 * pt.c (coerce_template_parms): Improve checking for invalid
5838 template parms.
5839
5840Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
5841
5842 * decl.c (grokdeclarator): Forbid declaration of a static member
5843 with the same name as its enclosing class.
5844
d8f1d487
RK
5845Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5846
5847 * decl.c (finish_function): Clear current_class_decl.
5848
5849 * typeck.c (build_conditional_expr): Use convert (boolean_type_node
5850 instead of truthvalue_conversion.
5851
5852 * class.c (finish_struct): A data member with the same name as the
5853 class doesn't suppress constructors.
5854
d11ad92e 5855Fri Jun 16 18:11:39 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
5856
5857 * decl.c (start_function): If current_class_decl is a signature
5858 pointer, don't dereference it but set C_C_D to current_class_decl.
5859
5860Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5861
5862 * decl.c (duplicate_decls): Complain about virtual functions
5863 redeclared to be inline.
5864
5865Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com>
5866
5867 * decl.c (get_unique_name): New routine to name unnamed namespaces.
5868 (push_namespace): Use get_unique_name for naming unnamed namespaces.
5869
d3c89e1f
JM
5870Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5871
d8f1d487 5872 * parse.y: Call cplus_decl_attributes with prefix_attributes where
f30432d7 5873 appropriate.
d8f1d487
RK
5874
5875Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com>
5876
5877 * search.c (get_vbase): New routine to switch hierarchies from the
5878 CLASSTYPE_VBASECLASSES to the normal one.
5879 (expand_indirect_vtbls_init): Use get_vbase to figure out how we
5880 want to convert to a vbase pointer.
5881
5882Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5883
5884 * pt.c (instantiate_class_template): Add the new instantiation to
f30432d7 5885 template_classes.
d8f1d487
RK
5886 (do_pending_expansions): Call instantiate_member_templates on all of
5887 the classes in template_classes.
5888
5889Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com>
5890
5891 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
5892 TYPE_MAIN_VARIANT if it is not filled in.
5893 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
5894 error instead of core dumping.
5895
5896Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5897
5898 * call.c (can_convert): Also check for distance > 0.
d11ad92e
MS
5899 (can_convert_arg): Likewise.
5900 (user_harshness): Likewise.
d8f1d487
RK
5901
5902Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5903
5904 * g++.c (MATH_LIBRARY): Provide default.
5905 (main): Always link with the math library if we link with libstdc++.
5906
5907 * decl.c (start_function): Complain about redefinition of a function
5908 even when the pending_inline version is compiled after the other
5909 version.
5910
5911Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5912
5913 * gc.c (build_dynamic_cast): Build up a reference to a parameter of
5914 aggregate type.
5915
d11ad92e 5916Wed Jun 7 15:31:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
5917
5918 * init.c (build_vec_delete): Resolve an offset ref before we try to
5919 use it.
5920
5921Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
5922
5923 * typeck.c (build_modify_expr): If the class lacks a constructor or
5924 assignment operator, return error_mark_node.
5925 (common_type): Use build_cplus_array_type.
5926
5927Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com>
5928
5929 * class.c (dont_allow_type_definitions): New variable set when types
5930 cannot be defined.
5931 (finish_struct): Use it.
5932 * cp-tree.h (dont_allow_type_definitions): Define it.
5933 * parse.y (primary, handler_seq): Set it.
5934
5935Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com>
5936
5937 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
5938 results from lookup_fnfields. Always give warning/error on bad
5939 code.
5940
d11ad92e 5941Mon Jun 5 11:39:37 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
d8f1d487
RK
5942
5943 * init.c (member_init_ok_or_else): Don't allow initialization of
5944 an ancestor's member from within a constructor.
5945
d11ad92e 5946Mon Jun 5 11:20:34 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
d8f1d487
RK
5947
5948 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
5949 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
5950 abstract virtual functions are handled correctly.
5951
5952 * sig.c (build_signature_table_constructor): Store the correct
5953 delta in signature table entries. It does not yet work for
5954 classes with virtual base classes as implementations of signatures.
5955 (build_signature_method_call): Add the delta to the object_ptr
5956 before generating the function call.
5957
5958 * call.c (build_method_call): Make instance_ptr the signature
5959 pointer itself instead of dereferencing the optr.
5960 * sig.c (build_signature_method_call): Dereference the optr for the
5961 direct and virtual calls.
5962
5963 * sig.c (build_signature_table_constructor): Make the tag for
5964 default implementations -1 instead of 2.
5965 (build_signature_method_call): Change the generated conditional
5966 expression correspondingly.
5967
5968 * sig.c (build_signature_pointer_constructor): Deleted the sorry
5969 message that said we can't handle multiple inheritance for
5970 implementations of signatures
5971 (build_signature_method_call): Use the offset from the sigtable
5972 entry instead of the vptr field from the signature pointer for
5973 building a virtual function call.
5974
5975 * class.c (build_vfn_ref): Deleted signature specific code, we don't
5976 call this function anymore from build_signature_method_call.
5977
5978 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr
5979 field in the object now instead of in the signature pointer/ref.
5980 (build_vptr_ref): Deleted extern declaration.
5981 * sig.c (build_vptr_ref): Deleted.
5982 (build_signature_pointer_or_reference_type): Deleted construction of
5983 the vptr field.
5984 (build_signature_pointer_constructor): Deleted initialization of/
5985 assignment to the vptr field.
5986
5987 * sig.c (build_signature_table_constructor): Convert the signature
5988 table entry fields to their correct types.
5989
5990 * sig.c (build_signature_table_constructor): Don't call digest_init
5991 for the fields of a sigtable entry, it's wasted time.
5992
5993 * sig.c (build_signature_table_constructor): Correctly set the
5994 offset and index fields of a sigtable entry. Build the constructor
5995 the way digest_init does, digest_init can't handle initializing an
5996 anonymous union inside a struct.
5997 (build_signature_method_call): Use the index field instead of the
5998 delta field to get the vtable index.
5999
6000 * decl.c (init_decl_processing): Fix number of fields for building
6001 sigtable_entry_type.
6002
6003 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
6004 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
6005 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
6006 * decl.c (tag_identifier, offset_identifier): New variables to
6007 hold the identifiers for the sigtable fields tag and offset.
6008 (init_decl_processing): Initialize these variables.
6009 (init_decl_processing): Use these variables to build the
6010 sigtable_entry_type structure. Rename the code and offset fields
6011 to tag and delta, respectively; add offset and index fields. Changed
6012 types of fields from short_integer_type_node to delta_type_node.
6013 * sig.c (build_signature_table_constructor): Rename code and offset
6014 to tag and delta, respectively.
d11ad92e 6015 (build_signature_method_call): Likewise. Use above variables.
d8f1d487 6016
d8f1d487
RK
6017Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6018
6019 * decl.c (lookup_name_real): Don't try to look anything up in an
6020 erroneous object.
6021
6022Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com>
6023
6024 * method.c (build_overload_int): New routine. Break out
6025 functionality from build_overload_value so we can reuse it.
6026 (build_overload_value): Handle pointer to member functions as value
6027 parameters for templates.
6028 (build_overload_identifier): Since template parameters are shared
6029 among all instantiations, we have to substitute in the real types
6030 in TREE_TYPE (parm).
d11ad92e
MS
6031 pt.c (coerce_template_parms): Likewise.
6032 (push_template_decls): Likewise.
d8f1d487
RK
6033 (grok_template_type): Deleted as template parameters are shared
6034 among all instantiations.
6035
6036Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com>
6037
6038 * decl.c (grokdeclarator): Always give errors on constant overflow
6039 for array indices.
6040
6041Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6042
6043 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
6044 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
6045 reference type.
6046 (build_indirect_ref): Fix check for *&.
6047
72b7eeff
MS
6048Fri Jun 16 06:54:03 1995 Mike Stump <mrs@cygnus.com>
6049
6050 * Version 2.7.0 released.
6051
d11ad92e 6052Fri Jun 16 15:07:29 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
72b7eeff
MS
6053
6054 * Make-lang.in (DEMANGLER_PROG): Add LIBS.
6055
6056Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6057
6058 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
6059
6060Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com>
6061
6062 * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
6063 * decl.c (finish_decl): New routine to handle call backs from the
6064 mid end (declare_hidden_char_array).
6065
6066Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6067
6068 * decl.c (start_function): Handle setting C_C_D here.
6069 (set_C_C_D): Removed.
6070 (struct saved_scope): Remove class_decl.
6071 (push_to_top_level): Don't save current_class_decl.
6072 (pop_from_top_level): Don't restore current_class_decl or C_C_D.
6073 (struct cp_function): Add C_C_D.
6074 (push_cp_function_context): Save C_C_D.
6075 (pop_cp_function_context): Restore C_C_D.
6076
6077Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6078
6079 * decl.c (set_C_C_D): New function. suspend_momentary before
6080 building C_C_D.
6081 (pop_from_top_level): Call it.
d11ad92e
MS
6082 (start_function): Likewise.
6083 (pop_cp_function_context): Likewise.
72b7eeff
MS
6084
6085 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
6086 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
6087
6088 * decl.c (push_cp_function_context): Save current_class_decl.
6089 (pop_cp_function_context): Restore current_class_decl and set C_C_D.
6090 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
d11ad92e 6091 (start_function): Likewise.
72b7eeff
MS
6092
6093 * class.c (popclass): Don't mess with current_class_decl,
6094 current_vtable_decl, or C_C_D.
6095
6096Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com>
6097
6098 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
6099
d11ad92e 6100Wed May 24 15:55:18 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
b796119f
RK
6101
6102 * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
6103 * decl2.c (finish_anon_union): Likewise.
6104 * method.c (largest_union_member): Likewise.
6105
d11ad92e 6106Wed May 24 14:41:11 1995 H.J. Lu <hjl@nynexst.com>
103894f1
L
6107
6108 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
6109
d11ad92e 6110Mon May 22 17:38:48 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fbb47000
RK
6111
6112 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
6113 Use $@ instead of output name so works even if have .exe.
6114 (cxxmain.o): Use cp if ln -s fails.
6115 (c++.install-man): Use $(exeext) in executable names.
6116 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
6117 * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
6118
878cd289
MS
6119Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com>
6120
6121 * call.c (build_method_call): parms can be null, duh.
6122
6123Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com>
6124
6125 * call.c (build_method_call): If convert_arguments failed, just bail.
6126
6127Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6128
6129 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
6130
6131 * tree.c (copy_to_permanent): Oops.
6132
d11ad92e 6133Fri May 19 10:01:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
878cd289
MS
6134
6135 * cp-tree.h (break_out_target_exprs): Add decl.
6136
6137Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6138
6139 * decl.c (start_function): Move *all* interface handling stuff after
6140 the pushdecl.
6141
6142 * tree.c (mapcar): Renamed from make_deep_copy and generalized.
6143 (perm_manip): Return t if permanent, otherwise 0.
6144 (copy_to_permanent): Use them.
6145 (bot_manip): Helper for break_out_target_exprs.
6146 (break_out_target_exprs): New function. Uses mapcar.
6147
6148 * typeck.c (convert_arguments): Use it.
6149
6150 * method.c (hack_identifier): Use convert_from_reference to
6151 dereference a reference.
6152
6153Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com>
6154
6155 * call.c (convert_harshness): Move reference bashing before pointer
6156 to member bashing.
6157
6158Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com>
6159
6160 * cvt.c (convert_to_reference): Only complain, if complaints are
6161 wanted.
d11ad92e
MS
6162 * typeck.c (build_function_call_real): Likewise. If
6163 LOOKUP_SPECULATIVELY is set and something won't work, return
6164 NULL_TREE.
6165 * cvt.c (cp_convert): Likewise. Pass flags down to build_method_call.
878cd289 6166 (convert): Pass LOOKUP_NORMAL to cp_convert.
d11ad92e 6167 * typeck.c (convert_for_assignment): Likewise.
878cd289 6168 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
d8f1d487 6169 (convert_arguments): Get out early if we get an error_mark_node.
878cd289
MS
6170 (convert_for_initialization): Use cp_convert instead of convert so
6171 that we can pass flags down.
6172 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
6173
c19a8067
JM
6174Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6175
878cd289
MS
6176 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
6177 decl type.
6178
c19a8067
JM
6179 * class.c (finish_struct): Don't complain about a class with no
6180 user-defined constructors but with a member that has no default
6181 constructor, as this is OK for aggregates.
6182
6183 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
6184 constructor call, mark slot addressable.
6185
d11ad92e 6186Tue May 16 18:37:51 1995 Douglas Rupp <drupp@cs.washington.edu>
eacd15bc
DR
6187
6188 * g++.c: Changed WINNT to _WIN32.
6189
a9aedbc2
MS
6190Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com>
6191
6192 * lex.c (handle_sysv_pragma): Don't use token_buffer.
6193
6194Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com>
6195
6196 * call.c (resolve_scope_to_name): Add initial semantic support for
6197 namespaces.
d11ad92e
MS
6198 * class.c (finish_struct): Likewise.
6199 * cp-tree.h (NAMESPACE_LEVEL): Likewise.
6200 * cvt.c (build_up_reference, convert_to_reference): Likewise.
6201 * decl.c (binding_level::namespace_p, suspend_binding_level): Likewise.
6202 (resume_binding_level, toplevel_bindings_p): Likewise
6203 (namespace_bindings_p, declare_namespace_level): Likewise.
6204 (resume_level, push_namespace, pop_namespace): Likewise.
6205 (pop_everything, pushtag, duplicate_decls, pushdecl): Likewise.
6206 (implicitly_declare, lookup_namespace_name): Likewise.
6207 (lookup_name_real, start_decl, make_temporary_for_reference): Likewise.
6208 (obscure_complex_init, finish_decl, expand_static_init): Likewise.
6209 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Likewise.
6210 (store_parm_decls, hack_incomplete_structures): Likewise.
6211 * decl2.c (get_temp_name, finish_anon_union): Likewise.
6212 (current_namespace, push_namespace, pop_namespace): Likewise.
6213 (do_namespace_alias, do_toplevel_using_decl): Likewise.
6214 (do_class_using_decl): Likewise.
6215 * error.c (dump_decl): Likewise.
6216 * init.c (build_member_call, build_offset_ref): Likewise.
6217 * lex.c (identifier_type): Likewise.
6218 * parse.y (lang_extdef, using_decl, extdef): Likewise.
6219 (component_decl_1, nested_name_specifier_1): Likewise.
6220 * spew.c (yylex): Likewise.
6221 * tree.def (NAMESPACE_DECL): Likewise.
a9aedbc2
MS
6222
6223Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6224
6225 * decl.c (push_overloaded_decl): Return the new decl even if it
6226 can't be pushed.
6227
6228Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com>
6229
6230 * typeck.c (decay_conversion): Split out from default_conversion.
6231 (default_conversion): Call it.
d11ad92e 6232 (build_binary_op): Likewise.
a9aedbc2
MS
6233 (build_binary_op_nodefault): Use decay_conversion for truth ops.
6234
6235Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6236
6237 * decl.c (warn_extern_redeclared_static): This is a pedwarn.
6238 (duplicate_decls): Always use the old decl's linkage info. Don't
6239 play with linkage of consts.
6240 (pushdecl): Don't play with linkage of consts.
6241 (redeclaration_error_message): Don't complain about an old public
6242 decl and a new non-public decl here.
6243 (grokvardecl): Handle linkage of consts here.
6244 (grokdeclarator): An 'extern inline' is public. Pass constp to
6245 grokvardecl.
6246 (start_function): Wait until after the pushdecl to do some linkage
6247 stuff.
6248
6249 * decl2.c (import_export_vtable): Make duplicates weak rather than
6250 static if supported.
d11ad92e
MS
6251 (import_export_inline): Likewise.
6252 * pt.c (do_pending_expansions): Likewise.
a9aedbc2
MS
6253
6254 * class.c (build_vbase_path): flag_assume_nonnull_objects only
6255 affects reference conversion.
6256
6257 * init.c (emit_base_init): Build up an RTL_EXPR and add it to
f30432d7 6258 rtl_expr_chain.
a9aedbc2
MS
6259 * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
6260
7154457b
PE
6261Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com>
6262
6263 * method.c (numeric_output_need_bar): Renamed from misspelling.
6264
45ca9d09
RK
6265 * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
6266
7ab7b006
RK
6267Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6268
6269 * lang-options.h, lang-specs.h: New files.
6270
fd378c9d
JM
6271Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6272
6273 * typeck.c (default_conversion): Don't check for BLKmode before
6274 pulling out the decl_constant_value.
6275
6276 * decl.c (start_function): Clear named_labels and shadowed_labels.
6277
6278 * typeck.c (build_function_call_real): Also synthesize methods here.
6279
6280Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6281
6282 * decl2.c (finish_file): Synthesize exported methods before the
6283 reconsider loop.
6284
6285 * parse.y: Move declaration of flag_new_for_scope to file scope.
6286
863adfc0
MS
6287Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com>
6288
6289 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
6290 * parse.y (FOR): Conditionalize the pushing and poping of scope for
6291 the for-init-statement upon the new flag_new_for_scope.
6292 * parse.y (try_block): Simplify and use compstmt.
6293
6294Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6295
6296 * decl.c (define_function): Mark function decl artificial.
6297
6298Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6299
6300 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
6301
6302 * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
d11ad92e 6303 * tree.c (build_cplus_method_type): Likewise.
863adfc0
MS
6304
6305 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
6306
6307 * typeck.c (build_function_call_real): If convert_arguments failed,
6308 just bail.
6309 (convert_arguments): If one of the arguments is error_mark_node,
6310 just bail.
6311
6312Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6313
6314 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
6315 decls that don't include it.
6316
6317Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6318
6319 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
6320 DECL_NOT_REALLY_EXTERN set aren't extern decls.
6321
6322 * typeck.c (build_indirect_ref): Don't call default_conversion for a
6323 parameter of reference_type.
6324 * cvt.c (convert_from_reference): Just use build_indirect_ref.
6325
6326 * pt.c (do_type_instantiation): Only instantiate member functions
6327 that actually come from templates.
6328
6329Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com>
6330
6331 * parse.y: Generalized cleanup of poplevels, and compound statements
6332 and compound statements in try blocks. Rewritten `for' rule so that
6333 the scope of variables declared in the for clause is shortened to
6334 span just to the end of the statement, instead of the whole
6335 containing block.
6336
6337Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6338
6339 * call.c (convert_harshness): Handle pointers to members better.
6340
6341Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6342
6343 * decl2.c (delete_sanity): Do access control here.
6344 * init.c (build_delete): Instead of here.
6345
6346 * Make-lang.in: Build c++filt.
6347
6348Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6349
6350 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
6351 update our IDENTIFIER_TYPE_VALUE.
6352
a5894242
MS
6353Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6354
6355 * lex.c (cons_up_default_function): Fix linkage of #pragma
6356 implemented functions.
6357
6358Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6359
6360 * method.c (build_overload_name): Simplify and fix repeated type
6361 folding.
6362
6363 * decl.c (grokdeclarator): Prohibit pointers to void or reference
f30432d7 6364 members.
a5894242
MS
6365
6366Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com>
6367
6368 * typeck2.c (process_init_constructor): Make sure initializers are
6369 fully digested.
6370
6371Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com>
6372
6373 * lex.c (cons_up_default_function): Always defer synthesis.
6374
6375Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6376
6377 * decl2.c (mark_inline_for_output): Don't play with pending_inline
6378 stuff.
6379
6380Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6381
6382 * call.c (user_harshness): New function; like build_type_conversion,
6383 but doesn't actually build anything.
6384 (compute_conversion_costs): Use it instead of build_type_conversion.
6385
6386Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com>
6387
6388 * typeck.c (build_function_call_real): Improve error message for
6389 calling a non-function.
6390
6391 * method.c (hack_identifier): Lose check for calling a data member.
6392
6393Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com>
6394
6395 * typeck2.c (build_functional_cast): Remove very old cruft.
6396 Seems like good code is generated without it.
6397
6398Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6399
6400 * method.c (do_build_assign_ref): Fix handling of anonymous unions.
d11ad92e 6401 (do_build_copy_constructor): Likewise.
a5894242
MS
6402
6403 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
6404
6405 * decl.c (push_switch): New function.
d11ad92e 6406 (pop_switch): Likewise.
a5894242
MS
6407 (define_case_label): Check for jumping over initialization.
6408
6409 * call.c (build_method_call): Check for an inline function being
6410 called before its definition has been seen.
d11ad92e 6411 * typeck.c (build_function_call_real): Likewise.
a5894242
MS
6412
6413 * decl.c (duplicate_decls): Check for a function being redeclared
6414 inline after its address has been taken.
6415
6416 * typeck.c (build_conditional_expr): Handle related class lvalues.
6417
6418Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6419
6420 * pt.c (do_pending_expansions): Don't expand unused templates.
6421
6422 * parse.y (component_decl): Accept a lone semicolon.
6423
6424Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com>
6425
6426 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
6427 object parameter anymore.
6428
6429 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
6430
6431Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6432
6433 * parse.y (simple_stmt, decl case): Clear prefix_attributes.
d11ad92e 6434 (lang_extdef): Likewise.
a5894242
MS
6435
6436 * parse.y (maybe_parmlist): New rule for use in declarators where
6437 this could either be a list of expressions or parameters. Calls
6438 suspend_momentary before deciding which.
6439 (direct_after_type_declarator): Use it.
6440 (complex_direct_notype_declarator): Use it.
6441
6442 * pt.c (tsubst): Propagate attributes const and noreturn.
6443
6444 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
6445 before doing the default thing.
6446
2db70b29
DE
6447Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com>
6448
6449 * typeck.c (common_type): Call lookup_attribute instead of
6450 value_member.
6451
d11ad92e 6452Tue Apr 25 18:07:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
91887f0b
RK
6453
6454 * Make-lang.in: Change "realclean" to "maintainer-clean".
6455
e8abc66f
MS
6456Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com>
6457
6458 * decl2.c (finish_file): Fix broken linked list handling.
6459
6460Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6461
6462 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
6463 as often.
d11ad92e 6464 (finish_struct): Likewise.
e8abc66f
MS
6465
6466 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
6467
6468 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
6469 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
6470
6471Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com>
6472
6473 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
6474 it is of the same type as the return value.
6475
6476Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6477
6478 * decl2.c (finish_file): Reconsider if synthesizing a method wrote
6479 out its assembly.
6480
6481 * typeck.c (convert_for_initialization): Don't call a trivial copy
6482 constructor.
6483
6484 * typeck2.c (store_init_value): Only abort if the type has a
6485 non-trivial copy constructor.
6486
6487 * typeck.c (c_expand_return): If we're returning in a register and
6488 the return value is a TARGET_EXPR, expand it. Only do
6489 expand_aggr_init if we're returning in memory.
6490 (expand_target_expr): Function to expand a TARGET_EXPR.
6491 (build_modify_expr): Use it.
6492
6493 * tree.c (build_cplus_new): Layout the slot.
6494
6495 * expr.c (cplus_expand_expr): Use expand_call to expand the call
6496 under a NEW_EXPR, so the target is not discarded.
6497
6498Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com>
6499
6500 * gc.c (build_dynamic_cast): Tighten error checking.
6501
6502Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6503
6504 * expr.c (cplus_expand_expr): Only abort if the returned target is
6505 different from what we expected if the type has a non-trivial copy
6506 constructor.
6507
6508 * decl2.c (cplus_decl_attributes): Attributes applied to a template
6509 really apply to the template's result.
6510
6511 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
6512 to decide whether to consider a CALL_EXPR an lvalue.
6513
6514 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
6515 type has a non-trivial copy constructor.
6516
6517 * decl.c (start_function): If interface_known, unset
6518 DECL_NOT_REALLY_EXTERN on the function.
6519
6520Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6521
6522 * pt.c (do_function_instantiation): Handle explicit instantiation of
6523 member functions.
6524 (do_type_instantiation): Handle 'inline template class foo<int>',
6525 meaning just spit out the vtable.
6526
6527 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
6528 the consed functions.
6529
6530 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
6531
d11ad92e 6532Wed Apr 19 16:28:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
e8abc66f
MS
6533
6534 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
6535 typeck.c: Include output.h.
6536
d11ad92e 6537Wed Apr 19 14:57:21 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
e8abc66f
MS
6538
6539 * call.c (build_method_call): Allow a signature member functions to
6540 be called from a default implementation.
6541
6542Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6543
6544 * repo.c (finish_repo): Remember what directory we are in.
6545
6546 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
6547
6548 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit
6549 out the second copy of the symbol name. Don't remember COLLECT_GCC.
6550
43f2999d
MS
6551Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com>
6552
6553 * search.c (virtual_context): New function to get the virtual
6554 context of a function.
6555 (expand_upcast_fixups): New function to generate runtime vtables.
d11ad92e 6556 (fixup_virtual_upcast_offsets): Likewise.
43f2999d
MS
6557 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
6558 ensure that the this offsets for upcasts from virtual bases into
6559 other virtual bases or non-virtual bases are correct at construction
6560 time and destruction time.
6561 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
6562 vtables in all virtual bases, instead of just one vtable in each
6563 virtual base.
d11ad92e 6564 (fixup_vtable_deltas1): Likewise.
43f2999d 6565
d11ad92e 6566Tue Apr 18 03:57:35 1995 Michael Meissner <meissner@cygnus.com>
44a8d0b3
MS
6567
6568 * Makefile.in (lex.o): Add dependency on c-pragma.h.
6569
6570 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
6571 appropriate, instead of 0.
6572
6573Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6574
6575 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
6576 comparing local and global decls.
6577
6578Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6579
6580 * typeck.c (convert_arguments): Only prohibit passing to ... of
6581 types with non-trivial copy constructors.
6582
6583 * repo.c (repo_template_used): Don't try to mess with no id.
6584
6585Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com>
6586
6587 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls.
6588
d11ad92e 6589Thu Apr 13 15:37:42 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
44a8d0b3
MS
6590
6591 * cp-tree.h (current_tinst_level): Delete declaration, since it's
6592 static inside pt.c.
6593
6594 * typeck.c (build_modify_expr): Catch incompatible array assignment.
6595
6596 * parse.y (attribute_list, attrib): Rewrite actions to feed the
6597 right stuff to decl_attributes.
6598
6599Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6600
6601 * search.c (dfs_debug_mark): Check for magic virtual like
6602 import_export_vtable.
6603
6604 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
6605 four args.
6606
6607Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com>
6608
6609 * decl2.c (finish_file): Move prevtable pass before needs_messing_up
6610 decision.
6611
6612Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6613
6614 * decl.c (finish_decl): If we're writing out a static data member of
6615 a class, we want the debug info for that class.
6616
6617 * gc.c (build_t_desc): Check linkage of a class properly.
6618
6619 * class.c (finish_struct): Set the 'headof' offset for the main
6620 vtable properly.
6621 (prepare_fresh_vtable): Fix typeinfo pointer here.
6622 (modify_one_vtable): Instead of here.
6623
6624Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6625
6626 * repo.c (repo_get_id): New function to return the interesting
6627 identifier for a repo entity.
6628 (repo_template_used): Use it.
6629 (repo_template_instantiated): Mark the id as chosen.
6630 (init_repo): Record whether or not the id was chosen.
6631 (finish_repo): Note if an id was newly chosen.
6632
6633 * pt.c (do_function_instantiation): Call repo_template_instantiated.
d11ad92e 6634 (do_type_instantiation): Likewise. Don't diagnose multiple
44a8d0b3
MS
6635 instantiation.
6636
6637 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
6638 whether or not to synthesize a method.
6639
6640 Undo these changes:
6641 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
6642 * class.c (modify_all_direct_vtables): ditto.
6643 * init.c (expand_direct_vtbls_init): expand more vtables if
6644 flag_rtti is on.
6645
79ff2c6c
MS
6646Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
6647
6648 * gc.c (build_headof): Use ptrdiff_type_node instead of
6649 integer_type_node on pointer arithmetic.
6650
6651Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6652
6653 * typeck.c (build_modify_expr): Undo previous change.
6654
6655Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6656
6657 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
6658
6659 * repo.c (get_base_filename): Put the .rpo file in the directory
6660 with the object file, not the source.
6661
6662 * typeck.c (build_conditional_expr): Handle pmf's better.
6663
6664 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
6665 the name of the symbol.
6666
6667Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6668
6669 * repo.c (open_repo_file): Make repo filename DOS-compliant.
6670 (*): Also write a new repo file if some previously-used
6671 templates are no longer used. Only remember the identifier.
6672
6673 * lex.c (cons_up_default_function): If this function belongs to a
6674 template class, call repo_template_used for it.
6675
6676 * repo.c (repo_template_used): Using a class means using its vtable,
6677 if any.
d11ad92e 6678 (finish_repo): Likewise.
79ff2c6c
MS
6679
6680 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
6681 if the type has a complex copy constructor.
6682
6683 * decl2.c (lang_decode_option): -frepo implies
6684 -fno-implicit-templates.
6685
6686 * decl.c (start_function): Clear current_{base,member}_init_list.
6687
6688 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
6689
6690Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6691
6692 * decl.c (struct cp_function): Add {base,member}_init_list.
6693 (push_cp_function_context): Save current_{base,member}_init_list.
6694 (pop_cp_function_context): Restore them.
6695
b19b4a78
MS
6696Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6697
6698 * repo.c (get_base_filename): Take filename parm, fix logic bug.
6699
6700 * typeck.c (build_compound_expr): Do not warn about a compound expr
6701 in which the first expression has no side effects.
6702 (build_x_compound_expr): Warn here instead.
6703 (build_conditional_expr): Don't warn about a conditional expression
6704 between an enum and the type it promotes to.
6705
6706 * init.c (build_new): Handle initialization of arrays of builtins
6707 properly.
6708
d11ad92e 6709Mon Apr 3 15:08:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b19b4a78
MS
6710
6711 * repo.c: Include config.h to get definitions of bcopy and rindex
6712 on systems that don't have them (e.g., SVR4).
6713
6714Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
6715
6716 * decl2.c (finish_table): Pass NULL_TREE instead of init to
6717 finish_decl so that it won't try and do error checking on the
6718 initializer.
6719
6720Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6721
6722 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
6723 determine whether this compile used -c -o.
6724 (open_repo_file): Use get_base_filename. Remove the extension.
6725 (finish_repo): Spit out the values of main_input_filename,
6726 COLLECT_GCC and COLLECT_GCC_OPTIONS.
6727
6728 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
6729
faae18ab
MS
6730Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6731
6732 * search.c (compute_access): Don't try to do access control on
6733 nested types.
6734
6735Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6736
6737 * repo.c: New file to handle things repo.
6738
6739 * pt.c (instantiate_template): Call repo_template_used if the
6740 definition is accessible.
6741 (mark_function_instantiated): Split out from
6742 do_function_instantiation.
6743 (mark_class_instantiated): Split out from do_type_instantiation.
6744
6745 * parse.y (template_instantiate_once): Call repo_template_used.
6746
6747 * lex.c (lang_init): Call init_repo.
6748
6749 * decl2.c: Handle flag_use_repository.
6750 (finish_file): Call finish_repo.
6751
6752 * decl.c (start_method): Call repo_template_used if this is a
6753 template method.
6754
6755 * Makefile.in (CXX_OBJS): Add repo.o.
6756 (repo.o): Add dependencies.
6757
6758 * Make-lang.in (CXX_SRCS): Add repo.c.
6759
6760 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
6761 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
6762
6763 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
6764 types used.
6765
6766 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
6767
6768Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6769
6770 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
6771 and result_type. When checking for comparison between signed
6772 and unsigned, use result_type rather than the (possibly shortened)
6773 type of op0. Also, don't warn about equality comparison of a
6774 signed operand to an unsigned constant that fits in the signed
6775 type.
6776
6777 * method.c (do_build_copy_constructor): Reverse
6778 current_base_init_list after we've built it up.
6779
6780Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
6781
6782 * except.c (build_throw): Never warn about the value of throw not
6783 being used.
6784
6785Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
6786
6787 * except.c (expand_start_catch_block): Check for bad catch parameter
6788 declarations.
6789
6790Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6791
6792 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
6793 DECL_EXTERNAL is not already set.
6794
6795Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
6796
6797 * method.c (emit_thunk): Let poplevel know that the last level is
6798 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
6799
6800Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6801
6802 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
6803 here.
6804
6805 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
6806 METHOD_TYPE.
6807 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
6808 all deferred inlines.
6809
6810Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6811
6812 * cp-tree.h (DECL_THIS_INLINE): New macro.
6813 (DECL_NOT_REALLY_EXTERN): New macro.
6814 (DECL_THIS_STATIC): New macro.
6815
6816 * decl.c: Lose all references to current_extern_inline. Break
6817 inline semantics into DECL_INLINE for actual inlining and
6818 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
6819 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
6820 emit an inline here. Associated changes.
d11ad92e
MS
6821 * lex.c: Likewise.
6822 * pt.c: Likewise.
6823 * typeck.c: Likewise.
faae18ab
MS
6824
6825 * call.c (build_method_call): Don't bother trying to handle inlines
6826 specially.
d11ad92e 6827 * cvt.c (convert_to_aggr): Likewise.
faae18ab
MS
6828
6829 * pt.c (do_function_instantiation): Handle instantiation of
6830 public inlines, too.
6831
6832Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
6833
6834 * except.c (init_exception_processing): Change the interface for
6835 __throw_type_match and add decl for new rtti matching routine
6836 __throw_type_match_rtti.
6837 (build_eh_type): New routine to build a run time descriptor for the
6838 expression given.
6839 (expand_start_catch_block): Update to use new calling convention for
6840 the matcher.
6841 (expand_throw): Update to use build_eh_type.
6842
08fb8ad0
WL
6843Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
6844
6845 * g++.c: Removed __NetBSD__ from conditional.
6846 Declare strerror if HAVE_STRERROR is defined; otherwise
6847 declare sys_errlist and sys_nerr.
6848 (my_strerror): New function.
6849
71851aaa
MS
6850Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6851
6852 * search.c (get_binfo): Don't try to be so clever.
6853
6854 * tree.c (copy_to_permanent): Also suspend_momentary().
6855
6856 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
6857 if the types are the same.
6858
6859 * decl.c (start_function): Handle extern inlines more like C++ says
f30432d7 6860 we should.
71851aaa
MS
6861
6862 * init.c (build_member_call): Hand constructor calls off to
6863 build_functional_cast.
6864
6865 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
6866 the name of the type.
6867
d11ad92e 6868Tue Mar 28 13:13:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
6869
6870 * decl.c (grokdeclarator): Check for the decl returned by
6871 grokfndecl to be null before using build_decl_attribute_variant.
6872
d11ad92e 6873Mon Mar 27 18:04:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
71851aaa
MS
6874
6875 * init.c (build_new): Use build_pointer_type instead of
6876 TYPE_POINTER_TO.
6877
7215f9a0
MS
6878Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6879
71851aaa
MS
6880 * typeck.c (build_conditional_expr): Handle pmfs.
6881 (convert_for_assignment): Fix pmf support.
6882
6883 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
6884 (cp_convert_to_pointer): Handle pmfs.
6885 (cp_convert): Pass pmfs to cp_convert_to_pointer.
6886
6887 * typeck.c (common_type): Handle inheritance for pmfs.
6888
6889 * typeck2.c (build_m_component_ref): Do access control.
6890
6891 * typeck.c (comp_target_types): Check for conversion to void *
6892 before checking trickier conversions.
6893
7215f9a0
MS
6894 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
6895
6896 * pt.c (push_tinst_level): Complain if template instantiation depth
6897 is greater than max_tinst_depth.
6898
6899 * typeck.c (common_type): Assume that we can call common_type to
6900 unify the target type of a pointer.
6901
6902Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6903
6904 * decl2.c (finish_file): Don't synthesize methods at
6905 finish_vtable_prevardecl time. Do synthesize methods that are not
6906 used, but are public and not external.
6907
6908 * cvt.c (build_type_conversion): Only give an error if for_sure.
6909
6910 * typeck.c (comp_target_types): Only support pointer conversions if
6911 nptrs > 0.
6912
d11ad92e 6913Wed Mar 22 19:30:15 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
7215f9a0
MS
6914
6915 * init.c (build_new): Catch use of an initializer list where it
6916 shouldn't be.
6917
6918Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6919
6920 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
6921 non-constant.
6922
6923 * decl2.c: temp_name_counter is now public.
6924
6925 * decl.c (struct cp_function): Add temp_name_counter field.
6926 (push_cp_function_context): Save it.
6927 (pop_cp_function_context): Restore it.
6928
6929 * typeck.c (common_type): Handle unifying function types, and unify
6930 unmatched things to void* with a compiler_error, rather than
6931 silently like before.
6932
28cbf42c
MS
6933Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
6934
6935 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
6936 Brendan's last change and fix latent problem that causes TD entries
6937 to not come out when the things that need them has yet to be
6938 expanded.
6939
6940Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6941
6942 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
6943 and type1, since we might have changed op0 or op1.
6944
6945Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
6946
6947 * typeck.c (common_type): Don't mess up templates.
6948
6949Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6950
6951 * typeck.c (common_type): Handle ptms properly. Also handle
6952 T* -> void*.
6953 (build_binary_op_nodefault): New variable build_type controls what
6954 type is given to the expression when it is created. Set this to
6955 boolean_type_node for comparison ops instead of using result_type.
6956 (comp_target_types): Allow T * -> void *.
6957
6958 * cvt.c (cp_convert_to_pointer): Do access control when converting
6959 ptms, too.
6960
d11ad92e 6961Tue Mar 21 17:25:06 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
6962
6963 * parse.y (extern_lang_string): Catch use of linkage specs that
6964 aren't all naming the same language.
6965
6966 * class.c (finish_struct): Delete accidental duplicate code.
6967
6968Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6969
6970 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
6971 comparing functions and incomplete types.
6972
6973 * decl.c (finish_function): Only unset current_function_decl if
6974 !nested.
6975 (duplicate_decls): Last change went too far; we only want to stop
6976 checking for value/reference ambiguity.
6977
6978Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
6979
6980 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
6981 out fresh, as the new type may be larger.
6982
6983Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
6984
6985 * expr.c (extract_init): Try to expand the RTL for the
6986 initialization and figure out what it will look like so we can avoid
6987 run-time initialization. Disabled for now.
6988 (extract_scalar_init): Helper for scalar initialization.
6989 (extract_aggr_init): Helper for aggregate initialization.
6990
6991 * decl.c (duplicate_decls): Don't complain about ambiguous
6992 declarations.
6993 (obscure_complex_init): Now returns a tree. Call extract_init if
6994 we're optimizing and this is a toplevel decl.
6995 (finish_decl): Update accordingly.
6996
6997 * lex.c (check_newline): If we're just changing files (not pushing
6998 or popping), update input_file_stack->name.
6999
7000Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
7001
7002 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
7003 in the transitive unification code.
7004
d11ad92e 7005Mon Mar 20 16:07:50 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7006
7007 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
7008 non-functions.
7009 (grokdeclarator): Don't allow friends to be defined in local classes.
7010
7011Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7012
7013 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
7014 rather than DECL_SAVED_INSNS to decide whether or not this method
7015 was declared inline.
7016
7017 * method.c (synthesize_method): Turn off DECL_INLINE if
7018 function_cannot_inline_p thinks we're too large.
7019
7020 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
7021
7022Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7023
7024 * class.c (instantiate_type): Handle pmfs.
7025
7026 * typeck.c (convert_for_assignment): Check types when assigning one
7027 pmf to another.
7028
7029 * decl.c (define_label): Fix logic for printing out the name of the
7030 label in an error message.
7031
7032 * error.c (dump_expr): Support ARRAY_REF.
7033
d11ad92e 7034Fri Mar 17 17:43:02 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7035
7036 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
7037 (finish_prevtable_vardecl): Instead of here.
7038
7039Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7040
7041 * decl.c (expand_static_init): Also use expand_aggr_init if the
7042 initializer is a TREE_LIST.
7043 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
7044
7045 * pt.c (unify): Fix unification of return type.
7046
7047 * expr.c (fixup_result_decl): Use store_expr, rather than
7048 emit_move_insn, to move the return value into the place where
7049 callers will expect it.
7050
7051Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7052
7053 * init.c (build_offset_ref): Call assmble_external on functions.
d11ad92e 7054 * typeck.c (build_component_ref): Likewise.
28cbf42c 7055
d11ad92e 7056Thu Mar 16 20:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7057
7058 * decl.c (struct saved_scope): Add members base_init_list and
7059 member_init_list.
7060 (push_to_top_level): Save current_base_init_list and
7061 current_member_init_list to them.
7062 (pop_from_top_level): Put it back.
7063
7064Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7065
7066 * pt.c (instantiate_template): Call assemble_external.
7067
d11ad92e 7068Thu Mar 16 18:07:54 1995 Brendan Kehoe <brendan@phydeaux.cygnus.com>
28cbf42c
MS
7069
7070 * class.c: Include rtl.h, to get NULL_RTX.
7071 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
7072 on hosts with different sizes for each part of the union.
7073 * tree.c: Also include rtl.h.
7074 (layout_basetypes): Same change for DECL_SAVED_INSNS.
7075
7076Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7077
7078 * pt.c (unify): Fix array domain unification for 64-bit targets.
7079
7080 * decl2.c (finish_file): Push bizarre type decl before walking the
7081 vtables the first time.
7082 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
7083 with TREE_CHAIN (prev).
7084
7085 * init.c (emit_base_init): Use convert_pointer_to_real instead of
7086 convert_pointer_to when converting to a direct base.
7087
7088Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
7089
7090 * pt.c (type_unification): Handle transitive unification better.
7091
7092Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7093
7094 * decl2.c (walk_vtables): Always set prev to vars.
7095 (mark_vtable_entries): Call assemble_external on the vtable entries.
7096
7097 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
f30432d7 7098 calling layout_decl, so that it gets updated properly.
28cbf42c
MS
7099
7100 Finally re-enable dynamic synthesis. This time it works.
7101 * method.c (synthesize_method): Pass decl_function_context (fndecl)
7102 to {push,pop}_cp_function_context.
7103 * decl.c (push_cp_function_context): Now takes a tree argument.
d11ad92e 7104 (pop_cp_function_context): Likewise.
28cbf42c 7105 * call.c (build_method_call): Enable synthesis.
d11ad92e 7106 * lex.c (cons_up_default_function): Likewise.
28cbf42c
MS
7107
7108Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
7109
7110 * parse.y (setattrs): Chain onto prefix_attributes rather than
7111 setting it.
7112
d11ad92e 7113Wed Mar 15 13:00:00 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
28cbf42c
MS
7114
7115 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
7116 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
7117
d11ad92e 7118Mon Mar 13 21:00:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7119
7120 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
7121 and convert the size and integer_one_node to the index type.
7122
7123Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7124
7125 * typeck.c (get_member_function_from_ptrfunc): Save the instance
7126 argument, and tack it onto the front of the COND_EXPR to make the
7127 semantics come out right. Grab the instance argument from
7128 '*instance_ptrptr', rather than having it passed in separately.
7129
7130 * various: Change various consed-up comparison operations to have
7131 boolean type. Remove the instance argument in calls to
7132 get_member_function_from_ptrfunc.
7133
7134 * error.c (dump_expr): Dump true and false as "true" and "false".
7135
7136 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
7137 global init function.
7138
7139 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
7140 inline function is public.
7141
7142Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7143
7144 * init.c (is_friend): Be more careful about checking
7145 DECL_CLASS_CONTEXT on non-member functions.
7146
7147 * decl2.c (finish_vtable_vardecl): Don't bother calling
7148 assemble_external here.
7149 (prune_vtable_vardecl): New function that just splices out the
7150 vtable decl from the top-level decls.
7151 (import_export_inline): Unset DECL_EXTERNAL at first.
7152 (finish_file): Don't bother calling assemble_external here. Do
7153 splice out all of the vtables.
7154
7155Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7156
7157 * decl.c (finish_function): If we're not emitting the function yet,
7158 call assemble_external for it.
7159
7160 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
7161 here.
7162 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
7163 Also don't splice out the current vtable if it is unused.
7164 (finish_file): Move the second walk_vtables and the synthesis check
7165 inside the 'reconsider' loop. Move thunk emission after the
7166 'reconsider' loop.
7167
d11ad92e 7168Thu Mar 9 16:28:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7169
7170 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
7171 was passing bogus values for readonly and volatile from the original
7172 template decl, not the resultant type of the tsubst call.
7173
7174 * class.c (duplicate_tag_error): Use cp_error_at to point out the
7175 previous definition of the tag.
7176
7177Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7178
7179 * decl.c (start_function): Clear base_init_insns and protect_list.
7180 (struct cp_function): Add base_init_insns field.
7181 (push_cp_function_context): Also save base_init_insns.
7182 (pop_cp_function_context): Also restore base_init_insns.
7183
7184Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7185
7186 * init.c (member_init_ok_or_else): Check for initializing a static
7187 member here.
7188 (emit_base_init): Instead of here.
7189
7190Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7191
7192 * call.c (build_method_call): Disable synthesis as needed.
d11ad92e 7193 * lex.c (cons_up_default_function): Likewise.
b7484fbe 7194
d11ad92e 7195Tue Mar 7 10:14:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
f6abb50a
BK
7196
7197 * parse.y: New rules to allow attributes in a prefix position.
7198 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
7199 (setattr): New rule.
7200 (reserved_declspecs, declmods): Catch attributes here.
7201 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
7202 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
7203 descendent typedef.
7204 (grokdeclarator): Added code to support machine attributes.
7205 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
7206
b7484fbe
MS
7207Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7208
7209 * call.c (build_method_call): Don't synthesize methods outside of a
7210 function.
7211
7212 Make base initialization more re-entrant so that synthesis on the
7213 fly will work (and, eventually, template instantation on the fly).
7214 * init.c (sort_member_init): Don't bother with members that can't be
7215 initialized. Reorganize a bit. Don't initialize base members here.
7216 (sort_base_init): New function, like sort_member_init, but for base
7217 classes. Steals some code from emit_base_init.
7218 (emit_base_init): Simplify. Call sort_{member,base}_init before
7219 doing any initialization, so we don't have to save
7220 current_{member,base}_init_list in push_cp_function_context.
7221 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
7222 (expand_aggr_vbase_init): Simplify.
7223 * decl.c (struct cp_function): Add protect_list field.
7224 (push_cp_function_context): Also save protect_list.
7225 (pop_cp_function_context): Also restore protect_list.
7226 * call.c (build_method_call): Enable synthesis at point of call.
d11ad92e 7227 * lex.c (cons_up_default_function): Likewise.
b7484fbe
MS
7228
7229 * parse.y: Turn -ansi checks back into -pedantic checks.
7230
7231 * init.c (build_new): Fix -fcheck-new for array new.
7232
7233Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
7234
7235 * typeck.c (build_compound_expr): warn if left-hand operand of
7236 comma expression has no side-effects.
7237
7238Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7239
7240 * parse.y (primary): Change 'object qualified_id *' rules to 'object
7241 overqualified_id *'.
7242
d11ad92e 7243Fri Mar 3 12:48:17 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7244
7245 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
7246 Make the error look the same as the one we issue in c_sizeof.
7247
7248 * typeck.c (build_binary_op_nodefault): Give an error for trying
7249 to compare a pointer-to-member to `void *'.
7250
7251Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7252
7253 * typeck.c (build_unary_op): Handle bool increment with smoke and
7254 mirrors here, rather than in expand_increment where it belongs,
7255 because Kenner doesn't agree with me.
7256
d11ad92e 7257Fri Mar 3 00:08:10 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7258
7259 * decl.c (grokparms): Catch a PARM_DECL being used for a default
7260 argument as well.
7261
d11ad92e 7262Thu Mar 2 20:05:54 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7263
7264 * init.c (build_new): Don't allow new on a function type.
7265
7266 * parse.y (primary): Avoid a crash when seeing if the arg is of
7267 the same type as that given for the typespec in an explicit dtor call.
7268
7269Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7270
7271 * decl.c (finish_function): Change test for calling
7272 mark_inline_for_output.
7273
7274Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7275
7276 * typeck.c (build_modify_expr): Complain if
7277 build_default_binary_type_conversion fails.
7278
7279 * init.c (expand_default_init): Handle arguments of unknown type
7280 properly.
7281
7282 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
7283 if 'complain'.
7284 * various: Pass 'complain'.
7285
7286 * typeck.c (comptypes): Be more picky about comparing UPTs.
7287
d11ad92e 7288Wed Mar 1 11:03:41 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7289
7290 * decl.c (grokdeclarator): If declarator is null, say that the
7291 type used has an incomplete type.
7292
7293Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7294
7295 * pt.c (instantiate_template): Copy the template arguments to the
7296 permanent_obstack. Also use simple_cst_equal to compare them when
7297 looking for a previous instantiation.
7298
7299 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
7300 they are array domain types).
7301
7302Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7303
7304 * cp-tree.h: Define WANT_* constants for passing to
7305 build_expr_type_conversion.
7306 * cvt.c (build_expr_type_conversion): New function to build
7307 conversion to one of a group of suitable types.
7308 (build_default_binary_type_conversion): Use it.
d11ad92e
MS
7309 * decl2.c (grok_array_decl): Likewise.
7310 * typeck.c (build_unary_op): Likewise.
b7484fbe 7311 (build_array_ref): Tidy up a bit.
d11ad92e 7312 (build_binary_op): Likewise.
b7484fbe 7313
d11ad92e 7314Tue Feb 28 19:57:31 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7315
7316 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
7317
7318Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7319
7320 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
7321 reserved_declspecs' rule.
7322
7323 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
d11ad92e 7324 (direct_notype_declarator): Likewise.
b7484fbe
MS
7325 (complex_direct_notype_declarator): Add notype_qualified_id rule.
7326
7327 * lex.c (real_yylex): Handle :> digraph properly.
7328
d11ad92e 7329Tue Feb 28 12:26:29 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7330
7331 * decl.c (grokdeclarator): Check if it's a friend, not if it's
7332 non-virtual, that's being initialized. Move the check up to
7333 before FRIENDP would get cleared. Catch an unnamed var/field
7334 being declared void. Say just `field' instead of `structure field'
7335 in the error message. Only go for the operator name if DECLARATOR
7336 is non-null.
7337
7338Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7339
7340 * decl.c (start_function): Complain about abstract return type.
7341 (grokdeclarator): Complain about declaring constructors and
7342 destructors to be const or volatile. Complain about declaring
7343 destructors to be static.
7344
7345 * pt.c (uses_template_parms): Handle pmfs.
7346
7347 * decl.c (grokdeclarator): Don't call variable_size for array bounds
7348 that only depend on template constant parameters.
7349
d11ad92e 7350Mon Feb 27 15:38:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7351
7352 * error.c (dump_decl): Only look to see if it's a vtable if we
7353 actually have a name to check out.
7354
7355Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7356
7357 * cvt.c (convert_to_aggr): Lose misleading shortcut.
7358
7359Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
7360
7361 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
7362 not just for dwarf.
7363
d11ad92e 7364Sun Feb 26 00:10:18 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7365
7366 * decl.c (grokdeclarator): Don't allow a static member to be
7367 declared `register'.
7368
7369 * init.c (make_friend_class): Move up to a pedwarn for the warning
7370 about a class declaring friends with itself.
7371
7372 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
7373 or `inline friend class foo'. Only try to make a friend out of
7374 TYPE if we didn't already reset it to integer_type_node.
7375
d11ad92e 7376Sat Feb 25 22:32:03 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7377
7378 * decl.c (grokdeclarator): Don't allow initialization of a
7379 non-virtual function.
7380
7381 * decl.c (start_function): Do a pedwarn if we're changing `main'
7382 to have an int return type.
7383
7384Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7385
7386 * typeck.c (build_modify_expr): Handle simple assignment from
7387 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
7388
d11ad92e 7389Fri Feb 24 18:27:14 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7390
7391 * decl.c (grokdeclarator): Also don't allow virtual outside of a
7392 class decl for a scope method definition performed at global binding.
7393
7394 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
7395 of a bitfield.
7396
7397 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
7398
7399 * typeck.c (build_binary_op): Return an error_mark_node if either
7400 one of the args turned into an error_mark_node when we tried to
7401 use default_conversion.
7402
7403 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
7404
7405 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
7406 used on `__wchar_t'.
7407
7408Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
7409
7410 * except.c (end_protect_partials): Do it the right way.
7411
7412Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7413
7414 * typeck.c (build_binary_op_nodefault): Upgrade warning about
7415 comparing distinct pointer types to pedwarn.
7416
7417 * typeck2.c (digest_init): Cope with extra braces.
7418
7419 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
7420 of INT_CST_LT (..., interger_zero_node).
7421
d11ad92e 7422Wed Feb 22 14:45:52 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7423
7424 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
7425 function for systems that don't have EH.
7426
7427Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7428
7429 * call.c (can_convert_arg): Like can_convert, but takes an arg as
7430 well.
7431
7432 * pt.c (type_unification): Allow implicit conversions for parameters
7433 that do not depend on template parameters.
7434
d11ad92e 7435Tue Feb 21 18:43:48 1995 Douglas Rupp <drupp@cs.washington.edu>
1b65f56d
DR
7436
7437 * Make-lang.in, config-lang.in: ($exeext): New macro.
7438 * Make-lang.in: Try a "cp" if "ln" fails.
7439 * cp-tree.h (decl_attributes): Added argument.
7440 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
7441 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
7442 Modified spawnvp to have to correct number of arguments for OS/2, NT.
7443
b7484fbe
MS
7444Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
7445
7446 * decl.c (finish_function): Add calls to end_protect_partials to end
7447 the exception region that protects constructors so that partially
7448 constructed objects can be partially destructed when the constructor
7449 throws an exception.
7450 * init.c (perform_member_init, sort_member_init, emit_base_init):
7451 Added support for partially constructed objects.
7452 * init.c (build_partial_cleanup_for): New routine to do partial
7453 cleanups of a base class.
7454 * decl2.c (finish_file): Move the emitting of the exception table
7455 down, after we emit all code that might have exception regions in
7456 them.
7457 * except.c (end_protect_partials, might_have_exceptions_p): New
7458 routines.
7459 (emit_exception_table): Always output table if called.
7460 * cp-tree.h (protect_list, end_protect_partials,
7461 might_have_exceptions_p, emit_exception_table): Added.
7462
d11ad92e 7463Tue Feb 21 16:05:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
b7484fbe
MS
7464
7465 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
7466 address of a local variable.
7467 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
7468 were given a non-null PTR_TO_INSTPTR.
7469
7470Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7471
7472 * decl.c (duplicate_decls): Always lay out the merged decl.
7473
7474 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
d11ad92e 7475 (finish_prevtable_vardecl): Likewise.
59be85d7 7476
b7484fbe
MS
7477 * method.c (synthesize_method): Set interface_{unknown,only}
7478 according to the settings for our class, not the file where it comes
7479 from.
59be85d7 7480
b7484fbe 7481Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 7482
b7484fbe 7483 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 7484
e3417fcd
MS
7485Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7486
7487 * decl2.c (reparse_decl_as_expr): Support being called without a
7488 type argument.
7489
7490 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
7491 conflicts. Sigh.
7492
7493Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
7494
7495 * parse.y (template_def, fndef, fn.def1, return_init, condition,
7496 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
7497 component_decl_1, after_type_component_declarator0,
7498 notype_component_declarator0, after_type_component_declarator,
7499 notype_component_declarator, after_type_component_declarator,
7500 full_parm, maybe_raises, exception_specification_opt): Fix up,
7501 include exception_specification_opt maybeasm maybe_attribute and
7502 maybe_init if missing. Rename maybe_raises to
7503 exception_specification_opt to match draft wording. Use maybe_init
7504 to simplify rules.
7505
7506Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7507
7508 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
7509 built for news of scalar types.
7510
7511Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7512
7513 * typeck.c (build_binary_op_nodefault): Update code for warning
7514 about signed/unsigned comparisons from C frontend. Realize that the
7515 code in the C frontend is, if anything, even more bogus. Fix it.
7516 (build_binary_op): Undo default_conversion if it wasn't useful.
7517
7518 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
7519 PRE*CREMENT_EXPR.
7520
7521 * decl2.c (import_export_vtable): Don't try the vtable hack
7522 if the class doesn't have any real non-inline virtual functions.
7523 (finish_vtable_vardecl): Don't bother trying to find a non-inline
7524 virtual function in a non-polymorphic class.
d11ad92e 7525 (finish_prevtable_vardecl): Likewise.
e3417fcd
MS
7526
7527 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
7528
7529 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
7530
7531 * init.c (expand_virtual_init): Always call assemble_external.
7532
7533 * class.c (build_vfn_ref): Always call assemble_external.
7534 (build_vtable): Always call import_export_vtable.
d11ad92e 7535 (prepare_fresh_vtable): Likewise.
e3417fcd
MS
7536 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
7537
8ccc31eb
MS
7538Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7539
7540 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
7541 whether an enumerated type fits in a bitfield.
7542
7543Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7544
7545 * class.c (grow_method): Update method_vec after growing the class
f30432d7 7546 obstack.
8ccc31eb
MS
7547
7548Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
7549
7550 * parse.y (handler_seq): Push a level for the catch parameters.
7551
7552Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7553
7554 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
7555 bases, in case they've been clobbered.
7556
7557Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
7558
7559 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
7560 so that one day it will always be valid.
d11ad92e 7561 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
8ccc31eb
MS
7562
7563 * cp-tree.h (copy_binfo): Removed, unused.
d11ad92e 7564 * tree.c (copy_binfo): Likewise.
8ccc31eb
MS
7565
7566Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7567
7568 * init.c (build_new): Save the allocation before calling
7569 expand_vec_init on it.
7570
7571 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
7572 match the TYPE_PRECISION of the underlying type for constant folding
7573 to work.
7574
7575Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
7576
7577 * except.c (push_eh_entry, expand_start_all_catch,
7578 expand_leftover_cleanups, expand_end_catch_block): Keep track of
7579 the context in which the exception region occurs.
7580 (build_exception_table): If the region was not output, don't output
7581 the entry in the eh table for it.
7582
7583Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7584
7585 * init.c (expand_default_init): Only use a previous constructor call
7586 if it's a call to our constructor. Does the word "Duh" mean
7587 anything to you?
7588
7589 * decl.c (grokparms): Fine, just don't call
7590 convert_for_initialization at all. OK? Happy now?
7591
7592Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7593
7594 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
7595 method vector has a second element before returning it.
7596
7597 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
7598 convert_for_initialization.
7599
7600Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7601
7602 * typeck.c (build_modify_expr): Compare function name to
7603 constructor_name (current_class_type) instead of current_class_name.
7604
7605 * decl.c (grokparms): Don't do anything with the return value of
7606 convert_for_initialization.
7607
7608 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
7609
7610 * decl.c (duplicate_decls): Tweak error message.
7611
7612 * typeck.c (build_const_cast): Implement checking.
7613 (build_reinterpret_cast): Implement some checking.
7614
7615 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
7616 converting to the same aggregate type.
7617 (CONV_STATIC_CAST): Include it.
d11ad92e 7618 (CONV_C_CAST): Likewise.
8ccc31eb
MS
7619 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
7620 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
7621
7622Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7623
7624 * typeck.c (build_c_cast): Use non_lvalue to tack something on
f30432d7 7625 where necessary.
8ccc31eb
MS
7626
7627 * decl.c (auto_function): Now a function.
7628 * except.c (init_exception_processing): terminate, unexpected,
7629 set_terminate, and set_unexpected have C++ linkage.
7630
7631 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
7632 truthvalue_conversion for converting to bool, as it handles
7633 user-defined conversions properly.
d11ad92e 7634 (condition_conversion): Likewise.
8ccc31eb
MS
7635
7636 * except.c (expand_throw): Don't call convert_to_reference.
7637 Pass the correct parameters to build_new.
7638
7639 * method.c (do_build_assign_ref): Don't use access control when
7640 converting to a base reference here.
7641 (do_build_copy_constructor): Or here.
7642
7643 * init.c (build_new): Unset TREE_READONLY on the dereferenced
7644 pointer before assigning to it.
7645
7646 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
7647
7648 * decl2.c (delete_sanity): You can now delete pointer to const.
7649
7650Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
7651
7652 * decl.c (finish_function): Don't rely on actual parameters being
7653 evaluated left-to-right.
d11ad92e 7654 * except.c (expand_end_catch_block): Likewise.
8ccc31eb
MS
7655
7656Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7657
7658 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
7659 considered lvalues.
7660 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
f30432d7 7661 lvalue_p.
8ccc31eb
MS
7662
7663 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
7664 types.
7665 (convert_to_reference): Fix erroneous text substitution.
7666
7667 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
7668 Add new argument to all callers.
7669
7670 * typeck.c (convert_arguments): Check for error_mark_node before
7671 trying to do anything with the actual parameter.
7672
7673 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
7674 fold it.
7675 (bool_truthvalue_conversion): Remove. Fix all callers to call
7676 truthvalue_conversion instead.
7677 (various): Fold CLEANUP_POINT_EXPRs.
7678
7679 * parse.y (conditions): Call condition_conversion rather than
7680 building up a CLEANUP_POINT_EXPR.
7681
7682 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
7683 under -falt-external-templates.
7684
7685Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7686
7687 * init.c (build_new): Complain about new of const type without
7688 initializer. Other cleanup.
7689
7690 * call.c (compute_conversion_costs): Don't call
7691 build_type_conversion with a reference type; convert to the target
7692 type and check its lvaluetude.
d11ad92e 7693 * cvt.c (convert_to_reference): Likewise.
8ccc31eb
MS
7694
7695 * cvt.c (build_type_conversion_1): There will never be any need to
7696 dereference references here now.
7697
7698Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
7699
7700 * except.c (expand_builtin_throw): Make sure we only `use' the
7701 value of return_val_rtx.
7702
7703Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7704
7705 * parse.y (structsp): Don't complain about declaring a type being
7706 defined to be a friend.
7707
7708 * decl2.c (warn_if_unknown_interface): Note the template in question
7709 and the point of instantiation, for -falt-external-templates.
7710 * lex.c (reinit_parse_for_method): Pass the decl to
7711 warn_if_unknown_interface.
d11ad92e
MS
7712 * pt.c (instantiate_template): Likewise.
7713 (end_template_decl): Likewise.
8ccc31eb
MS
7714
7715 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
7716 nested name again, to make local classes work a bit better.
7717
7718 * typeck.c (build_function_call_real): Dereference reference after
7719 checking for incomplete type.
7720
7721 * init.c (build_new): Accept new of const and volatile types.
7722
7723Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
7724
7725 * decl.c (grokdeclarator): Fix error message.
7726
7727Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7728
7729 * typeck.c (convert_for_initialization): Do bash arrays when
7730 converting to a reference to non-array.
7731
7732Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7733
7734 * cvt.c (cp_convert): Don't call convert_to_reference, or
7735 automatically dereference references. Do pass reference conversions
7736 to cp_convert_to_pointer.
7737 (cp_convert_to_pointer): Support references.
7738
7739 * call.c (build_method_call): Don't build up a reference to the
7740 parameter here; let build_overload_call handle that.
7741
7742 * typeck.c (build_c_cast): Call convert_to_reference directly if
7743 converting to a reference type.
d11ad92e
MS
7744 * method.c (do_build_copy_constructor): Likewise.
7745 * method.c (do_build_copy_constructor): Likewise.
7746 (do_build_assign_ref): Likewise.
8ccc31eb
MS
7747
7748 * call.c (build_method_call): Dereference a returned reference.
d11ad92e 7749 * typeck.c (build_function_call_real): Likewise.
8ccc31eb
MS
7750
7751 * decl.c (xref_basetypes): Check for unions with basetypes here.
7752 (xref_tag): Instead of here.
7753
7754 * pt.c (process_template_parm): Template type parm decls are
7755 artificial.
7756
7757Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7758
7759 * parse.y (typed_declspecs): Add missing semicolon.
7760 (do_xref_defn): Resurrect.
7761 (named_class_head_sans_basetype): Move template specialization
7762 definition cases to named_class_head_sans_basetype_defn.
7763
7764 * decl2.c (grokfield): Call pushdecl_class_level after setting the
7765 TYPE_NAME, not before.
7766
7767Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7768
7769 * call.c (convert_harshness): Don't call sorry here. Don't allow
7770 conversions between function pointer types if pedantic.
7771
7772 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
7773
7774 * lex.c (cons_up_default_function): Use the full name for the return
7775 type of op=.
7776
7777 * decl.c (set_nested_typename): Don't worry about anonymous types,
7778 as they already have a unique name.
7779 (pushdecl): Remove redundant set_nested_typename
7780 (xref_tag): Split out base handling into xref_basetypes.
7781
7782 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
7783 not considered incomplete even though their definition is unknown.
7784
7785 * decl.c (xref_defn_tag): Lose.
7786 (xref_tag): xref_next_defn = ! globalize.
7787 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
7788 ones that should have it set will have it set by pushtag.
d11ad92e 7789 (pushdecl_class_level): Likewise.
8ccc31eb
MS
7790 (pushtag): Tidy up a bit.
7791 (set_nested_typename): Push a decl for the nested typename from
7792 here, rather than from xref_defn_tag.
7793
7794 * parse.y (do_xref): Lose.
7795 (named_class_head): If we see 'class foo:' we know it's a
7796 definition, so don't worry about base lists for non-definitions.
7797
7798 * pt.c (push_template_decls): Template parm decls are artificial.
7799
7800 * decl.c (duplicate_decls): Restore check for qualifier
7801 disagreement for non-functions.
7802 (decls_match): Remove check for qualifier disagreement.
7803
7804Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7805
7806 * decl.c (grok_reference_init): Convert initializer from
f30432d7 7807 reference.
d11ad92e 7808 * typeck.c (convert_for_initialization): Likewise.
8ccc31eb
MS
7809
7810 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
7811
7812 * cvt.c (cp_convert): Don't convert to the same class type by just
7813 tacking on a NOP_EXPR.
7814 (convert_to_reference): Use comp_target_types instead of comptypes
7815 so that we don't allow conversions two levels down.
7816
7817Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7818
7819 * class.c (build_vbase_path): Bash types to make the backend happy.
7820 * cvt.c (build_up_reference): Bash the types bashed by
7821 build_vbase_path to be reference types instead of pointer types.
d11ad92e 7822 (convert_to_reference): Likewise.
8ccc31eb
MS
7823
7824 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
7825 reference type.
7826
7827 * parse.y (structsp): Put back error for 'struct B: public A;'.
7828
7829Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
7830
7831 * except.c: Add support for mips systems that don't define __mips
7832 but do define mips, like Ultrix.
7833
7834Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
7835
7836 * except.c: Add support for exception handling on the Alpha.
7837
1038f4f9
MS
7838Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
7839
7840 * decl2.c (finish_file): Fix bug in Jan 31st change.
7841
d11ad92e 7842Tue Jan 31 16:59:15 1995 Gerald Baumgartner <gb@lorenzo.cs.purdue.edu>
1038f4f9
MS
7843
7844 * sig.c (build_signature_pointer_or_reference_type): Don't set
7845 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
7846 doesn't expect to find a copy constructor.
7847 * call.c (build_method_call): Treat signature pointers/reference
7848 as if IS_AGGR_TYPE were set.
7849
d18c083e
MS
7850Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
7851
7852 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
7853 (build_t_desc): Inform the user here if they try and build
7854 with -frtti and don't include <typeinfo.h>.
7855
7856 * decl2.c (finish_prevtable_vardecl): Support rescanning.
7857 (finish_file): Move finish_prevtable_vardecl up to before the global
7858 initializers are done as tdecls are initialized in the global
7859 initializer. Also Pick up any new tdecls or vtables needed by
7860 synthesized methods.
7861
7862 * class.c (finish_struct): Simplify. We have to do rtti scanning at
7863 end, so we might as well do all of it there.
7864
7865Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7866
7867 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
7868 targets, too.
7869
7870Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
7871
7872 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
7873 finish_vtable_vardecl. It has the first half functionality from
7874 that routine.
7875 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
7876 in finish_prevtable_vardecl.
7877 * decl2.c (finish_file): Call finish_prevtable_vardecl.
7878 * gc.c (build_generic_desc): Allow it to be called when not at the
7879 global binding layer, but behave as if we were.
7880 (build_t_desc): Rearrange a bit so that it really works and is
7881 easier to follow.
7882 * class.c (finish_struct): Don't decide on tdecls here, as we have
7883 to wait until the end of the file in general to decide whether or
7884 not they come out.
7885
7886Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7887
7888 * init.c (build_delete): Check access to operator delete before
7889 calling the destructor.
7890 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
7891 return error_mark_node.
7892 * call.c (build_method_call): Use the one-argument op delete even if
7893 it's an error.
7894
7895 * init.c (build_new): Fix -fthis-is-variable support.
d11ad92e 7896 * call.c (build_method_call): Likewise.
d18c083e
MS
7897
7898 * call.c (convert_harshness): Make conversion from a pointer to bool
7899 worse than conversion to another pointer.
7900
7901Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7902
7903 * init.c (build_new): Check new return value if -fcheck-new.
7904
7905 * lex.c (check_newline): Clear end_of_file when we're done, too.
7906
7907Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
7908
7909 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
7910 vtables whereever they go.
7911
7912 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
7913 right.
7914
7915Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
7916
7917 * decl2.c (finish_vtable_vardecl): Now set the
7918 interface/implementation of vtables on the first virtual function,
7919 if one exists, otherwise we use the old method. This is a major win
7920 in terms of cutting down the size of objects and executables in
7921 terms of text space and data space. Now most of the savings that
7922 #pragma interface/implementation gives is automatic in a fair number
7923 of cases.
7924
7925Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7926
7927 * decl.c (grokdeclarator): Discard the template parameters in a
7928 template constructor declaration so that the function is always
7929 named constructor_name (ctype).
7930
7931 * lex.c (check_newline): Use ungetc to put back the character before
7932 calling HANDLE_PRAGMA.
7933
7934Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
7935
7936 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
7937 make sure we still match them.
7938
7939Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7940
7941 * parse.y: Add END_OF_LINE token.
7942
7943 * lex.c (check_newline): Set linemode when we see a # directive, and
7944 unset it when we're done. Turn all 'return's into 'goto skipline'.
7945 Fix all uses of '\n', since we won't see it anymore. Put back the
7946 character we read before checking for a sysv or target pragma.
7947 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
7948 (handle_sysv_pragma): Don't look at the input stream; quit when we
7949 see an END_OF_LINE token.
7950
7951 * input.c (getch): Return EOF if we're in line mode and at the end
7952 of a line.
7953 (put_back): Don't put back an EOF.
7954
7955Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
7956
7957 * except.c (expand_throw): Do the newing of the exception object
7958 before we load the type descriptor or the address so that we don't
7959 wipe any of the values out.
7960
7961Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
7962
7963 * except.c (init_exception_processing): Don't use r12 on the rs6000.
7964
7965Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7966
7967 * decl.c (grokparms): Don't try to build up a reference at this point.
7968
7969 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
7970 will suffice to convert from integer_zero_node.
7971
d11ad92e 7972Wed Jan 25 15:02:09 1995 David S. Miller <davem@nadzieja.rutgers.edu>
b7484fbe
MS
7973
7974 * class.c (instantiate_type): Change error message text.
7975 * typeck2.c (store_init_value): Likewise.
7976
e1cd6e56
MS
7977Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
7978
7979 * pt.c (tsubst): When we copy a node, don't forget to copy
7980 TREE_CHAIN, we use it later.
7981
7982Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7983
7984 * typeck.c (convert_for_assignment): Initialize variable before use.
7985
7986Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7987
7988 * g++.c (main): Link with both libstdc++ and libg++ if called as
7989 something ending with "g++", otherwise only libstdc++. Move -lm to
7990 the end of the line.
7991
7992Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7993
7994 * call.c (build_method_call): Don't mess with 'this' before calling
f30432d7 7995 compute_conversion_costs.
e1cd6e56
MS
7996
7997Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
7998
7999 * search.c (get_matching_virtual): Give line number for previous
f30432d7 8000 declaration.
e1cd6e56
MS
8001
8002 * call.c (convert_harshness): Handle conversions to references
8003 better.
8004
8005 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
8006
8007Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
8008
8009 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
8010 as the TREE_CHAIN for methods will take us to the next differently
8011 named function, DECL_CHAIN won't.
8012
8013Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8014
8015 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
8016
8017 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
8018 warn_parentheses defaults to 0.
8019
8020 * decl.c (grokparms): Put back call to require_instantiated_type.
8021
8022Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
8023
8024 * except.c (exception_section): Use the data section on the rs6000.
8025 Change calling convention for named_section.
8026
8027Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
8028
f30432d7
MS
8029 * cp-tree.h : Make if (x=0) warn with wall
8030 * parse.y : Make if (x=0) warn with wall
e1cd6e56 8031
255512c1
JM
8032Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8033
e1cd6e56
MS
8034 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
8035 BITS_PER_UNIT otherwise.
8036
8037 * search.c (get_matching_virtual): Don't check the binfo if the
8038 types are the same.
8039
8040 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
f30432d7 8041 bool.
255512c1
JM
8042
8043Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8044
e1cd6e56
MS
8045 * various: Use boolean_type_node, boolean_true_node,
8046 boolean_false_node.
8047
8048 * search.c (get_matching_virtual): Allow covariant returns that
8049 don't require pointer adjustment.
8050
8051 * typeck.c (build_conditional_expr): Don't call default_conversion
8052 on ifexp.
8053
8054 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
8055
8056 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
8057
d11ad92e 8058Sun Jan 15 22:17:32 1995 David Binderman <dcb@lovat.fmrco.COM>
e1cd6e56
MS
8059
8060 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
8061
8062Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8063
e1cd6e56
MS
8064 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
8065 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
8066 for bool.
8067
8068Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8069
8070 * decl2.c (finish_file): We need to mess up if there are any
8071 variables in the list, not just if there is one with a constructor.
8072
8073Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8074
8075 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
8076 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
8077 (finish_function): Trust rest_of_compilation.
8078
8079 * decl2.c (finish_file): Also call functions designated as static
8080 constructors/destructors.
8081
8082 * decl.c (grokdeclarator): Allow access decls of operator functions.
8083 (grokparms): Only do convert_for_initialization if the initializer
8084 has a type.
8085 (duplicate_decls): Put back push_obstacks_nochange call.
8086
8087 * lex.c (real_yylex): Downgrade complaint about the escape sequence
8088 being too large from pedwarn to warning.
8089
8090 * decl.c (grokdeclarator): Don't complain about long long in system
8091 headers.
8092
8093 * lex.c (real_yylex): Handle digraphs.
8094
8095Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8096
8097 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
8098 affects C linkage declarations now.
8099
8100 * typeck.c (comp_target_types): Grok simple contravariant conversions.
8101 (common_type): t1 and t2 are interchangeable.
8102
8103 * various: Test return value of comp_target_types differently in
8104 different places; it now returns -1 for a contravariant conversion
8105 (which is fine in symmetric cases).
8106
8107 (common_type): Prefer long double to double even when
8108 they have the same precision.
8109
8110 * decl.c (grokparms): Call convert_for_initialization to check
8111 default arguments.
8112
8113 * init.c (build_new): void_type_node has a size (of 0).
8114
8115 * decl.c (decls_match): Also check for agreement of TREE_READONLY
8116 and TREE_THIS_VOLATILE.
8117 (push_class_level_binding): Properly handle shadowing of
8118 nested tags by fields.
8119
d11ad92e 8120 * search.c (dfs_pushdecls): Likewise.
e1cd6e56
MS
8121
8122 * decl2.c (finish_file): Don't second-guess self-initialization.
8123
8124 * cvt.c (convert_to_reference): Work with expr directly, rather than
8125 a copy.
8126
8127 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
8128
8129 * init.c (add_friend): Downgrade duplicate friend message from
8130 pedwarn to warning.
8131
8132 * decl.c (duplicate_decls): Push obstacks before calling common_type.
8133
8134Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
8135
8136 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
8137 exception table labels.
d11ad92e
MS
8138 (expand_start_all_catch): Likewise.
8139 (expand_leftover_cleanups): Likewise.
8140 (expand_end_catch_block): Likewise.
e1cd6e56
MS
8141 * except.c (make_first_label): new function.
8142 (expand_start_all_catch): add a call to make_first_label() before
8143 using a label as a jump destination.
d11ad92e
MS
8144 (expand_end_all_catch): Likewise.
8145 (expand_leftover_cleanups): Likewise.
8146 (expand_end_catch_block): Likewise.
8147 (expand_builtin_throw): Likewise.
8148 (expand_throw): Likewise.
e1cd6e56
MS
8149 * except.c: Add ARM processor support for exception handling.
8150
8151Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8152
8153 (complete_array_type): Copy code from C frontend.
8154
8155 * lex.c (real_yylex): Don't multiply the length of a wide string
8156 literal by WCHAR_BYTES.
8157
8158 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
8159 (duplicate_decls): Instead of here.
8160 (define_label): Complain about a label named wchar_t.
8161 (grokdeclarator): Complain about declarations of
8162 operator-function-ids as non-functions.
8163
8164 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
8165 COMPOUND_EXPRs.
8166 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
8167
8168 * lex.c (real_yylex): Don't skip whitespace when reading the next
8169 character after ->.
8170
8171Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
8172
8173 * except.c: Allow cc1plus to be built with native compiler on rs6000.
8174 (expand_start_all_catch): Add assemble_external calls for various
8175 routines we call.
d11ad92e
MS
8176 (expand_leftover_cleanups): Likewise.
8177 (expand_start_catch_block): Likewise.
8178 (do_unwind): Likewise.
8179 (expand_builtin_throw): Likewise.
e1cd6e56
MS
8180
8181Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8182
8183 * decl.c (pushtag): Only look for a previous decl in the current
8184 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
8185
8186 * gxx.gperf: Add __signature__ and __sigof__ keywords.
8187
8188 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
8189 does set flag_no_gnu_keywords and flag_operator_names.
8190
8191 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
8192 Unset extension keywords if -fno-gnu-keywords.
8193 Allow operator names ('bitand') if -foperator-names.
8194 Never unset 'asm'; -fno-asm only affects 'typeof'.
8195
8196 * decl.c (lookup_name_real): The got_object special lookup only
8197 applies to types.
8198
8199Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8200
8201 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
8202
8203 * parse.y (primary): Unset got_object after all rules that use the
f30432d7 8204 'object' nonterminal.
e1cd6e56
MS
8205 (object): Set got_object.
8206
8207 * lex.h: Declare got_object.
8208
8209 * decl.c (lookup_name_real): Also lookup names in the context of an
8210 object specified.
8211
8212Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
8213
8214 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
8215 for things that have to be added to pointers, not size_type. Cures
8216 problems with pointer to members on Alphas.
d11ad92e
MS
8217 (build_binary_op_nodefault): Likewise.
8218 (get_delta_difference_: Likewise.
8219 (build_ptrmemfunc): Likewise.
e1cd6e56
MS
8220
8221Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8222
8223 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
8224 it.
8225
8226 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
8227 when dealing with overloaded member functions; just act like
8228 build_offset_ref.
8229 (commonparms): Remove misleading comment.
8230
8231 * decl.c (duplicate_decls): Complain about repeated default
8232 arguments here.
8233 (redeclaration_error_message): Instead of here.
8234 (pushdecl): Complain about missing default arguments here.
8235 (grokparms): Instead of here.
8236 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
8237 (grok_reference_init): Do not complain about missing initializer if
8238 declared 'extern'.
8239
8240 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
8241 function alternative and want_type is not set.
8242
8243Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8244
8245 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
8246 the decl when the type has no TYPE_NAME.
8247 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
8248 (lookup_name_real): Call lookup_field with want_type =
8249 prefer_type.
8250
8251 * search.c (lookup_field): Handle want_type properly in the presence
8252 of fields with the same name.
8253
8254 * decl.c (set_nested_typename): Set nested name for file-scope types
8255 to include leading ::.
8256 (pushdecl): Set the nested typename if the decl doesn't have one,
8257 rather than if the type's canonical decl doesn't have one.
8258
e1cd6e56
MS
8259Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8260
8261 * typeck.c (convert_for_assignment): Complain about contravariance
8262 violation here.
8263 (comp_target_types): Instead of here.
8264 (build_unary_op): resolve_offset_ref before checking for a valid
8265 type.
8266
8267 * spew.c (yylex): Decrement looking_for_typename after we see a
8268 _DEFN.
8269
8270 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
f30432d7 8271 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
e1cd6e56
MS
8272
8273 * typeck.c (convert_for_assignment): Converting pointers to bool
8274 does not need a cast.
8275
8276Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8277
8278 * class.c (instantiate_type): Initialize nsubsts parm.
8279
d11ad92e 8280 * pt.c (do_function_instantiation): Likewise.
e1cd6e56
MS
8281
8282Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8283
8284 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
8285 DECL_SAVED_INSNS to determine whether or not we've seen a definition
8286 of this function.
d11ad92e 8287 (instantiate_template): Likewise.
e1cd6e56
MS
8288
8289 * call.c (convert_harshness): Allow const reference binding when
8290 called from the overloading code, but not when called from
8291 can_convert (since it isn't a conversion).
8292 (convert_harshness): Put back some disabled code.
8293
8294Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8295
8296 * call.c (convert_harshness): There is no implicit conversion from
8297 void* to other pointer types (unless the parameter is (void*)0).
8298 (convert_harshness): Non-lvalues do not convert to reference types.
8299
8300 * class.c (finish_struct_methods): Still set
f30432d7 8301 TYPE_HAS_{INT,REAL}_CONVERSION.
e1cd6e56
MS
8302
8303 * call.c (can_convert): Don't use aggregate initialization.
8304
8305 * cp-tree.h: Declare lookup_conversions.
8306
8307Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
8308
8309 * parse.y (simple_stmt): Fix duplicate case value error messages to
8310 be more readable.
8311
8312Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8313
8314 * cvt.c (build_type_conversion): Total rewrite to use
8315 convert_harshness instead of reproducing conversion logic here. Now
8316 much shorter.
8317
8318 * call.c (convert_harshness): Support conversions to bool.
8319 (can_convert): Checks whether a conversion is less harsh
8320 than USER_CODE, for build_type_conversion.
8321
8322 * search.c (add_conversions): Function for passing to dfs_walk which
8323 adds all the type conversion operators in the current type to a list.
8324 (lookup_conversions): Calls dfs_walk with add_conversions and return
8325 the list.
8326 (dfs_walk): Don't require a qfn.
8327
8328 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
8329 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
8330
8331 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
8332 (grow_method): A separate function for building onto the growing
8333 method vector.
8334 (finish_struct_methods): Use it. Put all type conversion operators
8335 right after the constructors. Perhaps we should sort the methods
f30432d7 8336 alphabetically?
e1cd6e56
MS
8337
8338Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
8339
8340 * call.c (build_method_call): Lose another misleading shortcut.
8341
8342Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
8343
8344 * gc.c (build_bltn_desc): Handle bool as a built-in type.
8345
8346Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
8347
8348 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
8349 on the complete type because of small virtual bases.
255512c1 8350
8145f082
MS
8351Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
8352
8353 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
8354 front end.
8355 (pushdecl): Also count decls pushed that are of a type being defined
8356 as incomplete things.
8357 * class.c (finish_struct): Move hack_incomplete_structures up to
8358 just after we set it as not being defined, so that the decls we
8359 build for RTTI don't count as incomplete.
8360
8361Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
8362
8363 * pt.c (tsubst): Fix problem with defining constructors in templated
8364 classes with virtual bases.
8365
8366Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
8367
8368 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
8369 expressions.
d11ad92e 8370 * gc.c (build_typeid): Likewise.
8145f082
MS
8371
8372Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
8373
8374 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
8375 don't assert on complex AGGR inits.
8376
8377Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
8378
8379 * method.c (build_overload_value): Handle pointer to members as
8380 template arguments.
8381
8382Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
8383
8384 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
8385 to do take the address of a data member for a pointer to data
8386 member.
8387
8388Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
8389
8390 * decl.c (grokdeclarator): Use the typedef name for linkage if the
8391 type doesn't otherwise have a name.
8392
d11ad92e 8393 * decl2.c (grokfield): Likewise.
8145f082
MS
8394
8395 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
8396 DECL_NAME of enums, structs and classes, we have to avoid trying to
8397 put it in the TYPE_FIELDS again.
8398
8399Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
8400
8401 * decl2.c (check_classfn): Ignore this parameter on static functions
8402 when checking to see if we match.
8403
8404Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
8405
8406 * typeck.c (unary_complex_lvalue): Handle address of non-left most
8407 pointers to members by calling get_delta_difference.
8408
5edb8b93
MS
8409Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
8410
8411 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
8412 static functions to early.
8413
8414Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
8415
8416 * method.c (make_thunk): Handle encoding of positive thunk offsets.
8417
8418Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
8419
8420 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
8421
6060a796
MS
8422Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
8423
8424 * decl2.c (check_classfn): Use decls_match to check if this has
8425 already been declared, as the DECL_ASSEMBLER_NAME may have been
8426 changed via asm("new_name").
8427 * decl.c (decls_match): Make public.
8428
8429Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
8430
8431 * *.[chy] (expand_aggr_init) Add fourth argument to handle
8432 distinction between = init and (init) style of initializations.
8433 * *.[chy] (finish_decl): Add fifth argument to to handle
8434 distinction between = init and (init) style of initializations.
8435
8436Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
8437
8438 Fix some random `explicit' bugs.
8439
8440 * cvt.c (convert_to_reference): Add third parameter to
8441 convert_force.
d11ad92e
MS
8442 (convert_force): Likewise.
8443 * call.c (build_method_call): Likewise.
8444 * decl2.c (setup_vtbl_ptr): Likewise.
8445 * init.c (expand_virtual_init): Likewise.
8446 (build_member_call): Likewise.
8447 (build_delete): Likewise.
8448 (build_vbase_delete): Likewise.
8449 * typeck.c (build_component_addr): Likewise.
8450 (build_c_cast): Likewise.
8451 (build_modify_expr): Likewise.
8452 * cp-tree.h (CONV_NONCONVERTING): Likewise. Add so that we can
6060a796
MS
8453 distinguish the context in which the conversion appears. Add thrid
8454 argument to build_c_cast.
8455 * cvt.c (cp_convert): Pass whether or not we want to consider
8456 non-converting constructors down to build_method_call.
8457 * decl2.c (reparse_absdcl_as_casts): Add third argument to
8458 build_c_cast.
d11ad92e
MS
8459 * gc.c (build_m_desc): Likewise.
8460 * init.c (build_new): Likewise.
8461 * parse.y (expr_no_commas): Likewise.
8462 (primary): Likewise.
8463 * typeck.c (build_x_function_call): Likewise.
8464 (build_static_cast): Likewise.
8465 (build_reinterpret_cast): Likewise.
8466 (build_const_cast): Likewise.
8467 (build_c_cast): Likewise.
8468 (build_ptrmemfunc): Likewise.
8469 * typeck2.c (build_functional_cast): Likewise.
6060a796
MS
8470 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
8471 expand_aggr_init_1 as inits are converted to the destination type.
8472
8473Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8474
8475 * Make-lang.in (cc1plus): Depends on c-pragma.o.
8476
8477 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
8478
8479 * lex.c (check_newline): If the #pragma is not recognized by g++,
8480 try machine-specific ones too.
8481 (handle_sysv_pragma): Copied from c-lex.c.
8482
8483Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
8484
8485 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
8486 reference better.
8487
8488Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8489
8490 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
8491 IS_AGGR_TYPE, since now they will not both be set on the same type.
8492
8493 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
8494 instantiations controlled by -fexternal-templates.
8495
8496 * decl.c (duplicate_decls): Don't complain about different values of
8497 __attribute__ ((const)) and ((noreturn)).
8498
81cdf787
DE
8499Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
8500
8501 * Makefile.in (BISONFLAGS): Delete --yacc.
8502 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
8503 (PARSE_C): Undo last patch.
8504
be99da77 8505Fri Dec 2 10:44:36 1994 Mike Stump <mrs@cygnus.com>
30ffea6b 8506
3526f730 8507 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
8508 y.tab.c.
8509
6060a796
MS
8510Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8511
8512 * decl.c (finish_decl): Don't call obscure_complex_init for decls
8513 of indeterminate size.
8514
8515Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8516
8517 * decl.c (obscure_complex_init): Function to tweak the decl to
8518 prevent expand_decl from tring to initialize it.
8519 (finish_decl): Use it rather than writing the same code in three
8520 different places.
8521
8522 * parse.y (bad_parm): Stop trying to support parms without types.
8523
8524Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
8525
8526 * decl2.c (grokfield): Make asm specs on static member functions
8527 work.
8528
8529Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
8530
8531 * except.c (expand_throw): Make a copy of the thrown object.
8532
8533Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8534
8535 * parse.y: : has lower precedence than =.
8536
8537Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
8538
8539 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
8540 manglings.
8541 (grokvardecl): Add namespace into variable name.
8542
8543Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
8544
8545 * decl2.c (current_namespace_id): New routine to transform a simple
8546 name into a name in a namespace.
8547 * decl.c (grokdeclarator): Use it.
8548 * decl2.c (get_namespace_id): Find the name of the current
8549 namespace.
8550 (push_namespace, pop_namespace): Complete out missing
8551 functionality.
8552
8553Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8554
8555 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
8556 not be defined. Fix warning message for enums and restore warning
8557 for non-enums.
8558
8559 * decl2.c (push_namespace): Dummy function.
d11ad92e
MS
8560 (pop_namespace): Likewise.
8561 (do_namespace_alias): Likewise.
8562 (do_using_decl): Likewise.
8563 (do_using_directive): Likewise.
6060a796
MS
8564
8565 * parse.y: New token NSNAME for namespace names.
8566 (extdef): Add namespace, using definitions.
8567 (using_decl): New rule for using declarations.
8568 (any_id): New rule for identifiers with any degree of scoping.
8569 (identifier): Add NSNAME.
d11ad92e 8570 (notype_identifier): Likewise.
6060a796
MS
8571 (component_decl): Add using_decl.
8572 (nested_name_specifier): Add NSNAME SCOPE.
8573
8574 * typeck.c (convert_for_assignment): Handle conversions between
8575 enums and bool.
8576
8577 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
8578 FUNCTION_DECLs.
8579
8580Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
8581
8582 * class.c (finish_struct): Give an error if one tries to declare a
8583 bit-field's size greater than a long long, as the backend will dump.
8584 It is not an error to declare an enum bit-field greater than its
8585 precision. Warn if an enum bit-field is too small to hold all
8586 its values.
8587
8588Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
8589
8590 * typeck.c (convert_for_assignment): Use cp_convert instead of
8591 convert so that we don't get static casts.
8592
8593Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
8594
8595 * cvt.c (cp_convert): Don't complain about int->enum conversion if
8596 we are doing static casts.
8597
8598Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
8599
8600 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
8601 when dumping expressions in error messages.
8602
8603Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
8604
8605 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
f30432d7 8606 the return type is the right type, and make references work.
6060a796
MS
8607
8608Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8609
8610 * decl.c (poplevel): Don't be confused by function-scope
8611 declarations of non-nested functions.
8612 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
8613 (pushdecl): Use duplicate_decls to copy info from old decl into new
8614 function-scope one rather than doing it here.
8615
8616 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
8617 of this decl, in case this is a function-scope declaration.
8618
8619 * decl.c (finish_enum): Make sure that the type has the right
8620 precision when we call fixup_*_type.
8621
8622Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8623
8624 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
8625 want to build up references to rvalues if possible.
8626 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
8627
8628Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
8629
8630 * parse.y (maybe_raises): Handle throw ().
8631 * parse.y (ansi_raise_identifier): grok type-ids in exception
8632 specifications.
8633 * tree.c (build_exception_variant): Use list compare to check if
8634 two exception specifications match.
8635 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
8636 messages.
8637 * call.c (build_method_call): Remove TREE_RAISES.
d11ad92e
MS
8638 * cvt.c (convert_to_aggr): Likewise.
8639 * typeck.c (build_function_call_real, convert_arguments): Likewise.
8640 * init.c (expand_aggr_init_1): Likewise.
6060a796
MS
8641
8642Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
8643
8644 * except.c: Add support for m68k and mips exception handling
8645 support.
8646
8647Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
8648
8649 * except.c (expand_end_all_catch): Throw into outer context, if we
8650 fall off end of catch handlers.
8651
db5ae43f
MS
8652Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
8653
8654 * Makefile.in: Make is easier to decide where parse.[ch] will be
8655 built.
8656
af824546
DE
8657Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
8658
8659 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
8660 (GXX_INSTALL_NAME) Likewise.
8661 (CXX_CROSS_NAME) Use program_transform_cross_name.
8662 (GXX_CROSS_NAME) Likewise.
8663 (c++.install-man): Use program_transform_name on g++.1.
8664 (c++.uninstall): Likewise.
8665
db5ae43f
MS
8666Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
8667
8668 * parse.y (THROW): Fix precedence of throw expressions.
8669
8670Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
8671
8672 * typeck.c (build_unary_op): Allow promotions from bool to int on
8673 unary ~.
8674
8675Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8676
8677 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
8678 classes when appropriate.
8679 (build_overload_nested_name): When dealing with a function context,
8680 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
8681 avoid conflicts between local classes of the same name.
8682
8683Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
8684
8685 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
8686 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
8687 `explicit'.
8688 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
8689 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
8690 build_method_calls so that non-converting constructors are not used.
8691 * call.c (build_method_call): If we shouldn't use a non-converting
8692 constructor, then don't.
8693
8694Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8695
8696 * call.c (build_method_call): Don't try to synthesize methods yet.
8697
8698Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 8699
db5ae43f
MS
8700 * pt.c (push_template_decls): Create CONST_DECLs for template
8701 constant parameters, not VAR_DECLs.
8702
d11ad92e 8703Sat Nov 19 15:28:31 1994 Jim Wilson <wilson@chestnut.cygnus.com>
db5ae43f
MS
8704
8705 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
8706 shift count is less than size in bits of arg0.
8707
8708Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
8709
8710 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
8711 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
8712 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
8713 to add support for explicit, namespace, typename, and using, support
8714 for the rest is already in.
8715
db5ae43f
MS
8716Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
8717
8718 * gc.c (get_bad_cast_node): New routine to support compile time
8719 throws of bad_cast.
8720 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
8721 time.
8722
8723Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
8724
8725 * except.c: Add hppa support.
8726
8727Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
8728
8729 * except.c: Add rs6000 support.
8730
8731Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
8732
8733 * except.c (do_unwind): Add i[34]86 support.
8734
d11ad92e 8735Thu Nov 3 00:10:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8736
8737 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
8738 instantiations.
8739
d11ad92e 8740Wed Nov 2 15:08:24 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f 8741
14548a19 8742 * decl.c (finish_function): Emit types used in method parameters
db5ae43f
MS
8743 into symbol table.
8744
d11ad92e 8745Wed Nov 2 15:05:47 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8746
8747 * pt.c (process_template_parm): Allow pointer to member function
8748 template parameter types.
8749 (uses_template_parms): Handle pointer to member function
8750 CONSTRUCTORs.
8751
8752 * g++.c (main): Cast first argument of bzero to (char *).
8753 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
8754
d11ad92e 8755Mon Oct 31 14:50:48 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8756
8757 * gc.c (build_dynamic_cast): rewrite to make it work.
8758 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
8759 * class.c (modify_all_direct_vtables): ditto.
8760 * init.c (expand_direct_vtbls_init): expand more vtables if
8761 flag_rtti is on.
8762 * decl.c (init_type_desc): add default return.
8763
d11ad92e 8764Tue Oct 25 17:13:09 1994 Kung Hsu <kung@mexican.cygnus.com>
db5ae43f
MS
8765
8766 * tree.c (debug_binfo): get rid of the initial size entry of
8767 vtable.
8768 * cp-tree.h: change flag_dossier to flag rtti, define type
8769 descriptor type nodes.
8770 * decl.c (init_type_desc): new function to initialize type
8771 descriptor type nodes.
8772 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
8773 * lex.c (init_lex): ditto.
8774 * decl.c : change variable flag_dossier to flag_rtti.
8775 * decl.c (duplicate_decls): get rid initial size entry of vtable.
8776 * decl.c (hack_incomplete_structures): take out assert 164.
8777 * search.c (get_abstract_virtuals_1): ditto.
8778 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
8779 CLASSTYPE_RTTI.
8780 * parse.y: ditto.
8781 * class.c (prepare_fresh_vtable): for virtual bases, get right
8782 offset.
8783 * class.c (add_virtual_function): change flag_dossier to
8784 flag_rtti.
8785 * class.c (modify_one_vtable): modify the right rtti entry.
8786 * class.c (override_one_vtable): get rid of size entry.
8787 * class.c (finish_struct): change flag_dossier to flag_rtti, and
8788 build extra vtables, build type descriptors for polymorphic
8789 classes.
8790 * gc.c (build_headof): make headof() works correctly with new
8791 rtti.
8792 * gc.c (build_typeid): make this function work with new rtti.
8793 * gc.c (get_typeid): make this function work with new rtti.
8794 * gc.c (build_bltn_desc): new function for new rtti.
8795 * gc.c (build_user_desc): ditto.
8796 * gc.c (build_class_desc): ditto.
8797 * gc.c (build_ptr_desc): ditto.
8798 * gc.c (build_attr_desc): ditto.
8799 * gc.c (build_func_desc): ditto.
8800 * gc.c (build_ptmf_desc): ditto.
8801 * gc.c (build_ptmd_desc): ditto.
8802 * gc.c (build_t_desc): ditto.
8803 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
8804
d11ad92e 8805Tue Oct 25 13:37:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8806
8807 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
8808 after checking for integral conversions.
ea943e1d 8809
72b7eeff
MS
8810Wed Nov 30 19:13:50 1994 Mike Stump <mrs@cygnus.com>
8811
8812 * Version 2.6.3 released.
8813
8814Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8815
8816 * typeck2.c (build_m_component_ref): Check the basetype of the
8817 member pointer against the main variant of the object type.
8818
8819Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8820
8821 * cvt.c (convert_to_reference): Make sure that the original expr
8822 gets its type back when converting a reference.
8823
8824 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
8825 (build_decl_overload): Instead of here.
8826
8827Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
8828
8829 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
8830 function.
8831
8832 * typeck.c (convert_for_initialization): Handle initialization from
8833 a TARGET_EXPR.
8834
d11ad92e 8835Sun Nov 6 01:34:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
72b7eeff
MS
8836
8837 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
8838 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
8839 TYPE_READONLY and TYPE_VOLATILE from the argument.
8840 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
8841 present in parm from arg.
8842 (type_unification): Strip REFERENCE_TYPE from the argument type.
8843 (unify): Don't strip REFERENCE_TYPE from the argument type.
8844
d11ad92e 8845Sat Nov 5 22:42:15 1994 Greg McGary <gkm@magilla.cichlid.com>
72b7eeff
MS
8846
8847 * pt.c (do_type_instantiation): Check to see if there's a
8848 IDENTIFIER_TEMPLATE on a class before calling
8849 instantiate_member_templates().
8850
8851Sat Nov 12 06:35:42 1994 Mike Stump <mrs@cygnus.com>
8852
8853 * Version 2.6.2 released.
8854
8855Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
8856
8857 * Makefile.in (spew.o, lex.o, pt.o):
8858 Depend on $(srcdir)/parse.h, not parse.h.
8859
8860Tue Nov 1 19:19:41 1994 Mike Stump <mrs@cygnus.com>
8861
8862 * Version 2.6.1 released.
8863
d11ad92e 8864Sun Oct 23 13:19:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8865
db5ae43f
MS
8866 * decl2.c: Declare flag_access_control.
8867 (struct lang_f_options): Add access-control.
8868 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
8869 for the call to expand_aggr_init to copy the object out of the
8870 pcc_struct_return slot.
8871 * search.c (compute_access): if (!flag_access_control) return
8872 access_public.
eae89e04 8873
d11ad92e 8874Fri Oct 21 00:32:54 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8875
db5ae43f
MS
8876 * lex.c (cons_up_default_function): Don't try to defer method
8877 synthesis now.
8878
8879 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
8880 instead of abort, since the OSF/1 dynamic linker doesn't like to see
8881 relocation entries for abort.
eae89e04 8882
db5ae43f
MS
8883 * tree.c (array_type_nelts_total): Use sizetype, not
8884 integer_type_node.
d11ad92e 8885 (array_type_nelts_top): Likewise.
db5ae43f
MS
8886
8887Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
8888
8889 * decl.c (grokdeclarator): Added handling for catch parameters
8890 (CATCHPARM).
8891 * except.c (expand_start_catch_block): Use the new CATCHPARM context
8892 instead of NORMAL.
8893 * except.c (expand_throw): Don't let convert_to_reference complain
8894 about what we are doing.
8895
d11ad92e 8896Thu Oct 20 12:55:24 1994 Jim Wilson <wilson@cygnus.com>
db5ae43f
MS
8897
8898 * method.c (emit_thunk): Call instantiate_virtual_regs.
8899
8900Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
8901
8902 * except.c (expand_exception_blocks): Make sure throw code doesn't
8903 get put in function that won't be output.
eae89e04 8904
d11ad92e 8905Mon Oct 17 18:03:15 1994 Jason Merrill <jason@phydeaux.cygnus.com>
eae89e04 8906
db5ae43f
MS
8907 * decl.c (init_decl_processing): Make alloca a builtin.
8908
d11ad92e 8909Thu Oct 27 21:10:25 1994 Craig Burley <craig@burley>
db5ae43f
MS
8910
8911 * g++.c (main): Only decrement "added" and set "library" to
8912 NULL when "library" != NULL (just like 940829 fix).
eae89e04 8913
c199879d
MS
8914Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
8915
8916 * except.c (expand_start_catch_block): Make sure the false label
8917 gets onto the permanent obstack, as it is used for the exception
8918 table.
8919
13306d4f
MS
8920Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
8921
8922 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
8923 be set just below, use current_fndecl instead.
8924
d11ad92e 8925Fri Oct 14 15:12:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8926
8927 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
8928 with LOOKUP_SPECULATIVELY.
8929 (expand_default_init): Abort if build_method_call returns NULL_TREE.
8930
8931 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
8932 the rhs is a TARGET_EXPR.
8933
8934 * parse.y (left_curly): Anonymous types are not affected by #pragma
8935 interface/implementation.
8936
8937 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
8938 default constructor if it isn't needed.
8939
8940 * lex.c (cons_up_default_function): Do synthesize methods for
8941 anonymous types if necessary.
8942
d11ad92e 8943Thu Oct 13 17:44:55 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8944
db5ae43f 8945 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d 8946
d11ad92e 8947Wed Oct 12 13:27:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8948
db5ae43f
MS
8949 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
8950
d11ad92e 8951 * init.c (expand_default_init): Likewise. Also remove some of the
db5ae43f
MS
8952 crufty code that assumes methods will not be synthesized properly.
8953
8954 * lex.c (cons_up_default_function): If the containing type has no
8955 name, these functions should never need to be called, so just
8956 declare them.
2f4f907d 8957
db5ae43f
MS
8958 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
8959 bitmask for lexing character constants.
8960
8961 * call.c (build_method_call): Disable code that tries to do tricky
8962 stuff with a default parameter that is a constructor call, but
8963 actually does other tricky stuff that breaks things.
2f4f907d
JM
8964
8965Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
8966
db5ae43f
MS
8967 * decl.c (finish_enum): Disable code which forces enums to be signed,
8968 since this conflicts with their use as bitfields. type_promotes_to
8969 handles promotion of enums of underlying unsigned types to signed
8970 integer types.
2f4f907d 8971
d11ad92e 8972Wed Oct 12 13:24:03 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8973
db5ae43f
MS
8974 * cvt.c (type_promotes_to): Also promote enums to long if
8975 appropriate.
2f4f907d 8976
db5ae43f
MS
8977 * typeck.c (default_conversion): Don't expect type_promotes_to to
8978 return a main variant.
2f4f907d 8979
d11ad92e 8980Wed Oct 12 12:19:45 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2f4f907d 8981
db5ae43f
MS
8982 * call.c (build_scoped_method_call): Don't lose side effects in the
8983 object expression when calling a non-existent destructor.
2f4f907d 8984
d11ad92e 8985Fri Sep 2 19:05:21 1994 Rohan Lenard <rjl@iassf.easams.com.au>
2f4f907d 8986
db5ae43f
MS
8987 * call.c (build_scoped_method_call): Remove erroneous error message
8988 when destructor call is written as a scoped call.
2f4f907d 8989
d11ad92e 8990Tue Oct 11 23:48:31 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
8991
8992 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 8993
13306d4f
MS
8994Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
8995
8996 * class.c (get_derived_offset): Added a type parameter to limit how
8997 far up the CLASSTYPE_VFIELD_PARENT chain we search.
8998 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
8999 offset to put into the vtable for the this parameter, make sure we
9000 don't offset from a parent of the DECL_CONTEXT of the function.
9001
d11ad92e 9002Tue Oct 11 16:10:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9003
9004 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
9005 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
d11ad92e 9006 (do_type_instantiation): Likewise.
db5ae43f
MS
9007
9008 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
9009 DECL_EXTERNAL and TREE_STATIC as appropriate.
9010
9011 * decl2.c (finish_file): Also synthesize methods that don't have
9012 DECL_EXTERNAL set. Set interface_unknown before doing so.
9013
9014 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
9015 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
9016
d11ad92e 9017Mon Oct 10 00:56:53 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9018
db5ae43f
MS
9019 * lex.c (cons_up_default_function): Mark methods in a template class
9020 as template instances. Store the values of interface_unknown and
9021 interface_only for do_pending_inlines.
9022 (do_pending_inlines): Use them.
9023
9024 * decl2.c (finish_file): If we haven't seen a definition of a
9025 function declared static, make the decl non-PUBLIC so compile_file
9026 can give an error.
cba8ba35 9027
d11ad92e 9028Sun Oct 9 02:42:29 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9029
db5ae43f 9030 * method.c (do_build_copy_constructor): Handle anonymous unions.
d11ad92e 9031 (do_build_assign_ref): Likewise.
db5ae43f
MS
9032 (largest_union_member): Move from lex.c.
9033
d11ad92e 9034Sat Oct 8 14:59:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9035
9036 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
9037 * pt.c (instantiate_member_templates): Lose redundant
9038 -fexternal-templates handling.
9039 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
9040 TREE_STATIC or DECL_INTERFACE_KNOWN.
9041 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
9042 of DECL_EXTERNAL for explicit instantiations.
9043 (do_function_instantiation): Do the new thing.
d11ad92e 9044 (do_type_instantiation): Likewise.
db5ae43f
MS
9045 (instantiate_template): Deal with member templates defined in a .cc
9046 file with -fexternal-templates.
9047 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
9048 decide whether to stick builtin_throw here.
9049 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
9050 rather than TREE_PUBLIC. Generally fix rules.
9051 (finish_file): Use DECL_INITIAL to determine whether or not a method
9052 has been synthesized, rather than TREE_ASM_WRITTEN.
9053 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
9054 TREE_PUBLIC.
d11ad92e
MS
9055 (pushdecl): Likewise.
9056 (duplicate_decls): Likewise. Deal with DECL_DECLARED_STATIC and
db5ae43f
MS
9057 DECL_INTERFACE_KNOWN.
9058 (redeclaration_error_message): Fix checking for conflicting linkage.
9059 (define_function): Set DECL_INTERFACE_KNOWN.
9060 (grokfndecl): Function decls are PUBLIC until we are sure about
9061 their linkage. Set DECL_DECLARED_STATIC as needed.
9062 (start_function): Deal with linkage. Move pushdecl after linkage
9063 magic.
9064 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
9065 * cp-tree.h (lang_decl_flags): Add interface_known and
9066 declared_static.
9067 (DECL_INTERFACE_KNOWN): New macro.
9068 (DECL_DECLARED_STATIC): New macro.
9069 (DECL_PUBLIC): New macro.
9070
9071 Clean up bogus use of TREE_PUBLIC.
9072 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
9073 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
9074 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35 9075
d11ad92e 9076Wed Oct 5 13:44:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9077
db5ae43f
MS
9078 * call.c (build_overload_call_real): Don't immediately do
9079 array->pointer conversion.
cba8ba35 9080
db5ae43f
MS
9081 * pt.c (type_unification): If not passing to a reference, strip
9082 cv-quals. Also handle array->pointer conversion.
cba8ba35 9083
d11ad92e 9084Tue Oct 4 17:45:37 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9085
db5ae43f
MS
9086 * decl.c (grokdeclarator): Don't warn about applying const to a
9087 const typedef or template type parameter.
9088
9089 * decl2.c (finish_file): Also synthesize methods after walking the
9090 vtables. Ugly ugly ugly.
cba8ba35 9091
d11ad92e 9092Mon Oct 3 15:02:41 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9093
db5ae43f
MS
9094 * various: Remove lingering remnants of old exception handling code.
9095
9096 * decl2.c (finish_file): Synthesize methods before walking the
9097 vtables, so that the vtables get emitted as needed.
9098
9099 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
9100 dealing with exceptions.
9101
9102Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
9103
9104 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
9105
d11ad92e 9106Mon Oct 3 02:59:28 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9107
9108 * decl2.c (finish_file): Fix inline handling.
cba8ba35 9109
d11ad92e 9110Sun Oct 2 00:21:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
cba8ba35 9111
db5ae43f
MS
9112 * decl.c (grokdeclarator): Handle redundant scope even better.
9113 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 9114
db5ae43f
MS
9115 * method.c (synthesize_method): Pass toplev parameter to
9116 {push,pop}_cp_function_context depending on decl_function_context
9117 (fndecl).
cba8ba35 9118
db5ae43f
MS
9119 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
9120 built-in version.
cba8ba35 9121
db5ae43f
MS
9122 * method.c (synthesize_method): Don't be confused by __in_chrg
9123 parameter.
b3738072 9124
db5ae43f 9125 * class.c (popclass): Set C_C_D like start_function does.
b3738072 9126
db5ae43f 9127 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 9128
db5ae43f 9129 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
d11ad92e 9130 (direct_notype_declarator): Likewise.
db5ae43f 9131 (complex_direct_notype_declarator): Remove it here.
81613e43 9132
d11ad92e 9133Sat Oct 1 21:42:18 1994 Jason Merrill <jason@deneb.cygnus.com>
44c5421f 9134
db5ae43f
MS
9135 * init.c (resolve_offset_ref): Fix types used in resolving .*
9136 expressions.
9137
d11ad92e 9138Sat Oct 1 15:18:49 1994 Jason Merrill <jason@phydeaux.cygnus.com>
db5ae43f
MS
9139
9140 Beginnings of work to synthesize methods only when needed.
9141 * call.c (build_method_call): Synthesize methods as necessary
9142 (currently never necessary).
9143 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
9144 on the wrong obstack.
9145 * decl.c (push_cp_function_context): Mostly copied from
9146 push_c_function_context.
9147 (pop_cp_function_context): Similarly.
9148 (finish_function): Reverse order of poplevel and pop_nested_class so
9149 that current_class_decl is restored properly.
d11ad92e 9150 (start_function): Likewise.
db5ae43f
MS
9151 (finish_function): Add parameter 'nested'. Don't call
9152 permanent_allocation if (nested).
9153 * various: Pass extra parameter to finish_function.
9154 * decl2.c (finish_file): Reorganize end-of-file inline handling,
9155 synthesizing methods as necessary.
9156 * lex.c (cons_up_default_function): Call mark_inline_for_output.
9157 Only synthesize methods immediately if #pragma implementation
9158 (currently disabled).
9159 (do_pending_inlines): Call synthesize_method.
9160 * method.c (synthesize_method): New function; all method synthesis
9161 goes through here. Calls do_build_assign_ref and
9162 do_build_copy_constructor.
9163 (build_default_constructor): Remove.
d11ad92e 9164 (build_dtor): Likewise.
db5ae43f
MS
9165 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
9166 done by synthesize_method.
9167 (build_copy_constructor): Similarly.
44c5421f 9168
eac293a1
MS
9169Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
9170
9171 * typeck.c (c_expand_return): Use magic so the backend can fixup the
9172 assignment into the return register, so cleanups won't clobber it.
9173
d11ad92e 9174Thu Sep 29 13:08:50 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9175
9176 * method.c (hack_identifier): Don't call assemble_external for
9177 template decls.
9178
9179 * decl.c (finish_decl): Also end temporary allocation if the decl in
9180 question has a type of error_mark_node.
9181
6060a796 9182Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
9183
9184 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
9185 that if the ?: was a reference type, that the subparts will be also.
9186
d11ad92e 9187Wed Sep 28 16:14:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
eac293a1
MS
9188
9189 * except.c (register_exception_table): Use Pmode, not PTRmode.
9190
d11ad92e 9191Fri Sep 23 13:54:27 1994 Jason Merrill <jason@deneb.cygnus.com>
eac293a1
MS
9192
9193 * lex.c (do_pending_inlines): Do method synthesis after the
9194 pending_inlines have been reversed.
9195
d11ad92e 9196Thu Sep 22 12:53:03 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9197
9198 * decl2.c (finish_file): Fix Brendan's fix: Only call
9199 register_exception_table if there is a non-empty exception table.
9200
d11ad92e 9201Thu Sep 22 12:03:46 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9202
9203 * decl2.c (finish_file): Only do register_exception_table if
9204 -fhandle-exceptions is being used.
9205
d11ad92e 9206Wed Sep 21 19:01:51 1994 Per Bothner <bothner@kalessin.cygnus.com>
f376e137
MS
9207
9208 * except.c (output_exception_table_entry): Simplify
9209 by using assemble_integer.
9210 (build_exception_table): Change to return a count.
9211 Cleanup to use standard macros, instead of hard-wired
9212 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
9213 (register_exception_table): New function. Generate call to builtin.
9214 * decl2.c (finish_file): Call register_exception_table.
9215 * cp-tree.h (build_exception_table): Fix prototype.
9216
d11ad92e 9217Wed Sep 21 13:20:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9218
9219 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
9220
9221 * decl2.c (delete_sanity): Give an error at trying to delete a
9222 function.
9223
d11ad92e 9224Wed Sep 21 11:47:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9225
9226 * lex.c (cons_up_default_function): Mark synthesized destructors
9227 inline.
9228
9229 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
9230 something other than __wchar_t, complaining if -pedantic and not in
9231 a system header.
9232
d11ad92e 9233Tue Sep 20 09:43:28 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9234
9235 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
9236 here.
9237
9238 * typeck.c (build_modify_expr): Require complete type after checking
9239 for error_mark_node.
9240
9241 * call.c (build_method_call): Print parmtypes when complaining of
9242 ambiguous call.
9243
9244 * typeck.c (build_modify_expr): Handle assignment to array from
9245 non-array.
9246
9247 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
9248
9249 * call.c (build_method_call): Don't bother with the exact match.
9250
d11ad92e 9251Mon Sep 19 00:51:39 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9252
9253 * init.c (expand_aggr_init): If we munge the type of the variable,
9254 also munge the type of the initializer.
9255
9256 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
9257 (init_decl_processing): Push artificial declaration of wchar_t so
9258 people don't have to declare it before they can use it.
9259
9260 * error.c (cp_line_of): return lineno in lieu of 0.
9261
9262 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
9263 int and bool.
9264 (build_component_ref): Fold the COMPONENT_REF in case it can be
9265 reduced.
9266
9267 * typeck2.c (store_init_value): Don't pedwarn about non-constant
9268 bracketed initializers for automatic variables.
9269
d11ad92e 9270Sun Sep 18 10:12:12 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9271
9272 * error.c (dump_decl): Don't say `typedef enum foo foo'.
9273
9274 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
9275 because they're affected by #pragma i/i. We'll deal with that when
9276 they get instantiated.
9277
9278 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
9279
9280 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
9281 ADDR_EXPRs if appropriate.
9282
9283 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
9284
9285 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
9286 initializer properly.
d11ad92e 9287 * typeck2.c (digest_init): Likewise.
f376e137
MS
9288
9289 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
9290 it uses build_cplus_array_type.
9291 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
9292
9293 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 9294 enums.
f376e137 9295
d11ad92e 9296Tue Sep 13 10:56:58 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9297
9298 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 9299 properly.
f376e137 9300
d11ad92e 9301Tue Sep 13 09:51:59 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9302
9303 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
9304 fact, static.
9305
d11ad92e 9306Mon Sep 12 14:40:30 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9307
9308 * decl.c (finish_decl): Lay out the rtl for DECL before doing
9309 grok_reference_init, in case it's static.
9310
d11ad92e 9311Mon Sep 12 12:45:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9312
9313 * class.c (finish_struct): Don't synthesize constructors if the
9314 class has a field with the same name as the class. Don't die on
9315 classes with no constructors or destructors. Don't die if the head
9316 and tail of the class are in different files.
9317
9318 * decl.c (grokdeclarator): Don't treat a function pointer field
9319 with the same name as the class as a constructor.
9320
d11ad92e 9321Fri Sep 9 13:17:00 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9322
9323 * typeck.c (build_c_cast): Pull constant values out of their
9324 variables here.
9325
9326 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
9327 FUNCTION_DECLs and TEMPLATE_DECLs.
9328
d11ad92e 9329Thu Sep 8 10:07:48 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9330
9331 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
9332 have it.
9333
9334 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
9335 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
9336 TREE_PUBLIC unless -fexternal-templates.
9337
d11ad92e 9338Wed Sep 7 13:17:10 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9339
9340 * pt.c (do_type_instantiation): Call instantiate_member_templates.
9341 Deal with specializations.
9342 (tsubst): Don't stick the mangled name in DECL_NAME for function
9343 instantiations. Don't push them, either.
9344
9345 * decl2.c (grokfield): Move code for generating the
9346 DECL_ASSEMBLER_NAME for static members from here.
9347 * method.c (build_static_name): To here.
9348 * decl.c (grokvardecl): Call build_static_name.
9349 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
9350
d11ad92e 9351Mon Sep 5 12:49:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9352
9353 * call.c (build_method_call): if -Wsynth, warn when selecting
9354 synthesized op= over user-supplied one cfront would select.
9355 * decl2.c (lang_decode_option): Handle -Wsynth.
9356
d11ad92e 9357Fri Sep 2 15:11:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9358
9359 * decl.c (finish_enum): Overhaul to fix several bugs.
9360 (start_enum): Disable useless code.
9361
d11ad92e 9362Thu Sep 1 16:04:54 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9363
9364 * typeck.c (c_expand_return): Warn about returning a reference to a
9365 temporary.
9366 (convert_arguments): Increment argument counter when using default
9367 arguments, too.
9368
d11ad92e 9369Wed Aug 31 14:29:22 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9370
9371 * decl.c (finish_decl): If the type of decl is error_mark_node,
9372 don't bother trying to do anything.
9373
9374 * typeck.c (convert_for_initialization): If the rhs contains a
9375 constructor call, pretend the lhs type needs to be constructed.
9376
9377 * init.c (expand_default_init): If we stick the object inside the
9378 initializer, mark the initializer used.
9379
d11ad92e 9380Tue Aug 30 13:50:18 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9381
9382 * method.c (build_assign_ref): return *this;
9383 (build_assign_ref): Fix base assignment order.
9384 (build_copy_constructor): Fix member init order.
9385
d11ad92e 9386Mon Aug 29 13:54:39 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9387
9388 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
9389 its argument.
9390
d11ad92e 9391Sat Aug 27 09:36:03 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9392
9393 * method.c (build_copy_constructor): Also copy virtual bases.
9394
d11ad92e 9395Fri Aug 26 17:05:15 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9396
9397 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
9398 any synthesis. Also first set deja_vu on all pending_inlines.
9399
9400 * method.c (build_assign_ref): Use build_member_call to invoke base
9401 operator=, rather than build_modify_expr. And use
9402 build_reference_type instead of TYPE_REFERENCE_TO.
9403 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
9404 basetype.
9405
9406 * decl2.c (grokfield): Don't complain about undefined local class
9407 methods.
9408
9409 * class.c (finish_struct): Don't try to synthesize methods here.
9410 * lex.c (do_pending_inlines): Instead, synthesize them here.
9411 (init_lex): Initialize synth_obstack.
9412 (cons_up_default_function): Stick synthesis request on
9413 pending_inlines.
9414
d11ad92e 9415Fri Aug 26 12:24:14 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9416
9417 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
9418 accept an RTL_EXPR in what we're about to use for the instance,
9419 since anything which would end up with pcc_struct_return set
9420 inside cplus_expand_expr.
9421
9422 * cp-tree.h (cons_up_default_function): Note change of prototype.
9423
d11ad92e 9424Thu Aug 25 23:05:30 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
9425
9426 * class.c (finish_struct): Undid change from Aug 21 testing
9427 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
d11ad92e 9428 * parse.y (left_curly): Likewise, undid change from Aug 21.
f376e137
MS
9429 * decl.c (xref_tag): Undid change from Aug 21, set
9430 CLASSTYPE_INTERFACE correctly, and added comments.
9431
d11ad92e 9432Thu Aug 25 00:36:31 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9433
9434 Rework approach to synthesized methods; don't go through the parser
9435 anymore.
9436 * class.c (finish_struct): Use new synthesis approach.
9437 * lex.c (cons_up_default_function): Now just creates declaration,
9438 not code.
9439 (largest_union_member): #if 0 out.
d11ad92e
MS
9440 (default_assign_ref_body): Likewise.
9441 (default_copy_constructor_body): Likewise.
f376e137
MS
9442 * method.c (build_default_constructor): New function to synthesize X().
9443 (build_copy_constructor): Synthesize X(X&).
9444 (build_assign_ref): Synthesize X::operator=(X&).
9445 (build_dtor): Synthesize ~X().
9446
9447 * error.c (cp_line_of): If we're dealing with an artificial
9448 TYPE_DECL, look at the type instead.
9449
d11ad92e 9450Wed Aug 24 11:11:50 1994 Jason Merrill <jason@deneb.cygnus.com>
f376e137
MS
9451
9452 * init.c (sort_member_init): Check warn_reorder.
9453 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
9454
9455 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
9456 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
9457 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
9458
6060a796 9459Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
9460
9461 * error.c (dump_decl): Improve wording, so that error messages
9462 dont't read template<, class foo>...
9463
d11ad92e 9464Mon Aug 22 15:30:51 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
f376e137
MS
9465
9466 * parse.y (label_colon): Also match a TYPENAME as a label name,
9467 since they may have declared a class by that name but have also
9468 tried to have a local label under the same name.
9469
9470 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
9471 for the message so they know at what point it was instantiated.
9472
d11ad92e 9473Sun Aug 21 23:07:35 1994 Gerald Baumgartner <gb@cs.purdue.edu>
f376e137
MS
9474
9475 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
9476 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
9477 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 9478 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
9479 * parse.y (left_curly): New final resting place for setting
9480 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
9481
9482 * class.c (finish_struct): Don't test for function/field name
9483 conflicts in signatures, since all the fields are compiler-constructed.
9484
d11ad92e 9485Fri Aug 19 14:04:47 1994 Kung Hsu <kung@mexican.cygnus.com>
f376e137
MS
9486
9487 * method.c (build_overload_nested_name): in qualified name
9488 mangling, the template with value instantiation will have numeric
9489 at end and may mixed with the name length of next nested level.
9490 Add a '_' in between.
9491 * method.c (build_overload_name): ditto.
9492 * method.c (build_overload_identifier): ditto.
9493
6060a796 9494Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
9495
9496 * error.c (dump_decl): Handle NULL args.
9497
db5ae43f
MS
9498Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
9499
9500 * g++.c: Rework last change so it's done like collect.c (and
9501 gcc.c).
9502
9503Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
9504
9505 * g++.c: Include <sys/errno.h> in case `errno' is a macro
9506 as permitted by ANSI C.
9507
6060a796 9508Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
9509
9510 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
9511 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
9512 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 9513 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
9514 * parse.y (left_curly): New final resting place for setting
9515 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
9516
d11ad92e 9517Thu Aug 11 11:32:42 1994 H.J. Lu <hjl@nynexst.com>
00595019
MS
9518
9519 * g++.c (main): Only decrement "added" and set "library" to
9520 NULL when "library" != NULL.
9521
d11ad92e 9522Sat Aug 13 00:14:52 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9523
9524 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
9525 just because its class has a known interface.
9526 (decls_match): Deal with new format of template parms.
9527
9528 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
9529 DECL_EXTERNAL here.
9530
d11ad92e 9531Fri Aug 12 01:55:15 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9532
9533 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
d11ad92e 9534 (xref_defn_tag): Likewise.
00595019
MS
9535 (pushdecl): Only allow artificial typedefs to be shadowed.
9536
9537 * init.c (emit_base_init): Pass the right binfos to
9538 expand_aggr_init_1.
9539
9540 * class.c (delete_duplicate_fields_1): Make it work right.
9541 (finish_struct): Catch function/field name conflict.
9542
9543 * decl2.c (check_classfn): Pass the function to cp_error, not just
9544 the name.
9545
9546 * init.c (sort_member_init): Warn when order of member initializers
9547 does not match order of member declarations.
9548 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
9549
9550 * error.c (dump_expr): Handle lists of functions.
9551
9552 * decl.c (start_function): #pragma interface only affects functions
9553 that would otherwise be static.
9554 (finish_decl): Don't warn about an unused variable if it has both
9555 constructor and destructor, since the 'resource allocation is
9556 initialization' idiom is relatively common.
9557
9558 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
d11ad92e 9559 (comp_target_parms): Likewise.
00595019
MS
9560 (compparms): Never consider default parms.
9561 (common_base_type): Don't choose a virtual baseclass if there is a
9562 more derived class in common.
9563 (build_conditional_expr): If pedantic, pedwarn about conversion to
9564 common base in conditional expr.
9565
9566 * class.c (instantiate_type): Handle template instantiation better.
9567
9568 * typeck.c (convert_arguments): Don't try to get tricky and convert
9569 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
9570 user-defined conversions.
9571
9572 * lex.c (check_for_missing_semicolon): Also give error at end of
9573 file.
9574
9575 * call.c (build_method_call): Don't promote arrays to pointers here.
9576
9577 * typeck.c (convert_arguments): Don't require the actual parameter
9578 to be of a complete type if the formal parameter is a reference.
9579
d11ad92e 9580Thu Aug 11 15:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9581
9582 * decl.c (grokdeclarator): Soften 'static' on member function error
9583 to pedwarn.
9584
9585 * init.c (build_new): Don't automatically save rval.
9586 (build_offset_ref): Do field lookup with proper basetype_path.
9587
d11ad92e 9588Thu Aug 11 12:46:54 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
00595019
MS
9589
9590 * errfn.c (cp_silent): Declare to mark when we should avoid
9591 emitting warnings and errors.
9592 (cp_error): Check it.
9593 (cp_warning): Likewise.
9594 (cp_pedwarn): Likewise.
9595 (cp_compiler_error): Likewise.
9596 (cp_error_at): Likewise.
9597 (cp_warning_at): Likewise.
9598 (cp_pedwarn_at): Likewise.
9599 * call.c (compute_conversion_costs): Set CP_SILENT when we start
9600 out, and make sure we turn it off before we leave.
9601
d11ad92e 9602Thu Aug 11 00:02:54 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9603
9604 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
9605 argument is obviously an array.
9606
d11ad92e 9607Wed Aug 10 15:32:04 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9608
9609 * typeck.c (c_expand_start_case): Do cleanups here.
9610
9611 * parse.y (xcond): Do bool conversion here, too.
9612 (simple_stmt, SWITCH case): Don't do cleanups here.
9613
9614 * decl.c (duplicate_decls): Don't treat builtins that have been
9615 explicitly declared specially.
9616
d11ad92e 9617Tue Aug 9 01:16:09 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9618
9619 * tree.c (make_deep_copy): Support copying pointer, reference,
9620 function, array, offset and method types.
9621
9622 * decl.c (init_decl_processing): Mark exit and abort as
9623 BUILT_IN_NONANSI so that duplicate_decls is kinder about
9624 redeclaration.
9625 (duplicate_decls): Don't give two errors for redeclaring a C
9626 function with the same parms but a different return type.
9627
9628 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
9629 (condition): Instead of here.
9630 (simple_stmt, SWITCH case): Also do cleanup here.
9631
9632 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
9633
9634 * call.c (build_method_call): Don't throw away the side effects of
9635 the object in a call to a non-existent constructor.
d11ad92e 9636 * parse.y (primary): Likewise.
00595019
MS
9637
9638 * method.c (build_decl_overload): Oop.
9639
9640 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
9641 warn about uselessness of specifying -fansi-overloading.
9642
9643 * method.c (build_decl_overload): Treat any non-member new with one
9644 parameter as __builtin_new.
9645
9646 * decl.c (init_decl_processing): Setup built-in meanings of exit,
9647 _exit and abort.
9648
d11ad92e 9649Mon Aug 8 15:03:30 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9650
9651 * error.c (dump_readonly_or_volatile): Put a space between const and
9652 volatile if both apply.
9653
9654 * init.c (perform_member_init): Clean up after this initialization.
9655 (emit_base_init): Clean up after each base init, not after all have
9656 been done.
9657 (expand_aggr_vbase_init_1): Clean up after this init.
9658
d11ad92e 9659Sun Aug 7 14:55:05 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9660
9661 * call.c (build_method_call): Deal with destroying references.
9662
9663 * parse.y (condition): Do bool_truthvalue_conversion here.
9664 (paren_expr_or_null): And here.
9665 (simple_if): Not here.
9666 (simple_stmt): Or here.
9667
d11ad92e 9668Sat Aug 6 22:29:45 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9669
9670 * parse.y (paren_expr_or_null): Wrap the expression in a
9671 CLEANUP_POINT_EXPR.
d11ad92e 9672 (condition): Likewise.
00595019 9673
d11ad92e 9674Sat Aug 6 19:46:37 1994 Rohan Lenard <rjl@easams.com.au>
00595019
MS
9675
9676 * call.c (build_scoped_method_call): Fix error message when
9677 destructor call refers to a nonexistent type.
9678
d11ad92e 9679Sat Apr 16 22:43:30 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9680
9681 * lex.h (rid): Deleted RID_RAISES, it's never used.
9682 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
9683 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
9684 they don't need to be touched in `grokdeclarator.'
9685 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
9686
9687 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
9688 RID_MAX as loop limit for finding declaration specifiers.
9689
d11ad92e 9690Sat Apr 3 21:59:07 1993 Gerald Baumgartner <gb@cs.purdue.edu>
00595019
MS
9691
9692 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
9693 access `yytname,' which is static in parse.c.
9694
d11ad92e 9695Fri Apr 2 23:36:57 1993 Gerald Baumgarnter <gb@cs.purdue.edu>
00595019
MS
9696
9697 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
9698 was `GNU_xref_def' instead of `GNU_xref_ref.'
9699
d11ad92e 9700Fri Aug 5 14:20:16 1994 Jason Merrill <jason@deneb.cygnus.com>
00595019
MS
9701
9702 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
9703 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
d11ad92e 9704 (do_type_instantiation): Likewise.
00595019
MS
9705
9706 * decl2.c (import_export_inline): Decides at EOF what an inline's
9707 linkage should be.
9708 (finish_file): Call it.
9709
9710 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
9711 and DECL_EXTERNAL from do_*_instantiation. Only set
9712 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
9713 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
9714 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
9715
6060a796 9716Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
9717
9718 * class.c (get_class_offset_1, get_class_offset): New routine to
9719 find the offset of the class where a virtual function is defined,
9720 from the complete type.
9721 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
9722 get_class_offset instead of virtual_offset as get_class_offset will
9723 always provide the right answer.
9724 * tree.c (virtual_offset): Remove. It only ever worked some of the
9725 time.
9726
d11ad92e 9727Tue Aug 2 12:44:21 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9728
9729 * call.c (build_method_call): Put back unary_complex_lvalue call
9730 that I thought was redundant.
9731
9732 * typeck.c (c_expand_return): Fix a case I missed before.
9733
d11ad92e 9734Sun Jul 31 17:54:02 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9735
9736 * pt.c (unify): Strip cv-quals from template type arguments (when
9737 'const T*' is matched to 'const char*', that does not mean that T is
9738 'const char').
9739
d11ad92e 9740Fri Jul 29 01:03:06 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9741
9742 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
9743 typedefs. Third time's the charm?
9744
9745 * parse.y (template_parm): Support default template parms.
d11ad92e
MS
9746 * pt.c (process_template_parm): Likewise.
9747 (end_template_parm_list): Likewise.
9748 (coerce_template_parms): Likewise.
9749 (mangle_class_name_for_template): Likewise.
9750 (push_template_decls): Likewise.
9751 (unify): Likewise.
9752 * method.c (build_overload_identifier): Likewise.
9753 * error.c (dump_decl): Likewise.
a292b002 9754
d11ad92e 9755Wed Jul 27 17:47:00 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9756
9757 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
9758
d11ad92e 9759Tue Jul 26 13:22:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9760
9761 * search.c (note_debug_info_needed): Also emit debugging information
9762 for the types of fields.
9763
d11ad92e 9764Mon Jul 25 00:34:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9765
9766 * pt.c (lookup_template_class): Pass 'template' to
9767 coerce_template_parms instead of 'in_decl', since it's a more
9768 meaningful context.
9769
9770 * typeck.c (c_expand_return): Make sure any cleanups for the return
9771 expression get run.
9772 (build_c_cast): Use CONVERT_EXPR for conversion to void.
9773
9774 * pt.c (do_type_instantiation): Also instantiate nested types.
9775
9776 * typeck.c (convert_for_assignment): Don't die when comparing
9777 pointers with different levels of indirection.
9778
9779 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
9780 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
9781 out.
9782
9783 * decl2.c (finish_anon_union): Don't die if the union has no
9784 members.
9785
9786 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
9787 so that 'typedef int foo, bar;' will work.
9788
9789 * decl2.c (finish_file): Don't call expand_aggr_init for
9790 non-aggregates.
9791
d11ad92e 9792Mon Jul 25 00:03:10 1994 Teemu Torma <tot@trema.fi>
a292b002
MS
9793
9794 * decl.c (finish_function): We can't inline constructors and
9795 destructors under some conditions with -fpic, but don't unset
9796 DECL_INLINE.
9797
d11ad92e 9798Mon Jul 25 00:03:10 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9799
9800 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
9801
d11ad92e 9802Sun Jul 24 14:19:31 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9803
9804 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
9805 non-fields.
9806 (finish_struct_methods): Use copy_assignment_arg_p.
9807
9808 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
9809 of giving an error.
9810
9811 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
9812 don't know how to compare the operands.
9813
9814 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
9815 as a declarator-id in their program. Like the Linux headers do.
9816 Arrgh.
9817
9818 * tree.c (lvalue_p): Treat calls to functions returning objects by
9819 value as lvalues again.
9820
9821 * typeck.c (build_component_addr): Use convert_force to convert the
9822 pointer in case the component type is also a private base class.
9823
9824 * search.c (get_matching_virtual): Fix bogus warning of overloaded
9825 virtual.
9826
9827 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
9828 TYPE_DECL to fix bogus shadowing warnings.
9829
d11ad92e 9830Fri Jul 22 01:15:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9831
9832 * init.c (expand_aggr_init_1): const and volatile mismatches do not
9833 prevent a TARGET_EXPR from initializing an object directly.
9834
d11ad92e 9835Tue Jul 19 17:55:37 1994 Jason Merrill <jason@deneb.cygnus.com>
a292b002
MS
9836
9837 * cvt.c (build_up_reference): Allow building up references to
9838 `this', don't warn about making references to artificial variables
9839 (like `this').
9840
9841 * tree.c (lvalue_p): `this' is not an lvalue.
9842
9843 * call.c (build_method_call): Accept using a typedef name (or
9844 template type parameter) for explicit destructor calls.
9845
72b7eeff
MS
9846Thu Jul 14 09:42:23 1994 Mike Stump <mrs@cygnus.com>
9847
9848 * Version 2.6.0 released.
9849
d11ad92e 9850Wed Jul 13 03:57:54 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 9851
a292b002
MS
9852 * method.c (hack_identifier): Put back old code so lists of
9853 non-functions will be handled properly.
a5ef9010 9854
a292b002
MS
9855 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
9856 defined in the language-independent tree.h.
cf17cae3 9857
a292b002
MS
9858 * tree.c (count_functions): Avoid bogus warning when compiling this
9859 function.
cf17cae3 9860
d11ad92e 9861Mon Jul 11 18:37:20 1994 Jason Merrill <jason@deneb.cygnus.com>
cf17cae3 9862
a292b002
MS
9863 * decl.c (grok_reference_init): Always save the initializer of a
9864 reference.
cf17cae3 9865
6060a796 9866Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
9867
9868 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
9869 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 9870 (disabled for now)
5b605f68 9871
d11ad92e 9872Fri Jul 8 12:59:38 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9873
9874 * method.c (hack_identifier): Fix for new overloading.
9875
9876 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 9877 zero.
5b605f68 9878
d11ad92e 9879Fri Jul 8 13:20:28 1994 Gerald Baumgartner <gb@cs.purdue.edu>
5b605f68
MS
9880
9881 * decl2.c (finish_file): Only call walk_sigtables, if
9882 flag_handle_signatures is turned on, don't waste time otherwise.
9883
d11ad92e 9884Fri Jul 8 02:27:41 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9885
9886 * decl.c (push_overloaded_decl): Don't create overloads of one when
9887 shadowing a class type.
a292b002 9888 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
9889
9890 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
9891 (grokdeclarator): Fix setting of TREE_STATIC.
9892 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
9893
d11ad92e 9894Thu Jul 7 22:20:46 1994 Gerald Baumgartner <gb@andros.cygnus.com>
311862c8
GB
9895
9896 * cp-tree.h (walk_sigtables): Created extern declaration.
9897 * decl2.c (walk_sigtables): Created function, patterned after
9898 walk_vtables, even though we only need it to write out sigtables.
9899 (finish_sigtable_vardecl): Created function.
9900 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
9901 (finish_file): Call walk_sigtables.
9902
9903 * sig.c (build_signature_table_constructor): Mark class member
9904 function pointed to from signature table entry as addressable.
9905
d11ad92e 9906Thu Jul 7 13:39:37 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9907
9908 * decl.c (start_decl): Check new decl of static member variable
9909 against the declaration in the class here.
9910 (grokvardecl): Instead of here.
9911
9912 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
9913 -fvtable-thunks.
d11ad92e 9914 (build_vtable): Likewise.
5b605f68
MS
9915
9916 * decl2.c (import_export_vtable): Move logic for deciding the
9917 interface of a template class from here.
9918 (import_export_template): To here.
9919 (finish_vtable_vardecl): Call import_export_template before
9920 import_export_vtable.
9921
6060a796 9922Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
9923
9924 * except.c (init_exception_processing): Setup interim_eh_hook to
9925 call lang_interim_eh.
9926 * except.c (do_unwind): Propagate throw object value across
9927 stack unwinding.
9928 * except.c (saved_throw_value): Used to hold the value of the object
9929 being thrown. It is always a reference to the real value.
9930 * except.c (expand_start_catch_block): Add handling for the
9931 value of the exception object.
9932 * except.c (expand_start_catch_block): Add handler for the handler,
9933 so that throws inside the handler go to the outer block.
d11ad92e 9934 * except.c (expand_end_catch_block): Likewise.
a3b49ccd
MS
9935 * parse.y (handler_args): Use parm instead, as the other doesn't yet
9936 handle references correctly.
9937
d11ad92e 9938Wed Jul 6 17:55:32 1994 Per Bothner <bothner@kalessin.cygnus.com>
a3b49ccd
MS
9939
9940 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
9941 vtable entry properly to abort.
9942
d11ad92e 9943Tue Jul 5 14:07:54 1994 Jason Merrill <jason@deneb.cygnus.com>
5b605f68
MS
9944
9945 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
9946 errors to warnings.
9947
9948 * call.c (build_overload_call_real): Handle fnname being a list of
9949 functions.
9950 * typeck.c (build_x_function_call): Pass list of functions to
9951 build_overload_call, not just the name.
9952 * tree.c (count_functions): Complain when called for invalid
9953 argument.
9954
9955 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
9956 and DECL_EXTERNAL on static members and initialized const members.
9957 * decl2.c (grokfield): Reflect this change.
9958
d11ad92e 9959Fri Jul 1 09:35:51 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9960
9961 * parse.y (init): ANSI C++ does not forbid { }.
9962
d11ad92e 9963Thu Jun 30 00:35:22 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9964
9965 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
9966 warn_nonvdtor defaults to off.
9967
9968 * class.c (instantiate_type): Use comptypes rather than relying on
9969 types to satisfy ==.
9970
9971 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
9972 might be static.
9973
9974 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
9975
9976 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
9977
9978 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
9979 build_cplus_new.
9980
d11ad92e 9981Wed Jun 29 22:31:09 1994 Jason Merrill <jason@deneb.cygnus.com>
9a0e77ba
JM
9982
9983 * decl2.c (finish_file): Maybe consider static inlines multiple
9984 times, in case they reference each other.
9985
d11ad92e 9986Tue Jun 28 11:58:38 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
9987
9988 * class.c (finish_struct): Don't `cons_up_default_function's
9989 for signatures.
9990 (finish_struct): Handle an empty method_vec correctly.
9991
9992 * decl.c (grokdeclarator): Don't warn about a signature being
9993 empty in a signature pointer declaration if we only saw a
9994 forward declaration of the signature. Changed `warning's into
9995 `cp_warning's.
9996
9997 * sig.c (build_sigtable): Don't die if a null signature table
9998 constructor is returned.
9999 (build_signature_pointer_constructor): If the signature table
10000 constructor is null, the _sptr field is set to a null pointer
10001 and cast to the appropriate type. Make copies of all null
10002 pointers so that the type null_pointer_node doesn't get changed.
10003 (build_signature_table_constructor): Added comments.
10004
10005 * sig.c (build_signature_pointer_constructor): Complain if we
10006 try to assign to/initialize a signature pointer/reference of
10007 an undefined signature.
10008
d11ad92e 10009Mon Jun 27 14:05:16 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10010
10011 * typeck2.c (store_init_value): Don't be pedantic about
10012 non-constant initializers of signature tables/pointers/references.
10013
d11ad92e 10014Fri Jun 24 16:49:41 1994 Gerald Baumgartner <gb@cs.purdue.edu>
63718c49
GB
10015
10016 * decl.c (grokdeclarator): If we are grokking an opaque typedef
10017 in a signature, don't complain about it begin static.
10018
6060a796 10019Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
10020
10021 Fixes a problem of the this pointer being wrong in virtual calls to
10022 methods that are not overridden in more derived classes.
10023
10024 * class.c (fixup_vtable_delta): New routine. It will fixup the
10025 delta entries in vtables, wheever they need updating.
10026 * class.c (finish_struct): Call the new routine for all virtual
10027 bases, as they can have different offsets, than those used in base
10028 classes that we derive our vtable from.
10029
d11ad92e 10030Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10031
10032 * typeck.c (build_binary_op): Use the types before default
10033 conversions in the error message.
10034
10035 * *.c: Use c_build_type_variant instead of build_type_variant where
10036 the type might be an array.
10037
10038 * call.c (build_method_call): Call build_type_variant and
10039 build_reference_type in the right order.
d11ad92e 10040 * decl.c (record_builtin_type): Likewise.
21474714 10041
d11ad92e 10042Wed Jun 29 16:58:53 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10043
10044 * call.c (build_method_call): Call build_type_variant and
10045 build_reference_type in the right order.
d11ad92e 10046 * decl.c (record_builtin_type): Likewise.
21474714 10047
d11ad92e 10048Tue Jun 28 23:49:28 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10049
10050 * typeck.c (build_binary_op): Use the types before default
10051 conversions in the error message.
10052
10053 * *.c: Use c_build_type_variant instead of build_type_variant where
10054 the type might be an array.
10055
d11ad92e 10056Sat Jun 25 11:50:54 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10057
10058 * cvt.c (convert_to_reference): Try UDC's before doing the
10059 reinterpret_cast thang, though.
10060
d11ad92e 10061Fri Jun 24 01:24:01 1994 Jason Merrill <jason@deneb.cygnus.com>
21474714
MS
10062
10063 * typeck.c (c_expand_return): Don't USE the return value location
10064 after we've expanded the jump.
10065
10066 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
10067 trying to write out an inline.
10068
10069 * cvt.c (build_up_reference): Also do address adjustment when the
10070 target type uses MI.
10071 (convert_to_reference): Try UDCs only after built-in conversions.
10072 (build_type_conversion_1): Don't play games with the argument to the
10073 method.
10074 (build_type_conversion): #if 0 out code for binding to reference.
10075
d11ad92e 10076Thu Jun 23 00:22:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465 10077
21474714
MS
10078 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
10079 whether to emit inlines.
10080
a3203465
MS
10081 * decl.c (grokdeclarator): Set explicit_int for decls that just
10082 specify, say, 'long'.
10083
10084 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 10085 anyaway).
a3203465 10086
d11ad92e 10087Wed Jun 22 13:40:49 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10088
10089 * cvt.c (build_up_reference): Don't call readonly_error.
10090 (convert_to_reference): Propagate const and volatile from expr to
10091 its type.
10092
10093 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
10094
10095 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
10096 creating a temporary.
10097 (convert_to_reference): Lose excessive and incorrect trickiness.
10098 (cp_convert): Call build_cplus_new with with_cleanup_p set.
10099
d11ad92e 10100 * typeck2.c (build_functional_cast): Likewise.
a3203465 10101
d11ad92e 10102Tue Jun 21 17:38:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10103
10104 * decl.c (grokdeclarator): signed, unsigned, long and short all
10105 imply 'int'.
10106
10107 * decl.c (grokdeclarator): Allow "this is a type" syntax.
10108 (grok_reference_init): Simplify and fix.
10109
d11ad92e 10110Sun Jun 19 17:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10111
10112 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
10113 type.
10114
d11ad92e 10115Sat Jun 18 04:16:50 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10116
10117 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
10118 tinkering to after call to pushdecl.
10119
d11ad92e 10120Fri Jun 17 14:48:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10121
10122 * call.c (build_method_call): Handle destructors for non-aggregate
10123 types properly.
10124
d11ad92e 10125Thu Jun 16 16:48:05 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10126
10127 * call.c (build_method_call): Make sure that the name given for the
10128 destructor matches the constructor_name of the instance.
10129
10130 * pt.c (do_function_instantiation): A non-extern instantiation
10131 overrides a later extern one.
d11ad92e 10132 (do_type_instantiation): Likewise.
a3203465 10133
d11ad92e 10134Wed Jun 15 19:34:54 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10135
10136 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
10137 unqualified array type.
10138
10139 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
10140 CONSTRUCTOR with no elements.
10141
10142 * decl.c (various): Lose empty_init_node.
10143 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
10144 thing depending on the value of DECL_COMMON instead of
10145 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
10146 don't have constructors, don't treat a real empty CONSTRUCTOR
10147 specially.
10148
10149 * typeck2.c (process_init_constructor): Don't treat empty_init_node
10150 specially.
10151
6060a796 10152Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
10153
10154 * class.c (override_one_vtable): Don't forget to merge in an old
10155 overrider when we wanted to reuse a vtable, but couldn't.
10156
d11ad92e 10157Wed Jun 15 15:03:16 1994 Jason Merrill <jason@deneb.cygnus.com>
a3203465
MS
10158
10159 * decl.c (start_decl): Put statics in common again.
10160
10161 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
10162 setting the type to error_mark_node.
10163
10164 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
10165 bitfield assignments.
10166
d11ad92e 10167Tue Jun 14 12:23:38 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10168
10169 * decl.c (grok_op_properties): Const objects can be passed by value.
10170
d11ad92e 10171Mon Jun 13 03:10:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10172
10173 * decl2.c (import_export_vtable): Force implicit instantiations to
10174 be interface_only when -fno-implicit-templates.
10175
10176 * decl.c (duplicate_decls): Redeclaring a class template name is an
10177 error.
10178
10179 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
10180 * xref.c (GNU_xref_decl): Support templates.
10181
d11ad92e 10182Sat Jun 11 17:09:05 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10183
10184 * decl.c (grok_op_properties): Split out checking for whether this
10185 function should suppress the default assignment operator.
d11ad92e 10186 * decl2.c (grok_function_init): Likewise.
f0e01782
MS
10187 (copy_assignment_arg_p): New function do do just that.
10188 Now considers virtual assignment operators that take a base as an
10189 argument to count as copy assignment operators.
10190
10191 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
10192 TREE_ASM_WRITTEN, as they are redundant.
10193
10194 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
10195 decl that has no LANG_SPECIFIC part.
10196 (do_type_instantiation): Force the debugging information for this
10197 type to be emitted.
10198
10199 * decl.c (start_decl): Clear up uses of various types of templates
10200 (say sorry for static data members, rather than "invalid template").
10201 (expand_static_init): Fix initialization of static data members of
10202 template classes.
10203
d11ad92e 10204Fri Jun 10 00:41:19 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10205
10206 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
10207
10208 * g++.c (main): Use -xc++-cpp-output for .i files.
10209
10210 * pt.c (tsubst): Give meaningful error about declaring template for
10211 a copy constructor which was not declared in the class template.
10212 (do_type_instantiation): Explicit instantiation before the class
10213 template is an error.
10214 (instantiate_template): Don't die if tsubst returns error_mark_node.
10215
d11ad92e 10216Thu Jun 9 19:04:59 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10217
10218 Don't synthesize the copy assignment operator if the one in a base
10219 class is pure virtual.
10220 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
10221 whether the type has a pure virtual copy assignment operator.
10222 * class.c (finish_base_struct): Don't generate the copy assignment
10223 operator if a base class has a pure virtual one.
10224 * decl.c (grok_op_properties): Add disabled code to set
10225 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
10226 actually set.
10227 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
10228
10229 * decl2.c (import_export_vtable): Always treat template
10230 instantiations as if write_virtuals >= 2, and treat implicit
10231 instantiations as external if -fno-implicit-templates.
10232 (finish_file): Output all pending inlines if
10233 flag_keep_inline_functions.
10234
6060a796 10235Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
10236
10237 * tree.c (layout_vbasetypes): Align virtual base classes inside
10238 complete objects, so that we don't core dump on machines such as
10239 SPARCs when we access members that require larger than normal
10240 alignments, such as a double. Also, we bump up the total alignment
10241 on the complete type, as necessary.
10242
d11ad92e 10243Wed Jun 8 16:18:14 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10244
10245 * gxxint.texi (Free Store): New section with code for examining
10246 cookie.
10247 (Limitations of g++): Remove operator delete entry, since it is no
10248 longer accurate. Fix access control entry.
10249
10250 * typeck.c (build_unary_op): Pedwarn about taking the address of or
10251 incrementing a cast to non-reference type.
10252 (build_modify_expr): Use convert instead of convert_force again.
10253
10254 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
10255 class type, not == RECORD_TYPE.
10256
10257 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
10258
10259 * typeck2.c (report_case_error): #if 0 out.
10260 * lex.c (real_yylex): Lose RANGE.
d11ad92e 10261 * parse.y: Likewise.
f0e01782 10262
d11ad92e 10263Tue Jun 7 18:17:35 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10264
10265 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
10266
d11ad92e 10267Mon Jun 6 19:39:57 1994 Jason Merrill <jason@deneb.cygnus.com>
f0e01782
MS
10268
10269 * typeck.c (build_c_cast): Don't shortcut conversions to the same
10270 type. Don't replace consts with their values here, since that's now
10271 done in cp_convert.
10272
10273 * cvt.c (cp_convert): When converting to bool, take
10274 integer_zero_node to false_node and all other INTEGER_CSTs to
10275 true_node.
10276 (build_type_conversion): Don't complain about multiple conversions
10277 to float if we're not really converting.
10278
d11ad92e 10279Fri Jun 3 02:10:56 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927 10280
f0e01782
MS
10281 Implement 'extern template class A<int>;' syntax for suppressing
10282 specific implicit instantiations.
10283 * cp-tree.h: Update prototypes for do_*_instantiation.
10284 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
10285 instantiations.
10286 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
10287 instantiations.
d11ad92e 10288 (do_type_instantiation): Likewise.
f0e01782
MS
10289 * parse.y (explicit_instantiation): Support 'extern template class
10290 A<int>;' syntax.
10291 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
10292 and DECL_EXTERNAL on explicit instantiations.
10293
a0a33927
MS
10294 * cvt.c (cp_convert): Replace constants with their values before
10295 converting.
f0e01782 10296 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927 10297
d11ad92e 10298Thu Jun 2 03:53:30 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10299
10300 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
10301
d11ad92e 10302Wed Jun 1 18:57:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10303
10304 * typeck2.c (digest_init): Handle initializing a pmf with an
10305 overloaded method.
10306 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
10307
10308 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
d11ad92e
MS
10309 (xref_defn_tag): Likewise.
10310 * pt.c (process_template_parm): Likewise.
10311 (lookup_template_class): Likewise.
10312 (push_template_decls): Likewise.
10313 (instantiate_class_template): Likewise.
10314 (create_nested_upt): Likewise.
a0a33927
MS
10315 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
10316 TYPE_DECLs.
10317
10318 * typeck.c (convert_arguments): Make sure type is not NULL before
10319 checking its TREE_CODE.
10320
6060a796 10321Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10322
10323 * class.c (get_derived_offset): New routine.
10324 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
10325 BINFO_VIRTUALS when we choose a new base class to inherit from.
10326 * class.c (modify_one_vtable): Use get_derived_offset to get the
10327 offset to the most base class subobject that we derived this binfo
10328 from.
10329 * class.c (finish_struct): Move code to calculate the
10330 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
10331 new calls to get_derived_offset in modify_one_vtable.
10332
d11ad92e 10333Wed Jun 1 16:50:59 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10334
10335 * init.c (build_member_call): Use build_pointer_type instead of
10336 TYPE_POINTER_TO.
10337
d11ad92e 10338Wed Jun 1 11:11:15 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
10339
10340 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
10341 try to use it in an error.
10342
6060a796 10343Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10344
10345 * typeck.c (convert_arguments, convert_for_initialization): Don't
10346 strip NOP_EXPRs, when we are converting to a reference.
10347
d11ad92e 10348Wed Jun 1 01:11:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10349
10350 * typeck.c (build_modify_expr): Don't dereference references when
10351 initializing them.
10352
10353 * decl2.c (grokfield): Don't check for grokdeclarator returning
10354 error_mark_node any more.
10355
10356 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10357 (start_method): Return void_type_node instead of error_mark_node.
10358
10359 * typeck.c (build_modify_expr): Resolve offset refs earlier.
10360
d11ad92e 10361Tue May 31 16:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10362
10363 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
10364
10365 * typeck.c (build_modify_expr): Dereference references before trying
10366 to assign to them.
10367
10368 * call.c (build_method_call): Don't confuse type conversion
10369 operators with constructors.
10370 * typeck2.c (build_functional_cast): Just call build_c_cast if there
10371 was only one parameter.
10372 * method.c (build_typename_overload): Don't set
10373 IDENTIFIER_GLOBAL_VALUE on these identifiers.
10374 * decl.c (grok_op_properties): Warn about defining a type conversion
10375 operator that converts to a base class (or reference to it).
10376 * cvt.c (cp_convert): Don't try to use a type conversion operator
10377 when converting to a base class.
10378 (build_type_conversion_1): Don't call constructor_name_full on an
10379 identifier.
10380 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
10381
10382 * decl.c (start_decl): Don't complain that error_mark_node is an
10383 incomplete type.
10384 (finish_decl): Check for type == error_mark_node.
10385
d11ad92e 10386Mon May 30 23:38:55 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10387
10388 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
10389 instantiations and inline members.
10390
10391 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
10392
10393 * lex.h: Declare looking_for_template.
10394
10395 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
10396 between type and template interpretations of an identifier.
10397
d11ad92e 10398Sat May 28 04:07:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10399
10400 * pt.c (instantiate_template): Zero out p if we found a
10401 specialization.
10402
10403 * decl.c (grokdeclarator): Elucidate warning.
10404 (grokdeclarator): If pedantic AND -ansi, complain about long long.
10405
10406 Make explicit instantiation work reasonably. It is now appropriate
10407 to deprecate the use of -fexternal-templates.
10408 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
10409 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
10410 (end_template_instantiation): Reflect changes in USE_TEMPLATE
10411 semantics.
10412 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
10413 (do_function_instantiation): Don't set EXPLICIT_INST if
10414 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
10415 appropriately otherwise.
10416 (do_type_instantiation): Set interface info for class. Set
10417 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
10418 flag_external_templates is set.
10419 * parse.y: Reflect changes in USE_TEMPLATE semantics.
10420 * decl2.c: New flag flag_implicit_templates determines whether or
10421 not implicit instantiations get emitted. This flag currently
10422 defaults to true, and must be true for -fexternal-templates to work.
10423 (finish_file): Consider flag_implement_inlines when
10424 setting DECL_EXTERNAL. Consider flag_implicit_templates when
10425 deciding whether or not to emit a static copy.
10426 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
10427 properly for template instantiations.
10428 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
10429 template class.
10430 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
10431 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
10432 (various others): Accessor macros for the above.
10433
d11ad92e 10434Fri May 27 13:57:40 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10435
10436 * typeck.c (build_binary_op_nodefault): Division by constant zero is
10437 an error.
10438
6060a796 10439Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
10440
10441 * class.c (override_one_vtable): Don't modify things we don't own.
10442
d11ad92e 10443Fri May 27 01:42:58 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10444
10445 * decl.c (finish_decl): Don't postpone processing the initializer of
10446 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
10447 PUBLIC const at toplevel.
10448 (grokdeclarator): pedwarn about initializing non-const or
10449 non-integral statics in the class body.
10450
10451 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
10452 TYPE_DECL.
10453
10454 * call.c (convert_harshness): Dereference reference on rhs before
10455 proceeding, properly grok passing const things to non-const
10456 references.
10457
10458 * typeck.c (build_unary_op): Soften error about taking the address
10459 of main() to a pedwarn.
10460
10461 * lex.c (default_copy_constructor_body): Unambiguously specify base
10462 classes (i.e. A((const class ::A&)_ctor_arg) ).
d11ad92e 10463 (default_assign_ref_body): Likewise.
a0a33927 10464
d11ad92e 10465Thu May 26 13:13:55 1994 Gerald Baumgartner <gb@mexican.cygnus.com>
a0a33927
MS
10466
10467 * decl2.c (grokfield): Don't complain about local signature
10468 method declaration without definition.
10469
10470 * call.c (convert_harshness): If `type' is a signature pointer
10471 and `parmtype' is a pointer to a signature, just return 0. We
10472 don't really convert in this case; it's a result of making the
10473 `this' parameter of a signature method a signature pointer.
10474
10475 * call.c (build_method_call): Distinguish calling the default copy
10476 constructor of a signature pointer/reference from a signature
10477 member function call.
10478
d11ad92e 10479Thu May 26 12:56:25 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10480
10481 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
10482 declarations.
10483
10484 * decl.c (duplicate_decls): A previous function declaration as
10485 static overrides a subsequent non-static definition.
10486 (grokdeclarator): Don't set TREE_PUBLIC on inline method
10487 declarations.
10488
d11ad92e 10489Wed May 25 14:36:38 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10490
10491 * decl.c (grokdeclarator): Handle initialization of static const
10492 members.
d11ad92e 10493 (finish_decl): Likewise.
a0a33927
MS
10494
10495 * decl2.c (grokfield): Allow initialization of static const members
10496 even when pedantic.
10497
10498 * decl2.c (grokfield): Deal with grokdeclarator returning
10499 error_mark_node.
10500
10501 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
10502 (grokfndecl): Check the return value of grok_ctor_properties.
d11ad92e 10503 (start_method): Likewise.
a0a33927
MS
10504
10505 * parse.y (absdcl): Expand type_quals inline.
10506
d11ad92e 10507Tue May 24 19:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10508
10509 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
10510 RECORD_TYPE.
10511
d11ad92e 10512Tue May 24 18:09:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
a0a33927
MS
10513
10514 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
10515 always use "__vt_%s".
10516 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
10517 when looking for a "sentinal" method (to decide on emitting vtables).
10518 * decl2.c (finish_file): Scan all decls for thunks that need
10519 to be emitted.
10520 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
10521 * method.c (make_thunk): Use a more meaningful label. If there
10522 exists a matching top-level THUNK_DECL re-use it; otherwise
10523 create a new THUNK_DECL (and declare it).
10524 * method.c (emit_thunk): Make thunk external/public depending
10525 on the underlying method.
10526
d11ad92e 10527Tue May 24 00:22:04 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10528
10529 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
10530 lookup_name.
10531
10532 * call.c (build_overload_call_real): Don't immediately pick a
10533 function which matches perfectly.
10534
10535 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
10536 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
10537 reference (like 'int &const j').
10538
10539 * typeck.c (convert_arguments): Don't mess with i for methods.
10540 * call.c (build_method_call): Pass the function decl to
10541 convert_arguments.
10542
10543 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
10544 checking for which multi-level pointer conversions are allowed.
10545 (comp_target_types): Call it.
10546 (convert_for_assignment): Check const parity on the ultimate target
10547 type, too. And make those warnings pedwarns.
10548
d11ad92e 10549Mon May 23 14:11:24 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10550
10551 * error.c (dump_char): Use TARGET_* for character constants.
10552
d11ad92e 10553Mon May 23 13:03:03 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a0a33927
MS
10554
10555 * tree.c (debug_no_list_hash): Make static.
10556
10557 * decl.c (decls_match): Say the types don't match if newdecl ends up
10558 with a null type, after we've checked if olddecl does.
10559 (pushdecl): Check if the decls themselves match before looking for
10560 an extern redeclared as static, to avoid inappropriate and incorrect
10561 warnings.
10562
d11ad92e 10563Fri May 20 14:04:34 1994 Jason Merrill <jason@deneb.cygnus.com>
a0a33927
MS
10564
10565 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
10566 a pedwarn.
10567
10568 * typeck.c (build_c_cast): Casting to function or method type is an
10569 error.
10570
10571 * class.c (finish_struct): Make warning for anonymous class with no
10572 instances a pedwarn.
10573
10574 * Makefile.in (stamp-parse): Expect a s/r conflict.
10575
10576 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
10577 cast as an lvalue.
10578
d11ad92e 10579Thu May 19 12:08:48 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10580
10581 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
10582 than unsigned on platforms where sizeof(char)==sizeof(int).
10583
d11ad92e 10584Wed May 18 14:27:06 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10585
10586 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
10587 another variant.
10588 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
10589 and treat them as lvalues.
10590
10591 * decl.c (shadow_tag): Do complain about forward declarations of
10592 enums and empty declarations.
10593 * parse.y: Don't complain about forward declarations of enums and
10594 empty declarations.
10595
10596 * typeck.c (convert_for_assignment): Complain about changing
10597 the signedness of a pointer's target type.
10598
10599 * parse.y (stmt): Move duplicated code for checking case values from
10600 here.
10601 * decl2.c (check_cp_case_value): To here. And add a call to
10602 constant_expression_warning.
10603
10604 * typeck.c (convert_for_assignment): Don't complain about assigning
10605 a negative value to bool.
10606
10607 * decl.c (init_decl_processing): Make bool unsigned.
10608
10609 * class.c (finish_struct): Allow bool bitfields.
10610
d11ad92e 10611Wed May 18 12:35:27 1994 Ian Lance Taylor <ian@tweedledumb.cygnus.com>
2986ae00
MS
10612
10613 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
10614
d11ad92e 10615Wed May 18 03:28:35 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10616
10617 * cvt.c (build_type_conversion): Lose special handling of
10618 truthvalues.
10619
10620 * search.c (dfs_pushdecls): Improve shadowing warning.
10621
d11ad92e 10622Tue May 17 13:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10623
10624 * init.c (build_delete): Throw away const and volatile on `this'.
10625
10626 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
10627 rather than the enumerators.
10628 (pushtag): s/cdecl/c_decl/g
10629
d11ad92e 10630Mon May 16 23:04:01 1994 Stephen R. van den Berg <berg@pool.informatik.rwth-aachen.de>
2986ae00 10631
63718c49
GB
10632 * cp/typeck.c (common_type): Attribute merging.
10633 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 10634
63718c49 10635 * cp/parse.y: Revamp attribute parsing.
2986ae00 10636
d11ad92e 10637Mon May 16 01:40:34 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10638
10639 * decl.c (shadow_tag): Also check for inappropriate use of auto and
10640 register.
10641
10642 * method.c (build_overload_name): Clarify that the illegal case is a
10643 pointer or reference to array of unknown bound.
10644
10645 * error.c (dump_type_prefix): Print references to arrays properly.
10646
10647 * typeck.c (various): Be more helpful in pointer
10648 comparison diagnostics.
10649
10650 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
10651 fun?
10652
10653 * parse.y: Also catch an error after valid stmts.
10654
10655 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
10656 const.
10657
10658 * typeck.c (convert_for_initialization): If call to
10659 convert_to_reference generated a diagnostic, print out the parm
10660 number and function decl if any.
10661
10662 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
10663 specifying a line, not atarg.
10664
10665 * tree.c (build_cplus_method_type): Always make `this' const.
10666
10667 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
10668 a constructor or destructor, make `this' non-const.
10669
10670 * typeck.c (build_modify_expr): Don't warn specially about
10671 assignment to `this' here anymore, since it will be caught by the
10672 usual machinery.
10673
10674 * various: Disallow specific GNU extensions (variable-size arrays,
10675 etc.) when flag_ansi is set, not necessarily when pedantic is set,
10676 so that people can compile with -pedantic-errors for tighter const
10677 checking and such without losing desirable extensions.
10678
10679 * typeck2.c (build_functional_cast): Call build_method_call with
10680 LOOKUP_PROTECT.
10681 (process_init_constructor): Only process FIELD_DECLs.
10682
10683 * decl.c (finish_decl): Also force static consts with no explicit
10684 initializer that need constructing into the data segment.
10685
10686 * init.c (build_delete): Undo last patch, as it interferes with
10687 automatic cleanups.
10688
d11ad92e 10689Sat May 14 01:59:31 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10690
10691 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
10692 code.
10693
10694 * init.c (build_delete): pedwarn about using plain delete to delete
10695 an array.
10696
d11ad92e 10697Fri May 13 16:45:07 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10698
10699 * typeck.c (comp_target_types): Be more helpful in contravariance
10700 warnings, and make them pedwarns.
10701
10702 * decl.c (grokdeclarator): Use decl_context to decide whether or not
10703 this is an access declaration.
10704
10705 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
10706 has a conversion to enum or bool, too.
10707
6060a796 10708Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10709
10710 * method.c (emit_thunk): Make declaration for
10711 current_call_is_indirect local (needed for hppa).
10712
d11ad92e 10713Fri May 13 16:16:37 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10714
10715 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
d11ad92e 10716 (tsubst): Likewise.
2986ae00 10717
6060a796 10718Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10719
10720 * pt.c (tsubst): If there is already a function for this expansion,
10721 use it.
d11ad92e 10722 * pt.c (instantiate_template): Likewise.
2986ae00 10723
d11ad92e 10724Fri May 13 10:30:42 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
2986ae00
MS
10725
10726 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
10727 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
10728 generating debug info for unemitted symbols on some systems.
10729
10730 * cp-tree.h (build_static_cast, build_reinterpret_cast,
10731 build_const_cast): Add declarations.
10732
6060a796 10733Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10734
10735 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
10736 fix. We now try get_binfo, and if that doesn't find what we want,
10737 we go back to the old method, which still sometimes fails.
10738
d11ad92e 10739Fri May 13 01:43:18 1994 Jason Merrill <jason@deneb.cygnus.com>
2986ae00
MS
10740
10741 * parse.y (initdcl): Call cplus_decl_attributes on the right
10742 variable.
10743 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
10744 void_type_node.
10745
10746 * typeck.c (build_binary_op_nodefault): Change result_type for
10747 comparison ops to bool.
10748 (build_binary_op): Convert args of && and || to bool.
10749 * cvt.c (build_default_binary_type_conversion): Convert args of &&
10750 and || to bool.
10751 (build_default_unary_type_conversion): Convert arg of ! to bool.
10752 (type_promotes_to): bool promotes to int.
10753
6060a796 10754Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
10755
10756 Implement the new builtin `bool' type.
10757 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
10758 bool.
10759 (build_unary_op): Convert arg of ! to bool.
10760 * parse.y: Know true and false. Use bool_truthvalue_conversion.
10761 * method.c (build_overload_value): Know bool.
d11ad92e 10762 (build_overload_name): Likewise.
2986ae00
MS
10763 * lex.c (init_lex): Set up RID_BOOL.
10764 * gxx.gperf: Add bool, true, false.
10765 * error.c (*): Know bool.
10766 * decl.c (init_decl_processing): Set up bool, true, false.
10767 * cvt.c (cp_convert): Handle conversion to bool.
d11ad92e 10768 (build_type_conversion): Likewise.
2986ae00
MS
10769 * *.c: Accept bool where integers and enums are accepted (use
10770 INTEGRAL_CODE_P macro).
10771
d11ad92e 10772Thu May 12 19:13:54 1994 Richard Earnshaw <rwe11@cl.cam.ac.uk>
8de7634e
RE
10773
10774 * g++.c: Use #ifdef for __MSDOS__, not #if.
10775
6060a796 10776Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10777
10778 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
10779 gives old behavior , and destroys temporaries earlier. Default
10780 behavior now conforms to the ANSI working paper.
10781
d11ad92e 10782Thu May 12 14:45:35 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10783
10784 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
10785 Use convert_force to convert the result of a recursive call when we
10786 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
10787 in COMPOUND_EXPRs any more.
10788 (various): Lose pedantic_lvalue_warning.
10789 (unary_complex_lvalue): Understand MODIFY_EXPR.
10790
10791 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
10792 we don't know what we're initializing.
10793
d11ad92e 10794Wed May 11 01:59:36 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10795
10796 * cvt.c (convert_to_reference): Modify to use convtype parameter.
10797 Only create temporaries when initializing a reference, not when
10798 casting.
10799 (cp_convert): New main function.
10800 (convert): Call cp_convert.
10801 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
10802 * cp-tree.h (CONV_*): New constants used by conversion code for
10803 selecting conversions to perform.
10804
10805 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
10806
10807 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
10808 call build_c_cast.
10809 * parse.y: Add {static,reinterpret,const}_cast.
d11ad92e 10810 * gxx.gperf: Likewise.
a4443a08
MS
10811
10812 * typeck.c (common_type): Allow methods with basetypes of different
10813 UPTs.
10814 (comptypes): Deal with UPTs.
10815 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
10816
10817 * pt.c (end_template_decl): Check for multiple definitions of member
10818 templates.
10819
10820 * call.c (build_method_call): Complain about calling an abstract
10821 virtual from a constructor.
10822
10823 * typeck.c (pointer_int_sum): Check for the integer operand being 0
10824 after checking the validity of the pointer operand.
10825
10826 * typeck2.c (digest_init): Pedwarn about string initializer being
10827 too long.
10828
d11ad92e 10829Tue May 10 12:10:28 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10830
10831 * decl.c (push_overloaded_decl): Only throw away a builtin if the
10832 decl in question is the artificial one.
10833
10834 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
10835 expand_{start,end}_case cannot happen in the middle of a block.
10836
10837 * cvt.c (build_type_conversion_1): Use convert again.
10838
d11ad92e 10839Tue May 10 11:52:04 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
a4443a08
MS
10840
10841 * typeck2.c (digest_init): Make sure we check for signed and
10842 unsigned chars as well when warning about string initializers.
10843
10844 * init.c (emit_base_init): Check if there's a DECL_NAME on the
10845 member before trying to do an initialization for it.
10846
6060a796 10847Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10848
10849 * except.c: Don't do anything useful when cross compiling.
10850
d11ad92e 10851Tue May 10 03:04:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10852
10853 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
d11ad92e 10854 (push_overloaded_decl): Likewise.
a4443a08
MS
10855
10856 * cvt.c (convert): Don't look for void type conversion.
10857
d11ad92e 10858Mon May 9 18:05:41 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10859
10860 * init.c (do_friend): Only do a pushdecl for friends, not
10861 pushdecl_top_level.
10862
d11ad92e 10863Mon May 9 13:36:34 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
a4443a08
MS
10864
10865 * decl.c (lookup_name_current_level): Put empty statement after
10866 the label OUT to make the code valid C.
10867
d11ad92e 10868Mon May 9 12:20:57 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10869
10870 * typeck.c (build_binary_op_nodefault): Only complain about
10871 comparing void * and a function pointer if void * is smaller.
10872
d11ad92e 10873Sun May 8 01:29:13 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10874
10875 * decl.c (lookup_name_current_level): Move through temporary binding
10876 levels.
10877
10878 * parse.y (already_scoped_stmt): Revive.
10879 (simple_stmt): Use it again.
10880
10881 * decl.c (poplevel): Always call poplevel recursively if we're
10882 dealing with a temporary binding level.
10883
6060a796 10884Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
10885
10886 * decl.c (finish_decl): Make sure we run cleanups for initial values
10887 of decls. Cures memory leak.
d11ad92e
MS
10888 * decl.c (expand_static_init): Likewise for static variables.
10889 * decl2.c (finish_file): Likewise for globals.
a4443a08 10890
d11ad92e 10891Sat May 7 03:57:44 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10892
10893 * typeck.c (commonparms): Don't complain about redefining default
10894 args.
10895
10896 * decl.c (duplicate_decls): Don't complain twice about conflicting
10897 function decls.
10898 (decls_match): Don't look at default args.
10899 (redeclaration_error_message): Complain about redefining default
10900 args.
10901
10902 * call.c (build_overload_call_real): Also deal with guiding
10903 declarations coming BEFORE the template decl.
10904
10905 * pt.c (unify): Allow different parms to have different
10906 cv-qualifiers.
10907 (unify): Allow trivial conversions on non-template parms.
10908
d11ad92e 10909Fri May 6 03:53:23 1994 Jason Merrill <jason@deneb.cygnus.com>
a4443a08
MS
10910
10911 * pt.c (tsubst): Support OFFSET_TYPEs.
d11ad92e 10912 (unify): Likewise.
a4443a08
MS
10913
10914 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
10915
10916 * init.c (build_offset_ref): Fix error message.
d11ad92e 10917 * search.c (lookup_field): Likewise.
a4443a08
MS
10918
10919 * call.c (build_scoped_method_call): Pass binfo to
10920 build_method_call.
d11ad92e 10921 * typeck.c (build_object_ref): Likewise.
a4443a08
MS
10922
10923 * typeck2.c (binfo_or_else): Don't return a _TYPE.
10924
10925 * class.c (finish_struct): Don't complain about re-use of inherited
10926 names or shadowing of type decls.
d11ad92e 10927 * decl.c (pushdecl_class_level): Likewise.
a4443a08
MS
10928
10929 * decl.c (finish_enum): Set the type of all the enums.
10930
10931 * class.c (finish_struct): Don't get confused by access decls.
10932
10933 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
10934 _TYPE. You can stop using TYPE_NAME for that now.
10935
10936 * parse.y: Lose doing_explicit (check $0 instead).
10937 * gxx.gperf: 'template' now has a RID.
d11ad92e 10938 * lex.h (rid): Likewise.
a4443a08
MS
10939 * lex.c (init_lex): Set up the RID for 'template'.
10940
10941 * parse.y (type_specifier_seq): typed_typespecs or
10942 nonempty_type_quals. Use it.
10943 (handler_args): Fix bogus syntax.
10944 (raise_identifier{,s}, optional_identifier): Lose.
10945 * except.c (expand_start_catch_block): Use grokdeclarator to parse
10946 the catch variable.
10947 (init_exception_processing): The second argument to
10948 __throw_type_match is ptr_type_node.
10949
d11ad92e 10950 Fri May 6 07:18:54 1994 Chip Salzenberg <chip@fin.uucp>
a4443a08
MS
10951
10952 [ change propagated from c-decl.c of snapshot 940429 ]
10953 * cp/decl.c (finish_decl): Setting asmspec_tree should not
10954 zero out the old RTL.
10955
6060a796 10956Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
10957
10958 Add alpha exception handling support to the compiler.
10959 Quick and dirty backend in except.c.
10960
10961 * cp/*: Remove most remnants of old exception handling support.
10962 * decl.c (finish_function): Call expand_exception_blocks to put
10963 the exception hanlding blocks at the end of the function.
10964 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
10965 comes after expand_decl_init.
10966 * except.c: Reimplementation.
10967 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
10968 * lex.c (init_lex): Always have catch, try and throw be reserved
10969 words, so that we may always parse exception handling.
10970 * parse.y: Cleanup to support new interface into exception handling.
10971 * tree.def (THROW_EXPR): Add.
10972
d11ad92e 10973Thu May 5 17:35:37 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
10974
10975 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
10976 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
10977
d11ad92e 10978Thu May 5 16:17:27 1994 Kung Hsu <kung@mexican.cygnus.com>
8d2733ca
MS
10979
10980 * parse.y (already_scoped_stmt): move expand_end_binding() to
10981 fix the unmatched LBB/LBE in stabs.
10982
d11ad92e 10983Thu May 5 14:36:17 1994 Jason Merrill <jason@deneb.cygnus.com>
8d2733ca
MS
10984
10985 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
10986 identifiers.
10987 (pushdecl): Check TREE_MANGLED.
d11ad92e 10988 (xref_tag): Likewise.
8d2733ca
MS
10989 * cp-tree.h (TREE_MANGLED): This identifier is a
10990 DECL_NESTED_TYPENAME (named to allow for future use to denote
10991 mangled function names as well).
10992
10993 Implement inconsistency checking specified in [class.scope0].
10994 * decl.c (lookup_name_real): Don't set ICV here after all.
10995 (finish_enum): Also set the type of the enumerators themselves.
10996 (build_enumerator): Put the CONST_DECL in the list instead of its
10997 initial value.
10998 (pushdecl_class_level): Check inconsistent use of a name in the
10999 class body.
11000 * class.c (finish_struct): Check inconsistent use of a name in the
11001 class body. Don't set DECL_CONTEXT on types here anymore.
11002 * parse.y (qualified_type_name): Note that the identifier has now
11003 been used (as a type) in the class body.
11004 * lex.c (do_identifier): Note that the identifier has now been used
11005 (as a constant) in the class body.
11006 * error.c (dump_decl): Print type and enum decls better.
11007
d11ad92e 11008Thu May 5 09:35:35 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
700f8a87
MS
11009
11010 * typeck.c (build_modify_expr): Warn about assignment to `this'.
11011
d11ad92e 11012Wed May 4 15:55:49 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11013
11014 * init.c (build_delete): Use the global operator delete when
11015 requested.
11016
11017 * decl.c (lookup_name_real): If we find the type we're looking in a
11018 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
11019 the type.
11020
11021 * class.c (finish_struct): Remove a couple of dependencies on
11022 language linkage.
11023
11024 * decl.c (pushtag): Classes do nest in extern "C" blocks.
11025 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
11026 the type.
11027 (pushtag): Remove another dependency on the language linkage.
11028
11029 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
11030 a const-qualified type.
11031
11032 * decl.c (push_overloaded_decl): Throw away built-in decls here.
11033 (duplicate_decls): Instead of here.
11034
d11ad92e 11035Wed May 4 15:27:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11036
11037 * typeck.c (get_member_function_from_ptrfunc): Do The Right
11038 Thing (I hope) if we're using thunks.
11039
d11ad92e 11040Wed May 4 13:52:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11041
11042 * parse.y (specialization): aggr template_type_name ';'.
11043 (named_class_head_sans_basetype): Use it.
d11ad92e 11044 (explicit_instantiation): Likewise.
700f8a87
MS
11045 (tmpl.2): Revert.
11046
11047 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
11048 rather than convert, to do conversions after the UDC.
11049
11050 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
11051 instances of the class.
11052
11053 * search.c (lookup_field): If the entity found by two routes is the
11054 same, it's not ambiguous.
11055
d11ad92e 11056Wed May 4 12:10:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11057
11058 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
11059 to prevent the compiler from crashing ...
11060
d11ad92e 11061Wed May 4 11:19:45 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11062
11063 * call.c (build_method_call): If we don't have an object, check
11064 basetype_path to figure out where to look up the function.
11065
11066 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
11067 build_method_call in case exp is NULL_TREE.
11068
d11ad92e 11069Tue May 3 16:02:53 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11070
11071 Give a vtable entries a unique named type, for the sake of gdb.
11072 * class.c (build_vtable_entry): The addres of a thunk now has
11073 type vtable_entry_type, not ptr_type_node.
11074 * method.c (make_thunk): Fix type of THUNK_DECL.
11075 * class.c (add_virtual_function, override_one_vtable): Use
11076 vfunc_ptr_type_node, instead of ptr_type_node.
11077 * cp-tree.h (vfunc_ptr_type_node): New macro.
11078 * decl.c (init_decl_processing): Make vtable_entry_type
11079 be a unique type of pointer to a unique function type.
11080
d11ad92e 11081Tue May 3 09:20:44 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11082
11083 * parse.y (do_explicit): Sets doing_explicit to 1.
11084 (explicit_instantiation): Use do_explicit rather than TEMPLATE
11085 directly, add "do_explicit error" rule.
11086 (datadef): Set doing_explicit to 0 after an explicit instantiation.
11087 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
11088 explicit instantiation.
11089 (named_class_head_sans_basetype): Remove aggr template_type_name
11090 ';' again.
11091
d11ad92e 11092Mon May 2 23:17:21 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11093
11094 * search.c (lookup_nested_tag): Lose.
11095
11096 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
11097 (lookup_name_nonclass): Lose.
11098
11099 * decl.c (poplevel_class): Add force parameter.
11100 (lookup_name_real): Fix handling of explicit scoping which specifies
11101 a class currently being defined. Add 'nonclass' argument.
11102 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
11103
11104 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
11105 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
11106 called from finish_struct.
11107
d11ad92e 11108Mon May 2 19:06:21 1994 Per Bothner <bothner@kalessin.cygnus.com>
700f8a87
MS
11109
11110 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
11111 (It seeems redundant, given build_ptrmemfunc_type.)
11112 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
11113 build_classof): Use vtable_entry_type instead of memptr_type.
11114 * method.c (emit_thunk): Call poplevel with functionbody==0
11115 to prevent DECL_INITIAL being set to a BLOCK.
11116
d11ad92e 11117Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11118
11119 * parse.y (named_class_head_sans_basetype): Add "aggr
11120 template_type_name ';'" rule for forward declaration of
11121 specializations.
11122
d11ad92e 11123Mon May 2 15:02:11 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11124
11125 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
11126
11127 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
11128 stamp-objlist does.
700f8a87 11129
bfef964b
JM
11130 * Makefile.in (../cc1plus): Depend on OBJDEPS.
11131 (OBJDEPS): Dependency version of OBJS.
11132
d11ad92e 11133Mon May 2 12:51:31 1994 Kung Hsu <kung@mexican.cygnus.com>
700f8a87
MS
11134
11135 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
11136 DECL_IGNORED_P.
11137
d11ad92e 11138Fri Apr 29 12:29:56 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11139
11140 * class.c (finish_struct): Clear out memory of local tags. And
11141 typedefs.
11142
11143 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
11144 type.
11145 * search.c (get_matching_virtual): Be more helpful in error message.
11146
11147 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
11148
11149 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
d11ad92e 11150 (default_copy_constructor_body): Likewise.
700f8a87
MS
11151
11152 * class.c (finish_struct): Don't gratuitously create multiple decls
11153 for nested classes.
11154
d11ad92e 11155Thu Apr 28 23:39:38 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11156
11157 Avoid clobbering the arg types of other functions when reverting
11158 static member functions.
11159 * decl.c (revert_static_member_fn): Rearrange arguments, don't
11160 require values for 'fn' and 'argtypes', add warning to comment
11161 above.
11162 (decls_match): Rearrange arguments in call to rsmf.
11163 (grok_op_properties): Don't pass values for fn and argtypes.
11164 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
11165
d11ad92e 11166Thu Apr 28 16:29:11 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11167
11168 * Make-lang.in (cc1plus): Depend on stamp-objlist.
11169 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
11170 (OBJS): Cat ../stamp-objlist to get language independent files.
11171 Include ../c-common.o.
15fa00e9
DE
11172 (../cc1plus): Delete reference to BC_OBJS.
11173
d11ad92e 11174Thu Apr 28 02:12:08 1994 Jason Merrill <jason@deneb.cygnus.com>
700f8a87
MS
11175
11176 * search.c (compute_access): No really, deal with static members
11177 properly. Would I lie to you?
11178
11179 Implement lexical hiding of function declarations.
11180 * pt.c (tsubst): Use lookup_name to look for function decls to guide
11181 instantiation.
11182 * method.c (build_opfncall): Use lookup_name_nonclass to look for
11183 non-member functions.
11184 * init.c (do_friend): Use lookup_name_nonclass to look for
11185 functions.
11186 * error.c (ident_fndecl): Use lookup_name to look for functions.
11187 * decl2.c (lookup_name_nonclass): New function, skips over
11188 CLASS_VALUE.
11189 * decl.c (struct binding_level): Lose overloads_shadowed field.
11190 (poplevel): Don't deal with overloads_shadowed.
11191 (push_overloaded_decl): Do lexical hiding for functions.
11192 * class.c (instantiate_type): Don't check non-members if we have
11193 members with the same name.
11194 * call.c (build_method_call): Use lookup_name_nonclass instead of
11195 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
d11ad92e 11196 (build_overload_call_real): Likewise.
700f8a87
MS
11197
11198 * decl.c (duplicate_decls): Check for ambiguous overloads here.
11199 (push_overloaded_decl): Instead of here.
11200
11201 * decl.c (pushdecl): Back out Chip's last change.
11202
11203 * decl.c (grok_op_properties): operators cannot be static members.
11204
11205 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
11206 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
11207 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
11208
11209 * method.c (do_inline_function_hair): Don't put friends of local
11210 classes into global scope, either.
11211
11212 * typeck2.c (build_functional_cast): Don't look for a function call
11213 interpretation.
11214
6060a796 11215Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11216
11217 * cp-tree.h: disable use of backend EH.
11218
d11ad92e 11219Wed Apr 27 21:01:24 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11220
11221 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
11222 * Makefile.in (INCLUDES): Move definition to same place as
11223 parent makefile.
11224 (ALLOCA): Define.
11225 (OLDAR_FLAGS): Delete.
11226 (OLDCC): Define.
11227 (DIR): Delete.
11228 (CLIB): Define.
11229 (####site): Delete.
11230 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
11231
d11ad92e 11232Wed Apr 27 19:10:04 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
11233
11234 * decl.c (xref_tag): not to use strstr(), it's not available on
11235 all platforms.
11236
d11ad92e 11237Wed Apr 27 18:10:12 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11238
11239 * class.c (finish_struct): Resolve yet another class/pmf confusion.
11240
11241 * call.c (build_overload_call_real): Don't take the single-function
11242 shortcut if we're dealing with an overloaded operator.
11243
6060a796 11244Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11245
11246 * search.c (get_base_distance): Search the virtual base class
11247 binfos, incase someone wants to convert to a real virtual base
11248 class.
11249 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
11250 instead of convert_pointer_to, as it now will work.
11251
d11ad92e 11252Wed Apr 27 15:36:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11253
11254 * cvt.c (convert_to_reference): Don't complain about casting away
11255 const and volatile.
11256
11257 * typeck.c (build_unary_op): References are too lvalues.
11258
6060a796 11259Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11260
11261 * class.c (override_one_vtable): We have to prepare_fresh_vtable
11262 before we modify it, not after, also, we cannot reuse an old vtable,
11263 once we commit to a new vtable. Implement ambiguous overrides in
11264 virtual bases as abstract. Hack until we make the class
11265 ill-formed.
11266
d11ad92e 11267Wed Apr 27 01:17:08 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11268
11269 * parse.y (unary_expr): Expand new_placement[opt] and
11270 new_initializer[opt] inline.
11271
11272 * search.c (lookup_fnfields): Don't throw away the inheritance
11273 information here, either.
11274 (compute_access): Handle static members properly.
11275
11276 * init.c (build_member_call): Always set basetype_path, and pass it
11277 to lookup_fnfields.
11278
11279 * search.c (lookup_field): Deal properly with the case where
11280 xbasetype is a chain of binfos; don't throw away the inheritance
11281 information.
11282 (compute_access): protected_ok always starts out at 0.
11283
11284 * init.c (resolve_offset_ref): Don't cast `this' to the base type
11285 until we've got our basetype_path.
11286
11287 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
11288
11289 * cvt.c (build_up_reference): Use build_pointer_type rather than
11290 TYPE_POINTER_TO.
11291
11292 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
11293 as well.
11294
11295 * cvt.c (type_promotes_to): Retain const and volatile, add
11296 float->double promotion.
11297
11298 * decl.c (grokdeclarator): Don't bash references to arrays into
11299 references to pointers in function parms. Use type_promotes_to.
11300
6060a796 11301Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
11302
11303 Finish off Apr 19th work.
11304
11305 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
11306 might_have_abstract_virtuals.
11307 * class.c (strictly_overrides, override_one_vtable,
11308 merge_overrides): New routines to handle virtual base overrides.
11309 * class.c (finish_struct): Call merge_overrides to handle overrides
11310 in virtual bases.
11311
d11ad92e 11312Tue Apr 26 12:45:53 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11313
11314 * typeck.c (build_function_call): Call build_function_call_real with
11315 LOOKUP_NORMAL.
11316
11317 * *: Don't deal with TYPE_EXPRs.
11318
11319 * tree.c (lvalue_p): If the type of the expression is a reference,
11320 it's an lvalue.
11321
11322 * cvt.c (convert_to_reference): Complain about passing const
11323 lvalues to non-const references.
11324 (convert_from_reference): Don't arbitrarily throw away const and
11325 volatile on the target type.
11326
11327 * parse.y: Simplify and fix rules for `new'.
11328
11329 * decl.c (grok_op_properties): operator void is illegal.
11330
d11ad92e 11331Mon Apr 25 02:36:28 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11332
11333 * parse.y (components): Anonymous bitfields can still have declspecs.
11334
11335 * decl.c (pushdecl): Postpone handling of function templates like we
11336 do C functions.
11337
11338 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
11339 convert_pointer_to fails.
11340
11341 * call.c (compute_conversion_costs_ansi): A user-defined conversion
11342 by itself is better than that UDC followed by standard conversions.
11343 Don't treat integers and reals specially.
11344
11345 * cp-tree.h: Declare flag_ansi.
11346
11347 * typeck.c (c_expand_return): pedwarn on return in void function
11348 even if the expression is of type void.
11349 (build_c_cast): Don't do as much checking for casts to void.
11350 (build_modify_expr): pedwarn about array assignment if this code
11351 wasn't generated by the compiler.
11352
11353 * tree.c (lvalue_p): A comma expression is an lvalue if its second
11354 operand is.
11355
11356 * typeck.c (default_conversion): Move code for promoting enums and
11357 ints from here.
11358 * cvt.c (type_promotes_to): To here.
11359 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
11360 promotion semantics for reals.
11361
d11ad92e 11362Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
15fa00e9
DE
11363
11364 * Make-lang.in (c++.install-common): Check for g++-cross.
11365 * Makefile.in: Remove Cygnus cruft.
11366 (config.status): Delete.
11367 (RTL_H): Define.
11368 (TREE_H): Use complete pathname, some native makes have minimal
11369 VPATH support.
11370 (*.o): Use complete pathname to headers in parent dir.
11371 (doc, info, dvi): Delete.
11372
d11ad92e 11373Sun Apr 24 16:52:51 1994 Doug Evans <dje@canuck.cygnus.com>
700f8a87
MS
11374
11375 * Make-lang.in (c++.install-common): Check for g++-cross.
11376 * Makefile.in: Remove Cygnus cruft.
11377 (config.status): Delete.
11378 (RTL_H): Define.
11379 (TREE_H): Use complete pathname, some native makes have minimal
11380 VPATH support.
11381 (*.o): Use complete pathname to headers in parent dir.
11382 (doc, info, dvi): Delete.
11383
d11ad92e 11384Sun Apr 24 00:47:49 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11385
11386 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
11387 with different return type.
11388 (decls_match): Compare return types strictly.
11389
d11ad92e 11390Fri Apr 22 12:55:42 1994 Jason Merrill <jason@deneb.cygnus.com>
39211cd5
MS
11391
11392 * cvt.c (build_type_conversion): Do try to convert through other
11393 pointers. This will fail if the class defines multiple pointer
11394 conversions.
11395
11396 * error.c (dump_type_prefix): Print out pointers to arrays properly.
d11ad92e 11397 (dump_type_suffix): Likewise. (was 'int *[]', now 'int (*)[]')
39211cd5
MS
11398
11399 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
11400 incomplete type.
11401
11402 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
11403 checking for shadowing a builtin. If we're redeclaring a builtin
11404 function, bash the old decl to avoid an ambiguous overload.
11405
11406 * cvt.c (convert_to_reference): Don't force arrays to decay here.
11407
11408 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
11409
11410 * decl.c (duplicate_decls): Don't assume that the decls will have
11411 types.
11412
d11ad92e 11413 Mon Apr 18 11:35:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11414
11415 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
11416 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
11417 in a global scope.
11418
d11ad92e 11419 Fri Apr 22 06:38:56 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11420
11421 * cp/typeck2.c (signature_error): Use cp_error for "%T".
11422
d11ad92e 11423 Mon Apr 18 11:59:59 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11424
11425 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
11426 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
11427 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
11428
d11ad92e 11429 Mon Apr 18 11:55:18 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11430
11431 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
11432 * cp/decl.c (duplicate_decls): Put new type in same obstack as
11433 old ones, or permanent if old ones in different obstacks.
11434
d11ad92e 11435 Mon Apr 18 11:48:49 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11436
11437 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
11438 * cp/parse.y (attrib): Handle string args as expressions,
11439 merging the two rules. `mode' attribute now takes a string arg.
11440 Delete the rule for an identifier as arg.
11441
d11ad92e 11442 Mon Apr 18 11:24:00 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11443
11444 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
11445 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
11446 (pointer_diff): Likewise the division.
11447
d11ad92e 11448 Sun Mar 6 19:43:39 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11449
11450 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
11451 * cp/decl.c (finish_decl): Issue warning for large objects,
11452 if requested.
11453
d11ad92e 11454 Sat Feb 19 22:20:32 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11455
11456 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
11457 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
11458 * cp/decl.c (duplicate_decls): Merge section name into new decl.
11459
d11ad92e 11460 Tue Feb 8 09:49:17 1994 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11461
11462 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
11463 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 11464 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
11465
11466 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
11467
11468 * cp/decl.c (finish_enum): Start from 0 when determining precision
11469 for short enums.
11470
11471 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
11472
11473 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
11474 casting $$.
11475
d11ad92e 11476 Wed Nov 17 19:22:09 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11477
11478 * cp/typeck.c (build_binary_op_nodefault): Propagate code
11479 from C front-end to optimize unsigned short division.
11480 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
11481
d11ad92e 11482 Wed Nov 17 19:17:18 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11483
11484 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
11485 constant, prefer 'const char &' to 'int'.
11486
d11ad92e 11487 Wed Feb 3 13:11:48 1993 Chip Salzenberg <chip@fin.uucp>
39211cd5
MS
11488
11489 * cp/class.c (finish_struct_methods): Handle multiple
11490 constructors in fn_fields list.
11491
d11ad92e 11492Fri Apr 22 12:48:10 1994 Kung Hsu <kung@mexican.cygnus.com>
39211cd5
MS
11493
11494 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
11495 types not to be dumped in stabs, like types in #pragma interface.
11496 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
11497 mark unknown type.
11498
d11ad92e 11499Fri Apr 22 03:27:26 1994 Doug Evans <dje@cygnus.com>
15fa00e9
DE
11500
11501 * Language directory reorganization.
11502 See parent makefile.
11503
d11ad92e 11504Thu Apr 21 18:27:57 1994 Per Bothner <bothner@kalessin.cygnus.com>
39211cd5
MS
11505
11506 * cp-tree.h (THUNK_DELTA): It is normally negative, so
11507 use signed .i variant of frame_size rather than unsigned .u.
11508 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
11509 use "VT" rather than "vt" due to binary incompatibility.
11510 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
11511 rather than sizeof, since it is now an expression.
11512 * class.c (modify_one_vtable): Modify to skip initial element
11513 containing a count of the vtable.
11514
d11ad92e 11515Thu Apr 21 00:09:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11516
11517 * lex.c (check_newline): Force interface_unknown on main input file.
11518
11519 * pt.c (do_pending_expansions): Always emit functions that have been
11520 explicitly instantiated.
11521 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
11522 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
11523 DECL_EXPLICITLY_INSTANTIATED on all my methods.
11524 * parse.y (explicit_instantiation): Call do_type_instantiation for
11525 types.
11526 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
11527 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
11528 that has been explicitly instantiated.
11529 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
11530 DECL_LANG_FLAG_4.
11531 * class.c: Move import_export_vtable to decl2.c, and comment out all
11532 uses.
11533
d11ad92e 11534Wed Apr 20 16:51:06 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11535
11536 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
d11ad92e 11537 (do_pending_inlines): Likewise.
7177d104 11538
6060a796 11539Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11540
11541 Reimplement vtable building, and most vtable pointer setting.
11542 Allows for earier maintenance, easier understandability, and most
11543 importantly, correct semantics.
11544
11545 * class.c (build_vtable): Removed unneeded
11546 SET_BINFO_VTABLE_PATH_MARKED.
d11ad92e 11547 * class.c (prepare_fresh_vtable): Likewise. Added argument.
7177d104
MS
11548 * class.c (modify_vtable_entry): General cleanup.
11549 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
11550 modify_vtable_entries): Removed.
11551 * class.c (add_virtual_function): General cleanup.
11552 * class.c (finish_base_struct): Setup BINFO_VTABLE and
11553 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
11554 work.
11555 * class.c (finish_vtbls): New routine, mostly from
11556 unmark_finished_struct.
11557 * class.c (overrides): New routine.
11558 * class.c (modify_one_vtable): New routine, mostly from
11559 modify_other_vtable_entries and modify_vtable_entries.
11560 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
11561 modify_all_vtables): New routines.
11562 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
11563 call. General cleanup on how pending_hard_virtuals are handled.
11564 General cleanup on modifying vtables. Use finish_vtbls, instead of
11565 unmark_finished_struct.
11566 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
11567 get_first_matching_virtual, get_matching_virtual,
11568 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
11569 * cvt.c (convert_pointer_to_real): cleanup error message.
11570 * decl.c (grokfndecl): General cleanup.
11571 * decl.c (finish_function): Change init_vtbl_ptrs call to
11572 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
11573 expand_indirect_vtbls_init.
11574 * init.c (expand_virtual_init): Remove unneeded argument.
11575 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
11576 two arguments to make more general. Made more general. Now can be
11577 used for vtable pointer initialization from virtual bases.
11578 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
11579 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
11580 expand_direct_vtbls_init.
11581 * init.c (expand_virtual_init): General cleanup.
11582 * init.c (expand_default_init): Change expand_vbase_vtables_init
11583 call to expand_indirect_vtbls_init.
11584 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
11585 call to expand_indirect_vtbls_init.
11586 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
11587 call to expand_indirect_vtbls_init.
11588 * search.c (get_first_matching_virtual): Rename to
11589 get_matching_virtual. General cleanup and remove setting of
11590 DECL_CONTEXT. That is now done in a cleaner way in
11591 modify_vtable_entry and add_virtual_function.
11592 * search.c (expand_vbase_vtables_init): Rename to
11593 expand_indirect_vtbls_init. General cleanup. Use
11594 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
11595 pointers from virtual bases are set up.
11596 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
11597 Removed.
11598
11599 * *.[chy]: Remove support for VTABLE_USES_MASK.
11600
d11ad92e 11601Tue Apr 19 12:51:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11602
11603 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
11604 reference and pointer types instead of bashing the types directly.
11605
11606 * call.c (build_overload_call_real): Use the TREE_CODE to determine
11607 whether the function is overloaded or not, rather than
11608 TREE_OVERLOADED.
11609 * *: Remove all uses of TREE_OVERLOADED.
11610
11611 * decl.c (grokdeclarator): Only complain about initializing const
11612 fields when -ansi or -pedantic.
11613
d11ad92e 11614Tue Apr 19 12:42:42 1994 Doug Evans <dje@canuck.cygnus.com>
7177d104
MS
11615
11616 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
11617
d11ad92e 11618Mon Apr 18 00:17:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11619
11620 Do overloading on a block-by-block basis, not function-by-function.
11621 * decl.c: Lose overloads_to_forget.
11622 (struct binding_level): Add overloads_shadowed field.
11623 (poplevel): Restore overloads_shadowed.
11624 (push_overloaded_decl): Use overloads_shadowed instead of
11625 overloads_to_forget.
11626 (finish_function): Don't look at overloads_to_forget.
11627
11628 Copy enum_overflow logic from c-decl.c.
11629 * decl.c (start_enum): Initialize enum_overflow.
11630 (build_enumerator): Use enum_overflow. Also use current_scope().
11631
11632 * search.c (current_scope): Move Brendan's comment from
11633 build_enumerator here.
11634
11635 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
11636 discarding const/volatile.
11637
d11ad92e 11638Sat Apr 16 01:18:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11639
11640 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
d11ad92e 11641 (comp_target_types): Likewise.
7177d104
MS
11642
11643 * decl.c (lookup_name): Don't unset got_scope here.
11644
11645 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
11646 got_scope != NULL_TREE.
11647
d11ad92e 11648Fri Apr 15 16:36:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11649
11650 Horrible kludge to prevent templates from being instantiated by
11651 their base classes.
11652 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
11653 before we get to left_curly.
11654 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
11655
11656 * error.c (dump_decl): If it's a typedef, print out the name of the
11657 decl, not just the underlying type.
11658
11659 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
11660 update the IDENTIFIER_TYPE_VALUE of its name.
11661
11662 * decl2.c (finish_file): When processing the initializer for a
11663 static member, pretend that the dummy function is a member of the
11664 same class.
11665
d11ad92e 11666Fri Apr 15 15:56:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104 11667
63718c49
GB
11668 * class.c (build_vtable_entry): revert Apr 4 change.
11669 * decl2.c (mark_vtable_entries): replace pure virtual function
11670 decl with abort's.
7177d104 11671
d11ad92e 11672Fri Apr 15 13:49:33 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11673
11674 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
11675 mismatch, and don't pedwarn on 0/function pointer mismatch.
11676
11677 * typeck2.c (digest_init): Lose code for special handling of unions.
11678 (process_init_constructor): Since they're handled just fine here.
11679 Pedwarn on excess elements.
11680
11681 * decl2.c (grokfield): Complain about local class method declaration
11682 without definition.
11683
d11ad92e 11684Fri Apr 15 13:19:40 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11685
11686 * method.c (emit_thunk): Add extern declaration for
11687 current_call_is_indirect (needed for hppa).
11688
d11ad92e 11689Thu Apr 14 16:12:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11690
11691 Improve local class support; allow classes in different blocks to
11692 have the same name.
11693 * decl.c (pushtag): Support local classes better.
11694 (pushdecl_nonclass_level): New function for pushing mangled decls of
11695 nested types into the appropriate scope.
11696 (xref_defn_tag): Use pushdecl_nonclass_level instead of
11697 pushdecl_top_level.
11698 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
11699 class methods.
d11ad92e 11700 * method.c (do_inline_function_hair): Likewise.
7177d104
MS
11701
11702 * class.c (finish_struct): It is legal for a class with no
11703 constructors to have nonstatic const and reference members.
11704
d11ad92e 11705Thu Apr 14 07:15:11 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
11706
11707 * decl.c (push_overloaded_decl): Avoid giving errors about
11708 built-ins, since duplicate_decls will have given warnings/errors
11709 for them.
11710
d11ad92e 11711Thu Apr 14 03:45:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11712
11713 * cvt.c (convert_to_reference): Warn about casting pointer type to
11714 reference type when this is probably not what they wanted.
11715
d11ad92e 11716Wed Apr 13 13:12:35 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11717
11718 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
11719 static consts any more (toplev.c has now been modified to
11720 not emit warnings if they are unused).
11721
d11ad92e 11722Wed Apr 13 00:22:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11723
11724 * decl.c (grok_op_properties): If op new/delete get here with
11725 METHOD_TYPEs, do a revert_static_member_fn.
11726
11727 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
11728 * init.c (is_aggr_typedef): Don't look at
11729 IDENTIFIER_CLASS_TYPE_VALUE.
d11ad92e
MS
11730 (get_aggr_from_typedef): Likewise.
11731 (get_type_value): Likewise.
7177d104
MS
11732 * call.c (build_scoped_method_call): Don't rely on overloaded
11733 template names having IDENTIFIER_CLASS_VALUE set.
11734
11735 * parse.y (component_decl_1, fn.def2): Revert rules for
11736 constructors.
11737 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
11738 clobbered.
11739
11740 * decl.c (start_function): Only warn about `void main()' if pedantic
11741 || warn_return_type.
11742
d11ad92e 11743Tue Apr 12 02:14:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11744
11745 Clean up overloading of the template name.
11746 * class.c (pushclass): overload the template name whenever pushing
11747 into the scope of a template class, not just if it is
11748 uninstantiated.
11749 (popclass): Correspondingly.
11750 * search.c (push_class_decls): Don't overload_template_name.
11751 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
11752 DECL_CONTEXT on things.
11753 * parse.y (left_curly): Don't overload_template_name.
11754 * class.c (finish_struct): Don't undo_template_name_overload.
11755
11756 * method.c (build_opfncall): Only pass one argument to global op
11757 delete.
11758
11759 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
11760 decide how many arguments to use for vec delete.
11761
11762 * decl.c (grok_op_properties): Be consistent in modifying
11763 current_class_type.
11764 (grokdeclarator): Only complain about function decls with no return
11765 type if we're being pedantic.
11766
d11ad92e 11767Mon Apr 11 00:10:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11768
11769 Add support for operator new [] and operator delete [].
11770
11771 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
11772 * ptree.c (print_lang_type): Indicate vec new/delete.
11773 * parse.y: Support vec new/delete.
11774 * method.c (build_decl_overload): Deal with vec new/delete.
d11ad92e 11775 (build_opfncall): Likewise.
7177d104
MS
11776 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
11777 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
11778 * init.c (init_init_processing): Set up BIVN and BIVD.
11779 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
11780 since it doesn't happen any more.
11781 (build_new): Support vec new. Always call something.
11782 (build_x_delete): Support vec delete.
11783 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
11784 and pass it to build_x_delete.
11785 * decl2.c (delete_sanity): Don't change behavior by whether or not
11786 the type has a destructor. Pass use_global_delete to
11787 build_vec_delete.
11788 (coerce_delete_type): Make sure that the type returned has a first
11789 argument of ptr_type_node.
11790 * decl.c (init_decl_processing): Also declare the global vec
11791 new/delete.
11792 (grokdeclarator): Also force vec new/delete to be static.
11793 (grok_op_properties): Note presence of vec new/delete, and play with
11794 their args. If vec delete takes the optional size_t argument, set
11795 TYPE_VEC_DELETE_TAKES_SIZE.
11796 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
11797 checking for one delete or the other.
11798 (lang_type): gets_new and gets_delete are now two bits long. The
11799 low bit is for the non-array version. Lose gets_placed_new.
11800 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
11801 delete defined by this class wants to know how much space it is
11802 deleting.
11803 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
11804 add a header containing the number of elements in the vector; i.e.
11805 when the elements need to be destroyed or vec delete wants to know
11806 the size.
11807 * class.c (finish_struct_methods): Also check for overloading vec
11808 delete.
11809 * call.c (build_method_call): Also delete second argument for vec
11810 delete.
11811
11812 * decl.c (grokdeclarator): Correct complaints again.
11813 (grokdeclarator): Fix segfault on null declarator.
11814 (decls_match): Also accept redeclaration with no arguments if both
11815 declarations were in C context. Bash TREE_TYPE (newdecl) here.
11816 (duplicate_decls): Instead of here.
11817
11818 * parse.y (nested_name_specifier_1): Lose rules for dealing with
11819 syntax errors nicely, since they break parsing of 'const i;'.
11820
11821 * decl.c (lookup_name): if (got_scope == current_class_type)
11822 val = IDENTIFIER_CLASS_VALUE (name).
11823
11824 * search.c (lookup_nested_tag): Look in enclosing classes, too.
11825
11826 * spew.c (yylex): Only look one character ahead when checking for a
11827 SCOPE.
11828
11829 * lex.c (check_newline): Read first nonwhite char before
11830 incrementing lineno.
11831
11832 * decl.c (grokdeclarator): Don't claim that typedefs are variables
11833 in warning.
11834
11835 * parse.y: Divide up uses of unqualified_id into
11836 notype_unqualified_id and unqualified_id, so that TYPENAME can be
11837 used as an identifier after an object.
11838
11839 * class.c (push_nested_class): Don't push into non-class scope.
11840
11841 * decl.c (grokdeclarator): If an identifier could be a type
11842 conversion operator, but has no associated type, it's not a type
11843 conversion operator.
11844
11845 * pt.c (unify): Check for equality of constants better.
11846
11847 * decl.c (grokdeclarator): Don't complain about access decls.
11848
d11ad92e 11849Sun Apr 10 02:39:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11850
11851 * decl.c (grokdeclarator): pedwarn about data definitions without
11852 types here.
11853
11854 * parse.y (datadef): Don't pedwarn about decls without types here,
11855 since that is valid for functions.
11856 (fn.def2, component_decl): Support constructors with declmods again.
11857 (nomods_initdecls): For decls without any mods, so that we don't try
11858 to get declspecs from some arbitrary $0.
11859
11860 * search.c (lookup_field): Use cp_error.
11861
11862 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
11863 here; it breaks destructors for non-aggr types.
11864
11865 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
11866 a type being defined, like the comment says.
11867 If got_scope is not an aggregate, just return NULL_TREE.
11868
11869 * pt.c (create_nested_upt): Kung's code for creating types nested
11870 within uninstantiated templates now lives here (it used to live in
11871 hack_more_ids). It needs to be expanded.
11872
11873 * parse.y: Stop calling see_typename so much.
11874
11875 * decl.c (lookup_name): Deal with TTPs and UPTs.
11876
11877 * lex.c (real_yylex): Don't set looking_for_typename just because we
11878 saw a 'new'.
11879 (dont_see_typename): #if 0 out.
11880
11881 * spew.c (yylex): Increment looking_for_typename if the next
11882 character is SCOPE, rather than setting it to 1; this way, the value
11883 from seeing an aggr specifier will not be lost. This kinda relies
11884 on looking_for_typename never being < 0, which is now true.
11885
11886 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
11887 too.
11888 (named_class_head_sans_basetype): Accept template types, too. Oops.
11889
d11ad92e 11890Fri Apr 8 16:39:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11891
11892 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
11893
11894 * parse.y: Lose START_DECLARATOR.
11895
11896 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
11897 for a class.
11898
11899 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
11900 A::foo' syntax. Catch invalid scopes better.
11901
11902 * parse.y, lex.c: lose TYPENAME_COLON.
11903
11904 * decl2.c (groktypefield): #if 0 out.
11905
11906 * decl.c (lookup_name): If the type denoted by got_scope is
11907 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
11908
11909 * class.c (push_nested_class): Don't try to push into
11910 error_mark_node.
11911
d11ad92e 11912Fri Apr 8 07:26:36 1994 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
11913
11914 * Makefile.in (stamp-parse): Update count of conflicts to 33.
11915
d11ad92e 11916Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11917
11918 A saner implementation of nested types that treats template types
11919 no differently from non-template types. There are still some
11920 shortcomings of our system; most notably, it is difficult to look
11921 for a nested type that is hidden by another name, because of the way
11922 we keep track of hidden types. But this shouldn't be a problem for
11923 just about anyone. Perhaps lookup_field should be fixed up a bit.
11924
11925 * spew.c: Moved handling of nested types/scoping from the lexer
11926 into the parser. Removed variable template_type_seen_before_scope.
11927 Removed functions frob_identifier, hack_more_ids, and various cruft
11928 that was #if 0'd out in the past, reducing the size of the file from
11929 1146 lines to 450 lines. We can't quite do away with spew.c yet,
11930 though; we still need it for do_aggr () and checking for SCOPE after
11931 the current identifier. And setting lastiddecl.
11932
11933 * parse.y: Moved handling of nested types/scoping from the lexer
11934 into the parser, using a new global variable `got_scope'. Reduced
11935 the number of states by 53. Implemented all uses of explicit global
11936 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
11937 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
11938 scoped_typename. Added nonterminals nested_type,
11939 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
11940 nested_name_specifier, global_scope, overqualified_id, type_name.
11941 Changed many others. Added 9 new reduce/reduce conflicts, which are
11942 nested type parallels of 9 that were already in the grammar for
11943 non-nested types. Eight of the now 33 conflicts should be removed
11944 in the process of resolving the late binding between variable and
11945 function decls.
11946
11947 * gxxint.texi (Parser): Update.
11948
11949 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
11950
11951 * lex.h: Add decl for got_scope.
11952
11953 * lex.c (see_typename): Claim to be the lexer when calling
11954 lookup_name.
11955
11956 * decl.c (lookup_name): When called from the lexer, look at
11957 got_scope and looking_at_typename; otherwise don't.
11958
6060a796 11959Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11960
11961 31th Cygnus<->FSF merge.
11962
d11ad92e 11963Thu Apr 7 17:47:53 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11964
11965 * decl2.c (mark_vtable_entries): Call this to mark all the
11966 entries in the vtable addressable.
11967 (finish_decl_parsing): Handle SCOPE_REFs.
11968
11969 * decl.c (decls_match): Always call compparms with strict == 1.
11970 Handle the special case of C function redecl here.
11971 (duplicate_decls): Only keep the old type if the new decl takes no
11972 arguments.
11973
11974 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
11975
6060a796 11976Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
11977
11978 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
11979 17:48:41.
11980
d11ad92e 11981Wed Apr 6 16:05:10 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
11982
11983 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
11984 ch-tree.h: Every place these functions were called, the result was
11985 immediately passed to expand_expr_stmt. Reduce redundancy by
11986 calling expand_expr_init *inside* these functions. These
11987 makes for a simpler interface, and we don't have to build
11988 compound expressions. Hence, rename these function to:
11989 expand_virtual_init and expand_vbase_vtables_init respectively.
11990 * init.c, decl.c: Change callers of these functions.
11991 * init.c, cp-tree.h (expand_virtual_init): Make static.
11992
11993 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
11994 rather than DECL_SAVED_INSNS before emitting inlines.
11995
d11ad92e 11996Wed Apr 6 13:06:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
11997
11998 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
11999
12000 * decl.c (duplicate_decls): If this is a new declaration of an
12001 extern "C" function, keep the type (for the argtypes).
12002 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
12003 (decls_match): Call compparms with a value of strict dependent on
12004 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
12005
12006 * typeck.c (compparms): ... is only equivalent to non-promoting
12007 parms if we're not being strict.
12008
12009 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
12010
12011 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
12012 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
12013
12014 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
12015 virtuals.
12016
d11ad92e 12017Tue Apr 5 17:48:41 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12018
12019 Support for implementing vtables with thunks.
12020 * tree.def (THUNK_DECL): New TREE_CODE.
12021 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
12022 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
12023 * cp-tree.h (memptr_type): New variable.
12024 * class.c (build_vtable_entry): Build thunk if necessary.
12025 * class.c (build_vfn_ref): If using thunks, don't need
12026 to add delta field from vtable (there is none!).
12027 * decl.c: Add memptr_type as well as vtable_entry_type.
12028 If using thunks, the latter is just ptr_type_node.
12029 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
12030 * decl2.c (finish_vtable_vardecl): Handle thunks.
12031 * expr.c (cplus_expand_expr): Support THUNK_DECL.
12032
12033 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
12034 * decl.c (start_function): Set current_extern_inline based on
12035 DECL_THIS_EXTERN, not TREE_PUBLIC.
12036 * decl.c (finish_function): Call mark_inline_for_output if needed,
12037
12038 Improve intelligence about when to emit inlines.
12039 * cp-tree.h (lang_decl_flags): New field saved_inline.
12040 * cp-tree.h (DECL_SAVED_INLINE): New macro.
12041 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
12042 * decl.h, decl.c (pending_addressable_inlines): Removed.
12043 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
12044 * decl2.c (mark_inline_for_output): Do nothing if
12045 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
12046 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
12047 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
12048 * decl2.c (finish_file): Writing out inlines later, so we can
12049 also handle the ones needed for vtbales.
12050 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
12051
12052 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
12053 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
12054 instead. (The rationale is that these optimizations both break binary
12055 compatibility, but should become the default in a future release.)
12056
6060a796 12057Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12058
12059 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
12060 of a fndecl, as we might not be from that vfield.
12061
d11ad92e 12062Tue Apr 5 17:43:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12063
12064 * class.c (add_virtual_function): fix bug for pure virtual, so
12065 that DECL_VINDEX of the dummy decl copied won't be error.
12066 (see also Apr 4 change)
12067
d11ad92e 12068Tue Apr 5 17:23:45 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12069
12070 * typeck.c (c_expand_return): Before checking that we're not
12071 returning the address of a local, make sure it's a VAR_DECL.
12072 (And don't worry about it being a TREE_LIST.)
12073
d11ad92e 12074Tue Apr 5 13:26:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12075
12076 * parse.y (YYDEBUG): Always define.
d11ad92e 12077 * lex.c (YYDEBUG): Likewise.
7177d104 12078
d11ad92e 12079Mon Apr 4 11:28:17 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12080
12081 * class.c (finish_struct): backup out the change below, put the
12082 new change for the same purpose. The change below breaks code.
12083
12084 * class.c (finish_struct): if pure virtual, copy node and make
12085 RTL point to abort, then put in virtual table.
12086 * decl2.c (grok_function_iit): reinstate Mar 31 change.
12087
d11ad92e 12088Sat Apr 2 03:12:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12089
12090 * init.c (build_new): pedwarn about newing const and volatile
12091 types.
12092
12093 * tree.c (get_identifier_list): Only do the special handling
12094 thing if we're dealing with the main variant of the record type.
12095
12096 * cvt.c (convert_to_reference): When converting between
12097 compatible reference types, use the pointer conversion machinery.
12098 Don't just blindly overwrite the old type.
12099
d11ad92e 12100Fri Apr 1 17:14:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12101
12102 * call.c (build_method_call): When looking at global functions,
12103 be sure to use instance_ptr for the first argument, not some version
12104 of it that has been cast to a base class. Also do this before
12105 comparing candidates.
12106
d11ad92e 12107Thu Mar 31 19:50:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12108
12109 * call.c (build_method_call): Constructors can be called for
12110 const objects.
12111
d11ad92e 12112Thu Mar 31 16:20:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12113
12114 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
12115 fucntions. They can be defined somewhere else.
12116
12117Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12118
12119 * decl.c (init_decl_processing): Declare __builtin_return_address
12120 and __builtin_frame_address for C++ as well.
12121
6060a796 12122Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12123
12124 * typeck2.c (store_init_value): Integral constant variables are
12125 always constant, even when doing -fpic.
12126
12127Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
12128
12129 * decl.c (redeclaration_error_message): Pass the types to
12130 comptypes.
12131
6060a796 12132Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12133
12134 Cures incorrect errors about pure virtuals in a class, when they
12135 have been overridden in a derived class.
12136
12137 * search.c (get_abstract_virtuals): Reimplement.
12138 * search.c (get_abstract_virtuals_1): New routine.
12139
d11ad92e 12140Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12141
12142 * pt.c (push_template_decls): Make the pushed level pseudo
12143 global.
12144
12145 * parse.y (extdefs): Don't pop everything if the current binding
12146 level is pseudo_global.
12147
12148 * decl.c (pop_everything): Stop on reaching a pseudo-global
12149 binding level.
12150
12151 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
12152
12153 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
12154 the old decl actually had an initializer.
12155
12156 * {various}: Clean up gcc -W complaints.
12157
12158 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
12159 (DECL_CONTEXT (NODE) != NULL_TREE).
12160
12161 * parse.y (lang_extdef): Call pop_everything if necessary.
12162
12163 * decl.c (pop_everything): New function for popping binding
12164 levels left over after a syntax error.
12165 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
12166 a function is a member.
12167
6060a796 12168Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12169
12170 Cures calling a more base base class function, when a more derived
12171 base class member should be called in some MI situations.
12172
12173 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
12174 binfos from the binfo given as the second argument to make_binfo,
12175 instead of the unspecialized ones from the TYPE_BINFO.
d11ad92e
MS
12176 * class.c (finish_base_struct): Likewise, update callers.
12177 * search.c (dfs_get_vbase_types): Likewise.
12178 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Likewise.
7177d104 12179 * decl.c (xref_tag): Use NULL_TREE instead of 0.
d11ad92e 12180 * lex.c (make_lang_type): Likewise.
7177d104 12181
d11ad92e 12182Wed Mar 30 14:10:04 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12183
12184 * decl.c (pushdecl): If pushing a C-linkage function, only do a
12185 push_overloaded_decl.
12186 (duplicate_decls): Standard overloading does not shadow built-ins.
12187
d11ad92e 12188Tue Mar 29 00:54:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12189
12190 * pt.c (end_template_decl): Don't call push_overloaded_decl.
12191
12192 * init.c (do_friend): Don't call push_overloaded_decl.
12193
12194 * decl.c (pushdecl): Call push_overloaded_decl for functions and
12195 function templates.
12196 (duplicate_decls): functions and function templates are not
12197 duplicates, but don't complain about calling this function to
12198 compare them.
12199 (push_overloaded_decl): Don't deal with linkage. Call
12200 duplicate_decls.
12201 (redeclaration_error_message): Deal with linkage.
12202
12203 * decl.c (start_function): If push_overloaded_decl returns an
12204 older version of the function, deal with it.
12205
12206 * decl.c (start_function): Be sure only to push_overloaded_decl
12207 for non-members.
12208
12209 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
12210 methods.
12211 (start_function): Lose broken and redundant code for checking old
12212 decl.
12213
12214 * init.c (add_friend): Give line numbers of both friend decls
12215 when warning about re-friending.
12216
12217 * pt.c (tsubst): Use comptypes rather than == to compare the
12218 types of the method as declared and as defined, since default
12219 parameters may be different.
12220
12221 * call.c (build_method_call): Use brendan's candidate printing
12222 routine.
12223
12224 * decl.c (start_method): Methods defined in the class body are
12225 inline whether or not it's a template class.
12226
d11ad92e 12227Mon Mar 28 16:39:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12228
12229 * parse.y (initdcl0): Add "extern" to current_declspecs if
12230 have_extern_spec && ! used_extern_spcec.
12231
12232 * tree.c (really_overloaded_fn): A fn with more than one
12233 overload.
12234
12235 * pt.c (end_template_decl): Use really_overloaded_fn.
12236
12237 * decl.c (duplicate_decls): When smashing a decl into a previous
12238 definition, keep the old file and line.
12239 Don't deal with overloaded functions.
12240 Lose old code for checking arg types of functions.
12241 Check for overloaded C functions.
12242 (pushdecl): Deal with overloaded functions.
12243 (start_decl): Expect pushdecl to return an appropriate function decl.
d11ad92e 12244 (start_function): Likewise.
7177d104
MS
12245 (push_overloaded_decl): Don't check for overloaded C functions.
12246
12247 * *.c: Stop using DECL_OVERLOADED, it being archaic.
12248 TREE_OVERLOADED should probably go, too.
12249
d11ad92e 12250Mon Mar 28 14:00:45 1994 Ron Guilmette <rfg@netcom.com>
7177d104
MS
12251
12252 * typeck.c (comp_target_types): Call comp_target_parms with
12253 strict == 1.
12254
d11ad92e 12255Sun Mar 27 00:07:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12256
12257 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
12258 sections if we're compiling with -ansi or -pedantic.
12259
12260 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
12261
12262 * decl2.c (grokfield): Don't pedwarn twice about initializing
12263 field.
12264
12265 * decl.c (push_overloaded_decl): Warn about shadowing
12266 constructor.
12267 (redeclaration_error_message): Don't allow 'int a; int a;'
12268
12269 * cvt.c (build_up_reference): Only check for valid upcast if
12270 LOOKUP_PROTECT is set, not just any flag.
12271
d11ad92e 12272Fri Mar 25 01:22:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12273
12274 * lex.c (check_newline): When we see a #pragma implementation,
12275 also set it for the main input file.
12276
12277 * init.c (build_new): Convert array size argument to size_t.
12278
12279 * parse.y (primary): If we're doing a parenthesized type-id, call
12280 groktypename before passing it to build_new.
12281
12282 * call.c (build_method_call): Deal properly with const and
12283 volatile for instances of reference type.
12284
12285 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
12286 (pedantic) pedwarn'.
12287
12288 * decl.c (grokdeclarator): Don't complain about putting `static'
12289 and `inline' on template function decls.
12290
d11ad92e 12291Thu Mar 24 23:18:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12292
12293 * call.c (build_method_call): Preserve const & volatile on
12294 `this'.
12295
6060a796 12296Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12297
12298 * init.c (build_new, build_vec_delete): Use global new and delete
12299 for arrays.
d11ad92e 12300 * decl2.c (delete_sanity): Likewise.
7177d104 12301
d11ad92e 12302Thu Mar 24 02:10:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12303
12304 * cvt.c (convert_to_reference): If i is an lvalue,
12305 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
12306 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
12307
d11ad92e 12308Wed Mar 23 17:45:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12309
12310 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
12311 and DECL_TEMPLATE_INSTANTIATIONS.
12312
12313 * init.c (build_new): Handle array typedefs properly.
12314
6060a796 12315Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12316
12317 30th Cygnus<->FSF merge.
12318
6060a796 12319Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12320
12321 * class.c (modify_vtable_entries): Avoid running off the end of the
12322 virtuals list when processing a virtual destructor.
d11ad92e 12323 * class.c (get_vtable_entry): Likewise.
7177d104 12324
d11ad92e 12325Wed Mar 23 00:23:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12326
12327 * decl.c (duplicate_decls): If two template decls don't match,
12328 just return 0.
12329
d11ad92e 12330Tue Mar 22 23:49:41 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12331
12332 * typeck.c (convert_for_assignment): Don't pedwarn about
12333 converting function pointer to void *.
12334
6060a796 12335Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12336
12337 Major revamp of pointer to member functions. Cures major
12338 nonfunctionality when used in casts, and MI situations.
12339
12340 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
d11ad92e
MS
12341 * typeck.c (convert_for_assignment): Likewise.
12342 * typeck2.c (digest_init): Likewise.
7177d104
MS
12343 * typeck2.c (process_init_constructor): Simplify by moving code into
12344 digest_init.
12345 * typeck2.c (digest_init): Do default_conversions on init value, if
12346 we are processing pointer to member functions.
12347 * class.c (get_vfield_offset): Now non-static. Convert bit offset
12348 into byte offset.
d11ad92e 12349 * cp-tree.h (get_vfield_offset): Likewise.
7177d104
MS
12350 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
12351 instance, before fetching vtable pointer.
12352 * typeck.c (get_delta_difference): New routine.
12353 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
12354 get vtable pointer out of right subobject.
12355
6060a796 12356Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12357
12358 * search.c (get_binfo): Return NULL instead of aborting, when
12359 passed a UNION_TYPE.
12360
d11ad92e 12361Tue Mar 22 12:44:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12362
12363 These patches implement handling of redefinition/redeclaration of
12364 templates.
12365
12366 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
12367 considered compatible.
12368
12369 * parse.y (template_def): Pass defn argument to end_template_decl.
12370
12371 * pt.c (end_template_decl): Add defn argument. Check for
12372 redefinition. Simplify.
12373
12374 * error.c (OB_UNPUT): New macro, to remove mistakes.
12375 (aggr_variety): Subroutine of dump_aggr_type.
12376
12377 * decl.c (decls_match): Support templates.
12378 (duplicate_decls): No longer static. Don't try to lay out template
12379 decls.
12380 (pushdecl): Simplify.
12381
12382 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
12383 DECL_INITIAL.
12384
d11ad92e 12385Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12386
12387 * error.c (dump_decl): Support class template decls.
12388 (dump_type): Don't adorn template type parms.
12389
12390 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
12391 if it was a definition.
12392 (redeclaration_error_message): Do the cp_error thang, and reject
12393 redefinition of templates.
12394
d11ad92e 12395Mon Mar 21 19:36:06 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12396
12397 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
12398 in FIELD context, when appropriate. Also,
12399 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
12400 Also, simplify check for bogus return specifiers.
12401
d11ad92e 12402Mon Mar 21 11:46:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12403
12404 * parse.y (after_type_declarator1): Expand type_quals.
d11ad92e
MS
12405 (notype_declarator1): Likewise.
12406 (absdcl1): Likewise.
7177d104 12407
d11ad92e 12408Sat Mar 19 01:05:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12409
12410 * decl.c (grokdeclarator): Treat class-local typedefs like static
12411 members; i.e. 'typedef int f();' means that f is a function type,
12412 not a method type.
12413
12414 * parse.y (decl): Change direct_* back to *.
12415 (type_id): Change direct_abstract_declarator to absdcl.
12416 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
12417
d11ad92e 12418Fri Mar 18 12:47:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12419
12420 These two patches fix crashes on instantiating a template inside a
12421 function with C linkage or containing labels.
12422
12423 * class.c (current_lang_stacksize): No longer static.
12424
12425 * decl.c (struct saved_scope): Add lang_base, lang_stack,
12426 lang_name, lang_stacksize, and named_labels.
12427 (push_to_top_level): Save them.
12428 (pop_from_top_level): Restore them.
12429
12430 * gxxint.texi (Parser): Update.
12431
12432 These two patches finish moving the task of expr/declarator
12433 ambiguity resolution from the lexer to the parser, and add one more
12434 r/r conflict. START_DECLARATOR can now be nuked.
12435
12436 * parse.y (decl): Add "direct_" in typespec X rules.
12437 (direct_declarator): New nonterminal for
12438 direct_after_type_declarator and direct_notype_declarator.
12439 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
12440 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
12441 (named_parm): Add typespec direct_declarator rule.
12442
12443 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
12444
12445 These two patches disable some excessive cleverness on the part of
12446 g++; a non-class declaration always hides a class declaration in the
12447 same scope, and g++ was trying to unhide it depending on the
12448 enclosing expression.
12449
12450 * spew.c (arbitrate_lookup): #if 0 out.
12451
12452 * decl.c (lookup_name): Never call arbitrate_lookup.
12453
12454 * parse.y (complex_notype_declarator1): Add '*'
12455 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
12456
12457 * parse.y (complex_direct_notype_declarator): Restore id_scope
12458 see_typename TYPENAME rule, remove all other rules beginning with
12459 those tokens.
12460 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
12461
d11ad92e 12462Thu Mar 17 17:30:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12463
12464 These changes fix the compiler's handling of the functional cast/
12465 object declaration ambiguities in section 6.8 of the ARM. They also
12466 add 11 reduce/reduce conflicts. Sigh.
12467
12468 * parse.y: Add precedence decls for OPERATOR and '~'.
12469 (notype_unqualified_id): New nonterminal, encompasses all of the
12470 ANSI unqualified-id nonterminal except TYPENAMEs.
12471 (expr_or_declarator): New nonterminal to delay parsing of code like
12472 `int (*a)'.
12473 (primary): Use notype_unqualified_id.
12474 (decl): Add typespec initdecls ';' and typespec declarator ';'
12475 rules.
12476 (initdcl0): Deal with the above.
12477 (complex_notype_declarator1): A notype_declarator that is not also
12478 an expr_or_declarator.
12479 (complex_direct_notype_declarator): A direct_notype_declarator that
12480 doesn't conflict with expr_or_declarator. Use
12481 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
12482 (functional_cast): New nonterminal, for the three functional cast
12483 rules. So that they can be moved after
12484 complex_direct_notype_declarator.
12485 (see_typename): Don't accept type_quals any more.
12486
12487 * decl2.c (reparse_decl_as_expr): New function to deal with parse
12488 nodes for code like `int (*a)++;'.
12489 (reparse_decl_as_expr1): Recursive subroutine of the above.
12490 (finish_decl_parsing): New function to deal with parse nodes for
12491 code like `int (*a);'. See the difference?
12492
6060a796 12493Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12494
12495 These changes break binary compatibility in code with classes
12496 that use virtual bases.
12497
12498 * search.c (dfs_get_vbase_types): Simplify and correct to make
12499 sure virtual bases are initialized in dfs ordering.
12500 * search.c (get_vbase_types): Simplify and make readable.
12501
d11ad92e 12502Thu Mar 17 12:01:10 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12503
12504 * parse.y: s/ typename / type_id /g
12505
d11ad92e 12506Wed Mar 16 17:42:52 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12507
12508 * parse.y (typespec): add SCOPE TYPENAME for global scoped
12509 type. e.g. ::B x.
12510
12511 * decl.c (complete_array_type): fix a bug that in -pendantic
12512 mode even there's no initializer, it will continue to build
12513 default index.
12514
d11ad92e 12515Wed Mar 16 17:43:07 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12516
12517 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
12518 all of the scoped PTYPENAME rules.
12519
6060a796 12520Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12521
12522 * init.c (build_offset_ref): The value of A::typedef_name is
12523 always the TYPE_DECL, and never an error.
12524
d11ad92e 12525Tue Mar 15 20:02:35 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12526
12527 * search.c (get_base_distance_recursive): Two binfos can only
12528 represent the same object if they are both via_virtual.
12529
12530 * class.c (finish_base_struct): Check vbases for ambiguity, too.
12531
12532 * search.c (get_vbase_types): Accept binfo argument, too.
12533
d11ad92e 12534Tue Mar 15 19:22:05 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12535
12536 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
12537 initializer also, because back-end requires it.
12538
d11ad92e 12539Tue Mar 15 15:33:31 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12540
12541 * error.c (dump_expr): Support member functions (which show up as
12542 OFFSET_REFs).
12543
6060a796 12544Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12545
12546 * init.c (build_new): Set the return type of multidimensional
12547 news correctly.
12548
d11ad92e 12549Fri Mar 11 15:35:39 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12550
12551 * call.c (build_method_call): if basetype not equal to type
12552 of the instance, use the type of the instance in building
12553 destructor.
12554
d11ad92e 12555Thu Mar 10 17:07:10 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
12556
12557 * parse.y (direct_notype_declarator): add push_nested_type for
12558 'template_type SCOPED_NAME' rule.
12559
d11ad92e 12560Tue Mar 8 00:19:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12561
12562 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
12563
d11ad92e 12564Sat Mar 5 04:47:48 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12565
12566 * parse.y (regcast_or_absdcl): New nonterminal to implement late
12567 reduction of constructs like `int ((int)(int)(int))'.
12568 (cast_expr): Use it.
12569 (sub_cast_expr): Everything that can come after a cast.
12570 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
12571 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
12572 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
12573 '(' complex_parmlist ')' and regcast_or_absdcl.
12574 (parmlist): Split
12575 (complex_parmlist): Parmlists that are not also typenames.
12576 (parms_comma): Enabler.
12577 (named_parm): A parm that is not also a typename. Use declarator
12578 rather than dont_see_typename abs_or_notype_decl. Expand
12579 typed_declspecs inline.
12580 (abs_or_notype_decl): Lose.
12581 (dont_see_typename): Comment out.
12582 (bad_parm): Break out abs_or_notype_decl into two rules.
12583
d11ad92e 12584Fri Mar 4 18:22:39 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12585
12586 * decl2.c (reparse_decl_as_casts): New function to change parse
12587 nodes for `(int)(int)(int)' from "function taking int and returning
12588 function taking int and returning function taking int" to "... cast
12589 to int, cast to int, cast to int".
12590
12591 * decl2.c (reparse_decl_as_expr): Recursive function to change
12592 parse nodes for `A()()' from "function returning function returning
12593 A" to "A().operator()".
12594
12595 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
12596 `typespec fcast_or_absdcl' rule.
12597 (fcast_or_absdcl): New nonterminal to implement late reduction of
12598 constructs like `A()()()()'.
12599 (typename): Replace `typespec absdcl1' rule with
12600 `typespec direct_abstract_declarator' rule.
12601 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
12602 with `fcast_or_absdcl type_quals' rule.
12603
6060a796 12604Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12605
12606 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
12607 matches Section 5.5.
12608
d11ad92e 12609Fri Mar 4 14:01:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12610
12611 * error.c (dump_type_prefix): Don't print basetype twice for
12612 pmfs.
12613
6060a796 12614Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12615
12616 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
12617 so that it is like setHandler(&A::handlerFn). Cures an `invalid
12618 lvalue in unary `&''.
12619
d11ad92e 12620Fri Mar 4 11:15:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12621
12622 * gxxint.texi (Copying Objects): New section discussing default
12623 op= problems with virtual inheritance.
12624
12625 * decl2.c (grokoptypename): Just does grokdeclarator and
12626 build_typename_overload, since the parser can't call grokdeclarator
12627 directly.
12628
12629 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
12630 and TREE_TYPE on generated identifiers.
12631
12632 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
12633
12634 * parse.y (parm): Convert `const char *' to `__opPCc' here.
12635
12636 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
12637 if we can't figure out what to do.
d11ad92e 12638 (dump_type*): Likewise.
7177d104
MS
12639
12640 * typeck2.c (build_m_component_ref): 'component' is an expr, not
12641 a decl. Also move the IS_AGGR_TYPE check after the stripping of
12642 REFERENCE_TYPE.
12643
6060a796 12644Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12645
12646 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
12647 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
12648 lvalue in unary `&''.
12649
d11ad92e 12650Thu Mar 3 12:38:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12651
12652 * parse.y: Add precedence specification for START_DECLARATOR.
12653 (type_quals): Move before primary.
12654 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
12655
12656 * decl2.c (grokoptypename): Lose.
12657
12658 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
12659 rather than waiting until later.
12660
d11ad92e 12661Wed Mar 2 14:12:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12662
12663 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
12664 than expanding it inline.
12665 (typename): Expand empty option of (former) absdcl inline.
d11ad92e 12666 (abs_or_notype_decl): Likewise.
7177d104
MS
12667 (absdcl): Lose empty rule.
12668 (conversion_declarator): New nonterminal for 'typename' of 'operator
12669 typename'.
12670 (operator_name): Use it instead of absdcl.
12671
12672 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
12673 TYPEOF, and SIGOF.
12674 (typed_declspecs): Accept typed_typespecs, rather than typespec
12675 directly. Add rules with reserved_typespecquals.
12676 (reserved_declspecs): Don't accept typespecqual_reserved at the
12677 beginning of the list. The typed_declspecs rule will deal with this
12678 omission.
12679 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
12680 directly.
12681
12682 * parse.y (direct_notype_declarator,
12683 direct_after_type_declarator, direct_abstract_declarator): Split up
12684 the declarator1 nonterminals to match the draft standard and avoid
12685 ambiguities.
12686 (new_type_id, new_declarator, direct_new_declarator,
12687 new_member_declarator): New nonterminals to implement the subset of
12688 'typename' allowed in new expressions.
12689 (unary_expr): Use new_type_id instead of typename.
12690 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
12691 (abs_member_declarator, after_type_member_declarator): Lose.
12692
12693 * parse.y (absdcl1): Don't require parens around
12694 abs_member_declarator.
12695 (abs_member_declarator): Lose see_typename from rules.
d11ad92e 12696 (after_type_member_declarator): Likewise.
7177d104
MS
12697
12698 * tree.c (get_identifier_list): New function, containing code
12699 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
12700 (get_decl_list): Use it.
d11ad92e 12701 (list_hash_lookup_or_cons): Likewise.
7177d104
MS
12702
12703 * parse.y (typed_declspecs, declmods): It's not necessary to hash
12704 the declspecs on class_obstack, so don't. This way typed_typespecs
12705 can reduce to typed_declspecs.
12706
d11ad92e 12707Wed Mar 2 14:29:18 1994 Jason Merrill <jason@cygnus.com>
7177d104
MS
12708
12709 * cvt.c (build_up_reference): If we aren't checking visibility,
12710 also allow base->derived conversions.
12711
d11ad92e 12712Mon Feb 28 15:14:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12713
12714 * typeck.c (build_c_cast): Remove bogus hack when converting
12715 to a reference type.
12716
12717 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
12718 Removed, not used.
12719 (lang_stype::methods, lang_decl::next_method): New fields.
12720 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
12721 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
12722
12723 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
12724 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
12725 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
12726 a non-inline virtual function to control emitting of vtables.
12727 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
12728 * search.c (build_vbase_vtables_init): Don't assemble_external
12729 (yet) if flag_vtable_hack.
d11ad92e 12730 * class.c (build_vfn_ref): Likewise.
7177d104 12731
d11ad92e 12732Mon Feb 28 14:54:13 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12733
12734 * parse.y (component_decl): Don't include "typed_declspecs
12735 declarator ';'" speedup, since it breaks enums.
12736
d11ad92e 12737Fri Feb 25 15:43:44 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12738
12739 * class.c (finish_struct): Minor optimization for building
12740 fn_fields list.
12741
d11ad92e 12742Fri Feb 25 15:23:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12743
12744 * decl.c (start_function): Fix detection of function overloading.
12745
6060a796 12746Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12747
12748 * lex.c (check_newline): #pragma interface can take a string
12749 argument, just like #pragma implementation. #pragma implementation
12750 checks for garbage on the line, line #pragma interface does. Main
12751 input files do not auto implement like named files, #pragma
12752 implementation must be used explicitly.
12753
d11ad92e 12754Thu Feb 24 17:09:01 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12755
12756 * parse.y (components): Handle list of one again.
d11ad92e 12757 (notype_components): Likewise.
7177d104
MS
12758 (after_type_declarator1): Take maybe_raises out again.
12759
12760 * gxxint.texi (Parser): Document additional r/r conflict.
12761
d11ad92e 12762Wed Feb 23 14:42:55 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12763
12764 * gxxint.texi (Parser): Add node.
12765
12766 * Makefile.in (stamp-parse): Update expected conflict count.
12767
12768 * parse.y (various): Replace "declmods declarator" with "declmods
12769 notype_declarator". The comment saying that "declmods declarator ';'"
12770 corresponds to "int i;" was wrong; it corresponds to "const i;".
12771 (component_decl): Add "typed_declspecs declarator ';'" rule; this
12772 *does* correspond to "int i;". Change "declmods components" to
12773 "declmods notype_components".
12774 (components): Don't deal with a list of one anymore.
12775 (notype_components): New nonterminal, corresponds to notype_declarator.
12776 ({after_,no}type_component_decl{,0}): More new nonterminals.
12777 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
12778 Eliminates four reduce/reduce conflicts.
12779
12780 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
12781 (nontrivial_exprlist): New nonterminal: A list of at least two
12782 expr_no_commas's.
12783 (nonnull_exprlist): Depend on nontrival_exprlist.
12784 Eliminates four reduce/reduce conflicts.
12785
12786 (named_class_head): Move intermediate code block into separate
12787 nonterminal so that we can stick %prec EMPTY on it.
12788
12789 Add more %prec EMPTY's to eliminate remaining shift/reduce
12790 conflicts.
12791
12792 (after_type_declarator): Add maybe_raises to fndecl rules.
12793 (after_type_declarator_no_typename): Remove.
12794 For correctness.
12795
12796 Document remaining reduce/reduce conflicts.
12797
d11ad92e 12798Tue Feb 22 12:10:32 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12799
12800 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
12801 (TYPE_BINFO (type)) if we care about the path.
12802
12803 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
12804 options are.
12805
6060a796 12806Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12807
12808 * Makefile.in (mostlyclean): lex.c is a source file, don't
12809 remove.
12810
d11ad92e 12811Sat Feb 19 01:27:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12812
12813 * parse.y: Eliminate 20 shift/reduce conflicts.
12814
d11ad92e 12815Fri Feb 18 11:49:42 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12816
12817 * pt.c (type_unification): Add subr argument; if set, it means
12818 that we are calling ourselves recursively, so a partial match is OK.
12819 (unify): Support pointers to methods and functions.
12820 (tsubst): Support method pointers.
12821 * decl.c (build_ptrmemfunc_type): No longer static, so that
12822 tsubst can get at it.
12823
12824 * init.c (is_aggr_typedef): Pretend template type parms are
12825 aggregates.
12826 * decl2.c (build_push_scope): If cname refers to a template type
12827 parm, just grin and nod.
12828
12829 * call.c (build_overload_call_real): Pass subr argument to
12830 type_unification.
d11ad92e
MS
12831 * pt.c (do_function_instantiation): Likewise.
12832 * class.c (instantiate_type): Likewise.
7177d104
MS
12833
12834 * search.c (get_base_distance): If BINFO is a binfo, use it and
12835 don't mess with its BINFO_INHERITANCE_CHAIN.
12836
12837 * cvt.c (convert_to_reference): Fix temporary generation.
12838 If ambiguous, return error_mark_node.
12839
12840 * init.c (build_new): Put back some necessary code.
12841
d11ad92e 12842Thu Feb 17 15:39:47 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12843
12844 * init.c (build_new): Deal with array types properly.
12845
12846 * search.c (get_binfo): Become a shell for get_base_distance.
12847 (get_binfo_recursive): Lose.
12848 (get_base_distance_recursive): Find the path to the via_virtual base
12849 that provides the most access.
d11ad92e 12850 (get_base_distance): Likewise.
7177d104
MS
12851
12852 * parse.y (explicit_instantiation): Syntax is 'template class
12853 A<int>', not 'template A<int>'.
12854
12855 * typeck.c (convert_for_initialization): Remove bogus warning.
12856
12857 * parse.y (datadef): Revert patch of Oct 27.
12858
d11ad92e 12859Thu Feb 17 15:12:29 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12860
12861 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
12862 rather than integer_type_node. Does wonders for the Alpha.
12863
d11ad92e 12864Thu Feb 17 13:36:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12865
12866 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
12867 goes onto the same obstack as its target type.
12868
d11ad92e 12869Wed Feb 16 00:34:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12870
12871 * cvt.c (convert_to_reference): If converting via constructor
12872 on local level, go back to build_cplus_new approach.
12873
12874 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
12875 to error_mark_node to prevent expand_expr from building a cleanup
12876 for this variable.
12877
12878 * lex.c (default_assign_ref_body): Return *this from the memcpy
12879 version, too.
12880
12881 * decl.c (grok_reference_init): Just return if called with
12882 error_mark_node, don't worry about initializing non-const reference
12883 with temporary.
12884
12885 * cvt.c (convert_to_reference): Do the right thing for
12886 non-aggregate reference conversions, pedwarn when generating a
12887 non-const reference to a temporary.
12888
12889 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
12890 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
12891 again.
12892
d11ad92e 12893Tue Feb 15 19:47:19 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12894
12895 * decl.c (grok_reference_init): Pawn off a lot of the work on
12896 convert_to_reference. Generally do the right thing.
12897
12898 * cvt.c (convert_to_reference): Conform to the initial comment;
12899 i.e. don't create temps if decl != error_mark_node. Handle
12900 cleanups better for temps that do get created. Don't pretend
12901 that we can use an 'A' to initialize a 'const double &' just by
12902 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
12903
12904 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
12905 constructor calls.
12906
d11ad92e 12907Mon Feb 14 14:50:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12908
12909 * decl.c (grok_reference_init): Make a temporary for initializing
12910 const reference from constant expression.
12911
d11ad92e 12912Mon Feb 14 11:31:31 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
12913
12914 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
12915 * decl.c (pushdecl): Define decl in correct binding_level
12916 (which isn't always the inner_binding_level).
12917
12918 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
12919 It's ugly, and I don't think it's the right thing to do.
12920
12921 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
12922 Remove NEW_CLASS_SCOPING, assuming it is always 1.
12923 * decl.c (pop_decl_level): Removed; manually inlined.
12924
d11ad92e 12925Sun Feb 13 19:04:56 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12926
12927 * class.h (candidate): Add basetypes field.
12928
12929 * call.c (build_method_call): Do access checking after choosing a
12930 function, not before.
12931
12932 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
12933 (mostlyclean): Remove ../cc1plus.
12934
d11ad92e 12935Fri Feb 11 11:52:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12936
12937 * class.c (finish_struct): Don't allow adjusting access to a field
12938 of a base class if a local field has the same name.
12939
12940 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
12941
d11ad92e 12942hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan <gs4t@virginia.edu>
7177d104 12943
63718c49 12944 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
12945 with destructor names when either NO_DOLLAR_IN_LABEL or
12946 NO_DOT_IN_LABEL are not defined.
12947
12948 Now `template <class T, T f(T&), const T*> class A {...}' works.
12949
12950 * pt.c (grok_template_type): substitute template parm types
12951 with actual types in complex type as well.
12952 (coerce_template_parms): update the grok_template_type ()
12953 function call.
12954
12955 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
12956
12957 * decl.c (grok_op_properties): Allow operator++/-- to have
12958 default arguments.
12959
12960 * typeck2.c (store_init_value): Don't abort when called to
12961 initialize a type that needs constructing with a CONSTRUCTOR.
12962
12963 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
12964 store_init_value fails, build and expand an INIT_EXPR. If
12965 store_init_value succeeds, call expand_decl_init.
12966
6060a796 12967Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12968
12969 * class.c (build_vbase_path): Use complete_type_p instead of
12970 resolves_to_fixed_type_p to determine if the virtual bases are in
12971 their right place for the type of expr. Cures problem of thinking a
12972 virtual base class is one place, when it is in fact someplace else.
12973
6060a796 12974Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12975
12976 * init.c (resolve_offset_ref): Make sure we first convert to
12977 intermediate type, if given, when dealing with members off `this'.
12978 Solves an incorrrect `type `foo' is not a base type for type
12979 `multiple'' when it is infact, a base type.
12980
6060a796 12981Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12982
12983 * class.c (modify_other_vtable_entries): Use get_binfo, instead
12984 of binfo_value. Solves problem with compiler giving a `base class
12985 `B' ambiguous in binfo_value (compiler error)' on complex MI
12986 herarchies, when a virtual function is first defied in a virtual
12987 base class.
12988
6060a796 12989Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
12990
12991 * class.c (build_vbase_path): Don't complain about ambiguous
12992 intermediate conversion when converting down to a virtual base
12993 class, even if they might seem to be ambiguous.
12994
d11ad92e 12995Thu Feb 10 12:18:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
12996
12997 * typeck2.c (build_functional_cast): #if 0 out constructor
12998 inheritance code, improve error messages.
12999
13000 * class.c (finish_base_struct): Complain about base with only
13001 non-default constructors in derived class with no constructors.
13002
13003 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
13004
6060a796 13005Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13006
13007 * search.c (build_mi_virtuals, add_mi_virtuals,
13008 report_ambiguous_mi_virtuals): Removed unneeded code.
d11ad92e 13009 * class.c (finish_struct_bits): Likewise.
7177d104 13010
d11ad92e 13011Wed Feb 9 11:27:17 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13012
13013 * pt.c (end_template_instantiation): Push decl before
13014 pop_from_top_level.
13015
13016 * typeck2.c (build_m_component_ref): Make sure datum is of
13017 aggregate type.
13018
13019 * init.c (get_type_value): New function, returns
13020 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
13021
13022 * call.c (build_method_call): Don't die on call to destructor for
13023 non-type.
13024
13025 * decl.c (grokdeclarator): Complain about virtual op new and op
13026 delete, make static virtuals unvirtual instead of unstatic.
13027
13028 * typeck.c (build_c_cast): Also call default_conversion on
13029 methods.
13030
13031 * decl.c (grokdeclarator): Don't complain about anonymous
13032 bitfields.
13033
13034 * parse.y (simple_stmt, for loops): Move the continue point after
13035 the cleanups.
13036
13037 * class.c (finish_struct): Fix setting of
13038 TYPE_HAS_COMPLEX_INIT_REF.
13039
d11ad92e 13040Tue Feb 8 13:21:40 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13041
13042 * init.c (build_new): Deal with `new double (1)'.
13043
13044 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
13045 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
13046 TYPE_NEEDS_CONSTRUCTING.
13047
13048 * decl.c (duplicate_decls): Propagate access decls.
13049
13050 * typeck2.c (process_init_constructor): Accept empty_init_node
13051 for initializing unions.
13052
13053 * class.c, lex.c, cp-tree.h: Use
13054 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
13055 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
13056 some places.
13057
13058 * decl.c (finish_decl): Don't complain about uninitialized const
13059 if it was initialized before.
13060
d11ad92e 13061Mon Feb 7 18:12:34 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13062
13063 * lex.c (default_assign_ref_body): Don't deal with vbases for
13064 now.
13065
13066 * decl.c (finish_decl): Fix reversed logic for objects and other
13067 things that need to be constructed but have no initializer.
13068
13069 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
13070 set by grok_op_properties or finish_decl.
13071
13072 * decl.c: Don't warn about extern redeclared inline unless
13073 -Wextern-inline is given.
d11ad92e
MS
13074 * decl2.c (lang_decode_option): Likewise.
13075 * cp-tree.h: Likewise.
7177d104 13076
d11ad92e 13077Mon Feb 7 17:29:24 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13078
13079 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
13080 declaration.
13081
13082 * decl.c (pushdecl_with_scope): New function.
13083 * decl.c (pushdecl_top_level): Use new function.
13084 * decl.c (pushtag): Initialize newdecl.
13085 * decl.c (pushtag): Push new type decl into correct scope.
13086
d11ad92e 13087Mon Feb 7 14:42:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13088
13089 * call.c, cvt.c, init.c, search.c, cp-tree.h:
13090 Eradicate LOOKUP_PROTECTED_OK.
13091
d11ad92e 13092Mon Feb 7 13:57:19 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13093
13094 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
13095 'globalize' to signify implicit declarations.
13096 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
13097 * decl.c (set_identifier_type_value_with_scope): New function.
13098 * decl.c (set_identifier_local_value): Simplify.
13099 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
13100 forward declaration (followed by ';' and not preceded by 'friend').
13101 * class.c, decl.c, except.c, init.c, parse.y,
13102 pt.c, search.c: Add new argument to calls to xref_tag and
13103 pushtag.
13104
d11ad92e 13105Mon Feb 7 00:22:59 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13106
13107 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
13108 ACCESSIBLY_DERIVED_FROM_P meant before.
13109 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
13110
13111 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
13112
13113 * search.c (get_base_distance_recursive): Members and friends of
13114 a class X can implicitly convert an X* to a pointer to a private or
13115 protected immediate base class of X.
d11ad92e 13116 (get_binfo_recursive): Likewise.
7177d104
MS
13117 (get_base_distance): Ignore ambiguity if PROTECT < 0.
13118 (get_binfo): Lose multiple values of PROTECT.
13119 (compute_access): Protected is OK if the start of the
13120 search is an accessible base class of current_class_type.
13121
13122 * method.c (build_opfncall): Do check access on operator new here.
13123
13124 * decl.c (finish_function): Don't check access on operator new
13125 here.
13126
d11ad92e 13127Sun Feb 6 14:06:58 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13128
13129 * decl.c (xref_tag): The base of a derived struct is NOT always
13130 public. Duh.
13131
13132 * pt.c (do_explicit_instantiation): New function, called from
13133 parser to do explicit function instantiation.
13134 (type_unification): Allow the args list to be terminated with
13135 void_list_node.
13136 (do_pending_expansions): Look at i->interface for non-member
13137 templates.
13138
13139 * parse.y (datadef): Move explicit_instantiation here.
13140 (structsp): From here.
13141 (datadef): Complain about `int;'.
13142
d11ad92e 13143Sun Feb 6 12:33:18 1994 Per Bothner <bothner@kalessin.cygnus.com>
7177d104
MS
13144
13145 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
13146 second parameter, and simplify first from a TREE_LIST where
13147 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
13148 * pt.c (instantiate_member_templates): Simplify argument list
13149 from a TREE_LIST to just an IDENTIFIER.
13150 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
13151 * parse.y (template_instantiate_once): Simplify accordingly.
13152 * decl.c (inner_binding_level): New. Use various places to
13153 simplify.
13154
d11ad92e 13155Sun Feb 6 02:49:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13156
13157 * typeck2.c (build_functional_cast): int() -> int(0).
13158
d11ad92e 13159Sat Feb 5 00:53:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13160
13161 * class.c (finish_struct): Don't do a bitwise copy for op= if the
13162 class has a virtual function table.
13163
13164 * typeck.c (convert_for_initialization): Restore warnings about
13165 not using defined op=. Should really be my_friendly_aborts, I
13166 s'pose.
13167
d11ad92e 13168Fri Feb 4 14:21:00 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13169
13170 * class.c (finish_struct): Tidy up conditions for doing bitwise
13171 copies of objects.
13172
13173 * decl.c (build_default_constructor): #if 0 out.
13174
13175 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
13176 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
13177
13178 * decl.c (grokdeclarator): Don't return void_type_node for
13179 friends being defined here.
13180
13181 * init.c (perform_member_init): Only do the init if it's useful.
13182
13183 * lex.c (default_copy_constructor_body): If we don't need to do
13184 memberwise init, just call __builtin_memcpy.
d11ad92e 13185 (default_assign_ref_body): Likewise.
7177d104
MS
13186
13187 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
13188
6060a796 13189Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13190
13191 * lex.c (reinit_parse_for_method, cons_up_default_function):
13192 Don't give warn_if_unknown_interface warning when it came from a
13193 system header file.
d11ad92e
MS
13194 * pt.c (end_template_decl, instantiate_template): Likewise.
13195 * decl.c (start_decl): Likewise.
7177d104 13196
d11ad92e 13197Fri Feb 4 00:41:21 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13198
13199 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
13200 enums.
13201
13202 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
13203 IS_AGGR_TYPE, since we don't know it's a type.
13204
d11ad92e 13205Thu Feb 3 11:36:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13206
13207 * decl.c (grokdeclarator): Don't complain about anonymous unions.
13208
13209 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
13210 anonymous, but had a name given to it by a typedef.
13211
13212 * decl.c (grokdeclarator): When renaming an anonymous struct, set
13213 TYPE_WAS_ANONYMOUS.
13214
13215 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
13216
13217 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
13218
13219 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
13220 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
13221
13222 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
13223 anonymous structs that get typedef'd.
13224
13225 * decl.c (grokdeclarator): Always return void_type_node for
13226 friends.
13227
13228 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
13229 friends.
13230 (dump_function_decl): Don't print out default args for
13231 a function used in an expression.
13232
13233 * decl.c (grokdeclarator): Give error on abstract declarator used
13234 in an invalid context (i.e. `void (*)();').
13235
13236 * error.c (cp_line_of): Support _TYPE nodes.
d11ad92e 13237 (cp_file_of): Likewise.
7177d104
MS
13238
13239 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
13240 it can happen for the RHS of an assignment stmt where the LHS is
13241 a COND_EXPR.
13242
13243 * init.c (expand_aggr_init_1): Deal with bracketed initializer
13244 lists properly.
13245
13246 * class.c (finish_struct): Deal with enumerators and typedefs
13247 again.
13248
d11ad92e 13249Wed Feb 2 11:30:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13250
13251 * class.c (finish_struct): Tidy up loop over fields.
13252
13253 * errfn.c (cp_thing): Don't advance twice after a format.
13254
13255 * class.c (finish_struct): Complain about needing a constructor
13256 if a member has only non-default constructors, and don't try to
13257 generate a default constructor.
13258
13259 * decl.c (finish_decl): Also do the constructor thing if
13260 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
13261
13262 * search.c (unuse_fields): New function: mark all fields in this
13263 type unused.
13264 (dfs_unuse_fields): Helper function.
13265
13266 * class.c (pushclass): If the new class is the same as the old
13267 class, still unuse the fields.
13268 (unuse_fields): Move to search.c.
13269
13270 * decl.c (grok_op_properties): Add friendp argument.
13271 (grokfndecl): Pass it.
d11ad92e 13272 (start_method): Likewise.
7177d104
MS
13273
13274 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
13275 ::delete calls.
13276
13277 * parse.y (unary_expr): Pass new parameter to delete_sanity.
13278
13279 * lex.c (default_copy_constructor_body): Don't choke if the union
13280 has no fields.
d11ad92e 13281 (default_assign_ref_body): Likewise.
7177d104
MS
13282
13283 * call.c (compute_conversion_costs_ansi): Do the right thing for
13284 ellipsis matches.
13285
13286 * decl.c (push_to_top_level): Optimize.
13287
13288 * decl.c (start_function): Look for the lexical scope of a friend
13289 in DECL_CLASS_CONTEXT.
13290
13291 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
13292
d11ad92e 13293Tue Feb 1 15:59:24 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13294
13295 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
13296
13297 * init.c (init_init_processing): Don't assign BIN/BID to the
13298 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
13299 (build_new): Check TREE_GETS_PLACED_NEW.
13300
13301 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
13302 op new with placement, set TREE_GETS_PLACED_NEW.
13303
13304 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
13305
13306 * class.c (finish_struct): Don't treat anonymous unions like
13307 other aggregate members. Do synthesize methods for unions without
13308 a name, since they may or may not be "anonymous unions".
13309
13310 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
13311 in anonymous unions.
13312
13313 * lex.c (default_copy_constructor_body): Support unions.
d11ad92e 13314 (default_assign_ref_body): Likewise.
7177d104 13315
d11ad92e 13316Mon Jan 31 12:07:30 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13317
13318 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
13319
13320 * error.c (args_as_string): New function (%A), like type_as_string
13321 except NULL_TREE -> "..."
13322
13323 * call.c (build_overload_call_real): Fix for new overloading.
13324
13325 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
13326 here.
13327
13328 * parse.y (operator_name): Instead of here.
13329
13330 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
13331 of functions.
13332
13333 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
13334
13335 * method.c (build_opfncall): Don't need to massage return value
13336 any more, call build_overload_call with all flags.
13337
13338 * typeck.c (build_x_binary_op): Put back speculative call to
13339 build_opfncall.
d11ad92e
MS
13340 (build_x_unary_op): Likewise.
13341 (build_x_conditional_expr): Likewise.
7177d104 13342
6060a796 13343Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13344
13345 * cvt.c (build_type_conversion_1): Change call to pedwarn into
13346 warning, and conditionalize upon warn_cast_qual.
13347
d11ad92e 13348Fri Jan 28 11:48:15 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13349
13350 * search.c (lookup_field): If xbasetype is a binfo, copy it to
13351 avoid clobbering its inheritance info.
13352
13353 * call.c (build_method_call): Don't overwrite basetype_path with
13354 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
13355
13356 * search.c (compute_access): Fix handling of protected inheritance
13357 and friendship with the enclosing class.
13358
13359 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
13360 initialization of arbitrary variable.
13361
13362 * typeck2.c (build_functional_cast): Only try calling a method if
13363 one exists.
13364
13365 * decl.c (grokdeclarator): Move handling of constructor syntax
13366 initialization into first loop for generality.
13367 (parmlist_is_random): Lose.
13368
13369 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
13370 to default function.
13371
d11ad92e 13372Thu Jan 27 19:26:51 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13373
13374 * decl.c (grokparms): Abort if we get called with something we don't
13375 expect.
13376
6060a796 13377Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13378
13379 * call.c (build_overload_call_real): Change argument complain to
13380 flags to match style of rest of code. Pass it down to
13381 build_function_call_real as necessary.
13382 * call.c (build_overload_call, build_overload_call_maybe): Change
13383 argument complain to flags to match style of rest of code.
13384 * cp-tree.h (build_function_call_real): Added fourth flags
13385 argument.
13386 * cvt.c (convert_to_reference): Only give warning messages, if
13387 LOOKUP_COMPLAIN is set.
13388 * typeck.c (build_x_function_call): Change simple complain
13389 argument to build_overload_call_maybe and build_overload_call, to
13390 LOOKUP_COMPLAIN to match style of rest of code.
d11ad92e 13391 * typeck2.c (build_functional_cast): Likewise.
7177d104
MS
13392 * typeck.c (build_function_call_real): Add flags, so that we can
13393 not complain, if we don't want to complain. Complain about
13394 arguments, if we are complaining, otherwise don't.
13395 * typeck.c (build_function_call, build_function_call_maybe):
13396 Stick in flags argument.
13397 * typeck.c (build_x_binary_op, build_x_unary_op,
13398 build_x_conditional_expr, build_x_compound_expr): Follow style of
13399 build_x_indirect_ref, as it is more correct and more common.
13400
d11ad92e 13401Thu Jan 27 14:36:20 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13402
13403 * call.c (build_method_call): Don't check for being called with
13404 a pointer.
13405
13406 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
13407 static initializer function.
13408
13409 * init.c (build_member_call): Use convert_force here, too.
13410
13411 * search.c (compute_access): Only treat static members specially
13412 if they are referenced directly.
13413
d11ad92e 13414Wed Jan 26 18:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13415
13416 * gxxint.texi (Access Control): New node.
13417
13418 * search.c (current_scope): New function; returns whichever of
13419 current_class_type and current_function_decl is the most nested.
13420 (compute_access): Total overhaul to make it clearer and more
13421 correct. Don't use the cache for now; in the only situation where
13422 it was used before, it gained nothing. This frees up three of the
13423 DECL_LANG_FLAGs for possible other use!
13424
13425 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
13426
13427 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
13428
13429 * call.c (build_method_call): Use convert_force to cast `this' --
13430 rely on the access checking for the method itself.
13431
13432 * init.c (is_friend): Do the nesting thing, handle types. I am
13433 my own friend.
13434 (is_friend_type): Become a shell for is_friend.
13435 (add_friend): Never stick in ctype.
13436 Why are the friendship functions in init.c, anyway?
13437
6060a796 13438Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13439
13440 * cvt.c (build_type_conversion_1): Don't conditionalize call to
13441 pedwarn upon pedantic.
13442
6060a796 13443Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13444
13445 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
13446 gets a warning if one tries to initialize a non-const & from a
13447 non-lvalue.
13448 * cvt.c (convert_to_reference): Use %P format for argument
13449 numbers in warnings.
13450
6060a796 13451Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13452
13453 * init.c (build_delete): Follow style in call.c to construct the
13454 virtual call to the desctructor, as that code is right. Fixes a
13455 problem of the compiler saying a pointer conversion is ambiguous.
13456
d11ad92e 13457Wed Jan 26 11:28:14 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13458
13459 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
13460 VTABLE_NAME_FORMAT to VTABLE_NAME.
13461
13462 * *: s/visibility/access/g
13463
d11ad92e 13464Tue Jan 25 18:39:12 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13465
13466 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
13467
6060a796 13468Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13469
13470 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
13471 they break libg++.
13472
d11ad92e 13473Tue Jan 25 13:11:45 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13474
13475 * decl.c (duplicate_decls): Fix pointer arithmetic.
13476
d11ad92e 13477Mon Jan 24 15:50:06 1994 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
13478
13479 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
13480 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
13481 clauses on a declaration.
13482
d11ad92e 13483Mon Jan 24 17:06:23 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13484
13485 * class.c (finish_struct): Do synthesize methods for anon
13486 structs, just not unions.
13487
d11ad92e 13488Mon Jan 24 13:50:13 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13489
13490 * decl.c (xref_tag): handle anonymous nested type.
13491 * decl.c (globalize_nested_type): add no globalize bit check.
13492 * spew.c (hack_more_ids) : templated nested decl not push top
13493 level.
13494
13495 * parse.y : get rid of 'goto do_components'. It is much better
13496 for debugging.
13497
13498 * decl.c (is_anon_name): get rid of the function and use the
13499 macro ANON_AGGRNAME_P.
13500 * pt.c : ditto.
13501
d11ad92e 13502Fri Jan 21 14:06:02 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13503
13504 * class.c (finish_struct): Don't synthesize any methods for
13505 anonymous structs/unions.
13506
13507 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
13508
d11ad92e 13509Thu Jan 20 18:56:46 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13510
13511 * method.c (build_opfncall): Call build_indirect_ref on
13512 synthesized instance for operator delete.
13513
13514 * pt.c (type_unification): Don't abort if called with a list of
13515 types in ARGS.
13516
13517 * class.c (instantiate_type): Deal with function templates.
13518
d11ad92e 13519Thu Jan 20 16:55:35 1994 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
13520
13521 * Makefile.in (CC): Default to cc not gcc.
13522
d11ad92e 13523Thu Jan 20 13:47:54 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13524
13525 * typeck.c (build_modify_expr): Call constructor if appropriate.
13526
13527 * decl.c (push_to_top_level): Clear out class-level bindings cache.
13528
d11ad92e 13529Wed Jan 19 13:51:22 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13530
13531 * call.c (resolve_scope_to_name): Work recursively (previously only
13532 looked down one level).
13533
13534 * lex.c (do_pending_inlines): If we're still dealing with the last
13535 batch of inlines, don't start working on a new one.
13536
13537 * Makefile.in (stamp-parse): Update conflict count.
13538 (TAGS): Fix.
13539
13540 * parse.y (explicit_instantiation): New rule; implements
13541 'template A<int>' syntax (though not 'template foo(int)' yet).
13542 (structsp): Add explicit_instantiation.
13543
d11ad92e 13544Tue Jan 18 13:53:05 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13545
13546 * class.c (finish_struct, etc.): Simplify decision to synthesize
13547 a destructor.
13548
13549 * call.c, class.c, cp-tree.h, decl.c, init.c,
13550 ptree.c, search.c, typeck.c, typeck2.c: Nuke
13551 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
13552 * init.c (expand_aggr_init_1): Don't try non-constructor methods
13553 of initializing objects.
13554 (build_new): Don't try other methods if the constructor lookup fails.
13555
13556 * class.c (finish_base_struct): Set cant_have_default_ctor and
13557 cant_synth_copy_ctor properly.
d11ad92e 13558 (finish_struct): Likewise.
7177d104 13559
d11ad92e 13560Mon Jan 17 13:58:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13561
13562 * typeck.c (build_modify_expr_1): #if 0 out again.
13563 (build_modify_expr): #if 0 out memberwise init code again.
13564
13565 * lex.c (default_copy_constructor_body): Be const-correct.
d11ad92e 13566 (default_assign_ref_body): Likewise.
7177d104
MS
13567
13568 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
13569 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
13570 (expand_aggr_init): Disable silent conversion from initializer list
13571 to list of args for a constructor.
13572
13573 * class.c (base_info): Lose needs_default_ctor.
d11ad92e
MS
13574 (finish_base_struct): Likewise.
13575 (finish_struct): Likewise.
7177d104
MS
13576
13577 * decl.c (init_decl_processing): Don't turn off flag_default_inline
13578 just because flag_no_inline is on.
13579 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
13580 constructor.
13581
13582 * class.c (finish_struct): Synthesize default ctor whenever
13583 allowed.
13584
13585 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
13586
6060a796 13587Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13588
13589 * Makefile.in, configure: Handle the C++ front-end in a
13590 subdirectory.
13591 * cp-*: Move C++ front-end to cp/*.
13592
d11ad92e 13593Fri Jan 14 14:09:37 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13594
13595 * cp-typeck.c (build_function_call_real): Modify to match other
13596 instances of taking the address of the function.
13597
13598 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
13599 there are non-synthesized constructors.
13600 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
13601 Always generate copy constructor if possible.
13602
13603 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
13604 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
13605
13606 * cp-lex.c (default_copy_constructor_body): Use init syntax
13607 for all bases.
13608
13609 * cp-type2.c (store_init_value): Only give error for initializer list
13610 if TYPE_HAS_REAL_CONSTRUCTOR.
13611
d11ad92e 13612Thu Jan 13 15:38:29 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13613
13614 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
13615 (lang_decl): Add synthesized bitfield to decl_flags.
13616
13617 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
13618 artificial methods, rather than a line # of 0.
13619
d11ad92e 13620Fri Jan 14 18:25:29 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13621
13622 * cp-decl (xref_tag): fix a bug in conflict type.
13623 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
13624 type reference.
13625 * cp-spew.c (yylex) : generated SCOPED_NAME token.
13626 * cp-lex.c (yyprint): handle SCOPED_NAME.
13627
6060a796 13628Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13629
13630 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
13631 not right.
13632
d11ad92e 13633Thu Jan 13 14:00:35 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13634
13635 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
13636 have type_flags.
13637
6060a796 13638Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13639
13640 Ensure that all vtable pointers are initialized with all the right
13641 values.
13642
13643 * cp-class.c (is_normal): Changed to reflect new meaning of
13644 CLASSTYPE_VFIELD_PARENT.
13645 * cp-class.c (maybe_fixup_vptrs): Use of
13646 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
13647 BINFO_MODIFIED instead.
13648 * cp-class.c (finish_struct): Changed to reflect new meaning of
13649 CLASSTYPE_VFIELD_PARENT.
13650 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
13651 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
13652 coding it here.
13653 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
13654 re-implement.
13655 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
13656 * cp-tree.h (vfield_parent): Changed to integer.
13657 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
13658 meaning.
13659 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
13660
d11ad92e 13661Wed Jan 12 18:24:16 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13662
13663 * cp-decl.c (xref_tag): re-implement globalize nested type.
13664 * cp-decl2.c (grok_x_components): ditto.
13665 * cp-parse.y: ditto.
13666 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
13667
d11ad92e 13668Wed Jan 12 14:08:09 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13669
13670 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
13671 decls with a definition attached.
13672
13673 * cp-typeck.c (build_modify_expr): Undo previous change in the case
13674 of INIT_EXPRs.
13675
d11ad92e 13676Tue Jan 11 19:33:03 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13677
13678 * cp-typeck.c (build_modify_expr): Replace code for generating
13679 assignment semantics for classes with an error.
13680 (build_modify_expr_1): #if 0 out.
13681
13682 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
13683 behavior for overloaded functions (it doesn't push anything).
13684
13685 * cp-class.c (finish_struct): When generating default op=,
13686 set TYPE_HAS_ASSIGNMENT.
13687
6060a796 13688Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
13689
13690 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
13691 invalid.
13692 * cp-typeck.c (convert_for_assignment): Simplify.
13693 * cp-decl2.c (warn_enum_clash): Removed.
13694 * invoke.texi (-Wenum-clash): Removed.
13695 * toplev.c (-Wenum-clash): Removed.
13696
d11ad92e 13697Mon Jan 10 17:48:37 1994 Kung Hsu <kung@mexican.cygnus.com>
7177d104
MS
13698
13699 * cp-decl.c (finish_decl): fix incorrect popclass call.
13700
13701 * cp-decl.c (is_anon_name): new function, check whether the name
13702 is anonymous name generated by compiler.
13703 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
13704 * cp-spew.c (hack_more_ids): handle nested type in template.
13705 * cp-parse.y : handle nested type reference in uninstantiated
13706 template.
13707 * cp-call.c (build_method_call): handle uninstantiated template
13708 case.
13709 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
13710 type in template.
13711 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
13712 type by name.
13713 * cp-pt.c (tsubst): handle nested type search by name.
13714
d11ad92e 13715Mon Jan 10 14:32:18 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13716
13717 * cp-init.c (build_member_call): Propagate qualifiers to new type.
13718
13719 * cp-call.c (build_method_call): Count functions the new way.
13720
d11ad92e 13721Fri Jan 7 19:03:26 1994 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13722
13723 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
13724 too.
13725
d11ad92e 13726Tue Jan 4 16:45:51 1994 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13727
13728 * cp-parse.y: change to handle whether to globalize nested class.
d11ad92e 13729 * cp-decl.c(xref_tag, maybe_globalize_type): Likewise.
7177d104 13730
d11ad92e 13731Mon Jan 3 22:22:32 1994 Gerald Baumgartner <gb@cygnus.com>
7177d104
MS
13732
13733 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
13734 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
13735 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
13736 gplus.gperf toplev.c: Incorporated C++ signature extension.
13737 * cp-sig.c: New file, contains most of signature processing.
13738 * cp-hash.h: Regenerated from gplus.gperf.
13739
13740 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
13741 and `-fno-handle-signatures' command line flags.
13742
13743 * gcc.texi: Changed the last-modification date.
13744 * invoke.texi: Added `-fhandle-signatures' in the list of
13745 C++ language options. Added explanation for this option.
13746
6060a796 13747Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13748
13749 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
13750 harsh here.
13751
6060a796 13752Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13753
13754 * cp-pt.c (do_pending_expansions): Decide to expand a template
13755 member function, based upon it's class type, not the class type of
13756 the first place it was declared.
13757
6060a796 13758Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13759
13760 * cp-class.c (is_normal): New routine, use to determine when the
13761 given binfo is the normal one. (The one that should have the simple
13762 vtable name.)
13763 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
13764 to check if two fndecls are `the same'. Sometimes this routine can
13765 modify the main vtable, and normal should be 1, in that case, so use
13766 is_normal() to determine if this is the main vtable for the class.
13767 Don't recurse down virtual bases, as they are shared, and we take
13768 care of them elsewhere.
13769 * cp-class.c (modify_vtable_entries): If we have already updated the
13770 vtable with the new virtual, don't do it again.
13771 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
13772 appropriate. Do virtual function overriding in virtual bases, after
13773 normal overriding, so that the base function list in DECL_VINDEX is
13774 not overridden, before we have a chance to run through the list.
13775 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
13776 Make sure we pass the right address into modify_vtable_entries.
13777 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
13778 binfo is the one that has the vtable that we based our vtable on.
13779
d11ad92e 13780Fri Dec 24 09:40:52 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
13781
13782 * cp-typeck.c (c_expand_start_case): Use default_conversion to
13783 convert expression from reference type if necessary.
13784
d11ad92e 13785Wed Dec 22 17:58:43 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13786
13787 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
13788 trying to read its TREE_VALUE.
13789
13790 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
13791 (finish_struct): Instead of here.
13792
d11ad92e 13793Tue Dec 21 14:34:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13794
13795 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
13796 have TYPE_PTRMEMFUNC_P set before we try to build its
13797 CLASSTYPE_ID_AS_LIST.
13798 (get_decl_list): Likewise, when trying to read it.
13799
13800 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
13801 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
13802
d11ad92e 13803Mon Dec 20 13:35:03 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13804
13805 * cp-typeck.c (rationalize_conditional_expr): New function.
13806 (unary_complex_lvalue): Use it.
13807 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
13808 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
13809 SAVE_EXPR either.
13810
13811 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
13812 (lang_decode_option): Set warn_return_type, not explicit_*, for
13813 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
13814 decide if it should go into jump_optimize or not.
13815 * cp-tree.h (explicit_warn_return_type): Deleted.
13816 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
13817 (finish_function): Also complain about no return in a non-void fn if
13818 we're being pedantic (don't rely on use of -Wreturn-type).
13819
d11ad92e 13820Fri Dec 17 15:45:46 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13821
13822 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
13823 static if it's being done inside another function.
13824
13825 * cp-search.c (compute_visibility): Check for friendship both ways.
13826
d11ad92e 13827Fri Dec 17 14:28:25 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13828
13829 * cp-cvt.c (build_default_binary_type_conversion): Make error
13830 messages more helpful.
13831
13832 * cp-error.c (op_as_string): New function, returns "operator =="
13833 given EQ_EXPR or suchlike.
13834
d11ad92e 13835Fri Dec 17 13:28:11 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13836
13837 * cp-call.c (print_n_candidates): New function.
13838 (build_overload_call_real): Use it when we complain about a call
13839 being ambiguous.
13840
d11ad92e 13841Fri Dec 17 12:41:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13842
13843 * cp-call.c (build_method_call): Fix checking for static call
13844 context.
13845
13846 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
13847 to operator new.
13848
13849 * cp-init.c (build_new): Don't mess with rval when building
13850 indirect ref.
13851
d11ad92e 13852Thu Dec 16 16:48:05 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13853
13854 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
13855 NAME(type) may not be exist. It's not a problem for old compiler.
13856
d11ad92e 13857Thu Dec 16 14:46:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13858
13859 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
13860 never used for anything.
13861 (struct lang_type, member type_flags): Delete field
13862 `alters_visibility', and up `dummy' by 1.
13863 * cp-class.c (finish_base_struct): Delete code that copies the
13864 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
13865 (finish_struct): Delete code that sets it.
13866
d11ad92e 13867Thu Dec 16 14:44:39 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13868
13869 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
13870 build_method_call that I messed up before.
13871
13872 * cp-search.c (get_base_distance): If protect > 1, allow immediate
13873 private base.
13874
13875 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
d11ad92e 13876 (finish_struct): Likewise. Well, nigh-correctly; it won't deal
7177d104
MS
13877 properly with the case where a class contains an object of an
13878 ambiguous base class which has a protected op=. Should be fixed
13879 when the access control code gets overhauled.
13880 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
13881
d11ad92e 13882Thu Dec 16 12:17:06 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13883
13884 * cp-lex.c (real_yylex): Turn the code back on that deals with
13885 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
13886 avoid the ambiguity problems that led to it being turned off in the
13887 first place.
13888
13889 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
13890 to see if something is a method.
13891
6060a796 13892Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13893
13894 * cp-typeck.c (build_modify_expr): Avoid error messages on small
13895 enum bit fields.
13896 * cp-typeck.c (convert_for_assignment): Add missing argument to
13897 cp_warning and cp_pedwarn calls.
13898
d11ad92e 13899Wed Dec 15 18:25:32 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13900
13901 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
13902 initializers; it's just anachronistic.
13903
13904 * cp-decl.c (finish_decl): Don't require external-linkage arrays
13905 to have a complete type at declaration time when pedantic.
13906
d11ad92e 13907Tue Dec 14 11:37:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13908
13909 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
13910
13911 * cp-call.c (build_method_call): Don't dereference pointer given
13912 as instance.
13913
13914 * cp-decl.c (finish_function): Don't pass pointer to
13915 build_method_call.
d11ad92e 13916 (finish_function): Likewise.
7177d104 13917
d11ad92e 13918 * cp-typeck.c (build_x_function_call): Likewise.
7177d104 13919
d11ad92e 13920 * cp-method.c (build_component_type_expr): Likewise.
7177d104 13921
d11ad92e
MS
13922 * cp-init.c (build_member_call): Likewise.
13923 (build_new): Likewise.
7177d104 13924
d11ad92e 13925Mon Dec 13 18:04:33 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13926
13927 * cp-decl.c (xref_tag): fix regression created by changes made
13928 in Dec. 7 1993.
13929 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
13930
d11ad92e 13931Fri Dec 10 12:40:25 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13932
13933 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
13934 out the final evaluation of the function, so we can see if ELLIPSIS,
13935 USER, and EVIL were set at the end.
13936
13937 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
13938 only go for setting TRIVIAL_CODE if we are dealing with types that
13939 are compatible.
13940
6060a796 13941Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13942
13943 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
d11ad92e
MS
13944 * toplev.c (lang_options): Likewise.
13945 * cp-decl2.c (flag_huge_objects, lang_f_options): Likewise.
7177d104 13946 * cp-decl.c (delta_type_node): New type for delta entries.
d11ad92e 13947 * cp-tree.h (delta_type_node): Likewise.
7177d104
MS
13948 * cp-decl.c (init_decl_processing): Setup delta_type_node.
13949 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
13950 delta_type_node instead of short_integer_type_node.
d11ad92e 13951 * cp-class.c (build_vtable_entry): Likewise.
7177d104 13952
d11ad92e 13953Thu Dec 9 16:19:05 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
13954
13955 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
13956 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
13957 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
13958
6060a796 13959Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
13960
13961 * cp-decl.c (finish_decl): Make sure things that can go into
13962 "common", do go into common, if -fcommon is given.
13963
d11ad92e 13964Wed Dec 8 13:01:54 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104 13965
63718c49
GB
13966 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
13967 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
13968 argument matching diagnostics to make instantly clear what the
13969 compiler is doing.
7177d104
MS
13970
13971 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
13972 then check to see if the penalty was increased due to
13973 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
13974
d11ad92e 13975Tue Dec 7 18:29:14 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
13976
13977 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
13978 problem.
13979
d11ad92e 13980Tue Dec 7 16:09:34 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
13981
13982 * cp-class.c (finish_struct): Before synthesizing methods, if no
13983 methods have yet been declared then set nonprivate_method. Don't
13984 set non_private method after synthesizing a method.
13985
13986 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
13987 is set, tie emitted code to the location of template instantiation,
13988 rather than definition.
13989
13990 * cp-tree.h: Declare flag_alt_external_templates.
13991
13992 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
13993
d11ad92e 13994 * toplev.c (lang_options): Likewise.
7177d104 13995
d11ad92e 13996Mon Oct 4 12:50:02 1993 Chip Salzenberg <chip@fin.uucp>
7177d104 13997
63718c49
GB
13998 [changes propagated from 930810 snapshot]
13999 * cp-decl.c (init_decl_processing): Make long long available for use
14000 as SIZE_TYPE and PTRDIFF_TYPE.
14001 (finish_decl): Allow file-scope static incomplete array.
14002 (grokdeclarator): Don't pass on const and volatile fron function
14003 value type to function type.
14004 Warn here for volatile fn returning non-void type.
14005 * cp-parse.y (attrib): Accept attributes `volatile' with alias
14006 `noreturn', and `const'.
14007 * cp-typeck.c (default_conversion): Don't lose const and volatile.
14008 (build_binary_op_nodefault): Generate pedantic warning for comparison
14009 of complete pointer type with incomplete pointer type.
14010 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104 14011
d11ad92e 14012Tue Dec 7 10:46:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14013
14014 * cp-init.c (expand_vec_init): When creating a temporary for copying
14015 arrays, use the type of the source, not the target.
14016
14017 * cp-cvt.c (convert): Pass an argument for errtype to
14018 convert_to_reference.
14019
14020 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
14021 methods, -> and `this'.
14022
d11ad92e 14023Mon Dec 6 17:12:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14024
14025 * cp-error.c (parm_as_string): New function; returns `this' or arg
14026 number. Corresponds to %P.
14027 (dump_expr): Deal with method calls.
14028
14029 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
d11ad92e 14030 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104
MS
14031 (warn_for_assignment): Lose.
14032
d11ad92e 14033Mon Dec 6 11:33:35 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14034
14035 * cp-call.c (ideal_candidate_ansi): Delete code that was never
14036 doing anything useful. Instead, sort once, and DO NOT wipe
14037 out any codes with EVIL_CODE, since that's what we use as a
14038 marker for the end of the list of candidates.
14039
14040 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
14041
d11ad92e 14042Mon Dec 6 12:49:17 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14043
14044 * cp-init.c (get_aggr_from_typedef): New function, like
14045 is_aggr_typedef but returns the _TYPE.
14046
14047 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
14048
d11ad92e 14049Sun Dec 5 18:12:48 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14050
14051 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
14052
d11ad92e 14053Thu Nov 25 23:50:19 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14054
14055 Delay language context change until beginning of next decl.
14056
14057 * cp-lex.h (c_header_level): Removed.
14058 (pending_lang_change): Declared.
14059 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
14060 (pending_lang_change): Defined.
14061 (check_newline): Rework code that recognizes line number and
14062 filename changes. Instead of pushing and popping lang context,
14063 increment and decrement pending_lang_change.
14064 (do_pending_lang_change): Push and pop lang context according
14065 to value of pending_lang_change.
14066 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
14067 (extdef): Same as extdef, but call do_pending_lang_change() first.
14068
d11ad92e 14069Mon Nov 15 15:39:15 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14070
14071 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
14072 compare of ptr with 0 only if pedantic in both cases.
14073
d11ad92e 14074Thu Nov 25 13:31:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14075
14076 Reinstate the below patch, which got lost in the Cygnus merge:
14077 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
14078 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
14079
d11ad92e 14080Wed Nov 17 19:03:30 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14081
14082 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
14083
d11ad92e 14084Fri Oct 22 20:43:37 1993 Paul Eggert <eggert@twinsun.com>
7177d104
MS
14085
14086 * cp-lex.c (real_yylex): Diagnose floating point constants
14087 that are too large.
14088
d11ad92e 14089Wed Nov 17 19:10:37 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14090
14091 * cp-type2.c (build_functional_cast): ARM page 16: When a class
14092 and an object, function or enumerator are declared in the same
14093 scope with the same name, the class name is hidden.
14094
d11ad92e 14095Wed Nov 17 19:07:18 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14096
14097 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
14098 and long double from each other when overloading.
14099 (compute_conversion_costs_{ansi,old}, build_method_call,
14100 build_overlay_call_real, convert_to_aggr): Always set and
14101 always use H_LEN member of candidate structure.
14102
d11ad92e 14103Mon Oct 11 23:10:53 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14104
14105 * cp-decl.c (duplicate_decls): Note redeclarations of library
14106 functions, and generate distinct warnings for them.
14107
d11ad92e 14108Mon Oct 4 12:26:49 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14109
14110 Support format warnings in G++.
14111
14112 * cp-tree.h: Protect against multiple inclusion.
14113 Declare all public functions in c-common.c (copy from c-tree.h).
14114 (STDIO_PROTO): Define.
14115 (warn_format): Declare.
14116 (record_format_info): Remove declaration.
14117 * cp-decl.c (init_decl_processing): Call init_function_format_info.
14118 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
14119 * cp-typeck.c (build_function_call_real): Call check_function_format.
14120 (record_format_info): Remove -- obsolete stub.
14121
d11ad92e 14122Sat Jul 24 12:04:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14123
14124 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
14125 following an extern one (for -Wredundant-decls).
14126 * cp-parse.y (primary): In statement expression case, if compstmt
14127 returns something other than a BLOCK, return it unchanged.
14128
d11ad92e 14129Thu Dec 2 20:44:58 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14130
14131 * cp-decl.c (warn_extern_redeclared_static): New function made
14132 from code extracted from pushdecl.
14133 (duplicate_decls, pushdecl): Call new function.
14134 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
14135 to be a TREE_LIST when function is declared in 'extern "C" {}'.
14136
d11ad92e 14137Fri Dec 3 16:01:10 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14138
14139 * cp-class.c (duplicate_tag_error): Use cp_error.
14140 (finish_base_struct): Check for ambiguity with direct base, and don't
14141 generate op= or copy ctor if it exists.
14142
d11ad92e 14143Fri Dec 3 15:32:34 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14144
14145 * cp-init.c (expand_member_init): when initializer name is null,
14146 don't try to build it now because emit_base_init will handle it.
14147
d11ad92e 14148Fri Dec 3 12:28:59 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14149
14150 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
14151 code such as ExceptionHandler::operator=.
14152
d11ad92e 14153Fri Dec 3 10:32:08 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14154
14155 * cp-decl.c (grokdeclarator): Don't try to print out dname when
14156 complaining about arrays of references if decl_context==TYPENAME,
14157 since it will be null.
14158
14159 * cp-decl2.c: Default to flag_ansi_overloading.
14160
d11ad92e 14161Thu Dec 2 18:05:56 1993 Kung Hsu <kung@cirdan.cygnus.com>
7177d104
MS
14162
14163 * cp-call.c (build_method_call): use binfo from instance if it's
14164 different from binfo (basetype_path) passed from above.
14165
d11ad92e 14166Wed Nov 17 19:14:29 1993 Chip Salzenberg <chip@fin.uucp>
7177d104
MS
14167
14168 cp-error.c (dump_expr): Use unsigned chars to output a
14169 TREE_REAL_CST in hex.
14170
d11ad92e 14171Thu Dec 2 11:05:48 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14172
14173 * cp-class.c (finish_struct): Fix typo in setting
14174 cant_synth_asn_ref.
14175
14176 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
14177 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
14178
14179 * cp-lex.c (default_copy_constructor_body): Change
14180 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
d11ad92e 14181 (default_assign_ref_body): Likewise.
7177d104
MS
14182 (default_copy_constructor_body): Call operator= explicitly for
14183 base classes that have no constructor.
14184
d11ad92e 14185Thu Dec 2 10:47:15 1993 Michael Tiemann <tiemann@blues.cygnus.com>
7177d104
MS
14186
14187 * cp-call.c (build_method_call): If the instance variable is
14188 converted to error_mark_node when we're trying to convert it to the
14189 base type of a method we're looking up, return error_mark_node.
14190
d11ad92e 14191Thu Dec 2 10:41:16 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14192
14193 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
14194 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
14195
d11ad92e 14196Wed Dec 1 13:33:34 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14197
14198 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
14199 harshness_code, not the size of short, for clearing out the
14200 ansi_harshness.
14201
14202 * cp-call.c (print_candidates): New function.
14203 (build_method_call): When we had some candidates, but didn't get a
14204 usable match, don't report that we got an error with the first
14205 candidate. Instead, say there were no matches, and list the
14206 candidates with print_candidates. In the second pass, make sure we
14207 clear out ever_seen, so we can accurately count the number of
14208 functions that qualified.
14209
d11ad92e 14210Wed Dec 1 09:53:59 1993 Torbjorn Granlund <tege@cygnus.com>
7177d104
MS
14211
14212 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
14213 only if op1 is known to be != -1.
14214 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
14215
d11ad92e 14216Tue Nov 30 14:07:26 1993 Brendan Kehoe <brendan@lisa.cygnus.com>
7177d104
MS
14217
14218 * cp-method.c (hack_identifier): If the field itself is private, and
14219 not from a private base class, say so.
14220
d11ad92e 14221Mon Nov 29 03:00:56 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14222
14223 * cp-decl.c (grokdeclarator): Always warn on initialization of
14224 const member.
14225
d11ad92e 14226Wed Nov 24 00:49:35 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14227
14228 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
14229 (finish_base_struct): Set cant_synth_asn_ref properly.
14230
14231 * cp-lex.c (cons_up_default_function): Add section for operator=.
14232 (default_assign_ref_body): New function, mostly cribbed from
14233 default_copy_constructor_body.
14234
14235 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
14236 cant_synth_asn_ref, no_const_asn_ref.
14237 (finish_base_struct): Update no_const_asn_ref, note that you should
14238 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
14239 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
14240 initialize them properly. Set no_const_asn_ref properly. Set
14241 cant_synth_* in some of the situations where they should be set.
14242 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
14243 to cons_up_default_function for operator=.
14244
6060a796 14245Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14246
14247 * cp-cvt.c (convert_force): Add code to perform casting of pointer
14248 to member function types.
14249 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
14250 when the conversion should be done, regardless.
d11ad92e
MS
14251 * cp-tree.h (build_ptrmemfunc): Likewise.
14252 * cp-type2.c (digest_init): Likewise.
14253 * cp-typeck.c (convert_for_assignment): Likewise.
7177d104 14254
d11ad92e 14255Tue Nov 23 18:06:58 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14256
14257 * cp-error.c (dump_expr): Do the right thing for variables of
14258 reference type.
14259
14260 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
14261 and its kin properly.
14262 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
14263
6060a796 14264Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
14265
14266 * cp-method.c (build_opfncall): Don't count pointer to member
14267 functions as aggregates here, as we don't want to look up methods in
14268 them. The compiler would core dump if we did, as they don't have
14269 normal names.
14270 * cp-typeck.c (build_indirect_ref): Improve wording on error
14271 message.
14272
d11ad92e 14273Mon Nov 22 14:22:23 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14274
14275 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
14276 (since it's supported in other compiler bits).
14277
14278 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
14279 argument.
14280
14281 * cp-error.c (dump_function_decl): Don't print return type for
14282 constructors and destructors.
14283
14284 * cp-cvt.c (cp_convert_to_pointer): Import code from
14285 convert_to_pointer so we can return error_mark_node in the case of an
14286 error, and to allow more meaningful error messages.
14287 (build_type_conversion): Don't go through void* when trying
14288 to convert to a pointer type.
14289
14290 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
14291 after grokclassfn so that it's dealing with the right decl.
63718c49 14292 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
14293
14294 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
14295 no uses of it in the compiler).
14296
14297 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
14298 types.
d11ad92e 14299 (build_method_call): Likewise.
7177d104 14300
d11ad92e 14301Fri Nov 19 12:59:38 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14302
14303 * cp-tree.c (count_functions): Abstraction function.
14304
14305 * cp-call.c (build_overload_call_real): Deal with new overloading
14306 properly, remove dead code.
14307
14308 * gcc.c (default_compilers): Generate and use .ii files in the
14309 intermediate stage of compiling C++ source.
14310
d11ad92e 14311Fri Nov 19 11:26:09 1993 Jim Wilson <wilson@sphagnum.cygnus.com>
7177d104
MS
14312
14313 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
14314 address before using it, so it can be later safely compared.
14315
d11ad92e 14316Fri Nov 12 15:30:27 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14317
14318 * cp-pt.c (tsubst): Deal with new overloading.
14319
14320 * cp-typeck.c (fntype_p): is the arg function type?
14321 (comp_target_parms): pedwarn on conversion from (anything) to (...).
14322 (build_x_function_call): Deal with new overloading.
14323
14324 * cp-tree.c (decl_list_length): Deal with new overloading.
14325 (decl_value_member): Like value_member, but for DECL_CHAINs.
14326
14327 * cp-decl.c (duplicate_decls): Deal with new overloading.
d11ad92e 14328 (start_decl): Likewise.
7177d104
MS
14329
14330 * cp-class.c (instantiate_type): Deal with new overloading.
14331
14332 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
14333 (convert_harshness_old): Deal with new overloading.
d11ad92e 14334 (build_overload_call_real): Likewise.
7177d104 14335
d11ad92e 14336Mon Nov 8 13:50:49 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14337
14338 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
14339 if unambiguous, NULL_TREE otherwise.
14340 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
14341 (is_overloaded_fn): Returns whether or not the passed tree is
14342 a function or list of functions.
14343
14344 * cp-init.c (init_init_processing): use `get_first_fn' to find
14345 the FUNCTION_DEFN for new and delete.
14346
14347 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
14348 code size in half (I spit on special cases).
14349
d11ad92e 14350Tue Sep 7 20:03:33 1993 Jason Merrill <jason@deneb.cygnus.com>
7177d104
MS
14351
14352 * cp-decl.c: Allow references and template type parameters as well
This page took 1.662656 seconds and 5 git commands to generate.