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