]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
63rd Cygnus<->FSF merge
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
b19b4a78
MS
1Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
2
3 * repo.c (get_base_filename): Take filename parm, fix logic bug.
4
5 * typeck.c (build_compound_expr): Do not warn about a compound expr
6 in which the first expression has no side effects.
7 (build_x_compound_expr): Warn here instead.
8 (build_conditional_expr): Don't warn about a conditional expression
9 between an enum and the type it promotes to.
10
11 * init.c (build_new): Handle initialization of arrays of builtins
12 properly.
13
14Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
15
16 * repo.c: Include config.h to get definitions of bcopy and rindex
17 on systems that don't have them (e.g., SVR4).
18
19Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com>
20
21 * decl2.c (finish_table): Pass NULL_TREE instead of init to
22 finish_decl so that it won't try and do error checking on the
23 initializer.
24
25Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
26
27 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
28 determine whether this compile used -c -o.
29 (open_repo_file): Use get_base_filename. Remove the extension.
30 (finish_repo): Spit out the values of main_input_filename,
31 COLLECT_GCC and COLLECT_GCC_OPTIONS.
32
33 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
34
faae18ab
MS
35Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
36
37 * search.c (compute_access): Don't try to do access control on
38 nested types.
39
40Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
41
42 * repo.c: New file to handle things repo.
43
44 * pt.c (instantiate_template): Call repo_template_used if the
45 definition is accessible.
46 (mark_function_instantiated): Split out from
47 do_function_instantiation.
48 (mark_class_instantiated): Split out from do_type_instantiation.
49
50 * parse.y (template_instantiate_once): Call repo_template_used.
51
52 * lex.c (lang_init): Call init_repo.
53
54 * decl2.c: Handle flag_use_repository.
55 (finish_file): Call finish_repo.
56
57 * decl.c (start_method): Call repo_template_used if this is a
58 template method.
59
60 * Makefile.in (CXX_OBJS): Add repo.o.
61 (repo.o): Add dependencies.
62
63 * Make-lang.in (CXX_SRCS): Add repo.c.
64
65 * decl.c (start_function): If DECL_INTERFACE_KNOWN and
66 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
67
68 * typeck.c (build_binary_op_nodefault): Identify the invalid operand
69 types used.
70
71 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
72
73Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
74
75 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
76 and result_type. When checking for comparison between signed
77 and unsigned, use result_type rather than the (possibly shortened)
78 type of op0. Also, don't warn about equality comparison of a
79 signed operand to an unsigned constant that fits in the signed
80 type.
81
82 * method.c (do_build_copy_constructor): Reverse
83 current_base_init_list after we've built it up.
84
85Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com>
86
87 * except.c (build_throw): Never warn about the value of throw not
88 being used.
89
90Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com>
91
92 * except.c (expand_start_catch_block): Check for bad catch parameter
93 declarations.
94
95Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
96
97 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
98 DECL_EXTERNAL is not already set.
99
100Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com>
101
102 * method.c (emit_thunk): Let poplevel know that the last level is
103 for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
104
105Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
106
107 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
108 here.
109
110 * decl.c (grokdeclarator): OK, don't abort if we see a decl with
111 METHOD_TYPE.
112 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
113 all deferred inlines.
114
115Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
116
117 * cp-tree.h (DECL_THIS_INLINE): New macro.
118 (DECL_NOT_REALLY_EXTERN): New macro.
119 (DECL_THIS_STATIC): New macro.
120
121 * decl.c: Lose all references to current_extern_inline. Break
122 inline semantics into DECL_INLINE for actual inlining and
123 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC.
124 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
125 emit an inline here. Associated changes.
126 * lex.c: Ditto.
127 * pt.c: Ditto.
128 * typeck.c: Ditto.
129
130 * call.c (build_method_call): Don't bother trying to handle inlines
131 specially.
132 * cvt.c (convert_to_aggr): Ditto.
133
134 * pt.c (do_function_instantiation): Handle instantiation of
135 public inlines, too.
136
137Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com>
138
139 * except.c (init_exception_processing): Change the interface for
140 __throw_type_match and add decl for new rtti matching routine
141 __throw_type_match_rtti.
142 (build_eh_type): New routine to build a run time descriptor for the
143 expression given.
144 (expand_start_catch_block): Update to use new calling convention for
145 the matcher.
146 (expand_throw): Update to use build_eh_type.
147
08fb8ad0
WL
148Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org>
149
150 * g++.c: Removed __NetBSD__ from conditional.
151 Declare strerror if HAVE_STRERROR is defined; otherwise
152 declare sys_errlist and sys_nerr.
153 (my_strerror): New function.
154
71851aaa
MS
155Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com>
156
157 * search.c (get_binfo): Don't try to be so clever.
158
159 * tree.c (copy_to_permanent): Also suspend_momentary().
160
161 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
162 if the types are the same.
163
164 * decl.c (start_function): Handle extern inlines more like C++ says
165 we should.
166
167 * init.c (build_member_call): Hand constructor calls off to
168 build_functional_cast.
169
170 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
171 the name of the type.
172
173Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
174
175 * decl.c (grokdeclarator): Check for the decl returned by
176 grokfndecl to be null before using build_decl_attribute_variant.
177
178Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
179
180 * init.c (build_new): Use build_pointer_type instead of
181 TYPE_POINTER_TO.
182
7215f9a0
MS
183Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
184
71851aaa
MS
185 * typeck.c (build_conditional_expr): Handle pmfs.
186 (convert_for_assignment): Fix pmf support.
187
188 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
189 (cp_convert_to_pointer): Handle pmfs.
190 (cp_convert): Pass pmfs to cp_convert_to_pointer.
191
192 * typeck.c (common_type): Handle inheritance for pmfs.
193
194 * typeck2.c (build_m_component_ref): Do access control.
195
196 * typeck.c (comp_target_types): Check for conversion to void *
197 before checking trickier conversions.
198
7215f9a0
MS
199 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
200
201 * pt.c (push_tinst_level): Complain if template instantiation depth
202 is greater than max_tinst_depth.
203
204 * typeck.c (common_type): Assume that we can call common_type to
205 unify the target type of a pointer.
206
207Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
208
209 * decl2.c (finish_file): Don't synthesize methods at
210 finish_vtable_prevardecl time. Do synthesize methods that are not
211 used, but are public and not external.
212
213 * cvt.c (build_type_conversion): Only give an error if for_sure.
214
215 * typeck.c (comp_target_types): Only support pointer conversions if
216 nptrs > 0.
217
218Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
219
220 * init.c (build_new): Catch use of an initializer list where it
221 shouldn't be.
222
223Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com>
224
225 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
226 non-constant.
227
228 * decl2.c: temp_name_counter is now public.
229
230 * decl.c (struct cp_function): Add temp_name_counter field.
231 (push_cp_function_context): Save it.
232 (pop_cp_function_context): Restore it.
233
234 * typeck.c (common_type): Handle unifying function types, and unify
235 unmatched things to void* with a compiler_error, rather than
236 silently like before.
237
28cbf42c
MS
238Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com>
239
240 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
241 Brendan's last change and fix latent problem that causes TD entries
242 to not come out when the things that need them has yet to be
243 expanded.
244
245Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
246
247 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
248 and type1, since we might have changed op0 or op1.
249
250Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com>
251
252 * typeck.c (common_type): Don't mess up templates.
253
254Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
255
256 * typeck.c (common_type): Handle ptms properly. Also handle
257 T* -> void*.
258 (build_binary_op_nodefault): New variable build_type controls what
259 type is given to the expression when it is created. Set this to
260 boolean_type_node for comparison ops instead of using result_type.
261 (comp_target_types): Allow T * -> void *.
262
263 * cvt.c (cp_convert_to_pointer): Do access control when converting
264 ptms, too.
265
266Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
267
268 * parse.y (extern_lang_string): Catch use of linkage specs that
269 aren't all naming the same language.
270
271 * class.c (finish_struct): Delete accidental duplicate code.
272
273Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
274
275 * typeck.c (build_binary_op_nodefault): Disable pedwarns about
276 comparing functions and incomplete types.
277
278 * decl.c (finish_function): Only unset current_function_decl if
279 !nested.
280 (duplicate_decls): Last change went too far; we only want to stop
281 checking for value/reference ambiguity.
282
283Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com>
284
285 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
286 out fresh, as the new type may be larger.
287
288Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
289
290 * expr.c (extract_init): Try to expand the RTL for the
291 initialization and figure out what it will look like so we can avoid
292 run-time initialization. Disabled for now.
293 (extract_scalar_init): Helper for scalar initialization.
294 (extract_aggr_init): Helper for aggregate initialization.
295
296 * decl.c (duplicate_decls): Don't complain about ambiguous
297 declarations.
298 (obscure_complex_init): Now returns a tree. Call extract_init if
299 we're optimizing and this is a toplevel decl.
300 (finish_decl): Update accordingly.
301
302 * lex.c (check_newline): If we're just changing files (not pushing
303 or popping), update input_file_stack->name.
304
305Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com>
306
307 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
308 in the transitive unification code.
309
310Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
311
312 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
313 non-functions.
314 (grokdeclarator): Don't allow friends to be defined in local classes.
315
316Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
317
318 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
319 rather than DECL_SAVED_INSNS to decide whether or not this method
320 was declared inline.
321
322 * method.c (synthesize_method): Turn off DECL_INLINE if
323 function_cannot_inline_p thinks we're too large.
324
325 * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
326
327Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
328
329 * class.c (instantiate_type): Handle pmfs.
330
331 * typeck.c (convert_for_assignment): Check types when assigning one
332 pmf to another.
333
334 * decl.c (define_label): Fix logic for printing out the name of the
335 label in an error message.
336
337 * error.c (dump_expr): Support ARRAY_REF.
338
339Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
340
341 * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
342 (finish_prevtable_vardecl): Instead of here.
343
344Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
345
346 * decl.c (expand_static_init): Also use expand_aggr_init if the
347 initializer is a TREE_LIST.
348 (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
349
350 * pt.c (unify): Fix unification of return type.
351
352 * expr.c (fixup_result_decl): Use store_expr, rather than
353 emit_move_insn, to move the return value into the place where
354 callers will expect it.
355
356Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
357
358 * init.c (build_offset_ref): Call assmble_external on functions.
359 * typeck.c (build_component_ref): Ditto.
360
361Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
362
363 * decl.c (struct saved_scope): Add members base_init_list and
364 member_init_list.
365 (push_to_top_level): Save current_base_init_list and
366 current_member_init_list to them.
367 (pop_from_top_level): Put it back.
368
369Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com>
370
371 * pt.c (instantiate_template): Call assemble_external.
372
373Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com)
374
375 * class.c: Include rtl.h, to get NULL_RTX.
376 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
377 on hosts with different sizes for each part of the union.
378 * tree.c: Also include rtl.h.
379 (layout_basetypes): Same change for DECL_SAVED_INSNS.
380
381Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
382
383 * pt.c (unify): Fix array domain unification for 64-bit targets.
384
385 * decl2.c (finish_file): Push bizarre type decl before walking the
386 vtables the first time.
387 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
388 with TREE_CHAIN (prev).
389
390 * init.c (emit_base_init): Use convert_pointer_to_real instead of
391 convert_pointer_to when converting to a direct base.
392
393Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com>
394
395 * pt.c (type_unification): Handle transitive unification better.
396
397Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com>
398
399 * decl2.c (walk_vtables): Always set prev to vars.
400 (mark_vtable_entries): Call assemble_external on the vtable entries.
401
402 * class.c (finish_struct): Set the vtable's size to NULL_TREE before
403 calling layout_decl, so that it gets updated properly.
404
405 Finally re-enable dynamic synthesis. This time it works.
406 * method.c (synthesize_method): Pass decl_function_context (fndecl)
407 to {push,pop}_cp_function_context.
408 * decl.c (push_cp_function_context): Now takes a tree argument.
409 (pop_cp_function_context): Ditto.
410 * call.c (build_method_call): Enable synthesis.
411 * lex.c (cons_up_default_function): Ditto.
412
413Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com>
414
415 * parse.y (setattrs): Chain onto prefix_attributes rather than
416 setting it.
417
418Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
419
420 * decl.c (pushdecl): Check if the type of the VAR_DECL is an
421 error_mark_node before trying to read TYPE_LANG_SPECIFIC.
422
b7484fbe
MS
423Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
424
425 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
426 and convert the size and integer_one_node to the index type.
427
428Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
429
430 * typeck.c (get_member_function_from_ptrfunc): Save the instance
431 argument, and tack it onto the front of the COND_EXPR to make the
432 semantics come out right. Grab the instance argument from
433 '*instance_ptrptr', rather than having it passed in separately.
434
435 * various: Change various consed-up comparison operations to have
436 boolean type. Remove the instance argument in calls to
437 get_member_function_from_ptrfunc.
438
439 * error.c (dump_expr): Dump true and false as "true" and "false".
440
441 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
442 global init function.
443
444 * decl.c (finish_function): Only set DECL_EXTERNAL here if the
445 inline function is public.
446
447Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com>
448
449 * init.c (is_friend): Be more careful about checking
450 DECL_CLASS_CONTEXT on non-member functions.
451
452 * decl2.c (finish_vtable_vardecl): Don't bother calling
453 assemble_external here.
454 (prune_vtable_vardecl): New function that just splices out the
455 vtable decl from the top-level decls.
456 (import_export_inline): Unset DECL_EXTERNAL at first.
457 (finish_file): Don't bother calling assemble_external here. Do
458 splice out all of the vtables.
459
460Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com>
461
462 * decl.c (finish_function): If we're not emitting the function yet,
463 call assemble_external for it.
464
465 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
466 here.
467 (finish_vtable_vardecl): Don't do the linkage deduction thing here.
468 Also don't splice out the current vtable if it is unused.
469 (finish_file): Move the second walk_vtables and the synthesis check
470 inside the 'reconsider' loop. Move thunk emission after the
471 'reconsider' loop.
472
473Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
474
475 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
476 was passing bogus values for readonly and volatile from the original
477 template decl, not the resultant type of the tsubst call.
478
479 * class.c (duplicate_tag_error): Use cp_error_at to point out the
480 previous definition of the tag.
481
482Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com>
483
484 * decl.c (start_function): Clear base_init_insns and protect_list.
485 (struct cp_function): Add base_init_insns field.
486 (push_cp_function_context): Also save base_init_insns.
487 (pop_cp_function_context): Also restore base_init_insns.
488
489Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
490
491 * init.c (member_init_ok_or_else): Check for initializing a static
492 member here.
493 (emit_base_init): Instead of here.
494
495Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com>
496
497 * call.c (build_method_call): Disable synthesis as needed.
498 * lex.c (cons_up_default_function): Ditto.
499
f6abb50a
BK
500Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
501
502 * parse.y: New rules to allow attributes in a prefix position.
503 (prefix_attributes): New variable. Pass it into cplus_decl_attributes.
504 (setattr): New rule.
505 (reserved_declspecs, declmods): Catch attributes here.
506 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
507 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
508 descendent typedef.
509 (grokdeclarator): Added code to support machine attributes.
510 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
511
b7484fbe
MS
512Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
513
514 * call.c (build_method_call): Don't synthesize methods outside of a
515 function.
516
517 Make base initialization more re-entrant so that synthesis on the
518 fly will work (and, eventually, template instantation on the fly).
519 * init.c (sort_member_init): Don't bother with members that can't be
520 initialized. Reorganize a bit. Don't initialize base members here.
521 (sort_base_init): New function, like sort_member_init, but for base
522 classes. Steals some code from emit_base_init.
523 (emit_base_init): Simplify. Call sort_{member,base}_init before
524 doing any initialization, so we don't have to save
525 current_{member,base}_init_list in push_cp_function_context.
526 (expand_aggr_vbase_init_1): Adjust for sort_base_init.
527 (expand_aggr_vbase_init): Simplify.
528 * decl.c (struct cp_function): Add protect_list field.
529 (push_cp_function_context): Also save protect_list.
530 (pop_cp_function_context): Also restore protect_list.
531 * call.c (build_method_call): Enable synthesis at point of call.
532 * lex.c (cons_up_default_function): Ditto.
533
534 * parse.y: Turn -ansi checks back into -pedantic checks.
535
536 * init.c (build_new): Fix -fcheck-new for array new.
537
538Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au>
539
540 * typeck.c (build_compound_expr): warn if left-hand operand of
541 comma expression has no side-effects.
542
543Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
544
545 * parse.y (primary): Change 'object qualified_id *' rules to 'object
546 overqualified_id *'.
547
548Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
549
550 * parse.y (unary_expr): Catch doing sizeof an overloaded function.
551 Make the error look the same as the one we issue in c_sizeof.
552
553 * typeck.c (build_binary_op_nodefault): Give an error for trying
554 to compare a pointer-to-member to `void *'.
555
556Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
557
558 * typeck.c (build_unary_op): Handle bool increment with smoke and
559 mirrors here, rather than in expand_increment where it belongs,
560 because Kenner doesn't agree with me.
561
562Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
563
564 * decl.c (grokparms): Catch a PARM_DECL being used for a default
565 argument as well.
566
567Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
568
569 * init.c (build_new): Don't allow new on a function type.
570
571 * parse.y (primary): Avoid a crash when seeing if the arg is of
572 the same type as that given for the typespec in an explicit dtor call.
573
574Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com>
575
576 * decl.c (finish_function): Change test for calling
577 mark_inline_for_output.
578
579Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
580
581 * typeck.c (build_modify_expr): Complain if
582 build_default_binary_type_conversion fails.
583
584 * init.c (expand_default_init): Handle arguments of unknown type
585 properly.
586
587 * cvt.c (build_expr_type_conversion): Only complain about ambiguity
588 if 'complain'.
589 * various: Pass 'complain'.
590
591 * typeck.c (comptypes): Be more picky about comparing UPTs.
592
593Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
594
595 * decl.c (grokdeclarator): If declarator is null, say that the
596 type used has an incomplete type.
597
598Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com>
599
600 * pt.c (instantiate_template): Copy the template arguments to the
601 permanent_obstack. Also use simple_cst_equal to compare them when
602 looking for a previous instantiation.
603
604 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
605 they are array domain types).
606
607Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
608
609 * cp-tree.h: Define WANT_* constants for passing to
610 build_expr_type_conversion.
611 * cvt.c (build_expr_type_conversion): New function to build
612 conversion to one of a group of suitable types.
613 (build_default_binary_type_conversion): Use it.
614 * decl2.c (grok_array_decl): Ditto.
615 * typeck.c (build_unary_op): Ditto.
616 (build_array_ref): Tidy up a bit.
617 (build_binary_op): Ditto.
618
619Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
620
621 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
622
623Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
624
625 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
626 reserved_declspecs' rule.
627
628 * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
629 (direct_notype_declarator): Ditto.
630 (complex_direct_notype_declarator): Add notype_qualified_id rule.
631
632 * lex.c (real_yylex): Handle :> digraph properly.
633
634Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
635
636 * decl.c (grokdeclarator): Check if it's a friend, not if it's
637 non-virtual, that's being initialized. Move the check up to
638 before FRIENDP would get cleared. Catch an unnamed var/field
639 being declared void. Say just `field' instead of `structure field'
640 in the error message. Only go for the operator name if DECLARATOR
641 is non-null.
642
643Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com>
644
645 * decl.c (start_function): Complain about abstract return type.
646 (grokdeclarator): Complain about declaring constructors and
647 destructors to be const or volatile. Complain about declaring
648 destructors to be static.
649
650 * pt.c (uses_template_parms): Handle pmfs.
651
652 * decl.c (grokdeclarator): Don't call variable_size for array bounds
653 that only depend on template constant parameters.
654
655Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
656
657 * error.c (dump_decl): Only look to see if it's a vtable if we
658 actually have a name to check out.
659
660Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com>
661
662 * cvt.c (convert_to_aggr): Lose misleading shortcut.
663
664Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com>
665
666 * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
667 not just for dwarf.
668
669Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
670
671 * decl.c (grokdeclarator): Don't allow a static member to be
672 declared `register'.
673
674 * init.c (make_friend_class): Move up to a pedwarn for the warning
675 about a class declaring friends with itself.
676
677 * decl.c (grokdeclarator): You can't do `volatile friend class foo'
678 or `inline friend class foo'. Only try to make a friend out of
679 TYPE if we didn't already reset it to integer_type_node.
680
681Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
682
683 * decl.c (grokdeclarator): Don't allow initialization of a
684 non-virtual function.
685
686 * decl.c (start_function): Do a pedwarn if we're changing `main'
687 to have an int return type.
688
689Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
690
691 * typeck.c (build_modify_expr): Handle simple assignment from
692 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew.
693
694Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
695
696 * decl.c (grokdeclarator): Also don't allow virtual outside of a
697 class decl for a scope method definition performed at global binding.
698
699 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
700 of a bitfield.
701
702 * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
703
704 * typeck.c (build_binary_op): Return an error_mark_node if either
705 one of the args turned into an error_mark_node when we tried to
706 use default_conversion.
707
708 * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
709
710 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
711 used on `__wchar_t'.
712
713Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com>
714
715 * except.c (end_protect_partials): Do it the right way.
716
717Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com>
718
719 * typeck.c (build_binary_op_nodefault): Upgrade warning about
720 comparing distinct pointer types to pedwarn.
721
722 * typeck2.c (digest_init): Cope with extra braces.
723
724 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
725 of INT_CST_LT (..., interger_zero_node).
726
727Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
728
729 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
730 function for systems that don't have EH.
731
732Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
733
734 * call.c (can_convert_arg): Like can_convert, but takes an arg as
735 well.
736
737 * pt.c (type_unification): Allow implicit conversions for parameters
738 that do not depend on template parameters.
739
1b65f56d
DR
740Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu)
741
742 * Make-lang.in, config-lang.in: ($exeext): New macro.
743 * Make-lang.in: Try a "cp" if "ln" fails.
744 * cp-tree.h (decl_attributes): Added argument.
745 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
746 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
747 Modified spawnvp to have to correct number of arguments for OS/2, NT.
748
b7484fbe
MS
749Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com>
750
751 * decl.c (finish_function): Add calls to end_protect_partials to end
752 the exception region that protects constructors so that partially
753 constructed objects can be partially destructed when the constructor
754 throws an exception.
755 * init.c (perform_member_init, sort_member_init, emit_base_init):
756 Added support for partially constructed objects.
757 * init.c (build_partial_cleanup_for): New routine to do partial
758 cleanups of a base class.
759 * decl2.c (finish_file): Move the emitting of the exception table
760 down, after we emit all code that might have exception regions in
761 them.
762 * except.c (end_protect_partials, might_have_exceptions_p): New
763 routines.
764 (emit_exception_table): Always output table if called.
765 * cp-tree.h (protect_list, end_protect_partials,
766 might_have_exceptions_p, emit_exception_table): Added.
767
768Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
769
770 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
771 address of a local variable.
772 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
773 were given a non-null PTR_TO_INSTPTR.
774
775Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com>
776
777 * decl.c (duplicate_decls): Always lay out the merged decl.
778
779 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
780 (finish_prevtable_vardecl): Ditto.
59be85d7 781
b7484fbe
MS
782 * method.c (synthesize_method): Set interface_{unknown,only}
783 according to the settings for our class, not the file where it comes
784 from.
59be85d7 785
b7484fbe 786Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com>
3a887df4 787
b7484fbe 788 * except.c: Handle systems that define __i386__ but not __i386.
3a887df4 789
e3417fcd
MS
790Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
791
792 * decl2.c (reparse_decl_as_expr): Support being called without a
793 type argument.
794
795 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r
796 conflicts. Sigh.
797
798Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com>
799
800 * parse.y (template_def, fndef, fn.def1, return_init, condition,
801 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
802 component_decl_1, after_type_component_declarator0,
803 notype_component_declarator0, after_type_component_declarator,
804 notype_component_declarator, after_type_component_declarator,
805 full_parm, maybe_raises, exception_specification_opt): Fix up,
806 include exception_specification_opt maybeasm maybe_attribute and
807 maybe_init if missing. Rename maybe_raises to
808 exception_specification_opt to match draft wording. Use maybe_init
809 to simplify rules.
810
811Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com>
812
813 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
814 built for news of scalar types.
815
816Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com>
817
818 * typeck.c (build_binary_op_nodefault): Update code for warning
819 about signed/unsigned comparisons from C frontend. Realize that the
820 code in the C frontend is, if anything, even more bogus. Fix it.
821 (build_binary_op): Undo default_conversion if it wasn't useful.
822
823 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
824 PRE*CREMENT_EXPR.
825
826 * decl2.c (import_export_vtable): Don't try the vtable hack
827 if the class doesn't have any real non-inline virtual functions.
828 (finish_vtable_vardecl): Don't bother trying to find a non-inline
829 virtual function in a non-polymorphic class.
830 (finish_prevtable_vardecl): Ditto.
831
832 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
833
834 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
835
836 * init.c (expand_virtual_init): Always call assemble_external.
837
838 * class.c (build_vfn_ref): Always call assemble_external.
839 (build_vtable): Always call import_export_vtable.
840 (prepare_fresh_vtable): Ditto.
841 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
842
8ccc31eb
MS
843Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com>
844
845 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
846 whether an enumerated type fits in a bitfield.
847
848Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
849
850 * class.c (grow_method): Update method_vec after growing the class
851 obstack.
852
853Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com>
854
855 * parse.y (handler_seq): Push a level for the catch parameters.
856
857Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
858
859 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
860 bases, in case they've been clobbered.
861
862Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com>
863
864 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
865 so that one day it will always be valid.
866 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
867
868 * cp-tree.h (copy_binfo): Removed, unused.
869 * tree.c (copy_binfo): Ditto.
870
871Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com>
872
873 * init.c (build_new): Save the allocation before calling
874 expand_vec_init on it.
875
876 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
877 match the TYPE_PRECISION of the underlying type for constant folding
878 to work.
879
880Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com>
881
882 * except.c (push_eh_entry, expand_start_all_catch,
883 expand_leftover_cleanups, expand_end_catch_block): Keep track of
884 the context in which the exception region occurs.
885 (build_exception_table): If the region was not output, don't output
886 the entry in the eh table for it.
887
888Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com>
889
890 * init.c (expand_default_init): Only use a previous constructor call
891 if it's a call to our constructor. Does the word "Duh" mean
892 anything to you?
893
894 * decl.c (grokparms): Fine, just don't call
895 convert_for_initialization at all. OK? Happy now?
896
897Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com>
898
899 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
900 method vector has a second element before returning it.
901
902 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
903 convert_for_initialization.
904
905Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com>
906
907 * typeck.c (build_modify_expr): Compare function name to
908 constructor_name (current_class_type) instead of current_class_name.
909
910 * decl.c (grokparms): Don't do anything with the return value of
911 convert_for_initialization.
912
913 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
914
915 * decl.c (duplicate_decls): Tweak error message.
916
917 * typeck.c (build_const_cast): Implement checking.
918 (build_reinterpret_cast): Implement some checking.
919
920 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
921 converting to the same aggregate type.
922 (CONV_STATIC_CAST): Include it.
923 (CONV_C_CAST): Ditto.
924 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
925 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
926
927Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com>
928
929 * typeck.c (build_c_cast): Use non_lvalue to tack something on
930 where necessary.
931
932 * decl.c (auto_function): Now a function.
933 * except.c (init_exception_processing): terminate, unexpected,
934 set_terminate, and set_unexpected have C++ linkage.
935
936 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
937 truthvalue_conversion for converting to bool, as it handles
938 user-defined conversions properly.
939 (condition_conversion): Ditto.
940
941 * except.c (expand_throw): Don't call convert_to_reference.
942 Pass the correct parameters to build_new.
943
944 * method.c (do_build_assign_ref): Don't use access control when
945 converting to a base reference here.
946 (do_build_copy_constructor): Or here.
947
948 * init.c (build_new): Unset TREE_READONLY on the dereferenced
949 pointer before assigning to it.
950
951 * decl.c (maybe_build_cleanup): Don't bother stripping const here.
952
953 * decl2.c (delete_sanity): You can now delete pointer to const.
954
955Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com>
956
957 * decl.c (finish_function): Don't rely on actual parameters being
958 evaluated left-to-right.
959 * except.c (expand_end_catch_block): Ditto.
960
961Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
962
963 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
964 considered lvalues.
965 * cvt.c (convert_to_reference): Use real_lvalue_p instead of
966 lvalue_p.
967
968 * cvt.c (build_type_conversion_1): Don't call convert on aggregate
969 types.
970 (convert_to_reference): Fix erroneous text substitution.
971
972 * typeck2.c (initializer_constant_valid_p): Update from C frontend.
973 Add new argument to all callers.
974
975 * typeck.c (convert_arguments): Check for error_mark_node before
976 trying to do anything with the actual parameter.
977
978 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
979 fold it.
980 (bool_truthvalue_conversion): Remove. Fix all callers to call
981 truthvalue_conversion instead.
982 (various): Fold CLEANUP_POINT_EXPRs.
983
984 * parse.y (conditions): Call condition_conversion rather than
985 building up a CLEANUP_POINT_EXPR.
986
987 * pt.c (end_template_decl): Don't warn_if_unknown_interface here
988 under -falt-external-templates.
989
990Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
991
992 * init.c (build_new): Complain about new of const type without
993 initializer. Other cleanup.
994
995 * call.c (compute_conversion_costs): Don't call
996 build_type_conversion with a reference type; convert to the target
997 type and check its lvaluetude.
998 * cvt.c (convert_to_reference): Ditto.
999
1000 * cvt.c (build_type_conversion_1): There will never be any need to
1001 dereference references here now.
1002
1003Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com>
1004
1005 * except.c (expand_builtin_throw): Make sure we only `use' the
1006 value of return_val_rtx.
1007
1008Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1009
1010 * parse.y (structsp): Don't complain about declaring a type being
1011 defined to be a friend.
1012
1013 * decl2.c (warn_if_unknown_interface): Note the template in question
1014 and the point of instantiation, for -falt-external-templates.
1015 * lex.c (reinit_parse_for_method): Pass the decl to
1016 warn_if_unknown_interface.
1017 * pt.c (instantiate_template): Ditto.
1018 (end_template_decl): Ditto.
1019
1020 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
1021 nested name again, to make local classes work a bit better.
1022
1023 * typeck.c (build_function_call_real): Dereference reference after
1024 checking for incomplete type.
1025
1026 * init.c (build_new): Accept new of const and volatile types.
1027
1028Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com>
1029
1030 * decl.c (grokdeclarator): Fix error message.
1031
1032Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1033
1034 * typeck.c (convert_for_initialization): Do bash arrays when
1035 converting to a reference to non-array.
1036
1037Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1038
1039 * cvt.c (cp_convert): Don't call convert_to_reference, or
1040 automatically dereference references. Do pass reference conversions
1041 to cp_convert_to_pointer.
1042 (cp_convert_to_pointer): Support references.
1043
1044 * call.c (build_method_call): Don't build up a reference to the
1045 parameter here; let build_overload_call handle that.
1046
1047 * typeck.c (build_c_cast): Call convert_to_reference directly if
1048 converting to a reference type.
1049 * method.c (do_build_copy_constructor): Ditto.
1050 * method.c (do_build_copy_constructor): Ditto.
1051 (do_build_assign_ref): Ditto.
1052
1053 * call.c (build_method_call): Dereference a returned reference.
1054 * typeck.c (build_function_call_real): Ditto.
1055
1056 * decl.c (xref_basetypes): Check for unions with basetypes here.
1057 (xref_tag): Instead of here.
1058
1059 * pt.c (process_template_parm): Template type parm decls are
1060 artificial.
1061
1062Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1063
1064 * parse.y (typed_declspecs): Add missing semicolon.
1065 (do_xref_defn): Resurrect.
1066 (named_class_head_sans_basetype): Move template specialization
1067 definition cases to named_class_head_sans_basetype_defn.
1068
1069 * decl2.c (grokfield): Call pushdecl_class_level after setting the
1070 TYPE_NAME, not before.
1071
1072Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1073
1074 * call.c (convert_harshness): Don't call sorry here. Don't allow
1075 conversions between function pointer types if pedantic.
1076
1077 * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
1078
1079 * lex.c (cons_up_default_function): Use the full name for the return
1080 type of op=.
1081
1082 * decl.c (set_nested_typename): Don't worry about anonymous types,
1083 as they already have a unique name.
1084 (pushdecl): Remove redundant set_nested_typename
1085 (xref_tag): Split out base handling into xref_basetypes.
1086
1087 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
1088 not considered incomplete even though their definition is unknown.
1089
1090 * decl.c (xref_defn_tag): Lose.
1091 (xref_tag): xref_next_defn = ! globalize.
1092 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The
1093 ones that should have it set will have it set by pushtag.
1094 (pushdecl_class_level): Ditto.
1095 (pushtag): Tidy up a bit.
1096 (set_nested_typename): Push a decl for the nested typename from
1097 here, rather than from xref_defn_tag.
1098
1099 * parse.y (do_xref): Lose.
1100 (named_class_head): If we see 'class foo:' we know it's a
1101 definition, so don't worry about base lists for non-definitions.
1102
1103 * pt.c (push_template_decls): Template parm decls are artificial.
1104
1105 * decl.c (duplicate_decls): Restore check for qualifier
1106 disagreement for non-functions.
1107 (decls_match): Remove check for qualifier disagreement.
1108
1109Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1110
1111 * decl.c (grok_reference_init): Convert initializer from
1112 reference.
1113 * typeck.c (convert_for_initialization): Ditto.
1114
1115 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
1116
1117 * cvt.c (cp_convert): Don't convert to the same class type by just
1118 tacking on a NOP_EXPR.
1119 (convert_to_reference): Use comp_target_types instead of comptypes
1120 so that we don't allow conversions two levels down.
1121
1122Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1123
1124 * class.c (build_vbase_path): Bash types to make the backend happy.
1125 * cvt.c (build_up_reference): Bash the types bashed by
1126 build_vbase_path to be reference types instead of pointer types.
1127 (convert_to_reference): Ditto.
1128
1129 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
1130 reference type.
1131
1132 * parse.y (structsp): Put back error for 'struct B: public A;'.
1133
1134Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com>
1135
1136 * except.c: Add support for mips systems that don't define __mips
1137 but do define mips, like Ultrix.
1138
1139Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com>
1140
1141 * except.c: Add support for exception handling on the Alpha.
1142
1038f4f9
MS
1143Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com>
1144
1145 * decl2.c (finish_file): Fix bug in Jan 31st change.
1146
1147Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu)
1148
1149 * sig.c (build_signature_pointer_or_reference_type): Don't set
1150 IS_AGGR_TYPE for signature pointers/reference so expand_default_init
1151 doesn't expect to find a copy constructor.
1152 * call.c (build_method_call): Treat signature pointers/reference
1153 as if IS_AGGR_TYPE were set.
1154
d18c083e
MS
1155Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com>
1156
1157 * gc.c (get_typeid): Pawn off error messages to build_t_desc.
1158 (build_t_desc): Inform the user here if they try and build
1159 with -frtti and don't include <typeinfo.h>.
1160
1161 * decl2.c (finish_prevtable_vardecl): Support rescanning.
1162 (finish_file): Move finish_prevtable_vardecl up to before the global
1163 initializers are done as tdecls are initialized in the global
1164 initializer. Also Pick up any new tdecls or vtables needed by
1165 synthesized methods.
1166
1167 * class.c (finish_struct): Simplify. We have to do rtti scanning at
1168 end, so we might as well do all of it there.
1169
1170Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1171
1172 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
1173 targets, too.
1174
1175Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com>
1176
1177 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
1178 finish_vtable_vardecl. It has the first half functionality from
1179 that routine.
1180 * decl2.c (finish_vtable_vardecl): Update to not include stuff not
1181 in finish_prevtable_vardecl.
1182 * decl2.c (finish_file): Call finish_prevtable_vardecl.
1183 * gc.c (build_generic_desc): Allow it to be called when not at the
1184 global binding layer, but behave as if we were.
1185 (build_t_desc): Rearrange a bit so that it really works and is
1186 easier to follow.
1187 * class.c (finish_struct): Don't decide on tdecls here, as we have
1188 to wait until the end of the file in general to decide whether or
1189 not they come out.
1190
1191Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1192
1193 * init.c (build_delete): Check access to operator delete before
1194 calling the destructor.
1195 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
1196 return error_mark_node.
1197 * call.c (build_method_call): Use the one-argument op delete even if
1198 it's an error.
1199
1200 * init.c (build_new): Fix -fthis-is-variable support.
1201 * call.c (build_method_call): Ditto.
1202
1203 * call.c (convert_harshness): Make conversion from a pointer to bool
1204 worse than conversion to another pointer.
1205
1206Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1207
1208 * init.c (build_new): Check new return value if -fcheck-new.
1209
1210 * lex.c (check_newline): Clear end_of_file when we're done, too.
1211
1212Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com>
1213
1214 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
1215 vtables whereever they go.
1216
1217 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
1218 right.
1219
1220Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com>
1221
1222 * decl2.c (finish_vtable_vardecl): Now set the
1223 interface/implementation of vtables on the first virtual function,
1224 if one exists, otherwise we use the old method. This is a major win
1225 in terms of cutting down the size of objects and executables in
1226 terms of text space and data space. Now most of the savings that
1227 #pragma interface/implementation gives is automatic in a fair number
1228 of cases.
1229
1230Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1231
1232 * decl.c (grokdeclarator): Discard the template parameters in a
1233 template constructor declaration so that the function is always
1234 named constructor_name (ctype).
1235
1236 * lex.c (check_newline): Use ungetc to put back the character before
1237 calling HANDLE_PRAGMA.
1238
1239Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com>
1240
1241 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
1242 make sure we still match them.
1243
1244Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1245
1246 * parse.y: Add END_OF_LINE token.
1247
1248 * lex.c (check_newline): Set linemode when we see a # directive, and
1249 unset it when we're done. Turn all 'return's into 'goto skipline'.
1250 Fix all uses of '\n', since we won't see it anymore. Put back the
1251 character we read before checking for a sysv or target pragma.
1252 (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
1253 (handle_sysv_pragma): Don't look at the input stream; quit when we
1254 see an END_OF_LINE token.
1255
1256 * input.c (getch): Return EOF if we're in line mode and at the end
1257 of a line.
1258 (put_back): Don't put back an EOF.
1259
1260Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com>
1261
1262 * except.c (expand_throw): Do the newing of the exception object
1263 before we load the type descriptor or the address so that we don't
1264 wipe any of the values out.
1265
1266Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com>
1267
1268 * except.c (init_exception_processing): Don't use r12 on the rs6000.
1269
1270Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1271
1272 * decl.c (grokparms): Don't try to build up a reference at this point.
1273
1274 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
1275 will suffice to convert from integer_zero_node.
1276
b7484fbe
MS
1277Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu)
1278
1279 * class.c (instantiate_type): Change error message text.
1280 * typeck2.c (store_init_value): Likewise.
1281
e1cd6e56
MS
1282Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com>
1283
1284 * pt.c (tsubst): When we copy a node, don't forget to copy
1285 TREE_CHAIN, we use it later.
1286
1287Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1288
1289 * typeck.c (convert_for_assignment): Initialize variable before use.
1290
1291Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1292
1293 * g++.c (main): Link with both libstdc++ and libg++ if called as
1294 something ending with "g++", otherwise only libstdc++. Move -lm to
1295 the end of the line.
1296
1297Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1298
1299 * call.c (build_method_call): Don't mess with 'this' before calling
1300 compute_conversion_costs.
1301
1302Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1303
1304 * search.c (get_matching_virtual): Give line number for previous
1305 declaration.
1306
1307 * call.c (convert_harshness): Handle conversions to references
1308 better.
1309
1310 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
1311
1312Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com>
1313
1314 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
1315 as the TREE_CHAIN for methods will take us to the next differently
1316 named function, DECL_CHAIN won't.
1317
1318Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1319
1320 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
1321
1322 * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
1323 warn_parentheses defaults to 0.
1324
1325 * decl.c (grokparms): Put back call to require_instantiated_type.
1326
1327Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com>
1328
1329 * except.c (exception_section): Use the data section on the rs6000.
1330 Change calling convention for named_section.
1331
1332Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au>
1333
1334 * cp-tree.h : Make if (x=0) warn with wall
1335 * parse.y : Make if (x=0) warn with wall
1336
255512c1
JM
1337Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1338
e1cd6e56
MS
1339 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
1340 BITS_PER_UNIT otherwise.
1341
1342 * search.c (get_matching_virtual): Don't check the binfo if the
1343 types are the same.
1344
1345 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
255512c1
JM
1346 bool.
1347
1348Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1349
e1cd6e56
MS
1350 * various: Use boolean_type_node, boolean_true_node,
1351 boolean_false_node.
1352
1353 * search.c (get_matching_virtual): Allow covariant returns that
1354 don't require pointer adjustment.
1355
1356 * typeck.c (build_conditional_expr): Don't call default_conversion
1357 on ifexp.
1358
1359 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
1360
1361 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
1362
1363Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman)
1364
1365 * pt.c (do_function_instantiation): Free targs once we're done.
255512c1
JM
1366
1367Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1368
e1cd6e56
MS
1369 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
1370 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
1371 for bool.
1372
1373Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1374
1375 * decl2.c (finish_file): We need to mess up if there are any
1376 variables in the list, not just if there is one with a constructor.
1377
1378Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1379
1380 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
1381 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
1382 (finish_function): Trust rest_of_compilation.
1383
1384 * decl2.c (finish_file): Also call functions designated as static
1385 constructors/destructors.
1386
1387 * decl.c (grokdeclarator): Allow access decls of operator functions.
1388 (grokparms): Only do convert_for_initialization if the initializer
1389 has a type.
1390 (duplicate_decls): Put back push_obstacks_nochange call.
1391
1392 * lex.c (real_yylex): Downgrade complaint about the escape sequence
1393 being too large from pedwarn to warning.
1394
1395 * decl.c (grokdeclarator): Don't complain about long long in system
1396 headers.
1397
1398 * lex.c (real_yylex): Handle digraphs.
1399
1400Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1401
1402 * decl.c (init_decl_processing): -f{no-,}strict-prototype only
1403 affects C linkage declarations now.
1404
1405 * typeck.c (comp_target_types): Grok simple contravariant conversions.
1406 (common_type): t1 and t2 are interchangeable.
1407
1408 * various: Test return value of comp_target_types differently in
1409 different places; it now returns -1 for a contravariant conversion
1410 (which is fine in symmetric cases).
1411
1412 (common_type): Prefer long double to double even when
1413 they have the same precision.
1414
1415 * decl.c (grokparms): Call convert_for_initialization to check
1416 default arguments.
1417
1418 * init.c (build_new): void_type_node has a size (of 0).
1419
1420 * decl.c (decls_match): Also check for agreement of TREE_READONLY
1421 and TREE_THIS_VOLATILE.
1422 (push_class_level_binding): Properly handle shadowing of
1423 nested tags by fields.
1424
1425 * search.c (dfs_pushdecls): Ditto.
1426
1427 * decl2.c (finish_file): Don't second-guess self-initialization.
1428
1429 * cvt.c (convert_to_reference): Work with expr directly, rather than
1430 a copy.
1431
1432 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
1433
1434 * init.c (add_friend): Downgrade duplicate friend message from
1435 pedwarn to warning.
1436
1437 * decl.c (duplicate_decls): Push obstacks before calling common_type.
1438
1439Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il>
1440
1441 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
1442 exception table labels.
1443 (expand_start_all_catch): Ditto.
1444 (expand_leftover_cleanups): Ditto.
1445 (expand_end_catch_block): Ditto.
1446 * except.c (make_first_label): new function.
1447 (expand_start_all_catch): add a call to make_first_label() before
1448 using a label as a jump destination.
1449 (expand_end_all_catch): Ditto.
1450 (expand_leftover_cleanups): Ditto.
1451 (expand_end_catch_block): Ditto.
1452 (expand_builtin_throw): Ditto.
1453 (expand_throw): Ditto.
1454 * except.c: Add ARM processor support for exception handling.
1455
1456Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1457
1458 (complete_array_type): Copy code from C frontend.
1459
1460 * lex.c (real_yylex): Don't multiply the length of a wide string
1461 literal by WCHAR_BYTES.
1462
1463 * decl.c (pushdecl): Check for redeclaration of wchar_t here.
1464 (duplicate_decls): Instead of here.
1465 (define_label): Complain about a label named wchar_t.
1466 (grokdeclarator): Complain about declarations of
1467 operator-function-ids as non-functions.
1468
1469 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
1470 COMPOUND_EXPRs.
1471 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
1472
1473 * lex.c (real_yylex): Don't skip whitespace when reading the next
1474 character after ->.
1475
1476Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com>
1477
1478 * except.c: Allow cc1plus to be built with native compiler on rs6000.
1479 (expand_start_all_catch): Add assemble_external calls for various
1480 routines we call.
1481 (expand_leftover_cleanups): Ditto.
1482 (expand_start_catch_block): Ditto.
1483 (do_unwind): Ditto.
1484 (expand_builtin_throw): Ditto.
1485
1486Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1487
1488 * decl.c (pushtag): Only look for a previous decl in the current
1489 binding level. Use explicit global scope in DECL_NESTED_TYPENAME.
1490
1491 * gxx.gperf: Add __signature__ and __sigof__ keywords.
1492
1493 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It
1494 does set flag_no_gnu_keywords and flag_operator_names.
1495
1496 * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
1497 Unset extension keywords if -fno-gnu-keywords.
1498 Allow operator names ('bitand') if -foperator-names.
1499 Never unset 'asm'; -fno-asm only affects 'typeof'.
1500
1501 * decl.c (lookup_name_real): The got_object special lookup only
1502 applies to types.
1503
1504Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1505
1506 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
1507
1508 * parse.y (primary): Unset got_object after all rules that use the
1509 'object' nonterminal.
1510 (object): Set got_object.
1511
1512 * lex.h: Declare got_object.
1513
1514 * decl.c (lookup_name_real): Also lookup names in the context of an
1515 object specified.
1516
1517Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com>
1518
1519 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
1520 for things that have to be added to pointers, not size_type. Cures
1521 problems with pointer to members on Alphas.
1522 (build_binary_op_nodefault): Ditto.
1523 (get_delta_difference_: Ditto.
1524 (build_ptrmemfunc): Ditto.
1525
1526Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1527
1528 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
1529 it.
1530
1531 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
1532 when dealing with overloaded member functions; just act like
1533 build_offset_ref.
1534 (commonparms): Remove misleading comment.
1535
1536 * decl.c (duplicate_decls): Complain about repeated default
1537 arguments here.
1538 (redeclaration_error_message): Instead of here.
1539 (pushdecl): Complain about missing default arguments here.
1540 (grokparms): Instead of here.
1541 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
1542 (grok_reference_init): Do not complain about missing initializer if
1543 declared 'extern'.
1544
1545 * search.c (lookup_field): Don't return a TYPE_DECL if there is a
1546 function alternative and want_type is not set.
1547
1548Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1549
1550 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push
1551 the decl when the type has no TYPE_NAME.
1552 (lookup_nested_type): Don't assume that type has TYPE_NAME set.
1553 (lookup_name_real): Call lookup_field with want_type =
1554 prefer_type.
1555
1556 * search.c (lookup_field): Handle want_type properly in the presence
1557 of fields with the same name.
1558
1559 * decl.c (set_nested_typename): Set nested name for file-scope types
1560 to include leading ::.
1561 (pushdecl): Set the nested typename if the decl doesn't have one,
1562 rather than if the type's canonical decl doesn't have one.
1563
1564Mon Jan 9 16:48:16 1995 Steve Chamberlain (sac@jonny.cygnus.com)
1565
1566 * typeck.c (pointer_int_sum): Use offset size when calculating
1567 index expression.
1568
1569Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1570
1571 * typeck.c (convert_for_assignment): Complain about contravariance
1572 violation here.
1573 (comp_target_types): Instead of here.
1574 (build_unary_op): resolve_offset_ref before checking for a valid
1575 type.
1576
1577 * spew.c (yylex): Decrement looking_for_typename after we see a
1578 _DEFN.
1579
1580 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
1581 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
1582
1583 * typeck.c (convert_for_assignment): Converting pointers to bool
1584 does not need a cast.
1585
1586Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1587
1588 * class.c (instantiate_type): Initialize nsubsts parm.
1589
1590 * pt.c (do_function_instantiation): Ditto.
1591
1592Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1593
1594 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
1595 DECL_SAVED_INSNS to determine whether or not we've seen a definition
1596 of this function.
1597 (instantiate_template): Ditto.
1598
1599 * call.c (convert_harshness): Allow const reference binding when
1600 called from the overloading code, but not when called from
1601 can_convert (since it isn't a conversion).
1602 (convert_harshness): Put back some disabled code.
1603
1604Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1605
1606 * call.c (convert_harshness): There is no implicit conversion from
1607 void* to other pointer types (unless the parameter is (void*)0).
1608 (convert_harshness): Non-lvalues do not convert to reference types.
1609
1610 * class.c (finish_struct_methods): Still set
1611 TYPE_HAS_{INT,REAL}_CONVERSION.
1612
1613 * call.c (can_convert): Don't use aggregate initialization.
1614
1615 * cp-tree.h: Declare lookup_conversions.
1616
1617Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com>
1618
1619 * parse.y (simple_stmt): Fix duplicate case value error messages to
1620 be more readable.
1621
1622Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1623
1624 * cvt.c (build_type_conversion): Total rewrite to use
1625 convert_harshness instead of reproducing conversion logic here. Now
1626 much shorter.
1627
1628 * call.c (convert_harshness): Support conversions to bool.
1629 (can_convert): Checks whether a conversion is less harsh
1630 than USER_CODE, for build_type_conversion.
1631
1632 * search.c (add_conversions): Function for passing to dfs_walk which
1633 adds all the type conversion operators in the current type to a list.
1634 (lookup_conversions): Calls dfs_walk with add_conversions and return
1635 the list.
1636 (dfs_walk): Don't require a qfn.
1637
1638 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
1639 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
1640
1641 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
1642 (grow_method): A separate function for building onto the growing
1643 method vector.
1644 (finish_struct_methods): Use it. Put all type conversion operators
1645 right after the constructors. Perhaps we should sort the methods
1646 alphabetically?
1647
1648Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
1649
1650 * call.c (build_method_call): Lose another misleading shortcut.
1651
1652Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com>
1653
1654 * gc.c (build_bltn_desc): Handle bool as a built-in type.
1655
1656Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com>
1657
1658 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
1659 on the complete type because of small virtual bases.
255512c1 1660
8145f082
MS
1661Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com>
1662
1663 * decl.c (n_incomplete): Bump n_incomplete up to int to match C
1664 front end.
1665 (pushdecl): Also count decls pushed that are of a type being defined
1666 as incomplete things.
1667 * class.c (finish_struct): Move hack_incomplete_structures up to
1668 just after we set it as not being defined, so that the decls we
1669 build for RTTI don't count as incomplete.
1670
1671Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com>
1672
1673 * pt.c (tsubst): Fix problem with defining constructors in templated
1674 classes with virtual bases.
1675
1676Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com>
1677
1678 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
1679 expressions.
1680 * gc.c (build_typeid): Ditto.
1681
1682Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com>
1683
1684 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
1685 don't assert on complex AGGR inits.
1686
1687Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com>
1688
1689 * method.c (build_overload_value): Handle pointer to members as
1690 template arguments.
1691
1692Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com>
1693
1694 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
1695 to do take the address of a data member for a pointer to data
1696 member.
1697
1698Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com>
1699
1700 * decl.c (grokdeclarator): Use the typedef name for linkage if the
1701 type doesn't otherwise have a name.
1702
1703 * decl2.c (grokfield): Ditto.
1704
1705 * class.c (finish_struct): Since we reuse the TYPE_DECL for the
1706 DECL_NAME of enums, structs and classes, we have to avoid trying to
1707 put it in the TYPE_FIELDS again.
1708
1709Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com>
1710
1711 * decl2.c (check_classfn): Ignore this parameter on static functions
1712 when checking to see if we match.
1713
1714Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com>
1715
1716 * typeck.c (unary_complex_lvalue): Handle address of non-left most
1717 pointers to members by calling get_delta_difference.
1718
5edb8b93
MS
1719Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com>
1720
1721 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
1722 static functions to early.
1723
1724Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com>
1725
1726 * method.c (make_thunk): Handle encoding of positive thunk offsets.
1727
1728Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com>
1729
1730 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
1731
6060a796
MS
1732Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com>
1733
1734 * decl2.c (check_classfn): Use decls_match to check if this has
1735 already been declared, as the DECL_ASSEMBLER_NAME may have been
1736 changed via asm("new_name").
1737 * decl.c (decls_match): Make public.
1738
1739Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com>
1740
1741 * *.[chy] (expand_aggr_init) Add fourth argument to handle
1742 distinction between = init and (init) style of initializations.
1743 * *.[chy] (finish_decl): Add fifth argument to to handle
1744 distinction between = init and (init) style of initializations.
1745
1746Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com>
1747
1748 Fix some random `explicit' bugs.
1749
1750 * cvt.c (convert_to_reference): Add third parameter to
1751 convert_force.
1752 (convert_force): Ditto.
1753 * call.c (build_method_call): Ditto.
1754 * decl2.c (setup_vtbl_ptr): Ditto.
1755 * init.c (expand_virtual_init): Ditto.
1756 (build_member_call): Ditto.
1757 (build_delete): Ditto.
1758 (build_vbase_delete): Ditto.
1759 * typeck.c (build_component_addr): Ditto.
1760 (build_c_cast): Ditto.
1761 (build_modify_expr): Ditto.
1762 * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
1763 distinguish the context in which the conversion appears. Add thrid
1764 argument to build_c_cast.
1765 * cvt.c (cp_convert): Pass whether or not we want to consider
1766 non-converting constructors down to build_method_call.
1767 * decl2.c (reparse_absdcl_as_casts): Add third argument to
1768 build_c_cast.
1769 * gc.c (build_m_desc): Ditto.
1770 * init.c (build_new): Ditto.
1771 * parse.y (expr_no_commas): Ditto.
1772 (primary): Ditto.
1773 * typeck.c (build_x_function_call): Ditto.
1774 (build_static_cast): Ditto.
1775 (build_reinterpret_cast): Ditto.
1776 (build_const_cast): Ditto.
1777 (build_c_cast): Ditto.
1778 (build_ptrmemfunc): Ditto.
1779 * typeck2.c (build_functional_cast): Ditto.
1780 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
1781 expand_aggr_init_1 as inits are converted to the destination type.
1782
1783Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1784
1785 * Make-lang.in (cc1plus): Depends on c-pragma.o.
1786
1787 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
1788
1789 * lex.c (check_newline): If the #pragma is not recognized by g++,
1790 try machine-specific ones too.
1791 (handle_sysv_pragma): Copied from c-lex.c.
1792
1793Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com>
1794
1795 * except.c (expand_throw): Fix Dec 6th change, build_new likes a
1796 reference better.
1797
1798Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1799
1800 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
1801 IS_AGGR_TYPE, since now they will not both be set on the same type.
1802
1803 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
1804 instantiations controlled by -fexternal-templates.
1805
1806 * decl.c (duplicate_decls): Don't complain about different values of
1807 __attribute__ ((const)) and ((noreturn)).
1808
81cdf787
DE
1809Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com>
1810
1811 * Makefile.in (BISONFLAGS): Delete --yacc.
1812 (PARSE_H): Depend on $(PARSE_C), for parallel makes.
1813 (PARSE_C): Undo last patch.
1814
30ffea6b
MS
1815Fri Dec 2 10:44:36 1994 Mike Stump (mrs@wombat.gnu.ai.mit.edu)
1816
3526f730 1817 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
30ffea6b
MS
1818 y.tab.c.
1819
6060a796
MS
1820Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1821
1822 * decl.c (finish_decl): Don't call obscure_complex_init for decls
1823 of indeterminate size.
1824
1825Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1826
1827 * decl.c (obscure_complex_init): Function to tweak the decl to
1828 prevent expand_decl from tring to initialize it.
1829 (finish_decl): Use it rather than writing the same code in three
1830 different places.
1831
1832 * parse.y (bad_parm): Stop trying to support parms without types.
1833
1834Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com>
1835
1836 * decl2.c (grokfield): Make asm specs on static member functions
1837 work.
1838
1839Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com>
1840
1841 * except.c (expand_throw): Make a copy of the thrown object.
1842
1843Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1844
1845 * parse.y: : has lower precedence than =.
1846
1847Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com>
1848
1849 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
1850 manglings.
1851 (grokvardecl): Add namespace into variable name.
1852
1853Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com>
1854
1855 * decl2.c (current_namespace_id): New routine to transform a simple
1856 name into a name in a namespace.
1857 * decl.c (grokdeclarator): Use it.
1858 * decl2.c (get_namespace_id): Find the name of the current
1859 namespace.
1860 (push_namespace, pop_namespace): Complete out missing
1861 functionality.
1862
1863Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1864
1865 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
1866 not be defined. Fix warning message for enums and restore warning
1867 for non-enums.
1868
1869 * decl2.c (push_namespace): Dummy function.
1870 (pop_namespace): Ditto.
1871 (do_namespace_alias): Ditto.
1872 (do_using_decl): Ditto.
1873 (do_using_directive): Ditto.
1874
1875 * parse.y: New token NSNAME for namespace names.
1876 (extdef): Add namespace, using definitions.
1877 (using_decl): New rule for using declarations.
1878 (any_id): New rule for identifiers with any degree of scoping.
1879 (identifier): Add NSNAME.
1880 (notype_identifier): Ditto.
1881 (component_decl): Add using_decl.
1882 (nested_name_specifier): Add NSNAME SCOPE.
1883
1884 * typeck.c (convert_for_assignment): Handle conversions between
1885 enums and bool.
1886
1887 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
1888 FUNCTION_DECLs.
1889
1890Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com>
1891
1892 * class.c (finish_struct): Give an error if one tries to declare a
1893 bit-field's size greater than a long long, as the backend will dump.
1894 It is not an error to declare an enum bit-field greater than its
1895 precision. Warn if an enum bit-field is too small to hold all
1896 its values.
1897
1898Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com>
1899
1900 * typeck.c (convert_for_assignment): Use cp_convert instead of
1901 convert so that we don't get static casts.
1902
1903Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com>
1904
1905 * cvt.c (cp_convert): Don't complain about int->enum conversion if
1906 we are doing static casts.
1907
1908Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com>
1909
1910 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
1911 when dumping expressions in error messages.
1912
1913Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com>
1914
1915 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
1916 the return type is the right type, and make references work.
1917
1918Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1919
1920 * decl.c (poplevel): Don't be confused by function-scope
1921 declarations of non-nested functions.
1922 (duplicate_decls): Propagate DECL_MAIN_VARIANT.
1923 (pushdecl): Use duplicate_decls to copy info from old decl into new
1924 function-scope one rather than doing it here.
1925
1926 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
1927 of this decl, in case this is a function-scope declaration.
1928
1929 * decl.c (finish_enum): Make sure that the type has the right
1930 precision when we call fixup_*_type.
1931
1932Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1933
1934 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
1935 want to build up references to rvalues if possible.
1936 (cp_convert): Stick on a NOP_EXPR when converting to the same type.
1937
1938Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com>
1939
1940 * parse.y (maybe_raises): Handle throw ().
1941 * parse.y (ansi_raise_identifier): grok type-ids in exception
1942 specifications.
1943 * tree.c (build_exception_variant): Use list compare to check if
1944 two exception specifications match.
1945 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
1946 messages.
1947 * call.c (build_method_call): Remove TREE_RAISES.
1948 * cvt.c (convert_to_aggr): Ditto.
1949 * typeck.c (build_function_call_real, convert_arguments): Ditto.
1950 * init.c (expand_aggr_init_1): Ditto.
1951
1952Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com>
1953
1954 * except.c: Add support for m68k and mips exception handling
1955 support.
1956
1957Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com>
1958
1959 * except.c (expand_end_all_catch): Throw into outer context, if we
1960 fall off end of catch handlers.
1961
db5ae43f
MS
1962Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com>
1963
1964 * Makefile.in: Make is easier to decide where parse.[ch] will be
1965 built.
1966
af824546
DE
1967Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com>
1968
1969 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
1970 (GXX_INSTALL_NAME) Likewise.
1971 (CXX_CROSS_NAME) Use program_transform_cross_name.
1972 (GXX_CROSS_NAME) Likewise.
1973 (c++.install-man): Use program_transform_name on g++.1.
1974 (c++.uninstall): Likewise.
1975
6411126c
PE
1976Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com>
1977
1978 * Makefile.in (spew.o, lex.o, pt.o):
1979 Depend on $(srcdir)/parse.h, not parse.h.
1980
db5ae43f
MS
1981Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com>
1982
1983 * parse.y (THROW): Fix precedence of throw expressions.
1984
1985Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com>
1986
1987 * typeck.c (build_unary_op): Allow promotions from bool to int on
1988 unary ~.
1989
1990Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
1991
1992 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
1993 classes when appropriate.
1994 (build_overload_nested_name): When dealing with a function context,
1995 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
1996 avoid conflicts between local classes of the same name.
1997
1998Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com>
1999
2000 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
2001 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
2002 `explicit'.
2003 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
2004 build_type_conversion): Use LOOKUP_ONLYCONVERTING in
2005 build_method_calls so that non-converting constructors are not used.
2006 * call.c (build_method_call): If we shouldn't use a non-converting
2007 constructor, then don't.
2008
2009Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2010
2011 * call.c (build_method_call): Don't try to synthesize methods yet.
2012
2013Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com>
ea943e1d 2014
db5ae43f
MS
2015 * pt.c (push_template_decls): Create CONST_DECLs for template
2016 constant parameters, not VAR_DECLs.
2017
2018Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com)
2019
2020 * typeck.c (build_binary_op_nodefault): Can shorten shift only if
2021 shift count is less than size in bits of arg0.
2022
2023Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com>
2024
2025 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
2026 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
2027 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need
2028 to add support for explicit, namespace, typename, and using, support
2029 for the rest is already in.
2030
2031Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2032
2033 * typeck2.c (build_m_component_ref): Check the basetype of the
2034 member pointer against the main variant of the object type.
2035
2036Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2037
2038 * cvt.c (convert_to_reference): Make sure that the original expr
2039 gets its type back when converting a reference.
2040
2041 * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
2042 (build_decl_overload): Instead of here.
2043
2044Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com>
2045
2046 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
2047 function.
2048
2049 * typeck.c (convert_for_initialization): Handle initialization from
2050 a TARGET_EXPR.
2051
2052Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2053
2054 * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
2055 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
2056 TYPE_READONLY and TYPE_VOLATILE from the argument.
2057 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
2058 present in parm from arg.
2059 (type_unification): Strip REFERENCE_TYPE from the argument type.
2060 (unify): Don't strip REFERENCE_TYPE from the argument type.
2061
2062Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com)
2063
2064 * pt.c (do_type_instantiation): Check to see if there's a
2065 IDENTIFIER_TEMPLATE on a class before calling
2066 instantiate_member_templates().
2067
2068Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com>
2069
2070 * gc.c (get_bad_cast_node): New routine to support compile time
2071 throws of bad_cast.
2072 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
2073 time.
2074
2075Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com>
2076
2077 * except.c: Add hppa support.
2078
2079Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com>
2080
2081 * except.c: Add rs6000 support.
2082
2083Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com>
2084
2085 * except.c (do_unwind): Add i[34]86 support.
2086
2087Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2088
2089 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
2090 instantiations.
2091
2092Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com)
2093
2094 * decl.c (finish_function): emit types used in method parameters
2095 into symbol table.
2096
2097Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2098
2099 * pt.c (process_template_parm): Allow pointer to member function
2100 template parameter types.
2101 (uses_template_parms): Handle pointer to member function
2102 CONSTRUCTORs.
2103
2104 * g++.c (main): Cast first argument of bzero to (char *).
2105 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
2106
2107Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com)
2108
2109 * gc.c (build_dynamic_cast): rewrite to make it work.
2110 * class.c (finish_vtbls): build more vtables if flag_rtti is on.
2111 * class.c (modify_all_direct_vtables): ditto.
2112 * init.c (expand_direct_vtbls_init): expand more vtables if
2113 flag_rtti is on.
2114 * decl.c (init_type_desc): add default return.
2115
2116Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com)
2117
2118 * tree.c (debug_binfo): get rid of the initial size entry of
2119 vtable.
2120 * cp-tree.h: change flag_dossier to flag rtti, define type
2121 descriptor type nodes.
2122 * decl.c (init_type_desc): new function to initialize type
2123 descriptor type nodes.
2124 * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
2125 * lex.c (init_lex): ditto.
2126 * decl.c : change variable flag_dossier to flag_rtti.
2127 * decl.c (duplicate_decls): get rid initial size entry of vtable.
2128 * decl.c (hack_incomplete_structures): take out assert 164.
2129 * search.c (get_abstract_virtuals_1): ditto.
2130 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
2131 CLASSTYPE_RTTI.
2132 * parse.y: ditto.
2133 * class.c (prepare_fresh_vtable): for virtual bases, get right
2134 offset.
2135 * class.c (add_virtual_function): change flag_dossier to
2136 flag_rtti.
2137 * class.c (modify_one_vtable): modify the right rtti entry.
2138 * class.c (override_one_vtable): get rid of size entry.
2139 * class.c (finish_struct): change flag_dossier to flag_rtti, and
2140 build extra vtables, build type descriptors for polymorphic
2141 classes.
2142 * gc.c (build_headof): make headof() works correctly with new
2143 rtti.
2144 * gc.c (build_typeid): make this function work with new rtti.
2145 * gc.c (get_typeid): make this function work with new rtti.
2146 * gc.c (build_bltn_desc): new function for new rtti.
2147 * gc.c (build_user_desc): ditto.
2148 * gc.c (build_class_desc): ditto.
2149 * gc.c (build_ptr_desc): ditto.
2150 * gc.c (build_attr_desc): ditto.
2151 * gc.c (build_func_desc): ditto.
2152 * gc.c (build_ptmf_desc): ditto.
2153 * gc.c (build_ptmd_desc): ditto.
2154 * gc.c (build_t_desc): ditto.
2155 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
2156
2157Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2158
2159 * call.c (convert_harshness): Check for TREE_UNSIGNED differences
2160 after checking for integral conversions.
ea943e1d 2161
eae89e04
JM
2162Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2163
db5ae43f
MS
2164 * decl2.c: Declare flag_access_control.
2165 (struct lang_f_options): Add access-control.
2166 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
2167 for the call to expand_aggr_init to copy the object out of the
2168 pcc_struct_return slot.
2169 * search.c (compute_access): if (!flag_access_control) return
2170 access_public.
eae89e04
JM
2171
2172Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2173
db5ae43f
MS
2174 * lex.c (cons_up_default_function): Don't try to defer method
2175 synthesis now.
2176
2177 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
2178 instead of abort, since the OSF/1 dynamic linker doesn't like to see
2179 relocation entries for abort.
eae89e04 2180
db5ae43f
MS
2181 * tree.c (array_type_nelts_total): Use sizetype, not
2182 integer_type_node.
2183 (array_type_nelts_top): Ditto.
2184
2185Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com>
2186
2187 * decl.c (grokdeclarator): Added handling for catch parameters
2188 (CATCHPARM).
2189 * except.c (expand_start_catch_block): Use the new CATCHPARM context
2190 instead of NORMAL.
2191 * except.c (expand_throw): Don't let convert_to_reference complain
2192 about what we are doing.
2193
2194Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com)
2195
2196 * method.c (emit_thunk): Call instantiate_virtual_regs.
2197
2198Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com>
2199
2200 * except.c (expand_exception_blocks): Make sure throw code doesn't
2201 get put in function that won't be output.
eae89e04
JM
2202
2203Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2204
db5ae43f
MS
2205 * decl.c (init_decl_processing): Make alloca a builtin.
2206
2207Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley)
2208
2209 * g++.c (main): Only decrement "added" and set "library" to
2210 NULL when "library" != NULL (just like 940829 fix).
eae89e04 2211
c199879d
MS
2212Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com>
2213
2214 * except.c (expand_start_catch_block): Make sure the false label
2215 gets onto the permanent obstack, as it is used for the exception
2216 table.
2217
13306d4f
MS
2218Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com>
2219
2220 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
2221 be set just below, use current_fndecl instead.
2222
db5ae43f
MS
2223Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2224
2225 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
2226 with LOOKUP_SPECULATIVELY.
2227 (expand_default_init): Abort if build_method_call returns NULL_TREE.
2228
2229 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
2230 the rhs is a TARGET_EXPR.
2231
2232 * parse.y (left_curly): Anonymous types are not affected by #pragma
2233 interface/implementation.
2234
2235 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
2236 default constructor if it isn't needed.
2237
2238 * lex.c (cons_up_default_function): Do synthesize methods for
2239 anonymous types if necessary.
2240
2f4f907d
JM
2241Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2242
db5ae43f 2243 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
2f4f907d
JM
2244
2245Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2246
db5ae43f
MS
2247 * typeck.c (build_modify_expr): Understand how to copy an aggregate.
2248
2249 * init.c (expand_default_init): Ditto. Also remove some of the
2250 crufty code that assumes methods will not be synthesized properly.
2251
2252 * lex.c (cons_up_default_function): If the containing type has no
2253 name, these functions should never need to be called, so just
2254 declare them.
2f4f907d 2255
db5ae43f
MS
2256 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
2257 bitmask for lexing character constants.
2258
2259 * call.c (build_method_call): Disable code that tries to do tricky
2260 stuff with a default parameter that is a constructor call, but
2261 actually does other tricky stuff that breaks things.
2f4f907d
JM
2262
2263Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca>
2264
db5ae43f
MS
2265 * decl.c (finish_enum): Disable code which forces enums to be signed,
2266 since this conflicts with their use as bitfields. type_promotes_to
2267 handles promotion of enums of underlying unsigned types to signed
2268 integer types.
2f4f907d
JM
2269
2270Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2271
db5ae43f
MS
2272 * cvt.c (type_promotes_to): Also promote enums to long if
2273 appropriate.
2f4f907d 2274
db5ae43f
MS
2275 * typeck.c (default_conversion): Don't expect type_promotes_to to
2276 return a main variant.
2f4f907d
JM
2277
2278Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2279
db5ae43f
MS
2280 * call.c (build_scoped_method_call): Don't lose side effects in the
2281 object expression when calling a non-existent destructor.
2f4f907d
JM
2282
2283Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au)
2284
db5ae43f
MS
2285 * call.c (build_scoped_method_call): Remove erroneous error message
2286 when destructor call is written as a scoped call.
2f4f907d 2287
252b87c7 2288Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com)
db5ae43f
MS
2289
2290 * various: Cast pointer arguments to bzero and bcopy to char *.
252b87c7 2291
13306d4f
MS
2292Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com>
2293
2294 * class.c (get_derived_offset): Added a type parameter to limit how
2295 far up the CLASSTYPE_VFIELD_PARENT chain we search.
2296 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
2297 offset to put into the vtable for the this parameter, make sure we
2298 don't offset from a parent of the DECL_CONTEXT of the function.
2299
db5ae43f
MS
2300Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2301
2302 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
2303 TREE_STATIC when setting DECL_INTERFACE_KNOWN.
2304 (do_type_instantiation): Ditto.
2305
2306 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
2307 DECL_EXTERNAL and TREE_STATIC as appropriate.
2308
2309 * decl2.c (finish_file): Also synthesize methods that don't have
2310 DECL_EXTERNAL set. Set interface_unknown before doing so.
2311
2312 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
2313 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
2314
cba8ba35
JM
2315Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2316
db5ae43f
MS
2317 * lex.c (cons_up_default_function): Mark methods in a template class
2318 as template instances. Store the values of interface_unknown and
2319 interface_only for do_pending_inlines.
2320 (do_pending_inlines): Use them.
2321
2322 * decl2.c (finish_file): If we haven't seen a definition of a
2323 function declared static, make the decl non-PUBLIC so compile_file
2324 can give an error.
cba8ba35
JM
2325
2326Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2327
db5ae43f
MS
2328 * method.c (do_build_copy_constructor): Handle anonymous unions.
2329 (do_build_assign_ref): Ditto.
2330 (largest_union_member): Move from lex.c.
2331
2332Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2333
2334 Re-implement g++'s vague linkage independent of TREE_PUBLIC.
2335 * pt.c (instantiate_member_templates): Lose redundant
2336 -fexternal-templates handling.
2337 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set
2338 TREE_STATIC or DECL_INTERFACE_KNOWN.
2339 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
2340 of DECL_EXTERNAL for explicit instantiations.
2341 (do_function_instantiation): Do the new thing.
2342 (do_type_instantiation): Ditto.
2343 (instantiate_template): Deal with member templates defined in a .cc
2344 file with -fexternal-templates.
2345 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
2346 decide whether to stick builtin_throw here.
2347 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
2348 rather than TREE_PUBLIC. Generally fix rules.
2349 (finish_file): Use DECL_INITIAL to determine whether or not a method
2350 has been synthesized, rather than TREE_ASM_WRITTEN.
2351 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
2352 TREE_PUBLIC.
2353 (pushdecl): Ditto.
2354 (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and
2355 DECL_INTERFACE_KNOWN.
2356 (redeclaration_error_message): Fix checking for conflicting linkage.
2357 (define_function): Set DECL_INTERFACE_KNOWN.
2358 (grokfndecl): Function decls are PUBLIC until we are sure about
2359 their linkage. Set DECL_DECLARED_STATIC as needed.
2360 (start_function): Deal with linkage. Move pushdecl after linkage
2361 magic.
2362 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
2363 * cp-tree.h (lang_decl_flags): Add interface_known and
2364 declared_static.
2365 (DECL_INTERFACE_KNOWN): New macro.
2366 (DECL_DECLARED_STATIC): New macro.
2367 (DECL_PUBLIC): New macro.
2368
2369 Clean up bogus use of TREE_PUBLIC.
2370 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
2371 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
2372 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
cba8ba35
JM
2373
2374Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2375
db5ae43f
MS
2376 * call.c (build_overload_call_real): Don't immediately do
2377 array->pointer conversion.
cba8ba35 2378
db5ae43f
MS
2379 * pt.c (type_unification): If not passing to a reference, strip
2380 cv-quals. Also handle array->pointer conversion.
cba8ba35
JM
2381
2382Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2383
db5ae43f
MS
2384 * decl.c (grokdeclarator): Don't warn about applying const to a
2385 const typedef or template type parameter.
2386
2387 * decl2.c (finish_file): Also synthesize methods after walking the
2388 vtables. Ugly ugly ugly.
cba8ba35
JM
2389
2390Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2391
db5ae43f
MS
2392 * various: Remove lingering remnants of old exception handling code.
2393
2394 * decl2.c (finish_file): Synthesize methods before walking the
2395 vtables, so that the vtables get emitted as needed.
2396
2397 * decl.c (shadow_tag): Remove obsolete code for pushing tags and
2398 dealing with exceptions.
2399
2400Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2401
2402 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
2403
2404Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2405
2406 * decl2.c (finish_file): Fix inline handling.
cba8ba35
JM
2407
2408Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2409
db5ae43f
MS
2410 * decl.c (grokdeclarator): Handle redundant scope even better.
2411 ({push,pop}_cp_function_context): Take toplev parameter.
cba8ba35 2412
db5ae43f
MS
2413 * method.c (synthesize_method): Pass toplev parameter to
2414 {push,pop}_cp_function_context depending on decl_function_context
2415 (fndecl).
cba8ba35 2416
db5ae43f
MS
2417 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
2418 built-in version.
cba8ba35 2419
db5ae43f
MS
2420 * method.c (synthesize_method): Don't be confused by __in_chrg
2421 parameter.
b3738072 2422
db5ae43f 2423 * class.c (popclass): Set C_C_D like start_function does.
b3738072 2424
db5ae43f 2425 * decl.c (grokdeclarator): Handle redundant scope better.
81613e43 2426
db5ae43f
MS
2427 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
2428 (direct_notype_declarator): Ditto.
2429 (complex_direct_notype_declarator): Remove it here.
81613e43 2430
db5ae43f 2431Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com)
44c5421f 2432
db5ae43f
MS
2433 * init.c (resolve_offset_ref): Fix types used in resolving .*
2434 expressions.
2435
2436Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com)
2437
2438 Beginnings of work to synthesize methods only when needed.
2439 * call.c (build_method_call): Synthesize methods as necessary
2440 (currently never necessary).
2441 * class.c (popclass): Don't try to set C_C_D here, as it'll end up
2442 on the wrong obstack.
2443 * decl.c (push_cp_function_context): Mostly copied from
2444 push_c_function_context.
2445 (pop_cp_function_context): Similarly.
2446 (finish_function): Reverse order of poplevel and pop_nested_class so
2447 that current_class_decl is restored properly.
2448 (start_function): Ditto.
2449 (finish_function): Add parameter 'nested'. Don't call
2450 permanent_allocation if (nested).
2451 * various: Pass extra parameter to finish_function.
2452 * decl2.c (finish_file): Reorganize end-of-file inline handling,
2453 synthesizing methods as necessary.
2454 * lex.c (cons_up_default_function): Call mark_inline_for_output.
2455 Only synthesize methods immediately if #pragma implementation
2456 (currently disabled).
2457 (do_pending_inlines): Call synthesize_method.
2458 * method.c (synthesize_method): New function; all method synthesis
2459 goes through here. Calls do_build_assign_ref and
2460 do_build_copy_constructor.
2461 (build_default_constructor): Remove.
2462 (build_dtor): Ditto.
2463 (build_assign_ref): Rename to do_build_assign_ref and remove stuff
2464 done by synthesize_method.
2465 (build_copy_constructor): Similarly.
44c5421f 2466
eac293a1
MS
2467Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com>
2468
2469 * typeck.c (c_expand_return): Use magic so the backend can fixup the
2470 assignment into the return register, so cleanups won't clobber it.
2471
2472Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com)
2473
2474 * method.c (hack_identifier): Don't call assemble_external for
2475 template decls.
2476
2477 * decl.c (finish_decl): Also end temporary allocation if the decl in
2478 question has a type of error_mark_node.
2479
6060a796 2480Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com>
eac293a1
MS
2481
2482 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
2483 that if the ?: was a reference type, that the subparts will be also.
2484
2485Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2486
2487 * except.c (register_exception_table): Use Pmode, not PTRmode.
2488
2489Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com)
2490
2491 * lex.c (do_pending_inlines): Do method synthesis after the
2492 pending_inlines have been reversed.
2493
f376e137
MS
2494Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com)
2495
2496 * decl2.c (finish_file): Fix Brendan's fix: Only call
2497 register_exception_table if there is a non-empty exception table.
2498
2499Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2500
2501 * decl2.c (finish_file): Only do register_exception_table if
2502 -fhandle-exceptions is being used.
2503
2504Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com)
2505
2506 * except.c (output_exception_table_entry): Simplify
2507 by using assemble_integer.
2508 (build_exception_table): Change to return a count.
2509 Cleanup to use standard macros, instead of hard-wired
2510 sparc asm format. Don't make __EXCEPTION_TABLE__ global.
2511 (register_exception_table): New function. Generate call to builtin.
2512 * decl2.c (finish_file): Call register_exception_table.
2513 * cp-tree.h (build_exception_table): Fix prototype.
2514
2515Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2516
2517 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
2518
2519 * decl2.c (delete_sanity): Give an error at trying to delete a
2520 function.
2521
2522Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com)
2523
2524 * lex.c (cons_up_default_function): Mark synthesized destructors
2525 inline.
2526
2527 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
2528 something other than __wchar_t, complaining if -pedantic and not in
2529 a system header.
2530
2531Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com)
2532
2533 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
2534 here.
2535
2536 * typeck.c (build_modify_expr): Require complete type after checking
2537 for error_mark_node.
2538
2539 * call.c (build_method_call): Print parmtypes when complaining of
2540 ambiguous call.
2541
2542 * typeck.c (build_modify_expr): Handle assignment to array from
2543 non-array.
2544
2545 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
2546
2547 * call.c (build_method_call): Don't bother with the exact match.
2548
2549Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com)
2550
2551 * init.c (expand_aggr_init): If we munge the type of the variable,
2552 also munge the type of the initializer.
2553
2554 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
2555 (init_decl_processing): Push artificial declaration of wchar_t so
2556 people don't have to declare it before they can use it.
2557
2558 * error.c (cp_line_of): return lineno in lieu of 0.
2559
2560 * typeck.c (convert_for_assignment): Handle conversion of pmfs to
2561 int and bool.
2562 (build_component_ref): Fold the COMPONENT_REF in case it can be
2563 reduced.
2564
2565 * typeck2.c (store_init_value): Don't pedwarn about non-constant
2566 bracketed initializers for automatic variables.
2567
2568Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com)
2569
2570 * error.c (dump_decl): Don't say `typedef enum foo foo'.
2571
2572 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
2573 because they're affected by #pragma i/i. We'll deal with that when
2574 they get instantiated.
2575
2576 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
2577
2578 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
2579 ADDR_EXPRs if appropriate.
2580
2581 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
2582
2583 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
2584 initializer properly.
2585 * typeck2.c (digest_init): Ditto.
2586
2587 * tree.c (cp_build_type_variant): Like c_build_type_variant, except
2588 it uses build_cplus_array_type.
2589 * *.c: Use cp_build_type_variant instead of c_build_type_variant.
2590
2591 * pt.c (do_type_instantiation): Don't try to instantiate nested
db5ae43f 2592 enums.
f376e137
MS
2593
2594Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com)
2595
2596 * cvt.c (build_up_reference): Handle preincrement and predecrement
db5ae43f 2597 properly.
f376e137
MS
2598
2599Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2600
2601 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
2602 fact, static.
2603
2604Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2605
2606 * decl.c (finish_decl): Lay out the rtl for DECL before doing
2607 grok_reference_init, in case it's static.
2608
2609Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com)
2610
2611 * class.c (finish_struct): Don't synthesize constructors if the
2612 class has a field with the same name as the class. Don't die on
2613 classes with no constructors or destructors. Don't die if the head
2614 and tail of the class are in different files.
2615
2616 * decl.c (grokdeclarator): Don't treat a function pointer field
2617 with the same name as the class as a constructor.
2618
2619Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com)
2620
2621 * typeck.c (build_c_cast): Pull constant values out of their
2622 variables here.
2623
2624 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
2625 FUNCTION_DECLs and TEMPLATE_DECLs.
2626
2627Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com)
2628
2629 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
2630 have it.
2631
2632 * pt.c (unify): REALs and INTEGERs only unify with their own genus.
2633 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
2634 TREE_PUBLIC unless -fexternal-templates.
2635
2636Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com)
2637
2638 * pt.c (do_type_instantiation): Call instantiate_member_templates.
2639 Deal with specializations.
2640 (tsubst): Don't stick the mangled name in DECL_NAME for function
2641 instantiations. Don't push them, either.
2642
2643 * decl2.c (grokfield): Move code for generating the
2644 DECL_ASSEMBLER_NAME for static members from here.
2645 * method.c (build_static_name): To here.
2646 * decl.c (grokvardecl): Call build_static_name.
2647 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
2648
2649Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com)
2650
2651 * call.c (build_method_call): if -Wsynth, warn when selecting
2652 synthesized op= over user-supplied one cfront would select.
2653 * decl2.c (lang_decode_option): Handle -Wsynth.
2654
2655Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com)
2656
2657 * decl.c (finish_enum): Overhaul to fix several bugs.
2658 (start_enum): Disable useless code.
2659
2660Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com)
2661
2662 * typeck.c (c_expand_return): Warn about returning a reference to a
2663 temporary.
2664 (convert_arguments): Increment argument counter when using default
2665 arguments, too.
2666
2667Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com)
2668
2669 * decl.c (finish_decl): If the type of decl is error_mark_node,
2670 don't bother trying to do anything.
2671
2672 * typeck.c (convert_for_initialization): If the rhs contains a
2673 constructor call, pretend the lhs type needs to be constructed.
2674
2675 * init.c (expand_default_init): If we stick the object inside the
2676 initializer, mark the initializer used.
2677
2678Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com)
2679
2680 * method.c (build_assign_ref): return *this;
2681 (build_assign_ref): Fix base assignment order.
2682 (build_copy_constructor): Fix member init order.
2683
2684Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2685
2686 * g++.c (main): Remember to clear out SAW_SPECLANG after we see
2687 its argument.
2688
2689Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com)
2690
2691 * method.c (build_copy_constructor): Also copy virtual bases.
2692
2693Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com)
2694
2695 * lex.c (do_pending_inlines): Clear out pending_inlines before doing
2696 any synthesis. Also first set deja_vu on all pending_inlines.
2697
2698 * method.c (build_assign_ref): Use build_member_call to invoke base
2699 operator=, rather than build_modify_expr. And use
2700 build_reference_type instead of TYPE_REFERENCE_TO.
2701 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
2702 basetype.
2703
2704 * decl2.c (grokfield): Don't complain about undefined local class
2705 methods.
2706
2707 * class.c (finish_struct): Don't try to synthesize methods here.
2708 * lex.c (do_pending_inlines): Instead, synthesize them here.
2709 (init_lex): Initialize synth_obstack.
2710 (cons_up_default_function): Stick synthesis request on
2711 pending_inlines.
2712
2713Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2714
2715 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
2716 accept an RTL_EXPR in what we're about to use for the instance,
2717 since anything which would end up with pcc_struct_return set
2718 inside cplus_expand_expr.
2719
2720 * cp-tree.h (cons_up_default_function): Note change of prototype.
2721
2722Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu)
2723
2724 * class.c (finish_struct): Undid change from Aug 21 testing
2725 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
2726 * parse.y (left_curly): Ditto, undid change from Aug 21.
2727 * decl.c (xref_tag): Undid change from Aug 21, set
2728 CLASSTYPE_INTERFACE correctly, and added comments.
2729
2730Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com)
2731
2732 Rework approach to synthesized methods; don't go through the parser
2733 anymore.
2734 * class.c (finish_struct): Use new synthesis approach.
2735 * lex.c (cons_up_default_function): Now just creates declaration,
2736 not code.
2737 (largest_union_member): #if 0 out.
2738 (default_assign_ref_body): Ditto.
2739 (default_copy_constructor_body): Ditto.
2740 * method.c (build_default_constructor): New function to synthesize X().
2741 (build_copy_constructor): Synthesize X(X&).
2742 (build_assign_ref): Synthesize X::operator=(X&).
2743 (build_dtor): Synthesize ~X().
2744
2745 * error.c (cp_line_of): If we're dealing with an artificial
2746 TYPE_DECL, look at the type instead.
2747
2748Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com)
2749
2750 * init.c (sort_member_init): Check warn_reorder.
2751 * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
2752
2753 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
2754 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
2755 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
2756
6060a796 2757Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
2758
2759 * error.c (dump_decl): Improve wording, so that error messages
2760 dont't read template<, class foo>...
2761
2762Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2763
2764 * parse.y (label_colon): Also match a TYPENAME as a label name,
2765 since they may have declared a class by that name but have also
2766 tried to have a local label under the same name.
2767
2768 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
2769 for the message so they know at what point it was instantiated.
2770
2771Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu)
2772
2773 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
2774 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
2775 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 2776 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
f376e137
MS
2777 * parse.y (left_curly): New final resting place for setting
2778 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
2779
2780 * class.c (finish_struct): Don't test for function/field name
2781 conflicts in signatures, since all the fields are compiler-constructed.
2782
2783Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com)
2784
2785 * method.c (build_overload_nested_name): in qualified name
2786 mangling, the template with value instantiation will have numeric
2787 at end and may mixed with the name length of next nested level.
2788 Add a '_' in between.
2789 * method.c (build_overload_name): ditto.
2790 * method.c (build_overload_identifier): ditto.
2791
6060a796 2792Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com>
f376e137
MS
2793
2794 * error.c (dump_decl): Handle NULL args.
2795
db5ae43f
MS
2796Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
2797
2798 * g++.c: Rework last change so it's done like collect.c (and
2799 gcc.c).
2800
2801Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
2802
2803 * g++.c: Include <sys/errno.h> in case `errno' is a macro
2804 as permitted by ANSI C.
2805
6060a796 2806Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com>
00595019
MS
2807
2808 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
2809 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
2810 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
db5ae43f 2811 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
00595019
MS
2812 * parse.y (left_curly): New final resting place for setting
2813 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
2814
2815Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com)
2816
2817 * g++.c (main): Only decrement "added" and set "library" to
2818 NULL when "library" != NULL.
2819
2820Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com)
2821
2822 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
2823 just because its class has a known interface.
2824 (decls_match): Deal with new format of template parms.
2825
2826 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
2827 DECL_EXTERNAL here.
2828
2829Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com)
2830
2831 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
2832 (xref_defn_tag): Ditto.
2833 (pushdecl): Only allow artificial typedefs to be shadowed.
2834
2835 * init.c (emit_base_init): Pass the right binfos to
2836 expand_aggr_init_1.
2837
2838 * class.c (delete_duplicate_fields_1): Make it work right.
2839 (finish_struct): Catch function/field name conflict.
2840
2841 * decl2.c (check_classfn): Pass the function to cp_error, not just
2842 the name.
2843
2844 * init.c (sort_member_init): Warn when order of member initializers
2845 does not match order of member declarations.
2846 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
2847
2848 * error.c (dump_expr): Handle lists of functions.
2849
2850 * decl.c (start_function): #pragma interface only affects functions
2851 that would otherwise be static.
2852 (finish_decl): Don't warn about an unused variable if it has both
2853 constructor and destructor, since the 'resource allocation is
2854 initialization' idiom is relatively common.
2855
2856 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
2857 (comp_target_parms): Ditto.
2858 (compparms): Never consider default parms.
2859 (common_base_type): Don't choose a virtual baseclass if there is a
2860 more derived class in common.
2861 (build_conditional_expr): If pedantic, pedwarn about conversion to
2862 common base in conditional expr.
2863
2864 * class.c (instantiate_type): Handle template instantiation better.
2865
2866 * typeck.c (convert_arguments): Don't try to get tricky and convert
2867 to int directly when PROMOTE_PROTOTYPES is set, as it breaks
2868 user-defined conversions.
2869
2870 * lex.c (check_for_missing_semicolon): Also give error at end of
2871 file.
2872
2873 * call.c (build_method_call): Don't promote arrays to pointers here.
2874
2875 * typeck.c (convert_arguments): Don't require the actual parameter
2876 to be of a complete type if the formal parameter is a reference.
2877
2878Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
2879
2880 * decl.c (grokdeclarator): Soften 'static' on member function error
2881 to pedwarn.
2882
2883 * init.c (build_new): Don't automatically save rval.
2884 (build_offset_ref): Do field lookup with proper basetype_path.
2885
2886Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
2887
2888 * errfn.c (cp_silent): Declare to mark when we should avoid
2889 emitting warnings and errors.
2890 (cp_error): Check it.
2891 (cp_warning): Likewise.
2892 (cp_pedwarn): Likewise.
2893 (cp_compiler_error): Likewise.
2894 (cp_error_at): Likewise.
2895 (cp_warning_at): Likewise.
2896 (cp_pedwarn_at): Likewise.
2897 * call.c (compute_conversion_costs): Set CP_SILENT when we start
2898 out, and make sure we turn it off before we leave.
2899
2900Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com)
2901
2902 * decl2.c (grok_array_decl): Try computing *(A+B) if neither
2903 argument is obviously an array.
2904
2905Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com)
2906
2907 * typeck.c (c_expand_start_case): Do cleanups here.
2908
2909 * parse.y (xcond): Do bool conversion here, too.
2910 (simple_stmt, SWITCH case): Don't do cleanups here.
2911
2912 * decl.c (duplicate_decls): Don't treat builtins that have been
2913 explicitly declared specially.
2914
2915Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com)
2916
2917 * tree.c (make_deep_copy): Support copying pointer, reference,
2918 function, array, offset and method types.
2919
2920 * decl.c (init_decl_processing): Mark exit and abort as
2921 BUILT_IN_NONANSI so that duplicate_decls is kinder about
2922 redeclaration.
2923 (duplicate_decls): Don't give two errors for redeclaring a C
2924 function with the same parms but a different return type.
2925
2926 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
2927 (condition): Instead of here.
2928 (simple_stmt, SWITCH case): Also do cleanup here.
2929
2930 * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
2931
2932 * call.c (build_method_call): Don't throw away the side effects of
2933 the object in a call to a non-existent constructor.
2934 * parse.y (primary): Ditto.
2935
2936 * method.c (build_decl_overload): Oop.
2937
2938 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
2939 warn about uselessness of specifying -fansi-overloading.
2940
2941 * method.c (build_decl_overload): Treat any non-member new with one
2942 parameter as __builtin_new.
2943
2944 * decl.c (init_decl_processing): Setup built-in meanings of exit,
2945 _exit and abort.
2946
2947Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com)
2948
2949 * error.c (dump_readonly_or_volatile): Put a space between const and
2950 volatile if both apply.
2951
2952 * init.c (perform_member_init): Clean up after this initialization.
2953 (emit_base_init): Clean up after each base init, not after all have
2954 been done.
2955 (expand_aggr_vbase_init_1): Clean up after this init.
2956
2957Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com)
2958
2959 * call.c (build_method_call): Deal with destroying references.
2960
2961 * parse.y (condition): Do bool_truthvalue_conversion here.
2962 (paren_expr_or_null): And here.
2963 (simple_if): Not here.
2964 (simple_stmt): Or here.
2965
2966Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com)
2967
2968 * parse.y (paren_expr_or_null): Wrap the expression in a
2969 CLEANUP_POINT_EXPR.
2970 (condition): Ditto.
2971
2972Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au)
2973
2974 * call.c (build_scoped_method_call): Fix error message when
2975 destructor call refers to a nonexistent type.
2976
2977Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu)
2978
2979 * lex.h (rid): Deleted RID_RAISES, it's never used.
2980 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
2981 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
2982 they don't need to be touched in `grokdeclarator.'
2983 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
2984
2985 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
2986 RID_MAX as loop limit for finding declaration specifiers.
2987
2988Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu)
2989
2990 * lex.c (debug_yytranslate): Moved to parse.y since it needs to
2991 access `yytname,' which is static in parse.c.
2992
2993Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu)
2994
2995 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
2996 was `GNU_xref_def' instead of `GNU_xref_ref.'
2997
2998Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com)
2999
3000 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
3001 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
3002 (do_type_instantiation): Ditto.
3003
3004 * decl2.c (import_export_inline): Decides at EOF what an inline's
3005 linkage should be.
3006 (finish_file): Call it.
3007
3008 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
3009 and DECL_EXTERNAL from do_*_instantiation. Only set
3010 DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
3011 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
3012 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
3013
6060a796 3014Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com>
a292b002
MS
3015
3016 * class.c (get_class_offset_1, get_class_offset): New routine to
3017 find the offset of the class where a virtual function is defined,
3018 from the complete type.
3019 * class.c (modify_one_vtable, fixup_vtable_deltas): Use
3020 get_class_offset instead of virtual_offset as get_class_offset will
3021 always provide the right answer.
3022 * tree.c (virtual_offset): Remove. It only ever worked some of the
3023 time.
3024
3025Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com)
3026
3027 * call.c (build_method_call): Put back unary_complex_lvalue call
3028 that I thought was redundant.
3029
3030 * typeck.c (c_expand_return): Fix a case I missed before.
3031
3032Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com)
3033
3034 * pt.c (unify): Strip cv-quals from template type arguments (when
3035 'const T*' is matched to 'const char*', that does not mean that T is
3036 'const char').
3037
3038Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com)
3039
3040 * pt.c (do_type_instantiation): Instantiate nested TAGS, not
3041 typedefs. Third time's the charm?
3042
3043 * parse.y (template_parm): Support default template parms.
3044 * pt.c (process_template_parm): Ditto.
3045 (end_template_parm_list): Ditto.
3046 (coerce_template_parms): Ditto.
3047 (mangle_class_name_for_template): Ditto.
3048 (push_template_decls): Ditto.
3049 (unify): Ditto.
3050 * method.c (build_overload_identifier): Ditto.
3051 * error.c (dump_decl): Ditto.
3052
3053Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com)
3054
3055 * pt.c (do_type_instantiation): Only instantiate nested *classes*.
3056
3057Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3058
3059 * search.c (note_debug_info_needed): Also emit debugging information
3060 for the types of fields.
3061
3062Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com)
3063
3064 * pt.c (lookup_template_class): Pass 'template' to
3065 coerce_template_parms instead of 'in_decl', since it's a more
3066 meaningful context.
3067
3068 * typeck.c (c_expand_return): Make sure any cleanups for the return
3069 expression get run.
3070 (build_c_cast): Use CONVERT_EXPR for conversion to void.
3071
3072 * pt.c (do_type_instantiation): Also instantiate nested types.
3073
3074 * typeck.c (convert_for_assignment): Don't die when comparing
3075 pointers with different levels of indirection.
3076
3077 * decl.c (grokdeclarator): The sub-call to grokdeclarator for
3078 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
3079 out.
3080
3081 * decl2.c (finish_anon_union): Don't die if the union has no
3082 members.
3083
3084 * decl.c (grokdeclarator): Undo changes to declspecs when we're done
3085 so that 'typedef int foo, bar;' will work.
3086
3087 * decl2.c (finish_file): Don't call expand_aggr_init for
3088 non-aggregates.
3089
3090Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi)
3091
3092 * decl.c (finish_function): We can't inline constructors and
3093 destructors under some conditions with -fpic, but don't unset
3094 DECL_INLINE.
3095
3096Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com)
3097
3098 * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
3099
3100Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3101
3102 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
3103 non-fields.
3104 (finish_struct_methods): Use copy_assignment_arg_p.
3105
3106 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
3107 of giving an error.
3108
3109 * typeck.c (build_binary_op_nodefault): Don't set result_type if we
3110 don't know how to compare the operands.
3111
3112 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
3113 as a declarator-id in their program. Like the Linux headers do.
3114 Arrgh.
3115
3116 * tree.c (lvalue_p): Treat calls to functions returning objects by
3117 value as lvalues again.
3118
3119 * typeck.c (build_component_addr): Use convert_force to convert the
3120 pointer in case the component type is also a private base class.
3121
3122 * search.c (get_matching_virtual): Fix bogus warning of overloaded
3123 virtual.
3124
3125 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
3126 TYPE_DECL to fix bogus shadowing warnings.
3127
3128Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com)
3129
3130 * init.c (expand_aggr_init_1): const and volatile mismatches do not
3131 prevent a TARGET_EXPR from initializing an object directly.
3132
3133Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3134
3135 * cvt.c (build_up_reference): Allow building up references to
3136 `this', don't warn about making references to artificial variables
3137 (like `this').
3138
3139 * tree.c (lvalue_p): `this' is not an lvalue.
3140
3141 * call.c (build_method_call): Accept using a typedef name (or
3142 template type parameter) for explicit destructor calls.
3143
cf17cae3
JM
3144Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3145
a292b002
MS
3146 * method.c (hack_identifier): Put back old code so lists of
3147 non-functions will be handled properly.
a5ef9010 3148
a292b002
MS
3149 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
3150 defined in the language-independent tree.h.
cf17cae3 3151
a292b002
MS
3152 * tree.c (count_functions): Avoid bogus warning when compiling this
3153 function.
cf17cae3
JM
3154
3155Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com)
3156
a292b002
MS
3157 * decl.c (grok_reference_init): Always save the initializer of a
3158 reference.
cf17cae3 3159
6060a796 3160Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com>
5b605f68
MS
3161
3162 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
3163 CLEANUP_POINT_EXPRs so that the stack slots can be reused.
63c68bb7 3164 (disabled for now)
5b605f68
MS
3165
3166Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
3167
3168 * method.c (hack_identifier): Fix for new overloading.
3169
3170 * typeck.c (build_binary_op_nodefault): Don't mess with division by
db5ae43f 3171 zero.
5b605f68
MS
3172
3173Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
3174
3175 * decl2.c (finish_file): Only call walk_sigtables, if
3176 flag_handle_signatures is turned on, don't waste time otherwise.
3177
3178Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
3179
3180 * decl.c (push_overloaded_decl): Don't create overloads of one when
3181 shadowing a class type.
a292b002 3182 * typeck.c (build_x_function_call): Complain about overloads of one.
5b605f68
MS
3183
3184 * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
3185 (grokdeclarator): Fix setting of TREE_STATIC.
3186 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
3187
311862c8
GB
3188Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
3189
3190 * cp-tree.h (walk_sigtables): Created extern declaration.
3191 * decl2.c (walk_sigtables): Created function, patterned after
3192 walk_vtables, even though we only need it to write out sigtables.
3193 (finish_sigtable_vardecl): Created function.
3194 (finish_vtable_vardecl): Changed 0 to NULL_PTR.
3195 (finish_file): Call walk_sigtables.
3196
3197 * sig.c (build_signature_table_constructor): Mark class member
3198 function pointed to from signature table entry as addressable.
3199
5b605f68
MS
3200Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
3201
3202 * decl.c (start_decl): Check new decl of static member variable
3203 against the declaration in the class here.
3204 (grokvardecl): Instead of here.
3205
3206 * class.c (prepare_fresh_vtable): Call import_export_vtable if not
3207 -fvtable-thunks.
3208 (build_vtable): Ditto.
3209
3210 * decl2.c (import_export_vtable): Move logic for deciding the
3211 interface of a template class from here.
3212 (import_export_template): To here.
3213 (finish_vtable_vardecl): Call import_export_template before
3214 import_export_vtable.
3215
6060a796 3216Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com>
a3b49ccd
MS
3217
3218 * except.c (init_exception_processing): Setup interim_eh_hook to
3219 call lang_interim_eh.
3220 * except.c (do_unwind): Propagate throw object value across
3221 stack unwinding.
3222 * except.c (saved_throw_value): Used to hold the value of the object
3223 being thrown. It is always a reference to the real value.
3224 * except.c (expand_start_catch_block): Add handling for the
3225 value of the exception object.
3226 * except.c (expand_start_catch_block): Add handler for the handler,
3227 so that throws inside the handler go to the outer block.
3228 * except.c (expand_end_catch_block): Ditto.
3229 * parse.y (handler_args): Use parm instead, as the other doesn't yet
3230 handle references correctly.
3231
3232Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
3233
3234 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the
3235 vtable entry properly to abort.
3236
5b605f68
MS
3237Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3238
3239 * typeck.c (build_binary_op_nodefault): Downgrade division by zero
3240 errors to warnings.
3241
3242 * call.c (build_overload_call_real): Handle fnname being a list of
3243 functions.
3244 * typeck.c (build_x_function_call): Pass list of functions to
3245 build_overload_call, not just the name.
3246 * tree.c (count_functions): Complain when called for invalid
3247 argument.
3248
3249 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
3250 and DECL_EXTERNAL on static members and initialized const members.
3251 * decl2.c (grokfield): Reflect this change.
3252
9a0e77ba
JM
3253Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
3254
3255 * parse.y (init): ANSI C++ does not forbid { }.
3256
3257Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com)
3258
3259 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
3260 warn_nonvdtor defaults to off.
3261
3262 * class.c (instantiate_type): Use comptypes rather than relying on
3263 types to satisfy ==.
3264
3265 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
3266 might be static.
3267
3268 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
3269
3270 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
3271
3272 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
3273 build_cplus_new.
3274
3275Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com)
3276
3277 * decl2.c (finish_file): Maybe consider static inlines multiple
3278 times, in case they reference each other.
3279
63718c49
GB
3280Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu)
3281
3282 * class.c (finish_struct): Don't `cons_up_default_function's
3283 for signatures.
3284 (finish_struct): Handle an empty method_vec correctly.
3285
3286 * decl.c (grokdeclarator): Don't warn about a signature being
3287 empty in a signature pointer declaration if we only saw a
3288 forward declaration of the signature. Changed `warning's into
3289 `cp_warning's.
3290
3291 * sig.c (build_sigtable): Don't die if a null signature table
3292 constructor is returned.
3293 (build_signature_pointer_constructor): If the signature table
3294 constructor is null, the _sptr field is set to a null pointer
3295 and cast to the appropriate type. Make copies of all null
3296 pointers so that the type null_pointer_node doesn't get changed.
3297 (build_signature_table_constructor): Added comments.
3298
3299 * sig.c (build_signature_pointer_constructor): Complain if we
3300 try to assign to/initialize a signature pointer/reference of
3301 an undefined signature.
3302
3303Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu)
3304
3305 * typeck2.c (store_init_value): Don't be pedantic about
3306 non-constant initializers of signature tables/pointers/references.
3307
3308Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu)
3309
3310 * decl.c (grokdeclarator): If we are grokking an opaque typedef
3311 in a signature, don't complain about it begin static.
3312
6060a796 3313Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com>
21474714
MS
3314
3315 Fixes a problem of the this pointer being wrong in virtual calls to
3316 methods that are not overridden in more derived classes.
3317
3318 * class.c (fixup_vtable_delta): New routine. It will fixup the
3319 delta entries in vtables, wheever they need updating.
3320 * class.c (finish_struct): Call the new routine for all virtual
3321 bases, as they can have different offsets, than those used in base
3322 classes that we derive our vtable from.
3323
3324Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
3325
3326 * typeck.c (build_binary_op): Use the types before default
3327 conversions in the error message.
3328
3329 * *.c: Use c_build_type_variant instead of build_type_variant where
3330 the type might be an array.
3331
3332 * call.c (build_method_call): Call build_type_variant and
3333 build_reference_type in the right order.
3334 * decl.c (record_builtin_type): Ditto.
3335
3336Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com)
3337
3338 * call.c (build_method_call): Call build_type_variant and
3339 build_reference_type in the right order.
3340 * decl.c (record_builtin_type): Ditto.
3341
3342Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com)
3343
3344 * typeck.c (build_binary_op): Use the types before default
3345 conversions in the error message.
3346
3347 * *.c: Use c_build_type_variant instead of build_type_variant where
3348 the type might be an array.
3349
3350Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3351
3352 * cvt.c (convert_to_reference): Try UDC's before doing the
3353 reinterpret_cast thang, though.
3354
3355Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com)
3356
3357 * typeck.c (c_expand_return): Don't USE the return value location
3358 after we've expanded the jump.
3359
3360 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
3361 trying to write out an inline.
3362
3363 * cvt.c (build_up_reference): Also do address adjustment when the
3364 target type uses MI.
3365 (convert_to_reference): Try UDCs only after built-in conversions.
3366 (build_type_conversion_1): Don't play games with the argument to the
3367 method.
3368 (build_type_conversion): #if 0 out code for binding to reference.
3369
a3203465
MS
3370Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com)
3371
21474714
MS
3372 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
3373 whether to emit inlines.
3374
a3203465
MS
3375 * decl.c (grokdeclarator): Set explicit_int for decls that just
3376 specify, say, 'long'.
3377
3378 * init.c (do_friend): Do overload C functions (or call pushdecl,
63718c49 3379 anyaway).
a3203465
MS
3380
3381Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com)
3382
3383 * cvt.c (build_up_reference): Don't call readonly_error.
3384 (convert_to_reference): Propagate const and volatile from expr to
3385 its type.
3386
3387 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
3388
3389 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
3390 creating a temporary.
3391 (convert_to_reference): Lose excessive and incorrect trickiness.
3392 (cp_convert): Call build_cplus_new with with_cleanup_p set.
3393
3394 * typeck2.c (build_functional_cast): Ditto.
3395
3396Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com)
3397
3398 * decl.c (grokdeclarator): signed, unsigned, long and short all
3399 imply 'int'.
3400
3401 * decl.c (grokdeclarator): Allow "this is a type" syntax.
3402 (grok_reference_init): Simplify and fix.
3403
3404Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
3405
3406 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
3407 type.
3408
3409Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com)
3410
3411 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
3412 tinkering to after call to pushdecl.
3413
3414Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com)
3415
3416 * call.c (build_method_call): Handle destructors for non-aggregate
3417 types properly.
3418
3419Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com)
3420
3421 * call.c (build_method_call): Make sure that the name given for the
3422 destructor matches the constructor_name of the instance.
3423
3424 * pt.c (do_function_instantiation): A non-extern instantiation
3425 overrides a later extern one.
3426 (do_type_instantiation): Ditto.
3427
3428Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com)
3429
3430 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
3431 unqualified array type.
3432
3433 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
3434 CONSTRUCTOR with no elements.
3435
3436 * decl.c (various): Lose empty_init_node.
3437 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
3438 thing depending on the value of DECL_COMMON instead of
3439 flag_conserve_space, do the empty CONSTRUCTOR thing for types that
3440 don't have constructors, don't treat a real empty CONSTRUCTOR
3441 specially.
3442
3443 * typeck2.c (process_init_constructor): Don't treat empty_init_node
3444 specially.
3445
6060a796 3446Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com>
a3203465
MS
3447
3448 * class.c (override_one_vtable): Don't forget to merge in an old
3449 overrider when we wanted to reuse a vtable, but couldn't.
3450
3451Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com)
3452
3453 * decl.c (start_decl): Put statics in common again.
3454
3455 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
3456 setting the type to error_mark_node.
3457
3458 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
3459 bitfield assignments.
3460
f0e01782
MS
3461Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com)
3462
3463 * decl.c (grok_op_properties): Const objects can be passed by value.
3464
3465Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3466
3467 * decl2.c (import_export_vtable): Force implicit instantiations to
3468 be interface_only when -fno-implicit-templates.
3469
3470 * decl.c (duplicate_decls): Redeclaring a class template name is an
3471 error.
3472
3473 * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
3474 * xref.c (GNU_xref_decl): Support templates.
3475
3476Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com)
3477
3478 * decl.c (grok_op_properties): Split out checking for whether this
3479 function should suppress the default assignment operator.
3480 * decl2.c (grok_function_init): Ditto.
3481 (copy_assignment_arg_p): New function do do just that.
3482 Now considers virtual assignment operators that take a base as an
3483 argument to count as copy assignment operators.
3484
3485 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
3486 TREE_ASM_WRITTEN, as they are redundant.
3487
3488 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
3489 decl that has no LANG_SPECIFIC part.
3490 (do_type_instantiation): Force the debugging information for this
3491 type to be emitted.
3492
3493 * decl.c (start_decl): Clear up uses of various types of templates
3494 (say sorry for static data members, rather than "invalid template").
3495 (expand_static_init): Fix initialization of static data members of
3496 template classes.
3497
3498Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com)
3499
3500 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
3501
3502 * g++.c (main): Use -xc++-cpp-output for .i files.
3503
3504 * pt.c (tsubst): Give meaningful error about declaring template for
3505 a copy constructor which was not declared in the class template.
3506 (do_type_instantiation): Explicit instantiation before the class
3507 template is an error.
3508 (instantiate_template): Don't die if tsubst returns error_mark_node.
3509
3510Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3511
3512 Don't synthesize the copy assignment operator if the one in a base
3513 class is pure virtual.
3514 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
3515 whether the type has a pure virtual copy assignment operator.
3516 * class.c (finish_base_struct): Don't generate the copy assignment
3517 operator if a base class has a pure virtual one.
3518 * decl.c (grok_op_properties): Add disabled code to set
3519 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
3520 actually set.
3521 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
3522
3523 * decl2.c (import_export_vtable): Always treat template
3524 instantiations as if write_virtuals >= 2, and treat implicit
3525 instantiations as external if -fno-implicit-templates.
3526 (finish_file): Output all pending inlines if
3527 flag_keep_inline_functions.
3528
6060a796 3529Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com>
f0e01782
MS
3530
3531 * tree.c (layout_vbasetypes): Align virtual base classes inside
3532 complete objects, so that we don't core dump on machines such as
3533 SPARCs when we access members that require larger than normal
3534 alignments, such as a double. Also, we bump up the total alignment
3535 on the complete type, as necessary.
3536
3537Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com)
3538
3539 * gxxint.texi (Free Store): New section with code for examining
3540 cookie.
3541 (Limitations of g++): Remove operator delete entry, since it is no
3542 longer accurate. Fix access control entry.
3543
3544 * typeck.c (build_unary_op): Pedwarn about taking the address of or
3545 incrementing a cast to non-reference type.
3546 (build_modify_expr): Use convert instead of convert_force again.
3547
3548 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
3549 class type, not == RECORD_TYPE.
3550
3551 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
3552
3553 * typeck2.c (report_case_error): #if 0 out.
3554 * lex.c (real_yylex): Lose RANGE.
3555 * parse.y: Ditto.
3556
3557Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3558
3559 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
3560
3561Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com)
3562
3563 * typeck.c (build_c_cast): Don't shortcut conversions to the same
3564 type. Don't replace consts with their values here, since that's now
3565 done in cp_convert.
3566
3567 * cvt.c (cp_convert): When converting to bool, take
3568 integer_zero_node to false_node and all other INTEGER_CSTs to
3569 true_node.
3570 (build_type_conversion): Don't complain about multiple conversions
3571 to float if we're not really converting.
3572
a0a33927
MS
3573Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com)
3574
f0e01782
MS
3575 Implement 'extern template class A<int>;' syntax for suppressing
3576 specific implicit instantiations.
3577 * cp-tree.h: Update prototypes for do_*_instantiation.
3578 * pt.c (do_pending_expansions): Don't compile 'extern' explicit
3579 instantiations.
3580 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
3581 instantiations.
3582 (do_type_instantiation): Ditto.
3583 * parse.y (explicit_instantiation): Support 'extern template class
3584 A<int>;' syntax.
3585 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
3586 and DECL_EXTERNAL on explicit instantiations.
3587
a0a33927
MS
3588 * cvt.c (cp_convert): Replace constants with their values before
3589 converting.
f0e01782 3590 (cp_convert): Consistently use 'e' instead of 'expr'.
a0a33927
MS
3591
3592Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com)
3593
3594 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
3595
3596Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3597
3598 * typeck2.c (digest_init): Handle initializing a pmf with an
3599 overloaded method.
3600 * typeck.c (build_ptrmemfunc): Handle overloaded methods.
3601
3602 * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
3603 (xref_defn_tag): Ditto.
3604 * pt.c (process_template_parm): Ditto.
3605 (lookup_template_class): Ditto.
3606 (push_template_decls): Ditto.
3607 (instantiate_class_template): Ditto.
3608 (create_nested_upt): Ditto.
3609 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
3610 TYPE_DECLs.
3611
3612 * typeck.c (convert_arguments): Make sure type is not NULL before
3613 checking its TREE_CODE.
3614
6060a796 3615Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
3616
3617 * class.c (get_derived_offset): New routine.
3618 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
3619 BINFO_VIRTUALS when we choose a new base class to inherit from.
3620 * class.c (modify_one_vtable): Use get_derived_offset to get the
3621 offset to the most base class subobject that we derived this binfo
3622 from.
3623 * class.c (finish_struct): Move code to calculate the
3624 DECL_FIELD_BITPOS of the vfield up, as we need might need it for
3625 new calls to get_derived_offset in modify_one_vtable.
3626
3627Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com)
3628
3629 * init.c (build_member_call): Use build_pointer_type instead of
3630 TYPE_POINTER_TO.
3631
3632Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
3633
3634 * decl.c (grokdeclarator): Make sure we have a DNAME set before we
3635 try to use it in an error.
3636
6060a796 3637Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
3638
3639 * typeck.c (convert_arguments, convert_for_initialization): Don't
3640 strip NOP_EXPRs, when we are converting to a reference.
3641
3642Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com)
3643
3644 * typeck.c (build_modify_expr): Don't dereference references when
3645 initializing them.
3646
3647 * decl2.c (grokfield): Don't check for grokdeclarator returning
3648 error_mark_node any more.
3649
3650 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
3651 (start_method): Return void_type_node instead of error_mark_node.
3652
3653 * typeck.c (build_modify_expr): Resolve offset refs earlier.
3654
3655Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3656
3657 * call.c (build_method_call): Resolve OFFSET_REFs in the object.
3658
3659 * typeck.c (build_modify_expr): Dereference references before trying
3660 to assign to them.
3661
3662 * call.c (build_method_call): Don't confuse type conversion
3663 operators with constructors.
3664 * typeck2.c (build_functional_cast): Just call build_c_cast if there
3665 was only one parameter.
3666 * method.c (build_typename_overload): Don't set
3667 IDENTIFIER_GLOBAL_VALUE on these identifiers.
3668 * decl.c (grok_op_properties): Warn about defining a type conversion
3669 operator that converts to a base class (or reference to it).
3670 * cvt.c (cp_convert): Don't try to use a type conversion operator
3671 when converting to a base class.
3672 (build_type_conversion_1): Don't call constructor_name_full on an
3673 identifier.
3674 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
3675
3676 * decl.c (start_decl): Don't complain that error_mark_node is an
3677 incomplete type.
3678 (finish_decl): Check for type == error_mark_node.
3679
3680Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com)
3681
3682 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
3683 instantiations and inline members.
3684
3685 * spew.c (yylex): Set looking_for_template if the next token is a '<'.
3686
3687 * lex.h: Declare looking_for_template.
3688
3689 * decl.c (lookup_name_real): Use looking_for_template to arbitrate
3690 between type and template interpretations of an identifier.
3691
3692Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3693
3694 * pt.c (instantiate_template): Zero out p if we found a
3695 specialization.
3696
3697 * decl.c (grokdeclarator): Elucidate warning.
3698 (grokdeclarator): If pedantic AND -ansi, complain about long long.
3699
3700 Make explicit instantiation work reasonably. It is now appropriate
3701 to deprecate the use of -fexternal-templates.
3702 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
3703 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
3704 (end_template_instantiation): Reflect changes in USE_TEMPLATE
3705 semantics.
3706 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
3707 (do_function_instantiation): Don't set EXPLICIT_INST if
3708 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN
3709 appropriately otherwise.
3710 (do_type_instantiation): Set interface info for class. Set
3711 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if
3712 flag_external_templates is set.
3713 * parse.y: Reflect changes in USE_TEMPLATE semantics.
3714 * decl2.c: New flag flag_implicit_templates determines whether or
3715 not implicit instantiations get emitted. This flag currently
3716 defaults to true, and must be true for -fexternal-templates to work.
3717 (finish_file): Consider flag_implement_inlines when
3718 setting DECL_EXTERNAL. Consider flag_implicit_templates when
3719 deciding whether or not to emit a static copy.
3720 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
3721 properly for template instantiations.
3722 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
3723 template class.
3724 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
3725 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
3726 (various others): Accessor macros for the above.
3727
3728Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com)
3729
3730 * typeck.c (build_binary_op_nodefault): Division by constant zero is
3731 an error.
3732
6060a796 3733Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com>
a0a33927
MS
3734
3735 * class.c (override_one_vtable): Don't modify things we don't own.
3736
3737Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com)
3738
3739 * decl.c (finish_decl): Don't postpone processing the initializer of
3740 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
3741 PUBLIC const at toplevel.
3742 (grokdeclarator): pedwarn about initializing non-const or
3743 non-integral statics in the class body.
3744
3745 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
3746 TYPE_DECL.
3747
3748 * call.c (convert_harshness): Dereference reference on rhs before
3749 proceeding, properly grok passing const things to non-const
3750 references.
3751
3752 * typeck.c (build_unary_op): Soften error about taking the address
3753 of main() to a pedwarn.
3754
3755 * lex.c (default_copy_constructor_body): Unambiguously specify base
3756 classes (i.e. A((const class ::A&)_ctor_arg) ).
3757 (default_assign_ref_body): Ditto.
3758
3759Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com)
3760
3761 * decl2.c (grokfield): Don't complain about local signature
3762 method declaration without definition.
3763
3764 * call.c (convert_harshness): If `type' is a signature pointer
3765 and `parmtype' is a pointer to a signature, just return 0. We
3766 don't really convert in this case; it's a result of making the
3767 `this' parameter of a signature method a signature pointer.
3768
3769 * call.c (build_method_call): Distinguish calling the default copy
3770 constructor of a signature pointer/reference from a signature
3771 member function call.
3772
3773Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com)
3774
3775 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
3776 declarations.
3777
3778 * decl.c (duplicate_decls): A previous function declaration as
3779 static overrides a subsequent non-static definition.
3780 (grokdeclarator): Don't set TREE_PUBLIC on inline method
3781 declarations.
3782
3783Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com)
3784
3785 * decl.c (grokdeclarator): Handle initialization of static const
3786 members.
3787 (finish_decl): Ditto.
3788
3789 * decl2.c (grokfield): Allow initialization of static const members
3790 even when pedantic.
3791
3792 * decl2.c (grokfield): Deal with grokdeclarator returning
3793 error_mark_node.
3794
3795 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
3796 (grokfndecl): Check the return value of grok_ctor_properties.
3797 (start_method): Ditto.
3798
3799 * parse.y (absdcl): Expand type_quals inline.
3800
3801Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
3802
3803 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
3804 RECORD_TYPE.
3805
3806Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com)
3807
3808 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
3809 always use "__vt_%s".
3810 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals
3811 when looking for a "sentinal" method (to decide on emitting vtables).
3812 * decl2.c (finish_file): Scan all decls for thunks that need
3813 to be emitted.
3814 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk.
3815 * method.c (make_thunk): Use a more meaningful label. If there
3816 exists a matching top-level THUNK_DECL re-use it; otherwise
3817 create a new THUNK_DECL (and declare it).
3818 * method.c (emit_thunk): Make thunk external/public depending
3819 on the underlying method.
3820
3821Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com)
3822
3823 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
3824 lookup_name.
3825
3826 * call.c (build_overload_call_real): Don't immediately pick a
3827 function which matches perfectly.
3828
3829 * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
3830 (grokdeclarator): Warn about, and throw away, cv-quals attached to a
3831 reference (like 'int &const j').
3832
3833 * typeck.c (convert_arguments): Don't mess with i for methods.
3834 * call.c (build_method_call): Pass the function decl to
3835 convert_arguments.
3836
3837 * typeck.c (comp_ptr_ttypes_real): New function. Implements the
3838 checking for which multi-level pointer conversions are allowed.
3839 (comp_target_types): Call it.
3840 (convert_for_assignment): Check const parity on the ultimate target
3841 type, too. And make those warnings pedwarns.
3842
3843Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com)
3844
3845 * error.c (dump_char): Use TARGET_* for character constants.
3846
3847Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
3848
3849 * tree.c (debug_no_list_hash): Make static.
3850
3851 * decl.c (decls_match): Say the types don't match if newdecl ends up
3852 with a null type, after we've checked if olddecl does.
3853 (pushdecl): Check if the decls themselves match before looking for
3854 an extern redeclared as static, to avoid inappropriate and incorrect
3855 warnings.
3856
3857Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3858
3859 * decl.c (grokdeclarator): Make warning about duplicate short, etc.
3860 a pedwarn.
3861
3862 * typeck.c (build_c_cast): Casting to function or method type is an
3863 error.
3864
3865 * class.c (finish_struct): Make warning for anonymous class with no
3866 instances a pedwarn.
3867
3868 * Makefile.in (stamp-parse): Expect a s/r conflict.
3869
3870 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
3871 cast as an lvalue.
3872
2986ae00
MS
3873Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com)
3874
3875 * cvt.c (type_promotes_to): Make sure bool promotes to int rather
3876 than unsigned on platforms where sizeof(char)==sizeof(int).
3877
3878Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com)
3879
3880 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
3881 another variant.
3882 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
3883 and treat them as lvalues.
3884
3885 * decl.c (shadow_tag): Do complain about forward declarations of
3886 enums and empty declarations.
3887 * parse.y: Don't complain about forward declarations of enums and
3888 empty declarations.
3889
3890 * typeck.c (convert_for_assignment): Complain about changing
3891 the signedness of a pointer's target type.
3892
3893 * parse.y (stmt): Move duplicated code for checking case values from
3894 here.
3895 * decl2.c (check_cp_case_value): To here. And add a call to
3896 constant_expression_warning.
3897
3898 * typeck.c (convert_for_assignment): Don't complain about assigning
3899 a negative value to bool.
3900
3901 * decl.c (init_decl_processing): Make bool unsigned.
3902
3903 * class.c (finish_struct): Allow bool bitfields.
3904
2986ae00
MS
3905Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3906
3907 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
3908
3909Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com)
3910
3911 * cvt.c (build_type_conversion): Lose special handling of
3912 truthvalues.
3913
3914 * search.c (dfs_pushdecls): Improve shadowing warning.
3915
3916Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
3917
3918 * init.c (build_delete): Throw away const and volatile on `this'.
3919
3920 * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
3921 rather than the enumerators.
3922 (pushtag): s/cdecl/c_decl/g
3923
3924Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
3925
63718c49
GB
3926 * cp/typeck.c (common_type): Attribute merging.
3927 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
2986ae00 3928
63718c49 3929 * cp/parse.y: Revamp attribute parsing.
2986ae00
MS
3930
3931Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com)
3932
3933 * decl.c (shadow_tag): Also check for inappropriate use of auto and
3934 register.
3935
3936 * method.c (build_overload_name): Clarify that the illegal case is a
3937 pointer or reference to array of unknown bound.
3938
3939 * error.c (dump_type_prefix): Print references to arrays properly.
3940
3941 * typeck.c (various): Be more helpful in pointer
3942 comparison diagnostics.
3943
3944 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this
3945 fun?
3946
3947 * parse.y: Also catch an error after valid stmts.
3948
3949 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
3950 const.
3951
3952 * typeck.c (convert_for_initialization): If call to
3953 convert_to_reference generated a diagnostic, print out the parm
3954 number and function decl if any.
3955
3956 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
3957 specifying a line, not atarg.
3958
3959 * tree.c (build_cplus_method_type): Always make `this' const.
3960
3961 * decl2.c (grokclassfn): If -fthis-is-variable and this function is
3962 a constructor or destructor, make `this' non-const.
3963
3964 * typeck.c (build_modify_expr): Don't warn specially about
3965 assignment to `this' here anymore, since it will be caught by the
3966 usual machinery.
3967
3968 * various: Disallow specific GNU extensions (variable-size arrays,
3969 etc.) when flag_ansi is set, not necessarily when pedantic is set,
3970 so that people can compile with -pedantic-errors for tighter const
3971 checking and such without losing desirable extensions.
3972
3973 * typeck2.c (build_functional_cast): Call build_method_call with
3974 LOOKUP_PROTECT.
3975 (process_init_constructor): Only process FIELD_DECLs.
3976
3977 * decl.c (finish_decl): Also force static consts with no explicit
3978 initializer that need constructing into the data segment.
3979
3980 * init.c (build_delete): Undo last patch, as it interferes with
3981 automatic cleanups.
3982
3983Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com)
3984
3985 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
3986 code.
3987
3988 * init.c (build_delete): pedwarn about using plain delete to delete
3989 an array.
3990
3991Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com)
3992
3993 * typeck.c (comp_target_types): Be more helpful in contravariance
3994 warnings, and make them pedwarns.
3995
3996 * decl.c (grokdeclarator): Use decl_context to decide whether or not
3997 this is an access declaration.
3998
3999 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
4000 has a conversion to enum or bool, too.
4001
6060a796 4002Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
4003
4004 * method.c (emit_thunk): Make declaration for
4005 current_call_is_indirect local (needed for hppa).
4006
4007Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com)
4008
4009 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
4010 (tsubst): Ditto.
4011
6060a796 4012Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
4013
4014 * pt.c (tsubst): If there is already a function for this expansion,
4015 use it.
4016 * pt.c (instantiate_template): Ditto.
4017
4018Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
4019
4020 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
4021 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
4022 generating debug info for unemitted symbols on some systems.
4023
4024 * cp-tree.h (build_static_cast, build_reinterpret_cast,
4025 build_const_cast): Add declarations.
4026
6060a796 4027Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
4028
4029 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
4030 fix. We now try get_binfo, and if that doesn't find what we want,
4031 we go back to the old method, which still sometimes fails.
4032
4033Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com)
4034
4035 * parse.y (initdcl): Call cplus_decl_attributes on the right
4036 variable.
4037 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
4038 void_type_node.
4039
4040 * typeck.c (build_binary_op_nodefault): Change result_type for
4041 comparison ops to bool.
4042 (build_binary_op): Convert args of && and || to bool.
4043 * cvt.c (build_default_binary_type_conversion): Convert args of &&
4044 and || to bool.
4045 (build_default_unary_type_conversion): Convert arg of ! to bool.
4046 (type_promotes_to): bool promotes to int.
4047
6060a796 4048Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com>
2986ae00
MS
4049
4050 Implement the new builtin `bool' type.
4051 * typeck.c (build_binary_op_nodefault): Convert args of && and || to
4052 bool.
4053 (build_unary_op): Convert arg of ! to bool.
4054 * parse.y: Know true and false. Use bool_truthvalue_conversion.
4055 * method.c (build_overload_value): Know bool.
4056 (build_overload_name): Ditto.
4057 * lex.c (init_lex): Set up RID_BOOL.
4058 * gxx.gperf: Add bool, true, false.
4059 * error.c (*): Know bool.
4060 * decl.c (init_decl_processing): Set up bool, true, false.
4061 * cvt.c (cp_convert): Handle conversion to bool.
4062 (build_type_conversion): Ditto.
4063 * *.c: Accept bool where integers and enums are accepted (use
4064 INTEGRAL_CODE_P macro).
4065
8de7634e
RE
4066Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
4067
4068 * g++.c: Use #ifdef for __MSDOS__, not #if.
4069
6060a796 4070Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
4071
4072 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps
4073 gives old behavior , and destroys temporaries earlier. Default
4074 behavior now conforms to the ANSI working paper.
4075
4076Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com)
4077
4078 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
4079 Use convert_force to convert the result of a recursive call when we
4080 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs
4081 in COMPOUND_EXPRs any more.
4082 (various): Lose pedantic_lvalue_warning.
4083 (unary_complex_lvalue): Understand MODIFY_EXPR.
4084
4085 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
4086 we don't know what we're initializing.
4087
4088Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com)
4089
4090 * cvt.c (convert_to_reference): Modify to use convtype parameter.
4091 Only create temporaries when initializing a reference, not when
4092 casting.
4093 (cp_convert): New main function.
4094 (convert): Call cp_convert.
4095 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
4096 * cp-tree.h (CONV_*): New constants used by conversion code for
4097 selecting conversions to perform.
4098
4099 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
4100
4101 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
4102 call build_c_cast.
4103 * parse.y: Add {static,reinterpret,const}_cast.
4104 * gxx.gperf: Ditto.
4105
4106 * typeck.c (common_type): Allow methods with basetypes of different
4107 UPTs.
4108 (comptypes): Deal with UPTs.
4109 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
4110
4111 * pt.c (end_template_decl): Check for multiple definitions of member
4112 templates.
4113
4114 * call.c (build_method_call): Complain about calling an abstract
4115 virtual from a constructor.
4116
4117 * typeck.c (pointer_int_sum): Check for the integer operand being 0
4118 after checking the validity of the pointer operand.
4119
4120 * typeck2.c (digest_init): Pedwarn about string initializer being
4121 too long.
4122
4123Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com)
4124
4125 * decl.c (push_overloaded_decl): Only throw away a builtin if the
4126 decl in question is the artificial one.
4127
4128 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
4129 expand_{start,end}_case cannot happen in the middle of a block.
4130
4131 * cvt.c (build_type_conversion_1): Use convert again.
4132
4133Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
4134
4135 * typeck2.c (digest_init): Make sure we check for signed and
4136 unsigned chars as well when warning about string initializers.
4137
4138 * init.c (emit_base_init): Check if there's a DECL_NAME on the
4139 member before trying to do an initialization for it.
4140
6060a796 4141Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
4142
4143 * except.c: Don't do anything useful when cross compiling.
4144
4145Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com)
4146
4147 * decl.c (duplicate_decls): Fix up handling of builtins yet again.
4148 (push_overloaded_decl): Ditto.
4149
4150 * cvt.c (convert): Don't look for void type conversion.
4151
4152Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com)
4153
4154 * init.c (do_friend): Only do a pushdecl for friends, not
4155 pushdecl_top_level.
4156
4157Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
4158
4159 * decl.c (lookup_name_current_level): Put empty statement after
4160 the label OUT to make the code valid C.
4161
4162Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com)
4163
4164 * typeck.c (build_binary_op_nodefault): Only complain about
4165 comparing void * and a function pointer if void * is smaller.
4166
4167Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com)
4168
4169 * decl.c (lookup_name_current_level): Move through temporary binding
4170 levels.
4171
4172 * parse.y (already_scoped_stmt): Revive.
4173 (simple_stmt): Use it again.
4174
4175 * decl.c (poplevel): Always call poplevel recursively if we're
4176 dealing with a temporary binding level.
4177
6060a796 4178Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com>
a4443a08
MS
4179
4180 * decl.c (finish_decl): Make sure we run cleanups for initial values
4181 of decls. Cures memory leak.
4182 * decl.c (expand_static_init): Ditto for static variables.
4183 * decl2.c (finish_file): Ditto for globals.
4184
4185Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com)
4186
4187 * typeck.c (commonparms): Don't complain about redefining default
4188 args.
4189
4190 * decl.c (duplicate_decls): Don't complain twice about conflicting
4191 function decls.
4192 (decls_match): Don't look at default args.
4193 (redeclaration_error_message): Complain about redefining default
4194 args.
4195
4196 * call.c (build_overload_call_real): Also deal with guiding
4197 declarations coming BEFORE the template decl.
4198
4199 * pt.c (unify): Allow different parms to have different
4200 cv-qualifiers.
4201 (unify): Allow trivial conversions on non-template parms.
4202
4203Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com)
4204
4205 * pt.c (tsubst): Support OFFSET_TYPEs.
4206 (unify): Ditto.
4207
4208 * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
4209
4210 * init.c (build_offset_ref): Fix error message.
4211 * search.c (lookup_field): Ditto.
4212
4213 * call.c (build_scoped_method_call): Pass binfo to
4214 build_method_call.
4215 * typeck.c (build_object_ref): Ditto.
4216
4217 * typeck2.c (binfo_or_else): Don't return a _TYPE.
4218
4219 * class.c (finish_struct): Don't complain about re-use of inherited
4220 names or shadowing of type decls.
4221 * decl.c (pushdecl_class_level): Ditto.
4222
4223 * decl.c (finish_enum): Set the type of all the enums.
4224
4225 * class.c (finish_struct): Don't get confused by access decls.
4226
4227 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
4228 _TYPE. You can stop using TYPE_NAME for that now.
4229
4230 * parse.y: Lose doing_explicit (check $0 instead).
4231 * gxx.gperf: 'template' now has a RID.
4232 * lex.h (rid): Ditto.
4233 * lex.c (init_lex): Set up the RID for 'template'.
4234
4235 * parse.y (type_specifier_seq): typed_typespecs or
4236 nonempty_type_quals. Use it.
4237 (handler_args): Fix bogus syntax.
4238 (raise_identifier{,s}, optional_identifier): Lose.
4239 * except.c (expand_start_catch_block): Use grokdeclarator to parse
4240 the catch variable.
4241 (init_exception_processing): The second argument to
4242 __throw_type_match is ptr_type_node.
4243
4244 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin)
4245
4246 [ change propagated from c-decl.c of snapshot 940429 ]
4247 * cp/decl.c (finish_decl): Setting asmspec_tree should not
4248 zero out the old RTL.
4249
6060a796 4250Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com>
8d2733ca
MS
4251
4252 Add alpha exception handling support to the compiler.
4253 Quick and dirty backend in except.c.
4254
4255 * cp/*: Remove most remnants of old exception handling support.
4256 * decl.c (finish_function): Call expand_exception_blocks to put
4257 the exception hanlding blocks at the end of the function.
4258 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
4259 comes after expand_decl_init.
4260 * except.c: Reimplementation.
4261 * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
4262 * lex.c (init_lex): Always have catch, try and throw be reserved
4263 words, so that we may always parse exception handling.
4264 * parse.y: Cleanup to support new interface into exception handling.
4265 * tree.def (THROW_EXPR): Add.
4266
4267Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com)
4268
4269 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
4270 (various): Lose .kindof_pushlevel and partially_scoped_stmt.
4271
4272Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com)
4273
4274 * parse.y (already_scoped_stmt): move expand_end_binding() to
4275 fix the unmatched LBB/LBE in stabs.
4276
4277Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com)
4278
4279 * decl.c (set_nested_typename): Set TREE_MANGLED on the new
4280 identifiers.
4281 (pushdecl): Check TREE_MANGLED.
4282 (xref_tag): Ditto.
4283 * cp-tree.h (TREE_MANGLED): This identifier is a
4284 DECL_NESTED_TYPENAME (named to allow for future use to denote
4285 mangled function names as well).
4286
4287 Implement inconsistency checking specified in [class.scope0].
4288 * decl.c (lookup_name_real): Don't set ICV here after all.
4289 (finish_enum): Also set the type of the enumerators themselves.
4290 (build_enumerator): Put the CONST_DECL in the list instead of its
4291 initial value.
4292 (pushdecl_class_level): Check inconsistent use of a name in the
4293 class body.
4294 * class.c (finish_struct): Check inconsistent use of a name in the
4295 class body. Don't set DECL_CONTEXT on types here anymore.
4296 * parse.y (qualified_type_name): Note that the identifier has now
4297 been used (as a type) in the class body.
4298 * lex.c (do_identifier): Note that the identifier has now been used
4299 (as a constant) in the class body.
4300 * error.c (dump_decl): Print type and enum decls better.
4301
700f8a87
MS
4302Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
4303
4304 * typeck.c (build_modify_expr): Warn about assignment to `this'.
4305
4306Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com)
4307
4308 * init.c (build_delete): Use the global operator delete when
4309 requested.
4310
4311 * decl.c (lookup_name_real): If we find the type we're looking in a
4312 base class while defining a class, set IDENTIFIER_CLASS_VALUE for
4313 the type.
4314
4315 * class.c (finish_struct): Remove a couple of dependencies on
4316 language linkage.
4317
4318 * decl.c (pushtag): Classes do nest in extern "C" blocks.
4319 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
4320 the type.
4321 (pushtag): Remove another dependency on the language linkage.
4322
4323 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
4324 a const-qualified type.
4325
4326 * decl.c (push_overloaded_decl): Throw away built-in decls here.
4327 (duplicate_decls): Instead of here.
4328
4329Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
4330
4331 * typeck.c (get_member_function_from_ptrfunc): Do The Right
4332 Thing (I hope) if we're using thunks.
4333
4334Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com)
4335
4336 * parse.y (specialization): aggr template_type_name ';'.
4337 (named_class_head_sans_basetype): Use it.
4338 (explicit_instantiation): Ditto.
4339 (tmpl.2): Revert.
4340
4341 * cvt.c (build_type_conversion_1): Use convert_for_initialization,
4342 rather than convert, to do conversions after the UDC.
4343
4344 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
4345 instances of the class.
4346
4347 * search.c (lookup_field): If the entity found by two routes is the
4348 same, it's not ambiguous.
4349
4350Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com)
4351
4352 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE,
4353 to prevent the compiler from crashing ...
4354
4355Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com)
4356
4357 * call.c (build_method_call): If we don't have an object, check
4358 basetype_path to figure out where to look up the function.
4359
4360 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
4361 build_method_call in case exp is NULL_TREE.
4362
4363Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com)
4364
4365 Give a vtable entries a unique named type, for the sake of gdb.
4366 * class.c (build_vtable_entry): The addres of a thunk now has
4367 type vtable_entry_type, not ptr_type_node.
4368 * method.c (make_thunk): Fix type of THUNK_DECL.
4369 * class.c (add_virtual_function, override_one_vtable): Use
4370 vfunc_ptr_type_node, instead of ptr_type_node.
4371 * cp-tree.h (vfunc_ptr_type_node): New macro.
4372 * decl.c (init_decl_processing): Make vtable_entry_type
4373 be a unique type of pointer to a unique function type.
4374
4375Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com)
4376
4377 * parse.y (do_explicit): Sets doing_explicit to 1.
4378 (explicit_instantiation): Use do_explicit rather than TEMPLATE
4379 directly, add "do_explicit error" rule.
4380 (datadef): Set doing_explicit to 0 after an explicit instantiation.
4381 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
4382 explicit instantiation.
4383 (named_class_head_sans_basetype): Remove aggr template_type_name
4384 ';' again.
4385
4386Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com)
4387
4388 * search.c (lookup_nested_tag): Lose.
4389
4390 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
4391 (lookup_name_nonclass): Lose.
4392
4393 * decl.c (poplevel_class): Add force parameter.
4394 (lookup_name_real): Fix handling of explicit scoping which specifies
4395 a class currently being defined. Add 'nonclass' argument.
4396 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
4397
4398 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
4399 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
4400 called from finish_struct.
4401
4402Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
4403
4404 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type.
4405 (It seeems redundant, given build_ptrmemfunc_type.)
4406 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
4407 build_classof): Use vtable_entry_type instead of memptr_type.
4408 * method.c (emit_thunk): Call poplevel with functionbody==0
4409 to prevent DECL_INITIAL being set to a BLOCK.
4410
4411Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
4412
4413 * parse.y (named_class_head_sans_basetype): Add "aggr
4414 template_type_name ';'" rule for forward declaration of
4415 specializations.
4416
4417Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com)
4418
4419 * class.c (instantiate_type): Deal with pmf's.
bfef964b
JM
4420
4421 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
4422 stamp-objlist does.
700f8a87 4423
bfef964b
JM
4424 * Makefile.in (../cc1plus): Depend on OBJDEPS.
4425 (OBJDEPS): Dependency version of OBJS.
4426
700f8a87
MS
4427Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com)
4428
4429 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
4430 DECL_IGNORED_P.
4431
4432Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com)
4433
4434 * class.c (finish_struct): Clear out memory of local tags. And
4435 typedefs.
4436
4437 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
4438 type.
4439 * search.c (get_matching_virtual): Be more helpful in error message.
4440
4441 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
4442
4443 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
4444 (default_copy_constructor_body): Ditto.
4445
4446 * class.c (finish_struct): Don't gratuitously create multiple decls
4447 for nested classes.
4448
4449Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com)
4450
4451 Avoid clobbering the arg types of other functions when reverting
4452 static member functions.
4453 * decl.c (revert_static_member_fn): Rearrange arguments, don't
4454 require values for 'fn' and 'argtypes', add warning to comment
4455 above.
4456 (decls_match): Rearrange arguments in call to rsmf.
4457 (grok_op_properties): Don't pass values for fn and argtypes.
4458 * pt.c (instantiate_template): Don't pass values for fn and argtypes.
4459
15fa00e9
DE
4460Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com)
4461
4462 * Make-lang.in (cc1plus): Depend on stamp-objlist.
4463 * Makefile.in (BC_OBJS): Delete.
700f8a87
MS
4464 (OBJS): Cat ../stamp-objlist to get language independent files.
4465 Include ../c-common.o.
15fa00e9
DE
4466 (../cc1plus): Delete reference to BC_OBJS.
4467
700f8a87
MS
4468Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com)
4469
4470 * search.c (compute_access): No really, deal with static members
4471 properly. Would I lie to you?
4472
4473 Implement lexical hiding of function declarations.
4474 * pt.c (tsubst): Use lookup_name to look for function decls to guide
4475 instantiation.
4476 * method.c (build_opfncall): Use lookup_name_nonclass to look for
4477 non-member functions.
4478 * init.c (do_friend): Use lookup_name_nonclass to look for
4479 functions.
4480 * error.c (ident_fndecl): Use lookup_name to look for functions.
4481 * decl2.c (lookup_name_nonclass): New function, skips over
4482 CLASS_VALUE.
4483 * decl.c (struct binding_level): Lose overloads_shadowed field.
4484 (poplevel): Don't deal with overloads_shadowed.
4485 (push_overloaded_decl): Do lexical hiding for functions.
4486 * class.c (instantiate_type): Don't check non-members if we have
4487 members with the same name.
4488 * call.c (build_method_call): Use lookup_name_nonclass instead of
4489 IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
4490 (build_overload_call_real): Ditto.
4491
4492 * decl.c (duplicate_decls): Check for ambiguous overloads here.
4493 (push_overloaded_decl): Instead of here.
4494
4495 * decl.c (pushdecl): Back out Chip's last change.
4496
4497 * decl.c (grok_op_properties): operators cannot be static members.
4498
4499 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
4500 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
4501 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
4502
4503 * method.c (do_inline_function_hair): Don't put friends of local
4504 classes into global scope, either.
4505
4506 * typeck2.c (build_functional_cast): Don't look for a function call
4507 interpretation.
4508
6060a796 4509Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
4510
4511 * cp-tree.h: disable use of backend EH.
4512
15fa00e9
DE
4513Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com)
4514
4515 * Make-lang.in (c++.distdir): mkdir tmp/cp first.
4516 * Makefile.in (INCLUDES): Move definition to same place as
4517 parent makefile.
4518 (ALLOCA): Define.
4519 (OLDAR_FLAGS): Delete.
4520 (OLDCC): Define.
4521 (DIR): Delete.
4522 (CLIB): Define.
4523 (####site): Delete.
4524 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
4525
39211cd5
MS
4526Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com)
4527
4528 * decl.c (xref_tag): not to use strstr(), it's not available on
4529 all platforms.
4530
4531Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com)
4532
4533 * class.c (finish_struct): Resolve yet another class/pmf confusion.
4534
4535 * call.c (build_overload_call_real): Don't take the single-function
4536 shortcut if we're dealing with an overloaded operator.
4537
6060a796 4538Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
4539
4540 * search.c (get_base_distance): Search the virtual base class
4541 binfos, incase someone wants to convert to a real virtual base
4542 class.
4543 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
4544 instead of convert_pointer_to, as it now will work.
4545
4546Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com)
4547
4548 * cvt.c (convert_to_reference): Don't complain about casting away
4549 const and volatile.
4550
4551 * typeck.c (build_unary_op): References are too lvalues.
4552
6060a796 4553Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
4554
4555 * class.c (override_one_vtable): We have to prepare_fresh_vtable
4556 before we modify it, not after, also, we cannot reuse an old vtable,
4557 once we commit to a new vtable. Implement ambiguous overrides in
4558 virtual bases as abstract. Hack until we make the class
4559 ill-formed.
4560
4561Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com)
4562
4563 * parse.y (unary_expr): Expand new_placement[opt] and
4564 new_initializer[opt] inline.
4565
4566 * search.c (lookup_fnfields): Don't throw away the inheritance
4567 information here, either.
4568 (compute_access): Handle static members properly.
4569
4570 * init.c (build_member_call): Always set basetype_path, and pass it
4571 to lookup_fnfields.
4572
4573 * search.c (lookup_field): Deal properly with the case where
4574 xbasetype is a chain of binfos; don't throw away the inheritance
4575 information.
4576 (compute_access): protected_ok always starts out at 0.
4577
4578 * init.c (resolve_offset_ref): Don't cast `this' to the base type
4579 until we've got our basetype_path.
4580
4581 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
4582
4583 * cvt.c (build_up_reference): Use build_pointer_type rather than
4584 TYPE_POINTER_TO.
4585
4586 * call.c (convert_harshness_ansi): Call type_promotes_to for reals
4587 as well.
4588
4589 * cvt.c (type_promotes_to): Retain const and volatile, add
4590 float->double promotion.
4591
4592 * decl.c (grokdeclarator): Don't bash references to arrays into
4593 references to pointers in function parms. Use type_promotes_to.
4594
6060a796 4595Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com>
39211cd5
MS
4596
4597 Finish off Apr 19th work.
4598
4599 * class.c (finish_struct_bits): Rename has_abstract_virtuals to
4600 might_have_abstract_virtuals.
4601 * class.c (strictly_overrides, override_one_vtable,
4602 merge_overrides): New routines to handle virtual base overrides.
4603 * class.c (finish_struct): Call merge_overrides to handle overrides
4604 in virtual bases.
4605
4606Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com)
4607
4608 * typeck.c (build_function_call): Call build_function_call_real with
4609 LOOKUP_NORMAL.
4610
4611 * *: Don't deal with TYPE_EXPRs.
4612
4613 * tree.c (lvalue_p): If the type of the expression is a reference,
4614 it's an lvalue.
4615
4616 * cvt.c (convert_to_reference): Complain about passing const
4617 lvalues to non-const references.
4618 (convert_from_reference): Don't arbitrarily throw away const and
4619 volatile on the target type.
4620
4621 * parse.y: Simplify and fix rules for `new'.
4622
4623 * decl.c (grok_op_properties): operator void is illegal.
4624
4625Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com)
4626
4627 * parse.y (components): Anonymous bitfields can still have declspecs.
4628
4629 * decl.c (pushdecl): Postpone handling of function templates like we
4630 do C functions.
4631
4632 * search.c (expand_indirect_vtbls_init): Fix infinite loop when
4633 convert_pointer_to fails.
4634
4635 * call.c (compute_conversion_costs_ansi): A user-defined conversion
4636 by itself is better than that UDC followed by standard conversions.
4637 Don't treat integers and reals specially.
4638
4639 * cp-tree.h: Declare flag_ansi.
4640
4641 * typeck.c (c_expand_return): pedwarn on return in void function
4642 even if the expression is of type void.
4643 (build_c_cast): Don't do as much checking for casts to void.
4644 (build_modify_expr): pedwarn about array assignment if this code
4645 wasn't generated by the compiler.
4646
4647 * tree.c (lvalue_p): A comma expression is an lvalue if its second
4648 operand is.
4649
4650 * typeck.c (default_conversion): Move code for promoting enums and
4651 ints from here.
4652 * cvt.c (type_promotes_to): To here.
4653 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix
4654 promotion semantics for reals.
4655
15fa00e9
DE
4656Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
4657
4658 * Make-lang.in (c++.install-common): Check for g++-cross.
4659 * Makefile.in: Remove Cygnus cruft.
4660 (config.status): Delete.
4661 (RTL_H): Define.
4662 (TREE_H): Use complete pathname, some native makes have minimal
4663 VPATH support.
4664 (*.o): Use complete pathname to headers in parent dir.
4665 (doc, info, dvi): Delete.
4666
700f8a87
MS
4667Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com)
4668
4669 * Make-lang.in (c++.install-common): Check for g++-cross.
4670 * Makefile.in: Remove Cygnus cruft.
4671 (config.status): Delete.
4672 (RTL_H): Define.
4673 (TREE_H): Use complete pathname, some native makes have minimal
4674 VPATH support.
4675 (*.o): Use complete pathname to headers in parent dir.
4676 (doc, info, dvi): Delete.
4677
39211cd5
MS
4678Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com)
4679
4680 * decl.c (pushdecl): Avoid redundant warning on redeclaring function
4681 with different return type.
4682 (decls_match): Compare return types strictly.
4683
4684Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com)
4685
4686 * cvt.c (build_type_conversion): Do try to convert through other
4687 pointers. This will fail if the class defines multiple pointer
4688 conversions.
4689
4690 * error.c (dump_type_prefix): Print out pointers to arrays properly.
4691 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]')
4692
4693 * typeck.c (build_unary_op): Disallow ++/-- on pointers to
4694 incomplete type.
4695
4696 * decl.c (duplicate_decls): Check mismatched TREE_CODES after
4697 checking for shadowing a builtin. If we're redeclaring a builtin
4698 function, bash the old decl to avoid an ambiguous overload.
4699
4700 * cvt.c (convert_to_reference): Don't force arrays to decay here.
4701
4702 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
4703
4704 * decl.c (duplicate_decls): Don't assume that the decls will have
4705 types.
4706
4707 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp)
4708
4709 [ cp/* changes propagated from c-* changes in 940318 snapshot ]
4710 * c-decl.c (pushdecl): Warn if type mismatch with another external decl
4711 in a global scope.
4712
4713 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp)
4714
4715 * cp/typeck2.c (signature_error): Use cp_error for "%T".
4716
4717 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp)
4718
4719 [ cp/* changes propagated from c-* changes in 940415 snapshot ]
4720 * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
4721 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
4722
4723 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp)
4724
4725 [ cp/* changes propagated from c-* changes in 940409 snapshot ]
4726 * cp/decl.c (duplicate_decls): Put new type in same obstack as
4727 old ones, or permanent if old ones in different obstacks.
4728
4729 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp)
4730
4731 [ cp/* changes propagated from c-* changes in 940401 snapshot ]
4732 * cp/parse.y (attrib): Handle string args as expressions,
4733 merging the two rules. `mode' attribute now takes a string arg.
4734 Delete the rule for an identifier as arg.
4735
4736 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp)
4737
4738 [ cp/* changes propagated from c-* changes in 940312 snapshot ]
4739 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
4740 (pointer_diff): Likewise the division.
4741
4742 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp)
4743
4744 [ cp/* changes propagated from c-* changes in 940304 snapshot ]
4745 * cp/decl.c (finish_decl): Issue warning for large objects,
4746 if requested.
4747
4748 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp)
4749
4750 [ cp/* changes propagated from c-* changes in 940218 snapshot ]
4751 * cp/parse.y (attrib): Handle attribute ((section ("string"))).
4752 * cp/decl.c (duplicate_decls): Merge section name into new decl.
4753
4754 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp)
4755
4756 [ cp/* changes propagated from c-* changes in 940206 snapshot ]
4757 * cp/typeck.c (signed_or_unsigned_type): Check for any
63718c49 4758 INTEGRAL_TYPE_P not just INTEGER_TYPE.
39211cd5
MS
4759
4760 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE)
4761
4762 * cp/decl.c (finish_enum): Start from 0 when determining precision
4763 for short enums.
4764
4765 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM)
4766
4767 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
4768 casting $$.
4769
4770 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp)
4771
4772 * cp/typeck.c (build_binary_op_nodefault): Propagate code
4773 from C front-end to optimize unsigned short division.
4774 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
4775
4776 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp)
4777
4778 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
4779 constant, prefer 'const char &' to 'int'.
4780
4781 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp)
4782
4783 * cp/class.c (finish_struct_methods): Handle multiple
4784 constructors in fn_fields list.
4785
4786Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com)
4787
4788 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
4789 types not to be dumped in stabs, like types in #pragma interface.
4790 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
4791 mark unknown type.
4792
15fa00e9
DE
4793Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com)
4794
4795 * Language directory reorganization.
4796 See parent makefile.
4797
39211cd5
MS
4798Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com)
4799
4800 * cp-tree.h (THUNK_DELTA): It is normally negative, so
4801 use signed .i variant of frame_size rather than unsigned .u.
4802 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks,
4803 use "VT" rather than "vt" due to binary incompatibility.
4804 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT,
4805 rather than sizeof, since it is now an expression.
4806 * class.c (modify_one_vtable): Modify to skip initial element
4807 containing a count of the vtable.
4808
7177d104
MS
4809Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com)
4810
4811 * lex.c (check_newline): Force interface_unknown on main input file.
4812
4813 * pt.c (do_pending_expansions): Always emit functions that have been
4814 explicitly instantiated.
4815 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
4816 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
4817 DECL_EXPLICITLY_INSTANTIATED on all my methods.
4818 * parse.y (explicit_instantiation): Call do_type_instantiation for
4819 types.
4820 * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
4821 * decl.c (start_function): Don't set DECL_EXTERNAL on a function
4822 that has been explicitly instantiated.
4823 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
4824 DECL_LANG_FLAG_4.
4825 * class.c: Move import_export_vtable to decl2.c, and comment out all
4826 uses.
4827
4828Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com)
4829
4830 * lex.c (process_next_inline): Don't muck with DECL_INLINE.
4831 (do_pending_inlines): Ditto.
4832
6060a796 4833Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
4834
4835 Reimplement vtable building, and most vtable pointer setting.
4836 Allows for earier maintenance, easier understandability, and most
4837 importantly, correct semantics.
4838
4839 * class.c (build_vtable): Removed unneeded
4840 SET_BINFO_VTABLE_PATH_MARKED.
4841 * class.c (prepare_fresh_vtable): Ditto. Added argument.
4842 * class.c (modify_vtable_entry): General cleanup.
4843 * class.c (related_vslot, is_normal, modify_other_vtable_entries,
4844 modify_vtable_entries): Removed.
4845 * class.c (add_virtual_function): General cleanup.
4846 * class.c (finish_base_struct): Setup BINFO_VTABLE and
4847 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
4848 work.
4849 * class.c (finish_vtbls): New routine, mostly from
4850 unmark_finished_struct.
4851 * class.c (overrides): New routine.
4852 * class.c (modify_one_vtable): New routine, mostly from
4853 modify_other_vtable_entries and modify_vtable_entries.
4854 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
4855 modify_all_vtables): New routines.
4856 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
4857 call. General cleanup on how pending_hard_virtuals are handled.
4858 General cleanup on modifying vtables. Use finish_vtbls, instead of
4859 unmark_finished_struct.
4860 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
4861 get_first_matching_virtual, get_matching_virtual,
4862 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update.
4863 * cvt.c (convert_pointer_to_real): cleanup error message.
4864 * decl.c (grokfndecl): General cleanup.
4865 * decl.c (finish_function): Change init_vtbl_ptrs call to
4866 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to
4867 expand_indirect_vtbls_init.
4868 * init.c (expand_virtual_init): Remove unneeded argument.
4869 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
4870 two arguments to make more general. Made more general. Now can be
4871 used for vtable pointer initialization from virtual bases.
4872 * init.c (emit_base_init): Change expand_vbase_vtables_init call to
4873 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to
4874 expand_direct_vtbls_init.
4875 * init.c (expand_virtual_init): General cleanup.
4876 * init.c (expand_default_init): Change expand_vbase_vtables_init
4877 call to expand_indirect_vtbls_init.
4878 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
4879 call to expand_indirect_vtbls_init.
4880 * init.c (expand_recursive_init): Change expand_vbase_vtables_init
4881 call to expand_indirect_vtbls_init.
4882 * search.c (get_first_matching_virtual): Rename to
4883 get_matching_virtual. General cleanup and remove setting of
4884 DECL_CONTEXT. That is now done in a cleaner way in
4885 modify_vtable_entry and add_virtual_function.
4886 * search.c (expand_vbase_vtables_init): Rename to
4887 expand_indirect_vtbls_init. General cleanup. Use
4888 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable
4889 pointers from virtual bases are set up.
4890 * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
4891 Removed.
4892
4893 * *.[chy]: Remove support for VTABLE_USES_MASK.
4894
4895Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com)
4896
4897 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
4898 reference and pointer types instead of bashing the types directly.
4899
4900 * call.c (build_overload_call_real): Use the TREE_CODE to determine
4901 whether the function is overloaded or not, rather than
4902 TREE_OVERLOADED.
4903 * *: Remove all uses of TREE_OVERLOADED.
4904
4905 * decl.c (grokdeclarator): Only complain about initializing const
4906 fields when -ansi or -pedantic.
4907
4908Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com)
4909
4910 * cp-tree.h (THUNK_DELTA): frame_size is now a union.
4911
4912Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com)
4913
4914 Do overloading on a block-by-block basis, not function-by-function.
4915 * decl.c: Lose overloads_to_forget.
4916 (struct binding_level): Add overloads_shadowed field.
4917 (poplevel): Restore overloads_shadowed.
4918 (push_overloaded_decl): Use overloads_shadowed instead of
4919 overloads_to_forget.
4920 (finish_function): Don't look at overloads_to_forget.
4921
4922 Copy enum_overflow logic from c-decl.c.
4923 * decl.c (start_enum): Initialize enum_overflow.
4924 (build_enumerator): Use enum_overflow. Also use current_scope().
4925
4926 * search.c (current_scope): Move Brendan's comment from
4927 build_enumerator here.
4928
4929 * typeck.c (convert_for_assignment): Change warnings to pedwarns for
4930 discarding const/volatile.
4931
4932Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com)
4933
4934 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
4935 (comp_target_types): Ditto.
4936
4937 * decl.c (lookup_name): Don't unset got_scope here.
4938
4939 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
4940 got_scope != NULL_TREE.
4941
4942Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com)
4943
4944 Horrible kludge to prevent templates from being instantiated by
4945 their base classes.
4946 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
4947 before we get to left_curly.
4948 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
4949
4950 * error.c (dump_decl): If it's a typedef, print out the name of the
4951 decl, not just the underlying type.
4952
4953 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
4954 update the IDENTIFIER_TYPE_VALUE of its name.
4955
4956 * decl2.c (finish_file): When processing the initializer for a
4957 static member, pretend that the dummy function is a member of the
4958 same class.
4959
4960Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com)
4961
63718c49
GB
4962 * class.c (build_vtable_entry): revert Apr 4 change.
4963 * decl2.c (mark_vtable_entries): replace pure virtual function
4964 decl with abort's.
7177d104
MS
4965
4966Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com)
4967
4968 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
4969 mismatch, and don't pedwarn on 0/function pointer mismatch.
4970
4971 * typeck2.c (digest_init): Lose code for special handling of unions.
4972 (process_init_constructor): Since they're handled just fine here.
4973 Pedwarn on excess elements.
4974
4975 * decl2.c (grokfield): Complain about local class method declaration
4976 without definition.
4977
4978Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com)
4979
4980 * method.c (emit_thunk): Add extern declaration for
4981 current_call_is_indirect (needed for hppa).
4982
4983Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com)
4984
4985 Improve local class support; allow classes in different blocks to
4986 have the same name.
4987 * decl.c (pushtag): Support local classes better.
4988 (pushdecl_nonclass_level): New function for pushing mangled decls of
4989 nested types into the appropriate scope.
4990 (xref_defn_tag): Use pushdecl_nonclass_level instead of
4991 pushdecl_top_level.
4992 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
4993 class methods.
4994 * method.c (do_inline_function_hair): Ditto.
4995
4996 * class.c (finish_struct): It is legal for a class with no
4997 constructors to have nonstatic const and reference members.
4998
4999Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5000
5001 * decl.c (push_overloaded_decl): Avoid giving errors about
5002 built-ins, since duplicate_decls will have given warnings/errors
5003 for them.
5004
5005Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com)
5006
5007 * cvt.c (convert_to_reference): Warn about casting pointer type to
5008 reference type when this is probably not what they wanted.
5009
5010Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
5011
5012 * decl.c (finish_decl): Don't mindlessly set TREE_USED for
5013 static consts any more (toplev.c has now been modified to
5014 not emit warnings if they are unused).
5015
5016Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com)
5017
5018 * decl.c (grok_op_properties): If op new/delete get here with
5019 METHOD_TYPEs, do a revert_static_member_fn.
5020
5021 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
5022 * init.c (is_aggr_typedef): Don't look at
5023 IDENTIFIER_CLASS_TYPE_VALUE.
5024 (get_aggr_from_typedef): Ditto.
5025 (get_type_value): Ditto.
5026 * call.c (build_scoped_method_call): Don't rely on overloaded
5027 template names having IDENTIFIER_CLASS_VALUE set.
5028
5029 * parse.y (component_decl_1, fn.def2): Revert rules for
5030 constructors.
5031 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
5032 clobbered.
5033
5034 * decl.c (start_function): Only warn about `void main()' if pedantic
5035 || warn_return_type.
5036
5037Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com)
5038
5039 Clean up overloading of the template name.
5040 * class.c (pushclass): overload the template name whenever pushing
5041 into the scope of a template class, not just if it is
5042 uninstantiated.
5043 (popclass): Correspondingly.
5044 * search.c (push_class_decls): Don't overload_template_name.
5045 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
5046 DECL_CONTEXT on things.
5047 * parse.y (left_curly): Don't overload_template_name.
5048 * class.c (finish_struct): Don't undo_template_name_overload.
5049
5050 * method.c (build_opfncall): Only pass one argument to global op
5051 delete.
5052
5053 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
5054 decide how many arguments to use for vec delete.
5055
5056 * decl.c (grok_op_properties): Be consistent in modifying
5057 current_class_type.
5058 (grokdeclarator): Only complain about function decls with no return
5059 type if we're being pedantic.
5060
5061Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com)
5062
5063 Add support for operator new [] and operator delete [].
5064
5065 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
5066 * ptree.c (print_lang_type): Indicate vec new/delete.
5067 * parse.y: Support vec new/delete.
5068 * method.c (build_decl_overload): Deal with vec new/delete.
5069 (build_opfncall): Ditto.
5070 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
5071 vec new/delete. vec new uses "__vn", and vec delete uses "__vd".
5072 * init.c (init_init_processing): Set up BIVN and BIVD.
5073 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
5074 since it doesn't happen any more.
5075 (build_new): Support vec new. Always call something.
5076 (build_x_delete): Support vec delete.
5077 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
5078 and pass it to build_x_delete.
5079 * decl2.c (delete_sanity): Don't change behavior by whether or not
5080 the type has a destructor. Pass use_global_delete to
5081 build_vec_delete.
5082 (coerce_delete_type): Make sure that the type returned has a first
5083 argument of ptr_type_node.
5084 * decl.c (init_decl_processing): Also declare the global vec
5085 new/delete.
5086 (grokdeclarator): Also force vec new/delete to be static.
5087 (grok_op_properties): Note presence of vec new/delete, and play with
5088 their args. If vec delete takes the optional size_t argument, set
5089 TYPE_VEC_DELETE_TAKES_SIZE.
5090 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
5091 checking for one delete or the other.
5092 (lang_type): gets_new and gets_delete are now two bits long. The
5093 low bit is for the non-array version. Lose gets_placed_new.
5094 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
5095 delete defined by this class wants to know how much space it is
5096 deleting.
5097 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
5098 add a header containing the number of elements in the vector; i.e.
5099 when the elements need to be destroyed or vec delete wants to know
5100 the size.
5101 * class.c (finish_struct_methods): Also check for overloading vec
5102 delete.
5103 * call.c (build_method_call): Also delete second argument for vec
5104 delete.
5105
5106 * decl.c (grokdeclarator): Correct complaints again.
5107 (grokdeclarator): Fix segfault on null declarator.
5108 (decls_match): Also accept redeclaration with no arguments if both
5109 declarations were in C context. Bash TREE_TYPE (newdecl) here.
5110 (duplicate_decls): Instead of here.
5111
5112 * parse.y (nested_name_specifier_1): Lose rules for dealing with
5113 syntax errors nicely, since they break parsing of 'const i;'.
5114
5115 * decl.c (lookup_name): if (got_scope == current_class_type)
5116 val = IDENTIFIER_CLASS_VALUE (name).
5117
5118 * search.c (lookup_nested_tag): Look in enclosing classes, too.
5119
5120 * spew.c (yylex): Only look one character ahead when checking for a
5121 SCOPE.
5122
5123 * lex.c (check_newline): Read first nonwhite char before
5124 incrementing lineno.
5125
5126 * decl.c (grokdeclarator): Don't claim that typedefs are variables
5127 in warning.
5128
5129 * parse.y: Divide up uses of unqualified_id into
5130 notype_unqualified_id and unqualified_id, so that TYPENAME can be
5131 used as an identifier after an object.
5132
5133 * class.c (push_nested_class): Don't push into non-class scope.
5134
5135 * decl.c (grokdeclarator): If an identifier could be a type
5136 conversion operator, but has no associated type, it's not a type
5137 conversion operator.
5138
5139 * pt.c (unify): Check for equality of constants better.
5140
5141 * decl.c (grokdeclarator): Don't complain about access decls.
5142
5143Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com)
5144
5145 * decl.c (grokdeclarator): pedwarn about data definitions without
5146 types here.
5147
5148 * parse.y (datadef): Don't pedwarn about decls without types here,
5149 since that is valid for functions.
5150 (fn.def2, component_decl): Support constructors with declmods again.
5151 (nomods_initdecls): For decls without any mods, so that we don't try
5152 to get declspecs from some arbitrary $0.
5153
5154 * search.c (lookup_field): Use cp_error.
5155
5156 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
5157 here; it breaks destructors for non-aggr types.
5158
5159 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
5160 a type being defined, like the comment says.
5161 If got_scope is not an aggregate, just return NULL_TREE.
5162
5163 * pt.c (create_nested_upt): Kung's code for creating types nested
5164 within uninstantiated templates now lives here (it used to live in
5165 hack_more_ids). It needs to be expanded.
5166
5167 * parse.y: Stop calling see_typename so much.
5168
5169 * decl.c (lookup_name): Deal with TTPs and UPTs.
5170
5171 * lex.c (real_yylex): Don't set looking_for_typename just because we
5172 saw a 'new'.
5173 (dont_see_typename): #if 0 out.
5174
5175 * spew.c (yylex): Increment looking_for_typename if the next
5176 character is SCOPE, rather than setting it to 1; this way, the value
5177 from seeing an aggr specifier will not be lost. This kinda relies
5178 on looking_for_typename never being < 0, which is now true.
5179
5180 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
5181 too.
5182 (named_class_head_sans_basetype): Accept template types, too. Oops.
5183
5184Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com)
5185
5186 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
5187
5188 * parse.y: Lose START_DECLARATOR.
5189
5190 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
5191 for a class.
5192
5193 * parse.y: Simplify fn.def2 and component_decl. Support 'enum
5194 A::foo' syntax. Catch invalid scopes better.
5195
5196 * parse.y, lex.c: lose TYPENAME_COLON.
5197
5198 * decl2.c (groktypefield): #if 0 out.
5199
5200 * decl.c (lookup_name): If the type denoted by got_scope is
5201 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
5202
5203 * class.c (push_nested_class): Don't try to push into
5204 error_mark_node.
5205
5206Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
5207
5208 * Makefile.in (stamp-parse): Update count of conflicts to 33.
5209
5210Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
5211
5212 A saner implementation of nested types that treats template types
5213 no differently from non-template types. There are still some
5214 shortcomings of our system; most notably, it is difficult to look
5215 for a nested type that is hidden by another name, because of the way
5216 we keep track of hidden types. But this shouldn't be a problem for
5217 just about anyone. Perhaps lookup_field should be fixed up a bit.
5218
5219 * spew.c: Moved handling of nested types/scoping from the lexer
5220 into the parser. Removed variable template_type_seen_before_scope.
5221 Removed functions frob_identifier, hack_more_ids, and various cruft
5222 that was #if 0'd out in the past, reducing the size of the file from
5223 1146 lines to 450 lines. We can't quite do away with spew.c yet,
5224 though; we still need it for do_aggr () and checking for SCOPE after
5225 the current identifier. And setting lastiddecl.
5226
5227 * parse.y: Moved handling of nested types/scoping from the lexer
5228 into the parser, using a new global variable `got_scope'. Reduced
5229 the number of states by 53. Implemented all uses of explicit global
5230 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed
5231 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
5232 scoped_typename. Added nonterminals nested_type,
5233 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
5234 nested_name_specifier, global_scope, overqualified_id, type_name.
5235 Changed many others. Added 9 new reduce/reduce conflicts, which are
5236 nested type parallels of 9 that were already in the grammar for
5237 non-nested types. Eight of the now 33 conflicts should be removed
5238 in the process of resolving the late binding between variable and
5239 function decls.
5240
5241 * gxxint.texi (Parser): Update.
5242
5243 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
5244
5245 * lex.h: Add decl for got_scope.
5246
5247 * lex.c (see_typename): Claim to be the lexer when calling
5248 lookup_name.
5249
5250 * decl.c (lookup_name): When called from the lexer, look at
5251 got_scope and looking_at_typename; otherwise don't.
5252
6060a796 5253Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5254
5255 31th Cygnus<->FSF merge.
5256
5257Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com)
5258
5259 * decl2.c (mark_vtable_entries): Call this to mark all the
5260 entries in the vtable addressable.
5261 (finish_decl_parsing): Handle SCOPE_REFs.
5262
5263 * decl.c (decls_match): Always call compparms with strict == 1.
5264 Handle the special case of C function redecl here.
5265 (duplicate_decls): Only keep the old type if the new decl takes no
5266 arguments.
5267
5268 * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
5269
6060a796 5270Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5271
5272 * class.c (build_vtable_entry): Fix breakage introduced Apr 5
5273 17:48:41.
5274
5275Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com)
5276
5277 * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
5278 ch-tree.h: Every place these functions were called, the result was
5279 immediately passed to expand_expr_stmt. Reduce redundancy by
5280 calling expand_expr_init *inside* these functions. These
5281 makes for a simpler interface, and we don't have to build
5282 compound expressions. Hence, rename these function to:
5283 expand_virtual_init and expand_vbase_vtables_init respectively.
5284 * init.c, decl.c: Change callers of these functions.
5285 * init.c, cp-tree.h (expand_virtual_init): Make static.
5286
5287 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
5288 rather than DECL_SAVED_INSNS before emitting inlines.
5289
5290Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com)
5291
5292 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
5293
5294 * decl.c (duplicate_decls): If this is a new declaration of an
5295 extern "C" function, keep the type (for the argtypes).
5296 (redeclaration_error_message): Don't check DECL_LANGUAGE here.
5297 (decls_match): Call compparms with a value of strict dependent on
5298 the value of strict_prototypes for DECL_LANGUAGE (oldecl).
5299
5300 * typeck.c (compparms): ... is only equivalent to non-promoting
5301 parms if we're not being strict.
5302
5303 * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
5304
5305 * decl.c (init_decl_processing): if (flag_ansi || pedantic)
5306 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
5307
5308 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
5309 virtuals.
5310
5311Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com)
5312
5313 Support for implementing vtables with thunks.
5314 * tree.def (THUNK_DECL): New TREE_CODE.
5315 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
5316 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case.
5317 * cp-tree.h (memptr_type): New variable.
5318 * class.c (build_vtable_entry): Build thunk if necessary.
5319 * class.c (build_vfn_ref): If using thunks, don't need
5320 to add delta field from vtable (there is none!).
5321 * decl.c: Add memptr_type as well as vtable_entry_type.
5322 If using thunks, the latter is just ptr_type_node.
5323 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type.
5324 * decl2.c (finish_vtable_vardecl): Handle thunks.
5325 * expr.c (cplus_expand_expr): Support THUNK_DECL.
5326
5327 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern".
5328 * decl.c (start_function): Set current_extern_inline based on
5329 DECL_THIS_EXTERN, not TREE_PUBLIC.
5330 * decl.c (finish_function): Call mark_inline_for_output if needed,
5331
5332 Improve intelligence about when to emit inlines.
5333 * cp-tree.h (lang_decl_flags): New field saved_inline.
5334 * cp-tree.h (DECL_SAVED_INLINE): New macro.
5335 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE.
5336 * decl.h, decl.c (pending_addressable_inlines): Removed.
5337 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines.
5338 * decl2.c (mark_inline_for_output): Do nothing if
5339 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list).
5340 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN
5341 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
5342 * decl2.c (finish_file): Writing out inlines later, so we can
5343 also handle the ones needed for vtbales.
5344 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed.
5345
5346 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack
5347 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks
5348 instead. (The rationale is that these optimizations both break binary
5349 compatibility, but should become the default in a future release.)
5350
6060a796 5351Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5352
5353 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
5354 of a fndecl, as we might not be from that vfield.
5355
5356Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com)
5357
5358 * class.c (add_virtual_function): fix bug for pure virtual, so
5359 that DECL_VINDEX of the dummy decl copied won't be error.
5360 (see also Apr 4 change)
5361
5362Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
5363
5364 * typeck.c (c_expand_return): Before checking that we're not
5365 returning the address of a local, make sure it's a VAR_DECL.
5366 (And don't worry about it being a TREE_LIST.)
5367
5368Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com)
5369
5370 * parse.y (YYDEBUG): Always define.
5371 * lex.c (YYDEBUG): Ditto.
5372
5373Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com)
5374
5375 * class.c (finish_struct): backup out the change below, put the
5376 new change for the same purpose. The change below breaks code.
5377
5378 * class.c (finish_struct): if pure virtual, copy node and make
5379 RTL point to abort, then put in virtual table.
5380 * decl2.c (grok_function_iit): reinstate Mar 31 change.
5381
5382Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com)
5383
5384 * init.c (build_new): pedwarn about newing const and volatile
5385 types.
5386
5387 * tree.c (get_identifier_list): Only do the special handling
5388 thing if we're dealing with the main variant of the record type.
5389
5390 * cvt.c (convert_to_reference): When converting between
5391 compatible reference types, use the pointer conversion machinery.
5392 Don't just blindly overwrite the old type.
5393
5394Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com)
5395
5396 * call.c (build_method_call): When looking at global functions,
5397 be sure to use instance_ptr for the first argument, not some version
5398 of it that has been cast to a base class. Also do this before
5399 comparing candidates.
5400
5401Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com)
5402
5403 * call.c (build_method_call): Constructors can be called for
5404 const objects.
5405
5406Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com)
5407
5408 * decl2.c (grok_func_init): do not abort as rtl for pur virtual
5409 fucntions. They can be defined somewhere else.
5410
5411Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
5412
5413 * decl.c (init_decl_processing): Declare __builtin_return_address
5414 and __builtin_frame_address for C++ as well.
5415
6060a796 5416Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5417
5418 * typeck2.c (store_init_value): Integral constant variables are
5419 always constant, even when doing -fpic.
5420
5421Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de)
5422
5423 * decl.c (redeclaration_error_message): Pass the types to
5424 comptypes.
5425
6060a796 5426Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5427
5428 Cures incorrect errors about pure virtuals in a class, when they
5429 have been overridden in a derived class.
5430
5431 * search.c (get_abstract_virtuals): Reimplement.
5432 * search.c (get_abstract_virtuals_1): New routine.
5433
5434Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
5435
5436 * pt.c (push_template_decls): Make the pushed level pseudo
5437 global.
5438
5439 * parse.y (extdefs): Don't pop everything if the current binding
5440 level is pseudo_global.
5441
5442 * decl.c (pop_everything): Stop on reaching a pseudo-global
5443 binding level.
5444
5445 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
5446
5447 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
5448 the old decl actually had an initializer.
5449
5450 * {various}: Clean up gcc -W complaints.
5451
5452 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
5453 (DECL_CONTEXT (NODE) != NULL_TREE).
5454
5455 * parse.y (lang_extdef): Call pop_everything if necessary.
5456
5457 * decl.c (pop_everything): New function for popping binding
5458 levels left over after a syntax error.
5459 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
5460 a function is a member.
5461
6060a796 5462Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5463
5464 Cures calling a more base base class function, when a more derived
5465 base class member should be called in some MI situations.
5466
5467 * search.c (make_binfo): Use more the more specialized base
63718c49
GB
5468 binfos from the binfo given as the second argument to make_binfo,
5469 instead of the unspecialized ones from the TYPE_BINFO.
7177d104
MS
5470 * class.c (finish_base_struct): Ditto, update callers.
5471 * search.c (dfs_get_vbase_types): Ditto.
5472 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
5473 * decl.c (xref_tag): Use NULL_TREE instead of 0.
5474 * lex.c (make_lang_type): Ditto.
5475
5476Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com)
5477
5478 * decl.c (pushdecl): If pushing a C-linkage function, only do a
5479 push_overloaded_decl.
5480 (duplicate_decls): Standard overloading does not shadow built-ins.
5481
5482Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com)
5483
5484 * pt.c (end_template_decl): Don't call push_overloaded_decl.
5485
5486 * init.c (do_friend): Don't call push_overloaded_decl.
5487
5488 * decl.c (pushdecl): Call push_overloaded_decl for functions and
5489 function templates.
5490 (duplicate_decls): functions and function templates are not
5491 duplicates, but don't complain about calling this function to
5492 compare them.
5493 (push_overloaded_decl): Don't deal with linkage. Call
5494 duplicate_decls.
5495 (redeclaration_error_message): Deal with linkage.
5496
5497 * decl.c (start_function): If push_overloaded_decl returns an
5498 older version of the function, deal with it.
5499
5500 * decl.c (start_function): Be sure only to push_overloaded_decl
5501 for non-members.
5502
5503 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
5504 methods.
5505 (start_function): Lose broken and redundant code for checking old
5506 decl.
5507
5508 * init.c (add_friend): Give line numbers of both friend decls
5509 when warning about re-friending.
5510
5511 * pt.c (tsubst): Use comptypes rather than == to compare the
5512 types of the method as declared and as defined, since default
5513 parameters may be different.
5514
5515 * call.c (build_method_call): Use brendan's candidate printing
5516 routine.
5517
5518 * decl.c (start_method): Methods defined in the class body are
5519 inline whether or not it's a template class.
5520
5521Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com)
5522
5523 * parse.y (initdcl0): Add "extern" to current_declspecs if
5524 have_extern_spec && ! used_extern_spcec.
5525
5526 * tree.c (really_overloaded_fn): A fn with more than one
5527 overload.
5528
5529 * pt.c (end_template_decl): Use really_overloaded_fn.
5530
5531 * decl.c (duplicate_decls): When smashing a decl into a previous
5532 definition, keep the old file and line.
5533 Don't deal with overloaded functions.
5534 Lose old code for checking arg types of functions.
5535 Check for overloaded C functions.
5536 (pushdecl): Deal with overloaded functions.
5537 (start_decl): Expect pushdecl to return an appropriate function decl.
5538 (start_function): Ditto.
5539 (push_overloaded_decl): Don't check for overloaded C functions.
5540
5541 * *.c: Stop using DECL_OVERLOADED, it being archaic.
5542 TREE_OVERLOADED should probably go, too.
5543
5544Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com)
5545
5546 * typeck.c (comp_target_types): Call comp_target_parms with
5547 strict == 1.
5548
5549Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com)
5550
5551 * parse.y (empty_parms): Don't parse () as (...) in extern "C"
5552 sections if we're compiling with -ansi or -pedantic.
5553
5554 * decl.c (decls_match): Don't treat (int) and (int&) as matching.
5555
5556 * decl2.c (grokfield): Don't pedwarn twice about initializing
5557 field.
5558
5559 * decl.c (push_overloaded_decl): Warn about shadowing
5560 constructor.
5561 (redeclaration_error_message): Don't allow 'int a; int a;'
5562
5563 * cvt.c (build_up_reference): Only check for valid upcast if
5564 LOOKUP_PROTECT is set, not just any flag.
5565
5566Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com)
5567
5568 * lex.c (check_newline): When we see a #pragma implementation,
5569 also set it for the main input file.
5570
5571 * init.c (build_new): Convert array size argument to size_t.
5572
5573 * parse.y (primary): If we're doing a parenthesized type-id, call
5574 groktypename before passing it to build_new.
5575
5576 * call.c (build_method_call): Deal properly with const and
5577 volatile for instances of reference type.
5578
5579 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
5580 (pedantic) pedwarn'.
5581
5582 * decl.c (grokdeclarator): Don't complain about putting `static'
5583 and `inline' on template function decls.
5584
5585Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com)
5586
5587 * call.c (build_method_call): Preserve const & volatile on
5588 `this'.
5589
6060a796 5590Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5591
5592 * init.c (build_new, build_vec_delete): Use global new and delete
5593 for arrays.
5594 * decl2.c (delete_sanity): Ditto.
5595
5596Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com)
5597
5598 * cvt.c (convert_to_reference): If i is an lvalue,
5599 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
5600 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
5601
5602Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com)
5603
5604 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
5605 and DECL_TEMPLATE_INSTANTIATIONS.
5606
5607 * init.c (build_new): Handle array typedefs properly.
5608
6060a796 5609Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5610
5611 30th Cygnus<->FSF merge.
5612
6060a796 5613Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5614
5615 * class.c (modify_vtable_entries): Avoid running off the end of the
5616 virtuals list when processing a virtual destructor.
5617 * class.c (get_vtable_entry): Ditto.
5618
5619Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com)
5620
5621 * decl.c (duplicate_decls): If two template decls don't match,
5622 just return 0.
5623
5624Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com)
5625
5626 * typeck.c (convert_for_assignment): Don't pedwarn about
5627 converting function pointer to void *.
5628
6060a796 5629Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5630
5631 Major revamp of pointer to member functions. Cures major
5632 nonfunctionality when used in casts, and MI situations.
5633
5634 * cvt.c (convert_force): Update call site of build_ptrmemfunc.
5635 * typeck.c (convert_for_assignment): Ditto.
5636 * typeck2.c (digest_init): Ditto.
5637 * typeck2.c (process_init_constructor): Simplify by moving code into
5638 digest_init.
5639 * typeck2.c (digest_init): Do default_conversions on init value, if
5640 we are processing pointer to member functions.
5641 * class.c (get_vfield_offset): Now non-static. Convert bit offset
5642 into byte offset.
5643 * cp-tree.h (get_vfield_offset): Ditto.
5644 * typeck.c (get_member_function_from_ptrfunc): Convert down to right
5645 instance, before fetching vtable pointer.
5646 * typeck.c (get_delta_difference): New routine.
5647 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
5648 get vtable pointer out of right subobject.
5649
6060a796 5650Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5651
5652 * search.c (get_binfo): Return NULL instead of aborting, when
5653 passed a UNION_TYPE.
5654
5655Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com)
5656
5657 These patches implement handling of redefinition/redeclaration of
5658 templates.
5659
5660 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are
5661 considered compatible.
5662
5663 * parse.y (template_def): Pass defn argument to end_template_decl.
5664
5665 * pt.c (end_template_decl): Add defn argument. Check for
5666 redefinition. Simplify.
5667
5668 * error.c (OB_UNPUT): New macro, to remove mistakes.
5669 (aggr_variety): Subroutine of dump_aggr_type.
5670
5671 * decl.c (decls_match): Support templates.
5672 (duplicate_decls): No longer static. Don't try to lay out template
5673 decls.
5674 (pushdecl): Simplify.
5675
5676 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
5677 DECL_INITIAL.
5678
5679Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
5680
5681 * error.c (dump_decl): Support class template decls.
5682 (dump_type): Don't adorn template type parms.
5683
5684 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
5685 if it was a definition.
5686 (redeclaration_error_message): Do the cp_error thang, and reject
5687 redefinition of templates.
5688
5689Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com)
5690
5691 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE
5692 in FIELD context, when appropriate. Also,
5693 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
5694 Also, simplify check for bogus return specifiers.
5695
5696Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com)
5697
5698 * parse.y (after_type_declarator1): Expand type_quals.
5699 (notype_declarator1): Ditto.
5700 (absdcl1): Ditto.
5701
5702Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com)
5703
5704 * decl.c (grokdeclarator): Treat class-local typedefs like static
5705 members; i.e. 'typedef int f();' means that f is a function type,
5706 not a method type.
5707
5708 * parse.y (decl): Change direct_* back to *.
5709 (type_id): Change direct_abstract_declarator to absdcl.
5710 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
5711
5712Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com)
5713
5714 These two patches fix crashes on instantiating a template inside a
5715 function with C linkage or containing labels.
5716
5717 * class.c (current_lang_stacksize): No longer static.
5718
5719 * decl.c (struct saved_scope): Add lang_base, lang_stack,
5720 lang_name, lang_stacksize, and named_labels.
5721 (push_to_top_level): Save them.
5722 (pop_from_top_level): Restore them.
5723
5724 * gxxint.texi (Parser): Update.
5725
5726 These two patches finish moving the task of expr/declarator
5727 ambiguity resolution from the lexer to the parser, and add one more
5728 r/r conflict. START_DECLARATOR can now be nuked.
5729
5730 * parse.y (decl): Add "direct_" in typespec X rules.
5731 (direct_declarator): New nonterminal for
5732 direct_after_type_declarator and direct_notype_declarator.
5733 (direct_initdecls): Like initdecls, but uses direct_initdcl0.
5734 (direct_initdcl0): Like initdcl0, but uses direct_declarator.
5735 (named_parm): Add typespec direct_declarator rule.
5736
5737 * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
5738
5739 These two patches disable some excessive cleverness on the part of
5740 g++; a non-class declaration always hides a class declaration in the
5741 same scope, and g++ was trying to unhide it depending on the
5742 enclosing expression.
5743
5744 * spew.c (arbitrate_lookup): #if 0 out.
5745
5746 * decl.c (lookup_name): Never call arbitrate_lookup.
5747
5748 * parse.y (complex_notype_declarator1): Add '*'
5749 complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
5750
5751 * parse.y (complex_direct_notype_declarator): Restore id_scope
5752 see_typename TYPENAME rule, remove all other rules beginning with
5753 those tokens.
5754 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
5755
5756Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com)
5757
5758 These changes fix the compiler's handling of the functional cast/
5759 object declaration ambiguities in section 6.8 of the ARM. They also
5760 add 11 reduce/reduce conflicts. Sigh.
5761
5762 * parse.y: Add precedence decls for OPERATOR and '~'.
5763 (notype_unqualified_id): New nonterminal, encompasses all of the
5764 ANSI unqualified-id nonterminal except TYPENAMEs.
5765 (expr_or_declarator): New nonterminal to delay parsing of code like
5766 `int (*a)'.
5767 (primary): Use notype_unqualified_id.
5768 (decl): Add typespec initdecls ';' and typespec declarator ';'
5769 rules.
5770 (initdcl0): Deal with the above.
5771 (complex_notype_declarator1): A notype_declarator that is not also
5772 an expr_or_declarator.
5773 (complex_direct_notype_declarator): A direct_notype_declarator that
5774 doesn't conflict with expr_or_declarator. Use
5775 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule.
5776 (functional_cast): New nonterminal, for the three functional cast
5777 rules. So that they can be moved after
5778 complex_direct_notype_declarator.
5779 (see_typename): Don't accept type_quals any more.
5780
5781 * decl2.c (reparse_decl_as_expr): New function to deal with parse
5782 nodes for code like `int (*a)++;'.
5783 (reparse_decl_as_expr1): Recursive subroutine of the above.
5784 (finish_decl_parsing): New function to deal with parse nodes for
5785 code like `int (*a);'. See the difference?
5786
6060a796 5787Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5788
5789 These changes break binary compatibility in code with classes
5790 that use virtual bases.
5791
5792 * search.c (dfs_get_vbase_types): Simplify and correct to make
5793 sure virtual bases are initialized in dfs ordering.
5794 * search.c (get_vbase_types): Simplify and make readable.
5795
5796Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com)
5797
5798 * parse.y: s/ typename / type_id /g
5799
5800Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com)
5801
5802 * parse.y (typespec): add SCOPE TYPENAME for global scoped
5803 type. e.g. ::B x.
5804
5805 * decl.c (complete_array_type): fix a bug that in -pendantic
5806 mode even there's no initializer, it will continue to build
5807 default index.
5808
5809Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com)
5810
5811 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
5812 all of the scoped PTYPENAME rules.
5813
6060a796 5814Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5815
5816 * init.c (build_offset_ref): The value of A::typedef_name is
5817 always the TYPE_DECL, and never an error.
5818
5819Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com)
5820
5821 * search.c (get_base_distance_recursive): Two binfos can only
5822 represent the same object if they are both via_virtual.
5823
5824 * class.c (finish_base_struct): Check vbases for ambiguity, too.
5825
5826 * search.c (get_vbase_types): Accept binfo argument, too.
5827
5828Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com)
5829
5830 * decl.c (complete_array_type): complete TYPE_DOMAIN of the
5831 initializer also, because back-end requires it.
5832
5833Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com)
5834
5835 * error.c (dump_expr): Support member functions (which show up as
5836 OFFSET_REFs).
5837
6060a796 5838Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5839
5840 * init.c (build_new): Set the return type of multidimensional
5841 news correctly.
5842
5843Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com)
5844
5845 * call.c (build_method_call): if basetype not equal to type
5846 of the instance, use the type of the instance in building
5847 destructor.
5848
5849Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com)
5850
5851 * parse.y (direct_notype_declarator): add push_nested_type for
5852 'template_type SCOPED_NAME' rule.
5853
5854Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com)
5855
5856 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
5857
5858Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com)
5859
5860 * parse.y (regcast_or_absdcl): New nonterminal to implement late
5861 reduction of constructs like `int ((int)(int)(int))'.
5862 (cast_expr): Use it.
5863 (sub_cast_expr): Everything that can come after a cast.
5864 (typed_declspecs1): typed_declspecs that are not typed_typespecs.
5865 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
5866 (direct_abstract_declarator): Replace '(' parmlist ')' rule with
5867 '(' complex_parmlist ')' and regcast_or_absdcl.
5868 (parmlist): Split
5869 (complex_parmlist): Parmlists that are not also typenames.
5870 (parms_comma): Enabler.
5871 (named_parm): A parm that is not also a typename. Use declarator
5872 rather than dont_see_typename abs_or_notype_decl. Expand
5873 typed_declspecs inline.
5874 (abs_or_notype_decl): Lose.
5875 (dont_see_typename): Comment out.
5876 (bad_parm): Break out abs_or_notype_decl into two rules.
5877
5878Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com)
5879
5880 * decl2.c (reparse_decl_as_casts): New function to change parse
5881 nodes for `(int)(int)(int)' from "function taking int and returning
5882 function taking int and returning function taking int" to "... cast
5883 to int, cast to int, cast to int".
5884
5885 * decl2.c (reparse_decl_as_expr): Recursive function to change
5886 parse nodes for `A()()' from "function returning function returning
5887 A" to "A().operator()".
5888
5889 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
5890 `typespec fcast_or_absdcl' rule.
5891 (fcast_or_absdcl): New nonterminal to implement late reduction of
5892 constructs like `A()()()()'.
5893 (typename): Replace `typespec absdcl1' rule with
5894 `typespec direct_abstract_declarator' rule.
5895 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
5896 with `fcast_or_absdcl type_quals' rule.
5897
6060a796 5898Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5899
5900 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
5901 matches Section 5.5.
5902
5903Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com)
5904
5905 * error.c (dump_type_prefix): Don't print basetype twice for
5906 pmfs.
5907
6060a796 5908Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5909
5910 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
5911 so that it is like setHandler(&A::handlerFn). Cures an `invalid
5912 lvalue in unary `&''.
5913
5914Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com)
5915
5916 * gxxint.texi (Copying Objects): New section discussing default
5917 op= problems with virtual inheritance.
5918
5919 * decl2.c (grokoptypename): Just does grokdeclarator and
5920 build_typename_overload, since the parser can't call grokdeclarator
5921 directly.
5922
5923 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
5924 and TREE_TYPE on generated identifiers.
5925
5926 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
5927
5928 * parse.y (parm): Convert `const char *' to `__opPCc' here.
5929
5930 * error.c (dump_decl): Say sorry rather than my_friendly_aborting
5931 if we can't figure out what to do.
5932 (dump_type*): Ditto.
5933
5934 * typeck2.c (build_m_component_ref): 'component' is an expr, not
5935 a decl. Also move the IS_AGGR_TYPE check after the stripping of
5936 REFERENCE_TYPE.
5937
6060a796 5938Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
5939
5940 * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
5941 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid
5942 lvalue in unary `&''.
5943
5944Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com)
5945
5946 * parse.y: Add precedence specification for START_DECLARATOR.
5947 (type_quals): Move before primary.
5948 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
5949
5950 * decl2.c (grokoptypename): Lose.
5951
5952 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
5953 rather than waiting until later.
5954
5955Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com)
5956
5957 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
5958 than expanding it inline.
5959 (typename): Expand empty option of (former) absdcl inline.
5960 (abs_or_notype_decl): Ditto.
5961 (absdcl): Lose empty rule.
5962 (conversion_declarator): New nonterminal for 'typename' of 'operator
5963 typename'.
5964 (operator_name): Use it instead of absdcl.
5965
5966 * parse.y: Add precedence declarations for SCOPED_TYPENAME,
5967 TYPEOF, and SIGOF.
5968 (typed_declspecs): Accept typed_typespecs, rather than typespec
5969 directly. Add rules with reserved_typespecquals.
5970 (reserved_declspecs): Don't accept typespecqual_reserved at the
5971 beginning of the list. The typed_declspecs rule will deal with this
5972 omission.
5973 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
5974 directly.
5975
5976 * parse.y (direct_notype_declarator,
5977 direct_after_type_declarator, direct_abstract_declarator): Split up
5978 the declarator1 nonterminals to match the draft standard and avoid
5979 ambiguities.
5980 (new_type_id, new_declarator, direct_new_declarator,
5981 new_member_declarator): New nonterminals to implement the subset of
5982 'typename' allowed in new expressions.
5983 (unary_expr): Use new_type_id instead of typename.
5984 (after_type_declarator1, absdcl1): Fix semantics of member pointers.
5985 (abs_member_declarator, after_type_member_declarator): Lose.
5986
5987 * parse.y (absdcl1): Don't require parens around
5988 abs_member_declarator.
5989 (abs_member_declarator): Lose see_typename from rules.
5990 (after_type_member_declarator): Ditto.
5991
5992 * tree.c (get_identifier_list): New function, containing code
5993 previously duplicated in get_decl_list and list_hash_lookup_or_cons.
5994 (get_decl_list): Use it.
5995 (list_hash_lookup_or_cons): Ditto.
5996
5997 * parse.y (typed_declspecs, declmods): It's not necessary to hash
5998 the declspecs on class_obstack, so don't. This way typed_typespecs
5999 can reduce to typed_declspecs.
6000
6001Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com)
6002
6003 * cvt.c (build_up_reference): If we aren't checking visibility,
6004 also allow base->derived conversions.
6005
6006Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
6007
6008 * typeck.c (build_c_cast): Remove bogus hack when converting
6009 to a reference type.
6010
6011 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
6012 Removed, not used.
6013 (lang_stype::methods, lang_decl::next_method): New fields.
6014 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros.
6015 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD.
6016
6017 * cp-tree.h, decl2.c (flag_vtable_hack): New flag.
6018 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack,
6019 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
6020 a non-inline virtual function to control emitting of vtables.
6021 * class.c (finish_struct): Build CLASSTYPE_METHODS list.
6022 * search.c (build_vbase_vtables_init): Don't assemble_external
6023 (yet) if flag_vtable_hack.
6024 * class.c (build_vfn_ref): Ditto.
6025
6026Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com)
6027
6028 * parse.y (component_decl): Don't include "typed_declspecs
6029 declarator ';'" speedup, since it breaks enums.
6030
6031Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
6032
6033 * class.c (finish_struct): Minor optimization for building
6034 fn_fields list.
6035
6036Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com)
6037
6038 * decl.c (start_function): Fix detection of function overloading.
6039
6060a796 6040Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6041
6042 * lex.c (check_newline): #pragma interface can take a string
6043 argument, just like #pragma implementation. #pragma implementation
6044 checks for garbage on the line, line #pragma interface does. Main
6045 input files do not auto implement like named files, #pragma
6046 implementation must be used explicitly.
6047
6048Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com)
6049
6050 * parse.y (components): Handle list of one again.
6051 (notype_components): Ditto.
6052 (after_type_declarator1): Take maybe_raises out again.
6053
6054 * gxxint.texi (Parser): Document additional r/r conflict.
6055
6056Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com)
6057
6058 * gxxint.texi (Parser): Add node.
6059
6060 * Makefile.in (stamp-parse): Update expected conflict count.
6061
6062 * parse.y (various): Replace "declmods declarator" with "declmods
6063 notype_declarator". The comment saying that "declmods declarator ';'"
6064 corresponds to "int i;" was wrong; it corresponds to "const i;".
6065 (component_decl): Add "typed_declspecs declarator ';'" rule; this
6066 *does* correspond to "int i;". Change "declmods components" to
6067 "declmods notype_components".
6068 (components): Don't deal with a list of one anymore.
6069 (notype_components): New nonterminal, corresponds to notype_declarator.
6070 ({after_,no}type_component_decl{,0}): More new nonterminals.
6071 ({after_,no}type_declarator): Fold in START_DECLARATOR token.
6072 Eliminates four reduce/reduce conflicts.
6073
6074 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
6075 (nontrivial_exprlist): New nonterminal: A list of at least two
6076 expr_no_commas's.
6077 (nonnull_exprlist): Depend on nontrival_exprlist.
6078 Eliminates four reduce/reduce conflicts.
6079
6080 (named_class_head): Move intermediate code block into separate
6081 nonterminal so that we can stick %prec EMPTY on it.
6082
6083 Add more %prec EMPTY's to eliminate remaining shift/reduce
6084 conflicts.
6085
6086 (after_type_declarator): Add maybe_raises to fndecl rules.
6087 (after_type_declarator_no_typename): Remove.
6088 For correctness.
6089
6090 Document remaining reduce/reduce conflicts.
6091
6092Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com)
6093
6094 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
6095 (TYPE_BINFO (type)) if we care about the path.
6096
6097 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
6098 options are.
6099
6060a796 6100Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6101
6102 * Makefile.in (mostlyclean): lex.c is a source file, don't
6103 remove.
6104
6105Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com)
6106
6107 * parse.y: Eliminate 20 shift/reduce conflicts.
6108
6109Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com)
6110
6111 * pt.c (type_unification): Add subr argument; if set, it means
6112 that we are calling ourselves recursively, so a partial match is OK.
6113 (unify): Support pointers to methods and functions.
6114 (tsubst): Support method pointers.
6115 * decl.c (build_ptrmemfunc_type): No longer static, so that
6116 tsubst can get at it.
6117
6118 * init.c (is_aggr_typedef): Pretend template type parms are
6119 aggregates.
6120 * decl2.c (build_push_scope): If cname refers to a template type
6121 parm, just grin and nod.
6122
6123 * call.c (build_overload_call_real): Pass subr argument to
6124 type_unification.
6125 * pt.c (do_function_instantiation): Ditto.
6126 * class.c (instantiate_type): Ditto.
6127
6128 * search.c (get_base_distance): If BINFO is a binfo, use it and
6129 don't mess with its BINFO_INHERITANCE_CHAIN.
6130
6131 * cvt.c (convert_to_reference): Fix temporary generation.
6132 If ambiguous, return error_mark_node.
6133
6134 * init.c (build_new): Put back some necessary code.
6135
6136Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com)
6137
6138 * init.c (build_new): Deal with array types properly.
6139
6140 * search.c (get_binfo): Become a shell for get_base_distance.
6141 (get_binfo_recursive): Lose.
6142 (get_base_distance_recursive): Find the path to the via_virtual base
6143 that provides the most access.
6144 (get_base_distance): Ditto.
6145
6146 * parse.y (explicit_instantiation): Syntax is 'template class
6147 A<int>', not 'template A<int>'.
6148
6149 * typeck.c (convert_for_initialization): Remove bogus warning.
6150
6151 * parse.y (datadef): Revert patch of Oct 27.
6152
6153Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com)
6154
6155 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node,
6156 rather than integer_type_node. Does wonders for the Alpha.
6157
6158Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com)
6159
6160 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
6161 goes onto the same obstack as its target type.
6162
6163Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com)
6164
6165 * cvt.c (convert_to_reference): If converting via constructor
6166 on local level, go back to build_cplus_new approach.
6167
6168 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
6169 to error_mark_node to prevent expand_expr from building a cleanup
6170 for this variable.
6171
6172 * lex.c (default_assign_ref_body): Return *this from the memcpy
6173 version, too.
6174
6175 * decl.c (grok_reference_init): Just return if called with
6176 error_mark_node, don't worry about initializing non-const reference
6177 with temporary.
6178
6179 * cvt.c (convert_to_reference): Do the right thing for
6180 non-aggregate reference conversions, pedwarn when generating a
6181 non-const reference to a temporary.
6182
6183 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
6184 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
6185 again.
6186
6187Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com)
6188
6189 * decl.c (grok_reference_init): Pawn off a lot of the work on
6190 convert_to_reference. Generally do the right thing.
6191
6192 * cvt.c (convert_to_reference): Conform to the initial comment;
6193 i.e. don't create temps if decl != error_mark_node. Handle
6194 cleanups better for temps that do get created. Don't pretend
6195 that we can use an 'A' to initialize a 'const double &' just by
6196 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY.
6197
6198 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
6199 constructor calls.
6200
6201Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com)
6202
6203 * decl.c (grok_reference_init): Make a temporary for initializing
6204 const reference from constant expression.
6205
6206Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
6207
6208 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function.
6209 * decl.c (pushdecl): Define decl in correct binding_level
6210 (which isn't always the inner_binding_level).
6211
6212 * cvt.c (build_up_reference): Don't ever call expand_aggr_init.
6213 It's ugly, and I don't think it's the right thing to do.
6214
6215 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c:
6216 Remove NEW_CLASS_SCOPING, assuming it is always 1.
6217 * decl.c (pop_decl_level): Removed; manually inlined.
6218
6219Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com)
6220
6221 * class.h (candidate): Add basetypes field.
6222
6223 * call.c (build_method_call): Do access checking after choosing a
6224 function, not before.
6225
6226 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
6227 (mostlyclean): Remove ../cc1plus.
6228
6229Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com)
6230
6231 * class.c (finish_struct): Don't allow adjusting access to a field
6232 of a base class if a local field has the same name.
6233
6234 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
6235
6236hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
6237
63718c49 6238 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
7177d104
MS
6239 with destructor names when either NO_DOLLAR_IN_LABEL or
6240 NO_DOT_IN_LABEL are not defined.
6241
6242 Now `template <class T, T f(T&), const T*> class A {...}' works.
6243
6244 * pt.c (grok_template_type): substitute template parm types
6245 with actual types in complex type as well.
6246 (coerce_template_parms): update the grok_template_type ()
6247 function call.
6248
6249 * pt.c (tsubst): Traverse method list using DECL_CHAIN.
6250
6251 * decl.c (grok_op_properties): Allow operator++/-- to have
6252 default arguments.
6253
6254 * typeck2.c (store_init_value): Don't abort when called to
6255 initialize a type that needs constructing with a CONSTRUCTOR.
6256
6257 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
6258 store_init_value fails, build and expand an INIT_EXPR. If
6259 store_init_value succeeds, call expand_decl_init.
6260
6060a796 6261Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6262
6263 * class.c (build_vbase_path): Use complete_type_p instead of
6264 resolves_to_fixed_type_p to determine if the virtual bases are in
6265 their right place for the type of expr. Cures problem of thinking a
6266 virtual base class is one place, when it is in fact someplace else.
6267
6060a796 6268Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6269
6270 * init.c (resolve_offset_ref): Make sure we first convert to
6271 intermediate type, if given, when dealing with members off `this'.
6272 Solves an incorrrect `type `foo' is not a base type for type
6273 `multiple'' when it is infact, a base type.
6274
6060a796 6275Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6276
6277 * class.c (modify_other_vtable_entries): Use get_binfo, instead
6278 of binfo_value. Solves problem with compiler giving a `base class
6279 `B' ambiguous in binfo_value (compiler error)' on complex MI
6280 herarchies, when a virtual function is first defied in a virtual
6281 base class.
6282
6060a796 6283Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6284
6285 * class.c (build_vbase_path): Don't complain about ambiguous
6286 intermediate conversion when converting down to a virtual base
6287 class, even if they might seem to be ambiguous.
6288
6289Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com)
6290
6291 * typeck2.c (build_functional_cast): #if 0 out constructor
6292 inheritance code, improve error messages.
6293
6294 * class.c (finish_base_struct): Complain about base with only
6295 non-default constructors in derived class with no constructors.
6296
6297 * decl.c (grokdeclarator): Fix detection of virtual new/delete.
6298
6060a796 6299Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6300
6301 * search.c (build_mi_virtuals, add_mi_virtuals,
6302 report_ambiguous_mi_virtuals): Removed unneeded code.
6303 * class.c (finish_struct_bits): Ditto.
6304
6305Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com)
6306
6307 * pt.c (end_template_instantiation): Push decl before
6308 pop_from_top_level.
6309
6310 * typeck2.c (build_m_component_ref): Make sure datum is of
6311 aggregate type.
6312
6313 * init.c (get_type_value): New function, returns
6314 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
6315
6316 * call.c (build_method_call): Don't die on call to destructor for
6317 non-type.
6318
6319 * decl.c (grokdeclarator): Complain about virtual op new and op
6320 delete, make static virtuals unvirtual instead of unstatic.
6321
6322 * typeck.c (build_c_cast): Also call default_conversion on
6323 methods.
6324
6325 * decl.c (grokdeclarator): Don't complain about anonymous
6326 bitfields.
6327
6328 * parse.y (simple_stmt, for loops): Move the continue point after
6329 the cleanups.
6330
6331 * class.c (finish_struct): Fix setting of
6332 TYPE_HAS_COMPLEX_INIT_REF.
6333
6334Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com)
6335
6336 * init.c (build_new): Deal with `new double (1)'.
6337
6338 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
6339 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
6340 TYPE_NEEDS_CONSTRUCTING.
6341
6342 * decl.c (duplicate_decls): Propagate access decls.
6343
6344 * typeck2.c (process_init_constructor): Accept empty_init_node
6345 for initializing unions.
6346
6347 * class.c, lex.c, cp-tree.h: Use
6348 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
6349 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
6350 some places.
6351
6352 * decl.c (finish_decl): Don't complain about uninitialized const
6353 if it was initialized before.
6354
6355Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com)
6356
6357 * lex.c (default_assign_ref_body): Don't deal with vbases for
6358 now.
6359
6360 * decl.c (finish_decl): Fix reversed logic for objects and other
6361 things that need to be constructed but have no initializer.
6362
6363 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
6364 set by grok_op_properties or finish_decl.
6365
6366 * decl.c: Don't warn about extern redeclared inline unless
6367 -Wextern-inline is given.
6368 * decl2.c (lang_decode_option): Ditto.
6369 * cp-tree.h: Ditto.
6370
6371Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com)
6372
6373 * decl.c (pushdecl_with_scope): Fix thinko. Add forward
6374 declaration.
6375
6376 * decl.c (pushdecl_with_scope): New function.
6377 * decl.c (pushdecl_top_level): Use new function.
6378 * decl.c (pushtag): Initialize newdecl.
6379 * decl.c (pushtag): Push new type decl into correct scope.
6380
6381Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com)
6382
6383 * call.c, cvt.c, init.c, search.c, cp-tree.h:
6384 Eradicate LOOKUP_PROTECTED_OK.
6385
6386Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com)
6387
6388 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter
6389 'globalize' to signify implicit declarations.
6390 * decl.c (globalize_nested_type, maybe_globalize_type): Removed.
6391 * decl.c (set_identifier_type_value_with_scope): New function.
6392 * decl.c (set_identifier_local_value): Simplify.
6393 * spew.c (yylex, do_addr): Modify to return a _DEFN if a
6394 forward declaration (followed by ';' and not preceded by 'friend').
6395 * class.c, decl.c, except.c, init.c, parse.y,
6396 pt.c, search.c: Add new argument to calls to xref_tag and
6397 pushtag.
6398
6399Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com)
6400
6401 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
6402 ACCESSIBLY_DERIVED_FROM_P meant before.
6403 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
6404
6405 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
6406
6407 * search.c (get_base_distance_recursive): Members and friends of
6408 a class X can implicitly convert an X* to a pointer to a private or
6409 protected immediate base class of X.
6410 (get_binfo_recursive): Ditto.
6411 (get_base_distance): Ignore ambiguity if PROTECT < 0.
6412 (get_binfo): Lose multiple values of PROTECT.
6413 (compute_access): Protected is OK if the start of the
6414 search is an accessible base class of current_class_type.
6415
6416 * method.c (build_opfncall): Do check access on operator new here.
6417
6418 * decl.c (finish_function): Don't check access on operator new
6419 here.
6420
6421Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com)
6422
6423 * decl.c (xref_tag): The base of a derived struct is NOT always
6424 public. Duh.
6425
6426 * pt.c (do_explicit_instantiation): New function, called from
6427 parser to do explicit function instantiation.
6428 (type_unification): Allow the args list to be terminated with
6429 void_list_node.
6430 (do_pending_expansions): Look at i->interface for non-member
6431 templates.
6432
6433 * parse.y (datadef): Move explicit_instantiation here.
6434 (structsp): From here.
6435 (datadef): Complain about `int;'.
6436
6437Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com)
6438
6439 * pt.c (end_template_instantiation), cp-tree.h: Remove unused
6440 second parameter, and simplify first from a TREE_LIST where
6441 we only care about its TREE_VALUE to just the value (an IDENTIFIER).
6442 * pt.c (instantiate_member_templates): Simplify argument list
6443 from a TREE_LIST to just an IDENTIFIER.
6444 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
6445 * parse.y (template_instantiate_once): Simplify accordingly.
6446 * decl.c (inner_binding_level): New. Use various places to
6447 simplify.
6448
6449Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6450
6451 * typeck2.c (build_functional_cast): int() -> int(0).
6452
6453Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com)
6454
6455 * class.c (finish_struct): Don't do a bitwise copy for op= if the
6456 class has a virtual function table.
6457
6458 * typeck.c (convert_for_initialization): Restore warnings about
6459 not using defined op=. Should really be my_friendly_aborts, I
6460 s'pose.
6461
6462Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com)
6463
6464 * class.c (finish_struct): Tidy up conditions for doing bitwise
6465 copies of objects.
6466
6467 * decl.c (build_default_constructor): #if 0 out.
6468
6469 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
6470 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
6471
6472 * decl.c (grokdeclarator): Don't return void_type_node for
6473 friends being defined here.
6474
6475 * init.c (perform_member_init): Only do the init if it's useful.
6476
6477 * lex.c (default_copy_constructor_body): If we don't need to do
6478 memberwise init, just call __builtin_memcpy.
6479 (default_assign_ref_body): Ditto.
6480
6481 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
6482
6060a796 6483Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6484
6485 * lex.c (reinit_parse_for_method, cons_up_default_function):
6486 Don't give warn_if_unknown_interface warning when it came from a
6487 system header file.
6488 * pt.c (end_template_decl, instantiate_template): Ditto.
6489 * decl.c (start_decl): Ditto.
6490
6491Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com)
6492
6493 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
6494 enums.
6495
6496 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
6497 IS_AGGR_TYPE, since we don't know it's a type.
6498
6499Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com)
6500
6501 * decl.c (grokdeclarator): Don't complain about anonymous unions.
6502
6503 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
6504 anonymous, but had a name given to it by a typedef.
6505
6506 * decl.c (grokdeclarator): When renaming an anonymous struct, set
6507 TYPE_WAS_ANONYMOUS.
6508
6509 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
6510
6511 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
6512
6513 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
6514 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
6515
6516 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
6517 anonymous structs that get typedef'd.
6518
6519 * decl.c (grokdeclarator): Always return void_type_node for
6520 friends.
6521
6522 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
6523 friends.
6524 (dump_function_decl): Don't print out default args for
6525 a function used in an expression.
6526
6527 * decl.c (grokdeclarator): Give error on abstract declarator used
6528 in an invalid context (i.e. `void (*)();').
6529
6530 * error.c (cp_line_of): Support _TYPE nodes.
6531 (cp_file_of): Ditto.
6532
6533 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
6534 it can happen for the RHS of an assignment stmt where the LHS is
6535 a COND_EXPR.
6536
6537 * init.c (expand_aggr_init_1): Deal with bracketed initializer
6538 lists properly.
6539
6540 * class.c (finish_struct): Deal with enumerators and typedefs
6541 again.
6542
6543Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com)
6544
6545 * class.c (finish_struct): Tidy up loop over fields.
6546
6547 * errfn.c (cp_thing): Don't advance twice after a format.
6548
6549 * class.c (finish_struct): Complain about needing a constructor
6550 if a member has only non-default constructors, and don't try to
6551 generate a default constructor.
6552
6553 * decl.c (finish_decl): Also do the constructor thing if
6554 TYPE_NEEDS_CONSTRUCTING is set (for arrays).
6555
6556 * search.c (unuse_fields): New function: mark all fields in this
6557 type unused.
6558 (dfs_unuse_fields): Helper function.
6559
6560 * class.c (pushclass): If the new class is the same as the old
6561 class, still unuse the fields.
6562 (unuse_fields): Move to search.c.
6563
6564 * decl.c (grok_op_properties): Add friendp argument.
6565 (grokfndecl): Pass it.
6566 (start_method): Ditto.
6567
6568 * decl2.c (delete_sanity): Add use_global_delete parameter to catch
6569 ::delete calls.
6570
6571 * parse.y (unary_expr): Pass new parameter to delete_sanity.
6572
6573 * lex.c (default_copy_constructor_body): Don't choke if the union
6574 has no fields.
6575 (default_assign_ref_body): Ditto.
6576
6577 * call.c (compute_conversion_costs_ansi): Do the right thing for
6578 ellipsis matches.
6579
6580 * decl.c (push_to_top_level): Optimize.
6581
6582 * decl.c (start_function): Look for the lexical scope of a friend
6583 in DECL_CLASS_CONTEXT.
6584
6585 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
6586
6587Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com)
6588
6589 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
6590
6591 * init.c (init_init_processing): Don't assign BIN/BID to the
6592 IDENTIFIER_GLOBAL_VALUEs of their respective operators.
6593 (build_new): Check TREE_GETS_PLACED_NEW.
6594
6595 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
6596 op new with placement, set TREE_GETS_PLACED_NEW.
6597
6598 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls.
6599
6600 * class.c (finish_struct): Don't treat anonymous unions like
6601 other aggregate members. Do synthesize methods for unions without
6602 a name, since they may or may not be "anonymous unions".
6603
6604 * decl2.c (grok_x_components): Wipe out memory of synthesized methods
6605 in anonymous unions.
6606
6607 * lex.c (default_copy_constructor_body): Support unions.
6608 (default_assign_ref_body): Ditto.
6609
6610Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com)
6611
6612 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
6613
6614 * error.c (args_as_string): New function (%A), like type_as_string
6615 except NULL_TREE -> "..."
6616
6617 * call.c (build_overload_call_real): Fix for new overloading.
6618
6619 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
6620 here.
6621
6622 * parse.y (operator_name): Instead of here.
6623
6624 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
6625 of functions.
6626
6627 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
6628
6629 * method.c (build_opfncall): Don't need to massage return value
6630 any more, call build_overload_call with all flags.
6631
6632 * typeck.c (build_x_binary_op): Put back speculative call to
6633 build_opfncall.
6634 (build_x_unary_op): Ditto.
6635 (build_x_conditional_expr): Ditto.
6636
6060a796 6637Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6638
6639 * cvt.c (build_type_conversion_1): Change call to pedwarn into
6640 warning, and conditionalize upon warn_cast_qual.
6641
6642Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com)
6643
6644 * search.c (lookup_field): If xbasetype is a binfo, copy it to
6645 avoid clobbering its inheritance info.
6646
6647 * call.c (build_method_call): Don't overwrite basetype_path with
6648 TYPE_BINFO (inst_ptr_basetype) if they have the same type.
6649
6650 * search.c (compute_access): Fix handling of protected inheritance
6651 and friendship with the enclosing class.
6652
6653 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
6654 initialization of arbitrary variable.
6655
6656 * typeck2.c (build_functional_cast): Only try calling a method if
6657 one exists.
6658
6659 * decl.c (grokdeclarator): Move handling of constructor syntax
6660 initialization into first loop for generality.
6661 (parmlist_is_random): Lose.
6662
6663 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
6664 to default function.
6665
6666Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com)
6667
6668 * decl.c (grokparms): Abort if we get called with something we don't
6669 expect.
6670
6060a796 6671Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6672
6673 * call.c (build_overload_call_real): Change argument complain to
6674 flags to match style of rest of code. Pass it down to
6675 build_function_call_real as necessary.
6676 * call.c (build_overload_call, build_overload_call_maybe): Change
6677 argument complain to flags to match style of rest of code.
6678 * cp-tree.h (build_function_call_real): Added fourth flags
6679 argument.
6680 * cvt.c (convert_to_reference): Only give warning messages, if
6681 LOOKUP_COMPLAIN is set.
6682 * typeck.c (build_x_function_call): Change simple complain
6683 argument to build_overload_call_maybe and build_overload_call, to
6684 LOOKUP_COMPLAIN to match style of rest of code.
6685 * typeck2.c (build_functional_cast): Ditto.
6686 * typeck.c (build_function_call_real): Add flags, so that we can
6687 not complain, if we don't want to complain. Complain about
6688 arguments, if we are complaining, otherwise don't.
6689 * typeck.c (build_function_call, build_function_call_maybe):
6690 Stick in flags argument.
6691 * typeck.c (build_x_binary_op, build_x_unary_op,
6692 build_x_conditional_expr, build_x_compound_expr): Follow style of
6693 build_x_indirect_ref, as it is more correct and more common.
6694
6695Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com)
6696
6697 * call.c (build_method_call): Don't check for being called with
6698 a pointer.
6699
6700 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
6701 static initializer function.
6702
6703 * init.c (build_member_call): Use convert_force here, too.
6704
6705 * search.c (compute_access): Only treat static members specially
6706 if they are referenced directly.
6707
6708Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
6709
6710 * gxxint.texi (Access Control): New node.
6711
6712 * search.c (current_scope): New function; returns whichever of
6713 current_class_type and current_function_decl is the most nested.
6714 (compute_access): Total overhaul to make it clearer and more
6715 correct. Don't use the cache for now; in the only situation where
6716 it was used before, it gained nothing. This frees up three of the
6717 DECL_LANG_FLAGs for possible other use!
6718
6719 * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
6720
6721 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
6722
6723 * call.c (build_method_call): Use convert_force to cast `this' --
6724 rely on the access checking for the method itself.
6725
6726 * init.c (is_friend): Do the nesting thing, handle types. I am
6727 my own friend.
6728 (is_friend_type): Become a shell for is_friend.
6729 (add_friend): Never stick in ctype.
6730 Why are the friendship functions in init.c, anyway?
6731
6060a796 6732Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6733
6734 * cvt.c (build_type_conversion_1): Don't conditionalize call to
6735 pedwarn upon pedantic.
6736
6060a796 6737Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6738
6739 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
6740 gets a warning if one tries to initialize a non-const & from a
6741 non-lvalue.
6742 * cvt.c (convert_to_reference): Use %P format for argument
6743 numbers in warnings.
6744
6060a796 6745Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6746
6747 * init.c (build_delete): Follow style in call.c to construct the
6748 virtual call to the desctructor, as that code is right. Fixes a
6749 problem of the compiler saying a pointer conversion is ambiguous.
6750
6751Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com)
6752
6753 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
6754 VTABLE_NAME_FORMAT to VTABLE_NAME.
6755
6756 * *: s/visibility/access/g
6757
6758Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com)
6759
6760 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
6761
6060a796 6762Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6763
6764 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
6765 they break libg++.
6766
6767Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com)
6768
6769 * decl.c (duplicate_decls): Fix pointer arithmetic.
6770
6771Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp)
6772
6773 [ cp-* changes propagated from c-* changes in 940114 snapshot ]
6774 * cp-parse.y (maybe_attribute): Allow multiple __attribute__
6775 clauses on a declaration.
6776
6777Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com)
6778
6779 * class.c (finish_struct): Do synthesize methods for anon
6780 structs, just not unions.
6781
6782Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com)
6783
6784 * decl.c (xref_tag): handle anonymous nested type.
6785 * decl.c (globalize_nested_type): add no globalize bit check.
6786 * spew.c (hack_more_ids) : templated nested decl not push top
6787 level.
6788
6789 * parse.y : get rid of 'goto do_components'. It is much better
6790 for debugging.
6791
6792 * decl.c (is_anon_name): get rid of the function and use the
6793 macro ANON_AGGRNAME_P.
6794 * pt.c : ditto.
6795
6796Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com)
6797
6798 * class.c (finish_struct): Don't synthesize any methods for
6799 anonymous structs/unions.
6800
6801 * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
6802
6803Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com)
6804
6805 * method.c (build_opfncall): Call build_indirect_ref on
6806 synthesized instance for operator delete.
6807
6808 * pt.c (type_unification): Don't abort if called with a list of
6809 types in ARGS.
6810
6811 * class.c (instantiate_type): Deal with function templates.
6812
6813Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
6814
6815 * Makefile.in (CC): Default to cc not gcc.
6816
6817Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com)
6818
6819 * typeck.c (build_modify_expr): Call constructor if appropriate.
6820
6821 * decl.c (push_to_top_level): Clear out class-level bindings cache.
6822
6823Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com)
6824
6825 * call.c (resolve_scope_to_name): Work recursively (previously only
6826 looked down one level).
6827
6828 * lex.c (do_pending_inlines): If we're still dealing with the last
6829 batch of inlines, don't start working on a new one.
6830
6831 * Makefile.in (stamp-parse): Update conflict count.
6832 (TAGS): Fix.
6833
6834 * parse.y (explicit_instantiation): New rule; implements
6835 'template A<int>' syntax (though not 'template foo(int)' yet).
6836 (structsp): Add explicit_instantiation.
6837
6838Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com)
6839
6840 * class.c (finish_struct, etc.): Simplify decision to synthesize
6841 a destructor.
6842
6843 * call.c, class.c, cp-tree.h, decl.c, init.c,
6844 ptree.c, search.c, typeck.c, typeck2.c: Nuke
6845 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
6846 * init.c (expand_aggr_init_1): Don't try non-constructor methods
6847 of initializing objects.
6848 (build_new): Don't try other methods if the constructor lookup fails.
6849
6850 * class.c (finish_base_struct): Set cant_have_default_ctor and
6851 cant_synth_copy_ctor properly.
6852 (finish_struct): Ditto.
6853
6854Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com)
6855
6856 * typeck.c (build_modify_expr_1): #if 0 out again.
6857 (build_modify_expr): #if 0 out memberwise init code again.
6858
6859 * lex.c (default_copy_constructor_body): Be const-correct.
6860 (default_assign_ref_body): Ditto.
6861
6862 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
6863 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
6864 (expand_aggr_init): Disable silent conversion from initializer list
6865 to list of args for a constructor.
6866
6867 * class.c (base_info): Lose needs_default_ctor.
6868 (finish_base_struct): Ditto.
6869 (finish_struct): Ditto.
6870
6871 * decl.c (init_decl_processing): Don't turn off flag_default_inline
6872 just because flag_no_inline is on.
6873 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
6874 constructor.
6875
6876 * class.c (finish_struct): Synthesize default ctor whenever
6877 allowed.
6878
6879 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
6880
6060a796 6881Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6882
6883 * Makefile.in, configure: Handle the C++ front-end in a
6884 subdirectory.
6885 * cp-*: Move C++ front-end to cp/*.
6886
6887Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com)
6888
6889 * cp-typeck.c (build_function_call_real): Modify to match other
6890 instances of taking the address of the function.
6891
6892 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
6893 there are non-synthesized constructors.
6894 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
6895 Always generate copy constructor if possible.
6896
6897 * cp-tree.h (lang_type): Add has_real_constructor bitfield.
6898 (TYPE_HAS_REAL_CONSTRUCTOR): Define.
6899
6900 * cp-lex.c (default_copy_constructor_body): Use init syntax
6901 for all bases.
6902
6903 * cp-type2.c (store_init_value): Only give error for initializer list
6904 if TYPE_HAS_REAL_CONSTRUCTOR.
6905
6906Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com)
6907
6908 * cp-tree.h (DECL_SYNTHESIZED): Add defn.
6909 (lang_decl): Add synthesized bitfield to decl_flags.
6910
6911 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
6912 artificial methods, rather than a line # of 0.
6913
6914Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com)
6915
6916 * cp-decl (xref_tag): fix a bug in conflict type.
6917 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
6918 type reference.
6919 * cp-spew.c (yylex) : generated SCOPED_NAME token.
6920 * cp-lex.c (yyprint): handle SCOPED_NAME.
6921
6060a796 6922Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6923
6924 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
6925 not right.
6926
6927Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com)
6928
6929 * cp-decl2.c (grok_x_components): fix a bug that enum type does not
6930 have type_flags.
6931
6060a796 6932Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6933
6934 Ensure that all vtable pointers are initialized with all the right
6935 values.
6936
6937 * cp-class.c (is_normal): Changed to reflect new meaning of
6938 CLASSTYPE_VFIELD_PARENT.
6939 * cp-class.c (maybe_fixup_vptrs): Use of
6940 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use
6941 BINFO_MODIFIED instead.
6942 * cp-class.c (finish_struct): Changed to reflect new meaning of
6943 CLASSTYPE_VFIELD_PARENT.
6944 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
6945 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
6946 coding it here.
6947 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
6948 re-implement.
6949 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
6950 * cp-tree.h (vfield_parent): Changed to integer.
6951 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
6952 meaning.
6953 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
6954
6955Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com)
6956
6957 * cp-decl.c (xref_tag): re-implement globalize nested type.
6958 * cp-decl2.c (grok_x_components): ditto.
6959 * cp-parse.y: ditto.
6960 * cp-tree.h (lang_type): add no_globalize bit in type_flags.
6961
6962Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com)
6963
6964 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
6965 decls with a definition attached.
6966
6967 * cp-typeck.c (build_modify_expr): Undo previous change in the case
6968 of INIT_EXPRs.
6969
6970Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com)
6971
6972 * cp-typeck.c (build_modify_expr): Replace code for generating
6973 assignment semantics for classes with an error.
6974 (build_modify_expr_1): #if 0 out.
6975
6976 * cp-decl.c (pushdecl): Patch bogus design of pushdecl
6977 behavior for overloaded functions (it doesn't push anything).
6978
6979 * cp-class.c (finish_struct): When generating default op=,
6980 set TYPE_HAS_ASSIGNMENT.
6981
6060a796 6982Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com>
7177d104
MS
6983
6984 * cp-cvt.c (convert): Make {double, clashing enum} -> enum
6985 invalid.
6986 * cp-typeck.c (convert_for_assignment): Simplify.
6987 * cp-decl2.c (warn_enum_clash): Removed.
6988 * invoke.texi (-Wenum-clash): Removed.
6989 * toplev.c (-Wenum-clash): Removed.
6990
6991Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com)
6992
6993 * cp-decl.c (finish_decl): fix incorrect popclass call.
6994
6995 * cp-decl.c (is_anon_name): new function, check whether the name
6996 is anonymous name generated by compiler.
6997 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
6998 * cp-spew.c (hack_more_ids): handle nested type in template.
6999 * cp-parse.y : handle nested type reference in uninstantiated
7000 template.
7001 * cp-call.c (build_method_call): handle uninstantiated template
7002 case.
7003 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested
7004 type in template.
7005 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested
7006 type by name.
7007 * cp-pt.c (tsubst): handle nested type search by name.
7008
7009Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com)
7010
7011 * cp-init.c (build_member_call): Propagate qualifiers to new type.
7012
7013 * cp-call.c (build_method_call): Count functions the new way.
7014
7015Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com)
7016
7017 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
7018 too.
7019
7020Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com)
7021
7022 * cp-parse.y: change to handle whether to globalize nested class.
7023 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
7024
7025Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com)
7026
7027 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
7028 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
7029 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
7030 gplus.gperf toplev.c: Incorporated C++ signature extension.
7031 * cp-sig.c: New file, contains most of signature processing.
7032 * cp-hash.h: Regenerated from gplus.gperf.
7033
7034 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures'
7035 and `-fno-handle-signatures' command line flags.
7036
7037 * gcc.texi: Changed the last-modification date.
7038 * invoke.texi: Added `-fhandle-signatures' in the list of
7039 C++ language options. Added explanation for this option.
7040
6060a796 7041Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7042
7043 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
7044 harsh here.
7045
6060a796 7046Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7047
7048 * cp-pt.c (do_pending_expansions): Decide to expand a template
7049 member function, based upon it's class type, not the class type of
7050 the first place it was declared.
7051
6060a796 7052Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7053
7054 * cp-class.c (is_normal): New routine, use to determine when the
7055 given binfo is the normal one. (The one that should have the simple
7056 vtable name.)
7057 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
7058 to check if two fndecls are `the same'. Sometimes this routine can
7059 modify the main vtable, and normal should be 1, in that case, so use
7060 is_normal() to determine if this is the main vtable for the class.
7061 Don't recurse down virtual bases, as they are shared, and we take
7062 care of them elsewhere.
7063 * cp-class.c (modify_vtable_entries): If we have already updated the
7064 vtable with the new virtual, don't do it again.
7065 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
7066 appropriate. Do virtual function overriding in virtual bases, after
7067 normal overriding, so that the base function list in DECL_VINDEX is
7068 not overridden, before we have a chance to run through the list.
7069 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
7070 Make sure we pass the right address into modify_vtable_entries.
7071 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
7072 binfo is the one that has the vtable that we based our vtable on.
7073
7074Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com)
7075
7076 * cp-typeck.c (c_expand_start_case): Use default_conversion to
7077 convert expression from reference type if necessary.
7078
7079Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com)
7080
7081 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
7082 trying to read its TREE_VALUE.
7083
7084 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
7085 (finish_struct): Instead of here.
7086
7087Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7088
7089 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
7090 have TYPE_PTRMEMFUNC_P set before we try to build its
7091 CLASSTYPE_ID_AS_LIST.
7092 (get_decl_list): Likewise, when trying to read it.
7093
7094 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
7095 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
7096
7097Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7098
7099 * cp-typeck.c (rationalize_conditional_expr): New function.
7100 (unary_complex_lvalue): Use it.
7101 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
7102 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a
7103 SAVE_EXPR either.
7104
7105 * cp-decl2.c (explicit_warn_return_type): Deleted variable.
7106 (lang_decode_option): Set warn_return_type, not explicit_*, for
7107 -Wreturn-type and -Wall. This is what rest_of_compilation uses to
7108 decide if it should go into jump_optimize or not.
7109 * cp-tree.h (explicit_warn_return_type): Deleted.
7110 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
7111 (finish_function): Also complain about no return in a non-void fn if
7112 we're being pedantic (don't rely on use of -Wreturn-type).
7113
7114Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7115
7116 * cp-decl.c (grokdeclarator): Forbid declaration of a function as
7117 static if it's being done inside another function.
7118
7119 * cp-search.c (compute_visibility): Check for friendship both ways.
7120
7121Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com)
7122
7123 * cp-cvt.c (build_default_binary_type_conversion): Make error
7124 messages more helpful.
7125
7126 * cp-error.c (op_as_string): New function, returns "operator =="
7127 given EQ_EXPR or suchlike.
7128
7129Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7130
7131 * cp-call.c (print_n_candidates): New function.
7132 (build_overload_call_real): Use it when we complain about a call
7133 being ambiguous.
7134
7135Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com)
7136
7137 * cp-call.c (build_method_call): Fix checking for static call
7138 context.
7139
7140 * cp-method.c (build_opfncall): Call build_indirect_ref on argument
7141 to operator new.
7142
7143 * cp-init.c (build_new): Don't mess with rval when building
7144 indirect ref.
7145
7146Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com)
7147
7148 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
7149 NAME(type) may not be exist. It's not a problem for old compiler.
7150
7151Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7152
7153 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
7154 never used for anything.
7155 (struct lang_type, member type_flags): Delete field
7156 `alters_visibility', and up `dummy' by 1.
7157 * cp-class.c (finish_base_struct): Delete code that copies the
7158 setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
7159 (finish_struct): Delete code that sets it.
7160
7161Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com)
7162
7163 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
7164 build_method_call that I messed up before.
7165
7166 * cp-search.c (get_base_distance): If protect > 1, allow immediate
7167 private base.
7168
7169 * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
7170 (finish_struct): Ditto. Well, nigh-correctly; it won't deal
7171 properly with the case where a class contains an object of an
7172 ambiguous base class which has a protected op=. Should be fixed
7173 when the access control code gets overhauled.
7174 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
7175
7176Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7177
7178 * cp-lex.c (real_yylex): Turn the code back on that deals with
7179 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to
7180 avoid the ambiguity problems that led to it being turned off in the
7181 first place.
7182
7183 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
7184 to see if something is a method.
7185
6060a796 7186Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7187
7188 * cp-typeck.c (build_modify_expr): Avoid error messages on small
7189 enum bit fields.
7190 * cp-typeck.c (convert_for_assignment): Add missing argument to
7191 cp_warning and cp_pedwarn calls.
7192
7193Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com)
7194
7195 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
7196 initializers; it's just anachronistic.
7197
7198 * cp-decl.c (finish_decl): Don't require external-linkage arrays
7199 to have a complete type at declaration time when pedantic.
7200
7201Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com)
7202
7203 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
7204
7205 * cp-call.c (build_method_call): Don't dereference pointer given
7206 as instance.
7207
7208 * cp-decl.c (finish_function): Don't pass pointer to
7209 build_method_call.
7210 (finish_function): Ditto.
7211
7212 * cp-typeck.c (build_x_function_call): Ditto.
7213
7214 * cp-method.c (build_component_type_expr): Ditto.
7215
7216 * cp-init.c (build_member_call): Ditto.
7217 (build_new): Ditto.
7218
7219Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com)
7220
7221 * cp-decl.c (xref_tag): fix regression created by changes made
7222 in Dec. 7 1993.
7223 * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
7224
7225Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7226
7227 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
7228 out the final evaluation of the function, so we can see if ELLIPSIS,
7229 USER, and EVIL were set at the end.
7230
7231 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
7232 only go for setting TRIVIAL_CODE if we are dealing with types that
7233 are compatible.
7234
6060a796 7235Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7236
7237 * cp-decl.c (flag_huge_objects): New flag to allow large objects.
7238 * toplev.c (lang_options): Ditto.
7239 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
7240 * cp-decl.c (delta_type_node): New type for delta entries.
7241 * cp-tree.h (delta_type_node): Ditto.
7242 * cp-decl.c (init_decl_processing): Setup delta_type_node.
7243 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
7244 delta_type_node instead of short_integer_type_node.
7245 * cp-class.c (build_vtable_entry): Ditto.
7246
7247Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7248
7249 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
7250 NO_{DOLLAR,DOT} macro checks, so it always gets defined.
7251 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
7252
6060a796 7253Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7254
7255 * cp-decl.c (finish_decl): Make sure things that can go into
7256 "common", do go into common, if -fcommon is given.
7257
7258Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7259
63718c49
GB
7260 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
7261 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
7262 argument matching diagnostics to make instantly clear what the
7263 compiler is doing.
7177d104
MS
7264
7265 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
7266 then check to see if the penalty was increased due to
7267 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
7268
7269Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com)
7270
7271 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
7272 problem.
7273
7274Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com)
7275
7276 * cp-class.c (finish_struct): Before synthesizing methods, if no
7277 methods have yet been declared then set nonprivate_method. Don't
7278 set non_private method after synthesizing a method.
7279
7280 * cp-lex.c (extract_interface_info): If flag_alt_external_templates
7281 is set, tie emitted code to the location of template instantiation,
7282 rather than definition.
7283
7284 * cp-tree.h: Declare flag_alt_external_templates.
7285
7286 * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
7287
7288 * toplev.c (lang_options): Ditto.
7289
7290 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp)
7291
63718c49
GB
7292 [changes propagated from 930810 snapshot]
7293 * cp-decl.c (init_decl_processing): Make long long available for use
7294 as SIZE_TYPE and PTRDIFF_TYPE.
7295 (finish_decl): Allow file-scope static incomplete array.
7296 (grokdeclarator): Don't pass on const and volatile fron function
7297 value type to function type.
7298 Warn here for volatile fn returning non-void type.
7299 * cp-parse.y (attrib): Accept attributes `volatile' with alias
7300 `noreturn', and `const'.
7301 * cp-typeck.c (default_conversion): Don't lose const and volatile.
7302 (build_binary_op_nodefault): Generate pedantic warning for comparison
7303 of complete pointer type with incomplete pointer type.
7304 (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
7177d104
MS
7305
7306Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com)
7307
7308 * cp-init.c (expand_vec_init): When creating a temporary for copying
7309 arrays, use the type of the source, not the target.
7310
7311 * cp-cvt.c (convert): Pass an argument for errtype to
7312 convert_to_reference.
7313
7314 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
7315 methods, -> and `this'.
7316
7317Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com)
7318
7319 * cp-error.c (parm_as_string): New function; returns `this' or arg
7320 number. Corresponds to %P.
7321 (dump_expr): Deal with method calls.
7322
7323 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
7324 * cp-typeck.c (convert_for_assignment): Ditto.
7325 (warn_for_assignment): Lose.
7326
7327Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7328
7329 * cp-call.c (ideal_candidate_ansi): Delete code that was never
7330 doing anything useful. Instead, sort once, and DO NOT wipe
7331 out any codes with EVIL_CODE, since that's what we use as a
7332 marker for the end of the list of candidates.
7333
7334 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
7335
7336Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com)
7337
7338 * cp-init.c (get_aggr_from_typedef): New function, like
7339 is_aggr_typedef but returns the _TYPE.
7340
7341 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
7342
7343Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7344
7345 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
7346
7347Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp)
7348
7349 Delay language context change until beginning of next decl.
7350
7351 * cp-lex.h (c_header_level): Removed.
7352 (pending_lang_change): Declared.
7353 * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
7354 (pending_lang_change): Defined.
7355 (check_newline): Rework code that recognizes line number and
7356 filename changes. Instead of pushing and popping lang context,
7357 increment and decrement pending_lang_change.
7358 (do_pending_lang_change): Push and pop lang context according
7359 to value of pending_lang_change.
7360 * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
7361 (extdef): Same as extdef, but call do_pending_lang_change() first.
7362
7363Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp)
7364
7365 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
7366 compare of ptr with 0 only if pedantic in both cases.
7367
7368Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp)
7369
7370 Reinstate the below patch, which got lost in the Cygnus merge:
7371 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no)
7372 * cp-parse.y (maybe_type_qual): Don't fail to set $$.
7373
7374Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp)
7375
7376 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
7377
7378Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com)
7379
7380 * cp-lex.c (real_yylex): Diagnose floating point constants
7381 that are too large.
7382
7383Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp)
7384
7385 * cp-type2.c (build_functional_cast): ARM page 16: When a class
7386 and an object, function or enumerator are declared in the same
7387 scope with the same name, the class name is hidden.
7388
7389Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp)
7390
7391 * cp-call.c (convert_harshness_ansi): Distinguish float, double,
7392 and long double from each other when overloading.
7393 (compute_conversion_costs_{ansi,old}, build_method_call,
7394 build_overlay_call_real, convert_to_aggr): Always set and
7395 always use H_LEN member of candidate structure.
7396
7397Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp)
7398
7399 * cp-decl.c (duplicate_decls): Note redeclarations of library
7400 functions, and generate distinct warnings for them.
7401
7402Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp)
7403
7404 Support format warnings in G++.
7405
7406 * cp-tree.h: Protect against multiple inclusion.
7407 Declare all public functions in c-common.c (copy from c-tree.h).
7408 (STDIO_PROTO): Define.
7409 (warn_format): Declare.
7410 (record_format_info): Remove declaration.
7411 * cp-decl.c (init_decl_processing): Call init_function_format_info.
7412 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
7413 * cp-typeck.c (build_function_call_real): Call check_function_format.
7414 (record_format_info): Remove -- obsolete stub.
7415
7416Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp)
7417
7418 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
7419 following an extern one (for -Wredundant-decls).
7420 * cp-parse.y (primary): In statement expression case, if compstmt
7421 returns something other than a BLOCK, return it unchanged.
7422
7423Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp)
7424
7425 * cp-decl.c (warn_extern_redeclared_static): New function made
7426 from code extracted from pushdecl.
7427 (duplicate_decls, pushdecl): Call new function.
7428 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
7429 to be a TREE_LIST when function is declared in 'extern "C" {}'.
7430
7431Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com)
7432
7433 * cp-class.c (duplicate_tag_error): Use cp_error.
7434 (finish_base_struct): Check for ambiguity with direct base, and don't
7435 generate op= or copy ctor if it exists.
7436
7437Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com)
7438
7439 * cp-init.c (expand_member_init): when initializer name is null,
7440 don't try to build it now because emit_base_init will handle it.
7441
7442Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com)
7443
7444 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
7445 code such as ExceptionHandler::operator=.
7446
7447Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com)
7448
7449 * cp-decl.c (grokdeclarator): Don't try to print out dname when
7450 complaining about arrays of references if decl_context==TYPENAME,
7451 since it will be null.
7452
7453 * cp-decl2.c: Default to flag_ansi_overloading.
7454
7455Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com)
7456
7457 * cp-call.c (build_method_call): use binfo from instance if it's
7458 different from binfo (basetype_path) passed from above.
7459
7460Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7461
7462Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp)
7463
7464 cp-error.c (dump_expr): Use unsigned chars to output a
7465 TREE_REAL_CST in hex.
7466
7467Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com)
7468
7469 * cp-class.c (finish_struct): Fix typo in setting
7470 cant_synth_asn_ref.
7471
7472 * cp-tree.h (TYPE_NESTED_NAME): New macro, does
7473 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
7474
7475 * cp-lex.c (default_copy_constructor_body): Change
7476 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
7477 (default_assign_ref_body): Ditto.
7478 (default_copy_constructor_body): Call operator= explicitly for
7479 base classes that have no constructor.
7480
7481Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com)
7482
7483 * cp-call.c (build_method_call): If the instance variable is
7484 converted to error_mark_node when we're trying to convert it to the
7485 base type of a method we're looking up, return error_mark_node.
7486
7487Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com)
7488
7489 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
7490 cases, tests for unsigned operands by peeking inside a NOP_EXPR.
7491
7492Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7493
7494 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
7495 harshness_code, not the size of short, for clearing out the
7496 ansi_harshness.
7497
7498 * cp-call.c (print_candidates): New function.
7499 (build_method_call): When we had some candidates, but didn't get a
7500 usable match, don't report that we got an error with the first
7501 candidate. Instead, say there were no matches, and list the
7502 candidates with print_candidates. In the second pass, make sure we
7503 clear out ever_seen, so we can accurately count the number of
7504 functions that qualified.
7505
7506Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com)
7507
7508 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
7509 only if op1 is known to be != -1.
7510 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
7511
7512Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
7513
7514 * cp-method.c (hack_identifier): If the field itself is private, and
7515 not from a private base class, say so.
7516
7517Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com)
7518
7519 * cp-decl.c (grokdeclarator): Always warn on initialization of
7520 const member.
7521
7522Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com)
7523
7524 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
7525 (finish_base_struct): Set cant_synth_asn_ref properly.
7526
7527 * cp-lex.c (cons_up_default_function): Add section for operator=.
7528 (default_assign_ref_body): New function, mostly cribbed from
7529 default_copy_constructor_body.
7530
7531 * cp-class.c (base_info): Add members cant_synth_copy_ctor,
7532 cant_synth_asn_ref, no_const_asn_ref.
7533 (finish_base_struct): Update no_const_asn_ref, note that you should
7534 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
7535 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
7536 initialize them properly. Set no_const_asn_ref properly. Set
7537 cant_synth_* in some of the situations where they should be set.
7538 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call
7539 to cons_up_default_function for operator=.
7540
6060a796 7541Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7542
7543 * cp-cvt.c (convert_force): Add code to perform casting of pointer
7544 to member function types.
7545 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
7546 when the conversion should be done, regardless.
7547 * cp-tree.h (build_ptrmemfunc): Ditto.
7548 * cp-type2.c (digest_init): Ditto.
7549 * cp-typeck.c (convert_for_assignment): Ditto.
7550
7551Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com)
7552
7553 * cp-error.c (dump_expr): Do the right thing for variables of
7554 reference type.
7555
7556 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
7557 and its kin properly.
7558 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
7559
6060a796 7560Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com>
7177d104
MS
7561
7562 * cp-method.c (build_opfncall): Don't count pointer to member
7563 functions as aggregates here, as we don't want to look up methods in
7564 them. The compiler would core dump if we did, as they don't have
7565 normal names.
7566 * cp-typeck.c (build_indirect_ref): Improve wording on error
7567 message.
7568
7569Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com)
7570
7571 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
7572 (since it's supported in other compiler bits).
7573
7574 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
7575 argument.
7576
7577 * cp-error.c (dump_function_decl): Don't print return type for
7578 constructors and destructors.
7579
7580 * cp-cvt.c (cp_convert_to_pointer): Import code from
7581 convert_to_pointer so we can return error_mark_node in the case of an
7582 error, and to allow more meaningful error messages.
7583 (build_type_conversion): Don't go through void* when trying
7584 to convert to a pointer type.
7585
7586 * cp-decl.c (grokfndecl): Move call to grok_op_properties back
7587 after grokclassfn so that it's dealing with the right decl.
63718c49 7588 (grok_op_properties): Don't assert !methodp for op new and op delete.
7177d104
MS
7589
7590 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
7591 no uses of it in the compiler).
7592
7593 * cp-call.c (build_scoped_method_call): Fix for destructors of simple
7594 types.
7595 (build_method_call): Ditto.
7596
7597Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com)
7598
7599 * cp-tree.c (count_functions): Abstraction function.
7600
7601 * cp-call.c (build_overload_call_real): Deal with new overloading
7602 properly, remove dead code.
7603
7604 * gcc.c (default_compilers): Generate and use .ii files in the
7605 intermediate stage of compiling C++ source.
7606
7607Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
7608
7609 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
7610 address before using it, so it can be later safely compared.
7611
7612Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com)
7613
7614 * cp-pt.c (tsubst): Deal with new overloading.
7615
7616 * cp-typeck.c (fntype_p): is the arg function type?
7617 (comp_target_parms): pedwarn on conversion from (anything) to (...).
7618 (build_x_function_call): Deal with new overloading.
7619
7620 * cp-tree.c (decl_list_length): Deal with new overloading.
7621 (decl_value_member): Like value_member, but for DECL_CHAINs.
7622
7623 * cp-decl.c (duplicate_decls): Deal with new overloading.
7624 (start_decl): Ditto.
7625
7626 * cp-class.c (instantiate_type): Deal with new overloading.
7627
7628 * cp-call.c (convert_harshness_ansi): Deal with new overloading.
7629 (convert_harshness_old): Deal with new overloading.
7630 (build_overload_call_real): Ditto.
7631
7632Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com)
7633
7634 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
7635 if unambiguous, NULL_TREE otherwise.
7636 (get_first_fn): Returns the first appropriate FUNCTION_DECL.
7637 (is_overloaded_fn): Returns whether or not the passed tree is
7638 a function or list of functions.
7639
7640 * cp-init.c (init_init_processing): use `get_first_fn' to find
7641 the FUNCTION_DEFN for new and delete.
7642
7643 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
7644 code size in half (I spit on special cases).
7645
7646Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com)
7647
7648 * cp-decl.c: Allow references and template type parameters as well
7649
7650Local Variables:
7651eval: (auto-fill-mode)
7652left-margin: 8
7653fill-column: 76
7654End:
This page took 0.822802 seconds and 5 git commands to generate.