OSDN Git Service

82nd Cygnus<->FSF merge
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
2
3         * decl.c (cp_finish_decl): Delay emitting the debug information for
4         a typedef that has been installed as the canonical typedef, if the
5         type has not yet been defined.
6
7 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8
9         * decl2.c (grokfield): Still call pop_nested_class for access decls.
10
11 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12
13         * decl.c (lookup_label): Call label_rtx.
14
15         * decl.c (make_binding_level): New function.
16         (pushlevel, pushlevel_class): Call it instead of explicit
17         duplicate calls to xmalloc.
18
19         * decl.c (init_decl_processing): Delete useless build_pointer_type
20         call.
21
22         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23         (sizet_ftype_string): Delete variable.
24         (init_decl_processing): Add built-in functions fabsf, fabsl,
25         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
26         variable strlen_ftype, used for strlen.
27
28 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
29
30         * decl.c (push_to_top_level): Start from current_binding_level
31         again for now; the stl hacks depend on g++ being broken in this
32         way, and it'll be fixed in the template rewrite.
33
34         * tree.def: Add USING_DECL.
35         * decl2.c (do_class_using_decl): Implement.
36         (grokfield): Pass access decls off to do_class_using_decl instead of
37         grokdeclarator.
38         * error.c (dump_decl): Handle USING_DECLs.
39         * decl.c (grokdeclarator): Remove code for handling access decls.
40         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
41         as access decls for now.
42         (finish_struct): Don't check USING_DECLs for other uses of the name.
43
44         * search.c (get_matching_virtual): Use cp_error_at.
45
46 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
47
48         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
49         match c-typeck.c.
50         (self_promoting_args_p): Move the check that TYPE is non-nil
51         before trying to look at its main variant.
52         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
53
54         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
55         Delete macros.
56         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
57         (do_friend): Delete call to xref_friend.
58         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
59
60         * typeck.c (convert_sequence): #if 0 unused function.
61
62         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
63         be in decl_in_memory_p.
64         (decl_in_memory_p): Delete decl.
65         * expr.c (decl_in_memory_p): Delete fn.
66         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
67
68         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
69
70 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
71
72         * class.c (finish_struct_1): Check for a pure-specifier on a
73         non-virtual function here.
74
75         * decl2.c (grok_function_init): Don't check whether the function
76         is virtual here.
77         (grokfield): Don't call check_for_override here.
78
79         * decl.c (push_to_top_level): Start from inner_binding_level,
80         check class_shadowed in class levels.
81
82 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
83
84         * decl.c (resume_level): Ignore things that don't have names, instead
85         of core dumping.
86
87 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
88
89         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
90
91 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
92
93         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
94         synthesized dtor.
95
96         * parse.y (complete_type_name): Bind global_scope earlier.
97         (complex_type_name): Ditto.
98         (qualified_type_name): Remove.
99
100 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
101
102         * decl.c (grokfndecl): Move code that looks for virtuals in base
103         classes...
104         * class.c (check_for_override): ... to a new function.
105         (finish_struct_1): Call it.
106
107         * cp-tree.h: Declare warn_sign_compare.
108
109         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
110         rather than extra_warnings to decide whether to warn about
111         comparison of signed and unsigned.
112
113         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
114         implies -Wsign-compare.  -Wall doesn't imply -W.
115
116 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
117
118         * typeck.c (build_component_ref): Fix to handle anon unions in base
119         classes as well.
120
121 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
122
123         * class.c (resolves_to_fixed_type_p): Delete code dealing with
124         a WITH_CLEANUP_EXPR, since we don't generate them any more.
125         * cvt.c (build_up_reference): Likewise.
126         * decl.c (grok_reference_init): Likewise.
127         (cp_finish_decl): Likewise.
128         * error.c (dump_expr): Likewise.
129         * tree.c (real_lvalue_p): Likewise.
130         (lvalue_p): Likewise.
131         (build_cplus_new): Likewise.
132         (unsave_expr_now): Likewise.
133         * typeck.c (unary_complex_lvalue, build_modify_expr,
134         c_expand_return): Likewise.
135
136 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
137
138         Make the C++ front-end pay attention to attributes for structures.
139         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
140         finish_struct_1.
141         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
142         Take out old round_up_size use and setting the DECL_ALIGN possibly
143         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
144         can override what the attribute set.
145         * cp-tree.h (finish_struct): Update prototype.
146         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
147         attributes to finish_struct.
148         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
149         value down into finish_struct.
150         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
151
152 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
153
154         * decl.c (poplevel):  Re-word dead for local handling.
155         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
156         (cp_finish_decl):  If is_for_scope, check for duplicates so
157         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
158
159         * lex.c (do_identifier):  Use global binding in preference of
160         dead for local variable.
161
162 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
163
164         * init.c (initializing_context): Handle anon union changes, the
165         context where fields of anon unions can be initialized now has to be
166         found by walking up the TYPE_CONTEXT chain.
167
168 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
169
170         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
171         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
172         (obscure_complex_init): If bss is supported, always set
173         DECL_INITIAL to error_mark_node.
174
175 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
176
177         * init.c (is_friend): Make sure there's a context before we see if
178         it's an aggr type.
179
180 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
181
182         * init.c (is_friend): Classes are not friendly with nested classes.
183
184 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
185
186         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
187         and record its result.
188
189 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
190
191         * class.c (finish_struct_anon): Switch around code to not move anon
192         union elements around, nor mess up their contexts, nor offsets,
193         instead we now build up the right number of COMPONENT_REFs for all
194         the anon unions that may be present at build_component_ref time.
195         * typeck.c (lookup_anon_field): New routine to handle field lookup
196         on fields without names.  We find them, based upon their unique type
197         instead.
198         * typeck.c (build_component_ref): Allow FIELD_DECL components.
199         Handle finding components in anonymous unions, and ensure that a
200         COMPONENT_REF is built for each level as necessary.
201
202 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
203
204         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
205         code that ensures that copy ctors are used if appropriate.
206
207 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
208
209         * init.c (build_vec_delete): Only give an error if base isn't an
210         error_mark_node.
211
212 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
213
214         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
215         (yylex): If we see `new', keep slurping.
216
217 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
218
219         * class.c (finish_struct_1): Move code for handling anon unions...
220         (finish_struct_anon): to here.  Fixup so that we do the offset
221         calculations right, and so that the fields are physically moved to
222         the containers's chain.
223
224 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
225
226         * decl.c (grokdeclarator): Avoid trying to get an operand off an
227         identifier node.
228
229 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
230
231         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
232         POINTER_SIZE to agree with expr.c.
233
234 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
235
236         * search.c (lookup_field): Don't report ambiguities if protect is 0,
237         instead return NULL_TREE.
238
239 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
240
241         * class.c (finish_struct_1): Call warn_hidden if we want warnings
242         about overloaded virtual functions.
243         (warn_hidden): New routine to warn of virtual functions that are
244         hidden by other virtual functions, that are not overridden.
245         (get_basefndecls): New routine, used by warn_hidden.
246         (mark_overriders): New routine, used by warn_hidden.
247         * search.c (get_matching_virtual): Remove old warning that just
248         isn't very useful.
249
250 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
251
252         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
253
254         * typeck.c (null_ptr_cst_p): Delete unused fn.
255         (build_function_call_maybe): Delete unused fn.
256
257         * expr.c (extract_init): #if 0 the code after unconditional return 0
258         for now.
259
260         Delete old cadillac code.
261         * edsel.c: Remove file.
262         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
263         * Makefile.in (CXX_OBJS): Delete edsel.o.
264         (edsel.o): Delete rule.
265         * cp-tree.h (flag_cadillac): Delete var decl.
266         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
267         * decl2.c (flag_cadillac): Delete var definition.
268         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
269         (grokfield): Delete code depending on flag_cadillac.
270         (finish_anon_union): Likewise.
271         * class.c (finish_struct_1): Likewise.
272         (pushclass): Likewise.
273         (popclass): Likewise.
274         (push_lang_context): Likewise.
275         (pop_lang_context): Likewise.
276         * decl.c (init_decl_processing): Likewise.
277         (start_decl): Likewise.
278         (cp_finish_decl): Likewise.
279         (xref_tag): Likewise.
280         (finish_enum): Likewise.
281         (start_function): Likewise.
282         (finish_function): Likewise.
283         (finish_stmt): Likewise.
284         * lex.c (lang_init): Likewise.
285         (check_newline): Likewise.
286
287         * lex.c (do_pending_inlines): Delete synthesized method kludge.
288
289         Delete defunct, ancient garbage collection implementation.
290         * rtti.c: New file with the RTTI stuff from gc.c.
291         * gc.c: Removed file (moved the remaining stuff into rtti.c).
292         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
293         (rtti.o): New rule, replacing gc.o.
294         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
295         * cp-tree.h: Delete gc-related fn decls.
296         (DECL_GC_OFFSET): Delete macro.
297         (flag_gc): Delete extern decl.
298         * decl.c (current_function_obstack_index): Delete var decl.
299         (current_function_obstack_usage): Delete var decl.
300         (start_function): Delete clearing of current_function_obstack_index
301         and current_function_obstack_usage.
302         (init_decl_processing): Delete code relying on -fgc.
303         Delete call to init_gc_processing.
304         (cp_finish_decl): Delete calls to build_static_gc_entry and
305         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
306         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
307         and to expand_expr of a __gc_main call.
308         (maybe_gc_cleanup): Delete var decl.
309         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
310         * decl2.c (flag_gc): Delete var decl.
311         (lang_f_options): Delete offering of -fgc.
312         (lang_decode_option): Delete -fgc and -fno-gc handling.
313         (get_temp_regvar): Delete gc code.
314         * init.c (build_new): Delete gc code.
315         * lex.c (init_lex): Delete checking of flag_gc.
316
317         * typeck.c (convert_arguments): Delete gc code.
318         (build_component_addr): Delete -fgc warning.
319         (build_modify_expr): Delete gc code.
320
321         * decl2.c (build_push_scope): Delete fn.
322         * cp-tree.h (build_push_scope): Delete decl.
323
324         * search.c (clear_search_slots): Delete fn.
325         * cp-tree.h (clear_search_slots): Delete decl.
326
327         * search.c (tree_needs_constructor_p): Delete fn.
328         * cp-tree.h (tree_needs_constructor_p): Delete decl.
329
330         * tree.c (id_cmp): Delete fn.
331
332         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
333         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
334
335         * tree.c (decl_value_member): Delete fn.
336         * cp-tree.h (decl_value_member): Delete decl.
337
338         * tree.c (list_hash_lookup_or_cons): Delete fn.
339         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
340
341         * method.c (cplus_exception_name): Delete fn.
342         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
343
344         * spew.c (shift_tokens): Delete fn.
345
346 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
347
348         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
349         to cp_finish_decl.
350         * parse.y: Ditto.
351
352 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
353
354         * tree.c (build_cplus_staticfn_type): Delete function definition;
355         never used.
356         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
357
358         * tree.c (virtual_member): Delete function definition; never used.
359         * cp-tree.h (virtual_member): Delete decl.
360
361 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
362
363         * typeck.c (build_component_ref): Handle getting vbase pointers
364         out of complex multiple inheritance better.
365
366 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
367
368         * typeck.c (build_object_ref): Make sure we use the real type, not
369         any reference type.
370
371 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
372
373         * tree.c (build_exception_variant): Don't create new types if we
374         don't have to, also build new types on the right obstack.
375
376 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
377
378         * decl.c (store_bindings): Split out from push_to_top_level.
379         (push_to_top_level): Call it for b->type_shadowed on class binding
380         levels.
381
382 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
383
384         * search.c (expand_upcast_fixups): Fix so that offsets stored in
385         vbase_offsets are always right.  Fixes a problem where virtual base
386         upcasting and downcasting could be wrong during conversions on this
387         during virtual function dispatch at ctor/dtor time when dynamic
388         vtable fixups for deltas are needed.  This only sounds easier than
389         it is.  :-)
390         (fixup_virtual_upcast_offsets): Change to reflect new calling
391         convention for expand_upcast_fixups.
392
393 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
394
395         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
396         check that it's usable as the bitfield width.
397
398 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
399
400         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
401         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
402         only ever used for functions in it.
403
404 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
405
406         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
407         (nested_type): Ditto.
408         (nested_name_specifier): Use lastiddecl.
409
410         * decl.c (grokdeclarator): Adjust accordingly.
411         * init.c (expand_member_init): Ditto.
412         * parse.y (base_class): Ditto.
413         * typeck2.c (build_functional_cast): Ditto.
414
415         * typeck2.c (build_functional_cast): Fill in name after we've
416         checked for non-aggr type.
417
418 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
419
420         * decl2.c (warn_pointer_arith): Default to on.
421
422 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
423
424         * lex.c (is_rid): New function.
425         * decl.c (grokdeclarator): Diagnose reserved words used as
426         declarator-ids.
427
428 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
429
430         * tree.c (get_decl_list): Don't lose cv-quals.
431
432         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
433         typespecs used as declarator-ids.
434
435 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
436
437         * decl.c (poplevel): When poping a level, don't give a warning for
438         any subblocks that already exist.
439
440 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
441
442         * typeck.c (build_object_ref): Finish what I started.
443
444         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
445
446         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
447
448         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
449         scope.
450
451 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
452
453         * decl.c (xref_tag): Handle passing a type in directly.
454
455         * parse.y (qualified_type_name): Pull out the type.
456         (nested_type): Ditto.
457         Take types directly instead of as identifiers.
458         * call.c (build_scoped_method_call): Take types directly instead of
459         as identifiers.
460         * decl.c (xref_basetypes): Ditto.
461         * init.c (expand_member_init): Ditto.
462         (build_member_call): Ditto.
463         (build_offset_ref): Ditto.
464         * typeck2.c (build_scoped_ref): Ditto, remove bogus code.
465         * method.c (do_build_assign_ref): Ditto.
466         * decl.c (grokdeclarator): Handle a type appearing as the
467         declarator-id for constructors.
468         * method.c (do_build_copy_constructor): current_base_init_list now
469         uses the types directly, not their names.
470         * init.c (sort_base_init): Ditto.
471         (expand_member_init): Ditto.
472         * init.c (is_aggr_type): New function, like is_aggr_typedef.
473
474 Mon Jan 15 08:45:01 1996  Jeffrey A Law  (law@cygnus.com)
475
476         * tree.c (layout_basetypes): Call build_lang_field_decl instead
477         of build_lang_decl if first arg is a FIELD_DECL.
478         (tree_copy_lang_decl_for_deferred_output): Reverse test for when
479         to copy DECL_MAIN_VARIANT and DECL_CHAIN.
480
481 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
482
483         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
484         non-empty.
485         * except.c (expand_start_catch_block): Set TREE_USED to avoid
486         warnings about the catch handler.
487
488 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
489
490         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
491         expand_target_expr.
492
493 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
494
495         Fix access control to use trees rather than integers.
496         * class.c (access_{default, public, protected, private,
497         default_virtual, public_virtual, private_virtual}_node): Add
498         definitions.
499         (init_class_processing): Do creation of those nodes.
500         * cp-tree.h (access_type): Delete enum decl.
501         (access_{default, public, protected, private, default_virtual,
502         public_virtual, private_virtual}_node): Add decls.
503         (compute_access): Change return type.
504         * search.c (compute_access): Have tree return type, instead of enum.
505         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
506         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
507         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
508         * parse.y (VISSPEC): Make ttype rather than itype.
509         (base_class_access_list): Likewise.
510         * *.[cy]: Change all refs of `access_public' to `access_public_node',
511         etc.
512         * call.c (build_method_call): Make ACCESS be a tree.
513         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
514         * cvt.c (convert_to_aggr): Likewise.
515         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
516         Likewise.
517         * method.c (hack_identifier): Likewise.
518         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
519
520 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
521
522         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
523         frontend, and make it more consistent with respect to
524         warn_pointer_arith.
525
526 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
527
528         * decl.c (pushdecl): Check for duplicate parameter names.
529
530 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
531
532         * decl.c (expand_static_init): Call assemble_external for atexit.
533
534 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
535
536         * except.c (do_unwind): Remove some generated dead code.
537         (eh_outer_context): New routine, factor out some common code from
538         expand_builtin_throw and end_eh_unwinder.  Add code to do return
539         address masking for the PA.
540         (expand_builtin_throw): Use eh_outer_context instead of open coding
541         it here.
542         (end_eh_unwinder): Ditto.
543
544 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
545
546         * except.c (expand_throw): Call assemble_external for __empty, if we
547         use it.
548
549 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
550
551         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
552         NORMAL_RETURN_ADDR_OFFSET.
553         (end_eh_unwinder): Ditto.
554
555 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
556
557         * gc.c (build_dynamic_cast): Make sure we don't cast away const
558         when dealing with references, and make sure we handle dynamic
559         casting to a cv qualified reference.
560
561 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
562
563         * except.c (struct eh_context): New structure top hold eh context
564         information.
565         (push_eh_context): New routine.
566         (pop_eh_context): Ditto.
567         * decl.c (push_cp_function_context): Use them.
568         (pop_cp_function_context): Ditto.
569
570 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
571
572         * decl2.c (finish_file): Also prune uninteresting functions in the
573         inline emission loop.
574
575 Wed Dec 20 02:32:07 1995  Jeffrey A Law  (law@cygnus.com)
576
577         * sig.c (build_signature_table_constructor): Mark functions
578         in the signature as referenced.
579
580 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
581
582         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
583         the inline emission stuff.
584
585 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
586
587         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
588         weak symbols.   
589         * lang-options.h: Add -f{no-,}weak.
590         * decl.c (init_decl_processing): If the target does not support weak
591         symbols, don't use them.
592         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
593
594 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
595
596         * init.c (expand_member_init): warning for base init after members.
597
598 Sun Dec 17 22:06:56 1995  Jeffrey A Law  (law@cygnus.com)
599
600         * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
601         CONST_DECLs correctly.
602
603 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
604
605         * cvt.c (build_expr_type_conversion): Don't convert to a reference
606         type.
607
608 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
609
610         * method.c (report_type_mismatch): Improve wording for volatile
611         mismatches.
612
613 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
614
615         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
616         expand_assignment, as the later doesn't handle things that have
617         copy constructors well.  The compiler would do bitwise copying,
618         instead of ctor calling in some cases.
619
620 Wed Dec 13 17:05:54 PST 1995  Paul Eggert  <eggert@twinsun.com>
621
622         * g++.c (my_strerror): Return "cannot access" if errno is 0.
623         (pfatal_with_name, perror_exec): Don't assume that
624         the returned value from my_strerror contains no '%'s.
625         (concat): Remove.
626         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
627
628 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
629
630         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
631         TYPE_METHODS/TREE_CHAIN mean what they used to. 
632         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
633         instead of TYPE_METHODS.
634         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
635         * tree.c (tree_copy_lang_decl_for_deferred_output): Ditto.
636         * cp-tree.h (CLASSTYPE_METHODS): Lose.
637         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
638         TYPE_METHODS.
639         (struct lang_decl): Lose next_method field.
640         (DECL_NEXT_METHOD): Lose.
641         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
642         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
643         anymore.
644         (finish_struct_methods): Don't mess with the TREE_CHAINs in
645         fn_fields.
646
647         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
648         vector.
649
650         * call.c (build_method_call): Synthesize here even when not inlining.
651         * typeck.c (build_function_call_real): Ditto.
652
653 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
654
655         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
656         == DBX_DEBUG, call dbxout_start_new_source_file and
657         dbxout_resume_previous_source_file when appropriate.
658
659 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
660
661         * except.c (start_anon_func): Push to the top level.
662         (end_anon_func): Pop from the top level.
663
664 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
665
666         * cp-tree.h (build_cleanup): New routine to build cleanups.
667         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
668         call at ctor time and use atexit to run it later.
669         * decl2.c (build_cleanup): New routine, taken from finish_file.
670         (finish_file): Use build_cleanup instead, and don't put function
671         local statics in global dtor list.
672         
673 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
674
675         * except.c (expand_throw): Ensure that we have cleanups, if we try
676         and expand cleanups.
677
678 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
679
680         * except.c (expand_throw): Add logic to manage dynamic cleanups for
681         the EH object.
682         (expand_end_catch_block): Use the magic of expand_goto, instead of
683         emit_jump so that we get the cleanup for any catch clause parameter
684         and the cleanup for the exception object.  Update to reflect label
685         changes.
686         (push_eh_cleanup): New routine to register a cleanup for an
687         exception object.
688         (empty_fndecl): Used to default cleanup actions to
689         nothing.
690         (init_exception_processing): Setup empty_fndecl.  Setup
691         saved_cleanup.
692         (expand_start_catch_block): Update to reflect label changes.  Call
693         push_eh_object to register the cleanup for the EH object.
694         (start_anon_func): New routine to start building lambda expressions
695         from trees.
696         (end_anon_func): New routine to end them.
697         (struct labelNode): Change so that we can use tree labels, or rtx
698         labels.
699         (saved_cleanup): Object to check for dynamic cleanups for the
700         exception handling object.
701         (push_label_entry): Change so that we can use tree labels, or rtx
702         labels.
703         (pop_label_entry): Ditto.
704         (top_label_entry): Ditto.
705         (expand_start_all_catch): Use tree label instead of rtx label, so
706         that we can get the magic of expand_goto.
707         (expand_end_all_catch): Update to reflect label changes.
708
709         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
710         use UNSAVE_EXPRs.
711         typeck.c (get_member_function_from_ptrfunc): Remove remnants of
712         building_cleanup logic, as we now use UNSAVE_EXPRs.
713         * cp-tree.h (unsave_expr): Declare it.
714         * decl.c (building_cleanup): Remove.
715         (maybe_build_cleanup): Remove building_cleanup logic, and use
716         UNSAVE_EXPR instead.
717
718 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
719
720         * gc.c (build_t_desc): Update error message to say <typeinfo>.
721
722 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
723
724         * decl.c (pushdecl): Only warn about shadowing a local variable if
725         warn_shadow is true.
726
727 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
728
729         * typeck.c (build_binary_op_nodefault): Added warning about
730         comparisons between different enum types with -Wall, unless
731         -fenum-int-equiv set.
732
733 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
734
735         * class.c (finish_struct_1): Skip down to the inner type in
736         multidimensional arrays.  Ensures ctors will be made for types that
737         need constructing.
738
739 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
740
741         * decl.c (last_dtor_insn): New to track the last compiler generated
742         insn in a dtor.
743         (store_parm_decls): Set it.
744         (finish_function): Use it to see if the dtor is empty.  Avoid doing
745         vtable setup all the time, if we can.
746         (struct cp_function): Add last_dtor_insn.
747         (push_cp_function_context): Save it.
748         (pop_cp_function_context): Restore it.
749
750 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
751
752         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
753         warnings.
754
755 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
756
757         * typeck.c (expand_target_expr): Make sure targets get put into the
758         current temp_slot_level, so that the free_temp_slots call will reuse
759         them.
760
761 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
762
763         * class.c (finish_struct_1): Delay delta fixups for virtual bases
764         until after we have done the hard virtuals, to avoid a bogus `every
765         virtual function must have a unique final overrider' for virtual
766         functions that are only overridden by hard virtuals.
767
768 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
769
770         * pt.c (do_function_instantiation): Don't try to find a file-scope
771         template for a member function.
772
773 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
774
775         * g++.c (main): Add handling of -nodefaultlibs.
776
777 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
778
779         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
780         distinguish between direct bindings of reference variables, and
781         indirect bindings of reference variables.
782         * cvt.c (build_up_reference): Use it.
783         * typeck.c (convert_arguments): Use it to indicate this is an
784         indirect binding.
785         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
786         as they are unused.
787         (expand_static_init): Diotto.
788         (cplus_expand_expr_stmt): Ditto.
789         * decl2.c (finish_file): Ditto.
790         * init.c (perform_member_init): Ditto.
791         (emit_base_init): Ditto.
792         (expand_aggr_vbase_init_1): Ditto.
793
794 Fri Nov 10 09:19:31 1995  Jeffrey A Law  (law@cygnus.com)
795
796         * tree.c (tree_copy_lang_decl_for_deferred_output): Handle
797         copying of DECL_ARGUMENTS field.
798         (tree_copy_lang_type_for_deferred_output): Handle disgusting
799         re-use of TYPE_LANG_SPECIFIC for pointer to member function
800         type nodes.
801
802 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
803
804         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
805         get a DECL_LANG_SPECIFIC node.
806         * cp-tree.h (lang_decl_flags): Add new member `level'.
807         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
808         decl_flags level member.
809
810 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
811
812         * call.c (build_method_call): Make sure instance has a
813         TYPE_LANG_SPECIFIC node before we dive into it.  
814
815 Sat Nov  4 20:01:52 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
816
817         * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
818
819 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
820
821         * decl.c (duplicate_decls): When smashing decls, smash staticness in
822         the usual way.
823
824 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
825
826         * decl.c (poplevel): Handle the merging of subblocks of cleanups
827         when finishing blocks that have already been created (usually due to
828         the fixup goto code).  Fixes bad debugging information.
829
830 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
831
832         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
833         that's not a list of overloaded functions.
834
835 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
836
837         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
838         before trying to use DECL_ABSTRACT_VIRTUAL_P.
839
840 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
841
842         * decl2.c (mark_used): New function for hooking into setting of
843         TREE_USED on decls.
844         * call.c (build_method_call): Use it.
845         * class.c (instantiate_type): Ditto.
846         * init.c (build_offset_ref): Ditto.  Don't call assemble_external
847         for all like-named functions.
848         * method.c (hack_identifier): Ditto.
849         (emit_thunk): Don't call assemble_external.
850         (make_thunk): Create thunk as a FUNCTION_DECL so that it
851         gets the right mode and ENCODE_SECTION_INFO works.
852         
853         * parse.y: Use mark_used.  Pass operator names to do_identifier.
854         * lex.c (do_identifier): Handle operator names.
855
856         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
857
858 Thu Oct 26 20:58:59 1995  Jeffrey A Law  (law@cygnus.com)
859
860         * cp/tree.c (tree_copy_lang_decl_for_deferred_output): Handle
861         FIELD_DECLs and VAR_DECLs correctly.
862
863 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
864
865         * errfn.c: Include stdio.h.
866         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
867
868 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
869
870         * typeck2.c (digest_init): Always convert initializers to the
871         right type.
872
873 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
874
875         * init.c (member_init_ok_or_else): Don't allow member initializers
876         for indirect members, as it is invalid.
877
878 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
879
880         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
881
882 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
883
884         * parse.y (for.init.statement): Catch compound statements inside for
885         initializations, if we're being pedantic.
886
887 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
888
889         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
890         looking for.
891
892 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
893
894         * error.c (dump_expr): Don't core dump when a boolean expression is
895         used as a default argument.
896
897 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
898
899         * class.c (finish_struct_bits): Check aggregate_value_p instead of
900         RETURN_IN_MEMORY.
901
902 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
903
904         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
905         BLKmode type that would otherwise be returned in registers.
906
907 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
908
909         * g++.c (WITHLIBC): New macro.
910         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
911         saw_libc and pass it at the end if it was set.
912
913 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
914
915         * parse.y (fn.def1): Call split_specs_attrs in
916         declmods notype_declarator case.
917
918 Sun Nov 26 14:47:42 1995  Richard Kenner  <kenner@mole.gnu.ai.mit.edu>
919
920         * Version 2.7.2 released.
921
922 Mon Nov 20 14:05:00 1995  Mike Stump  <mrs@cygnus.com>
923
924         * g++.c (pfatal_with_name): Add missing third argument to concat.
925
926 Thu Oct 26 13:59:54 1995  Mike Stump  <mrs@cygnus.com>
927
928         * init.c (expand_aggr_init): Handle cv qualifiers on the object's
929         type.
930
931 Sat Nov 11 08:25:55 1995  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
932
933         * Version 2.7.1 released.
934
935 Thu Nov  2 17:02:47 1995  Jason Merrill  <jason@yorick.cygnus.com>
936
937         * call.c (convert_harshness): Handle references to arrays.
938
939 Fri Oct 27 14:20:21 1995  Jason Merrill  <jason@yorick.cygnus.com>
940
941         * typeck.c (comp_target_types): Check multi-level pointer
942         conversions in both directions.
943
944 Tue Oct 17 21:39:05 1995  Jason Merrill  <jason@yorick.cygnus.com>
945
946         * parse.y (explicit_instantiation): Fix 'extern template' with no
947         return type.
948
949 Mon Oct 16 14:35:20 1995  Jason Merrill  <jason@yorick.cygnus.com>
950
951         * parse.y (explicit_instantiation): Support automatic instantiation
952         of constructors.
953         (named_class_head_*): Support out-of-class definition of nested
954         types.
955
956 Wed Oct 11 12:20:56 1995  Mike Stump  <mrs@cygnus.com>
957
958         * search.c (envelope_add_decl): New routine.  Fix so that
959         methods are hidden in the same way that other members are.
960         (dfs_pushdecls): Cleanup and move functionality out of line,
961         into envelope_add_decl. 
962
963 Tue Oct 10 15:46:01 1995  Mike Stump  <mrs@cygnus.com>
964
965         * typeck.c (mark_addressable): Only call assemble_external if we
966         have started the output file.
967
968 Tue Oct 10 11:27:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
969
970         * decl.c (start_function): Fix earlier cv-quals change.
971
972 Mon Oct  9 23:53:05 1995  Mike Stump  <mrs@cygnus.com>
973
974         * parse.y (complex_direct_notype_declarator): Only push the class if
975         we are not already in the class.
976
977 Mon Oct  9 11:22:03 1995  Doug Evans  <dje@canuck.cygnus.com>
978
979         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
980         Update olddecl's attributes too.
981         (grokdeclarator): #if 0 out call to build_decl_attribute_variant.
982         * typeck.c (common_type): Call merge_machine_type_attributes.
983
984 Fri Oct  6 14:44:27 1995  Mike Stump  <mrs@cygnus.com>
985
986         * typeck.c (mark_addressable): Add missing call to
987         assemble_external.
988
989 Wed Oct  4 22:05:23 1995  Jeff Law  (law@hurl.cygnus.com
990
991         * cp/decl.c (deplicate_decls): Merge in deferred output
992         status for variables.
993         * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New
994         function to copy the g++ specific parts of a DECL node.
995         (tree_copy_lang_type_for_deferred_output): Similarly for
996         TYPE nodes.
997
998 Wed Oct  4 15:06:39 1995  Mike Stump  <mrs@cygnus.com>
999
1000         * decl.c (store_parm_decls): Make sure the unwinder start comes
1001         before the exception specification start.
1002         * except.c (expand_exception_blocks): Make sure the unwinder end
1003         comes after the terminate protected catch clause region and after
1004         the end of the exception specification region.
1005
1006 Wed Oct  4 12:47:02 1995  Jason Merrill  <jason@yorick.cygnus.com>
1007
1008         * lex.c (real_yylex): Fix identifier case for linemode.
1009         (handle_sysv_pragma): Don't abort when we see a pragma we don't
1010         recognize.
1011
1012 Tue Oct  3 14:09:46 1995  Mike Stump  <mrs@cygnus.com>
1013
1014         * decl.c (store_parm_decls): Add a call to start_eh_unwinder.
1015         * except.c (init_exception_processing): __throw doesn't take any
1016         arguments.
1017         (expand_builtin_throw): Ditto.  Always use Pmode, instead of SImode
1018         for all pointers.  Use expand_builtin_return_addr to unwind the
1019         first level off the stack.
1020         (do_unwind): Always use Pmode, instead of SImode for all pointers.
1021         (expand_exception_blocks): Add a call to end_eh_unwinder.
1022         (start_eh_unwinder, end_eh_unwinder): New routines to build machine
1023         independent stack unwinders for function/method calls.
1024         
1025 Mon Oct  2 17:20:42 1995  Mike Stump  <mrs@cygnus.com>
1026
1027         * tree.c (unsave_expr_now): Make sure we process the argument list
1028         of any called functions.  Fixes incorrect code generation for
1029         cleanups.
1030
1031 Mon Oct  2 13:04:16 1995  Mike Stump  <mrs@cygnus.com>
1032
1033         * typeck.c (get_member_function_from_ptrfunc): Save function if it
1034         needs it.  Cures core dump on things like (this->*(f()))().
1035
1036 Sat Sep 23 22:51:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1037
1038         * decl.c (start_function): Conform to gcc cv-quals convention (no
1039         expression has a cv-qualified type) in RESULT_DECLs.
1040         * method.c (make_thunk): Ditto.
1041
1042 Fri Sep 22 10:21:13 1995  Mike Stump  <mrs@cygnus.com>
1043
1044         * decl.c (pushtag): Add in the namespace name for the tag.
1045
1046 Thu Sep 21 13:11:13 1995  Mike Stump  <mrs@cygnus.com>
1047
1048         * parse.y (maybe_base_class_list, base_class_list, base_class,
1049         base_class_access_list): Make sure we see the typenames for base
1050         classes.
1051         * lex.c (see_typename): Instead of failing to see a typename when
1052         there is no next token, perfer a typename, and get the next token.
1053
1054 Wed Sep 20 12:35:27 1995  Michael Meissner  <meissner@cygnus.com>
1055
1056         * decl.c (init_decl_processing): Add __builtin_expect.
1057
1058 Tue Sep 19 16:48:11 1995  Mike Stump  <mrs@cygnus.com>
1059
1060         * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to
1061         or from pointer to member functions, they must all be handled before
1062         this point.
1063
1064 Fri Sep 15 17:14:47 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1065
1066         * init.c (resolve_offset_ref): Fix wording of non-static member
1067         being referenced as a static.
1068
1069 Fri Sep 15 12:39:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1070
1071         * typeck.c (build_indirect_ref): Only bash pointer if we actually
1072         call build_expr_type_conversion.
1073
1074 Thu Sep 14 18:24:56 1995  Jason Merrill  <jason@deneb.cygnus.com>
1075
1076         * cvt.c (build_expr_type_conversion): Handle conversion from
1077         reference.
1078         * typeck.c (build_indirect_ref): Avoid infinite recursion.
1079
1080 Thu Sep 14 17:23:28 1995  Mike Stump  <mrs@cygnus.com>
1081
1082         * decl.c (expand_start_early_try_stmts): New routine to start a try
1083         block at the start of the function, for function-try-blocks.
1084         * cp-tree.h (expand_start_early_try_stmts): Declare it.
1085         * parse.y (function_try_block): Use it, instead of doing it here, as
1086         we don't want to include rtl.h here, as that conflicts with RETURN
1087         in the parser.
1088
1089 Wed Sep 13 18:32:24 1995  Mike Stump  <mrs@cygnus.com>
1090
1091         * lex.c (reinit_parse_for_block): Support saving inline
1092         function-try-blocks, uses peekyylex.
1093         * parse.y (eat_saved_input): New rule, permit the parser to see that
1094         END_OF_SAVED_INPUT is ok, as it can see this when parsing the
1095         handlers of a function-try-block.
1096         (fndef): Use it.
1097         (component_decl): Make sure TRY and RETURN can come after fn.def2.
1098         * spew.c (peekyylex): New routine to peek at what will come next.
1099
1100 Wed Sep 13 16:52:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1101
1102         * typeck.c (comptypes): Tighten up comparisons of template type
1103         parms.
1104
1105         * decl.c (duplicate_decls): Turn off whining about virtual functions
1106         redeclared inline for now.
1107
1108 Wed Sep 13 11:13:40 1995  Mike Stump  <mrs@cygnus.com>
1109
1110         * decl.c (store_in_parms): New routine to put things before we
1111         put base inits.
1112         * cp-tree.h (store_in_parms): Declare it.
1113         * decl.c (store_parm_decls): Use it to makr sure the starting of the
1114         eh spec comes before base inits.
1115         (finish_function): Use sequences instead of the obsolete
1116         reorder_insns.
1117         * parse.y (fndef): Enhance readability and maintainability.  Update
1118         to include function_try_block syntax.
1119         (function_try_block): Add.
1120
1121 Tue Sep 12 17:43:07 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1122
1123         * call.c (convert_harshness): Use comptypes, not ==, to check if
1124         TYPE and PARMTYPE are equivalent on a function type.
1125
1126 Tue Sep 12 17:31:33 1995  Douglas Rupp  (drupp@cs.washington.edu)
1127
1128         * Make-lang.in (cc1plus) : Removed unnecessary $(exeext).
1129
1130 Mon Sep 11 23:24:07 1995  Mike Stump  <mrs@cygnus.com>
1131
1132         * except.c (expand_throw): Never allocate storage for thrown pointer
1133         to objects.
1134
1135 Mon Sep 11 19:36:45 1995  Mike Stump  <mrs@cygnus.com>
1136
1137         * except.c (expand_start_catch_block): Pointers to objects come
1138         back from catch matching already dereferenced, don't dereference
1139         again.
1140
1141 Mon Sep 11 15:46:28 1995  Mike Stump  <mrs@cygnus.com>
1142
1143         * except.c (expand_throw): Only decay the throw expression, don't do
1144         any default conversions.  This is so that one can throw and catch
1145         characters, and not have them match integers.
1146
1147 Mon Sep 11 13:46:45 1995  Mike Stump  <mrs@cygnus.com>
1148
1149         * error.c (dump_aggr_type): Deal with anonymous unions that don't
1150         have a TYPE_NAME.
1151
1152 Fri Sep  8 20:40:27 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1153
1154         * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex.
1155
1156 Fri Sep  8 15:51:41 1995  Mike Stump  <mrs@cygnus.com>
1157
1158         * except.c (expand_end_eh_spec): Handle empty EH specifications.
1159
1160 Fri Sep  8 15:27:22 1995  Mike Stump  <mrs@cygnus.com>
1161
1162         * cp-tree.h (expand_start_eh_spec): Declare new routine.
1163         (expand_end_eh_spec): Ditto.
1164         * decl.c (store_parm_decls): Call expand_start_eh_spec to process
1165         exception specifications.
1166         * except.c (expand_leftover_cleanups): Remove unused parameter.
1167         (expand_end_catch_block): Ditto.
1168         (expand_exception_blocks): Ditto.
1169         (expand_start_eh_spec): New routine to mark the start of an
1170         exception specification region.
1171         (expand_end_eh_spec): New routine to mark the end of an exception
1172         specification region.
1173         (expand_exception_blocks): Call expand_end_eh_spec to process
1174         exception specifications.
1175
1176 Fri Sep  8 14:40:48 1995  Per Bothner  <bothner@kalessin.cygnus.com>
1177
1178         * lex.c (do_identifier):  Use global binding in preference of
1179         dead for local variable.
1180
1181 Wed Sep  6 19:32:59 1995  Mike Stump  <mrs@cygnus.com>
1182
1183         * cp-tree.h (build_exception_variant): Remove used first argument.
1184         * decl.c (duplicate_decls): Ditto.
1185         (grokfndecl): Ditto.
1186         (revert_static_member_fn): Ditto.
1187         * decl2.c (grok_method_quals): Ditto.
1188         * tree.c (build_exception_variant): Ditto.
1189         * typeck.c (common_type): Ditto.
1190         * decl2.c (grokclassfn): After changing the type, call
1191         build_exception_variant, if necessary.
1192
1193 Tue Sep  5 15:56:27 1995  Mike Stump  <mrs@cygnus.com>
1194
1195         * except.c (expand_throw): Run cleanups for the throw expression.
1196
1197 Wed Aug 30 15:24:38 1995  Stephen L. Favor  (sfavor@tigger.intecom.com)
1198
1199         * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond
1200         the store_parm_decls call which does initialization in the emit_*
1201         code concerning label numbering.
1202         
1203 Thu Aug 31 09:01:07 1995  Mike Stump  <mrs@cygnus.com>
1204
1205         * except.c (expand_internal_throw): Let the frontend be responsible
1206         for managing all frontend EH parameters, the backend routine only
1207         needs to deal with backend values.  type and value are no longer
1208         passed to __throw.
1209         (init_exception_processing): Ditto.
1210         (expand_start_all_catch): Ditto.
1211         (expand_end_all_catch): Ditto.
1212         (expand_leftover_cleanups): Ditto.
1213         (expand_end_catch_block): Ditto.
1214         (expand_builtin_throw): Ditto.
1215         (expand_throw): Ditto.
1216         
1217 Tue Aug 29 15:04:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1218
1219         * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context
1220         for a decl.
1221         * decl.c (cp_finish_decl): Use it.
1222
1223 Tue Aug 29 10:30:27 1995  Mike Stump  <mrs@cygnus.com>
1224
1225         * except.c (expand_internal_throw): Oops, almost forgot type and
1226         value are now trees.
1227
1228 Mon Aug 28 17:57:45 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1229
1230         Fix the attribute handling to make sure they get noted before we
1231         create the function's RTL, in case they can affect that.
1232         * decl.c (grokfndecl): New arg ATTRLIST.  Run
1233         cplus_decl_attributes before creating the decl's rtl.
1234         (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl.
1235         (shadow_tag, groktypename, start_decl, start_method): Pass a
1236         NULL_TREE to grokdeclarator's new last arg.
1237         * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator.
1238         (grokbitfield, grokoptypename): Pass a NULL_TREE to
1239         grokdeclarator's new last arg.
1240         * except.c (expand_start_catch_block): Likewise.
1241         * pt.c (process_template_parm, end_template_decl,
1242         do_function_instantiation): Likewise.
1243         * cp-tree.h (grokfield): Add arg.
1244         (grokdeclarator): Move the prototype from here...
1245         * decl.h: ...to here.
1246         * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield
1247         ATTRLIST argument.
1248         * parse.y: Create a list for the grokfield arg where appropriate,
1249         and pass it down instead of calling cplus_decl_attributes.
1250
1251 Mon Aug 28 15:07:24 1995  Mike Stump  <mrs@cygnus.com>
1252
1253         * except.c: Always allow turning on exception handling.  Allow cross
1254         compilations to use EH.
1255
1256 Thu Aug 24 17:39:24 1995  Mike Stump  <mrs@cygnus.com>
1257
1258         * except.c (saved_pc, saved_throw_type, saved_throw_value): Use
1259         trees, instead of rtxs, and don't depend on using special machine
1260         dependent registers.
1261         (expand_internal_throw): Ditto.
1262         (init_exception_processing): Ditto.
1263         (expand_start_all_catch): Ditto.
1264         (expand_end_all_catch): Ditto.
1265         (expand_start_catch_block): Ditto.
1266         (expand_leftover_cleanups): Ditto.
1267         (expand_end_catch_block): Ditto.
1268         (expand_builtin_throw): Ditto.
1269         (expand_throw): Ditto.
1270
1271 Wed Aug 23 17:25:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1272
1273         * cvt.c (build_expr_type_conversion): Handle conversions to
1274         reference types.
1275
1276 Wed Aug 23 15:33:59 1995  Mike Stump  <mrs@cygnus.com>
1277
1278         * except.c (do_unwind): Work around backend bug with -fpic.
1279
1280 Tue Aug 22 17:20:07 1995  Per Bothner  <bothner@kalessin.cygnus.com>
1281
1282         * decl2.c (flag_new_for_scope):  Add a new mode that follows ANSI
1283         for-scoping, but supports (and warns about) old programs.
1284         Make the new mode (with value 1) the default.
1285         (lang_f_options):  The on-value for flag_new_for_scope is now 2.
1286         * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros
1287         (DECL_SHADOWED_FOR_VAR):  Likewise.
1288         * decl.c (struct binding_level):  New fields dead_vars_from_for
1289         and is_for_scope.
1290         (note_level_for_for):  New function.
1291         (poplevel):  Special processing if is_for_scope.
1292         (pushdecl):  Warn if for-scope variable shadows local.
1293         * lex.c (do_identifier):  Handle old (non-ANSI) for scoping,
1294         and warn if conflicts.
1295         * parse.y (FOR):  Call note_level_for_for.
1296
1297 Mon Aug 21 10:28:31 1995  Jason Merrill  <jason@deneb.cygnus.com>
1298
1299         * decl2.c (import_export_inline): Class interface hackery does not
1300         apply to synthesized methods.
1301
1302 Sun Aug 20 16:29:00 1995  Mike Stump  <mrs@cygnus.com>
1303
1304         * search.c (virtual_context): Find the right context more often.
1305         Solves a `recoverable compiler error, fixups for virtual function'
1306         problem.
1307
1308 Sun Aug 20 13:53:24 1995  Mike Stump  <mrs@cygnus.com>
1309
1310         * except.c (expand_start_all_catch): Ensure that we always transfer
1311         control to the right EH handler, by rethrowing the end label on the
1312         region, instead of hoping we are nested and falling through.
1313         (expand_leftover_cleanups): Ditto.
1314         (end_protect): Since we now rethrow the end label, put a
1315         nop after it, so that outer regions are recognized.
1316         * init.c (build_vec_delete_1): New routine to handle most of vector
1317         deleting, all code moved here from build_vec_delete.
1318         (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real
1319         work.
1320         (expand_vec_init): If the array needs partial destructing, setup an
1321         EH region to handle it.
1322         (build_vec_delete): Move lots of code to build_vec_delete_1, use
1323         build_vec_delete_1 to do the grunt work.
1324         
1325 Sat Aug 19 14:25:33 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1326
1327         Handle decl attributes properly for function definitions without
1328         previous attribute-loaded declarations.
1329         * decl.c (start_function): New arg ATTRS.  Add a call to
1330         cplus_decl_attributes with it before we create the RTL.
1331         * cp-tree.h (start_function): Update prototype.
1332         * parse.y (fn.def1): Pass ATTRS into start_function instead of
1333         trying to call cplus_decl_attributes too late.  Pass a NULL_TREE
1334         for other use.
1335         * decl2.c (finish_file): Pass NULL_TREE as fourth arg to
1336         start_function.
1337         * method.c (synthesize_method): Likewise.
1338         * except.c (expand_builtin_throw): Likewise for start on __throw.
1339
1340 Sat Aug 19 13:36:08 1995  Mike Stump  <mrs@cygnus.com>
1341
1342         * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support.
1343         This changes -fvtable-thunks vtable layout, so a recompile will be
1344         necessary, if you use -fvtable-thunks.
1345         (get_vtable_entry): Use n, instead of i to be consistent with the
1346         rest of the compiler.
1347         (get_vtable_entry_n): Ditto.
1348         (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks
1349         are being used.
1350         (finish_struct_1): Ditto.
1351         (skip_rtti_stuff): New routine to collapse similar code from many
1352         different parts of the compiler.  I think I got them all.
1353         (modify_one_vtable): Use it.
1354         (fixup_vtable_deltas1): Ditto.
1355         (override_one_vtable): Ditto.
1356         * decl2.c (mark_vtable_entries): Ditto.
1357         * tree.c (debug_binfo): Ditto.
1358         * search.c (expand_upcast_fixups): Ditto.
1359         (get_abstract_virtuals_1): Ditto.  Use virtuals, instead of tmp to
1360         consistent with the rest of the compiler.
1361         (get_abstract_virtuals): Ditto.
1362         * cp-tree.h (skip_rtti_stuff): New routine, declare it.
1363         * gc.c (build_headof): Support -fvtable-thunk and -frtti together.
1364         (build_typeid): Ditto.
1365         (build_classof): Remove old style way of doing rtti.  Remove support
1366         for `classof' and `headof'.
1367         * gxx.gperf: Ditto.
1368         * hash.h: Ditto.
1369         * parse.y: Ditto.
1370
1371 Fri Aug 18 17:31:58 1995  Jason Merrill  <jason@deneb.cygnus.com>
1372
1373         * decl.c (start_function): Clear ctor_label and dtor_label.
1374
1375         * class.c (finish_struct_1): Fix handling of access decls.
1376
1377 Tue Aug 15 19:21:54 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1378
1379         * class.c (finish_struct): Only do minimal processing here, so it
1380         can be used for class template definitions, as well.
1381         (finish_struct_1): New function with the rest of the code.
1382
1383 Tue Aug 15 09:46:16 1995  Mike Stump  <mrs@cygnus.com>
1384
1385         * class.c (prepare_fresh_vtable): On second though, always build the
1386         offset (see Aug 10 change), unless -fvtable-thunks is given.  It
1387         does this by calling the new routine set_rtti_entry.
1388         (finish_struct): Ditto.
1389         (set_rtti_entry): New routine to update the rtti information at the
1390         start of the vtable.
1391
1392 Mon Aug 14 12:21:22 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1393
1394         * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor
1395         if it's declared in the C++ language spec.
1396         (dump_function_decl): Likewise.
1397         (dump_function_name): Likewise.
1398         (ident_fndecl): Make sure we got something back from lookup_name.
1399         * decl.c (start_function): Likewise.
1400
1401 Fri Aug 11 16:52:15 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1402
1403         * call.c (build_method_call): Don't call build_new when calling a
1404         constructor without an instance.
1405
1406 Thu Aug 10 20:00:17 1995  Mike Stump  <mrs@cygnus.com>
1407
1408         * class.c (prepare_fresh_vtable): Always build the offset to the
1409         complete object, as it doesn't cost much.  This allows dynamic_cast
1410         to void * to work when -frtti isn't given.
1411         (finish_struct): Ditto.
1412
1413 Thu Aug 10 16:31:28 1995  Mike Stump  <mrs@cygnus.com>
1414
1415         * except.c (build_eh_type): Split out some functionality to new
1416         routine named build_eh_type_type.
1417         (build_eh_type_type): New routine.
1418         (expand_start_catch_block): Use build_eh_type_type, as we never want
1419         the dynamic type of the catch parameter, just the static type.
1420         Fixes core dumps when -frtti is used and one catchs pointers to
1421         classes.
1422
1423 Thu Aug 10 14:55:29 1995  Mike Stump  <mrs@cygnus.com>
1424
1425         * except.c (expand_builtin_throw): Since we now use normal calling
1426         conventions for __throw, we have to remove the first layer off the
1427         stack, so that the next context we search for handlers is the outer
1428         context instead of the context that had the call to __throw, if we
1429         don't immediately find the desired context.
1430
1431 Tue Aug  8 17:44:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1432
1433         * tree.c (cp_expand_decl_cleanup): Returns int, not tree.
1434         * cp-tree.h: Update.
1435
1436         * parse.y (template_type_parm): Add support for `typename'.
1437
1438 Tue Aug  8 12:06:31 1995  Mike Stump  <mrs@cygnus.com>
1439
1440         * except.c (expand_internal_throw): New internal routine to throw a
1441         value.
1442         (expand_end_all_catch, expand_leftover_cleanups): All throwers
1443         changed to use `expand_internal_throw' instead of jumping to throw
1444         label.
1445         (expand_end_catch_block, expand_throw): Ditto.
1446         (throw_label): Removed.
1447         (expand_builtin_throw): Changed so that EH parameters are passed by
1448         normal function call conventions.  Completes Aug 4th work.
1449
1450 Fri Aug  4 17:17:08 1995  Mike Stump  <mrs@cygnus.com>
1451
1452         * cp-tree.h (expand_builtin_throw): Declare it.
1453         * decl2.c (finish_file): Call expand_builtin_throw.
1454         * except.c (make_first_label): Remove.
1455         (init_exception_processing): Don't use a LABEL_REF for throw_label,
1456         instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in
1457         other functions that don't really appear in those functions.  This
1458         solves a problem where cc1plus consumed exponential amounts of
1459         memory when -Wall was used.
1460         (expand_end_all_catch, expand_leftover_cleanups,
1461         expand_end_catch_block, expand_throw): Change all uses of
1462         throw_label to match new style.
1463         (do_unwind): Rename parameter to inner_throw_label, as it is now
1464         different from throw_label.  Also, assume that our caller will wrap
1465         the passed label with a LABEL_REF, if needed.
1466         (expand_builtin_throw): Make external, change so that the generated
1467         throw is now a real function.
1468         (expand_exception_blocks): Never generate throw code inside another
1469         function.
1470
1471 Fri Aug  4 12:20:02 1995  Mike Stump  <mrs@cygnus.com>
1472
1473         * decl.c (grokdeclarator): Move checking of mutable const objects
1474         and mutable static objects down, as we might decide during parsing
1475         to unset staticp or constp (for example, when const is part of the
1476         object being pointed to).
1477
1478 Thu Aug  3 17:13:43 1995  Mike Stump  <mrs@cygnus.com>
1479
1480         * except.c (output_exception_table_entry): Enhance portability to
1481         weird machines.
1482         (emit_exception_table): Ditto.
1483
1484 Thu Aug  3 16:41:38 1995  Mike Stump  <mrs@cygnus.com>
1485
1486         * typeck.c (build_ptrmemfunc): Handle casting of pointer to
1487         non-virtual member functions.
1488
1489 Wed Aug  2 11:58:25 1995  Mike Stump  <mrs@cygnus.com>
1490
1491         * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T
1492         and const T all match.
1493
1494 Wed Aug  2 11:25:33 1995  Mike Stump  <mrs@cygnus.com>
1495
1496         * except.c (build_eh_type): Strip cv qualifiers so that const T&,
1497         T&, T and const T all match.
1498
1499 Tue Aug  1 14:20:16 1995  Mike Stump  <mrs@cygnus.com>
1500
1501         * except.c: Fix up comments, cleanup code and eliminate exceptNode,
1502         exceptStack, exceptstack, push_except_stmts, pop_except_stmts,
1503         new_except_stack, push_last_insn, pop_last_insn, insn_save_node and
1504         InsnSave.  Also, numerous speed improvements, and correctness
1505         improvements.  Double faulting in all situations should now be
1506         handled correctly.
1507         (expand_start_all_catch): Instead of having many terminate protected
1508         regions, just have one.
1509         (expand_start_catch_block): No longer have to protect
1510         false_label_rtx, as it isn't used for EH region marking.
1511         (expand_end_catch_block): Expand out EH cleanups here by using
1512         expand_leftover_cleanups.
1513         (expand_end_all_catch): Use sequences instead of playing with insn
1514         links directly.
1515         (expand_exception_blocks): Ditto.  Also protect all catch clauses
1516         with one terminate region.
1517
1518 Mon Jul 31 13:24:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1519
1520         * method.c (report_type_mismatch): Don't talk about an object
1521         parameter for non-methods.
1522
1523 Sun Jul 30 13:13:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1524
1525         * class.c (finish_struct): Catch private and protected members of
1526         anonymous unions here.
1527         * decl2.c (finish_anon_union): And here.
1528         * parse.y: Instead of here.
1529
1530         * errfn.c (ARGSLIST): Support passing four args.
1531         * error.c (cv_as_string): New function.
1532         (cp_printers): Add it.
1533         * call.c (build_method_call): Report 'const' at end of pseudo-decl.
1534
1535         * method.c (report_type_mismatch): Deal with a bad_arg of 0.
1536
1537         * init.c (expand_aggr_init): Handle volatile objects, too.
1538
1539 Sat Jul 29 13:42:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1540
1541         * decl.c (struct binding_level): Keep list of incomplete decls.
1542         (print_binding_level): Use list_length to count them.
1543         (pushdecl): Build up the list.
1544         (hack_incomplete_structures): Walk it and prune completed decls.
1545
1546 Fri Jul 28 15:26:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1547
1548         * typeck.c (comp_target_types): Don't check const and volatile for
1549         function types.
1550         (comp_ptr_ttypes_real): Ditto.
1551
1552 Thu Jul 27 15:40:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1553
1554         * typeck.c (comp_target_types): Fix.
1555
1556 Thu Jul 27 15:10:48 1995  Mike Stump  <mrs@cygnus.com>
1557
1558         * cp-tree.h (unsave_expr_now, build_unsave_expr,
1559         cp_expand_decl_cleanup): Declare new routines.
1560         * decl.c (cp_finish_decl, store_parm_decls,
1561         hack_incomplete_structures): Change all cals from
1562         expand_decl_cleanup to cp_expand_decl_cleanup.
1563         * gc.c (protect_value_from_gc): Ditto.
1564         * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs.
1565         * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR.
1566         (unsave_expr_now): Backend routine used by tree expander.
1567         (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to
1568         work around a limitation in the backend.  The backend uses the
1569         cleanups multiple times, on disjoint control flows, so we cannot
1570         pass unsaved SAVE_EXPRs to the backend.
1571         * tree.def (UNSAVE_EXPR): New tree code.
1572         * typeck.c (c_expand_return): Move goto/return code up inside
1573         conditional, as we don't always want to do this, we only want to do
1574         this when we don't otherwise finish with this control flow.
1575
1576 Thu Jul 27 10:38:43 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1577
1578         * parse.y (typespec): Only complain about typeof if we're not
1579         getting it from a system header.
1580
1581 Thu Jul 27 10:26:23 1995  Doug Evans  <dje@canuck.cygnus.com>
1582
1583         Clean up prefix attribute handling.
1584         * parse.y (reserved_declspecs): Link prefix attributes with declspecs.
1585         (declmods): Likewise.
1586         (all rules that reference typed_declspecs and declmods): Call
1587         split_specs_attrs or strip_attrs to separate declspecs and attrs.
1588         (lang_extdef): Delete resetting of prefix_attributes.
1589         (template_def, notype_declarator rule): Use NULL_TREE for
1590         prefix_attributes.
1591         (condition): Use NULL_TREE for prefix_attributes.
1592         (setattrs): Deleted.
1593         (nomods_initdcl0): Set prefix_attributes to NULL_TREE.
1594         (component_decl): Delete resetting of prefix_attributes.
1595         (component_decl_1, notype_components rule): Use NULL_TREE for
1596         prefix_attributes.
1597         (simple_stmt): Delete resetting of prefix_attributes.
1598
1599 Mon Jul 24 13:37:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1600
1601         * call.c (convert_harshness): Deal with reference conversions before
1602         others.  Actually do array->pointer decay.  Call comp_target_types
1603         with pointer types rather than their targets.
1604
1605         * typeck.c (comp_target_types): Avoid assigning D const * to B *.
1606
1607 Mon Jul 24 08:54:46 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1608
1609         * pt.c (to_be_restored): Move decl to global scope.
1610
1611 Sat Jul 22 12:22:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1612
1613         * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P.
1614
1615 Fri Jul 21 17:09:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1616
1617         * decl.c (grokdeclarator): Downgrade error about 'extern int A::i'
1618         to pedwarn.
1619
1620         * pt.c (instantiate_template): Also avoid instantiation if the
1621         function has already been declared to be a specialization.
1622
1623         * decl2.c (check_classfn): Ignore cname argument, and return the
1624         matching function.
1625
1626         * decl.c (start_decl): Handle declarations of member functions
1627         outside of the class (i.e. specialization declarations).
1628
1629 Thu Jul 20 10:34:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1630
1631         * class.c (finish_struct): Don't mess with the type of bitfields.
1632
1633         * various.c: s/TYPE_POINTER_TO/build_pointer_type/.
1634
1635 Thu Jul 20 01:43:10 1995  Mike Stump  <mrs@cygnus.com>
1636
1637         * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init
1638         is not a parameter list (TREE_LIST).
1639         (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set
1640         LOOKUP_NO_CONVERSION so that we don't allow two-level conversions,
1641         but don't set it otherwise.
1642
1643 Wed Jul 19 20:32:01 1995  Mike Stump  <mrs@cygnus.com>
1644
1645         * init.c (expand_default_init): Don't allow two-level conversions
1646         during construction.
1647
1648 Wed Jul 19 18:06:37 1995  Mike Stump  <mrs@cygnus.com>
1649
1650         * gc.c (build_headof): The type of dyncasting to a pointer to cv
1651         void, should be pointer to cv void.
1652
1653 Wed Jul 19 17:25:43 1995  Mike Stump  <mrs@cygnus.com>
1654
1655         * gc.c (build_dynamic_cast): Allow casting in const.
1656
1657 Wed Jul 19 16:34:27 1995  Mike Stump  <mrs@cygnus.com>
1658
1659         * typeck.c (build_const_cast): If we are passed error_mark_node,
1660         return it.
1661
1662 Wed Jul 19 15:24:48 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1663
1664         * class.c (push_nested_class): Make sure TYPE is non-nil.
1665
1666         * cvt.c (type_promotes_to): Watch for error_mark_node on the
1667         incoming TYPE.
1668
1669 Wed Jul 19 13:23:12 1995  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
1670
1671         * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME.
1672         (SIGTABLE_VB_OFF_NAME): New macro.
1673         (vt_off_identifier): Renamed from offset_identifier.
1674         (vb_off_identifier): Added extern declaration.
1675
1676         * decl.c (vt_off_identifier): Renamed from offset identifier.
1677         (vb_off_identifier): New variable to hold the identifier for the
1678         sigtable field vb_off.
1679         (init_decl_processing): Initialize vb_off_identifier.
1680         Renamed vt_off_identifier from offset_identifier.
1681         * sig.c (build_signature_method_call): Renamed offset_identifier and
1682         local variable offset to vt_off_identifer and vt_off, respecitively.
1683         * sig.c (build_signature_table_constructor): Renamed offset to vt_off.
1684
1685         * decl.c (init_decl_processing): Add vb_off field to
1686         sigtable_entry_type.  Reorder fields so that pfn gets properly
1687         aligned at a 64 bit boundary on the Alpha.
1688         * sig.c (build_signature_table_constructor): Build the constructor
1689         according to the new layout.  Set the vb_off field to -1 for now.
1690
1691         * decl.c (init_decl_processing): Align sigtable_entry_type on word
1692         boundaries instead of double word boundaries to save space.
1693
1694 Tue Jul 18 16:58:37 1995  Mike Stump  <mrs@cygnus.com>
1695
1696         * cvt.c (cp_convert): Always call build_cplus_new for a ctor.
1697
1698 Tue Jul 18 14:24:53 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1699
1700         * parse.y (opt.component_decl_list): Only forbid private/protected
1701         in anonymous unions.  We need to make this know when the type is
1702         defined for an object, to not give the error.
1703
1704 Mon Jul 17 14:22:44 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1705
1706         * parse.y (opt.component_decl_list): Don't allow access control
1707         as private or protected for union members.
1708
1709 Sun Jul 16 14:01:00 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1710
1711         * lex.c (check_newline): For 'p' case, move goto skipline line to
1712         before end brace for 'pragma'.
1713
1714 Fri Jul  7 13:55:58 1995  Mike Stump  <mrs@cygnus.com>
1715
1716         * g++.1: Tiny updates.
1717
1718 Fri Jul  7 13:05:20 1995  Mike Stump  <mrs@cygnus.com>
1719
1720         * decl.c (cp_finish_decl): Only destruct local static variables if
1721         they are constructed, and only construct the first time control
1722         passes completely through its declaration (if not initialized with a
1723         constant-expression).
1724         (expand_static_init): Ditto.
1725
1726 Wed Jul  5 14:05:04 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1727
1728         * typeck.c (comptypes, case OFFSET_REF): If either offset basetype
1729         is a TEMPLATE_TYPE_PARM, give a match.
1730
1731 Fri Jun 30 15:42:57 1995  Mike Stump  <mrs@cygnus.com>
1732
1733         * method.c (build_overload_value): Handle encoding of null pointer
1734         constants (or any pointer with a constant numeric value) for
1735         templates.
1736
1737 Fri Jun 30 13:45:51 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1738
1739         * call.c (convert_harshness): Add QUAL_CODE when we're faced with
1740         const vs non-const for void conversions.
1741
1742 Fri Jun 30 10:19:52 1995  Mike Stump  <mrs@cygnus.com>
1743
1744         * except.c (expand_start_all_catch): Fix problem with finding an
1745         outer nested try block when there is no code to separate it from an
1746         inner try block.
1747
1748 Fri Jun 30 02:22:26 1995  Mike Stump  <mrs@cygnus.com>
1749
1750         * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less
1751         memory please when virtual bases are used.
1752
1753 Thu Jun 29 19:03:47 1995  Mike Stump  <mrs@cygnus.com>
1754
1755         * class.c (build_vbase_path): Avoid testing things that cannot be
1756         null to see if they are null.
1757         * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work.
1758         * decl.c (finish_function): Pass a type into the new
1759         convert_pointer_to_vbase instead of a binfo.
1760         * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase
1761         and convert_pointer_to_real.
1762         (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead
1763         of the more cryptic call to get_vbase.
1764
1765 Thu Jun 29 09:35:05 1995  Mike Stump  <mrs@cygnus.com>
1766
1767         * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check.
1768
1769 Thu Jun 29 03:43:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1770
1771         * pt.c (instantiate_template): Don't strip 'this' twice.
1772
1773         * pt.c (coerce_template_parms): Allow null pointer constants.
1774
1775         * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is
1776         set.
1777
1778 Wed Jun 28 18:39:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1779
1780         * decl.c (revert_static_member_fn): Also remove 'this' from
1781         DECL_ARGUMENTS.
1782         * decl2.c (check_classfn): Don't revert this function until we get a
1783         match.
1784
1785 Wed Jun 28 14:07:27 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1786
1787         * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here.
1788
1789 Wed Jun 28 11:05:13 1995  Mike Stump  <mrs@cygnus.com>
1790
1791         * decl2.c (finish_file): Handle global vector news.
1792         * init.c (build_new): Encode vector news so that later we will know
1793         how many elements there are.
1794
1795 Mon Jun 26 13:38:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1796
1797         * expr.c (cplus_expand_expr): Don't mess with temp slots.
1798
1799         * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl
1800         returns null.
1801
1802         * decl2.c (check_classfn): Use revert_static_member_fn.
1803         * decl.c (revert_static_member_fn): Diagnose static member functions
1804         declared const or volatile.
1805
1806         * decl2.c (grokfield): Check for missing default args here, too.
1807         (check_default_args): Function to do the checking.
1808         * decl.c (pushdecl): Use it.
1809
1810         * decl.c (pushdecl): Don't warn about shadowing a member of `this'
1811         if there is no `this'.
1812
1813 Sun Jun 25 11:34:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1814
1815         * call.c (build_method_call): Downgrade 'called before definition'
1816         to a warning, as it ought to go away after Monterey.
1817
1818 Sat Jun 24 14:18:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1819
1820         * pt.c (coerce_template_parms): Don't do extra checking on pointer
1821         to member arguments.
1822
1823         * class.c (finish_struct): const and reference members don't prevent
1824         a class from being an aggregate.
1825
1826         * class.c (finish_struct): Signatures are always aggregates.
1827
1828 Fri Jun 23 17:20:29 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1829
1830         * decl2.c (check_classfn): Improve error message.
1831
1832         * pt.c (tsubst): Handle PROMOTE_PROTOTYPES.
1833
1834 Thu Jun 22 01:50:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1835
1836         * typeck.c (comptypes): Don't ignore method quals.
1837
1838         * class.c (finish_struct): Non-abstract virtuals are always USED.
1839
1840         * decl.c (build_ptrmemfunc_type): The underlying union type isn't
1841         IS_AGGR_TYPE, either.
1842         * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead.
1843         * cp-tree.h: Ditto.
1844
1845         * cp-tree.h (lang_type): Add aggregate.
1846         (CLASSTYPE_AGGREGATE): New macro.
1847         (TYPE_NON_AGGREGATE_CLASS): Ditto.
1848         * class.c (finish_struct): Determine whether a class is an
1849         aggregate.
1850         * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of
1851         TYPE_NEEDS_CONSTRUCTING.
1852         * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for
1853         subobjects, too.
1854
1855         * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL.
1856
1857         * decl.c (start_function): For pre-parsed functions, layout all of
1858         the parm decls again.
1859         (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not
1860         DECL_EXTERNAL.
1861
1862         * pt.c (coerce_template_parms): Improve checking for invalid
1863         template parms.
1864
1865 Wed Jun 21 12:01:16 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
1866
1867         * decl.c (grokdeclarator): Forbid declaration of a static member
1868         with the same name as its enclosing class.
1869
1870 Mon Jun 19 10:28:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1871
1872         * decl.c (finish_function): Clear current_class_decl.
1873
1874         * typeck.c (build_conditional_expr): Use convert (boolean_type_node
1875         instead of truthvalue_conversion.
1876
1877         * class.c (finish_struct): A data member with the same name as the
1878         class doesn't suppress constructors.
1879
1880 Fri Jun 16 18:11:39 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
1881
1882         * decl.c (start_function): If current_class_decl is a signature
1883         pointer, don't dereference it but set C_C_D to current_class_decl.
1884
1885 Fri Jun 16 17:06:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1886
1887         * decl.c (duplicate_decls): Complain about virtual functions
1888         redeclared to be inline.
1889
1890 Fri Jun 16 13:20:38 1995  Mike Stump  <mrs@cygnus.com>
1891
1892         * decl.c (get_unique_name): New routine to name unnamed namespaces.
1893         (push_namespace): Use get_unique_name for naming unnamed namespaces.
1894
1895 Thu Jun 15 15:00:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1896
1897         * parse.y: Call cplus_decl_attributes with prefix_attributes where
1898         appropriate.
1899
1900 Wed Jun 14 19:24:49 1995  Mike Stump  <mrs@cygnus.com>
1901
1902         * search.c (get_vbase): New routine to switch hierarchies from the
1903         CLASSTYPE_VBASECLASSES to the normal one.
1904         (expand_indirect_vtbls_init): Use get_vbase to figure out how we
1905         want to convert to a vbase pointer.
1906
1907 Mon Jun 12 17:50:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1908
1909         * pt.c (instantiate_class_template): Add the new instantiation to
1910         template_classes.
1911         (do_pending_expansions): Call instantiate_member_templates on all of
1912         the classes in template_classes.
1913
1914 Mon Jun 12 12:36:59 1995  Mike Stump  <mrs@cygnus.com>
1915
1916         * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our
1917         TYPE_MAIN_VARIANT if it is not filled in.
1918         * init.c (build_delete): If the TYPE_DOMAIN is not set, give an
1919         error instead of core dumping.
1920
1921 Mon Jun 12 10:41:40 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1922
1923         * call.c (can_convert): Also check for distance > 0.
1924         (can_convert_arg): Ditto.
1925         (user_harshness): Ditto.
1926
1927 Fri Jun  9 19:17:21 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1928
1929         * g++.c (MATH_LIBRARY): Provide default.
1930         (main): Always link with the math library if we link with libstdc++.
1931
1932         * decl.c (start_function): Complain about redefinition of a function
1933         even when the pending_inline version is compiled after the other
1934         version.
1935
1936 Thu Jun  8 15:44:38 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1937
1938         * gc.c (build_dynamic_cast): Build up a reference to a parameter of
1939         aggregate type.
1940
1941 Wed Jun  7 15:31:57 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
1942
1943         * init.c (build_vec_delete): Resolve an offset ref before we try to
1944         use it.
1945
1946 Wed Jun  7 14:19:32 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
1947
1948         * typeck.c (build_modify_expr): If the class lacks a constructor or
1949         assignment operator, return error_mark_node.
1950         (common_type): Use build_cplus_array_type.
1951
1952 Tue Jun  6 09:41:27 1995  Mike Stump  <mrs@cygnus.com>
1953
1954         * class.c (dont_allow_type_definitions): New variable set when types
1955         cannot be defined.
1956         (finish_struct): Use it.
1957         * cp-tree.h (dont_allow_type_definitions): Define it.
1958         * parse.y (primary, handler_seq): Set it.
1959
1960 Mon Jun  5 18:49:38 1995  Mike Stump  <mrs@cygnus.com>
1961
1962         * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for
1963         results from lookup_fnfields.  Always give warning/error on bad
1964         code.
1965
1966 Mon Jun  5 11:39:37 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
1967
1968         * init.c (member_init_ok_or_else): Don't allow initialization of
1969         an ancestor's member from within a constructor.
1970
1971 Mon Jun  5 11:20:34 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
1972
1973         * sig.c (build_signature_table_constructor): Use DECL_CONTEXT
1974         instead of DECL_CLASS_CONTEXT for calculating the vfield offset so
1975         abstract virtual functions are handled correctly.
1976
1977         * sig.c (build_signature_table_constructor): Store the correct
1978         delta in signature table entries.  It does not yet work for
1979         classes with virtual base classes as implementations of signatures.
1980         (build_signature_method_call): Add the delta to the object_ptr
1981         before generating the function call.
1982
1983         * call.c (build_method_call): Make instance_ptr the signature
1984         pointer itself instead of dereferencing the optr.
1985         * sig.c (build_signature_method_call): Dereference the optr for the
1986         direct and virtual calls.
1987
1988         * sig.c (build_signature_table_constructor): Make the tag for
1989         default implementations -1 instead of 2.
1990         (build_signature_method_call): Change the generated conditional
1991         expression correspondingly.
1992
1993         * sig.c (build_signature_pointer_constructor): Deleted the sorry
1994         message that said we can't handle multiple inheritance for
1995         implementations of signatures
1996         (build_signature_method_call): Use the offset from the sigtable
1997         entry instead of the vptr field from the signature pointer for
1998         building a virtual function call.
1999
2000         * class.c (build_vfn_ref): Deleted signature specific code, we don't
2001         call this function anymore from build_signature_method_call.
2002
2003         * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted.  We use the right vptr
2004         field in the object now instead of in the signature pointer/ref. 
2005         (build_vptr_ref): Deleted extern declaration.
2006         * sig.c (build_vptr_ref): Deleted.
2007         (build_signature_pointer_or_reference_type): Deleted construction of
2008         the vptr field.
2009         (build_signature_pointer_constructor): Deleted initialization of/
2010         assignment to the vptr field.
2011
2012         * sig.c (build_signature_table_constructor): Convert the signature
2013         table entry fields to their correct types.
2014
2015         * sig.c (build_signature_table_constructor): Don't call digest_init
2016         for the fields of a sigtable entry, it's wasted time.
2017
2018         * sig.c (build_signature_table_constructor): Correctly set the
2019         offset and index fields of a sigtable entry.  Build the constructor
2020         the way digest_init does, digest_init can't handle initializing an
2021         anonymous union inside a struct.
2022         (build_signature_method_call): Use the index field instead of the
2023         delta field to get the vtable index.
2024
2025         * decl.c (init_decl_processing): Fix number of fields for building
2026         sigtable_entry_type.
2027
2028         * cp-tree.h (tag_identifier, offset_identifier): Added extern decls.
2029         (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME.
2030         (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead.
2031         * decl.c (tag_identifier, offset_identifier): New variables to
2032         hold the identifiers for the sigtable fields tag and offset.
2033         (init_decl_processing): Initialize these variables.
2034         (init_decl_processing): Use these variables to build the
2035         sigtable_entry_type structure.  Rename the code and offset fields
2036         to tag and delta, respectively; add offset and index fields. Changed
2037         types of fields from short_integer_type_node to delta_type_node.
2038         * sig.c (build_signature_table_constructor): Rename code and offset
2039         to tag and delta, respectively.
2040         (build_signature_method_call): Ditto.  Use above variables.
2041
2042 Thu Jun  1 17:03:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2043
2044         * decl.c (lookup_name_real): Don't try to look anything up in an
2045         erroneous object.
2046
2047 Fri Jun  2 10:30:14 1995  Mike Stump  <mrs@cygnus.com>
2048
2049         * method.c (build_overload_int): New routine.  Break out
2050         functionality from build_overload_value so we can reuse it.
2051         (build_overload_value): Handle pointer to member functions as value
2052         parameters for templates.
2053         (build_overload_identifier): Since template parameters are shared
2054         among all instantiations, we have to substitute in the real types
2055         in TREE_TYPE (parm).
2056         pt.c (coerce_template_parms): Ditto.
2057         (push_template_decls): Ditto.
2058         (grok_template_type): Deleted as template parameters are shared
2059         among all instantiations.
2060
2061 Wed May 31 19:10:32 1995  Mike Stump  <mrs@cygnus.com>
2062
2063         * decl.c (grokdeclarator): Always give errors on constant overflow
2064         for array indices.
2065
2066 Wed May 31 11:39:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2067
2068         * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0.
2069         (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to
2070         reference type.
2071         (build_indirect_ref): Fix check for *&.
2072
2073 Fri Jun 16 06:54:03 1995  Mike Stump  <mrs@cygnus.com>
2074
2075         * Version 2.7.0 released.
2076
2077 Fri Jun 16 15:07:29 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
2078
2079         * Make-lang.in (DEMANGLER_PROG): Add LIBS.
2080
2081 Thu Jun 15 15:00:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2082
2083         * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN.
2084
2085 Wed Jun  7 20:00:31 1995  Mike Stump  <mrs@cygnus.com>
2086
2087         * *.[chy]: Change all callers of finish_decl to cp_finish_decl.
2088         * decl.c (finish_decl): New routine to handle call backs from the
2089         mid end (declare_hidden_char_array).
2090
2091 Wed Jun  7 19:02:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2092
2093         * decl.c (start_function): Handle setting C_C_D here.
2094         (set_C_C_D): Removed.
2095         (struct saved_scope): Remove class_decl.
2096         (push_to_top_level): Don't save current_class_decl.
2097         (pop_from_top_level): Don't restore current_class_decl or C_C_D.
2098         (struct cp_function): Add C_C_D.
2099         (push_cp_function_context): Save C_C_D.
2100         (pop_cp_function_context): Restore C_C_D.
2101
2102 Fri Jun  2 11:05:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2103
2104         * decl.c (set_C_C_D): New function.  suspend_momentary before
2105         building C_C_D.
2106         (pop_from_top_level): Call it.
2107         (start_function): Ditto.
2108         (pop_cp_function_context): Ditto.
2109
2110         * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references
2111         to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
2112
2113         * decl.c (push_cp_function_context): Save current_class_decl.
2114         (pop_cp_function_context): Restore current_class_decl and set C_C_D.
2115         (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D.
2116         (start_function): Ditto.
2117
2118         * class.c (popclass): Don't mess with current_class_decl,
2119         current_vtable_decl, or C_C_D.
2120
2121 Mon May 29 12:45:10 1995  Paul Eggert  <eggert@twinsun.com>
2122
2123         * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG).
2124
2125 Wed May 24 15:55:18 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
2126
2127         * decl.c (duplicate_decls): Check simple_cst_equal result against 0.
2128         * decl2.c (finish_anon_union): Likewise.
2129         * method.c (largest_union_member): Likewise.
2130
2131 Wed May 24 14:41:11 1995  H.J. Lu  (hjl@nynexst.com)
2132
2133         * Make-lang.in (cxxmain.o): Replace single quotes with backslashes.
2134
2135 Mon May 22 17:38:48 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
2136
2137         * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG):
2138         Use $@ instead of output name so works even if have .exe.
2139         (cxxmain.o): Use cp if ln -s fails.
2140         (c++.install-man): Use $(exeext) in executable names.
2141         (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names.
2142         * Makefile.in (../cc1plus): Use $(exeext) in name of executable.
2143
2144 Wed May 24 01:39:03 1995  Jason Merrill  <jason@deneb.cygnus.com>
2145
2146         * call.c (build_method_call): parms can be null, duh.
2147
2148 Tue May 23 01:32:09 1995  Jason Merrill  <jason@deneb.cygnus.com>
2149
2150         * call.c (build_method_call): If convert_arguments failed, just bail.
2151
2152 Fri May 19 10:31:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2153
2154         * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert.
2155
2156         * tree.c (copy_to_permanent): Oops.
2157
2158 Fri May 19 10:01:07 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2159
2160         * cp-tree.h (break_out_target_exprs): Add decl.
2161
2162 Thu May 18 13:02:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2163
2164         * decl.c (start_function): Move *all* interface handling stuff after
2165         the pushdecl.
2166
2167         * tree.c (mapcar): Renamed from make_deep_copy and generalized.
2168         (perm_manip): Return t if permanent, otherwise 0.
2169         (copy_to_permanent): Use them.
2170         (bot_manip): Helper for break_out_target_exprs.
2171         (break_out_target_exprs): New function.  Uses mapcar.
2172
2173         * typeck.c (convert_arguments): Use it.
2174
2175         * method.c (hack_identifier): Use convert_from_reference to
2176         dereference a reference.
2177
2178 Wed May 17 17:54:54 1995  Mike Stump  <mrs@cygnus.com>
2179
2180         * call.c (convert_harshness): Move reference bashing before pointer
2181         to member bashing.
2182
2183 Wed May 17 16:57:53 1995  Mike Stump  <mrs@cygnus.com>
2184
2185         * cvt.c (convert_to_reference): Only complain, if complaints are
2186         wanted.
2187         * typeck.c (build_function_call_real): Ditto.  If LOOKUP_SPECULATIVELY
2188         is set and something won't work, return NULL_TREE.
2189         * cvt.c (cp_convert): Ditto.  Pass flags down to build_method_call.
2190         (convert): Pass LOOKUP_NORMAL to cp_convert.
2191         * typeck.c (convert_for_assignment): Ditto.
2192         (convert_force): Pass LOOKUP_COMPLAIN to cp_convert.
2193         (convert_arguments): Get out early if we get an error_mark_node.
2194         (convert_for_initialization): Use cp_convert instead of convert so
2195         that we can pass flags down.
2196         * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation.
2197
2198 Wed May 17 01:43:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2199
2200         * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the
2201         decl type.
2202
2203         * class.c (finish_struct): Don't complain about a class with no
2204         user-defined constructors but with a member that has no default
2205         constructor, as this is OK for aggregates.
2206
2207         * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit
2208         constructor call, mark slot addressable.
2209
2210 Tue May 16 18:37:51 1995  Douglas Rupp  (drupp@cs.washington.edu)
2211
2212         * g++.c: Changed WINNT to _WIN32.
2213
2214 Tue May 16 12:40:16 1995  Jason Merrill  <jason@lisa.cygnus.com>
2215
2216         * lex.c (handle_sysv_pragma): Don't use token_buffer.
2217
2218 Tue May 16 12:05:26 1995  Mike Stump  <mrs@cygnus.com>
2219
2220         * call.c (resolve_scope_to_name): Add initial semantic support for
2221         namespaces.
2222         * class.c (finish_struct): Ditto.
2223         * cp-tree.h (NAMESPACE_LEVEL): Ditto.
2224         * cvt.c (build_up_reference, convert_to_reference): Ditto. 
2225         * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto.
2226         (resume_binding_level, toplevel_bindings_p): Ditto
2227         (namespace_bindings_p, declare_namespace_level): Ditto.
2228         (resume_level, push_namespace, pop_namespace): Ditto.
2229         (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto.
2230         (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto.
2231         (start_decl, make_temporary_for_reference), Ditto.
2232         (obscure_complex_init, finish_decl, expand_static_init): Ditto.
2233         (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto.
2234         (store_parm_decls, hack_incomplete_structures): Ditto.
2235         * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto.
2236         (push_namespace, pop_namespace, do_namespace_alias): Ditto.
2237         (do_toplevel_using_decl, do_class_using_decl): Ditto.
2238         * error.c (dump_decl): Ditto.
2239         * init.c (build_member_call, build_offset_ref): Ditto.
2240         * lex.c (identifier_type): Ditto.
2241         * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto.
2242         (nested_name_specifier_1): Ditto.
2243         * spew.c (yylex): Ditto.
2244         * tree.def (NAMESPACE_DECL): Ditto.
2245
2246 Tue May 16 11:55:35 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2247
2248         * decl.c (push_overloaded_decl): Return the new decl even if it
2249         can't be pushed.
2250
2251 Tue May 16 11:00:37 1995  Jason Merrill  <jason@lisa.cygnus.com>
2252
2253         * typeck.c (decay_conversion): Split out from default_conversion.
2254         (default_conversion): Call it.
2255         (build_binary_op): Ditto.
2256         (build_binary_op_nodefault): Use decay_conversion for truth ops.
2257
2258 Mon May 15 12:47:56 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2259
2260         * decl.c (warn_extern_redeclared_static): This is a pedwarn.
2261         (duplicate_decls): Always use the old decl's linkage info.  Don't
2262         play with linkage of consts.
2263         (pushdecl): Don't play with linkage of consts.
2264         (redeclaration_error_message): Don't complain about an old public
2265         decl and a new non-public decl here.
2266         (grokvardecl): Handle linkage of consts here.
2267         (grokdeclarator): An 'extern inline' is public.  Pass constp to
2268         grokvardecl.
2269         (start_function): Wait until after the pushdecl to do some linkage
2270         stuff.
2271
2272         * decl2.c (import_export_vtable): Make duplicates weak rather than
2273         static if supported.
2274         (import_export_inline): Ditto.
2275         * pt.c (do_pending_expansions): Ditto.
2276
2277         * class.c (build_vbase_path): flag_assume_nonnull_objects only
2278         affects reference conversion.
2279
2280         * init.c (emit_base_init): Build up an RTL_EXPR and add it to
2281         rtl_expr_chain.
2282         * decl.c, decl2.c: s/base_init_insns/base_init_expr/.
2283
2284 Tue May 16 07:06:28 1995  Paul Eggert  <eggert@twinsun.com>
2285
2286         * method.c (numeric_output_need_bar): Renamed from misspelling.
2287
2288         * typeck.c (build_ptrmemfunc): Fix misspellings in messages.
2289
2290 Sun May 14 10:26:22 1995  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2291
2292         * lang-options.h, lang-specs.h: New files.
2293
2294 Thu May 11 00:31:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2295
2296         * typeck.c (default_conversion): Don't check for BLKmode before
2297         pulling out the decl_constant_value.
2298
2299         * decl.c (start_function): Clear named_labels and shadowed_labels.
2300
2301         * typeck.c (build_function_call_real): Also synthesize methods here.
2302
2303 Wed May 10 00:55:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2304
2305         * decl2.c (finish_file): Synthesize exported methods before the
2306         reconsider loop.
2307
2308         * parse.y: Move declaration of flag_new_for_scope to file scope.
2309
2310 Tue May  9 19:10:33 1995  Mike Stump  <mrs@cygnus.com>
2311
2312         * decl2.c: Add flag_new_for_scope for new -ffor-scope flag.
2313         * parse.y (FOR): Conditionalize the pushing and poping of scope for
2314         the for-init-statement upon the new flag_new_for_scope.
2315         * parse.y (try_block): Simplify and use compstmt.
2316
2317 Mon May  8 12:41:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2318
2319         * decl.c (define_function): Mark function decl artificial.
2320
2321 Sun May  7 00:51:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2322
2323         * parse.y (simple_stmt, FOR): Put back push/pop for condition scope.
2324
2325         * decl2.c (grokclassfn): DECLs don't have cv-qualified types.
2326         * tree.c (build_cplus_method_type): Ditto.
2327
2328         * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1.
2329
2330         * typeck.c (build_function_call_real): If convert_arguments failed,
2331         just bail.
2332         (convert_arguments): If one of the arguments is error_mark_node,
2333         just bail.
2334
2335 Sat May  6 02:39:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2336
2337         * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for
2338         decls that don't include it.
2339
2340 Fri May  5 14:23:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2341
2342         * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or
2343         DECL_NOT_REALLY_EXTERN set aren't extern decls.
2344
2345         * typeck.c (build_indirect_ref): Don't call default_conversion for a
2346         parameter of reference_type.
2347         * cvt.c (convert_from_reference): Just use build_indirect_ref.
2348
2349         * pt.c (do_type_instantiation): Only instantiate member functions
2350         that actually come from templates.
2351
2352 Fri May  5 09:46:05 1995  Mike Stump  <mrs@cygnus.com>
2353
2354         * parse.y: Generalized cleanup of poplevels, and compound statements
2355         and compound statements in try blocks.  Rewritten `for' rule so that
2356         the scope of variables declared in the for clause is shortened to
2357         span just to the end of the statement, instead of the whole
2358         containing block.
2359
2360 Fri May  5 00:37:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2361
2362         * call.c (convert_harshness): Handle pointers to members better.
2363
2364 Thu May  4 16:00:26 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2365
2366         * decl2.c (delete_sanity): Do access control here.
2367         * init.c (build_delete): Instead of here.
2368
2369         * Make-lang.in: Build c++filt.
2370
2371 Wed May  3 02:59:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2372
2373         * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL,
2374         update our IDENTIFIER_TYPE_VALUE.
2375
2376 Fri Apr 28 07:58:41 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2377
2378         * lex.c (cons_up_default_function): Fix linkage of #pragma
2379         implemented functions.
2380
2381 Thu Apr 27 16:56:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2382
2383         * method.c (build_overload_name): Simplify and fix repeated type
2384         folding.
2385
2386         * decl.c (grokdeclarator): Prohibit pointers to void or reference
2387         members.
2388
2389 Thu Apr 27 09:49:07 1995  Mike Stump  <mrs@cygnus.com>
2390
2391         * typeck2.c (process_init_constructor): Make sure initializers are
2392         fully digested.
2393
2394 Thu Apr 27 01:11:55 1995  Jason Merrill  <jason@python.cygnus.com>
2395
2396         * lex.c (cons_up_default_function): Always defer synthesis.
2397
2398 Thu Apr 27 00:20:37 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2399
2400         * decl2.c (mark_inline_for_output): Don't play with pending_inline
2401         stuff.
2402
2403 Wed Apr 26 17:48:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2404
2405         * call.c (user_harshness): New function; like build_type_conversion,
2406         but doesn't actually build anything.
2407         (compute_conversion_costs): Use it instead of build_type_conversion.
2408
2409 Wed Apr 26 17:11:25 1995  Jason Merrill  <jason@deneb.cygnus.com>
2410
2411         * typeck.c (build_function_call_real): Improve error message for
2412         calling a non-function.
2413
2414         * method.c (hack_identifier): Lose check for calling a data member.
2415
2416 Wed Apr 26 16:59:13 1995  Mike Stump  <mrs@cygnus.com>
2417
2418         * typeck2.c (build_functional_cast): Remove very old cruft.
2419         Seems like good code is generated without it.
2420
2421 Wed Apr 26 00:47:16 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2422
2423         * method.c (do_build_assign_ref): Fix handling of anonymous unions.
2424         (do_build_copy_constructor): Ditto.
2425
2426         * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch.
2427
2428         * decl.c (push_switch): New function.
2429         (pop_switch): Ditto.
2430         (define_case_label): Check for jumping over initialization.
2431
2432         * call.c (build_method_call): Check for an inline function being
2433         called before its definition has been seen.
2434         * typeck.c (build_function_call_real): Ditto.
2435
2436         * decl.c (duplicate_decls): Check for a function being redeclared
2437         inline after its address has been taken.
2438
2439         * typeck.c (build_conditional_expr): Handle related class lvalues.
2440
2441 Tue Apr 25 13:20:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2442
2443         * pt.c (do_pending_expansions): Don't expand unused templates.
2444
2445         * parse.y (component_decl): Accept a lone semicolon.
2446
2447 Tue Apr 25 00:25:56 1995  Jason Merrill  <jason@rtl.cygnus.com>
2448
2449         * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the
2450         object parameter anymore.
2451
2452         * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns.
2453
2454 Mon Apr 24 12:35:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2455
2456         * parse.y (simple_stmt, decl case): Clear prefix_attributes.
2457         (lang_extdef): Ditto.
2458
2459         * parse.y (maybe_parmlist): New rule for use in declarators where
2460         this could either be a list of expressions or parameters.  Calls
2461         suspend_momentary before deciding which.
2462         (direct_after_type_declarator): Use it.
2463         (complex_direct_notype_declarator): Use it.
2464
2465         * pt.c (tsubst): Propagate attributes const and noreturn.
2466
2467         * typeck.c (build_modify_expr): If warn_synth, call build_opfncall
2468         before doing the default thing.
2469
2470 Thu Apr 27 21:49:36 1995  Doug Evans  <dje@cygnus.com>
2471
2472         * typeck.c (common_type): Call lookup_attribute instead of
2473         value_member.
2474
2475 Tue Apr 25 18:07:43 1995  Richard Kenner  (kenner@vlsi1.ultra.nyu.edu)
2476
2477         * Make-lang.in: Change "realclean" to "maintainer-clean".
2478
2479 Sun Apr 23 12:32:38 1995  Mike Stump  <mrs@cygnus.com>
2480
2481         * decl2.c (finish_file): Fix broken linked list handling.
2482
2483 Fri Apr 21 18:08:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2484
2485         * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF
2486         as often.
2487         (finish_struct): Ditto.
2488
2489         * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*.
2490
2491         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro.
2492         (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro.
2493
2494 Fri Apr 21 15:52:22 1995  Jason Merrill  <jason@python.cygnus.com>
2495
2496         * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if
2497         it is of the same type as the return value.
2498
2499 Fri Apr 21 03:01:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2500
2501         * decl2.c (finish_file): Reconsider if synthesizing a method wrote
2502         out its assembly.
2503
2504         * typeck.c (convert_for_initialization): Don't call a trivial copy
2505         constructor.
2506
2507         * typeck2.c (store_init_value): Only abort if the type has a
2508         non-trivial copy constructor.
2509
2510         * typeck.c (c_expand_return): If we're returning in a register and
2511         the return value is a TARGET_EXPR, expand it.  Only do
2512         expand_aggr_init if we're returning in memory.
2513         (expand_target_expr): Function to expand a TARGET_EXPR.
2514         (build_modify_expr): Use it.
2515
2516         * tree.c (build_cplus_new): Layout the slot.
2517
2518         * expr.c (cplus_expand_expr): Use expand_call to expand the call
2519         under a NEW_EXPR, so the target is not discarded.
2520
2521 Thu Apr 20 14:59:31 1995  Mike Stump  <mrs@cygnus.com>
2522
2523         * gc.c (build_dynamic_cast): Tighten error checking.
2524
2525 Thu Apr 20 11:23:54 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2526
2527         * expr.c (cplus_expand_expr): Only abort if the returned target is
2528         different from what we expected if the type has a non-trivial copy
2529         constructor.
2530
2531         * decl2.c (cplus_decl_attributes): Attributes applied to a template
2532         really apply to the template's result.
2533
2534         * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE
2535         to decide whether to consider a CALL_EXPR an lvalue.
2536
2537         * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the
2538         type has a non-trivial copy constructor.
2539
2540         * decl.c (start_function): If interface_known, unset
2541         DECL_NOT_REALLY_EXTERN on the function.
2542
2543 Wed Apr 19 16:53:13 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2544
2545         * pt.c (do_function_instantiation): Handle explicit instantiation of
2546         member functions.
2547         (do_type_instantiation): Handle 'inline template class foo<int>',
2548         meaning just spit out the vtable.
2549
2550         * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on
2551         the consed functions.
2552
2553         * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN.
2554
2555 Wed Apr 19 16:28:17 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2556
2557         * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c,
2558         typeck.c: Include output.h.
2559
2560 Wed Apr 19 14:57:21 1995  Gerald Baumgartner  (gb@alexander.cs.purdue.edu)
2561
2562         * call.c (build_method_call): Allow a signature member functions to
2563         be called from a default implementation.
2564
2565 Wed Apr 19 10:21:17 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2566
2567         * repo.c (finish_repo): Remember what directory we are in.
2568
2569         * search.c (expand_upcast_fixups): Don't mess with abort_fndecl.
2570
2571         * repo.c: Use obstacks instead of fixed-size buffers.  Don't spit
2572         out the second copy of the symbol name.  Don't remember COLLECT_GCC.
2573
2574 Wed Apr 19 02:32:40 1995  Mike Stump  <mrs@cygnus.com>
2575
2576         * search.c (virtual_context): New function to get the virtual
2577         context of a function.
2578         (expand_upcast_fixups): New function to generate runtime vtables.
2579         (fixup_virtual_upcast_offsets): Ditto.
2580         (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to
2581         ensure that the this offsets for upcasts from virtual bases into
2582         other virtual bases or non-virtual bases are correct at construction
2583         time and destruction time.
2584         * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all
2585         vtables in all virtual bases, instead of just one vtable in each
2586         virtual base.
2587         (fixup_vtable_deltas1): Ditto.
2588
2589 Tue Apr 18 03:57:35 1995  Michael Meissner  (meissner@cygnus.com)
2590
2591         * Makefile.in (lex.o): Add dependency on c-pragma.h.
2592
2593         * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as
2594         appropriate, instead of 0.
2595
2596 Mon Apr 17 12:28:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2597
2598         * decl.c (pushdecl): Use decls_match, not duplicate_decls, for
2599         comparing local and global decls.
2600
2601 Fri Apr 14 01:46:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2602
2603         * typeck.c (convert_arguments): Only prohibit passing to ... of
2604         types with non-trivial copy constructors.
2605
2606         * repo.c (repo_template_used): Don't try to mess with no id.
2607
2608 Fri Apr 14 23:32:50 1995  Per Bothner  <bothner@rtl.cygnus.com>
2609
2610         * decl.c (duplicate_decls):  Use cp_warning_at for redundant-decls.
2611
2612 Thu Apr 13 15:37:42 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2613
2614         * cp-tree.h (current_tinst_level): Delete declaration, since it's
2615         static inside pt.c.
2616
2617         * typeck.c (build_modify_expr): Catch incompatible array assignment.
2618
2619         * parse.y (attribute_list, attrib): Rewrite actions to feed the
2620         right stuff to decl_attributes.
2621
2622 Thu Apr 13 11:24:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2623
2624         * search.c (dfs_debug_mark): Check for magic virtual like
2625         import_export_vtable.
2626
2627         * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with
2628         four args.
2629
2630 Wed Apr 12 12:02:57 1995  Jason Merrill  <jason@deneb.cygnus.com>
2631
2632         * decl2.c (finish_file): Move prevtable pass before needs_messing_up
2633         decision.
2634
2635 Tue Apr 11 11:20:27 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2636
2637         * decl.c (finish_decl): If we're writing out a static data member of
2638         a class, we want the debug info for that class.
2639
2640         * gc.c (build_t_desc): Check linkage of a class properly.
2641
2642         * class.c (finish_struct): Set the 'headof' offset for the main
2643         vtable properly.
2644         (prepare_fresh_vtable): Fix typeinfo pointer here.
2645         (modify_one_vtable): Instead of here.
2646
2647 Mon Apr 10 12:15:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2648
2649         * repo.c (repo_get_id): New function to return the interesting
2650         identifier for a repo entity.
2651         (repo_template_used): Use it.
2652         (repo_template_instantiated): Mark the id as chosen.
2653         (init_repo): Record whether or not the id was chosen.
2654         (finish_repo): Note if an id was newly chosen.
2655
2656         * pt.c (do_function_instantiation): Call repo_template_instantiated.
2657         (do_type_instantiation): Ditto.  Don't diagnose multiple
2658         instantiation.
2659
2660         * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding
2661         whether or not to synthesize a method.
2662
2663         Undo these changes:
2664         * class.c (finish_vtbls): build more vtables if flag_rtti is on.
2665         * class.c (modify_all_direct_vtables): ditto.
2666         * init.c (expand_direct_vtbls_init): expand more vtables if
2667         flag_rtti is on.
2668
2669 Sat Apr  8 17:45:41 1995  Mike Stump  <mrs@cygnus.com>
2670
2671         * gc.c (build_headof): Use ptrdiff_type_node instead of
2672         integer_type_node on pointer arithmetic.
2673
2674 Sat Apr  8 11:57:04 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2675
2676         * typeck.c (build_modify_expr): Undo previous change.
2677
2678 Thu Apr  6 01:23:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2679
2680         * Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
2681
2682         * repo.c (get_base_filename): Put the .rpo file in the directory
2683         with the object file, not the source.
2684
2685         * typeck.c (build_conditional_expr): Handle pmf's better.
2686
2687         * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
2688         the name of the symbol.
2689
2690 Wed Apr  5 15:24:12 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2691
2692         * repo.c (open_repo_file): Make repo filename DOS-compliant.
2693         (*): Also write a new repo file if some previously-used
2694         templates are no longer used.  Only remember the identifier.
2695
2696         * lex.c (cons_up_default_function): If this function belongs to a
2697         template class, call repo_template_used for it.
2698
2699         * repo.c (repo_template_used): Using a class means using its vtable,
2700         if any.
2701         (finish_repo): Ditto.
2702
2703         * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
2704         if the type has a complex copy constructor.
2705
2706         * decl2.c (lang_decode_option): -frepo implies
2707         -fno-implicit-templates.
2708
2709         * decl.c (start_function): Clear current_{base,member}_init_list.
2710
2711         * lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
2712
2713 Tue Apr  4 16:11:08 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2714
2715         * decl.c (struct cp_function): Add {base,member}_init_list.
2716         (push_cp_function_context): Save current_{base,member}_init_list.
2717         (pop_cp_function_context): Restore them.
2718
2719 Mon Apr  3 16:55:08 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2720
2721         * repo.c (get_base_filename): Take filename parm, fix logic bug.
2722
2723         * typeck.c (build_compound_expr): Do not warn about a compound expr
2724         in which the first expression has no side effects.
2725         (build_x_compound_expr): Warn here instead.
2726         (build_conditional_expr): Don't warn about a conditional expression
2727         between an enum and the type it promotes to.
2728
2729         * init.c (build_new): Handle initialization of arrays of builtins
2730         properly.
2731
2732 Mon Apr  3 15:08:04 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2733
2734         * repo.c: Include config.h to get definitions of bcopy and rindex
2735         on systems that don't have them (e.g., SVR4).
2736
2737 Mon Apr  3 14:41:55 1995  Mike Stump  <mrs@cygnus.com>
2738
2739         * decl2.c (finish_table): Pass NULL_TREE instead of init to
2740         finish_decl so that it won't try and do error checking on the
2741         initializer.
2742
2743 Mon Apr  3 10:45:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2744
2745         * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to
2746         determine whether this compile used -c -o.
2747         (open_repo_file): Use get_base_filename.  Remove the extension.
2748         (finish_repo): Spit out the values of main_input_filename,
2749         COLLECT_GCC and COLLECT_GCC_OPTIONS.
2750
2751         * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name.
2752
2753 Sun Apr  2 23:43:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2754
2755         * search.c (compute_access): Don't try to do access control on
2756         nested types.
2757
2758 Fri Mar 31 10:14:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2759
2760         * repo.c: New file to handle things repo.
2761
2762         * pt.c (instantiate_template): Call repo_template_used if the
2763         definition is accessible.
2764         (mark_function_instantiated): Split out from
2765         do_function_instantiation.
2766         (mark_class_instantiated): Split out from do_type_instantiation.
2767
2768         * parse.y (template_instantiate_once): Call repo_template_used.
2769
2770         * lex.c (lang_init): Call init_repo.
2771
2772         * decl2.c: Handle flag_use_repository.
2773         (finish_file): Call finish_repo.
2774
2775         * decl.c (start_method): Call repo_template_used if this is a
2776         template method.
2777
2778         * Makefile.in (CXX_OBJS): Add repo.o.
2779         (repo.o): Add dependencies.
2780
2781         * Make-lang.in (CXX_SRCS): Add repo.c.
2782
2783         * decl.c (start_function): If DECL_INTERFACE_KNOWN and
2784         DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL.
2785
2786         * typeck.c (build_binary_op_nodefault): Identify the invalid operand
2787         types used.
2788
2789         * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN.
2790
2791 Thu Mar 30 17:54:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2792
2793         * typeck.c (build_binary_op_nodefault): Tidy up use of build_type
2794         and result_type.  When checking for comparison between signed
2795         and unsigned, use result_type rather than the (possibly shortened)
2796         type of op0.  Also, don't warn about equality comparison of a
2797         signed operand to an unsigned constant that fits in the signed
2798         type.
2799
2800         * method.c (do_build_copy_constructor): Reverse
2801         current_base_init_list after we've built it up.
2802
2803 Thu Mar 30 14:35:18 1995  Mike Stump  <mrs@cygnus.com>
2804
2805         * except.c (build_throw): Never warn about the value of throw not
2806         being used.
2807
2808 Thu Mar 30 13:16:54 1995  Mike Stump  <mrs@cygnus.com>
2809
2810         * except.c (expand_start_catch_block): Check for bad catch parameter
2811         declarations.
2812
2813 Thu Mar 30 13:06:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2814
2815         * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if
2816         DECL_EXTERNAL is not already set.
2817
2818 Thu Mar 30 11:26:24 1995  Mike Stump  <mrs@cygnus.com>
2819
2820         * method.c (emit_thunk): Let poplevel know that the last level is
2821         for a function so it can create a BLOCK_NODE and set DECL_INITIAL.
2822
2823 Thu Mar 30 11:15:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2824
2825         * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN
2826         here.
2827
2828         * decl.c (grokdeclarator): OK, don't abort if we see a decl with
2829         METHOD_TYPE.
2830         (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on
2831         all deferred inlines.
2832
2833 Wed Mar 29 19:35:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2834
2835         * cp-tree.h (DECL_THIS_INLINE): New macro.
2836         (DECL_NOT_REALLY_EXTERN): New macro.
2837         (DECL_THIS_STATIC): New macro.
2838
2839         * decl.c: Lose all references to current_extern_inline.  Break
2840         inline semantics into DECL_INLINE for actual inlining and
2841         DECL_THIS_INLINE for the linkage wierdness.  Use DECL_THIS_STATIC.
2842         * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to
2843         emit an inline here.  Associated changes.
2844         * lex.c: Ditto.
2845         * pt.c: Ditto.
2846         * typeck.c: Ditto.
2847
2848         * call.c (build_method_call): Don't bother trying to handle inlines
2849         specially.
2850         * cvt.c (convert_to_aggr): Ditto.
2851
2852         * pt.c (do_function_instantiation): Handle instantiation of
2853         public inlines, too.
2854
2855 Wed Mar 29 16:04:25 1995  Mike Stump  <mrs@cygnus.com>
2856
2857         * except.c (init_exception_processing): Change the interface for
2858         __throw_type_match and add decl for new rtti matching routine
2859         __throw_type_match_rtti.
2860         (build_eh_type): New routine to build a run time descriptor for the
2861         expression given. 
2862         (expand_start_catch_block): Update to use new calling convention for
2863         the matcher.
2864         (expand_throw): Update to use build_eh_type.
2865
2866 Mon Mar 27 07:14:33 1995  Warner Losh   <imp@village.org>
2867
2868         * g++.c: Removed __NetBSD__ from conditional.
2869         Declare strerror if HAVE_STRERROR is defined; otherwise
2870         declare sys_errlist and sys_nerr.
2871         (my_strerror): New function.
2872
2873 Tue Mar 28 14:16:35 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2874
2875         * search.c (get_binfo): Don't try to be so clever.
2876
2877         * tree.c (copy_to_permanent): Also suspend_momentary().
2878
2879         * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even
2880         if the types are the same.
2881
2882         * decl.c (start_function): Handle extern inlines more like C++ says
2883         we should.
2884
2885         * init.c (build_member_call): Hand constructor calls off to
2886         build_functional_cast.
2887
2888         * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get
2889         the name of the type.
2890
2891 Tue Mar 28 13:13:56 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2892
2893         * decl.c (grokdeclarator): Check for the decl returned by
2894         grokfndecl to be null before using build_decl_attribute_variant.
2895
2896 Mon Mar 27 18:04:41 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2897
2898         * init.c (build_new): Use build_pointer_type instead of
2899         TYPE_POINTER_TO.
2900
2901 Fri Mar 24 12:11:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2902
2903         * typeck.c (build_conditional_expr): Handle pmfs.
2904         (convert_for_assignment): Fix pmf support.
2905
2906         * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks.
2907         (cp_convert_to_pointer): Handle pmfs.
2908         (cp_convert): Pass pmfs to cp_convert_to_pointer.
2909
2910         * typeck.c (common_type): Handle inheritance for pmfs.
2911
2912         * typeck2.c (build_m_component_ref): Do access control.
2913
2914         * typeck.c (comp_target_types): Check for conversion to void *
2915         before checking trickier conversions.
2916
2917         * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P.
2918
2919         * pt.c (push_tinst_level): Complain if template instantiation depth
2920         is greater than max_tinst_depth.
2921
2922         * typeck.c (common_type): Assume that we can call common_type to
2923         unify the target type of a pointer.
2924
2925 Thu Mar 23 00:48:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2926
2927         * decl2.c (finish_file): Don't synthesize methods at
2928         finish_vtable_prevardecl time.  Do synthesize methods that are not
2929         used, but are public and not external.
2930
2931         * cvt.c (build_type_conversion): Only give an error if for_sure.
2932
2933         * typeck.c (comp_target_types): Only support pointer conversions if
2934         nptrs > 0.
2935
2936 Wed Mar 22 19:30:15 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2937
2938         * init.c (build_new): Catch use of an initializer list where it
2939         shouldn't be.
2940
2941 Wed Mar 22 16:21:07 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2942
2943         * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is
2944         non-constant.
2945
2946         * decl2.c: temp_name_counter is now public.
2947
2948         * decl.c (struct cp_function): Add temp_name_counter field.
2949         (push_cp_function_context): Save it.
2950         (pop_cp_function_context): Restore it.
2951
2952         * typeck.c (common_type): Handle unifying function types, and unify
2953         unmatched things to void* with a compiler_error, rather than
2954         silently like before.
2955
2956 Wed Mar 22 15:10:34 1995  Mike Stump  <mrs@cygnus.com>
2957
2958         * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert
2959         Brendan's last change and fix latent problem that causes TD entries
2960         to not come out when the things that need them has yet to be
2961         expanded.
2962
2963 Wed Mar 22 15:12:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2964
2965         * typeck.c (build_binary_op_nodefault, comparison ops): Update type0
2966         and type1, since we might have changed op0 or op1.
2967
2968 Wed Mar 22 13:33:45 1995  Jason Merrill  <jason@python.cygnus.com>
2969
2970         * typeck.c (common_type): Don't mess up templates.
2971
2972 Wed Mar 22 04:56:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2973
2974         * typeck.c (common_type): Handle ptms properly.  Also handle 
2975         T* -> void*.
2976         (build_binary_op_nodefault): New variable build_type controls what
2977         type is given to the expression when it is created.  Set this to
2978         boolean_type_node for comparison ops instead of using result_type.
2979         (comp_target_types): Allow T * -> void *.
2980
2981         * cvt.c (cp_convert_to_pointer): Do access control when converting
2982         ptms, too.
2983
2984 Tue Mar 21 17:25:06 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
2985
2986         * parse.y (extern_lang_string): Catch use of linkage specs that
2987         aren't all naming the same language.
2988
2989         * class.c (finish_struct): Delete accidental duplicate code.
2990
2991 Tue Mar 21 14:00:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
2992
2993         * typeck.c (build_binary_op_nodefault): Disable pedwarns about
2994         comparing functions and incomplete types.
2995
2996         * decl.c (finish_function): Only unset current_function_decl if
2997         !nested.
2998         (duplicate_decls): Last change went too far; we only want to stop
2999         checking for value/reference ambiguity.
3000
3001 Tue Mar 21 01:26:39 1995  Mike Stump  <mrs@cygnus.com>
3002
3003         * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it
3004         out fresh, as the new type may be larger.
3005
3006 Mon Mar 20 19:01:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3007
3008         * expr.c (extract_init): Try to expand the RTL for the
3009         initialization and figure out what it will look like so we can avoid
3010         run-time initialization.  Disabled for now.
3011         (extract_scalar_init): Helper for scalar initialization.
3012         (extract_aggr_init): Helper for aggregate initialization.
3013
3014         * decl.c (duplicate_decls): Don't complain about ambiguous
3015         declarations.
3016         (obscure_complex_init): Now returns a tree.  Call extract_init if
3017         we're optimizing and this is a toplevel decl.
3018         (finish_decl): Update accordingly.
3019
3020         * lex.c (check_newline): If we're just changing files (not pushing
3021         or popping), update input_file_stack->name.
3022
3023 Mon Mar 20 17:55:04 1995  Mike Stump  <mrs@cygnus.com>
3024
3025         * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now
3026         in the transitive unification code.
3027
3028 Mon Mar 20 16:07:50 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3029
3030         * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on
3031         non-functions.
3032         (grokdeclarator): Don't allow friends to be defined in local classes.
3033
3034 Sat Mar 18 04:03:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3035
3036         * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC
3037         rather than DECL_SAVED_INSNS to decide whether or not this method
3038         was declared inline.
3039
3040         * method.c (synthesize_method): Turn off DECL_INLINE if
3041         function_cannot_inline_p thinks we're too large.
3042
3043         * typeck.c (build_indirect_ref): Use build_expr_type_conversion.
3044
3045 Fri Mar 17 17:47:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3046
3047         * class.c (instantiate_type): Handle pmfs.
3048
3049         * typeck.c (convert_for_assignment): Check types when assigning one
3050         pmf to another.
3051
3052         * decl.c (define_label): Fix logic for printing out the name of the
3053         label in an error message.
3054
3055         * error.c (dump_expr): Support ARRAY_REF.
3056
3057 Fri Mar 17 17:43:02 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3058
3059         * decl2.c (finish_vtable_vardecl): Call build_t_desc here.
3060         (finish_prevtable_vardecl): Instead of here.
3061
3062 Fri Mar 17 14:40:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3063
3064         * decl.c (expand_static_init): Also use expand_aggr_init if the
3065         initializer is a TREE_LIST.     
3066         (grokdeclarator): Only pedwarn about extra qualification if -pedantic.
3067
3068         * pt.c (unify): Fix unification of return type.
3069
3070         * expr.c (fixup_result_decl): Use store_expr, rather than
3071         emit_move_insn, to move the return value into the place where
3072         callers will expect it.
3073
3074 Thu Mar 16 22:05:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3075
3076         * init.c (build_offset_ref): Call assmble_external on functions.
3077         * typeck.c (build_component_ref): Ditto.
3078
3079 Thu Mar 16 20:28:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3080
3081         * decl.c (struct saved_scope): Add members base_init_list and
3082         member_init_list.
3083         (push_to_top_level): Save current_base_init_list and
3084         current_member_init_list to them.
3085         (pop_from_top_level): Put it back.
3086
3087 Thu Mar 16 19:21:14 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3088
3089         * pt.c (instantiate_template): Call assemble_external.  
3090
3091 Thu Mar 16 18:07:54 1995  Brendan Kehoe  (brendan@phydeaux.cygnus.com)
3092
3093         * class.c: Include rtl.h, to get NULL_RTX.
3094         (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems
3095         on hosts with different sizes for each part of the union.
3096         * tree.c: Also include rtl.h.
3097         (layout_basetypes): Same change for DECL_SAVED_INSNS.
3098
3099 Thu Mar 16 13:57:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3100
3101         * pt.c (unify): Fix array domain unification for 64-bit targets.
3102
3103         * decl2.c (finish_file): Push bizarre type decl before walking the
3104         vtables the first time.
3105         (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed
3106         with TREE_CHAIN (prev).
3107
3108         * init.c (emit_base_init): Use convert_pointer_to_real instead of
3109         convert_pointer_to when converting to a direct base.
3110
3111 Wed Mar 15 20:26:29 1995  Mike Stump  <mrs@cygnus.com>
3112
3113         * pt.c (type_unification): Handle transitive unification better.
3114
3115 Wed Mar 15 13:56:16 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3116
3117         * decl2.c (walk_vtables): Always set prev to vars.
3118         (mark_vtable_entries): Call assemble_external on the vtable entries.
3119
3120         * class.c (finish_struct): Set the vtable's size to NULL_TREE before
3121         calling layout_decl, so that it gets updated properly.
3122
3123         Finally re-enable dynamic synthesis.  This time it works.
3124         * method.c (synthesize_method): Pass decl_function_context (fndecl)
3125         to {push,pop}_cp_function_context.
3126         * decl.c (push_cp_function_context): Now takes a tree argument.
3127         (pop_cp_function_context): Ditto.
3128         * call.c (build_method_call): Enable synthesis.
3129         * lex.c (cons_up_default_function): Ditto.
3130
3131 Tue Mar 14 19:14:19 1995  Doug Evans  <dje@chestnut.cygnus.com>
3132
3133         * parse.y (setattrs): Chain onto prefix_attributes rather than
3134         setting it.
3135
3136 Wed Mar 15 13:00:00 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3137
3138         * decl.c (pushdecl): Check if the type of the VAR_DECL is an
3139         error_mark_node before trying to read TYPE_LANG_SPECIFIC. 
3140
3141 Mon Mar 13 21:00:28 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3142
3143         * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold,
3144         and convert the size and integer_one_node to the index type.
3145
3146 Mon Mar 13 08:01:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3147
3148         * typeck.c (get_member_function_from_ptrfunc): Save the instance
3149         argument, and tack it onto the front of the COND_EXPR to make the
3150         semantics come out right.  Grab the instance argument from
3151         '*instance_ptrptr', rather than having it passed in separately.
3152         
3153         * various: Change various consed-up comparison operations to have
3154         boolean type.  Remove the instance argument in calls to
3155         get_member_function_from_ptrfunc.
3156
3157         * error.c (dump_expr): Dump true and false as "true" and "false".
3158
3159         * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the
3160         global init function.
3161
3162         * decl.c (finish_function): Only set DECL_EXTERNAL here if the
3163         inline function is public.
3164
3165 Sat Mar 11 00:58:03 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3166
3167         * init.c (is_friend): Be more careful about checking
3168         DECL_CLASS_CONTEXT on non-member functions.
3169
3170         * decl2.c (finish_vtable_vardecl): Don't bother calling
3171         assemble_external here.
3172         (prune_vtable_vardecl): New function that just splices out the
3173         vtable decl from the top-level decls.
3174         (import_export_inline): Unset DECL_EXTERNAL at first.
3175         (finish_file): Don't bother calling assemble_external here.  Do
3176         splice out all of the vtables.
3177
3178 Fri Mar 10 14:42:29 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3179
3180         * decl.c (finish_function): If we're not emitting the function yet,
3181         call assemble_external for it.
3182
3183         * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries
3184         here.
3185         (finish_vtable_vardecl): Don't do the linkage deduction thing here.
3186         Also don't splice out the current vtable if it is unused.
3187         (finish_file): Move the second walk_vtables and the synthesis check
3188         inside the 'reconsider' loop.  Move thunk emission after the
3189         'reconsider' loop.
3190
3191 Thu Mar  9 16:28:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3192
3193         * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it
3194         was passing bogus values for readonly and volatile from the original
3195         template decl, not the resultant type of the tsubst call.
3196
3197         * class.c (duplicate_tag_error): Use cp_error_at to point out the
3198         previous definition of the tag.
3199
3200 Thu Mar  9 10:46:17 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3201
3202         * decl.c (start_function): Clear base_init_insns and protect_list.
3203         (struct cp_function): Add base_init_insns field.
3204         (push_cp_function_context): Also save base_init_insns.
3205         (pop_cp_function_context): Also restore base_init_insns.
3206
3207 Wed Mar  8 13:31:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3208
3209         * init.c (member_init_ok_or_else): Check for initializing a static
3210         member here.
3211         (emit_base_init): Instead of here.
3212
3213 Tue Mar  7 16:03:26 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3214
3215         * call.c (build_method_call): Disable synthesis as needed.
3216         * lex.c (cons_up_default_function): Ditto.
3217
3218 Tue Mar  7 10:14:29 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3219
3220         * parse.y: New rules to allow attributes in a prefix position.
3221         (prefix_attributes): New variable.  Pass it into cplus_decl_attributes.
3222         (setattr): New rule.
3223         (reserved_declspecs, declmods): Catch attributes here.
3224         * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument.
3225         * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to
3226         descendent typedef.
3227         (grokdeclarator): Added code to support machine attributes.
3228         * Makefile.in (stamp-parse): Expect 5 shift/reduce failures.
3229
3230 Mon Mar  6 15:07:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3231
3232         * call.c (build_method_call): Don't synthesize methods outside of a
3233         function.
3234
3235         Make base initialization more re-entrant so that synthesis on the
3236         fly will work (and, eventually, template instantation on the fly).
3237         * init.c (sort_member_init): Don't bother with members that can't be
3238         initialized.  Reorganize a bit.  Don't initialize base members here.
3239         (sort_base_init): New function, like sort_member_init, but for base
3240         classes.  Steals some code from emit_base_init.
3241         (emit_base_init): Simplify.  Call sort_{member,base}_init before
3242         doing any initialization, so we don't have to save
3243         current_{member,base}_init_list in push_cp_function_context.
3244         (expand_aggr_vbase_init_1): Adjust for sort_base_init.
3245         (expand_aggr_vbase_init): Simplify.
3246         * decl.c (struct cp_function): Add protect_list field.
3247         (push_cp_function_context): Also save protect_list.
3248         (pop_cp_function_context): Also restore protect_list.
3249         * call.c (build_method_call): Enable synthesis at point of call.
3250         * lex.c (cons_up_default_function): Ditto.
3251
3252         * parse.y: Turn -ansi checks back into -pedantic checks.
3253
3254         * init.c (build_new): Fix -fcheck-new for array new.
3255
3256 Sat Mar  4 15:55:42 1995  Fergus Henderson  <fjh@cs.mu.oz.au>
3257
3258         * typeck.c (build_compound_expr): warn if left-hand operand of
3259         comma expression has no side-effects.
3260
3261 Fri Mar  3 15:16:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3262
3263         * parse.y (primary): Change 'object qualified_id *' rules to 'object
3264         overqualified_id *'.
3265
3266 Fri Mar  3 12:48:17 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3267
3268         * parse.y (unary_expr): Catch doing sizeof an overloaded function.
3269         Make the error look the same as the one we issue in c_sizeof.
3270
3271         * typeck.c (build_binary_op_nodefault): Give an error for trying
3272         to compare a pointer-to-member to `void *'.
3273
3274 Fri Mar  3 11:28:50 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3275
3276         * typeck.c (build_unary_op): Handle bool increment with smoke and
3277         mirrors here, rather than in expand_increment where it belongs,
3278         because Kenner doesn't agree with me.
3279
3280 Fri Mar  3 00:08:10 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3281
3282         * decl.c (grokparms): Catch a PARM_DECL being used for a default
3283         argument as well.
3284
3285 Thu Mar  2 20:05:54 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3286
3287         * init.c (build_new): Don't allow new on a function type.
3288
3289         * parse.y (primary): Avoid a crash when seeing if the arg is of
3290         the same type as that given for the typespec in an explicit dtor call.
3291
3292 Thu Mar  2 00:49:38 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3293
3294         * decl.c (finish_function): Change test for calling
3295         mark_inline_for_output.
3296
3297 Wed Mar  1 11:23:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3298
3299         * typeck.c (build_modify_expr): Complain if
3300         build_default_binary_type_conversion fails.
3301
3302         * init.c (expand_default_init): Handle arguments of unknown type
3303         properly.
3304
3305         * cvt.c (build_expr_type_conversion): Only complain about ambiguity
3306         if 'complain'.
3307         * various: Pass 'complain'.
3308
3309         * typeck.c (comptypes): Be more picky about comparing UPTs.
3310
3311 Wed Mar  1 11:03:41 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3312
3313         * decl.c (grokdeclarator): If declarator is null, say that the
3314         type used has an incomplete type.
3315
3316 Wed Mar  1 10:06:20 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3317
3318         * pt.c (instantiate_template): Copy the template arguments to the
3319         permanent_obstack.  Also use simple_cst_equal to compare them when
3320         looking for a previous instantiation.
3321
3322         * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming
3323         they are array domain types).
3324
3325 Tue Feb 28 23:24:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3326
3327         * cp-tree.h: Define WANT_* constants for passing to
3328         build_expr_type_conversion.
3329         * cvt.c (build_expr_type_conversion): New function to build
3330         conversion to one of a group of suitable types.
3331         (build_default_binary_type_conversion): Use it.
3332         * decl2.c (grok_array_decl): Ditto.
3333         * typeck.c (build_unary_op): Ditto.
3334         (build_array_ref): Tidy up a bit.
3335         (build_binary_op): Ditto.
3336
3337 Tue Feb 28 19:57:31 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3338
3339         * decl.c (grokdeclarator): Don't allow decl of an argument as `void'.
3340
3341 Tue Feb 28 17:23:36 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3342
3343         * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals
3344         reserved_declspecs' rule.
3345
3346         * parse.y (expr_or_declarator): Remove notype_qualified_id rule.
3347         (direct_notype_declarator): Ditto.
3348         (complex_direct_notype_declarator): Add notype_qualified_id rule.
3349
3350         * lex.c (real_yylex): Handle :> digraph properly.
3351
3352 Tue Feb 28 12:26:29 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3353
3354         * decl.c (grokdeclarator): Check if it's a friend, not if it's
3355         non-virtual, that's being initialized.  Move the check up to
3356         before FRIENDP would get cleared.  Catch an unnamed var/field
3357         being declared void.  Say just `field' instead of `structure field'
3358         in the error message.  Only go for the operator name if DECLARATOR
3359         is non-null.
3360
3361 Tue Feb 28 00:08:01 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3362
3363         * decl.c (start_function): Complain about abstract return type.
3364         (grokdeclarator): Complain about declaring constructors and
3365         destructors to be const or volatile.  Complain about declaring
3366         destructors to be static.
3367
3368         * pt.c (uses_template_parms): Handle pmfs.
3369
3370         * decl.c (grokdeclarator): Don't call variable_size for array bounds
3371         that only depend on template constant parameters.
3372
3373 Mon Feb 27 15:38:16 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3374
3375         * error.c (dump_decl): Only look to see if it's a vtable if we
3376         actually have a name to check out.
3377
3378 Mon Feb 27 13:37:53 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3379
3380         * cvt.c (convert_to_aggr): Lose misleading shortcut.
3381
3382 Sun Feb 26 17:27:32 1995  Doug Evans  <dje@canuck.cygnus.com>
3383
3384         * decl.c (set_nested_typename): Always set DECL_IGNORED_P,
3385         not just for dwarf.
3386
3387 Sun Feb 26 00:10:18 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3388
3389         * decl.c (grokdeclarator): Don't allow a static member to be
3390         declared `register'.
3391
3392         * init.c (make_friend_class): Move up to a pedwarn for the warning
3393         about a class declaring friends with itself.
3394
3395         * decl.c (grokdeclarator): You can't do `volatile friend class foo'
3396         or `inline friend class foo'.  Only try to make a friend out of
3397         TYPE if we didn't already reset it to integer_type_node.
3398
3399 Sat Feb 25 22:32:03 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3400
3401         * decl.c (grokdeclarator): Don't allow initialization of a
3402         non-virtual function.
3403
3404         * decl.c (start_function): Do a pedwarn if we're changing `main'
3405         to have an int return type.
3406
3407 Sat Feb 25 00:02:05 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3408
3409         * typeck.c (build_modify_expr): Handle simple assignment from
3410         TARGET_EXPRs by building up an RTL_EXPR to force expansion.  Whew.
3411
3412 Fri Feb 24 18:27:14 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3413
3414         * decl.c (grokdeclarator): Also don't allow virtual outside of a
3415         class decl for a scope method definition performed at global binding.
3416
3417         * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF
3418         of a bitfield.
3419
3420         * decl.c (grokdeclarator): Don't allow a const to be declared mutable.
3421
3422         * typeck.c (build_binary_op): Return an error_mark_node if either
3423         one of the args turned into an error_mark_node when we tried to
3424         use default_conversion.
3425
3426         * typeck.c (build_unary_op): Forbid using postfix -- on a bool.
3427
3428         * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be
3429         used on `__wchar_t'.
3430
3431 Fri Feb 24 13:59:53 1995  Mike Stump  <mrs@cygnus.com>
3432
3433         * except.c (end_protect_partials): Do it the right way.
3434
3435 Wed Feb 22 15:42:56 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3436
3437         * typeck.c (build_binary_op_nodefault): Upgrade warning about
3438         comparing distinct pointer types to pedwarn.
3439
3440         * typeck2.c (digest_init): Cope with extra braces.
3441
3442         * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead
3443         of INT_CST_LT (..., interger_zero_node).
3444
3445 Wed Feb 22 14:45:52 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3446
3447         * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy
3448         function for systems that don't have EH.
3449
3450 Tue Feb 21 19:18:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3451
3452         * call.c (can_convert_arg): Like can_convert, but takes an arg as
3453         well.
3454
3455         * pt.c (type_unification): Allow implicit conversions for parameters
3456         that do not depend on template parameters.
3457
3458 Tue Feb 21 18:43:48 1995  Douglas Rupp  (drupp@cs.washington.edu)
3459
3460         * Make-lang.in, config-lang.in: ($exeext): New macro.
3461         * Make-lang.in: Try a "cp" if "ln" fails.
3462         * cp-tree.h (decl_attributes): Added argument.
3463         * decl2.c (cplus_decl_attribute): Add arg to decl_attributes.
3464         * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT.
3465         Modified spawnvp to have to correct number of arguments for OS/2, NT.
3466
3467 Tue Feb 21 18:36:55 1995  Mike Stump  <mrs@cygnus.com>
3468
3469         * decl.c (finish_function): Add calls to end_protect_partials to end
3470         the exception region that protects constructors so that partially
3471         constructed objects can be partially destructed when the constructor
3472         throws an exception.
3473         * init.c (perform_member_init, sort_member_init, emit_base_init):
3474         Added support for partially constructed objects.
3475         * init.c (build_partial_cleanup_for): New routine to do partial
3476         cleanups of a base class.
3477         * decl2.c (finish_file): Move the emitting of the exception table
3478         down, after we emit all code that might have exception regions in
3479         them.
3480         * except.c (end_protect_partials, might_have_exceptions_p): New
3481         routines.
3482         (emit_exception_table): Always output table if called.
3483         * cp-tree.h (protect_list, end_protect_partials,
3484         might_have_exceptions_p, emit_exception_table): Added.
3485
3486 Tue Feb 21 16:05:59 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
3487
3488         * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused
3489         address of a local variable.
3490         * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we
3491         were given a non-null PTR_TO_INSTPTR.
3492
3493 Tue Feb 21 01:53:18 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3494
3495         * decl.c (duplicate_decls): Always lay out the merged decl.
3496
3497         * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates.
3498         (finish_prevtable_vardecl): Ditto.
3499
3500         * method.c (synthesize_method): Set interface_{unknown,only}
3501         according to the settings for our class, not the file where it comes
3502         from.
3503
3504 Sat Feb 18 12:26:48 1995  Mike Stump  <mrs@cygnus.com>
3505
3506         * except.c: Handle systems that define __i386__ but not __i386.
3507
3508 Fri Feb 17 15:31:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3509
3510         * decl2.c (reparse_decl_as_expr): Support being called without a
3511         type argument.
3512
3513         * parse.y (primary): Add '(' expr_or_declarator ')'.  Adds 4 r/r
3514         conflicts.  Sigh.
3515
3516 Fri Feb 17 12:02:06 1995  Mike Stump  <mrs@cygnus.com>
3517
3518         * parse.y (template_def, fndef, fn.def1, return_init, condition,
3519         initdcl0, initdcl, notype_initdcl0, nomods_initdcl0,
3520         component_decl_1, after_type_component_declarator0,
3521         notype_component_declarator0, after_type_component_declarator,
3522         notype_component_declarator, after_type_component_declarator,
3523         full_parm, maybe_raises, exception_specification_opt): Fix up,
3524         include exception_specification_opt maybeasm maybe_attribute and
3525         maybe_init if missing.  Rename maybe_raises to
3526         exception_specification_opt to match draft wording.  Use maybe_init
3527         to simplify rules.
3528
3529 Fri Feb 17 01:54:46 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3530
3531         * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs
3532         built for news of scalar types.
3533
3534 Thu Feb 16 17:48:28 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3535
3536         * typeck.c (build_binary_op_nodefault): Update code for warning
3537         about signed/unsigned comparisons from C frontend.  Realize that the
3538         code in the C frontend is, if anything, even more bogus.  Fix it.
3539         (build_binary_op): Undo default_conversion if it wasn't useful.
3540
3541         * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for
3542         PRE*CREMENT_EXPR.
3543
3544         * decl2.c (import_export_vtable): Don't try the vtable hack
3545         if the class doesn't have any real non-inline virtual functions.
3546         (finish_vtable_vardecl): Don't bother trying to find a non-inline
3547         virtual function in a non-polymorphic class.
3548         (finish_prevtable_vardecl): Ditto.
3549
3550         * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN.
3551
3552         * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5.
3553
3554         * init.c (expand_virtual_init): Always call assemble_external.
3555
3556         * class.c (build_vfn_ref): Always call assemble_external.
3557         (build_vtable): Always call import_export_vtable.
3558         (prepare_fresh_vtable): Ditto.
3559         (add_virtual_function): Don't bother setting TREE_ADDRESSABLE.
3560
3561 Thu Feb 16 03:28:49 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3562
3563         * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine
3564         whether an enumerated type fits in a bitfield.
3565
3566 Wed Feb 15 15:38:12 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3567
3568         * class.c (grow_method): Update method_vec after growing the class
3569         obstack.
3570
3571 Wed Feb 15 13:42:59 1995  Mike Stump  <mrs@cygnus.com>
3572
3573         * parse.y (handler_seq): Push a level for the catch parameters.
3574
3575 Wed Feb 15 12:42:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3576
3577         * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my
3578         bases, in case they've been clobbered.
3579
3580 Wed Feb 15 12:07:29 1995  Mike Stump  <mrs@cygnus.com>
3581
3582         * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here,
3583         so that one day it will always be valid.
3584         * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
3585
3586         * cp-tree.h (copy_binfo): Removed, unused.
3587         * tree.c (copy_binfo): Ditto.
3588
3589 Wed Feb 15 00:05:30 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3590
3591         * init.c (build_new): Save the allocation before calling
3592         expand_vec_init on it.
3593
3594         * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush
3595         match the TYPE_PRECISION of the underlying type for constant folding
3596         to work.
3597
3598 Tue Feb 14 15:31:25 1995  Mike Stump  <mrs@cygnus.com>
3599
3600         * except.c (push_eh_entry, expand_start_all_catch,
3601         expand_leftover_cleanups, expand_end_catch_block): Keep track of
3602         the context in which the exception region occurs.
3603         (build_exception_table): If the region was not output, don't output
3604         the entry in the eh table for it.
3605
3606 Tue Feb 14 02:15:43 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3607
3608         * init.c (expand_default_init): Only use a previous constructor call
3609         if it's a call to our constructor.  Does the word "Duh" mean
3610         anything to you?
3611
3612         * decl.c (grokparms): Fine, just don't call
3613         convert_for_initialization at all.  OK?  Happy now?
3614
3615 Mon Feb 13 02:23:44 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3616
3617         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class
3618         method vector has a second element before returning it.
3619
3620         * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling
3621         convert_for_initialization.
3622
3623 Sun Feb 12 03:57:06 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3624
3625         * typeck.c (build_modify_expr): Compare function name to
3626         constructor_name (current_class_type) instead of current_class_name.
3627
3628         * decl.c (grokparms): Don't do anything with the return value of
3629         convert_for_initialization.
3630
3631         * error.c (dump_decl): Also dump_readonly_or_volatile on the decl.
3632
3633         * decl.c (duplicate_decls): Tweak error message.
3634
3635         * typeck.c (build_const_cast): Implement checking.
3636         (build_reinterpret_cast): Implement some checking.
3637
3638         * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when
3639         converting to the same aggregate type.
3640         (CONV_STATIC_CAST): Include it.
3641         (CONV_C_CAST): Ditto.
3642         * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT.
3643         (cp_convert): Only force a new temporary if CONV_FORCE_TEMP.
3644
3645 Fri Feb 10 16:18:52 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3646
3647         * typeck.c (build_c_cast): Use non_lvalue to tack something on
3648         where necessary.
3649
3650         * decl.c (auto_function): Now a function.
3651         * except.c (init_exception_processing): terminate, unexpected,
3652         set_terminate, and set_unexpected have C++ linkage.
3653
3654         * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of
3655         truthvalue_conversion for converting to bool, as it handles
3656         user-defined conversions properly.
3657         (condition_conversion): Ditto.
3658
3659         * except.c (expand_throw): Don't call convert_to_reference.
3660         Pass the correct parameters to build_new.
3661
3662         * method.c (do_build_assign_ref): Don't use access control when
3663         converting to a base reference here.
3664         (do_build_copy_constructor): Or here.
3665
3666         * init.c (build_new): Unset TREE_READONLY on the dereferenced
3667         pointer before assigning to it.
3668
3669         * decl.c (maybe_build_cleanup): Don't bother stripping const here.
3670
3671         * decl2.c (delete_sanity): You can now delete pointer to const.
3672
3673 Fri Feb 10 13:28:38 1995  Jason Merrill  <jason@python.cygnus.com>
3674
3675         * decl.c (finish_function): Don't rely on actual parameters being
3676         evaluated left-to-right.
3677         * except.c (expand_end_catch_block): Ditto.
3678
3679 Fri Feb 10 00:52:04 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3680
3681         * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't
3682         considered lvalues.
3683         * cvt.c (convert_to_reference): Use real_lvalue_p instead of
3684         lvalue_p.
3685
3686         * cvt.c (build_type_conversion_1): Don't call convert on aggregate
3687         types.
3688         (convert_to_reference): Fix erroneous text substitution.
3689
3690         * typeck2.c (initializer_constant_valid_p): Update from C frontend.
3691         Add new argument to all callers.
3692
3693         * typeck.c (convert_arguments): Check for error_mark_node before
3694         trying to do anything with the actual parameter.
3695
3696         * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and
3697         fold it.
3698         (bool_truthvalue_conversion): Remove.  Fix all callers to call
3699         truthvalue_conversion instead.
3700         (various): Fold CLEANUP_POINT_EXPRs.
3701
3702         * parse.y (conditions): Call condition_conversion rather than
3703         building up a CLEANUP_POINT_EXPR.
3704
3705         * pt.c (end_template_decl): Don't warn_if_unknown_interface here
3706         under -falt-external-templates.
3707
3708 Thu Feb  9 05:24:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3709
3710         * init.c (build_new): Complain about new of const type without
3711         initializer.  Other cleanup.
3712
3713         * call.c (compute_conversion_costs): Don't call
3714         build_type_conversion with a reference type; convert to the target
3715         type and check its lvaluetude.
3716         * cvt.c (convert_to_reference): Ditto.
3717
3718         * cvt.c (build_type_conversion_1): There will never be any need to
3719         dereference references here now.
3720
3721 Thu Feb  9 00:37:47 1995  Mike Stump  <mrs@cygnus.com>
3722
3723         * except.c (expand_builtin_throw): Make sure we only `use' the
3724         value of return_val_rtx.
3725
3726 Wed Feb  8 15:45:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3727
3728         * parse.y (structsp): Don't complain about declaring a type being
3729         defined to be a friend.
3730
3731         * decl2.c (warn_if_unknown_interface): Note the template in question
3732         and the point of instantiation, for -falt-external-templates.
3733         * lex.c (reinit_parse_for_method): Pass the decl to
3734         warn_if_unknown_interface.
3735         * pt.c (instantiate_template): Ditto.
3736         (end_template_decl): Ditto.
3737
3738         * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the
3739         nested name again, to make local classes work a bit better.
3740
3741         * typeck.c (build_function_call_real): Dereference reference after
3742         checking for incomplete type.
3743
3744         * init.c (build_new): Accept new of const and volatile types.
3745
3746 Wed Feb  8 14:04:16 1995  Jason Merrill  <jason@deneb.cygnus.com>
3747
3748         * decl.c (grokdeclarator): Fix error message.
3749
3750 Wed Feb  8 03:16:15 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3751
3752         * typeck.c (convert_for_initialization): Do bash arrays when
3753         converting to a reference to non-array.
3754
3755 Tue Feb  7 15:50:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3756
3757         * cvt.c (cp_convert): Don't call convert_to_reference, or
3758         automatically dereference references.  Do pass reference conversions
3759         to cp_convert_to_pointer.
3760         (cp_convert_to_pointer): Support references.
3761
3762         * call.c (build_method_call): Don't build up a reference to the
3763         parameter here; let build_overload_call handle that.
3764
3765         * typeck.c (build_c_cast): Call convert_to_reference directly if
3766         converting to a reference type.
3767         * method.c (do_build_copy_constructor): Ditto.
3768         * method.c (do_build_copy_constructor): Ditto.
3769         (do_build_assign_ref): Ditto.
3770
3771         * call.c (build_method_call): Dereference a returned reference.
3772         * typeck.c (build_function_call_real): Ditto.
3773
3774         * decl.c (xref_basetypes): Check for unions with basetypes here.
3775         (xref_tag): Instead of here.
3776
3777         * pt.c (process_template_parm): Template type parm decls are
3778         artificial.
3779
3780 Mon Feb  6 04:32:09 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3781
3782         * parse.y (typed_declspecs): Add missing semicolon.
3783         (do_xref_defn): Resurrect.
3784         (named_class_head_sans_basetype): Move template specialization
3785         definition cases to named_class_head_sans_basetype_defn.
3786
3787         * decl2.c (grokfield): Call pushdecl_class_level after setting the
3788         TYPE_NAME, not before.
3789
3790 Sun Feb  5 02:50:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3791
3792         * call.c (convert_harshness): Don't call sorry here.  Don't allow
3793         conversions between function pointer types if pedantic.
3794
3795         * pt.c (overload_template_name): Pass globalize=1 to xref_tag.
3796
3797         * lex.c (cons_up_default_function): Use the full name for the return
3798         type of op=.
3799
3800         * decl.c (set_nested_typename): Don't worry about anonymous types,
3801         as they already have a unique name.
3802         (pushdecl): Remove redundant set_nested_typename
3803         (xref_tag): Split out base handling into xref_basetypes.
3804
3805         * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are
3806         not considered incomplete even though their definition is unknown.
3807
3808         * decl.c (xref_defn_tag): Lose.
3809         (xref_tag): xref_next_defn = ! globalize.
3810         (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls.  The
3811         ones that should have it set will have it set by pushtag.
3812         (pushdecl_class_level): Ditto.
3813         (pushtag): Tidy up a bit.
3814         (set_nested_typename): Push a decl for the nested typename from
3815         here, rather than from xref_defn_tag.
3816
3817         * parse.y (do_xref): Lose.
3818         (named_class_head): If we see 'class foo:' we know it's a
3819         definition, so don't worry about base lists for non-definitions.
3820
3821         * pt.c (push_template_decls): Template parm decls are artificial.
3822
3823         * decl.c (duplicate_decls): Restore check for qualifier
3824         disagreement for non-functions.
3825         (decls_match): Remove check for qualifier disagreement.
3826
3827 Fri Feb  3 14:58:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3828
3829         * decl.c (grok_reference_init): Convert initializer from
3830         reference.
3831         * typeck.c (convert_for_initialization): Ditto.
3832
3833         * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME.
3834
3835         * cvt.c (cp_convert): Don't convert to the same class type by just
3836         tacking on a NOP_EXPR.
3837         (convert_to_reference): Use comp_target_types instead of comptypes
3838         so that we don't allow conversions two levels down.
3839
3840 Thu Feb  2 15:07:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3841
3842         * class.c (build_vbase_path): Bash types to make the backend happy.
3843         * cvt.c (build_up_reference): Bash the types bashed by
3844         build_vbase_path to be reference types instead of pointer types.
3845         (convert_to_reference): Ditto.
3846
3847         * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a
3848         reference type.
3849
3850         * parse.y (structsp): Put back error for 'struct B: public A;'.
3851
3852 Wed Feb  1 23:02:06 1995  Mike Stump  <mrs@cygnus.com>
3853
3854         * except.c: Add support for mips systems that don't define __mips
3855         but do define mips, like Ultrix.
3856
3857 Wed Feb  1 22:39:07 1995  Mike Stump  <mrs@cygnus.com>
3858
3859         * except.c: Add support for exception handling on the Alpha.
3860
3861 Wed Feb  1 10:12:14 1995  Mike Stump  <mrs@cygnus.com>
3862
3863         * decl2.c (finish_file): Fix bug in Jan 31st change.
3864
3865 Tue Jan 31 16:59:15 1995  Gerald Baumgartner  (gb@lorenzo.cs.purdue.edu)
3866
3867         * sig.c (build_signature_pointer_or_reference_type): Don't set
3868         IS_AGGR_TYPE for signature pointers/reference so expand_default_init
3869         doesn't expect to find a copy constructor.
3870         * call.c (build_method_call): Treat signature pointers/reference
3871         as if IS_AGGR_TYPE were set.
3872
3873 Tue Jan 31 13:28:56 1995  Mike Stump  <mrs@cygnus.com>
3874
3875         * gc.c (get_typeid): Pawn off error messages to build_t_desc.
3876         (build_t_desc): Inform the user here if they try and build
3877         with -frtti and don't include <typeinfo.h>.
3878
3879         * decl2.c (finish_prevtable_vardecl): Support rescanning.
3880         (finish_file): Move finish_prevtable_vardecl up to before the global
3881         initializers are done as tdecls are initialized in the global
3882         initializer.  Also Pick up any new tdecls or vtables needed by
3883         synthesized methods.
3884
3885         * class.c (finish_struct): Simplify.  We have to do rtti scanning at
3886         end, so we might as well do all of it there.
3887
3888 Tue Jan 31 05:35:02 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3889
3890         * call.c (build_method_call): Fix -fthis-is-variable for 32-bit
3891         targets, too.
3892
3893 Tue Jan 31 00:11:04 1995  Mike Stump  <mrs@cygnus.com>
3894
3895         * decl2.c (finish_prevtable_vardecl): New routine, mostly split from
3896         finish_vtable_vardecl.  It has the first half functionality from
3897         that routine.
3898         * decl2.c (finish_vtable_vardecl): Update to not include stuff not
3899         in  finish_prevtable_vardecl.
3900         * decl2.c (finish_file): Call finish_prevtable_vardecl.
3901         * gc.c (build_generic_desc): Allow it to be called when not at the
3902         global binding layer, but behave as if we were.
3903         (build_t_desc): Rearrange a bit so that it really works and is
3904         easier to follow.
3905         * class.c (finish_struct): Don't decide on tdecls here, as we have
3906         to wait until the end of the file in general to decide whether or
3907         not they come out.
3908
3909 Mon Jan 30 01:00:40 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3910
3911         * init.c (build_delete): Check access to operator delete before
3912         calling the destructor.
3913         * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to
3914         return error_mark_node.
3915         * call.c (build_method_call): Use the one-argument op delete even if
3916         it's an error.
3917
3918         * init.c (build_new): Fix -fthis-is-variable support.
3919         * call.c (build_method_call): Ditto.
3920
3921         * call.c (convert_harshness): Make conversion from a pointer to bool
3922         worse than conversion to another pointer.
3923
3924 Sat Jan 28 16:46:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3925
3926         * init.c (build_new): Check new return value if -fcheck-new.
3927
3928         * lex.c (check_newline): Clear end_of_file when we're done, too.
3929
3930 Sat Jan 28 10:38:39 1995  Mike Stump  <mrs@cygnus.com>
3931
3932         * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow
3933         vtables whereever they go.
3934
3935         * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't
3936         right.
3937
3938 Sat Jan 28 09:10:44 1995  Mike Stump  <mrs@cygnus.com>
3939
3940         * decl2.c (finish_vtable_vardecl): Now set the
3941         interface/implementation of vtables on the first virtual function,
3942         if one exists, otherwise we use the old method.  This is a major win
3943         in terms of cutting down the size of objects and executables in
3944         terms of text space and data space.  Now most of the savings that
3945         #pragma interface/implementation gives is automatic in a fair number
3946         of cases.
3947
3948 Sat Jan 28 04:57:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3949
3950         * decl.c (grokdeclarator): Discard the template parameters in a
3951         template constructor declaration so that the function is always
3952         named constructor_name (ctype).
3953
3954         * lex.c (check_newline): Use ungetc to put back the character before
3955         calling HANDLE_PRAGMA.
3956
3957 Fri Jan 27 17:23:47 1995  Mike Stump  <mrs@cygnus.com>
3958
3959         * decl2.c (check_classfn): If the cname is T<int> and fn_name is T,
3960         make sure we still match them.
3961
3962 Fri Jan 27 16:32:10 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3963
3964         * parse.y: Add END_OF_LINE token.
3965
3966         * lex.c (check_newline): Set linemode when we see a # directive, and
3967         unset it when we're done.  Turn all 'return's into 'goto skipline'.
3968         Fix all uses of '\n', since we won't see it anymore.  Put back the
3969         character we read before checking for a sysv or target pragma.
3970         (real_yylex): If we see an EOF in linemode, return END_OF_LINE.
3971         (handle_sysv_pragma): Don't look at the input stream; quit when we
3972         see an END_OF_LINE token.
3973
3974         * input.c (getch): Return EOF if we're in line mode and at the end
3975         of a line.
3976         (put_back): Don't put back an EOF.
3977
3978 Thu Jan 26 19:26:34 1995  Mike Stump  <mrs@cygnus.com>
3979
3980         * except.c (expand_throw): Do the newing of the exception object
3981         before we load the type descriptor or the address so that we don't
3982         wipe any of the values out.
3983
3984 Thu Jan 26 19:20:00 1995  Mike Stump  <mrs@cygnus.com>
3985
3986         * except.c (init_exception_processing): Don't use r12 on the rs6000.
3987
3988 Tue Jan 24 16:36:31 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
3989
3990         * decl.c (grokparms): Don't try to build up a reference at this point.
3991
3992         * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR
3993         will suffice to convert from integer_zero_node.
3994
3995 Wed Jan 25 15:02:09 1995  David S. Miller  (davem@nadzieja.rutgers.edu)
3996
3997         * class.c (instantiate_type): Change error message text.
3998         * typeck2.c (store_init_value): Likewise.
3999
4000 Mon Jan 23 21:57:14 1995  Mike Stump  <mrs@cygnus.com>
4001
4002         * pt.c (tsubst): When we copy a node, don't forget to copy
4003         TREE_CHAIN, we use it later.
4004
4005 Mon Jan 23 03:33:47 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4006
4007         * typeck.c (convert_for_assignment): Initialize variable before use.
4008
4009 Fri Jan 20 01:17:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4010
4011         * g++.c (main): Link with both libstdc++ and libg++ if called as
4012         something ending with "g++", otherwise only libstdc++.  Move -lm to
4013         the end of the line.
4014
4015 Thu Jan 19 15:43:11 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4016
4017         * call.c (build_method_call): Don't mess with 'this' before calling
4018         compute_conversion_costs.
4019
4020 Wed Jan 18 15:40:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4021
4022         * search.c (get_matching_virtual): Give line number for previous
4023         declaration.
4024
4025         * call.c (convert_harshness): Handle conversions to references
4026         better.
4027
4028         * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*.
4029
4030 Wed Jan 18 15:21:38 1995  Mike Stump  <mrs@cygnus.com>
4031
4032         * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead,
4033         as the TREE_CHAIN for methods will take us to the next differently
4034         named function, DECL_CHAIN won't.
4035
4036 Wed Jan 18 14:26:59 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4037
4038         * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR.
4039
4040         * decl2.c (lang_decode_option): -Wall implies -Wparentheses.
4041         warn_parentheses defaults to 0.
4042
4043         * decl.c (grokparms): Put back call to require_instantiated_type.
4044
4045 Tue Jan 17 19:56:15 1995  Mike Stump  <mrs@cygnus.com>
4046
4047         * except.c (exception_section): Use the data section on the rs6000.
4048         Change calling convention for named_section.
4049
4050 Wed Jan 17 18:20:57 1994  Fergus Henderson <fjh@munta.cs.mu.oz.au>
4051
4052         * cp-tree.h : Make if (x=0) warn with wall
4053         * parse.y : Make if (x=0) warn with wall
4054
4055 Tue Jan 17 14:12:00 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4056
4057         * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS,
4058         BITS_PER_UNIT otherwise.
4059
4060         * search.c (get_matching_virtual): Don't check the binfo if the
4061         types are the same.
4062
4063         * cvt.c (cp_convert): Just call truthvalue_conversion to convert to
4064         bool.
4065
4066 Mon Jan 16 13:28:48 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4067
4068         * various: Use boolean_type_node, boolean_true_node,
4069         boolean_false_node.
4070
4071         * search.c (get_matching_virtual): Allow covariant returns that
4072         don't require pointer adjustment.
4073
4074         * typeck.c (build_conditional_expr): Don't call default_conversion
4075         on ifexp.
4076
4077         * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR.
4078
4079         * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn.
4080
4081 Sun Jan 15 22:17:32 1995  dcb@lovat.fmrco.COM (David Binderman)
4082
4083         * pt.c (do_function_instantiation): Free targs once we're done.
4084
4085 Sun Jan 15 22:17:32 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4086
4087         * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD.
4088         (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE
4089         for bool.
4090
4091 Sat Jan 14 05:33:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4092
4093         * decl2.c (finish_file): We need to mess up if there are any
4094         variables in the list, not just if there is one with a constructor.
4095
4096 Fri Jan 13 14:42:55 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4097
4098         * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR.
4099         (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR.
4100         (finish_function): Trust rest_of_compilation.
4101
4102         * decl2.c (finish_file): Also call functions designated as static
4103         constructors/destructors.
4104
4105         * decl.c (grokdeclarator): Allow access decls of operator functions.
4106         (grokparms): Only do convert_for_initialization if the initializer
4107         has a type.
4108         (duplicate_decls): Put back push_obstacks_nochange call.
4109
4110         * lex.c (real_yylex): Downgrade complaint about the escape sequence
4111         being too large from pedwarn to warning.
4112
4113         * decl.c (grokdeclarator): Don't complain about long long in system
4114         headers.
4115
4116         * lex.c (real_yylex): Handle digraphs.
4117
4118 Thu Jan 12 12:17:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4119
4120         * decl.c (init_decl_processing): -f{no-,}strict-prototype only
4121         affects C linkage declarations now.
4122
4123         * typeck.c (comp_target_types): Grok simple contravariant conversions.
4124         (common_type): t1 and t2 are interchangeable.
4125
4126         * various: Test return value of comp_target_types differently in
4127         different places; it now returns -1 for a contravariant conversion
4128         (which is fine in symmetric cases).
4129
4130         (common_type): Prefer long double to double even when
4131         they have the same precision.
4132
4133         * decl.c (grokparms): Call convert_for_initialization to check
4134         default arguments.
4135
4136         * init.c (build_new): void_type_node has a size (of 0).
4137
4138         * decl.c (decls_match): Also check for agreement of TREE_READONLY
4139         and TREE_THIS_VOLATILE.
4140         (push_class_level_binding): Properly handle shadowing of
4141         nested tags by fields.
4142
4143         * search.c (dfs_pushdecls): Ditto.
4144
4145         * decl2.c (finish_file): Don't second-guess self-initialization.
4146
4147         * cvt.c (convert_to_reference): Work with expr directly, rather than
4148         a copy.
4149
4150         * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs.
4151
4152         * init.c (add_friend): Downgrade duplicate friend message from
4153         pedwarn to warning.
4154
4155         * decl.c (duplicate_decls): Push obstacks before calling common_type.
4156
4157 Thu Jan 12 17:15:21 1995  Michael Ben-Gershon  <mybg@cs.huji.ac.il>
4158
4159         * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for
4160         exception table labels.
4161         (expand_start_all_catch): Ditto.
4162         (expand_leftover_cleanups): Ditto.
4163         (expand_end_catch_block): Ditto.
4164         * except.c (make_first_label): new function.
4165         (expand_start_all_catch): add a call to make_first_label() before
4166         using a label as a jump destination.
4167         (expand_end_all_catch): Ditto.
4168         (expand_leftover_cleanups): Ditto.
4169         (expand_end_catch_block): Ditto.
4170         (expand_builtin_throw): Ditto.
4171         (expand_throw): Ditto.
4172         * except.c: Add ARM processor support for exception handling.
4173
4174 Thu Jan 12 12:17:24 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4175
4176         (complete_array_type): Copy code from C frontend.
4177
4178         * lex.c (real_yylex): Don't multiply the length of a wide string
4179         literal by WCHAR_BYTES.
4180
4181         * decl.c (pushdecl): Check for redeclaration of wchar_t here.
4182         (duplicate_decls): Instead of here.
4183         (define_label): Complain about a label named wchar_t.
4184         (grokdeclarator): Complain about declarations of
4185         operator-function-ids as non-functions.
4186
4187         * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in
4188         COMPOUND_EXPRs.
4189         (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR.
4190
4191         * lex.c (real_yylex): Don't skip whitespace when reading the next
4192         character after ->.
4193
4194 Wed Jan 11 16:32:49 1995  Mike Stump  <mrs@cygnus.com>
4195
4196         * except.c: Allow cc1plus to be built with native compiler on rs6000.
4197         (expand_start_all_catch): Add assemble_external calls for various
4198         routines we call.
4199         (expand_leftover_cleanups): Ditto.
4200         (expand_start_catch_block): Ditto.
4201         (do_unwind): Ditto.
4202         (expand_builtin_throw): Ditto.
4203
4204 Wed Jan 11 01:05:42 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4205
4206         * decl.c (pushtag): Only look for a previous decl in the current
4207         binding level.  Use explicit global scope in DECL_NESTED_TYPENAME.
4208
4209         * gxx.gperf: Add __signature__ and __sigof__ keywords.
4210
4211         * decl2.c (lang_decode_option): -ansi does not set flag_no_asm.  It
4212         does set flag_no_gnu_keywords and flag_operator_names.
4213
4214         * lex.c (init_lex): 'overload' is not a keyword unless -traditional.
4215         Unset extension keywords if -fno-gnu-keywords.
4216         Allow operator names ('bitand') if -foperator-names.
4217         Never unset 'asm'; -fno-asm only affects 'typeof'.
4218
4219         * decl.c (lookup_name_real): The got_object special lookup only
4220         applies to types.
4221
4222 Tue Jan 10 18:07:51 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4223
4224         * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set.
4225
4226         * parse.y (primary): Unset got_object after all rules that use the
4227         'object' nonterminal.
4228         (object): Set got_object.
4229
4230         * lex.h: Declare got_object.
4231
4232         * decl.c (lookup_name_real): Also lookup names in the context of an
4233         object specified.
4234
4235 Tue Jan 10 14:30:30 1995  Mike Stump  <mrs@cygnus.com>
4236
4237         * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node
4238         for things that have to be added to pointers, not size_type.  Cures
4239         problems with pointer to members on Alphas.
4240         (build_binary_op_nodefault): Ditto.
4241         (get_delta_difference_: Ditto.
4242         (build_ptrmemfunc): Ditto.
4243
4244 Tue Jan 10 01:49:25 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4245
4246         * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing
4247         it.
4248
4249         * typeck.c (build_component_ref): Don't build up a COMPONENT_REF
4250         when dealing with overloaded member functions; just act like
4251         build_offset_ref.
4252         (commonparms): Remove misleading comment.
4253
4254         * decl.c (duplicate_decls): Complain about repeated default
4255         arguments here.
4256         (redeclaration_error_message): Instead of here.
4257         (pushdecl): Complain about missing default arguments here.
4258         (grokparms): Instead of here.
4259         (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME.
4260         (grok_reference_init): Do not complain about missing initializer if
4261         declared 'extern'.
4262
4263         * search.c (lookup_field): Don't return a TYPE_DECL if there is a
4264         function alternative and want_type is not set.
4265
4266 Mon Jan  9 18:16:23 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4267
4268         * decl.c (pushtag): Don't set TYPE_NAME to an identifier.  Do push
4269         the decl when the type has no TYPE_NAME.
4270         (lookup_nested_type): Don't assume that type has TYPE_NAME set.
4271         (lookup_name_real): Call lookup_field with want_type =
4272         prefer_type.
4273
4274         * search.c (lookup_field): Handle want_type properly in the presence
4275         of fields with the same name.
4276
4277         * decl.c (set_nested_typename): Set nested name for file-scope types
4278         to include leading ::.
4279         (pushdecl): Set the nested typename if the decl doesn't have one,
4280         rather than if the type's canonical decl doesn't have one.
4281
4282 Mon Jan  9 03:44:33 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4283
4284         * typeck.c (convert_for_assignment): Complain about contravariance
4285         violation here.
4286         (comp_target_types): Instead of here.
4287         (build_unary_op): resolve_offset_ref before checking for a valid
4288         type.
4289
4290         * spew.c (yylex): Decrement looking_for_typename after we see a
4291         _DEFN.
4292
4293         * decl.c (pushdecl): Don't install an artificial TYPE_DECL in
4294         IDENTIFIER_LOCAL_VALUE if we already have a decl with that name.
4295
4296         * typeck.c (convert_for_assignment): Converting pointers to bool
4297         does not need a cast.
4298
4299 Sun Jan  8 18:16:45 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4300
4301         * class.c (instantiate_type): Initialize nsubsts parm.
4302
4303         * pt.c (do_function_instantiation): Ditto.
4304
4305 Sat Jan  7 14:37:05 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4306
4307         * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE &&
4308         DECL_SAVED_INSNS to determine whether or not we've seen a definition
4309         of this function.
4310         (instantiate_template): Ditto.
4311
4312         * call.c (convert_harshness): Allow const reference binding when
4313         called from the overloading code, but not when called from
4314         can_convert (since it isn't a conversion).
4315         (convert_harshness): Put back some disabled code.
4316
4317 Fri Jan  6 14:10:57 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4318
4319         * call.c (convert_harshness): There is no implicit conversion from
4320         void* to other pointer types (unless the parameter is (void*)0).
4321         (convert_harshness): Non-lvalues do not convert to reference types.
4322
4323         * class.c (finish_struct_methods): Still set
4324         TYPE_HAS_{INT,REAL}_CONVERSION.
4325
4326         * call.c (can_convert): Don't use aggregate initialization.
4327
4328         * cp-tree.h: Declare lookup_conversions.
4329
4330 Thu Jan  5 21:08:00 1995  Mike Stump  <mrs@cygnus.com>
4331
4332         * parse.y (simple_stmt): Fix duplicate case value error messages to
4333         be more readable.
4334
4335 Wed Jan  4 16:44:19 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4336
4337         * cvt.c (build_type_conversion): Total rewrite to use
4338         convert_harshness instead of reproducing conversion logic here.  Now
4339         much shorter.
4340
4341         * call.c (convert_harshness): Support conversions to bool.
4342         (can_convert): Checks whether a conversion is less harsh
4343         than USER_CODE, for build_type_conversion.
4344
4345         * search.c (add_conversions): Function for passing to dfs_walk which
4346         adds all the type conversion operators in the current type to a list.
4347         (lookup_conversions): Calls dfs_walk with add_conversions and return
4348         the list.
4349         (dfs_walk): Don't require a qfn.
4350
4351         * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery.
4352         (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC.
4353
4354         * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery.
4355         (grow_method): A separate function for building onto the growing
4356         method vector.
4357         (finish_struct_methods): Use it.  Put all type conversion operators
4358         right after the constructors.  Perhaps we should sort the methods
4359         alphabetically?
4360
4361 Mon Jan  2 14:42:58 1995  Jason Merrill  <jason@phydeaux.cygnus.com>
4362
4363         * call.c (build_method_call): Lose another misleading shortcut.
4364
4365 Fri Dec 30 17:57:30 1994  Mike Stump  <mrs@cygnus.com>
4366
4367         * gc.c (build_bltn_desc): Handle bool as a built-in type.
4368
4369 Fri Dec 30 14:20:21 1994  Mike Stump  <mrs@cygnus.com>
4370
4371         * tree.c (layout_vbasetypes): Ensure that we don't loose alignment
4372         on the complete type because of small virtual bases.
4373
4374 Fri Dec 30 12:22:29 1994  Mike Stump  <mrs@cygnus.com>
4375
4376         * decl.c (n_incomplete): Bump n_incomplete up to int to match C
4377         front end.
4378         (pushdecl): Also count decls pushed that are of a type being defined
4379         as incomplete things.
4380         * class.c (finish_struct): Move hack_incomplete_structures up to
4381         just after we set it as not being defined, so that the decls we
4382         build for RTTI don't count as incomplete.
4383
4384 Thu Dec 29 18:20:57 1994  Mike Stump  <mrs@cygnus.com>
4385
4386         * pt.c (tsubst): Fix problem with defining constructors in templated
4387         classes with virtual bases.
4388
4389 Wed Dec 28 08:31:00 1994  Mike Stump  <mrs@cygnus.com>
4390
4391         * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid
4392         expressions.
4393         * gc.c (build_typeid): Ditto.
4394
4395 Thu Dec 22 17:26:33 1994  Mike Stump  <mrs@cygnus.com>
4396
4397         * cvt.c (build_up_reference): Fix breakage introduced on Nov 29,
4398         don't assert on complex AGGR inits.
4399
4400 Thu Dec 22 14:32:31 1994  Mike Stump  <mrs@cygnus.com>
4401
4402         * method.c (build_overload_value): Handle pointer to members as
4403         template arguments.
4404
4405 Thu Dec 22 13:09:07 1994  Mike Stump  <mrs@cygnus.com>
4406
4407         * typeck.c (unary_complex_lvalue): Don't call sorry if we know how
4408         to do take the address of a data member for a pointer to data
4409         member.
4410
4411 Thu Dec 22 10:04:19 1994  Mike Stump  <mrs@cygnus.com>
4412
4413         * decl.c (grokdeclarator): Use the typedef name for linkage if the
4414         type doesn't otherwise have a name.
4415
4416         * decl2.c (grokfield): Ditto.
4417
4418         * class.c (finish_struct): Since we reuse the TYPE_DECL for the
4419         DECL_NAME of enums, structs and classes, we have to avoid trying to
4420         put it in the TYPE_FIELDS again.
4421
4422 Wed Dec 21 11:07:05 1994  Mike Stump  <mrs@cygnus.com>
4423
4424         * decl2.c (check_classfn): Ignore this parameter on static functions
4425         when checking to see if we match.
4426
4427 Tue Dec 20 17:47:02 1994  Mike Stump  <mrs@cygnus.com>
4428
4429         * typeck.c (unary_complex_lvalue): Handle address of non-left most
4430         pointers to members by calling get_delta_difference.
4431
4432 Mon Dec 19 22:40:53 1994  Mike Stump  <mrs@cygnus.com>
4433
4434         * decl2.c (check_classfn): Don't use decls_match yet, as it modifies
4435         static functions to early.
4436
4437 Thu Dec 19 22:37:48 1994  Mike Stump  <mrs@cygnus.com>
4438
4439         * method.c (make_thunk): Handle encoding of positive thunk offsets.
4440
4441 Sat Dec 17 13:29:50 1994  Doug Evans  <dje@canuck.cygnus.com>
4442
4443         * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets.
4444
4445 Thu Dec 15 16:32:12 1994  Mike Stump  <mrs@cygnus.com>
4446
4447         * decl2.c (check_classfn): Use decls_match to check if this has
4448         already been declared, as the DECL_ASSEMBLER_NAME may have been
4449         changed via asm("new_name").
4450         * decl.c (decls_match): Make public.
4451
4452 Thu Dec 15 15:17:55 1994  Mike Stump  <mrs@cygnus.com>
4453
4454         * *.[chy] (expand_aggr_init) Add fourth argument to handle
4455         distinction between = init and (init) style of initializations.
4456         * *.[chy] (finish_decl): Add fifth argument to to handle
4457         distinction between = init and (init) style of initializations.
4458
4459 Tue Dec 13 19:16:05 1994  Mike Stump  <mrs@cygnus.com>
4460
4461         Fix some random `explicit' bugs.
4462
4463         * cvt.c (convert_to_reference): Add third parameter to
4464         convert_force.
4465         (convert_force): Ditto.
4466         * call.c (build_method_call): Ditto.
4467         * decl2.c (setup_vtbl_ptr): Ditto.
4468         * init.c (expand_virtual_init): Ditto.
4469         (build_member_call): Ditto.
4470         (build_delete): Ditto.
4471         (build_vbase_delete): Ditto.
4472         * typeck.c (build_component_addr): Ditto.
4473         (build_c_cast): Ditto.
4474         (build_modify_expr): Ditto.
4475         * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can
4476         distinguish the context in which the conversion appears.  Add thrid
4477         argument to build_c_cast.
4478         * cvt.c (cp_convert): Pass whether or not we want to consider
4479         non-converting constructors down to build_method_call.
4480         * decl2.c (reparse_absdcl_as_casts): Add third argument to
4481         build_c_cast.
4482         * gc.c (build_m_desc): Ditto.
4483         * init.c (build_new): Ditto.
4484         * parse.y (expr_no_commas): Ditto.
4485         (primary): Ditto.
4486         * typeck.c (build_x_function_call): Ditto.
4487         (build_static_cast): Ditto.
4488         (build_reinterpret_cast): Ditto.
4489         (build_const_cast): Ditto.
4490         (build_c_cast): Ditto.
4491         (build_ptrmemfunc): Ditto.
4492         * typeck2.c (build_functional_cast): Ditto.
4493         * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to
4494         expand_aggr_init_1 as inits are converted to the destination type.
4495
4496 Tue Dec 13 16:18:57 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4497
4498         * Make-lang.in (cc1plus): Depends on c-pragma.o.
4499
4500         * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o.
4501
4502         * lex.c (check_newline): If the #pragma is not recognized by g++,
4503         try machine-specific ones too.
4504         (handle_sysv_pragma): Copied from c-lex.c.
4505
4506 Mon Dec 12 23:53:06 1994  Mike Stump  <mrs@cygnus.com>
4507
4508         * except.c (expand_throw): Fix Dec 6th change, build_new likes a
4509         reference better.
4510
4511 Mon Dec 12 18:01:00 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4512
4513         * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with
4514         IS_AGGR_TYPE, since now they will not both be set on the same type.
4515
4516         * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on
4517         instantiations controlled by -fexternal-templates.
4518
4519         * decl.c (duplicate_decls): Don't complain about different values of
4520         __attribute__ ((const)) and ((noreturn)).
4521
4522 Fri Dec  9 18:17:37 1994  Doug Evans  <dje@cygnus.com>
4523
4524         * Makefile.in (BISONFLAGS): Delete --yacc.
4525         (PARSE_H): Depend on $(PARSE_C), for parallel makes.
4526         (PARSE_C): Undo last patch.
4527
4528 Fri Dec  2 10:44:36 1994  Mike Stump  <mrs@cygnus.com>
4529
4530         * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in
4531         y.tab.c.
4532
4533 Thu Dec  8 17:39:46 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4534
4535         * decl.c (finish_decl): Don't call obscure_complex_init for decls
4536         of indeterminate size.
4537
4538 Wed Dec  7 16:49:22 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4539
4540         * decl.c (obscure_complex_init): Function to tweak the decl to
4541         prevent expand_decl from tring to initialize it.
4542         (finish_decl): Use it rather than writing the same code in three
4543         different places.
4544
4545         * parse.y (bad_parm): Stop trying to support parms without types.
4546
4547 Wed Dec  7 12:06:56 1994  Mike Stump  <mrs@cygnus.com>
4548
4549         * decl2.c (grokfield): Make asm specs on static member functions
4550         work.
4551
4552 Tue Dec  6 15:43:20 1994  Mike Stump  <mrs@cygnus.com>
4553
4554         * except.c (expand_throw): Make a copy of the thrown object.
4555
4556 Tue Dec  6 14:16:34 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4557
4558         * parse.y: : has lower precedence than =.
4559
4560 Tue Dec  6 12:46:17 1994  Mike Stump  <mrs@cygnus.com>
4561
4562         * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace
4563         manglings.
4564         (grokvardecl): Add namespace into variable name.
4565
4566 Tue Dec  6 11:26:55 1994  Mike Stump  <mrs@cygnus.com>
4567
4568         * decl2.c (current_namespace_id): New routine to transform a simple
4569         name into a name in a namespace.
4570         * decl.c (grokdeclarator): Use it.
4571         * decl2.c (get_namespace_id): Find the name of the current
4572         namespace.
4573         (push_namespace, pop_namespace): Complete out missing
4574         functionality.
4575
4576 Mon Dec  5 17:11:51 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4577
4578         * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may
4579         not be defined.  Fix warning message for enums and restore warning
4580         for non-enums.
4581
4582         * decl2.c (push_namespace): Dummy function.
4583         (pop_namespace): Ditto.
4584         (do_namespace_alias): Ditto.
4585         (do_using_decl): Ditto.
4586         (do_using_directive): Ditto.
4587
4588         * parse.y: New token NSNAME for namespace names.
4589         (extdef): Add namespace, using definitions.
4590         (using_decl): New rule for using declarations.
4591         (any_id): New rule for identifiers with any degree of scoping.
4592         (identifier): Add NSNAME.
4593         (notype_identifier): Ditto.
4594         (component_decl): Add using_decl.
4595         (nested_name_specifier): Add NSNAME SCOPE.
4596
4597         * typeck.c (convert_for_assignment): Handle conversions between
4598         enums and bool.
4599
4600         * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on
4601         FUNCTION_DECLs.
4602
4603 Mon Dec  5 13:03:16 1994  Mike Stump  <mrs@cygnus.com>
4604
4605         * class.c (finish_struct): Give an error if one tries to declare a
4606         bit-field's size greater than a long long, as the backend will dump.
4607         It is not an error to declare an enum bit-field greater than its
4608         precision.  Warn if an enum bit-field is too small to hold all
4609         its values.
4610
4611 Mon Dec  5 11:41:50 1994  Mike Stump  <mrs@cygnus.com>
4612
4613         * typeck.c (convert_for_assignment): Use cp_convert instead of
4614         convert so that we don't get static casts.
4615
4616 Sun Dec  4 11:59:01 1994  Mike Stump  <mrs@cygnus.com>
4617
4618         * cvt.c (cp_convert): Don't complain about int->enum conversion if
4619         we are doing static casts.
4620
4621 Fri Dec  2 18:32:41 1994  Mike Stump  <mrs@cygnus.com>
4622
4623         * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs
4624         when dumping expressions in error messages.
4625
4626 Fri Dec  2 17:04:27 1994  Mike Stump  <mrs@cygnus.com>
4627
4628         * gc.c (build_dynamic_cast): Change interface to libg++, ensure that
4629         the return type is the right type, and make references work.
4630
4631 Fri Dec  2 16:36:43 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4632
4633         * decl.c (poplevel): Don't be confused by function-scope
4634         declarations of non-nested functions.
4635         (duplicate_decls): Propagate DECL_MAIN_VARIANT.
4636         (pushdecl): Use duplicate_decls to copy info from old decl into new
4637         function-scope one rather than doing it here.
4638
4639         * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT
4640         of this decl, in case this is a function-scope declaration.
4641
4642         * decl.c (finish_enum): Make sure that the type has the right
4643         precision when we call fixup_*_type.
4644
4645 Tue Nov 29 19:12:07 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4646
4647         * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do
4648         want to build up references to rvalues if possible.
4649         (cp_convert): Stick on a NOP_EXPR when converting to the same type.
4650
4651 Tue Nov 29 11:28:59 1994  Mike Stump  <mrs@cygnus.com>
4652
4653         * parse.y (maybe_raises): Handle throw ().
4654         * parse.y (ansi_raise_identifier): grok type-ids in exception
4655         specifications.
4656         * tree.c (build_exception_variant): Use list compare to check if
4657         two exception specifications match.
4658         * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error
4659         messages.
4660         * call.c (build_method_call): Remove TREE_RAISES.
4661         * cvt.c (convert_to_aggr): Ditto.
4662         * typeck.c (build_function_call_real, convert_arguments): Ditto.
4663         * init.c (expand_aggr_init_1): Ditto.
4664
4665 Tue Nov 29 09:50:39 1994  Mike Stump  <mrs@cygnus.com>
4666
4667         * except.c: Add support for m68k and mips exception handling
4668         support.
4669
4670 Tue Nov 29 08:48:33 1994  Mike Stump  <mrs@cygnus.com>
4671
4672         * except.c (expand_end_all_catch): Throw into outer context, if we
4673         fall off end of catch handlers.
4674
4675 Mon Nov 28 16:44:41 1994  Mike Stump  <mrs@cygnus.com>
4676
4677         * Makefile.in: Make is easier to decide where parse.[ch] will be
4678         built.
4679
4680 Thu Nov 17 20:11:24 1994  Doug Evans  <dje@cygnus.com>
4681
4682         * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name.
4683         (GXX_INSTALL_NAME) Likewise.
4684         (CXX_CROSS_NAME) Use program_transform_cross_name.
4685         (GXX_CROSS_NAME) Likewise.
4686         (c++.install-man): Use program_transform_name on g++.1.
4687         (c++.uninstall): Likewise.
4688
4689 Mon Nov 28 13:53:03 1994  Mike Stump  <mrs@cygnus.com>
4690
4691         * parse.y (THROW): Fix precedence of throw expressions.
4692
4693 Mon Nov 28 13:15:16 1994  Mike Stump  <mrs@cygnus.com>
4694
4695         * typeck.c (build_unary_op): Allow promotions from bool to int on
4696         unary ~.
4697
4698 Sun Nov 27 00:16:21 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4699
4700         * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for
4701         classes when appropriate.
4702         (build_overload_nested_name): When dealing with a function context,
4703         use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to
4704         avoid conflicts between local classes of the same name.
4705
4706 Wed Nov 23 17:59:42 1994  Mike Stump  <mrs@cygnus.com>
4707
4708         * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c
4709         (duplicate_decls, grokdeclarator), cp-tree.h: Add support for
4710         `explicit'.
4711         * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1,
4712         build_type_conversion): Use LOOKUP_ONLYCONVERTING in
4713         build_method_calls so that non-converting constructors are not used.
4714         * call.c (build_method_call): If we shouldn't use a non-converting
4715         constructor, then don't.
4716
4717 Wed Nov 23 14:46:56 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4718
4719         * call.c (build_method_call): Don't try to synthesize methods yet.
4720
4721 Tue Nov 22 12:45:21 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4722
4723         * pt.c (push_template_decls): Create CONST_DECLs for template
4724         constant parameters, not VAR_DECLs.
4725
4726 Sat Nov 19 15:28:31 1994  Jim Wilson  (wilson@chestnut.cygnus.com)
4727
4728         * typeck.c (build_binary_op_nodefault): Can shorten shift only if
4729         shift count is less than size in bits of arg0.
4730
4731 Thu Nov 17 15:30:50 1994  Mike Stump  <mrs@cygnus.com>
4732
4733         * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new
4734         ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not,
4735         not_eq, or, or_eq, typename, using, xor, xor_eq to g++.  Still need
4736         to add support for explicit, namespace, typename, and using, support
4737         for the rest is already in.
4738
4739 Fri Nov  4 19:04:18 1994  Mike Stump  <mrs@cygnus.com>
4740
4741         * gc.c (get_bad_cast_node): New routine to support compile time
4742         throws of bad_cast.
4743         * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile
4744         time.
4745
4746 Fri Nov  4 11:12:00 1994  Mike Stump  <mrs@cygnus.com>
4747
4748         * except.c: Add hppa support.
4749
4750 Fri Nov  4 10:50:50 1994  Mike Stump  <mrs@cygnus.com>
4751
4752         * except.c: Add rs6000 support.
4753
4754 Thu Nov  3 14:24:23 1994  Mike Stump  <mrs@cygnus.com>
4755
4756         * except.c (do_unwind): Add i[34]86 support.
4757
4758 Thu Nov  3 00:10:46 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4759
4760         * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit
4761         instantiations.
4762
4763 Wed Nov  2 15:08:24 1994  Kung Hsu  (kung@mexican.cygnus.com)
4764
4765         * decl.c (finish_function): emit types used in method parameters
4766         into symbol table.
4767
4768 Wed Nov  2 15:05:47 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4769
4770         * pt.c (process_template_parm): Allow pointer to member function
4771         template parameter types.
4772         (uses_template_parms): Handle pointer to member function
4773         CONSTRUCTORs.
4774
4775         * g++.c (main): Cast first argument of bzero to (char *).
4776         Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'.
4777
4778 Mon Oct 31 14:50:48 1994  Kung Hsu  (kung@mexican.cygnus.com)
4779
4780         * gc.c (build_dynamic_cast): rewrite to make it work.
4781         * class.c (finish_vtbls): build more vtables if flag_rtti is on.
4782         * class.c (modify_all_direct_vtables): ditto.
4783         * init.c (expand_direct_vtbls_init): expand more vtables if
4784         flag_rtti is on.
4785         * decl.c (init_type_desc): add default return.
4786
4787 Tue Oct 25 17:13:09 1994  Kung Hsu  (kung@mexican.cygnus.com)
4788
4789         * tree.c (debug_binfo): get rid of the initial size entry of
4790         vtable.
4791         * cp-tree.h: change flag_dossier to flag rtti, define type
4792         descriptor type nodes.
4793         * decl.c (init_type_desc): new function to initialize type
4794         descriptor type nodes.
4795         * decl.c (record_builtin_type): change flag_dossier to flag_rtti.
4796         * lex.c (init_lex): ditto.
4797         * decl.c : change variable flag_dossier to flag_rtti.
4798         * decl.c (duplicate_decls): get rid initial size entry of vtable.
4799         * decl.c (hack_incomplete_structures): take out assert 164.
4800         * search.c (get_abstract_virtuals_1): ditto.
4801         * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to
4802         CLASSTYPE_RTTI.
4803         * parse.y: ditto.
4804         * class.c (prepare_fresh_vtable): for virtual bases, get right
4805         offset.
4806         * class.c (add_virtual_function): change flag_dossier to
4807         flag_rtti.
4808         * class.c (modify_one_vtable): modify the right rtti entry.
4809         * class.c (override_one_vtable): get rid of size entry.
4810         * class.c (finish_struct): change flag_dossier to flag_rtti, and
4811         build extra vtables, build type descriptors for polymorphic
4812         classes.
4813         * gc.c (build_headof): make headof() works correctly with new
4814         rtti.
4815         * gc.c (build_typeid): make this function work with new rtti.
4816         * gc.c (get_typeid): make this function work with new rtti.
4817         * gc.c (build_bltn_desc): new function for new rtti.
4818         * gc.c (build_user_desc): ditto.
4819         * gc.c (build_class_desc): ditto.
4820         * gc.c (build_ptr_desc): ditto.
4821         * gc.c (build_attr_desc): ditto.
4822         * gc.c (build_func_desc): ditto.
4823         * gc.c (build_ptmf_desc): ditto.
4824         * gc.c (build_ptmd_desc): ditto.
4825         * gc.c (build_t_desc): ditto.
4826         * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc.
4827
4828 Tue Oct 25 13:37:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4829
4830         * call.c (convert_harshness): Check for TREE_UNSIGNED differences
4831         after checking for integral conversions.
4832
4833 Wed Nov 30 19:13:50 1994  Mike Stump  <mrs@cygnus.com>
4834
4835         * Version 2.6.3 released.
4836
4837 Thu Nov 17 10:56:50 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4838
4839         * typeck2.c (build_m_component_ref): Check the basetype of the
4840         member pointer against the main variant of the object type.
4841
4842 Mon Nov 14 14:21:52 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4843
4844         * cvt.c (convert_to_reference): Make sure that the original expr
4845         gets its type back when converting a reference.
4846
4847         * method.c (build_overload_name): Clear numeric_outputed_need_bar here.
4848         (build_decl_overload): Instead of here.
4849
4850 Tue Nov  8 17:11:24 1994  Jason Merrill  <jason@phydeaux.cygnus.com>
4851
4852         * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a
4853         function.
4854
4855         * typeck.c (convert_for_initialization): Handle initialization from
4856         a TARGET_EXPR.
4857
4858 Sun Nov  6 01:34:24 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4859
4860         * pt.c (lookup_nested_type_by_name): Fix list-walking logic.
4861         (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate
4862         TYPE_READONLY and TYPE_VOLATILE from the argument.
4863         (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals
4864         present in parm from arg.
4865         (type_unification): Strip REFERENCE_TYPE from the argument type.
4866         (unify): Don't strip REFERENCE_TYPE from the argument type.
4867
4868 Sat Nov  5 22:42:15 1994  Greg McGary  (gkm@magilla.cichlid.com)
4869
4870         * pt.c (do_type_instantiation): Check to see if there's a
4871         IDENTIFIER_TEMPLATE on a class before calling
4872         instantiate_member_templates().
4873
4874 Sat Nov 12 06:35:42 1994  Mike Stump  <mrs@cygnus.com>
4875
4876         * Version 2.6.2 released.
4877
4878 Thu Nov  3 18:48:19 1994  Paul Eggert  <eggert@twinsun.com>
4879
4880         * Makefile.in (spew.o, lex.o, pt.o):
4881         Depend on $(srcdir)/parse.h, not parse.h.
4882
4883 Tue Nov  1 19:19:41 1994  Mike Stump  <mrs@cygnus.com>
4884
4885         * Version 2.6.1 released.
4886
4887 Sun Oct 23 13:19:55 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4888
4889         * decl2.c: Declare flag_access_control.
4890         (struct lang_f_options): Add access-control.
4891         * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control
4892         for the call to expand_aggr_init to copy the object out of the
4893         pcc_struct_return slot.
4894         * search.c (compute_access): if (!flag_access_control) return
4895         access_public.
4896
4897 Fri Oct 21 00:32:54 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4898
4899         * lex.c (cons_up_default_function): Don't try to defer method
4900         synthesis now.
4901
4902         * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl
4903         instead of abort, since the OSF/1 dynamic linker doesn't like to see
4904         relocation entries for abort.
4905
4906         * tree.c (array_type_nelts_total): Use sizetype, not
4907         integer_type_node.
4908         (array_type_nelts_top): Ditto.
4909
4910 Thu Oct 20 15:48:27 1994  Mike Stump  <mrs@cygnus.com>
4911
4912         * decl.c (grokdeclarator): Added handling for catch parameters
4913         (CATCHPARM).
4914         * except.c (expand_start_catch_block): Use the new CATCHPARM context
4915         instead of NORMAL.
4916         * except.c (expand_throw): Don't let convert_to_reference complain
4917         about what we are doing.
4918
4919 Thu Oct 20 12:55:24 1994  Jim Wilson  (wilson@cygnus.com)
4920
4921         * method.c (emit_thunk): Call instantiate_virtual_regs.
4922
4923 Wed Oct 19 14:15:33 1994  Mike Stump  <mrs@cygnus.com>
4924
4925         * except.c (expand_exception_blocks): Make sure throw code doesn't
4926         get put in function that won't be output.
4927
4928 Mon Oct 17 18:03:15 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4929
4930         * decl.c (init_decl_processing): Make alloca a builtin.
4931
4932 Thu Oct 27 21:10:25 1994  Craig Burley  (craig@burley)
4933
4934         * g++.c (main): Only decrement "added" and set "library" to
4935         NULL when "library" != NULL (just like 940829 fix).
4936
4937 Mon Oct 17 15:56:11 1994  Mike Stump  <mrs@cygnus.com>
4938
4939         * except.c (expand_start_catch_block): Make sure the false label
4940         gets onto the permanent obstack, as it is used for the exception
4941         table.
4942
4943 Fri Oct 14 18:54:48 1994  Mike Stump  <mrs@cygnus.com>
4944
4945         * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can
4946         be set just below, use current_fndecl instead.
4947
4948 Fri Oct 14 15:12:22 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4949
4950         * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1
4951         with LOOKUP_SPECULATIVELY.
4952         (expand_default_init): Abort if build_method_call returns NULL_TREE.
4953
4954         * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if
4955         the rhs is a TARGET_EXPR.
4956
4957         * parse.y (left_curly): Anonymous types are not affected by #pragma
4958         interface/implementation.
4959
4960         * method.c (synthesize_method): Don't call setup_vtbl_ptr for the
4961         default constructor if it isn't needed.
4962
4963         * lex.c (cons_up_default_function): Do synthesize methods for
4964         anonymous types if necessary.
4965
4966 Thu Oct 13 17:44:55 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4967
4968         * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0.
4969
4970 Wed Oct 12 13:27:57 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4971
4972         * typeck.c (build_modify_expr): Understand how to copy an aggregate.
4973
4974         * init.c (expand_default_init): Ditto.  Also remove some of the
4975         crufty code that assumes methods will not be synthesized properly.
4976
4977         * lex.c (cons_up_default_function): If the containing type has no
4978         name, these functions should never need to be called, so just
4979         declare them.
4980
4981         * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the
4982         bitmask for lexing character constants.
4983
4984         * call.c (build_method_call): Disable code that tries to do tricky
4985         stuff with a default parameter that is a constructor call, but
4986         actually does other tricky stuff that breaks things.
4987
4988 Wed Oct 12 16:14:01 1994  Benoit Belley  <belley@cae.ca>
4989
4990         * decl.c (finish_enum): Disable code which forces enums to be signed,
4991         since this conflicts with their use as bitfields. type_promotes_to
4992         handles promotion of enums of underlying unsigned types to signed
4993         integer types.
4994
4995 Wed Oct 12 13:24:03 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
4996
4997         * cvt.c (type_promotes_to): Also promote enums to long if
4998         appropriate.
4999
5000         * typeck.c (default_conversion): Don't expect type_promotes_to to
5001         return a main variant.
5002
5003 Wed Oct 12 12:19:45 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5004
5005         * call.c (build_scoped_method_call): Don't lose side effects in the
5006         object expression when calling a non-existent destructor.
5007
5008 Fri Sep  2 19:05:21 1994  Rohan Lenard  (rjl@iassf.easams.com.au)
5009
5010         * call.c (build_scoped_method_call): Remove erroneous error message
5011         when destructor call is written as a scoped call.
5012
5013 Tue Oct 11 23:48:31 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5014
5015         * various: Cast pointer arguments to bzero and bcopy to char *.
5016
5017 Tue Oct 11 19:34:32 1994  Mike Stump  <mrs@cygnus.com>
5018
5019         * class.c (get_derived_offset): Added a type parameter to limit how
5020         far up the CLASSTYPE_VFIELD_PARENT chain we search.
5021         * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the
5022         offset to put into the vtable for the this parameter, make sure we
5023         don't offset from a parent of the DECL_CONTEXT of the function.
5024
5025 Tue Oct 11 16:10:52 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5026
5027         * pt.c (do_function_instantiation): Set DECL_EXTERNAL and
5028         TREE_STATIC when setting DECL_INTERFACE_KNOWN.
5029         (do_type_instantiation): Ditto.
5030
5031         * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN,
5032         DECL_EXTERNAL and TREE_STATIC as appropriate.
5033
5034         * decl2.c (finish_file): Also synthesize methods that don't have
5035         DECL_EXTERNAL set.  Set interface_unknown before doing so.
5036
5037         * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the
5038         function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL.
5039
5040 Mon Oct 10 00:56:53 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5041
5042         * lex.c (cons_up_default_function): Mark methods in a template class
5043         as template instances.  Store the values of interface_unknown and
5044         interface_only for do_pending_inlines.
5045         (do_pending_inlines): Use them.
5046
5047         * decl2.c (finish_file): If we haven't seen a definition of a
5048         function declared static, make the decl non-PUBLIC so compile_file
5049         can give an error.
5050
5051 Sun Oct  9 02:42:29 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5052
5053         * method.c (do_build_copy_constructor): Handle anonymous unions.
5054         (do_build_assign_ref): Ditto.
5055         (largest_union_member): Move from lex.c.
5056
5057 Sat Oct  8 14:59:43 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5058
5059         Re-implement g++'s vague linkage independent of TREE_PUBLIC.
5060         * pt.c (instantiate_member_templates): Lose redundant
5061         -fexternal-templates handling.
5062         (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls.  Don't set
5063         TREE_STATIC or DECL_INTERFACE_KNOWN.
5064         (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead
5065         of DECL_EXTERNAL for explicit instantiations.
5066         (do_function_instantiation): Do the new thing.
5067         (do_type_instantiation): Ditto.
5068         (instantiate_template): Deal with member templates defined in a .cc
5069         file with -fexternal-templates.
5070         * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to
5071         decide whether to stick builtin_throw here.
5072         * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN
5073         rather than TREE_PUBLIC.  Generally fix rules.
5074         (finish_file): Use DECL_INITIAL to determine whether or not a method
5075         has been synthesized, rather than TREE_ASM_WRITTEN.
5076         * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of
5077         TREE_PUBLIC.
5078         (pushdecl): Ditto.
5079         (duplicate_decls): Ditto.  Deal with DECL_DECLARED_STATIC and
5080         DECL_INTERFACE_KNOWN. 
5081         (redeclaration_error_message): Fix checking for conflicting linkage.
5082         (define_function): Set DECL_INTERFACE_KNOWN.
5083         (grokfndecl): Function decls are PUBLIC until we are sure about
5084         their linkage.  Set DECL_DECLARED_STATIC as needed.
5085         (start_function): Deal with linkage.  Move pushdecl after linkage
5086         magic.
5087         (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines.
5088         * cp-tree.h (lang_decl_flags): Add interface_known and
5089         declared_static.
5090         (DECL_INTERFACE_KNOWN): New macro.
5091         (DECL_DECLARED_STATIC): New macro.
5092         (DECL_PUBLIC): New macro.
5093
5094         Clean up bogus use of TREE_PUBLIC.
5095         * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it
5096         doesn't correspond to TREE_PROTECTED and TREE_PRIVATE).
5097         * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC.
5098
5099 Wed Oct  5 13:44:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5100
5101         * call.c (build_overload_call_real): Don't immediately do
5102         array->pointer conversion.
5103
5104         * pt.c (type_unification): If not passing to a reference, strip
5105         cv-quals.  Also handle array->pointer conversion.
5106
5107 Tue Oct  4 17:45:37 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5108
5109         * decl.c (grokdeclarator): Don't warn about applying const to a
5110         const typedef or template type parameter.
5111
5112         * decl2.c (finish_file): Also synthesize methods after walking the
5113         vtables.  Ugly ugly ugly.
5114
5115 Mon Oct  3 15:02:41 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5116
5117         * various: Remove lingering remnants of old exception handling code.
5118
5119         * decl2.c (finish_file): Synthesize methods before walking the
5120         vtables, so that the vtables get emitted as needed.
5121
5122         * decl.c (shadow_tag): Remove obsolete code for pushing tags and
5123         dealing with exceptions.
5124
5125 Mon Oct  3 13:05:27 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
5126
5127         * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS).
5128
5129 Mon Oct  3 02:59:28 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5130
5131         * decl2.c (finish_file): Fix inline handling.
5132
5133 Sun Oct  2 00:21:56 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5134
5135         * decl.c (grokdeclarator): Handle redundant scope even better.
5136         ({push,pop}_cp_function_context): Take toplev parameter.
5137
5138         * method.c (synthesize_method): Pass toplev parameter to
5139         {push,pop}_cp_function_context depending on decl_function_context
5140         (fndecl).
5141
5142         * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the
5143         built-in version.
5144
5145         * method.c (synthesize_method): Don't be confused by __in_chrg
5146         parameter.
5147
5148         * class.c (popclass): Set C_C_D like start_function does.
5149
5150         * decl.c (grokdeclarator): Handle redundant scope better.
5151
5152         * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule.
5153         (direct_notype_declarator): Ditto.
5154         (complex_direct_notype_declarator): Remove it here.
5155
5156 Sat Oct  1 21:42:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
5157
5158         * init.c (resolve_offset_ref): Fix types used in resolving .*
5159         expressions.
5160
5161 Sat Oct  1 15:18:49 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
5162
5163         Beginnings of work to synthesize methods only when needed.
5164         * call.c (build_method_call): Synthesize methods as necessary
5165         (currently never necessary).
5166         * class.c (popclass): Don't try to set C_C_D here, as it'll end up
5167         on the wrong obstack.
5168         * decl.c (push_cp_function_context): Mostly copied from
5169         push_c_function_context.
5170         (pop_cp_function_context): Similarly.
5171         (finish_function): Reverse order of poplevel and pop_nested_class so
5172         that current_class_decl is restored properly.  
5173         (start_function): Ditto.
5174         (finish_function): Add parameter 'nested'.  Don't call
5175         permanent_allocation if (nested).
5176         * various: Pass extra parameter to finish_function.     
5177         * decl2.c (finish_file): Reorganize end-of-file inline handling,
5178         synthesizing methods as necessary.
5179         * lex.c (cons_up_default_function): Call mark_inline_for_output.
5180         Only synthesize methods immediately if #pragma implementation
5181         (currently disabled).
5182         (do_pending_inlines): Call synthesize_method.
5183         * method.c (synthesize_method): New function; all method synthesis
5184         goes through here.  Calls do_build_assign_ref and
5185         do_build_copy_constructor.
5186         (build_default_constructor): Remove.
5187         (build_dtor): Ditto.
5188         (build_assign_ref): Rename to do_build_assign_ref and remove stuff
5189         done by synthesize_method.
5190         (build_copy_constructor): Similarly.
5191
5192 Thu Sep 29 16:58:52 1994  Mike Stump  <mrs@cygnus.com>
5193
5194         * typeck.c (c_expand_return): Use magic so the backend can fixup the
5195         assignment into the return register, so cleanups won't clobber it.
5196
5197 Thu Sep 29 13:08:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
5198
5199         * method.c (hack_identifier): Don't call assemble_external for
5200         template decls.
5201
5202         * decl.c (finish_decl): Also end temporary allocation if the decl in
5203         question has a type of error_mark_node.
5204
5205 Wed Sep 28 21:45:00 1994  Mike Stump  <mrs@cygnus.com>
5206
5207         * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure
5208         that if the ?: was a reference type, that the subparts will be also.
5209
5210 Wed Sep 28 16:14:04 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5211
5212         * except.c (register_exception_table): Use Pmode, not PTRmode.
5213
5214 Fri Sep 23 13:54:27 1994  Jason Merrill  (jason@deneb.cygnus.com)
5215
5216         * lex.c (do_pending_inlines): Do method synthesis after the
5217         pending_inlines have been reversed.
5218
5219 Thu Sep 22 12:53:03 1994  Per Bothner  (bothner@kalessin.cygnus.com)
5220
5221         * decl2.c (finish_file):  Fix Brendan's fix:  Only call
5222         register_exception_table if there is a non-empty exception table.
5223
5224 Thu Sep 22 12:03:46 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5225
5226         * decl2.c (finish_file): Only do register_exception_table if
5227         -fhandle-exceptions is being used.
5228
5229 Wed Sep 21 19:01:51 1994  Per Bothner  (bothner@kalessin.cygnus.com)
5230
5231         * except.c (output_exception_table_entry):  Simplify
5232         by using assemble_integer.
5233         (build_exception_table):  Change to return a count.
5234         Cleanup to use standard macros, instead of hard-wired
5235         sparc asm format.  Don't make __EXCEPTION_TABLE__ global.
5236         (register_exception_table):  New function.  Generate call to builtin.
5237         * decl2.c (finish_file):  Call register_exception_table.
5238         * cp-tree.h (build_exception_table):  Fix prototype.
5239
5240 Wed Sep 21 13:20:42 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5241
5242         * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL.
5243
5244         * decl2.c (delete_sanity): Give an error at trying to delete a
5245         function.
5246
5247 Wed Sep 21 11:47:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
5248
5249         * lex.c (cons_up_default_function): Mark synthesized destructors
5250         inline.
5251
5252         * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as
5253         something other than __wchar_t, complaining if -pedantic and not in
5254         a system header.
5255
5256 Tue Sep 20 09:43:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
5257
5258         * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos
5259         here.
5260
5261         * typeck.c (build_modify_expr): Require complete type after checking
5262         for error_mark_node.
5263
5264         * call.c (build_method_call): Print parmtypes when complaining of
5265         ambiguous call.
5266
5267         * typeck.c (build_modify_expr): Handle assignment to array from
5268         non-array.
5269
5270         * decl.c (lookup_name_real): Deal with got_scope == error_mark_node.
5271
5272         * call.c (build_method_call): Don't bother with the exact match.
5273
5274 Mon Sep 19 00:51:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
5275
5276         * init.c (expand_aggr_init): If we munge the type of the variable,
5277         also munge the type of the initializer.
5278
5279         * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER.
5280         (init_decl_processing): Push artificial declaration of wchar_t so
5281         people don't have to declare it before they can use it.
5282
5283         * error.c (cp_line_of): return lineno in lieu of 0.
5284
5285         * typeck.c (convert_for_assignment): Handle conversion of pmfs to
5286         int and bool.
5287         (build_component_ref): Fold the COMPONENT_REF in case it can be
5288         reduced.
5289
5290         * typeck2.c (store_init_value): Don't pedwarn about non-constant
5291         bracketed initializers for automatic variables.
5292
5293 Sun Sep 18 10:12:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
5294
5295         * error.c (dump_decl): Don't say `typedef enum foo foo'.
5296
5297         * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just
5298         because they're affected by #pragma i/i.  We'll deal with that when
5299         they get instantiated.
5300
5301         * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case.
5302
5303         * class.c (instantiate_type): Set TREE_CONSTANT on instantiated
5304         ADDR_EXPRs if appropriate.
5305
5306         * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types.
5307
5308         * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an
5309         initializer properly.
5310         * typeck2.c (digest_init): Ditto.
5311
5312         * tree.c (cp_build_type_variant): Like c_build_type_variant, except
5313         it uses build_cplus_array_type.
5314         * *.c: Use cp_build_type_variant instead of c_build_type_variant.
5315
5316         * pt.c (do_type_instantiation): Don't try to instantiate nested
5317         enums.
5318
5319 Tue Sep 13 10:56:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
5320
5321         * cvt.c (build_up_reference): Handle preincrement and predecrement
5322         properly.
5323
5324 Tue Sep 13 09:51:59 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5325
5326         * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in
5327         fact, static.
5328
5329 Mon Sep 12 14:40:30 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5330
5331         * decl.c (finish_decl): Lay out the rtl for DECL before doing
5332         grok_reference_init, in case it's static.
5333
5334 Mon Sep 12 12:45:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
5335
5336         * class.c (finish_struct): Don't synthesize constructors if the
5337         class has a field with the same name as the class.  Don't die on
5338         classes with no constructors or destructors.  Don't die if the head
5339         and tail of the class are in different files.
5340
5341         * decl.c (grokdeclarator): Don't treat a function pointer field
5342         with the same name as the class as a constructor.
5343
5344 Fri Sep  9 13:17:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
5345
5346         * typeck.c (build_c_cast): Pull constant values out of their
5347         variables here.
5348
5349         * decl.c (duplicate_decls): Only propagate DECL_CHAIN in
5350         FUNCTION_DECLs and TEMPLATE_DECLs.
5351
5352 Thu Sep  8 10:07:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
5353
5354         * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that
5355         have it.
5356
5357         * pt.c (unify): REALs and INTEGERs only unify with their own genus.
5358         (instantiate_member_templates): Don't muck with DECL_EXTERNAL and
5359         TREE_PUBLIC unless -fexternal-templates.
5360
5361 Wed Sep  7 13:17:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
5362
5363         * pt.c (do_type_instantiation): Call instantiate_member_templates.
5364         Deal with specializations.
5365         (tsubst): Don't stick the mangled name in DECL_NAME for function
5366         instantiations.  Don't push them, either.
5367
5368         * decl2.c (grokfield): Move code for generating the
5369         DECL_ASSEMBLER_NAME for static members from here.
5370         * method.c (build_static_name): To here.
5371         * decl.c (grokvardecl): Call build_static_name.
5372         (duplicate_decls): Keep old DECL_ASSEMBLER_NAME.
5373
5374 Mon Sep  5 12:49:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
5375
5376         * call.c (build_method_call): if -Wsynth, warn when selecting
5377         synthesized op= over user-supplied one cfront would select.
5378         * decl2.c (lang_decode_option): Handle -Wsynth.
5379
5380 Fri Sep  2 15:11:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
5381
5382         * decl.c (finish_enum): Overhaul to fix several bugs.
5383         (start_enum): Disable useless code.
5384
5385 Thu Sep  1 16:04:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
5386
5387         * typeck.c (c_expand_return): Warn about returning a reference to a
5388         temporary.
5389         (convert_arguments): Increment argument counter when using default
5390         arguments, too.
5391
5392 Wed Aug 31 14:29:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
5393
5394         * decl.c (finish_decl): If the type of decl is error_mark_node,
5395         don't bother trying to do anything.
5396
5397         * typeck.c (convert_for_initialization): If the rhs contains a
5398         constructor call, pretend the lhs type needs to be constructed.
5399
5400         * init.c (expand_default_init): If we stick the object inside the
5401         initializer, mark the initializer used.
5402
5403 Tue Aug 30 13:50:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
5404
5405         * method.c (build_assign_ref): return *this;
5406         (build_assign_ref): Fix base assignment order.
5407         (build_copy_constructor): Fix member init order.
5408
5409 Mon Aug 29 13:54:39 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5410
5411         * g++.c (main): Remember to clear out SAW_SPECLANG after we see
5412         its argument.
5413
5414 Sat Aug 27 09:36:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
5415
5416         * method.c (build_copy_constructor): Also copy virtual bases.
5417
5418 Fri Aug 26 17:05:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
5419
5420         * lex.c (do_pending_inlines): Clear out pending_inlines before doing
5421         any synthesis.  Also first set deja_vu on all pending_inlines.
5422
5423         * method.c (build_assign_ref): Use build_member_call to invoke base
5424         operator=, rather than build_modify_expr.  And use
5425         build_reference_type instead of TYPE_REFERENCE_TO.
5426         (build_copy_constructor): Use TYPE_NESTED_NAME to identify the
5427         basetype.
5428
5429         * decl2.c (grokfield): Don't complain about undefined local class
5430         methods.
5431
5432         * class.c (finish_struct): Don't try to synthesize methods here.
5433         * lex.c (do_pending_inlines): Instead, synthesize them here.
5434         (init_lex): Initialize synth_obstack.
5435         (cons_up_default_function): Stick synthesis request on
5436         pending_inlines.
5437
5438 Fri Aug 26 12:24:14 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5439
5440         * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also
5441         accept an RTL_EXPR in what we're about to use for the instance,
5442         since anything which would end up with pcc_struct_return set
5443         inside cplus_expand_expr.
5444
5445         * cp-tree.h (cons_up_default_function): Note change of prototype.
5446
5447 Thu Aug 25 23:05:30 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
5448
5449         * class.c (finish_struct): Undid change from Aug 21 testing
5450         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
5451         * parse.y (left_curly): Ditto, undid change from Aug 21.
5452         * decl.c (xref_tag): Undid change from Aug 21, set
5453         CLASSTYPE_INTERFACE correctly, and added comments.
5454
5455 Thu Aug 25 00:36:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
5456
5457         Rework approach to synthesized methods; don't go through the parser
5458         anymore.
5459         * class.c (finish_struct): Use new synthesis approach.
5460         * lex.c (cons_up_default_function): Now just creates declaration,
5461         not code.
5462         (largest_union_member): #if 0 out.
5463         (default_assign_ref_body): Ditto.
5464         (default_copy_constructor_body): Ditto.
5465         * method.c (build_default_constructor): New function to synthesize X().
5466         (build_copy_constructor): Synthesize X(X&).
5467         (build_assign_ref): Synthesize X::operator=(X&).
5468         (build_dtor): Synthesize ~X().
5469
5470         * error.c (cp_line_of): If we're dealing with an artificial
5471         TYPE_DECL, look at the type instead.
5472
5473 Wed Aug 24 11:11:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
5474
5475         * init.c (sort_member_init): Check warn_reorder.
5476         * decl2.c (lang_decode_option): Handle -W{no-,}reorder.
5477
5478         * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro.
5479         * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates.
5480         * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE.
5481
5482 Tue Aug 23 09:28:35 1994  Mike Stump  <mrs@cygnus.com>
5483
5484         * error.c (dump_decl): Improve wording, so that error messages
5485         dont't read template<, class foo>...
5486
5487 Mon Aug 22 15:30:51 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5488
5489         * parse.y (label_colon): Also match a TYPENAME as a label name,
5490         since they may have declared a class by that name but have also
5491         tried to have a local label under the same name.
5492
5493         * pt.c (coerce_template_parms): Call cp_error, not cp_error_at,
5494         for the message so they know at what point it was instantiated.
5495
5496 Sun Aug 21 23:07:35 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
5497
5498         * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
5499         CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time.
5500         * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
5501         CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time.
5502         * parse.y (left_curly): New final resting place for setting
5503         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures.
5504
5505         * class.c (finish_struct): Don't test for function/field name
5506         conflicts in signatures, since all the fields are compiler-constructed.
5507
5508 Fri Aug 19 14:04:47 1994  Kung Hsu  (kung@mexican.cygnus.com)
5509
5510         * method.c (build_overload_nested_name): in qualified name
5511         mangling, the template with value instantiation will have numeric
5512         at end and may mixed with the name length of next nested level.
5513         Add a '_' in between.
5514         * method.c (build_overload_name): ditto.
5515         * method.c (build_overload_identifier): ditto.
5516
5517 Thu Aug 18 16:24:43 1994  Mike Stump  <mrs@cygnus.com>
5518
5519         * error.c (dump_decl): Handle NULL args.
5520
5521 Thu Sep 29 16:15:36 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>
5522
5523         * g++.c: Rework last change so it's done like collect.c (and 
5524         gcc.c).
5525
5526 Wed Sep 14 10:17:27 1994  Michael I Bushnell  <mib@churchy.gnu.ai.mit.edu>
5527
5528         * g++.c: Include <sys/errno.h> in case `errno' is a macro
5529         as permitted by ANSI C.
5530
5531 Thu Aug 18 12:48:09 1994  Mike Stump  <mrs@cygnus.com>
5532
5533         * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and
5534         CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time.
5535         * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and
5536         CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time.
5537         * parse.y (left_curly): New final resting place for setting
5538         CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING.
5539
5540 Thu Aug 11 11:32:42 1994  H.J. Lu  (hjl@nynexst.com)
5541
5542         * g++.c (main): Only decrement "added" and set "library" to
5543           NULL when "library" != NULL.
5544
5545 Sat Aug 13 00:14:52 1994  Jason Merrill  (jason@deneb.cygnus.com)
5546
5547         * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl
5548         just because its class has a known interface.
5549         (decls_match): Deal with new format of template parms.
5550
5551         * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and
5552         DECL_EXTERNAL here.
5553
5554 Fri Aug 12 01:55:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
5555
5556         * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs.
5557         (xref_defn_tag): Ditto.
5558         (pushdecl): Only allow artificial typedefs to be shadowed.
5559
5560         * init.c (emit_base_init): Pass the right binfos to
5561         expand_aggr_init_1.
5562
5563         * class.c (delete_duplicate_fields_1): Make it work right.
5564         (finish_struct): Catch function/field name conflict.
5565
5566         * decl2.c (check_classfn): Pass the function to cp_error, not just
5567         the name.
5568
5569         * init.c (sort_member_init): Warn when order of member initializers
5570         does not match order of member declarations.
5571         (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT.
5572
5573         * error.c (dump_expr): Handle lists of functions.
5574
5575         * decl.c (start_function): #pragma interface only affects functions
5576         that would otherwise be static.
5577         (finish_decl): Don't warn about an unused variable if it has both
5578         constructor and destructor, since the 'resource allocation is
5579         initialization' idiom is relatively common.
5580
5581         * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs.
5582         (comp_target_parms): Ditto.
5583         (compparms): Never consider default parms.
5584         (common_base_type): Don't choose a virtual baseclass if there is a
5585         more derived class in common.
5586         (build_conditional_expr): If pedantic, pedwarn about conversion to
5587         common base in conditional expr.
5588
5589         * class.c (instantiate_type): Handle template instantiation better.
5590
5591         * typeck.c (convert_arguments): Don't try to get tricky and convert
5592         to int directly when PROMOTE_PROTOTYPES is set, as it breaks
5593         user-defined conversions.
5594
5595         * lex.c (check_for_missing_semicolon): Also give error at end of
5596         file.
5597
5598         * call.c (build_method_call): Don't promote arrays to pointers here.
5599
5600         * typeck.c (convert_arguments): Don't require the actual parameter
5601         to be of a complete type if the formal parameter is a reference.
5602
5603 Thu Aug 11 15:21:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
5604
5605         * decl.c (grokdeclarator): Soften 'static' on member function error
5606         to pedwarn.
5607
5608         * init.c (build_new): Don't automatically save rval.
5609         (build_offset_ref): Do field lookup with proper basetype_path.
5610
5611 Thu Aug 11 12:46:54 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
5612
5613         * errfn.c (cp_silent): Declare to mark when we should avoid
5614         emitting warnings and errors.
5615         (cp_error): Check it.
5616         (cp_warning): Likewise.
5617         (cp_pedwarn): Likewise.
5618         (cp_compiler_error): Likewise.
5619         (cp_error_at): Likewise.
5620         (cp_warning_at): Likewise.
5621         (cp_pedwarn_at): Likewise.
5622         * call.c (compute_conversion_costs): Set CP_SILENT when we start
5623         out, and make sure we turn it off before we leave.
5624
5625 Thu Aug 11 00:02:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
5626
5627         * decl2.c (grok_array_decl): Try computing *(A+B) if neither
5628         argument is obviously an array.
5629
5630 Wed Aug 10 15:32:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
5631
5632         * typeck.c (c_expand_start_case): Do cleanups here.
5633
5634         * parse.y (xcond): Do bool conversion here, too.
5635         (simple_stmt, SWITCH case): Don't do cleanups here.
5636
5637         * decl.c (duplicate_decls): Don't treat builtins that have been
5638         explicitly declared specially.
5639
5640 Tue Aug  9 01:16:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
5641
5642         * tree.c (make_deep_copy): Support copying pointer, reference,
5643         function, array, offset and method types.
5644
5645         * decl.c (init_decl_processing): Mark exit and abort as
5646         BUILT_IN_NONANSI so that duplicate_decls is kinder about
5647         redeclaration.
5648         (duplicate_decls): Don't give two errors for redeclaring a C
5649         function with the same parms but a different return type.
5650
5651         * parse.y (paren_cond_or_null): Do cleanup and bool conversion here.
5652         (condition): Instead of here.
5653         (simple_stmt, SWITCH case): Also do cleanup here.
5654
5655         * decl2.c (finish_anon_union): Only break out FIELD_DECLs.
5656
5657         * call.c (build_method_call): Don't throw away the side effects of
5658         the object in a call to a non-existent constructor.
5659         * parse.y (primary): Ditto.
5660
5661         * method.c (build_decl_overload): Oop.
5662
5663         * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin,
5664         warn about uselessness of specifying -fansi-overloading.
5665
5666         * method.c (build_decl_overload): Treat any non-member new with one
5667         parameter as __builtin_new.
5668
5669         * decl.c (init_decl_processing): Setup built-in meanings of exit,
5670         _exit and abort.
5671
5672 Mon Aug  8 15:03:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
5673
5674         * error.c (dump_readonly_or_volatile): Put a space between const and
5675         volatile if both apply.
5676
5677         * init.c (perform_member_init): Clean up after this initialization.
5678         (emit_base_init): Clean up after each base init, not after all have
5679         been done.
5680         (expand_aggr_vbase_init_1): Clean up after this init.
5681
5682 Sun Aug  7 14:55:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
5683
5684         * call.c (build_method_call): Deal with destroying references.
5685
5686         * parse.y (condition): Do bool_truthvalue_conversion here.
5687         (paren_expr_or_null): And here.
5688         (simple_if): Not here.
5689         (simple_stmt): Or here.
5690
5691 Sat Aug  6 22:29:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
5692
5693         * parse.y (paren_expr_or_null): Wrap the expression in a
5694         CLEANUP_POINT_EXPR.
5695         (condition): Ditto.
5696
5697 Sat Aug  6 19:46:37 1994  Rohan Lenard  (rjl@easams.com.au)
5698
5699         * call.c (build_scoped_method_call): Fix error message when
5700         destructor call refers to a nonexistent type.
5701
5702 Sat Apr 16 22:43:30 1993  Gerald Baumgartner  (gb@cs.purdue.edu)
5703
5704         * lex.h (rid): Deleted RID_RAISES, it's never used.
5705         Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION,
5706         RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration,
5707         they don't need to be touched in `grokdeclarator.'
5708         (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE.
5709
5710         * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of
5711         RID_MAX as loop limit for finding declaration specifiers.
5712
5713 Sat Apr  3 21:59:07 1993  Gerald Baumgartner  (gb@cs.purdue.edu)
5714
5715         * lex.c (debug_yytranslate): Moved to parse.y since it needs to
5716         access `yytname,' which is static in parse.c.
5717
5718 Fri Apr  2 23:36:57 1993  Gerald Baumgarnter  (gb@cs.purdue.edu)
5719
5720         * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it
5721         was `GNU_xref_def' instead of `GNU_xref_ref.'
5722
5723 Fri Aug  5 14:20:16 1994  Jason Merrill  (jason@deneb.cygnus.com)
5724
5725         * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and
5726         DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that.
5727         (do_type_instantiation): Ditto.
5728
5729         * decl2.c (import_export_inline): Decides at EOF what an inline's
5730         linkage should be.
5731         (finish_file): Call it.
5732
5733         * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC
5734         and DECL_EXTERNAL from do_*_instantiation.  Only set
5735         DECL_DEFER_OUTPUT on inlines whose linkage might actually change.
5736         (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to
5737         mark for later consideration, rather than DECL_FUNCTION_MEMBER_P.
5738
5739 Fri Aug  5 01:12:20 1994  Mike Stump  <mrs@cygnus.com>
5740
5741         * class.c (get_class_offset_1, get_class_offset): New routine to
5742         find the offset of the class where a virtual function is defined,
5743         from the complete type.
5744         * class.c (modify_one_vtable, fixup_vtable_deltas): Use
5745         get_class_offset instead of virtual_offset as get_class_offset will
5746         always provide the right answer.
5747         * tree.c (virtual_offset): Remove.  It only ever worked some of the
5748         time.
5749
5750 Tue Aug  2 12:44:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
5751
5752         * call.c (build_method_call): Put back unary_complex_lvalue call
5753         that I thought was redundant.
5754
5755         * typeck.c (c_expand_return): Fix a case I missed before.
5756
5757 Sun Jul 31 17:54:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
5758
5759         * pt.c (unify): Strip cv-quals from template type arguments (when
5760         'const T*' is matched to 'const char*', that does not mean that T is
5761         'const char').
5762
5763 Fri Jul 29 01:03:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
5764
5765         * pt.c (do_type_instantiation): Instantiate nested TAGS, not
5766         typedefs.  Third time's the charm?
5767
5768         * parse.y (template_parm): Support default template parms.
5769         * pt.c (process_template_parm): Ditto.
5770         (end_template_parm_list): Ditto.
5771         (coerce_template_parms): Ditto.
5772         (mangle_class_name_for_template): Ditto.
5773         (push_template_decls): Ditto.
5774         (unify): Ditto.
5775         * method.c (build_overload_identifier): Ditto.
5776         * error.c (dump_decl): Ditto.
5777
5778 Wed Jul 27 17:47:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
5779
5780         * pt.c (do_type_instantiation): Only instantiate nested *classes*.
5781
5782 Tue Jul 26 13:22:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
5783
5784         * search.c (note_debug_info_needed): Also emit debugging information
5785         for the types of fields.
5786
5787 Mon Jul 25 00:34:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
5788
5789         * pt.c (lookup_template_class): Pass 'template' to
5790         coerce_template_parms instead of 'in_decl', since it's a more
5791         meaningful context.
5792
5793         * typeck.c (c_expand_return): Make sure any cleanups for the return
5794         expression get run.
5795         (build_c_cast): Use CONVERT_EXPR for conversion to void.
5796
5797         * pt.c (do_type_instantiation): Also instantiate nested types.
5798
5799         * typeck.c (convert_for_assignment): Don't die when comparing
5800         pointers with different levels of indirection.
5801
5802         * decl.c (grokdeclarator): The sub-call to grokdeclarator for
5803         class-local typedefs sets DECL_ARGUMENTS, so we need to clear it
5804         out.
5805
5806         * decl2.c (finish_anon_union): Don't die if the union has no
5807         members.
5808
5809         * decl.c (grokdeclarator): Undo changes to declspecs when we're done
5810         so that 'typedef int foo, bar;' will work.
5811
5812         * decl2.c (finish_file): Don't call expand_aggr_init for
5813         non-aggregates.
5814
5815 Mon Jul 25 00:03:10 1994  Teemu Torma  (tot@trema.fi)
5816
5817         * decl.c (finish_function): We can't inline constructors and
5818         destructors under some conditions with -fpic, but don't unset
5819         DECL_INLINE.
5820
5821 Mon Jul 25 00:03:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
5822
5823         * typeck.c (build_object_ref): Make sure 'datum' is a valid object.
5824
5825 Sun Jul 24 14:19:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
5826
5827         * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on
5828         non-fields.
5829         (finish_struct_methods): Use copy_assignment_arg_p.
5830
5831         * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead
5832         of giving an error.
5833
5834         * typeck.c (build_binary_op_nodefault): Don't set result_type if we
5835         don't know how to compare the operands.
5836
5837         * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op'
5838         as a declarator-id in their program.  Like the Linux headers do.
5839         Arrgh.
5840
5841         * tree.c (lvalue_p): Treat calls to functions returning objects by
5842         value as lvalues again.
5843
5844         * typeck.c (build_component_addr): Use convert_force to convert the
5845         pointer in case the component type is also a private base class.
5846
5847         * search.c (get_matching_virtual): Fix bogus warning of overloaded
5848         virtual.
5849
5850         * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created
5851         TYPE_DECL to fix bogus shadowing warnings.
5852
5853 Fri Jul 22 01:15:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
5854
5855         * init.c (expand_aggr_init_1): const and volatile mismatches do not
5856         prevent a TARGET_EXPR from initializing an object directly.
5857
5858 Tue Jul 19 17:55:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
5859
5860         * cvt.c (build_up_reference): Allow building up references to
5861         `this', don't warn about making references to artificial variables
5862         (like `this').
5863
5864         * tree.c (lvalue_p): `this' is not an lvalue.
5865
5866         * call.c (build_method_call): Accept using a typedef name (or
5867         template type parameter) for explicit destructor calls.
5868
5869 Thu Jul 14 09:42:23 1994  Mike Stump  <mrs@cygnus.com>
5870
5871         * Version 2.6.0 released.
5872
5873 Wed Jul 13 03:57:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
5874
5875         * method.c (hack_identifier): Put back old code so lists of
5876         non-functions will be handled properly.
5877
5878         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now
5879         defined in the language-independent tree.h.
5880
5881         * tree.c (count_functions): Avoid bogus warning when compiling this
5882         function.
5883
5884 Mon Jul 11 18:37:20 1994  Jason Merrill  (jason@deneb.cygnus.com)
5885
5886         * decl.c (grok_reference_init): Always save the initializer of a
5887         reference.
5888
5889 Fri Jul  8 17:41:46 1994  Mike Stump  <mrs@cygnus.com>
5890
5891         * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
5892         CLEANUP_POINT_EXPRs so that the stack slots can be reused.
5893         (disabled for now)
5894
5895 Fri Jul  8 12:59:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
5896
5897         * method.c (hack_identifier): Fix for new overloading.
5898
5899         * typeck.c (build_binary_op_nodefault): Don't mess with division by
5900         zero.
5901
5902 Fri Jul  8 13:20:28 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
5903
5904         * decl2.c (finish_file): Only call walk_sigtables, if
5905         flag_handle_signatures is turned on, don't waste time otherwise.
5906
5907 Fri Jul  8 02:27:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
5908
5909         * decl.c (push_overloaded_decl): Don't create overloads of one when
5910         shadowing a class type.
5911         * typeck.c (build_x_function_call): Complain about overloads of one.
5912
5913         * decl.c (grokdeclarator): Don't try to treat a char* as a tree.
5914         (grokdeclarator): Fix setting of TREE_STATIC.
5915         (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
5916
5917 Thu Jul  7 22:20:46 1994  Gerald Baumgartner  (gb@andros.cygnus.com)
5918
5919         * cp-tree.h (walk_sigtables): Created extern declaration.
5920         * decl2.c (walk_sigtables): Created function, patterned after
5921         walk_vtables, even though we only need it to write out sigtables.
5922         (finish_sigtable_vardecl): Created function.
5923         (finish_vtable_vardecl): Changed 0 to NULL_PTR.
5924         (finish_file): Call walk_sigtables.
5925
5926         * sig.c (build_signature_table_constructor): Mark class member
5927         function pointed to from signature table entry as addressable.
5928
5929 Thu Jul  7 13:39:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
5930
5931         * decl.c (start_decl): Check new decl of static member variable
5932         against the declaration in the class here.
5933         (grokvardecl): Instead of here.
5934
5935         * class.c (prepare_fresh_vtable): Call import_export_vtable if not
5936         -fvtable-thunks.
5937         (build_vtable): Ditto.
5938
5939         * decl2.c (import_export_vtable): Move logic for deciding the
5940         interface of a template class from here.
5941         (import_export_template): To here.
5942         (finish_vtable_vardecl): Call import_export_template before
5943         import_export_vtable.
5944
5945 Wed Jul  6 20:25:48 1994  Mike Stump  <mrs@cygnus.com>
5946
5947         * except.c (init_exception_processing): Setup interim_eh_hook to
5948         call lang_interim_eh. 
5949         * except.c (do_unwind): Propagate throw object value across
5950         stack unwinding.
5951         * except.c (saved_throw_value): Used to hold the value of the object
5952         being thrown.  It is always a reference to the real value.
5953         * except.c (expand_start_catch_block): Add handling for the
5954         value of the exception object.
5955         * except.c (expand_start_catch_block): Add handler for the handler,
5956         so that throws inside the handler go to the outer block.
5957         * except.c (expand_end_catch_block): Ditto.
5958         * parse.y (handler_args): Use parm instead, as the other doesn't yet
5959         handle references correctly.
5960
5961 Wed Jul  6 17:55:32 1994  Per Bothner  (bothner@kalessin.cygnus.com)
5962
5963         * decl2.c (mark_vtable_entries):  If -ftable-thunks, set the
5964         vtable entry properly to abort.
5965
5966 Tue Jul  5 14:07:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
5967
5968         * typeck.c (build_binary_op_nodefault): Downgrade division by zero
5969         errors to warnings.
5970
5971         * call.c (build_overload_call_real): Handle fnname being a list of
5972         functions.
5973         * typeck.c (build_x_function_call): Pass list of functions to
5974         build_overload_call, not just the name.
5975         * tree.c (count_functions): Complain when called for invalid
5976         argument.
5977
5978         * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
5979         and DECL_EXTERNAL on static members and initialized const members.
5980         * decl2.c (grokfield): Reflect this change.
5981
5982 Fri Jul  1 09:35:51 1994  Jason Merrill  (jason@deneb.cygnus.com)
5983
5984         * parse.y (init): ANSI C++ does not forbid { }.
5985
5986 Thu Jun 30 00:35:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
5987
5988         * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall.
5989         warn_nonvdtor defaults to off.
5990
5991         * class.c (instantiate_type): Use comptypes rather than relying on 
5992         types to satisfy ==.
5993
5994         * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that
5995         might be static.
5996
5997         * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs.
5998
5999         * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs.
6000
6001         * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of
6002         build_cplus_new.
6003
6004 Wed Jun 29 22:31:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
6005
6006         * decl2.c (finish_file): Maybe consider static inlines multiple
6007         times, in case they reference each other.
6008
6009 Tue Jun 28 11:58:38 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
6010
6011         * class.c (finish_struct): Don't `cons_up_default_function's
6012         for signatures.
6013         (finish_struct): Handle an empty method_vec correctly.
6014
6015         * decl.c (grokdeclarator): Don't warn about a signature being
6016         empty in a signature pointer declaration if we only saw a
6017         forward declaration of the signature.  Changed `warning's into
6018         `cp_warning's.
6019
6020         * sig.c (build_sigtable): Don't die if a null signature table
6021         constructor is returned.
6022         (build_signature_pointer_constructor): If the signature table
6023         constructor is null, the _sptr field is set to a null pointer
6024         and cast to the appropriate type.  Make copies of all null
6025         pointers so that the type null_pointer_node doesn't get changed.
6026         (build_signature_table_constructor): Added comments.
6027
6028         * sig.c (build_signature_pointer_constructor): Complain if we
6029         try to assign to/initialize a signature pointer/reference of
6030         an undefined signature.
6031
6032 Mon Jun 27 14:05:16 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
6033
6034         * typeck2.c (store_init_value): Don't be pedantic about
6035         non-constant initializers of signature tables/pointers/references.
6036
6037 Fri Jun 24 16:49:41 1994  Gerald Baumgartner  (gb@cs.purdue.edu)
6038
6039         * decl.c (grokdeclarator): If we are grokking an opaque typedef
6040         in a signature, don't complain about it begin static.
6041
6042 Wed Jun 29 16:44:45 1994  Mike Stump  <mrs@cygnus.com>
6043
6044         Fixes a problem of the this pointer being wrong in virtual calls to
6045         methods that are not overridden in more derived classes.
6046
6047         * class.c (fixup_vtable_delta): New routine.  It will fixup the
6048         delta entries in vtables, wheever they need updating.
6049         * class.c (finish_struct): Call the new routine for all virtual
6050         bases, as they can have different offsets, than those used in base
6051         classes that we derive our vtable from.
6052
6053 Tue Jun 28 23:49:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6054
6055         * typeck.c (build_binary_op): Use the types before default
6056         conversions in the error message.
6057
6058         * *.c: Use c_build_type_variant instead of build_type_variant where
6059         the type might be an array.
6060
6061         * call.c (build_method_call): Call build_type_variant and
6062         build_reference_type in the right order.
6063         * decl.c (record_builtin_type): Ditto.
6064
6065 Wed Jun 29 16:58:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
6066
6067         * call.c (build_method_call): Call build_type_variant and
6068         build_reference_type in the right order.
6069         * decl.c (record_builtin_type): Ditto.
6070
6071 Tue Jun 28 23:49:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6072
6073         * typeck.c (build_binary_op): Use the types before default
6074         conversions in the error message.
6075
6076         * *.c: Use c_build_type_variant instead of build_type_variant where
6077         the type might be an array.
6078
6079 Sat Jun 25 11:50:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
6080
6081         * cvt.c (convert_to_reference): Try UDC's before doing the
6082         reinterpret_cast thang, though.
6083
6084 Fri Jun 24 01:24:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
6085
6086         * typeck.c (c_expand_return): Don't USE the return value location
6087         after we've expanded the jump.
6088
6089         * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before
6090         trying to write out an inline.
6091
6092         * cvt.c (build_up_reference): Also do address adjustment when the
6093         target type uses MI.
6094         (convert_to_reference): Try UDCs only after built-in conversions.
6095         (build_type_conversion_1): Don't play games with the argument to the
6096         method.
6097         (build_type_conversion): #if 0 out code for binding to reference.
6098
6099 Thu Jun 23 00:22:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6100
6101         * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide
6102         whether to emit inlines.
6103
6104         * decl.c (grokdeclarator): Set explicit_int for decls that just
6105         specify, say, 'long'.
6106
6107         * init.c (do_friend): Do overload C functions (or call pushdecl,
6108         anyaway).
6109
6110 Wed Jun 22 13:40:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
6111
6112         * cvt.c (build_up_reference): Don't call readonly_error.
6113         (convert_to_reference): Propagate const and volatile from expr to
6114         its type.
6115
6116         * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues.
6117
6118         * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when
6119         creating a temporary.
6120         (convert_to_reference): Lose excessive and incorrect trickiness.
6121         (cp_convert): Call build_cplus_new with with_cleanup_p set.
6122
6123         * typeck2.c (build_functional_cast): Ditto.
6124
6125 Tue Jun 21 17:38:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
6126
6127         * decl.c (grokdeclarator): signed, unsigned, long and short all
6128         imply 'int'.
6129
6130         * decl.c (grokdeclarator): Allow "this is a type" syntax.
6131         (grok_reference_init): Simplify and fix.
6132
6133 Sun Jun 19 17:08:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
6134
6135         * decl.c (grokdeclarator): pedwarn about a typedef that specifies no
6136         type.
6137
6138 Sat Jun 18 04:16:50 1994  Jason Merrill  (jason@deneb.cygnus.com)
6139
6140         * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL
6141         tinkering to after call to pushdecl.
6142
6143 Fri Jun 17 14:48:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6144
6145         * call.c (build_method_call): Handle destructors for non-aggregate
6146         types properly.
6147
6148 Thu Jun 16 16:48:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
6149
6150         * call.c (build_method_call): Make sure that the name given for the
6151         destructor matches the constructor_name of the instance.
6152
6153         * pt.c (do_function_instantiation): A non-extern instantiation
6154         overrides a later extern one.
6155         (do_type_instantiation): Ditto.
6156
6157 Wed Jun 15 19:34:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
6158
6159         * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the
6160         unqualified array type.
6161
6162         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a
6163         CONSTRUCTOR with no elements.
6164
6165         * decl.c (various): Lose empty_init_node.
6166         (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR
6167         thing depending on the value of DECL_COMMON instead of
6168         flag_conserve_space, do the empty CONSTRUCTOR thing for types that
6169         don't have constructors, don't treat a real empty CONSTRUCTOR
6170         specially.
6171
6172         * typeck2.c (process_init_constructor): Don't treat empty_init_node
6173         specially.
6174
6175 Wed Jun 15 19:05:25 1994  Mike Stump  <mrs@cygnus.com>
6176
6177         * class.c (override_one_vtable): Don't forget to merge in an old
6178         overrider when we wanted to reuse a vtable, but couldn't.
6179
6180 Wed Jun 15 15:03:16 1994  Jason Merrill  (jason@deneb.cygnus.com)
6181
6182         * decl.c (start_decl): Put statics in common again.
6183
6184         * decl.c (grokdeclarator): Return NULL_TREE for an error rather than
6185         setting the type to error_mark_node.
6186
6187         * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum
6188         bitfield assignments.
6189
6190 Tue Jun 14 12:23:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
6191
6192         * decl.c (grok_op_properties): Const objects can be passed by value.
6193
6194 Mon Jun 13 03:10:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
6195
6196         * decl2.c (import_export_vtable): Force implicit instantiations to
6197         be interface_only when -fno-implicit-templates.
6198
6199         * decl.c (duplicate_decls): Redeclaring a class template name is an
6200         error.
6201
6202         * pt.c (end_template_decl): Call GNU_xref_decl for class templates.
6203         * xref.c (GNU_xref_decl): Support templates.
6204
6205 Sat Jun 11 17:09:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
6206
6207         * decl.c (grok_op_properties): Split out checking for whether this
6208         function should suppress the default assignment operator.
6209         * decl2.c (grok_function_init): Ditto.
6210         (copy_assignment_arg_p): New function do do just that.
6211         Now considers virtual assignment operators that take a base as an
6212         argument to count as copy assignment operators.
6213
6214         * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and
6215         TREE_ASM_WRITTEN, as they are redundant.
6216
6217         * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a
6218         decl that has no LANG_SPECIFIC part.
6219         (do_type_instantiation): Force the debugging information for this
6220         type to be emitted.
6221
6222         * decl.c (start_decl): Clear up uses of various types of templates
6223         (say sorry for static data members, rather than "invalid template"). 
6224         (expand_static_init): Fix initialization of static data members of
6225         template classes.
6226
6227 Fri Jun 10 00:41:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
6228
6229         * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members.
6230
6231         * g++.c (main): Use -xc++-cpp-output for .i files.
6232
6233         * pt.c (tsubst): Give meaningful error about declaring template for
6234         a copy constructor which was not declared in the class template.
6235         (do_type_instantiation): Explicit instantiation before the class
6236         template is an error.
6237         (instantiate_template): Don't die if tsubst returns error_mark_node.
6238
6239 Thu Jun  9 19:04:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
6240
6241         Don't synthesize the copy assignment operator if the one in a base
6242         class is pure virtual.
6243         * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate
6244         whether the type has a pure virtual copy assignment operator.
6245         * class.c (finish_base_struct): Don't generate the copy assignment
6246         operator if a base class has a pure virtual one.
6247         * decl.c (grok_op_properties): Add disabled code to set
6248         TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is
6249         actually set.
6250         * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF.
6251
6252         * decl2.c (import_export_vtable): Always treat template
6253         instantiations as if write_virtuals >= 2, and treat implicit
6254         instantiations as external if -fno-implicit-templates.
6255         (finish_file): Output all pending inlines if
6256         flag_keep_inline_functions.
6257
6258 Wed Jun  8 20:48:02 1994  Mike Stump  <mrs@cygnus.com>
6259
6260         * tree.c (layout_vbasetypes): Align virtual base classes inside
6261         complete objects, so that we don't core dump on machines such as
6262         SPARCs when we access members that require larger than normal
6263         alignments, such as a double.  Also, we bump up the total alignment
6264         on the complete type, as necessary.
6265
6266 Wed Jun  8 16:18:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
6267
6268         * gxxint.texi (Free Store): New section with code for examining
6269         cookie.
6270         (Limitations of g++): Remove operator delete entry, since it is no
6271         longer accurate.  Fix access control entry.
6272
6273         * typeck.c (build_unary_op): Pedwarn about taking the address of or
6274         incrementing a cast to non-reference type.
6275         (build_modify_expr): Use convert instead of convert_force again.
6276
6277         * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for
6278         class type, not == RECORD_TYPE.
6279
6280         * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE.
6281
6282         * typeck2.c (report_case_error): #if 0 out.
6283         * lex.c (real_yylex): Lose RANGE.
6284         * parse.y: Ditto.
6285
6286 Tue Jun  7 18:17:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
6287
6288         * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE.
6289
6290 Mon Jun  6 19:39:57 1994  Jason Merrill  (jason@deneb.cygnus.com)
6291
6292         * typeck.c (build_c_cast): Don't shortcut conversions to the same
6293         type.  Don't replace consts with their values here, since that's now
6294         done in cp_convert.
6295
6296         * cvt.c (cp_convert): When converting to bool, take
6297         integer_zero_node to false_node and all other INTEGER_CSTs to
6298         true_node.
6299         (build_type_conversion): Don't complain about multiple conversions
6300         to float if we're not really converting.
6301
6302 Fri Jun  3 02:10:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
6303
6304         Implement 'extern template class A<int>;' syntax for suppressing
6305         specific implicit instantiations.
6306         * cp-tree.h: Update prototypes for do_*_instantiation.
6307         * pt.c (do_pending_expansions): Don't compile 'extern' explicit
6308         instantiations.
6309         (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit
6310         instantiations.
6311         (do_type_instantiation): Ditto.
6312         * parse.y (explicit_instantiation): Support 'extern template class
6313         A<int>;' syntax.
6314         * decl.c (start_function): Don't modify the settings of TREE_PUBLIC
6315         and DECL_EXTERNAL on explicit instantiations.
6316
6317         * cvt.c (cp_convert): Replace constants with their values before
6318         converting.
6319         (cp_convert): Consistently use 'e' instead of 'expr'.
6320
6321 Thu Jun  2 03:53:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
6322
6323         * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first.
6324
6325 Wed Jun  1 18:57:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
6326
6327         * typeck2.c (digest_init): Handle initializing a pmf with an
6328         overloaded method.
6329         * typeck.c (build_ptrmemfunc): Handle overloaded methods.
6330
6331         * decl.c (pushtag): Use build_decl to make TYPE_DECLs.
6332         (xref_defn_tag): Ditto.
6333         * pt.c (process_template_parm): Ditto.
6334         (lookup_template_class): Ditto.
6335         (push_template_decls): Ditto.
6336         (instantiate_class_template): Ditto.
6337         (create_nested_upt): Ditto.
6338         * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on
6339         TYPE_DECLs.
6340
6341         * typeck.c (convert_arguments): Make sure type is not NULL before
6342         checking its TREE_CODE.
6343
6344 Wed Jun  1 17:40:39 1994  Mike Stump  <mrs@cygnus.com>
6345
6346         * class.c (get_derived_offset): New routine.
6347         * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and
6348         BINFO_VIRTUALS when we choose a new base class to inherit from.
6349         * class.c (modify_one_vtable): Use get_derived_offset to get the
6350         offset to the most base class subobject that we derived this binfo
6351         from.
6352         * class.c (finish_struct): Move code to calculate the
6353         DECL_FIELD_BITPOS of the vfield up, as we need might need it for
6354         new calls to get_derived_offset in modify_one_vtable.
6355
6356 Wed Jun  1 16:50:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
6357
6358         * init.c (build_member_call): Use build_pointer_type instead of
6359         TYPE_POINTER_TO.
6360
6361 Wed Jun  1 11:11:15 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6362
6363         * decl.c (grokdeclarator): Make sure we have a DNAME set before we
6364         try to use it in an error.
6365
6366 Wed Jun  1 09:48:49 1994  Mike Stump  <mrs@cygnus.com>
6367
6368         * typeck.c (convert_arguments, convert_for_initialization): Don't
6369         strip NOP_EXPRs, when we are converting to a reference.
6370
6371 Wed Jun  1 01:11:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
6372
6373         * typeck.c (build_modify_expr): Don't dereference references when
6374         initializing them.
6375
6376         * decl2.c (grokfield): Don't check for grokdeclarator returning
6377         error_mark_node any more.
6378
6379         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6380         (start_method): Return void_type_node instead of error_mark_node.
6381
6382         * typeck.c (build_modify_expr): Resolve offset refs earlier.
6383
6384 Tue May 31 16:06:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
6385
6386         * call.c (build_method_call): Resolve OFFSET_REFs in the object.
6387
6388         * typeck.c (build_modify_expr): Dereference references before trying
6389         to assign to them.
6390
6391         * call.c (build_method_call): Don't confuse type conversion
6392         operators with constructors.
6393         * typeck2.c (build_functional_cast): Just call build_c_cast if there
6394         was only one parameter.
6395         * method.c (build_typename_overload): Don't set
6396         IDENTIFIER_GLOBAL_VALUE on these identifiers.
6397         * decl.c (grok_op_properties): Warn about defining a type conversion
6398         operator that converts to a base class (or reference to it).
6399         * cvt.c (cp_convert): Don't try to use a type conversion operator
6400         when converting to a base class.
6401         (build_type_conversion_1): Don't call constructor_name_full on an
6402         identifier.
6403         * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory.
6404
6405         * decl.c (start_decl): Don't complain that error_mark_node is an
6406         incomplete type.
6407         (finish_decl): Check for type == error_mark_node.
6408
6409 Mon May 30 23:38:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
6410
6411         * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit
6412         instantiations and inline members.
6413
6414         * spew.c (yylex): Set looking_for_template if the next token is a '<'.
6415
6416         * lex.h: Declare looking_for_template.
6417
6418         * decl.c (lookup_name_real): Use looking_for_template to arbitrate
6419         between type and template interpretations of an identifier.
6420
6421 Sat May 28 04:07:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
6422
6423         * pt.c (instantiate_template): Zero out p if we found a
6424         specialization.
6425
6426         * decl.c (grokdeclarator): Elucidate warning.
6427         (grokdeclarator): If pedantic AND -ansi, complain about long long.
6428
6429         Make explicit instantiation work reasonably.  It is now appropriate
6430         to deprecate the use of -fexternal-templates.
6431         * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or
6432         DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate.
6433         (end_template_instantiation): Reflect changes in USE_TEMPLATE
6434         semantics.
6435         (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0);
6436         (do_function_instantiation): Don't set EXPLICIT_INST if
6437         flag_external_templates is set.  Do set TREE_PUBLIC and DECL_EXTERN
6438         appropriately otherwise.
6439         (do_type_instantiation): Set interface info for class.  Set
6440         TREE_PUBLIC and DECL_EXTERN for methods.  Do none of this if
6441         flag_external_templates is set.
6442         * parse.y: Reflect changes in USE_TEMPLATE semantics.
6443         * decl2.c: New flag flag_implicit_templates determines whether or
6444         not implicit instantiations get emitted.  This flag currently
6445         defaults to true, and must be true for -fexternal-templates to work.
6446         (finish_file): Consider flag_implement_inlines when
6447         setting DECL_EXTERNAL.  Consider flag_implicit_templates when
6448         deciding whether or not to emit a static copy.
6449         * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL
6450         properly for template instantiations.
6451         (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a
6452         template class.
6453         * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics.
6454         (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs.
6455         (various others): Accessor macros for the above.
6456
6457 Fri May 27 13:57:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
6458
6459         * typeck.c (build_binary_op_nodefault): Division by constant zero is
6460         an error.
6461
6462 Fri May 27 13:50:15 1994  Mike Stump  <mrs@cygnus.com>
6463
6464         * class.c (override_one_vtable): Don't modify things we don't own.
6465
6466 Fri May 27 01:42:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
6467
6468         * decl.c (finish_decl): Don't postpone processing the initializer of
6469         a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a
6470         PUBLIC const at toplevel.
6471         (grokdeclarator): pedwarn about initializing non-const or
6472         non-integral statics in the class body.
6473
6474         * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a
6475         TYPE_DECL.
6476
6477         * call.c (convert_harshness): Dereference reference on rhs before
6478         proceeding, properly grok passing const things to non-const
6479         references.
6480
6481         * typeck.c (build_unary_op): Soften error about taking the address
6482         of main() to a pedwarn.
6483
6484         * lex.c (default_copy_constructor_body): Unambiguously specify base
6485         classes (i.e. A((const class ::A&)_ctor_arg) ).
6486         (default_assign_ref_body): Ditto.
6487
6488 Thu May 26 13:13:55 1994  Gerald Baumgartner  (gb@mexican.cygnus.com)
6489
6490         * decl2.c (grokfield): Don't complain about local signature
6491         method declaration without definition.
6492
6493         * call.c (convert_harshness): If `type' is a signature pointer
6494         and `parmtype' is a pointer to a signature, just return 0.  We
6495         don't really convert in this case; it's a result of making the
6496         `this' parameter of a signature method a signature pointer.
6497
6498         * call.c (build_method_call): Distinguish calling the default copy
6499         constructor of a signature pointer/reference from a signature
6500         member function call.
6501
6502 Thu May 26 12:56:25 1994  Jason Merrill  (jason@deneb.cygnus.com)
6503
6504         * decl2.c (grokfield): Don't set TREE_PUBLIC on member function
6505         declarations.
6506
6507         * decl.c (duplicate_decls): A previous function declaration as
6508         static overrides a subsequent non-static definition.
6509         (grokdeclarator): Don't set TREE_PUBLIC on inline method
6510         declarations.
6511
6512 Wed May 25 14:36:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
6513
6514         * decl.c (grokdeclarator): Handle initialization of static const
6515         members.
6516         (finish_decl): Ditto.
6517
6518         * decl2.c (grokfield): Allow initialization of static const members
6519         even when pedantic.
6520
6521         * decl2.c (grokfield): Deal with grokdeclarator returning
6522         error_mark_node.
6523
6524         * decl.c (grok_ctor_properties): Return 0 for A(A) constructor.
6525         (grokfndecl): Check the return value of grok_ctor_properties.
6526         (start_method): Ditto.
6527
6528         * parse.y (absdcl): Expand type_quals inline.
6529
6530 Tue May 24 19:10:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
6531
6532         * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a
6533         RECORD_TYPE.
6534
6535 Tue May 24 18:09:16 1994  Per Bothner  (bothner@kalessin.cygnus.com)
6536
6537         * cp-tree.h (VTABLE_NAME_FORMAT):  If flag_vtable_thunks,
6538         always use "__vt_%s".
6539         * decl2.c (finish_vtable_vardecl):  Don't consider abstract virtuals
6540         when looking for a "sentinal" method (to decide on emitting vtables).
6541         * decl2.c (finish_file):  Scan all decls for thunks that need
6542         to be emitted.
6543         * decl2.c (finish_vtable_vardecl):  Don't bother calling emit_thunk.
6544         * method.c (make_thunk):  Use a more meaningful label.  If there
6545         exists a matching top-level THUNK_DECL re-use it;  otherwise
6546         create a new THUNK_DECL (and declare it).
6547         * method.c (emit_thunk):  Make thunk external/public depending
6548         on the underlying method.
6549
6550 Tue May 24 00:22:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
6551
6552         * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not
6553         lookup_name.
6554
6555         * call.c (build_overload_call_real): Don't immediately pick a
6556         function which matches perfectly.
6557
6558         * decl.c (grokdeclarator): Use c_build_type_variant for arrays.
6559         (grokdeclarator): Warn about, and throw away, cv-quals attached to a
6560         reference (like 'int &const j').
6561
6562         * typeck.c (convert_arguments): Don't mess with i for methods.
6563         * call.c (build_method_call): Pass the function decl to
6564         convert_arguments.
6565
6566         * typeck.c (comp_ptr_ttypes_real): New function.  Implements the
6567         checking for which multi-level pointer conversions are allowed.
6568         (comp_target_types): Call it.
6569         (convert_for_assignment): Check const parity on the ultimate target
6570         type, too.  And make those warnings pedwarns.
6571
6572 Mon May 23 14:11:24 1994  Jason Merrill  (jason@deneb.cygnus.com)
6573
6574         * error.c (dump_char): Use TARGET_* for character constants.
6575
6576 Mon May 23 13:03:03 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6577
6578         * tree.c (debug_no_list_hash): Make static.
6579
6580         * decl.c (decls_match): Say the types don't match if newdecl ends up
6581         with a null type, after we've checked if olddecl does.
6582         (pushdecl): Check if the decls themselves match before looking for
6583         an extern redeclared as static, to avoid inappropriate and incorrect
6584         warnings.
6585
6586 Fri May 20 14:04:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
6587
6588         * decl.c (grokdeclarator): Make warning about duplicate short, etc.
6589         a pedwarn.
6590
6591         * typeck.c (build_c_cast): Casting to function or method type is an
6592         error.
6593
6594         * class.c (finish_struct): Make warning for anonymous class with no
6595         instances a pedwarn.
6596
6597         * Makefile.in (stamp-parse): Expect a s/r conflict.
6598
6599         * typeck.c (build_modify_expr): pedwarn about using a non-lvalue
6600         cast as an lvalue.
6601
6602 Thu May 19 12:08:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
6603
6604         * cvt.c (type_promotes_to): Make sure bool promotes to int rather
6605         than unsigned on platforms where sizeof(char)==sizeof(int).
6606
6607 Wed May 18 14:27:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
6608
6609         * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to
6610         another variant.
6611         (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky
6612         and treat them as lvalues.
6613
6614         * decl.c (shadow_tag): Do complain about forward declarations of
6615         enums and empty declarations.
6616         * parse.y: Don't complain about forward declarations of enums and
6617         empty declarations.
6618
6619         * typeck.c (convert_for_assignment): Complain about changing
6620         the signedness of a pointer's target type.
6621
6622         * parse.y (stmt): Move duplicated code for checking case values from
6623         here.
6624         * decl2.c (check_cp_case_value): To here.  And add a call to
6625         constant_expression_warning.
6626
6627         * typeck.c (convert_for_assignment): Don't complain about assigning
6628         a negative value to bool.
6629
6630         * decl.c (init_decl_processing): Make bool unsigned.
6631
6632         * class.c (finish_struct): Allow bool bitfields.
6633
6634 Wed May 18 12:35:27 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6635
6636         * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp.
6637
6638 Wed May 18 03:28:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
6639
6640         * cvt.c (build_type_conversion): Lose special handling of
6641         truthvalues.
6642
6643         * search.c (dfs_pushdecls): Improve shadowing warning.
6644
6645 Tue May 17 13:34:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
6646
6647         * init.c (build_delete): Throw away const and volatile on `this'.
6648
6649         * decl.c (finish_enum): Put the constants in TYPE_VALUES again,
6650         rather than the enumerators.
6651         (pushtag): s/cdecl/c_decl/g
6652
6653 Mon May 16 23:04:01 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
6654
6655         * cp/typeck.c (common_type): Attribute merging.
6656         (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro.
6657
6658         * cp/parse.y: Revamp attribute parsing.
6659
6660 Mon May 16 01:40:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
6661
6662         * decl.c (shadow_tag): Also check for inappropriate use of auto and
6663         register.
6664
6665         * method.c (build_overload_name): Clarify that the illegal case is a
6666         pointer or reference to array of unknown bound.
6667
6668         * error.c (dump_type_prefix): Print references to arrays properly.
6669
6670         * typeck.c (various): Be more helpful in pointer
6671         comparison diagnostics.
6672
6673         * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again.  Isn't this
6674         fun?
6675
6676         * parse.y: Also catch an error after valid stmts.
6677
6678         * search.c (dfs_init_vbase_pointers): Don't abort because `this' is
6679         const.
6680
6681         * typeck.c (convert_for_initialization): If call to
6682         convert_to_reference generated a diagnostic, print out the parm
6683         number and function decl if any.
6684
6685         * errfn.c (cp_thing): Check atarg1 to determine whether or not we're
6686         specifying a line, not atarg.
6687
6688         * tree.c (build_cplus_method_type): Always make `this' const.
6689
6690         * decl2.c (grokclassfn): If -fthis-is-variable and this function is
6691         a constructor or destructor, make `this' non-const.
6692
6693         * typeck.c (build_modify_expr): Don't warn specially about
6694         assignment to `this' here anymore, since it will be caught by the
6695         usual machinery.
6696
6697         * various: Disallow specific GNU extensions (variable-size arrays,
6698         etc.) when flag_ansi is set, not necessarily when pedantic is set,
6699         so that people can compile with -pedantic-errors for tighter const
6700         checking and such without losing desirable extensions.
6701
6702         * typeck2.c (build_functional_cast): Call build_method_call with
6703         LOOKUP_PROTECT.
6704         (process_init_constructor): Only process FIELD_DECLs.
6705
6706         * decl.c (finish_decl): Also force static consts with no explicit
6707         initializer that need constructing into the data segment.
6708
6709         * init.c (build_delete): Undo last patch, as it interferes with
6710         automatic cleanups.
6711
6712 Sat May 14 01:59:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
6713
6714         * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading
6715         code.
6716
6717         * init.c (build_delete): pedwarn about using plain delete to delete
6718         an array.
6719
6720 Fri May 13 16:45:07 1994  Jason Merrill  (jason@deneb.cygnus.com)
6721
6722         * typeck.c (comp_target_types): Be more helpful in contravariance
6723         warnings, and make them pedwarns.
6724
6725         * decl.c (grokdeclarator): Use decl_context to decide whether or not
6726         this is an access declaration.
6727
6728         * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it
6729         has a conversion to enum or bool, too.
6730
6731 Fri May 13 16:31:27 1994  Mike Stump  <mrs@cygnus.com>
6732
6733         * method.c (emit_thunk):  Make declaration for
6734         current_call_is_indirect local (needed for hppa).
6735
6736 Fri May 13 16:16:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
6737
6738         * pt.c (uses_template_parms): Grok BOOLEAN_TYPE.
6739         (tsubst): Ditto.
6740
6741 Fri May 13 16:23:32 1994  Mike Stump  <mrs@cygnus.com>
6742
6743         * pt.c (tsubst): If there is already a function for this expansion,
6744         use it.
6745         * pt.c (instantiate_template): Ditto.
6746
6747 Fri May 13 10:30:42 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6748
6749         * parse.y (implicitly_scoped_stmt, simple_stmt case): Use
6750         kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid
6751         generating debug info for unemitted symbols on some systems.
6752
6753         * cp-tree.h (build_static_cast, build_reinterpret_cast,
6754         build_const_cast): Add declarations.
6755
6756 Fri May 13 09:50:31 1994  Mike Stump  <mrs@cygnus.com>
6757
6758         * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27
6759         fix.  We now try get_binfo, and if that doesn't find what we want,
6760         we go back to the old method, which still sometimes fails.
6761
6762 Fri May 13 01:43:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
6763
6764         * parse.y (initdcl): Call cplus_decl_attributes on the right
6765         variable.
6766         * decl2.c (cplus_decl_attributes): Don't call decl_attributes for
6767         void_type_node.
6768
6769         * typeck.c (build_binary_op_nodefault): Change result_type for
6770         comparison ops to bool.
6771         (build_binary_op): Convert args of && and || to bool.
6772         * cvt.c (build_default_binary_type_conversion): Convert args of &&
6773         and || to bool.
6774         (build_default_unary_type_conversion): Convert arg of ! to bool.
6775         (type_promotes_to): bool promotes to int.
6776
6777 Fri May 13 01:43:18 1994  Mike Stump  <mrs@cygnus.com>
6778
6779         Implement the new builtin `bool' type.
6780         * typeck.c (build_binary_op_nodefault): Convert args of && and || to
6781         bool.
6782         (build_unary_op): Convert arg of ! to bool.
6783         * parse.y: Know true and false.  Use bool_truthvalue_conversion.
6784         * method.c (build_overload_value): Know bool.
6785         (build_overload_name): Ditto.
6786         * lex.c (init_lex): Set up RID_BOOL.
6787         * gxx.gperf: Add bool, true, false.
6788         * error.c (*): Know bool.
6789         * decl.c (init_decl_processing): Set up bool, true, false.
6790         * cvt.c (cp_convert): Handle conversion to bool.
6791         (build_type_conversion): Ditto.
6792         * *.c: Accept bool where integers and enums are accepted (use
6793         INTEGRAL_CODE_P macro).
6794
6795 Thu May 12 19:13:54 1994  Richard Earnshaw  (rwe11@cl.cam.ac.uk)
6796
6797         * g++.c: Use #ifdef for __MSDOS__, not #if.
6798
6799 Thu May 12 18:05:18 1994  Mike Stump  <mrs@cygnus.com>
6800
6801         * decl2.c (lang_f_options): Handle -fshort-temps.  -fshort-temps
6802         gives old behavior , and destroys temporaries earlier.  Default
6803         behavior now conforms to the ANSI working paper.
6804
6805 Thu May 12 14:45:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
6806
6807         * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue.
6808         Use convert_force to convert the result of a recursive call when we
6809         are dealing with a NOP_EXPR.  Don't automatically wrap MODIFY_EXPRs
6810         in COMPOUND_EXPRs any more.
6811         (various): Lose pedantic_lvalue_warning.
6812         (unary_complex_lvalue): Understand MODIFY_EXPR.
6813
6814         * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if
6815         we don't know what we're initializing.
6816
6817 Wed May 11 01:59:36 1994  Jason Merrill  (jason@deneb.cygnus.com)
6818
6819         * cvt.c (convert_to_reference): Modify to use convtype parameter.
6820         Only create temporaries when initializing a reference, not when
6821         casting.
6822         (cp_convert): New main function.
6823         (convert): Call cp_convert.
6824         * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference.
6825         * cp-tree.h (CONV_*): New constants used by conversion code for
6826         selecting conversions to perform.
6827
6828         * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues.
6829
6830         * typeck.c (build_{static,reinterpret,const_cast): Stubs that just
6831         call build_c_cast.
6832         * parse.y: Add {static,reinterpret,const}_cast.
6833         * gxx.gperf: Ditto.
6834
6835         * typeck.c (common_type): Allow methods with basetypes of different
6836         UPTs.
6837         (comptypes): Deal with UPTs.
6838         (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR.
6839
6840         * pt.c (end_template_decl): Check for multiple definitions of member
6841         templates.
6842
6843         * call.c (build_method_call): Complain about calling an abstract
6844         virtual from a constructor.
6845
6846         * typeck.c (pointer_int_sum): Check for the integer operand being 0
6847         after checking the validity of the pointer operand.
6848
6849         * typeck2.c (digest_init): Pedwarn about string initializer being
6850         too long.
6851
6852 Tue May 10 12:10:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
6853
6854         * decl.c (push_overloaded_decl): Only throw away a builtin if the
6855         decl in question is the artificial one.
6856
6857         * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because
6858         expand_{start,end}_case cannot happen in the middle of a block.
6859
6860         * cvt.c (build_type_conversion_1): Use convert again.
6861
6862 Tue May 10 11:52:04 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
6863
6864         * typeck2.c (digest_init): Make sure we check for signed and
6865         unsigned chars as well when warning about string initializers.
6866
6867         * init.c (emit_base_init): Check if there's a DECL_NAME on the
6868         member before trying to do an initialization for it.
6869
6870 Tue May 10 11:34:37 1994  Mike Stump  <mrs@cygnus.com>
6871
6872         * except.c: Don't do anything useful when cross compiling.
6873
6874 Tue May 10 03:04:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
6875
6876         * decl.c (duplicate_decls): Fix up handling of builtins yet again.
6877         (push_overloaded_decl): Ditto.
6878
6879         * cvt.c (convert): Don't look for void type conversion.
6880
6881 Mon May  9 18:05:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
6882
6883         * init.c (do_friend): Only do a pushdecl for friends, not
6884         pushdecl_top_level.
6885
6886 Mon May  9 13:36:34 1994  Jim Wilson  (wilson@sphagnum.cygnus.com)
6887
6888         * decl.c (lookup_name_current_level): Put empty statement after
6889         the label OUT to make the code valid C.
6890
6891 Mon May  9 12:20:57 1994  Jason Merrill  (jason@deneb.cygnus.com)
6892
6893         * typeck.c (build_binary_op_nodefault): Only complain about
6894         comparing void * and a function pointer if void * is smaller.
6895
6896 Sun May  8 01:29:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
6897
6898         * decl.c (lookup_name_current_level): Move through temporary binding
6899         levels.
6900
6901         * parse.y (already_scoped_stmt): Revive.
6902         (simple_stmt): Use it again.
6903
6904         * decl.c (poplevel): Always call poplevel recursively if we're
6905         dealing with a temporary binding level.
6906
6907 Sat May  7 10:52:28 1994  Mike Stump  <mrs@cygnus.com>
6908
6909         * decl.c (finish_decl): Make sure we run cleanups for initial values
6910         of decls.  Cures memory leak.
6911         * decl.c (expand_static_init): Ditto for static variables.
6912         * decl2.c (finish_file): Ditto for globals.
6913
6914 Sat May  7 03:57:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
6915
6916         * typeck.c (commonparms): Don't complain about redefining default
6917         args.
6918
6919         * decl.c (duplicate_decls): Don't complain twice about conflicting
6920         function decls.
6921         (decls_match): Don't look at default args.
6922         (redeclaration_error_message): Complain about redefining default
6923         args.
6924
6925         * call.c (build_overload_call_real): Also deal with guiding
6926         declarations coming BEFORE the template decl.
6927
6928         * pt.c (unify): Allow different parms to have different
6929         cv-qualifiers.
6930         (unify): Allow trivial conversions on non-template parms.
6931
6932 Fri May  6 03:53:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
6933
6934         * pt.c (tsubst): Support OFFSET_TYPEs.
6935         (unify): Ditto.
6936
6937         * decl2.c (finish_decl_parsing): Call push_nested_class with a type.
6938
6939         * init.c (build_offset_ref): Fix error message.
6940         * search.c (lookup_field): Ditto.
6941
6942         * call.c (build_scoped_method_call): Pass binfo to
6943         build_method_call.
6944         * typeck.c (build_object_ref): Ditto.
6945
6946         * typeck2.c (binfo_or_else): Don't return a _TYPE.
6947
6948         * class.c (finish_struct): Don't complain about re-use of inherited
6949         names or shadowing of type decls.
6950         * decl.c (pushdecl_class_level): Ditto.
6951
6952         * decl.c (finish_enum): Set the type of all the enums.
6953
6954         * class.c (finish_struct): Don't get confused by access decls.
6955
6956         * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a
6957         _TYPE.  You can stop using TYPE_NAME for that now.
6958
6959         * parse.y: Lose doing_explicit (check $0 instead).
6960         * gxx.gperf: 'template' now has a RID.
6961         * lex.h (rid): Ditto.
6962         * lex.c (init_lex): Set up the RID for 'template'.
6963
6964         * parse.y (type_specifier_seq): typed_typespecs or
6965         nonempty_type_quals.  Use it.
6966         (handler_args): Fix bogus syntax.
6967         (raise_identifier{,s}, optional_identifier): Lose.
6968         * except.c (expand_start_catch_block): Use grokdeclarator to parse
6969         the catch variable.
6970         (init_exception_processing): The second argument to
6971         __throw_type_match is ptr_type_node.
6972
6973         Fri May  6 07:18:54 1994  Chip Salzenberg  (chip@fin)
6974
6975         [ change propagated from c-decl.c of snapshot 940429 ]
6976         * cp/decl.c (finish_decl): Setting asmspec_tree should not
6977         zero out the old RTL.
6978
6979 Fri May  6 01:25:38 1994  Mike Stump  <mrs@cygnus.com>
6980
6981         Add alpha exception handling support to the compiler.
6982         Quick and dirty backend in except.c.
6983
6984         * cp/*:  Remove most remnants of old exception handling support.
6985         * decl.c (finish_function): Call expand_exception_blocks to put
6986         the exception hanlding blocks at the end of the function.
6987         * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup
6988         comes after expand_decl_init.
6989         * except.c: Reimplementation.
6990         * expr.c (cplus_expand_expr): Handle THROW_EXPRs.
6991         * lex.c (init_lex): Always have catch, try and throw be reserved
6992         words, so that we may always parse exception handling.
6993         * parse.y: Cleanup to support new interface into exception handling.
6994         * tree.def (THROW_EXPR): Add.
6995
6996 Thu May  5 17:35:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
6997
6998         * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt.
6999         (various): Lose .kindof_pushlevel and partially_scoped_stmt.
7000
7001 Thu May  5 16:17:27 1994  Kung Hsu  (kung@mexican.cygnus.com)
7002
7003         * parse.y (already_scoped_stmt): move expand_end_binding() to
7004         fix the unmatched LBB/LBE in stabs.
7005
7006 Thu May  5 14:36:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
7007
7008         * decl.c (set_nested_typename): Set TREE_MANGLED on the new
7009         identifiers.
7010         (pushdecl): Check TREE_MANGLED.
7011         (xref_tag): Ditto.
7012         * cp-tree.h (TREE_MANGLED): This identifier is a
7013         DECL_NESTED_TYPENAME (named to allow for future use to denote
7014         mangled function names as well).
7015
7016         Implement inconsistency checking specified in [class.scope0].
7017         * decl.c (lookup_name_real): Don't set ICV here after all.
7018         (finish_enum): Also set the type of the enumerators themselves.
7019         (build_enumerator): Put the CONST_DECL in the list instead of its
7020         initial value.
7021         (pushdecl_class_level): Check inconsistent use of a name in the
7022         class body.
7023         * class.c (finish_struct): Check inconsistent use of a name in the
7024         class body.  Don't set DECL_CONTEXT on types here anymore.
7025         * parse.y (qualified_type_name): Note that the identifier has now
7026         been used (as a type) in the class body.
7027         * lex.c (do_identifier): Note that the identifier has now been used
7028         (as a constant) in the class body.
7029         * error.c (dump_decl): Print type and enum decls better.
7030
7031 Thu May  5 09:35:35 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7032
7033         * typeck.c (build_modify_expr): Warn about assignment to `this'.
7034
7035 Wed May  4 15:55:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
7036
7037         * init.c (build_delete): Use the global operator delete when
7038         requested.
7039
7040         * decl.c (lookup_name_real): If we find the type we're looking in a
7041         base class while defining a class, set IDENTIFIER_CLASS_VALUE for
7042         the type.
7043
7044         * class.c (finish_struct): Remove a couple of dependencies on
7045         language linkage.
7046
7047         * decl.c (pushtag): Classes do nest in extern "C" blocks.
7048         (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for
7049         the type.
7050         (pushtag): Remove another dependency on the language linkage.
7051
7052         * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to
7053         a const-qualified type.
7054
7055         * decl.c (push_overloaded_decl): Throw away built-in decls here.
7056         (duplicate_decls): Instead of here.
7057
7058 Wed May  4 15:27:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7059
7060         * typeck.c (get_member_function_from_ptrfunc):  Do The Right
7061         Thing (I hope) if we're using thunks.
7062
7063 Wed May  4 13:52:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7064
7065         * parse.y (specialization): aggr template_type_name ';'.
7066         (named_class_head_sans_basetype): Use it.
7067         (explicit_instantiation): Ditto.
7068         (tmpl.2): Revert.
7069
7070         * cvt.c (build_type_conversion_1): Use convert_for_initialization,
7071         rather than convert, to do conversions after the UDC.
7072
7073         * cp-tree.h (SHARED_MEMBER_P): This member is shared between all
7074         instances of the class.
7075
7076         * search.c (lookup_field): If the entity found by two routes is the
7077         same, it's not ambiguous.
7078
7079 Wed May  4 12:10:00 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7080
7081         * decl.c (lookup_name_real):  Check for a NULL TREE_VALUE,
7082         to prevent the compiler from crashing ...
7083
7084 Wed May  4 11:19:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
7085
7086         * call.c (build_method_call): If we don't have an object, check
7087         basetype_path to figure out where to look up the function.
7088
7089         * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to
7090         build_method_call in case exp is NULL_TREE.
7091
7092 Tue May  3 16:02:53 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7093
7094         Give a vtable entries a unique named type, for the sake of gdb.
7095         * class.c (build_vtable_entry):  The addres of a thunk now has
7096         type vtable_entry_type, not ptr_type_node.
7097         * method.c (make_thunk):  Fix type of THUNK_DECL.
7098         * class.c (add_virtual_function, override_one_vtable):  Use
7099         vfunc_ptr_type_node, instead of ptr_type_node.
7100         * cp-tree.h (vfunc_ptr_type_node):  New macro.
7101         * decl.c (init_decl_processing):  Make vtable_entry_type
7102         be a unique type of pointer to a unique function type.
7103
7104 Tue May  3 09:20:44 1994  Jason Merrill  (jason@deneb.cygnus.com)
7105
7106         * parse.y (do_explicit): Sets doing_explicit to 1.
7107         (explicit_instantiation): Use do_explicit rather than TEMPLATE
7108         directly, add "do_explicit error" rule.
7109         (datadef): Set doing_explicit to 0 after an explicit instantiation.
7110         (tmpl.2): Don't instantiate if we see a ';' unless we're doing an
7111         explicit instantiation.
7112         (named_class_head_sans_basetype): Remove aggr template_type_name
7113         ';' again.
7114
7115 Mon May  2 23:17:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
7116
7117         * search.c (lookup_nested_tag): Lose.
7118
7119         * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs.
7120         (lookup_name_nonclass): Lose.
7121
7122         * decl.c (poplevel_class): Add force parameter.
7123         (lookup_name_real): Fix handling of explicit scoping which specifies
7124         a class currently being defined.  Add 'nonclass' argument.
7125         (lookup_name, lookup_name_nonclass): Shells for lookup_name_real.
7126
7127         * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here.
7128         (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being
7129         called from finish_struct.
7130
7131 Mon May  2 19:06:21 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7132
7133         * decl.c (init_decl_processing), cp-tree.h:  Removed memptr_type.
7134         (It seeems redundant, given build_ptrmemfunc_type.)
7135         * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof,
7136         build_classof):  Use vtable_entry_type instead of memptr_type.
7137         * method.c (emit_thunk):  Call poplevel with functionbody==0
7138         to prevent DECL_INITIAL being set to a BLOCK.
7139
7140 Mon May  2 15:02:11 1994  Jason Merrill  (jason@deneb.cygnus.com)
7141
7142         * parse.y (named_class_head_sans_basetype): Add "aggr
7143         template_type_name ';'" rule for forward declaration of
7144         specializations.
7145
7146 Mon May  2 15:02:11 1994  Jason Merrill  (jason@deneb.cygnus.com)
7147
7148         * class.c (instantiate_type): Deal with pmf's.
7149
7150         * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since
7151         stamp-objlist does.
7152
7153         * Makefile.in (../cc1plus): Depend on OBJDEPS.
7154         (OBJDEPS): Dependency version of OBJS.
7155
7156 Mon May  2 12:51:31 1994  Kung Hsu  (kung@mexican.cygnus.com)
7157
7158         * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not
7159         DECL_IGNORED_P.
7160
7161 Fri Apr 29 12:29:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
7162
7163         * class.c (finish_struct): Clear out memory of local tags.  And
7164         typedefs.
7165
7166         * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified
7167         type.
7168         * search.c (get_matching_virtual): Be more helpful in error message.
7169
7170         * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED).
7171
7172         * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work.
7173         (default_copy_constructor_body): Ditto.
7174
7175         * class.c (finish_struct): Don't gratuitously create multiple decls
7176         for nested classes.
7177
7178 Thu Apr 28 23:39:38 1994  Jason Merrill  (jason@deneb.cygnus.com)
7179
7180         Avoid clobbering the arg types of other functions when reverting
7181         static member functions.
7182         * decl.c (revert_static_member_fn): Rearrange arguments, don't
7183         require values for 'fn' and 'argtypes', add warning to comment
7184         above.
7185         (decls_match): Rearrange arguments in call to rsmf.
7186         (grok_op_properties): Don't pass values for fn and argtypes.
7187         * pt.c (instantiate_template): Don't pass values for fn and argtypes.
7188
7189 Thu Apr 28 16:29:11 1994  Doug Evans  (dje@canuck.cygnus.com)
7190
7191         * Make-lang.in (cc1plus): Depend on stamp-objlist.
7192         * Makefile.in (BC_OBJS): Delete.
7193         (OBJS): Cat ../stamp-objlist to get language independent files.
7194         Include ../c-common.o.
7195         (../cc1plus): Delete reference to BC_OBJS.
7196
7197 Thu Apr 28 02:12:08 1994  Jason Merrill  (jason@deneb.cygnus.com)
7198
7199         * search.c (compute_access): No really, deal with static members
7200         properly.  Would I lie to you?
7201
7202         Implement lexical hiding of function declarations.
7203         * pt.c (tsubst): Use lookup_name to look for function decls to guide
7204         instantiation.
7205         * method.c (build_opfncall): Use lookup_name_nonclass to look for
7206         non-member functions.
7207         * init.c (do_friend): Use lookup_name_nonclass to look for
7208         functions.
7209         * error.c (ident_fndecl): Use lookup_name to look for functions.
7210         * decl2.c (lookup_name_nonclass): New function, skips over
7211         CLASS_VALUE.
7212         * decl.c (struct binding_level): Lose overloads_shadowed field.
7213         (poplevel): Don't deal with overloads_shadowed.
7214         (push_overloaded_decl): Do lexical hiding for functions.
7215         * class.c (instantiate_type): Don't check non-members if we have
7216         members with the same name.
7217         * call.c (build_method_call): Use lookup_name_nonclass instead of
7218         IDENTIFIER_GLOBAL_VALUE to check for non-member functions.
7219         (build_overload_call_real): Ditto.
7220
7221         * decl.c (duplicate_decls): Check for ambiguous overloads here.
7222         (push_overloaded_decl): Instead of here.
7223         
7224         * decl.c (pushdecl): Back out Chip's last change.
7225
7226         * decl.c (grok_op_properties): operators cannot be static members.
7227
7228         * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0
7229         (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0
7230         * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED.
7231
7232         * method.c (do_inline_function_hair): Don't put friends of local
7233         classes into global scope, either.
7234
7235         * typeck2.c (build_functional_cast): Don't look for a function call
7236         interpretation.
7237
7238 Thu Apr 28 15:19:46 1994  Mike Stump  <mrs@cygnus.com>
7239
7240         * cp-tree.h: disable use of backend EH.
7241
7242 Wed Apr 27 21:01:24 1994  Doug Evans  (dje@canuck.cygnus.com)
7243
7244         * Make-lang.in (c++.distdir): mkdir tmp/cp first.
7245         * Makefile.in (INCLUDES): Move definition to same place as
7246         parent makefile.
7247         (ALLOCA): Define.
7248         (OLDAR_FLAGS): Delete.
7249         (OLDCC): Define.
7250         (DIR): Delete.
7251         (CLIB): Define.
7252         (####site): Delete.
7253         (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc.
7254
7255 Wed Apr 27 19:10:04 1994  Kung Hsu  (kung@mexican.cygnus.com)
7256
7257         * decl.c (xref_tag): not to use strstr(), it's not available on
7258         all platforms.
7259
7260 Wed Apr 27 18:10:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
7261
7262         * class.c (finish_struct): Resolve yet another class/pmf confusion.
7263
7264         * call.c (build_overload_call_real): Don't take the single-function
7265         shortcut if we're dealing with an overloaded operator.
7266
7267 Wed Apr 27 17:35:37 1994  Mike Stump  <mrs@cygnus.com>
7268
7269         * search.c (get_base_distance): Search the virtual base class
7270         binfos, incase someone wants to convert to a real virtual base
7271         class.
7272         * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real
7273         instead of convert_pointer_to, as it now will work.
7274
7275 Wed Apr 27 15:36:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
7276
7277         * cvt.c (convert_to_reference): Don't complain about casting away
7278         const and volatile.
7279
7280         * typeck.c (build_unary_op): References are too lvalues.
7281
7282 Wed Apr 27 13:58:05 1994  Mike Stump  <mrs@cygnus.com>
7283
7284         * class.c (override_one_vtable): We have to prepare_fresh_vtable
7285         before we modify it, not after, also, we cannot reuse an old vtable,
7286         once we commit to a new vtable.  Implement ambiguous overrides in
7287         virtual bases as abstract.  Hack until we make the class
7288         ill-formed.
7289
7290 Wed Apr 27 01:17:08 1994  Jason Merrill  (jason@deneb.cygnus.com)
7291
7292         * parse.y (unary_expr): Expand new_placement[opt] and
7293         new_initializer[opt] inline.
7294
7295         * search.c (lookup_fnfields): Don't throw away the inheritance
7296         information here, either.
7297         (compute_access): Handle static members properly.
7298
7299         * init.c (build_member_call): Always set basetype_path, and pass it
7300         to lookup_fnfields.
7301
7302         * search.c (lookup_field): Deal properly with the case where
7303         xbasetype is a chain of binfos; don't throw away the inheritance
7304         information.
7305         (compute_access): protected_ok always starts out at 0.
7306
7307         * init.c (resolve_offset_ref): Don't cast `this' to the base type
7308         until we've got our basetype_path.
7309
7310         * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum.
7311
7312         * cvt.c (build_up_reference): Use build_pointer_type rather than
7313         TYPE_POINTER_TO.
7314
7315         * call.c (convert_harshness_ansi): Call type_promotes_to for reals
7316         as well.
7317
7318         * cvt.c (type_promotes_to): Retain const and volatile, add
7319         float->double promotion.
7320
7321         * decl.c (grokdeclarator): Don't bash references to arrays into
7322         references to pointers in function parms.  Use type_promotes_to.
7323
7324 Tue Apr 26 23:44:36 1994  Mike Stump  <mrs@cygnus.com>
7325
7326         Finish off Apr 19th work.
7327
7328         * class.c (finish_struct_bits): Rename has_abstract_virtuals to
7329         might_have_abstract_virtuals.
7330         * class.c (strictly_overrides, override_one_vtable,
7331         merge_overrides): New routines to handle virtual base overrides.
7332         * class.c (finish_struct): Call merge_overrides to handle overrides
7333         in virtual bases.
7334
7335 Tue Apr 26 12:45:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
7336
7337         * typeck.c (build_function_call): Call build_function_call_real with
7338         LOOKUP_NORMAL.
7339
7340         * *: Don't deal with TYPE_EXPRs.
7341
7342         * tree.c (lvalue_p): If the type of the expression is a reference,
7343         it's an lvalue.
7344
7345         * cvt.c (convert_to_reference): Complain about passing const
7346         lvalues to non-const references.
7347         (convert_from_reference): Don't arbitrarily throw away const and
7348         volatile on the target type.
7349
7350         * parse.y: Simplify and fix rules for `new'.
7351
7352         * decl.c (grok_op_properties): operator void is illegal.
7353
7354 Mon Apr 25 02:36:28 1994  Jason Merrill  (jason@deneb.cygnus.com)
7355
7356         * parse.y (components): Anonymous bitfields can still have declspecs.
7357
7358         * decl.c (pushdecl): Postpone handling of function templates like we
7359         do C functions.
7360
7361         * search.c (expand_indirect_vtbls_init): Fix infinite loop when
7362         convert_pointer_to fails.
7363
7364         * call.c (compute_conversion_costs_ansi): A user-defined conversion
7365         by itself is better than that UDC followed by standard conversions.
7366         Don't treat integers and reals specially.
7367
7368         * cp-tree.h: Declare flag_ansi.
7369
7370         * typeck.c (c_expand_return): pedwarn on return in void function
7371         even if the expression is of type void.
7372         (build_c_cast): Don't do as much checking for casts to void.
7373         (build_modify_expr): pedwarn about array assignment if this code
7374         wasn't generated by the compiler.
7375
7376         * tree.c (lvalue_p): A comma expression is an lvalue if its second
7377         operand is.
7378
7379         * typeck.c (default_conversion): Move code for promoting enums and
7380         ints from here.
7381         * cvt.c (type_promotes_to): To here.
7382         * call.c (convert_harshness_ansi): Use type_promotes_to.  Also fix
7383         promotion semantics for reals.
7384
7385 Sun Apr 24 16:52:51 1994  Doug Evans  (dje@canuck.cygnus.com)
7386
7387         * Make-lang.in (c++.install-common): Check for g++-cross.
7388         * Makefile.in: Remove Cygnus cruft.
7389         (config.status): Delete.
7390         (RTL_H): Define.
7391         (TREE_H): Use complete pathname, some native makes have minimal
7392         VPATH support.
7393         (*.o): Use complete pathname to headers in parent dir.
7394         (doc, info, dvi): Delete.
7395
7396 Sun Apr 24 16:52:51 1994  Doug Evans  (dje@canuck.cygnus.com)
7397
7398         * Make-lang.in (c++.install-common): Check for g++-cross.
7399         * Makefile.in: Remove Cygnus cruft.
7400         (config.status): Delete.
7401         (RTL_H): Define.
7402         (TREE_H): Use complete pathname, some native makes have minimal
7403         VPATH support.
7404         (*.o): Use complete pathname to headers in parent dir.
7405         (doc, info, dvi): Delete.
7406
7407 Sun Apr 24 00:47:49 1994  Jason Merrill  (jason@deneb.cygnus.com)
7408
7409         * decl.c (pushdecl): Avoid redundant warning on redeclaring function
7410         with different return type.
7411         (decls_match): Compare return types strictly.
7412
7413 Fri Apr 22 12:55:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
7414
7415         * cvt.c (build_type_conversion): Do try to convert through other
7416         pointers.  This will fail if the class defines multiple pointer
7417         conversions.
7418
7419         * error.c (dump_type_prefix): Print out pointers to arrays properly.
7420         (dump_type_suffix): Ditto.  (was 'int *[]', now 'int (*)[]')
7421
7422         * typeck.c (build_unary_op): Disallow ++/-- on pointers to
7423         incomplete type.
7424
7425         * decl.c (duplicate_decls): Check mismatched TREE_CODES after
7426         checking for shadowing a builtin.  If we're redeclaring a builtin
7427         function, bash the old decl to avoid an ambiguous overload.
7428
7429         * cvt.c (convert_to_reference): Don't force arrays to decay here.
7430
7431         * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue.
7432
7433         * decl.c (duplicate_decls): Don't assume that the decls will have
7434         types.
7435
7436         Mon Apr 18 11:35:32 1994  Chip Salzenberg  (chip@fin.uucp)
7437
7438         [ cp/* changes propagated from c-* changes in 940318 snapshot ]
7439         * c-decl.c (pushdecl): Warn if type mismatch with another external decl
7440         in a global scope.
7441
7442         Fri Apr 22 06:38:56 1994  Chip Salzenberg  (chip@fin.uucp)
7443
7444         * cp/typeck2.c (signature_error): Use cp_error for "%T".
7445
7446         Mon Apr 18 11:59:59 1994  Chip Salzenberg  (chip@fin.uucp)
7447
7448         [ cp/* changes propagated from c-* changes in 940415 snapshot ]
7449         * cp/decl.c (duplicate_decls, pushdecl, builtin_function):
7450         Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE.
7451
7452         Mon Apr 18 11:55:18 1994  Chip Salzenberg  (chip@fin.uucp)
7453
7454         [ cp/* changes propagated from c-* changes in 940409 snapshot ]
7455         * cp/decl.c (duplicate_decls): Put new type in same obstack as
7456         old ones, or permanent if old ones in different obstacks.
7457
7458         Mon Apr 18 11:48:49 1994  Chip Salzenberg  (chip@fin.uucp)
7459
7460         [ cp/* changes propagated from c-* changes in 940401 snapshot ]
7461         * cp/parse.y (attrib): Handle string args as expressions,
7462         merging the two rules.  `mode' attribute now takes a string arg.
7463         Delete the rule for an identifier as arg.
7464
7465         Mon Apr 18 11:24:00 1994  Chip Salzenberg  (chip@fin.uucp)
7466
7467         [ cp/* changes propagated from c-* changes in 940312 snapshot ]
7468         * cp/typeck.c (pointer_int_sum): Multiplication should be done signed.
7469         (pointer_diff): Likewise the division.
7470
7471         Sun Mar  6 19:43:39 1994  Chip Salzenberg  (chip@fin.uucp)
7472
7473         [ cp/* changes propagated from c-* changes in 940304 snapshot ]
7474         * cp/decl.c (finish_decl): Issue warning for large objects,
7475         if requested.
7476
7477         Sat Feb 19 22:20:32 1994  Chip Salzenberg  (chip@fin.uucp)
7478
7479         [ cp/* changes propagated from c-* changes in 940218 snapshot ]
7480         * cp/parse.y (attrib): Handle attribute ((section ("string"))).
7481         * cp/decl.c (duplicate_decls): Merge section name into new decl.
7482
7483         Tue Feb  8 09:49:17 1994  Chip Salzenberg  (chip@fin.uucp)
7484
7485         [ cp/* changes propagated from c-* changes in 940206 snapshot ]
7486         * cp/typeck.c (signed_or_unsigned_type): Check for any
7487         INTEGRAL_TYPE_P not just INTEGER_TYPE.
7488
7489         Mon Dec  6 13:35:31 1993  Norbert Kiesel  (norbert@i3.INformatik.rwth-aachen.DE)
7490
7491         * cp/decl.c (finish_enum): Start from 0 when determining precision
7492         for short enums.
7493
7494         Fri Dec  3 17:07:58 1993  Ralph Campbell  (ralphc@pyramid.COM)
7495
7496         * cp/parse.y (unary_expr): Look at $1 for tree_code rather than
7497         casting $$.
7498
7499         Wed Nov 17 19:22:09 1993  Chip Salzenberg  (chip@fin.uucp)
7500
7501         * cp/typeck.c (build_binary_op_nodefault): Propagate code
7502         from C front-end to optimize unsigned short division.
7503         (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8".
7504
7505         Wed Nov 17 19:17:18 1993  Chip Salzenberg  (chip@fin.uucp)
7506
7507         * cp/call.c (convert_harshness_ansi): Given an (e.g.) char
7508         constant, prefer 'const char &' to 'int'.
7509
7510         Wed Feb  3 13:11:48 1993  Chip Salzenberg  (chip@fin.uucp)
7511
7512         * cp/class.c (finish_struct_methods):  Handle multiple
7513         constructors in fn_fields list.
7514
7515 Fri Apr 22 12:48:10 1994  Kung Hsu  (kung@mexican.cygnus.com)
7516
7517         * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag
7518         types not to be dumped in stabs, like types in #pragma interface.
7519         * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to
7520         mark unknown type.
7521
7522 Fri Apr 22 03:27:26 1994  Doug Evans  (dje@cygnus.com)
7523
7524         * Language directory reorganization.
7525         See parent makefile.
7526
7527 Thu Apr 21 18:27:57 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7528
7529         * cp-tree.h (THUNK_DELTA):  It is normally negative, so
7530         use signed .i variant of frame_size rather than unsigned .u.
7531         * cp-tree.h (VTABLE_NAME_FORMAT):  If flag_vtable_thunks,
7532         use "VT" rather than "vt" due to binary incompatibility.
7533         * class.c (get_vtable_name):  Use strlen of VTABLE_NAME_FORMAT,
7534         rather than sizeof, since it is now an expression.
7535         * class.c (modify_one_vtable):  Modify to skip initial element
7536         containing a count of the vtable.
7537
7538 Thu Apr 21 00:09:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
7539
7540         * lex.c (check_newline): Force interface_unknown on main input file.
7541
7542         * pt.c (do_pending_expansions): Always emit functions that have been
7543         explicitly instantiated.
7544         (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED.
7545         (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and
7546         DECL_EXPLICITLY_INSTANTIATED on all my methods.
7547         * parse.y (explicit_instantiation): Call do_type_instantiation for
7548         types.
7549         * decl2.c (finish_vtable_vardecl): Call import_export_vtable.
7550         * decl.c (start_function): Don't set DECL_EXTERNAL on a function
7551         that has been explicitly instantiated.
7552         * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for
7553         DECL_LANG_FLAG_4.
7554         * class.c: Move import_export_vtable to decl2.c, and comment out all
7555         uses.
7556
7557 Wed Apr 20 16:51:06 1994  Jason Merrill  (jason@deneb.cygnus.com)
7558
7559         * lex.c (process_next_inline): Don't muck with DECL_INLINE.
7560         (do_pending_inlines): Ditto.
7561
7562 Tue Apr 19 22:25:41 1994  Mike Stump  <mrs@cygnus.com>
7563
7564         Reimplement vtable building, and most vtable pointer setting.
7565         Allows for earier maintenance, easier understandability, and most
7566         importantly, correct semantics.
7567
7568         * class.c (build_vtable): Removed unneeded
7569         SET_BINFO_VTABLE_PATH_MARKED.
7570         * class.c (prepare_fresh_vtable): Ditto.  Added argument.
7571         * class.c (modify_vtable_entry): General cleanup.
7572         * class.c (related_vslot, is_normal, modify_other_vtable_entries,
7573         modify_vtable_entries): Removed.
7574         * class.c (add_virtual_function): General cleanup.
7575         * class.c (finish_base_struct): Setup BINFO_VTABLE and
7576         BINFO_VIRTUALS as early as we can, so that modify_all_vtables can
7577         work.
7578         * class.c (finish_vtbls): New routine, mostly from
7579         unmark_finished_struct.
7580         * class.c (overrides): New routine.
7581         * class.c (modify_one_vtable): New routine, mostly from
7582         modify_other_vtable_entries and modify_vtable_entries.
7583         * class.c (modify_all_direct_vtables, modify_all_indirect_vtables,
7584         modify_all_vtables): New routines.
7585         * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable
7586         call.  General cleanup on how pending_hard_virtuals are handled.
7587         General cleanup on modifying vtables.  Use finish_vtbls, instead of
7588         unmark_finished_struct.
7589         * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init,
7590         get_first_matching_virtual, get_matching_virtual,
7591         expand_vbase_vtables_init,  expand_indirect_vtbls_init): Update.
7592         * cvt.c (convert_pointer_to_real): cleanup error message.
7593         * decl.c (grokfndecl): General cleanup.
7594         * decl.c (finish_function): Change init_vtbl_ptrs call to
7595         expand_direct_vtbls_init.  Change expand_vbase_vtables_init call to
7596         expand_indirect_vtbls_init.
7597         * init.c (expand_virtual_init): Remove unneeded argument.
7598         * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added
7599         two arguments to make more general.  Made more general.  Now can be
7600         used for vtable pointer initialization from virtual bases.
7601         * init.c (emit_base_init): Change expand_vbase_vtables_init call to
7602         expand_indirect_vtbls_init.  Change init_vtbl_ptrs call to
7603         expand_direct_vtbls_init.
7604         * init.c (expand_virtual_init): General cleanup.
7605         * init.c (expand_default_init): Change expand_vbase_vtables_init
7606         call to expand_indirect_vtbls_init.
7607         * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init
7608         call to expand_indirect_vtbls_init.
7609         * init.c (expand_recursive_init): Change expand_vbase_vtables_init
7610         call to expand_indirect_vtbls_init.
7611         * search.c (get_first_matching_virtual): Rename to
7612         get_matching_virtual.  General cleanup and remove setting of
7613         DECL_CONTEXT.  That is now done in a cleaner way in
7614         modify_vtable_entry and add_virtual_function.
7615         * search.c (expand_vbase_vtables_init): Rename to
7616         expand_indirect_vtbls_init.  General cleanup.  Use
7617         expand_direct_vtbls_init to do hard work.  Ensures that _all_ vtable
7618         pointers from virtual bases are set up.
7619         * search.c (bfs_unmark_finished_struct, unmark_finished_struct):
7620         Removed.
7621
7622         * *.[chy]: Remove support for VTABLE_USES_MASK.
7623
7624 Tue Apr 19 12:51:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
7625
7626         * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between
7627         reference and pointer types instead of bashing the types directly.
7628
7629         * call.c (build_overload_call_real): Use the TREE_CODE to determine
7630         whether the function is overloaded or not, rather than
7631         TREE_OVERLOADED.
7632         * *: Remove all uses of TREE_OVERLOADED.
7633
7634         * decl.c (grokdeclarator): Only complain about initializing const
7635         fields when -ansi or -pedantic.
7636
7637 Tue Apr 19 12:42:42 1994  Doug Evans  (dje@canuck.cygnus.com)
7638
7639         * cp-tree.h (THUNK_DELTA): frame_size is now a union.
7640
7641 Mon Apr 18 00:17:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
7642
7643         Do overloading on a block-by-block basis, not function-by-function.
7644         * decl.c: Lose overloads_to_forget.
7645         (struct binding_level): Add overloads_shadowed field.
7646         (poplevel): Restore overloads_shadowed.
7647         (push_overloaded_decl): Use overloads_shadowed instead of
7648         overloads_to_forget.
7649         (finish_function): Don't look at overloads_to_forget.
7650
7651         Copy enum_overflow logic from c-decl.c.
7652         * decl.c (start_enum): Initialize enum_overflow.
7653         (build_enumerator): Use enum_overflow.  Also use current_scope().
7654
7655         * search.c (current_scope): Move Brendan's comment from
7656         build_enumerator here.
7657
7658         * typeck.c (convert_for_assignment): Change warnings to pedwarns for
7659         discarding const/volatile.
7660
7661 Sat Apr 16 01:18:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
7662
7663         * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs.
7664         (comp_target_types): Ditto.
7665
7666         * decl.c (lookup_name): Don't unset got_scope here.
7667
7668         * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if
7669         got_scope != NULL_TREE.
7670
7671 Fri Apr 15 16:36:33 1994  Jason Merrill  (jason@deneb.cygnus.com)
7672
7673         Horrible kludge to prevent templates from being instantiated by
7674         their base classes.
7675         * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED
7676         before we get to left_curly.
7677         * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED.
7678
7679         * error.c (dump_decl): If it's a typedef, print out the name of the
7680         decl, not just the underlying type.
7681
7682         * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL,
7683         update the IDENTIFIER_TYPE_VALUE of its name.
7684
7685         * decl2.c (finish_file): When processing the initializer for a
7686         static member, pretend that the dummy function is a member of the
7687         same class.
7688
7689 Fri Apr 15 15:56:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
7690
7691         * class.c (build_vtable_entry): revert Apr 4 change.
7692         * decl2.c (mark_vtable_entries): replace pure virtual function
7693         decl with abort's.
7694
7695 Fri Apr 15 13:49:33 1994  Jason Merrill  (jason@deneb.cygnus.com)
7696
7697         * typeck.c (build_conditional_expr): Pedwarn on pointer/integer
7698         mismatch, and don't pedwarn on 0/function pointer mismatch.
7699
7700         * typeck2.c (digest_init): Lose code for special handling of unions.
7701         (process_init_constructor): Since they're handled just fine here.
7702         Pedwarn on excess elements.
7703
7704         * decl2.c (grokfield): Complain about local class method declaration
7705         without definition.
7706
7707 Fri Apr 15 13:19:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7708
7709         * method.c (emit_thunk):  Add extern declaration for
7710         current_call_is_indirect (needed for hppa).
7711
7712 Thu Apr 14 16:12:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
7713
7714         Improve local class support; allow classes in different blocks to
7715         have the same name.
7716         * decl.c (pushtag): Support local classes better.
7717         (pushdecl_nonclass_level): New function for pushing mangled decls of
7718         nested types into the appropriate scope.
7719         (xref_defn_tag): Use pushdecl_nonclass_level instead of
7720         pushdecl_top_level. 
7721         (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local
7722         class methods.
7723         * method.c (do_inline_function_hair): Ditto.
7724
7725         * class.c (finish_struct): It is legal for a class with no
7726         constructors to have nonstatic const and reference members.
7727
7728 Thu Apr 14 07:15:11 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7729
7730         * decl.c (push_overloaded_decl): Avoid giving errors about
7731         built-ins, since duplicate_decls will have given warnings/errors
7732         for them.
7733
7734 Thu Apr 14 03:45:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
7735
7736         * cvt.c (convert_to_reference): Warn about casting pointer type to
7737         reference type when this is probably not what they wanted.
7738
7739 Wed Apr 13 13:12:35 1994  Per Bothner  (bothner@kalessin.cygnus.com)
7740
7741         * decl.c (finish_decl):  Don't mindlessly set TREE_USED for
7742         static consts any more (toplev.c has now been modified to
7743         not emit warnings if they are unused).
7744
7745 Wed Apr 13 00:22:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
7746
7747         * decl.c (grok_op_properties): If op new/delete get here with
7748         METHOD_TYPEs, do a revert_static_member_fn.
7749
7750         * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose.
7751         * init.c (is_aggr_typedef): Don't look at
7752         IDENTIFIER_CLASS_TYPE_VALUE.
7753         (get_aggr_from_typedef): Ditto.
7754         (get_type_value): Ditto.
7755         * call.c (build_scoped_method_call): Don't rely on overloaded
7756         template names having IDENTIFIER_CLASS_VALUE set.
7757
7758         * parse.y (component_decl_1, fn.def2): Revert rules for
7759         constructors.
7760         (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being
7761         clobbered.
7762
7763         * decl.c (start_function): Only warn about `void main()' if pedantic
7764         || warn_return_type.
7765
7766 Tue Apr 12 02:14:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
7767
7768         Clean up overloading of the template name.
7769         * class.c (pushclass): overload the template name whenever pushing
7770         into the scope of a template class, not just if it is
7771         uninstantiated.
7772         (popclass): Correspondingly.
7773         * search.c (push_class_decls): Don't overload_template_name.
7774         * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or
7775         DECL_CONTEXT on things.
7776         * parse.y (left_curly): Don't overload_template_name.
7777         * class.c (finish_struct): Don't undo_template_name_overload.
7778
7779         * method.c (build_opfncall): Only pass one argument to global op
7780         delete.
7781
7782         * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to
7783         decide how many arguments to use for vec delete.
7784
7785         * decl.c (grok_op_properties): Be consistent in modifying
7786         current_class_type.
7787         (grokdeclarator): Only complain about function decls with no return
7788         type if we're being pedantic.
7789
7790 Mon Apr 11 00:10:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
7791
7792         Add support for operator new [] and operator delete [].
7793
7794         * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR.
7795         * ptree.c (print_lang_type): Indicate vec new/delete.
7796         * parse.y: Support vec new/delete.
7797         * method.c (build_decl_overload): Deal with vec new/delete.
7798         (build_opfncall): Ditto.
7799         * lex.c (init_lex): Set up values of ansi_opname and opname_tab for
7800         vec new/delete.  vec new uses "__vn", and vec delete uses "__vd".
7801         * init.c (init_init_processing): Set up BIVN and BIVD.
7802         (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW,
7803         since it doesn't happen any more.
7804         (build_new): Support vec new.  Always call something.
7805         (build_x_delete): Support vec delete.
7806         (build_vec_delete): Lose dtor_dummy argument, add use_global_delete,
7807         and pass it to build_x_delete.
7808         * decl2.c (delete_sanity): Don't change behavior by whether or not
7809         the type has a destructor.  Pass use_global_delete to
7810         build_vec_delete.
7811         (coerce_delete_type): Make sure that the type returned has a first
7812         argument of ptr_type_node.
7813         * decl.c (init_decl_processing): Also declare the global vec
7814         new/delete.
7815         (grokdeclarator): Also force vec new/delete to be static.
7816         (grok_op_properties): Note presence of vec new/delete, and play with
7817         their args.  If vec delete takes the optional size_t argument, set
7818         TYPE_VEC_DELETE_TAKES_SIZE.
7819         * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify
7820         checking for one delete or the other.
7821         (lang_type): gets_new and gets_delete are now two bits long.  The
7822         low bit is for the non-array version.  Lose gets_placed_new.
7823         (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec
7824         delete defined by this class wants to know how much space it is
7825         deleting.
7826         (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must
7827         add a header containing the number of elements in the vector; i.e.
7828         when the elements need to be destroyed or vec delete wants to know
7829         the size.
7830         * class.c (finish_struct_methods): Also check for overloading vec
7831         delete.
7832         * call.c (build_method_call): Also delete second argument for vec
7833         delete.
7834
7835         * decl.c (grokdeclarator): Correct complaints again.
7836         (grokdeclarator): Fix segfault on null declarator.
7837         (decls_match): Also accept redeclaration with no arguments if both
7838         declarations were in C context.  Bash TREE_TYPE (newdecl) here.
7839         (duplicate_decls): Instead of here.
7840
7841         * parse.y (nested_name_specifier_1): Lose rules for dealing with
7842         syntax errors nicely, since they break parsing of 'const i;'.
7843
7844         * decl.c (lookup_name): if (got_scope == current_class_type)
7845         val = IDENTIFIER_CLASS_VALUE (name).
7846
7847         * search.c (lookup_nested_tag): Look in enclosing classes, too.
7848
7849         * spew.c (yylex): Only look one character ahead when checking for a
7850         SCOPE.
7851
7852         * lex.c (check_newline): Read first nonwhite char before
7853         incrementing lineno.
7854
7855         * decl.c (grokdeclarator): Don't claim that typedefs are variables
7856         in warning.
7857
7858         * parse.y: Divide up uses of unqualified_id into
7859         notype_unqualified_id and unqualified_id, so that TYPENAME can be
7860         used as an identifier after an object.
7861
7862         * class.c (push_nested_class): Don't push into non-class scope.
7863
7864         * decl.c (grokdeclarator): If an identifier could be a type
7865         conversion operator, but has no associated type, it's not a type
7866         conversion operator.
7867
7868         * pt.c (unify): Check for equality of constants better.
7869
7870         * decl.c (grokdeclarator): Don't complain about access decls.
7871
7872 Sun Apr 10 02:39:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
7873
7874         * decl.c (grokdeclarator): pedwarn about data definitions without
7875         types here.
7876
7877         * parse.y (datadef): Don't pedwarn about decls without types here,
7878         since that is valid for functions.
7879         (fn.def2, component_decl): Support constructors with declmods again.
7880         (nomods_initdecls): For decls without any mods, so that we don't try
7881         to get declspecs from some arbitrary $0.
7882
7883         * search.c (lookup_field): Use cp_error.
7884
7885         * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type
7886         here; it breaks destructors for non-aggr types.
7887
7888         * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of
7889         a type being defined, like the comment says.
7890         If got_scope is not an aggregate, just return NULL_TREE.
7891
7892         * pt.c (create_nested_upt): Kung's code for creating types nested
7893         within uninstantiated templates now lives here (it used to live in
7894         hack_more_ids).  It needs to be expanded.
7895
7896         * parse.y: Stop calling see_typename so much.
7897
7898         * decl.c (lookup_name): Deal with TTPs and UPTs.
7899
7900         * lex.c (real_yylex): Don't set looking_for_typename just because we
7901         saw a 'new'.
7902         (dont_see_typename): #if 0 out.
7903
7904         * spew.c (yylex): Increment looking_for_typename if the next
7905         character is SCOPE, rather than setting it to 1; this way, the value
7906         from seeing an aggr specifier will not be lost.  This kinda relies
7907         on looking_for_typename never being < 0, which is now true.
7908
7909         * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs,
7910         too.
7911         (named_class_head_sans_basetype): Accept template types, too.  Oops.
7912
7913 Fri Apr  8 16:39:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
7914
7915         * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs.
7916
7917         * parse.y: Lose START_DECLARATOR.
7918
7919         * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS
7920         for a class.
7921
7922         * parse.y: Simplify fn.def2 and component_decl.  Support 'enum
7923         A::foo' syntax.  Catch invalid scopes better.
7924
7925         * parse.y, lex.c: lose TYPENAME_COLON.
7926
7927         * decl2.c (groktypefield): #if 0 out.
7928
7929         * decl.c (lookup_name): If the type denoted by got_scope is
7930         currently being defined, look in CLASSTYPE_TAGS rather than FIELDS.
7931
7932         * class.c (push_nested_class): Don't try to push into
7933         error_mark_node.
7934
7935 Fri Apr  8 07:26:36 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
7936
7937         * Makefile.in (stamp-parse): Update count of conflicts to 33.
7938
7939 Thu Apr  7 17:47:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
7940
7941         A saner implementation of nested types that treats template types
7942         no differently from non-template types.  There are still some
7943         shortcomings of our system; most notably, it is difficult to look
7944         for a nested type that is hidden by another name, because of the way
7945         we keep track of hidden types.  But this shouldn't be a problem for
7946         just about anyone.  Perhaps lookup_field should be fixed up a bit.
7947
7948         * spew.c: Moved handling of nested types/scoping from the lexer
7949         into the parser.  Removed variable template_type_seen_before_scope.
7950         Removed functions frob_identifier, hack_more_ids, and various cruft
7951         that was #if 0'd out in the past, reducing the size of the file from
7952         1146 lines to 450 lines.  We can't quite do away with spew.c yet,
7953         though; we still need it for do_aggr () and checking for SCOPE after
7954         the current identifier.  And setting lastiddecl.
7955
7956         * parse.y: Moved handling of nested types/scoping from the lexer
7957         into the parser, using a new global variable `got_scope'.  Reduced
7958         the number of states by 53.  Implemented all uses of explicit global
7959         scope.  Removed terminals SCOPED_TYPENAME and SCOPED_NAME.  Removed
7960         nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope,
7961         scoped_typename.  Added nonterminals nested_type,
7962         qualified_type_name, complete_type_name, qualified_id, ptr_to_mem,
7963         nested_name_specifier, global_scope, overqualified_id, type_name.
7964         Changed many others.  Added 9 new reduce/reduce conflicts, which are
7965         nested type parallels of 9 that were already in the grammar for
7966         non-nested types.  Eight of the now 33 conflicts should be removed
7967         in the process of resolving the late binding between variable and
7968         function decls.
7969
7970         * gxxint.texi (Parser): Update.
7971
7972         * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE.
7973
7974         * lex.h: Add decl for got_scope.
7975
7976         * lex.c (see_typename): Claim to be the lexer when calling
7977         lookup_name.
7978
7979         * decl.c (lookup_name): When called from the lexer, look at
7980         got_scope and looking_at_typename; otherwise don't.
7981
7982 Thu Apr  7 22:05:47 1994  Mike Stump  <mrs@cygnus.com>
7983
7984         31th Cygnus<->FSF merge.
7985
7986 Thu Apr  7 17:47:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
7987
7988         * decl2.c (mark_vtable_entries): Call this to mark all the
7989         entries in the vtable addressable.
7990         (finish_decl_parsing): Handle SCOPE_REFs.
7991
7992         * decl.c (decls_match): Always call compparms with strict == 1.
7993         Handle the special case of C function redecl here.
7994         (duplicate_decls): Only keep the old type if the new decl takes no
7995         arguments.
7996
7997         * typeck.c (compparms): Also allow t1 to be ... if strict == 0.
7998
7999 Thu Apr  7 16:17:50 1994  Mike Stump  <mrs@cygnus.com>
8000
8001         * class.c (build_vtable_entry): Fix breakage introduced Apr 5
8002         17:48:41.
8003
8004 Wed Apr  6 16:05:10 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8005
8006         * init.c (build_virtual_init), search.c (build_vbase_vtables_init),
8007         ch-tree.h:  Every place these functions were called, the result was
8008         immediately passed to expand_expr_stmt.  Reduce redundancy by
8009         calling expand_expr_init *inside* these functions.  These
8010         makes for a simpler interface, and we don't have to build
8011         compound expressions.  Hence, rename these function to:
8012         expand_virtual_init and expand_vbase_vtables_init respectively.
8013         * init.c, decl.c:  Change callers of these functions.
8014         * init.c, cp-tree.h (expand_virtual_init):  Make static.
8015
8016         * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE
8017         rather than DECL_SAVED_INSNS before emitting inlines.
8018
8019 Wed Apr  6 13:06:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
8020
8021         * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup.
8022
8023         * decl.c (duplicate_decls): If this is a new declaration of an
8024         extern "C" function, keep the type (for the argtypes).
8025         (redeclaration_error_message): Don't check DECL_LANGUAGE here.
8026         (decls_match): Call compparms with a value of strict dependent on
8027         the value of strict_prototypes for DECL_LANGUAGE (oldecl).
8028
8029         * typeck.c (compparms): ... is only equivalent to non-promoting
8030         parms if we're not being strict.
8031
8032         * parse.y (empty_parms): Don't check flag_ansi || pedantic here.
8033
8034         * decl.c (init_decl_processing): if (flag_ansi || pedantic)
8035         strict_prototypes_lang_c = strict_prototypes_lang_cplusplus;
8036
8037         * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure
8038         virtuals.
8039
8040 Tue Apr  5 17:48:41 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8041
8042         Support for implementing vtables with thunks.
8043         * tree.def (THUNK_DECL):  New TREE_CODE.
8044         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c
8045         (fnaddr_from_vtable_entry):  Handle flag_vtable_thunks case.
8046         * cp-tree.h (memptr_type):  New variable.
8047         * class.c (build_vtable_entry):  Build thunk if necessary.
8048         * class.c (build_vfn_ref):  If using thunks, don't need
8049         to add delta field from vtable (there is none!).
8050         * decl.c: Add memptr_type as well as vtable_entry_type.
8051         If using thunks, the latter is just ptr_type_node.
8052         * gc.c, typeck.c:  Use memptr_typeChange, not vtable_entry_type.
8053         * decl2.c (finish_vtable_vardecl):  Handle thunks.
8054         * expr.c (cplus_expand_expr):  Support THUNK_DECL.
8055
8056         * decl.c (grokdeclarator):  Set DECL_THIS_EXTERN if "extern".
8057         * decl.c (start_function):  Set current_extern_inline based on
8058         DECL_THIS_EXTERN, not TREE_PUBLIC.
8059         * decl.c (finish_function):  Call mark_inline_for_output if needed,
8060
8061         Improve intelligence about when to emit inlines.
8062         * cp-tree.h (lang_decl_flags):  New field saved_inline.
8063         * cp-tree.h (DECL_SAVED_INLINE):  New macro.
8064         * class.c (add_virtual_function):  Don't set TREE_ADDRESSABLE.
8065         * decl.h, decl.c (pending_addressable_inlines):  Removed.
8066         * decl2.c (pending_addressable_inlines):  Renamed to saved_inlines.
8067         * decl2.c (mark_inline_for_output):  Do nothing if
8068         DECL_SAVED_INLINE;  otherwise set it (and add to saved_inlines list).
8069         * decl2.c (finish_vtable_vardecl):  SET_CLASSTYPE_INTERFACE_KNOWN
8070         and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual.
8071         * decl2.c (finish_file):  Writing out inlines later, so we can
8072         also handle the ones needed for vtbales.
8073         * decl2.c (write_vtable_entries, finish_vtable_typedecl):  Removed.
8074
8075         * cp-tree.h, class.c, decl2.c, search.c:  Remove -fvtable-hack
8076         and flag_vtable_hack.   Use -fvtable-thunks and flag_vtable_thunks
8077         instead.  (The rationale is that these optimizations both break binary
8078         compatibility, but should become the default in a future release.)
8079
8080 Wed Apr  6 10:53:56 1994  Mike Stump  <mrs@cygnus.com>
8081
8082         * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT
8083         of a fndecl, as we might not be from that vfield.
8084
8085 Tue Apr  5 17:43:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
8086
8087         * class.c (add_virtual_function): fix bug for pure virtual, so
8088         that DECL_VINDEX of the dummy decl copied won't be error.
8089         (see also Apr 4 change)
8090
8091 Tue Apr  5 17:23:45 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8092
8093         * typeck.c (c_expand_return):  Before checking that we're not
8094         returning the address of a local, make sure it's a VAR_DECL.
8095         (And don't worry about it being a TREE_LIST.)
8096
8097 Tue Apr  5 13:26:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
8098
8099         * parse.y (YYDEBUG): Always define.
8100         * lex.c (YYDEBUG): Ditto.
8101
8102 Mon Apr  4 11:28:17 1994  Kung Hsu  (kung@mexican.cygnus.com)
8103
8104         * class.c (finish_struct): backup out the change below, put the
8105         new change for the same purpose. The change below breaks code.
8106
8107         * class.c (finish_struct): if pure virtual, copy node and make
8108         RTL point to abort, then put in virtual table.
8109         * decl2.c (grok_function_iit): reinstate Mar 31 change.
8110
8111 Sat Apr  2 03:12:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
8112
8113         * init.c (build_new): pedwarn about newing const and volatile
8114         types.
8115
8116         * tree.c (get_identifier_list): Only do the special handling
8117         thing if we're dealing with the main variant of the record type.
8118
8119         * cvt.c (convert_to_reference): When converting between
8120         compatible reference types, use the pointer conversion machinery.
8121         Don't just blindly overwrite the old type.
8122
8123 Fri Apr  1 17:14:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
8124
8125         * call.c (build_method_call): When looking at global functions,
8126         be sure to use instance_ptr for the first argument, not some version
8127         of it that has been cast to a base class.  Also do this before
8128         comparing candidates.
8129
8130 Thu Mar 31 19:50:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
8131
8132         * call.c (build_method_call): Constructors can be called for
8133         const objects.
8134
8135 Thu Mar 31 16:20:16 1994  Kung Hsu  (kung@mexican.cygnus.com)
8136
8137         * decl2.c (grok_func_init): do not abort as rtl for pur virtual
8138         fucntions. They can be defined somewhere else.
8139
8140 Sat Jan 23 23:23:26 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
8141
8142         * decl.c (init_decl_processing): Declare __builtin_return_address
8143         and __builtin_frame_address for C++ as well.
8144
8145 Thu Mar 31 12:35:49 1994  Mike Stump  <mrs@cygnus.com>
8146
8147         * typeck2.c (store_init_value): Integral constant variables are
8148         always constant, even when doing -fpic.
8149
8150 Sat Jan 23 23:23:26 1994  Stephen R. van den Berg  (berg@pool.informatik.rwth-aachen.de)
8151
8152         * decl.c (redeclaration_error_message): Pass the types to
8153         comptypes.
8154
8155 Wed Mar 30 21:29:25 1994  Mike Stump  <mrs@cygnus.com>
8156
8157         Cures incorrect errors about pure virtuals in a class, when they
8158         have been overridden in a derived class.
8159
8160         * search.c (get_abstract_virtuals): Reimplement.
8161         * search.c (get_abstract_virtuals_1): New routine.
8162
8163 Wed Mar 30 14:10:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
8164
8165         * pt.c (push_template_decls): Make the pushed level pseudo
8166         global.
8167
8168         * parse.y (extdefs): Don't pop everything if the current binding
8169         level is pseudo_global.
8170
8171         * decl.c (pop_everything): Stop on reaching a pseudo-global
8172         binding level.
8173
8174         * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test.
8175
8176         * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if
8177         the old decl actually had an initializer.
8178
8179         * {various}: Clean up gcc -W complaints.
8180
8181         * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be
8182         (DECL_CONTEXT (NODE) != NULL_TREE).
8183
8184         * parse.y (lang_extdef): Call pop_everything if necessary.
8185
8186         * decl.c (pop_everything): New function for popping binding
8187         levels left over after a syntax error.
8188         (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not
8189         a function is a member.
8190
8191 Wed Mar 30 14:20:50 1994  Mike Stump  <mrs@cygnus.com>
8192
8193         Cures calling a more base base class function, when a more derived
8194         base class member should be called in some MI situations.
8195
8196         * search.c (make_binfo): Use more the more specialized base
8197         binfos from the binfo given as the second argument to make_binfo,
8198         instead of the unspecialized ones from the TYPE_BINFO.
8199         * class.c (finish_base_struct): Ditto, update callers.
8200         * search.c (dfs_get_vbase_types): Ditto.
8201         * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto.
8202         * decl.c (xref_tag): Use NULL_TREE instead of 0.
8203         * lex.c (make_lang_type): Ditto.
8204
8205 Wed Mar 30 14:10:04 1994  Jason Merrill  (jason@deneb.cygnus.com)
8206
8207         * decl.c (pushdecl): If pushing a C-linkage function, only do a
8208         push_overloaded_decl.
8209         (duplicate_decls): Standard overloading does not shadow built-ins.
8210
8211 Tue Mar 29 00:54:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
8212
8213         * pt.c (end_template_decl): Don't call push_overloaded_decl.
8214
8215         * init.c (do_friend): Don't call push_overloaded_decl.
8216
8217         * decl.c (pushdecl): Call push_overloaded_decl for functions and
8218         function templates.
8219         (duplicate_decls): functions and function templates are not
8220         duplicates, but don't complain about calling this function to
8221         compare them.
8222         (push_overloaded_decl): Don't deal with linkage.  Call
8223         duplicate_decls.
8224         (redeclaration_error_message): Deal with linkage.
8225
8226         * decl.c (start_function): If push_overloaded_decl returns an
8227         older version of the function, deal with it.
8228
8229         * decl.c (start_function): Be sure only to push_overloaded_decl
8230         for non-members.
8231
8232         * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for
8233         methods.
8234         (start_function): Lose broken and redundant code for checking old
8235         decl.
8236
8237         * init.c (add_friend): Give line numbers of both friend decls
8238         when warning about re-friending.
8239
8240         * pt.c (tsubst): Use comptypes rather than == to compare the
8241         types of the method as declared and as defined, since default
8242         parameters may be different.
8243
8244         * call.c (build_method_call): Use brendan's candidate printing
8245         routine.
8246
8247         * decl.c (start_method): Methods defined in the class body are
8248         inline whether or not it's a template class.
8249
8250 Mon Mar 28 16:39:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
8251
8252         * parse.y (initdcl0): Add "extern" to current_declspecs if
8253         have_extern_spec && ! used_extern_spcec.
8254
8255         * tree.c (really_overloaded_fn): A fn with more than one
8256         overload.
8257
8258         * pt.c (end_template_decl): Use really_overloaded_fn.
8259
8260         * decl.c (duplicate_decls): When smashing a decl into a previous
8261         definition, keep the old file and line.
8262         Don't deal with overloaded functions.
8263         Lose old code for checking arg types of functions.
8264         Check for overloaded C functions.
8265         (pushdecl): Deal with overloaded functions.
8266         (start_decl): Expect pushdecl to return an appropriate function decl.
8267         (start_function): Ditto.
8268         (push_overloaded_decl): Don't check for overloaded C functions.
8269
8270         * *.c: Stop using DECL_OVERLOADED, it being archaic.
8271         TREE_OVERLOADED should probably go, too.
8272
8273 Mon Mar 28 14:00:45 1994  Ron Guilmette  (rfg@netcom.com)
8274
8275         * typeck.c (comp_target_types): Call comp_target_parms with
8276         strict == 1.
8277
8278 Sun Mar 27 00:07:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
8279
8280         * parse.y (empty_parms): Don't parse () as (...) in extern "C"
8281         sections if we're compiling with -ansi or -pedantic.
8282
8283         * decl.c (decls_match): Don't treat (int) and (int&) as matching.
8284
8285         * decl2.c (grokfield): Don't pedwarn twice about initializing
8286         field.
8287
8288         * decl.c (push_overloaded_decl): Warn about shadowing
8289         constructor.
8290         (redeclaration_error_message): Don't allow 'int a; int a;'
8291
8292         * cvt.c (build_up_reference): Only check for valid upcast if
8293         LOOKUP_PROTECT is set, not just any flag.
8294
8295 Fri Mar 25 01:22:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
8296
8297         * lex.c (check_newline): When we see a #pragma implementation,
8298         also set it for the main input file.
8299
8300         * init.c (build_new): Convert array size argument to size_t.
8301
8302         * parse.y (primary): If we're doing a parenthesized type-id, call
8303         groktypename before passing it to build_new.
8304
8305         * call.c (build_method_call): Deal properly with const and
8306         volatile for instances of reference type.
8307
8308         * decl.c (store_return_init): Change 'if (pedantic) error' to 'if
8309         (pedantic) pedwarn'.
8310
8311         * decl.c (grokdeclarator): Don't complain about putting `static'
8312         and `inline' on template function decls.
8313
8314 Thu Mar 24 23:18:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
8315
8316         * call.c (build_method_call): Preserve const & volatile on
8317         `this'.
8318
8319 Thu Mar 24 16:21:52 1994  Mike Stump  <mrs@cygnus.com>
8320
8321         * init.c (build_new, build_vec_delete): Use global new and delete
8322         for arrays. 
8323         * decl2.c (delete_sanity): Ditto.
8324
8325 Thu Mar 24 02:10:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
8326
8327         * cvt.c (convert_to_reference): If i is an lvalue,
8328         (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP.
8329         (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN.
8330
8331 Wed Mar 23 17:45:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
8332
8333         * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS
8334         and DECL_TEMPLATE_INSTANTIATIONS.
8335
8336         * init.c (build_new): Handle array typedefs properly.
8337
8338 Wed Mar 23 18:23:33 1994  Mike Stump  <mrs@cygnus.com>
8339
8340         30th Cygnus<->FSF merge.
8341
8342 Wed Mar 23 00:46:24 1994  Mike Stump  <mrs@cygnus.com>
8343
8344         * class.c (modify_vtable_entries): Avoid running off the end of the
8345         virtuals list when processing a virtual destructor.
8346         * class.c (get_vtable_entry): Ditto.
8347
8348 Wed Mar 23 00:23:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
8349
8350         * decl.c (duplicate_decls): If two template decls don't match,
8351         just return 0.
8352
8353 Tue Mar 22 23:49:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
8354
8355         * typeck.c (convert_for_assignment): Don't pedwarn about
8356         converting function pointer to void *.
8357
8358 Tue Mar 22 22:23:19 1994  Mike Stump  <mrs@cygnus.com>
8359
8360         Major revamp of pointer to member functions.  Cures major
8361         nonfunctionality when used in casts, and MI situations.
8362
8363         * cvt.c (convert_force): Update call site of build_ptrmemfunc.
8364         * typeck.c (convert_for_assignment): Ditto.
8365         * typeck2.c (digest_init): Ditto.
8366         * typeck2.c (process_init_constructor): Simplify by moving code into
8367         digest_init.
8368         * typeck2.c (digest_init): Do default_conversions on init value, if
8369         we are processing pointer to member functions.
8370         * class.c (get_vfield_offset): Now non-static.  Convert bit offset
8371         into byte offset.
8372         * cp-tree.h (get_vfield_offset): Ditto.
8373         * typeck.c (get_member_function_from_ptrfunc): Convert down to right
8374         instance, before fetching vtable pointer.
8375         * typeck.c (get_delta_difference): New routine.
8376         * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also
8377         get vtable pointer out of right subobject.
8378
8379 Tue Mar 22 17:56:48 1994  Mike Stump  <mrs@cygnus.com>
8380
8381         * search.c (get_binfo): Return NULL instead of aborting, when
8382         passed a UNION_TYPE.
8383
8384 Tue Mar 22 12:44:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
8385
8386         These patches implement handling of redefinition/redeclaration of
8387         templates.
8388
8389         * typeck.c (comptypes): Simplify.  All TEMPLATE_TYPE_PARMs are
8390         considered compatible.
8391
8392         * parse.y (template_def): Pass defn argument to end_template_decl.
8393
8394         * pt.c (end_template_decl): Add defn argument.  Check for
8395         redefinition.  Simplify.
8396
8397         * error.c (OB_UNPUT): New macro, to remove mistakes.
8398         (aggr_variety): Subroutine of dump_aggr_type.
8399
8400         * decl.c (decls_match): Support templates.
8401         (duplicate_decls): No longer static.  Don't try to lay out template
8402         decls.
8403         (pushdecl): Simplify.
8404
8405         * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of
8406         DECL_INITIAL.
8407
8408 Mon Mar 21 11:46:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
8409
8410         * error.c (dump_decl): Support class template decls.
8411         (dump_type): Don't adorn template type parms.
8412
8413         * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl
8414         if it was a definition.
8415         (redeclaration_error_message): Do the cp_error thang, and reject
8416         redefinition of templates.
8417
8418 Mon Mar 21 19:36:06 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8419
8420         * decl.c (grokdeclarator):  Set TREE_PUBLIC for METHOD_TYPE
8421         in FIELD context, when appropriate.  Also,
8422         CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC.
8423         Also, simplify check for bogus return specifiers.
8424
8425 Mon Mar 21 11:46:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
8426
8427         * parse.y (after_type_declarator1): Expand type_quals.
8428         (notype_declarator1): Ditto.
8429         (absdcl1): Ditto.
8430
8431 Sat Mar 19 01:05:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
8432
8433         * decl.c (grokdeclarator): Treat class-local typedefs like static
8434         members; i.e. 'typedef int f();' means that f is a function type,
8435         not a method type.
8436
8437         * parse.y (decl): Change direct_* back to *.
8438         (type_id): Change direct_abstract_declarator to absdcl.
8439         (direct_declarator, direct_initdecls, direct_initdcl0): Remove again.
8440
8441 Fri Mar 18 12:47:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
8442
8443         These two patches fix crashes on instantiating a template inside a
8444         function with C linkage or containing labels.
8445
8446         * class.c (current_lang_stacksize): No longer static.
8447
8448         * decl.c (struct saved_scope): Add lang_base, lang_stack,
8449         lang_name, lang_stacksize, and named_labels.
8450         (push_to_top_level): Save them.
8451         (pop_from_top_level): Restore them.
8452
8453         * gxxint.texi (Parser): Update.
8454
8455         These two patches finish moving the task of expr/declarator
8456         ambiguity resolution from the lexer to the parser, and add one more
8457         r/r conflict.  START_DECLARATOR can now be nuked.
8458
8459         * parse.y (decl): Add "direct_" in typespec X rules.
8460         (direct_declarator): New nonterminal for
8461         direct_after_type_declarator and direct_notype_declarator.
8462         (direct_initdecls): Like initdecls, but uses direct_initdcl0.
8463         (direct_initdcl0): Like initdcl0, but uses direct_declarator.
8464         (named_parm): Add typespec direct_declarator rule.
8465
8466         * spew.c (yylex): #if 0 out START_DECLARATOR insertion.
8467
8468         These two patches disable some excessive cleverness on the part of
8469         g++; a non-class declaration always hides a class declaration in the
8470         same scope, and g++ was trying to unhide it depending on the
8471         enclosing expression.
8472
8473         * spew.c (arbitrate_lookup): #if 0 out.
8474
8475         * decl.c (lookup_name): Never call arbitrate_lookup.
8476
8477         * parse.y (complex_notype_declarator1): Add '*'
8478         complex_notype_declarator1 and '&' complex_notype_declarator1 rules.
8479
8480         * parse.y (complex_direct_notype_declarator): Restore id_scope
8481         see_typename TYPENAME rule, remove all other rules beginning with
8482         those tokens.
8483         (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule.
8484
8485 Thu Mar 17 17:30:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
8486
8487         These changes fix the compiler's handling of the functional cast/
8488         object declaration ambiguities in section 6.8 of the ARM.  They also
8489         add 11 reduce/reduce conflicts.  Sigh.
8490
8491         * parse.y: Add precedence decls for OPERATOR and '~'.
8492         (notype_unqualified_id): New nonterminal, encompasses all of the
8493         ANSI unqualified-id nonterminal except TYPENAMEs.
8494         (expr_or_declarator): New nonterminal to delay parsing of code like
8495         `int (*a)'.
8496         (primary): Use notype_unqualified_id.
8497         (decl): Add typespec initdecls ';' and typespec declarator ';'
8498         rules.
8499         (initdcl0): Deal with the above.
8500         (complex_notype_declarator1): A notype_declarator that is not also
8501         an expr_or_declarator.
8502         (complex_direct_notype_declarator): A direct_notype_declarator that
8503         doesn't conflict with expr_or_declarator.  Use
8504         notype_unqualified_id.  Remove id_scope see_typename TYPENAME rule.
8505         (functional_cast): New nonterminal, for the three functional cast
8506         rules.  So that they can be moved after
8507         complex_direct_notype_declarator.
8508         (see_typename): Don't accept type_quals any more.
8509
8510         * decl2.c (reparse_decl_as_expr): New function to deal with parse
8511         nodes for code like `int (*a)++;'.      
8512         (reparse_decl_as_expr1): Recursive subroutine of the above.
8513         (finish_decl_parsing): New function to deal with parse nodes for
8514         code like `int (*a);'.  See the difference?
8515
8516 Thu Mar 17 12:16:10 1994  Mike Stump  <mrs@cygnus.com>
8517
8518         These changes break binary compatibility in code with classes
8519         that use virtual bases.
8520
8521         * search.c (dfs_get_vbase_types): Simplify and correct to make
8522         sure virtual bases are initialized in dfs ordering.
8523         * search.c (get_vbase_types): Simplify and make readable.
8524
8525 Thu Mar 17 12:01:10 1994  Jason Merrill  (jason@deneb.cygnus.com)
8526
8527         * parse.y: s/ typename / type_id /g
8528
8529 Wed Mar 16 17:42:52 1994  Kung Hsu  (kung@mexican.cygnus.com)
8530
8531         * parse.y (typespec): add SCOPE TYPENAME for global scoped 
8532         type. e.g. ::B x.
8533
8534         * decl.c (complete_array_type): fix a bug that in -pendantic
8535         mode even there's no initializer, it will continue to build
8536         default index.
8537
8538 Wed Mar 16 17:43:07 1994  Jason Merrill  (jason@deneb.cygnus.com)
8539
8540         * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove
8541         all of the scoped PTYPENAME rules.
8542
8543 Wed Mar 16 16:39:02 1994  Mike Stump  <mrs@cygnus.com>
8544
8545         * init.c (build_offset_ref): The value of A::typedef_name is
8546         always the TYPE_DECL, and never an error.
8547
8548 Tue Mar 15 20:02:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
8549
8550         * search.c (get_base_distance_recursive): Two binfos can only
8551         represent the same object if they are both via_virtual.
8552
8553         * class.c (finish_base_struct): Check vbases for ambiguity, too.
8554
8555         * search.c (get_vbase_types): Accept binfo argument, too.
8556
8557 Tue Mar 15 19:22:05 1994  Kung Hsu  (kung@mexican.cygnus.com)
8558
8559         * decl.c (complete_array_type): complete TYPE_DOMAIN of the 
8560         initializer also, because back-end requires it.
8561
8562 Tue Mar 15 15:33:31 1994  Jason Merrill  (jason@deneb.cygnus.com)
8563
8564         * error.c (dump_expr): Support member functions (which show up as
8565         OFFSET_REFs).
8566
8567 Mon Mar 14 16:24:36 1994  Mike Stump  <mrs@cygnus.com>
8568
8569         * init.c (build_new): Set the return type of multidimensional
8570         news correctly.
8571
8572 Fri Mar 11 15:35:39 1994  Kung Hsu  (kung@mexican.cygnus.com)
8573
8574         * call.c (build_method_call): if basetype not equal to type
8575         of the instance, use the type of the instance in building
8576         destructor.
8577
8578 Thu Mar 10 17:07:10 1994  Kung Hsu  (kung@mexican.cygnus.com)
8579
8580         * parse.y (direct_notype_declarator): add push_nested_type for
8581         'template_type SCOPED_NAME' rule.
8582
8583 Tue Mar  8 00:19:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
8584
8585         * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules.
8586
8587 Sat Mar  5 04:47:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
8588
8589         * parse.y (regcast_or_absdcl): New nonterminal to implement late
8590         reduction of constructs like `int ((int)(int)(int))'.
8591         (cast_expr): Use it.
8592         (sub_cast_expr): Everything that can come after a cast.
8593         (typed_declspecs1): typed_declspecs that are not typed_typespecs.
8594         (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule.
8595         (direct_abstract_declarator): Replace '(' parmlist ')' rule with
8596         '(' complex_parmlist ')' and regcast_or_absdcl.
8597         (parmlist): Split
8598         (complex_parmlist): Parmlists that are not also typenames.
8599         (parms_comma): Enabler.
8600         (named_parm): A parm that is not also a typename.  Use declarator
8601         rather than dont_see_typename abs_or_notype_decl.  Expand
8602         typed_declspecs inline.
8603         (abs_or_notype_decl): Lose.
8604         (dont_see_typename): Comment out.
8605         (bad_parm): Break out abs_or_notype_decl into two rules.
8606
8607 Fri Mar  4 18:22:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
8608
8609         * decl2.c (reparse_decl_as_casts): New function to change parse
8610         nodes for `(int)(int)(int)' from "function taking int and returning
8611         function taking int and returning function taking int" to "... cast
8612         to int, cast to int, cast to int".
8613
8614         * decl2.c (reparse_decl_as_expr): Recursive function to change
8615         parse nodes for `A()()' from "function returning function returning
8616         A" to "A().operator()".
8617
8618         * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with
8619         `typespec fcast_or_absdcl' rule.
8620         (fcast_or_absdcl): New nonterminal to implement late reduction of
8621         constructs like `A()()()()'.
8622         (typename): Replace `typespec absdcl1' rule with
8623         `typespec direct_abstract_declarator' rule.
8624         (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule
8625         with `fcast_or_absdcl type_quals' rule.
8626
8627 Fri Mar  4 16:18:03 1994  Mike Stump  <mrs@cygnus.com>
8628
8629         * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it
8630         matches Section 5.5.
8631
8632 Fri Mar  4 14:01:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
8633
8634         * error.c (dump_type_prefix): Don't print basetype twice for
8635         pmfs.
8636
8637 Fri Mar  4 13:24:33 1994  Mike Stump  <mrs@cygnus.com>
8638
8639         * typeck.c (convert_arguments): Handle setHandler(A::handlerFn)
8640         so that it is like setHandler(&A::handlerFn).  Cures an `invalid
8641         lvalue in unary `&''.
8642
8643 Fri Mar  4 11:15:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
8644
8645         * gxxint.texi (Copying Objects): New section discussing default
8646         op= problems with virtual inheritance.
8647
8648         * decl2.c (grokoptypename): Just does grokdeclarator and
8649         build_typename_overload, since the parser can't call grokdeclarator
8650         directly.
8651
8652         * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE
8653         and TREE_TYPE on generated identifiers.
8654
8655         * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore.
8656
8657         * parse.y (parm): Convert `const char *' to `__opPCc' here.
8658
8659         * error.c (dump_decl): Say sorry rather than my_friendly_aborting
8660         if we can't figure out what to do.
8661         (dump_type*): Ditto.
8662
8663         * typeck2.c (build_m_component_ref): 'component' is an expr, not
8664         a decl.  Also move the IS_AGGR_TYPE check after the stripping of
8665         REFERENCE_TYPE.
8666
8667 Fri Mar  4 04:46:05 1994  Mike Stump  <mrs@cygnus.com>
8668
8669         * call.c (build_method_call): Handle b->setHandler(A::handlerFn)
8670         so that it is like b->setHandler(&A::handlerFn).  Cures an `invalid
8671         lvalue in unary `&''.
8672
8673 Thu Mar  3 12:38:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
8674
8675         * parse.y: Add precedence specification for START_DECLARATOR.
8676         (type_quals): Move before primary.
8677         (typename): Move before typed_declspecs, add 'typespec absdcl1' rule.
8678
8679         * decl2.c (grokoptypename): Lose.
8680
8681         * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan,
8682         rather than waiting until later.
8683
8684 Wed Mar  2 14:12:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
8685
8686         * parse.y (unary_expr): Use 'typename' in 'new' rules, rather
8687         than expanding it inline.
8688         (typename): Expand empty option of (former) absdcl inline.
8689         (abs_or_notype_decl): Ditto.
8690         (absdcl): Lose empty rule.
8691         (conversion_declarator): New nonterminal for 'typename' of 'operator
8692         typename'.
8693         (operator_name): Use it instead of absdcl.
8694
8695         * parse.y: Add precedence declarations for SCOPED_TYPENAME,
8696         TYPEOF, and SIGOF.
8697         (typed_declspecs): Accept typed_typespecs, rather than typespec
8698         directly.  Add rules with reserved_typespecquals.
8699         (reserved_declspecs): Don't accept typespecqual_reserved at the
8700         beginning of the list.  The typed_declspecs rule will deal with this
8701         omission.
8702         (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL
8703         directly.
8704
8705         * parse.y (direct_notype_declarator,
8706         direct_after_type_declarator, direct_abstract_declarator): Split up
8707         the declarator1 nonterminals to match the draft standard and avoid
8708         ambiguities.
8709         (new_type_id, new_declarator, direct_new_declarator,
8710         new_member_declarator): New nonterminals to implement the subset of
8711         'typename' allowed in new expressions.
8712         (unary_expr): Use new_type_id instead of typename.
8713         (after_type_declarator1, absdcl1): Fix semantics of member pointers.
8714         (abs_member_declarator, after_type_member_declarator): Lose.
8715
8716         * parse.y (absdcl1): Don't require parens around
8717         abs_member_declarator.
8718         (abs_member_declarator): Lose see_typename from rules.
8719         (after_type_member_declarator): Ditto.
8720
8721         * tree.c (get_identifier_list): New function, containing code
8722         previously duplicated in get_decl_list and list_hash_lookup_or_cons.
8723         (get_decl_list): Use it.
8724         (list_hash_lookup_or_cons): Ditto.
8725
8726         * parse.y (typed_declspecs, declmods): It's not necessary to hash
8727         the declspecs on class_obstack, so don't.  This way typed_typespecs
8728         can reduce to typed_declspecs.
8729
8730 Wed Mar  2 14:29:18 1994  Jason Merrill (jason@cygnus.com)
8731
8732         * cvt.c (build_up_reference): If we aren't checking visibility,
8733         also allow base->derived conversions.
8734
8735 Mon Feb 28 15:14:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8736
8737         * typeck.c (build_c_cast): Remove bogus hack when converting
8738         to a reference type.
8739
8740         * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST):
8741         Removed, not used.
8742         (lang_stype::methods, lang_decl::next_method): New fields.
8743         (CLASSTYPE_METHODS, DECL_NEXT_METHOD):  New macros.
8744         * decl.c (duplicate_decls):  Preserve DECL_NEXT_METHOD.
8745
8746         * cp-tree.h, decl2.c (flag_vtable_hack):  New flag.
8747         * decl2.c (finish_vtable_vardecl):  If flag_vtable_hack,
8748         and  !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of
8749         a non-inline virtual function to control emitting of vtables.
8750         * class.c (finish_struct):  Build CLASSTYPE_METHODS list.
8751         * search.c (build_vbase_vtables_init):  Don't assemble_external
8752         (yet) if flag_vtable_hack.
8753         * class.c (build_vfn_ref):  Ditto.
8754
8755 Mon Feb 28 14:54:13 1994  Jason Merrill  (jason@deneb.cygnus.com)
8756
8757         * parse.y (component_decl): Don't include "typed_declspecs
8758         declarator ';'" speedup, since it breaks enums.
8759
8760 Fri Feb 25 15:43:44 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8761
8762         * class.c (finish_struct):  Minor optimization for building
8763         fn_fields list.
8764
8765 Fri Feb 25 15:23:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
8766
8767         * decl.c (start_function): Fix detection of function overloading.
8768
8769 Thu Feb 24 22:26:19 1994  Mike Stump  <mrs@cygnus.com>
8770
8771         * lex.c (check_newline): #pragma interface can take a string
8772         argument, just like #pragma implementation.  #pragma implementation
8773         checks for garbage on the line, line #pragma interface does.  Main
8774         input files do not auto implement like named files, #pragma
8775         implementation must be used explicitly.
8776
8777 Thu Feb 24 17:09:01 1994  Jason Merrill  (jason@deneb.cygnus.com)
8778
8779         * parse.y (components): Handle list of one again.
8780         (notype_components): Ditto.
8781         (after_type_declarator1): Take maybe_raises out again.
8782
8783         * gxxint.texi (Parser): Document additional r/r conflict.
8784
8785 Wed Feb 23 14:42:55 1994  Jason Merrill  (jason@deneb.cygnus.com)
8786
8787         * gxxint.texi (Parser): Add node.
8788
8789         * Makefile.in (stamp-parse): Update expected conflict count.
8790
8791         * parse.y (various): Replace "declmods declarator" with "declmods
8792         notype_declarator".  The comment saying that "declmods declarator ';'"
8793         corresponds to "int i;" was wrong; it corresponds to "const i;".
8794         (component_decl): Add "typed_declspecs declarator ';'" rule; this
8795         *does* correspond to "int i;".  Change "declmods components" to
8796         "declmods notype_components".
8797         (components): Don't deal with a list of one anymore.
8798         (notype_components): New nonterminal, corresponds to notype_declarator.
8799         ({after_,no}type_component_decl{,0}): More new nonterminals.
8800         ({after_,no}type_declarator): Fold in START_DECLARATOR token.
8801         Eliminates four reduce/reduce conflicts.
8802
8803         (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist.
8804         (nontrivial_exprlist): New nonterminal: A list of at least two
8805         expr_no_commas's.
8806         (nonnull_exprlist): Depend on nontrival_exprlist.
8807         Eliminates four reduce/reduce conflicts.
8808
8809         (named_class_head): Move intermediate code block into separate
8810         nonterminal so that we can stick %prec EMPTY on it.
8811
8812         Add more %prec EMPTY's to eliminate remaining shift/reduce
8813         conflicts.
8814
8815         (after_type_declarator): Add maybe_raises to fndecl rules.
8816         (after_type_declarator_no_typename): Remove.
8817         For correctness.
8818
8819         Document remaining reduce/reduce conflicts.
8820
8821 Tue Feb 22 12:10:32 1994  Jason Merrill  (jason@deneb.cygnus.com)
8822
8823         * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN
8824         (TYPE_BINFO (type)) if we care about the path.
8825
8826         * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the
8827         options are.
8828
8829 Mon Feb 21 19:59:40 1994  Mike Stump  <mrs@cygnus.com>
8830
8831         * Makefile.in (mostlyclean): lex.c is a source file, don't
8832         remove.
8833
8834 Sat Feb 19 01:27:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
8835
8836         * parse.y: Eliminate 20 shift/reduce conflicts.
8837
8838 Fri Feb 18 11:49:42 1994  Jason Merrill  (jason@deneb.cygnus.com)
8839
8840         * pt.c (type_unification): Add subr argument; if set, it means
8841         that we are calling ourselves recursively, so a partial match is OK.
8842         (unify): Support pointers to methods and functions.
8843         (tsubst): Support method pointers.
8844         * decl.c (build_ptrmemfunc_type): No longer static, so that
8845         tsubst can get at it.
8846
8847         * init.c (is_aggr_typedef): Pretend template type parms are
8848         aggregates.
8849         * decl2.c (build_push_scope): If cname refers to a template type
8850         parm, just grin and nod.        
8851
8852         * call.c (build_overload_call_real): Pass subr argument to
8853         type_unification.
8854         * pt.c (do_function_instantiation): Ditto.
8855         * class.c (instantiate_type): Ditto.
8856
8857         * search.c (get_base_distance): If BINFO is a binfo, use it and
8858         don't mess with its BINFO_INHERITANCE_CHAIN.
8859
8860         * cvt.c (convert_to_reference): Fix temporary generation.
8861         If ambiguous, return error_mark_node.
8862
8863         * init.c (build_new): Put back some necessary code.
8864
8865 Thu Feb 17 15:39:47 1994  Jason Merrill  (jason@deneb.cygnus.com)
8866
8867         * init.c (build_new): Deal with array types properly.
8868
8869         * search.c (get_binfo): Become a shell for get_base_distance.
8870         (get_binfo_recursive): Lose.
8871         (get_base_distance_recursive): Find the path to the via_virtual base
8872         that provides the most access.
8873         (get_base_distance): Ditto.
8874
8875         * parse.y (explicit_instantiation): Syntax is 'template class
8876         A<int>', not 'template A<int>'.
8877
8878         * typeck.c (convert_for_initialization): Remove bogus warning.
8879
8880         * parse.y (datadef): Revert patch of Oct 27.
8881
8882 Thu Feb 17 15:12:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8883
8884         * class.c (build_vfn_ref):  Cast delta field to ptrdiff_type_node,
8885         rather than integer_type_node.  Does wonders for the Alpha.
8886
8887 Thu Feb 17 13:36:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
8888
8889         * decl.c (build_ptrmemfunc_type): Make sure that the pmf type
8890         goes onto the same obstack as its target type.
8891
8892 Wed Feb 16 00:34:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
8893
8894         * cvt.c (convert_to_reference): If converting via constructor
8895         on local level, go back to build_cplus_new approach.
8896
8897         * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot
8898         to error_mark_node to prevent expand_expr from building a cleanup
8899         for this variable.
8900
8901         * lex.c (default_assign_ref_body): Return *this from the memcpy
8902         version, too.
8903
8904         * decl.c (grok_reference_init): Just return if called with
8905         error_mark_node, don't worry about initializing non-const reference
8906         with temporary.
8907
8908         * cvt.c (convert_to_reference): Do the right thing for
8909         non-aggregate reference conversions, pedwarn when generating a
8910         non-const reference to a temporary.
8911
8912         * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and
8913         TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES
8914         again.
8915
8916 Tue Feb 15 19:47:19 1994  Jason Merrill  (jason@deneb.cygnus.com)
8917
8918         * decl.c (grok_reference_init): Pawn off a lot of the work on
8919         convert_to_reference.  Generally do the right thing.
8920
8921         * cvt.c (convert_to_reference): Conform to the initial comment;
8922         i.e. don't create temps if decl != error_mark_node.  Handle
8923         cleanups better for temps that do get created.  Don't pretend
8924         that we can use an 'A' to initialize a 'const double &' just by
8925         tacking on a NOP_EXPR.  Support LOOKUP_SPECULATIVELY.
8926
8927         * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on
8928         constructor calls.      
8929
8930 Mon Feb 14 14:50:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
8931
8932         * decl.c (grok_reference_init): Make a temporary for initializing
8933         const reference from constant expression.
8934
8935 Mon Feb 14 11:31:31 1994  Per Bothner  (bothner@kalessin.cygnus.com)
8936
8937         * cp-tree.h, decl.c (set_identifier_local_value):  Deleted function.
8938         * decl.c (pushdecl):  Define decl in correct binding_level
8939         (which isn't always the inner_binding_level).
8940
8941         * cvt.c (build_up_reference):  Don't ever call expand_aggr_init.
8942         It's ugly, and I don't think it's the right thing to do.
8943
8944         * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c: 
8945         Remove NEW_CLASS_SCOPING, assuming it is always 1.
8946         * decl.c (pop_decl_level):  Removed; manually inlined.
8947
8948 Sun Feb 13 19:04:56 1994  Jason Merrill  (jason@deneb.cygnus.com)
8949
8950         * class.h (candidate): Add basetypes field.
8951
8952         * call.c (build_method_call): Do access checking after choosing a
8953         function, not before.
8954
8955         * Makefile.in (cvt.o, call.o, method.o): Depend on class.h.
8956         (mostlyclean): Remove ../cc1plus.
8957
8958 Fri Feb 11 11:52:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
8959
8960         * class.c (finish_struct): Don't allow adjusting access to a field
8961         of a base class if a local field has the same name.
8962
8963         * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs.
8964
8965 hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu)
8966
8967             * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names
8968             with destructor names when either NO_DOLLAR_IN_LABEL or
8969             NO_DOT_IN_LABEL are not defined.
8970
8971             Now `template <class T, T f(T&), const T*> class A {...}' works.
8972
8973             * pt.c (grok_template_type): substitute template parm types
8974             with actual types in complex type as well.
8975             (coerce_template_parms): update the grok_template_type ()
8976             function call.
8977
8978         * pt.c (tsubst): Traverse method list using DECL_CHAIN.
8979
8980         * decl.c (grok_op_properties): Allow operator++/-- to have
8981         default arguments.
8982
8983         * typeck2.c (store_init_value): Don't abort when called to
8984         initialize a type that needs constructing with a CONSTRUCTOR.
8985
8986         * init.c (expand_aggr_init_1, CONSTRUCTOR case): If
8987         store_init_value fails, build and expand an INIT_EXPR.  If
8988         store_init_value succeeds, call expand_decl_init.
8989
8990 Fri Feb 11 02:49:23 1994  Mike Stump  <mrs@cygnus.com>
8991
8992         * class.c (build_vbase_path): Use complete_type_p instead of
8993         resolves_to_fixed_type_p to determine if the virtual bases are in
8994         their right place for the type of expr.  Cures problem of thinking a
8995         virtual base class is one place, when it is in fact someplace else.
8996
8997 Fri Feb 11 00:26:46 1994  Mike Stump  <mrs@cygnus.com>
8998
8999         * init.c (resolve_offset_ref): Make sure we first convert to
9000         intermediate type, if given, when dealing with members off `this'.
9001         Solves an incorrrect `type `foo' is not a base type for type
9002         `multiple'' when it is infact, a base type.
9003
9004 Thu Feb 10 21:49:35 1994  Mike Stump  <mrs@cygnus.com>
9005
9006         * class.c (modify_other_vtable_entries): Use get_binfo, instead
9007         of binfo_value.  Solves problem with compiler giving a `base class
9008         `B' ambiguous in binfo_value (compiler error)' on complex MI
9009         herarchies, when a virtual function is first defied in a virtual
9010         base class.
9011
9012 Thu Feb 10 17:19:32 1994  Mike Stump  <mrs@cygnus.com>
9013
9014         * class.c (build_vbase_path): Don't complain about ambiguous
9015         intermediate conversion when converting down to a virtual base
9016         class, even if they might seem to be ambiguous.
9017
9018 Thu Feb 10 12:18:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
9019
9020         * typeck2.c (build_functional_cast): #if 0 out constructor
9021         inheritance code, improve error messages.
9022
9023         * class.c (finish_base_struct): Complain about base with only
9024         non-default constructors in derived class with no constructors.
9025
9026         * decl.c (grokdeclarator): Fix detection of virtual new/delete.
9027
9028 Wed Feb  9 22:02:32 1994  Mike Stump  <mrs@cygnus.com>
9029
9030         * search.c (build_mi_virtuals, add_mi_virtuals,
9031         report_ambiguous_mi_virtuals): Removed unneeded code.
9032         * class.c (finish_struct_bits): Ditto.
9033
9034 Wed Feb  9 11:27:17 1994  Jason Merrill  (jason@deneb.cygnus.com)
9035
9036         * pt.c (end_template_instantiation): Push decl before
9037         pop_from_top_level.
9038
9039         * typeck2.c (build_m_component_ref): Make sure datum is of
9040         aggregate type.
9041
9042         * init.c (get_type_value): New function, returns
9043         IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE.
9044
9045         * call.c (build_method_call): Don't die on call to destructor for
9046         non-type.
9047
9048         * decl.c (grokdeclarator): Complain about virtual op new and op
9049         delete, make static virtuals unvirtual instead of unstatic.
9050
9051         * typeck.c (build_c_cast): Also call default_conversion on
9052         methods.
9053
9054         * decl.c (grokdeclarator): Don't complain about anonymous
9055         bitfields.
9056
9057         * parse.y (simple_stmt, for loops): Move the continue point after
9058         the cleanups.
9059
9060         * class.c (finish_struct): Fix setting of
9061         TYPE_HAS_COMPLEX_INIT_REF.
9062
9063 Tue Feb  8 13:21:40 1994  Jason Merrill  (jason@deneb.cygnus.com)
9064
9065         * init.c (build_new): Deal with `new double (1)'.
9066
9067         * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of
9068         TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of
9069         TYPE_NEEDS_CONSTRUCTING.
9070
9071         * decl.c (duplicate_decls): Propagate access decls.
9072
9073         * typeck2.c (process_init_constructor): Accept empty_init_node
9074         for initializing unions.
9075
9076         * class.c, lex.c, cp-tree.h: Use
9077         TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used
9078         before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in
9079         some places.
9080
9081         * decl.c (finish_decl): Don't complain about uninitialized const
9082         if it was initialized before.
9083
9084 Mon Feb  7 18:12:34 1994  Jason Merrill  (jason@deneb.cygnus.com)
9085
9086         * lex.c (default_assign_ref_body): Don't deal with vbases for
9087         now.
9088
9089         * decl.c (finish_decl): Fix reversed logic for objects and other
9090         things that need to be constructed but have no initializer.
9091
9092         * class.c (finish_struct): Don't set TYPE_HAS_* flags that are
9093         set by grok_op_properties or finish_decl.
9094
9095         * decl.c: Don't warn about extern redeclared inline unless
9096         -Wextern-inline is given.
9097         * decl2.c (lang_decode_option): Ditto.
9098         * cp-tree.h: Ditto.
9099
9100 Mon Feb  7 17:29:24 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9101
9102         * decl.c (pushdecl_with_scope): Fix thinko.  Add forward
9103         declaration.
9104
9105         * decl.c (pushdecl_with_scope):  New function.
9106         * decl.c (pushdecl_top_level):  Use new function.
9107         * decl.c (pushtag):  Initialize newdecl.
9108         * decl.c (pushtag):  Push new type decl into correct scope.
9109
9110 Mon Feb  7 14:42:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
9111
9112         * call.c, cvt.c, init.c, search.c, cp-tree.h:
9113         Eradicate LOOKUP_PROTECTED_OK.
9114
9115 Mon Feb  7 13:57:19 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9116
9117         * decl.c (pushtag, xref_tag), cp-tree.h:  Add extra parameter
9118          'globalize' to signify implicit declarations.
9119         * decl.c (globalize_nested_type, maybe_globalize_type):  Removed.
9120         * decl.c (set_identifier_type_value_with_scope):  New function.
9121         * decl.c (set_identifier_local_value):  Simplify.
9122         * spew.c (yylex, do_addr):  Modify to return a _DEFN if a
9123         forward declaration (followed by ';' and not preceded by 'friend').
9124         * class.c, decl.c, except.c, init.c, parse.y,
9125         pt.c, search.c: Add new argument to calls to xref_tag and
9126         pushtag.
9127
9128 Mon Feb  7 00:22:59 1994  Jason Merrill  (jason@deneb.cygnus.com)
9129
9130         * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what
9131         ACCESSIBLY_DERIVED_FROM_P meant before.
9132         (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity.
9133
9134         * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1.
9135
9136         * search.c (get_base_distance_recursive): Members and friends of
9137         a class X can implicitly convert an X* to a pointer to a private or
9138         protected immediate base class of X.
9139         (get_binfo_recursive): Ditto.
9140         (get_base_distance): Ignore ambiguity if PROTECT < 0.
9141         (get_binfo): Lose multiple values of PROTECT.
9142         (compute_access): Protected is OK if the start of the
9143         search is an accessible base class of current_class_type.
9144
9145         * method.c (build_opfncall): Do check access on operator new here.
9146
9147         * decl.c (finish_function): Don't check access on operator new
9148         here.
9149
9150 Sun Feb  6 14:06:58 1994  Jason Merrill  (jason@deneb.cygnus.com)
9151
9152         * decl.c (xref_tag): The base of a derived struct is NOT always
9153         public.  Duh.
9154
9155         * pt.c (do_explicit_instantiation): New function, called from
9156         parser to do explicit function instantiation.
9157         (type_unification): Allow the args list to be terminated with
9158         void_list_node.
9159         (do_pending_expansions): Look at i->interface for non-member
9160         templates.
9161
9162         * parse.y (datadef): Move explicit_instantiation here.
9163         (structsp): From here.
9164         (datadef): Complain about `int;'.
9165
9166 Sun Feb  6 12:33:18 1994  Per Bothner  (bothner@kalessin.cygnus.com)
9167
9168         * pt.c (end_template_instantiation), cp-tree.h:  Remove unused
9169         second parameter, and simplify first from a TREE_LIST where
9170         we only care about its TREE_VALUE to just the value (an IDENTIFIER).
9171         * pt.c (instantiate_member_templates):  Simplify argument list
9172         from a TREE_LIST to just an IDENTIFIER.
9173         * lex.c (yyprint):  PRE_PARSED_CLASS_DECL is now just an IDENTIFIER.
9174         * parse.y (template_instantiate_once):  Simplify accordingly.
9175         * decl.c (inner_binding_level): New.  Use various places to
9176         simplify.
9177
9178 Sun Feb  6 02:49:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
9179
9180         * typeck2.c (build_functional_cast): int() -> int(0).
9181
9182 Sat Feb  5 00:53:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
9183
9184         * class.c (finish_struct): Don't do a bitwise copy for op= if the
9185         class has a virtual function table.
9186
9187         * typeck.c (convert_for_initialization): Restore warnings about
9188         not using defined op=.  Should really be my_friendly_aborts, I
9189         s'pose.
9190
9191 Fri Feb  4 14:21:00 1994  Jason Merrill  (jason@deneb.cygnus.com)
9192
9193         * class.c (finish_struct): Tidy up conditions for doing bitwise
9194         copies of objects.
9195
9196         * decl.c (build_default_constructor): #if 0 out.
9197
9198         * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF,
9199         CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR.
9200
9201         * decl.c (grokdeclarator): Don't return void_type_node for
9202         friends being defined here.
9203
9204         * init.c (perform_member_init): Only do the init if it's useful.
9205
9206         * lex.c (default_copy_constructor_body): If we don't need to do
9207         memberwise init, just call __builtin_memcpy.
9208         (default_assign_ref_body): Ditto.
9209
9210         * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0.
9211
9212 Fri Feb  4 13:02:56 1994  Mike Stump  <mrs@cygnus.com>
9213
9214         * lex.c (reinit_parse_for_method, cons_up_default_function):
9215         Don't give warn_if_unknown_interface warning when it came from a
9216         system header file.
9217         * pt.c (end_template_decl, instantiate_template): Ditto.
9218         * decl.c (start_decl): Ditto.
9219
9220 Fri Feb  4 00:41:21 1994  Jason Merrill  (jason@deneb.cygnus.com)
9221
9222         * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on
9223         enums.
9224
9225         * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of
9226         IS_AGGR_TYPE, since we don't know it's a type.
9227
9228 Thu Feb  3 11:36:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
9229
9230         * decl.c (grokdeclarator): Don't complain about anonymous unions.
9231
9232         * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally
9233         anonymous, but had a name given to it by a typedef.
9234
9235         * decl.c (grokdeclarator): When renaming an anonymous struct, set
9236         TYPE_WAS_ANONYMOUS.
9237
9238         * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS.
9239
9240         * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out.
9241
9242         * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS.
9243         (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS.
9244         
9245         * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested
9246         anonymous structs that get typedef'd.
9247
9248         * decl.c (grokdeclarator): Always return void_type_node for
9249         friends.
9250
9251         * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for
9252         friends.
9253         (dump_function_decl): Don't print out default args for
9254         a function used in an expression.
9255
9256         * decl.c (grokdeclarator): Give error on abstract declarator used
9257         in an invalid context (i.e. `void (*)();').
9258
9259         * error.c (cp_line_of): Support _TYPE nodes.
9260         (cp_file_of): Ditto.
9261
9262         * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR;
9263         it can happen for the RHS of an assignment stmt where the LHS is
9264         a COND_EXPR.
9265
9266         * init.c (expand_aggr_init_1): Deal with bracketed initializer
9267         lists properly.
9268
9269         * class.c (finish_struct): Deal with enumerators and typedefs
9270         again.
9271
9272 Wed Feb  2 11:30:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
9273
9274         * class.c (finish_struct): Tidy up loop over fields.
9275
9276         * errfn.c (cp_thing): Don't advance twice after a format.
9277
9278         * class.c (finish_struct): Complain about needing a constructor
9279         if a member has only non-default constructors, and don't try to
9280         generate a default constructor.
9281
9282         * decl.c (finish_decl): Also do the constructor thing if
9283         TYPE_NEEDS_CONSTRUCTING is set (for arrays).
9284
9285         * search.c (unuse_fields): New function: mark all fields in this
9286         type unused.
9287         (dfs_unuse_fields): Helper function.
9288
9289         * class.c (pushclass): If the new class is the same as the old
9290         class, still unuse the fields.
9291         (unuse_fields): Move to search.c.
9292
9293         * decl.c (grok_op_properties): Add friendp argument.
9294         (grokfndecl): Pass it.
9295         (start_method): Ditto.
9296
9297         * decl2.c (delete_sanity): Add use_global_delete parameter to catch
9298         ::delete calls.
9299
9300         * parse.y (unary_expr): Pass new parameter to delete_sanity.
9301
9302         * lex.c (default_copy_constructor_body): Don't choke if the union
9303         has no fields.
9304         (default_assign_ref_body): Ditto.
9305
9306         * call.c (compute_conversion_costs_ansi): Do the right thing for
9307         ellipsis matches.
9308
9309         * decl.c (push_to_top_level): Optimize.
9310
9311         * decl.c (start_function): Look for the lexical scope of a friend
9312         in DECL_CLASS_CONTEXT.
9313
9314         * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends.
9315
9316 Tue Feb  1 15:59:24 1994  Jason Merrill  (jason@deneb.cygnus.com)
9317
9318         * cp-tree.h (TREE_GETS_PLACED_NEW): New macro.
9319
9320         * init.c (init_init_processing): Don't assign BIN/BID to the
9321         IDENTIFIER_GLOBAL_VALUEs of their respective operators.
9322         (build_new): Check TREE_GETS_PLACED_NEW.
9323
9324         * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of
9325         op new with placement, set TREE_GETS_PLACED_NEW.
9326
9327         * cp-tree.h (ANON_UNION_P): New macro.  Applies to decls.
9328
9329         * class.c (finish_struct): Don't treat anonymous unions like
9330         other aggregate members.  Do synthesize methods for unions without
9331         a name, since they may or may not be "anonymous unions".
9332
9333         * decl2.c (grok_x_components): Wipe out memory of synthesized methods
9334         in anonymous unions.
9335
9336         * lex.c (default_copy_constructor_body): Support unions.
9337         (default_assign_ref_body): Ditto.
9338
9339 Mon Jan 31 12:07:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
9340
9341         * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes.
9342
9343         * error.c (args_as_string): New function (%A), like type_as_string
9344         except NULL_TREE -> "..."
9345
9346         * call.c (build_overload_call_real): Fix for new overloading.
9347
9348         * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags
9349         here.
9350
9351         * parse.y (operator_name): Instead of here.
9352
9353         * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list
9354         of functions.
9355
9356         * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY.
9357
9358         * method.c (build_opfncall): Don't need to massage return value
9359         any more, call build_overload_call with all flags.
9360
9361         * typeck.c (build_x_binary_op): Put back speculative call to
9362         build_opfncall.
9363         (build_x_unary_op): Ditto.
9364         (build_x_conditional_expr): Ditto.
9365
9366 Mon Jan 31 10:00:30 1994  Mike Stump  <mrs@cygnus.com>
9367
9368         * cvt.c (build_type_conversion_1): Change call to pedwarn into
9369         warning, and conditionalize upon warn_cast_qual.
9370
9371 Fri Jan 28 11:48:15 1994  Jason Merrill  (jason@deneb.cygnus.com)
9372
9373         * search.c (lookup_field): If xbasetype is a binfo, copy it to
9374         avoid clobbering its inheritance info.
9375
9376         * call.c (build_method_call): Don't overwrite basetype_path with
9377         TYPE_BINFO (inst_ptr_basetype) if they have the same type.
9378
9379         * search.c (compute_access): Fix handling of protected inheritance
9380         and friendship with the enclosing class.
9381
9382         * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for
9383         initialization of arbitrary variable.
9384
9385         * typeck2.c (build_functional_cast): Only try calling a method if
9386         one exists.
9387
9388         * decl.c (grokdeclarator): Move handling of constructor syntax
9389         initialization into first loop for generality.
9390         (parmlist_is_random): Lose.
9391
9392         * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments
9393         to default function.
9394
9395 Thu Jan 27 19:26:51 1994  Jason Merrill  (jason@deneb.cygnus.com)
9396
9397         * decl.c (grokparms): Abort if we get called with something we don't
9398         expect.
9399
9400 Thu Jan 27 17:37:25 1994  Mike Stump  <mrs@cygnus.com>
9401
9402         * call.c (build_overload_call_real): Change argument complain to
9403         flags to match style of rest of code.  Pass it down to
9404         build_function_call_real as necessary.
9405         * call.c (build_overload_call, build_overload_call_maybe): Change
9406         argument complain to flags to match style of rest of code.
9407         * cp-tree.h (build_function_call_real): Added fourth flags
9408         argument.
9409         * cvt.c (convert_to_reference): Only give warning messages, if
9410         LOOKUP_COMPLAIN is set.
9411         * typeck.c (build_x_function_call): Change simple complain
9412         argument to build_overload_call_maybe and build_overload_call, to
9413         LOOKUP_COMPLAIN to match style of rest of code.
9414         * typeck2.c (build_functional_cast): Ditto.
9415         * typeck.c (build_function_call_real): Add flags, so that we can
9416         not complain, if we don't want to complain.  Complain about
9417         arguments, if we are complaining, otherwise don't.
9418         * typeck.c (build_function_call, build_function_call_maybe):
9419         Stick in flags argument.
9420         * typeck.c (build_x_binary_op, build_x_unary_op,
9421         build_x_conditional_expr, build_x_compound_expr): Follow style of
9422         build_x_indirect_ref, as it is more correct and more common.
9423
9424 Thu Jan 27 14:36:20 1994  Jason Merrill  (jason@deneb.cygnus.com)
9425
9426         * call.c (build_method_call): Don't check for being called with
9427         a pointer.
9428
9429         * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the
9430         static initializer function.
9431
9432         * init.c (build_member_call): Use convert_force here, too.
9433
9434         * search.c (compute_access): Only treat static members specially
9435         if they are referenced directly.
9436
9437 Wed Jan 26 18:28:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
9438
9439         * gxxint.texi (Access Control): New node.
9440
9441         * search.c (current_scope): New function; returns whichever of
9442         current_class_type and current_function_decl is the most nested.
9443         (compute_access): Total overhaul to make it clearer and more
9444         correct.  Don't use the cache for now; in the only situation where
9445         it was used before, it gained nothing.  This frees up three of the
9446         DECL_LANG_FLAGs for possible other use!
9447
9448         * cp-tree.h: #if 0 out DECL_PUBLIC & friends.
9449
9450         * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC.
9451
9452         * call.c (build_method_call): Use convert_force to cast `this' --
9453         rely on the access checking for the method itself.
9454
9455         * init.c (is_friend): Do the nesting thing, handle types.  I am
9456         my own friend.
9457         (is_friend_type): Become a shell for is_friend.
9458         (add_friend): Never stick in ctype.
9459         Why are the friendship functions in init.c, anyway?
9460
9461 Wed Jan 26 17:50:00 1994  Mike Stump  <mrs@cygnus.com>
9462
9463         * cvt.c (build_type_conversion_1): Don't conditionalize call to
9464         pedwarn upon pedantic.
9465
9466 Wed Jan 26 17:20:46 1994  Mike Stump  <mrs@cygnus.com>
9467
9468         * cvt.c (convert_to_reference): Add 8.4.3 checking so that one
9469         gets a warning if one tries to initialize a non-const & from a
9470         non-lvalue.
9471         * cvt.c (convert_to_reference): Use %P format for argument
9472         numbers in warnings.
9473
9474 Wed Jan 26 14:35:06 1994  Mike Stump  <mrs@cygnus.com>
9475
9476         * init.c (build_delete): Follow style in call.c to construct the
9477         virtual call to the desctructor, as that code is right.  Fixes a
9478         problem of the compiler saying a pointer conversion is ambiguous.
9479
9480 Wed Jan 26 11:28:14 1994  Jason Merrill  (jason@deneb.cygnus.com)
9481
9482         * cp-tree.h (VTABLE_NAME_P): Change other occurrence of
9483         VTABLE_NAME_FORMAT to VTABLE_NAME.
9484
9485         * *: s/visibility/access/g
9486
9487 Tue Jan 25 18:39:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
9488
9489         * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR.
9490
9491 Tue Jan 25 13:54:29 1994  Mike Stump  <mrs@cygnus.com>
9492
9493         * init.c (build_delete): Back out Jan 17th & 18th pacthes, as
9494         they break libg++.
9495
9496 Tue Jan 25 13:11:45 1994  Jason Merrill  (jason@deneb.cygnus.com)
9497
9498         * decl.c (duplicate_decls): Fix pointer arithmetic.
9499
9500 Mon Jan 24 15:50:06 1994  Chip Salzenberg  (chip@fin.uucp)
9501
9502             [ cp-* changes propagated from c-* changes in 940114 snapshot ]
9503             * cp-parse.y (maybe_attribute): Allow multiple __attribute__
9504             clauses on a declaration.
9505
9506 Mon Jan 24 17:06:23 1994  Jason Merrill  (jason@deneb.cygnus.com)
9507
9508         * class.c (finish_struct): Do synthesize methods for anon
9509         structs, just not unions.
9510
9511 Mon Jan 24 13:50:13 1994  Kung Hsu  (kung@mexican.cygnus.com)
9512
9513         * decl.c (xref_tag): handle anonymous nested type.
9514         * decl.c (globalize_nested_type): add no globalize bit check.
9515         * spew.c (hack_more_ids) : templated nested decl not push top
9516         level.
9517
9518         * parse.y : get rid of 'goto do_components'. It is much better
9519         for debugging.
9520
9521         * decl.c (is_anon_name): get rid of the function and use the
9522         macro ANON_AGGRNAME_P.
9523         * pt.c : ditto.
9524
9525 Fri Jan 21 14:06:02 1994  Jason Merrill  (jason@deneb.cygnus.com)
9526
9527         * class.c (finish_struct): Don't synthesize any methods for
9528         anonymous structs/unions.
9529
9530         * typeck.c (build_modify_expr): Don't treat pmf's as class objects.
9531
9532 Thu Jan 20 18:56:46 1994  Jason Merrill  (jason@deneb.cygnus.com)
9533
9534         * method.c (build_opfncall): Call build_indirect_ref on
9535         synthesized instance for operator delete.
9536
9537         * pt.c (type_unification): Don't abort if called with a list of
9538         types in ARGS.
9539
9540         * class.c (instantiate_type): Deal with function templates.
9541
9542 Thu Jan 20 16:55:35 1994  Jim Wilson  (wilson@sphagnum.cygnus.com)
9543
9544         * Makefile.in (CC): Default to cc not gcc.
9545
9546 Thu Jan 20 13:47:54 1994  Jason Merrill  (jason@deneb.cygnus.com)
9547
9548         * typeck.c (build_modify_expr): Call constructor if appropriate.
9549
9550         * decl.c (push_to_top_level): Clear out class-level bindings cache.
9551
9552 Wed Jan 19 13:51:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
9553
9554         * call.c (resolve_scope_to_name): Work recursively (previously only
9555         looked down one level).
9556
9557         * lex.c (do_pending_inlines): If we're still dealing with the last
9558         batch of inlines, don't start working on a new one.
9559
9560         * Makefile.in (stamp-parse): Update conflict count.
9561         (TAGS): Fix.
9562
9563         * parse.y (explicit_instantiation): New rule; implements
9564         'template A<int>' syntax (though not 'template foo(int)' yet).
9565         (structsp): Add explicit_instantiation.
9566
9567 Tue Jan 18 13:53:05 1994  Jason Merrill  (jason@deneb.cygnus.com)
9568
9569         * class.c (finish_struct, etc.): Simplify decision to synthesize
9570         a destructor.
9571
9572         * call.c, class.c, cp-tree.h, decl.c, init.c,
9573         ptree.c, search.c, typeck.c, typeck2.c: Nuke
9574         TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING).
9575         * init.c (expand_aggr_init_1): Don't try non-constructor methods
9576         of initializing objects.
9577         (build_new): Don't try other methods if the constructor lookup fails.
9578
9579         * class.c (finish_base_struct): Set cant_have_default_ctor and
9580         cant_synth_copy_ctor properly.
9581         (finish_struct): Ditto.
9582
9583 Mon Jan 17 13:58:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
9584
9585         * typeck.c (build_modify_expr_1): #if 0 out again.
9586         (build_modify_expr): #if 0 out memberwise init code again.
9587
9588         * lex.c (default_copy_constructor_body): Be const-correct.
9589         (default_assign_ref_body): Ditto.
9590
9591         * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide
9592         whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING.
9593         (expand_aggr_init): Disable silent conversion from initializer list
9594         to list of args for a constructor.
9595
9596         * class.c (base_info): Lose needs_default_ctor.
9597         (finish_base_struct): Ditto.
9598         (finish_struct): Ditto.
9599
9600         * decl.c (init_decl_processing): Don't turn off flag_default_inline
9601         just because flag_no_inline is on.
9602         (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use
9603         constructor.
9604
9605         * class.c (finish_struct): Synthesize default ctor whenever
9606         allowed.
9607
9608         * Makefile.in (TAGS): Don't try to run etags on cp-parse.y.
9609
9610 Sat Jan 15 18:34:33 1994  Mike Stump  <mrs@cygnus.com>
9611
9612         * Makefile.in, configure: Handle the C++ front-end in a
9613         subdirectory.
9614         * cp-*: Move C++ front-end to cp/*.
9615
9616 Fri Jan 14 14:09:37 1994  Jason Merrill  (jason@deneb.cygnus.com)
9617
9618         * cp-typeck.c (build_function_call_real): Modify to match other
9619         instances of taking the address of the function.
9620
9621         * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if
9622         there are non-synthesized constructors.
9623         Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR.
9624         Always generate copy constructor if possible.
9625
9626         * cp-tree.h (lang_type): Add has_real_constructor bitfield.
9627         (TYPE_HAS_REAL_CONSTRUCTOR): Define.
9628
9629         * cp-lex.c (default_copy_constructor_body): Use init syntax
9630         for all bases.
9631
9632         * cp-type2.c (store_init_value): Only give error for initializer list
9633         if TYPE_HAS_REAL_CONSTRUCTOR.
9634
9635 Thu Jan 13 15:38:29 1994  Jason Merrill  (jason@deneb.cygnus.com)
9636
9637         * cp-tree.h (DECL_SYNTHESIZED): Add defn.
9638         (lang_decl): Add synthesized bitfield to decl_flags.
9639
9640         * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark
9641         artificial methods, rather than a line # of 0.
9642
9643 Fri Jan 14 18:25:29 1994  Kung Hsu  (kung@mexican.cygnus.com)
9644
9645         * cp-decl (xref_tag): fix a bug in conflict type.
9646         * cp-parse.y : add SCOPED_NAME for uninstantiated template nested
9647         type reference.
9648         * cp-spew.c (yylex) : generated SCOPED_NAME token.
9649         * cp-lex.c (yyprint): handle SCOPED_NAME.
9650
9651 Fri Jan 14 17:00:29 1994  Mike Stump  <mrs@cygnus.com>
9652
9653         * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is
9654         not right.
9655
9656 Thu Jan 13 14:00:35 1994  Kung Hsu  (kung@mexican.cygnus.com)
9657
9658         * cp-decl2.c (grok_x_components): fix a bug that enum type does not
9659         have type_flags.
9660
9661 Thu Jan 13 11:39:34 1994  Mike Stump  <mrs@cygnus.com>
9662
9663         Ensure that all vtable pointers are initialized with all the right
9664         values.
9665
9666         * cp-class.c (is_normal): Changed to reflect new meaning of
9667         CLASSTYPE_VFIELD_PARENT.
9668         * cp-class.c (maybe_fixup_vptrs): Use of
9669         CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided.  Use
9670         BINFO_MODIFIED instead.
9671         * cp-class.c (finish_struct): Changed to reflect new meaning of
9672         CLASSTYPE_VFIELD_PARENT.
9673         * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now.
9674         * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open
9675         coding it here.
9676         * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and
9677         re-implement.
9678         * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs.
9679         * cp-tree.h (vfield_parent): Changed to integer.
9680         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new
9681         meaning.
9682         * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs.
9683
9684 Wed Jan 12 18:24:16 1994  Kung Hsu  (kung@mexican.cygnus.com)
9685
9686         * cp-decl.c (xref_tag): re-implement globalize nested type.
9687         * cp-decl2.c (grok_x_components): ditto.
9688         * cp-parse.y: ditto.
9689         * cp-tree.h (lang_type): add no_globalize bit in type_flags.
9690
9691 Wed Jan 12 14:08:09 1994  Jason Merrill  (jason@deneb.cygnus.com)
9692
9693         * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend
9694         decls with a definition attached.
9695
9696         * cp-typeck.c (build_modify_expr): Undo previous change in the case
9697         of INIT_EXPRs.
9698
9699 Tue Jan 11 19:33:03 1994  Jason Merrill  (jason@deneb.cygnus.com)
9700
9701         * cp-typeck.c (build_modify_expr): Replace code for generating
9702         assignment semantics for classes with an error.
9703         (build_modify_expr_1): #if 0 out.
9704
9705         * cp-decl.c (pushdecl): Patch bogus design of pushdecl
9706         behavior for overloaded functions (it doesn't push anything).
9707
9708         * cp-class.c (finish_struct): When generating default op=,
9709         set TYPE_HAS_ASSIGNMENT.
9710
9711 Mon Jan 10 18:48:06 1994  Mike Stump  <mrs@cygnus.com>
9712
9713         * cp-cvt.c (convert): Make {double, clashing enum} -> enum
9714         invalid.
9715         * cp-typeck.c (convert_for_assignment): Simplify.
9716         * cp-decl2.c (warn_enum_clash): Removed.
9717         * invoke.texi (-Wenum-clash): Removed.
9718         * toplev.c (-Wenum-clash): Removed.
9719
9720 Mon Jan 10 17:48:37 1994  Kung Hsu  (kung@mexican.cygnus.com)
9721
9722         * cp-decl.c (finish_decl): fix incorrect popclass call.
9723
9724         * cp-decl.c (is_anon_name): new function, check whether the name
9725         is anonymous name generated by compiler.
9726         * cp-decl.c (grokdeclarator): allow nested SCOPE_REF
9727         * cp-spew.c (hack_more_ids): handle nested type in template.
9728         * cp-parse.y : handle nested type reference in uninstantiated
9729         template.
9730         * cp-call.c (build_method_call): handle uninstantiated template
9731         case.
9732         * cp-pt.c (search_nested_type_in_tmpl): new function, search nested 
9733         type in template.
9734         * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested 
9735         type by name.
9736         * cp-pt.c (tsubst): handle nested type search by name.
9737
9738 Mon Jan 10 14:32:18 1994  Jason Merrill  (jason@deneb.cygnus.com)
9739
9740         * cp-init.c (build_member_call): Propagate qualifiers to new type.
9741
9742         * cp-call.c (build_method_call): Count functions the new way.
9743
9744 Fri Jan  7 19:03:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
9745
9746         * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes,
9747         too.
9748
9749 Tue Jan  4 16:45:51 1994  Kung Hsu  (kung@cirdan.cygnus.com)
9750
9751         * cp-parse.y: change to handle whether to globalize nested class.
9752         * cp-decl.c(xref_tag, maybe_globalize_type): Ditto.
9753
9754 Mon Jan  3 22:22:32 1994  Gerald Baumgartner  (gb@cygnus.com)
9755
9756         * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c
9757         cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y
9758         cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c
9759         gplus.gperf toplev.c: Incorporated C++ signature extension.
9760         * cp-sig.c: New file, contains most of signature processing.
9761         * cp-hash.h: Regenerated from gplus.gperf.
9762
9763         * gcc.1 g++.1: Added explanation for  the `-fhandle-signatures'
9764         and `-fno-handle-signatures' command line flags.
9765
9766         * gcc.texi: Changed the last-modification date.
9767         * invoke.texi: Added `-fhandle-signatures' in the list of
9768         C++ language options.  Added explanation for this option.
9769
9770 Tue Dec 28 21:10:03 1993  Mike Stump  <mrs@cygnus.com>
9771
9772         * cp-init.c (expand_vec_init): Remove comptypes test, as it is too
9773         harsh here.
9774
9775 Tue Dec 28 13:42:22 1993  Mike Stump  <mrs@cygnus.com>
9776
9777         * cp-pt.c (do_pending_expansions): Decide to expand a template
9778         member function, based upon it's class type, not the class type of
9779         the first place it was declared.
9780
9781 Tue Dec 28 05:42:31 1993  Mike Stump  <mrs@cygnus.com>
9782
9783         * cp-class.c (is_normal): New routine, use to determine when the
9784         given binfo is the normal one.  (The one that should have the simple
9785         vtable name.)
9786         * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME
9787         to check if two fndecls are `the same'.  Sometimes this routine can
9788         modify the main vtable, and normal should be 1, in that case, so use
9789         is_normal() to determine if this is the main vtable for the class.
9790         Don't recurse down virtual bases, as they are shared, and we take
9791         care of them elsewhere.
9792         * cp-class.c (modify_vtable_entries): If we have already updated the
9793         vtable with the new virtual, don't do it again.
9794         * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as
9795         appropriate.  Do virtual function overriding in virtual bases, after
9796         normal overriding, so that the base function list in DECL_VINDEX is
9797         not overridden, before we have a chance to run through the list.
9798         Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'.
9799         Make sure we pass the right address into modify_vtable_entries.
9800         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which
9801         binfo is the one that has the vtable that we based our vtable on.
9802
9803 Fri Dec 24 09:40:52 1993  Michael Tiemann  (tiemann@blues.cygnus.com)
9804
9805         * cp-typeck.c (c_expand_start_case): Use default_conversion to
9806         convert expression from reference type if necessary.
9807
9808 Wed Dec 22 17:58:43 1993  Jason Merrill  (jason@deneb.cygnus.com)
9809
9810         * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before
9811         trying to read its TREE_VALUE.
9812
9813         * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here.
9814         (finish_struct): Instead of here.
9815
9816 Tue Dec 21 14:34:25 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9817
9818         * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't
9819         have TYPE_PTRMEMFUNC_P set before we try to build its
9820         CLASSTYPE_ID_AS_LIST.
9821         (get_decl_list): Likewise, when trying to read it.
9822
9823         * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined.
9824         (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT.
9825
9826 Mon Dec 20 13:35:03 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9827
9828         * cp-typeck.c (rationalize_conditional_expr): New function.
9829         (unary_complex_lvalue): Use it.
9830         (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it
9831         with build_unary_op won't cut it.  Don't wrap the COND_EXPR with a
9832         SAVE_EXPR either.
9833
9834         * cp-decl2.c (explicit_warn_return_type): Deleted variable.
9835         (lang_decode_option): Set warn_return_type, not explicit_*, for
9836         -Wreturn-type and -Wall.  This is what rest_of_compilation uses to
9837         decide if it should go into jump_optimize or not.
9838         * cp-tree.h (explicit_warn_return_type): Deleted.
9839         * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*.
9840         (finish_function): Also complain about no return in a non-void fn if
9841         we're being pedantic (don't rely on use of -Wreturn-type).
9842
9843 Fri Dec 17 15:45:46 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9844
9845         * cp-decl.c (grokdeclarator): Forbid declaration of a function as
9846         static if it's being done inside another function.
9847
9848         * cp-search.c (compute_visibility): Check for friendship both ways.
9849
9850 Fri Dec 17 14:28:25 1993  Jason Merrill  (jason@deneb.cygnus.com)
9851
9852         * cp-cvt.c (build_default_binary_type_conversion): Make error
9853         messages more helpful.
9854
9855         * cp-error.c (op_as_string): New function, returns "operator =="
9856         given EQ_EXPR or suchlike.
9857
9858 Fri Dec 17 13:28:11 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9859
9860         * cp-call.c (print_n_candidates): New function.
9861         (build_overload_call_real): Use it when we complain about a call
9862         being ambiguous.
9863
9864 Fri Dec 17 12:41:17 1993  Jason Merrill  (jason@deneb.cygnus.com)
9865
9866         * cp-call.c (build_method_call): Fix checking for static call
9867         context.
9868
9869         * cp-method.c (build_opfncall): Call build_indirect_ref on argument
9870         to operator new.
9871
9872         * cp-init.c (build_new): Don't mess with rval when building
9873         indirect ref.
9874
9875 Thu Dec 16 16:48:05 1993  Kung Hsu  (kung@cirdan.cygnus.com)
9876
9877         * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_
9878         NAME(type) may not be exist. It's not a problem for old compiler.
9879
9880 Thu Dec 16 14:46:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9881
9882         * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's
9883         never used for anything.
9884         (struct lang_type, member type_flags): Delete field
9885         `alters_visibility', and up `dummy' by 1.
9886         * cp-class.c (finish_base_struct): Delete code that copies the
9887         setting of CLASSTYPE_ALTERS_VISIBILITIES_P.
9888         (finish_struct): Delete code that sets it.
9889
9890 Thu Dec 16 14:44:39 1993  Jason Merrill  (jason@deneb.cygnus.com)
9891
9892         * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to
9893         build_method_call that I messed up before.
9894
9895         * cp-search.c (get_base_distance): If protect > 1, allow immediate
9896         private base.
9897
9898         * cp-class.c (finish_base_struct): Set cant_synth_* correctly.
9899         (finish_struct): Ditto.  Well, nigh-correctly; it won't deal
9900         properly with the case where a class contains an object of an
9901         ambiguous base class which has a protected op=.  Should be fixed
9902         when the access control code gets overhauled.
9903         (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly.
9904
9905 Thu Dec 16 12:17:06 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9906
9907         * cp-lex.c (real_yylex): Turn the code back on that deals with
9908         __FUNCTION__ and __PRETTY_FUNCTION__.  Don't use lookup_name, to
9909         avoid the ambiguity problems that led to it being turned off in the
9910         first place.
9911
9912         * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P
9913         to see if something is a method.
9914
9915 Wed Dec 15 18:35:58 1993  Mike Stump  <mrs@cygnus.com>
9916
9917         * cp-typeck.c (build_modify_expr): Avoid error messages on small
9918         enum bit fields.
9919         * cp-typeck.c (convert_for_assignment): Add missing argument to
9920         cp_warning and cp_pedwarn calls.
9921
9922 Wed Dec 15 18:25:32 1993  Jason Merrill  (jason@deneb.cygnus.com)
9923
9924         * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base
9925         initializers; it's just anachronistic.
9926
9927         * cp-decl.c (finish_decl): Don't require external-linkage arrays
9928         to have a complete type at declaration time when pedantic.
9929
9930 Tue Dec 14 11:37:23 1993  Jason Merrill  (jason@deneb.cygnus.com)
9931
9932         * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set.
9933
9934         * cp-call.c (build_method_call): Don't dereference pointer given
9935         as instance.
9936
9937         * cp-decl.c (finish_function): Don't pass pointer to
9938         build_method_call.
9939         (finish_function): Ditto.
9940
9941         * cp-typeck.c (build_x_function_call): Ditto.
9942
9943         * cp-method.c (build_component_type_expr): Ditto.
9944
9945         * cp-init.c (build_member_call): Ditto.
9946         (build_new): Ditto.
9947
9948 Mon Dec 13 18:04:33 1993  Kung Hsu  (kung@cirdan.cygnus.com)
9949
9950         * cp-decl.c (xref_tag): fix regression created by changes made 
9951         in Dec. 7 1993.
9952         * cp-decl.c (xref_defn_tag): fix parallel nested class problem.
9953
9954 Fri Dec 10 12:40:25 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9955
9956         * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print
9957         out the final evaluation of the function, so we can see if ELLIPSIS,
9958         USER, and EVIL were set at the end.
9959
9960         * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue,
9961         only go for setting TRIVIAL_CODE if we are dealing with types that
9962         are compatible.
9963
9964 Thu Dec  9 18:27:22 1993  Mike Stump  <mrs@cygnus.com>
9965
9966         * cp-decl.c (flag_huge_objects): New flag to allow large objects.
9967         * toplev.c (lang_options): Ditto.
9968         * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto.
9969         * cp-decl.c (delta_type_node): New type for delta entries.
9970         * cp-tree.h (delta_type_node): Ditto.
9971         * cp-decl.c (init_decl_processing): Setup delta_type_node.
9972         * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use
9973         delta_type_node instead of short_integer_type_node. 
9974         * cp-class.c (build_vtable_entry): Ditto.
9975
9976 Thu Dec  9 16:19:05 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9977
9978         * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of
9979         NO_{DOLLAR,DOT} macro checks, so it always gets defined.
9980         (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL.
9981
9982 Wed Dec  8 17:38:06 1993  Mike Stump  <mrs@cygnus.com>
9983
9984         * cp-decl.c (finish_decl): Make sure things that can go into
9985         "common", do go into common, if -fcommon is given.
9986
9987 Wed Dec  8 13:01:54 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
9988
9989         * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function.
9990         (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out
9991         argument matching diagnostics to make instantly clear what the
9992         compiler is doing.
9993
9994         * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue,
9995         then check to see if the penalty was increased due to
9996         signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't.
9997
9998 Tue Dec  7 18:29:14 1993  Kung Hsu  (kung@cirdan.cygnus.com)
9999
10000         * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution
10001         problem.
10002
10003 Tue Dec  7 16:09:34 1993  Jason Merrill  (jason@deneb.cygnus.com)
10004
10005         * cp-class.c (finish_struct): Before synthesizing methods, if no
10006         methods have yet been declared then set nonprivate_method.  Don't
10007         set non_private method after synthesizing a method.
10008
10009         * cp-lex.c (extract_interface_info): If flag_alt_external_templates
10010         is set, tie emitted code to the location of template instantiation,
10011         rather than definition.
10012
10013         * cp-tree.h: Declare flag_alt_external_templates.
10014
10015         * cp-decl2.c (lang_decode_option): Support -falt-external-templates.
10016
10017         * toplev.c (lang_options): Ditto.
10018
10019 Mon Oct  4 12:50:02 1993  Chip Salzenberg  (chip@fin.uucp)
10020
10021         [changes propagated from 930810 snapshot]
10022         * cp-decl.c (init_decl_processing): Make long long available for use
10023         as SIZE_TYPE and PTRDIFF_TYPE.
10024         (finish_decl): Allow file-scope static incomplete array.
10025         (grokdeclarator): Don't pass on const and volatile fron function
10026         value type to function type.
10027         Warn here for volatile fn returning non-void type.
10028         * cp-parse.y (attrib): Accept attributes `volatile' with alias
10029         `noreturn', and `const'.
10030         * cp-typeck.c (default_conversion): Don't lose const and volatile.
10031         (build_binary_op_nodefault): Generate pedantic warning for comparison
10032         of complete pointer type with incomplete pointer type.
10033         (build_c_cast): Be careful that null pointer constant be INTEGER_CST.
10034
10035 Tue Dec  7 10:46:48 1993  Jason Merrill  (jason@deneb.cygnus.com)
10036
10037         * cp-init.c (expand_vec_init): When creating a temporary for copying
10038         arrays, use the type of the source, not the target.
10039
10040         * cp-cvt.c (convert): Pass an argument for errtype to
10041         convert_to_reference.
10042
10043         * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with
10044         methods, -> and `this'.
10045
10046 Mon Dec  6 17:12:33 1993  Jason Merrill  (jason@deneb.cygnus.com)
10047
10048         * cp-error.c (parm_as_string): New function; returns `this' or arg
10049         number.  Corresponds to %P.
10050         (dump_expr): Deal with method calls.
10051
10052         * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment.
10053         * cp-typeck.c (convert_for_assignment): Ditto.
10054         (warn_for_assignment): Lose.
10055
10056 Mon Dec  6 11:33:35 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
10057
10058         * cp-call.c (ideal_candidate_ansi): Delete code that was never
10059         doing anything useful.  Instead, sort once, and DO NOT wipe
10060         out any codes with EVIL_CODE, since that's what we use as a
10061         marker for the end of the list of candidates.
10062
10063         * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN.
10064
10065 Mon Dec  6 12:49:17 1993  Jason Merrill  (jason@deneb.cygnus.com)
10066
10067         * cp-init.c (get_aggr_from_typedef): New function, like
10068         is_aggr_typedef but returns the _TYPE.
10069
10070         * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name.
10071
10072 Sun Dec  5 18:12:48 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
10073
10074         * cp-lex.c (readescape): Pedwarn when a hex escape is out of range.
10075
10076 Thu Nov 25 23:50:19 1993  Chip Salzenberg  (chip@fin.uucp)
10077
10078         Delay language context change until beginning of next decl.
10079
10080         * cp-lex.h (c_header_level): Removed.
10081         (pending_lang_change): Declared.
10082         * cp-lex.c (c_header_level): Renamed from in_c_header, made static.
10083         (pending_lang_change): Defined.
10084         (check_newline): Rework code that recognizes line number and
10085         filename changes.  Instead of pushing and popping lang context,
10086         increment and decrement pending_lang_change.
10087         (do_pending_lang_change):  Push and pop lang context according
10088         to value of pending_lang_change.
10089         * cp-parse.y (extdefs): Use lang_extdef instead of extdef.
10090         (extdef): Same as extdef, but call do_pending_lang_change() first.
10091
10092 Mon Nov 15 15:39:15 1993  Chip Salzenberg  (chip@fin.uucp)
10093
10094         * cp-typeck.c (build_binary_op_nodefault): Warn for ordered
10095         compare of ptr with 0 only if pedantic in both cases.
10096
10097 Thu Nov 25 13:31:37 1993  Chip Salzenberg  (chip@fin.uucp)
10098
10099         Reinstate the below patch, which got lost in the Cygnus merge:
10100         Tue Nov 23 13:59:24 1993  Hallvard B Furuseth  (hbf@durin.uio.no)
10101         * cp-parse.y (maybe_type_qual): Don't fail to set $$.
10102
10103 Wed Nov 17 19:03:30 1993  Chip Salzenberg  (chip@fin.uucp)
10104
10105         * cp-parse.y (attrib): Allow "ident(ident)" like the C front end.
10106
10107 Fri Oct 22 20:43:37 1993  Paul Eggert  (eggert@twinsun.com)
10108
10109         * cp-lex.c (real_yylex): Diagnose floating point constants
10110         that are too large.
10111
10112 Wed Nov 17 19:10:37 1993  Chip Salzenberg  (chip@fin.uucp)
10113
10114         * cp-type2.c (build_functional_cast): ARM page 16: When a class
10115         and an object, function or enumerator are declared in the same
10116         scope with the same name, the class name is hidden.
10117
10118 Wed Nov 17 19:07:18 1993  Chip Salzenberg  (chip@fin.uucp)
10119
10120         * cp-call.c (convert_harshness_ansi): Distinguish float, double,
10121         and long double from each other when overloading.
10122         (compute_conversion_costs_{ansi,old}, build_method_call,
10123         build_overlay_call_real, convert_to_aggr): Always set and
10124         always use H_LEN member of candidate structure.
10125
10126 Mon Oct 11 23:10:53 1993  Chip Salzenberg  (chip@fin.uucp)
10127
10128         * cp-decl.c (duplicate_decls): Note redeclarations of library
10129         functions, and generate distinct warnings for them.
10130
10131 Mon Oct  4 12:26:49 1993  Chip Salzenberg  (chip@fin.uucp)
10132
10133         Support format warnings in G++.
10134
10135         * cp-tree.h: Protect against multiple inclusion.
10136         Declare all public functions in c-common.c (copy from c-tree.h).
10137         (STDIO_PROTO): Define.
10138         (warn_format): Declare.
10139         (record_format_info): Remove declaration.
10140         * cp-decl.c (init_decl_processing): Call init_function_format_info.
10141         * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format.
10142         * cp-typeck.c (build_function_call_real): Call check_function_format.
10143         (record_format_info): Remove -- obsolete stub.
10144
10145 Sat Jul 24 12:04:29 1993  Chip Salzenberg  (chip@fin.uucp)
10146
10147         * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl
10148         following an extern one (for -Wredundant-decls).
10149         * cp-parse.y (primary): In statement expression case, if compstmt
10150         returns something other than a BLOCK, return it unchanged.
10151
10152 Thu Dec  2 20:44:58 1993  Chip Salzenberg  (chip@fin.uucp)
10153
10154         * cp-decl.c (warn_extern_redeclared_static): New function made
10155         from code extracted from pushdecl.
10156         (duplicate_decls, pushdecl): Call new function.
10157         (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE
10158         to be a TREE_LIST when function is declared in 'extern "C" {}'.
10159
10160 Fri Dec  3 16:01:10 1993  Jason Merrill  (jason@deneb.cygnus.com)
10161
10162         * cp-class.c (duplicate_tag_error): Use cp_error.
10163         (finish_base_struct): Check for ambiguity with direct base, and don't
10164         generate op= or copy ctor if it exists.
10165
10166 Fri Dec  3 15:32:34 1993  Kung Hsu  (kung@cirdan.cygnus.com)
10167
10168         * cp-init.c (expand_member_init): when initializer name is null,
10169         don't try to build it now because emit_base_init will handle it.
10170
10171 Fri Dec  3 12:28:59 1993  Jason Merrill  (jason@deneb.cygnus.com)
10172
10173         * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for
10174         code such as ExceptionHandler::operator=.
10175
10176 Fri Dec  3 10:32:08 1993  Jason Merrill  (jason@deneb.cygnus.com)
10177
10178         * cp-decl.c (grokdeclarator): Don't try to print out dname when
10179         complaining about arrays of references if decl_context==TYPENAME,
10180         since it will be null.
10181
10182         * cp-decl2.c: Default to flag_ansi_overloading.
10183
10184 Thu Dec  2 18:05:56 1993  Kung Hsu  (kung@cirdan.cygnus.com)
10185
10186         * cp-call.c (build_method_call): use binfo from instance if it's
10187         different from binfo (basetype_path) passed from above.
10188
10189 Thu Dec  2 12:48:36 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
10190
10191 Wed Nov 17 19:14:29 1993  Chip Salzenberg  (chip@fin.uucp)
10192
10193         cp-error.c (dump_expr): Use unsigned chars to output a
10194         TREE_REAL_CST in hex.
10195
10196 Thu Dec  2 11:05:48 1993  Jason Merrill  (jason@deneb.cygnus.com)
10197
10198         * cp-class.c (finish_struct): Fix typo in setting
10199         cant_synth_asn_ref.
10200
10201         * cp-tree.h (TYPE_NESTED_NAME): New macro, does
10202         DECL_NESTED_TYPENAME (TYPE_NAME (NODE)).
10203
10204         * cp-lex.c (default_copy_constructor_body): Change
10205         DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype).
10206         (default_assign_ref_body): Ditto.
10207         (default_copy_constructor_body): Call operator= explicitly for
10208         base classes that have no constructor.
10209
10210 Thu Dec  2 10:47:15 1993  Michael Tiemann  (tiemann@blues.cygnus.com)
10211
10212         * cp-call.c (build_method_call): If the instance variable is
10213         converted to error_mark_node when we're trying to convert it to the
10214         base type of a method we're looking up, return error_mark_node.
10215
10216 Thu Dec  2 10:41:16 1993  Torbjorn Granlund  (tege@cygnus.com)
10217
10218         * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR
10219         cases, tests for unsigned operands by peeking inside a NOP_EXPR.
10220
10221 Wed Dec  1 13:33:34 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
10222
10223         * cp-call.c (compute_conversion_costs_ansi): Use the size of struct
10224         harshness_code, not the size of short, for clearing out the
10225         ansi_harshness.
10226
10227         * cp-call.c (print_candidates): New function.
10228         (build_method_call): When we had some candidates, but didn't get a
10229         usable match, don't report that we got an error with the first
10230         candidate.  Instead, say there were no matches, and list the
10231         candidates with print_candidates.  In the second pass, make sure we
10232         clear out ever_seen, so we can accurately count the number of
10233         functions that qualified.
10234
10235 Wed Dec  1 09:53:59 1993  Torbjorn Granlund  (tege@cygnus.com)
10236
10237         * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR
10238         only if op1 is known to be != -1.
10239         (build_binary_op_nodefault): Handle *_DIV_EXPR likewise.
10240
10241 Tue Nov 30 14:07:26 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
10242
10243         * cp-method.c (hack_identifier): If the field itself is private, and
10244         not from a private base class, say so.
10245
10246 Mon Nov 29 03:00:56 1993  Jason Merrill  (jason@deneb.cygnus.com)
10247
10248         * cp-decl.c (grokdeclarator): Always warn on initialization of
10249         const member.
10250
10251 Wed Nov 24 00:49:35 1993  Jason Merrill  (jason@deneb.cygnus.com)
10252
10253         * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly.
10254         (finish_base_struct): Set cant_synth_asn_ref properly.
10255
10256         * cp-lex.c (cons_up_default_function): Add section for operator=.
10257         (default_assign_ref_body): New function, mostly cribbed from
10258         default_copy_constructor_body.
10259
10260         * cp-class.c (base_info): Add members cant_synth_copy_ctor,
10261         cant_synth_asn_ref, no_const_asn_ref.
10262         (finish_base_struct): Update no_const_asn_ref, note that you should
10263         update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF.
10264         (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and
10265         initialize them properly.  Set no_const_asn_ref properly.  Set
10266         cant_synth_* in some of the situations where they should be set.
10267         Propagate TYPE_GETS_ASSIGN_REF.  Use cant_synth_copy_ctor.  Add call
10268         to cons_up_default_function for operator=.
10269
10270 Tue Nov 23 20:24:58 1993  Mike Stump  <mrs@cygnus.com>
10271
10272         * cp-cvt.c (convert_force): Add code to perform casting of pointer
10273         to member function types.
10274         * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate
10275         when the conversion should be done, regardless.
10276         * cp-tree.h (build_ptrmemfunc): Ditto.
10277         * cp-type2.c (digest_init): Ditto.
10278         * cp-typeck.c (convert_for_assignment): Ditto.
10279
10280 Tue Nov 23 18:06:58 1993  Jason Merrill  (jason@deneb.cygnus.com)
10281
10282         * cp-error.c (dump_expr): Do the right thing for variables of
10283         reference type.
10284
10285         * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF
10286         and its kin properly.
10287         (xref_tag): Propagate TYPE_GETS_ASSIGN_REF.
10288
10289 Tue Nov 23 12:26:13 1993  Mike Stump  <mrs@cygnus.com>
10290
10291         * cp-method.c (build_opfncall): Don't count pointer to member
10292         functions as aggregates here, as we don't want to look up methods in
10293         them.  The compiler would core dump if we did, as they don't have
10294         normal names.
10295         * cp-typeck.c (build_indirect_ref): Improve wording on error
10296         message.
10297
10298 Mon Nov 22 14:22:23 1993  Jason Merrill  (jason@deneb.cygnus.com)
10299
10300         * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn
10301         (since it's supported in other compiler bits).
10302
10303         * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name
10304         argument.
10305
10306         * cp-error.c (dump_function_decl): Don't print return type for
10307         constructors and destructors.
10308
10309         * cp-cvt.c (cp_convert_to_pointer): Import code from
10310         convert_to_pointer so we can return error_mark_node in the case of an
10311         error, and to allow more meaningful error messages.
10312         (build_type_conversion): Don't go through void* when trying
10313         to convert to a pointer type.
10314
10315         * cp-decl.c (grokfndecl): Move call to grok_op_properties back
10316         after grokclassfn so that it's dealing with the right decl.
10317         (grok_op_properties): Don't assert !methodp for op new and op delete.
10318
10319         * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now
10320         no uses of it in the compiler).
10321
10322         * cp-call.c (build_scoped_method_call): Fix for destructors of simple
10323         types.
10324         (build_method_call): Ditto.
10325
10326 Fri Nov 19 12:59:38 1993  Jason Merrill  (jason@deneb.cygnus.com)
10327
10328         * cp-tree.c (count_functions): Abstraction function.
10329
10330         * cp-call.c (build_overload_call_real): Deal with new overloading
10331         properly, remove dead code.
10332
10333         * gcc.c (default_compilers): Generate and use .ii files in the
10334         intermediate stage of compiling C++ source.
10335
10336 Fri Nov 19 11:26:09 1993  Jim Wilson  (wilson@sphagnum.cygnus.com)
10337
10338         * cp-expr.c (cplus_expand_expr): Make call_target a valid memory
10339         address before using it, so it can be later safely compared.
10340
10341 Fri Nov 12 15:30:27 1993  Jason Merrill  (jason@deneb.cygnus.com)
10342
10343         * cp-pt.c (tsubst): Deal with new overloading.
10344
10345         * cp-typeck.c (fntype_p): is the arg function type?
10346         (comp_target_parms): pedwarn on conversion from (anything) to (...).
10347         (build_x_function_call): Deal with new overloading.
10348
10349         * cp-tree.c (decl_list_length): Deal with new overloading.
10350         (decl_value_member): Like value_member, but for DECL_CHAINs.
10351
10352         * cp-decl.c (duplicate_decls): Deal with new overloading.
10353         (start_decl): Ditto.
10354
10355         * cp-class.c (instantiate_type): Deal with new overloading.
10356
10357         * cp-call.c (convert_harshness_ansi): Deal with new overloading.
10358         (convert_harshness_old): Deal with new overloading.
10359         (build_overload_call_real): Ditto.
10360
10361 Mon Nov  8 13:50:49 1993  Jason Merrill  (jason@deneb.cygnus.com)
10362
10363         * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL
10364         if unambiguous, NULL_TREE otherwise.
10365         (get_first_fn): Returns the first appropriate FUNCTION_DECL.
10366         (is_overloaded_fn): Returns whether or not the passed tree is
10367         a function or list of functions.
10368
10369         * cp-init.c (init_init_processing): use `get_first_fn' to find
10370         the FUNCTION_DEFN for new and delete.
10371
10372         * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut
10373         code size in half (I spit on special cases).
10374
10375 Tue Sep  7 20:03:33 1993  Jason Merrill  (jason@deneb.cygnus.com)
10376
10377         * cp-decl.c: Allow references and template type parameters as well